diff --git a/dev/_images/2dcollections3d_demo.png b/dev/_images/2dcollections3d_demo.png deleted file mode 100644 index 68871b1bb3a..00000000000 Binary files a/dev/_images/2dcollections3d_demo.png and /dev/null differ diff --git a/dev/_images/2dcollections3d_demo1.png b/dev/_images/2dcollections3d_demo1.png deleted file mode 100644 index 68871b1bb3a..00000000000 Binary files a/dev/_images/2dcollections3d_demo1.png and /dev/null differ diff --git a/dev/_images/accented_text.png b/dev/_images/accented_text.png deleted file mode 100644 index 3a01508ec6a..00000000000 Binary files a/dev/_images/accented_text.png and /dev/null differ diff --git a/dev/_images/agg_buffer_to_array_00.png b/dev/_images/agg_buffer_to_array_00.png deleted file mode 100644 index 93f7a61d9dd..00000000000 Binary files a/dev/_images/agg_buffer_to_array_00.png and /dev/null differ diff --git a/dev/_images/agg_buffer_to_array_01.png b/dev/_images/agg_buffer_to_array_01.png deleted file mode 100644 index ea4d5f5aa9d..00000000000 Binary files a/dev/_images/agg_buffer_to_array_01.png and /dev/null differ diff --git a/dev/_images/align_ylabels.png b/dev/_images/align_ylabels.png deleted file mode 100644 index ca0b5f9805f..00000000000 Binary files a/dev/_images/align_ylabels.png and /dev/null differ diff --git a/dev/_images/alignment_test.png b/dev/_images/alignment_test.png deleted file mode 100644 index 7f790a32843..00000000000 Binary files a/dev/_images/alignment_test.png and /dev/null differ diff --git a/dev/_images/anchored_artists.png b/dev/_images/anchored_artists.png deleted file mode 100644 index 7f4a17c589b..00000000000 Binary files a/dev/_images/anchored_artists.png and /dev/null differ diff --git a/dev/_images/anchored_box01.png b/dev/_images/anchored_box01.png deleted file mode 100644 index ec4f38a0f85..00000000000 Binary files a/dev/_images/anchored_box01.png and /dev/null differ diff --git a/dev/_images/anchored_box02.png b/dev/_images/anchored_box02.png deleted file mode 100644 index a4c3981cf98..00000000000 Binary files a/dev/_images/anchored_box02.png and /dev/null differ diff --git a/dev/_images/anchored_box03.png b/dev/_images/anchored_box03.png deleted file mode 100644 index 586f2f3e062..00000000000 Binary files a/dev/_images/anchored_box03.png and /dev/null differ diff --git a/dev/_images/anchored_box04.png b/dev/_images/anchored_box04.png deleted file mode 100644 index e9633a1f913..00000000000 Binary files a/dev/_images/anchored_box04.png and /dev/null differ diff --git a/dev/_images/animation_demo.png b/dev/_images/animation_demo.png deleted file mode 100644 index c71e3b52345..00000000000 Binary files a/dev/_images/animation_demo.png and /dev/null differ diff --git a/dev/_images/annotate_explain.png b/dev/_images/annotate_explain.png deleted file mode 100644 index 62935ea3f9a..00000000000 Binary files a/dev/_images/annotate_explain.png and /dev/null differ diff --git a/dev/_images/annotate_simple01.png b/dev/_images/annotate_simple01.png deleted file mode 100644 index 8b7325a419b..00000000000 Binary files a/dev/_images/annotate_simple01.png and /dev/null differ diff --git a/dev/_images/annotate_simple02.png b/dev/_images/annotate_simple02.png deleted file mode 100644 index 5ae9cb87fba..00000000000 Binary files a/dev/_images/annotate_simple02.png and /dev/null differ diff --git a/dev/_images/annotate_simple03.png b/dev/_images/annotate_simple03.png deleted file mode 100644 index 8c43cf259c8..00000000000 Binary files a/dev/_images/annotate_simple03.png and /dev/null differ diff --git a/dev/_images/annotate_simple04.png b/dev/_images/annotate_simple04.png deleted file mode 100644 index 7c78a79d84a..00000000000 Binary files a/dev/_images/annotate_simple04.png and /dev/null differ diff --git a/dev/_images/annotate_simple_coord01.png b/dev/_images/annotate_simple_coord01.png deleted file mode 100644 index 1bf5b736b4b..00000000000 Binary files a/dev/_images/annotate_simple_coord01.png and /dev/null differ diff --git a/dev/_images/annotate_simple_coord02.png b/dev/_images/annotate_simple_coord02.png deleted file mode 100644 index 81724a82301..00000000000 Binary files a/dev/_images/annotate_simple_coord02.png and /dev/null differ diff --git a/dev/_images/annotate_simple_coord03.png b/dev/_images/annotate_simple_coord03.png deleted file mode 100644 index a28ff0308c2..00000000000 Binary files a/dev/_images/annotate_simple_coord03.png and /dev/null differ diff --git a/dev/_images/annotate_text_arrow.png b/dev/_images/annotate_text_arrow.png deleted file mode 100644 index 72dacc8cf46..00000000000 Binary files a/dev/_images/annotate_text_arrow.png and /dev/null differ diff --git a/dev/_images/annotate_transform.png b/dev/_images/annotate_transform.png deleted file mode 100644 index c0cf75f2102..00000000000 Binary files a/dev/_images/annotate_transform.png and /dev/null differ diff --git a/dev/_images/annotate_with_units.png b/dev/_images/annotate_with_units.png deleted file mode 100644 index 70d0a2fd8cb..00000000000 Binary files a/dev/_images/annotate_with_units.png and /dev/null differ diff --git a/dev/_images/annotation_basic.png b/dev/_images/annotation_basic.png deleted file mode 100644 index b23ed24e83e..00000000000 Binary files a/dev/_images/annotation_basic.png and /dev/null differ diff --git a/dev/_images/annotation_demo2_00.png b/dev/_images/annotation_demo2_00.png deleted file mode 100644 index ebfdcdc1f79..00000000000 Binary files a/dev/_images/annotation_demo2_00.png and /dev/null differ diff --git a/dev/_images/annotation_demo2_001.png b/dev/_images/annotation_demo2_001.png deleted file mode 100644 index ebfdcdc1f79..00000000000 Binary files a/dev/_images/annotation_demo2_001.png and /dev/null differ diff --git a/dev/_images/annotation_demo2_01.png b/dev/_images/annotation_demo2_01.png deleted file mode 100644 index c5585eb52ee..00000000000 Binary files a/dev/_images/annotation_demo2_01.png and /dev/null differ diff --git a/dev/_images/annotation_demo2_011.png b/dev/_images/annotation_demo2_011.png deleted file mode 100644 index c5585eb52ee..00000000000 Binary files a/dev/_images/annotation_demo2_011.png and /dev/null differ diff --git a/dev/_images/annotation_demo3.png b/dev/_images/annotation_demo3.png deleted file mode 100644 index c7d022d5775..00000000000 Binary files a/dev/_images/annotation_demo3.png and /dev/null differ diff --git a/dev/_images/annotation_demo_00.png b/dev/_images/annotation_demo_00.png deleted file mode 100644 index 40062b448a1..00000000000 Binary files a/dev/_images/annotation_demo_00.png and /dev/null differ diff --git a/dev/_images/annotation_demo_01.png b/dev/_images/annotation_demo_01.png deleted file mode 100644 index 223e704db7c..00000000000 Binary files a/dev/_images/annotation_demo_01.png and /dev/null differ diff --git a/dev/_images/annotation_demo_02.png b/dev/_images/annotation_demo_02.png deleted file mode 100644 index ec47513eadd..00000000000 Binary files a/dev/_images/annotation_demo_02.png and /dev/null differ diff --git a/dev/_images/annotation_polar.png b/dev/_images/annotation_polar.png deleted file mode 100644 index 223e704db7c..00000000000 Binary files a/dev/_images/annotation_polar.png and /dev/null differ diff --git a/dev/_images/anscombe.png b/dev/_images/anscombe.png deleted file mode 100644 index abdd72dc668..00000000000 Binary files a/dev/_images/anscombe.png and /dev/null differ diff --git a/dev/_images/arctest.png b/dev/_images/arctest.png deleted file mode 100644 index 2839b0a7d4e..00000000000 Binary files a/dev/_images/arctest.png and /dev/null differ diff --git a/dev/_images/arrow_demo.png b/dev/_images/arrow_demo.png deleted file mode 100644 index ec238228be8..00000000000 Binary files a/dev/_images/arrow_demo.png and /dev/null differ diff --git a/dev/_images/arrow_demo1.png b/dev/_images/arrow_demo1.png deleted file mode 100644 index ec238228be8..00000000000 Binary files a/dev/_images/arrow_demo1.png and /dev/null differ diff --git a/dev/_images/arrow_simple_demo.png b/dev/_images/arrow_simple_demo.png deleted file mode 100644 index 19b3e420191..00000000000 Binary files a/dev/_images/arrow_simple_demo.png and /dev/null differ diff --git a/dev/_images/artist_demo.png b/dev/_images/artist_demo.png deleted file mode 100644 index a603600d141..00000000000 Binary files a/dev/_images/artist_demo.png and /dev/null differ diff --git a/dev/_images/artist_tests.png b/dev/_images/artist_tests.png deleted file mode 100644 index c28fb6655c3..00000000000 Binary files a/dev/_images/artist_tests.png and /dev/null differ diff --git a/dev/_images/aspect_loglog.png b/dev/_images/aspect_loglog.png deleted file mode 100644 index 98739cc5c42..00000000000 Binary files a/dev/_images/aspect_loglog.png and /dev/null differ diff --git a/dev/_images/auto_subplots_adjust.png b/dev/_images/auto_subplots_adjust.png deleted file mode 100644 index 96fa5c0bc75..00000000000 Binary files a/dev/_images/auto_subplots_adjust.png and /dev/null differ diff --git a/dev/_images/axes_demo.png b/dev/_images/axes_demo.png deleted file mode 100644 index 589f673469e..00000000000 Binary files a/dev/_images/axes_demo.png and /dev/null differ diff --git a/dev/_images/axes_props.png b/dev/_images/axes_props.png deleted file mode 100644 index e131ba0a990..00000000000 Binary files a/dev/_images/axes_props.png and /dev/null differ diff --git a/dev/_images/axes_zoom_effect.png b/dev/_images/axes_zoom_effect.png deleted file mode 100644 index 0fb88526c12..00000000000 Binary files a/dev/_images/axes_zoom_effect.png and /dev/null differ diff --git a/dev/_images/axes_zoom_effect1.png b/dev/_images/axes_zoom_effect1.png deleted file mode 100644 index 0fb88526c12..00000000000 Binary files a/dev/_images/axes_zoom_effect1.png and /dev/null differ diff --git a/dev/_images/axhspan_demo.png b/dev/_images/axhspan_demo.png deleted file mode 100644 index 9beeb93ef4d..00000000000 Binary files a/dev/_images/axhspan_demo.png and /dev/null differ diff --git a/dev/_images/axhspan_demo1.png b/dev/_images/axhspan_demo1.png deleted file mode 100644 index 9beeb93ef4d..00000000000 Binary files a/dev/_images/axhspan_demo1.png and /dev/null differ diff --git a/dev/_images/axis_direction_demo_step01.png b/dev/_images/axis_direction_demo_step01.png deleted file mode 100644 index cad9c683212..00000000000 Binary files a/dev/_images/axis_direction_demo_step01.png and /dev/null differ diff --git a/dev/_images/axis_direction_demo_step02.png b/dev/_images/axis_direction_demo_step02.png deleted file mode 100644 index 6b7a0c29d7a..00000000000 Binary files a/dev/_images/axis_direction_demo_step02.png and /dev/null differ diff --git a/dev/_images/axis_direction_demo_step03.png b/dev/_images/axis_direction_demo_step03.png deleted file mode 100644 index 82f8431e46d..00000000000 Binary files a/dev/_images/axis_direction_demo_step03.png and /dev/null differ diff --git a/dev/_images/axis_direction_demo_step04.png b/dev/_images/axis_direction_demo_step04.png deleted file mode 100644 index 83ea62c1edf..00000000000 Binary files a/dev/_images/axis_direction_demo_step04.png and /dev/null differ diff --git a/dev/_images/axis_equal_demo.png b/dev/_images/axis_equal_demo.png deleted file mode 100644 index dcd0dd66690..00000000000 Binary files a/dev/_images/axis_equal_demo.png and /dev/null differ diff --git a/dev/_images/back.png b/dev/_images/back.png deleted file mode 100644 index c23e1b5570f..00000000000 Binary files a/dev/_images/back.png and /dev/null differ diff --git a/dev/_images/bar_demo2.png b/dev/_images/bar_demo2.png deleted file mode 100644 index ca2a42621ef..00000000000 Binary files a/dev/_images/bar_demo2.png and /dev/null differ diff --git a/dev/_images/bar_stacked.png b/dev/_images/bar_stacked.png deleted file mode 100644 index 6ff0fc52374..00000000000 Binary files a/dev/_images/bar_stacked.png and /dev/null differ diff --git a/dev/_images/bar_stacked1.png b/dev/_images/bar_stacked1.png deleted file mode 100644 index c997e270bbe..00000000000 Binary files a/dev/_images/bar_stacked1.png and /dev/null differ diff --git a/dev/_images/bar_unit_demo.png b/dev/_images/bar_unit_demo.png deleted file mode 100644 index 0a9b1701cf3..00000000000 Binary files a/dev/_images/bar_unit_demo.png and /dev/null differ diff --git a/dev/_images/barb_demo_00.png b/dev/_images/barb_demo_00.png deleted file mode 100644 index 68f8a269e31..00000000000 Binary files a/dev/_images/barb_demo_00.png and /dev/null differ diff --git a/dev/_images/barb_demo_001.png b/dev/_images/barb_demo_001.png deleted file mode 100644 index 68f8a269e31..00000000000 Binary files a/dev/_images/barb_demo_001.png and /dev/null differ diff --git a/dev/_images/barb_demo_01.png b/dev/_images/barb_demo_01.png deleted file mode 100644 index c91caf8f444..00000000000 Binary files a/dev/_images/barb_demo_01.png and /dev/null differ diff --git a/dev/_images/barb_demo_011.png b/dev/_images/barb_demo_011.png deleted file mode 100644 index c91caf8f444..00000000000 Binary files a/dev/_images/barb_demo_011.png and /dev/null differ diff --git a/dev/_images/barchart_demo.png b/dev/_images/barchart_demo.png deleted file mode 100644 index 16a956b6e51..00000000000 Binary files a/dev/_images/barchart_demo.png and /dev/null differ diff --git a/dev/_images/barchart_demo1.png b/dev/_images/barchart_demo1.png deleted file mode 100644 index a160d8aa8a2..00000000000 Binary files a/dev/_images/barchart_demo1.png and /dev/null differ diff --git a/dev/_images/barchart_demo2.png b/dev/_images/barchart_demo2.png deleted file mode 100644 index 87c173f6622..00000000000 Binary files a/dev/_images/barchart_demo2.png and /dev/null differ diff --git a/dev/_images/barchart_demo3.png b/dev/_images/barchart_demo3.png deleted file mode 100644 index a160d8aa8a2..00000000000 Binary files a/dev/_images/barchart_demo3.png and /dev/null differ diff --git a/dev/_images/barcode_demo.png b/dev/_images/barcode_demo.png deleted file mode 100644 index ba11e409db1..00000000000 Binary files a/dev/_images/barcode_demo.png and /dev/null differ diff --git a/dev/_images/barh_demo_00.png b/dev/_images/barh_demo_00.png deleted file mode 100644 index 0475157c815..00000000000 Binary files a/dev/_images/barh_demo_00.png and /dev/null differ diff --git a/dev/_images/barh_demo_01.png b/dev/_images/barh_demo_01.png deleted file mode 100644 index 877f5586503..00000000000 Binary files a/dev/_images/barh_demo_01.png and /dev/null differ diff --git a/dev/_images/bars3d_demo.png b/dev/_images/bars3d_demo.png deleted file mode 100644 index 3c74d94fbbc..00000000000 Binary files a/dev/_images/bars3d_demo.png and /dev/null differ diff --git a/dev/_images/bars3d_demo1.png b/dev/_images/bars3d_demo1.png deleted file mode 100644 index 3c74d94fbbc..00000000000 Binary files a/dev/_images/bars3d_demo1.png and /dev/null differ diff --git a/dev/_images/bbox_intersect.png b/dev/_images/bbox_intersect.png deleted file mode 100644 index 205a3a30f75..00000000000 Binary files a/dev/_images/bbox_intersect.png and /dev/null differ diff --git a/dev/_images/boxplot_demo2.png b/dev/_images/boxplot_demo2.png deleted file mode 100644 index 59dc5773867..00000000000 Binary files a/dev/_images/boxplot_demo2.png and /dev/null differ diff --git a/dev/_images/boxplot_demo3.png b/dev/_images/boxplot_demo3.png deleted file mode 100644 index 8617db018a4..00000000000 Binary files a/dev/_images/boxplot_demo3.png and /dev/null differ diff --git a/dev/_images/boxplot_demo31.png b/dev/_images/boxplot_demo31.png deleted file mode 100644 index 8617db018a4..00000000000 Binary files a/dev/_images/boxplot_demo31.png and /dev/null differ diff --git a/dev/_images/boxplot_demo_00.png b/dev/_images/boxplot_demo_00.png deleted file mode 100644 index bedd286940e..00000000000 Binary files a/dev/_images/boxplot_demo_00.png and /dev/null differ diff --git a/dev/_images/boxplot_demo_001.png b/dev/_images/boxplot_demo_001.png deleted file mode 100644 index 1cfca29d061..00000000000 Binary files a/dev/_images/boxplot_demo_001.png and /dev/null differ diff --git a/dev/_images/boxplot_demo_01.png b/dev/_images/boxplot_demo_01.png deleted file mode 100644 index 1a36c9a1953..00000000000 Binary files a/dev/_images/boxplot_demo_01.png and /dev/null differ diff --git a/dev/_images/boxplot_demo_011.png b/dev/_images/boxplot_demo_011.png deleted file mode 100644 index ccbcdbd9f29..00000000000 Binary files a/dev/_images/boxplot_demo_011.png and /dev/null differ diff --git a/dev/_images/boxplot_demo_02.png b/dev/_images/boxplot_demo_02.png deleted file mode 100644 index 7aafb212af6..00000000000 Binary files a/dev/_images/boxplot_demo_02.png and /dev/null differ diff --git a/dev/_images/boxplot_demo_021.png b/dev/_images/boxplot_demo_021.png deleted file mode 100644 index eb3f719cff0..00000000000 Binary files a/dev/_images/boxplot_demo_021.png and /dev/null differ diff --git a/dev/_images/boxplot_demo_03.png b/dev/_images/boxplot_demo_03.png deleted file mode 100644 index 3bb2e949b82..00000000000 Binary files a/dev/_images/boxplot_demo_03.png and /dev/null differ diff --git a/dev/_images/boxplot_demo_031.png b/dev/_images/boxplot_demo_031.png deleted file mode 100644 index 209f713ffff..00000000000 Binary files a/dev/_images/boxplot_demo_031.png and /dev/null differ diff --git a/dev/_images/boxplot_demo_04.png b/dev/_images/boxplot_demo_04.png deleted file mode 100644 index ba4baf0bffc..00000000000 Binary files a/dev/_images/boxplot_demo_04.png and /dev/null differ diff --git a/dev/_images/boxplot_demo_041.png b/dev/_images/boxplot_demo_041.png deleted file mode 100644 index 30dd8832e8f..00000000000 Binary files a/dev/_images/boxplot_demo_041.png and /dev/null differ diff --git a/dev/_images/boxplot_demo_05.png b/dev/_images/boxplot_demo_05.png deleted file mode 100644 index e90d3bc0172..00000000000 Binary files a/dev/_images/boxplot_demo_05.png and /dev/null differ diff --git a/dev/_images/boxplot_demo_051.png b/dev/_images/boxplot_demo_051.png deleted file mode 100644 index 72edd5507e6..00000000000 Binary files a/dev/_images/boxplot_demo_051.png and /dev/null differ diff --git a/dev/_images/boxplot_demo_06.png b/dev/_images/boxplot_demo_06.png deleted file mode 100644 index 5673bce525c..00000000000 Binary files a/dev/_images/boxplot_demo_06.png and /dev/null differ diff --git a/dev/_images/boxplot_demo_061.png b/dev/_images/boxplot_demo_061.png deleted file mode 100644 index 45c364db183..00000000000 Binary files a/dev/_images/boxplot_demo_061.png and /dev/null differ diff --git a/dev/_images/branch_list.png b/dev/_images/branch_list.png deleted file mode 100644 index 1196eb754d3..00000000000 Binary files a/dev/_images/branch_list.png and /dev/null differ diff --git a/dev/_images/branch_list_compare.png b/dev/_images/branch_list_compare.png deleted file mode 100644 index 336afa37460..00000000000 Binary files a/dev/_images/branch_list_compare.png and /dev/null differ diff --git a/dev/_images/break.png b/dev/_images/break.png deleted file mode 100644 index ad7431781cc..00000000000 Binary files a/dev/_images/break.png and /dev/null differ diff --git a/dev/_images/broken_axis.png b/dev/_images/broken_axis.png deleted file mode 100644 index 96acb141784..00000000000 Binary files a/dev/_images/broken_axis.png and /dev/null differ diff --git a/dev/_images/broken_barh.png b/dev/_images/broken_barh.png deleted file mode 100644 index 50d6fa1cdaf..00000000000 Binary files a/dev/_images/broken_barh.png and /dev/null differ diff --git a/dev/_images/broken_barh1.png b/dev/_images/broken_barh1.png deleted file mode 100644 index 50d6fa1cdaf..00000000000 Binary files a/dev/_images/broken_barh1.png and /dev/null differ diff --git a/dev/_images/centered_ticklabels.png b/dev/_images/centered_ticklabels.png deleted file mode 100644 index ae05ab9acf4..00000000000 Binary files a/dev/_images/centered_ticklabels.png and /dev/null differ diff --git a/dev/_images/clippath_demo.png b/dev/_images/clippath_demo.png deleted file mode 100644 index c9e551fe3e3..00000000000 Binary files a/dev/_images/clippath_demo.png and /dev/null differ diff --git a/dev/_images/clippedline.png b/dev/_images/clippedline.png deleted file mode 100644 index b5e12533d08..00000000000 Binary files a/dev/_images/clippedline.png and /dev/null differ diff --git a/dev/_images/cm_fontset.png b/dev/_images/cm_fontset.png deleted file mode 100644 index 328ba1348fa..00000000000 Binary files a/dev/_images/cm_fontset.png and /dev/null differ diff --git a/dev/_images/cohere_demo.png b/dev/_images/cohere_demo.png deleted file mode 100644 index 7ca0d4474e0..00000000000 Binary files a/dev/_images/cohere_demo.png and /dev/null differ diff --git a/dev/_images/cohere_demo1.png b/dev/_images/cohere_demo1.png deleted file mode 100644 index 7ca0d4474e0..00000000000 Binary files a/dev/_images/cohere_demo1.png and /dev/null differ diff --git a/dev/_images/collections_demo.png b/dev/_images/collections_demo.png deleted file mode 100644 index df8395ee38f..00000000000 Binary files a/dev/_images/collections_demo.png and /dev/null differ diff --git a/dev/_images/color_by_yvalue.png b/dev/_images/color_by_yvalue.png deleted file mode 100644 index 5a875bc70f9..00000000000 Binary files a/dev/_images/color_by_yvalue.png and /dev/null differ diff --git a/dev/_images/color_cycle.png b/dev/_images/color_cycle.png deleted file mode 100644 index e85016978b3..00000000000 Binary files a/dev/_images/color_cycle.png and /dev/null differ diff --git a/dev/_images/color_cycle_demo.png b/dev/_images/color_cycle_demo.png deleted file mode 100644 index 3e87f9c9531..00000000000 Binary files a/dev/_images/color_cycle_demo.png and /dev/null differ diff --git a/dev/_images/color_demo.png b/dev/_images/color_demo.png deleted file mode 100644 index 10cf549701b..00000000000 Binary files a/dev/_images/color_demo.png and /dev/null differ diff --git a/dev/_images/colorbar_only.png b/dev/_images/colorbar_only.png deleted file mode 100644 index 673aa093e7f..00000000000 Binary files a/dev/_images/colorbar_only.png and /dev/null differ diff --git a/dev/_images/colorbar_tick_labelling_demo_00.png b/dev/_images/colorbar_tick_labelling_demo_00.png deleted file mode 100644 index 0d49e8dba9f..00000000000 Binary files a/dev/_images/colorbar_tick_labelling_demo_00.png and /dev/null differ diff --git a/dev/_images/colorbar_tick_labelling_demo_01.png b/dev/_images/colorbar_tick_labelling_demo_01.png deleted file mode 100644 index 10b029cc466..00000000000 Binary files a/dev/_images/colorbar_tick_labelling_demo_01.png and /dev/null differ diff --git a/dev/_images/colormaps_reference_00.png b/dev/_images/colormaps_reference_00.png deleted file mode 100644 index 0b6464522ee..00000000000 Binary files a/dev/_images/colormaps_reference_00.png and /dev/null differ diff --git a/dev/_images/colormaps_reference_01.png b/dev/_images/colormaps_reference_01.png deleted file mode 100644 index 22a8e726599..00000000000 Binary files a/dev/_images/colormaps_reference_01.png and /dev/null differ diff --git a/dev/_images/colormaps_reference_02.png b/dev/_images/colormaps_reference_02.png deleted file mode 100644 index 744549fcc6f..00000000000 Binary files a/dev/_images/colormaps_reference_02.png and /dev/null differ diff --git a/dev/_images/colormaps_reference_03.png b/dev/_images/colormaps_reference_03.png deleted file mode 100644 index 290af2cc738..00000000000 Binary files a/dev/_images/colormaps_reference_03.png and /dev/null differ diff --git a/dev/_images/colormaps_reference_04.png b/dev/_images/colormaps_reference_04.png deleted file mode 100644 index 40168bdc64f..00000000000 Binary files a/dev/_images/colormaps_reference_04.png and /dev/null differ diff --git a/dev/_images/compound_path.png b/dev/_images/compound_path.png deleted file mode 100644 index fa971e0da7e..00000000000 Binary files a/dev/_images/compound_path.png and /dev/null differ diff --git a/dev/_images/compound_path_demo.png b/dev/_images/compound_path_demo.png deleted file mode 100644 index 1c2e04b7b6a..00000000000 Binary files a/dev/_images/compound_path_demo.png and /dev/null differ diff --git a/dev/_images/connect_simple01.png b/dev/_images/connect_simple01.png deleted file mode 100644 index aeff0ef5d8a..00000000000 Binary files a/dev/_images/connect_simple01.png and /dev/null differ diff --git a/dev/_images/connectionstyle_demo.png b/dev/_images/connectionstyle_demo.png deleted file mode 100644 index e4cbad2d0a5..00000000000 Binary files a/dev/_images/connectionstyle_demo.png and /dev/null differ diff --git a/dev/_images/contour3d_demo.png b/dev/_images/contour3d_demo.png deleted file mode 100644 index 430347b1d11..00000000000 Binary files a/dev/_images/contour3d_demo.png and /dev/null differ diff --git a/dev/_images/contour3d_demo1.png b/dev/_images/contour3d_demo1.png deleted file mode 100644 index 430347b1d11..00000000000 Binary files a/dev/_images/contour3d_demo1.png and /dev/null differ diff --git a/dev/_images/contour3d_demo2.png b/dev/_images/contour3d_demo2.png deleted file mode 100644 index abddb58c5c1..00000000000 Binary files a/dev/_images/contour3d_demo2.png and /dev/null differ diff --git a/dev/_images/contour3d_demo21.png b/dev/_images/contour3d_demo21.png deleted file mode 100644 index f616dcf2d25..00000000000 Binary files a/dev/_images/contour3d_demo21.png and /dev/null differ diff --git a/dev/_images/contour3d_demo3.png b/dev/_images/contour3d_demo3.png deleted file mode 100644 index 17d4c300104..00000000000 Binary files a/dev/_images/contour3d_demo3.png and /dev/null differ diff --git a/dev/_images/contour3d_demo31.png b/dev/_images/contour3d_demo31.png deleted file mode 100644 index 17d4c300104..00000000000 Binary files a/dev/_images/contour3d_demo31.png and /dev/null differ diff --git a/dev/_images/contour_demo_00.png b/dev/_images/contour_demo_00.png deleted file mode 100644 index 67c8850aa32..00000000000 Binary files a/dev/_images/contour_demo_00.png and /dev/null differ diff --git a/dev/_images/contour_demo_001.png b/dev/_images/contour_demo_001.png deleted file mode 100644 index 67c8850aa32..00000000000 Binary files a/dev/_images/contour_demo_001.png and /dev/null differ diff --git a/dev/_images/contour_demo_01.png b/dev/_images/contour_demo_01.png deleted file mode 100644 index fd1fe8769b8..00000000000 Binary files a/dev/_images/contour_demo_01.png and /dev/null differ diff --git a/dev/_images/contour_demo_011.png b/dev/_images/contour_demo_011.png deleted file mode 100644 index fd1fe8769b8..00000000000 Binary files a/dev/_images/contour_demo_011.png and /dev/null differ diff --git a/dev/_images/contour_demo_02.png b/dev/_images/contour_demo_02.png deleted file mode 100644 index 5f0fb74c5de..00000000000 Binary files a/dev/_images/contour_demo_02.png and /dev/null differ diff --git a/dev/_images/contour_demo_021.png b/dev/_images/contour_demo_021.png deleted file mode 100644 index 5f0fb74c5de..00000000000 Binary files a/dev/_images/contour_demo_021.png and /dev/null differ diff --git a/dev/_images/contour_demo_03.png b/dev/_images/contour_demo_03.png deleted file mode 100644 index de262b5940b..00000000000 Binary files a/dev/_images/contour_demo_03.png and /dev/null differ diff --git a/dev/_images/contour_demo_031.png b/dev/_images/contour_demo_031.png deleted file mode 100644 index de262b5940b..00000000000 Binary files a/dev/_images/contour_demo_031.png and /dev/null differ diff --git a/dev/_images/contour_demo_04.png b/dev/_images/contour_demo_04.png deleted file mode 100644 index d7b30dcc310..00000000000 Binary files a/dev/_images/contour_demo_04.png and /dev/null differ diff --git a/dev/_images/contour_demo_041.png b/dev/_images/contour_demo_041.png deleted file mode 100644 index d7b30dcc310..00000000000 Binary files a/dev/_images/contour_demo_041.png and /dev/null differ diff --git a/dev/_images/contour_demo_05.png b/dev/_images/contour_demo_05.png deleted file mode 100644 index 2605daec437..00000000000 Binary files a/dev/_images/contour_demo_05.png and /dev/null differ diff --git a/dev/_images/contour_demo_051.png b/dev/_images/contour_demo_051.png deleted file mode 100644 index 2605daec437..00000000000 Binary files a/dev/_images/contour_demo_051.png and /dev/null differ diff --git a/dev/_images/contour_image.png b/dev/_images/contour_image.png deleted file mode 100644 index 6c2101fd51a..00000000000 Binary files a/dev/_images/contour_image.png and /dev/null differ diff --git a/dev/_images/contour_label_demo_00.png b/dev/_images/contour_label_demo_00.png deleted file mode 100644 index 9dc8916877d..00000000000 Binary files a/dev/_images/contour_label_demo_00.png and /dev/null differ diff --git a/dev/_images/contour_label_demo_01.png b/dev/_images/contour_label_demo_01.png deleted file mode 100644 index 37503667c6f..00000000000 Binary files a/dev/_images/contour_label_demo_01.png and /dev/null differ diff --git a/dev/_images/contour_label_demo_02.png b/dev/_images/contour_label_demo_02.png deleted file mode 100644 index 625a7cd8a43..00000000000 Binary files a/dev/_images/contour_label_demo_02.png and /dev/null differ diff --git a/dev/_images/contourf3d_demo.png b/dev/_images/contourf3d_demo.png deleted file mode 100644 index ef58900e506..00000000000 Binary files a/dev/_images/contourf3d_demo.png and /dev/null differ diff --git a/dev/_images/contourf3d_demo1.png b/dev/_images/contourf3d_demo1.png deleted file mode 100644 index ef58900e506..00000000000 Binary files a/dev/_images/contourf3d_demo1.png and /dev/null differ diff --git a/dev/_images/contourf3d_demo2.png b/dev/_images/contourf3d_demo2.png deleted file mode 100644 index c0d88f0b8c8..00000000000 Binary files a/dev/_images/contourf3d_demo2.png and /dev/null differ diff --git a/dev/_images/contourf3d_demo21.png b/dev/_images/contourf3d_demo21.png deleted file mode 100644 index c0d88f0b8c8..00000000000 Binary files a/dev/_images/contourf3d_demo21.png and /dev/null differ diff --git a/dev/_images/contourf3d_demo22.png b/dev/_images/contourf3d_demo22.png deleted file mode 100644 index c0d88f0b8c8..00000000000 Binary files a/dev/_images/contourf3d_demo22.png and /dev/null differ diff --git a/dev/_images/contourf_demo_00.png b/dev/_images/contourf_demo_00.png deleted file mode 100644 index 20605f13bca..00000000000 Binary files a/dev/_images/contourf_demo_00.png and /dev/null differ diff --git a/dev/_images/contourf_demo_001.png b/dev/_images/contourf_demo_001.png deleted file mode 100644 index 20605f13bca..00000000000 Binary files a/dev/_images/contourf_demo_001.png and /dev/null differ diff --git a/dev/_images/contourf_demo_01.png b/dev/_images/contourf_demo_01.png deleted file mode 100644 index 5c6ce0e2002..00000000000 Binary files a/dev/_images/contourf_demo_01.png and /dev/null differ diff --git a/dev/_images/contourf_demo_011.png b/dev/_images/contourf_demo_011.png deleted file mode 100644 index 5c6ce0e2002..00000000000 Binary files a/dev/_images/contourf_demo_011.png and /dev/null differ diff --git a/dev/_images/contourf_demo_02.png b/dev/_images/contourf_demo_02.png deleted file mode 100644 index 114db83fe43..00000000000 Binary files a/dev/_images/contourf_demo_02.png and /dev/null differ diff --git a/dev/_images/contourf_demo_021.png b/dev/_images/contourf_demo_021.png deleted file mode 100644 index 114db83fe43..00000000000 Binary files a/dev/_images/contourf_demo_021.png and /dev/null differ diff --git a/dev/_images/contourf_hatching_00.png b/dev/_images/contourf_hatching_00.png deleted file mode 100644 index 728bd3dd212..00000000000 Binary files a/dev/_images/contourf_hatching_00.png and /dev/null differ diff --git a/dev/_images/contourf_hatching_001.png b/dev/_images/contourf_hatching_001.png deleted file mode 100644 index 728bd3dd212..00000000000 Binary files a/dev/_images/contourf_hatching_001.png and /dev/null differ diff --git a/dev/_images/contourf_hatching_01.png b/dev/_images/contourf_hatching_01.png deleted file mode 100644 index 3781aa69b14..00000000000 Binary files a/dev/_images/contourf_hatching_01.png and /dev/null differ diff --git a/dev/_images/contourf_hatching_011.png b/dev/_images/contourf_hatching_011.png deleted file mode 100644 index 3781aa69b14..00000000000 Binary files a/dev/_images/contourf_hatching_011.png and /dev/null differ diff --git a/dev/_images/contourf_log.png b/dev/_images/contourf_log.png deleted file mode 100644 index dd2227461c0..00000000000 Binary files a/dev/_images/contourf_log.png and /dev/null differ diff --git a/dev/_images/coords_demo.png b/dev/_images/coords_demo.png deleted file mode 100644 index 482742399cc..00000000000 Binary files a/dev/_images/coords_demo.png and /dev/null differ diff --git a/dev/_images/coords_report.png b/dev/_images/coords_report.png deleted file mode 100644 index fa0c9518b0f..00000000000 Binary files a/dev/_images/coords_report.png and /dev/null differ diff --git a/dev/_images/csd_demo.png b/dev/_images/csd_demo.png deleted file mode 100644 index 08d746b61b6..00000000000 Binary files a/dev/_images/csd_demo.png and /dev/null differ diff --git a/dev/_images/csd_demo1.png b/dev/_images/csd_demo1.png deleted file mode 100644 index 08d746b61b6..00000000000 Binary files a/dev/_images/csd_demo1.png and /dev/null differ diff --git a/dev/_images/cursor.png b/dev/_images/cursor.png deleted file mode 100644 index a4fa08b0726..00000000000 Binary files a/dev/_images/cursor.png and /dev/null differ diff --git a/dev/_images/custom_boxstyle01.png b/dev/_images/custom_boxstyle01.png deleted file mode 100644 index 1acbf465afb..00000000000 Binary files a/dev/_images/custom_boxstyle01.png and /dev/null differ diff --git a/dev/_images/custom_boxstyle02.png b/dev/_images/custom_boxstyle02.png deleted file mode 100644 index 26bce6a107d..00000000000 Binary files a/dev/_images/custom_boxstyle02.png and /dev/null differ diff --git a/dev/_images/custom_cmap.png b/dev/_images/custom_cmap.png deleted file mode 100644 index 80b5aea934d..00000000000 Binary files a/dev/_images/custom_cmap.png and /dev/null differ diff --git a/dev/_images/custom_figure_class.png b/dev/_images/custom_figure_class.png deleted file mode 100644 index 2b9fccaf21d..00000000000 Binary files a/dev/_images/custom_figure_class.png and /dev/null differ diff --git a/dev/_images/custom_projection_example.png b/dev/_images/custom_projection_example.png deleted file mode 100644 index 8c2903d0d28..00000000000 Binary files a/dev/_images/custom_projection_example.png and /dev/null differ diff --git a/dev/_images/custom_scale_example.png b/dev/_images/custom_scale_example.png deleted file mode 100644 index ce37637090f..00000000000 Binary files a/dev/_images/custom_scale_example.png and /dev/null differ diff --git a/dev/_images/custom_ticker1.png b/dev/_images/custom_ticker1.png deleted file mode 100644 index 3599c45e540..00000000000 Binary files a/dev/_images/custom_ticker1.png and /dev/null differ diff --git a/dev/_images/customize_rc.png b/dev/_images/customize_rc.png deleted file mode 100644 index fcd1fc2f636..00000000000 Binary files a/dev/_images/customize_rc.png and /dev/null differ diff --git a/dev/_images/dannys_example.png b/dev/_images/dannys_example.png deleted file mode 100644 index 6eccb9f62e8..00000000000 Binary files a/dev/_images/dannys_example.png and /dev/null differ diff --git a/dev/_images/dash_control.png b/dev/_images/dash_control.png deleted file mode 100644 index ebe5876e723..00000000000 Binary files a/dev/_images/dash_control.png and /dev/null differ diff --git a/dev/_images/dashpointlabel.png b/dev/_images/dashpointlabel.png deleted file mode 100644 index 9bce699f936..00000000000 Binary files a/dev/_images/dashpointlabel.png and /dev/null differ diff --git a/dev/_images/date_demo.png b/dev/_images/date_demo.png deleted file mode 100644 index 43b58809714..00000000000 Binary files a/dev/_images/date_demo.png and /dev/null differ diff --git a/dev/_images/date_demo1.png b/dev/_images/date_demo1.png deleted file mode 100644 index 15db3389736..00000000000 Binary files a/dev/_images/date_demo1.png and /dev/null differ diff --git a/dev/_images/date_demo2.png b/dev/_images/date_demo2.png deleted file mode 100644 index b0be27d25ea..00000000000 Binary files a/dev/_images/date_demo2.png and /dev/null differ diff --git a/dev/_images/date_demo3.png b/dev/_images/date_demo3.png deleted file mode 100644 index 43b58809714..00000000000 Binary files a/dev/_images/date_demo3.png and /dev/null differ diff --git a/dev/_images/date_demo_convert.png b/dev/_images/date_demo_convert.png deleted file mode 100644 index 7e1c2626a5e..00000000000 Binary files a/dev/_images/date_demo_convert.png and /dev/null differ diff --git a/dev/_images/date_demo_rrule.png b/dev/_images/date_demo_rrule.png deleted file mode 100644 index 5525beeaaaa..00000000000 Binary files a/dev/_images/date_demo_rrule.png and /dev/null differ diff --git a/dev/_images/date_index_formatter.png b/dev/_images/date_index_formatter.png deleted file mode 100644 index 7b5bbf01dc0..00000000000 Binary files a/dev/_images/date_index_formatter.png and /dev/null differ diff --git a/dev/_images/date_index_formatter_00.png b/dev/_images/date_index_formatter_00.png deleted file mode 100644 index 23385f8e87f..00000000000 Binary files a/dev/_images/date_index_formatter_00.png and /dev/null differ diff --git a/dev/_images/date_index_formatter_01.png b/dev/_images/date_index_formatter_01.png deleted file mode 100644 index 44ce7b9ec08..00000000000 Binary files a/dev/_images/date_index_formatter_01.png and /dev/null differ diff --git a/dev/_images/demo_affine_image_00_00.png b/dev/_images/demo_affine_image_00_00.png deleted file mode 100644 index ade67c73caa..00000000000 Binary files a/dev/_images/demo_affine_image_00_00.png and /dev/null differ diff --git a/dev/_images/demo_agg_filter.png b/dev/_images/demo_agg_filter.png deleted file mode 100644 index 044b1cda6cc..00000000000 Binary files a/dev/_images/demo_agg_filter.png and /dev/null differ diff --git a/dev/_images/demo_annotation_box.png b/dev/_images/demo_annotation_box.png deleted file mode 100644 index 5917eec05be..00000000000 Binary files a/dev/_images/demo_annotation_box.png and /dev/null differ diff --git a/dev/_images/demo_axes_divider_01_00.png b/dev/_images/demo_axes_divider_01_00.png deleted file mode 100644 index 02c2071e2a0..00000000000 Binary files a/dev/_images/demo_axes_divider_01_00.png and /dev/null differ diff --git a/dev/_images/demo_axes_grid.png b/dev/_images/demo_axes_grid.png deleted file mode 100644 index 377fb1269ea..00000000000 Binary files a/dev/_images/demo_axes_grid.png and /dev/null differ diff --git a/dev/_images/demo_axes_grid1.png b/dev/_images/demo_axes_grid1.png deleted file mode 100644 index 9af9fdfe638..00000000000 Binary files a/dev/_images/demo_axes_grid1.png and /dev/null differ diff --git a/dev/_images/demo_axes_grid2.png b/dev/_images/demo_axes_grid2.png deleted file mode 100644 index ae8f5711897..00000000000 Binary files a/dev/_images/demo_axes_grid2.png and /dev/null differ diff --git a/dev/_images/demo_axes_grid3.png b/dev/_images/demo_axes_grid3.png deleted file mode 100644 index 377fb1269ea..00000000000 Binary files a/dev/_images/demo_axes_grid3.png and /dev/null differ diff --git a/dev/_images/demo_axes_grid4.png b/dev/_images/demo_axes_grid4.png deleted file mode 100644 index 9af9fdfe638..00000000000 Binary files a/dev/_images/demo_axes_grid4.png and /dev/null differ diff --git a/dev/_images/demo_axes_hbox_divider.png b/dev/_images/demo_axes_hbox_divider.png deleted file mode 100644 index 0c697e6498a..00000000000 Binary files a/dev/_images/demo_axes_hbox_divider.png and /dev/null differ diff --git a/dev/_images/demo_axes_rgb_00.png b/dev/_images/demo_axes_rgb_00.png deleted file mode 100644 index 4b92809001c..00000000000 Binary files a/dev/_images/demo_axes_rgb_00.png and /dev/null differ diff --git a/dev/_images/demo_axes_rgb_01.png b/dev/_images/demo_axes_rgb_01.png deleted file mode 100644 index 5f33f38a236..00000000000 Binary files a/dev/_images/demo_axes_rgb_01.png and /dev/null differ diff --git a/dev/_images/demo_axis_direction.png b/dev/_images/demo_axis_direction.png deleted file mode 100644 index c2b580dff3d..00000000000 Binary files a/dev/_images/demo_axis_direction.png and /dev/null differ diff --git a/dev/_images/demo_axisline_style.png b/dev/_images/demo_axisline_style.png deleted file mode 100644 index 69343b482f0..00000000000 Binary files a/dev/_images/demo_axisline_style.png and /dev/null differ diff --git a/dev/_images/demo_bboximage.png b/dev/_images/demo_bboximage.png deleted file mode 100644 index c68722cd171..00000000000 Binary files a/dev/_images/demo_bboximage.png and /dev/null differ diff --git a/dev/_images/demo_colorbar_with_inset_locator.png b/dev/_images/demo_colorbar_with_inset_locator.png deleted file mode 100644 index f23dab10f69..00000000000 Binary files a/dev/_images/demo_colorbar_with_inset_locator.png and /dev/null differ diff --git a/dev/_images/demo_curvelinear_grid.png b/dev/_images/demo_curvelinear_grid.png deleted file mode 100644 index 490d7849657..00000000000 Binary files a/dev/_images/demo_curvelinear_grid.png and /dev/null differ diff --git a/dev/_images/demo_curvelinear_grid1.png b/dev/_images/demo_curvelinear_grid1.png deleted file mode 100644 index 490d7849657..00000000000 Binary files a/dev/_images/demo_curvelinear_grid1.png and /dev/null differ diff --git a/dev/_images/demo_curvelinear_grid2.png b/dev/_images/demo_curvelinear_grid2.png deleted file mode 100644 index 95fc60d6676..00000000000 Binary files a/dev/_images/demo_curvelinear_grid2.png and /dev/null differ diff --git a/dev/_images/demo_edge_colorbar.png b/dev/_images/demo_edge_colorbar.png deleted file mode 100644 index 2b3c85ff219..00000000000 Binary files a/dev/_images/demo_edge_colorbar.png and /dev/null differ diff --git a/dev/_images/demo_floating_axes.png b/dev/_images/demo_floating_axes.png deleted file mode 100644 index 5ef60d9e119..00000000000 Binary files a/dev/_images/demo_floating_axes.png and /dev/null differ diff --git a/dev/_images/demo_floating_axes1.png b/dev/_images/demo_floating_axes1.png deleted file mode 100644 index 667457dac02..00000000000 Binary files a/dev/_images/demo_floating_axes1.png and /dev/null differ diff --git a/dev/_images/demo_floating_axis.png b/dev/_images/demo_floating_axis.png deleted file mode 100644 index a19c9599b92..00000000000 Binary files a/dev/_images/demo_floating_axis.png and /dev/null differ diff --git a/dev/_images/demo_floating_axis1.png b/dev/_images/demo_floating_axis1.png deleted file mode 100644 index a19c9599b92..00000000000 Binary files a/dev/_images/demo_floating_axis1.png and /dev/null differ diff --git a/dev/_images/demo_gridspec01.png b/dev/_images/demo_gridspec01.png deleted file mode 100644 index 533e719f631..00000000000 Binary files a/dev/_images/demo_gridspec01.png and /dev/null differ diff --git a/dev/_images/demo_gridspec02.png b/dev/_images/demo_gridspec02.png deleted file mode 100644 index e2c9b75e537..00000000000 Binary files a/dev/_images/demo_gridspec02.png and /dev/null differ diff --git a/dev/_images/demo_gridspec03.png b/dev/_images/demo_gridspec03.png deleted file mode 100644 index 4d3c043e1f4..00000000000 Binary files a/dev/_images/demo_gridspec03.png and /dev/null differ diff --git a/dev/_images/demo_gridspec04.png b/dev/_images/demo_gridspec04.png deleted file mode 100644 index c7d2c15de54..00000000000 Binary files a/dev/_images/demo_gridspec04.png and /dev/null differ diff --git a/dev/_images/demo_gridspec05.png b/dev/_images/demo_gridspec05.png deleted file mode 100644 index 034946a00d9..00000000000 Binary files a/dev/_images/demo_gridspec05.png and /dev/null differ diff --git a/dev/_images/demo_gridspec06.png b/dev/_images/demo_gridspec06.png deleted file mode 100644 index 389a75d03fa..00000000000 Binary files a/dev/_images/demo_gridspec06.png and /dev/null differ diff --git a/dev/_images/demo_mplot3d.png b/dev/_images/demo_mplot3d.png deleted file mode 100644 index e1d9b77240f..00000000000 Binary files a/dev/_images/demo_mplot3d.png and /dev/null differ diff --git a/dev/_images/demo_parasite_axes2_00_00.png b/dev/_images/demo_parasite_axes2_00_00.png deleted file mode 100644 index 1e2f2c2b4a2..00000000000 Binary files a/dev/_images/demo_parasite_axes2_00_00.png and /dev/null differ diff --git a/dev/_images/demo_parasite_axes2_00_001.png b/dev/_images/demo_parasite_axes2_00_001.png deleted file mode 100644 index 1e2f2c2b4a2..00000000000 Binary files a/dev/_images/demo_parasite_axes2_00_001.png and /dev/null differ diff --git a/dev/_images/demo_ribbon_box.png b/dev/_images/demo_ribbon_box.png deleted file mode 100644 index bd5ba7303a2..00000000000 Binary files a/dev/_images/demo_ribbon_box.png and /dev/null differ diff --git a/dev/_images/demo_text_path.png b/dev/_images/demo_text_path.png deleted file mode 100644 index 8684eccd575..00000000000 Binary files a/dev/_images/demo_text_path.png and /dev/null differ diff --git a/dev/_images/demo_text_rotation_mode.png b/dev/_images/demo_text_rotation_mode.png deleted file mode 100644 index 403d0368769..00000000000 Binary files a/dev/_images/demo_text_rotation_mode.png and /dev/null differ diff --git a/dev/_images/demo_ticklabel_alignment.png b/dev/_images/demo_ticklabel_alignment.png deleted file mode 100644 index 3201870550b..00000000000 Binary files a/dev/_images/demo_ticklabel_alignment.png and /dev/null differ diff --git a/dev/_images/demo_tight_layout_00_00.png b/dev/_images/demo_tight_layout_00_00.png deleted file mode 100644 index 66451bedb84..00000000000 Binary files a/dev/_images/demo_tight_layout_00_00.png and /dev/null differ diff --git a/dev/_images/demo_tight_layout_00_01.png b/dev/_images/demo_tight_layout_00_01.png deleted file mode 100644 index 191a6a06390..00000000000 Binary files a/dev/_images/demo_tight_layout_00_01.png and /dev/null differ diff --git a/dev/_images/demo_tight_layout_00_02.png b/dev/_images/demo_tight_layout_00_02.png deleted file mode 100644 index 63437947235..00000000000 Binary files a/dev/_images/demo_tight_layout_00_02.png and /dev/null differ diff --git a/dev/_images/demo_tight_layout_00_03.png b/dev/_images/demo_tight_layout_00_03.png deleted file mode 100644 index dd591f75a36..00000000000 Binary files a/dev/_images/demo_tight_layout_00_03.png and /dev/null differ diff --git a/dev/_images/demo_tight_layout_00_04.png b/dev/_images/demo_tight_layout_00_04.png deleted file mode 100644 index fcd34f547ec..00000000000 Binary files a/dev/_images/demo_tight_layout_00_04.png and /dev/null differ diff --git a/dev/_images/demo_tight_layout_00_05.png b/dev/_images/demo_tight_layout_00_05.png deleted file mode 100644 index 085c75f75cd..00000000000 Binary files a/dev/_images/demo_tight_layout_00_05.png and /dev/null differ diff --git a/dev/_images/demo_tight_layout_00_06.png b/dev/_images/demo_tight_layout_00_06.png deleted file mode 100644 index d85eff7ce9c..00000000000 Binary files a/dev/_images/demo_tight_layout_00_06.png and /dev/null differ diff --git a/dev/_images/demo_tight_layout_01_00.png b/dev/_images/demo_tight_layout_01_00.png deleted file mode 100644 index 89ca273e096..00000000000 Binary files a/dev/_images/demo_tight_layout_01_00.png and /dev/null differ diff --git a/dev/_images/dollar_ticks.png b/dev/_images/dollar_ticks.png deleted file mode 100644 index 899f6131efe..00000000000 Binary files a/dev/_images/dollar_ticks.png and /dev/null differ diff --git a/dev/_images/dolphin.png b/dev/_images/dolphin.png deleted file mode 100644 index 8eee0b398a2..00000000000 Binary files a/dev/_images/dolphin.png and /dev/null differ diff --git a/dev/_images/donut_demo.png b/dev/_images/donut_demo.png deleted file mode 100644 index 7fd5bb837ba..00000000000 Binary files a/dev/_images/donut_demo.png and /dev/null differ diff --git a/dev/_images/eeg_small.png b/dev/_images/eeg_small.png deleted file mode 100644 index fb02af5b4a3..00000000000 Binary files a/dev/_images/eeg_small.png and /dev/null differ diff --git a/dev/_images/ellipse_collection.png b/dev/_images/ellipse_collection.png deleted file mode 100644 index 5cf303779b1..00000000000 Binary files a/dev/_images/ellipse_collection.png and /dev/null differ diff --git a/dev/_images/ellipse_demo.png b/dev/_images/ellipse_demo.png deleted file mode 100644 index de067636bbe..00000000000 Binary files a/dev/_images/ellipse_demo.png and /dev/null differ diff --git a/dev/_images/ellipse_demo1.png b/dev/_images/ellipse_demo1.png deleted file mode 100644 index de067636bbe..00000000000 Binary files a/dev/_images/ellipse_demo1.png and /dev/null differ diff --git a/dev/_images/ellipse_rotated.png b/dev/_images/ellipse_rotated.png deleted file mode 100644 index 2283b57e51e..00000000000 Binary files a/dev/_images/ellipse_rotated.png and /dev/null differ diff --git a/dev/_images/ellipse_with_units_00.png b/dev/_images/ellipse_with_units_00.png deleted file mode 100644 index a0ecb1336f1..00000000000 Binary files a/dev/_images/ellipse_with_units_00.png and /dev/null differ diff --git a/dev/_images/ellipse_with_units_01.png b/dev/_images/ellipse_with_units_01.png deleted file mode 100644 index 11b59543b91..00000000000 Binary files a/dev/_images/ellipse_with_units_01.png and /dev/null differ diff --git a/dev/_images/engineering_formatter.png b/dev/_images/engineering_formatter.png deleted file mode 100644 index b6b5e129ccf..00000000000 Binary files a/dev/_images/engineering_formatter.png and /dev/null differ diff --git a/dev/_images/equal_aspect_ratio.png b/dev/_images/equal_aspect_ratio.png deleted file mode 100644 index 0dd7118767f..00000000000 Binary files a/dev/_images/equal_aspect_ratio.png and /dev/null differ diff --git a/dev/_images/errorbar_demo.png b/dev/_images/errorbar_demo.png deleted file mode 100644 index 0eb79e89675..00000000000 Binary files a/dev/_images/errorbar_demo.png and /dev/null differ diff --git a/dev/_images/errorbar_demo1.png b/dev/_images/errorbar_demo1.png deleted file mode 100644 index 0eb79e89675..00000000000 Binary files a/dev/_images/errorbar_demo1.png and /dev/null differ diff --git a/dev/_images/errorbar_demo_00.png b/dev/_images/errorbar_demo_00.png deleted file mode 100644 index 0001fac325c..00000000000 Binary files a/dev/_images/errorbar_demo_00.png and /dev/null differ diff --git a/dev/_images/errorbar_demo_001.png b/dev/_images/errorbar_demo_001.png deleted file mode 100644 index 0001fac325c..00000000000 Binary files a/dev/_images/errorbar_demo_001.png and /dev/null differ diff --git a/dev/_images/errorbar_demo_01.png b/dev/_images/errorbar_demo_01.png deleted file mode 100644 index 4a84e9c7c9f..00000000000 Binary files a/dev/_images/errorbar_demo_01.png and /dev/null differ diff --git a/dev/_images/errorbar_demo_011.png b/dev/_images/errorbar_demo_011.png deleted file mode 100644 index 4a84e9c7c9f..00000000000 Binary files a/dev/_images/errorbar_demo_011.png and /dev/null differ diff --git a/dev/_images/errorbar_demo_features.png b/dev/_images/errorbar_demo_features.png deleted file mode 100644 index f3f48f90bc1..00000000000 Binary files a/dev/_images/errorbar_demo_features.png and /dev/null differ diff --git a/dev/_images/errorbar_limits_00.png b/dev/_images/errorbar_limits_00.png deleted file mode 100644 index b6258306f44..00000000000 Binary files a/dev/_images/errorbar_limits_00.png and /dev/null differ diff --git a/dev/_images/errorbar_limits_01.png b/dev/_images/errorbar_limits_01.png deleted file mode 100644 index 1158e2559e7..00000000000 Binary files a/dev/_images/errorbar_limits_01.png and /dev/null differ diff --git a/dev/_images/errorbar_subsample.png b/dev/_images/errorbar_subsample.png deleted file mode 100644 index 7d630b19e88..00000000000 Binary files a/dev/_images/errorbar_subsample.png and /dev/null differ diff --git a/dev/_images/evans_test.png b/dev/_images/evans_test.png deleted file mode 100644 index a3169b4068b..00000000000 Binary files a/dev/_images/evans_test.png and /dev/null differ diff --git a/dev/_images/eventcollection_demo.png b/dev/_images/eventcollection_demo.png deleted file mode 100644 index 77b73eebded..00000000000 Binary files a/dev/_images/eventcollection_demo.png and /dev/null differ diff --git a/dev/_images/eventcollection_demo1.png b/dev/_images/eventcollection_demo1.png deleted file mode 100644 index 77b73eebded..00000000000 Binary files a/dev/_images/eventcollection_demo1.png and /dev/null differ diff --git a/dev/_images/eventplot_demo.png b/dev/_images/eventplot_demo.png deleted file mode 100644 index 0ef3e9dc0eb..00000000000 Binary files a/dev/_images/eventplot_demo.png and /dev/null differ diff --git a/dev/_images/eventplot_demo1.png b/dev/_images/eventplot_demo1.png deleted file mode 100644 index 0ef3e9dc0eb..00000000000 Binary files a/dev/_images/eventplot_demo1.png and /dev/null differ diff --git a/dev/_images/fahrenheit_celsius_scales.png b/dev/_images/fahrenheit_celsius_scales.png deleted file mode 100644 index d683f989430..00000000000 Binary files a/dev/_images/fahrenheit_celsius_scales.png and /dev/null differ diff --git a/dev/_images/fancyarrow_demo.png b/dev/_images/fancyarrow_demo.png deleted file mode 100644 index a527d92ded5..00000000000 Binary files a/dev/_images/fancyarrow_demo.png and /dev/null differ diff --git a/dev/_images/fancyarrow_demo1.png b/dev/_images/fancyarrow_demo1.png deleted file mode 100644 index a527d92ded5..00000000000 Binary files a/dev/_images/fancyarrow_demo1.png and /dev/null differ diff --git a/dev/_images/fancyarrow_demo2.png b/dev/_images/fancyarrow_demo2.png deleted file mode 100644 index a527d92ded5..00000000000 Binary files a/dev/_images/fancyarrow_demo2.png and /dev/null differ diff --git a/dev/_images/fancybox_demo2.png b/dev/_images/fancybox_demo2.png deleted file mode 100644 index 62d1d13cca0..00000000000 Binary files a/dev/_images/fancybox_demo2.png and /dev/null differ diff --git a/dev/_images/fancybox_demo21.png b/dev/_images/fancybox_demo21.png deleted file mode 100644 index 62d1d13cca0..00000000000 Binary files a/dev/_images/fancybox_demo21.png and /dev/null differ diff --git a/dev/_images/fancybox_demo22.png b/dev/_images/fancybox_demo22.png deleted file mode 100644 index 62d1d13cca0..00000000000 Binary files a/dev/_images/fancybox_demo22.png and /dev/null differ diff --git a/dev/_images/fancybox_demo_01_00.png b/dev/_images/fancybox_demo_01_00.png deleted file mode 100644 index d4e3c051b30..00000000000 Binary files a/dev/_images/fancybox_demo_01_00.png and /dev/null differ diff --git a/dev/_images/fancytextbox_demo.png b/dev/_images/fancytextbox_demo.png deleted file mode 100644 index c6186ee37c6..00000000000 Binary files a/dev/_images/fancytextbox_demo.png and /dev/null differ diff --git a/dev/_images/fig_axes_customize_simple.png b/dev/_images/fig_axes_customize_simple.png deleted file mode 100644 index b135a8086ad..00000000000 Binary files a/dev/_images/fig_axes_customize_simple.png and /dev/null differ diff --git a/dev/_images/fig_axes_labels_simple.png b/dev/_images/fig_axes_labels_simple.png deleted file mode 100644 index 505caa8494f..00000000000 Binary files a/dev/_images/fig_axes_labels_simple.png and /dev/null differ diff --git a/dev/_images/fig_x.png b/dev/_images/fig_x.png deleted file mode 100644 index 5f47bfe9099..00000000000 Binary files a/dev/_images/fig_x.png and /dev/null differ diff --git a/dev/_images/figimage_demo.png b/dev/_images/figimage_demo.png deleted file mode 100644 index e3de2815c3c..00000000000 Binary files a/dev/_images/figimage_demo.png and /dev/null differ diff --git a/dev/_images/figimage_demo1.png b/dev/_images/figimage_demo1.png deleted file mode 100644 index e3de2815c3c..00000000000 Binary files a/dev/_images/figimage_demo1.png and /dev/null differ diff --git a/dev/_images/figlegend_demo.png b/dev/_images/figlegend_demo.png deleted file mode 100644 index 2b8e82f19e6..00000000000 Binary files a/dev/_images/figlegend_demo.png and /dev/null differ diff --git a/dev/_images/figlegend_demo1.png b/dev/_images/figlegend_demo1.png deleted file mode 100644 index 2b8e82f19e6..00000000000 Binary files a/dev/_images/figlegend_demo1.png and /dev/null differ diff --git a/dev/_images/figure_title.png b/dev/_images/figure_title.png deleted file mode 100644 index 54b688e2efb..00000000000 Binary files a/dev/_images/figure_title.png and /dev/null differ diff --git a/dev/_images/filesave.png b/dev/_images/filesave.png deleted file mode 100644 index 79018219423..00000000000 Binary files a/dev/_images/filesave.png and /dev/null differ diff --git a/dev/_images/fill_between_demo_00.png b/dev/_images/fill_between_demo_00.png deleted file mode 100644 index 5e514a06d8b..00000000000 Binary files a/dev/_images/fill_between_demo_00.png and /dev/null differ diff --git a/dev/_images/fill_between_demo_001.png b/dev/_images/fill_between_demo_001.png deleted file mode 100644 index 5e514a06d8b..00000000000 Binary files a/dev/_images/fill_between_demo_001.png and /dev/null differ diff --git a/dev/_images/fill_between_demo_01.png b/dev/_images/fill_between_demo_01.png deleted file mode 100644 index 270c1a539a4..00000000000 Binary files a/dev/_images/fill_between_demo_01.png and /dev/null differ diff --git a/dev/_images/fill_between_demo_011.png b/dev/_images/fill_between_demo_011.png deleted file mode 100644 index 270c1a539a4..00000000000 Binary files a/dev/_images/fill_between_demo_011.png and /dev/null differ diff --git a/dev/_images/fill_between_demo_02.png b/dev/_images/fill_between_demo_02.png deleted file mode 100644 index 449ad4c5d57..00000000000 Binary files a/dev/_images/fill_between_demo_02.png and /dev/null differ diff --git a/dev/_images/fill_between_demo_021.png b/dev/_images/fill_between_demo_021.png deleted file mode 100644 index 449ad4c5d57..00000000000 Binary files a/dev/_images/fill_between_demo_021.png and /dev/null differ diff --git a/dev/_images/fill_betweenx_demo_00.png b/dev/_images/fill_betweenx_demo_00.png deleted file mode 100644 index 2463af08077..00000000000 Binary files a/dev/_images/fill_betweenx_demo_00.png and /dev/null differ diff --git a/dev/_images/fill_betweenx_demo_001.png b/dev/_images/fill_betweenx_demo_001.png deleted file mode 100644 index 2463af08077..00000000000 Binary files a/dev/_images/fill_betweenx_demo_001.png and /dev/null differ diff --git a/dev/_images/fill_betweenx_demo_01.png b/dev/_images/fill_betweenx_demo_01.png deleted file mode 100644 index 2ef00064334..00000000000 Binary files a/dev/_images/fill_betweenx_demo_01.png and /dev/null differ diff --git a/dev/_images/fill_betweenx_demo_011.png b/dev/_images/fill_betweenx_demo_011.png deleted file mode 100644 index 2ef00064334..00000000000 Binary files a/dev/_images/fill_betweenx_demo_011.png and /dev/null differ diff --git a/dev/_images/fill_demo.png b/dev/_images/fill_demo.png deleted file mode 100644 index 8ff5c490456..00000000000 Binary files a/dev/_images/fill_demo.png and /dev/null differ diff --git a/dev/_images/fill_demo1.png b/dev/_images/fill_demo1.png deleted file mode 100644 index 8ff5c490456..00000000000 Binary files a/dev/_images/fill_demo1.png and /dev/null differ diff --git a/dev/_images/fill_demo2.png b/dev/_images/fill_demo2.png deleted file mode 100644 index 8ff5c490456..00000000000 Binary files a/dev/_images/fill_demo2.png and /dev/null differ diff --git a/dev/_images/fill_demo3.png b/dev/_images/fill_demo3.png deleted file mode 100644 index ecac2972ed1..00000000000 Binary files a/dev/_images/fill_demo3.png and /dev/null differ diff --git a/dev/_images/fill_demo_features.png b/dev/_images/fill_demo_features.png deleted file mode 100644 index e0d574d3707..00000000000 Binary files a/dev/_images/fill_demo_features.png and /dev/null differ diff --git a/dev/_images/fill_spiral.png b/dev/_images/fill_spiral.png deleted file mode 100644 index c1ae62b4e5d..00000000000 Binary files a/dev/_images/fill_spiral.png and /dev/null differ diff --git a/dev/_images/filledmarker_demo_00.png b/dev/_images/filledmarker_demo_00.png deleted file mode 100644 index 6c039629b83..00000000000 Binary files a/dev/_images/filledmarker_demo_00.png and /dev/null differ diff --git a/dev/_images/filledmarker_demo_01.png b/dev/_images/filledmarker_demo_01.png deleted file mode 100644 index 1236b1eb9fb..00000000000 Binary files a/dev/_images/filledmarker_demo_01.png and /dev/null differ diff --git a/dev/_images/filledmarker_demo_02.png b/dev/_images/filledmarker_demo_02.png deleted file mode 100644 index dad8d249f86..00000000000 Binary files a/dev/_images/filledmarker_demo_02.png and /dev/null differ diff --git a/dev/_images/filledmarker_demo_03.png b/dev/_images/filledmarker_demo_03.png deleted file mode 100644 index b1ae2202929..00000000000 Binary files a/dev/_images/filledmarker_demo_03.png and /dev/null differ diff --git a/dev/_images/filledmarker_demo_04.png b/dev/_images/filledmarker_demo_04.png deleted file mode 100644 index c96e48eed85..00000000000 Binary files a/dev/_images/filledmarker_demo_04.png and /dev/null differ diff --git a/dev/_images/filledmarker_demo_05.png b/dev/_images/filledmarker_demo_05.png deleted file mode 100644 index ec1384f9122..00000000000 Binary files a/dev/_images/filledmarker_demo_05.png and /dev/null differ diff --git a/dev/_images/filledmarker_demo_06.png b/dev/_images/filledmarker_demo_06.png deleted file mode 100644 index 97d8dc631b6..00000000000 Binary files a/dev/_images/filledmarker_demo_06.png and /dev/null differ diff --git a/dev/_images/filledmarker_demo_07.png b/dev/_images/filledmarker_demo_07.png deleted file mode 100644 index 1fdf767a7f2..00000000000 Binary files a/dev/_images/filledmarker_demo_07.png and /dev/null differ diff --git a/dev/_images/filledmarker_demo_08.png b/dev/_images/filledmarker_demo_08.png deleted file mode 100644 index 010c4759dc4..00000000000 Binary files a/dev/_images/filledmarker_demo_08.png and /dev/null differ diff --git a/dev/_images/filledmarker_demo_09.png b/dev/_images/filledmarker_demo_09.png deleted file mode 100644 index 9cd08778abe..00000000000 Binary files a/dev/_images/filledmarker_demo_09.png and /dev/null differ diff --git a/dev/_images/filledmarker_demo_10.png b/dev/_images/filledmarker_demo_10.png deleted file mode 100644 index 7f4c9f1ff12..00000000000 Binary files a/dev/_images/filledmarker_demo_10.png and /dev/null differ diff --git a/dev/_images/filledmarker_demo_11.png b/dev/_images/filledmarker_demo_11.png deleted file mode 100644 index 3a2b2e5c5b4..00000000000 Binary files a/dev/_images/filledmarker_demo_11.png and /dev/null differ diff --git a/dev/_images/filledmarker_demo_12.png b/dev/_images/filledmarker_demo_12.png deleted file mode 100644 index b2455b463bd..00000000000 Binary files a/dev/_images/filledmarker_demo_12.png and /dev/null differ diff --git a/dev/_images/finance_demo.png b/dev/_images/finance_demo.png deleted file mode 100644 index 0e6e8cb8023..00000000000 Binary files a/dev/_images/finance_demo.png and /dev/null differ diff --git a/dev/_images/finance_work2.png b/dev/_images/finance_work2.png deleted file mode 100644 index acfca347367..00000000000 Binary files a/dev/_images/finance_work2.png and /dev/null differ diff --git a/dev/_images/finance_work21.png b/dev/_images/finance_work21.png deleted file mode 100644 index acfca347367..00000000000 Binary files a/dev/_images/finance_work21.png and /dev/null differ diff --git a/dev/_images/findobj_demo.png b/dev/_images/findobj_demo.png deleted file mode 100644 index d51de397375..00000000000 Binary files a/dev/_images/findobj_demo.png and /dev/null differ diff --git a/dev/_images/findobj_demo1.png b/dev/_images/findobj_demo1.png deleted file mode 100644 index ba0da254db9..00000000000 Binary files a/dev/_images/findobj_demo1.png and /dev/null differ diff --git a/dev/_images/fonts_demo.png b/dev/_images/fonts_demo.png deleted file mode 100644 index c08bde145c7..00000000000 Binary files a/dev/_images/fonts_demo.png and /dev/null differ diff --git a/dev/_images/fonts_demo_kw.png b/dev/_images/fonts_demo_kw.png deleted file mode 100644 index fc8f0238afc..00000000000 Binary files a/dev/_images/fonts_demo_kw.png and /dev/null differ diff --git a/dev/_images/forking_button.png b/dev/_images/forking_button.png deleted file mode 100644 index d0e04134d4d..00000000000 Binary files a/dev/_images/forking_button.png and /dev/null differ diff --git a/dev/_images/forward.png b/dev/_images/forward.png deleted file mode 100644 index 9d712c5e35b..00000000000 Binary files a/dev/_images/forward.png and /dev/null differ diff --git a/dev/_images/ganged_plots.png b/dev/_images/ganged_plots.png deleted file mode 100644 index 43f61840e7b..00000000000 Binary files a/dev/_images/ganged_plots.png and /dev/null differ diff --git a/dev/_images/geo_demo.png b/dev/_images/geo_demo.png deleted file mode 100644 index 91918381500..00000000000 Binary files a/dev/_images/geo_demo.png and /dev/null differ diff --git a/dev/_images/gradient_bar.png b/dev/_images/gradient_bar.png deleted file mode 100644 index f2a119b9607..00000000000 Binary files a/dev/_images/gradient_bar.png and /dev/null differ diff --git a/dev/_images/griddata_demo_00_00.png b/dev/_images/griddata_demo_00_00.png deleted file mode 100644 index 093eb94091c..00000000000 Binary files a/dev/_images/griddata_demo_00_00.png and /dev/null differ diff --git a/dev/_images/hatch_demo.png b/dev/_images/hatch_demo.png deleted file mode 100644 index 83c9bb3d38d..00000000000 Binary files a/dev/_images/hatch_demo.png and /dev/null differ diff --git a/dev/_images/hexbin_demo.png b/dev/_images/hexbin_demo.png deleted file mode 100644 index 4c8fedac21a..00000000000 Binary files a/dev/_images/hexbin_demo.png and /dev/null differ diff --git a/dev/_images/hexbin_demo1.png b/dev/_images/hexbin_demo1.png deleted file mode 100644 index 4c8fedac21a..00000000000 Binary files a/dev/_images/hexbin_demo1.png and /dev/null differ diff --git a/dev/_images/hexbin_demo2.png b/dev/_images/hexbin_demo2.png deleted file mode 100644 index c272c84c90b..00000000000 Binary files a/dev/_images/hexbin_demo2.png and /dev/null differ diff --git a/dev/_images/hinton_demo.png b/dev/_images/hinton_demo.png deleted file mode 100644 index 5c07fb1b5e4..00000000000 Binary files a/dev/_images/hinton_demo.png and /dev/null differ diff --git a/dev/_images/hist2d_demo.png b/dev/_images/hist2d_demo.png deleted file mode 100644 index 7a3a772462b..00000000000 Binary files a/dev/_images/hist2d_demo.png and /dev/null differ diff --git a/dev/_images/hist2d_demo1.png b/dev/_images/hist2d_demo1.png deleted file mode 100644 index 7a3a772462b..00000000000 Binary files a/dev/_images/hist2d_demo1.png and /dev/null differ diff --git a/dev/_images/hist2d_log_demo.png b/dev/_images/hist2d_log_demo.png deleted file mode 100644 index 8f1835adc92..00000000000 Binary files a/dev/_images/hist2d_log_demo.png and /dev/null differ diff --git a/dev/_images/hist3d_demo.png b/dev/_images/hist3d_demo.png deleted file mode 100644 index 8d772df0067..00000000000 Binary files a/dev/_images/hist3d_demo.png and /dev/null differ diff --git a/dev/_images/hist_colormapped.png b/dev/_images/hist_colormapped.png deleted file mode 100644 index 641bf302e5a..00000000000 Binary files a/dev/_images/hist_colormapped.png and /dev/null differ diff --git a/dev/_images/histogram_demo.png b/dev/_images/histogram_demo.png deleted file mode 100644 index 2037cd58bac..00000000000 Binary files a/dev/_images/histogram_demo.png and /dev/null differ diff --git a/dev/_images/histogram_demo1.png b/dev/_images/histogram_demo1.png deleted file mode 100644 index f8a1481e0e8..00000000000 Binary files a/dev/_images/histogram_demo1.png and /dev/null differ diff --git a/dev/_images/histogram_demo2.png b/dev/_images/histogram_demo2.png deleted file mode 100644 index 2037cd58bac..00000000000 Binary files a/dev/_images/histogram_demo2.png and /dev/null differ diff --git a/dev/_images/histogram_demo3.png b/dev/_images/histogram_demo3.png deleted file mode 100644 index 2037cd58bac..00000000000 Binary files a/dev/_images/histogram_demo3.png and /dev/null differ diff --git a/dev/_images/histogram_demo_extended_00.png b/dev/_images/histogram_demo_extended_00.png deleted file mode 100644 index aa8fa51d1c6..00000000000 Binary files a/dev/_images/histogram_demo_extended_00.png and /dev/null differ diff --git a/dev/_images/histogram_demo_extended_01.png b/dev/_images/histogram_demo_extended_01.png deleted file mode 100644 index 49a1c2a475f..00000000000 Binary files a/dev/_images/histogram_demo_extended_01.png and /dev/null differ diff --git a/dev/_images/histogram_demo_extended_02.png b/dev/_images/histogram_demo_extended_02.png deleted file mode 100644 index e486b1c56c0..00000000000 Binary files a/dev/_images/histogram_demo_extended_02.png and /dev/null differ diff --git a/dev/_images/histogram_demo_extended_03.png b/dev/_images/histogram_demo_extended_03.png deleted file mode 100644 index 5a432ea88c2..00000000000 Binary files a/dev/_images/histogram_demo_extended_03.png and /dev/null differ diff --git a/dev/_images/histogram_demo_extended_04.png b/dev/_images/histogram_demo_extended_04.png deleted file mode 100644 index 8a1657493aa..00000000000 Binary files a/dev/_images/histogram_demo_extended_04.png and /dev/null differ diff --git a/dev/_images/histogram_demo_extended_05.png b/dev/_images/histogram_demo_extended_05.png deleted file mode 100644 index 04dd094ac5a..00000000000 Binary files a/dev/_images/histogram_demo_extended_05.png and /dev/null differ diff --git a/dev/_images/histogram_demo_extended_06.png b/dev/_images/histogram_demo_extended_06.png deleted file mode 100644 index fd8e1c94c0d..00000000000 Binary files a/dev/_images/histogram_demo_extended_06.png and /dev/null differ diff --git a/dev/_images/histogram_demo_features.png b/dev/_images/histogram_demo_features.png deleted file mode 100644 index 25f12bab274..00000000000 Binary files a/dev/_images/histogram_demo_features.png and /dev/null differ diff --git a/dev/_images/histogram_demo_features1.png b/dev/_images/histogram_demo_features1.png deleted file mode 100644 index 25f12bab274..00000000000 Binary files a/dev/_images/histogram_demo_features1.png and /dev/null differ diff --git a/dev/_images/histogram_demo_features2.png b/dev/_images/histogram_demo_features2.png deleted file mode 100644 index 25f12bab274..00000000000 Binary files a/dev/_images/histogram_demo_features2.png and /dev/null differ diff --git a/dev/_images/histogram_path_demo.png b/dev/_images/histogram_path_demo.png deleted file mode 100644 index 7879fa6147a..00000000000 Binary files a/dev/_images/histogram_path_demo.png and /dev/null differ diff --git a/dev/_images/histogram_path_demo1.png b/dev/_images/histogram_path_demo1.png deleted file mode 100644 index 7879fa6147a..00000000000 Binary files a/dev/_images/histogram_path_demo1.png and /dev/null differ diff --git a/dev/_images/histogram_percent_demo.png b/dev/_images/histogram_percent_demo.png deleted file mode 100644 index 9d49bb4c051..00000000000 Binary files a/dev/_images/histogram_percent_demo.png and /dev/null differ diff --git a/dev/_images/hline_demo.png b/dev/_images/hline_demo.png deleted file mode 100644 index 87856f4485e..00000000000 Binary files a/dev/_images/hline_demo.png and /dev/null differ diff --git a/dev/_images/hline_demo1.png b/dev/_images/hline_demo1.png deleted file mode 100644 index 87856f4485e..00000000000 Binary files a/dev/_images/hline_demo1.png and /dev/null differ diff --git a/dev/_images/home.png b/dev/_images/home.png deleted file mode 100644 index bed4ffda4a1..00000000000 Binary files a/dev/_images/home.png and /dev/null differ diff --git a/dev/_images/howto_faq-1.png b/dev/_images/howto_faq-1.png deleted file mode 100644 index 1698c613c05..00000000000 Binary files a/dev/_images/howto_faq-1.png and /dev/null differ diff --git a/dev/_images/image_clip_path.png b/dev/_images/image_clip_path.png deleted file mode 100644 index cd493f488ae..00000000000 Binary files a/dev/_images/image_clip_path.png and /dev/null differ diff --git a/dev/_images/image_demo.png b/dev/_images/image_demo.png deleted file mode 100644 index d0f0dcce77c..00000000000 Binary files a/dev/_images/image_demo.png and /dev/null differ diff --git a/dev/_images/image_demo1.png b/dev/_images/image_demo1.png deleted file mode 100644 index 39b56edf5de..00000000000 Binary files a/dev/_images/image_demo1.png and /dev/null differ diff --git a/dev/_images/image_demo2.png b/dev/_images/image_demo2.png deleted file mode 100644 index d0f0dcce77c..00000000000 Binary files a/dev/_images/image_demo2.png and /dev/null differ diff --git a/dev/_images/image_demo21.png b/dev/_images/image_demo21.png deleted file mode 100644 index d52d6bd0186..00000000000 Binary files a/dev/_images/image_demo21.png and /dev/null differ diff --git a/dev/_images/image_demo3.png b/dev/_images/image_demo3.png deleted file mode 100644 index b333140df48..00000000000 Binary files a/dev/_images/image_demo3.png and /dev/null differ diff --git a/dev/_images/image_demo_clip_path.png b/dev/_images/image_demo_clip_path.png deleted file mode 100644 index 8af5f87ad91..00000000000 Binary files a/dev/_images/image_demo_clip_path.png and /dev/null differ diff --git a/dev/_images/image_interp_00.png b/dev/_images/image_interp_00.png deleted file mode 100644 index 8264188e785..00000000000 Binary files a/dev/_images/image_interp_00.png and /dev/null differ diff --git a/dev/_images/image_interp_01.png b/dev/_images/image_interp_01.png deleted file mode 100644 index 7ac008c253f..00000000000 Binary files a/dev/_images/image_interp_01.png and /dev/null differ diff --git a/dev/_images/image_interp_02.png b/dev/_images/image_interp_02.png deleted file mode 100644 index 70469368b1d..00000000000 Binary files a/dev/_images/image_interp_02.png and /dev/null differ diff --git a/dev/_images/image_masked.png b/dev/_images/image_masked.png deleted file mode 100644 index f1e60a3fa57..00000000000 Binary files a/dev/_images/image_masked.png and /dev/null differ diff --git a/dev/_images/image_nonuniform.png b/dev/_images/image_nonuniform.png deleted file mode 100644 index 6018efaccb0..00000000000 Binary files a/dev/_images/image_nonuniform.png and /dev/null differ diff --git a/dev/_images/image_origin.png b/dev/_images/image_origin.png deleted file mode 100644 index d72b49c752e..00000000000 Binary files a/dev/_images/image_origin.png and /dev/null differ diff --git a/dev/_images/image_slices_viewer.png b/dev/_images/image_slices_viewer.png deleted file mode 100644 index 92922e70792..00000000000 Binary files a/dev/_images/image_slices_viewer.png and /dev/null differ diff --git a/dev/_images/image_tutorial-1.png b/dev/_images/image_tutorial-1.png deleted file mode 100644 index 66f813867f5..00000000000 Binary files a/dev/_images/image_tutorial-1.png and /dev/null differ diff --git a/dev/_images/image_tutorial-10.png b/dev/_images/image_tutorial-10.png deleted file mode 100644 index 9f4ed51232f..00000000000 Binary files a/dev/_images/image_tutorial-10.png and /dev/null differ diff --git a/dev/_images/image_tutorial-2.png b/dev/_images/image_tutorial-2.png deleted file mode 100644 index 032f37b2841..00000000000 Binary files a/dev/_images/image_tutorial-2.png and /dev/null differ diff --git a/dev/_images/image_tutorial-3.png b/dev/_images/image_tutorial-3.png deleted file mode 100644 index bd9dc57d611..00000000000 Binary files a/dev/_images/image_tutorial-3.png and /dev/null differ diff --git a/dev/_images/image_tutorial-4.png b/dev/_images/image_tutorial-4.png deleted file mode 100644 index 78604f68f71..00000000000 Binary files a/dev/_images/image_tutorial-4.png and /dev/null differ diff --git a/dev/_images/image_tutorial-5.png b/dev/_images/image_tutorial-5.png deleted file mode 100644 index 1cfd9f12aee..00000000000 Binary files a/dev/_images/image_tutorial-5.png and /dev/null differ diff --git a/dev/_images/image_tutorial-6.png b/dev/_images/image_tutorial-6.png deleted file mode 100644 index 2436078611f..00000000000 Binary files a/dev/_images/image_tutorial-6.png and /dev/null differ diff --git a/dev/_images/image_tutorial-7.png b/dev/_images/image_tutorial-7.png deleted file mode 100644 index 22645797d79..00000000000 Binary files a/dev/_images/image_tutorial-7.png and /dev/null differ diff --git a/dev/_images/image_tutorial-8.png b/dev/_images/image_tutorial-8.png deleted file mode 100644 index 89933cd0c53..00000000000 Binary files a/dev/_images/image_tutorial-8.png and /dev/null differ diff --git a/dev/_images/image_tutorial-9.png b/dev/_images/image_tutorial-9.png deleted file mode 100644 index ab9e490c3e5..00000000000 Binary files a/dev/_images/image_tutorial-9.png and /dev/null differ diff --git a/dev/_images/image_zcoord.png b/dev/_images/image_zcoord.png deleted file mode 100644 index a12fd38ff0c..00000000000 Binary files a/dev/_images/image_zcoord.png and /dev/null differ diff --git a/dev/_images/inheritance-06fd09a59d6033b361214dcb1c39d0f2e9185a64.png b/dev/_images/inheritance-06fd09a59d6033b361214dcb1c39d0f2e9185a64.png deleted file mode 100644 index 4aeaef0ef66..00000000000 Binary files a/dev/_images/inheritance-06fd09a59d6033b361214dcb1c39d0f2e9185a64.png and /dev/null differ diff --git a/dev/_images/inheritance-06fd09a59d6033b361214dcb1c39d0f2e9185a64.png.map b/dev/_images/inheritance-06fd09a59d6033b361214dcb1c39d0f2e9185a64.png.map deleted file mode 100644 index 6b0dd715220..00000000000 --- a/dev/_images/inheritance-06fd09a59d6033b361214dcb1c39d0f2e9185a64.png.map +++ /dev/null @@ -1,48 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/dev/_images/inheritance-09cf3ad817dc5ffc982305277ade29181d35162d.png b/dev/_images/inheritance-09cf3ad817dc5ffc982305277ade29181d35162d.png deleted file mode 100644 index 0580b8d3c5e..00000000000 Binary files a/dev/_images/inheritance-09cf3ad817dc5ffc982305277ade29181d35162d.png and /dev/null differ diff --git a/dev/_images/inheritance-09cf3ad817dc5ffc982305277ade29181d35162d.png.map b/dev/_images/inheritance-09cf3ad817dc5ffc982305277ade29181d35162d.png.map deleted file mode 100644 index 5a9d84687fd..00000000000 --- a/dev/_images/inheritance-09cf3ad817dc5ffc982305277ade29181d35162d.png.map +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/dev/_images/inheritance-2997e522a830214590bfc2ba755459b3a40ab3e8.png b/dev/_images/inheritance-2997e522a830214590bfc2ba755459b3a40ab3e8.png deleted file mode 100644 index f2cf348d58a..00000000000 Binary files a/dev/_images/inheritance-2997e522a830214590bfc2ba755459b3a40ab3e8.png and /dev/null differ diff --git a/dev/_images/inheritance-2997e522a830214590bfc2ba755459b3a40ab3e8.png.map b/dev/_images/inheritance-2997e522a830214590bfc2ba755459b3a40ab3e8.png.map deleted file mode 100644 index a552d6626f7..00000000000 --- a/dev/_images/inheritance-2997e522a830214590bfc2ba755459b3a40ab3e8.png.map +++ /dev/null @@ -1,23 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - diff --git a/dev/_images/inheritance-360099b1e4caf0ba452d9cc17a0420db48e663d4.png b/dev/_images/inheritance-360099b1e4caf0ba452d9cc17a0420db48e663d4.png deleted file mode 100644 index f33c02db8bd..00000000000 Binary files a/dev/_images/inheritance-360099b1e4caf0ba452d9cc17a0420db48e663d4.png and /dev/null differ diff --git a/dev/_images/inheritance-360099b1e4caf0ba452d9cc17a0420db48e663d4.png.map b/dev/_images/inheritance-360099b1e4caf0ba452d9cc17a0420db48e663d4.png.map deleted file mode 100644 index 021eb99963d..00000000000 --- a/dev/_images/inheritance-360099b1e4caf0ba452d9cc17a0420db48e663d4.png.map +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - diff --git a/dev/_images/inheritance-659651cc5a5d4164e9746be9755dba5dfd6a866d.png b/dev/_images/inheritance-659651cc5a5d4164e9746be9755dba5dfd6a866d.png deleted file mode 100644 index 7c7dbaee4fc..00000000000 Binary files a/dev/_images/inheritance-659651cc5a5d4164e9746be9755dba5dfd6a866d.png and /dev/null differ diff --git a/dev/_images/inheritance-659651cc5a5d4164e9746be9755dba5dfd6a866d.png.map b/dev/_images/inheritance-659651cc5a5d4164e9746be9755dba5dfd6a866d.png.map deleted file mode 100644 index 0c5f1f8461d..00000000000 --- a/dev/_images/inheritance-659651cc5a5d4164e9746be9755dba5dfd6a866d.png.map +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - - - - - - - - - - - - - diff --git a/dev/_images/inheritance-79b1dad41d805732d897393f02005a9125bae25c.png b/dev/_images/inheritance-79b1dad41d805732d897393f02005a9125bae25c.png deleted file mode 100644 index 0580b8d3c5e..00000000000 Binary files a/dev/_images/inheritance-79b1dad41d805732d897393f02005a9125bae25c.png and /dev/null differ diff --git a/dev/_images/inheritance-79b1dad41d805732d897393f02005a9125bae25c.png.map b/dev/_images/inheritance-79b1dad41d805732d897393f02005a9125bae25c.png.map deleted file mode 100644 index 49e8c729928..00000000000 --- a/dev/_images/inheritance-79b1dad41d805732d897393f02005a9125bae25c.png.map +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/dev/_images/inheritance-8eb22f47734f756c0f957e7f0854bd1cbbb8a882.png b/dev/_images/inheritance-8eb22f47734f756c0f957e7f0854bd1cbbb8a882.png deleted file mode 100644 index 17b2be39fc7..00000000000 Binary files a/dev/_images/inheritance-8eb22f47734f756c0f957e7f0854bd1cbbb8a882.png and /dev/null differ diff --git a/dev/_images/inheritance-8eb22f47734f756c0f957e7f0854bd1cbbb8a882.png.map b/dev/_images/inheritance-8eb22f47734f756c0f957e7f0854bd1cbbb8a882.png.map deleted file mode 100644 index df82622ad50..00000000000 --- a/dev/_images/inheritance-8eb22f47734f756c0f957e7f0854bd1cbbb8a882.png.map +++ /dev/null @@ -1,48 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/dev/_images/inheritance-94d14d5b714c1ff5914cf06fe346dfb002c60a32.png b/dev/_images/inheritance-94d14d5b714c1ff5914cf06fe346dfb002c60a32.png deleted file mode 100644 index f58c09b10f2..00000000000 Binary files a/dev/_images/inheritance-94d14d5b714c1ff5914cf06fe346dfb002c60a32.png and /dev/null differ diff --git a/dev/_images/inheritance-94d14d5b714c1ff5914cf06fe346dfb002c60a32.png.map b/dev/_images/inheritance-94d14d5b714c1ff5914cf06fe346dfb002c60a32.png.map deleted file mode 100644 index d9aa3ab0120..00000000000 --- a/dev/_images/inheritance-94d14d5b714c1ff5914cf06fe346dfb002c60a32.png.map +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/dev/_images/inheritance-a0e8a20f0b1424be74c3b11543b83bcbcb35382c.png b/dev/_images/inheritance-a0e8a20f0b1424be74c3b11543b83bcbcb35382c.png deleted file mode 100644 index 62d856648a8..00000000000 Binary files a/dev/_images/inheritance-a0e8a20f0b1424be74c3b11543b83bcbcb35382c.png and /dev/null differ diff --git a/dev/_images/inheritance-a0e8a20f0b1424be74c3b11543b83bcbcb35382c.png.map b/dev/_images/inheritance-a0e8a20f0b1424be74c3b11543b83bcbcb35382c.png.map deleted file mode 100644 index bf0ef6b0631..00000000000 --- a/dev/_images/inheritance-a0e8a20f0b1424be74c3b11543b83bcbcb35382c.png.map +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - diff --git a/dev/_images/inheritance-c4761b8614423fb1f9629f6bfc7ec29b9d8f3a4f.png b/dev/_images/inheritance-c4761b8614423fb1f9629f6bfc7ec29b9d8f3a4f.png deleted file mode 100644 index 8d259d73e20..00000000000 Binary files a/dev/_images/inheritance-c4761b8614423fb1f9629f6bfc7ec29b9d8f3a4f.png and /dev/null differ diff --git a/dev/_images/inheritance-c4761b8614423fb1f9629f6bfc7ec29b9d8f3a4f.png.map b/dev/_images/inheritance-c4761b8614423fb1f9629f6bfc7ec29b9d8f3a4f.png.map deleted file mode 100644 index 5e5249f5b01..00000000000 --- a/dev/_images/inheritance-c4761b8614423fb1f9629f6bfc7ec29b9d8f3a4f.png.map +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - - - - - - - - - - - - diff --git a/dev/_images/inheritance-d275ae2751f9295eddc221fab6db91ebd9ab6ff6.png b/dev/_images/inheritance-d275ae2751f9295eddc221fab6db91ebd9ab6ff6.png deleted file mode 100644 index f58c09b10f2..00000000000 Binary files a/dev/_images/inheritance-d275ae2751f9295eddc221fab6db91ebd9ab6ff6.png and /dev/null differ diff --git a/dev/_images/inheritance-d275ae2751f9295eddc221fab6db91ebd9ab6ff6.png.map b/dev/_images/inheritance-d275ae2751f9295eddc221fab6db91ebd9ab6ff6.png.map deleted file mode 100644 index ea478d2ed98..00000000000 --- a/dev/_images/inheritance-d275ae2751f9295eddc221fab6db91ebd9ab6ff6.png.map +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/dev/_images/inheritance-d30cf54e093b46bde62705b3698a4528dc379bef.png b/dev/_images/inheritance-d30cf54e093b46bde62705b3698a4528dc379bef.png deleted file mode 100644 index 29f36fa5410..00000000000 Binary files a/dev/_images/inheritance-d30cf54e093b46bde62705b3698a4528dc379bef.png and /dev/null differ diff --git a/dev/_images/inheritance-d30cf54e093b46bde62705b3698a4528dc379bef.png.map b/dev/_images/inheritance-d30cf54e093b46bde62705b3698a4528dc379bef.png.map deleted file mode 100644 index dabf641523c..00000000000 --- a/dev/_images/inheritance-d30cf54e093b46bde62705b3698a4528dc379bef.png.map +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - - - - - - - - - - - diff --git a/dev/_images/inset_locator_demo.png b/dev/_images/inset_locator_demo.png deleted file mode 100644 index 9f13f2e4a31..00000000000 Binary files a/dev/_images/inset_locator_demo.png and /dev/null differ diff --git a/dev/_images/inset_locator_demo1.png b/dev/_images/inset_locator_demo1.png deleted file mode 100644 index 9f13f2e4a31..00000000000 Binary files a/dev/_images/inset_locator_demo1.png and /dev/null differ diff --git a/dev/_images/inset_locator_demo2.png b/dev/_images/inset_locator_demo2.png deleted file mode 100644 index 53739e339bb..00000000000 Binary files a/dev/_images/inset_locator_demo2.png and /dev/null differ diff --git a/dev/_images/inset_locator_demo21.png b/dev/_images/inset_locator_demo21.png deleted file mode 100644 index 53739e339bb..00000000000 Binary files a/dev/_images/inset_locator_demo21.png and /dev/null differ diff --git a/dev/_images/integral_demo.png b/dev/_images/integral_demo.png deleted file mode 100644 index 9500bf9bc42..00000000000 Binary files a/dev/_images/integral_demo.png and /dev/null differ diff --git a/dev/_images/interp_demo.png b/dev/_images/interp_demo.png deleted file mode 100644 index 1bb87a7af71..00000000000 Binary files a/dev/_images/interp_demo.png and /dev/null differ diff --git a/dev/_images/invert_axes.png b/dev/_images/invert_axes.png deleted file mode 100644 index 9abe69c0bf1..00000000000 Binary files a/dev/_images/invert_axes.png and /dev/null differ diff --git a/dev/_images/joinstyle.png b/dev/_images/joinstyle.png deleted file mode 100644 index e24133001c1..00000000000 Binary files a/dev/_images/joinstyle.png and /dev/null differ diff --git a/dev/_images/layer_images.png b/dev/_images/layer_images.png deleted file mode 100644 index 9b0c99dfe36..00000000000 Binary files a/dev/_images/layer_images.png and /dev/null differ diff --git a/dev/_images/legend_auto_00.png b/dev/_images/legend_auto_00.png deleted file mode 100644 index f7d4580df20..00000000000 Binary files a/dev/_images/legend_auto_00.png and /dev/null differ diff --git a/dev/_images/legend_auto_01.png b/dev/_images/legend_auto_01.png deleted file mode 100644 index 7890531fee4..00000000000 Binary files a/dev/_images/legend_auto_01.png and /dev/null differ diff --git a/dev/_images/legend_auto_02.png b/dev/_images/legend_auto_02.png deleted file mode 100644 index 353c76e4904..00000000000 Binary files a/dev/_images/legend_auto_02.png and /dev/null differ diff --git a/dev/_images/legend_auto_03.png b/dev/_images/legend_auto_03.png deleted file mode 100644 index a18074a9555..00000000000 Binary files a/dev/_images/legend_auto_03.png and /dev/null differ diff --git a/dev/_images/legend_auto_04.png b/dev/_images/legend_auto_04.png deleted file mode 100644 index b4cb8351b86..00000000000 Binary files a/dev/_images/legend_auto_04.png and /dev/null differ diff --git a/dev/_images/legend_auto_05.png b/dev/_images/legend_auto_05.png deleted file mode 100644 index 120673b1b44..00000000000 Binary files a/dev/_images/legend_auto_05.png and /dev/null differ diff --git a/dev/_images/legend_auto_06.png b/dev/_images/legend_auto_06.png deleted file mode 100644 index 9a44daf92ab..00000000000 Binary files a/dev/_images/legend_auto_06.png and /dev/null differ diff --git a/dev/_images/legend_auto_07.png b/dev/_images/legend_auto_07.png deleted file mode 100644 index aafd247ca88..00000000000 Binary files a/dev/_images/legend_auto_07.png and /dev/null differ diff --git a/dev/_images/legend_auto_08.png b/dev/_images/legend_auto_08.png deleted file mode 100644 index 61b0d11fce4..00000000000 Binary files a/dev/_images/legend_auto_08.png and /dev/null differ diff --git a/dev/_images/legend_auto_09.png b/dev/_images/legend_auto_09.png deleted file mode 100644 index 89036808e98..00000000000 Binary files a/dev/_images/legend_auto_09.png and /dev/null differ diff --git a/dev/_images/legend_demo.png b/dev/_images/legend_demo.png deleted file mode 100644 index ca9540f4027..00000000000 Binary files a/dev/_images/legend_demo.png and /dev/null differ diff --git a/dev/_images/legend_demo1.png b/dev/_images/legend_demo1.png deleted file mode 100644 index ca9540f4027..00000000000 Binary files a/dev/_images/legend_demo1.png and /dev/null differ diff --git a/dev/_images/legend_demo2.png b/dev/_images/legend_demo2.png deleted file mode 100644 index ca9540f4027..00000000000 Binary files a/dev/_images/legend_demo2.png and /dev/null differ diff --git a/dev/_images/legend_demo21.png b/dev/_images/legend_demo21.png deleted file mode 100644 index cd74fe1a84a..00000000000 Binary files a/dev/_images/legend_demo21.png and /dev/null differ diff --git a/dev/_images/legend_demo3.png b/dev/_images/legend_demo3.png deleted file mode 100644 index e8fd3019395..00000000000 Binary files a/dev/_images/legend_demo3.png and /dev/null differ diff --git a/dev/_images/legend_demo4.png b/dev/_images/legend_demo4.png deleted file mode 100644 index 852845ca7b3..00000000000 Binary files a/dev/_images/legend_demo4.png and /dev/null differ diff --git a/dev/_images/legend_demo41.png b/dev/_images/legend_demo41.png deleted file mode 100644 index 852845ca7b3..00000000000 Binary files a/dev/_images/legend_demo41.png and /dev/null differ diff --git a/dev/_images/legend_demo5.png b/dev/_images/legend_demo5.png deleted file mode 100644 index ca9540f4027..00000000000 Binary files a/dev/_images/legend_demo5.png and /dev/null differ diff --git a/dev/_images/legend_demo_custom_handler.png b/dev/_images/legend_demo_custom_handler.png deleted file mode 100644 index c6e89c1d6e8..00000000000 Binary files a/dev/_images/legend_demo_custom_handler.png and /dev/null differ diff --git a/dev/_images/legend_guide-1.png b/dev/_images/legend_guide-1.png deleted file mode 100644 index 13a22d3d657..00000000000 Binary files a/dev/_images/legend_guide-1.png and /dev/null differ diff --git a/dev/_images/legend_scatter.png b/dev/_images/legend_scatter.png deleted file mode 100644 index 3220b041c41..00000000000 Binary files a/dev/_images/legend_scatter.png and /dev/null differ diff --git a/dev/_images/legend_translucent.png b/dev/_images/legend_translucent.png deleted file mode 100644 index 1118c5bf0f2..00000000000 Binary files a/dev/_images/legend_translucent.png and /dev/null differ diff --git a/dev/_images/line_collection.png b/dev/_images/line_collection.png deleted file mode 100644 index 415f82c22e7..00000000000 Binary files a/dev/_images/line_collection.png and /dev/null differ diff --git a/dev/_images/line_collection2.png b/dev/_images/line_collection2.png deleted file mode 100644 index 9f16e9709b3..00000000000 Binary files a/dev/_images/line_collection2.png and /dev/null differ diff --git a/dev/_images/line_demo_dash_control.png b/dev/_images/line_demo_dash_control.png deleted file mode 100644 index 85545a36512..00000000000 Binary files a/dev/_images/line_demo_dash_control.png and /dev/null differ diff --git a/dev/_images/line_styles.png b/dev/_images/line_styles.png deleted file mode 100644 index 68e21c9ee11..00000000000 Binary files a/dev/_images/line_styles.png and /dev/null differ diff --git a/dev/_images/line_with_text.png b/dev/_images/line_with_text.png deleted file mode 100644 index 1ae21323383..00000000000 Binary files a/dev/_images/line_with_text.png and /dev/null differ diff --git a/dev/_images/lines3d_demo.png b/dev/_images/lines3d_demo.png deleted file mode 100644 index 0c8398bfe71..00000000000 Binary files a/dev/_images/lines3d_demo.png and /dev/null differ diff --git a/dev/_images/lines3d_demo1.png b/dev/_images/lines3d_demo1.png deleted file mode 100644 index 0c8398bfe71..00000000000 Binary files a/dev/_images/lines3d_demo1.png and /dev/null differ diff --git a/dev/_images/load_converter.png b/dev/_images/load_converter.png deleted file mode 100644 index c97e91867be..00000000000 Binary files a/dev/_images/load_converter.png and /dev/null differ diff --git a/dev/_images/loadrec.png b/dev/_images/loadrec.png deleted file mode 100644 index 93e819edd2e..00000000000 Binary files a/dev/_images/loadrec.png and /dev/null differ diff --git a/dev/_images/log_bar.png b/dev/_images/log_bar.png deleted file mode 100644 index c88e863774b..00000000000 Binary files a/dev/_images/log_bar.png and /dev/null differ diff --git a/dev/_images/log_demo.png b/dev/_images/log_demo.png deleted file mode 100644 index e89ab3af938..00000000000 Binary files a/dev/_images/log_demo.png and /dev/null differ diff --git a/dev/_images/log_demo1.png b/dev/_images/log_demo1.png deleted file mode 100644 index e89ab3af938..00000000000 Binary files a/dev/_images/log_demo1.png and /dev/null differ diff --git a/dev/_images/log_demo2.png b/dev/_images/log_demo2.png deleted file mode 100644 index e89ab3af938..00000000000 Binary files a/dev/_images/log_demo2.png and /dev/null differ diff --git a/dev/_images/log_test.png b/dev/_images/log_test.png deleted file mode 100644 index 46522348d27..00000000000 Binary files a/dev/_images/log_test.png and /dev/null differ diff --git a/dev/_images/logo.png b/dev/_images/logo.png deleted file mode 100644 index 39b81db3e49..00000000000 Binary files a/dev/_images/logo.png and /dev/null differ diff --git a/dev/_images/logo2.png b/dev/_images/logo2.png deleted file mode 100644 index 411409a3faa..00000000000 Binary files a/dev/_images/logo2.png and /dev/null differ diff --git a/dev/_images/lorenz_attractor.png b/dev/_images/lorenz_attractor.png deleted file mode 100644 index edc3fe938a7..00000000000 Binary files a/dev/_images/lorenz_attractor.png and /dev/null differ diff --git a/dev/_images/major_minor_demo1.png b/dev/_images/major_minor_demo1.png deleted file mode 100644 index 8baf1f53e73..00000000000 Binary files a/dev/_images/major_minor_demo1.png and /dev/null differ diff --git a/dev/_images/major_minor_demo2.png b/dev/_images/major_minor_demo2.png deleted file mode 100644 index 064890cc83d..00000000000 Binary files a/dev/_images/major_minor_demo2.png and /dev/null differ diff --git a/dev/_images/make_room_for_ylabel_using_axesgrid_00.png b/dev/_images/make_room_for_ylabel_using_axesgrid_00.png deleted file mode 100644 index e88953c4bf0..00000000000 Binary files a/dev/_images/make_room_for_ylabel_using_axesgrid_00.png and /dev/null differ diff --git a/dev/_images/make_room_for_ylabel_using_axesgrid_01.png b/dev/_images/make_room_for_ylabel_using_axesgrid_01.png deleted file mode 100644 index 7fe8b745212..00000000000 Binary files a/dev/_images/make_room_for_ylabel_using_axesgrid_01.png and /dev/null differ diff --git a/dev/_images/make_room_for_ylabel_using_axesgrid_02.png b/dev/_images/make_room_for_ylabel_using_axesgrid_02.png deleted file mode 100644 index b7566f883f4..00000000000 Binary files a/dev/_images/make_room_for_ylabel_using_axesgrid_02.png and /dev/null differ diff --git a/dev/_images/manual_axis.png b/dev/_images/manual_axis.png deleted file mode 100644 index 57ededbd10d..00000000000 Binary files a/dev/_images/manual_axis.png and /dev/null differ diff --git a/dev/_images/marker_path.png b/dev/_images/marker_path.png deleted file mode 100644 index 77d5c96870e..00000000000 Binary files a/dev/_images/marker_path.png and /dev/null differ diff --git a/dev/_images/masked_demo.png b/dev/_images/masked_demo.png deleted file mode 100644 index c5229cc31b8..00000000000 Binary files a/dev/_images/masked_demo.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-0005c3a5e5.png b/dev/_images/mathmpl/math-0005c3a5e5.png deleted file mode 100644 index b26335cb256..00000000000 Binary files a/dev/_images/mathmpl/math-0005c3a5e5.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-011efae7a0.png b/dev/_images/mathmpl/math-011efae7a0.png deleted file mode 100644 index 29991162f47..00000000000 Binary files a/dev/_images/mathmpl/math-011efae7a0.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-014e74dc81.png b/dev/_images/mathmpl/math-014e74dc81.png deleted file mode 100644 index baa30655358..00000000000 Binary files a/dev/_images/mathmpl/math-014e74dc81.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-02ce986a2e.png b/dev/_images/mathmpl/math-02ce986a2e.png deleted file mode 100644 index e72c5495d93..00000000000 Binary files a/dev/_images/mathmpl/math-02ce986a2e.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-03cbb97a54.png b/dev/_images/mathmpl/math-03cbb97a54.png deleted file mode 100644 index 3b91e2f600c..00000000000 Binary files a/dev/_images/mathmpl/math-03cbb97a54.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-04c47dcb6e.png b/dev/_images/mathmpl/math-04c47dcb6e.png deleted file mode 100644 index 566770211df..00000000000 Binary files a/dev/_images/mathmpl/math-04c47dcb6e.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-0525bc07de.png b/dev/_images/mathmpl/math-0525bc07de.png deleted file mode 100644 index 7d485cb0ff2..00000000000 Binary files a/dev/_images/mathmpl/math-0525bc07de.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-057e1a984d.png b/dev/_images/mathmpl/math-057e1a984d.png deleted file mode 100644 index 770a8d30b8f..00000000000 Binary files a/dev/_images/mathmpl/math-057e1a984d.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-06c793e494.png b/dev/_images/mathmpl/math-06c793e494.png deleted file mode 100644 index 04beefc9f12..00000000000 Binary files a/dev/_images/mathmpl/math-06c793e494.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-0716fbd542.png b/dev/_images/mathmpl/math-0716fbd542.png deleted file mode 100644 index eeeebcd2604..00000000000 Binary files a/dev/_images/mathmpl/math-0716fbd542.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-076bf05243.png b/dev/_images/mathmpl/math-076bf05243.png deleted file mode 100644 index 0710b05f11d..00000000000 Binary files a/dev/_images/mathmpl/math-076bf05243.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-07933b21e0.png b/dev/_images/mathmpl/math-07933b21e0.png deleted file mode 100644 index f6edbc0cea0..00000000000 Binary files a/dev/_images/mathmpl/math-07933b21e0.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-07b17ba8f6.png b/dev/_images/mathmpl/math-07b17ba8f6.png deleted file mode 100644 index 03cdccbdbde..00000000000 Binary files a/dev/_images/mathmpl/math-07b17ba8f6.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-07c03ece9c.png b/dev/_images/mathmpl/math-07c03ece9c.png deleted file mode 100644 index e09192d6cc5..00000000000 Binary files a/dev/_images/mathmpl/math-07c03ece9c.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-0938c51d1a.png b/dev/_images/mathmpl/math-0938c51d1a.png deleted file mode 100644 index 1c638fc30af..00000000000 Binary files a/dev/_images/mathmpl/math-0938c51d1a.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-097464d1cd.png b/dev/_images/mathmpl/math-097464d1cd.png deleted file mode 100644 index cf39b3bf3a1..00000000000 Binary files a/dev/_images/mathmpl/math-097464d1cd.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-09e354a93e.png b/dev/_images/mathmpl/math-09e354a93e.png deleted file mode 100644 index b7151342acb..00000000000 Binary files a/dev/_images/mathmpl/math-09e354a93e.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-0a36be904f.png b/dev/_images/mathmpl/math-0a36be904f.png deleted file mode 100644 index 654dad31bc5..00000000000 Binary files a/dev/_images/mathmpl/math-0a36be904f.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-0bf42a25bb.png b/dev/_images/mathmpl/math-0bf42a25bb.png deleted file mode 100644 index 0e6fc874a26..00000000000 Binary files a/dev/_images/mathmpl/math-0bf42a25bb.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-0c0d015405.png b/dev/_images/mathmpl/math-0c0d015405.png deleted file mode 100644 index 3748d46f9f1..00000000000 Binary files a/dev/_images/mathmpl/math-0c0d015405.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-0c8ba18b43.png b/dev/_images/mathmpl/math-0c8ba18b43.png deleted file mode 100644 index adf85182918..00000000000 Binary files a/dev/_images/mathmpl/math-0c8ba18b43.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-0ca72c02e5.png b/dev/_images/mathmpl/math-0ca72c02e5.png deleted file mode 100644 index 2360abe335c..00000000000 Binary files a/dev/_images/mathmpl/math-0ca72c02e5.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-0cc3cb6c41.png b/dev/_images/mathmpl/math-0cc3cb6c41.png deleted file mode 100644 index d0791f32f0c..00000000000 Binary files a/dev/_images/mathmpl/math-0cc3cb6c41.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-0d1363d575.png b/dev/_images/mathmpl/math-0d1363d575.png deleted file mode 100644 index 81cdd6834de..00000000000 Binary files a/dev/_images/mathmpl/math-0d1363d575.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-0dc1c96f16.png b/dev/_images/mathmpl/math-0dc1c96f16.png deleted file mode 100644 index 75138b6812e..00000000000 Binary files a/dev/_images/mathmpl/math-0dc1c96f16.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-0e049fe80b.png b/dev/_images/mathmpl/math-0e049fe80b.png deleted file mode 100644 index 0b090cbac3a..00000000000 Binary files a/dev/_images/mathmpl/math-0e049fe80b.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-0ebac5d490.png b/dev/_images/mathmpl/math-0ebac5d490.png deleted file mode 100644 index c86de958fc4..00000000000 Binary files a/dev/_images/mathmpl/math-0ebac5d490.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-0f08e28a07.png b/dev/_images/mathmpl/math-0f08e28a07.png deleted file mode 100644 index 884b87e00f2..00000000000 Binary files a/dev/_images/mathmpl/math-0f08e28a07.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-0fa258552e.png b/dev/_images/mathmpl/math-0fa258552e.png deleted file mode 100644 index 1644b7acf1f..00000000000 Binary files a/dev/_images/mathmpl/math-0fa258552e.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-0fbbe481d0.png b/dev/_images/mathmpl/math-0fbbe481d0.png deleted file mode 100644 index 62cebc13c00..00000000000 Binary files a/dev/_images/mathmpl/math-0fbbe481d0.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-102fd18c41.png b/dev/_images/mathmpl/math-102fd18c41.png deleted file mode 100644 index cf91b5a61c5..00000000000 Binary files a/dev/_images/mathmpl/math-102fd18c41.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-10ab63f88f.png b/dev/_images/mathmpl/math-10ab63f88f.png deleted file mode 100644 index 8c79c326c82..00000000000 Binary files a/dev/_images/mathmpl/math-10ab63f88f.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-11c6bdf228.png b/dev/_images/mathmpl/math-11c6bdf228.png deleted file mode 100644 index 3c25a0603e3..00000000000 Binary files a/dev/_images/mathmpl/math-11c6bdf228.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-12713adf78.png b/dev/_images/mathmpl/math-12713adf78.png deleted file mode 100644 index 71b0acca602..00000000000 Binary files a/dev/_images/mathmpl/math-12713adf78.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-1278a024c8.png b/dev/_images/mathmpl/math-1278a024c8.png deleted file mode 100644 index 5841b847c0c..00000000000 Binary files a/dev/_images/mathmpl/math-1278a024c8.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-12e9272240.png b/dev/_images/mathmpl/math-12e9272240.png deleted file mode 100644 index 566770211df..00000000000 Binary files a/dev/_images/mathmpl/math-12e9272240.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-145ca7a5e7.png b/dev/_images/mathmpl/math-145ca7a5e7.png deleted file mode 100644 index 088e6660d37..00000000000 Binary files a/dev/_images/mathmpl/math-145ca7a5e7.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-14a5baf1f1.png b/dev/_images/mathmpl/math-14a5baf1f1.png deleted file mode 100644 index 743622a1ebf..00000000000 Binary files a/dev/_images/mathmpl/math-14a5baf1f1.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-1610e87ea8.png b/dev/_images/mathmpl/math-1610e87ea8.png deleted file mode 100644 index 1fe4e981b71..00000000000 Binary files a/dev/_images/mathmpl/math-1610e87ea8.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-1632a38331.png b/dev/_images/mathmpl/math-1632a38331.png deleted file mode 100644 index e6104599f24..00000000000 Binary files a/dev/_images/mathmpl/math-1632a38331.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-16b15cdedd.png b/dev/_images/mathmpl/math-16b15cdedd.png deleted file mode 100644 index 2d3e7178e5b..00000000000 Binary files a/dev/_images/mathmpl/math-16b15cdedd.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-16da2c10a1.png b/dev/_images/mathmpl/math-16da2c10a1.png deleted file mode 100644 index 1c985b229b9..00000000000 Binary files a/dev/_images/mathmpl/math-16da2c10a1.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-17826fcd24.png b/dev/_images/mathmpl/math-17826fcd24.png deleted file mode 100644 index 2e966cea90a..00000000000 Binary files a/dev/_images/mathmpl/math-17826fcd24.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-1859062b14.png b/dev/_images/mathmpl/math-1859062b14.png deleted file mode 100644 index d7af0c57693..00000000000 Binary files a/dev/_images/mathmpl/math-1859062b14.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-18a0084a2d.png b/dev/_images/mathmpl/math-18a0084a2d.png deleted file mode 100644 index df4163a2026..00000000000 Binary files a/dev/_images/mathmpl/math-18a0084a2d.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-19097cff83.png b/dev/_images/mathmpl/math-19097cff83.png deleted file mode 100644 index 7ae14dbe659..00000000000 Binary files a/dev/_images/mathmpl/math-19097cff83.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-191c6ba7fa.png b/dev/_images/mathmpl/math-191c6ba7fa.png deleted file mode 100644 index 7dc9d2bd78d..00000000000 Binary files a/dev/_images/mathmpl/math-191c6ba7fa.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-1922d1ceaa.png b/dev/_images/mathmpl/math-1922d1ceaa.png deleted file mode 100644 index 233c049aea8..00000000000 Binary files a/dev/_images/mathmpl/math-1922d1ceaa.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-19f957fc71.png b/dev/_images/mathmpl/math-19f957fc71.png deleted file mode 100644 index 4f09519c22e..00000000000 Binary files a/dev/_images/mathmpl/math-19f957fc71.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-1a503a50f2.png b/dev/_images/mathmpl/math-1a503a50f2.png deleted file mode 100644 index 431ce6f2bdc..00000000000 Binary files a/dev/_images/mathmpl/math-1a503a50f2.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-1a6ec6d88f.png b/dev/_images/mathmpl/math-1a6ec6d88f.png deleted file mode 100644 index 14fc1c874bd..00000000000 Binary files a/dev/_images/mathmpl/math-1a6ec6d88f.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-1afd9d2af0.png b/dev/_images/mathmpl/math-1afd9d2af0.png deleted file mode 100644 index 54b75e5c5f5..00000000000 Binary files a/dev/_images/mathmpl/math-1afd9d2af0.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-1bb3130224.png b/dev/_images/mathmpl/math-1bb3130224.png deleted file mode 100644 index 630984536bf..00000000000 Binary files a/dev/_images/mathmpl/math-1bb3130224.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-1c2ed5670a.png b/dev/_images/mathmpl/math-1c2ed5670a.png deleted file mode 100644 index 376d3f6d03b..00000000000 Binary files a/dev/_images/mathmpl/math-1c2ed5670a.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-1d11ce50b2.png b/dev/_images/mathmpl/math-1d11ce50b2.png deleted file mode 100644 index b2521e4a07b..00000000000 Binary files a/dev/_images/mathmpl/math-1d11ce50b2.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-1de8afe642.png b/dev/_images/mathmpl/math-1de8afe642.png deleted file mode 100644 index 4c682e15ed3..00000000000 Binary files a/dev/_images/mathmpl/math-1de8afe642.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-1f62587cf2.png b/dev/_images/mathmpl/math-1f62587cf2.png deleted file mode 100644 index 2898454a21c..00000000000 Binary files a/dev/_images/mathmpl/math-1f62587cf2.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-1f9db75fdb.png b/dev/_images/mathmpl/math-1f9db75fdb.png deleted file mode 100644 index 06c8d5ebeda..00000000000 Binary files a/dev/_images/mathmpl/math-1f9db75fdb.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-1fca7a951f.png b/dev/_images/mathmpl/math-1fca7a951f.png deleted file mode 100644 index 8e6fec421f1..00000000000 Binary files a/dev/_images/mathmpl/math-1fca7a951f.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-201b65e42c.png b/dev/_images/mathmpl/math-201b65e42c.png deleted file mode 100644 index 6447fcd5540..00000000000 Binary files a/dev/_images/mathmpl/math-201b65e42c.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-207852189a.png b/dev/_images/mathmpl/math-207852189a.png deleted file mode 100644 index 00a8f64a4c9..00000000000 Binary files a/dev/_images/mathmpl/math-207852189a.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-20b287ac85.png b/dev/_images/mathmpl/math-20b287ac85.png deleted file mode 100644 index 4868d7f4819..00000000000 Binary files a/dev/_images/mathmpl/math-20b287ac85.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-219444d8f5.png b/dev/_images/mathmpl/math-219444d8f5.png deleted file mode 100644 index ec76f110431..00000000000 Binary files a/dev/_images/mathmpl/math-219444d8f5.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-21b6ff3aa7.png b/dev/_images/mathmpl/math-21b6ff3aa7.png deleted file mode 100644 index ca45f97cb5e..00000000000 Binary files a/dev/_images/mathmpl/math-21b6ff3aa7.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-21d4b9ec5e.png b/dev/_images/mathmpl/math-21d4b9ec5e.png deleted file mode 100644 index ad8e5831646..00000000000 Binary files a/dev/_images/mathmpl/math-21d4b9ec5e.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-21e977e4ec.png b/dev/_images/mathmpl/math-21e977e4ec.png deleted file mode 100644 index 5e0ecee5d96..00000000000 Binary files a/dev/_images/mathmpl/math-21e977e4ec.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-229058201e.png b/dev/_images/mathmpl/math-229058201e.png deleted file mode 100644 index fcda1c12162..00000000000 Binary files a/dev/_images/mathmpl/math-229058201e.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-22a812f02e.png b/dev/_images/mathmpl/math-22a812f02e.png deleted file mode 100644 index 6e06bb636b5..00000000000 Binary files a/dev/_images/mathmpl/math-22a812f02e.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-2303518311.png b/dev/_images/mathmpl/math-2303518311.png deleted file mode 100644 index 8c80ef64e88..00000000000 Binary files a/dev/_images/mathmpl/math-2303518311.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-2303577dee.png b/dev/_images/mathmpl/math-2303577dee.png deleted file mode 100644 index 0c0c1936612..00000000000 Binary files a/dev/_images/mathmpl/math-2303577dee.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-23c4970a1a.png b/dev/_images/mathmpl/math-23c4970a1a.png deleted file mode 100644 index 069edda1c71..00000000000 Binary files a/dev/_images/mathmpl/math-23c4970a1a.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-2480720752.png b/dev/_images/mathmpl/math-2480720752.png deleted file mode 100644 index 3b98e8a2677..00000000000 Binary files a/dev/_images/mathmpl/math-2480720752.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-2525d5d71d.png b/dev/_images/mathmpl/math-2525d5d71d.png deleted file mode 100644 index bd587c8a1a6..00000000000 Binary files a/dev/_images/mathmpl/math-2525d5d71d.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-2617106b1e.png b/dev/_images/mathmpl/math-2617106b1e.png deleted file mode 100644 index 581c38b7c53..00000000000 Binary files a/dev/_images/mathmpl/math-2617106b1e.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-268c486057.png b/dev/_images/mathmpl/math-268c486057.png deleted file mode 100644 index ef734b7d3ce..00000000000 Binary files a/dev/_images/mathmpl/math-268c486057.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-26f9e5316b.png b/dev/_images/mathmpl/math-26f9e5316b.png deleted file mode 100644 index b50cd0b8ea9..00000000000 Binary files a/dev/_images/mathmpl/math-26f9e5316b.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-26fab8f44f.png b/dev/_images/mathmpl/math-26fab8f44f.png deleted file mode 100644 index 9e26fc83616..00000000000 Binary files a/dev/_images/mathmpl/math-26fab8f44f.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-28d3e90e31.png b/dev/_images/mathmpl/math-28d3e90e31.png deleted file mode 100644 index 430910a9788..00000000000 Binary files a/dev/_images/mathmpl/math-28d3e90e31.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-293c147d21.png b/dev/_images/mathmpl/math-293c147d21.png deleted file mode 100644 index df014f9d779..00000000000 Binary files a/dev/_images/mathmpl/math-293c147d21.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-29a7c6603c.png b/dev/_images/mathmpl/math-29a7c6603c.png deleted file mode 100644 index a164c83c29c..00000000000 Binary files a/dev/_images/mathmpl/math-29a7c6603c.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-2a327a85e8.png b/dev/_images/mathmpl/math-2a327a85e8.png deleted file mode 100644 index 7683d2165ce..00000000000 Binary files a/dev/_images/mathmpl/math-2a327a85e8.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-2a54002803.png b/dev/_images/mathmpl/math-2a54002803.png deleted file mode 100644 index d6ba197cda8..00000000000 Binary files a/dev/_images/mathmpl/math-2a54002803.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-2aff52a07e.png b/dev/_images/mathmpl/math-2aff52a07e.png deleted file mode 100644 index 9c08cbf54bf..00000000000 Binary files a/dev/_images/mathmpl/math-2aff52a07e.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-2b42f15859.png b/dev/_images/mathmpl/math-2b42f15859.png deleted file mode 100644 index b2863d32ffe..00000000000 Binary files a/dev/_images/mathmpl/math-2b42f15859.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-2c7a9dac6d.png b/dev/_images/mathmpl/math-2c7a9dac6d.png deleted file mode 100644 index ae8f3e25eee..00000000000 Binary files a/dev/_images/mathmpl/math-2c7a9dac6d.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-2cdbf2db88.png b/dev/_images/mathmpl/math-2cdbf2db88.png deleted file mode 100644 index 43f617a3f8c..00000000000 Binary files a/dev/_images/mathmpl/math-2cdbf2db88.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-2e03b9e387.png b/dev/_images/mathmpl/math-2e03b9e387.png deleted file mode 100644 index 61bc04ff4de..00000000000 Binary files a/dev/_images/mathmpl/math-2e03b9e387.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-2e885fe67f.png b/dev/_images/mathmpl/math-2e885fe67f.png deleted file mode 100644 index 9434edec1c0..00000000000 Binary files a/dev/_images/mathmpl/math-2e885fe67f.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-2eaa265b46.png b/dev/_images/mathmpl/math-2eaa265b46.png deleted file mode 100644 index 9cdc3625687..00000000000 Binary files a/dev/_images/mathmpl/math-2eaa265b46.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-2f010c89dd.png b/dev/_images/mathmpl/math-2f010c89dd.png deleted file mode 100644 index f8cc6409181..00000000000 Binary files a/dev/_images/mathmpl/math-2f010c89dd.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-2fc0f7c957.png b/dev/_images/mathmpl/math-2fc0f7c957.png deleted file mode 100644 index c0646de0f96..00000000000 Binary files a/dev/_images/mathmpl/math-2fc0f7c957.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-2fcd70072d.png b/dev/_images/mathmpl/math-2fcd70072d.png deleted file mode 100644 index 2ac5417e47a..00000000000 Binary files a/dev/_images/mathmpl/math-2fcd70072d.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-2ff97d8581.png b/dev/_images/mathmpl/math-2ff97d8581.png deleted file mode 100644 index c352d9cbb01..00000000000 Binary files a/dev/_images/mathmpl/math-2ff97d8581.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-301349a96f.png b/dev/_images/mathmpl/math-301349a96f.png deleted file mode 100644 index 7080c65e001..00000000000 Binary files a/dev/_images/mathmpl/math-301349a96f.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-3025afbc71.png b/dev/_images/mathmpl/math-3025afbc71.png deleted file mode 100644 index 89d8a1a19ad..00000000000 Binary files a/dev/_images/mathmpl/math-3025afbc71.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-305e05a6ab.png b/dev/_images/mathmpl/math-305e05a6ab.png deleted file mode 100644 index f2ae9ac59a5..00000000000 Binary files a/dev/_images/mathmpl/math-305e05a6ab.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-306ea70acd.png b/dev/_images/mathmpl/math-306ea70acd.png deleted file mode 100644 index 9cce794ff96..00000000000 Binary files a/dev/_images/mathmpl/math-306ea70acd.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-311d2647c5.png b/dev/_images/mathmpl/math-311d2647c5.png deleted file mode 100644 index f38a2819978..00000000000 Binary files a/dev/_images/mathmpl/math-311d2647c5.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-317920b703.png b/dev/_images/mathmpl/math-317920b703.png deleted file mode 100644 index 2c816cc23f0..00000000000 Binary files a/dev/_images/mathmpl/math-317920b703.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-3207fff524.png b/dev/_images/mathmpl/math-3207fff524.png deleted file mode 100644 index 0c96cb9024f..00000000000 Binary files a/dev/_images/mathmpl/math-3207fff524.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-3223454152.png b/dev/_images/mathmpl/math-3223454152.png deleted file mode 100644 index acb0b96dd30..00000000000 Binary files a/dev/_images/mathmpl/math-3223454152.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-3234da3142.png b/dev/_images/mathmpl/math-3234da3142.png deleted file mode 100644 index 375fabe4274..00000000000 Binary files a/dev/_images/mathmpl/math-3234da3142.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-32710445c4.png b/dev/_images/mathmpl/math-32710445c4.png deleted file mode 100644 index aae64db8cb2..00000000000 Binary files a/dev/_images/mathmpl/math-32710445c4.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-329584d288.png b/dev/_images/mathmpl/math-329584d288.png deleted file mode 100644 index ae070f7c2ba..00000000000 Binary files a/dev/_images/mathmpl/math-329584d288.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-343170b287.png b/dev/_images/mathmpl/math-343170b287.png deleted file mode 100644 index a5daaba5cfd..00000000000 Binary files a/dev/_images/mathmpl/math-343170b287.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-3488de1d0a.png b/dev/_images/mathmpl/math-3488de1d0a.png deleted file mode 100644 index 7d820dd2062..00000000000 Binary files a/dev/_images/mathmpl/math-3488de1d0a.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-358f2a2131.png b/dev/_images/mathmpl/math-358f2a2131.png deleted file mode 100644 index 0d9efed784f..00000000000 Binary files a/dev/_images/mathmpl/math-358f2a2131.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-3642ca147d.png b/dev/_images/mathmpl/math-3642ca147d.png deleted file mode 100644 index b6489089d81..00000000000 Binary files a/dev/_images/mathmpl/math-3642ca147d.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-37454f1e25.png b/dev/_images/mathmpl/math-37454f1e25.png deleted file mode 100644 index 28f348bee9d..00000000000 Binary files a/dev/_images/mathmpl/math-37454f1e25.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-376450e92a.png b/dev/_images/mathmpl/math-376450e92a.png deleted file mode 100644 index f8c75c2d72f..00000000000 Binary files a/dev/_images/mathmpl/math-376450e92a.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-38501d21c9.png b/dev/_images/mathmpl/math-38501d21c9.png deleted file mode 100644 index 435fa6ac59a..00000000000 Binary files a/dev/_images/mathmpl/math-38501d21c9.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-387c1a8741.png b/dev/_images/mathmpl/math-387c1a8741.png deleted file mode 100644 index 645fdfe7073..00000000000 Binary files a/dev/_images/mathmpl/math-387c1a8741.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-38bf4cf10d.png b/dev/_images/mathmpl/math-38bf4cf10d.png deleted file mode 100644 index 456c6638b5c..00000000000 Binary files a/dev/_images/mathmpl/math-38bf4cf10d.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-390d3dc75c.png b/dev/_images/mathmpl/math-390d3dc75c.png deleted file mode 100644 index d4073e94104..00000000000 Binary files a/dev/_images/mathmpl/math-390d3dc75c.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-397b5fc155.png b/dev/_images/mathmpl/math-397b5fc155.png deleted file mode 100644 index 4c2c78b1ad2..00000000000 Binary files a/dev/_images/mathmpl/math-397b5fc155.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-3a8b2e99d6.png b/dev/_images/mathmpl/math-3a8b2e99d6.png deleted file mode 100644 index 14b7c65ffd8..00000000000 Binary files a/dev/_images/mathmpl/math-3a8b2e99d6.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-3b5db3b36b.png b/dev/_images/mathmpl/math-3b5db3b36b.png deleted file mode 100644 index 9a4b54d03f8..00000000000 Binary files a/dev/_images/mathmpl/math-3b5db3b36b.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-3b72c12de0.png b/dev/_images/mathmpl/math-3b72c12de0.png deleted file mode 100644 index 364defea865..00000000000 Binary files a/dev/_images/mathmpl/math-3b72c12de0.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-3b938a5601.png b/dev/_images/mathmpl/math-3b938a5601.png deleted file mode 100644 index 52b5c9a9a37..00000000000 Binary files a/dev/_images/mathmpl/math-3b938a5601.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-3ba37e0517.png b/dev/_images/mathmpl/math-3ba37e0517.png deleted file mode 100644 index b8be79f85b4..00000000000 Binary files a/dev/_images/mathmpl/math-3ba37e0517.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-3bfe8e8950.png b/dev/_images/mathmpl/math-3bfe8e8950.png deleted file mode 100644 index 6b20f054184..00000000000 Binary files a/dev/_images/mathmpl/math-3bfe8e8950.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-3c072a15c0.png b/dev/_images/mathmpl/math-3c072a15c0.png deleted file mode 100644 index 8222445a5c6..00000000000 Binary files a/dev/_images/mathmpl/math-3c072a15c0.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-3ce6141dea.png b/dev/_images/mathmpl/math-3ce6141dea.png deleted file mode 100644 index ea702dfac00..00000000000 Binary files a/dev/_images/mathmpl/math-3ce6141dea.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-3d7ac4bb5c.png b/dev/_images/mathmpl/math-3d7ac4bb5c.png deleted file mode 100644 index 68c466e0dcb..00000000000 Binary files a/dev/_images/mathmpl/math-3d7ac4bb5c.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-3d85215bfa.png b/dev/_images/mathmpl/math-3d85215bfa.png deleted file mode 100644 index 769ce78b8cb..00000000000 Binary files a/dev/_images/mathmpl/math-3d85215bfa.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-3db5c70042.png b/dev/_images/mathmpl/math-3db5c70042.png deleted file mode 100644 index e3922b054b7..00000000000 Binary files a/dev/_images/mathmpl/math-3db5c70042.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-3df678db55.png b/dev/_images/mathmpl/math-3df678db55.png deleted file mode 100644 index 9004660e0ee..00000000000 Binary files a/dev/_images/mathmpl/math-3df678db55.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-3e25be9041.png b/dev/_images/mathmpl/math-3e25be9041.png deleted file mode 100644 index 5dd94563b3c..00000000000 Binary files a/dev/_images/mathmpl/math-3e25be9041.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-3ea081f1d9.png b/dev/_images/mathmpl/math-3ea081f1d9.png deleted file mode 100644 index 83ac1dad227..00000000000 Binary files a/dev/_images/mathmpl/math-3ea081f1d9.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-3fc9142b1d.png b/dev/_images/mathmpl/math-3fc9142b1d.png deleted file mode 100644 index 6eff3c82fc7..00000000000 Binary files a/dev/_images/mathmpl/math-3fc9142b1d.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-41188a0c1b.png b/dev/_images/mathmpl/math-41188a0c1b.png deleted file mode 100644 index 1b8ee4ec3bc..00000000000 Binary files a/dev/_images/mathmpl/math-41188a0c1b.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-41f636a823.png b/dev/_images/mathmpl/math-41f636a823.png deleted file mode 100644 index b95591f8b60..00000000000 Binary files a/dev/_images/mathmpl/math-41f636a823.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-4225d47da8.png b/dev/_images/mathmpl/math-4225d47da8.png deleted file mode 100644 index 09c1c39ee93..00000000000 Binary files a/dev/_images/mathmpl/math-4225d47da8.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-433174617c.png b/dev/_images/mathmpl/math-433174617c.png deleted file mode 100644 index ebf63e6cb10..00000000000 Binary files a/dev/_images/mathmpl/math-433174617c.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-43575c473c.png b/dev/_images/mathmpl/math-43575c473c.png deleted file mode 100644 index a52fdb656c6..00000000000 Binary files a/dev/_images/mathmpl/math-43575c473c.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-436efe52d1.png b/dev/_images/mathmpl/math-436efe52d1.png deleted file mode 100644 index 21351953080..00000000000 Binary files a/dev/_images/mathmpl/math-436efe52d1.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-43a44ec8e4.png b/dev/_images/mathmpl/math-43a44ec8e4.png deleted file mode 100644 index bc7bcfd8023..00000000000 Binary files a/dev/_images/mathmpl/math-43a44ec8e4.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-441aa359eb.png b/dev/_images/mathmpl/math-441aa359eb.png deleted file mode 100644 index 2e65b07d0b6..00000000000 Binary files a/dev/_images/mathmpl/math-441aa359eb.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-449680794f.png b/dev/_images/mathmpl/math-449680794f.png deleted file mode 100644 index c6d28091437..00000000000 Binary files a/dev/_images/mathmpl/math-449680794f.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-44f45b7160.png b/dev/_images/mathmpl/math-44f45b7160.png deleted file mode 100644 index 52311dcd2e9..00000000000 Binary files a/dev/_images/mathmpl/math-44f45b7160.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-459d7c5693.png b/dev/_images/mathmpl/math-459d7c5693.png deleted file mode 100644 index 47d5ac165be..00000000000 Binary files a/dev/_images/mathmpl/math-459d7c5693.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-45eaae26d2.png b/dev/_images/mathmpl/math-45eaae26d2.png deleted file mode 100644 index d7524fccee7..00000000000 Binary files a/dev/_images/mathmpl/math-45eaae26d2.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-46c392f788.png b/dev/_images/mathmpl/math-46c392f788.png deleted file mode 100644 index 0582966896b..00000000000 Binary files a/dev/_images/mathmpl/math-46c392f788.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-46d99aa165.png b/dev/_images/mathmpl/math-46d99aa165.png deleted file mode 100644 index 89243ef900c..00000000000 Binary files a/dev/_images/mathmpl/math-46d99aa165.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-482297a060.png b/dev/_images/mathmpl/math-482297a060.png deleted file mode 100644 index 3f5f16534dd..00000000000 Binary files a/dev/_images/mathmpl/math-482297a060.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-497b831b05.png b/dev/_images/mathmpl/math-497b831b05.png deleted file mode 100644 index 414756e3c4c..00000000000 Binary files a/dev/_images/mathmpl/math-497b831b05.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-4a68c72624.png b/dev/_images/mathmpl/math-4a68c72624.png deleted file mode 100644 index ddc3ce325d9..00000000000 Binary files a/dev/_images/mathmpl/math-4a68c72624.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-4b07b72122.png b/dev/_images/mathmpl/math-4b07b72122.png deleted file mode 100644 index 7f2a0432c94..00000000000 Binary files a/dev/_images/mathmpl/math-4b07b72122.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-4c229f580d.png b/dev/_images/mathmpl/math-4c229f580d.png deleted file mode 100644 index 305603cdac8..00000000000 Binary files a/dev/_images/mathmpl/math-4c229f580d.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-4c5d76f523.png b/dev/_images/mathmpl/math-4c5d76f523.png deleted file mode 100644 index 2b2c5e7af21..00000000000 Binary files a/dev/_images/mathmpl/math-4c5d76f523.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-4cd21f8ba6.png b/dev/_images/mathmpl/math-4cd21f8ba6.png deleted file mode 100644 index e99f8671beb..00000000000 Binary files a/dev/_images/mathmpl/math-4cd21f8ba6.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-4cd9a23707.png b/dev/_images/mathmpl/math-4cd9a23707.png deleted file mode 100644 index d72a15c9399..00000000000 Binary files a/dev/_images/mathmpl/math-4cd9a23707.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-4ceaca4089.png b/dev/_images/mathmpl/math-4ceaca4089.png deleted file mode 100644 index 5b9e33b6344..00000000000 Binary files a/dev/_images/mathmpl/math-4ceaca4089.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-4d24dff6f8.png b/dev/_images/mathmpl/math-4d24dff6f8.png deleted file mode 100644 index aee14929fdb..00000000000 Binary files a/dev/_images/mathmpl/math-4d24dff6f8.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-4d5d5f4ffb.png b/dev/_images/mathmpl/math-4d5d5f4ffb.png deleted file mode 100644 index e4daaeabae9..00000000000 Binary files a/dev/_images/mathmpl/math-4d5d5f4ffb.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-4d96f7ca18.png b/dev/_images/mathmpl/math-4d96f7ca18.png deleted file mode 100644 index ef7c5f18c97..00000000000 Binary files a/dev/_images/mathmpl/math-4d96f7ca18.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-4ea8b1e13e.png b/dev/_images/mathmpl/math-4ea8b1e13e.png deleted file mode 100644 index 0db008382bc..00000000000 Binary files a/dev/_images/mathmpl/math-4ea8b1e13e.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-4eacc6ba71.png b/dev/_images/mathmpl/math-4eacc6ba71.png deleted file mode 100644 index a5eec370509..00000000000 Binary files a/dev/_images/mathmpl/math-4eacc6ba71.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-4f55ade322.png b/dev/_images/mathmpl/math-4f55ade322.png deleted file mode 100644 index aa449e0d662..00000000000 Binary files a/dev/_images/mathmpl/math-4f55ade322.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-4f8107394b.png b/dev/_images/mathmpl/math-4f8107394b.png deleted file mode 100644 index ff1417529b8..00000000000 Binary files a/dev/_images/mathmpl/math-4f8107394b.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-510e2aecba.png b/dev/_images/mathmpl/math-510e2aecba.png deleted file mode 100644 index 4a41835e21f..00000000000 Binary files a/dev/_images/mathmpl/math-510e2aecba.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-5149852f08.png b/dev/_images/mathmpl/math-5149852f08.png deleted file mode 100644 index ede9be26283..00000000000 Binary files a/dev/_images/mathmpl/math-5149852f08.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-518af824c6.png b/dev/_images/mathmpl/math-518af824c6.png deleted file mode 100644 index db688ca4ee6..00000000000 Binary files a/dev/_images/mathmpl/math-518af824c6.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-51ae43b24b.png b/dev/_images/mathmpl/math-51ae43b24b.png deleted file mode 100644 index bc16280d56e..00000000000 Binary files a/dev/_images/mathmpl/math-51ae43b24b.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-51cd44e108.png b/dev/_images/mathmpl/math-51cd44e108.png deleted file mode 100644 index caba04d846f..00000000000 Binary files a/dev/_images/mathmpl/math-51cd44e108.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-52ddd6655e.png b/dev/_images/mathmpl/math-52ddd6655e.png deleted file mode 100644 index 27df42b9dc3..00000000000 Binary files a/dev/_images/mathmpl/math-52ddd6655e.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-52eae78384.png b/dev/_images/mathmpl/math-52eae78384.png deleted file mode 100644 index 7f6aa401a3e..00000000000 Binary files a/dev/_images/mathmpl/math-52eae78384.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-52ee117ecd.png b/dev/_images/mathmpl/math-52ee117ecd.png deleted file mode 100644 index d61d68976e9..00000000000 Binary files a/dev/_images/mathmpl/math-52ee117ecd.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-5325d825f0.png b/dev/_images/mathmpl/math-5325d825f0.png deleted file mode 100644 index 98ac6e2e8f7..00000000000 Binary files a/dev/_images/mathmpl/math-5325d825f0.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-53e4edd44d.png b/dev/_images/mathmpl/math-53e4edd44d.png deleted file mode 100644 index a4186e07f55..00000000000 Binary files a/dev/_images/mathmpl/math-53e4edd44d.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-54cbc28bce.png b/dev/_images/mathmpl/math-54cbc28bce.png deleted file mode 100644 index 818c2a759fe..00000000000 Binary files a/dev/_images/mathmpl/math-54cbc28bce.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-554199c05b.png b/dev/_images/mathmpl/math-554199c05b.png deleted file mode 100644 index 6deaee48205..00000000000 Binary files a/dev/_images/mathmpl/math-554199c05b.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-5686c5a93f.png b/dev/_images/mathmpl/math-5686c5a93f.png deleted file mode 100644 index 3c4ef4a8ce2..00000000000 Binary files a/dev/_images/mathmpl/math-5686c5a93f.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-56b7078922.png b/dev/_images/mathmpl/math-56b7078922.png deleted file mode 100644 index 5c7d9ca04a6..00000000000 Binary files a/dev/_images/mathmpl/math-56b7078922.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-56f328ad77.png b/dev/_images/mathmpl/math-56f328ad77.png deleted file mode 100644 index 82923b40cc7..00000000000 Binary files a/dev/_images/mathmpl/math-56f328ad77.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-580fac9571.png b/dev/_images/mathmpl/math-580fac9571.png deleted file mode 100644 index c8d80b3b98c..00000000000 Binary files a/dev/_images/mathmpl/math-580fac9571.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-58162c32f0.png b/dev/_images/mathmpl/math-58162c32f0.png deleted file mode 100644 index 6520bf8b740..00000000000 Binary files a/dev/_images/mathmpl/math-58162c32f0.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-58775d54bf.png b/dev/_images/mathmpl/math-58775d54bf.png deleted file mode 100644 index 8a2e8b0e70b..00000000000 Binary files a/dev/_images/mathmpl/math-58775d54bf.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-58e3fcf6fd.png b/dev/_images/mathmpl/math-58e3fcf6fd.png deleted file mode 100644 index 628d0b90c9a..00000000000 Binary files a/dev/_images/mathmpl/math-58e3fcf6fd.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-58f182e47e.png b/dev/_images/mathmpl/math-58f182e47e.png deleted file mode 100644 index 1c189bd9dbc..00000000000 Binary files a/dev/_images/mathmpl/math-58f182e47e.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-59ed813421.png b/dev/_images/mathmpl/math-59ed813421.png deleted file mode 100644 index b0cc70bec93..00000000000 Binary files a/dev/_images/mathmpl/math-59ed813421.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-5a90bc5099.png b/dev/_images/mathmpl/math-5a90bc5099.png deleted file mode 100644 index cd61e2f17ae..00000000000 Binary files a/dev/_images/mathmpl/math-5a90bc5099.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-5af1fa6042.png b/dev/_images/mathmpl/math-5af1fa6042.png deleted file mode 100644 index 06d2f00b174..00000000000 Binary files a/dev/_images/mathmpl/math-5af1fa6042.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-5af298e692.png b/dev/_images/mathmpl/math-5af298e692.png deleted file mode 100644 index 368d13d0387..00000000000 Binary files a/dev/_images/mathmpl/math-5af298e692.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-5b4e20db62.png b/dev/_images/mathmpl/math-5b4e20db62.png deleted file mode 100644 index 9d19edb6a3a..00000000000 Binary files a/dev/_images/mathmpl/math-5b4e20db62.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-5c77f15b40.png b/dev/_images/mathmpl/math-5c77f15b40.png deleted file mode 100644 index f35f7210399..00000000000 Binary files a/dev/_images/mathmpl/math-5c77f15b40.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-5dc8912759.png b/dev/_images/mathmpl/math-5dc8912759.png deleted file mode 100644 index b04dcc15aa2..00000000000 Binary files a/dev/_images/mathmpl/math-5dc8912759.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-5e42a40994.png b/dev/_images/mathmpl/math-5e42a40994.png deleted file mode 100644 index 2f5ff7ed485..00000000000 Binary files a/dev/_images/mathmpl/math-5e42a40994.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-5e94f6d1ef.png b/dev/_images/mathmpl/math-5e94f6d1ef.png deleted file mode 100644 index f9fb1c8535d..00000000000 Binary files a/dev/_images/mathmpl/math-5e94f6d1ef.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-5fea7c5657.png b/dev/_images/mathmpl/math-5fea7c5657.png deleted file mode 100644 index 9b720945d06..00000000000 Binary files a/dev/_images/mathmpl/math-5fea7c5657.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-608c4a02ea.png b/dev/_images/mathmpl/math-608c4a02ea.png deleted file mode 100644 index f7983c04057..00000000000 Binary files a/dev/_images/mathmpl/math-608c4a02ea.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-61187783ee.png b/dev/_images/mathmpl/math-61187783ee.png deleted file mode 100644 index ae3b1ef7a43..00000000000 Binary files a/dev/_images/mathmpl/math-61187783ee.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-615de138a6.png b/dev/_images/mathmpl/math-615de138a6.png deleted file mode 100644 index 3c88f9c1ded..00000000000 Binary files a/dev/_images/mathmpl/math-615de138a6.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-61a5f3fde0.png b/dev/_images/mathmpl/math-61a5f3fde0.png deleted file mode 100644 index 028051681ed..00000000000 Binary files a/dev/_images/mathmpl/math-61a5f3fde0.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-62d5e1ef75.png b/dev/_images/mathmpl/math-62d5e1ef75.png deleted file mode 100644 index 425fb80f3ed..00000000000 Binary files a/dev/_images/mathmpl/math-62d5e1ef75.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-62e1ea5660.png b/dev/_images/mathmpl/math-62e1ea5660.png deleted file mode 100644 index 49560f35ae5..00000000000 Binary files a/dev/_images/mathmpl/math-62e1ea5660.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-640fa94ebe.png b/dev/_images/mathmpl/math-640fa94ebe.png deleted file mode 100644 index b1354772d1f..00000000000 Binary files a/dev/_images/mathmpl/math-640fa94ebe.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-6462f633f1.png b/dev/_images/mathmpl/math-6462f633f1.png deleted file mode 100644 index 5447ac875a4..00000000000 Binary files a/dev/_images/mathmpl/math-6462f633f1.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-64aa42214e.png b/dev/_images/mathmpl/math-64aa42214e.png deleted file mode 100644 index 24decaeca72..00000000000 Binary files a/dev/_images/mathmpl/math-64aa42214e.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-6700e99fd3.png b/dev/_images/mathmpl/math-6700e99fd3.png deleted file mode 100644 index 0f5e22189a5..00000000000 Binary files a/dev/_images/mathmpl/math-6700e99fd3.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-6722d13e60.png b/dev/_images/mathmpl/math-6722d13e60.png deleted file mode 100644 index 33fc0063bd9..00000000000 Binary files a/dev/_images/mathmpl/math-6722d13e60.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-679967c920.png b/dev/_images/mathmpl/math-679967c920.png deleted file mode 100644 index 465dfa6aca4..00000000000 Binary files a/dev/_images/mathmpl/math-679967c920.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-67a8f5ca79.png b/dev/_images/mathmpl/math-67a8f5ca79.png deleted file mode 100644 index dfbdc684de3..00000000000 Binary files a/dev/_images/mathmpl/math-67a8f5ca79.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-682a5688ef.png b/dev/_images/mathmpl/math-682a5688ef.png deleted file mode 100644 index 5c7b7bd9d88..00000000000 Binary files a/dev/_images/mathmpl/math-682a5688ef.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-68b96a49a5.png b/dev/_images/mathmpl/math-68b96a49a5.png deleted file mode 100644 index c1874a002b3..00000000000 Binary files a/dev/_images/mathmpl/math-68b96a49a5.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-6a5f1c0ebd.png b/dev/_images/mathmpl/math-6a5f1c0ebd.png deleted file mode 100644 index 457120988b9..00000000000 Binary files a/dev/_images/mathmpl/math-6a5f1c0ebd.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-6b6cc30aef.png b/dev/_images/mathmpl/math-6b6cc30aef.png deleted file mode 100644 index 1a06d432648..00000000000 Binary files a/dev/_images/mathmpl/math-6b6cc30aef.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-6c35839641.png b/dev/_images/mathmpl/math-6c35839641.png deleted file mode 100644 index 11307c8ec51..00000000000 Binary files a/dev/_images/mathmpl/math-6c35839641.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-6cb5c3c310.png b/dev/_images/mathmpl/math-6cb5c3c310.png deleted file mode 100644 index 7e0e61a0380..00000000000 Binary files a/dev/_images/mathmpl/math-6cb5c3c310.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-6e6c5971ad.png b/dev/_images/mathmpl/math-6e6c5971ad.png deleted file mode 100644 index 81de51781ad..00000000000 Binary files a/dev/_images/mathmpl/math-6e6c5971ad.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-6ea3150bfd.png b/dev/_images/mathmpl/math-6ea3150bfd.png deleted file mode 100644 index 9f1666d5c37..00000000000 Binary files a/dev/_images/mathmpl/math-6ea3150bfd.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-6eca465169.png b/dev/_images/mathmpl/math-6eca465169.png deleted file mode 100644 index a762e3ab992..00000000000 Binary files a/dev/_images/mathmpl/math-6eca465169.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-6f127405a3.png b/dev/_images/mathmpl/math-6f127405a3.png deleted file mode 100644 index 9fadc98766d..00000000000 Binary files a/dev/_images/mathmpl/math-6f127405a3.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-6fd5eead33.png b/dev/_images/mathmpl/math-6fd5eead33.png deleted file mode 100644 index 80b3995c574..00000000000 Binary files a/dev/_images/mathmpl/math-6fd5eead33.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-705a921d5a.png b/dev/_images/mathmpl/math-705a921d5a.png deleted file mode 100644 index 3a74a3c0892..00000000000 Binary files a/dev/_images/mathmpl/math-705a921d5a.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-70e89758da.png b/dev/_images/mathmpl/math-70e89758da.png deleted file mode 100644 index c3b8e01e9a8..00000000000 Binary files a/dev/_images/mathmpl/math-70e89758da.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-71771b9385.png b/dev/_images/mathmpl/math-71771b9385.png deleted file mode 100644 index ee6d87e435f..00000000000 Binary files a/dev/_images/mathmpl/math-71771b9385.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-7450111856.png b/dev/_images/mathmpl/math-7450111856.png deleted file mode 100644 index 596552350bd..00000000000 Binary files a/dev/_images/mathmpl/math-7450111856.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-74b9b263f9.png b/dev/_images/mathmpl/math-74b9b263f9.png deleted file mode 100644 index 2513c2f8c93..00000000000 Binary files a/dev/_images/mathmpl/math-74b9b263f9.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-75e95f3f2b.png b/dev/_images/mathmpl/math-75e95f3f2b.png deleted file mode 100644 index 596a17f9cb6..00000000000 Binary files a/dev/_images/mathmpl/math-75e95f3f2b.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-762c3b5e9e.png b/dev/_images/mathmpl/math-762c3b5e9e.png deleted file mode 100644 index 0357af750ec..00000000000 Binary files a/dev/_images/mathmpl/math-762c3b5e9e.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-764751dad5.png b/dev/_images/mathmpl/math-764751dad5.png deleted file mode 100644 index 76b57a8bf3a..00000000000 Binary files a/dev/_images/mathmpl/math-764751dad5.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-764af5d0f7.png b/dev/_images/mathmpl/math-764af5d0f7.png deleted file mode 100644 index 459cbc00209..00000000000 Binary files a/dev/_images/mathmpl/math-764af5d0f7.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-765d4eae57.png b/dev/_images/mathmpl/math-765d4eae57.png deleted file mode 100644 index 3a2f127ccc5..00000000000 Binary files a/dev/_images/mathmpl/math-765d4eae57.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-77926a09ec.png b/dev/_images/mathmpl/math-77926a09ec.png deleted file mode 100644 index 828b2abf094..00000000000 Binary files a/dev/_images/mathmpl/math-77926a09ec.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-792b216977.png b/dev/_images/mathmpl/math-792b216977.png deleted file mode 100644 index c88525d46ed..00000000000 Binary files a/dev/_images/mathmpl/math-792b216977.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-793d9cedd0.png b/dev/_images/mathmpl/math-793d9cedd0.png deleted file mode 100644 index b31ecc933a5..00000000000 Binary files a/dev/_images/mathmpl/math-793d9cedd0.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-7965c0c1af.png b/dev/_images/mathmpl/math-7965c0c1af.png deleted file mode 100644 index dc0b05675b2..00000000000 Binary files a/dev/_images/mathmpl/math-7965c0c1af.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-799e766e98.png b/dev/_images/mathmpl/math-799e766e98.png deleted file mode 100644 index a1b7dd37386..00000000000 Binary files a/dev/_images/mathmpl/math-799e766e98.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-79a0df421c.png b/dev/_images/mathmpl/math-79a0df421c.png deleted file mode 100644 index 69d847fc273..00000000000 Binary files a/dev/_images/mathmpl/math-79a0df421c.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-7a5bdaf004.png b/dev/_images/mathmpl/math-7a5bdaf004.png deleted file mode 100644 index 283418843f5..00000000000 Binary files a/dev/_images/mathmpl/math-7a5bdaf004.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-7a88315c05.png b/dev/_images/mathmpl/math-7a88315c05.png deleted file mode 100644 index d8935cb382b..00000000000 Binary files a/dev/_images/mathmpl/math-7a88315c05.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-7cafbba6d3.png b/dev/_images/mathmpl/math-7cafbba6d3.png deleted file mode 100644 index e5defe9743b..00000000000 Binary files a/dev/_images/mathmpl/math-7cafbba6d3.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-7d54d13fc9.png b/dev/_images/mathmpl/math-7d54d13fc9.png deleted file mode 100644 index 7a674159ed3..00000000000 Binary files a/dev/_images/mathmpl/math-7d54d13fc9.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-7d9222c03b.png b/dev/_images/mathmpl/math-7d9222c03b.png deleted file mode 100644 index add1ee1289b..00000000000 Binary files a/dev/_images/mathmpl/math-7d9222c03b.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-7da885dcbf.png b/dev/_images/mathmpl/math-7da885dcbf.png deleted file mode 100644 index bb309b84190..00000000000 Binary files a/dev/_images/mathmpl/math-7da885dcbf.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-7db176731c.png b/dev/_images/mathmpl/math-7db176731c.png deleted file mode 100644 index 614c9e84f76..00000000000 Binary files a/dev/_images/mathmpl/math-7db176731c.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-7e90b124a8.png b/dev/_images/mathmpl/math-7e90b124a8.png deleted file mode 100644 index d1b18636793..00000000000 Binary files a/dev/_images/mathmpl/math-7e90b124a8.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-7ffb7d798c.png b/dev/_images/mathmpl/math-7ffb7d798c.png deleted file mode 100644 index f44ca157960..00000000000 Binary files a/dev/_images/mathmpl/math-7ffb7d798c.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-800bb70468.png b/dev/_images/mathmpl/math-800bb70468.png deleted file mode 100644 index 5e299047216..00000000000 Binary files a/dev/_images/mathmpl/math-800bb70468.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-80117b16d3.png b/dev/_images/mathmpl/math-80117b16d3.png deleted file mode 100644 index 20e9b887bdb..00000000000 Binary files a/dev/_images/mathmpl/math-80117b16d3.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-8082fb34e8.png b/dev/_images/mathmpl/math-8082fb34e8.png deleted file mode 100644 index 01673b6b4c9..00000000000 Binary files a/dev/_images/mathmpl/math-8082fb34e8.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-80a13771b7.png b/dev/_images/mathmpl/math-80a13771b7.png deleted file mode 100644 index 241acaa79c6..00000000000 Binary files a/dev/_images/mathmpl/math-80a13771b7.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-813255d42d.png b/dev/_images/mathmpl/math-813255d42d.png deleted file mode 100644 index 014e9bf0eac..00000000000 Binary files a/dev/_images/mathmpl/math-813255d42d.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-813dcf0a93.png b/dev/_images/mathmpl/math-813dcf0a93.png deleted file mode 100644 index 0898fe8358a..00000000000 Binary files a/dev/_images/mathmpl/math-813dcf0a93.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-83ff203e39.png b/dev/_images/mathmpl/math-83ff203e39.png deleted file mode 100644 index c653a56c097..00000000000 Binary files a/dev/_images/mathmpl/math-83ff203e39.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-86ea2beb93.png b/dev/_images/mathmpl/math-86ea2beb93.png deleted file mode 100644 index 5d337a90e39..00000000000 Binary files a/dev/_images/mathmpl/math-86ea2beb93.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-88814f8d66.png b/dev/_images/mathmpl/math-88814f8d66.png deleted file mode 100644 index dc6df0742da..00000000000 Binary files a/dev/_images/mathmpl/math-88814f8d66.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-888740ee66.png b/dev/_images/mathmpl/math-888740ee66.png deleted file mode 100644 index 48b142b0a90..00000000000 Binary files a/dev/_images/mathmpl/math-888740ee66.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-88c0703f35.png b/dev/_images/mathmpl/math-88c0703f35.png deleted file mode 100644 index 661979de74c..00000000000 Binary files a/dev/_images/mathmpl/math-88c0703f35.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-8963eae853.png b/dev/_images/mathmpl/math-8963eae853.png deleted file mode 100644 index 6db46f16269..00000000000 Binary files a/dev/_images/mathmpl/math-8963eae853.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-89f87a2f0c.png b/dev/_images/mathmpl/math-89f87a2f0c.png deleted file mode 100644 index 0c5680b6446..00000000000 Binary files a/dev/_images/mathmpl/math-89f87a2f0c.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-8aa32761da.png b/dev/_images/mathmpl/math-8aa32761da.png deleted file mode 100644 index 7077bbb93ae..00000000000 Binary files a/dev/_images/mathmpl/math-8aa32761da.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-8bc070eada.png b/dev/_images/mathmpl/math-8bc070eada.png deleted file mode 100644 index a6d39781a97..00000000000 Binary files a/dev/_images/mathmpl/math-8bc070eada.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-8c68333295.png b/dev/_images/mathmpl/math-8c68333295.png deleted file mode 100644 index 0e0ead072b6..00000000000 Binary files a/dev/_images/mathmpl/math-8c68333295.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-8c6a0f04b9.png b/dev/_images/mathmpl/math-8c6a0f04b9.png deleted file mode 100644 index 1ecc0e9bb01..00000000000 Binary files a/dev/_images/mathmpl/math-8c6a0f04b9.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-8d37bd9196.png b/dev/_images/mathmpl/math-8d37bd9196.png deleted file mode 100644 index 74b0e64b946..00000000000 Binary files a/dev/_images/mathmpl/math-8d37bd9196.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-8da9245788.png b/dev/_images/mathmpl/math-8da9245788.png deleted file mode 100644 index 6c336375b15..00000000000 Binary files a/dev/_images/mathmpl/math-8da9245788.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-8e388594ad.png b/dev/_images/mathmpl/math-8e388594ad.png deleted file mode 100644 index d4fc46cf9ca..00000000000 Binary files a/dev/_images/mathmpl/math-8e388594ad.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-8e4b9eb82b.png b/dev/_images/mathmpl/math-8e4b9eb82b.png deleted file mode 100644 index 6d1e01c4945..00000000000 Binary files a/dev/_images/mathmpl/math-8e4b9eb82b.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-8e6cdc7038.png b/dev/_images/mathmpl/math-8e6cdc7038.png deleted file mode 100644 index b096e403b69..00000000000 Binary files a/dev/_images/mathmpl/math-8e6cdc7038.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-8e6df07c24.png b/dev/_images/mathmpl/math-8e6df07c24.png deleted file mode 100644 index d78c1a49343..00000000000 Binary files a/dev/_images/mathmpl/math-8e6df07c24.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-8f454df900.png b/dev/_images/mathmpl/math-8f454df900.png deleted file mode 100644 index 724dba1926c..00000000000 Binary files a/dev/_images/mathmpl/math-8f454df900.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-8f609835cb.png b/dev/_images/mathmpl/math-8f609835cb.png deleted file mode 100644 index b48167b01a2..00000000000 Binary files a/dev/_images/mathmpl/math-8f609835cb.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-8f896d9410.png b/dev/_images/mathmpl/math-8f896d9410.png deleted file mode 100644 index 8133a9763ef..00000000000 Binary files a/dev/_images/mathmpl/math-8f896d9410.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-8f8c0c020c.png b/dev/_images/mathmpl/math-8f8c0c020c.png deleted file mode 100644 index 8031f8840cb..00000000000 Binary files a/dev/_images/mathmpl/math-8f8c0c020c.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-9119a30630.png b/dev/_images/mathmpl/math-9119a30630.png deleted file mode 100644 index 651169bc677..00000000000 Binary files a/dev/_images/mathmpl/math-9119a30630.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-91a36bab96.png b/dev/_images/mathmpl/math-91a36bab96.png deleted file mode 100644 index 80ebf5558bf..00000000000 Binary files a/dev/_images/mathmpl/math-91a36bab96.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-91b94c6be9.png b/dev/_images/mathmpl/math-91b94c6be9.png deleted file mode 100644 index 8c82b0f3541..00000000000 Binary files a/dev/_images/mathmpl/math-91b94c6be9.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-92306485fb.png b/dev/_images/mathmpl/math-92306485fb.png deleted file mode 100644 index 0a2e1672f0e..00000000000 Binary files a/dev/_images/mathmpl/math-92306485fb.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-923c665edb.png b/dev/_images/mathmpl/math-923c665edb.png deleted file mode 100644 index 8987a9a2f67..00000000000 Binary files a/dev/_images/mathmpl/math-923c665edb.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-92a896986d.png b/dev/_images/mathmpl/math-92a896986d.png deleted file mode 100644 index e7c83813ed3..00000000000 Binary files a/dev/_images/mathmpl/math-92a896986d.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-92fc1ff85f.png b/dev/_images/mathmpl/math-92fc1ff85f.png deleted file mode 100644 index 2c7e9b1d323..00000000000 Binary files a/dev/_images/mathmpl/math-92fc1ff85f.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-9336896bb3.png b/dev/_images/mathmpl/math-9336896bb3.png deleted file mode 100644 index aa4ef3f70d7..00000000000 Binary files a/dev/_images/mathmpl/math-9336896bb3.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-937e2c148d.png b/dev/_images/mathmpl/math-937e2c148d.png deleted file mode 100644 index dc06fcf04a6..00000000000 Binary files a/dev/_images/mathmpl/math-937e2c148d.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-93a935b705.png b/dev/_images/mathmpl/math-93a935b705.png deleted file mode 100644 index 7b91e4714a0..00000000000 Binary files a/dev/_images/mathmpl/math-93a935b705.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-94ff64057f.png b/dev/_images/mathmpl/math-94ff64057f.png deleted file mode 100644 index 7dfbcd5500c..00000000000 Binary files a/dev/_images/mathmpl/math-94ff64057f.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-953993beed.png b/dev/_images/mathmpl/math-953993beed.png deleted file mode 100644 index f5b2807966d..00000000000 Binary files a/dev/_images/mathmpl/math-953993beed.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-9544659959.png b/dev/_images/mathmpl/math-9544659959.png deleted file mode 100644 index 27fdb03fc9d..00000000000 Binary files a/dev/_images/mathmpl/math-9544659959.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-968de0e26b.png b/dev/_images/mathmpl/math-968de0e26b.png deleted file mode 100644 index 59d590227b8..00000000000 Binary files a/dev/_images/mathmpl/math-968de0e26b.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-96aad37e82.png b/dev/_images/mathmpl/math-96aad37e82.png deleted file mode 100644 index 1c6a26f6a90..00000000000 Binary files a/dev/_images/mathmpl/math-96aad37e82.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-96c9a8ca95.png b/dev/_images/mathmpl/math-96c9a8ca95.png deleted file mode 100644 index ae4531ce673..00000000000 Binary files a/dev/_images/mathmpl/math-96c9a8ca95.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-989088989a.png b/dev/_images/mathmpl/math-989088989a.png deleted file mode 100644 index c68abeba29d..00000000000 Binary files a/dev/_images/mathmpl/math-989088989a.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-98c28d2d1b.png b/dev/_images/mathmpl/math-98c28d2d1b.png deleted file mode 100644 index 6fe7ad77fc9..00000000000 Binary files a/dev/_images/mathmpl/math-98c28d2d1b.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-98c8089378.png b/dev/_images/mathmpl/math-98c8089378.png deleted file mode 100644 index e97b6ea4baf..00000000000 Binary files a/dev/_images/mathmpl/math-98c8089378.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-993151c5de.png b/dev/_images/mathmpl/math-993151c5de.png deleted file mode 100644 index 2fd546e201f..00000000000 Binary files a/dev/_images/mathmpl/math-993151c5de.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-995f666935.png b/dev/_images/mathmpl/math-995f666935.png deleted file mode 100644 index 425c4f9ceaa..00000000000 Binary files a/dev/_images/mathmpl/math-995f666935.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-99abe4d704.png b/dev/_images/mathmpl/math-99abe4d704.png deleted file mode 100644 index a520ad79d06..00000000000 Binary files a/dev/_images/mathmpl/math-99abe4d704.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-9a483a288a.png b/dev/_images/mathmpl/math-9a483a288a.png deleted file mode 100644 index 5da9a6f520d..00000000000 Binary files a/dev/_images/mathmpl/math-9a483a288a.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-9afe2d20f8.png b/dev/_images/mathmpl/math-9afe2d20f8.png deleted file mode 100644 index 0307e3e44b3..00000000000 Binary files a/dev/_images/mathmpl/math-9afe2d20f8.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-9b12241d0c.png b/dev/_images/mathmpl/math-9b12241d0c.png deleted file mode 100644 index 17ff7260f27..00000000000 Binary files a/dev/_images/mathmpl/math-9b12241d0c.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-9b14251f65.png b/dev/_images/mathmpl/math-9b14251f65.png deleted file mode 100644 index 3ef7afc698e..00000000000 Binary files a/dev/_images/mathmpl/math-9b14251f65.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-9b8a721035.png b/dev/_images/mathmpl/math-9b8a721035.png deleted file mode 100644 index bab91c4232b..00000000000 Binary files a/dev/_images/mathmpl/math-9b8a721035.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-9c3c23a23d.png b/dev/_images/mathmpl/math-9c3c23a23d.png deleted file mode 100644 index c81c3ec189a..00000000000 Binary files a/dev/_images/mathmpl/math-9c3c23a23d.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-9d267a8c3c.png b/dev/_images/mathmpl/math-9d267a8c3c.png deleted file mode 100644 index 4e4a21855a0..00000000000 Binary files a/dev/_images/mathmpl/math-9d267a8c3c.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-9d5e427aeb.png b/dev/_images/mathmpl/math-9d5e427aeb.png deleted file mode 100644 index 4a8710c8bff..00000000000 Binary files a/dev/_images/mathmpl/math-9d5e427aeb.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-9d750cc7d9.png b/dev/_images/mathmpl/math-9d750cc7d9.png deleted file mode 100644 index 8417bda5b67..00000000000 Binary files a/dev/_images/mathmpl/math-9d750cc7d9.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-9db5c962c8.png b/dev/_images/mathmpl/math-9db5c962c8.png deleted file mode 100644 index a2b360bf22a..00000000000 Binary files a/dev/_images/mathmpl/math-9db5c962c8.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-9e1beabce9.png b/dev/_images/mathmpl/math-9e1beabce9.png deleted file mode 100644 index f82a247edcb..00000000000 Binary files a/dev/_images/mathmpl/math-9e1beabce9.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-a01094061c.png b/dev/_images/mathmpl/math-a01094061c.png deleted file mode 100644 index e48629fe0db..00000000000 Binary files a/dev/_images/mathmpl/math-a01094061c.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-a019dc17a7.png b/dev/_images/mathmpl/math-a019dc17a7.png deleted file mode 100644 index d1b9fd84163..00000000000 Binary files a/dev/_images/mathmpl/math-a019dc17a7.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-a0b5414d31.png b/dev/_images/mathmpl/math-a0b5414d31.png deleted file mode 100644 index 44cee8bdde8..00000000000 Binary files a/dev/_images/mathmpl/math-a0b5414d31.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-a12676f03f.png b/dev/_images/mathmpl/math-a12676f03f.png deleted file mode 100644 index 94ed84c1960..00000000000 Binary files a/dev/_images/mathmpl/math-a12676f03f.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-a174a79fa7.png b/dev/_images/mathmpl/math-a174a79fa7.png deleted file mode 100644 index 80a44baecfe..00000000000 Binary files a/dev/_images/mathmpl/math-a174a79fa7.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-a1903b29fd.png b/dev/_images/mathmpl/math-a1903b29fd.png deleted file mode 100644 index 53243dd1b02..00000000000 Binary files a/dev/_images/mathmpl/math-a1903b29fd.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-a2e07eb2ff.png b/dev/_images/mathmpl/math-a2e07eb2ff.png deleted file mode 100644 index d367f8b60c3..00000000000 Binary files a/dev/_images/mathmpl/math-a2e07eb2ff.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-a2eb9bae76.png b/dev/_images/mathmpl/math-a2eb9bae76.png deleted file mode 100644 index ede2629d4bb..00000000000 Binary files a/dev/_images/mathmpl/math-a2eb9bae76.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-a31bc74ee2.png b/dev/_images/mathmpl/math-a31bc74ee2.png deleted file mode 100644 index 419ef8897de..00000000000 Binary files a/dev/_images/mathmpl/math-a31bc74ee2.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-a3ca6be911.png b/dev/_images/mathmpl/math-a3ca6be911.png deleted file mode 100644 index f7081b9125d..00000000000 Binary files a/dev/_images/mathmpl/math-a3ca6be911.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-a3de1e5b51.png b/dev/_images/mathmpl/math-a3de1e5b51.png deleted file mode 100644 index 667cfce621f..00000000000 Binary files a/dev/_images/mathmpl/math-a3de1e5b51.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-a3f9f1f014.png b/dev/_images/mathmpl/math-a3f9f1f014.png deleted file mode 100644 index eab422ff0b8..00000000000 Binary files a/dev/_images/mathmpl/math-a3f9f1f014.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-a41c184ca6.png b/dev/_images/mathmpl/math-a41c184ca6.png deleted file mode 100644 index 670e58931bc..00000000000 Binary files a/dev/_images/mathmpl/math-a41c184ca6.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-a4f1a69c76.png b/dev/_images/mathmpl/math-a4f1a69c76.png deleted file mode 100644 index adbbca727da..00000000000 Binary files a/dev/_images/mathmpl/math-a4f1a69c76.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-a4f974e6ac.png b/dev/_images/mathmpl/math-a4f974e6ac.png deleted file mode 100644 index 5d8b75cbe61..00000000000 Binary files a/dev/_images/mathmpl/math-a4f974e6ac.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-a539c63e58.png b/dev/_images/mathmpl/math-a539c63e58.png deleted file mode 100644 index b1981095f5d..00000000000 Binary files a/dev/_images/mathmpl/math-a539c63e58.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-a55f718abe.png b/dev/_images/mathmpl/math-a55f718abe.png deleted file mode 100644 index ce72ae22963..00000000000 Binary files a/dev/_images/mathmpl/math-a55f718abe.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-a57791e0e2.png b/dev/_images/mathmpl/math-a57791e0e2.png deleted file mode 100644 index 0de7c60ccec..00000000000 Binary files a/dev/_images/mathmpl/math-a57791e0e2.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-a59e0fa5ee.png b/dev/_images/mathmpl/math-a59e0fa5ee.png deleted file mode 100644 index e8502299517..00000000000 Binary files a/dev/_images/mathmpl/math-a59e0fa5ee.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-a5b22dbdac.png b/dev/_images/mathmpl/math-a5b22dbdac.png deleted file mode 100644 index 36b149a3efa..00000000000 Binary files a/dev/_images/mathmpl/math-a5b22dbdac.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-a5edc7016a.png b/dev/_images/mathmpl/math-a5edc7016a.png deleted file mode 100644 index f291aa2289b..00000000000 Binary files a/dev/_images/mathmpl/math-a5edc7016a.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-a608a7ae83.png b/dev/_images/mathmpl/math-a608a7ae83.png deleted file mode 100644 index 9dfdd6f27b9..00000000000 Binary files a/dev/_images/mathmpl/math-a608a7ae83.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-a79325da6f.png b/dev/_images/mathmpl/math-a79325da6f.png deleted file mode 100644 index 6de26ff9640..00000000000 Binary files a/dev/_images/mathmpl/math-a79325da6f.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-a88976d8dd.png b/dev/_images/mathmpl/math-a88976d8dd.png deleted file mode 100644 index 4a5b2a41cb2..00000000000 Binary files a/dev/_images/mathmpl/math-a88976d8dd.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-a99c89f6e1.png b/dev/_images/mathmpl/math-a99c89f6e1.png deleted file mode 100644 index e038eb21917..00000000000 Binary files a/dev/_images/mathmpl/math-a99c89f6e1.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-a9a0109ea9.png b/dev/_images/mathmpl/math-a9a0109ea9.png deleted file mode 100644 index c1963e803e3..00000000000 Binary files a/dev/_images/mathmpl/math-a9a0109ea9.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-ab04245089.png b/dev/_images/mathmpl/math-ab04245089.png deleted file mode 100644 index 8c6b547fb52..00000000000 Binary files a/dev/_images/mathmpl/math-ab04245089.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-ab35a80a37.png b/dev/_images/mathmpl/math-ab35a80a37.png deleted file mode 100644 index 800fb7dff81..00000000000 Binary files a/dev/_images/mathmpl/math-ab35a80a37.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-ac7cfff3a1.png b/dev/_images/mathmpl/math-ac7cfff3a1.png deleted file mode 100644 index 76821a90250..00000000000 Binary files a/dev/_images/mathmpl/math-ac7cfff3a1.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-aca311c641.png b/dev/_images/mathmpl/math-aca311c641.png deleted file mode 100644 index 69bea7d9444..00000000000 Binary files a/dev/_images/mathmpl/math-aca311c641.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-ad0c7d5fd3.png b/dev/_images/mathmpl/math-ad0c7d5fd3.png deleted file mode 100644 index d510f77f53c..00000000000 Binary files a/dev/_images/mathmpl/math-ad0c7d5fd3.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-ad67ff4a6f.png b/dev/_images/mathmpl/math-ad67ff4a6f.png deleted file mode 100644 index 441e64b432e..00000000000 Binary files a/dev/_images/mathmpl/math-ad67ff4a6f.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-adb99bedc4.png b/dev/_images/mathmpl/math-adb99bedc4.png deleted file mode 100644 index 661ab307c33..00000000000 Binary files a/dev/_images/mathmpl/math-adb99bedc4.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-ae2fa40b25.png b/dev/_images/mathmpl/math-ae2fa40b25.png deleted file mode 100644 index 50bd9c5c3ce..00000000000 Binary files a/dev/_images/mathmpl/math-ae2fa40b25.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-ae65c1de79.png b/dev/_images/mathmpl/math-ae65c1de79.png deleted file mode 100644 index fbb165c2887..00000000000 Binary files a/dev/_images/mathmpl/math-ae65c1de79.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-ae7023d9db.png b/dev/_images/mathmpl/math-ae7023d9db.png deleted file mode 100644 index 578b3e30347..00000000000 Binary files a/dev/_images/mathmpl/math-ae7023d9db.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-af3bc8ac21.png b/dev/_images/mathmpl/math-af3bc8ac21.png deleted file mode 100644 index b89fbacb99c..00000000000 Binary files a/dev/_images/mathmpl/math-af3bc8ac21.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-b045970090.png b/dev/_images/mathmpl/math-b045970090.png deleted file mode 100644 index 88b979ca816..00000000000 Binary files a/dev/_images/mathmpl/math-b045970090.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-b15f9f29ec.png b/dev/_images/mathmpl/math-b15f9f29ec.png deleted file mode 100644 index 1a8b831e609..00000000000 Binary files a/dev/_images/mathmpl/math-b15f9f29ec.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-b1d46891d0.png b/dev/_images/mathmpl/math-b1d46891d0.png deleted file mode 100644 index d2b9f91e058..00000000000 Binary files a/dev/_images/mathmpl/math-b1d46891d0.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-b1d77626bb.png b/dev/_images/mathmpl/math-b1d77626bb.png deleted file mode 100644 index d2c30087a27..00000000000 Binary files a/dev/_images/mathmpl/math-b1d77626bb.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-b225b29af4.png b/dev/_images/mathmpl/math-b225b29af4.png deleted file mode 100644 index 987930cc2c9..00000000000 Binary files a/dev/_images/mathmpl/math-b225b29af4.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-b373234f3b.png b/dev/_images/mathmpl/math-b373234f3b.png deleted file mode 100644 index 9e0bef60498..00000000000 Binary files a/dev/_images/mathmpl/math-b373234f3b.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-b43c061111.png b/dev/_images/mathmpl/math-b43c061111.png deleted file mode 100644 index 1ab6bca77ca..00000000000 Binary files a/dev/_images/mathmpl/math-b43c061111.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-b53ab799d1.png b/dev/_images/mathmpl/math-b53ab799d1.png deleted file mode 100644 index bc6d8f8b83f..00000000000 Binary files a/dev/_images/mathmpl/math-b53ab799d1.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-b5496f6786.png b/dev/_images/mathmpl/math-b5496f6786.png deleted file mode 100644 index 924d2362574..00000000000 Binary files a/dev/_images/mathmpl/math-b5496f6786.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-b555ccd28d.png b/dev/_images/mathmpl/math-b555ccd28d.png deleted file mode 100644 index 0cfd1a48da6..00000000000 Binary files a/dev/_images/mathmpl/math-b555ccd28d.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-b5a379f4e8.png b/dev/_images/mathmpl/math-b5a379f4e8.png deleted file mode 100644 index 9e1b2601ef4..00000000000 Binary files a/dev/_images/mathmpl/math-b5a379f4e8.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-b5ae8c62a3.png b/dev/_images/mathmpl/math-b5ae8c62a3.png deleted file mode 100644 index 242d8218825..00000000000 Binary files a/dev/_images/mathmpl/math-b5ae8c62a3.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-b6a35dc0d4.png b/dev/_images/mathmpl/math-b6a35dc0d4.png deleted file mode 100644 index 3c90bd962b9..00000000000 Binary files a/dev/_images/mathmpl/math-b6a35dc0d4.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-b7c281dd54.png b/dev/_images/mathmpl/math-b7c281dd54.png deleted file mode 100644 index 456f7613257..00000000000 Binary files a/dev/_images/mathmpl/math-b7c281dd54.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-b7c546c13f.png b/dev/_images/mathmpl/math-b7c546c13f.png deleted file mode 100644 index 049f02c6791..00000000000 Binary files a/dev/_images/mathmpl/math-b7c546c13f.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-b8348856ea.png b/dev/_images/mathmpl/math-b8348856ea.png deleted file mode 100644 index 0f7030ef0fc..00000000000 Binary files a/dev/_images/mathmpl/math-b8348856ea.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-b8571a3cc2.png b/dev/_images/mathmpl/math-b8571a3cc2.png deleted file mode 100644 index 50bd68e8504..00000000000 Binary files a/dev/_images/mathmpl/math-b8571a3cc2.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-ba64c5e997.png b/dev/_images/mathmpl/math-ba64c5e997.png deleted file mode 100644 index a9043137371..00000000000 Binary files a/dev/_images/mathmpl/math-ba64c5e997.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-bab33d6e68.png b/dev/_images/mathmpl/math-bab33d6e68.png deleted file mode 100644 index 2e6f4989522..00000000000 Binary files a/dev/_images/mathmpl/math-bab33d6e68.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-bbdf3d8983.png b/dev/_images/mathmpl/math-bbdf3d8983.png deleted file mode 100644 index 0625846f885..00000000000 Binary files a/dev/_images/mathmpl/math-bbdf3d8983.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-bc54d541fc.png b/dev/_images/mathmpl/math-bc54d541fc.png deleted file mode 100644 index f23d17b34e4..00000000000 Binary files a/dev/_images/mathmpl/math-bc54d541fc.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-bce42da457.png b/dev/_images/mathmpl/math-bce42da457.png deleted file mode 100644 index 83e8fa0f26f..00000000000 Binary files a/dev/_images/mathmpl/math-bce42da457.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-be2ea18bef.png b/dev/_images/mathmpl/math-be2ea18bef.png deleted file mode 100644 index aa02ed08206..00000000000 Binary files a/dev/_images/mathmpl/math-be2ea18bef.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-be84d4168e.png b/dev/_images/mathmpl/math-be84d4168e.png deleted file mode 100644 index 31314291a8d..00000000000 Binary files a/dev/_images/mathmpl/math-be84d4168e.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-bf67fbdaae.png b/dev/_images/mathmpl/math-bf67fbdaae.png deleted file mode 100644 index 5fc983be13f..00000000000 Binary files a/dev/_images/mathmpl/math-bf67fbdaae.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-bf7d25e347.png b/dev/_images/mathmpl/math-bf7d25e347.png deleted file mode 100644 index 84dc33a0fd9..00000000000 Binary files a/dev/_images/mathmpl/math-bf7d25e347.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-c05929fd30.png b/dev/_images/mathmpl/math-c05929fd30.png deleted file mode 100644 index e3056672a43..00000000000 Binary files a/dev/_images/mathmpl/math-c05929fd30.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-c0df1e9b19.png b/dev/_images/mathmpl/math-c0df1e9b19.png deleted file mode 100644 index 8191d0a081c..00000000000 Binary files a/dev/_images/mathmpl/math-c0df1e9b19.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-c104febab3.png b/dev/_images/mathmpl/math-c104febab3.png deleted file mode 100644 index 629636f4ec5..00000000000 Binary files a/dev/_images/mathmpl/math-c104febab3.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-c2c43a5762.png b/dev/_images/mathmpl/math-c2c43a5762.png deleted file mode 100644 index 15a9c6d3d5d..00000000000 Binary files a/dev/_images/mathmpl/math-c2c43a5762.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-c3a13bbc63.png b/dev/_images/mathmpl/math-c3a13bbc63.png deleted file mode 100644 index 00c6b67ffff..00000000000 Binary files a/dev/_images/mathmpl/math-c3a13bbc63.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-c3fea548da.png b/dev/_images/mathmpl/math-c3fea548da.png deleted file mode 100644 index a78f63ce931..00000000000 Binary files a/dev/_images/mathmpl/math-c3fea548da.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-c408639f33.png b/dev/_images/mathmpl/math-c408639f33.png deleted file mode 100644 index a4186e07f55..00000000000 Binary files a/dev/_images/mathmpl/math-c408639f33.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-c40f3bc7dc.png b/dev/_images/mathmpl/math-c40f3bc7dc.png deleted file mode 100644 index aa16b4c95ee..00000000000 Binary files a/dev/_images/mathmpl/math-c40f3bc7dc.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-c53255ce25.png b/dev/_images/mathmpl/math-c53255ce25.png deleted file mode 100644 index 552a265f94f..00000000000 Binary files a/dev/_images/mathmpl/math-c53255ce25.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-c5baac4e57.png b/dev/_images/mathmpl/math-c5baac4e57.png deleted file mode 100644 index b7b9be684fb..00000000000 Binary files a/dev/_images/mathmpl/math-c5baac4e57.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-c6975aea0e.png b/dev/_images/mathmpl/math-c6975aea0e.png deleted file mode 100644 index 36fef762cc6..00000000000 Binary files a/dev/_images/mathmpl/math-c6975aea0e.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-c72f36312c.png b/dev/_images/mathmpl/math-c72f36312c.png deleted file mode 100644 index 8f062b0bdab..00000000000 Binary files a/dev/_images/mathmpl/math-c72f36312c.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-c7d2b9a8fd.png b/dev/_images/mathmpl/math-c7d2b9a8fd.png deleted file mode 100644 index b36736943bf..00000000000 Binary files a/dev/_images/mathmpl/math-c7d2b9a8fd.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-c8056d47b3.png b/dev/_images/mathmpl/math-c8056d47b3.png deleted file mode 100644 index 828b2abf094..00000000000 Binary files a/dev/_images/mathmpl/math-c8056d47b3.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-c899412e92.png b/dev/_images/mathmpl/math-c899412e92.png deleted file mode 100644 index 200d281089d..00000000000 Binary files a/dev/_images/mathmpl/math-c899412e92.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-c8d83de344.png b/dev/_images/mathmpl/math-c8d83de344.png deleted file mode 100644 index b904537c186..00000000000 Binary files a/dev/_images/mathmpl/math-c8d83de344.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-c8fe9fb96c.png b/dev/_images/mathmpl/math-c8fe9fb96c.png deleted file mode 100644 index c358463ff6b..00000000000 Binary files a/dev/_images/mathmpl/math-c8fe9fb96c.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-c9136df47e.png b/dev/_images/mathmpl/math-c9136df47e.png deleted file mode 100644 index 0d49b4214f7..00000000000 Binary files a/dev/_images/mathmpl/math-c9136df47e.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-c957a5ae9f.png b/dev/_images/mathmpl/math-c957a5ae9f.png deleted file mode 100644 index 8a3502f36b5..00000000000 Binary files a/dev/_images/mathmpl/math-c957a5ae9f.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-c985be990e.png b/dev/_images/mathmpl/math-c985be990e.png deleted file mode 100644 index 186c840ad8e..00000000000 Binary files a/dev/_images/mathmpl/math-c985be990e.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-ca3f612baa.png b/dev/_images/mathmpl/math-ca3f612baa.png deleted file mode 100644 index 3e87d6b1068..00000000000 Binary files a/dev/_images/mathmpl/math-ca3f612baa.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-cac5abe8bf.png b/dev/_images/mathmpl/math-cac5abe8bf.png deleted file mode 100644 index a8e0e374276..00000000000 Binary files a/dev/_images/mathmpl/math-cac5abe8bf.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-cbd4824a55.png b/dev/_images/mathmpl/math-cbd4824a55.png deleted file mode 100644 index a22841d12b0..00000000000 Binary files a/dev/_images/mathmpl/math-cbd4824a55.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-cc1340c453.png b/dev/_images/mathmpl/math-cc1340c453.png deleted file mode 100644 index 3ed3e1ec836..00000000000 Binary files a/dev/_images/mathmpl/math-cc1340c453.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-cca8605565.png b/dev/_images/mathmpl/math-cca8605565.png deleted file mode 100644 index 796fa00bf58..00000000000 Binary files a/dev/_images/mathmpl/math-cca8605565.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-ccea9f4e30.png b/dev/_images/mathmpl/math-ccea9f4e30.png deleted file mode 100644 index 07109276d6f..00000000000 Binary files a/dev/_images/mathmpl/math-ccea9f4e30.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-cd5adea2d9.png b/dev/_images/mathmpl/math-cd5adea2d9.png deleted file mode 100644 index 8ff55157fb0..00000000000 Binary files a/dev/_images/mathmpl/math-cd5adea2d9.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-ce75170225.png b/dev/_images/mathmpl/math-ce75170225.png deleted file mode 100644 index 4c03e98944e..00000000000 Binary files a/dev/_images/mathmpl/math-ce75170225.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-cebfe4186d.png b/dev/_images/mathmpl/math-cebfe4186d.png deleted file mode 100644 index d8c036ff211..00000000000 Binary files a/dev/_images/mathmpl/math-cebfe4186d.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-cf8f5e2275.png b/dev/_images/mathmpl/math-cf8f5e2275.png deleted file mode 100644 index 837f68ff33d..00000000000 Binary files a/dev/_images/mathmpl/math-cf8f5e2275.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-cfcebc2ef8.png b/dev/_images/mathmpl/math-cfcebc2ef8.png deleted file mode 100644 index a0a6c261483..00000000000 Binary files a/dev/_images/mathmpl/math-cfcebc2ef8.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-d00ab41d80.png b/dev/_images/mathmpl/math-d00ab41d80.png deleted file mode 100644 index b083df4e224..00000000000 Binary files a/dev/_images/mathmpl/math-d00ab41d80.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-d115134b0c.png b/dev/_images/mathmpl/math-d115134b0c.png deleted file mode 100644 index 0fa79b2a961..00000000000 Binary files a/dev/_images/mathmpl/math-d115134b0c.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-d11bf19a50.png b/dev/_images/mathmpl/math-d11bf19a50.png deleted file mode 100644 index 9cfa4433308..00000000000 Binary files a/dev/_images/mathmpl/math-d11bf19a50.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-d2bc160257.png b/dev/_images/mathmpl/math-d2bc160257.png deleted file mode 100644 index b249543ec23..00000000000 Binary files a/dev/_images/mathmpl/math-d2bc160257.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-d3219d7443.png b/dev/_images/mathmpl/math-d3219d7443.png deleted file mode 100644 index 8603b02757d..00000000000 Binary files a/dev/_images/mathmpl/math-d3219d7443.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-d35c7fd4db.png b/dev/_images/mathmpl/math-d35c7fd4db.png deleted file mode 100644 index 8af0d2caef1..00000000000 Binary files a/dev/_images/mathmpl/math-d35c7fd4db.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-d367d088c6.png b/dev/_images/mathmpl/math-d367d088c6.png deleted file mode 100644 index a3cd56ea2e2..00000000000 Binary files a/dev/_images/mathmpl/math-d367d088c6.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-d44376b8c3.png b/dev/_images/mathmpl/math-d44376b8c3.png deleted file mode 100644 index fd8bf70635b..00000000000 Binary files a/dev/_images/mathmpl/math-d44376b8c3.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-d4d8611cbc.png b/dev/_images/mathmpl/math-d4d8611cbc.png deleted file mode 100644 index b26b20196eb..00000000000 Binary files a/dev/_images/mathmpl/math-d4d8611cbc.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-d51bb4d6d4.png b/dev/_images/mathmpl/math-d51bb4d6d4.png deleted file mode 100644 index cdbbf9e235d..00000000000 Binary files a/dev/_images/mathmpl/math-d51bb4d6d4.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-d5242ce585.png b/dev/_images/mathmpl/math-d5242ce585.png deleted file mode 100644 index bb8fd9c4cd5..00000000000 Binary files a/dev/_images/mathmpl/math-d5242ce585.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-d6c1d2bb14.png b/dev/_images/mathmpl/math-d6c1d2bb14.png deleted file mode 100644 index 624c0cf1cf3..00000000000 Binary files a/dev/_images/mathmpl/math-d6c1d2bb14.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-d6c1dc73f3.png b/dev/_images/mathmpl/math-d6c1dc73f3.png deleted file mode 100644 index 5fa6781e307..00000000000 Binary files a/dev/_images/mathmpl/math-d6c1dc73f3.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-d78cd804a4.png b/dev/_images/mathmpl/math-d78cd804a4.png deleted file mode 100644 index 73f4dae2d7f..00000000000 Binary files a/dev/_images/mathmpl/math-d78cd804a4.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-d78d7b5c1b.png b/dev/_images/mathmpl/math-d78d7b5c1b.png deleted file mode 100644 index e12f7950fff..00000000000 Binary files a/dev/_images/mathmpl/math-d78d7b5c1b.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-d7ee7c1348.png b/dev/_images/mathmpl/math-d7ee7c1348.png deleted file mode 100644 index be40c67c770..00000000000 Binary files a/dev/_images/mathmpl/math-d7ee7c1348.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-d831d8aa62.png b/dev/_images/mathmpl/math-d831d8aa62.png deleted file mode 100644 index 4aebcc819b3..00000000000 Binary files a/dev/_images/mathmpl/math-d831d8aa62.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-d87b34b699.png b/dev/_images/mathmpl/math-d87b34b699.png deleted file mode 100644 index 091083b2397..00000000000 Binary files a/dev/_images/mathmpl/math-d87b34b699.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-d8ad6ecbe6.png b/dev/_images/mathmpl/math-d8ad6ecbe6.png deleted file mode 100644 index 5aa6b6951e3..00000000000 Binary files a/dev/_images/mathmpl/math-d8ad6ecbe6.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-d8d19f17ef.png b/dev/_images/mathmpl/math-d8d19f17ef.png deleted file mode 100644 index 2c0c32d2a7b..00000000000 Binary files a/dev/_images/mathmpl/math-d8d19f17ef.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-da1122f776.png b/dev/_images/mathmpl/math-da1122f776.png deleted file mode 100644 index 47ebd62f5f0..00000000000 Binary files a/dev/_images/mathmpl/math-da1122f776.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-db9b9e0126.png b/dev/_images/mathmpl/math-db9b9e0126.png deleted file mode 100644 index 59adb3c4946..00000000000 Binary files a/dev/_images/mathmpl/math-db9b9e0126.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-dbcc77f1d2.png b/dev/_images/mathmpl/math-dbcc77f1d2.png deleted file mode 100644 index 6595da509f2..00000000000 Binary files a/dev/_images/mathmpl/math-dbcc77f1d2.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-dcb2243778.png b/dev/_images/mathmpl/math-dcb2243778.png deleted file mode 100644 index 5dd01c27334..00000000000 Binary files a/dev/_images/mathmpl/math-dcb2243778.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-de64de5819.png b/dev/_images/mathmpl/math-de64de5819.png deleted file mode 100644 index 24610c3a48e..00000000000 Binary files a/dev/_images/mathmpl/math-de64de5819.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-dec391be07.png b/dev/_images/mathmpl/math-dec391be07.png deleted file mode 100644 index 360d62f3e42..00000000000 Binary files a/dev/_images/mathmpl/math-dec391be07.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-df6899ad3e.png b/dev/_images/mathmpl/math-df6899ad3e.png deleted file mode 100644 index 08958a636cc..00000000000 Binary files a/dev/_images/mathmpl/math-df6899ad3e.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-dfa04fb947.png b/dev/_images/mathmpl/math-dfa04fb947.png deleted file mode 100644 index 97b77a58da2..00000000000 Binary files a/dev/_images/mathmpl/math-dfa04fb947.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-e0ca686f62.png b/dev/_images/mathmpl/math-e0ca686f62.png deleted file mode 100644 index 9ca1b883e5a..00000000000 Binary files a/dev/_images/mathmpl/math-e0ca686f62.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-e12e277d39.png b/dev/_images/mathmpl/math-e12e277d39.png deleted file mode 100644 index 97b77a58da2..00000000000 Binary files a/dev/_images/mathmpl/math-e12e277d39.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-e15357ad29.png b/dev/_images/mathmpl/math-e15357ad29.png deleted file mode 100644 index 8bd293ec300..00000000000 Binary files a/dev/_images/mathmpl/math-e15357ad29.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-e22cc525ec.png b/dev/_images/mathmpl/math-e22cc525ec.png deleted file mode 100644 index 88554de67c7..00000000000 Binary files a/dev/_images/mathmpl/math-e22cc525ec.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-e29eb6062a.png b/dev/_images/mathmpl/math-e29eb6062a.png deleted file mode 100644 index 9b1e68f852e..00000000000 Binary files a/dev/_images/mathmpl/math-e29eb6062a.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-e2adf498a2.png b/dev/_images/mathmpl/math-e2adf498a2.png deleted file mode 100644 index 1d36dfc690c..00000000000 Binary files a/dev/_images/mathmpl/math-e2adf498a2.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-e2db32b4d0.png b/dev/_images/mathmpl/math-e2db32b4d0.png deleted file mode 100644 index 37b9d826a4a..00000000000 Binary files a/dev/_images/mathmpl/math-e2db32b4d0.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-e2dcef116c.png b/dev/_images/mathmpl/math-e2dcef116c.png deleted file mode 100644 index 50963ba7aa4..00000000000 Binary files a/dev/_images/mathmpl/math-e2dcef116c.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-e3168b0fff.png b/dev/_images/mathmpl/math-e3168b0fff.png deleted file mode 100644 index a929c42aa3c..00000000000 Binary files a/dev/_images/mathmpl/math-e3168b0fff.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-e3d8965f58.png b/dev/_images/mathmpl/math-e3d8965f58.png deleted file mode 100644 index a53f9b2ce11..00000000000 Binary files a/dev/_images/mathmpl/math-e3d8965f58.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-e4d9d4c64b.png b/dev/_images/mathmpl/math-e4d9d4c64b.png deleted file mode 100644 index 0df05a57c77..00000000000 Binary files a/dev/_images/mathmpl/math-e4d9d4c64b.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-e51ac520e2.png b/dev/_images/mathmpl/math-e51ac520e2.png deleted file mode 100644 index 388c152db39..00000000000 Binary files a/dev/_images/mathmpl/math-e51ac520e2.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-e5cdb1d314.png b/dev/_images/mathmpl/math-e5cdb1d314.png deleted file mode 100644 index 87dc2aba2f7..00000000000 Binary files a/dev/_images/mathmpl/math-e5cdb1d314.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-e63a2108d5.png b/dev/_images/mathmpl/math-e63a2108d5.png deleted file mode 100644 index 1408b512903..00000000000 Binary files a/dev/_images/mathmpl/math-e63a2108d5.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-e661b1289d.png b/dev/_images/mathmpl/math-e661b1289d.png deleted file mode 100644 index 6ea5f32a5ba..00000000000 Binary files a/dev/_images/mathmpl/math-e661b1289d.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-e82daa3fb7.png b/dev/_images/mathmpl/math-e82daa3fb7.png deleted file mode 100644 index abdf9a2d6e4..00000000000 Binary files a/dev/_images/mathmpl/math-e82daa3fb7.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-e8cf7f5844.png b/dev/_images/mathmpl/math-e8cf7f5844.png deleted file mode 100644 index cf478cee171..00000000000 Binary files a/dev/_images/mathmpl/math-e8cf7f5844.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-e90d63d41d.png b/dev/_images/mathmpl/math-e90d63d41d.png deleted file mode 100644 index 2428162227c..00000000000 Binary files a/dev/_images/mathmpl/math-e90d63d41d.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-e9444fe0c8.png b/dev/_images/mathmpl/math-e9444fe0c8.png deleted file mode 100644 index 243841818ad..00000000000 Binary files a/dev/_images/mathmpl/math-e9444fe0c8.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-e98739824f.png b/dev/_images/mathmpl/math-e98739824f.png deleted file mode 100644 index c3c4147863c..00000000000 Binary files a/dev/_images/mathmpl/math-e98739824f.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-ea0303ad72.png b/dev/_images/mathmpl/math-ea0303ad72.png deleted file mode 100644 index 670398e88bf..00000000000 Binary files a/dev/_images/mathmpl/math-ea0303ad72.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-ea5241d5f2.png b/dev/_images/mathmpl/math-ea5241d5f2.png deleted file mode 100644 index 06edeec6da2..00000000000 Binary files a/dev/_images/mathmpl/math-ea5241d5f2.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-ea5765e8b3.png b/dev/_images/mathmpl/math-ea5765e8b3.png deleted file mode 100644 index 954d6421b99..00000000000 Binary files a/dev/_images/mathmpl/math-ea5765e8b3.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-eab5c7cdff.png b/dev/_images/mathmpl/math-eab5c7cdff.png deleted file mode 100644 index afeab089358..00000000000 Binary files a/dev/_images/mathmpl/math-eab5c7cdff.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-eb3a880058.png b/dev/_images/mathmpl/math-eb3a880058.png deleted file mode 100644 index fda09a495f8..00000000000 Binary files a/dev/_images/mathmpl/math-eb3a880058.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-eb3b3a6d5c.png b/dev/_images/mathmpl/math-eb3b3a6d5c.png deleted file mode 100644 index 58a67c37429..00000000000 Binary files a/dev/_images/mathmpl/math-eb3b3a6d5c.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-eb8d6ee4ad.png b/dev/_images/mathmpl/math-eb8d6ee4ad.png deleted file mode 100644 index d63c03f59ae..00000000000 Binary files a/dev/_images/mathmpl/math-eb8d6ee4ad.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-ec200f4f3a.png b/dev/_images/mathmpl/math-ec200f4f3a.png deleted file mode 100644 index 6364fd8bed6..00000000000 Binary files a/dev/_images/mathmpl/math-ec200f4f3a.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-ee226905c4.png b/dev/_images/mathmpl/math-ee226905c4.png deleted file mode 100644 index 4635748279e..00000000000 Binary files a/dev/_images/mathmpl/math-ee226905c4.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-ee61bb7cf9.png b/dev/_images/mathmpl/math-ee61bb7cf9.png deleted file mode 100644 index 97b77a58da2..00000000000 Binary files a/dev/_images/mathmpl/math-ee61bb7cf9.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-eeabc86e5f.png b/dev/_images/mathmpl/math-eeabc86e5f.png deleted file mode 100644 index 2e9163463fe..00000000000 Binary files a/dev/_images/mathmpl/math-eeabc86e5f.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-ef7a046183.png b/dev/_images/mathmpl/math-ef7a046183.png deleted file mode 100644 index 6c3a9caaf18..00000000000 Binary files a/dev/_images/mathmpl/math-ef7a046183.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-ef94320557.png b/dev/_images/mathmpl/math-ef94320557.png deleted file mode 100644 index d201bc97626..00000000000 Binary files a/dev/_images/mathmpl/math-ef94320557.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-efdcd0e7c3.png b/dev/_images/mathmpl/math-efdcd0e7c3.png deleted file mode 100644 index c1a251244d4..00000000000 Binary files a/dev/_images/mathmpl/math-efdcd0e7c3.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-f083286645.png b/dev/_images/mathmpl/math-f083286645.png deleted file mode 100644 index e2bbc0d8b4a..00000000000 Binary files a/dev/_images/mathmpl/math-f083286645.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-f0c7f8f01c.png b/dev/_images/mathmpl/math-f0c7f8f01c.png deleted file mode 100644 index b1b75727a74..00000000000 Binary files a/dev/_images/mathmpl/math-f0c7f8f01c.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-f0fa40854a.png b/dev/_images/mathmpl/math-f0fa40854a.png deleted file mode 100644 index c18f82a3e82..00000000000 Binary files a/dev/_images/mathmpl/math-f0fa40854a.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-f0fe2a4a9f.png b/dev/_images/mathmpl/math-f0fe2a4a9f.png deleted file mode 100644 index fa8fb150ee7..00000000000 Binary files a/dev/_images/mathmpl/math-f0fe2a4a9f.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-f11a3eab57.png b/dev/_images/mathmpl/math-f11a3eab57.png deleted file mode 100644 index 1b416cf8719..00000000000 Binary files a/dev/_images/mathmpl/math-f11a3eab57.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-f151e9b6c6.png b/dev/_images/mathmpl/math-f151e9b6c6.png deleted file mode 100644 index 4255be0e76e..00000000000 Binary files a/dev/_images/mathmpl/math-f151e9b6c6.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-f1bfb0bbf7.png b/dev/_images/mathmpl/math-f1bfb0bbf7.png deleted file mode 100644 index 451828c7c02..00000000000 Binary files a/dev/_images/mathmpl/math-f1bfb0bbf7.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-f2e3547a85.png b/dev/_images/mathmpl/math-f2e3547a85.png deleted file mode 100644 index 6e3448fefe2..00000000000 Binary files a/dev/_images/mathmpl/math-f2e3547a85.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-f313a5f9af.png b/dev/_images/mathmpl/math-f313a5f9af.png deleted file mode 100644 index 725cca95e74..00000000000 Binary files a/dev/_images/mathmpl/math-f313a5f9af.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-f3f9a5c2b6.png b/dev/_images/mathmpl/math-f3f9a5c2b6.png deleted file mode 100644 index 4b3b173b670..00000000000 Binary files a/dev/_images/mathmpl/math-f3f9a5c2b6.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-f557917efd.png b/dev/_images/mathmpl/math-f557917efd.png deleted file mode 100644 index cf2db8da15c..00000000000 Binary files a/dev/_images/mathmpl/math-f557917efd.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-f5af631a03.png b/dev/_images/mathmpl/math-f5af631a03.png deleted file mode 100644 index 3ce2d870320..00000000000 Binary files a/dev/_images/mathmpl/math-f5af631a03.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-f5e02865f3.png b/dev/_images/mathmpl/math-f5e02865f3.png deleted file mode 100644 index 3e48f6163c4..00000000000 Binary files a/dev/_images/mathmpl/math-f5e02865f3.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-f5e3901a47.png b/dev/_images/mathmpl/math-f5e3901a47.png deleted file mode 100644 index 36e7e4e333e..00000000000 Binary files a/dev/_images/mathmpl/math-f5e3901a47.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-f610b8e469.png b/dev/_images/mathmpl/math-f610b8e469.png deleted file mode 100644 index 48e6164259f..00000000000 Binary files a/dev/_images/mathmpl/math-f610b8e469.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-f6d65b7f49.png b/dev/_images/mathmpl/math-f6d65b7f49.png deleted file mode 100644 index 5c2325442d2..00000000000 Binary files a/dev/_images/mathmpl/math-f6d65b7f49.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-f6fb720d82.png b/dev/_images/mathmpl/math-f6fb720d82.png deleted file mode 100644 index ef647b0b197..00000000000 Binary files a/dev/_images/mathmpl/math-f6fb720d82.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-f81f19a962.png b/dev/_images/mathmpl/math-f81f19a962.png deleted file mode 100644 index 0d9a008d57c..00000000000 Binary files a/dev/_images/mathmpl/math-f81f19a962.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-f8daa97519.png b/dev/_images/mathmpl/math-f8daa97519.png deleted file mode 100644 index 12db743151a..00000000000 Binary files a/dev/_images/mathmpl/math-f8daa97519.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-f8ee41a28a.png b/dev/_images/mathmpl/math-f8ee41a28a.png deleted file mode 100644 index 3b52ba91ac1..00000000000 Binary files a/dev/_images/mathmpl/math-f8ee41a28a.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-f970af607c.png b/dev/_images/mathmpl/math-f970af607c.png deleted file mode 100644 index 835a4e7ca0a..00000000000 Binary files a/dev/_images/mathmpl/math-f970af607c.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-f9990bc9cf.png b/dev/_images/mathmpl/math-f9990bc9cf.png deleted file mode 100644 index 9bb7efdb3af..00000000000 Binary files a/dev/_images/mathmpl/math-f9990bc9cf.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-f9b0df773f.png b/dev/_images/mathmpl/math-f9b0df773f.png deleted file mode 100644 index eabe12be387..00000000000 Binary files a/dev/_images/mathmpl/math-f9b0df773f.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-f9cc3f8904.png b/dev/_images/mathmpl/math-f9cc3f8904.png deleted file mode 100644 index 7c5d6d61798..00000000000 Binary files a/dev/_images/mathmpl/math-f9cc3f8904.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-f9f98764da.png b/dev/_images/mathmpl/math-f9f98764da.png deleted file mode 100644 index 9c30b12e117..00000000000 Binary files a/dev/_images/mathmpl/math-f9f98764da.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-fa85ea0416.png b/dev/_images/mathmpl/math-fa85ea0416.png deleted file mode 100644 index 98f9ea51f33..00000000000 Binary files a/dev/_images/mathmpl/math-fa85ea0416.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-fac074d098.png b/dev/_images/mathmpl/math-fac074d098.png deleted file mode 100644 index efe73964502..00000000000 Binary files a/dev/_images/mathmpl/math-fac074d098.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-fb1cbbd43f.png b/dev/_images/mathmpl/math-fb1cbbd43f.png deleted file mode 100644 index 6a9139caf52..00000000000 Binary files a/dev/_images/mathmpl/math-fb1cbbd43f.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-fb3512b848.png b/dev/_images/mathmpl/math-fb3512b848.png deleted file mode 100644 index 94aff882e49..00000000000 Binary files a/dev/_images/mathmpl/math-fb3512b848.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-fb64cdd50f.png b/dev/_images/mathmpl/math-fb64cdd50f.png deleted file mode 100644 index cd824514821..00000000000 Binary files a/dev/_images/mathmpl/math-fb64cdd50f.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-fce1799ac3.png b/dev/_images/mathmpl/math-fce1799ac3.png deleted file mode 100644 index 8168a85e4d1..00000000000 Binary files a/dev/_images/mathmpl/math-fce1799ac3.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-fce9663ad9.png b/dev/_images/mathmpl/math-fce9663ad9.png deleted file mode 100644 index 62efe44850d..00000000000 Binary files a/dev/_images/mathmpl/math-fce9663ad9.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-fea35fa8ec.png b/dev/_images/mathmpl/math-fea35fa8ec.png deleted file mode 100644 index b8a20384a52..00000000000 Binary files a/dev/_images/mathmpl/math-fea35fa8ec.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-fefbb15af0.png b/dev/_images/mathmpl/math-fefbb15af0.png deleted file mode 100644 index 9d57e706607..00000000000 Binary files a/dev/_images/mathmpl/math-fefbb15af0.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-ff23293ae5.png b/dev/_images/mathmpl/math-ff23293ae5.png deleted file mode 100644 index ed2ef328977..00000000000 Binary files a/dev/_images/mathmpl/math-ff23293ae5.png and /dev/null differ diff --git a/dev/_images/mathmpl/math-ff6a67483e.png b/dev/_images/mathmpl/math-ff6a67483e.png deleted file mode 100644 index be95b45a24f..00000000000 Binary files a/dev/_images/mathmpl/math-ff6a67483e.png and /dev/null differ diff --git a/dev/_images/mathtext_asarray.png b/dev/_images/mathtext_asarray.png deleted file mode 100644 index f9e7bf06eb7..00000000000 Binary files a/dev/_images/mathtext_asarray.png and /dev/null differ diff --git a/dev/_images/mathtext_demo.png b/dev/_images/mathtext_demo.png deleted file mode 100644 index 6cc4ea3bf2a..00000000000 Binary files a/dev/_images/mathtext_demo.png and /dev/null differ diff --git a/dev/_images/mathtext_examples.png b/dev/_images/mathtext_examples.png deleted file mode 100644 index f04f2c8486f..00000000000 Binary files a/dev/_images/mathtext_examples.png and /dev/null differ diff --git a/dev/_images/mathtext_examples1.png b/dev/_images/mathtext_examples1.png deleted file mode 100644 index f04f2c8486f..00000000000 Binary files a/dev/_images/mathtext_examples1.png and /dev/null differ diff --git a/dev/_images/matplotlib_icon.png b/dev/_images/matplotlib_icon.png deleted file mode 100644 index 42c3e1b5224..00000000000 Binary files a/dev/_images/matplotlib_icon.png and /dev/null differ diff --git a/dev/_images/matshow_00.png b/dev/_images/matshow_00.png deleted file mode 100644 index c25cc1191d9..00000000000 Binary files a/dev/_images/matshow_00.png and /dev/null differ diff --git a/dev/_images/matshow_001.png b/dev/_images/matshow_001.png deleted file mode 100644 index c25cc1191d9..00000000000 Binary files a/dev/_images/matshow_001.png and /dev/null differ diff --git a/dev/_images/matshow_01.png b/dev/_images/matshow_01.png deleted file mode 100644 index 86e4d5db541..00000000000 Binary files a/dev/_images/matshow_01.png and /dev/null differ diff --git a/dev/_images/matshow_011.png b/dev/_images/matshow_011.png deleted file mode 100644 index 86e4d5db541..00000000000 Binary files a/dev/_images/matshow_011.png and /dev/null differ diff --git a/dev/_images/matshow_02.png b/dev/_images/matshow_02.png deleted file mode 100644 index 145effe75a5..00000000000 Binary files a/dev/_images/matshow_02.png and /dev/null differ diff --git a/dev/_images/matshow_021.png b/dev/_images/matshow_021.png deleted file mode 100644 index 145effe75a5..00000000000 Binary files a/dev/_images/matshow_021.png and /dev/null differ diff --git a/dev/_images/matshow_03.png b/dev/_images/matshow_03.png deleted file mode 100644 index cc20ed1bafc..00000000000 Binary files a/dev/_images/matshow_03.png and /dev/null differ diff --git a/dev/_images/matshow_031.png b/dev/_images/matshow_031.png deleted file mode 100644 index cc20ed1bafc..00000000000 Binary files a/dev/_images/matshow_031.png and /dev/null differ diff --git a/dev/_images/matshow_04.png b/dev/_images/matshow_04.png deleted file mode 100644 index b9ddabf2ef8..00000000000 Binary files a/dev/_images/matshow_04.png and /dev/null differ diff --git a/dev/_images/matshow_041.png b/dev/_images/matshow_041.png deleted file mode 100644 index b9ddabf2ef8..00000000000 Binary files a/dev/_images/matshow_041.png and /dev/null differ diff --git a/dev/_images/mixed_subplots_demo.png b/dev/_images/mixed_subplots_demo.png deleted file mode 100644 index 204968d76ad..00000000000 Binary files a/dev/_images/mixed_subplots_demo.png and /dev/null differ diff --git a/dev/_images/mixed_subplots_demo1.png b/dev/_images/mixed_subplots_demo1.png deleted file mode 100644 index 204968d76ad..00000000000 Binary files a/dev/_images/mixed_subplots_demo1.png and /dev/null differ diff --git a/dev/_images/move.png b/dev/_images/move.png deleted file mode 100644 index a42024d0d15..00000000000 Binary files a/dev/_images/move.png and /dev/null differ diff --git a/dev/_images/mri_demo.png b/dev/_images/mri_demo.png deleted file mode 100644 index 15c52b59db5..00000000000 Binary files a/dev/_images/mri_demo.png and /dev/null differ diff --git a/dev/_images/mri_with_eeg.png b/dev/_images/mri_with_eeg.png deleted file mode 100644 index 1a8b44739f8..00000000000 Binary files a/dev/_images/mri_with_eeg.png and /dev/null differ diff --git a/dev/_images/multi_image.png b/dev/_images/multi_image.png deleted file mode 100644 index 05632cfe279..00000000000 Binary files a/dev/_images/multi_image.png and /dev/null differ diff --git a/dev/_images/multicolored_line_00.png b/dev/_images/multicolored_line_00.png deleted file mode 100644 index 6603e33e39f..00000000000 Binary files a/dev/_images/multicolored_line_00.png and /dev/null differ diff --git a/dev/_images/multicolored_line_01.png b/dev/_images/multicolored_line_01.png deleted file mode 100644 index bc31d90ec42..00000000000 Binary files a/dev/_images/multicolored_line_01.png and /dev/null differ diff --git a/dev/_images/multiline.png b/dev/_images/multiline.png deleted file mode 100644 index 8924a722032..00000000000 Binary files a/dev/_images/multiline.png and /dev/null differ diff --git a/dev/_images/multiple_figs_demo_00.png b/dev/_images/multiple_figs_demo_00.png deleted file mode 100644 index 4e2d241e76b..00000000000 Binary files a/dev/_images/multiple_figs_demo_00.png and /dev/null differ diff --git a/dev/_images/multiple_figs_demo_01.png b/dev/_images/multiple_figs_demo_01.png deleted file mode 100644 index fbe6fcdf78c..00000000000 Binary files a/dev/_images/multiple_figs_demo_01.png and /dev/null differ diff --git a/dev/_images/multiple_yaxis_with_spines.png b/dev/_images/multiple_yaxis_with_spines.png deleted file mode 100644 index 4cc6811d63f..00000000000 Binary files a/dev/_images/multiple_yaxis_with_spines.png and /dev/null differ diff --git a/dev/_images/nan_test.png b/dev/_images/nan_test.png deleted file mode 100644 index 983061c8096..00000000000 Binary files a/dev/_images/nan_test.png and /dev/null differ diff --git a/dev/_images/newscalarformatter_demo_00.png b/dev/_images/newscalarformatter_demo_00.png deleted file mode 100644 index 1837be4b971..00000000000 Binary files a/dev/_images/newscalarformatter_demo_00.png and /dev/null differ diff --git a/dev/_images/newscalarformatter_demo_01.png b/dev/_images/newscalarformatter_demo_01.png deleted file mode 100644 index 3b22f9ba718..00000000000 Binary files a/dev/_images/newscalarformatter_demo_01.png and /dev/null differ diff --git a/dev/_images/newscalarformatter_demo_02.png b/dev/_images/newscalarformatter_demo_02.png deleted file mode 100644 index 6cd955be7b1..00000000000 Binary files a/dev/_images/newscalarformatter_demo_02.png and /dev/null differ diff --git a/dev/_images/newscalarformatter_demo_03.png b/dev/_images/newscalarformatter_demo_03.png deleted file mode 100644 index 986c0bc2bf4..00000000000 Binary files a/dev/_images/newscalarformatter_demo_03.png and /dev/null differ diff --git a/dev/_images/offset_demo.png b/dev/_images/offset_demo.png deleted file mode 100644 index 57571282114..00000000000 Binary files a/dev/_images/offset_demo.png and /dev/null differ diff --git a/dev/_images/offset_demo1.png b/dev/_images/offset_demo1.png deleted file mode 100644 index 57571282114..00000000000 Binary files a/dev/_images/offset_demo1.png and /dev/null differ diff --git a/dev/_images/parasite_simple.png b/dev/_images/parasite_simple.png deleted file mode 100644 index 82ffaf21e3a..00000000000 Binary files a/dev/_images/parasite_simple.png and /dev/null differ diff --git a/dev/_images/parasite_simple2.png b/dev/_images/parasite_simple2.png deleted file mode 100644 index 96a89ec7e3f..00000000000 Binary files a/dev/_images/parasite_simple2.png and /dev/null differ diff --git a/dev/_images/parasite_simple21.png b/dev/_images/parasite_simple21.png deleted file mode 100644 index bfea70ae42a..00000000000 Binary files a/dev/_images/parasite_simple21.png and /dev/null differ diff --git a/dev/_images/patch_collection.png b/dev/_images/patch_collection.png deleted file mode 100644 index a49c121d4e5..00000000000 Binary files a/dev/_images/patch_collection.png and /dev/null differ diff --git a/dev/_images/path_patch_demo.png b/dev/_images/path_patch_demo.png deleted file mode 100644 index 759babdca13..00000000000 Binary files a/dev/_images/path_patch_demo.png and /dev/null differ diff --git a/dev/_images/path_patch_demo1.png b/dev/_images/path_patch_demo1.png deleted file mode 100644 index 759babdca13..00000000000 Binary files a/dev/_images/path_patch_demo1.png and /dev/null differ diff --git a/dev/_images/path_tutorial-1.png b/dev/_images/path_tutorial-1.png deleted file mode 100644 index 75397957af3..00000000000 Binary files a/dev/_images/path_tutorial-1.png and /dev/null differ diff --git a/dev/_images/path_tutorial-2.png b/dev/_images/path_tutorial-2.png deleted file mode 100644 index f65b51f5c59..00000000000 Binary files a/dev/_images/path_tutorial-2.png and /dev/null differ diff --git a/dev/_images/patheffect_demo.png b/dev/_images/patheffect_demo.png deleted file mode 100644 index 1551774c439..00000000000 Binary files a/dev/_images/patheffect_demo.png and /dev/null differ diff --git a/dev/_images/pathpatch3d_demo.png b/dev/_images/pathpatch3d_demo.png deleted file mode 100644 index 2f3c886eb16..00000000000 Binary files a/dev/_images/pathpatch3d_demo.png and /dev/null differ diff --git a/dev/_images/pcolor_demo.png b/dev/_images/pcolor_demo.png deleted file mode 100644 index 0eac9431af3..00000000000 Binary files a/dev/_images/pcolor_demo.png and /dev/null differ diff --git a/dev/_images/pcolor_demo2.png b/dev/_images/pcolor_demo2.png deleted file mode 100644 index e54f7e727fb..00000000000 Binary files a/dev/_images/pcolor_demo2.png and /dev/null differ diff --git a/dev/_images/pcolor_log.png b/dev/_images/pcolor_log.png deleted file mode 100644 index 2eba1802c2f..00000000000 Binary files a/dev/_images/pcolor_log.png and /dev/null differ diff --git a/dev/_images/pcolor_small.png b/dev/_images/pcolor_small.png deleted file mode 100644 index 47a6773fe63..00000000000 Binary files a/dev/_images/pcolor_small.png and /dev/null differ diff --git a/dev/_images/pcolormesh_levels.png b/dev/_images/pcolormesh_levels.png deleted file mode 100644 index 1a93c9261c7..00000000000 Binary files a/dev/_images/pcolormesh_levels.png and /dev/null differ diff --git a/dev/_images/pgf_fonts.png b/dev/_images/pgf_fonts.png deleted file mode 100644 index d4ef689f9b3..00000000000 Binary files a/dev/_images/pgf_fonts.png and /dev/null differ diff --git a/dev/_images/pgf_preamble.png b/dev/_images/pgf_preamble.png deleted file mode 100644 index 6841e3b9bdd..00000000000 Binary files a/dev/_images/pgf_preamble.png and /dev/null differ diff --git a/dev/_images/pgf_texsystem.png b/dev/_images/pgf_texsystem.png deleted file mode 100644 index 6075e7b764d..00000000000 Binary files a/dev/_images/pgf_texsystem.png and /dev/null differ diff --git a/dev/_images/pie_demo.png b/dev/_images/pie_demo.png deleted file mode 100644 index 47ae40a337f..00000000000 Binary files a/dev/_images/pie_demo.png and /dev/null differ diff --git a/dev/_images/pie_demo1.png b/dev/_images/pie_demo1.png deleted file mode 100644 index 47ae40a337f..00000000000 Binary files a/dev/_images/pie_demo1.png and /dev/null differ diff --git a/dev/_images/pie_demo2.png b/dev/_images/pie_demo2.png deleted file mode 100644 index 61d32dc277f..00000000000 Binary files a/dev/_images/pie_demo2.png and /dev/null differ diff --git a/dev/_images/pie_demo_features.png b/dev/_images/pie_demo_features.png deleted file mode 100644 index 838f93654f1..00000000000 Binary files a/dev/_images/pie_demo_features.png and /dev/null differ diff --git a/dev/_images/pie_demo_features1.png b/dev/_images/pie_demo_features1.png deleted file mode 100644 index 838f93654f1..00000000000 Binary files a/dev/_images/pie_demo_features1.png and /dev/null differ diff --git a/dev/_images/plotfile_demo_00.png b/dev/_images/plotfile_demo_00.png deleted file mode 100644 index 419fed952d1..00000000000 Binary files a/dev/_images/plotfile_demo_00.png and /dev/null differ diff --git a/dev/_images/plotfile_demo_01.png b/dev/_images/plotfile_demo_01.png deleted file mode 100644 index 419fed952d1..00000000000 Binary files a/dev/_images/plotfile_demo_01.png and /dev/null differ diff --git a/dev/_images/plotfile_demo_02.png b/dev/_images/plotfile_demo_02.png deleted file mode 100644 index 9c9ecf18ce0..00000000000 Binary files a/dev/_images/plotfile_demo_02.png and /dev/null differ diff --git a/dev/_images/plotfile_demo_03.png b/dev/_images/plotfile_demo_03.png deleted file mode 100644 index 9c9ecf18ce0..00000000000 Binary files a/dev/_images/plotfile_demo_03.png and /dev/null differ diff --git a/dev/_images/plotfile_demo_04.png b/dev/_images/plotfile_demo_04.png deleted file mode 100644 index 00138da79ec..00000000000 Binary files a/dev/_images/plotfile_demo_04.png and /dev/null differ diff --git a/dev/_images/plotfile_demo_05.png b/dev/_images/plotfile_demo_05.png deleted file mode 100644 index e1fde25b956..00000000000 Binary files a/dev/_images/plotfile_demo_05.png and /dev/null differ diff --git a/dev/_images/plotfile_demo_06.png b/dev/_images/plotfile_demo_06.png deleted file mode 100644 index fd43dd773f5..00000000000 Binary files a/dev/_images/plotfile_demo_06.png and /dev/null differ diff --git a/dev/_images/plotfile_demo_07.png b/dev/_images/plotfile_demo_07.png deleted file mode 100644 index 6fb77949528..00000000000 Binary files a/dev/_images/plotfile_demo_07.png and /dev/null differ diff --git a/dev/_images/plotmap.png b/dev/_images/plotmap.png deleted file mode 100644 index f48fd5c198a..00000000000 Binary files a/dev/_images/plotmap.png and /dev/null differ diff --git a/dev/_images/polar_bar.png b/dev/_images/polar_bar.png deleted file mode 100644 index 2121c6017d5..00000000000 Binary files a/dev/_images/polar_bar.png and /dev/null differ diff --git a/dev/_images/polar_bar_demo.png b/dev/_images/polar_bar_demo.png deleted file mode 100644 index 50f9004d1c0..00000000000 Binary files a/dev/_images/polar_bar_demo.png and /dev/null differ diff --git a/dev/_images/polar_demo.png b/dev/_images/polar_demo.png deleted file mode 100644 index 4cf50f4845b..00000000000 Binary files a/dev/_images/polar_demo.png and /dev/null differ diff --git a/dev/_images/polar_demo1.png b/dev/_images/polar_demo1.png deleted file mode 100644 index 4cf50f4845b..00000000000 Binary files a/dev/_images/polar_demo1.png and /dev/null differ diff --git a/dev/_images/polar_legend.png b/dev/_images/polar_legend.png deleted file mode 100644 index fdfec7494d3..00000000000 Binary files a/dev/_images/polar_legend.png and /dev/null differ diff --git a/dev/_images/polar_scatter.png b/dev/_images/polar_scatter.png deleted file mode 100644 index 3d54dfaf133..00000000000 Binary files a/dev/_images/polar_scatter.png and /dev/null differ diff --git a/dev/_images/polar_scatter_demo.png b/dev/_images/polar_scatter_demo.png deleted file mode 100644 index 961c476bcec..00000000000 Binary files a/dev/_images/polar_scatter_demo.png and /dev/null differ diff --git a/dev/_images/polys3d_demo.png b/dev/_images/polys3d_demo.png deleted file mode 100644 index 4c2900d59a8..00000000000 Binary files a/dev/_images/polys3d_demo.png and /dev/null differ diff --git a/dev/_images/polys3d_demo1.png b/dev/_images/polys3d_demo1.png deleted file mode 100644 index 4c2900d59a8..00000000000 Binary files a/dev/_images/polys3d_demo1.png and /dev/null differ diff --git a/dev/_images/poormans_contour.png b/dev/_images/poormans_contour.png deleted file mode 100644 index 7924a91411e..00000000000 Binary files a/dev/_images/poormans_contour.png and /dev/null differ diff --git a/dev/_images/psd_demo.png b/dev/_images/psd_demo.png deleted file mode 100644 index 7e25581cc62..00000000000 Binary files a/dev/_images/psd_demo.png and /dev/null differ diff --git a/dev/_images/psd_demo1.png b/dev/_images/psd_demo1.png deleted file mode 100644 index 7e25581cc62..00000000000 Binary files a/dev/_images/psd_demo1.png and /dev/null differ diff --git a/dev/_images/psd_demo2.png b/dev/_images/psd_demo2.png deleted file mode 100644 index 3f20e5f9775..00000000000 Binary files a/dev/_images/psd_demo2.png and /dev/null differ diff --git a/dev/_images/psd_demo3.png b/dev/_images/psd_demo3.png deleted file mode 100644 index 67b36e336cb..00000000000 Binary files a/dev/_images/psd_demo3.png and /dev/null differ diff --git a/dev/_images/psd_demo_complex.png b/dev/_images/psd_demo_complex.png deleted file mode 100644 index 14e94475f41..00000000000 Binary files a/dev/_images/psd_demo_complex.png and /dev/null differ diff --git a/dev/_images/pull_button.png b/dev/_images/pull_button.png deleted file mode 100644 index e5031681b97..00000000000 Binary files a/dev/_images/pull_button.png and /dev/null differ diff --git a/dev/_images/pyplot_annotate.png b/dev/_images/pyplot_annotate.png deleted file mode 100644 index b23ed24e83e..00000000000 Binary files a/dev/_images/pyplot_annotate.png and /dev/null differ diff --git a/dev/_images/pyplot_formatstr.png b/dev/_images/pyplot_formatstr.png deleted file mode 100644 index cda09602438..00000000000 Binary files a/dev/_images/pyplot_formatstr.png and /dev/null differ diff --git a/dev/_images/pyplot_mathtext.png b/dev/_images/pyplot_mathtext.png deleted file mode 100644 index 70d327f045d..00000000000 Binary files a/dev/_images/pyplot_mathtext.png and /dev/null differ diff --git a/dev/_images/pyplot_simple.png b/dev/_images/pyplot_simple.png deleted file mode 100644 index 384cb33bb11..00000000000 Binary files a/dev/_images/pyplot_simple.png and /dev/null differ diff --git a/dev/_images/pyplot_text.png b/dev/_images/pyplot_text.png deleted file mode 100644 index a95bf3cb192..00000000000 Binary files a/dev/_images/pyplot_text.png and /dev/null differ diff --git a/dev/_images/pyplot_three.png b/dev/_images/pyplot_three.png deleted file mode 100644 index db1534c9453..00000000000 Binary files a/dev/_images/pyplot_three.png and /dev/null differ diff --git a/dev/_images/pyplot_two_subplots.png b/dev/_images/pyplot_two_subplots.png deleted file mode 100644 index 90b99774e4c..00000000000 Binary files a/dev/_images/pyplot_two_subplots.png and /dev/null differ diff --git a/dev/_images/pythonic_matplotlib.png b/dev/_images/pythonic_matplotlib.png deleted file mode 100644 index 924d52cc719..00000000000 Binary files a/dev/_images/pythonic_matplotlib.png and /dev/null differ diff --git a/dev/_images/quad_bezier.png b/dev/_images/quad_bezier.png deleted file mode 100644 index 53557c61fea..00000000000 Binary files a/dev/_images/quad_bezier.png and /dev/null differ diff --git a/dev/_images/quadmesh_demo.png b/dev/_images/quadmesh_demo.png deleted file mode 100644 index e7704213259..00000000000 Binary files a/dev/_images/quadmesh_demo.png and /dev/null differ diff --git a/dev/_images/quiver_demo_00.png b/dev/_images/quiver_demo_00.png deleted file mode 100644 index e72806d913d..00000000000 Binary files a/dev/_images/quiver_demo_00.png and /dev/null differ diff --git a/dev/_images/quiver_demo_01.png b/dev/_images/quiver_demo_01.png deleted file mode 100644 index 4a5b96079d9..00000000000 Binary files a/dev/_images/quiver_demo_01.png and /dev/null differ diff --git a/dev/_images/quiver_demo_02.png b/dev/_images/quiver_demo_02.png deleted file mode 100644 index 56f1981f199..00000000000 Binary files a/dev/_images/quiver_demo_02.png and /dev/null differ diff --git a/dev/_images/quiver_demo_03.png b/dev/_images/quiver_demo_03.png deleted file mode 100644 index b5f527a6fdd..00000000000 Binary files a/dev/_images/quiver_demo_03.png and /dev/null differ diff --git a/dev/_images/quiver_demo_04.png b/dev/_images/quiver_demo_04.png deleted file mode 100644 index 73c86b8e68f..00000000000 Binary files a/dev/_images/quiver_demo_04.png and /dev/null differ diff --git a/dev/_images/quiver_demo_05.png b/dev/_images/quiver_demo_05.png deleted file mode 100644 index 14b3deeecc7..00000000000 Binary files a/dev/_images/quiver_demo_05.png and /dev/null differ diff --git a/dev/_images/radar_chart.png b/dev/_images/radar_chart.png deleted file mode 100644 index 58a5414a8ec..00000000000 Binary files a/dev/_images/radar_chart.png and /dev/null differ diff --git a/dev/_images/radian_demo.png b/dev/_images/radian_demo.png deleted file mode 100644 index f70252c9cee..00000000000 Binary files a/dev/_images/radian_demo.png and /dev/null differ diff --git a/dev/_images/recipes-2.png b/dev/_images/recipes-2.png deleted file mode 100644 index 0b6ae241122..00000000000 Binary files a/dev/_images/recipes-2.png and /dev/null differ diff --git a/dev/_images/recipes-3.png b/dev/_images/recipes-3.png deleted file mode 100644 index 1e94997cb3d..00000000000 Binary files a/dev/_images/recipes-3.png and /dev/null differ diff --git a/dev/_images/recipes-4.png b/dev/_images/recipes-4.png deleted file mode 100644 index 370b6ee5970..00000000000 Binary files a/dev/_images/recipes-4.png and /dev/null differ diff --git a/dev/_images/recipes-5.png b/dev/_images/recipes-5.png deleted file mode 100644 index c4b985d18f7..00000000000 Binary files a/dev/_images/recipes-5.png and /dev/null differ diff --git a/dev/_images/recipes-6.png b/dev/_images/recipes-6.png deleted file mode 100644 index e26f5771cd8..00000000000 Binary files a/dev/_images/recipes-6.png and /dev/null differ diff --git a/dev/_images/recipes-7.png b/dev/_images/recipes-7.png deleted file mode 100644 index e9fe4dd859c..00000000000 Binary files a/dev/_images/recipes-7.png and /dev/null differ diff --git a/dev/_images/recipes-8.png b/dev/_images/recipes-8.png deleted file mode 100644 index 40e30a75fc5..00000000000 Binary files a/dev/_images/recipes-8.png and /dev/null differ diff --git a/dev/_images/rotate_axes3d_demo.png b/dev/_images/rotate_axes3d_demo.png deleted file mode 100644 index d526887f3ec..00000000000 Binary files a/dev/_images/rotate_axes3d_demo.png and /dev/null differ diff --git a/dev/_images/sankey_demo_basics_00.png b/dev/_images/sankey_demo_basics_00.png deleted file mode 100644 index ab0d6570927..00000000000 Binary files a/dev/_images/sankey_demo_basics_00.png and /dev/null differ diff --git a/dev/_images/sankey_demo_basics_001.png b/dev/_images/sankey_demo_basics_001.png deleted file mode 100644 index ab0d6570927..00000000000 Binary files a/dev/_images/sankey_demo_basics_001.png and /dev/null differ diff --git a/dev/_images/sankey_demo_basics_01.png b/dev/_images/sankey_demo_basics_01.png deleted file mode 100644 index bb6466b2b38..00000000000 Binary files a/dev/_images/sankey_demo_basics_01.png and /dev/null differ diff --git a/dev/_images/sankey_demo_basics_011.png b/dev/_images/sankey_demo_basics_011.png deleted file mode 100644 index bb6466b2b38..00000000000 Binary files a/dev/_images/sankey_demo_basics_011.png and /dev/null differ diff --git a/dev/_images/sankey_demo_basics_02.png b/dev/_images/sankey_demo_basics_02.png deleted file mode 100644 index 40426d76696..00000000000 Binary files a/dev/_images/sankey_demo_basics_02.png and /dev/null differ diff --git a/dev/_images/sankey_demo_basics_021.png b/dev/_images/sankey_demo_basics_021.png deleted file mode 100644 index 40426d76696..00000000000 Binary files a/dev/_images/sankey_demo_basics_021.png and /dev/null differ diff --git a/dev/_images/sankey_demo_links.png b/dev/_images/sankey_demo_links.png deleted file mode 100644 index 48f6cd288d0..00000000000 Binary files a/dev/_images/sankey_demo_links.png and /dev/null differ diff --git a/dev/_images/sankey_demo_old.png b/dev/_images/sankey_demo_old.png deleted file mode 100644 index b4f2dc93b69..00000000000 Binary files a/dev/_images/sankey_demo_old.png and /dev/null differ diff --git a/dev/_images/sankey_demo_rankine.png b/dev/_images/sankey_demo_rankine.png deleted file mode 100644 index ebe66ceae6a..00000000000 Binary files a/dev/_images/sankey_demo_rankine.png and /dev/null differ diff --git a/dev/_images/sankey_demo_rankine1.png b/dev/_images/sankey_demo_rankine1.png deleted file mode 100644 index ebe66ceae6a..00000000000 Binary files a/dev/_images/sankey_demo_rankine1.png and /dev/null differ diff --git a/dev/_images/scatter3d_demo.png b/dev/_images/scatter3d_demo.png deleted file mode 100644 index 80af332ef2b..00000000000 Binary files a/dev/_images/scatter3d_demo.png and /dev/null differ diff --git a/dev/_images/scatter3d_demo1.png b/dev/_images/scatter3d_demo1.png deleted file mode 100644 index 80af332ef2b..00000000000 Binary files a/dev/_images/scatter3d_demo1.png and /dev/null differ diff --git a/dev/_images/scatter_custom_symbol.png b/dev/_images/scatter_custom_symbol.png deleted file mode 100644 index 2964c9fee16..00000000000 Binary files a/dev/_images/scatter_custom_symbol.png and /dev/null differ diff --git a/dev/_images/scatter_demo.png b/dev/_images/scatter_demo.png deleted file mode 100644 index 35f71e8b9d4..00000000000 Binary files a/dev/_images/scatter_demo.png and /dev/null differ diff --git a/dev/_images/scatter_demo1.png b/dev/_images/scatter_demo1.png deleted file mode 100644 index 35f71e8b9d4..00000000000 Binary files a/dev/_images/scatter_demo1.png and /dev/null differ diff --git a/dev/_images/scatter_demo2.png b/dev/_images/scatter_demo2.png deleted file mode 100644 index bff28e89cae..00000000000 Binary files a/dev/_images/scatter_demo2.png and /dev/null differ diff --git a/dev/_images/scatter_demo21.png b/dev/_images/scatter_demo21.png deleted file mode 100644 index bff28e89cae..00000000000 Binary files a/dev/_images/scatter_demo21.png and /dev/null differ diff --git a/dev/_images/scatter_hist.png b/dev/_images/scatter_hist.png deleted file mode 100644 index 5dd584aa089..00000000000 Binary files a/dev/_images/scatter_hist.png and /dev/null differ diff --git a/dev/_images/scatter_hist1.png b/dev/_images/scatter_hist1.png deleted file mode 100644 index b6406cc6495..00000000000 Binary files a/dev/_images/scatter_hist1.png and /dev/null differ diff --git a/dev/_images/scatter_hist2.png b/dev/_images/scatter_hist2.png deleted file mode 100644 index 08c30989f1a..00000000000 Binary files a/dev/_images/scatter_hist2.png and /dev/null differ diff --git a/dev/_images/scatter_masked.png b/dev/_images/scatter_masked.png deleted file mode 100644 index 62fc3071a93..00000000000 Binary files a/dev/_images/scatter_masked.png and /dev/null differ diff --git a/dev/_images/scatter_piecharts.png b/dev/_images/scatter_piecharts.png deleted file mode 100644 index 75657bae984..00000000000 Binary files a/dev/_images/scatter_piecharts.png and /dev/null differ diff --git a/dev/_images/scatter_star_poly.png b/dev/_images/scatter_star_poly.png deleted file mode 100644 index e18b339e0c6..00000000000 Binary files a/dev/_images/scatter_star_poly.png and /dev/null differ diff --git a/dev/_images/scatter_symbol.png b/dev/_images/scatter_symbol.png deleted file mode 100644 index 1d090a6d1d0..00000000000 Binary files a/dev/_images/scatter_symbol.png and /dev/null differ diff --git a/dev/_images/set_and_get.png b/dev/_images/set_and_get.png deleted file mode 100644 index cbaa8a130ad..00000000000 Binary files a/dev/_images/set_and_get.png and /dev/null differ diff --git a/dev/_images/shading_example.png b/dev/_images/shading_example.png deleted file mode 100644 index 76f24772314..00000000000 Binary files a/dev/_images/shading_example.png and /dev/null differ diff --git a/dev/_images/shared_axis_demo.png b/dev/_images/shared_axis_demo.png deleted file mode 100644 index 74f3f3dc7db..00000000000 Binary files a/dev/_images/shared_axis_demo.png and /dev/null differ diff --git a/dev/_images/show_colormaps.png b/dev/_images/show_colormaps.png deleted file mode 100644 index 26707cf6722..00000000000 Binary files a/dev/_images/show_colormaps.png and /dev/null differ diff --git a/dev/_images/simple_anchored_artists.png b/dev/_images/simple_anchored_artists.png deleted file mode 100644 index 28e27973e35..00000000000 Binary files a/dev/_images/simple_anchored_artists.png and /dev/null differ diff --git a/dev/_images/simple_anchored_artists1.png b/dev/_images/simple_anchored_artists1.png deleted file mode 100644 index 28e27973e35..00000000000 Binary files a/dev/_images/simple_anchored_artists1.png and /dev/null differ diff --git a/dev/_images/simple_axes_divider2.png b/dev/_images/simple_axes_divider2.png deleted file mode 100644 index f942127bd00..00000000000 Binary files a/dev/_images/simple_axes_divider2.png and /dev/null differ diff --git a/dev/_images/simple_axes_divider3.png b/dev/_images/simple_axes_divider3.png deleted file mode 100644 index 001d067f9d6..00000000000 Binary files a/dev/_images/simple_axes_divider3.png and /dev/null differ diff --git a/dev/_images/simple_axesgrid.png b/dev/_images/simple_axesgrid.png deleted file mode 100644 index 1beeaf6af9e..00000000000 Binary files a/dev/_images/simple_axesgrid.png and /dev/null differ diff --git a/dev/_images/simple_axesgrid1.png b/dev/_images/simple_axesgrid1.png deleted file mode 100644 index 1beeaf6af9e..00000000000 Binary files a/dev/_images/simple_axesgrid1.png and /dev/null differ diff --git a/dev/_images/simple_axesgrid2.png b/dev/_images/simple_axesgrid2.png deleted file mode 100644 index 3efc6a415a8..00000000000 Binary files a/dev/_images/simple_axesgrid2.png and /dev/null differ diff --git a/dev/_images/simple_axesgrid21.png b/dev/_images/simple_axesgrid21.png deleted file mode 100644 index 3efc6a415a8..00000000000 Binary files a/dev/_images/simple_axesgrid21.png and /dev/null differ diff --git a/dev/_images/simple_axis_direction01.png b/dev/_images/simple_axis_direction01.png deleted file mode 100644 index 8af9d800bc0..00000000000 Binary files a/dev/_images/simple_axis_direction01.png and /dev/null differ diff --git a/dev/_images/simple_axis_direction03.png b/dev/_images/simple_axis_direction03.png deleted file mode 100644 index 684c9cac96c..00000000000 Binary files a/dev/_images/simple_axis_direction03.png and /dev/null differ diff --git a/dev/_images/simple_axis_pad.png b/dev/_images/simple_axis_pad.png deleted file mode 100644 index 8f3c7b49ad4..00000000000 Binary files a/dev/_images/simple_axis_pad.png and /dev/null differ diff --git a/dev/_images/simple_axisartist1.png b/dev/_images/simple_axisartist1.png deleted file mode 100644 index bc1b8fd258f..00000000000 Binary files a/dev/_images/simple_axisartist1.png and /dev/null differ diff --git a/dev/_images/simple_axisline3.png b/dev/_images/simple_axisline3.png deleted file mode 100644 index 5c8f33c7eae..00000000000 Binary files a/dev/_images/simple_axisline3.png and /dev/null differ diff --git a/dev/_images/simple_axisline4.png b/dev/_images/simple_axisline4.png deleted file mode 100644 index 693519f1c4b..00000000000 Binary files a/dev/_images/simple_axisline4.png and /dev/null differ diff --git a/dev/_images/simple_axisline41.png b/dev/_images/simple_axisline41.png deleted file mode 100644 index 693519f1c4b..00000000000 Binary files a/dev/_images/simple_axisline41.png and /dev/null differ diff --git a/dev/_images/simple_colorbar.png b/dev/_images/simple_colorbar.png deleted file mode 100644 index 605852236c7..00000000000 Binary files a/dev/_images/simple_colorbar.png and /dev/null differ diff --git a/dev/_images/simple_legend01.png b/dev/_images/simple_legend01.png deleted file mode 100644 index 203d6daafda..00000000000 Binary files a/dev/_images/simple_legend01.png and /dev/null differ diff --git a/dev/_images/simple_legend02.png b/dev/_images/simple_legend02.png deleted file mode 100644 index 6cf06e44102..00000000000 Binary files a/dev/_images/simple_legend02.png and /dev/null differ diff --git a/dev/_images/simple_plot.png b/dev/_images/simple_plot.png deleted file mode 100644 index 73856a283c8..00000000000 Binary files a/dev/_images/simple_plot.png and /dev/null differ diff --git a/dev/_images/simple_plot1.png b/dev/_images/simple_plot1.png deleted file mode 100644 index 73856a283c8..00000000000 Binary files a/dev/_images/simple_plot1.png and /dev/null differ diff --git a/dev/_images/simple_rgb.png b/dev/_images/simple_rgb.png deleted file mode 100644 index 5f33f38a236..00000000000 Binary files a/dev/_images/simple_rgb.png and /dev/null differ diff --git a/dev/_images/slider_demo.png b/dev/_images/slider_demo.png deleted file mode 100644 index 110c98a9040..00000000000 Binary files a/dev/_images/slider_demo.png and /dev/null differ diff --git a/dev/_images/span_regions.png b/dev/_images/span_regions.png deleted file mode 100644 index 5507fc32e19..00000000000 Binary files a/dev/_images/span_regions.png and /dev/null differ diff --git a/dev/_images/specgram_demo.png b/dev/_images/specgram_demo.png deleted file mode 100644 index 18ee49b8a36..00000000000 Binary files a/dev/_images/specgram_demo.png and /dev/null differ diff --git a/dev/_images/specgram_demo1.png b/dev/_images/specgram_demo1.png deleted file mode 100644 index 18ee49b8a36..00000000000 Binary files a/dev/_images/specgram_demo1.png and /dev/null differ diff --git a/dev/_images/spine_placement_demo_00.png b/dev/_images/spine_placement_demo_00.png deleted file mode 100644 index 38d0d43e927..00000000000 Binary files a/dev/_images/spine_placement_demo_00.png and /dev/null differ diff --git a/dev/_images/spine_placement_demo_01.png b/dev/_images/spine_placement_demo_01.png deleted file mode 100644 index 9625e4c3092..00000000000 Binary files a/dev/_images/spine_placement_demo_01.png and /dev/null differ diff --git a/dev/_images/spine_placement_demo_02.png b/dev/_images/spine_placement_demo_02.png deleted file mode 100644 index dd0a721e1b5..00000000000 Binary files a/dev/_images/spine_placement_demo_02.png and /dev/null differ diff --git a/dev/_images/spine_placement_demo_03.png b/dev/_images/spine_placement_demo_03.png deleted file mode 100644 index 1e99f531180..00000000000 Binary files a/dev/_images/spine_placement_demo_03.png and /dev/null differ diff --git a/dev/_images/spines_demo.png b/dev/_images/spines_demo.png deleted file mode 100644 index 137793de10a..00000000000 Binary files a/dev/_images/spines_demo.png and /dev/null differ diff --git a/dev/_images/spines_demo_bounds.png b/dev/_images/spines_demo_bounds.png deleted file mode 100644 index 9710b6fe25d..00000000000 Binary files a/dev/_images/spines_demo_bounds.png and /dev/null differ diff --git a/dev/_images/spines_demo_dropped.png b/dev/_images/spines_demo_dropped.png deleted file mode 100644 index 5eacf48dc13..00000000000 Binary files a/dev/_images/spines_demo_dropped.png and /dev/null differ diff --git a/dev/_images/spy_demos.png b/dev/_images/spy_demos.png deleted file mode 100644 index 4127d246e83..00000000000 Binary files a/dev/_images/spy_demos.png and /dev/null differ diff --git a/dev/_images/stackplot_demo2.png b/dev/_images/stackplot_demo2.png deleted file mode 100644 index 0da5cb7dc00..00000000000 Binary files a/dev/_images/stackplot_demo2.png and /dev/null differ diff --git a/dev/_images/stackplot_demo21.png b/dev/_images/stackplot_demo21.png deleted file mode 100644 index 0da5cb7dc00..00000000000 Binary files a/dev/_images/stackplot_demo21.png and /dev/null differ diff --git a/dev/_images/stackplot_demo_00_00.png b/dev/_images/stackplot_demo_00_00.png deleted file mode 100644 index 7a9962cc152..00000000000 Binary files a/dev/_images/stackplot_demo_00_00.png and /dev/null differ diff --git a/dev/_images/stackplot_demo_01_00.png b/dev/_images/stackplot_demo_01_00.png deleted file mode 100644 index 5bb139833f8..00000000000 Binary files a/dev/_images/stackplot_demo_01_00.png and /dev/null differ diff --git a/dev/_images/stem_plot.png b/dev/_images/stem_plot.png deleted file mode 100644 index e3a67fd173f..00000000000 Binary files a/dev/_images/stem_plot.png and /dev/null differ diff --git a/dev/_images/stem_plot1.png b/dev/_images/stem_plot1.png deleted file mode 100644 index e3a67fd173f..00000000000 Binary files a/dev/_images/stem_plot1.png and /dev/null differ diff --git a/dev/_images/step_demo.png b/dev/_images/step_demo.png deleted file mode 100644 index 01a08d687fe..00000000000 Binary files a/dev/_images/step_demo.png and /dev/null differ diff --git a/dev/_images/stinkbug.png b/dev/_images/stinkbug.png deleted file mode 100644 index 6d6c4d05696..00000000000 Binary files a/dev/_images/stinkbug.png and /dev/null differ diff --git a/dev/_images/stix_fonts_demo.png b/dev/_images/stix_fonts_demo.png deleted file mode 100644 index e6dc3c023d6..00000000000 Binary files a/dev/_images/stix_fonts_demo.png and /dev/null differ diff --git a/dev/_images/stix_fontset.png b/dev/_images/stix_fontset.png deleted file mode 100644 index ed1815274ce..00000000000 Binary files a/dev/_images/stix_fontset.png and /dev/null differ diff --git a/dev/_images/stixsans_fontset.png b/dev/_images/stixsans_fontset.png deleted file mode 100644 index 62226b6c306..00000000000 Binary files a/dev/_images/stixsans_fontset.png and /dev/null differ diff --git a/dev/_images/stock_demo.png b/dev/_images/stock_demo.png deleted file mode 100644 index f37bbd89444..00000000000 Binary files a/dev/_images/stock_demo.png and /dev/null differ diff --git a/dev/_images/streamplot_demo_00.png b/dev/_images/streamplot_demo_00.png deleted file mode 100644 index bce6b08d9d0..00000000000 Binary files a/dev/_images/streamplot_demo_00.png and /dev/null differ diff --git a/dev/_images/streamplot_demo_001.png b/dev/_images/streamplot_demo_001.png deleted file mode 100644 index bce6b08d9d0..00000000000 Binary files a/dev/_images/streamplot_demo_001.png and /dev/null differ diff --git a/dev/_images/streamplot_demo_01.png b/dev/_images/streamplot_demo_01.png deleted file mode 100644 index 7127b247d20..00000000000 Binary files a/dev/_images/streamplot_demo_01.png and /dev/null differ diff --git a/dev/_images/streamplot_demo_011.png b/dev/_images/streamplot_demo_011.png deleted file mode 100644 index 7127b247d20..00000000000 Binary files a/dev/_images/streamplot_demo_011.png and /dev/null differ diff --git a/dev/_images/streamplot_demo_features_00.png b/dev/_images/streamplot_demo_features_00.png deleted file mode 100644 index 37e26bf5864..00000000000 Binary files a/dev/_images/streamplot_demo_features_00.png and /dev/null differ diff --git a/dev/_images/streamplot_demo_features_001.png b/dev/_images/streamplot_demo_features_001.png deleted file mode 100644 index 37e26bf5864..00000000000 Binary files a/dev/_images/streamplot_demo_features_001.png and /dev/null differ diff --git a/dev/_images/streamplot_demo_features_01.png b/dev/_images/streamplot_demo_features_01.png deleted file mode 100644 index fde42ff773c..00000000000 Binary files a/dev/_images/streamplot_demo_features_01.png and /dev/null differ diff --git a/dev/_images/streamplot_demo_features_011.png b/dev/_images/streamplot_demo_features_011.png deleted file mode 100644 index fde42ff773c..00000000000 Binary files a/dev/_images/streamplot_demo_features_011.png and /dev/null differ diff --git a/dev/_images/streamplot_demo_masking.png b/dev/_images/streamplot_demo_masking.png deleted file mode 100644 index 6b9b196870d..00000000000 Binary files a/dev/_images/streamplot_demo_masking.png and /dev/null differ diff --git a/dev/_images/streamplot_with_mask.png b/dev/_images/streamplot_with_mask.png deleted file mode 100644 index 981487eae90..00000000000 Binary files a/dev/_images/streamplot_with_mask.png and /dev/null differ diff --git a/dev/_images/subplot3d_demo.png b/dev/_images/subplot3d_demo.png deleted file mode 100644 index 3ef1b8b1e0d..00000000000 Binary files a/dev/_images/subplot3d_demo.png and /dev/null differ diff --git a/dev/_images/subplot3d_demo1.png b/dev/_images/subplot3d_demo1.png deleted file mode 100644 index 3ef1b8b1e0d..00000000000 Binary files a/dev/_images/subplot3d_demo1.png and /dev/null differ diff --git a/dev/_images/subplot_demo.png b/dev/_images/subplot_demo.png deleted file mode 100644 index fa2f4fa00dd..00000000000 Binary files a/dev/_images/subplot_demo.png and /dev/null differ diff --git a/dev/_images/subplot_demo1.png b/dev/_images/subplot_demo1.png deleted file mode 100644 index 913324d6846..00000000000 Binary files a/dev/_images/subplot_demo1.png and /dev/null differ diff --git a/dev/_images/subplot_demo2.png b/dev/_images/subplot_demo2.png deleted file mode 100644 index fa2f4fa00dd..00000000000 Binary files a/dev/_images/subplot_demo2.png and /dev/null differ diff --git a/dev/_images/subplot_demo3.png b/dev/_images/subplot_demo3.png deleted file mode 100644 index fa2f4fa00dd..00000000000 Binary files a/dev/_images/subplot_demo3.png and /dev/null differ diff --git a/dev/_images/subplot_toolbar_00.png b/dev/_images/subplot_toolbar_00.png deleted file mode 100644 index 79b016192fd..00000000000 Binary files a/dev/_images/subplot_toolbar_00.png and /dev/null differ diff --git a/dev/_images/subplot_toolbar_01.png b/dev/_images/subplot_toolbar_01.png deleted file mode 100644 index fe93198cadd..00000000000 Binary files a/dev/_images/subplot_toolbar_01.png and /dev/null differ diff --git a/dev/_images/subplots.png b/dev/_images/subplots.png deleted file mode 100644 index 87344bcc0b6..00000000000 Binary files a/dev/_images/subplots.png and /dev/null differ diff --git a/dev/_images/subplots_adjust.png b/dev/_images/subplots_adjust.png deleted file mode 100644 index cee5afaf86a..00000000000 Binary files a/dev/_images/subplots_adjust.png and /dev/null differ diff --git a/dev/_images/subplots_demo_00.png b/dev/_images/subplots_demo_00.png deleted file mode 100644 index f11e270711d..00000000000 Binary files a/dev/_images/subplots_demo_00.png and /dev/null differ diff --git a/dev/_images/subplots_demo_01.png b/dev/_images/subplots_demo_01.png deleted file mode 100644 index 511435d8f24..00000000000 Binary files a/dev/_images/subplots_demo_01.png and /dev/null differ diff --git a/dev/_images/subplots_demo_02.png b/dev/_images/subplots_demo_02.png deleted file mode 100644 index aabbd8866bf..00000000000 Binary files a/dev/_images/subplots_demo_02.png and /dev/null differ diff --git a/dev/_images/subplots_demo_03.png b/dev/_images/subplots_demo_03.png deleted file mode 100644 index 1f02e8eb251..00000000000 Binary files a/dev/_images/subplots_demo_03.png and /dev/null differ diff --git a/dev/_images/subplots_demo_04.png b/dev/_images/subplots_demo_04.png deleted file mode 100644 index dbcc91e9f0c..00000000000 Binary files a/dev/_images/subplots_demo_04.png and /dev/null differ diff --git a/dev/_images/subplots_demo_05.png b/dev/_images/subplots_demo_05.png deleted file mode 100644 index 6cb5f7b18a4..00000000000 Binary files a/dev/_images/subplots_demo_05.png and /dev/null differ diff --git a/dev/_images/subplots_demo_06.png b/dev/_images/subplots_demo_06.png deleted file mode 100644 index 2169001f4c6..00000000000 Binary files a/dev/_images/subplots_demo_06.png and /dev/null differ diff --git a/dev/_images/surface3d_demo.png b/dev/_images/surface3d_demo.png deleted file mode 100644 index 4edc1eae84d..00000000000 Binary files a/dev/_images/surface3d_demo.png and /dev/null differ diff --git a/dev/_images/surface3d_demo1.png b/dev/_images/surface3d_demo1.png deleted file mode 100644 index 4edc1eae84d..00000000000 Binary files a/dev/_images/surface3d_demo1.png and /dev/null differ diff --git a/dev/_images/surface3d_demo2.png b/dev/_images/surface3d_demo2.png deleted file mode 100644 index 44a923a6d43..00000000000 Binary files a/dev/_images/surface3d_demo2.png and /dev/null differ diff --git a/dev/_images/surface3d_demo21.png b/dev/_images/surface3d_demo21.png deleted file mode 100644 index 44a923a6d43..00000000000 Binary files a/dev/_images/surface3d_demo21.png and /dev/null differ diff --git a/dev/_images/surface3d_demo3.png b/dev/_images/surface3d_demo3.png deleted file mode 100644 index d6f718ee1b4..00000000000 Binary files a/dev/_images/surface3d_demo3.png and /dev/null differ diff --git a/dev/_images/surface3d_demo31.png b/dev/_images/surface3d_demo31.png deleted file mode 100644 index 5ce693f5dd4..00000000000 Binary files a/dev/_images/surface3d_demo31.png and /dev/null differ diff --git a/dev/_images/surface3d_demo4.png b/dev/_images/surface3d_demo4.png deleted file mode 100644 index 4edc1eae84d..00000000000 Binary files a/dev/_images/surface3d_demo4.png and /dev/null differ diff --git a/dev/_images/surface3d_radial_demo.png b/dev/_images/surface3d_radial_demo.png deleted file mode 100644 index c380aa52c6f..00000000000 Binary files a/dev/_images/surface3d_radial_demo.png and /dev/null differ diff --git a/dev/_images/symlog_demo.png b/dev/_images/symlog_demo.png deleted file mode 100644 index 2d077a04601..00000000000 Binary files a/dev/_images/symlog_demo.png and /dev/null differ diff --git a/dev/_images/table_demo.png b/dev/_images/table_demo.png deleted file mode 100644 index bc21a612d64..00000000000 Binary files a/dev/_images/table_demo.png and /dev/null differ diff --git a/dev/_images/table_demo1.png b/dev/_images/table_demo1.png deleted file mode 100644 index bc21a612d64..00000000000 Binary files a/dev/_images/table_demo1.png and /dev/null differ diff --git a/dev/_images/tex_demo.png b/dev/_images/tex_demo.png deleted file mode 100644 index c068788e2e4..00000000000 Binary files a/dev/_images/tex_demo.png and /dev/null differ diff --git a/dev/_images/tex_demo1.png b/dev/_images/tex_demo1.png deleted file mode 100644 index 2c2774f74af..00000000000 Binary files a/dev/_images/tex_demo1.png and /dev/null differ diff --git a/dev/_images/tex_unicode_demo.png b/dev/_images/tex_unicode_demo.png deleted file mode 100644 index f258bfce97a..00000000000 Binary files a/dev/_images/tex_unicode_demo.png and /dev/null differ diff --git a/dev/_images/tex_unicode_demo1.png b/dev/_images/tex_unicode_demo1.png deleted file mode 100644 index f258bfce97a..00000000000 Binary files a/dev/_images/tex_unicode_demo1.png and /dev/null differ diff --git a/dev/_images/text3d_demo.png b/dev/_images/text3d_demo.png deleted file mode 100644 index 81ca9ff2d26..00000000000 Binary files a/dev/_images/text3d_demo.png and /dev/null differ diff --git a/dev/_images/text3d_demo1.png b/dev/_images/text3d_demo1.png deleted file mode 100644 index 81ca9ff2d26..00000000000 Binary files a/dev/_images/text3d_demo1.png and /dev/null differ diff --git a/dev/_images/text_commands.png b/dev/_images/text_commands.png deleted file mode 100644 index 0114cc1a983..00000000000 Binary files a/dev/_images/text_commands.png and /dev/null differ diff --git a/dev/_images/text_demo_fontdict.png b/dev/_images/text_demo_fontdict.png deleted file mode 100644 index fe3756d2b1c..00000000000 Binary files a/dev/_images/text_demo_fontdict.png and /dev/null differ diff --git a/dev/_images/text_handles.png b/dev/_images/text_handles.png deleted file mode 100644 index c61ba43dd95..00000000000 Binary files a/dev/_images/text_handles.png and /dev/null differ diff --git a/dev/_images/text_layout.png b/dev/_images/text_layout.png deleted file mode 100644 index 0bfd1cd352f..00000000000 Binary files a/dev/_images/text_layout.png and /dev/null differ diff --git a/dev/_images/text_rotation.png b/dev/_images/text_rotation.png deleted file mode 100644 index b57760df6e4..00000000000 Binary files a/dev/_images/text_rotation.png and /dev/null differ diff --git a/dev/_images/text_rotation_relative_to_line.png b/dev/_images/text_rotation_relative_to_line.png deleted file mode 100644 index deb6247f307..00000000000 Binary files a/dev/_images/text_rotation_relative_to_line.png and /dev/null differ diff --git a/dev/_images/text_themes.png b/dev/_images/text_themes.png deleted file mode 100644 index c0c2c36359f..00000000000 Binary files a/dev/_images/text_themes.png and /dev/null differ diff --git a/dev/_images/ticklabels_demo_rotation.png b/dev/_images/ticklabels_demo_rotation.png deleted file mode 100644 index d304559c68f..00000000000 Binary files a/dev/_images/ticklabels_demo_rotation.png and /dev/null differ diff --git a/dev/_images/tight_layout_guide-1.png b/dev/_images/tight_layout_guide-1.png deleted file mode 100644 index 55900b524ad..00000000000 Binary files a/dev/_images/tight_layout_guide-1.png and /dev/null differ diff --git a/dev/_images/tight_layout_guide-10.png b/dev/_images/tight_layout_guide-10.png deleted file mode 100644 index bd21c6b3772..00000000000 Binary files a/dev/_images/tight_layout_guide-10.png and /dev/null differ diff --git a/dev/_images/tight_layout_guide-11.png b/dev/_images/tight_layout_guide-11.png deleted file mode 100644 index b2815f719b4..00000000000 Binary files a/dev/_images/tight_layout_guide-11.png and /dev/null differ diff --git a/dev/_images/tight_layout_guide-12.png b/dev/_images/tight_layout_guide-12.png deleted file mode 100644 index fb75a63ff14..00000000000 Binary files a/dev/_images/tight_layout_guide-12.png and /dev/null differ diff --git a/dev/_images/tight_layout_guide-13.png b/dev/_images/tight_layout_guide-13.png deleted file mode 100644 index 9dbbedb384c..00000000000 Binary files a/dev/_images/tight_layout_guide-13.png and /dev/null differ diff --git a/dev/_images/tight_layout_guide-14.png b/dev/_images/tight_layout_guide-14.png deleted file mode 100644 index f6d99ef5723..00000000000 Binary files a/dev/_images/tight_layout_guide-14.png and /dev/null differ diff --git a/dev/_images/tight_layout_guide-15.png b/dev/_images/tight_layout_guide-15.png deleted file mode 100644 index 6eff56b4937..00000000000 Binary files a/dev/_images/tight_layout_guide-15.png and /dev/null differ diff --git a/dev/_images/tight_layout_guide-2.png b/dev/_images/tight_layout_guide-2.png deleted file mode 100644 index ff54b06c960..00000000000 Binary files a/dev/_images/tight_layout_guide-2.png and /dev/null differ diff --git a/dev/_images/tight_layout_guide-3.png b/dev/_images/tight_layout_guide-3.png deleted file mode 100644 index ac9d3f886fe..00000000000 Binary files a/dev/_images/tight_layout_guide-3.png and /dev/null differ diff --git a/dev/_images/tight_layout_guide-4.png b/dev/_images/tight_layout_guide-4.png deleted file mode 100644 index 41158f8b67a..00000000000 Binary files a/dev/_images/tight_layout_guide-4.png and /dev/null differ diff --git a/dev/_images/tight_layout_guide-5.png b/dev/_images/tight_layout_guide-5.png deleted file mode 100644 index 8c713f52f2f..00000000000 Binary files a/dev/_images/tight_layout_guide-5.png and /dev/null differ diff --git a/dev/_images/tight_layout_guide-6.png b/dev/_images/tight_layout_guide-6.png deleted file mode 100644 index 0c7689c9a1b..00000000000 Binary files a/dev/_images/tight_layout_guide-6.png and /dev/null differ diff --git a/dev/_images/tight_layout_guide-7.png b/dev/_images/tight_layout_guide-7.png deleted file mode 100644 index 1c5e9da0618..00000000000 Binary files a/dev/_images/tight_layout_guide-7.png and /dev/null differ diff --git a/dev/_images/tight_layout_guide-8.png b/dev/_images/tight_layout_guide-8.png deleted file mode 100644 index 746db317ce8..00000000000 Binary files a/dev/_images/tight_layout_guide-8.png and /dev/null differ diff --git a/dev/_images/tight_layout_guide-9.png b/dev/_images/tight_layout_guide-9.png deleted file mode 100644 index cd9eb6d1634..00000000000 Binary files a/dev/_images/tight_layout_guide-9.png and /dev/null differ diff --git a/dev/_images/titles_demo.png b/dev/_images/titles_demo.png deleted file mode 100644 index 5e1fc83999f..00000000000 Binary files a/dev/_images/titles_demo.png and /dev/null differ diff --git a/dev/_images/to_numeric.png b/dev/_images/to_numeric.png deleted file mode 100644 index 7b24227eae3..00000000000 Binary files a/dev/_images/to_numeric.png and /dev/null differ diff --git a/dev/_images/toggle_images.png b/dev/_images/toggle_images.png deleted file mode 100644 index d0520004b80..00000000000 Binary files a/dev/_images/toggle_images.png and /dev/null differ diff --git a/dev/_images/toolbar.png b/dev/_images/toolbar.png deleted file mode 100644 index b63976bb3b2..00000000000 Binary files a/dev/_images/toolbar.png and /dev/null differ diff --git a/dev/_images/transforms.png b/dev/_images/transforms.png deleted file mode 100644 index ab07fb57596..00000000000 Binary files a/dev/_images/transforms.png and /dev/null differ diff --git a/dev/_images/transforms_tutorial-1.png b/dev/_images/transforms_tutorial-1.png deleted file mode 100644 index 941659ac471..00000000000 Binary files a/dev/_images/transforms_tutorial-1.png and /dev/null differ diff --git a/dev/_images/transforms_tutorial-2.png b/dev/_images/transforms_tutorial-2.png deleted file mode 100644 index c3d3bab55c1..00000000000 Binary files a/dev/_images/transforms_tutorial-2.png and /dev/null differ diff --git a/dev/_images/transforms_tutorial-3.png b/dev/_images/transforms_tutorial-3.png deleted file mode 100644 index c65560d44af..00000000000 Binary files a/dev/_images/transforms_tutorial-3.png and /dev/null differ diff --git a/dev/_images/transforms_tutorial-4.png b/dev/_images/transforms_tutorial-4.png deleted file mode 100644 index 704aa648d07..00000000000 Binary files a/dev/_images/transforms_tutorial-4.png and /dev/null differ diff --git a/dev/_images/transforms_tutorial-5.png b/dev/_images/transforms_tutorial-5.png deleted file mode 100644 index 938caae6dc9..00000000000 Binary files a/dev/_images/transforms_tutorial-5.png and /dev/null differ diff --git a/dev/_images/transoffset.png b/dev/_images/transoffset.png deleted file mode 100644 index 7e92e724e1f..00000000000 Binary files a/dev/_images/transoffset.png and /dev/null differ diff --git a/dev/_images/tricontour_demo_00.png b/dev/_images/tricontour_demo_00.png deleted file mode 100644 index 691222513c4..00000000000 Binary files a/dev/_images/tricontour_demo_00.png and /dev/null differ diff --git a/dev/_images/tricontour_demo_001.png b/dev/_images/tricontour_demo_001.png deleted file mode 100644 index 691222513c4..00000000000 Binary files a/dev/_images/tricontour_demo_001.png and /dev/null differ diff --git a/dev/_images/tricontour_demo_01.png b/dev/_images/tricontour_demo_01.png deleted file mode 100644 index 444fb6c63d3..00000000000 Binary files a/dev/_images/tricontour_demo_01.png and /dev/null differ diff --git a/dev/_images/tricontour_demo_011.png b/dev/_images/tricontour_demo_011.png deleted file mode 100644 index 444fb6c63d3..00000000000 Binary files a/dev/_images/tricontour_demo_011.png and /dev/null differ diff --git a/dev/_images/tricontour_smooth_delaunay.png b/dev/_images/tricontour_smooth_delaunay.png deleted file mode 100644 index 05c7ca3ca13..00000000000 Binary files a/dev/_images/tricontour_smooth_delaunay.png and /dev/null differ diff --git a/dev/_images/tricontour_smooth_delaunay1.png b/dev/_images/tricontour_smooth_delaunay1.png deleted file mode 100644 index 05c7ca3ca13..00000000000 Binary files a/dev/_images/tricontour_smooth_delaunay1.png and /dev/null differ diff --git a/dev/_images/tricontour_smooth_user.png b/dev/_images/tricontour_smooth_user.png deleted file mode 100644 index bd9e2b576fa..00000000000 Binary files a/dev/_images/tricontour_smooth_user.png and /dev/null differ diff --git a/dev/_images/tricontour_smooth_user1.png b/dev/_images/tricontour_smooth_user1.png deleted file mode 100644 index bd9e2b576fa..00000000000 Binary files a/dev/_images/tricontour_smooth_user1.png and /dev/null differ diff --git a/dev/_images/tricontour_smooth_user2.png b/dev/_images/tricontour_smooth_user2.png deleted file mode 100644 index bd9e2b576fa..00000000000 Binary files a/dev/_images/tricontour_smooth_user2.png and /dev/null differ diff --git a/dev/_images/tricontour_vs_griddata.png b/dev/_images/tricontour_vs_griddata.png deleted file mode 100644 index 83fa6b80ea2..00000000000 Binary files a/dev/_images/tricontour_vs_griddata.png and /dev/null differ diff --git a/dev/_images/trigradient_demo.png b/dev/_images/trigradient_demo.png deleted file mode 100644 index a825473180e..00000000000 Binary files a/dev/_images/trigradient_demo.png and /dev/null differ diff --git a/dev/_images/trigradient_demo1.png b/dev/_images/trigradient_demo1.png deleted file mode 100644 index a825473180e..00000000000 Binary files a/dev/_images/trigradient_demo1.png and /dev/null differ diff --git a/dev/_images/triinterp_demo.png b/dev/_images/triinterp_demo.png deleted file mode 100644 index edd774e6f33..00000000000 Binary files a/dev/_images/triinterp_demo.png and /dev/null differ diff --git a/dev/_images/tripcolor_demo_00.png b/dev/_images/tripcolor_demo_00.png deleted file mode 100644 index 196b5d4a215..00000000000 Binary files a/dev/_images/tripcolor_demo_00.png and /dev/null differ diff --git a/dev/_images/tripcolor_demo_001.png b/dev/_images/tripcolor_demo_001.png deleted file mode 100644 index 196b5d4a215..00000000000 Binary files a/dev/_images/tripcolor_demo_001.png and /dev/null differ diff --git a/dev/_images/tripcolor_demo_002.png b/dev/_images/tripcolor_demo_002.png deleted file mode 100644 index 196b5d4a215..00000000000 Binary files a/dev/_images/tripcolor_demo_002.png and /dev/null differ diff --git a/dev/_images/tripcolor_demo_01.png b/dev/_images/tripcolor_demo_01.png deleted file mode 100644 index 99cf023e915..00000000000 Binary files a/dev/_images/tripcolor_demo_01.png and /dev/null differ diff --git a/dev/_images/tripcolor_demo_011.png b/dev/_images/tripcolor_demo_011.png deleted file mode 100644 index 99cf023e915..00000000000 Binary files a/dev/_images/tripcolor_demo_011.png and /dev/null differ diff --git a/dev/_images/tripcolor_demo_012.png b/dev/_images/tripcolor_demo_012.png deleted file mode 100644 index 99cf023e915..00000000000 Binary files a/dev/_images/tripcolor_demo_012.png and /dev/null differ diff --git a/dev/_images/tripcolor_demo_02.png b/dev/_images/tripcolor_demo_02.png deleted file mode 100644 index 25f972c6fb2..00000000000 Binary files a/dev/_images/tripcolor_demo_02.png and /dev/null differ diff --git a/dev/_images/tripcolor_demo_021.png b/dev/_images/tripcolor_demo_021.png deleted file mode 100644 index 25f972c6fb2..00000000000 Binary files a/dev/_images/tripcolor_demo_021.png and /dev/null differ diff --git a/dev/_images/tripcolor_demo_022.png b/dev/_images/tripcolor_demo_022.png deleted file mode 100644 index 25f972c6fb2..00000000000 Binary files a/dev/_images/tripcolor_demo_022.png and /dev/null differ diff --git a/dev/_images/triplot_demo_00.png b/dev/_images/triplot_demo_00.png deleted file mode 100644 index 08100a5e41f..00000000000 Binary files a/dev/_images/triplot_demo_00.png and /dev/null differ diff --git a/dev/_images/triplot_demo_001.png b/dev/_images/triplot_demo_001.png deleted file mode 100644 index 08100a5e41f..00000000000 Binary files a/dev/_images/triplot_demo_001.png and /dev/null differ diff --git a/dev/_images/triplot_demo_002.png b/dev/_images/triplot_demo_002.png deleted file mode 100644 index 08100a5e41f..00000000000 Binary files a/dev/_images/triplot_demo_002.png and /dev/null differ diff --git a/dev/_images/triplot_demo_01.png b/dev/_images/triplot_demo_01.png deleted file mode 100644 index 88b1aafbfc3..00000000000 Binary files a/dev/_images/triplot_demo_01.png and /dev/null differ diff --git a/dev/_images/triplot_demo_011.png b/dev/_images/triplot_demo_011.png deleted file mode 100644 index 88b1aafbfc3..00000000000 Binary files a/dev/_images/triplot_demo_011.png and /dev/null differ diff --git a/dev/_images/triplot_demo_012.png b/dev/_images/triplot_demo_012.png deleted file mode 100644 index 88b1aafbfc3..00000000000 Binary files a/dev/_images/triplot_demo_012.png and /dev/null differ diff --git a/dev/_images/trisurf3d_demo.png b/dev/_images/trisurf3d_demo.png deleted file mode 100644 index 39c2a58e30b..00000000000 Binary files a/dev/_images/trisurf3d_demo.png and /dev/null differ diff --git a/dev/_images/trisurf3d_demo1.png b/dev/_images/trisurf3d_demo1.png deleted file mode 100644 index 39c2a58e30b..00000000000 Binary files a/dev/_images/trisurf3d_demo1.png and /dev/null differ diff --git a/dev/_images/trisurf3d_demo2.png b/dev/_images/trisurf3d_demo2.png deleted file mode 100644 index 39c2a58e30b..00000000000 Binary files a/dev/_images/trisurf3d_demo2.png and /dev/null differ diff --git a/dev/_images/trisurf3d_demo2_00.png b/dev/_images/trisurf3d_demo2_00.png deleted file mode 100644 index 0bd12808728..00000000000 Binary files a/dev/_images/trisurf3d_demo2_00.png and /dev/null differ diff --git a/dev/_images/trisurf3d_demo2_001.png b/dev/_images/trisurf3d_demo2_001.png deleted file mode 100644 index 0bd12808728..00000000000 Binary files a/dev/_images/trisurf3d_demo2_001.png and /dev/null differ diff --git a/dev/_images/trisurf3d_demo2_01.png b/dev/_images/trisurf3d_demo2_01.png deleted file mode 100644 index ce2f11d2692..00000000000 Binary files a/dev/_images/trisurf3d_demo2_01.png and /dev/null differ diff --git a/dev/_images/trisurf3d_demo2_011.png b/dev/_images/trisurf3d_demo2_011.png deleted file mode 100644 index ce2f11d2692..00000000000 Binary files a/dev/_images/trisurf3d_demo2_011.png and /dev/null differ diff --git a/dev/_images/two_scales.png b/dev/_images/two_scales.png deleted file mode 100644 index bba36bd85ae..00000000000 Binary files a/dev/_images/two_scales.png and /dev/null differ diff --git a/dev/_images/unicode_demo.png b/dev/_images/unicode_demo.png deleted file mode 100644 index 8429b925595..00000000000 Binary files a/dev/_images/unicode_demo.png and /dev/null differ diff --git a/dev/_images/unicode_minus.png b/dev/_images/unicode_minus.png deleted file mode 100644 index 419897e9398..00000000000 Binary files a/dev/_images/unicode_minus.png and /dev/null differ diff --git a/dev/_images/units_sample.png b/dev/_images/units_sample.png deleted file mode 100644 index 83bcbd540ac..00000000000 Binary files a/dev/_images/units_sample.png and /dev/null differ diff --git a/dev/_images/units_scatter.png b/dev/_images/units_scatter.png deleted file mode 100644 index ec56eab6e7b..00000000000 Binary files a/dev/_images/units_scatter.png and /dev/null differ diff --git a/dev/_images/usetex_baseline_test.png b/dev/_images/usetex_baseline_test.png deleted file mode 100644 index fd110c9d1ea..00000000000 Binary files a/dev/_images/usetex_baseline_test.png and /dev/null differ diff --git a/dev/_images/usetex_demo.png b/dev/_images/usetex_demo.png deleted file mode 100644 index 61b76c38c73..00000000000 Binary files a/dev/_images/usetex_demo.png and /dev/null differ diff --git a/dev/_images/usetex_fonteffects.png b/dev/_images/usetex_fonteffects.png deleted file mode 100644 index 4db49aa12f5..00000000000 Binary files a/dev/_images/usetex_fonteffects.png and /dev/null differ diff --git a/dev/_images/vertical_ticklabels.png b/dev/_images/vertical_ticklabels.png deleted file mode 100644 index 80fc858def4..00000000000 Binary files a/dev/_images/vertical_ticklabels.png and /dev/null differ diff --git a/dev/_images/vline_demo.png b/dev/_images/vline_demo.png deleted file mode 100644 index f475fde55c9..00000000000 Binary files a/dev/_images/vline_demo.png and /dev/null differ diff --git a/dev/_images/vline_hline_demo.png b/dev/_images/vline_hline_demo.png deleted file mode 100644 index 5bc62098e5e..00000000000 Binary files a/dev/_images/vline_hline_demo.png and /dev/null differ diff --git a/dev/_images/vline_hline_demo1.png b/dev/_images/vline_hline_demo1.png deleted file mode 100644 index 5bc62098e5e..00000000000 Binary files a/dev/_images/vline_hline_demo1.png and /dev/null differ diff --git a/dev/_images/watermark_image.png b/dev/_images/watermark_image.png deleted file mode 100644 index c361f314e5f..00000000000 Binary files a/dev/_images/watermark_image.png and /dev/null differ diff --git a/dev/_images/watermark_text.png b/dev/_images/watermark_text.png deleted file mode 100644 index 0ddf21c6057..00000000000 Binary files a/dev/_images/watermark_text.png and /dev/null differ diff --git a/dev/_images/whats_new-1.png b/dev/_images/whats_new-1.png deleted file mode 100644 index bbb33098536..00000000000 Binary files a/dev/_images/whats_new-1.png and /dev/null differ diff --git a/dev/_images/whats_new-2_00_00.png b/dev/_images/whats_new-2_00_00.png deleted file mode 100644 index 7f97d8297bb..00000000000 Binary files a/dev/_images/whats_new-2_00_00.png and /dev/null differ diff --git a/dev/_images/whats_new-2_01_00.png b/dev/_images/whats_new-2_01_00.png deleted file mode 100644 index 9f51dcd7001..00000000000 Binary files a/dev/_images/whats_new-2_01_00.png and /dev/null differ diff --git a/dev/_images/whats_new_1_subplot3d.png b/dev/_images/whats_new_1_subplot3d.png deleted file mode 100644 index 00e09bba7e6..00000000000 Binary files a/dev/_images/whats_new_1_subplot3d.png and /dev/null differ diff --git a/dev/_images/whats_new_1_subplot3d_00_00.png b/dev/_images/whats_new_1_subplot3d_00_00.png deleted file mode 100644 index 2389c66c77c..00000000000 Binary files a/dev/_images/whats_new_1_subplot3d_00_00.png and /dev/null differ diff --git a/dev/_images/whats_new_1_subplot3d_01_00.png b/dev/_images/whats_new_1_subplot3d_01_00.png deleted file mode 100644 index 7385f0be0b8..00000000000 Binary files a/dev/_images/whats_new_1_subplot3d_01_00.png and /dev/null differ diff --git a/dev/_images/whats_new_98_4_fancy.png b/dev/_images/whats_new_98_4_fancy.png deleted file mode 100644 index 2a7a94cc73b..00000000000 Binary files a/dev/_images/whats_new_98_4_fancy.png and /dev/null differ diff --git a/dev/_images/whats_new_98_4_fill_between.png b/dev/_images/whats_new_98_4_fill_between.png deleted file mode 100644 index 996c9010409..00000000000 Binary files a/dev/_images/whats_new_98_4_fill_between.png and /dev/null differ diff --git a/dev/_images/whats_new_98_4_legend.png b/dev/_images/whats_new_98_4_legend.png deleted file mode 100644 index aea0606d028..00000000000 Binary files a/dev/_images/whats_new_98_4_legend.png and /dev/null differ diff --git a/dev/_images/whats_new_99_axes_grid.png b/dev/_images/whats_new_99_axes_grid.png deleted file mode 100644 index 2b58cd8f5b7..00000000000 Binary files a/dev/_images/whats_new_99_axes_grid.png and /dev/null differ diff --git a/dev/_images/whats_new_99_mplot3d.png b/dev/_images/whats_new_99_mplot3d.png deleted file mode 100644 index cab94925e72..00000000000 Binary files a/dev/_images/whats_new_99_mplot3d.png and /dev/null differ diff --git a/dev/_images/whats_new_99_spines.png b/dev/_images/whats_new_99_spines.png deleted file mode 100644 index 9625e4c3092..00000000000 Binary files a/dev/_images/whats_new_99_spines.png and /dev/null differ diff --git a/dev/_images/wire3d_animation_demo.png b/dev/_images/wire3d_animation_demo.png deleted file mode 100644 index b7ed7c6cf50..00000000000 Binary files a/dev/_images/wire3d_animation_demo.png and /dev/null differ diff --git a/dev/_images/wire3d_demo.png b/dev/_images/wire3d_demo.png deleted file mode 100644 index 926bcf4b0fd..00000000000 Binary files a/dev/_images/wire3d_demo.png and /dev/null differ diff --git a/dev/_images/wire3d_demo1.png b/dev/_images/wire3d_demo1.png deleted file mode 100644 index 926bcf4b0fd..00000000000 Binary files a/dev/_images/wire3d_demo1.png and /dev/null differ diff --git a/dev/_images/xcorr_demo.png b/dev/_images/xcorr_demo.png deleted file mode 100644 index 63ff9901695..00000000000 Binary files a/dev/_images/xcorr_demo.png and /dev/null differ diff --git a/dev/_images/xcorr_demo1.png b/dev/_images/xcorr_demo1.png deleted file mode 100644 index 63ff9901695..00000000000 Binary files a/dev/_images/xcorr_demo1.png and /dev/null differ diff --git a/dev/_images/zoom_to_rect.png b/dev/_images/zoom_to_rect.png deleted file mode 100644 index 07236a9ff81..00000000000 Binary files a/dev/_images/zoom_to_rect.png and /dev/null differ diff --git a/dev/_images/zorder_demo_00.png b/dev/_images/zorder_demo_00.png deleted file mode 100644 index 181ebfad94f..00000000000 Binary files a/dev/_images/zorder_demo_00.png and /dev/null differ diff --git a/dev/_images/zorder_demo_01.png b/dev/_images/zorder_demo_01.png deleted file mode 100644 index cef85caee16..00000000000 Binary files a/dev/_images/zorder_demo_01.png and /dev/null differ diff --git a/dev/_sources/api/afm_api.txt b/dev/_sources/api/afm_api.txt deleted file mode 100644 index 3bffbd1c30a..00000000000 --- a/dev/_sources/api/afm_api.txt +++ /dev/null @@ -1,12 +0,0 @@ -********************************** -afm (Adobe Font Metrics interface) -********************************** - - -:mod:`matplotlib.afm` -===================== - -.. automodule:: matplotlib.afm - :members: - :undoc-members: - :show-inheritance: diff --git a/dev/_sources/api/animation_api.txt b/dev/_sources/api/animation_api.txt deleted file mode 100644 index d43dc351aba..00000000000 --- a/dev/_sources/api/animation_api.txt +++ /dev/null @@ -1,12 +0,0 @@ -********* -animation -********* - - -:mod:`matplotlib.animation` -=========================== - -.. automodule:: matplotlib.animation - :members: - :undoc-members: - :show-inheritance: diff --git a/dev/_sources/api/api_changes.txt b/dev/_sources/api/api_changes.txt deleted file mode 100644 index 0ed2dd87a79..00000000000 --- a/dev/_sources/api/api_changes.txt +++ /dev/null @@ -1,1911 +0,0 @@ - -=========== -API Changes -=========== - -This chapter is a log of changes to matplotlib that affect the -outward-facing API. If updating matplotlib breaks your scripts, this -list may help describe what changes may be necessary in your code or -help figure out possible sources of the changes you are experiencing. - -For new features that were added to matplotlib, please see -:ref:`whats-new`. - - -Changes in 1.3.x -================ - -* In :class:`~matplotlib.patches.FancyArrow`, the default arrow head width, - ``head_width``, has been made larger to produce a visible arrow head. The new - value of this kwarg is ``head_width = 20 * width``. - -* Removed call of :meth:`~matplotlib.axes.Axes.grid` in - :meth:`~matplotlib.pyplot.plotfile`. To draw the axes grid, set to *True* - matplotlib.rcParams['axes.grid'] or ``axes.grid`` in ``.matplotlibrc`` or - explicitly call :meth:`~matplotlib.axes.Axes.grid` - -* A new keyword *extendrect* in :meth:`~matplotlib.pyplot.colorbar` and - :class:`~matplotlib.colorbar.ColorbarBase` allows one to control the shape - of colorbar extensions. - -* The `~matplotlib.mpl` module is now deprecated. Those who relied on this - module should transition to simply using `import matplotlib as mpl`. - -* The extension of :class:`~matplotlib.widgets.MultiCursor` to both vertical - (default) and/or horizontal cursor implied that ``self.line`` is replaced - by ``self.vline`` for vertical cursors lines and ``self.hline`` is added - for the horizontal cursors lines. - -* On POSIX platforms, the :func:`~matplotlib.cbook.report_memory` function - raises :class:`NotImplementedError` instead of :class:`OSError` if the - :command:`ps` command cannot be run. - -* The :func:`~matplotlib.cbook.check_output` function has been moved to - `~matplotlib.compat.subprocess`. - -Changes in 1.2.x -================ - -* The ``classic`` option of the rc parameter ``toolbar`` is deprecated - and will be removed in the next release. - -* The :meth:`~matplotlib.cbook.isvector` method has been removed since it - is no longer functional. - -* The `rasterization_zorder` property on `~matplotlib.axes.Axes` a - zorder below which artists are rasterized. This has defaulted to - -30000.0, but it now defaults to `None`, meaning no artists will be - rasterized. In order to rasterize artists below a given zorder - value, `set_rasterization_zorder` must be explicitly called. - -* In :meth:`~matplotlib.axes.Axes.scatter`, and `~pyplot.scatter`, - when specifying a marker using a tuple, the angle is now specified - in degrees, not radians. - -* Using :meth:`~matplotlib.axes.Axes.twinx` or - :meth:`~matplotlib.axes.Axes.twiny` no longer overrides the current locaters - and formatters on the axes. - -* In :meth:`~matplotlib.axes.Axes.contourf`, the handling of the *extend* - kwarg has changed. Formerly, the extended ranges were mapped - after to 0, 1 after being normed, so that they always corresponded - to the extreme values of the colormap. Now they are mapped - outside this range so that they correspond to the special - colormap values determined by the - :meth:`~matplotlib.colors.Colormap.set_under` and - :meth:`~matplotlib.colors.Colormap.set_over` methods, which - default to the colormap end points. - -* The new rc parameter ``savefig.format`` replaces ``cairo.format`` and - ``savefig.extension``, and sets the default file format used by - :meth:`matplotlib.figure.Figure.savefig`. - -* In :meth:`~matplotlib.pyplot.pie` and :meth:`~matplotlib.Axes.pie`, one can - now set the radius of the pie; setting the *radius* to 'None' (the default - value), will result in a pie with a radius of 1 as before. - -* Use of :func:`~matplotlib.projections.projection_factory` is now deprecated - in favour of axes class identification using - :func:`~matplotlib.projections.process_projection_requirements` followed by - direct axes class invocation (at the time of writing, functions which do this - are: :meth:`~matplotlib.figure.Figure.add_axes`, - :meth:`~matplotlib.figure.Figure.add_subplot` and - :meth:`~matplotlib.figure.Figure.gca`). Therefore:: - - - key = figure._make_key(*args, **kwargs) - ispolar = kwargs.pop('polar', False) - projection = kwargs.pop('projection', None) - if ispolar: - if projection is not None and projection != 'polar': - raise ValueError('polar and projection args are inconsistent') - projection = 'polar' - ax = projection_factory(projection, self, rect, **kwargs) - key = self._make_key(*args, **kwargs) - - # is now - - projection_class, kwargs, key = \ - process_projection_requirements(self, *args, **kwargs) - ax = projection_class(self, rect, **kwargs) - - This change means that third party objects can expose themselves as - matplotlib axes by providing a ``_as_mpl_axes`` method. See - :ref:`adding-new-scales` for more detail. - -* A new keyword *extendfrac* in :meth:`~matplotlib.pyplot.colorbar` and - :class:`~matplotlib.colorbar.ColorbarBase` allows one to control the size of - the triangular minimum and maximum extensions on colorbars. - -* A new keyword *capthick* in :meth:`~matplotlib.pyplot.errorbar` has been - added as an intuitive alias to the *markeredgewidth* and *mew* keyword - arguments, which indirectly controlled the thickness of the caps on - the errorbars. For backwards compatibility, specifying either of the - original keyword arguments will override any value provided by - *capthick*. - -* Transform subclassing behaviour is now subtly changed. If your transform - implements a non-affine transformation, then it should override the - ``transform_non_affine`` method, rather than the generic ``transform`` method. - Previously transforms would define ``transform`` and then copy the - method into ``transform_non_affine``:: - - class MyTransform(mtrans.Transform): - def transform(self, xy): - ... - transform_non_affine = transform - - - This approach will no longer function correctly and should be changed to:: - - class MyTransform(mtrans.Transform): - def transform_non_affine(self, xy): - ... - - -* Artists no longer have ``x_isdata`` or ``y_isdata`` attributes; instead - any artist's transform can be interrogated with - ``artist_instance.get_transform().contains_branch(ax.transData)`` - -* Lines added to an axes now take into account their transform when updating the - data and view limits. This means transforms can now be used as a pre-transform. - For instance:: - - >>> import matplotlib.pyplot as plt - >>> import matplotlib.transforms as mtrans - >>> ax = plt.axes() - >>> ax.plot(range(10), transform=mtrans.Affine2D().scale(10) + ax.transData) - >>> print(ax.viewLim) - Bbox('array([[ 0., 0.],\n [ 90., 90.]])') - -* One can now easily get a transform which goes from one transform's coordinate - system to another, in an optimized way, using the new subtract method on a - transform. For instance, to go from data coordinates to axes coordinates:: - - >>> import matplotlib.pyplot as plt - >>> ax = plt.axes() - >>> data2ax = ax.transData - ax.transAxes - >>> print(ax.transData.depth, ax.transAxes.depth) - 3, 1 - >>> print(data2ax.depth) - 2 - - for versions before 1.2 this could only be achieved in a sub-optimal way, - using ``ax.transData + ax.transAxes.inverted()`` (depth is a new concept, - but had it existed it would return 4 for this example). - -* ``twinx`` and ``twiny`` now returns an instance of SubplotBase if - parent axes is an instance of SubplotBase. - -* All Qt3-based backends are now deprecated due to the lack of py3k bindings. - Qt and QtAgg backends will continue to work in v1.2.x for py2.6 - and py2.7. It is anticipated that the Qt3 support will be completely - removed for the next release. - -* :class:`~matplotlib.colors.ColorConverter`, - :class:`~matplotlib.colors.Colormap` and - :class:`~matplotlib.colors.Normalize` now subclasses ``object`` - -* ContourSet instances no longer have a ``transform`` attribute. Instead, - access the transform with the ``get_transform`` method. - -Changes in 1.1.x -================ - -* Added new :class:`matplotlib.sankey.Sankey` for generating Sankey diagrams. - -* In :meth:`~matplotlib.pyplot.imshow`, setting *interpolation* to 'nearest' - will now always mean that the nearest-neighbor interpolation is performed. - If you want the no-op interpolation to be performed, choose 'none'. - -* There were errors in how the tri-functions were handling input parameters - that had to be fixed. If your tri-plots are not working correctly anymore, - or you were working around apparent mistakes, please see issue #203 in the - github tracker. When in doubt, use kwargs. - -* The 'symlog' scale had some bad behavior in previous versions. This has now - been fixed and users should now be able to use it without frustrations. - The fixes did result in some minor changes in appearance for some users who - may have been depending on the bad behavior. - -* There is now a common set of markers for all plotting functions. Previously, - some markers existed only for :meth:`~matplotlib.pyplot.scatter` or just for - :meth:`~matplotlib.pyplot.plot`. This is now no longer the case. This merge - did result in a conflict. The string 'd' now means "thin diamond" while - 'D' will mean "regular diamond". - -Changes beyond 0.99.x -===================== - -* The default behavior of :meth:`matplotlib.axes.Axes.set_xlim`, - :meth:`matplotlib.axes.Axes.set_ylim`, and - :meth:`matplotlib.axes.Axes.axis`, and their corresponding - pyplot functions, has been changed: when view limits are - set explicitly with one of these methods, autoscaling is turned - off for the matching axis. A new *auto* kwarg is available to - control this behavior. The limit kwargs have been renamed to - *left* and *right* instead of *xmin* and *xmax*, and *bottom* - and *top* instead of *ymin* and *ymax*. The old names may still - be used, however. - -* There are five new Axes methods with corresponding pyplot - functions to facilitate autoscaling, tick location, and tick - label formatting, and the general appearance of ticks and - tick labels: - - + :meth:`matplotlib.axes.Axes.autoscale` turns autoscaling - on or off, and applies it. - - + :meth:`matplotlib.axes.Axes.margins` sets margins used to - autoscale the :attr:`matplotlib.axes.Axes.viewLim` based on - the :attr:`matplotlib.axes.Axes.dataLim`. - - + :meth:`matplotlib.axes.Axes.locator_params` allows one to - adjust axes locator parameters such as *nbins*. - - + :meth:`matplotlib.axes.Axes.ticklabel_format` is a convenience - method for controlling the :class:`matplotlib.ticker.ScalarFormatter` - that is used by default with linear axes. - - + :meth:`matplotlib.axes.Axes.tick_params` controls direction, size, - visibility, and color of ticks and their labels. - -* The :meth:`matplotlib.axes.Axes.bar` method accepts a *error_kw* - kwarg; it is a dictionary of kwargs to be passed to the - errorbar function. - -* The :meth:`matplotlib.axes.Axes.hist` *color* kwarg now accepts - a sequence of color specs to match a sequence of datasets. - -* The :class:`~matplotlib.collections.EllipseCollection` has been - changed in two ways: - - + There is a new *units* option, 'xy', that scales the ellipse with - the data units. This matches the :class:'~matplotlib.patches.Ellipse` - scaling. - - + The *height* and *width* kwargs have been changed to specify - the height and width, again for consistency with - :class:`~matplotlib.patches.Ellipse`, and to better match - their names; previously they specified the half-height and - half-width. - -* There is a new rc parameter ``axes.color_cycle``, and the color - cycle is now independent of the rc parameter ``lines.color``. - :func:`matplotlib.Axes.set_default_color_cycle` is deprecated. - -* You can now print several figures to one pdf file and modify the - document information dictionary of a pdf file. See the docstrings - of the class :class:`matplotlib.backends.backend_pdf.PdfPages` for - more information. - -* Removed configobj_ and `enthought.traits`_ packages, which are only - required by the experimental traited config and are somewhat out of - date. If needed, install them independently. - -.. _configobj: http://www.voidspace.org.uk/python/configobj.html -.. _`enthought.traits`: http://code.enthought.com/projects/traits - -* The new rc parameter ``savefig.extension`` sets the filename extension - that is used by :meth:`matplotlib.figure.Figure.savefig` if its *fname* - argument lacks an extension. - -* In an effort to simplify the backend API, all clipping rectangles - and paths are now passed in using GraphicsContext objects, even - on collections and images. Therefore:: - - draw_path_collection(self, master_transform, cliprect, clippath, - clippath_trans, paths, all_transforms, offsets, - offsetTrans, facecolors, edgecolors, linewidths, - linestyles, antialiaseds, urls) - - # is now - - draw_path_collection(self, gc, master_transform, paths, all_transforms, - offsets, offsetTrans, facecolors, edgecolors, - linewidths, linestyles, antialiaseds, urls) - - - draw_quad_mesh(self, master_transform, cliprect, clippath, - clippath_trans, meshWidth, meshHeight, coordinates, - offsets, offsetTrans, facecolors, antialiased, - showedges) - - # is now - - draw_quad_mesh(self, gc, master_transform, meshWidth, meshHeight, - coordinates, offsets, offsetTrans, facecolors, - antialiased, showedges) - - - draw_image(self, x, y, im, bbox, clippath=None, clippath_trans=None) - - # is now - - draw_image(self, gc, x, y, im) - -* There are four new Axes methods with corresponding pyplot - functions that deal with unstructured triangular grids: - - + :meth:`matplotlib.axes.Axes.tricontour` draws contour lines - on a triangular grid. - - + :meth:`matplotlib.axes.Axes.tricontourf` draws filled contours - on a triangular grid. - - + :meth:`matplotlib.axes.Axes.tripcolor` draws a pseudocolor - plot on a triangular grid. - - + :meth:`matplotlib.axes.Axes.triplot` draws a triangular grid - as lines and/or markers. - -Changes in 0.99 -====================== - -* pylab no longer provides a load and save function. These are - available in matplotlib.mlab, or you can use numpy.loadtxt and - numpy.savetxt for text files, or np.save and np.load for binary - numpy arrays. - -* User-generated colormaps can now be added to the set recognized - by :func:`matplotlib.cm.get_cmap`. Colormaps can be made the - default and applied to the current image using - :func:`matplotlib.pyplot.set_cmap`. - -* changed use_mrecords default to False in mlab.csv2rec since this is - partially broken - -* Axes instances no longer have a "frame" attribute. Instead, use the - new "spines" attribute. Spines is a dictionary where the keys are - the names of the spines (e.g., 'left','right' and so on) and the - values are the artists that draw the spines. For normal - (rectilinear) axes, these artists are Line2D instances. For other - axes (such as polar axes), these artists may be Patch instances. - -* Polar plots no longer accept a resolution kwarg. Instead, each Path - must specify its own number of interpolation steps. This is - unlikely to be a user-visible change -- if interpolation of data is - required, that should be done before passing it to matplotlib. - -Changes for 0.98.x -================== -* psd(), csd(), and cohere() will now automatically wrap negative - frequency components to the beginning of the returned arrays. - This is much more sensible behavior and makes them consistent - with specgram(). The previous behavior was more of an oversight - than a design decision. - -* Added new keyword parameters *nonposx*, *nonposy* to - :class:`matplotlib.axes.Axes` methods that set log scale - parameters. The default is still to mask out non-positive - values, but the kwargs accept 'clip', which causes non-positive - values to be replaced with a very small positive value. - -* Added new :func:`matplotlib.pyplot.fignum_exists` and - :func:`matplotlib.pyplot.get_fignums`; they merely expose - information that had been hidden in :mod:`matplotlib._pylab_helpers`. - -* Deprecated numerix package. - -* Added new :func:`matplotlib.image.imsave` and exposed it to the - :mod:`matplotlib.pyplot` interface. - -* Remove support for pyExcelerator in exceltools -- use xlwt - instead - -* Changed the defaults of acorr and xcorr to use usevlines=True, - maxlags=10 and normed=True since these are the best defaults - -* Following keyword parameters for :class:`matplotlib.label.Label` are now - deprecated and new set of parameters are introduced. The new parameters - are given as a fraction of the font-size. Also, *scatteryoffsets*, - *fancybox* and *columnspacing* are added as keyword parameters. - - ================ ================ - Deprecated New - ================ ================ - pad borderpad - labelsep labelspacing - handlelen handlelength - handlestextsep handletextpad - axespad borderaxespad - ================ ================ - - -* Removed the configobj and experimental traits rc support - -* Modified :func:`matplotlib.mlab.psd`, :func:`matplotlib.mlab.csd`, - :func:`matplotlib.mlab.cohere`, and :func:`matplotlib.mlab.specgram` - to scale one-sided densities by a factor of 2. Also, optionally - scale the densities by the sampling frequency, which gives true values - of densities that can be integrated by the returned frequency values. - This also gives better MATLAB compatibility. The corresponding - :class:`matplotlib.axes.Axes` methods and :mod:`matplotlib.pyplot` - functions were updated as well. - -* Font lookup now uses a nearest-neighbor approach rather than an - exact match. Some fonts may be different in plots, but should be - closer to what was requested. - -* :meth:`matplotlib.axes.Axes.set_xlim`, - :meth:`matplotlib.axes.Axes.set_ylim` now return a copy of the - :attr:`viewlim` array to avoid modify-in-place surprises. - -* :meth:`matplotlib.afm.AFM.get_fullname` and - :meth:`matplotlib.afm.AFM.get_familyname` no longer raise an - exception if the AFM file does not specify these optional - attributes, but returns a guess based on the required FontName - attribute. - -* Changed precision kwarg in :func:`matplotlib.pyplot.spy`; default is - 0, and the string value 'present' is used for sparse arrays only to - show filled locations. - -* :class:`matplotlib.collections.EllipseCollection` added. - -* Added ``angles`` kwarg to :func:`matplotlib.pyplot.quiver` for more - flexible specification of the arrow angles. - -* Deprecated (raise NotImplementedError) all the mlab2 functions from - :mod:`matplotlib.mlab` out of concern that some of them were not - clean room implementations. - -* Methods :meth:`matplotlib.collections.Collection.get_offsets` and - :meth:`matplotlib.collections.Collection.set_offsets` added to - :class:`~matplotlib.collections.Collection` base class. - -* :attr:`matplotlib.figure.Figure.figurePatch` renamed - :attr:`matplotlib.figure.Figure.patch`; - :attr:`matplotlib.axes.Axes.axesPatch` renamed - :attr:`matplotlib.axes.Axes.patch`; - :attr:`matplotlib.axes.Axes.axesFrame` renamed - :attr:`matplotlib.axes.Axes.frame`. - :meth:`matplotlib.axes.Axes.get_frame`, which returns - :attr:`matplotlib.axes.Axes.patch`, is deprecated. - -* Changes in the :class:`matplotlib.contour.ContourLabeler` attributes - (:func:`matplotlib.pyplot.clabel` function) so that they all have a - form like ``.labelAttribute``. The three attributes that are most - likely to be used by end users, ``.cl``, ``.cl_xy`` and - ``.cl_cvalues`` have been maintained for the moment (in addition to - their renamed versions), but they are deprecated and will eventually - be removed. - -* Moved several functions in :mod:`matplotlib.mlab` and - :mod:`matplotlib.cbook` into a separate module - :mod:`matplotlib.numerical_methods` because they were unrelated to - the initial purpose of mlab or cbook and appeared more coherent - elsewhere. - -Changes for 0.98.1 -================== - -* Removed broken :mod:`matplotlib.axes3d` support and replaced it with - a non-implemented error pointing to 0.91.x - -Changes for 0.98.0 -================== - -* :func:`matplotlib.image.imread` now no longer always returns RGBA data---if - the image is luminance or RGB, it will return a MxN or MxNx3 array - if possible. Also uint8 is no longer always forced to float. - -* Rewrote the :class:`matplotlib.cm.ScalarMappable` callback - infrastructure to use :class:`matplotlib.cbook.CallbackRegistry` - rather than custom callback handling. Any users of - :meth:`matplotlib.cm.ScalarMappable.add_observer` of the - :class:`~matplotlib.cm.ScalarMappable` should use the - :attr:`matplotlib.cm.ScalarMappable.callbacks` - :class:`~matplotlib.cbook.CallbackRegistry` instead. - -* New axes function and Axes method provide control over the plot - color cycle: :func:`matplotlib.axes.set_default_color_cycle` and - :meth:`matplotlib.axes.Axes.set_color_cycle`. - -* matplotlib now requires Python 2.4, so :mod:`matplotlib.cbook` will - no longer provide :class:`set`, :func:`enumerate`, :func:`reversed` - or :func:`izip` compatibility functions. - -* In Numpy 1.0, bins are specified by the left edges only. The axes - method :meth:`matplotlib.axes.Axes.hist` now uses future Numpy 1.3 - semantics for histograms. Providing ``binedges``, the last value gives - the upper-right edge now, which was implicitly set to +infinity in - Numpy 1.0. This also means that the last bin doesn't contain upper - outliers any more by default. - -* New axes method and pyplot function, - :func:`~matplotlib.pyplot.hexbin`, is an alternative to - :func:`~matplotlib.pyplot.scatter` for large datasets. It makes - something like a :func:`~matplotlib.pyplot.pcolor` of a 2-D - histogram, but uses hexagonal bins. - -* New kwarg, ``symmetric``, in :class:`matplotlib.ticker.MaxNLocator` - allows one require an axis to be centered around zero. - -* Toolkits must now be imported from ``mpl_toolkits`` (not ``matplotlib.toolkits``) - -Notes about the transforms refactoring --------------------------------------- - -A major new feature of the 0.98 series is a more flexible and -extensible transformation infrastructure, written in Python/Numpy -rather than a custom C extension. - -The primary goal of this refactoring was to make it easier to -extend matplotlib to support new kinds of projections. This is -mostly an internal improvement, and the possible user-visible -changes it allows are yet to come. - -See :mod:`matplotlib.transforms` for a description of the design of -the new transformation framework. - -For efficiency, many of these functions return views into Numpy -arrays. This means that if you hold on to a reference to them, -their contents may change. If you want to store a snapshot of -their current values, use the Numpy array method copy(). - -The view intervals are now stored only in one place -- in the -:class:`matplotlib.axes.Axes` instance, not in the locator instances -as well. This means locators must get their limits from their -:class:`matplotlib.axis.Axis`, which in turn looks up its limits from -the :class:`~matplotlib.axes.Axes`. If a locator is used temporarily -and not assigned to an Axis or Axes, (e.g., in -:mod:`matplotlib.contour`), a dummy axis must be created to store its -bounds. Call :meth:`matplotlib.ticker.Locator.create_dummy_axis` to -do so. - -The functionality of :class:`Pbox` has been merged with -:class:`~matplotlib.transforms.Bbox`. Its methods now all return -copies rather than modifying in place. - -The following lists many of the simple changes necessary to update -code from the old transformation framework to the new one. In -particular, methods that return a copy are named with a verb in the -past tense, whereas methods that alter an object in place are named -with a verb in the present tense. - -:mod:`matplotlib.transforms` -~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -============================================================ ============================================================ -Old method New method -============================================================ ============================================================ -:meth:`Bbox.get_bounds` :attr:`transforms.Bbox.bounds` ------------------------------------------------------------- ------------------------------------------------------------ -:meth:`Bbox.width` :attr:`transforms.Bbox.width` ------------------------------------------------------------- ------------------------------------------------------------ -:meth:`Bbox.height` :attr:`transforms.Bbox.height` ------------------------------------------------------------- ------------------------------------------------------------ -`Bbox.intervalx().get_bounds()` :attr:`transforms.Bbox.intervalx` -`Bbox.intervalx().set_bounds()` [:attr:`Bbox.intervalx` is now a property.] ------------------------------------------------------------- ------------------------------------------------------------ -`Bbox.intervaly().get_bounds()` :attr:`transforms.Bbox.intervaly` -`Bbox.intervaly().set_bounds()` [:attr:`Bbox.intervaly` is now a property.] ------------------------------------------------------------- ------------------------------------------------------------ -:meth:`Bbox.xmin` :attr:`transforms.Bbox.x0` or - :attr:`transforms.Bbox.xmin` [1]_ ------------------------------------------------------------- ------------------------------------------------------------ -:meth:`Bbox.ymin` :attr:`transforms.Bbox.y0` or - :attr:`transforms.Bbox.ymin` [1]_ ------------------------------------------------------------- ------------------------------------------------------------ -:meth:`Bbox.xmax` :attr:`transforms.Bbox.x1` or - :attr:`transforms.Bbox.xmax` [1]_ ------------------------------------------------------------- ------------------------------------------------------------ -:meth:`Bbox.ymax` :attr:`transforms.Bbox.y1` or - :attr:`transforms.Bbox.ymax` [1]_ ------------------------------------------------------------- ------------------------------------------------------------ -`Bbox.overlaps(bboxes)` `Bbox.count_overlaps(bboxes)` ------------------------------------------------------------- ------------------------------------------------------------ -`bbox_all(bboxes)` `Bbox.union(bboxes)` - [:meth:`transforms.Bbox.union` is a staticmethod.] ------------------------------------------------------------- ------------------------------------------------------------ -`lbwh_to_bbox(l, b, w, h)` `Bbox.from_bounds(x0, y0, w, h)` - [:meth:`transforms.Bbox.from_bounds` is a staticmethod.] ------------------------------------------------------------- ------------------------------------------------------------ -`inverse_transform_bbox(trans, bbox)` `Bbox.inverse_transformed(trans)` ------------------------------------------------------------- ------------------------------------------------------------ -`Interval.contains_open(v)` `interval_contains_open(tuple, v)` ------------------------------------------------------------- ------------------------------------------------------------ -`Interval.contains(v)` `interval_contains(tuple, v)` ------------------------------------------------------------- ------------------------------------------------------------ -`identity_transform()` :class:`matplotlib.transforms.IdentityTransform` ------------------------------------------------------------- ------------------------------------------------------------ -`blend_xy_sep_transform(xtrans, ytrans)` `blended_transform_factory(xtrans, ytrans)` ------------------------------------------------------------- ------------------------------------------------------------ -`scale_transform(xs, ys)` `Affine2D().scale(xs[, ys])` ------------------------------------------------------------- ------------------------------------------------------------ -`get_bbox_transform(boxin, boxout)` `BboxTransform(boxin, boxout)` or - `BboxTransformFrom(boxin)` or - `BboxTransformTo(boxout)` ------------------------------------------------------------- ------------------------------------------------------------ -`Transform.seq_xy_tup(points)` `Transform.transform(points)` ------------------------------------------------------------- ------------------------------------------------------------ -`Transform.inverse_xy_tup(points)` `Transform.inverted().transform(points)` -============================================================ ============================================================ - -.. [1] The :class:`~matplotlib.transforms.Bbox` is bound by the points - (x0, y0) to (x1, y1) and there is no defined order to these points, - that is, x0 is not necessarily the left edge of the box. To get - the left edge of the :class:`Bbox`, use the read-only property - :attr:`~matplotlib.transforms.Bbox.xmin`. - -:mod:`matplotlib.axes` -~~~~~~~~~~~~~~~~~~~~~~ - -============================================================ ============================================================ -Old method New method -============================================================ ============================================================ -`Axes.get_position()` :meth:`matplotlib.axes.Axes.get_position` [2]_ ------------------------------------------------------------- ------------------------------------------------------------ -`Axes.set_position()` :meth:`matplotlib.axes.Axes.set_position` [3]_ ------------------------------------------------------------- ------------------------------------------------------------ -`Axes.toggle_log_lineary()` :meth:`matplotlib.axes.Axes.set_yscale` [4]_ ------------------------------------------------------------- ------------------------------------------------------------ -`Subplot` class removed. -============================================================ ============================================================ - -The :class:`Polar` class has moved to :mod:`matplotlib.projections.polar`. - -.. [2] :meth:`matplotlib.axes.Axes.get_position` used to return a list - of points, now it returns a :class:`matplotlib.transforms.Bbox` - instance. - -.. [3] :meth:`matplotlib.axes.Axes.set_position` now accepts either - four scalars or a :class:`matplotlib.transforms.Bbox` instance. - -.. [4] Since the recfactoring allows for more than two scale types - ('log' or 'linear'), it no longer makes sense to have a toggle. - `Axes.toggle_log_lineary()` has been removed. - -:mod:`matplotlib.artist` -~~~~~~~~~~~~~~~~~~~~~~~~~~ - -============================================================ ============================================================ -Old method New method -============================================================ ============================================================ -`Artist.set_clip_path(path)` `Artist.set_clip_path(path, transform)` [5]_ -============================================================ ============================================================ - -.. [5] :meth:`matplotlib.artist.Artist.set_clip_path` now accepts a - :class:`matplotlib.path.Path` instance and a - :class:`matplotlib.transforms.Transform` that will be applied to - the path immediately before clipping. - -:mod:`matplotlib.collections` -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -============================================================ ============================================================ -Old method New method -============================================================ ============================================================ -`linestyle` `linestyles` [6]_ -============================================================ ============================================================ - -.. [6] Linestyles are now treated like all other collection - attributes, i.e. a single value or multiple values may be - provided. - -:mod:`matplotlib.colors` -~~~~~~~~~~~~~~~~~~~~~~~~ - -============================================================ ============================================================ -Old method New method -============================================================ ============================================================ -`ColorConvertor.to_rgba_list(c)` `ColorConvertor.to_rgba_array(c)` - [:meth:`matplotlib.colors.ColorConvertor.to_rgba_array` - returns an Nx4 Numpy array of RGBA color quadruples.] -============================================================ ============================================================ - -:mod:`matplotlib.contour` -~~~~~~~~~~~~~~~~~~~~~~~~~ - -============================================================ ============================================================ -Old method New method -============================================================ ============================================================ -`Contour._segments` :meth:`matplotlib.contour.Contour.get_paths`` [Returns a - list of :class:`matplotlib.path.Path` instances.] -============================================================ ============================================================ - -:mod:`matplotlib.figure` -~~~~~~~~~~~~~~~~~~~~~~~~ - -============================================================ ============================================================ -Old method New method -============================================================ ============================================================ -`Figure.dpi.get()` / `Figure.dpi.set()` :attr:`matplotlib.figure.Figure.dpi` *(a property)* -============================================================ ============================================================ - -:mod:`matplotlib.patches` -~~~~~~~~~~~~~~~~~~~~~~~~~ - -============================================================ ============================================================ -Old method New method -============================================================ ============================================================ -`Patch.get_verts()` :meth:`matplotlib.patches.Patch.get_path` [Returns a - :class:`matplotlib.path.Path` instance] -============================================================ ============================================================ - -:mod:`matplotlib.backend_bases` -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -============================================================ ============================================================ -Old method New method -============================================================ ============================================================ -`GraphicsContext.set_clip_rectangle(tuple)` `GraphicsContext.set_clip_rectangle(bbox)` ------------------------------------------------------------- ------------------------------------------------------------ -`GraphicsContext.get_clip_path()` `GraphicsContext.get_clip_path()` [7]_ ------------------------------------------------------------- ------------------------------------------------------------ -`GraphicsContext.set_clip_path()` `GraphicsContext.set_clip_path()` [8]_ -============================================================ ============================================================ - -:class:`~matplotlib.backend_bases.RendererBase` -``````````````````````````````````````````````` - -New methods: - - * :meth:`draw_path(self, gc, path, transform, rgbFace) - ` - - * :meth:`draw_markers(self, gc, marker_path, marker_trans, path, - trans, rgbFace) - ` - *[optional]* - -Changed methods: - - * `draw_image(self, x, y, im, bbox)` is now - :meth:`draw_image(self, x, y, im, bbox, clippath, clippath_trans) - ` - -Removed methods: - - * `draw_arc` - - * `draw_line_collection` - - * `draw_line` - - * `draw_lines` - - * `draw_point` - - * `draw_quad_mesh` - - * `draw_poly_collection` - - * `draw_polygon` - - * `draw_rectangle` - - * `draw_regpoly_collection` - -.. [7] :meth:`matplotlib.backend_bases.GraphicsContext.get_clip_path` - returns a tuple of the form (*path*, *affine_transform*), where - *path* is a :class:`matplotlib.path.Path` instance and - *affine_transform* is a :class:`matplotlib.transforms.Affine2D` - instance. - -.. [8] :meth:`matplotlib.backend_bases.GraphicsContext.set_clip_path` - now only accepts a :class:`matplotlib.transforms.TransformedPath` - instance. - -Changes for 0.91.2 -================== - -* For :func:`csv2rec`, checkrows=0 is the new default indicating all rows - will be checked for type inference - -* A warning is issued when an image is drawn on log-scaled axes, since - it will not log-scale the image data. - -* Moved :func:`rec2gtk` to :mod:`matplotlib.toolkits.gtktools` - -* Moved :func:`rec2excel` to :mod:`matplotlib.toolkits.exceltools` - -* Removed, dead/experimental ExampleInfo, Namespace and Importer - code from :mod:`matplotlib.__init__` - -Changes for 0.91.1 -================== - -Changes for 0.91.0 -================== - -* Changed :func:`cbook.is_file_like` to - :func:`cbook.is_writable_file_like` and corrected behavior. - -* Added ax kwarg to :func:`pyplot.colorbar` and - :meth:`Figure.colorbar` so that one can specify the axes object from - which space for the colorbar is to be taken, if one does not want to - make the colorbar axes manually. - -* Changed :func:`cbook.reversed` so it yields a tuple rather than a - (index, tuple). This agrees with the python reversed builtin, - and cbook only defines reversed if python doesn't provide the - builtin. - -* Made skiprows=1 the default on :func:`csv2rec` - -* The gd and paint backends have been deleted. - -* The errorbar method and function now accept additional kwargs - so that upper and lower limits can be indicated by capping the - bar with a caret instead of a straight line segment. - -* The :mod:`matplotlib.dviread` file now has a parser for files like - psfonts.map and pdftex.map, to map TeX font names to external files. - -* The file :mod:`matplotlib.type1font` contains a new class for Type 1 - fonts. Currently it simply reads pfa and pfb format files and - stores the data in a way that is suitable for embedding in pdf - files. In the future the class might actually parse the font to - allow e.g., subsetting. - -* :mod:`matplotlib.FT2Font` now supports :meth:`FT_Attach_File`. In - practice this can be used to read an afm file in addition to a - pfa/pfb file, to get metrics and kerning information for a Type 1 - font. - -* The :class:`AFM` class now supports querying CapHeight and stem - widths. The get_name_char method now has an isord kwarg like - get_width_char. - -* Changed :func:`pcolor` default to shading='flat'; but as noted now in the - docstring, it is preferable to simply use the edgecolor kwarg. - -* The mathtext font commands (``\cal``, ``\rm``, ``\it``, ``\tt``) now - behave as TeX does: they are in effect until the next font change - command or the end of the grouping. Therefore uses of ``$\cal{R}$`` - should be changed to ``${\cal R}$``. Alternatively, you may use the - new LaTeX-style font commands (``\mathcal``, ``\mathrm``, - ``\mathit``, ``\mathtt``) which do affect the following group, - e.g., ``$\mathcal{R}$``. - -* Text creation commands have a new default linespacing and a new - ``linespacing`` kwarg, which is a multiple of the maximum vertical - extent of a line of ordinary text. The default is 1.2; - ``linespacing=2`` would be like ordinary double spacing, for example. - -* Changed default kwarg in - :meth:`matplotlib.colors.Normalize.__init__`` to ``clip=False``; - clipping silently defeats the purpose of the special over, under, - and bad values in the colormap, thereby leading to unexpected - behavior. The new default should reduce such surprises. - -* Made the emit property of :meth:`~matplotlib.axes.Axes.set_xlim` and - :meth:`~matplotlib.axes.Axes.set_ylim` ``True`` by default; removed - the Axes custom callback handling into a 'callbacks' attribute which - is a :class:`~matplotlib.cbook.CallbackRegistry` instance. This now - supports the 'xlim_changed' and 'ylim_changed' Axes events. - -Changes for 0.90.1 -================== - -:: - - The file dviread.py has a (very limited and fragile) dvi reader - for usetex support. The API might change in the future so don't - depend on it yet. - - Removed deprecated support for a float value as a gray-scale; - now it must be a string, like '0.5'. Added alpha kwarg to - ColorConverter.to_rgba_list. - - New method set_bounds(vmin, vmax) for formatters, locators sets - the viewInterval and dataInterval from floats. - - Removed deprecated colorbar_classic. - - Line2D.get_xdata and get_ydata valid_only=False kwarg is replaced - by orig=True. When True, it returns the original data, otherwise - the processed data (masked, converted) - - Some modifications to the units interface. - units.ConversionInterface.tickers renamed to - units.ConversionInterface.axisinfo and it now returns a - units.AxisInfo object rather than a tuple. This will make it - easier to add axis info functionality (eg I added a default label - on this iteration) w/o having to change the tuple length and hence - the API of the client code every time new functionality is added. - Also, units.ConversionInterface.convert_to_value is now simply - named units.ConversionInterface.convert. - - Axes.errorbar uses Axes.vlines and Axes.hlines to draw its error - limits int he vertical and horizontal direction. As you'll see - in the changes below, these functions now return a LineCollection - rather than a list of lines. The new return signature for - errorbar is ylins, caplines, errorcollections where - errorcollections is a xerrcollection, yerrcollection - - Axes.vlines and Axes.hlines now create and returns a LineCollection, not a list - of lines. This is much faster. The kwarg signature has changed, - so consult the docs - - MaxNLocator accepts a new Boolean kwarg ('integer') to force - ticks to integer locations. - - Commands that pass an argument to the Text constructor or to - Text.set_text() now accept any object that can be converted - with '%s'. This affects xlabel(), title(), etc. - - Barh now takes a **kwargs dict instead of most of the old - arguments. This helps ensure that bar and barh are kept in sync, - but as a side effect you can no longer pass e.g., color as a - positional argument. - - ft2font.get_charmap() now returns a dict that maps character codes - to glyph indices (until now it was reversed) - - Moved data files into lib/matplotlib so that setuptools' develop - mode works. Re-organized the mpl-data layout so that this source - structure is maintained in the installation. (I.e. the 'fonts' and - 'images' sub-directories are maintained in site-packages.). - Suggest removing site-packages/matplotlib/mpl-data and - ~/.matplotlib/ttffont.cache before installing - -Changes for 0.90.0 -================== - -:: - - All artists now implement a "pick" method which users should not - call. Rather, set the "picker" property of any artist you want to - pick on (the epsilon distance in points for a hit test) and - register with the "pick_event" callback. See - examples/pick_event_demo.py for details - - Bar, barh, and hist have "log" binary kwarg: log=True - sets the ordinate to a log scale. - - Boxplot can handle a list of vectors instead of just - an array, so vectors can have different lengths. - - Plot can handle 2-D x and/or y; it plots the columns. - - Added linewidth kwarg to bar and barh. - - Made the default Artist._transform None (rather than invoking - identity_transform for each artist only to have it overridden - later). Use artist.get_transform() rather than artist._transform, - even in derived classes, so that the default transform will be - created lazily as needed - - New LogNorm subclass of Normalize added to colors.py. - All Normalize subclasses have new inverse() method, and - the __call__() method has a new clip kwarg. - - Changed class names in colors.py to match convention: - normalize -> Normalize, no_norm -> NoNorm. Old names - are still available for now. - - Removed obsolete pcolor_classic command and method. - - Removed lineprops and markerprops from the Annotation code and - replaced them with an arrow configurable with kwarg arrowprops. - See examples/annotation_demo.py - JDH - -Changes for 0.87.7 -================== - -:: - - Completely reworked the annotations API because I found the old - API cumbersome. The new design is much more legible and easy to - read. See matplotlib.text.Annotation and - examples/annotation_demo.py - - markeredgecolor and markerfacecolor cannot be configured in - matplotlibrc any more. Instead, markers are generally colored - automatically based on the color of the line, unless marker colors - are explicitly set as kwargs - NN - - Changed default comment character for load to '#' - JDH - - math_parse_s_ft2font_svg from mathtext.py & mathtext2.py now returns - width, height, svg_elements. svg_elements is an instance of Bunch ( - cmbook.py) and has the attributes svg_glyphs and svg_lines, which are both - lists. - - Renderer.draw_arc now takes an additional parameter, rotation. - It specifies to draw the artist rotated in degrees anti- - clockwise. It was added for rotated ellipses. - - Renamed Figure.set_figsize_inches to Figure.set_size_inches to - better match the get method, Figure.get_size_inches. - - Removed the copy_bbox_transform from transforms.py; added - shallowcopy methods to all transforms. All transforms already - had deepcopy methods. - - FigureManager.resize(width, height): resize the window - specified in pixels - - barh: x and y args have been renamed to width and bottom - respectively, and their order has been swapped to maintain - a (position, value) order. - - bar and barh: now accept kwarg 'edgecolor'. - - bar and barh: The left, height, width and bottom args can - now all be scalars or sequences; see docstring. - - barh: now defaults to edge aligned instead of center - aligned bars - - bar, barh and hist: Added a keyword arg 'align' that - controls between edge or center bar alignment. - - Collections: PolyCollection and LineCollection now accept - vertices or segments either in the original form [(x,y), - (x,y), ...] or as a 2D numerix array, with X as the first column - and Y as the second. Contour and quiver output the numerix - form. The transforms methods Bbox.update() and - Transformation.seq_xy_tups() now accept either form. - - Collections: LineCollection is now a ScalarMappable like - PolyCollection, etc. - - Specifying a grayscale color as a float is deprecated; use - a string instead, e.g., 0.75 -> '0.75'. - - Collections: initializers now accept any mpl color arg, or - sequence of such args; previously only a sequence of rgba - tuples was accepted. - - Colorbar: completely new version and api; see docstring. The - original version is still accessible as colorbar_classic, but - is deprecated. - - Contourf: "extend" kwarg replaces "clip_ends"; see docstring. - Masked array support added to pcolormesh. - - Modified aspect-ratio handling: - Removed aspect kwarg from imshow - Axes methods: - set_aspect(self, aspect, adjustable=None, anchor=None) - set_adjustable(self, adjustable) - set_anchor(self, anchor) - Pylab interface: - axis('image') - - Backend developers: ft2font's load_char now takes a flags - argument, which you can OR together from the LOAD_XXX - constants. - -Changes for 0.86 -================ - -:: - - Matplotlib data is installed into the matplotlib module. - This is similar to package_data. This should get rid of - having to check for many possibilities in _get_data_path(). - The MATPLOTLIBDATA env key is still checked first to allow - for flexibility. - - 1) Separated the color table data from cm.py out into - a new file, _cm.py, to make it easier to find the actual - code in cm.py and to add new colormaps. Everything - from _cm.py is imported by cm.py, so the split should be - transparent. - 2) Enabled automatic generation of a colormap from - a list of colors in contour; see modified - examples/contour_demo.py. - 3) Support for imshow of a masked array, with the - ability to specify colors (or no color at all) for - masked regions, and for regions that are above or - below the normally mapped region. See - examples/image_masked.py. - 4) In support of the above, added two new classes, - ListedColormap, and no_norm, to colors.py, and modified - the Colormap class to include common functionality. Added - a clip kwarg to the normalize class. - -Changes for 0.85 -================ - -:: - - Made xtick and ytick separate props in rc - - made pos=None the default for tick formatters rather than 0 to - indicate "not supplied" - - Removed "feature" of minor ticks which prevents them from - overlapping major ticks. Often you want major and minor ticks at - the same place, and can offset the major ticks with the pad. This - could be made configurable - - Changed the internal structure of contour.py to a more OO style. - Calls to contour or contourf in axes.py or pylab.py now return - a ContourSet object which contains references to the - LineCollections or PolyCollections created by the call, - as well as the configuration variables that were used. - The ContourSet object is a "mappable" if a colormap was used. - - Added a clip_ends kwarg to contourf. From the docstring: - * clip_ends = True - If False, the limits for color scaling are set to the - minimum and maximum contour levels. - True (default) clips the scaling limits. Example: - if the contour boundaries are V = [-100, 2, 1, 0, 1, 2, 100], - then the scaling limits will be [-100, 100] if clip_ends - is False, and [-3, 3] if clip_ends is True. - Added kwargs linewidths, antialiased, and nchunk to contourf. These - are experimental; see the docstring. - - Changed Figure.colorbar(): - kw argument order changed; - if mappable arg is a non-filled ContourSet, colorbar() shows - lines instead hof polygons. - if mappable arg is a filled ContourSet with clip_ends=True, - the endpoints are not labelled, so as to give the - correct impression of open-endedness. - - Changed LineCollection.get_linewidths to get_linewidth, for - consistency. - - -Changes for 0.84 -================ - -:: - - Unified argument handling between hlines and vlines. Both now - take optionally a fmt argument (as in plot) and a keyword args - that can be passed onto Line2D. - - Removed all references to "data clipping" in rc and lines.py since - these were not used and not optimized. I'm sure they'll be - resurrected later with a better implementation when needed. - - 'set' removed - no more deprecation warnings. Use 'setp' instead. - - Backend developers: Added flipud method to image and removed it - from to_str. Removed origin kwarg from backend.draw_image. - origin is handled entirely by the frontend now. - -Changes for 0.83 -================ - -:: - - - Made HOME/.matplotlib the new config dir where the matplotlibrc - file, the ttf.cache, and the tex.cache live. The new default - filenames in .matplotlib have no leading dot and are not hidden. - e.g., the new names are matplotlibrc, tex.cache, and ttffont.cache. - This is how ipython does it so it must be right. - - If old files are found, a warning is issued and they are moved to - the new location. - - - backends/__init__.py no longer imports new_figure_manager, - draw_if_interactive and show from the default backend, but puts - these imports into a call to pylab_setup. Also, the Toolbar is no - longer imported from WX/WXAgg. New usage: - - from backends import pylab_setup - new_figure_manager, draw_if_interactive, show = pylab_setup() - - - Moved Figure.get_width_height() to FigureCanvasBase. It now - returns int instead of float. - -Changes for 0.82 -================ - -:: - - - toolbar import change in GTKAgg, GTKCairo and WXAgg - - - Added subplot config tool to GTK* backends -- note you must now - import the NavigationToolbar2 from your backend of choice rather - than from backend_gtk because it needs to know about the backend - specific canvas -- see examples/embedding_in_gtk2.py. Ditto for - wx backend -- see examples/embedding_in_wxagg.py - - - - hist bin change - - Sean Richards notes there was a problem in the way we created - the binning for histogram, which made the last bin - underrepresented. From his post: - - I see that hist uses the linspace function to create the bins - and then uses searchsorted to put the values in their correct - bin. That's all good but I am confused over the use of linspace - for the bin creation. I wouldn't have thought that it does - what is needed, to quote the docstring it creates a "Linear - spaced array from min to max". For it to work correctly - shouldn't the values in the bins array be the same bound for - each bin? (i.e. each value should be the lower bound of a - bin). To provide the correct bins for hist would it not be - something like - - def bins(xmin, xmax, N): - if N==1: return xmax - dx = (xmax-xmin)/N # instead of N-1 - return xmin + dx*arange(N) - - - This suggestion is implemented in 0.81. My test script with these - changes does not reveal any bias in the binning - - from matplotlib.numerix.mlab import randn, rand, zeros, Float - from matplotlib.mlab import hist, mean - - Nbins = 50 - Ntests = 200 - results = zeros((Ntests,Nbins), typecode=Float) - for i in range(Ntests): - print 'computing', i - x = rand(10000) - n, bins = hist(x, Nbins) - results[i] = n - print mean(results) - - -Changes for 0.81 -================ - -:: - - - pylab and artist "set" functions renamed to setp to avoid clash - with python2.4 built-in set. Current version will issue a - deprecation warning which will be removed in future versions - - - imshow interpolation arguments changes for advanced interpolation - schemes. See help imshow, particularly the interpolation, - filternorm and filterrad kwargs - - - Support for masked arrays has been added to the plot command and - to the Line2D object. Only the valid points are plotted. A - "valid_only" kwarg was added to the get_xdata() and get_ydata() - methods of Line2D; by default it is False, so that the original - data arrays are returned. Setting it to True returns the plottable - points. - - - contour changes: - - Masked arrays: contour and contourf now accept masked arrays as - the variable to be contoured. Masking works correctly for - contour, but a bug remains to be fixed before it will work for - contourf. The "badmask" kwarg has been removed from both - functions. - - Level argument changes: - - Old version: a list of levels as one of the positional - arguments specified the lower bound of each filled region; the - upper bound of the last region was taken as a very large - number. Hence, it was not possible to specify that z values - between 0 and 1, for example, be filled, and that values - outside that range remain unfilled. - - New version: a list of N levels is taken as specifying the - boundaries of N-1 z ranges. Now the user has more control over - what is colored and what is not. Repeated calls to contourf - (with different colormaps or color specifications, for example) - can be used to color different ranges of z. Values of z - outside an expected range are left uncolored. - - Example: - Old: contourf(z, [0, 1, 2]) would yield 3 regions: 0-1, 1-2, and >2. - New: it would yield 2 regions: 0-1, 1-2. If the same 3 regions were - desired, the equivalent list of levels would be [0, 1, 2, - 1e38]. - -Changes for 0.80 -================ - -:: - - - xlim/ylim/axis always return the new limits regardless of - arguments. They now take kwargs which allow you to selectively - change the upper or lower limits while leaving unnamed limits - unchanged. See help(xlim) for example - -Changes for 0.73 -================ - -:: - - - Removed deprecated ColormapJet and friends - - - Removed all error handling from the verbose object - - - figure num of zero is now allowed - -Changes for 0.72 -================ - -:: - - - Line2D, Text, and Patch copy_properties renamed update_from and - moved into artist base class - - - LineCollecitons.color renamed to LineCollections.set_color for - consistency with set/get introspection mechanism, - - - pylab figure now defaults to num=None, which creates a new figure - with a guaranteed unique number - - - contour method syntax changed - now it is MATLAB compatible - - unchanged: contour(Z) - old: contour(Z, x=Y, y=Y) - new: contour(X, Y, Z) - - see http://matplotlib.sf.net/matplotlib.pylab.html#-contour - - - - Increased the default resolution for save command. - - - Renamed the base attribute of the ticker classes to _base to avoid conflict - with the base method. Sitt for subs - - - subs=none now does autosubbing in the tick locator. - - - New subplots that overlap old will delete the old axes. If you - do not want this behavior, use fig.add_subplot or the axes - command - -Changes for 0.71 -================ - -:: - - Significant numerix namespace changes, introduced to resolve - namespace clashes between python built-ins and mlab names. - Refactored numerix to maintain separate modules, rather than - folding all these names into a single namespace. See the following - mailing list threads for more information and background - - http://sourceforge.net/mailarchive/forum.php?thread_id=6398890&forum_id=36187 - http://sourceforge.net/mailarchive/forum.php?thread_id=6323208&forum_id=36187 - - - OLD usage - - from matplotlib.numerix import array, mean, fft - - NEW usage - - from matplotlib.numerix import array - from matplotlib.numerix.mlab import mean - from matplotlib.numerix.fft import fft - - numerix dir structure mirrors numarray (though it is an incomplete - implementation) - - numerix - numerix/mlab - numerix/linear_algebra - numerix/fft - numerix/random_array - - but of course you can use 'numerix : Numeric' and still get the - symbols. - - pylab still imports most of the symbols from Numerix, MLab, fft, - etc, but is more cautious. For names that clash with python names - (min, max, sum), pylab keeps the builtins and provides the numeric - versions with an a* prefix, eg (amin, amax, asum) - -Changes for 0.70 -================ - -:: - - MplEvent factored into a base class Event and derived classes - MouseEvent and KeyEvent - - Removed definct set_measurement in wx toolbar - -Changes for 0.65.1 -================== - -:: - - removed add_axes and add_subplot from backend_bases. Use - figure.add_axes and add_subplot instead. The figure now manages the - current axes with gca and sca for get and set current axes. If you - have code you are porting which called, eg, figmanager.add_axes, you - can now simply do figmanager.canvas.figure.add_axes. - -Changes for 0.65 -================ - -:: - - - mpl_connect and mpl_disconnect in the MATLAB interface renamed to - connect and disconnect - - Did away with the text methods for angle since they were ambiguous. - fontangle could mean fontstyle (obligue, etc) or the rotation of the - text. Use style and rotation instead. - -Changes for 0.63 -================ - -:: - - Dates are now represented internally as float days since 0001-01-01, - UTC. - - All date tickers and formatters are now in matplotlib.dates, rather - than matplotlib.tickers - - converters have been abolished from all functions and classes. - num2date and date2num are now the converter functions for all date - plots - - Most of the date tick locators have a different meaning in their - constructors. In the prior implementation, the first argument was a - base and multiples of the base were ticked. e.g., - - HourLocator(5) # old: tick every 5 minutes - - In the new implementation, the explicit points you want to tick are - provided as a number or sequence - - HourLocator(range(0,5,61)) # new: tick every 5 minutes - - This gives much greater flexibility. I have tried to make the - default constructors (no args) behave similarly, where possible. - - Note that YearLocator still works under the base/multiple scheme. - The difference between the YearLocator and the other locators is - that years are not recurrent. - - - Financial functions: - - matplotlib.finance.quotes_historical_yahoo(ticker, date1, date2) - - date1, date2 are now datetime instances. Return value is a list - of quotes where the quote time is a float - days since gregorian - start, as returned by date2num - - See examples/finance_demo.py for example usage of new API - -Changes for 0.61 -================ - -:: - - canvas.connect is now deprecated for event handling. use - mpl_connect and mpl_disconnect instead. The callback signature is - func(event) rather than func(widget, event) - -Changes for 0.60 -================ - -:: - - ColormapJet and Grayscale are deprecated. For backwards - compatibility, they can be obtained either by doing - - from matplotlib.cm import ColormapJet - - or - - from matplotlib.matlab import * - - They are replaced by cm.jet and cm.grey - -Changes for 0.54.3 -================== - -:: - - removed the set_default_font / get_default_font scheme from the - font_manager to unify customization of font defaults with the rest of - the rc scheme. See examples/font_properties_demo.py and help(rc) in - matplotlib.matlab. - -Changes for 0.54 -================ - -MATLAB interface ----------------- - -dpi -~~~ - -Several of the backends used a PIXELS_PER_INCH hack that I added to -try and make images render consistently across backends. This just -complicated matters. So you may find that some font sizes and line -widths appear different than before. Apologies for the -inconvenience. You should set the dpi to an accurate value for your -screen to get true sizes. - - -pcolor and scatter -~~~~~~~~~~~~~~~~~~ - -There are two changes to the MATLAB interface API, both involving the -patch drawing commands. For efficiency, pcolor and scatter have been -rewritten to use polygon collections, which are a new set of objects -from matplotlib.collections designed to enable efficient handling of -large collections of objects. These new collections make it possible -to build large scatter plots or pcolor plots with no loops at the -python level, and are significantly faster than their predecessors. -The original pcolor and scatter functions are retained as -pcolor_classic and scatter_classic. - -The return value from pcolor is a PolyCollection. Most of the -propertes that are available on rectangles or other patches are also -available on PolyCollections, eg you can say:: - - c = scatter(blah, blah) - c.set_linewidth(1.0) - c.set_facecolor('r') - c.set_alpha(0.5) - -or:: - - c = scatter(blah, blah) - set(c, 'linewidth', 1.0, 'facecolor', 'r', 'alpha', 0.5) - - -Because the collection is a single object, you no longer need to loop -over the return value of scatter or pcolor to set properties for the -entire list. - -If you want the different elements of a collection to vary on a -property, eg to have different line widths, see matplotlib.collections -for a discussion on how to set the properties as a sequence. - -For scatter, the size argument is now in points^2 (the area of the -symbol in points) as in MATLAB and is not in data coords as before. -Using sizes in data coords caused several problems. So you will need -to adjust your size arguments accordingly or use scatter_classic. - -mathtext spacing -~~~~~~~~~~~~~~~~ - -For reasons not clear to me (and which I'll eventually fix) spacing no -longer works in font groups. However, I added three new spacing -commands which compensate for this '\ ' (regular space), '\/' (small -space) and '\hspace{frac}' where frac is a fraction of fontsize in -points. You will need to quote spaces in font strings, is:: - - title(r'$\rm{Histogram\ of\ IQ:}\ \mu=100,\ \sigma=15$') - - - -Object interface - Application programmers ------------------------------------------- - -Autoscaling -~~~~~~~~~~~ - - The x and y axis instances no longer have autoscale view. These are - handled by axes.autoscale_view - -Axes creation -~~~~~~~~~~~~~ - - You should not instantiate your own Axes any more using the OO API. - Rather, create a Figure as before and in place of:: - - f = Figure(figsize=(5,4), dpi=100) - a = Subplot(f, 111) - f.add_axis(a) - - use:: - - f = Figure(figsize=(5,4), dpi=100) - a = f.add_subplot(111) - - That is, add_axis no longer exists and is replaced by:: - - add_axes(rect, axisbg=defaultcolor, frameon=True) - add_subplot(num, axisbg=defaultcolor, frameon=True) - -Artist methods -~~~~~~~~~~~~~~ - - If you define your own Artists, you need to rename the _draw method - to draw - -Bounding boxes -~~~~~~~~~~~~~~ - - matplotlib.transforms.Bound2D is replaced by - matplotlib.transforms.Bbox. If you want to construct a bbox from - left, bottom, width, height (the signature for Bound2D), use - matplotlib.transforms.lbwh_to_bbox, as in - - bbox = clickBBox = lbwh_to_bbox(left, bottom, width, height) - - The Bbox has a different API than the Bound2D. e.g., if you want to - get the width and height of the bbox - - OLD:: - width = fig.bbox.x.interval() - height = fig.bbox.y.interval() - - New:: - width = fig.bbox.width() - height = fig.bbox.height() - - - - -Object constructors -~~~~~~~~~~~~~~~~~~~ - - You no longer pass the bbox, dpi, or transforms to the various - Artist constructors. The old way or creating lines and rectangles - was cumbersome because you had to pass so many attributes to the - Line2D and Rectangle classes not related directly to the geometry - and properties of the object. Now default values are added to the - object when you call axes.add_line or axes.add_patch, so they are - hidden from the user. - - If you want to define a custom transformation on these objects, call - o.set_transform(trans) where trans is a Transformation instance. - - In prior versions of you wanted to add a custom line in data coords, - you would have to do - - l = Line2D(dpi, bbox, x, y, - color = color, - transx = transx, - transy = transy, - ) - - now all you need is - - l = Line2D(x, y, color=color) - - and the axes will set the transformation for you (unless you have - set your own already, in which case it will eave it unchanged) - -Transformations -~~~~~~~~~~~~~~~ - - The entire transformation architecture has been rewritten. - Previously the x and y transformations where stored in the xaxis and - yaxis instances. The problem with this approach is it only allows - for separable transforms (where the x and y transformations don't - depend on one another). But for cases like polar, they do. Now - transformations operate on x,y together. There is a new base class - matplotlib.transforms.Transformation and two concrete - implementations, matplotlib.transforms.SeparableTransformation and - matplotlib.transforms.Affine. The SeparableTransformation is - constructed with the bounding box of the input (this determines the - rectangular coordinate system of the input, ie the x and y view - limits), the bounding box of the display, and possibly nonlinear - transformations of x and y. The 2 most frequently used - transformations, data coordinates -> display and axes coordinates -> - display are available as ax.transData and ax.transAxes. See - alignment_demo.py which uses axes coords. - - Also, the transformations should be much faster now, for two reasons - - * they are written entirely in extension code - - * because they operate on x and y together, they can do the entire - transformation in one loop. Earlier I did something along the - lines of:: - - xt = sx*func(x) + tx - yt = sy*func(y) + ty - - Although this was done in numerix, it still involves 6 length(x) - for-loops (the multiply, add, and function evaluation each for x - and y). Now all of that is done in a single pass. - - - If you are using transformations and bounding boxes to get the - cursor position in data coordinates, the method calls are a little - different now. See the updated examples/coords_demo.py which shows - you how to do this. - - Likewise, if you are using the artist bounding boxes to pick items - on the canvas with the GUI, the bbox methods are somewhat - different. You will need to see the updated - examples/object_picker.py. - - See unit/transforms_unit.py for many examples using the new - transformations. - - -Changes for 0.50 -================ - -:: - - * refactored Figure class so it is no longer backend dependent. - FigureCanvasBackend takes over the backend specific duties of the - Figure. matplotlib.backend_bases.FigureBase moved to - matplotlib.figure.Figure. - - * backends must implement FigureCanvasBackend (the thing that - controls the figure and handles the events if any) and - FigureManagerBackend (wraps the canvas and the window for MATLAB - interface). FigureCanvasBase implements a backend switching - mechanism - - * Figure is now an Artist (like everything else in the figure) and - is totally backend independent - - * GDFONTPATH renamed to TTFPATH - - * backend faceColor argument changed to rgbFace - - * colormap stuff moved to colors.py - - * arg_to_rgb in backend_bases moved to class ColorConverter in - colors.py - - * GD users must upgrade to gd-2.0.22 and gdmodule-0.52 since new gd - features (clipping, antialiased lines) are now used. - - * Renderer must implement points_to_pixels - - Migrating code: - - MATLAB interface: - - The only API change for those using the MATLAB interface is in how - you call figure redraws for dynamically updating figures. In the - old API, you did - - fig.draw() - - In the new API, you do - - manager = get_current_fig_manager() - manager.canvas.draw() - - See the examples system_monitor.py, dynamic_demo.py, and anim.py - - API - - There is one important API change for application developers. - Figure instances used subclass GUI widgets that enabled them to be - placed directly into figures. e.g., FigureGTK subclassed - gtk.DrawingArea. Now the Figure class is independent of the - backend, and FigureCanvas takes over the functionality formerly - handled by Figure. In order to include figures into your apps, - you now need to do, for example - - # gtk example - fig = Figure(figsize=(5,4), dpi=100) - canvas = FigureCanvasGTK(fig) # a gtk.DrawingArea - canvas.show() - vbox.pack_start(canvas) - - If you use the NavigationToolbar, this in now intialized with a - FigureCanvas, not a Figure. The examples embedding_in_gtk.py, - embedding_in_gtk2.py, and mpl_with_glade.py all reflect the new - API so use these as a guide. - - All prior calls to - - figure.draw() and - figure.print_figure(args) - - should now be - - canvas.draw() and - canvas.print_figure(args) - - Apologies for the inconvenience. This refactorization brings - significant more freedom in developing matplotlib and should bring - better plotting capabilities, so I hope the inconvenience is worth - it. - -Changes for 0.42 -================ - -:: - - * Refactoring AxisText to be backend independent. Text drawing and - get_window_extent functionality will be moved to the Renderer. - - * backend_bases.AxisTextBase is now text.Text module - - * All the erase and reset functionality removed from AxisText - not - needed with double buffered drawing. Ditto with state change. - Text instances have a get_prop_tup method that returns a hashable - tuple of text properties which you can use to see if text props - have changed, eg by caching a font or layout instance in a dict - with the prop tup as a key -- see RendererGTK.get_pango_layout in - backend_gtk for an example. - - * Text._get_xy_display renamed Text.get_xy_display - - * Artist set_renderer and wash_brushes methods removed - - * Moved Legend class from matplotlib.axes into matplotlib.legend - - * Moved Tick, XTick, YTick, Axis, XAxis, YAxis from matplotlib.axes - to matplotlib.axis - - * moved process_text_args to matplotlib.text - - * After getting Text handled in a backend independent fashion, the - import process is much cleaner since there are no longer cyclic - dependencies - - * matplotlib.matlab._get_current_fig_manager renamed to - matplotlib.matlab.get_current_fig_manager to allow user access to - the GUI window attribute, eg figManager.window for GTK and - figManager.frame for wx - -Changes for 0.40 -================ - -:: - - - Artist - * __init__ takes a DPI instance and a Bound2D instance which is - the bounding box of the artist in display coords - * get_window_extent returns a Bound2D instance - * set_size is removed; replaced by bbox and dpi - * the clip_gc method is removed. Artists now clip themselves with - their box - * added _clipOn boolean attribute. If True, gc clip to bbox. - - - AxisTextBase - * Initialized with a transx, transy which are Transform instances - * set_drawing_area removed - * get_left_right and get_top_bottom are replaced by get_window_extent - - - Line2D Patches now take transx, transy - * Initialized with a transx, transy which are Transform instances - - - Patches - * Initialized with a transx, transy which are Transform instances - - - FigureBase attributes dpi is a DPI intance rather than scalar and - new attribute bbox is a Bound2D in display coords, and I got rid - of the left, width, height, etc... attributes. These are now - accessible as, for example, bbox.x.min is left, bbox.x.interval() - is width, bbox.y.max is top, etc... - - - GcfBase attribute pagesize renamed to figsize - - - Axes - * removed figbg attribute - * added fig instance to __init__ - * resizing is handled by figure call to resize. - - - Subplot - * added fig instance to __init__ - - - Renderer methods for patches now take gcEdge and gcFace instances. - gcFace=None takes the place of filled=False - - - True and False symbols provided by cbook in a python2.3 compatible - way - - - new module transforms supplies Bound1D, Bound2D and Transform - instances and more - - - Changes to the MATLAB helpers API - - * _matlab_helpers.GcfBase is renamed by Gcf. Backends no longer - need to derive from this class. Instead, they provide a factory - function new_figure_manager(num, figsize, dpi). The destroy - method of the GcfDerived from the backends is moved to the derived - FigureManager. - - * FigureManagerBase moved to backend_bases - - * Gcf.get_all_figwins renamed to Gcf.get_all_fig_managers - - Jeremy: - - Make sure to self._reset = False in AxisTextWX._set_font. This was - something missing in my backend code. diff --git a/dev/_sources/api/artist_api.txt b/dev/_sources/api/artist_api.txt deleted file mode 100644 index 2ec41bb5c94..00000000000 --- a/dev/_sources/api/artist_api.txt +++ /dev/null @@ -1,41 +0,0 @@ -.. _artist-api: - -******* -artists -******* - -.. inheritance-diagram:: matplotlib.patches matplotlib.lines matplotlib.text - :parts: 2 - -:mod:`matplotlib.artist` -============================= - -.. automodule:: matplotlib.artist - :members: - :undoc-members: - :show-inheritance: - - -:mod:`matplotlib.lines` -============================= - -.. automodule:: matplotlib.lines - :members: - :undoc-members: - :show-inheritance: - -:mod:`matplotlib.patches` -============================= - -.. automodule:: matplotlib.patches - :members: - :undoc-members: - :show-inheritance: - -:mod:`matplotlib.text` -============================= - -.. automodule:: matplotlib.text - :members: - :undoc-members: - :show-inheritance: diff --git a/dev/_sources/api/axes_api.txt b/dev/_sources/api/axes_api.txt deleted file mode 100644 index d8b5596c291..00000000000 --- a/dev/_sources/api/axes_api.txt +++ /dev/null @@ -1,13 +0,0 @@ -**** -axes -**** - - -:mod:`matplotlib.axes` -====================== - -.. automodule:: matplotlib.axes - :members: - :undoc-members: - :show-inheritance: - diff --git a/dev/_sources/api/axis_api.txt b/dev/_sources/api/axis_api.txt deleted file mode 100644 index 426f0c873df..00000000000 --- a/dev/_sources/api/axis_api.txt +++ /dev/null @@ -1,12 +0,0 @@ -**** -axis -**** - - -:mod:`matplotlib.axis` -====================== - -.. automodule:: matplotlib.axis - :members: - :undoc-members: - :show-inheritance: diff --git a/dev/_sources/api/backend_bases_api.txt b/dev/_sources/api/backend_bases_api.txt deleted file mode 100644 index 990a1a091f8..00000000000 --- a/dev/_sources/api/backend_bases_api.txt +++ /dev/null @@ -1,8 +0,0 @@ - -:mod:`matplotlib.backend_bases` -================================ - -.. automodule:: matplotlib.backend_bases - :members: - :undoc-members: - :show-inheritance: diff --git a/dev/_sources/api/backend_gtkagg_api.txt b/dev/_sources/api/backend_gtkagg_api.txt deleted file mode 100644 index f5a37bf4d34..00000000000 --- a/dev/_sources/api/backend_gtkagg_api.txt +++ /dev/null @@ -1,11 +0,0 @@ - -:mod:`matplotlib.backends.backend_gtkagg` -========================================= - -**TODO** We'll add this later, importing the gtk backends requires an active -X-session, which is not compatible with cron jobs. - -.. .. automodule:: matplotlib.backends.backend_gtkagg -.. :members: -.. :undoc-members: -.. :show-inheritance: diff --git a/dev/_sources/api/backend_pdf_api.txt b/dev/_sources/api/backend_pdf_api.txt deleted file mode 100644 index 115863d6187..00000000000 --- a/dev/_sources/api/backend_pdf_api.txt +++ /dev/null @@ -1,7 +0,0 @@ - -:mod:`matplotlib.backends.backend_pdf` -====================================== - -.. automodule:: matplotlib.backends.backend_pdf - :members: - :show-inheritance: diff --git a/dev/_sources/api/backend_qt4agg_api.txt b/dev/_sources/api/backend_qt4agg_api.txt deleted file mode 100644 index 2e2e852612c..00000000000 --- a/dev/_sources/api/backend_qt4agg_api.txt +++ /dev/null @@ -1,9 +0,0 @@ - -:mod:`matplotlib.backends.backend_qt4agg` -========================================= - -.. automodule:: matplotlib.backends.backend_qt4agg - :members: - :undoc-members: - :show-inheritance: - diff --git a/dev/_sources/api/backend_wxagg_api.txt b/dev/_sources/api/backend_wxagg_api.txt deleted file mode 100644 index 67c5a00be54..00000000000 --- a/dev/_sources/api/backend_wxagg_api.txt +++ /dev/null @@ -1,8 +0,0 @@ - -:mod:`matplotlib.backends.backend_wxagg` -======================================== - -.. automodule:: matplotlib.backends.backend_wxagg - :members: - :undoc-members: - :show-inheritance: diff --git a/dev/_sources/api/cbook_api.txt b/dev/_sources/api/cbook_api.txt deleted file mode 100644 index 7c133ce8fdd..00000000000 --- a/dev/_sources/api/cbook_api.txt +++ /dev/null @@ -1,12 +0,0 @@ -***** -cbook -***** - - -:mod:`matplotlib.cbook` -======================= - -.. automodule:: matplotlib.cbook - :members: - :undoc-members: - :show-inheritance: diff --git a/dev/_sources/api/cm_api.txt b/dev/_sources/api/cm_api.txt deleted file mode 100644 index 6cf4a262a62..00000000000 --- a/dev/_sources/api/cm_api.txt +++ /dev/null @@ -1,11 +0,0 @@ -************* -cm (colormap) -************* - -:mod:`matplotlib.cm` -==================== - -.. automodule:: matplotlib.cm - :members: - :undoc-members: - :show-inheritance: diff --git a/dev/_sources/api/collections_api.txt b/dev/_sources/api/collections_api.txt deleted file mode 100644 index 8f3f92c4e75..00000000000 --- a/dev/_sources/api/collections_api.txt +++ /dev/null @@ -1,14 +0,0 @@ -*********** -collections -*********** - -.. inheritance-diagram:: matplotlib.collections - :parts: 2 - -:mod:`matplotlib.collections` -============================= - -.. automodule:: matplotlib.collections - :members: - :undoc-members: - :show-inheritance: diff --git a/dev/_sources/api/colorbar_api.txt b/dev/_sources/api/colorbar_api.txt deleted file mode 100644 index 26714dcebd3..00000000000 --- a/dev/_sources/api/colorbar_api.txt +++ /dev/null @@ -1,12 +0,0 @@ -******** -colorbar -******** - - -:mod:`matplotlib.colorbar` -========================== - -.. automodule:: matplotlib.colorbar - :members: - :undoc-members: - :show-inheritance: diff --git a/dev/_sources/api/colors_api.txt b/dev/_sources/api/colors_api.txt deleted file mode 100644 index bd577af02ed..00000000000 --- a/dev/_sources/api/colors_api.txt +++ /dev/null @@ -1,15 +0,0 @@ -****** -colors -****** - -For a visual representation of the matplotlib colormaps, see the -"Color" section in the gallery. - - -:mod:`matplotlib.colors` -======================== - -.. automodule:: matplotlib.colors - :members: - :undoc-members: - :show-inheritance: diff --git a/dev/_sources/api/dates_api.txt b/dev/_sources/api/dates_api.txt deleted file mode 100644 index 6d9d8dd529b..00000000000 --- a/dev/_sources/api/dates_api.txt +++ /dev/null @@ -1,14 +0,0 @@ -***** -dates -***** - -.. inheritance-diagram:: matplotlib.dates - :parts: 1 - -:mod:`matplotlib.dates` -======================= - -.. automodule:: matplotlib.dates - :members: - :undoc-members: - :show-inheritance: diff --git a/dev/_sources/api/dviread.txt b/dev/_sources/api/dviread.txt deleted file mode 100644 index edad6c91986..00000000000 --- a/dev/_sources/api/dviread.txt +++ /dev/null @@ -1,8 +0,0 @@ - -:mod:`matplotlib.dviread` -========================= - -.. automodule:: matplotlib.dviread - :members: - :undoc-members: - :show-inheritance: diff --git a/dev/_sources/api/figure_api.txt b/dev/_sources/api/figure_api.txt deleted file mode 100644 index 27e86a1fee1..00000000000 --- a/dev/_sources/api/figure_api.txt +++ /dev/null @@ -1,12 +0,0 @@ -****** -figure -****** - - -:mod:`matplotlib.figure` -======================== - -.. automodule:: matplotlib.figure - :members: - :undoc-members: - :show-inheritance: diff --git a/dev/_sources/api/font_manager_api.txt b/dev/_sources/api/font_manager_api.txt deleted file mode 100644 index 88d5fb38e5f..00000000000 --- a/dev/_sources/api/font_manager_api.txt +++ /dev/null @@ -1,21 +0,0 @@ -************ -font_manager -************ - -:mod:`matplotlib.font_manager` -============================== - -.. automodule:: matplotlib.font_manager - :members: - :undoc-members: - :show-inheritance: - -:mod:`matplotlib.fontconfig_pattern` -==================================== - -.. automodule:: matplotlib.fontconfig_pattern - :members: - :undoc-members: - :show-inheritance: - - diff --git a/dev/_sources/api/gridspec_api.txt b/dev/_sources/api/gridspec_api.txt deleted file mode 100644 index d4771f02ebd..00000000000 --- a/dev/_sources/api/gridspec_api.txt +++ /dev/null @@ -1,12 +0,0 @@ -******** -gridspec -******** - - -:mod:`matplotlib.gridspec` -========================== - -.. automodule:: matplotlib.gridspec - :members: - :undoc-members: - :show-inheritance: diff --git a/dev/_sources/api/index.txt b/dev/_sources/api/index.txt deleted file mode 100644 index 768e255aa22..00000000000 --- a/dev/_sources/api/index.txt +++ /dev/null @@ -1,45 +0,0 @@ -.. _api-index: - -#################### - The Matplotlib API -#################### - -.. htmlonly:: - - :Release: |version| - :Date: |today| - -.. toctree:: - :maxdepth: 1 - - pyplot_summary.rst - api_changes.rst - matplotlib_configuration_api.rst - afm_api.rst - animation_api.rst - artist_api.rst - axes_api.rst - axis_api.rst - index_backend_api.rst - cbook_api.rst - cm_api.rst - collections_api.rst - colorbar_api.rst - colors_api.rst - dates_api.rst - figure_api.rst - font_manager_api.rst - gridspec_api.rst - legend_api.rst - mathtext_api.rst - mlab_api.rst - nxutils_api.rst - path_api.rst - pyplot_api.rst - sankey_api.rst - spines_api.rst - ticker_api.rst - tight_layout_api.rst - tri_api.rst - units_api.rst - widgets_api.rst diff --git a/dev/_sources/api/index_backend_api.txt b/dev/_sources/api/index_backend_api.txt deleted file mode 100644 index 8a368263027..00000000000 --- a/dev/_sources/api/index_backend_api.txt +++ /dev/null @@ -1,13 +0,0 @@ -******** -backends -******** - -.. toctree:: - - backend_bases_api.rst - backend_gtkagg_api.rst - backend_qt4agg_api.rst - backend_wxagg_api.rst - backend_pdf_api.rst - dviread.rst - type1font.rst diff --git a/dev/_sources/api/legend_api.txt b/dev/_sources/api/legend_api.txt deleted file mode 100644 index 7ad075d33ca..00000000000 --- a/dev/_sources/api/legend_api.txt +++ /dev/null @@ -1,12 +0,0 @@ -****** -legend -****** - - -:mod:`matplotlib.legend` -========================= - -.. automodule:: matplotlib.legend - :members: - :undoc-members: - :show-inheritance: diff --git a/dev/_sources/api/markers_api.txt b/dev/_sources/api/markers_api.txt deleted file mode 100644 index 7dfcb2eac38..00000000000 --- a/dev/_sources/api/markers_api.txt +++ /dev/null @@ -1,12 +0,0 @@ -******* -Markers* -****** - - -:mod:`matplotlib.markers` -======================== - -.. automodule:: matplotlib.markers - :members: - :undoc-members: - :show-inheritance: diff --git a/dev/_sources/api/mathtext_api.txt b/dev/_sources/api/mathtext_api.txt deleted file mode 100644 index 689c0ade3aa..00000000000 --- a/dev/_sources/api/mathtext_api.txt +++ /dev/null @@ -1,14 +0,0 @@ -******** -mathtext -******** - -.. inheritance-diagram:: matplotlib.mathtext - :parts: 1 - -:mod:`matplotlib.mathtext` -============================= - -.. automodule:: matplotlib.mathtext - :members: - :undoc-members: - :show-inheritance: diff --git a/dev/_sources/api/matplotlib_configuration_api.txt b/dev/_sources/api/matplotlib_configuration_api.txt deleted file mode 100644 index 90ba3183ad5..00000000000 --- a/dev/_sources/api/matplotlib_configuration_api.txt +++ /dev/null @@ -1,7 +0,0 @@ -The top level :mod:`matplotlib` module -====================================== - -.. automodule:: matplotlib - :members: rc, rcdefaults, use - :undoc-members: - :show-inheritance: diff --git a/dev/_sources/api/mlab_api.txt b/dev/_sources/api/mlab_api.txt deleted file mode 100644 index 4e326b353a5..00000000000 --- a/dev/_sources/api/mlab_api.txt +++ /dev/null @@ -1,12 +0,0 @@ -**** -mlab -**** - - -:mod:`matplotlib.mlab` -======================= - -.. automodule:: matplotlib.mlab - :members: - :undoc-members: - :show-inheritance: diff --git a/dev/_sources/api/nxutils_api.txt b/dev/_sources/api/nxutils_api.txt deleted file mode 100644 index 6c17d834137..00000000000 --- a/dev/_sources/api/nxutils_api.txt +++ /dev/null @@ -1,12 +0,0 @@ -******* -nxutils -******* - -:mod:`matplotlib.nxutils` -=========================== - -.. automodule:: matplotlib.nxutils - :members: - :undoc-members: - :show-inheritance: - diff --git a/dev/_sources/api/path_api.txt b/dev/_sources/api/path_api.txt deleted file mode 100644 index d67bbb2536e..00000000000 --- a/dev/_sources/api/path_api.txt +++ /dev/null @@ -1,12 +0,0 @@ -**** -path -**** - - -:mod:`matplotlib.path` -======================= - -.. automodule:: matplotlib.path - :members: - :undoc-members: - :show-inheritance: diff --git a/dev/_sources/api/pyplot_api.txt b/dev/_sources/api/pyplot_api.txt deleted file mode 100644 index 94e3baac26f..00000000000 --- a/dev/_sources/api/pyplot_api.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/dev/_sources/api/pyplot_summary.txt b/dev/_sources/api/pyplot_summary.txt deleted file mode 100644 index 7236fa864cc..00000000000 --- a/dev/_sources/api/pyplot_summary.txt +++ /dev/null @@ -1,8 +0,0 @@ -Plotting commands summary -========================= - -.. currentmodule:: matplotlib.pyplot - -.. autofunction:: plotting - -.. autofunction:: colormaps diff --git a/dev/_sources/api/sankey_api.txt b/dev/_sources/api/sankey_api.txt deleted file mode 100644 index 51bdb15fa5f..00000000000 --- a/dev/_sources/api/sankey_api.txt +++ /dev/null @@ -1,12 +0,0 @@ -****** -sankey -****** - - -:mod:`matplotlib.sankey` -======================== - -.. automodule:: matplotlib.sankey - :members: - :undoc-members: - :show-inheritance: diff --git a/dev/_sources/api/spines_api.txt b/dev/_sources/api/spines_api.txt deleted file mode 100644 index aeab960c077..00000000000 --- a/dev/_sources/api/spines_api.txt +++ /dev/null @@ -1,12 +0,0 @@ -****** -spines -****** - - -:mod:`matplotlib.spines` -======================== - -.. automodule:: matplotlib.spines - :members: - :undoc-members: - :show-inheritance: diff --git a/dev/_sources/api/ticker_api.txt b/dev/_sources/api/ticker_api.txt deleted file mode 100644 index 12214161c33..00000000000 --- a/dev/_sources/api/ticker_api.txt +++ /dev/null @@ -1,12 +0,0 @@ -****** -ticker -****** - - -:mod:`matplotlib.ticker` -========================== - -.. automodule:: matplotlib.ticker - :members: - :undoc-members: - :show-inheritance: diff --git a/dev/_sources/api/tight_layout_api.txt b/dev/_sources/api/tight_layout_api.txt deleted file mode 100644 index 11cdaa9b71d..00000000000 --- a/dev/_sources/api/tight_layout_api.txt +++ /dev/null @@ -1,12 +0,0 @@ -************ -tight_layout -************ - - -:mod:`matplotlib.tight_layout` -============================== - -.. automodule:: matplotlib.tight_layout - :members: - :undoc-members: - :show-inheritance: diff --git a/dev/_sources/api/tri_api.txt b/dev/_sources/api/tri_api.txt deleted file mode 100644 index 8ede2a9beb2..00000000000 --- a/dev/_sources/api/tri_api.txt +++ /dev/null @@ -1,35 +0,0 @@ -**************** -triangular grids -**************** - -:mod:`matplotlib.tri` -===================== -.. automodule:: matplotlib.tri - -.. autoclass:: matplotlib.tri.Triangulation - :members: - -.. autoclass:: matplotlib.tri.TriFinder - -.. autoclass:: matplotlib.tri.TrapezoidMapTriFinder - :members: __call__ - :show-inheritance: - -.. autoclass:: matplotlib.tri.TriInterpolator - -.. autoclass:: matplotlib.tri.LinearTriInterpolator - :members: __call__, gradient - :show-inheritance: - -.. autoclass:: matplotlib.tri.CubicTriInterpolator - :members: __call__, gradient - :show-inheritance: - -.. autoclass:: matplotlib.tri.TriRefiner - -.. autoclass:: matplotlib.tri.UniformTriRefiner - :show-inheritance: - :members: - -.. autoclass:: matplotlib.tri.TriAnalyzer - :members: diff --git a/dev/_sources/api/type1font.txt b/dev/_sources/api/type1font.txt deleted file mode 100644 index 2422038835d..00000000000 --- a/dev/_sources/api/type1font.txt +++ /dev/null @@ -1,8 +0,0 @@ - -:mod:`matplotlib.type1font` -=========================== - -.. automodule:: matplotlib.type1font - :members: - :undoc-members: - :show-inheritance: diff --git a/dev/_sources/api/units_api.txt b/dev/_sources/api/units_api.txt deleted file mode 100644 index c29596eb3d3..00000000000 --- a/dev/_sources/api/units_api.txt +++ /dev/null @@ -1,12 +0,0 @@ -***** -units -***** - - -:mod:`matplotlib.units` -======================== - -.. automodule:: matplotlib.units - :members: - :undoc-members: - :show-inheritance: diff --git a/dev/_sources/api/widgets_api.txt b/dev/_sources/api/widgets_api.txt deleted file mode 100644 index edc19671798..00000000000 --- a/dev/_sources/api/widgets_api.txt +++ /dev/null @@ -1,12 +0,0 @@ -******* -widgets -******* - - -:mod:`matplotlib.widgets` -========================= - -.. automodule:: matplotlib.widgets - :members: - :undoc-members: - :show-inheritance: diff --git a/dev/_sources/contents.txt b/dev/_sources/contents.txt deleted file mode 100644 index 9a2a82b53d5..00000000000 --- a/dev/_sources/contents.txt +++ /dev/null @@ -1,29 +0,0 @@ - - -Overview -======== - -.. htmlonly:: - - :Release: |version| - :Date: |today| - - Download `PDF `_ - - -.. toctree:: - :maxdepth: 2 - - users/index.rst - faq/index.rst - devel/index.rst - mpl_toolkits/index.rst - api/index.rst - glossary/index.rst - -.. htmlonly:: - - `Examples `_ - - * :ref:`genindex` - * :ref:`modindex` - * :ref:`search` diff --git a/dev/_sources/devel/add_new_projection.txt b/dev/_sources/devel/add_new_projection.txt deleted file mode 100644 index cf310938020..00000000000 --- a/dev/_sources/devel/add_new_projection.txt +++ /dev/null @@ -1,152 +0,0 @@ -.. _adding-new-scales: - -*********************************************** -Adding new scales and projections to matplotlib -*********************************************** - -.. ::author Michael Droettboom - -Matplotlib supports the addition of custom procedures that transform -the data before it is displayed. - -There is an important distinction between two kinds of -transformations. Separable transformations, working on a single -dimension, are called "scales", and non-separable transformations, -that handle data in two or more dimensions at a time, are called -"projections". - -From the user's perspective, the scale of a plot can be set with -:meth:`~matplotlib.axes.Axes.set_xscale` and -:meth:`~matplotlib.axes.Axes.set_xscale`. Projections can be chosen -using the ``projection`` keyword argument to the -:func:`~matplotlib.pylab.plot` or :func:`~matplotlib.pylab.subplot` -functions, e.g.:: - - plot(x, y, projection="custom") - -This document is intended for developers and advanced users who need -to create new scales and projections for matplotlib. The necessary -code for scales and projections can be included anywhere: directly -within a plot script, in third-party code, or in the matplotlib source -tree itself. - -.. _creating-new-scale: - -Creating a new scale -==================== - -Adding a new scale consists of defining a subclass of -:class:`matplotlib.scale.ScaleBase`, that includes the following -elements: - - - A transformation from data coordinates into display coordinates. - - - An inverse of that transformation. This is used, for example, to - convert mouse positions from screen space back into data space. - - - A function to limit the range of the axis to acceptable values - (``limit_range_for_scale()``). A log scale, for instance, would - prevent the range from including values less than or equal to - zero. - - - Locators (major and minor) that determine where to place ticks in - the plot, and optionally, how to adjust the limits of the plot to - some "good" values. Unlike ``limit_range_for_scale()``, which is - always enforced, the range setting here is only used when - automatically setting the range of the plot. - - - Formatters (major and minor) that specify how the tick labels - should be drawn. - -Once the class is defined, it must be registered with matplotlib so -that the user can select it. - -A full-fledged and heavily annotated example is in -:file:`examples/api/custom_scale_example.py`. There are also some classes -in :mod:`matplotlib.scale` that may be used as starting points. - - -.. _creating-new-projection: - -Creating a new projection -========================= - -Adding a new projection consists of defining a projection axes which -subclasses :class:`matplotlib.axes.Axes` and includes the following -elements: - - - A transformation from data coordinates into display coordinates. - - - An inverse of that transformation. This is used, for example, to - convert mouse positions from screen space back into data space. - - - Transformations for the gridlines, ticks and ticklabels. Custom - projections will often need to place these elements in special - locations, and matplotlib has a facility to help with doing so. - - - Setting up default values (overriding - :meth:`~matplotlib.axes.Axes.cla`), since the defaults for a - rectilinear axes may not be appropriate. - - - Defining the shape of the axes, for example, an elliptical axes, - that will be used to draw the background of the plot and for - clipping any data elements. - - - Defining custom locators and formatters for the projection. For - example, in a geographic projection, it may be more convenient to - display the grid in degrees, even if the data is in radians. - - - Set up interactive panning and zooming. This is left as an - "advanced" feature left to the reader, but there is an example of - this for polar plots in :mod:`matplotlib.projections.polar`. - - - Any additional methods for additional convenience or features. - -Once the projection axes is defined, it can be used in one of two ways: - - - By defining the class attribute ``name``, the projection axes can be - registered with :func:`matplotlib.projections.register_projection` - and subsequently simply invoked by name:: - - plt.axes(projection='my_proj_name') - - - For more complex, parameterisable projections, a generic "projection" - object may be defined which includes the method ``_as_mpl_axes``. - ``_as_mpl_axes`` should take no arguments and return the projection's - axes subclass and a dictionary of additional arguments to pass to the - subclass' ``__init__`` method. Subsequently a parameterised projection - can be initialised with:: - - plt.axes(projection=MyProjection(param1=param1_value)) - - where MyProjection is an object which implements a ``_as_mpl_axes`` method. - - -A full-fledged and heavily annotated example is in -:file:`examples/api/custom_projection_example.py`. The polar plot -functionality in :mod:`matplotlib.projections.polar` may also be of -interest. - -API documentation -================= - -matplotlib.scale ----------------- - -.. automodule:: matplotlib.scale - :members: - :show-inheritance: - -matplotlib.projections ----------------------- - -.. automodule:: matplotlib.projections - :members: - :show-inheritance: - -matplotlib.projections.polar -~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -.. automodule:: matplotlib.projections.polar - :members: - :show-inheritance: diff --git a/dev/_sources/devel/coding_guide.txt b/dev/_sources/devel/coding_guide.txt deleted file mode 100644 index 7273fb38313..00000000000 --- a/dev/_sources/devel/coding_guide.txt +++ /dev/null @@ -1,273 +0,0 @@ -.. _coding-guide: - -************ -Coding guide -************ - -.. _pull-request-checklist: - -Pull request checklist -====================== - -This checklist should be consulted when creating pull requests to make -sure they are complete before merging. These are not intended to be -rigidly followed---it's just an attempt to list in one place all of -the items that are necessary for a good pull request. Of course, some -items will not always apply. - -Branch selection ----------------- - -* In general, simple bugfixes that are unlikely to introduce new bugs - of their own should be merged onto the maintenance branch. New - features, or anything that changes the API, should be made against - master. The rules are fuzzy here -- when in doubt, try to get some - consensus. - - * Once changes are merged into the maintenance branch, they should - be merged into master. - -Style ------ - -* Formatting should follow `PEP8 - `_. Exceptions to these - rules are acceptable if it makes the code objectively more readable. - - - You may want to consider installing automatic PEP8 checking in - your editor. - -* No tabs (only spaces). No trailing whitespace. - - - Configuring your editor to remove these things upon saving will - save a lot of trouble. - -* Import the following modules using the standard scipy conventions:: - - import numpy as np - import numpy.ma as ma - import matplotlib as mpl - from matplotlib import pyplot as plt - import matplotlib.cbook as cbook - import matplotlib.collections as mcol - import matplotlib.patches as mpatches - -* See below for additional points about - :ref:`keyword-argument-processing`, if code in your pull request - does that. - -* Adding a new pyplot function involves generating code. See - :ref:`new-pyplot-function` for more information. - -Documentation -------------- - -* Every new feature should be documented. If it's a new module, don't - forget to add it to the API docs. - -* Build the docs and make sure all formatting warnings are addressed. - -* See :ref:`documenting-matplotlib` for our documentation style guide. - -* If your changes are non-trivial, please make an entry in the - :file:`CHANGELOG`. - -* If your change is a major new feature, add an entry to - :file:`doc/users/whats_new.rst`. - -* If you change the API in a backward-incompatible way, please - document it in :file:`doc/api/api_changes.rst`. - -Testing -------- - -Using the test framework is discussed in detail in the section -:ref:`testing`. - -* If the PR is a bugfix, add a test that fails prior to the change and - passes with the change. Include any relevant issue numbers in the - docstring of the test. - -* If this is a new feature, add a test that exercises as much of the - new feature as possible. (The `--with-coverage` option may be - useful here). - -* Make sure the Travis tests are passing before merging. - - - The Travis tests automatically test on all of the Python versions - matplotlib supports whenever a pull request is created or updated. - The `tox` support in matplotlib may be useful for testing locally. - -Installation ------------- - -* If you have added new files or directories, or reorganized existing - ones, make sure the new files included in the match patterns in - :file:`MANIFEST.in`, and/or in `package_data` in `setup.py`. - -C/C++ extensions ----------------- - -* Extensions may be written in C or C++. - -* Code style should conform to PEP7 (understanding that PEP7 doesn't - address C++, but most of its admonitions still apply). - -* Interfacing with Python may be done either with the raw Python/C API - or Cython. Use of PyCXX is discouraged for new code. - -* Python/C interface code should be kept separate from the core C/C++ - code. The interface code should be named `FOO_wrap.cpp`. - -* Header file documentation (aka docstrings) should be in Numpydoc - format. We don't plan on using automated tools for these - docstrings, and the Numpydoc format is well understood in the - scientific Python community. - -Style guide -=========== - -.. _keyword-argument-processing: - -Keyword argument processing ---------------------------- - -Matplotlib makes extensive use of ``**kwargs`` for pass-through -customizations from one function to another. A typical example is in -:func:`matplotlib.pylab.text`. The definition of the pylab text -function is a simple pass-through to -:meth:`matplotlib.axes.Axes.text`:: - - # in pylab.py - def text(*args, **kwargs): - ret = gca().text(*args, **kwargs) - draw_if_interactive() - return ret - -:meth:`~matplotlib.axes.Axes.text` in simplified form looks like this, -i.e., it just passes all ``args`` and ``kwargs`` on to -:meth:`matplotlib.text.Text.__init__`:: - - # in axes.py - def text(self, x, y, s, fontdict=None, withdash=False, **kwargs): - t = Text(x=x, y=y, text=s, **kwargs) - -and :meth:`~matplotlib.text.Text.__init__` (again with liberties for -illustration) just passes them on to the -:meth:`matplotlib.artist.Artist.update` method:: - - # in text.py - def __init__(self, x=0, y=0, text='', **kwargs): - Artist.__init__(self) - self.update(kwargs) - -``update`` does the work looking for methods named like -``set_property`` if ``property`` is a keyword argument. I.e., no one -looks at the keywords, they just get passed through the API to the -artist constructor which looks for suitably named methods and calls -them with the value. - -As a general rule, the use of ``**kwargs`` should be reserved for -pass-through keyword arguments, as in the example above. If all the -keyword args are to be used in the function, and not passed -on, use the key/value keyword args in the function definition rather -than the ``**kwargs`` idiom. - -In some cases, you may want to consume some keys in the local -function, and let others pass through. You can ``pop`` the ones to be -used locally and pass on the rest. For example, in -:meth:`~matplotlib.axes.Axes.plot`, ``scalex`` and ``scaley`` are -local arguments and the rest are passed on as -:meth:`~matplotlib.lines.Line2D` keyword arguments:: - - # in axes.py - def plot(self, *args, **kwargs): - scalex = kwargs.pop('scalex', True) - scaley = kwargs.pop('scaley', True) - if not self._hold: self.cla() - lines = [] - for line in self._get_lines(*args, **kwargs): - self.add_line(line) - lines.append(line) - -Note: there is a use case when ``kwargs`` are meant to be used locally -in the function (not passed on), but you still need the ``**kwargs`` -idiom. That is when you want to use ``*args`` to allow variable -numbers of non-keyword args. In this case, python will not allow you -to use named keyword args after the ``*args`` usage, so you will be -forced to use ``**kwargs``. An example is -:meth:`matplotlib.contour.ContourLabeler.clabel`:: - - # in contour.py - def clabel(self, *args, **kwargs): - fontsize = kwargs.get('fontsize', None) - inline = kwargs.get('inline', 1) - self.fmt = kwargs.get('fmt', '%1.3f') - colors = kwargs.get('colors', None) - if len(args) == 0: - levels = self.levels - indices = range(len(self.levels)) - elif len(args) == 1: - ...etc... - -Hints -===== - -This section describes how to add certain kinds of new features to -matplotlib. - -.. _custom_backend: - -Developing a new backend ------------------------- - -If you are working on a custom backend, the *backend* setting in -:file:`matplotlibrc` (:ref:`customizing-matplotlib`) supports an -external backend via the ``module`` directive. if -:file:`my_backend.py` is a matplotlib backend in your -:envvar:`PYTHONPATH`, you can set use it on one of several ways - -* in matplotlibrc:: - - backend : module://my_backend - -* with the use directive is your script:: - - import matplotlib - matplotlib.use('module://my_backend') - -* from the command shell with the -d flag:: - - > python simple_plot.py -d module://my_backend - - -.. _sample-data: - -Writing examples ----------------- - -We have hundreds of examples in subdirectories of -:file:`matplotlib/examples`, and these are automatically generated -when the website is built to show up both in the `examples -`_ and `gallery -`_ sections of the website. - -Any sample data that the example uses should be kept small and -distributed with matplotlib in the -`lib/matplotlib/mpl-data/sample_data/` directory. Then in your -example code you can load it into a file handle with:: - - import matplotlib.cbook as cbook - fh = cbook.get_sample_data('mydata.dat') - -.. _new-pyplot-function: - -Writing a new pyplot function ------------------------------ - -A large portion of the pyplot interface is automatically generated by the -`boilerplate.py` script (in the root of the source tree). To add or remove -a plotting method from pyplot, edit the appropriate list in `boilerplate.py` -and then run the script which will update the content in -`lib/matplotlib/pyplot.py`. Both the changes in `boilerplate.py` and -`lib/matplotlib/pyplot.py` should be checked into the repository. diff --git a/dev/_sources/devel/documenting_mpl.txt b/dev/_sources/devel/documenting_mpl.txt deleted file mode 100644 index f43977cb400..00000000000 --- a/dev/_sources/devel/documenting_mpl.txt +++ /dev/null @@ -1,496 +0,0 @@ -.. _documenting-matplotlib: - -********************** -Documenting matplotlib -********************** - -Getting started -=============== - -The documentation for matplotlib is generated from ReStructured Text using the -Sphinx_ documentation generation tool. Sphinx-1.0 or later and numpydoc 0.4 or -later is required. - -The documentation sources are found in the :file:`doc/` directory in -the trunk. To build the users guide in html format, cd into -:file:`doc/` and do:: - - python make.py html - -or:: - - ./make.py html - -you can also pass a ``latex`` flag to make.py to build a pdf, or pass no -arguments to build everything. - -The output produced by Sphinx can be configured by editing the :file:`conf.py` -file located in the :file:`doc/`. - - -Organization of matplotlib's documentation -========================================== - -The actual ReStructured Text files are kept in :file:`doc/users`, -:file:`doc/devel`, :file:`doc/api` and :file:`doc/faq`. The main entry point is -:file:`doc/index.rst`, which pulls in the :file:`index.rst` file for the users -guide, developers guide, api reference, and faqs. The documentation suite is -built as a single document in order to make the most effective use of cross -referencing, we want to make navigating the Matplotlib documentation as easy as -possible. - -Additional files can be added to the various guides by including their base -file name (the .rst extension is not necessary) in the table of contents. -It is also possible to include other documents through the use of an include -statement, such as:: - - .. include:: ../../TODO - -docstrings ----------- - -In addition to the "narrative" documentation described above, -matplotlib also defines its API reference documentation in docstrings. -For the most part, these are standard Python docstrings, but -matplotlib also includes some features to better support documenting -getters and setters. - -Matplotlib uses artist introspection of docstrings to support -properties. All properties that you want to support through ``setp`` -and ``getp`` should have a ``set_property`` and ``get_property`` -method in the :class:`~matplotlib.artist.Artist` class. Yes, this is -not ideal given python properties or enthought traits, but it is a -historical legacy for now. The setter methods use the docstring with -the ACCEPTS token to indicate the type of argument the method accepts. -e.g., in :class:`matplotlib.lines.Line2D`:: - - # in lines.py - def set_linestyle(self, linestyle): - """ - Set the linestyle of the line - - ACCEPTS: [ '-' | '--' | '-.' | ':' | 'steps' | 'None' | ' ' | '' ] - """ - -Since matplotlib uses a lot of pass-through ``kwargs``, e.g., in every -function that creates a line (:func:`~matplotlib.pyplot.plot`, -:func:`~matplotlib.pyplot.semilogx`, -:func:`~matplotlib.pyplot.semilogy`, etc...), it can be difficult for -the new user to know which ``kwargs`` are supported. Matplotlib uses -a docstring interpolation scheme to support documentation of every -function that takes a ``**kwargs``. The requirements are: - -1. single point of configuration so changes to the properties don't - require multiple docstring edits. - -2. as automated as possible so that as properties change, the docs - are updated automagically. - -The functions :attr:`matplotlib.artist.kwdocd` and -:func:`matplotlib.artist.kwdoc` to facilitate this. They combine -python string interpolation in the docstring with the matplotlib -artist introspection facility that underlies ``setp`` and ``getp``. -The ``kwdocd`` is a single dictionary that maps class name to a -docstring of ``kwargs``. Here is an example from -:mod:`matplotlib.lines`:: - - # in lines.py - artist.kwdocd['Line2D'] = artist.kwdoc(Line2D) - -Then in any function accepting :class:`~matplotlib.lines.Line2D` -pass-through ``kwargs``, e.g., :meth:`matplotlib.axes.Axes.plot`:: - - # in axes.py - def plot(self, *args, **kwargs): - """ - Some stuff omitted - - The kwargs are Line2D properties: - %(Line2D)s - - kwargs scalex and scaley, if defined, are passed on - to autoscale_view to determine whether the x and y axes are - autoscaled; default True. See Axes.autoscale_view for more - information - """ - pass - plot.__doc__ = cbook.dedent(plot.__doc__) % artist.kwdocd - -Note there is a problem for :class:`~matplotlib.artist.Artist` -``__init__`` methods, e.g., :meth:`matplotlib.patches.Patch.__init__`, -which supports ``Patch`` ``kwargs``, since the artist inspector cannot -work until the class is fully defined and we can't modify the -``Patch.__init__.__doc__`` docstring outside the class definition. -There are some some manual hacks in this case, violating the -"single entry point" requirement above -- see the -``artist.kwdocd['Patch']`` setting in :mod:`matplotlib.patches`. - -.. _formatting-mpl-docs: - -Formatting -========== - -The Sphinx website contains plenty of documentation_ concerning ReST markup and -working with Sphinx in general. Here are a few additional things to keep in mind: - -* Please familiarize yourself with the Sphinx directives for `inline - markup`_. Matplotlib's documentation makes heavy use of cross-referencing and - other semantic markup. For example, when referring to external files, use the - ``:file:`` directive. - -* Function arguments and keywords should be referred to using the *emphasis* - role. This will keep matplotlib's documentation consistent with Python's - documentation:: - - Here is a description of *argument* - - Please do not use the `default role`:: - - Please do not describe `argument` like this. - - nor the ``literal`` role:: - - Please do not describe ``argument`` like this. - -* Sphinx does not support tables with column- or row-spanning cells for - latex output. Such tables can not be used when documenting matplotlib. - -* Mathematical expressions can be rendered as png images in html, and in the - usual way by latex. For example: - - ``:math:`\sin(x_n^2)``` yields: :math:`\sin(x_n^2)`, and:: - - .. math:: - - \int_{-\infty}^{\infty}\frac{e^{i\phi}}{1+x^2\frac{e^{i\phi}}{1+x^2}} - - yields: - - .. math:: - - \int_{-\infty}^{\infty}\frac{e^{i\phi}}{1+x^2\frac{e^{i\phi}}{1+x^2}} - -* Interactive IPython sessions can be illustrated in the documentation using - the following directive:: - - .. sourcecode:: ipython - - In [69]: lines = plot([1,2,3]) - - which would yield: - - .. sourcecode:: ipython - - In [69]: lines = plot([1,2,3]) - -* Footnotes [#]_ can be added using ``[#]_``, followed later by:: - - .. rubric:: Footnotes - - .. [#] - - .. rubric:: Footnotes - - .. [#] For example. - -* Use the *note* and *warning* directives, sparingly, to draw attention to - important comments:: - - .. note:: - Here is a note - - yields: - - .. note:: - here is a note - - also: - - .. warning:: - here is a warning - -* Use the *deprecated* directive when appropriate:: - - .. deprecated:: 0.98 - This feature is obsolete, use something else. - - yields: - - .. deprecated:: 0.98 - This feature is obsolete, use something else. - -* Use the *versionadded* and *versionchanged* directives, which have similar - syntax to the *deprecated* role:: - - .. versionadded:: 0.98 - The transforms have been completely revamped. - - .. versionadded:: 0.98 - The transforms have been completely revamped. - -* Use the *seealso* directive, for example:: - - .. seealso:: - - Using ReST :ref:`emacs-helpers`: - One example - - A bit about :ref:`referring-to-mpl-docs`: - One more - - yields: - - .. seealso:: - - Using ResT :ref:`emacs-helpers`: - One example - - A bit about :ref:`referring-to-mpl-docs`: - One more - -* Please keep the :ref:`glossary` in mind when writing documentation. You can - create a references to a term in the glossary with the ``:term:`` role. - -* The autodoc extension will handle index entries for the API, but additional - entries in the index_ need to be explicitly added. - -.. _Sphinx: http://sphinx.pocoo.org -.. _documentation: http://sphinx.pocoo.org/contents.html -.. _`inline markup`: http://sphinx.pocoo.org/markup/inline.html -.. _index: http://sphinx.pocoo.org/markup/para.html#index-generating-markup - -* Please limit the text width of docstrings to 70 characters. - -* Keyword arguments should be described using a definition list. - - .. note:: - matplotlib makes extensive use of keyword arguments as pass-through - arguments, there are a many cases where a table is used in place of a - definition list for autogenerated sections of docstrings. - -Figures -======= - -Dynamically generated figures ------------------------------ - -Figures can be automatically generated from scripts and included in -the docs. It is not necessary to explicitly save the figure in the -script, this will be done automatically at build time to ensure that -the code that is included runs and produces the advertised figure. - -The path should be relative to the ``doc`` directory. Any plots -specific to the documentation should be added to the ``doc/pyplots`` -directory and committed to git. Plots from the ``examples`` directory -may be referenced through the symlink ``mpl_examples`` in the ``doc`` -directory. e.g.:: - - .. plot:: mpl_examples/pylab_examples/simple_plot.py - -The ``:scale:`` directive rescales the image to some percentage of the -original size, though we don't recommend using this in most cases -since it is probably better to choose the correct figure size and dpi -in mpl and let it handle the scaling. - -Plot directive documentation -'''''''''''''''''''''''''''' - -.. automodule:: matplotlib.sphinxext.plot_directive - -Static figures --------------- - -Any figures that rely on optional system configurations need to be handled a -little differently. These figures are not to be generated during the -documentation build, in order to keep the prerequisites to the documentation -effort as low as possible. Please run the :file:`doc/pyplots/make.py` script -when adding such figures, and commit the script **and** the images to -git. Please also add a line to the README in doc/pyplots for any additional -requirements necessary to generate a new figure. Once these steps have been -taken, these figures can be included in the usual way:: - - .. plot:: pyplots/tex_unicode_demo.py - :include-source: - -Examples --------- - -The source of the files in the ``examples`` directory are -automatically included in the HTML docs. An image is generated and -included for all examples in the ``api`` and ``pylab_examples`` -directories. To exclude the example from having an image rendered, -insert the following special comment anywhere in the script:: - - # -*- noplot -*- - -Animations ----------- - -We have a matplotlib google/gmail account with username ``mplgithub`` -which we used to setup the github account but can be used for other -purposes, like hosting google docs or youtube videos. You can embed a -matplotlib animation in the docs by first saving the animation as a -movie using :meth:`matplotlib.animation.Animation.save`, and then -uploading to `matplotlib's youtube -channel `_ and inserting the -embedding string youtube provides like:: - - .. raw:: html - - - -An example save command to generate a movie looks like this - -.. sourcecode:: python - - ani = animation.FuncAnimation(fig, animate, np.arange(1, len(y)), - interval=25, blit=True, init_func=init) - - ani.save('double_pendulum.mp4', fps=15) - -Contact John Hunter for the login password to upload youtube videos of -google docs to the mplgithub account. - -.. _referring-to-mpl-docs: - -Referring to mpl documents -========================== - -In the documentation, you may want to include to a document in the -matplotlib src, e.g., a license file or an image file from `mpl-data`, -refer to it via a relative path from the document where the rst file -resides, eg, in :file:`users/navigation_toolbar.rst`, we refer to the -image icons with:: - - .. image:: ../../lib/matplotlib/mpl-data/images/subplots.png - -In the `users` subdirectory, if I want to refer to a file in the mpl-data -directory, I use the symlink directory. For example, from -`customizing.rst`:: - - .. literalinclude:: ../../lib/matplotlib/mpl-data/matplotlibrc - -One exception to this is when referring to the examples dir. Relative -paths are extremely confusing in the sphinx plot extensions, so -without getting into the dirty details, it is easier to simply include -a symlink to the files at the top doc level directory. This way, API -documents like :meth:`matplotlib.pyplot.plot` can refer to the -examples in a known location. - -In the top level doc directory we have symlinks pointing to -the mpl `examples`:: - - home:~/mpl/doc> ls -l mpl_* - mpl_examples -> ../examples - -So we can include plots from the examples dir using the symlink:: - - .. plot:: mpl_examples/pylab_examples/simple_plot.py - - -We used to use a symlink for :file:`mpl-data` too, but the distro -becomes very large on platforms that do not support links (eg the font -files are duplicated and large) - -.. _internal-section-refs: - -Internal section references -=========================== - -To maximize internal consistency in section labeling and references, -use hyphen separated, descriptive labels for section references, eg:: - - .. _howto-webapp: - -and refer to it using the standard reference syntax:: - - See :ref:`howto-webapp` - -Keep in mind that we may want to reorganize the contents later, so -let's avoid top level names in references like ``user`` or ``devel`` -or ``faq`` unless necessary, because for example the FAQ "what is a -backend?" could later become part of the users guide, so the label:: - - .. _what-is-a-backend - -is better than:: - - .. _faq-backend - -In addition, since underscores are widely used by Sphinx itself, let's prefer -hyphens to separate words. - - - -Section names, etc -================== - -For everything but top level chapters, please use ``Upper lower`` for -section titles, eg ``Possible hangups`` rather than ``Possible -Hangups`` - -Inheritance diagrams -==================== - -Class inheritance diagrams can be generated with the -``inheritance-diagram`` directive. To use it, you provide the -directive with a number of class or module names (separated by -whitespace). If a module name is provided, all classes in that module -will be used. All of the ancestors of these classes will be included -in the inheritance diagram. - -A single option is available: *parts* controls how many of parts in -the path to the class are shown. For example, if *parts* == 1, the -class ``matplotlib.patches.Patch`` is shown as ``Patch``. If *parts* -== 2, it is shown as ``patches.Patch``. If *parts* == 0, the full -path is shown. - -Example:: - - .. inheritance-diagram:: matplotlib.patches matplotlib.lines matplotlib.text - :parts: 2 - -.. inheritance-diagram:: matplotlib.patches matplotlib.lines matplotlib.text - :parts: 2 - - -.. _emacs-helpers: - -Emacs helpers -============= - -There is an emacs mode `rst.el -`_ which -automates many important ReST tasks like building and updating -table-of-contents, and promoting or demoting section headings. Here -is the basic ``.emacs`` configuration:: - - (require 'rst) - (setq auto-mode-alist - (append '(("\\.txt$" . rst-mode) - ("\\.rst$" . rst-mode) - ("\\.rest$" . rst-mode)) auto-mode-alist)) - - -Some helpful functions:: - - C-c TAB - rst-toc-insert - - Insert table of contents at point - - C-c C-u - rst-toc-update - - Update the table of contents at point - - C-c C-l rst-shift-region-left - - Shift region to the left - - C-c C-r rst-shift-region-right - - Shift region to the right - -.. TODO: Add section about uploading docs diff --git a/dev/_sources/devel/gitwash/configure_git.txt b/dev/_sources/devel/gitwash/configure_git.txt deleted file mode 100644 index 70c6a5a37b6..00000000000 --- a/dev/_sources/devel/gitwash/configure_git.txt +++ /dev/null @@ -1,130 +0,0 @@ -.. _configure-git: - -=============== - Configure git -=============== - -.. _git-config-basic: - -Overview -======== - -Your personal git_ configurations are saved in the ``.gitconfig`` file in -your home directory. -Here is an example ``.gitconfig`` file:: - - [user] - name = Your Name - email = you@yourdomain.example.com - - [alias] - ci = commit -a - co = checkout - st = status -a - stat = status -a - br = branch - wdiff = diff --color-words - - [core] - editor = vim - - [merge] - summary = true - - [apply] - whitespace = fix - - [core] - autocrlf = input - - -You can edit this file directly or you can use the ``git config --global`` -command:: - - git config --global user.name "Your Name" - git config --global user.email you@yourdomain.example.com - git config --global alias.ci "commit -a" - git config --global alias.co checkout - git config --global alias.st "status -a" - git config --global alias.stat "status -a" - git config --global alias.br branch - git config --global alias.wdiff "diff --color-words" - git config --global core.editor vim - git config --global merge.summary true - -To set up on another computer, you can copy your ``~/.gitconfig`` file, -or run the commands above. - -In detail -========= - -user.name and user.email ------------------------- - -It is good practice to tell git_ who you are, for labeling any changes -you make to the code. The simplest way to do this is from the command -line:: - - git config --global user.name "Your Name" - git config --global user.email you@yourdomain.example.com - -This will write the settings into your git configuration file, which -should now contain a user section with your name and email:: - - [user] - name = Your Name - email = you@yourdomain.example.com - -Of course you'll need to replace ``Your Name`` and ``you@yourdomain.example.com`` -with your actual name and email address. - -Aliases -------- - -You might well benefit from some aliases to common commands. - -For example, you might well want to be able to shorten ``git checkout`` -to ``git co``. Or you may want to alias ``git diff --color-words`` -(which gives a nicely formatted output of the diff) to ``git wdiff`` - -The following ``git config --global`` commands:: - - git config --global alias.ci "commit -a" - git config --global alias.co checkout - git config --global alias.st "status -a" - git config --global alias.stat "status -a" - git config --global alias.br branch - git config --global alias.wdiff "diff --color-words" - -will create an ``alias`` section in your ``.gitconfig`` file with contents -like this:: - - [alias] - ci = commit -a - co = checkout - st = status -a - stat = status -a - br = branch - wdiff = diff --color-words - -Editor ------- - -You may also want to make sure that your editor of choice is used :: - - git config --global core.editor vim - -Merging -------- - -To enforce summaries when doing merges (``~/.gitconfig`` file again):: - - [merge] - log = true - -Or from the command line:: - - git config --global merge.log true - - -.. include:: links.inc diff --git a/dev/_sources/devel/gitwash/development_workflow.txt b/dev/_sources/devel/gitwash/development_workflow.txt deleted file mode 100644 index 2ef9ecbfb42..00000000000 --- a/dev/_sources/devel/gitwash/development_workflow.txt +++ /dev/null @@ -1,323 +0,0 @@ -.. _development-workflow: - -==================== -Development workflow -==================== - -You already have your own forked copy of the matplotlib_ repository, by -following :ref:`forking`, :ref:`set-up-fork`, and you have configured -git_ by following :ref:`configure-git`. - -Workflow summary -================ - -* Keep your ``master`` branch clean of edits that have not been merged - to the main matplotlib_ development repo. Your ``master`` then will follow - the main matplotlib_ repository. -* Start a new *feature branch* for each set of edits that you do. -* If you can avoid it, try not to merge other branches into your feature - branch while you are working. -* Ask for review! - -This way of working really helps to keep work well organized, and in -keeping history as clear as possible. - -See |emdash| for example |emdash| `linux git workflow`_. - -Making a new feature branch -=========================== - -:: - - git checkout -b my-new-feature master - -This will create and immediately check out a feature branch based on -``master``. To create a feature branch based on a maintenance branch, -use:: - - git fetch origin - git checkout -b my-new-feature origin/v1.0.x - -Generally, you will want to keep this also on your public github_ fork -of matplotlib_. To do this, you `git push`_ this new branch up to your github_ -repo. Generally (if you followed the instructions in these pages, and -by default), git will have a link to your github_ repo, called -``origin``. You push up to your own repo on github_ with:: - - git push origin my-new-feature - -You will need to use this exact command, rather than simply ``git -push`` every time you want to push changes on your feature branch to -your github_ repo. However, in git >1.7 you can set up a link by -using the ``--set-upstream`` option:: - - git push --set-upstream origin my-new-feature - -and then next time you need to push changes to your branch a simple -``git push`` will suffice. Note that ``git push`` pushes out all -branches that are linked to a remote branch. - -The editing workflow -==================== - -Overview --------- - -:: - - # hack hack - git add my_new_file - git commit -am 'NF - some message' - git push - -In more detail --------------- - -#. Make some changes -#. See which files have changed with ``git status`` (see `git status`_). - You'll see a listing like this one:: - - # On branch ny-new-feature - # Changed but not updated: - # (use "git add ..." to update what will be committed) - # (use "git checkout -- ..." to discard changes in working directory) - # - # modified: README - # - # Untracked files: - # (use "git add ..." to include in what will be committed) - # - # INSTALL - no changes added to commit (use "git add" and/or "git commit -a") - -#. Check what the actual changes are with ``git diff`` (`git diff`_). -#. Add any new files to version control ``git add new_file_name`` (see - `git add`_). -#. To commit all modified files into the local copy of your repo,, do - ``git commit -am 'A commit message'``. Note the ``-am`` options to - ``commit``. The ``m`` flag just signals that you're going to type a - message on the command line. The ``a`` flag |emdash| you can just take on - faith |emdash| or see `why the -a flag?`_ |emdash| and the helpful use-case - description in the `tangled working copy problem`_. The `git commit`_ manual - page might also be useful. -#. To push the changes up to your forked repo on github_, do a ``git - push`` (see `git push`). - -Asking for code review -====================== - -#. Go to your repo URL |emdash| e.g., - ``http://github.com/your-user-name/matplotlib``. -#. Click on the *Branch list* button: - - .. image:: branch_list.png - -#. Click on the *Compare* button for your feature branch |emdash| here ``my-new-feature``: - - .. image:: branch_list_compare.png - -#. If asked, select the *base* and *comparison* branch names you want to - compare. Usually these will be ``master`` and ``my-new-feature`` - (where that is your feature branch name). -#. At this point you should get a nice summary of the changes. Copy the - URL for this, and post it to the `matplotlib mailing list`_, asking for - review. The URL will look something like: - ``http://github.com/your-user-name/matplotlib/compare/master...my-new-feature``. - There's an example at - http://github.com/matthew-brett/nipy/compare/master...find-install-data - See: http://github.com/blog/612-introducing-github-compare-view for - more detail. - -The generated comparison, is between your feature branch -``my-new-feature``, and the place in ``master`` from which you branched -``my-new-feature``. In other words, you can keep updating ``master`` -without interfering with the output from the comparison. More detail? -Note the three dots in the URL above (``master...my-new-feature``) and -see :ref:`dot2-dot3`. - -It's a good idea to consult the :ref:`pull-request-checklist` to make -sure your pull request is ready for merging. - -Asking for your changes to be merged into the main repo -======================================================= - -When you are ready to ask for the merge of your code: - -#. Go to the URL of your forked repo, say - ``http://github.com/your-user-name/matplotlib.git``. -#. Click on the 'Pull request' button: - - .. image:: pull_button.png - - Enter a message; we suggest you select only ``matplotlib`` as the - recipient. The message will go to the `matplotlib mailing list`_. Please - feel free to add others from the list as you like. - -#. If the branch is to be merged into a maintenance branch on the main - repo, make sure the "base branch" indicates the maintenance branch - and not master. Github can not automatically determine the branch - to merge into. - -Staying up to date with changes in the central repository -========================================================= - -This updates your working copy from the upstream `matplotlib github`_ -repo. - -Overview --------- - -:: - - # go to your master branch - git checkout master - # pull changes from github - git fetch upstream - # merge from upstream - git merge --ff-only upstream/master - -In detail ---------- - -We suggest that you do this only for your ``master`` branch, and leave -your 'feature' branches unmerged, to keep their history as clean as -possible. This makes code review easier:: - - git checkout master - -Make sure you have done :ref:`linking-to-upstream`. - -Merge the upstream code into your current development by first pulling -the upstream repo to a copy on your local machine:: - - git fetch upstream - -then merging into your current branch:: - - git merge --ff-only upstream/master - -The ``--ff-only`` option guarantees that if you have mistakenly -committed code on your ``master`` branch, the merge fails at this point. -If you were to merge ``upstream/master`` to your ``master``, you -would start to diverge from the upstream. If this command fails, see -the section on accidents_. - -The letters 'ff' in ``--ff-only`` mean 'fast forward', which is a -special case of merge where git can simply update your branch to point -to the other branch and not do any actual merging of files. For -``master`` and other integration branches this is exactly what you -want. - -Other integration branches --------------------------- - -Some people like to keep separate local branches corresponding to the -maintenance branches on github. At the time of this writing, ``v1.0.x`` -is the active maintenance branch. If you have such a local branch, -treat is just as ``master``: don't commit on it, and before starting -new branches off of it, update it from upstream:: - - git checkout v1.0.x - git fetch upstream - git merge --ff-only upstream/v1.0.x - -But you don't necessarily have to have such a branch. Instead, if you -are preparing a bugfix that applies to the maintenance branch, fetch -from upstream and base your bugfix on the remote branch:: - - git fetch upstream - git checkout -b my-bug-fix upstream/v1.0.x - -.. _accidents: - -Recovering from accidental commits on master --------------------------------------------- - -If you have accidentally committed changes on ``master`` and -``git merge --ff-only`` fails, don't panic! First find out how much -you have diverged:: - - git diff upstream/master...master - -If you find that you want simply to get rid of the changes, reset -your ``master`` branch to the upstream version:: - - git reset --hard upstream/master - -As you might surmise from the words 'reset' and 'hard', this command -actually causes your changes to the current branch to be lost, so -think twice. - -If, on the other hand, you find that you want to preserve the changes, -create a feature branch for them:: - - git checkout -b my-important-changes - -Now ``my-important-changes`` points to the branch that has your -changes, and you can safely reset ``master`` as above |emdash| but -make sure to reset the correct branch:: - - git checkout master - git reset --hard upstream/master - - -Deleting a branch on github_ -============================ - -:: - - git checkout master - # delete branch locally - git branch -D my-unwanted-branch - # delete branch on github - git push origin :my-unwanted-branch - -(Note the colon ``:`` before ``test-branch``. See also: -http://github.com/guides/remove-a-remote-branch - -Several people sharing a single repository -========================================== - -If you want to work on some stuff with other people, where you are all -committing into the same repository, or even the same branch, then just -share it via github_. - -First fork matplotlib into your account, as from :ref:`forking`. - -Then, go to your forked repository github page, say -``http://github.com/your-user-name/matplotlib`` - -Click on the 'Admin' button, and add anyone else to the repo as a -collaborator: - - .. image:: pull_button.png - -Now all those people can do:: - - git clone git@githhub.com:your-user-name/matplotlib.git - -Remember that links starting with ``git@`` use the ssh protocol and are -read-write; links starting with ``git://`` are read-only. - -Your collaborators can then commit directly into that repo with the -usual:: - - git commit -am 'ENH - much better code' - git push origin master # pushes directly into your repo - -Exploring your repository -========================= - -To see a graphical representation of the repository branches and -commits:: - - gitk --all - -To see a linear list of commits for this branch:: - - git log - -You can also look at the `network graph visualizer`_ for your github_ -repo. - -.. include:: links.inc diff --git a/dev/_sources/devel/gitwash/dot2_dot3.txt b/dev/_sources/devel/gitwash/dot2_dot3.txt deleted file mode 100644 index 7759e2e60d6..00000000000 --- a/dev/_sources/devel/gitwash/dot2_dot3.txt +++ /dev/null @@ -1,28 +0,0 @@ -.. _dot2-dot3: - -======================================== - Two and three dots in difference specs -======================================== - -Thanks to Yarik Halchenko for this explanation. - -Imagine a series of commits A, B, C, D... Imagine that there are two -branches, *topic* and *master*. You branched *topic* off *master* when -*master* was at commit 'E'. The graph of the commits looks like this:: - - - A---B---C topic - / - D---E---F---G master - -Then:: - - git diff master..topic - -will output the difference from G to C (i.e. with effects of F and G), -while:: - - git diff master...topic - -would output just differences in the topic branch (i.e. only A, B, and -C). diff --git a/dev/_sources/devel/gitwash/following_latest.txt b/dev/_sources/devel/gitwash/following_latest.txt deleted file mode 100644 index 4419abd82d6..00000000000 --- a/dev/_sources/devel/gitwash/following_latest.txt +++ /dev/null @@ -1,36 +0,0 @@ -.. _following-latest: - -============================= - Following the latest source -============================= - -These are the instructions if you just want to follow the latest -*matplotlib* source, but you don't need to do any development for now. - -The steps are: - -* :ref:`install-git` -* get local copy of the git repository from github_ -* update local copy from time to time - -Get the local copy of the code -============================== - -From the command line:: - - git clone git://github.com/matplotlib/matplotlib.git - -You now have a copy of the code tree in the new ``matplotlib`` directory. - -Updating the code -================= - -From time to time you may want to pull down the latest code. Do this with:: - - cd matplotlib - git pull - -The tree in ``matplotlib`` will now have the latest changes from the initial -repository. - -.. include:: links.inc diff --git a/dev/_sources/devel/gitwash/forking_hell.txt b/dev/_sources/devel/gitwash/forking_hell.txt deleted file mode 100644 index 350d50e7fcc..00000000000 --- a/dev/_sources/devel/gitwash/forking_hell.txt +++ /dev/null @@ -1,32 +0,0 @@ -.. _forking: - -========================================== -Making your own copy (fork) of matplotlib -========================================== - -You need to do this only once. The instructions here are very similar -to the instructions at http://help.github.com/forking/ |emdash| please see -that page for more detail. We're repeating some of it here just to give the -specifics for the matplotlib_ project, and to suggest some default names. - -Set up and configure a github_ account -====================================== - -If you don't have a github_ account, go to the github_ page, and make one. - -You then need to configure your account to allow write access |emdash| see -the ``Generating SSH keys`` help on `github help`_. - -Create your own forked copy of matplotlib_ -=========================================== - -#. Log into your github_ account. -#. Go to the matplotlib_ github home at `matplotlib github`_. -#. Click on the *fork* button: - - .. image:: forking_button.png - - Now, after a short pause and some 'Hardcore forking action', you - should find yourself at the home page for your own forked copy of matplotlib_. - -.. include:: links.inc diff --git a/dev/_sources/devel/gitwash/git_development.txt b/dev/_sources/devel/gitwash/git_development.txt deleted file mode 100644 index 3808ca9fa1c..00000000000 --- a/dev/_sources/devel/gitwash/git_development.txt +++ /dev/null @@ -1,15 +0,0 @@ -.. _git-development: - -===================== - Git for development -===================== - -Contents: - -.. toctree:: - :maxdepth: 2 - - forking_hell - set_up_fork - configure_git - development_workflow diff --git a/dev/_sources/devel/gitwash/git_install.txt b/dev/_sources/devel/gitwash/git_install.txt deleted file mode 100644 index a87224d4e41..00000000000 --- a/dev/_sources/devel/gitwash/git_install.txt +++ /dev/null @@ -1,26 +0,0 @@ -.. _install-git: - -============= - Install git -============= - -Overview -======== - -================ ============= -Debian / Ubuntu ``sudo apt-get install git-core`` -Fedora ``sudo yum install git-core`` -Windows Download and install msysGit_ -OS X Use the git-osx-installer_ -================ ============= - -In detail -========= - -See the git_ page for the most recent information. - -Have a look at the github_ install help pages available from `github help`_ - -There are good instructions here: http://book.git-scm.com/2_installing_git.html - -.. include:: links.inc diff --git a/dev/_sources/devel/gitwash/git_intro.txt b/dev/_sources/devel/gitwash/git_intro.txt deleted file mode 100644 index 786eb84d5bd..00000000000 --- a/dev/_sources/devel/gitwash/git_intro.txt +++ /dev/null @@ -1,18 +0,0 @@ -============== - Introduction -============== - -These pages describe a git_ and github_ workflow for the matplotlib_ -project. - -There are several different workflows here, for different ways of -working with *matplotlib*. - -This is not a comprehensive git_ reference, it's just a workflow for our -own project. It's tailored to the github_ hosting service. You may well -find better or quicker ways of getting stuff done with git_, but these -should get you started. - -For general resources for learning git_ see :ref:`git-resources`. - -.. include:: links.inc diff --git a/dev/_sources/devel/gitwash/git_resources.txt b/dev/_sources/devel/gitwash/git_resources.txt deleted file mode 100644 index e081328967a..00000000000 --- a/dev/_sources/devel/gitwash/git_resources.txt +++ /dev/null @@ -1,59 +0,0 @@ -.. _git-resources: - -================ - git_ resources -================ - -Tutorials and summaries -======================= - -* `github help`_ has an excellent series of how-to guides. -* `learn.github`_ has an excellent series of tutorials -* The `pro git book`_ is a good in-depth book on git. -* A `git cheat sheet`_ is a page giving summaries of common commands. -* The `git user manual`_ -* The `git tutorial`_ -* The `git community book`_ -* `git ready`_ |emdash| a nice series of tutorials -* `git casts`_ |emdash| video snippets giving git how-tos. -* `git magic`_ |emdash| extended introduction with intermediate detail -* The `git parable`_ is an easy read explaining the concepts behind git. -* Our own `git foundation`_ expands on the `git parable`_. -* Fernando Perez' git page |emdash| `Fernando's git page`_ |emdash| many - links and tips -* A good but technical page on `git concepts`_ -* `git svn crash course`_: git_ for those of us used to subversion_ - -Advanced git workflow -===================== - -There are many ways of working with git_; here are some posts on the -rules of thumb that other projects have come up with: - -* Linus Torvalds on `git management`_ -* Linus Torvalds on `linux git workflow`_ . Summary; use the git tools - to make the history of your edits as clean as possible; merge from - upstream edits as little as possible in branches where you are doing - active development. - -Manual pages online -=================== - -You can get these on your own machine with (e.g) ``git help push`` or -(same thing) ``git push --help``, but, for convenience, here are the -online manual pages for some common commands: - -* `git add`_ -* `git branch`_ -* `git checkout`_ -* `git clone`_ -* `git commit`_ -* `git config`_ -* `git diff`_ -* `git log`_ -* `git pull`_ -* `git push`_ -* `git remote`_ -* `git status`_ - -.. include:: links.inc diff --git a/dev/_sources/devel/gitwash/index.txt b/dev/_sources/devel/gitwash/index.txt deleted file mode 100644 index 48053bc19b7..00000000000 --- a/dev/_sources/devel/gitwash/index.txt +++ /dev/null @@ -1,16 +0,0 @@ -.. _using-git: - -Working with *matplotlib* source code -====================================== - -Contents: - -.. toctree:: - :maxdepth: 2 - - git_intro - git_install - following_latest - patching - git_development - git_resources diff --git a/dev/_sources/devel/gitwash/patching.txt b/dev/_sources/devel/gitwash/patching.txt deleted file mode 100644 index 6f7733125c8..00000000000 --- a/dev/_sources/devel/gitwash/patching.txt +++ /dev/null @@ -1,134 +0,0 @@ -================ - Making a patch -================ - -You've discovered a bug or something else you want to change -in matplotlib_ .. |emdash| excellent! - -You've worked out a way to fix it |emdash| even better! - -You want to tell us about it |emdash| best of all! - -The easiest way is to make a *patch* or set of patches. Here -we explain how. Making a patch is the simplest and quickest, -but if you're going to be doing anything more than simple -quick things, please consider following the -:ref:`git-development` model instead. - -.. _making-patches: - -Making patches -============== - -Overview --------- - -:: - - # tell git who you are - git config --global user.email you@yourdomain.example.com - git config --global user.name "Your Name Comes Here" - # get the repository if you don't have it - git clone git://github.com/matplotlib/matplotlib.git - # make a branch for your patching - cd matplotlib - git branch the-fix-im-thinking-of - git checkout the-fix-im-thinking-of - # hack, hack, hack - # Tell git about any new files you've made - git add somewhere/tests/test_my_bug.py - # commit work in progress as you go - git commit -am 'BF - added tests for Funny bug' - # hack hack, hack - git commit -am 'BF - added fix for Funny bug' - # make the patch files - git format-patch -M -C master - -Then, send the generated patch files to the `matplotlib -mailing list`_ |emdash| where we will thank you warmly. - -In detail ---------- - -#. Tell git_ who you are so it can label the commits you've - made:: - - git config --global user.email you@yourdomain.example.com - git config --global user.name "Your Name Comes Here" - -#. If you don't already have one, clone a copy of the - matplotlib_ repository:: - - git clone git://github.com/matplotlib/matplotlib.git - cd matplotlib - -#. Make a 'feature branch'. This will be where you work on - your bug fix. It's nice and safe and leaves you with - access to an unmodified copy of the code in the main - branch:: - - git branch the-fix-im-thinking-of - git checkout the-fix-im-thinking-of - -#. Do some edits, and commit them as you go:: - - # hack, hack, hack - # Tell git about any new files you've made - git add somewhere/tests/test_my_bug.py - # commit work in progress as you go - git commit -am 'BF - added tests for Funny bug' - # hack hack, hack - git commit -am 'BF - added fix for Funny bug' - - Note the ``-am`` options to ``commit``. The ``m`` flag just - signals that you're going to type a message on the command - line. The ``a`` flag |emdash| you can just take on faith |emdash| - or see `why the -a flag?`_. - -#. When you have finished, check you have committed all your - changes:: - - git status - -#. Finally, make your commits into patches. You want all the - commits since you branched from the ``master`` branch:: - - git format-patch -M -C master - - You will now have several files named for the commits:: - - 0001-BF-added-tests-for-Funny-bug.patch - 0002-BF-added-fix-for-Funny-bug.patch - - Send these files to the `matplotlib mailing list`_. - -When you are done, to switch back to the main copy of the -code, just return to the ``master`` branch:: - - git checkout master - -Moving from patching to development -=================================== - -If you find you have done some patches, and you have one or -more feature branches, you will probably want to switch to -development mode. You can do this with the repository you -have. - -Fork the matplotlib_ repository on github_ |emdash| :ref:`forking`. -Then:: - - # checkout and refresh master branch from main repo - git checkout master - git pull origin master - # rename pointer to main repository to 'upstream' - git remote rename origin upstream - # point your repo to default read / write to your fork on github - git remote add origin git@github.com:your-user-name/matplotlib.git - # push up any branches you've made and want to keep - git push origin the-fix-im-thinking-of - -Then you can, if you want, follow the -:ref:`development-workflow`. - -.. include:: links.inc diff --git a/dev/_sources/devel/gitwash/set_up_fork.txt b/dev/_sources/devel/gitwash/set_up_fork.txt deleted file mode 100644 index 0ebc5f32ced..00000000000 --- a/dev/_sources/devel/gitwash/set_up_fork.txt +++ /dev/null @@ -1,72 +0,0 @@ -.. _set-up-fork: - -================== - Set up your fork -================== - -First you follow the instructions for :ref:`forking`. - -Overview -======== - -:: - - git clone git@github.com:your-user-name/matplotlib.git - cd matplotlib - git remote add upstream git://github.com/matplotlib/matplotlib.git - -In detail -========= - -Clone your fork ---------------- - -#. Clone your fork to the local computer with ``git clone - git@github.com:your-user-name/matplotlib.git`` -#. Investigate. Change directory to your new repo: ``cd matplotlib``. Then - ``git branch -a`` to show you all branches. You'll get something - like:: - - * master - remotes/origin/master - - This tells you that you are currently on the ``master`` branch, and - that you also have a ``remote`` connection to ``origin/master``. - What remote repository is ``remote/origin``? Try ``git remote -v`` to - see the URLs for the remote. They will point to your github_ fork. - - Now you want to connect to the upstream `matplotlib github`_ repository, so - you can merge in changes from trunk. - -.. _linking-to-upstream: - -Linking your repository to the upstream repo --------------------------------------------- - -:: - - cd matplotlib - git remote add upstream git://github.com/matplotlib/matplotlib.git - -``upstream`` here is just the arbitrary name we're using to refer to the -main matplotlib_ repository at `matplotlib github`_. - -Note that we've used ``git://`` for the URL rather than ``git@``. The -``git://`` URL is read only. This means we that we can't accidentally -(or deliberately) write to the upstream repo, and we are only going to -use it to merge into our own code. - -Note this command needs to be run on every clone of the repository -that you make. It is not tracked in your personal repository on -github_. - -Just for your own satisfaction, show yourself that you now have a new -'remote', with ``git remote -v show``, giving you something like:: - - upstream git://github.com/matplotlib/matplotlib.git (fetch) - upstream git://github.com/matplotlib/matplotlib.git (push) - origin git@github.com:your-user-name/matplotlib.git (fetch) - origin git@github.com:your-user-name/matplotlib.git (push) - -.. include:: links.inc - diff --git a/dev/_sources/devel/index.txt b/dev/_sources/devel/index.txt deleted file mode 100644 index bc766166019..00000000000 --- a/dev/_sources/devel/index.txt +++ /dev/null @@ -1,22 +0,0 @@ -.. _developers-guide-index: - -#################################### - The Matplotlib Developers' Guide -#################################### - -.. htmlonly:: - - :Release: |version| - :Date: |today| - -.. toctree:: - :maxdepth: 2 - - coding_guide.rst - license.rst - gitwash/index.rst - testing.rst - documenting_mpl.rst - release_guide.rst - transformations.rst - add_new_projection.rst diff --git a/dev/_sources/devel/license.txt b/dev/_sources/devel/license.txt deleted file mode 100644 index aea9d7c4f4b..00000000000 --- a/dev/_sources/devel/license.txt +++ /dev/null @@ -1,69 +0,0 @@ -.. _license-discussion: - -Licenses -======== - -Matplotlib only uses BSD compatible code. If you bring in code from -another project make sure it has a PSF, BSD, MIT or compatible license -(see the Open Source Initiative `licenses page -`_ for details on individual -licenses). If it doesn't, you may consider contacting the author and -asking them to relicense it. GPL and LGPL code are not acceptable in -the main code base, though we are considering an alternative way of -distributing L/GPL code through an separate channel, possibly a -toolkit. If you include code, make sure you include a copy of that -code's license in the license directory if the code's license requires -you to distribute the license with it. Non-BSD compatible licenses -are acceptable in matplotlib toolkits (eg basemap), but make sure you -clearly state the licenses you are using. - -Why BSD compatible? -------------------- - -The two dominant license variants in the wild are GPL-style and -BSD-style. There are countless other licenses that place specific -restrictions on code reuse, but there is an important difference to be -considered in the GPL and BSD variants. The best known and perhaps -most widely used license is the GPL, which in addition to granting you -full rights to the source code including redistribution, carries with -it an extra obligation. If you use GPL code in your own code, or link -with it, your product must be released under a GPL compatible -license. I.e., you are required to give the source code to other -people and give them the right to redistribute it as well. Many of the -most famous and widely used open source projects are released under -the GPL, including linux, gcc, emacs and sage. - -The second major class are the BSD-style licenses (which includes MIT -and the python PSF license). These basically allow you to do whatever -you want with the code: ignore it, include it in your own open source -project, include it in your proprietary product, sell it, -whatever. python itself is released under a BSD compatible license, in -the sense that, quoting from the PSF license page:: - - There is no GPL-like "copyleft" restriction. Distributing - binary-only versions of Python, modified or not, is allowed. There - is no requirement to release any of your source code. You can also - write extension modules for Python and provide them only in binary - form. - -Famous projects released under a BSD-style license in the permissive -sense of the last paragraph are the BSD operating system, python and -TeX. - -There are several reasons why early matplotlib developers selected a -BSD compatible license. matplotlib is a python extension, and we -choose a license that was based on the python license (BSD -compatible). Also, we wanted to attract as many users and developers -as possible, and many software companies will not use GPL code in -software they plan to distribute, even those that are highly committed -to open source development, such as `enthought -`_, out of legitimate concern that use of the -GPL will "infect" their code base by its viral nature. In effect, they -want to retain the right to release some proprietary code. Companies -and institutions who use matplotlib often make significant -contributions, because they have the resources to get a job done, even -a boring one. Two of the matplotlib backends (FLTK and WX) were -contributed by private companies. The final reason behind the -licensing choice is compatibility with the other python extensions for -scientific computing: ipython, numpy, scipy, the enthought tool suite -and python itself are all distributed under BSD compatible licenses. diff --git a/dev/_sources/devel/release_guide.txt b/dev/_sources/devel/release_guide.txt deleted file mode 100644 index 7e41f6b89e5..00000000000 --- a/dev/_sources/devel/release_guide.txt +++ /dev/null @@ -1,233 +0,0 @@ -.. _release-guide: - -************************* -Doing a matplotlib release -************************* - -A guide for developers who are doing a matplotlib release. - -* Edit :file:`__init__.py` and bump the version number - -.. _release-testing: - -Testing -======= - -* Run all of the regression tests by running the `tests.py` script at - the root of the source tree. - -* Run :file:`unit/memleak_hawaii3.py` and make sure there are no - memory leaks - -* try some GUI examples, eg :file:`simple_plot.py` with GTKAgg, TkAgg, etc... - -* remove font cache and tex cache from :file:`.matplotlib` and test - with and without cache on some example script - -* Optionally, make sure :file:`examples/tests/backend_driver.py` runs - without errors and check the output of the PNG, PDF, PS and SVG - backends - -.. _release-branching: - -Branching -========= - -Once all the tests are passing and you are ready to do a release, you -need to create a release branch. These only need to be created when -the second part of the version number changes:: - - git checkout -b v1.1.x - git push git@github.com:matplotlib/matplotlib.git v1.1.x - -On the branch, do any additional testing you want to do, and then build -binaries and source distributions for testing as release candidates. - -For each release candidate as well as for the final release version, -please `git tag` the commit you will use for packaging like so:: - - git tag -a v1.1.0rc1 - -The `-a` flag will allow you to write a message about the tag, and -affiliate your name with it. A reasonable tag message would be something -like ``v1.1.0 Release Candidate 1 (September 24, 2011)``. To tag a -release after the fact, just track down the commit hash, and:: - - git tag -a v1.0.1rc1 a9f3f3a50745 - -Tags allow developers to quickly checkout different releases by name, -and also provides source download via zip and tarball on github. - -Then push the tags to the main repository:: - - git push upstream v1.0.1rc1 - -.. _release-packaging: - -Packaging -========= - -* Make sure the :file:`MANIFEST.in` is up to date and remove - :file:`MANIFEST` so it will be rebuilt by MANIFEST.in - -* run `git clean` in the mpl git directory before building the sdist - -* unpack the sdist and make sure you can build from that directory - -* Use :file:`setup.cfg` to set the default backends. For windows and - OSX, the default backend should be TkAgg. You should also turn on - or off any platform specific build options you need. Importantly, - you also need to make sure that you delete the :file:`build` dir - after any changes to :file:`setup.cfg` before rebuilding since cruft - in the :file:`build` dir can get carried along. - -* On windows, unix2dos the rc file. - -* We have a Makefile for the OS X builds in the mpl source dir - :file:`release/osx`, so use this to prepare the OS X releases. - -* We have a Makefile for the win32 mingw builds in the mpl source dir - :file:`release/win32` which you can use this to prepare the windows - releases. - -Posting files -============= - -Our current method is for the release manager to collect all of the -binaries from the platform builders and post the files online on -Sourceforge. It is also possible that those building the binaries -could upload to directly to Sourceforge. - -There are many ways to upload files to Sourceforge (`scp`, `rsync`, -`sftp`, and a web interface) described in `Sourceforge Release File -System documentation -`_. -Below, we will use `sftp`. - -1. Create a directory containing all of the release files and `cd` to it. - -2. `sftp` to Sourceforge:: - - sftp USERNAME@frs.sourceforge.net:/home/frs/project/matplotlib/matplotlib - -3. Make a new directory for the release and move to it:: - - mkdir matplotlib-1.1.0rc1 - cd matplotlib-1.1.0rc1 - -4. Upload all of the files in the current directory on your local machine:: - - put * - -If this release is a final release, the default download for the -matplotlib project should also be updated. Login to Sourceforge and -visit the `matplotlib files page -`_. -Navigate to the tarball of the release you just updated, click on -"Details" icon (it looks like a lower case ``i``), and make it the -default download for all platforms. - -There is a list of direct links to downloads on matplotlib's main -website. This needs to be manually generated and updated every time -new files are posted. - -1. Clone the matplotlib documentation repository and `cd` into it:: - - git clone git@github.com:matplotlib/matplotlib.github.com.git - cd matplotlib.github.com - -2. Update the list of downloads that you want to display by editing - the `downloads.txt` file. Generally, this should contain the last two - final releases and any active release candidates. - -3. Update the downloads webpage by running the `update_downloads.py` - script. This script requires `paramiko` (for `sftp` support) and - `jinja2` for templating. Both of these dependencies can be - installed using pip:: - - pip install paramiko - pip install jinja2 - - Then update the download page:: - - ./update_downloads.py - - You will be prompted for your Sourceforge username and password. - -4. Commit the changes and push them up to github:: - - git commit -m "Updating download list" - git push - -Update PyPI -=========== - -Once the tarball has been posted on Sourceforge, you can register a -link to the new release on PyPI. This should only be done with final -(non-release-candidate) releases, since doing so will hide any -available stable releases. - -You may need to set up your `.pypirc` file as described in the -`distutils register command documentation -`_. - -Then updating the record on PyPI is as simple as:: - - python setup.py register - -This will hide any previous releases automatically. - -Documentation updates -===================== - -The built documentation exists in the `matplotlib.github.com -`_ repository. -Pushing changes to master automatically updates the website. - -The documentation is organized by version. At the root of the tree is -always the documentation for the latest stable release. Under that, -there are directories containing the documentation for older versions -as well as the bleeding edge release version called `dev` (usually -based on what's on master in the github repository, but it may also -temporarily be a staging area for proposed changes). There is also a -symlink directory with the name of the most recently released version -that points to the root. With each new release, these directories may -need to be reorganized accordingly. Any time these version -directories are added or removed, the `versions.html` file (which -contains a list of the available documentation versions for the user) -must also be updated. - -To make sure everyone's hard work gets credited, regenerate the github -stats. `cd` into the tools directory and run:: - - python github_stats.py $TAG > ../doc/users/github_stats.rst - -where `$TAG` is the tag of the last major release. This will generate -stats for all work done since that release. - -In the matplotlib source repository, build the documentation:: - - cd doc - python make.py html - python make.py latex - -Then copy the build products into your local checkout of the -`matplotlib.github.com` repository (assuming here to be checked out in -`~/matplotlib.github.com`:: - - cp -r build/html/* ~/matplotlib.github.com - cp build/latex/Matplotlib.pdf ~/matplotlib.github.com - -Then, from the `matplotlib.github.com` directory, commit and push the -changes upstream:: - - git commit -m "Updating for v1.0.1" - git push upstream master - -Announcing -========== - -Announce the release on matplotlib-announce, matplotlib-users, and -matplotlib-devel. Final (non-release-candidate) versions should also -be announced on python-announce. Include a summary of highlights from -the CHANGELOG and/or post the whole CHANGELOG since the last release. diff --git a/dev/_sources/devel/testing.txt b/dev/_sources/devel/testing.txt deleted file mode 100644 index 7d778041c68..00000000000 --- a/dev/_sources/devel/testing.txt +++ /dev/null @@ -1,251 +0,0 @@ -.. _testing: - -Testing -======= - -Matplotlib has a testing infrastructure based on nose_, making it easy -to write new tests. The tests are in :mod:`matplotlib.tests`, and -customizations to the nose testing infrastructure are in -:mod:`matplotlib.testing`. (There is other old testing cruft around, -please ignore it while we consolidate our testing to these locations.) - -.. _nose: http://somethingaboutorange.com/mrl/projects/nose/ - -Requirements ------------- - -The following software is required to run the tests: - - - nose_, version 1.0 or later - - - `Ghostscript `_ (to render PDF - files) - - - `Inkscape `_ (to render SVG files) - -Running the tests ------------------ - -Running the tests is simple. Make sure you have nose installed and run -the script :file:`tests.py` in the root directory of the distribution. -The script can take any of the usual `nosetest arguments`_, such as - -=================== =========== -``-v`` increase verbosity -``-d`` detailed error messages -``--with-coverage`` enable collecting coverage information -=================== =========== - -To run a single test from the command line, you can provide a -dot-separated path to the module followed by the function separated by -a colon, e.g., (this is assuming the test is installed):: - - python tests.py matplotlib.tests.test_simplification:test_clipping - -An alternative implementation that does not look at command line -arguments works from within Python:: - - import matplotlib - matplotlib.test() - - -.. _`nosetest arguments`: http://somethingaboutorange.com/mrl/projects/nose/1.0.0/usage.html - - -Running tests by any means other than `matplotlib.test()` -does not load the nose "knownfailureif" (Known failing tests) plugin, -causing known-failing tests to fail for real. - -Writing a simple test ---------------------- - -Many elements of Matplotlib can be tested using standard tests. For -example, here is a test from :mod:`matplotlib.tests.test_basic`:: - - from nose.tools import assert_equal - - def test_simple(): - """ - very simple example test - """ - assert_equal(1+1,2) - -Nose determines which functions are tests by searching for functions -beginning with "test" in their name. - -If the test has side effects that need to be cleaned up, such as -creating figures using the pyplot interface, use the ``@cleanup`` -decorator:: - - from matplotlib.testing.decorators import cleanup - - @cleanup - def test_create_figure(): - """ - very simple example test that creates a figure using pyplot. - """ - fig = figure() - ... - - -Writing an image comparison test --------------------------------- - -Writing an image based test is only slightly more difficult than a -simple test. The main consideration is that you must specify the -"baseline", or expected, images in the -:func:`~matplotlib.testing.decorators.image_comparison` decorator. For -example, this test generates a single image and automatically tests -it:: - - import numpy as np - import matplotlib - from matplotlib.testing.decorators import image_comparison - import matplotlib.pyplot as plt - - @image_comparison(baseline_images=['spines_axes_positions']) - def test_spines_axes_positions(): - # SF bug 2852168 - fig = plt.figure() - x = np.linspace(0,2*np.pi,100) - y = 2*np.sin(x) - ax = fig.add_subplot(1,1,1) - ax.set_title('centered spines') - ax.plot(x,y) - ax.spines['right'].set_position(('axes',0.1)) - ax.yaxis.set_ticks_position('right') - ax.spines['top'].set_position(('axes',0.25)) - ax.xaxis.set_ticks_position('top') - ax.spines['left'].set_color('none') - ax.spines['bottom'].set_color('none') - -The first time this test is run, there will be no baseline image to -compare against, so the test will fail. Copy the output images (in -this case `result_images/test_category/spines_axes_positions.*`) to -the correct subdirectory of `baseline_images` tree in the source -directory (in this case -`lib/matplotlib/tests/baseline_images/test_category`). Note carefully -the `.*` at the end: this will copy only the images we need to include -in the `git` repository. The files ending in `_pdf.png` and -`_svg.png` are converted from the `pdf` and `svg` originals on the fly -and do not need to be in the respository. Put these new files under -source code revision control (with `git add`). When rerunning the -tests, they should now pass. - -There are two optional keyword arguments to the `image_comparison` -decorator: - - - `extensions`: If you only wish to test some of the image formats - (rather than the default `png`, `svg` and `pdf` formats), pass a - list of the extensions to test. - - - `tol`: This is the image matching tolerance, the default `1e-3`. - If some variation is expected in the image between runs, this - value may be adjusted. - -Known failing tests -------------------- - -If you're writing a test, you may mark it as a known failing test with -the :func:`~matplotlib.testing.decorators.knownfailureif` -decorator. This allows the test to be added to the test suite and run -on the buildbots without causing undue alarm. For example, although -the following test will fail, it is an expected failure:: - - from nose.tools import assert_equal - from matplotlib.testing.decorators import knownfailureif - - @knownfailureif(True) - def test_simple_fail(): - '''very simple example test that should fail''' - assert_equal(1+1,3) - -Note that the first argument to the -:func:`~matplotlib.testing.decorators.knownfailureif` decorator is a -fail condition, which can be a value such as True, False, or -'indeterminate', or may be a dynamically evaluated expression. - -Creating a new module in matplotlib.tests ------------------------------------------ - -We try to keep the tests categorized by the primary module they are -testing. For example, the tests related to the ``mathtext.py`` module -are in ``test_mathtext.py``. - -Let's say you've added a new module named ``whizbang.py`` and you want -to add tests for it in ``matplotlib.tests.test_whizbang``. To add -this module to the list of default tests, append its name to -``default_test_modules`` in :file:`lib/matplotlib/__init__.py`. - -Using tox ---------- - -`Tox `_ is a tool for running tests against -multiple Python environments, including multiple versions of Python -(e.g., 2.6, 2.7, 3.2, etc.) and even different Python implementations -altogether (e.g., CPython, PyPy, Jython, etc.) - -Testing all 4 versions of Python (2.6, 2.7, 3.1, and 3.2) requires -having four versions of Python installed on your system and on the -PATH. Depending on your operating system, you may want to use your -package manager (such as apt-get, yum or MacPorts) to do this, or use -`pythonbrew `_. - -tox makes it easy to determine if your working copy introduced any -regressions before submitting a pull request. Here's how to use it: - -.. code-block:: bash - - $ pip install tox - $ tox - -You can also run tox on a subset of environments: - -.. code-block:: bash - - $ tox -e py26,py27 - -Tox processes everything serially so it can take a long time to test -several environments. To speed it up, you might try using a new, -parallelized version of tox called ``detox``. Give this a try: - -.. code-block:: bash - - $ pip install -U -i http://pypi.testrun.org detox - $ detox - -Tox is configured using a file called ``tox.ini``. You may need to -edit this file if you want to add new environments to test (e.g., -``py33``) or if you want to tweak the dependencies or the way the -tests are run. For more info on the ``tox.ini`` file, see the `Tox -Configuration Specification -`_. - -Using Travis CI ---------------- - -`Travis CI `_ is a hosted CI system "in the -cloud". - -Travis is configured to receive notifications of new commits to GitHub -repos (via GitHub "service hooks") and to run builds or tests when it -sees these new commits. It looks for a YAML file called -``.travis.yml`` in the root of the repository to see how to test the -project. - -Travis CI is already enabled for the `main matplotlib GitHub -repository `_ -- for -example, see `its Travis page -`_. - -If you want to enable Travis CI for your personal matplotlib GitHub -repo, simply enable the repo to use Travis CI in either the Travis CI -UI or the GitHub UI (Admin | Service Hooks). For details, see `the -Travis CI Getting Started page -`_. This -generally isn't necessary, since any pull request submitted against -the main matplotlib repository will be tested. - -Once this is configured, you can see the Travis CI results at -http://travis-ci.org/#!/your_GitHub_user_name/matplotlib -- here's `an -example `_. diff --git a/dev/_sources/devel/transformations.txt b/dev/_sources/devel/transformations.txt deleted file mode 100644 index 1164031094f..00000000000 --- a/dev/_sources/devel/transformations.txt +++ /dev/null @@ -1,20 +0,0 @@ -============================== - Working with transformations -============================== - -.. inheritance-diagram:: matplotlib.transforms matplotlib.path - :parts: 1 - -:mod:`matplotlib.transforms` -============================= - -.. automodule:: matplotlib.transforms - :members: TransformNode, BboxBase, Bbox, TransformedBbox, Transform, - TransformWrapper, AffineBase, Affine2DBase, Affine2D, IdentityTransform, - BlendedGenericTransform, BlendedAffine2D, blended_transform_factory, - CompositeGenericTransform, CompositeAffine2D, - composite_transform_factory, BboxTransform, BboxTransformTo, - BboxTransformFrom, ScaledTranslation, TransformedPath, nonsingular, - interval_contains, interval_contains_open - :show-inheritance: - diff --git a/dev/_sources/examples/animation/animate_decay.txt b/dev/_sources/examples/animation/animate_decay.txt deleted file mode 100644 index 15d0b970cc4..00000000000 --- a/dev/_sources/examples/animation/animate_decay.txt +++ /dev/null @@ -1,49 +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 = data_gen.t - cnt = 0 - while cnt < 1000: - cnt+=1 - t += 0.05 - yield t, 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([], [], lw=2) - ax.set_ylim(-1.1, 1.1) - ax.set_xlim(0, 5) - 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=True, interval=10, - repeat=False) - plt.show() - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/animation/basic_example.txt b/dev/_sources/examples/animation/basic_example.txt deleted file mode 100644 index c257414d632..00000000000 --- a/dev/_sources/examples/animation/basic_example.txt +++ /dev/null @@ -1,46 +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/dev/_sources/examples/animation/basic_example_writer.txt b/dev/_sources/examples/animation/basic_example_writer.txt deleted file mode 100644 index 72cd0bb5a89..00000000000 --- a/dev/_sources/examples/animation/basic_example_writer.txt +++ /dev/null @@ -1,54 +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/dev/_sources/examples/animation/bayes_update.txt b/dev/_sources/examples/animation/bayes_update.txt deleted file mode 100644 index 4edcfe3e3b8..00000000000 --- a/dev/_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 = plt.figure() - ax = fig.add_subplot(1, 1, 1) - 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/dev/_sources/examples/animation/double_pendulum_animated.txt b/dev/_sources/examples/animation/double_pendulum_animated.txt deleted file mode 100644 index ba7837d7b03..00000000000 --- a/dev/_sources/examples/animation/double_pendulum_animated.txt +++ /dev/null @@ -1,100 +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, pi, array - 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.1 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 - - rad = pi/180 - - # initial state - state = np.array([th1, w1, th2, w2])*pi/180. - - # 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, clear_temp=True) - plt.show() - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/animation/dynamic_image.txt b/dev/_sources/examples/animation/dynamic_image.txt deleted file mode 100644 index 00a56fc42ab..00000000000 --- a/dev/_sources/examples/animation/dynamic_image.txt +++ /dev/null @@ -1,39 +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('jet')) - - 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/dev/_sources/examples/animation/dynamic_image2.txt b/dev/_sources/examples/animation/dynamic_image2.txt deleted file mode 100644 index 71848d840d5..00000000000 --- a/dev/_sources/examples/animation/dynamic_image2.txt +++ /dev/null @@ -1,44 +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)) - 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/dev/_sources/examples/animation/histogram.txt b/dev/_sources/examples/animation/histogram.txt deleted file mode 100644 index 2186041e480..00000000000 --- a/dev/_sources/examples/animation/histogram.txt +++ /dev/null @@ -1,74 +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 = 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(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 - - ani = animation.FuncAnimation(fig, animate, 100, repeat=False) - plt.show() - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/animation/index.txt b/dev/_sources/examples/animation/index.txt deleted file mode 100644 index ed1635b89f1..00000000000 --- a/dev/_sources/examples/animation/index.txt +++ /dev/null @@ -1,28 +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 - random_data - simple_3danim - simple_anim - strip_chart_demo - subplots diff --git a/dev/_sources/examples/animation/moviewriter.txt b/dev/_sources/examples/animation/moviewriter.txt deleted file mode 100644 index 1dcec5eab31..00000000000 --- a/dev/_sources/examples/animation/moviewriter.txt +++ /dev/null @@ -1,44 +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/dev/_sources/examples/animation/random_data.txt b/dev/_sources/examples/animation/random_data.txt deleted file mode 100644 index 98cf953ee8d..00000000000 --- a/dev/_sources/examples/animation/random_data.txt +++ /dev/null @@ -1,30 +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 = plt.figure() - ax = fig.add_subplot(111) - 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/dev/_sources/examples/animation/simple_3danim.txt b/dev/_sources/examples/animation/simple_3danim.txt deleted file mode 100644 index 88d9d6fe088..00000000000 --- a/dev/_sources/examples/animation/simple_3danim.txt +++ /dev/null @@ -1,74 +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/dev/_sources/examples/animation/simple_anim.txt b/dev/_sources/examples/animation/simple_anim.txt deleted file mode 100644 index 5dfe47b9f18..00000000000 --- a/dev/_sources/examples/animation/simple_anim.txt +++ /dev/null @@ -1,37 +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 = plt.figure() - ax = fig.add_subplot(111) - - x = np.arange(0, 2*np.pi, 0.01) # x-array - 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/dev/_sources/examples/animation/strip_chart_demo.txt b/dev/_sources/examples/animation/strip_chart_demo.txt deleted file mode 100644 index cd698fc0cc2..00000000000 --- a/dev/_sources/examples/animation/strip_chart_demo.txt +++ /dev/null @@ -1,68 +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 matplotlib - import numpy as np - from matplotlib.lines import Line2D - import matplotlib.pyplot as plt - import matplotlib.animation as animation - - class Scope: - 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 = plt.figure() - ax = fig.add_subplot(111) - 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/dev/_sources/examples/animation/subplots.txt b/dev/_sources/examples/animation/subplots.txt deleted file mode 100644 index 01c1d971964..00000000000 --- a/dev/_sources/examples/animation/subplots.txt +++ /dev/null @@ -1,105 +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/dev/_sources/examples/api/agg_oo.txt b/dev/_sources/examples/api/agg_oo.txt deleted file mode 100644 index 84afcab4a32..00000000000 --- a/dev/_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/dev/_sources/examples/api/artist_demo.txt b/dev/_sources/examples/api/artist_demo.txt deleted file mode 100644 index 3b2492c8e02..00000000000 --- a/dev/_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/dev/_sources/examples/api/barchart_demo.txt b/dev/_sources/examples/api/barchart_demo.txt deleted file mode 100644 index 089de4cb260..00000000000 --- a/dev/_sources/examples/api/barchart_demo.txt +++ /dev/null @@ -1,54 +0,0 @@ -.. _api-barchart_demo: - -api example code: barchart_demo.py -================================== - - - -.. plot:: /home/mdboom/Work/builds/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 = plt.figure() - ax = fig.add_subplot(111) - 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 - 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/dev/_sources/examples/api/bbox_intersect.txt b/dev/_sources/examples/api/bbox_intersect.txt deleted file mode 100644 index b816836c3a2..00000000000 --- a/dev/_sources/examples/api/bbox_intersect.txt +++ /dev/null @@ -1,33 +0,0 @@ -.. _api-bbox_intersect: - -api example code: bbox_intersect.py -=================================== - - - -.. plot:: /home/mdboom/Work/builds/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/dev/_sources/examples/api/clippath_demo.txt b/dev/_sources/examples/api/clippath_demo.txt deleted file mode 100644 index 6995c42d3cb..00000000000 --- a/dev/_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/dev/_sources/examples/api/collections_demo.txt b/dev/_sources/examples/api/collections_demo.txt deleted file mode 100644 index 4a797dc74a2..00000000000 --- a/dev/_sources/examples/api/collections_demo.txt +++ /dev/null @@ -1,147 +0,0 @@ -.. _api-collections_demo: - -api example code: collections_demo.py -===================================== - - - -.. plot:: /home/mdboom/Work/builds/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.array(range(nverts)) - theta = np.array(range(nverts)) * (2*np.pi)/(nverts-1) - 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 = plt.figure() - - a = fig.add_subplot(2,2,1) - col = collections.LineCollection([spiral], offsets=xyo, - transOffset=a.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. - a.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 'a.autoscale_view()' call below. - - # Make a transform for the line segments such that their size is - # given in points: - col.set_color(colors) - - a.autoscale_view() # See comment above, after a.add_collection. - a.set_title('LineCollection using offsets') - - - # The same data as above, but fill the curves. - - a = fig.add_subplot(2,2,2) - - col = collections.PolyCollection([spiral], offsets=xyo, - transOffset=a.transData) - trans = transforms.Affine2D().scale(fig.dpi/72.0) - col.set_transform(trans) # the points to pixels transform - a.add_collection(col, autolim=True) - col.set_color(colors) - - - a.autoscale_view() - a.set_title('PolyCollection using offsets') - - # 7-sided regular polygons - - a = fig.add_subplot(2,2,3) - - col = collections.RegularPolyCollection(7, - sizes = np.fabs(xx)*10.0, offsets=xyo, - transOffset=a.transData) - trans = transforms.Affine2D().scale(fig.dpi/72.0) - col.set_transform(trans) # the points to pixels transform - a.add_collection(col, autolim=True) - col.set_color(colors) - a.autoscale_view() - a.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. - - a = fig.add_subplot(2,2,4) - - 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) - a.add_collection(col, autolim=True) - col.set_color(colors) - a.autoscale_view() - a.set_title('Successive data offsets') - a.set_xlabel('Zonal velocity component (m/s)') - a.set_ylabel('Depth (m)') - # Reverse the y-axis so depth increases downward - a.set_ylim(a.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/dev/_sources/examples/api/color_cycle.txt b/dev/_sources/examples/api/color_cycle.txt deleted file mode 100644 index 26ab1463af1..00000000000 --- a/dev/_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/dev/_sources/examples/api/colorbar_only.txt b/dev/_sources/examples/api/colorbar_only.txt deleted file mode 100644 index 030bf6e5451..00000000000 --- a/dev/_sources/examples/api/colorbar_only.txt +++ /dev/null @@ -1,87 +0,0 @@ -.. _api-colorbar_only: - -api example code: colorbar_only.py -================================== - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/api/colorbar_only.py - -:: - - ''' - Make a colorbar as a separate figure. - ''' - - from matplotlib import pyplot - - # 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/dev/_sources/examples/api/compound_path.txt b/dev/_sources/examples/api/compound_path.txt deleted file mode 100644 index 870f7d7d7be..00000000000 --- a/dev/_sources/examples/api/compound_path.txt +++ /dev/null @@ -1,49 +0,0 @@ -.. _api-compound_path: - -api example code: compound_path.py -================================== - - - -.. plot:: /home/mdboom/Work/builds/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 = plt.figure() - ax = fig.add_subplot(111) - 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/dev/_sources/examples/api/custom_projection_example.txt b/dev/_sources/examples/api/custom_projection_example.txt deleted file mode 100644 index 85b30b74904..00000000000 --- a/dev/_sources/examples/api/custom_projection_example.txt +++ /dev/null @@ -1,493 +0,0 @@ -.. _api-custom_projection_example: - -api example code: custom_projection_example.py -============================================== - - - -.. plot:: /home/mdboom/Work/builds/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(np.pi * 2.0, 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 = 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' - # \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 = (x / np.pi) * 180.0 - degrees = round(degrees / 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 = degrees * (np.pi / 180.0) - # 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/dev/_sources/examples/api/custom_scale_example.txt b/dev/_sources/examples/api/custom_scale_example.txt deleted file mode 100644 index bd215c100d5..00000000000 --- a/dev/_sources/examples/api/custom_scale_example.txt +++ /dev/null @@ -1,187 +0,0 @@ -.. _api-custom_scale_example: - -api example code: custom_scale_example.py -========================================= - - - -.. plot:: /home/mdboom/Work/builds/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", (85 / 180.0) * np.pi) - 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" % ((x / np.pi) * 180.0) - - deg2rad = np.pi / 180.0 - axis.set_major_locator(FixedLocator( - np.arange(-90, 90, 10) * deg2rad)) - 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 = t / 360.0 * np.pi - - 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/dev/_sources/examples/api/date_demo.txt b/dev/_sources/examples/api/date_demo.txt deleted file mode 100644 index 1dda61a4faa..00000000000 --- a/dev/_sources/examples/api/date_demo.txt +++ /dev/null @@ -1,69 +0,0 @@ -.. _api-date_demo: - -api example code: date_demo.py -============================== - - - -.. plot:: /home/mdboom/Work/builds/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') - r = np.load(datafile).view(np.recarray) - - fig = plt.figure() - ax = fig.add_subplot(111) - 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/dev/_sources/examples/api/date_index_formatter.txt b/dev/_sources/examples/api/date_index_formatter.txt deleted file mode 100644 index 938df85c4cd..00000000000 --- a/dev/_sources/examples/api/date_index_formatter.txt +++ /dev/null @@ -1,55 +0,0 @@ -.. _api-date_index_formatter: - -api example code: date_index_formatter.py -========================================= - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/api/date_index_formatter.py - -:: - - """ - When plotting time series, eg 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 = plt.figure() - ax = fig.add_subplot(111) - 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 = plt.figure() - ax = fig.add_subplot(111) - 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/dev/_sources/examples/api/demo_affine_image.txt b/dev/_sources/examples/api/demo_affine_image.txt deleted file mode 100644 index 05e978c3138..00000000000 --- a/dev/_sources/examples/api/demo_affine_image.txt +++ /dev/null @@ -1,80 +0,0 @@ -.. _api-demo_affine_image: - -api example code: demo_affine_image.py -====================================== - - - -.. plot:: /home/mdboom/Work/builds/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 - - ax1 = plt.subplot(121) - 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 - - ax2 = plt.subplot(122) - 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/dev/_sources/examples/api/donut_demo.txt b/dev/_sources/examples/api/donut_demo.txt deleted file mode 100644 index 514f86caacb..00000000000 --- a/dev/_sources/examples/api/donut_demo.txt +++ /dev/null @@ -1,68 +0,0 @@ -.. _api-donut_demo: - -api example code: donut_demo.py -=============================== - - - -.. plot:: /home/mdboom/Work/builds/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 = plt.figure() - ax = fig.add_subplot(111) - - 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/dev/_sources/examples/api/engineering_formatter.txt b/dev/_sources/examples/api/engineering_formatter.txt deleted file mode 100644 index 3836c725a60..00000000000 --- a/dev/_sources/examples/api/engineering_formatter.txt +++ /dev/null @@ -1,33 +0,0 @@ -.. _api-engineering_formatter: - -api example code: engineering_formatter.py -========================================== - - - -.. plot:: /home/mdboom/Work/builds/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 - - ax = plt.subplot(111) - 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/dev/_sources/examples/api/fahrenheit_celsius_scales.txt b/dev/_sources/examples/api/fahrenheit_celsius_scales.txt deleted file mode 100644 index 3adc4555f1f..00000000000 --- a/dev/_sources/examples/api/fahrenheit_celsius_scales.txt +++ /dev/null @@ -1,42 +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 = plt.figure() - ax1 = fig.add_subplot(111) # the Fahrenheit scale - ax2 = ax1.twinx() # 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/dev/_sources/examples/api/font_family_rc.txt b/dev/_sources/examples/api/font_family_rc.txt deleted file mode 100644 index f1789ce34ed..00000000000 --- a/dev/_sources/examples/api/font_family_rc.txt +++ /dev/null @@ -1,43 +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 (eg '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, eg:: - - 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 = plt.figure() - ax = fig.add_subplot(111) - 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/dev/_sources/examples/api/font_file.txt b/dev/_sources/examples/api/font_file.txt deleted file mode 100644 index d90270bf615..00000000000 --- a/dev/_sources/examples/api/font_file.txt +++ /dev/null @@ -1,52 +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 = plt.figure() - ax = fig.add_subplot(111) - ax.plot([1,2,3]) - - if sys.platform == 'win32': - fpath = 'C:\\Windows\\Fonts\\Tahoma.ttf' - elif sys.platform.startswith('linux'): - fonts = ['/usr/share/fonts/truetype/freefont/FreeSansBoldOblique.ttf', - '/usr/share/fonts/truetype/ttf-liberation/LiberationSans-BoldItalic.ttf', - '/usr/share/fonts/truetype/msttcorefonts/Comic_Sans_MS.ttf', - ] - for fpath in fonts: - if os.path.exists(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/dev/_sources/examples/api/hinton_demo.txt b/dev/_sources/examples/api/hinton_demo.txt deleted file mode 100644 index 3ad6465be21..00000000000 --- a/dev/_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/dev/_sources/examples/api/histogram_demo.txt b/dev/_sources/examples/api/histogram_demo.txt deleted file mode 100644 index dd743205ba9..00000000000 --- a/dev/_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/dev/_sources/examples/api/histogram_path_demo.txt b/dev/_sources/examples/api/histogram_path_demo.txt deleted file mode 100644 index cf60cc79cba..00000000000 --- a/dev/_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/mdboom/Work/builds/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 = plt.figure() - ax = fig.add_subplot(111) - - # 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/dev/_sources/examples/api/image_zcoord.txt b/dev/_sources/examples/api/image_zcoord.txt deleted file mode 100644 index d2c8b100b95..00000000000 --- a/dev/_sources/examples/api/image_zcoord.txt +++ /dev/null @@ -1,41 +0,0 @@ -.. _api-image_zcoord: - -api example code: image_zcoord.py -================================= - - - -.. plot:: /home/mdboom/Work/builds/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 = plt.figure() - ax = fig.add_subplot(111) - 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=0 and row - 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 - fahrenheit_celsius_scales - font_family_rc - font_file - histogram_path_demo - image_zcoord - joinstyle - legend_demo - line_with_text - logo2 - mathtext_asarray - patch_collection - quad_bezier - radar_chart - sankey_demo_basics - sankey_demo_links - sankey_demo_old - sankey_demo_rankine - scatter_piecharts - span_regions - two_scales - unicode_minus - watermark_image - watermark_text diff --git a/dev/_sources/examples/api/joinstyle.txt b/dev/_sources/examples/api/joinstyle.txt deleted file mode 100644 index 623cd710628..00000000000 --- a/dev/_sources/examples/api/joinstyle.txt +++ /dev/null @@ -1,45 +0,0 @@ -.. _api-joinstyle: - -api example code: joinstyle.py -============================== - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/api/joinstyle.py - -:: - - #!/usr/bin/env python - """ - Illustrate the three different join styles - """ - - import numpy as np - import matplotlib - import matplotlib.pyplot as plt - - def plot_angle(ax, x, y, angle, style): - phi = angle/180*np.pi - 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 = plt.figure() - ax = fig.add_subplot(111) - 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/dev/_sources/examples/api/legend_demo.txt b/dev/_sources/examples/api/legend_demo.txt deleted file mode 100644 index 29073b1f991..00000000000 --- a/dev/_sources/examples/api/legend_demo.txt +++ /dev/null @@ -1,56 +0,0 @@ -.. _api-legend_demo: - -api example code: legend_demo.py -================================ - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/api/legend_demo.py - -:: - - """ - Demo of the legend function with a few features. - - In addition to the basic legend, this demo shows a few optional features: - - * Custom legend placement. - * A keyword argument to a drop-shadow. - * Setting the background color. - * Setting the font size. - * Setting the line width. - """ - import numpy as np - import matplotlib.pyplot as plt - - - # Example data - a = np.arange(0,3, .02) - b = np.arange(0,3, .02) - c = np.exp(a) - d = c[::-1] - - # Create plots with pre-defined labels. - # Alternatively, you can pass labels explicitly when calling `legend`. - 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') - - # Now add the legend with some customizations. - legend = ax.legend(loc='upper center', shadow=True) - - # The frame is matplotlib.patches.Rectangle instance surrounding the legend. - frame = legend.get_frame() - frame.set_facecolor('0.90') - - # Set the fontsize - for label in legend.get_texts(): - label.set_fontsize('large') - - for label in legend.get_lines(): - label.set_linewidth(1.5) # the legend line width - plt.show() - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/api/line_with_text.txt b/dev/_sources/examples/api/line_with_text.txt deleted file mode 100644 index a082e538769..00000000000 --- a/dev/_sources/examples/api/line_with_text.txt +++ /dev/null @@ -1,79 +0,0 @@ -.. _api-line_with_text: - -api example code: line_with_text.py -=================================== - - - -.. plot:: /home/mdboom/Work/builds/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 = plt.figure() - ax = fig.add_subplot(111) - 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/dev/_sources/examples/api/logo2.txt b/dev/_sources/examples/api/logo2.txt deleted file mode 100644 index c288da37f1c..00000000000 --- a/dev/_sources/examples/api/logo2.txt +++ /dev/null @@ -1,93 +0,0 @@ -.. _api-logo2: - -api example code: logo2.py -========================== - - - -.. plot:: /home/mdboom/Work/builds/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} = U^{3\beta}_{\delta_1 \rho_1} + \frac{1}{8 \pi 2} \int^{\alpha_2}_{\alpha_2} d \alpha^\prime_2 \left[\frac{ U^{2\beta}_{\delta_1 \rho_1} - \alpha^\prime_2U^{1\beta}_{\rho_1 \sigma_2} }{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} = -\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], polar=True) - - - 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/dev/_sources/examples/api/mathtext_asarray.txt b/dev/_sources/examples/api/mathtext_asarray.txt deleted file mode 100644 index 574b8a866e3..00000000000 --- a/dev/_sources/examples/api/mathtext_asarray.txt +++ /dev/null @@ -1,38 +0,0 @@ -.. _api-mathtext_asarray: - -api example code: mathtext_asarray.py -===================================== - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/api/mathtext_asarray.py - -:: - - """ - Load a mathtext image as numpy array - """ - - import numpy as np - 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}} 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/dev/_sources/examples/api/patch_collection.txt b/dev/_sources/examples/api/patch_collection.txt deleted file mode 100644 index bda30449f94..00000000000 --- a/dev/_sources/examples/api/patch_collection.txt +++ /dev/null @@ -1,62 +0,0 @@ -.. _api-patch_collection: - -api example code: patch_collection.py -===================================== - - - -.. plot:: /home/mdboom/Work/builds/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=plt.figure() - ax=fig.add_subplot(111) - - 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/dev/_sources/examples/api/path_patch_demo.txt b/dev/_sources/examples/api/path_patch_demo.txt deleted file mode 100644 index f1d4d801a90..00000000000 --- a/dev/_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/dev/_sources/examples/api/quad_bezier.txt b/dev/_sources/examples/api/quad_bezier.txt deleted file mode 100644 index e35d4cf98f9..00000000000 --- a/dev/_sources/examples/api/quad_bezier.txt +++ /dev/null @@ -1,34 +0,0 @@ -.. _api-quad_bezier: - -api example code: quad_bezier.py -================================ - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/api/quad_bezier.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) - 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/dev/_sources/examples/api/radar_chart.txt b/dev/_sources/examples/api/radar_chart.txt deleted file mode 100644 index 9f0ac200190..00000000000 --- a/dev/_sources/examples/api/radar_chart.txt +++ /dev/null @@ -1,209 +0,0 @@ -.. _api-radar_chart: - -api example code: radar_chart.py -================================ - - - -.. plot:: /home/mdboom/Work/builds/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 = 2*np.pi * np.linspace(0, 1-1./num_vars, num_vars) - # 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(theta * 180/np.pi, 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 = { - 'column names': - ['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('column names') - - 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 in enumerate(data.keys()): - 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(data[title], 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/dev/_sources/examples/api/sankey_demo_basics.txt b/dev/_sources/examples/api/sankey_demo_basics.txt deleted file mode 100644 index 3844c3b3616..00000000000 --- a/dev/_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/mdboom/Work/builds/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 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/dev/_sources/examples/api/sankey_demo_links.txt b/dev/_sources/examples/api/sankey_demo_links.txt deleted file mode 100644 index ffa6556dbf4..00000000000 --- a/dev/_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/mdboom/Work/builds/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/dev/_sources/examples/api/sankey_demo_old.txt b/dev/_sources/examples/api/sankey_demo_old.txt deleted file mode 100644 index 5e1240915ca..00000000000 --- a/dev/_sources/examples/api/sankey_demo_old.txt +++ /dev/null @@ -1,203 +0,0 @@ -.. _api-sankey_demo_old: - -api example code: sankey_demo_old.py -==================================== - - - -.. plot:: /home/mdboom/Work/builds/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): - h = (loss/2 + w)*np.tan(outangle/180. * np.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)*np.tan(inangle/180. * np.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 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/dev/_sources/examples/api/sankey_demo_rankine.txt b/dev/_sources/examples/api/sankey_demo_rankine.txt deleted file mode 100644 index b14d7a53c40..00000000000 --- a/dev/_sources/examples/api/sankey_demo_rankine.txt +++ /dev/null @@ -1,91 +0,0 @@ -.. _api-sankey_demo_rankine: - -api example code: sankey_demo_rankine.py -======================================== - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/api/sankey_demo_rankine.py - -:: - - """Demonstrate the Sankey class with a practicle example of a Rankine power cycle. - """ - import numpy as np - 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/dev/_sources/examples/api/scatter_piecharts.txt b/dev/_sources/examples/api/scatter_piecharts.txt deleted file mode 100644 index 406089d0f39..00000000000 --- a/dev/_sources/examples/api/scatter_piecharts.txt +++ /dev/null @@ -1,54 +0,0 @@ -.. _api-scatter_piecharts: - -api example code: scatter_piecharts.py -====================================== - - - -.. plot:: /home/mdboom/Work/builds/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)) - - # ... - 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)) - - 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)) - - - fig = plt.figure() - ax = fig.add_subplot(111) - ax.scatter( np.arange(3), np.arange(3), marker=(xy1,0), s=sizes, facecolor='blue' ) - ax.scatter( np.arange(3), np.arange(3), marker=(xy2,0), s=sizes, facecolor='green' ) - ax.scatter( np.arange(3), np.arange(3), marker=(xy3,0), s=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/dev/_sources/examples/api/span_regions.txt b/dev/_sources/examples/api/span_regions.txt deleted file mode 100644 index 4d10cd84900..00000000000 --- a/dev/_sources/examples/api/span_regions.txt +++ /dev/null @@ -1,52 +0,0 @@ -.. _api-span_regions: - -api example code: span_regions.py -================================= - - - -.. plot:: /home/mdboom/Work/builds/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 = plt.figure() - ax = fig.add_subplot(111) - 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/dev/_sources/examples/api/two_scales.txt b/dev/_sources/examples/api/two_scales.txt deleted file mode 100644 index f26ad2fa797..00000000000 --- a/dev/_sources/examples/api/two_scales.txt +++ /dev/null @@ -1,60 +0,0 @@ -.. _api-two_scales: - -api example code: two_scales.py -=============================== - - - -.. plot:: /home/mdboom/Work/builds/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 = plt.figure() - ax1 = fig.add_subplot(111) - 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/dev/_sources/examples/api/unicode_minus.txt b/dev/_sources/examples/api/unicode_minus.txt deleted file mode 100644 index 2c27295f7e0..00000000000 --- a/dev/_sources/examples/api/unicode_minus.txt +++ /dev/null @@ -1,32 +0,0 @@ -.. _api-unicode_minus: - -api example code: unicode_minus.py -================================== - - - -.. plot:: /home/mdboom/Work/builds/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 = plt.figure() - ax = fig.add_subplot(111) - 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/dev/_sources/examples/api/watermark_image.txt b/dev/_sources/examples/api/watermark_image.txt deleted file mode 100644 index 04f809c0fbf..00000000000 --- a/dev/_sources/examples/api/watermark_image.txt +++ /dev/null @@ -1,37 +0,0 @@ -.. _api-watermark_image: - -api example code: watermark_image.py -==================================== - - - -.. plot:: /home/mdboom/Work/builds/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 - 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 = plt.figure() - ax = fig.add_subplot(111) - - 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/dev/_sources/examples/api/watermark_text.txt b/dev/_sources/examples/api/watermark_text.txt deleted file mode 100644 index a66af2ba574..00000000000 --- a/dev/_sources/examples/api/watermark_text.txt +++ /dev/null @@ -1,35 +0,0 @@ -.. _api-watermark_text: - -api example code: watermark_text.py -=================================== - - - -.. plot:: /home/mdboom/Work/builds/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 = plt.figure() - - ax = fig.add_subplot(111) - 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/dev/_sources/examples/axes_grid/demo_axes_divider.txt b/dev/_sources/examples/axes_grid/demo_axes_divider.txt deleted file mode 100644 index 092cd19e15d..00000000000 --- a/dev/_sources/examples/axes_grid/demo_axes_divider.txt +++ /dev/null @@ -1,143 +0,0 @@ -.. _axes_grid-demo_axes_divider: - -axes_grid example code: demo_axes_divider.py -============================================ - - - -.. plot:: /home/mdboom/Work/builds/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_sied(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_sied(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/dev/_sources/examples/axes_grid/demo_axes_grid.txt b/dev/_sources/examples/axes_grid/demo_axes_grid.txt deleted file mode 100644 index 75c57e776e0..00000000000 --- a/dev/_sources/examples/axes_grid/demo_axes_grid.txt +++ /dev/null @@ -1,113 +0,0 @@ -.. _axes_grid-demo_axes_grid: - -axes_grid example code: demo_axes_grid.py -========================================= - - - -.. plot:: /home/mdboom/Work/builds/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, 131, # similar to subplot(131) - 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, 132, # similar to subplot(132) - 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(F, 133, # similar to subplot(122) - 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]) - - - - if 1: - F = plt.figure(1, (5.5, 2.5)) - - F.subplots_adjust(left=0.05, right=0.98) - - demo_simple_grid(F) - demo_grid_with_single_cbar(F) - demo_grid_with_each_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/dev/_sources/examples/axes_grid/demo_axes_grid2.txt b/dev/_sources/examples/axes_grid/demo_axes_grid2.txt deleted file mode 100644 index 04cab31e56e..00000000000 --- a/dev/_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/mdboom/Work/builds/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/dev/_sources/examples/axes_grid/demo_axes_hbox_divider.txt b/dev/_sources/examples/axes_grid/demo_axes_hbox_divider.txt deleted file mode 100644 index dae49190f99..00000000000 --- a/dev/_sources/examples/axes_grid/demo_axes_hbox_divider.txt +++ /dev/null @@ -1,66 +0,0 @@ -.. _axes_grid-demo_axes_hbox_divider: - -axes_grid example code: demo_axes_hbox_divider.py -================================================= - - - -.. plot:: /home/mdboom/Work/builds/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__": - - fig1 = plt.figure() - - arr1 = np.arange(20).reshape((4,5)) - arr2 = np.arange(20).reshape((5,4)) - - ax1 = plt.subplot(121) - ax2 = plt.subplot(122) - - ax1.imshow(arr1, interpolation="nearest") - ax2.imshow(arr2, interpolation="nearest") - - rect = 111 # subplot param for combined axes - make_heights_equal(fig1, 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/dev/_sources/examples/axes_grid/demo_axes_rgb.txt b/dev/_sources/examples/axes_grid/demo_axes_rgb.txt deleted file mode 100644 index d13ba3df1fd..00000000000 --- a/dev/_sources/examples/axes_grid/demo_axes_rgb.txt +++ /dev/null @@ -1,104 +0,0 @@ -.. _axes_grid-demo_axes_rgb: - -axes_grid example code: demo_axes_rgb.py -======================================== - - - -.. plot:: /home/mdboom/Work/builds/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 = plt.figure(1) - fig.clf() - - ax = fig.add_subplot(111) - 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/dev/_sources/examples/axes_grid/demo_axisline_style.txt b/dev/_sources/examples/axes_grid/demo_axisline_style.txt deleted file mode 100644 index 9554de0fd92..00000000000 --- a/dev/_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/mdboom/Work/builds/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/dev/_sources/examples/axes_grid/demo_colorbar_with_inset_locator.txt b/dev/_sources/examples/axes_grid/demo_colorbar_with_inset_locator.txt deleted file mode 100644 index 0a2a34e4246..00000000000 --- a/dev/_sources/examples/axes_grid/demo_colorbar_with_inset_locator.txt +++ /dev/null @@ -1,53 +0,0 @@ -.. _axes_grid-demo_colorbar_with_inset_locator: - -axes_grid example code: demo_colorbar_with_inset_locator.py -=========================================================== - - - -.. plot:: /home/mdboom/Work/builds/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 = plt.figure(1, [6, 3]) - - # first subplot - ax1 = fig.add_subplot(121) - - 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") - - # first subplot - ax = fig.add_subplot(122) - - axins = inset_axes(ax, - width="5%", # width = 10% of parent_bbox width - height="50%", # height : 50% - loc=3, - bbox_to_anchor=(1.05, 0., 1, 1), - bbox_transform=ax.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=ax.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/dev/_sources/examples/axes_grid/demo_curvelinear_grid.txt b/dev/_sources/examples/axes_grid/demo_curvelinear_grid.txt deleted file mode 100644 index a67f345aec0..00000000000 --- a/dev/_sources/examples/axes_grid/demo_curvelinear_grid.txt +++ /dev/null @@ -1,147 +0,0 @@ -.. _axes_grid-demo_curvelinear_grid: - -axes_grid example code: demo_curvelinear_grid.py -================================================ - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/axes_grid/demo_curvelinear_grid.py - -:: - - import numpy as np - #from matplotlib.path import Path - - import matplotlib.pyplot as plt - import matplotlib.cbook as cbook - - from mpl_toolkits.axisartist.grid_helper_curvelinear import GridHelperCurveLinear - from mpl_toolkits.axisartist import Subplot - - from mpl_toolkits.axisartist import SubplotHost, \ - ParasiteAxesAuxTrans - - - 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/dev/_sources/examples/axes_grid/demo_curvelinear_grid2.txt b/dev/_sources/examples/axes_grid/demo_curvelinear_grid2.txt deleted file mode 100644 index d280571c39d..00000000000 --- a/dev/_sources/examples/axes_grid/demo_curvelinear_grid2.txt +++ /dev/null @@ -1,77 +0,0 @@ -.. _axes_grid-demo_curvelinear_grid2: - -axes_grid example code: demo_curvelinear_grid2.py -================================================= - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/axes_grid/demo_curvelinear_grid2.py - -:: - - import numpy as np - #from matplotlib.path import Path - - 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, - lon_minmax = None, #(0, np.inf), - 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/dev/_sources/examples/axes_grid/demo_edge_colorbar.txt b/dev/_sources/examples/axes_grid/demo_edge_colorbar.txt deleted file mode 100644 index 63ed6a5be84..00000000000 --- a/dev/_sources/examples/axes_grid/demo_edge_colorbar.txt +++ /dev/null @@ -1,103 +0,0 @@ -.. _axes_grid-demo_edge_colorbar: - -axes_grid example code: demo_edge_colorbar.py -============================================= - - - -.. plot:: /home/mdboom/Work/builds/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/dev/_sources/examples/axes_grid/demo_floating_axes.txt b/dev/_sources/examples/axes_grid/demo_floating_axes.txt deleted file mode 100644 index 395d80c3456..00000000000 --- a/dev/_sources/examples/axes_grid/demo_floating_axes.txt +++ /dev/null @@ -1,171 +0,0 @@ -.. _axes_grid-demo_floating_axes: - -axes_grid example code: demo_floating_axes.py -============================================= - - - -.. plot:: /home/mdboom/Work/builds/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 - - 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_scale = Affine2D().scale(np.pi/180., 1.) - - 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 - - - - if 1: - import matplotlib.pyplot as plt - fig = plt.figure(1, figsize=(8, 4)) - fig.subplots_adjust(wspace=0.3, left=0.05, right=0.95) - - ax1, aux_ax2 = setup_axes1(fig, 131) - aux_ax2.bar([0, 1, 2, 3], [3, 2, 1, 3]) - - #theta = np.random.rand(10) #*.5*np.pi - #radius = np.random.rand(10) #+1. - #aux_ax1.scatter(theta, radius) - - - 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/dev/_sources/examples/axes_grid/demo_floating_axis.txt b/dev/_sources/examples/axes_grid/demo_floating_axis.txt deleted file mode 100644 index 5d7d84ddd4f..00000000000 --- a/dev/_sources/examples/axes_grid/demo_floating_axis.txt +++ /dev/null @@ -1,85 +0,0 @@ -.. _axes_grid-demo_floating_axis: - -axes_grid example code: demo_floating_axis.py -============================================= - - - -.. plot:: /home/mdboom/Work/builds/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/dev/_sources/examples/axes_grid/demo_parasite_axes2.txt b/dev/_sources/examples/axes_grid/demo_parasite_axes2.txt deleted file mode 100644 index d1a8f2b221f..00000000000 --- a/dev/_sources/examples/axes_grid/demo_parasite_axes2.txt +++ /dev/null @@ -1,61 +0,0 @@ -.. _axes_grid-demo_parasite_axes2: - -axes_grid example code: demo_parasite_axes2.py -============================================== - - - -.. plot:: /home/mdboom/Work/builds/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/dev/_sources/examples/axes_grid/index.txt b/dev/_sources/examples/axes_grid/index.txt deleted file mode 100644 index 6fd28544e86..00000000000 --- a/dev/_sources/examples/axes_grid/index.txt +++ /dev/null @@ -1,36 +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_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/dev/_sources/examples/axes_grid/inset_locator_demo.txt b/dev/_sources/examples/axes_grid/inset_locator_demo.txt deleted file mode 100644 index 4763d38fe92..00000000000 --- a/dev/_sources/examples/axes_grid/inset_locator_demo.txt +++ /dev/null @@ -1,59 +0,0 @@ -.. _axes_grid-inset_locator_demo: - -axes_grid example code: inset_locator_demo.py -============================================= - - - -.. plot:: /home/mdboom/Work/builds/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 = plt.figure(1, [5.5, 3]) - - # first subplot - ax = fig.add_subplot(1,2,1) - 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 - ax = fig.add_subplot(1,2,2) - ax.set_aspect(1.) - - axins = zoomed_inset_axes(ax, 0.5, loc=1) # zoom = 0.5 - - plt.xticks(visible=False) - plt.yticks(visible=False) - - add_sizebar(ax, 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/dev/_sources/examples/axes_grid/inset_locator_demo2.txt b/dev/_sources/examples/axes_grid/inset_locator_demo2.txt deleted file mode 100644 index c12d5367b1c..00000000000 --- a/dev/_sources/examples/axes_grid/inset_locator_demo2.txt +++ /dev/null @@ -1,62 +0,0 @@ -.. _axes_grid-inset_locator_demo2: - -axes_grid example code: inset_locator_demo2.py -============================================== - - - -.. plot:: /home/mdboom/Work/builds/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 = plt.figure(1, [5,4]) - ax = fig.add_subplot(111) - - # 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/dev/_sources/examples/axes_grid/make_room_for_ylabel_using_axesgrid.txt b/dev/_sources/examples/axes_grid/make_room_for_ylabel_using_axesgrid.txt deleted file mode 100644 index 28ec2370db7..00000000000 --- a/dev/_sources/examples/axes_grid/make_room_for_ylabel_using_axesgrid.txt +++ /dev/null @@ -1,76 +0,0 @@ -.. _axes_grid-make_room_for_ylabel_using_axesgrid: - -axes_grid example code: make_room_for_ylabel_using_axesgrid.py -============================================================== - - - -.. plot:: /home/mdboom/Work/builds/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/dev/_sources/examples/axes_grid/parasite_simple2.txt b/dev/_sources/examples/axes_grid/parasite_simple2.txt deleted file mode 100644 index 2000272a1bc..00000000000 --- a/dev/_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/mdboom/Work/builds/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("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/dev/_sources/examples/axes_grid/scatter_hist.txt b/dev/_sources/examples/axes_grid/scatter_hist.txt deleted file mode 100644 index 6e7e2a4e7a4..00000000000 --- a/dev/_sources/examples/axes_grid/scatter_hist.txt +++ /dev/null @@ -1,67 +0,0 @@ -.. _axes_grid-scatter_hist: - -axes_grid example code: scatter_hist.py -======================================= - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/axes_grid/scatter_hist.py - -:: - - import numpy as np - import matplotlib.pyplot as plt - - # the random data - x = np.random.randn(1000) - y = np.random.randn(1000) - - - fig = plt.figure(1, figsize=(5.5,5.5)) - - from mpl_toolkits.axes_grid1 import make_axes_locatable - - # the scatter plot: - axScatter = plt.subplot(111) - 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/dev/_sources/examples/axes_grid/simple_anchored_artists.txt b/dev/_sources/examples/axes_grid/simple_anchored_artists.txt deleted file mode 100644 index bd0059ee71e..00000000000 --- a/dev/_sources/examples/axes_grid/simple_anchored_artists.txt +++ /dev/null @@ -1,75 +0,0 @@ -.. _axes_grid-simple_anchored_artists: - -axes_grid example code: simple_anchored_artists.py -================================================== - - - -.. plot:: /home/mdboom/Work/builds/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/dev/_sources/examples/axes_grid/simple_axesgrid.txt b/dev/_sources/examples/axes_grid/simple_axesgrid.txt deleted file mode 100644 index 7c5f36239a0..00000000000 --- a/dev/_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/mdboom/Work/builds/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/dev/_sources/examples/axes_grid/simple_axesgrid2.txt b/dev/_sources/examples/axes_grid/simple_axesgrid2.txt deleted file mode 100644 index 945cdc18270..00000000000 --- a/dev/_sources/examples/axes_grid/simple_axesgrid2.txt +++ /dev/null @@ -1,45 +0,0 @@ -.. _axes_grid-simple_axesgrid2: - -axes_grid example code: simple_axesgrid2.py -=========================================== - - - -.. plot:: /home/mdboom/Work/builds/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/dev/_sources/examples/axes_grid/simple_axisline4.txt b/dev/_sources/examples/axes_grid/simple_axisline4.txt deleted file mode 100644 index 70e9f551126..00000000000 --- a/dev/_sources/examples/axes_grid/simple_axisline4.txt +++ /dev/null @@ -1,33 +0,0 @@ -.. _axes_grid-simple_axisline4: - -axes_grid example code: simple_axisline4.py -=========================================== - - - -.. plot:: /home/mdboom/Work/builds/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/dev/_sources/examples/color/color_cycle_demo.txt b/dev/_sources/examples/color/color_cycle_demo.txt deleted file mode 100644 index b840e0e532c..00000000000 --- a/dev/_sources/examples/color/color_cycle_demo.txt +++ /dev/null @@ -1,48 +0,0 @@ -.. _color-color_cycle_demo: - -color example code: color_cycle_demo.py -======================================= - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/color/color_cycle_demo.py - -:: - - """ - Demo of custom color-cycle settings to control colors for multi-line plots. - - This example demonstrates two different APIs: - - 1. Setting the default rc-parameter specifying the color cycle. - This affects all subsequent plots. - 2. Setting the color cycle for a specific axes. This only affects a single - axes. - """ - 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) - fig, (ax0, ax1) = plt.subplots(nrows=2) - - plt.rc('axes', color_cycle=['r', 'g', 'b', 'y']) - ax0.plot(yy) - ax0.set_title('Set default color cycle to rgby') - - ax1.set_color_cycle(['c', 'm', 'y', 'k']) - 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/dev/_sources/examples/color/colormaps_reference.txt b/dev/_sources/examples/color/colormaps_reference.txt deleted file mode 100644 index 97ba03379ef..00000000000 --- a/dev/_sources/examples/color/colormaps_reference.txt +++ /dev/null @@ -1,93 +0,0 @@ -.. _color-colormaps_reference: - -color example code: colormaps_reference.py -========================================== - - - -.. plot:: /home/mdboom/Work/builds/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 - - - cmaps = [('Sequential', ['binary', 'Blues', 'BuGn', 'BuPu', 'gist_yarg', - 'GnBu', 'Greens', 'Greys', 'Oranges', 'OrRd', - 'PuBu', 'PuBuGn', 'PuRd', 'Purples', 'RdPu', - 'Reds', 'YlGn', 'YlGnBu', 'YlOrBr', 'YlOrRd']), - ('Sequential (2)', ['afmhot', 'autumn', 'bone', 'cool', 'copper', - 'gist_gray', 'gist_heat', 'gray', 'hot', 'pink', - 'spring', 'summer', 'winter']), - ('Diverging', ['BrBG', 'bwr', 'coolwarm', 'PiYG', 'PRGn', 'PuOr', - 'RdBu', 'RdGy', 'RdYlBu', 'RdYlGn', 'seismic']), - ('Qualitative', ['Accent', 'Dark2', 'hsv', 'Paired', 'Pastel1', - 'Pastel2', 'Set1', 'Set2', 'Set3', 'spectral']), - ('Miscellaneous', ['gist_earth', 'gist_ncar', 'gist_rainbow', - 'gist_stern', 'jet', 'brg', 'CMRmap', 'cubehelix', - 'gnuplot', 'gnuplot2', 'ocean', 'rainbow', - 'terrain', '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/dev/_sources/examples/color/index.txt b/dev/_sources/examples/color/index.txt deleted file mode 100644 index 5bde9db624c..00000000000 --- a/dev/_sources/examples/color/index.txt +++ /dev/null @@ -1,16 +0,0 @@ -.. _color-examples-index: - -############################################## -color Examples -############################################## - -.. htmlonly:: - - :Release: |version| - :Date: |today| - -.. toctree:: - :maxdepth: 1 - - color_cycle_demo - colormaps_reference diff --git a/dev/_sources/examples/event_handling/close_event.txt b/dev/_sources/examples/event_handling/close_event.txt deleted file mode 100644 index f0b3ebcbb7d..00000000000 --- a/dev/_sources/examples/event_handling/close_event.txt +++ /dev/null @@ -1,23 +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/dev/_sources/examples/event_handling/data_browser.txt b/dev/_sources/examples/event_handling/data_browser.txt deleted file mode 100644 index 5f7b7449f44..00000000000 --- a/dev/_sources/examples/event_handling/data_browser.txt +++ /dev/null @@ -1,97 +0,0 @@ -.. _event_handling-data_browser: - -event_handling example code: data_browser.py -============================================ - -[`source code `_] - -:: - - import numpy as np - - - class PointBrowser: - """ - 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 = plt.figure() - ax = fig.add_subplot(211) - ax.set_title('click on point to plot time series') - line, = ax.plot(xs, ys, 'o', picker=5) # 5 points tolerance - ax2 = fig.add_subplot(212) - - 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/dev/_sources/examples/event_handling/figure_axes_enter_leave.txt b/dev/_sources/examples/event_handling/figure_axes_enter_leave.txt deleted file mode 100644 index a15d42e5866..00000000000 --- a/dev/_sources/examples/event_handling/figure_axes_enter_leave.txt +++ /dev/null @@ -1,62 +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 = plt.figure() - fig1.suptitle('mouse hover over figure or axes to trigger events') - ax1 = fig1.add_subplot(211) - ax2 = fig1.add_subplot(212) - - 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 = plt.figure() - fig2.suptitle('mouse hover over figure or axes to trigger events') - ax1 = fig2.add_subplot(211) - ax2 = fig2.add_subplot(212) - - 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/dev/_sources/examples/event_handling/idle_and_timeout.txt b/dev/_sources/examples/event_handling/idle_and_timeout.txt deleted file mode 100644 index 73267f05231..00000000000 --- a/dev/_sources/examples/event_handling/idle_and_timeout.txt +++ /dev/null @@ -1,48 +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 - - This is only tested on gtk so far and is a prototype implementation - """ - import numpy as np - import matplotlib.pyplot as plt - - fig = plt.figure() - ax = fig.add_subplot(111) - - 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/dev/_sources/examples/event_handling/index.txt b/dev/_sources/examples/event_handling/index.txt deleted file mode 100644 index 693105a6d3e..00000000000 --- a/dev/_sources/examples/event_handling/index.txt +++ /dev/null @@ -1,35 +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 - pong_qt - resample - test_mouseclicks - timers - trifinder_event_demo - viewlims - zoom_window diff --git a/dev/_sources/examples/event_handling/keypress_demo.txt b/dev/_sources/examples/event_handling/keypress_demo.txt deleted file mode 100644 index 7f62e7bd2e0..00000000000 --- a/dev/_sources/examples/event_handling/keypress_demo.txt +++ /dev/null @@ -1,40 +0,0 @@ -.. _event_handling-keypress_demo: - -event_handling example code: keypress_demo.py -============================================= - -[`source code `_] - -:: - - #!/usr/bin/env python - - """ - Show how to connect to keypress events - """ - from __future__ import print_function - import sys - import numpy as np - import matplotlib.pyplot as plt - - - def press(event): - print('press', event.key) - sys.stdout.flush() - if event.key=='x': - visible = xl.get_visible() - xl.set_visible(not visible) - fig.canvas.draw() - - fig = plt.figure() - ax = fig.add_subplot(111) - - fig.canvas.mpl_connect('key_press_event', press) - - ax.plot(np.random.rand(12), np.random.rand(12), 'go') - xl = ax.set_xlabel('easy come, easy go') - - plt.show() - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/event_handling/lasso_demo.txt b/dev/_sources/examples/event_handling/lasso_demo.txt deleted file mode 100644 index f1f9ca2ffd4..00000000000 --- a/dev/_sources/examples/event_handling/lasso_demo.txt +++ /dev/null @@ -1,89 +0,0 @@ -.. _event_handling-lasso_demo: - -event_handling example code: lasso_demo.py -========================================== - -[`source code `_] - -:: - - """ - Show how to use a lasso to select a set of points and get the indices - of the selected points. A callback is used to change the color of the - selected points - - This is currently a proof-of-concept implementation (though it is - usable as is). There will be some refinement of the API. - """ - from matplotlib.widgets import Lasso - from matplotlib.colors import colorConverter - from matplotlib.collections import RegularPolyCollection - from matplotlib import path - - import matplotlib.pyplot as plt - from numpy import nonzero - from numpy.random import rand - - class Datum(object): - colorin = colorConverter.to_rgba('red') - colorout = colorConverter.to_rgba('blue') - def __init__(self, x, y, include=False): - self.x = x - self.y = y - if include: self.color = self.colorin - else: self.color = self.colorout - - - class LassoManager(object): - def __init__(self, ax, data): - self.axes = ax - self.canvas = ax.figure.canvas - self.data = data - - self.Nxy = len(data) - - facecolors = [d.color for d in data] - self.xys = [(d.x, d.y) for d in data] - fig = ax.figure - self.collection = RegularPolyCollection( - fig.dpi, 6, sizes=(100,), - facecolors=facecolors, - offsets = self.xys, - transOffset = ax.transData) - - ax.add_collection(self.collection) - - self.cid = self.canvas.mpl_connect('button_press_event', self.onpress) - - def callback(self, verts): - facecolors = self.collection.get_facecolors() - p = path.Path(verts) - ind = p.contains_points(self.xys) - for i in range(len(self.xys)): - if ind[i]: - facecolors[i] = Datum.colorin - else: - facecolors[i] = Datum.colorout - - self.canvas.draw_idle() - self.canvas.widgetlock.release(self.lasso) - del self.lasso - - def onpress(self, event): - if self.canvas.widgetlock.locked(): return - if event.inaxes is None: return - self.lasso = Lasso(event.inaxes, (event.xdata, event.ydata), self.callback) - # acquire a lock on the widget drawing - self.canvas.widgetlock(self.lasso) - - if __name__ == '__main__': - - data = [Datum(*xy) for xy in rand(100, 2)] - - ax = plt.axes(xlim=(0,1), ylim=(0,1), autoscale_on=False) - lman = LassoManager(ax, data) - - plt.show() - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/event_handling/legend_picking.txt b/dev/_sources/examples/event_handling/legend_picking.txt deleted file mode 100644 index fed93bb85f5..00000000000 --- a/dev/_sources/examples/event_handling/legend_picking.txt +++ /dev/null @@ -1,58 +0,0 @@ -.. _event_handling-legend_picking: - -event_handling example code: legend_picking.py -============================================== - -[`source code `_] - -:: - - """ - Enable picking on the legend to toggle the legended line on and off - """ - import numpy as np - import matplotlib.pyplot as plt - - t = np.arange(0.0, 0.2, 0.1) - y1 = 2*np.sin(2*np.pi*t) - y2 = 4*np.sin(2*np.pi*2*t) - - fig = plt.figure() - ax = fig.add_subplot(111) - ax.set_title('Click on legend line to toggle line on/off') - line1, = ax.plot(t, y1, lw=2, color='red', label='1 HZ') - line2, = ax.plot(t, y2, lw=2, color='blue', label='2 HZ') - leg = ax.legend(loc='upper left', fancybox=True, shadow=True) - leg.get_frame().set_alpha(0.4) - - - # we will set up a dict mapping legend line to orig line, and enable - # picking on the legend line - lines = [line1, line2] - lined = dict() - for legline, origline in zip(leg.get_lines(), lines): - legline.set_picker(5) # 5 pts tolerance - lined[legline] = origline - - - def onpick(event): - # on the pick event, find the orig line corresponding to the - # legend proxy line, and toggle the visibility - legline = event.artist - origline = lined[legline] - vis = not origline.get_visible() - origline.set_visible(vis) - # Change the alpha on the line in the legend so we can see what lines - # have been toggled - if vis: - legline.set_alpha(1.0) - else: - legline.set_alpha(0.2) - fig.canvas.draw() - - fig.canvas.mpl_connect('pick_event', onpick) - - plt.show() - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/event_handling/looking_glass.txt b/dev/_sources/examples/event_handling/looking_glass.txt deleted file mode 100644 index 88692beeec4..00000000000 --- a/dev/_sources/examples/event_handling/looking_glass.txt +++ /dev/null @@ -1,59 +0,0 @@ -.. _event_handling-looking_glass: - -event_handling example code: looking_glass.py -============================================= - -[`source code `_] - -:: - - import numpy as np - import matplotlib.pyplot as plt - import matplotlib.patches as patches - x, y = np.random.rand(2, 200) - - fig = plt.figure() - ax = fig.add_subplot(111) - circ = patches.Circle( (0.5, 0.5), 0.25, alpha=0.8, fc='yellow') - ax.add_patch(circ) - - - ax.plot(x, y, alpha=0.2) - line, = ax.plot(x, y, alpha=1.0, clip_path=circ) - - class EventHandler: - def __init__(self): - fig.canvas.mpl_connect('button_press_event', self.onpress) - fig.canvas.mpl_connect('button_release_event', self.onrelease) - fig.canvas.mpl_connect('motion_notify_event', self.onmove) - self.x0, self.y0 = circ.center - self.pressevent = None - - def onpress(self, event): - if event.inaxes!=ax: - return - - if not circ.contains(event)[0]: - return - - self.pressevent = event - - def onrelease(self, event): - self.pressevent = None - self.x0, self.y0 = circ.center - - def onmove(self, event): - if self.pressevent is None or event.inaxes!=self.pressevent.inaxes: - return - - dx = event.xdata - self.pressevent.xdata - dy = event.ydata - self.pressevent.ydata - circ.center = self.x0 + dx, self.y0 + dy - line.set_clip_path(circ) - fig.canvas.draw() - - handler = EventHandler() - plt.show() - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/event_handling/path_editor.txt b/dev/_sources/examples/event_handling/path_editor.txt deleted file mode 100644 index 6e49bf2ef5b..00000000000 --- a/dev/_sources/examples/event_handling/path_editor.txt +++ /dev/null @@ -1,155 +0,0 @@ -.. _event_handling-path_editor: - -event_handling example code: path_editor.py -=========================================== - -[`source code `_] - -:: - - 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='green', edgecolor='yellow', alpha=0.5) - ax.add_patch(patch) - - - class PathInteractor: - """ - An path editor. - - Key-bindings - - 't' toggle vertex markers on and off. When vertex markers are on, - you can move them, delete them - - - """ - - showverts = True - epsilon = 5 # max pixel distance to count as a vertex hit - - def __init__(self, pathpatch): - - self.ax = pathpatch.axes - canvas = self.ax.figure.canvas - self.pathpatch = pathpatch - self.pathpatch.set_animated(True) - - x, y = zip(*self.pathpatch.get_path().vertices) - - self.line, = ax.plot(x,y,marker='o', markerfacecolor='r', animated=True) - - self._ind = None # the active vert - - canvas.mpl_connect('draw_event', self.draw_callback) - canvas.mpl_connect('button_press_event', self.button_press_callback) - canvas.mpl_connect('key_press_event', self.key_press_callback) - canvas.mpl_connect('button_release_event', self.button_release_callback) - canvas.mpl_connect('motion_notify_event', self.motion_notify_callback) - self.canvas = canvas - - - def draw_callback(self, event): - self.background = self.canvas.copy_from_bbox(self.ax.bbox) - self.ax.draw_artist(self.pathpatch) - self.ax.draw_artist(self.line) - self.canvas.blit(self.ax.bbox) - - def pathpatch_changed(self, pathpatch): - 'this method is called whenever the pathpatchgon object is called' - # only copy the artist props to the line (except visibility) - vis = self.line.get_visible() - Artist.update_from(self.line, pathpatch) - self.line.set_visible(vis) # don't use the pathpatch visibility state - - - def get_ind_under_point(self, event): - 'get the index of the vertex under point if within epsilon tolerance' - - # display coords - xy = np.asarray(self.pathpatch.get_path().vertices) - xyt = self.pathpatch.get_transform().transform(xy) - xt, yt = xyt[:, 0], xyt[:, 1] - d = np.sqrt((xt-event.x)**2 + (yt-event.y)**2) - ind = d.argmin() - - if d[ind]>=self.epsilon: - ind = None - - return ind - - def button_press_callback(self, event): - 'whenever a mouse button is pressed' - if not self.showverts: return - if event.inaxes==None: return - if event.button != 1: return - self._ind = self.get_ind_under_point(event) - - def button_release_callback(self, event): - 'whenever a mouse button is released' - if not self.showverts: return - if event.button != 1: return - self._ind = None - - def key_press_callback(self, event): - 'whenever a key is pressed' - if not event.inaxes: return - if event.key=='t': - self.showverts = not self.showverts - self.line.set_visible(self.showverts) - if not self.showverts: self._ind = None - - self.canvas.draw() - - def motion_notify_callback(self, event): - 'on mouse movement' - if not self.showverts: return - if self._ind is None: return - if event.inaxes is None: return - if event.button != 1: return - x,y = event.xdata, event.ydata - - vertices = self.pathpatch.get_path().vertices - - vertices[self._ind] = x,y - self.line.set_data(zip(*vertices)) - - self.canvas.restore_region(self.background) - self.ax.draw_artist(self.pathpatch) - self.ax.draw_artist(self.line) - self.canvas.blit(self.ax.bbox) - - - interactor = PathInteractor(patch) - ax.set_title('drag vertices to update path') - ax.set_xlim(-3,4) - ax.set_ylim(-3,4) - - plt.show() - - - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/event_handling/pick_event_demo.txt b/dev/_sources/examples/event_handling/pick_event_demo.txt deleted file mode 100644 index 6c2d568dd23..00000000000 --- a/dev/_sources/examples/event_handling/pick_event_demo.txt +++ /dev/null @@ -1,195 +0,0 @@ -.. _event_handling-pick_event_demo: - -event_handling example code: pick_event_demo.py -=============================================== - -[`source code `_] - -:: - - #!/usr/bin/env python - - """ - - You can enable picking by setting the "picker" property of an artist - (for example, a matplotlib Line2D, Text, Patch, Polygon, AxesImage, - etc...) - - There are a variety of meanings of the picker property - - None - picking is disabled for this artist (default) - - boolean - if True then picking will be enabled and the - artist will fire a pick event if the mouse event is over - the artist - - float - if picker is a number it is interpreted as an - epsilon tolerance in points and the artist will fire - off an event if it's data is within epsilon of the mouse - event. For some artists like lines and patch collections, - the artist may provide additional data to the pick event - that is generated, for example, the indices of the data within - epsilon of the pick event - - function - if picker is callable, it is a user supplied - function which determines whether the artist is hit by the - mouse event. - - hit, props = picker(artist, mouseevent) - - to determine the hit test. If the mouse event is over the - artist, return hit=True and props is a dictionary of properties - you want added to the PickEvent attributes - - - After you have enabled an artist for picking by setting the "picker" - property, you need to connect to the figure canvas pick_event to get - pick callbacks on mouse press events. For example, - - def pick_handler(event): - mouseevent = event.mouseevent - artist = event.artist - # now do something with this... - - - The pick event (matplotlib.backend_bases.PickEvent) which is passed to - your callback is always fired with two attributes: - - mouseevent - the mouse event that generate the pick event. The - mouse event in turn has attributes like x and y (the coordinates in - display space, such as pixels from left, bottom) and xdata, ydata (the - coords in data space). Additionally, you can get information about - which buttons were pressed, which keys were pressed, which Axes - the mouse is over, etc. See matplotlib.backend_bases.MouseEvent - for details. - - artist - the matplotlib.artist that generated the pick event. - - Additionally, certain artists like Line2D and PatchCollection may - attach additional meta data like the indices into the data that meet - the picker criteria (for example, all the points in the line that are within - the specified epsilon tolerance) - - The examples below illustrate each of these methods. - """ - - from __future__ import print_function - from matplotlib.pyplot import figure, show - from matplotlib.lines import Line2D - from matplotlib.patches import Rectangle - from matplotlib.text import Text - from matplotlib.image import AxesImage - import numpy as np - from numpy.random import rand - - if 1: # simple picking, lines, rectangles and text - fig = figure() - ax1 = fig.add_subplot(211) - ax1.set_title('click on points, rectangles or text', picker=True) - ax1.set_ylabel('ylabel', picker=True, bbox=dict(facecolor='red')) - line, = ax1.plot(rand(100), 'o', picker=5) # 5 points tolerance - - # pick the rectangle - ax2 = fig.add_subplot(212) - - bars = ax2.bar(range(10), rand(10), picker=True) - for label in ax2.get_xticklabels(): # make the xtick labels pickable - label.set_picker(True) - - - def onpick1(event): - if isinstance(event.artist, Line2D): - thisline = event.artist - xdata = thisline.get_xdata() - ydata = thisline.get_ydata() - ind = event.ind - print('onpick1 line:', zip(np.take(xdata, ind), np.take(ydata, ind))) - elif isinstance(event.artist, Rectangle): - patch = event.artist - print('onpick1 patch:', patch.get_path()) - elif isinstance(event.artist, Text): - text = event.artist - print('onpick1 text:', text.get_text()) - - - - fig.canvas.mpl_connect('pick_event', onpick1) - - if 1: # picking with a custom hit test function - # you can define custom pickers by setting picker to a callable - # function. The function has the signature - # - # hit, props = func(artist, mouseevent) - # - # to determine the hit test. if the mouse event is over the artist, - # return hit=True and props is a dictionary of - # properties you want added to the PickEvent attributes - - def line_picker(line, mouseevent): - """ - find the points within a certain distance from the mouseclick in - data coords and attach some extra attributes, pickx and picky - which are the data points that were picked - """ - if mouseevent.xdata is None: return False, dict() - xdata = line.get_xdata() - ydata = line.get_ydata() - maxd = 0.05 - d = np.sqrt((xdata-mouseevent.xdata)**2. + (ydata-mouseevent.ydata)**2.) - - ind = np.nonzero(np.less_equal(d, maxd)) - if len(ind): - pickx = np.take(xdata, ind) - picky = np.take(ydata, ind) - props = dict(ind=ind, pickx=pickx, picky=picky) - return True, props - else: - return False, dict() - - def onpick2(event): - print('onpick2 line:', event.pickx, event.picky) - - fig = figure() - ax1 = fig.add_subplot(111) - ax1.set_title('custom picker for line data') - line, = ax1.plot(rand(100), rand(100), 'o', picker=line_picker) - fig.canvas.mpl_connect('pick_event', onpick2) - - - if 1: # picking on a scatter plot (matplotlib.collections.RegularPolyCollection) - - x, y, c, s = rand(4, 100) - def onpick3(event): - ind = event.ind - print('onpick3 scatter:', ind, np.take(x, ind), np.take(y, ind)) - - fig = figure() - ax1 = fig.add_subplot(111) - col = ax1.scatter(x, y, 100*s, c, picker=True) - #fig.savefig('pscoll.eps') - fig.canvas.mpl_connect('pick_event', onpick3) - - if 1: # picking images (matplotlib.image.AxesImage) - fig = figure() - ax1 = fig.add_subplot(111) - im1 = ax1.imshow(rand(10,5), extent=(1,2,1,2), picker=True) - im2 = ax1.imshow(rand(5,10), extent=(3,4,1,2), picker=True) - im3 = ax1.imshow(rand(20,25), extent=(1,2,3,4), picker=True) - im4 = ax1.imshow(rand(30,12), extent=(3,4,3,4), picker=True) - ax1.axis([0,5,0,5]) - - def onpick4(event): - artist = event.artist - if isinstance(artist, AxesImage): - im = artist - A = im.get_array() - print('onpick4 image', A.shape) - - fig.canvas.mpl_connect('pick_event', onpick4) - - - show() - - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/event_handling/pick_event_demo2.txt b/dev/_sources/examples/event_handling/pick_event_demo2.txt deleted file mode 100644 index 897e6913d27..00000000000 --- a/dev/_sources/examples/event_handling/pick_event_demo2.txt +++ /dev/null @@ -1,57 +0,0 @@ -.. _event_handling-pick_event_demo2: - -event_handling example code: pick_event_demo2.py -================================================ - -[`source code `_] - -:: - - """ - compute the mean and standard deviation (stddev) of 100 data sets and plot - mean vs stddev. When you click on one of the mu, sigma points, plot the raw - data from the dataset that generated the mean and stddev. - """ - import numpy - import matplotlib.pyplot as plt - - - X = numpy.random.rand(100, 1000) - xs = numpy.mean(X, axis=1) - ys = numpy.std(X, axis=1) - - fig = plt.figure() - ax = fig.add_subplot(111) - ax.set_title('click on point to plot time series') - line, = ax.plot(xs, ys, 'o', picker=5) # 5 points tolerance - - - def onpick(event): - - if event.artist!=line: return True - - N = len(event.ind) - if not N: return True - - - figi = plt.figure() - for subplotnum, dataind in enumerate(event.ind): - ax = figi.add_subplot(N,1,subplotnum+1) - ax.plot(X[dataind]) - ax.text(0.05, 0.9, 'mu=%1.3f\nsigma=%1.3f'%(xs[dataind], ys[dataind]), - transform=ax.transAxes, va='top') - ax.set_ylim(-0.5, 1.5) - figi.show() - return True - - fig.canvas.mpl_connect('pick_event', onpick) - - plt.show() - - - - - - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/event_handling/pipong.txt b/dev/_sources/examples/event_handling/pipong.txt deleted file mode 100644 index d9293826941..00000000000 --- a/dev/_sources/examples/event_handling/pipong.txt +++ /dev/null @@ -1,271 +0,0 @@ -.. _event_handling-pipong: - -event_handling example code: pipong.py -====================================== - -[`source code `_] - -:: - - #!/usr/bin/env python - # A matplotlib based game of Pong illustrating one way to write interactive - # animation which are easily ported to multiple backends - # pipong.py was written by Paul Ivanov - - from __future__ import print_function - - import numpy as np - import matplotlib.pyplot as plt - from numpy.random import randn, randint - - instructions = """ - Player A: Player B: - 'e' up 'i' - 'd' down 'k' - - press 't' -- close these instructions - (animation will be much faster) - press 'a' -- add a puck - press 'A' -- remove a puck - press '1' -- slow down all pucks - press '2' -- speed up all pucks - press '3' -- slow down distractors - press '4' -- speed up distractors - press ' ' -- reset the first puck - press 'n' -- toggle distractors on/off - press 'g' -- toggle the game on/off - - """ - - class Pad(object): - def __init__(self, disp,x,y,type='l'): - self.disp = disp - self.x = x - self.y = y - self.w = .3 - self.score = 0 - self.xoffset = 0.3 - self.yoffset = 0.1 - if type=='r': - self.xoffset *= -1.0 - - if type=='l' or type=='r': - self.signx = -1.0 - self.signy = 1.0 - else: - self.signx = 1.0 - self.signy = -1.0 - def contains(self, loc): - return self.disp.get_bbox().contains(loc.x,loc.y) - - class Puck(object): - def __init__(self, disp, pad, field): - self.vmax= .2 - self.disp = disp - self.field = field - self._reset(pad) - def _reset(self,pad): - self.x = pad.x + pad.xoffset - if pad.y < 0: - self.y = pad.y + pad.yoffset - else: - self.y = pad.y - pad.yoffset - self.vx = pad.x - self.x - self.vy = pad.y + pad.w/2 - self.y - self._speedlimit() - self._slower() - self._slower() - def update(self,pads): - self.x += self.vx - self.y += self.vy - for pad in pads: - if pad.contains(self): - self.vx *= 1.2 *pad.signx - self.vy *= 1.2 *pad.signy - fudge = .001 - #probably cleaner with something like...if not self.field.contains(self.x, self.y): - if self.x < 0+fudge: - #print "player A loses" - pads[1].score += 1; - self._reset(pads[0]) - return True - if self.x > 7-fudge: - #print "player B loses" - pads[0].score += 1; - self._reset(pads[1]) - return True - if self.y < -1+fudge or self.y > 1-fudge: - self.vy *= -1.0 - # add some randomness, just to make it interesting - self.vy -= (randn()/300.0 + 1/300.0) * np.sign(self.vy) - self._speedlimit() - return False - def _slower(self): - self.vx /= 5.0 - self.vy /= 5.0 - def _faster(self): - self.vx *= 5.0 - self.vy *= 5.0 - def _speedlimit(self): - if self.vx > self.vmax: - self.vx = self.vmax - if self.vx < -self.vmax: - self.vx = -self.vmax - - if self.vy > self.vmax: - self.vy = self.vmax - if self.vy < -self.vmax: - self.vy = -self.vmax - - class Game(object): - - def __init__(self, ax): - # create the initial line - self.ax = ax - padAx = padBx= .50 - padAy = padBy= .30 - padBx+=6.3 - pA, = self.ax.barh(padAy,.2, height=.3,color='k', alpha=.5, edgecolor='b',lw=2,label="Player B", animated=True) - pB, = self.ax.barh(padBy,.2, height=.3, left=padBx, color='k',alpha=.5, edgecolor='r',lw=2,label="Player A",animated=True) - - # distractors - self.x = np.arange(0,2.22*np.pi,0.01) - self.line, = self.ax.plot(self.x, np.sin(self.x),"r", animated=True, lw=4) - self.line2, = self.ax.plot(self.x, np.cos(self.x),"g", animated=True, lw=4) - self.line3, = self.ax.plot(self.x, np.cos(self.x),"g", animated=True, lw=4) - self.line4, = self.ax.plot(self.x, np.cos(self.x),"r", animated=True, lw=4) - self.centerline,= self.ax.plot([3.5,3.5], [1,-1],'k',alpha=.5, animated=True, lw=8) - self.puckdisp = self.ax.scatter([1],[1],label='_nolegend_', s=200,c='g',alpha=.9,animated=True) - - self.canvas = self.ax.figure.canvas - self.background = None - self.cnt = 0 - self.distract = True - self.res = 100.0 - self.on = False - self.inst = True # show instructions from the beginning - self.background = None - self.pads = [] - self.pads.append( Pad(pA,0,padAy)) - self.pads.append( Pad(pB,padBx,padBy,'r')) - self.pucks =[] - self.i = self.ax.annotate(instructions,(.5,0.5), - name='monospace', - verticalalignment='center', - horizontalalignment='center', - multialignment='left', - textcoords='axes fraction',animated=True ) - self.canvas.mpl_connect('key_press_event', self.key_press) - - def draw(self, evt): - draw_artist = self.ax.draw_artist - 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) - - # show the distractors - if self.distract: - self.line.set_ydata(np.sin(self.x+self.cnt/self.res)) - self.line2.set_ydata(np.cos(self.x-self.cnt/self.res)) - self.line3.set_ydata(np.tan(self.x+self.cnt/self.res)) - self.line4.set_ydata(np.tan(self.x-self.cnt/self.res)) - draw_artist(self.line) - draw_artist(self.line2) - draw_artist(self.line3) - draw_artist(self.line4) - - # show the instructions - this is very slow - if self.inst: - self.ax.draw_artist(self.i) - - # pucks and pads - if self.on: - self.ax.draw_artist(self.centerline) - for pad in self.pads: - pad.disp.set_y(pad.y) - pad.disp.set_x(pad.x) - self.ax.draw_artist(pad.disp) - - for puck in self.pucks: - if puck.update(self.pads): - # we only get here if someone scored - self.pads[0].disp.set_label(" "+ str(self.pads[0].score)) - self.pads[1].disp.set_label(" "+ str(self.pads[1].score)) - self.ax.legend(loc='center') - self.leg = self.ax.get_legend() - #self.leg.draw_frame(False) #don't draw the legend border - self.leg.get_frame().set_alpha(.2) - plt.setp(self.leg.get_texts(),fontweight='bold',fontsize='xx-large') - self.leg.get_frame().set_facecolor('0.2') - self.background = None - self.ax.figure.canvas.draw() - return True - puck.disp.set_offsets([puck.x,puck.y]) - self.ax.draw_artist(puck.disp) - - - # just redraw the axes rectangle - self.canvas.blit(self.ax.bbox) - - if self.cnt==50000: - # just so we don't get carried away - print("...and you've been playing for too long!!!") - plt.close() - - self.cnt += 1 - return True - - def key_press(self,event): - if event.key == '3': - self.res *= 5.0 - if event.key == '4': - self.res /= 5.0 - - if event.key == 'e': - self.pads[0].y += .1 - if self.pads[0].y > 1 - .3: - self.pads[0].y = 1-.3 - if event.key == 'd': - self.pads[0].y -= .1 - if self.pads[0].y < -1: - self.pads[0].y = -1 - - if event.key == 'i': - self.pads[1].y += .1 - if self.pads[1].y > 1 - .3: - self.pads[1].y = 1-.3 - if event.key == 'k': - self.pads[1].y -= .1 - if self.pads[1].y < -1: - self.pads[1].y = -1 - - if event.key == 'a': - self.pucks.append(Puck(self.puckdisp,self.pads[randint(2)],self.ax.bbox)) - if event.key == 'A' and len(self.pucks): - self.pucks.pop() - if event.key == ' ' and len(self.pucks): - self.pucks[0]._reset(self.pads[randint(2)]) - if event.key == '1': - for p in self.pucks: - p._slower() - if event.key == '2': - for p in self.pucks: - p._faster() - - if event.key == 'n': - self.distract = not self.distract - - if event.key == 'g': - #self.ax.clear() - #self.ax.grid() # seems to be necessary for qt backend - self.on = not self.on - if event.key == 't': - self.inst = not self.inst - self.i.set_visible(self.i.get_visible()) - if event.key == 'q': - plt.close() - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/event_handling/poly_editor.txt b/dev/_sources/examples/event_handling/poly_editor.txt deleted file mode 100644 index 6b25802347b..00000000000 --- a/dev/_sources/examples/event_handling/poly_editor.txt +++ /dev/null @@ -1,178 +0,0 @@ -.. _event_handling-poly_editor: - -event_handling example code: poly_editor.py -=========================================== - -[`source code `_] - -:: - - """ - This is an example to show how to build cross-GUI applications using - matplotlib event handling to interact with objects on the canvas - - """ - import numpy as np - from matplotlib.lines import Line2D - from matplotlib.artist import Artist - from matplotlib.mlab import dist_point_to_segment - - - class PolygonInteractor: - """ - An polygon editor. - - Key-bindings - - 't' toggle vertex markers on and off. When vertex markers are on, - you can move them, delete them - - 'd' delete the vertex under point - - 'i' insert a vertex at point. You must be within epsilon of the - line connecting two existing vertices - - """ - - showverts = True - epsilon = 5 # max pixel distance to count as a vertex hit - - def __init__(self, ax, poly): - if poly.figure is None: - raise RuntimeError('You must first add the polygon to a figure or canvas before defining the interactor') - self.ax = ax - canvas = poly.figure.canvas - self.poly = poly - - x, y = zip(*self.poly.xy) - self.line = Line2D(x, y, marker='o', markerfacecolor='r', animated=True) - self.ax.add_line(self.line) - #self._update_line(poly) - - cid = self.poly.add_callback(self.poly_changed) - self._ind = None # the active vert - - canvas.mpl_connect('draw_event', self.draw_callback) - canvas.mpl_connect('button_press_event', self.button_press_callback) - canvas.mpl_connect('key_press_event', self.key_press_callback) - canvas.mpl_connect('button_release_event', self.button_release_callback) - canvas.mpl_connect('motion_notify_event', self.motion_notify_callback) - self.canvas = canvas - - - def draw_callback(self, event): - self.background = self.canvas.copy_from_bbox(self.ax.bbox) - self.ax.draw_artist(self.poly) - self.ax.draw_artist(self.line) - self.canvas.blit(self.ax.bbox) - - def poly_changed(self, poly): - 'this method is called whenever the polygon object is called' - # only copy the artist props to the line (except visibility) - vis = self.line.get_visible() - Artist.update_from(self.line, poly) - self.line.set_visible(vis) # don't use the poly visibility state - - - def get_ind_under_point(self, event): - 'get the index of the vertex under point if within epsilon tolerance' - - # display coords - xy = np.asarray(self.poly.xy) - xyt = self.poly.get_transform().transform(xy) - xt, yt = xyt[:, 0], xyt[:, 1] - d = np.sqrt((xt-event.x)**2 + (yt-event.y)**2) - indseq = np.nonzero(np.equal(d, np.amin(d)))[0] - ind = indseq[0] - - if d[ind]>=self.epsilon: - ind = None - - return ind - - def button_press_callback(self, event): - 'whenever a mouse button is pressed' - if not self.showverts: return - if event.inaxes==None: return - if event.button != 1: return - self._ind = self.get_ind_under_point(event) - - def button_release_callback(self, event): - 'whenever a mouse button is released' - if not self.showverts: return - if event.button != 1: return - self._ind = None - - def key_press_callback(self, event): - 'whenever a key is pressed' - if not event.inaxes: return - if event.key=='t': - self.showverts = not self.showverts - self.line.set_visible(self.showverts) - if not self.showverts: self._ind = None - elif event.key=='d': - ind = self.get_ind_under_point(event) - if ind is not None: - self.poly.xy = [tup for i,tup in enumerate(self.poly.xy) if i!=ind] - self.line.set_data(zip(*self.poly.xy)) - elif event.key=='i': - xys = self.poly.get_transform().transform(self.poly.xy) - p = event.x, event.y # display coords - for i in range(len(xys)-1): - s0 = xys[i] - s1 = xys[i+1] - d = dist_point_to_segment(p, s0, s1) - if d<=self.epsilon: - self.poly.xy = np.array( - list(self.poly.xy[:i]) + - [(event.xdata, event.ydata)] + - list(self.poly.xy[i:])) - self.line.set_data(zip(*self.poly.xy)) - break - - - self.canvas.draw() - - def motion_notify_callback(self, event): - 'on mouse movement' - if not self.showverts: return - if self._ind is None: return - if event.inaxes is None: return - if event.button != 1: return - x,y = event.xdata, event.ydata - - self.poly.xy[self._ind] = x,y - self.line.set_data(zip(*self.poly.xy)) - - self.canvas.restore_region(self.background) - self.ax.draw_artist(self.poly) - self.ax.draw_artist(self.line) - self.canvas.blit(self.ax.bbox) - - - if __name__ == '__main__': - import matplotlib.pyplot as plt - from matplotlib.patches import Polygon - - fig = plt.figure() - theta = np.arange(0, 2*np.pi, 0.1) - r = 1.5 - - xs = r*np.cos(theta) - ys = r*np.sin(theta) - - poly = Polygon(list(zip(xs, ys)), animated=True) - - ax = plt.subplot(111) - ax.add_patch(poly) - p = PolygonInteractor(ax, poly) - - #ax.add_line(p.line) - ax.set_title('Click and drag a point to move it') - ax.set_xlim((-2,2)) - ax.set_ylim((-2,2)) - plt.show() - - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/event_handling/pong_gtk.txt b/dev/_sources/examples/event_handling/pong_gtk.txt deleted file mode 100644 index 7367f71eed6..00000000000 --- a/dev/_sources/examples/event_handling/pong_gtk.txt +++ /dev/null @@ -1,48 +0,0 @@ -.. _event_handling-pong_gtk: - -event_handling example code: pong_gtk.py -======================================== - -[`source code `_] - -:: - - #!/usr/bin/env python - - from __future__ import print_function - - # 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 matplotlib.pyplot as plt - import pipong - - - fig = plt.figure() - ax = fig.add_subplot(111) - canvas = ax.figure.canvas - - - def start_anim(event): - # gobject.idle_add(animation.draw,animation) - gobject.timeout_add(10,animation.draw,animation) - canvas.mpl_disconnect(start_anim.cid) - - animation = pipong.Game(ax) - start_anim.cid = canvas.mpl_connect('draw_event', start_anim) - - - tstart = time.time() - plt.grid() # to ensure proper background restore - plt.show() - print('FPS:' , animation.cnt/(time.time()-tstart)) - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/event_handling/pong_qt.txt b/dev/_sources/examples/event_handling/pong_qt.txt deleted file mode 100644 index b084a7ada58..00000000000 --- a/dev/_sources/examples/event_handling/pong_qt.txt +++ /dev/null @@ -1,52 +0,0 @@ -.. _event_handling-pong_qt: - -event_handling example code: pong_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 - - from __future__ import print_function - - 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 matplotlib.pyplot as plt - import time - import pipong - - class BlitQT(QObject): - def __init__(self): - QObject.__init__(self, None, "app") - - self.ax = plt.subplot(111) - self.animation = pipong.Game(self.ax) - - def timerEvent(self, evt): - self.animation.draw(evt) - - plt.grid() # to ensure proper background restore - - app = BlitQT() - # for profiling - app.tstart = time.time() - app.startTimer(10) - - plt.show() - print('FPS:' , app.animation.cnt/(time.time()-app.tstart)) - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/event_handling/resample.txt b/dev/_sources/examples/event_handling/resample.txt deleted file mode 100644 index 7677c890aaa..00000000000 --- a/dev/_sources/examples/event_handling/resample.txt +++ /dev/null @@ -1,65 +0,0 @@ -.. _event_handling-resample: - -event_handling example code: resample.py -======================================== - -[`source code `_] - -:: - - import numpy as np - import matplotlib.pyplot as plt - from scikits.audiolab import wavread - - # A class that will downsample the data and recompute when zoomed. - class DataDisplayDownsampler(object): - def __init__(self, xdata, ydata): - self.origYData = ydata - self.origXData = xdata - self.numpts = 3000 - self.delta = xdata[-1] - xdata[0] - - def resample(self, xstart, xend): - # Very simple downsampling that takes the points within the range - # and picks every Nth point - mask = (self.origXData > xstart) & (self.origXData < xend) - xdata = self.origXData[mask] - ratio = int(xdata.size / self.numpts) + 1 - xdata = xdata[::ratio] - - ydata = self.origYData[mask] - ydata = ydata[::ratio] - - return xdata, ydata - - def update(self, ax): - # Update the line - lims = ax.viewLim - if np.abs(lims.width - self.delta) > 1e-8: - self.delta = lims.width - xstart, xend = lims.intervalx - self.line.set_data(*self.downsample(xstart, xend)) - ax.figure.canvas.draw_idle() - - # Read data - data = wavread('/usr/share/sounds/purple/receive.wav')[0] - ydata = np.tile(data[:, 0], 100) - xdata = np.arange(ydata.size) - - d = DataDisplayDownsampler(xdata, ydata) - - fig = plt.figure() - ax = fig.add_subplot(1, 1, 1) - - #Hook up the line - xdata, ydata = d.downsample(xdata[0], xdata[-1]) - d.line, = ax.plot(xdata, ydata) - ax.set_autoscale_on(False) # Otherwise, infinite loop - - # Connect for changing the view limits - ax.callbacks.connect('xlim_changed', d.update) - - plt.show() - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/event_handling/test_mouseclicks.txt b/dev/_sources/examples/event_handling/test_mouseclicks.txt deleted file mode 100644 index 29885783357..00000000000 --- a/dev/_sources/examples/event_handling/test_mouseclicks.txt +++ /dev/null @@ -1,47 +0,0 @@ -.. _event_handling-test_mouseclicks: - -event_handling example code: test_mouseclicks.py -================================================ - -[`source code `_] - -:: - - #!/usr/bin/env python - from __future__ import print_function - - import matplotlib - #matplotlib.use("WxAgg") - #matplotlib.use("TkAgg") - #matplotlib.use("GTKAgg") - #matplotlib.use("QtAgg") - #matplotlib.use("Qt4Agg") - #matplotlib.use("CocoaAgg") - #matplotlib.use("MacOSX") - import matplotlib.pyplot as plt - - #print("***** TESTING WITH BACKEND: %s"%matplotlib.get_backend() + " *****") - - - def OnClick(event): - if event.dblclick: - print("DBLCLICK", event) - else: - print("DOWN ", event) - - - def OnRelease(event): - print("UP ", event) - - - fig = plt.gcf() - cid_up = fig.canvas.mpl_connect('button_press_event', OnClick) - cid_down = fig.canvas.mpl_connect('button_release_event', OnRelease) - - plt.gca().text(0.5, 0.5, "Click on the canvas to test mouse events.", - ha="center", va="center") - - plt.show() - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/event_handling/timers.txt b/dev/_sources/examples/event_handling/timers.txt deleted file mode 100644 index 5e9bbc37d69..00000000000 --- a/dev/_sources/examples/event_handling/timers.txt +++ /dev/null @@ -1,41 +0,0 @@ -.. _event_handling-timers: - -event_handling example code: timers.py -====================================== - -[`source code `_] - -:: - - # Simple example of using general timer objects. This is used to update - # the time placed in the title of the figure. - import matplotlib.pyplot as plt - import numpy as np - from datetime import datetime - - def update_title(axes): - axes.set_title(datetime.now()) - axes.figure.canvas.draw() - - fig = plt.figure() - ax = fig.add_subplot(1, 1, 1) - - x = np.linspace(-3, 3) - ax.plot(x, x*x) - - # Create a new timer object. Set the interval 500 milliseconds (1000 is default) - # and tell the timer what function should be called. - timer = fig.canvas.new_timer(interval=100) - timer.add_callback(update_title, ax) - timer.start() - - #Or could start the timer on first figure draw - #def start_timer(evt): - # timer.start() - # fig.canvas.mpl_disconnect(drawid) - #drawid = fig.canvas.mpl_connect('draw_event', start_timer) - - plt.show() - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/event_handling/trifinder_event_demo.txt b/dev/_sources/examples/event_handling/trifinder_event_demo.txt deleted file mode 100644 index 7e534e2ecce..00000000000 --- a/dev/_sources/examples/event_handling/trifinder_event_demo.txt +++ /dev/null @@ -1,71 +0,0 @@ -.. _event_handling-trifinder_event_demo: - -event_handling example code: trifinder_event_demo.py -==================================================== - -[`source code `_] - -:: - - """ - Example showing the use of a TriFinder object. As the mouse is moved over the - triangulation, the triangle under the cursor is highlighted and the index of - the triangle is displayed in the plot title. - """ - import matplotlib.pyplot as plt - from matplotlib.tri import Triangulation - from matplotlib.patches import Polygon - import numpy as np - import math - - - def update_polygon(tri): - if tri == -1: - points = [0, 0, 0] - else: - points = triangulation.triangles[tri] - xs = triangulation.x[points] - ys = triangulation.y[points] - polygon.set_xy(zip(xs, ys)) - - - def motion_notify(event): - if event.inaxes is None: - tri = -1 - else: - tri = trifinder(event.xdata, event.ydata) - update_polygon(tri) - plt.title('In triangle %i' % tri) - event.canvas.draw() - - - # Create a Triangulation. - n_angles = 16 - n_radii = 5 - min_radius = 0.25 - radii = np.linspace(min_radius, 0.95, n_radii) - angles = np.linspace(0, 2*math.pi, n_angles, endpoint=False) - angles = np.repeat(angles[..., np.newaxis], n_radii, axis=1) - angles[:, 1::2] += math.pi / n_angles - x = (radii*np.cos(angles)).flatten() - y = (radii*np.sin(angles)).flatten() - triangulation = Triangulation(x, y) - xmid = x[triangulation.triangles].mean(axis=1) - ymid = y[triangulation.triangles].mean(axis=1) - mask = np.where(xmid*xmid + ymid*ymid < min_radius*min_radius, 1, 0) - triangulation.set_mask(mask) - - # Use the triangulation's default TriFinder object. - trifinder = triangulation.get_trifinder() - - # Setup plot and callbacks. - plt.subplot(111, aspect='equal') - plt.triplot(triangulation, 'bo-') - polygon = Polygon([[0, 0], [0, 0]], facecolor='y') # dummy data for xs,ys - update_polygon(-1) - plt.gca().add_patch(polygon) - plt.gcf().canvas.mpl_connect('motion_notify_event', motion_notify) - plt.show() - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/event_handling/viewlims.txt b/dev/_sources/examples/event_handling/viewlims.txt deleted file mode 100644 index 3adc9e01fc1..00000000000 --- a/dev/_sources/examples/event_handling/viewlims.txt +++ /dev/null @@ -1,91 +0,0 @@ -.. _event_handling-viewlims: - -event_handling example code: viewlims.py -======================================== - -[`source code `_] - -:: - - # Creates two identical panels. Zooming in on the right panel will show - # a rectangle in the first panel, denoting the zoomed region. - import numpy as np - import matplotlib.pyplot as plt - from matplotlib.patches import Rectangle - - # We just subclass Rectangle so that it can be called with an Axes - # instance, causing the rectangle to update its shape to match the - # bounds of the Axes - class UpdatingRect(Rectangle): - def __call__(self, ax): - self.set_bounds(*ax.viewLim.bounds) - ax.figure.canvas.draw_idle() - - # A class that will regenerate a fractal set as we zoom in, so that you - # can actually see the increasing detail. A box in the left panel will show - # the area to which we are zoomed. - class MandlebrotDisplay(object): - def __init__(self, h=500, w=500, niter=50, radius=2., power=2): - self.height = h - self.width = w - self.niter = niter - self.radius = radius - self.power = power - - def __call__(self, xstart, xend, ystart, yend): - self.x = np.linspace(xstart, xend, self.width) - self.y = np.linspace(ystart, yend, self.height).reshape(-1,1) - c = self.x + 1.0j * self.y - threshold_time = np.zeros((self.height, self.width)) - z = np.zeros(threshold_time.shape, dtype=np.complex) - mask = np.ones(threshold_time.shape, dtype=np.bool) - for i in range(self.niter): - z[mask] = z[mask]**self.power + c[mask] - mask = (np.abs(z) < self.radius) - threshold_time += mask - return threshold_time - - def ax_update(self, ax): - ax.set_autoscale_on(False) # Otherwise, infinite loop - - #Get the number of points from the number of pixels in the window - dims = ax.axesPatch.get_window_extent().bounds - self.width = int(dims[2] + 0.5) - self.height = int(dims[2] + 0.5) - - #Get the range for the new area - xstart,ystart,xdelta,ydelta = ax.viewLim.bounds - xend = xstart + xdelta - yend = ystart + ydelta - - # Update the image object with our new data and extent - im = ax.images[-1] - im.set_data(self.__call__(xstart, xend, ystart, yend)) - im.set_extent((xstart, xend, ystart, yend)) - ax.figure.canvas.draw_idle() - - md = MandlebrotDisplay() - Z = md(-2., 0.5, -1.25, 1.25) - - fig = plt.figure() - ax1 = fig.add_subplot(1, 2, 1) - ax1.imshow(Z, origin='lower', extent=(md.x.min(), md.x.max(), md.y.min(), md.y.max())) - - ax2 = fig.add_subplot(1, 2, 2) - ax2.imshow(Z, origin='lower', extent=(md.x.min(), md.x.max(), md.y.min(), md.y.max())) - - rect = UpdatingRect([0, 0], 0, 0, facecolor='None', edgecolor='black') - rect.set_bounds(*ax2.viewLim.bounds) - ax1.add_patch(rect) - - # Connect for changing the view limits - ax2.callbacks.connect('xlim_changed', rect) - ax2.callbacks.connect('ylim_changed', rect) - - ax2.callbacks.connect('xlim_changed', md.ax_update) - ax2.callbacks.connect('ylim_changed', md.ax_update) - - plt.show() - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/event_handling/zoom_window.txt b/dev/_sources/examples/event_handling/zoom_window.txt deleted file mode 100644 index ad6776098bf..00000000000 --- a/dev/_sources/examples/event_handling/zoom_window.txt +++ /dev/null @@ -1,50 +0,0 @@ -.. _event_handling-zoom_window: - -event_handling example code: zoom_window.py -=========================================== - -[`source code `_] - -:: - - """ - This example shows how to connect events in one window, for example, a mouse - press, to another figure window. - - If you click on a point in the first window, the z and y limits of the - second will be adjusted so that the center of the zoom in the second - window will be the x,y coordinates of the clicked point. - - Note the diameter of the circles in the scatter are defined in - points**2, so their size is independent of the zoom - """ - from matplotlib.pyplot import figure, show - import numpy - figsrc = figure() - figzoom = figure() - - axsrc = figsrc.add_subplot(111, xlim=(0,1), ylim=(0,1), autoscale_on=False) - axzoom = figzoom.add_subplot(111, xlim=(0.45,0.55), ylim=(0.4,.6), - autoscale_on=False) - axsrc.set_title('Click to zoom') - axzoom.set_title('zoom window') - x,y,s,c = numpy.random.rand(4,200) - s *= 200 - - - axsrc.scatter(x,y,s,c) - axzoom.scatter(x,y,s,c) - - def onpress(event): - if event.button!=1: return - x,y = event.xdata, event.ydata - axzoom.set_xlim(x-0.1, x+0.1) - axzoom.set_ylim(y-0.1, y+0.1) - figzoom.canvas.draw() - - figsrc.canvas.mpl_connect('button_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/dev/_sources/examples/images_contours_and_fields/image_demo.txt b/dev/_sources/examples/images_contours_and_fields/image_demo.txt deleted file mode 100644 index 8f68d99fe39..00000000000 --- a/dev/_sources/examples/images_contours_and_fields/image_demo.txt +++ /dev/null @@ -1,27 +0,0 @@ -.. _images_contours_and_fields-image_demo: - -images_contours_and_fields example code: image_demo.py -====================================================== - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/images_contours_and_fields/image_demo.py - -:: - - """ - Simple demo of the imshow function. - """ - import matplotlib.pyplot as plt - import matplotlib.cbook as cbook - - image_file = cbook.get_sample_data('ada.png') - image = plt.imread(image_file) - - plt.imshow(image) - plt.axis('off') # clear x- and y-axes - plt.show() - - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/images_contours_and_fields/image_demo_clip_path.txt b/dev/_sources/examples/images_contours_and_fields/image_demo_clip_path.txt deleted file mode 100644 index 13918cd068c..00000000000 --- a/dev/_sources/examples/images_contours_and_fields/image_demo_clip_path.txt +++ /dev/null @@ -1,32 +0,0 @@ -.. _images_contours_and_fields-image_demo_clip_path: - -images_contours_and_fields example code: image_demo_clip_path.py -================================================================ - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/images_contours_and_fields/image_demo_clip_path.py - -:: - - """ - Demo of image that's been clipped by a circular patch. - """ - import matplotlib.pyplot as plt - import matplotlib.patches as patches - import matplotlib.cbook as cbook - - - image_file = cbook.get_sample_data('grace_hopper.png') - image = plt.imread(image_file) - - fig, ax = plt.subplots() - im = ax.imshow(image) - patch = patches.Circle((260, 200), radius=200, transform=ax.transData) - im.set_clip_path(patch) - - plt.axis('off') - plt.show() - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/images_contours_and_fields/index.txt b/dev/_sources/examples/images_contours_and_fields/index.txt deleted file mode 100644 index 875583ceefc..00000000000 --- a/dev/_sources/examples/images_contours_and_fields/index.txt +++ /dev/null @@ -1,19 +0,0 @@ -.. _images_contours_and_fields-examples-index: - -############################################## -images_contours_and_fields Examples -############################################## - -.. htmlonly:: - - :Release: |version| - :Date: |today| - -.. toctree:: - :maxdepth: 1 - - image_demo - image_demo_clip_path - pcolormesh_levels - streamplot_demo_features - streamplot_demo_masking diff --git a/dev/_sources/examples/images_contours_and_fields/pcolormesh_levels.txt b/dev/_sources/examples/images_contours_and_fields/pcolormesh_levels.txt deleted file mode 100644 index 0dd8f0e93f8..00000000000 --- a/dev/_sources/examples/images_contours_and_fields/pcolormesh_levels.txt +++ /dev/null @@ -1,66 +0,0 @@ -.. _images_contours_and_fields-pcolormesh_levels: - -images_contours_and_fields example code: pcolormesh_levels.py -============================================================= - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/images_contours_and_fields/pcolormesh_levels.py - -:: - - """ - Shows how to combine Normalization and Colormap instances to draw - "levels" in pcolor, pcolormesh and imshow type plots in a similar - way to the levels keyword argument to contour/contourf. - - """ - - import matplotlib.pyplot as plt - from matplotlib.colors import BoundaryNorm - from matplotlib.ticker import MaxNLocator - import numpy as np - - - # make these smaller to increase the resolution - dx, dy = 0.05, 0.05 - - # generate 2 2d grids for the x & y bounds - y, x = np.mgrid[slice(1, 5 + dy, dy), - slice(1, 5 + dx, dx)] - - z = np.sin(x) ** 10 + np.cos(10 + y * x) * np.cos(x) - - # x and y are bounds, so z should be the value *inside* those bounds. - # Therefore, remove the last value from the z array. - z = z[:-1, :-1] - levels = MaxNLocator(nbins=15).tick_values(z.min(), z.max()) - - - # pick the desired colormap, sensible levels, and define a normalization - # instance which takes data values and translates those into levels. - cmap = plt.get_cmap('PiYG') - norm = BoundaryNorm(levels, ncolors=cmap.N, clip=True) - - plt.subplot(2, 1, 1) - im = plt.pcolormesh(x, y, z, cmap=cmap, norm=norm) - plt.colorbar() - # set the limits of the plot to the limits of the data - plt.axis([x.min(), x.max(), y.min(), y.max()]) - plt.title('pcolormesh with levels') - - - - plt.subplot(2, 1, 2) - # contours are *point* based plots, so convert our bound into point - # centers - plt.contourf(x[:-1, :-1] + dx / 2., - y[:-1, :-1] + dy / 2., z, levels=levels, - cmap=cmap) - plt.colorbar() - plt.title('contourf with levels') - - - plt.show() - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/images_contours_and_fields/streamplot_demo_features.txt b/dev/_sources/examples/images_contours_and_fields/streamplot_demo_features.txt deleted file mode 100644 index f5ecb76f2d6..00000000000 --- a/dev/_sources/examples/images_contours_and_fields/streamplot_demo_features.txt +++ /dev/null @@ -1,43 +0,0 @@ -.. _images_contours_and_fields-streamplot_demo_features: - -images_contours_and_fields example code: streamplot_demo_features.py -==================================================================== - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/images_contours_and_fields/streamplot_demo_features.py - -:: - - """ - Demo of the `streamplot` function. - - A streamplot, or streamline plot, is used to display 2D vector fields. This - example shows a few features of the stream plot function: - - * Varying the color along a streamline. - * Varying the density of streamlines. - * Varying the line width along a stream line. - """ - import numpy as np - import matplotlib.pyplot as plt - - Y, X = np.mgrid[-3:3:100j, -3:3:100j] - U = -1 - X**2 + Y - V = 1 + X - Y**2 - speed = np.sqrt(U*U + V*V) - - plt.streamplot(X, Y, U, V, color=U, linewidth=2, cmap=plt.cm.autumn) - plt.colorbar() - - f, (ax1, ax2) = plt.subplots(ncols=2) - ax1.streamplot(X, Y, U, V, density=[0.5, 1]) - - lw = 5*speed/speed.max() - ax2.streamplot(X, Y, U, V, density=0.6, color='k', linewidth=lw) - - plt.show() - - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/images_contours_and_fields/streamplot_demo_masking.txt b/dev/_sources/examples/images_contours_and_fields/streamplot_demo_masking.txt deleted file mode 100644 index 020e3ad6271..00000000000 --- a/dev/_sources/examples/images_contours_and_fields/streamplot_demo_masking.txt +++ /dev/null @@ -1,41 +0,0 @@ -.. _images_contours_and_fields-streamplot_demo_masking: - -images_contours_and_fields example code: streamplot_demo_masking.py -=================================================================== - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/images_contours_and_fields/streamplot_demo_masking.py - -:: - - """ - Demo of the streamplot function with masking. - - This example shows how streamlines created by the streamplot function skips - masked regions and NaN values. - """ - import numpy as np - import matplotlib.pyplot as plt - - w = 3 - Y, X = np.mgrid[-w:w:100j, -w:w:100j] - U = -1 - X**2 + Y - V = 1 + X - Y**2 - speed = np.sqrt(U*U + V*V) - - mask = np.zeros(U.shape, dtype=bool) - mask[40:60, 40:60] = 1 - U = np.ma.array(U, mask=mask) - U[:20, :20] = np.nan - - plt.streamplot(X, Y, U, V, color='r') - - plt.imshow(~mask, extent=(-w, w, -w, w), alpha=0.5, - interpolation='nearest', cmap=plt.cm.gray) - - plt.show() - - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/index.txt b/dev/_sources/examples/index.txt deleted file mode 100644 index 81fbeb10367..00000000000 --- a/dev/_sources/examples/index.txt +++ /dev/null @@ -1,60 +0,0 @@ -.. _examples-index: - -#################### -Matplotlib Examples -#################### - -.. htmlonly:: - - :Release: |version| - :Date: |today| - -.. toctree:: - :maxdepth: 2 - - animation/index.rst - - api/index.rst - - axes_grid/index.rst - - color/index.rst - - event_handling/index.rst - - images_contours_and_fields/index.rst - - lines_bars_and_markers/index.rst - - misc/index.rst - - mplot3d/index.rst - - old_animation/index.rst - - pie_and_polar_charts/index.rst - - pylab_examples/index.rst - - shapes_and_collections/index.rst - - showcase/index.rst - - specialty_plots/index.rst - - statistics/index.rst - - subplots_axes_and_figures/index.rst - - tests/index.rst - - text_labels_and_annotations/index.rst - - ticks_and_spines/index.rst - - units/index.rst - - user_interfaces/index.rst - - widgets/index.rst - diff --git a/dev/_sources/examples/lines_bars_and_markers/barh_demo.txt b/dev/_sources/examples/lines_bars_and_markers/barh_demo.txt deleted file mode 100644 index 14f807ced3d..00000000000 --- a/dev/_sources/examples/lines_bars_and_markers/barh_demo.txt +++ /dev/null @@ -1,35 +0,0 @@ -.. _lines_bars_and_markers-barh_demo: - -lines_bars_and_markers example code: barh_demo.py -================================================= - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/lines_bars_and_markers/barh_demo.py - -:: - - """ - Simple demo of a horizontal bar chart. - """ - import matplotlib.pyplot as plt; plt.rcdefaults() - from mpltools import style; style.use('gallery') - import numpy as np - import matplotlib.pyplot as plt - - - # Example data - people = ('Tom', 'Dick', 'Harry', 'Slim', 'Jim') - y_pos = np.arange(len(people)) - performance = 3 + 10 * np.random.rand(len(people)) - error = np.random.rand(len(people)) - - plt.barh(y_pos, performance, xerr=error, align='center', alpha=0.4) - plt.yticks(y_pos, people) - plt.xlabel('Performance') - plt.title('How fast do you want to go today?') - - plt.show() - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/lines_bars_and_markers/fill_demo.txt b/dev/_sources/examples/lines_bars_and_markers/fill_demo.txt deleted file mode 100644 index bfe66e3bf09..00000000000 --- a/dev/_sources/examples/lines_bars_and_markers/fill_demo.txt +++ /dev/null @@ -1,27 +0,0 @@ -.. _lines_bars_and_markers-fill_demo: - -lines_bars_and_markers example code: fill_demo.py -================================================= - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/lines_bars_and_markers/fill_demo.py - -:: - - """ - Simple demo of the fill function. - """ - import numpy as np - import matplotlib.pyplot as plt - - - x = np.linspace(0, 1) - y = np.sin(4 * np.pi * x) * np.exp(-5 * x) - - plt.fill(x, y, 'r') - 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/dev/_sources/examples/lines_bars_and_markers/fill_demo_features.txt b/dev/_sources/examples/lines_bars_and_markers/fill_demo_features.txt deleted file mode 100644 index 6841bd176c9..00000000000 --- a/dev/_sources/examples/lines_bars_and_markers/fill_demo_features.txt +++ /dev/null @@ -1,31 +0,0 @@ -.. _lines_bars_and_markers-fill_demo_features: - -lines_bars_and_markers example code: fill_demo_features.py -========================================================== - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/lines_bars_and_markers/fill_demo_features.py - -:: - - """ - Demo of the fill function with a few features. - - In addition to the basic fill plot, this demo shows a few optional features: - - * Multiple curves with a single command. - * Setting the fill color. - * Setting the opacity (alpha value). - """ - import numpy as np - import matplotlib.pyplot as plt - - x = np.linspace(0, 2 * np.pi, 100) - y1 = np.sin(x) - y2 = np.sin(3 * x) - plt.fill(x, y1, 'b', x, y2, 'r', alpha=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/dev/_sources/examples/lines_bars_and_markers/index.txt b/dev/_sources/examples/lines_bars_and_markers/index.txt deleted file mode 100644 index 7870847d026..00000000000 --- a/dev/_sources/examples/lines_bars_and_markers/index.txt +++ /dev/null @@ -1,18 +0,0 @@ -.. _lines_bars_and_markers-examples-index: - -############################################## -lines_bars_and_markers Examples -############################################## - -.. htmlonly:: - - :Release: |version| - :Date: |today| - -.. toctree:: - :maxdepth: 1 - - barh_demo - fill_demo - fill_demo_features - line_demo_dash_control diff --git a/dev/_sources/examples/lines_bars_and_markers/line_demo_dash_control.txt b/dev/_sources/examples/lines_bars_and_markers/line_demo_dash_control.txt deleted file mode 100644 index ecc8e08aaa2..00000000000 --- a/dev/_sources/examples/lines_bars_and_markers/line_demo_dash_control.txt +++ /dev/null @@ -1,31 +0,0 @@ -.. _lines_bars_and_markers-line_demo_dash_control: - -lines_bars_and_markers example code: line_demo_dash_control.py -============================================================== - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/lines_bars_and_markers/line_demo_dash_control.py - -:: - - """ - Demo of a simple plot with a custom dashed line. - - A Line object's ``set_dashes`` method allows you to specify dashes with - a series of on/off lengths (in points). - """ - import numpy as np - import matplotlib.pyplot as plt - - - x = np.linspace(0, 10) - line, = plt.plot(x, np.sin(x), '--', linewidth=2) - - dashes = [10, 5, 100, 5] # 10 points on, 5 off, 100 on, 5 off - line.set_dashes(dashes) - - plt.show() - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/misc/contour_manual.txt b/dev/_sources/examples/misc/contour_manual.txt deleted file mode 100644 index 66c60aa4039..00000000000 --- a/dev/_sources/examples/misc/contour_manual.txt +++ /dev/null @@ -1,61 +0,0 @@ -.. _misc-contour_manual: - -misc example code: contour_manual.py -==================================== - -[`source code `_] - -:: - - """ - Example of displaying your own contour lines and polygons using ContourSet. - """ - import matplotlib.pyplot as plt - from matplotlib.contour import ContourSet - import matplotlib.cm as cm - - # Contour lines for each level are a list/tuple of polygons. - lines0 = [ [[0,0],[0,4]] ] - lines1 = [ [[2,0],[1,2],[1,3]] ] - lines2 = [ [[3,0],[3,2]], [[3,3],[3,4]] ] # Note two lines. - - # Filled contours between two levels are also a list/tuple of polygons. - # Points can be ordered clockwise or anticlockwise. - filled01 = [ [[0,0],[0,4],[1,3],[1,2],[2,0]] ] - filled12 = [ [[2,0],[3,0],[3,2],[1,3],[1,2]], # Note two polygons. - [[1,4],[3,4],[3,3]] ] - - - plt.figure() - - # Filled contours using filled=True. - cs = ContourSet(plt.gca(), [0,1,2], [filled01, filled12], filled=True, cmap=cm.bone) - cbar = plt.colorbar(cs) - - # Contour lines (non-filled). - lines = ContourSet(plt.gca(), [0,1,2], [lines0, lines1, lines2], cmap=cm.cool, - linewidths=3) - cbar.add_lines(lines) - - plt.axis([-0.5, 3.5, -0.5, 4.5]) - plt.title('User-specified contours') - - - - # Multiple filled contour lines can be specified in a single list of polygon - # vertices along with a list of vertex kinds (code types) as described in the - # Path class. This is particularly useful for polygons with holes. - # Here a code type of 1 is a MOVETO, and 2 is a LINETO. - - plt.figure() - filled01 = [ [[0,0],[3,0],[3,3],[0,3],[1,1],[1,2],[2,2],[2,1]] ] - kinds01 = [ [1,2,2,2,1,2,2,2] ] - cs = ContourSet(plt.gca(), [0,1], [filled01], [kinds01], filled=True) - cbar = plt.colorbar(cs) - - plt.axis([-0.5, 3.5, -0.5, 3.5]) - plt.title('User specified filled contours with holes') - - plt.show() - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/misc/developer_commit_history.txt b/dev/_sources/examples/misc/developer_commit_history.txt deleted file mode 100644 index 732a9ecf609..00000000000 --- a/dev/_sources/examples/misc/developer_commit_history.txt +++ /dev/null @@ -1,57 +0,0 @@ -.. _misc-developer_commit_history: - -misc example code: developer_commit_history.py -============================================== - -[`source code `_] - -:: - - from __future__ import print_function - """ - report how many days it has been since each developer committed. You - must do an - - svn log > log.txt - - and place the output next to this file before running - - """ - import os, datetime - - import matplotlib.cbook as cbook - - todate = cbook.todate('%Y-%m-%d') - today = datetime.date.today() - if not os.path.exists('log.txt'): - print('You must place the "svn log" output into a file "log.txt"') - raise SystemExit - - parse = False - - lastd = dict() - for line in file('log.txt'): - if line.startswith('--------'): - parse = True - continue - - if parse: - parts = [part.strip() for part in line.split('|')] - developer = parts[1] - dateparts = parts[2].split(' ') - ymd = todate(dateparts[0]) - - - if developer not in lastd: - lastd[developer] = ymd - - parse = False - - dsu = [((today - lastdate).days, developer) for developer, lastdate in lastd.items()] - - dsu.sort() - for timedelta, developer in dsu: - print('%s : %d'%(developer, timedelta)) - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/misc/font_indexing.txt b/dev/_sources/examples/misc/font_indexing.txt deleted file mode 100644 index af73f08c18d..00000000000 --- a/dev/_sources/examples/misc/font_indexing.txt +++ /dev/null @@ -1,54 +0,0 @@ -.. _misc-font_indexing: - -misc example code: font_indexing.py -=================================== - -[`source code `_] - -:: - - """ - A little example that shows how the various indexing into the font - tables relate to one another. Mainly for mpl developers.... - - """ - from __future__ import print_function - import matplotlib - from matplotlib.ft2font import FT2Font, KERNING_DEFAULT, KERNING_UNFITTED, KERNING_UNSCALED - - - - #fname = '/usr/share/fonts/sfd/FreeSans.ttf' - fname = matplotlib.get_data_path() + '/fonts/ttf/Vera.ttf' - font = FT2Font(fname) - font.set_charmap(0) - - codes = font.get_charmap().items() - #dsu = [(ccode, glyphind) for ccode, glyphind in codes] - #dsu.sort() - #for ccode, glyphind in dsu: - # try: name = font.get_glyph_name(glyphind) - # except RuntimeError: pass - # else: print '% 4d % 4d %s %s'%(glyphind, ccode, hex(int(ccode)), name) - - - - # make a charname to charcode and glyphind dictionary - coded = {} - glyphd = {} - for ccode, glyphind in codes: - name = font.get_glyph_name(glyphind) - coded[name] = ccode - glyphd[name] = glyphind - - code = coded['A'] - glyph = font.load_char(code) - #print glyph.bbox - print(glyphd['A'], glyphd['V'], coded['A'], coded['V']) - print('AV', font.get_kerning(glyphd['A'], glyphd['V'], KERNING_DEFAULT)) - print('AV', font.get_kerning(glyphd['A'], glyphd['V'], KERNING_UNFITTED)) - print('AV', font.get_kerning(glyphd['A'], glyphd['V'], KERNING_UNSCALED)) - print('AV', font.get_kerning(glyphd['A'], glyphd['T'], KERNING_UNSCALED)) - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/misc/ftface_props.txt b/dev/_sources/examples/misc/ftface_props.txt deleted file mode 100644 index e9a3c2dba59..00000000000 --- a/dev/_sources/examples/misc/ftface_props.txt +++ /dev/null @@ -1,90 +0,0 @@ -.. _misc-ftface_props: - -misc example code: ftface_props.py -================================== - -[`source code `_] - -:: - - #!/usr/bin/env python - - from __future__ import print_function - """ - This is a demo script to show you how to use all the properties of an - FT2Font object. These describe global font properties. For - individual character metrices, use the Glyp object, as returned by - load_char - """ - import matplotlib - from matplotlib.ft2font import FT2Font - - #fname = '/usr/local/share/matplotlib/VeraIt.ttf' - fname = matplotlib.get_data_path() + '/fonts/ttf/VeraIt.ttf' - #fname = '/usr/local/share/matplotlib/cmr10.ttf' - - font = FT2Font(fname) - - # these constants are used to access the style_flags and face_flags - FT_FACE_FLAG_SCALABLE = 1 << 0 - FT_FACE_FLAG_FIXED_SIZES = 1 << 1 - FT_FACE_FLAG_FIXED_WIDTH = 1 << 2 - FT_FACE_FLAG_SFNT = 1 << 3 - FT_FACE_FLAG_HORIZONTAL = 1 << 4 - FT_FACE_FLAG_VERTICAL = 1 << 5 - FT_FACE_FLAG_KERNING = 1 << 6 - FT_FACE_FLAG_FAST_GLYPHS = 1 << 7 - FT_FACE_FLAG_MULTIPLE_MASTERS = 1 << 8 - FT_FACE_FLAG_GLYPH_NAMES = 1 << 9 - FT_FACE_FLAG_EXTERNAL_STREAM = 1 << 10 - FT_STYLE_FLAG_ITALIC = 1 << 0 - FT_STYLE_FLAG_BOLD = 1 << 1 - - print('Num faces :', font.num_faces) # number of faces in file - print('Num glyphs :', font.num_glyphs) # number of glyphs in the face - print('Family name :', font.family_name) # face family name - print('Syle name :', font.style_name) # face syle name - print('PS name :', font.postscript_name) # the postscript name - print('Num fixed :', font.num_fixed_sizes) # number of embedded bitmap in face - - # the following are only available if face.scalable - if font.scalable: - # the face global bounding box (xmin, ymin, xmax, ymax) - print('Bbox :', font.bbox) - # number of font units covered by the EM - print('EM :', font.units_per_EM) - # the ascender in 26.6 units - print('Ascender :', font.ascender) - # the descender in 26.6 units - print('Descender :', font.descender) - # the height in 26.6 units - print('Height :', font.height) - # maximum horizontal cursor advance - print('Max adv width :', font.max_advance_width) - # same for vertical layout - print('Max adv height :', font.max_advance_height) - # vertical position of the underline bar - print('Underline pos :', font.underline_position) - # vertical thickness of the underline - print('Underline thickness :', font.underline_thickness) - - print('Italics :', font.style_flags & FT_STYLE_FLAG_ITALIC != 0) - print('Bold :', font.style_flags & FT_STYLE_FLAG_BOLD != 0) - print('Scalable :', font.style_flags & FT_FACE_FLAG_SCALABLE != 0) - print('Fixed sizes :', font.style_flags & FT_FACE_FLAG_FIXED_SIZES != 0) - print('Fixed width :', font.style_flags & FT_FACE_FLAG_FIXED_WIDTH != 0) - print('SFNT :', font.style_flags & FT_FACE_FLAG_SFNT != 0) - print('Horizontal :', font.style_flags & FT_FACE_FLAG_HORIZONTAL != 0) - print('Vertical :', font.style_flags & FT_FACE_FLAG_VERTICAL != 0) - print('Kerning :', font.style_flags & FT_FACE_FLAG_KERNING != 0) - print('Fast glyphs :', font.style_flags & FT_FACE_FLAG_FAST_GLYPHS != 0) - print('Mult. masters :', font.style_flags & FT_FACE_FLAG_MULTIPLE_MASTERS != 0) - print('Glyph names :', font.style_flags & FT_FACE_FLAG_GLYPH_NAMES != 0) - - print(dir(font)) - - cmap = font.get_charmap() - print(font.get_kerning) - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/misc/image_thumbnail.txt b/dev/_sources/examples/misc/image_thumbnail.txt deleted file mode 100644 index 10394655c8d..00000000000 --- a/dev/_sources/examples/misc/image_thumbnail.txt +++ /dev/null @@ -1,42 +0,0 @@ -.. _misc-image_thumbnail: - -misc example code: image_thumbnail.py -===================================== - -[`source code `_] - -:: - - """ - You can use matplotlib to generate thumbnails from existing images. - matplotlib natively supports PNG files on the input side, and other - image types transparently if your have PIL installed - """ - - from __future__ import print_function - # build thumbnails of all images in a directory - import sys, os, glob - import matplotlib.image as image - - - if len(sys.argv)!=2: - print('Usage: python %s IMAGEDIR'%__file__) - raise SystemExit - indir = sys.argv[1] - if not os.path.isdir(indir): - print('Could not find input directory "%s"'%indir) - raise SystemExit - - outdir = 'thumbs' - if not os.path.exists(outdir): - os.makedirs(outdir) - - for fname in glob.glob(os.path.join(indir, '*.png')): - basedir, basename = os.path.split(fname) - outfile = os.path.join(outdir, basename) - fig = image.thumbnail(fname, outfile, scale=0.15) - print('saved thumbnail of %s to %s'%(fname, outfile)) - - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/misc/index.txt b/dev/_sources/examples/misc/index.txt deleted file mode 100644 index 7a3ec2566e9..00000000000 --- a/dev/_sources/examples/misc/index.txt +++ /dev/null @@ -1,29 +0,0 @@ -.. _misc-examples-index: - -############################################## -misc Examples -############################################## - -.. htmlonly:: - - :Release: |version| - :Date: |today| - -.. toctree:: - :maxdepth: 1 - - contour_manual - developer_commit_history - font_indexing - ftface_props - image_thumbnail - longshort - multiprocess - rasterization_demo - rc_traits - rec_groupby_demo - rec_join_demo - sample_data_demo - svg_filter_line - svg_filter_pie - tight_bbox_test diff --git a/dev/_sources/examples/misc/longshort.txt b/dev/_sources/examples/misc/longshort.txt deleted file mode 100644 index 19b3ee86b09..00000000000 --- a/dev/_sources/examples/misc/longshort.txt +++ /dev/null @@ -1,59 +0,0 @@ -.. _misc-longshort: - -misc example code: longshort.py -=============================== - -[`source code `_] - -:: - - """ - Illustrate the rec array utility funcitons by loading prices from a - csv file, computing the daily returns, appending the results to the - record arrays, joining on date - """ - import urllib - import numpy as np - import matplotlib.pyplot as plt - import matplotlib.mlab as mlab - - # grab the price data off yahoo - u1 = urllib.urlretrieve('http://ichart.finance.yahoo.com/table.csv?s=AAPL&d=9&e=14&f=2008&g=d&a=8&b=7&c=1984&ignore=.csv') - u2 = urllib.urlretrieve('http://ichart.finance.yahoo.com/table.csv?s=GOOG&d=9&e=14&f=2008&g=d&a=8&b=7&c=1984&ignore=.csv') - - # load the CSV files into record arrays - r1 = mlab.csv2rec(file(u1[0])) - r2 = mlab.csv2rec(file(u2[0])) - - # compute the daily returns and add these columns to the arrays - gains1 = np.zeros_like(r1.adj_close) - gains2 = np.zeros_like(r2.adj_close) - gains1[1:] = np.diff(r1.adj_close)/r1.adj_close[:-1] - gains2[1:] = np.diff(r2.adj_close)/r2.adj_close[:-1] - r1 = mlab.rec_append_fields(r1, 'gains', gains1) - r2 = mlab.rec_append_fields(r2, 'gains', gains2) - - # now join them by date; the default postfixes are 1 and 2. The - # default jointype is inner so it will do an intersection of dates and - # drop the dates in AAPL which occurred before GOOG started trading in - # 2004. r1 and r2 are reverse ordered by date since Yahoo returns - # most recent first in the CSV files, but rec_join will sort by key so - # r below will be properly sorted - r = mlab.rec_join('date', r1, r2) - - - # long appl, short goog - g = r.gains1-r.gains2 - tr = (1+g).cumprod() # the total return - - # plot the return - fig = plt.figure() - ax = fig.add_subplot(111) - ax.plot(r.date, tr) - ax.set_title('total return: long APPL, short GOOG') - ax.grid() - 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/dev/_sources/examples/misc/multiprocess.txt b/dev/_sources/examples/misc/multiprocess.txt deleted file mode 100644 index 68a95f3e9c5..00000000000 --- a/dev/_sources/examples/misc/multiprocess.txt +++ /dev/null @@ -1,103 +0,0 @@ -.. _misc-multiprocess: - -misc example code: multiprocess.py -================================== - -[`source code `_] - -:: - - #Demo of using multiprocessing for generating data in one process and plotting - #in another. - #Written by Robert Cimrman - #Requires >= Python 2.6 for the multiprocessing module or having the - #standalone processing module installed - - from __future__ import print_function - import time - try: - from multiprocessing import Process, Pipe - except ImportError: - from processing import Process, Pipe - import numpy as np - - import matplotlib - matplotlib.use('GtkAgg') - import matplotlib.pyplot as plt - import gobject - - class ProcessPlotter(object): - - def __init__(self): - self.x = [] - self.y = [] - - def terminate(self): - plt.close('all') - - def poll_draw(self): - - def call_back(): - while 1: - if not self.pipe.poll(): - break - - command = self.pipe.recv() - - if command is None: - self.terminate() - return False - - else: - self.x.append(command[0]) - self.y.append(command[1]) - self.ax.plot(self.x, self.y, 'ro') - - self.fig.canvas.draw() - return True - - return call_back - - def __call__(self, pipe): - print('starting plotter...') - - self.pipe = pipe - self.fig = plt.figure() - - self.ax = self.fig.add_subplot(111) - self.gid = gobject.timeout_add(1000, self.poll_draw()) - - print('...done') - plt.show() - - - class NBPlot(object): - def __init__(self): - self.plot_pipe, plotter_pipe = Pipe() - self.plotter = ProcessPlotter() - self.plot_process = Process(target = self.plotter, - args = (plotter_pipe,)) - self.plot_process.daemon = True - self.plot_process.start() - - def plot(self, finished=False): - send = self.plot_pipe.send - if finished: - send(None) - else: - data = np.random.random(2) - send(data) - - def main(): - pl = NBPlot() - for ii in range(10): - pl.plot() - time.sleep(0.5) - raw_input('press Enter...') - pl.plot(finished=True) - - if __name__ == '__main__': - main() - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/misc/rasterization_demo.txt b/dev/_sources/examples/misc/rasterization_demo.txt deleted file mode 100644 index ae505978c21..00000000000 --- a/dev/_sources/examples/misc/rasterization_demo.txt +++ /dev/null @@ -1,65 +0,0 @@ -.. _misc-rasterization_demo: - -misc example code: rasterization_demo.py -======================================== - -[`source code `_] - -:: - - import numpy as np - import matplotlib.pyplot as plt - - d = np.arange(100).reshape(10, 10) - x, y = np.meshgrid(np.arange(11), np.arange(11)) - - theta = 0.25*np.pi - xx = x*np.cos(theta) - y*np.sin(theta) - yy = x*np.sin(theta) + y*np.cos(theta) - - ax1 = plt.subplot(221) - ax1.set_aspect(1) - ax1.pcolormesh(xx, yy, d) - ax1.set_title("No Rasterization") - - ax2 = plt.subplot(222) - ax2.set_aspect(1) - ax2.set_title("Rasterization") - - m = ax2.pcolormesh(xx, yy, d) - m.set_rasterized(True) - - ax3 = plt.subplot(223) - ax3.set_aspect(1) - ax3.pcolormesh(xx, yy, d) - ax3.text(0.5, 0.5, "Text", alpha=0.2, - va="center", ha="center", size=50, transform=ax3.transAxes) - - ax3.set_title("No Rasterization") - - - ax4 = plt.subplot(224) - ax4.set_aspect(1) - m = ax4.pcolormesh(xx, yy, d) - m.set_zorder(-20) - - ax4.text(0.5, 0.5, "Text", alpha=0.2, - zorder=-15, - va="center", ha="center", size=50, transform=ax4.transAxes) - - ax4.set_rasterization_zorder(-10) - - ax4.set_title("Rasterization z$<-10$") - - - # ax2.title.set_rasterized(True) # should display a warning - - plt.savefig("test_rasterization.pdf", dpi=150) - plt.savefig("test_rasterization.eps", dpi=150) - - if not plt.rcParams["text.usetex"]: - plt.savefig("test_rasterization.svg", dpi=150) - # svg backend currently ignores the dpi - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/misc/rc_traits.txt b/dev/_sources/examples/misc/rc_traits.txt deleted file mode 100644 index c8e583e9581..00000000000 --- a/dev/_sources/examples/misc/rc_traits.txt +++ /dev/null @@ -1,209 +0,0 @@ -.. _misc-rc_traits: - -misc example code: rc_traits.py -=============================== - -[`source code `_] - -:: - - # Here is some example code showing how to define some representative - # rc properties and construct a matplotlib artist using traits. - # matplotlib does not ship with enthought.traits, so you will need to - # install it separately. - - from __future__ import print_function - - import sys, os, re - import traits.api as traits - from matplotlib.cbook import is_string_like - from matplotlib.artist import Artist - - doprint = True - flexible_true_trait = traits.Trait( - True, - { 'true': True, 't': True, 'yes': True, 'y': True, 'on': True, True: True, - 'false': False, 'f': False, 'no': False, 'n': False, 'off': False, False: False - } ) - flexible_false_trait = traits.Trait( False, flexible_true_trait ) - - colors = { - 'c' : '#00bfbf', - 'b' : '#0000ff', - 'g' : '#008000', - 'k' : '#000000', - 'm' : '#bf00bf', - 'r' : '#ff0000', - 'w' : '#ffffff', - 'y' : '#bfbf00', - 'gold' : '#FFD700', - 'peachpuff' : '#FFDAB9', - 'navajowhite' : '#FFDEAD', - } - - def hex2color(s): - "Convert hex string (like html uses, eg, #efefef) to a r,g,b tuple" - return tuple([int(n, 16)/255.0 for n in (s[1:3], s[3:5], s[5:7])]) - - class RGBA(traits.HasTraits): - # r,g,b,a in the range 0-1 with default color 0,0,0,1 (black) - r = traits.Range(0., 1., 0.) - g = traits.Range(0., 1., 0.) - b = traits.Range(0., 1., 0.) - a = traits.Range(0., 1., 1.) - def __init__(self, r=0., g=0., b=0., a=1.): - self.r = r - self.g = g - self.b = b - self.a = a - def __repr__(self): - return 'r,g,b,a = (%1.2f, %1.2f, %1.2f, %1.2f)'%\ - (self.r, self.g, self.b, self.a) - - def tuple_to_rgba(ob, name, val): - tup = [float(x) for x in val] - if len(tup)==3: - r,g,b = tup - return RGBA(r,g,b) - elif len(tup)==4: - r,g,b,a = tup - return RGBA(r,g,b,a) - else: - raise ValueError - tuple_to_rgba.info = 'a RGB or RGBA tuple of floats' - - def hex_to_rgba(ob, name, val): - rgx = re.compile('^#[0-9A-Fa-f]{6}$') - - if not is_string_like(val): - raise TypeError - if rgx.match(val) is None: - raise ValueError - r,g,b = hex2color(val) - return RGBA(r,g,b,1.0) - hex_to_rgba.info = 'a hex color string' - - def colorname_to_rgba(ob, name, val): - hex = colors[val.lower()] - r,g,b = hex2color(hex) - return RGBA(r,g,b,1.0) - colorname_to_rgba.info = 'a named color' - - def float_to_rgba(ob, name, val): - val = float(val) - return RGBA(val, val, val, 1.) - float_to_rgba.info = 'a grayscale intensity' - - - - Color = traits.Trait(RGBA(), float_to_rgba, colorname_to_rgba, RGBA, - hex_to_rgba, tuple_to_rgba) - - def file_exists(ob, name, val): - fh = file(val, 'r') - return val - - def path_exists(ob, name, val): - os.path.exists(val) - linestyles = ('-', '--', '-.', ':', 'steps', 'None') - TICKLEFT, TICKRIGHT, TICKUP, TICKDOWN = range(4) - linemarkers = (None, '.', ',', 'o', '^', 'v', '<', '>', 's', - '+', 'x', 'd', 'D', '|', '_', 'h', 'H', - 'p', '1', '2', '3', '4', - TICKLEFT, - TICKRIGHT, - TICKUP, - TICKDOWN, - 'None' - ) - - class LineRC(traits.HasTraits): - linewidth = traits.Float(0.5) - linestyle = traits.Trait(*linestyles) - color = Color - marker = traits.Trait(*linemarkers) - markerfacecolor = Color - markeredgecolor = Color - markeredgewidth = traits.Float(0.5) - markersize = traits.Float(6) - antialiased = flexible_true_trait - data_clipping = flexible_false_trait - - class PatchRC(traits.HasTraits): - linewidth = traits.Float(1.0) - facecolor = Color - edgecolor = Color - antialiased = flexible_true_trait - - timezones = 'UTC', 'US/Central', 'ES/Eastern' # fixme: and many more - backends = ('GTKAgg', 'Cairo', 'FltkAgg', 'GDK', 'GTK', 'Agg', - 'GTKCairo', 'PS', 'SVG', 'Template', 'TkAgg', - 'WX') - - class RC(traits.HasTraits): - backend = traits.Trait(*backends) - interactive = flexible_false_trait - toolbar = traits.Trait('toolbar2', 'classic', None) - timezone = traits.Trait(*timezones) - lines = traits.Trait(LineRC()) - patch = traits.Trait(PatchRC()) - - rc = RC() - rc.lines.color = 'r' - if doprint: - print('RC') - rc.print_traits() - print('RC lines') - rc.lines.print_traits() - print('RC patches') - rc.patch.print_traits() - - - class Patch(Artist, traits.HasTraits): - linewidth = traits.Float(0.5) - facecolor = Color - fc = facecolor - edgecolor = Color - fill = flexible_true_trait - def __init__(self, - edgecolor=None, - facecolor=None, - linewidth=None, - antialiased = None, - fill=1, - **kwargs - ): - Artist.__init__(self) - - if edgecolor is None: edgecolor = rc.patch.edgecolor - if facecolor is None: facecolor = rc.patch.facecolor - if linewidth is None: linewidth = rc.patch.linewidth - if antialiased is None: antialiased = rc.patch.antialiased - - self.edgecolor = edgecolor - self.facecolor = facecolor - self.linewidth = linewidth - self.antialiased = antialiased - self.fill = fill - - - p = Patch() - p.facecolor = '#bfbf00' - p.edgecolor = 'gold' - p.facecolor = (1,.5,.5,.25) - p.facecolor = 0.25 - p.fill = 'f' - print('p.facecolor', type(p.facecolor), p.facecolor) - print('p.fill', type(p.fill), p.fill) - if p.fill_: print('fill') - else: print('no fill') - if doprint: - print() - print('Patch') - p.print_traits() - - - - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/misc/rec_groupby_demo.txt b/dev/_sources/examples/misc/rec_groupby_demo.txt deleted file mode 100644 index 692eb1f87a1..00000000000 --- a/dev/_sources/examples/misc/rec_groupby_demo.txt +++ /dev/null @@ -1,75 +0,0 @@ -.. _misc-rec_groupby_demo: - -misc example code: rec_groupby_demo.py -====================================== - -[`source code `_] - -:: - - from __future__ import print_function - import numpy as np - import matplotlib.mlab as mlab - import matplotlib.cbook as cbook - - datafile = cbook.get_sample_data('aapl.csv', asfileobj=False) - print('loading', datafile) - r = mlab.csv2rec(datafile) - r.sort() - - def daily_return(prices): - 'an array of daily returns from price array' - g = np.zeros_like(prices) - g[1:] = (prices[1:]-prices[:-1])/prices[:-1] - return g - - def volume_code(volume): - 'code the continuous volume data categorically' - ind = np.searchsorted([1e5,1e6, 5e6,10e6, 1e7], volume) - return ind - - # a list of (dtype_name, summary_function, output_dtype_name). - # rec_summarize will call on each function on the indicated recarray - # attribute, and the result assigned to output name in the return - # record array. - summaryfuncs = ( - ('date', lambda x: [thisdate.year for thisdate in x], 'years'), - ('date', lambda x: [thisdate.month for thisdate in x], 'months'), - ('date', lambda x: [thisdate.weekday() for thisdate in x], 'weekday'), - ('adj_close', daily_return, 'dreturn'), - ('volume', volume_code, 'volcode'), - ) - - rsum = mlab.rec_summarize(r, summaryfuncs) - - # stats is a list of (dtype_name, function, output_dtype_name). - # rec_groupby will summarize the attribute identified by the - # dtype_name over the groups in the groupby list, and assign the - # result to the output_dtype_name - stats = ( - ('dreturn', len, 'rcnt'), - ('dreturn', np.mean, 'rmean'), - ('dreturn', np.median, 'rmedian'), - ('dreturn', np.std, 'rsigma'), - ) - - # you can summarize over a single variable, like years or months - print('summary by years') - ry = mlab.rec_groupby(rsum, ('years',), stats) - print(mlab. rec2txt(ry)) - - print('summary by months') - rm = mlab.rec_groupby(rsum, ('months',), stats) - print(mlab.rec2txt(rm)) - - # or over multiple variables like years and months - print('summary by year and month') - rym = mlab.rec_groupby(rsum, ('years','months'), stats) - print(mlab.rec2txt(rym)) - - print('summary by volume') - rv = mlab.rec_groupby(rsum, ('volcode',), stats) - print(mlab.rec2txt(rv)) - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/misc/rec_join_demo.txt b/dev/_sources/examples/misc/rec_join_demo.txt deleted file mode 100644 index 34f2c008d21..00000000000 --- a/dev/_sources/examples/misc/rec_join_demo.txt +++ /dev/null @@ -1,43 +0,0 @@ -.. _misc-rec_join_demo: - -misc example code: rec_join_demo.py -=================================== - -[`source code `_] - -:: - - from __future__ import print_function - import numpy as np - import matplotlib.mlab as mlab - import matplotlib.cbook as cbook - - datafile = cbook.get_sample_data('aapl.csv', asfileobj=False) - print('loading', datafile) - r = mlab.csv2rec(datafile) - - r.sort() - r1 = r[-10:] - - # Create a new array - r2 = np.empty(12, dtype=[('date', '|O4'), ('high', np.float), - ('marker', np.float)]) - r2 = r2.view(np.recarray) - r2.date = r.date[-17:-5] - r2.high = r.high[-17:-5] - r2.marker = np.arange(12) - - print("r1:") - print(mlab.rec2txt(r1)) - print("r2:") - print(mlab.rec2txt(r2)) - - defaults = {'marker':-1, 'close':np.NaN, 'low':-4444.} - - for s in ('inner', 'outer', 'leftouter'): - rec = mlab.rec_join(['date', 'high'], r1, r2, - jointype=s, defaults=defaults) - print("\n%sjoin :\n%s" % (s, mlab.rec2txt(rec))) - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/misc/sample_data_demo.txt b/dev/_sources/examples/misc/sample_data_demo.txt deleted file mode 100644 index 66ab7c5965b..00000000000 --- a/dev/_sources/examples/misc/sample_data_demo.txt +++ /dev/null @@ -1,25 +0,0 @@ -.. _misc-sample_data_demo: - -misc example code: sample_data_demo.py -====================================== - -[`source code `_] - -:: - - """ - Grab mpl data from the ~/.matplotlib/sample_data cache if it exists, else - fetch it from github and cache it - """ - from __future__ import print_function - import matplotlib.cbook as cbook - import matplotlib.pyplot as plt - fname = cbook.get_sample_data('ada.png', asfileobj=False) - - print('fname', fname) - im = plt.imread(fname) - plt.imshow(im) - plt.show() - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/misc/svg_filter_line.txt b/dev/_sources/examples/misc/svg_filter_line.txt deleted file mode 100644 index b17d5cc14c6..00000000000 --- a/dev/_sources/examples/misc/svg_filter_line.txt +++ /dev/null @@ -1,98 +0,0 @@ -.. _misc-svg_filter_line: - -misc example code: svg_filter_line.py -===================================== - -[`source code `_] - -:: - - """ - Demonstrate SVG filtering effects which might be used with mpl. - - Note that the filtering effects are only effective if your svg rederer - support it. - """ - - from __future__ import print_function - import matplotlib - - matplotlib.use("Svg") - - import matplotlib.pyplot as plt - import matplotlib.transforms as mtransforms - - fig1 = plt.figure() - ax = fig1.add_axes([0.1, 0.1, 0.8, 0.8]) - - # draw lines - l1, = ax.plot([0.1, 0.5, 0.9], [0.1, 0.9, 0.5], "bo-", - mec="b", lw=5, ms=10, label="Line 1") - l2, = ax.plot([0.1, 0.5, 0.9], [0.5, 0.2, 0.7], "rs-", - mec="r", lw=5, ms=10, color="r", label="Line 2") - - - for l in [l1, l2]: - - # draw shadows with same lines with slight offset and gray colors. - - xx = l.get_xdata() - yy = l.get_ydata() - shadow, = ax.plot(xx, yy) - shadow.update_from(l) - - # adjust color - shadow.set_color("0.2") - # adjust zorder of the shadow lines so that it is drawn below the - # original lines - shadow.set_zorder(l.get_zorder()-0.5) - - # offset transform - ot = mtransforms.offset_copy(l.get_transform(), fig1, - x=4.0, y=-6.0, units='points') - - shadow.set_transform(ot) - - # set the id for a later use - shadow.set_gid(l.get_label()+"_shadow") - - - ax.set_xlim(0., 1.) - ax.set_ylim(0., 1.) - - # save the figure as a string in the svg format. - from StringIO import StringIO - f = StringIO() - plt.savefig(f, format="svg") - - - import xml.etree.cElementTree as ET - - # filter definition for a gaussian blur - filter_def = """ - - - - - - """ - - - # read in the saved svg - tree, xmlid = ET.XMLID(f.getvalue()) - - # insert the filter definition in the svg dom tree. - tree.insert(0, ET.XML(filter_def)) - - for l in [l1, l2]: - # pick up the svg element with given id - shadow = xmlid[l.get_label()+"_shadow"] - # apply shdow filter - shadow.set("filter",'url(#dropshadow)') - - fn = "svg_filter_line.svg" - print("Saving '%s'" % fn) - ET.ElementTree(tree).write(fn) - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/misc/svg_filter_pie.txt b/dev/_sources/examples/misc/svg_filter_pie.txt deleted file mode 100644 index 4faebea0023..00000000000 --- a/dev/_sources/examples/misc/svg_filter_pie.txt +++ /dev/null @@ -1,107 +0,0 @@ -.. _misc-svg_filter_pie: - -misc example code: svg_filter_pie.py -==================================== - -[`source code `_] - -:: - - """ - Demonstrate SVG filtering effects which might be used with mpl. - The pie chart drawing code is borrowed from pie_demo.py - - Note that the filtering effects are only effective if your svg rederer - support it. - """ - - - import matplotlib - matplotlib.use("Svg") - - import matplotlib.pyplot as plt - from matplotlib.patches import Shadow - - # make a square figure and axes - fig1 = plt.figure(1, figsize=(6,6)) - ax = fig1.add_axes([0.1, 0.1, 0.8, 0.8]) - - labels = 'Frogs', 'Hogs', 'Dogs', 'Logs' - fracs = [15,30,45, 10] - - explode=(0, 0.05, 0, 0) - - # We want to draw the shadow for each pie but we will not use "shadow" - # option as it does'n save the references to the shadow patches. - pies = ax.pie(fracs, explode=explode, labels=labels, autopct='%1.1f%%') - - for w in pies[0]: - # set the id with the label. - w.set_gid(w.get_label()) - - # we don't want to draw the edge of the pie - w.set_ec("none") - - for w in pies[0]: - # create shadow patch - s = Shadow(w, -0.01, -0.01) - s.set_gid(w.get_gid()+"_shadow") - s.set_zorder(w.get_zorder() - 0.1) - ax.add_patch(s) - - - # save - from StringIO import StringIO - f = StringIO() - plt.savefig(f, format="svg") - - import xml.etree.cElementTree as ET - - - # filter definition for shadow using a gaussian blur - # and lighteneing effect. - # The lightnening filter is copied from http://www.w3.org/TR/SVG/filters.html - - # I tested it with Inkscape and Firefox3. "Gaussian blur" is supported - # in both, but the lightnening effect only in the inkscape. Also note - # that, inkscape's exporting also may not support it. - - filter_def = """ - - - - - - - - - - - - - - - - """ - - - tree, xmlid = ET.XMLID(f.getvalue()) - - # insert the filter definition in the svg dom tree. - tree.insert(0, ET.XML(filter_def)) - - for i, pie_name in enumerate(labels): - pie = xmlid[pie_name] - pie.set("filter", 'url(#MyFilter)') - - shadow = xmlid[pie_name + "_shadow"] - shadow.set("filter",'url(#dropshadow)') - - fn = "svg_filter_pie.svg" - print "Saving '%s'" % fn - ET.ElementTree(tree).write(fn) - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/misc/tight_bbox_test.txt b/dev/_sources/examples/misc/tight_bbox_test.txt deleted file mode 100644 index b797b9806b8..00000000000 --- a/dev/_sources/examples/misc/tight_bbox_test.txt +++ /dev/null @@ -1,27 +0,0 @@ -.. _misc-tight_bbox_test: - -misc example code: tight_bbox_test.py -===================================== - -[`source code `_] - -:: - - from __future__ import print_function - import matplotlib.pyplot as plt - import numpy as np - - ax = plt.axes([0.1, 0.3, 0.5, 0.5]) - - ax.pcolormesh(np.array([[1,2],[3,4]])) - plt.yticks([0.5, 1.5], ["long long tick label", - "tick label"]) - plt.ylabel("My y-label") - plt.title("Check saved figures for their bboxes") - for ext in ["png", "pdf", "svg", "svgz", "eps"]: - print("saving tight_bbox_test.%s" % (ext,)) - plt.savefig("tight_bbox_test.%s" % (ext,), bbox_inches="tight") - plt.show() - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/mplot3d/2dcollections3d_demo.txt b/dev/_sources/examples/mplot3d/2dcollections3d_demo.txt deleted file mode 100644 index 025c751e081..00000000000 --- a/dev/_sources/examples/mplot3d/2dcollections3d_demo.txt +++ /dev/null @@ -1,38 +0,0 @@ -.. _mplot3d-2dcollections3d_demo: - -mplot3d example code: 2dcollections3d_demo.py -============================================= - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/mplot3d/2dcollections3d_demo.py - -:: - - from mpl_toolkits.mplot3d import Axes3D - import numpy as np - import matplotlib.pyplot as plt - - fig = plt.figure() - ax = fig.gca(projection='3d') - - x = np.linspace(0, 1, 100) - y = np.sin(x * 2 * np.pi) / 2 + 0.5 - ax.plot(x, y, zs=0, zdir='z', label='zs=0, zdir=z') - - colors = ('r', 'g', 'b', 'k') - for c in colors: - x = np.random.sample(20) - y = np.random.sample(20) - ax.scatter(x, y, 0, zdir='y', c=c) - - ax.legend() - ax.set_xlim3d(0, 1) - ax.set_ylim3d(0, 1) - ax.set_zlim3d(0, 1) - - plt.show() - - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/mplot3d/bars3d_demo.txt b/dev/_sources/examples/mplot3d/bars3d_demo.txt deleted file mode 100644 index a3df058c6e0..00000000000 --- a/dev/_sources/examples/mplot3d/bars3d_demo.txt +++ /dev/null @@ -1,36 +0,0 @@ -.. _mplot3d-bars3d_demo: - -mplot3d example code: bars3d_demo.py -==================================== - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/mplot3d/bars3d_demo.py - -:: - - from mpl_toolkits.mplot3d import Axes3D - import matplotlib.pyplot as plt - import numpy as np - - fig = plt.figure() - ax = fig.add_subplot(111, projection='3d') - for c, z in zip(['r', 'g', 'b', 'y'], [30, 20, 10, 0]): - xs = np.arange(20) - ys = np.random.rand(20) - - # You can provide either a single color or an array. To demonstrate this, - # the first bar of each set will be colored cyan. - cs = [c] * len(xs) - cs[0] = 'c' - ax.bar(xs, ys, zs=z, zdir='y', color=cs, alpha=0.8) - - ax.set_xlabel('X') - ax.set_ylabel('Y') - ax.set_zlabel('Z') - - plt.show() - - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/mplot3d/contour3d_demo.txt b/dev/_sources/examples/mplot3d/contour3d_demo.txt deleted file mode 100644 index ad6fccc7d7e..00000000000 --- a/dev/_sources/examples/mplot3d/contour3d_demo.txt +++ /dev/null @@ -1,26 +0,0 @@ -.. _mplot3d-contour3d_demo: - -mplot3d example code: contour3d_demo.py -======================================= - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/mplot3d/contour3d_demo.py - -:: - - from mpl_toolkits.mplot3d import axes3d - import matplotlib.pyplot as plt - from matplotlib import cm - - fig = plt.figure() - ax = fig.add_subplot(111, projection='3d') - X, Y, Z = axes3d.get_test_data(0.05) - cset = ax.contour(X, Y, Z, cmap=cm.coolwarm) - ax.clabel(cset, fontsize=9, inline=1) - - plt.show() - - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/mplot3d/contour3d_demo2.txt b/dev/_sources/examples/mplot3d/contour3d_demo2.txt deleted file mode 100644 index 2e6cb6fe56e..00000000000 --- a/dev/_sources/examples/mplot3d/contour3d_demo2.txt +++ /dev/null @@ -1,26 +0,0 @@ -.. _mplot3d-contour3d_demo2: - -mplot3d example code: contour3d_demo2.py -======================================== - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/mplot3d/contour3d_demo2.py - -:: - - from mpl_toolkits.mplot3d import axes3d - import matplotlib.pyplot as plt - from matplotlib import cm - - fig = plt.figure() - ax = fig.gca(projection='3d') - X, Y, Z = axes3d.get_test_data(0.05) - cset = ax.contour(X, Y, Z, extend3d=True, cmap=cm.coolwarm) - ax.clabel(cset, fontsize=9, inline=1) - - plt.show() - - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/mplot3d/contour3d_demo3.txt b/dev/_sources/examples/mplot3d/contour3d_demo3.txt deleted file mode 100644 index 22afcc24dc3..00000000000 --- a/dev/_sources/examples/mplot3d/contour3d_demo3.txt +++ /dev/null @@ -1,35 +0,0 @@ -.. _mplot3d-contour3d_demo3: - -mplot3d example code: contour3d_demo3.py -======================================== - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/mplot3d/contour3d_demo3.py - -:: - - from mpl_toolkits.mplot3d import axes3d - import matplotlib.pyplot as plt - from matplotlib import cm - - fig = plt.figure() - ax = fig.gca(projection='3d') - X, Y, Z = axes3d.get_test_data(0.05) - ax.plot_surface(X, Y, Z, rstride=8, cstride=8, alpha=0.3) - cset = ax.contour(X, Y, Z, zdir='z', offset=-100, cmap=cm.coolwarm) - cset = ax.contour(X, Y, Z, zdir='x', offset=-40, cmap=cm.coolwarm) - cset = ax.contour(X, Y, Z, zdir='y', offset=40, cmap=cm.coolwarm) - - ax.set_xlabel('X') - ax.set_xlim(-40, 40) - ax.set_ylabel('Y') - ax.set_ylim(-40, 40) - ax.set_zlabel('Z') - ax.set_zlim(-100, 100) - - plt.show() - - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/mplot3d/contourf3d_demo.txt b/dev/_sources/examples/mplot3d/contourf3d_demo.txt deleted file mode 100644 index c067cf88553..00000000000 --- a/dev/_sources/examples/mplot3d/contourf3d_demo.txt +++ /dev/null @@ -1,26 +0,0 @@ -.. _mplot3d-contourf3d_demo: - -mplot3d example code: contourf3d_demo.py -======================================== - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/mplot3d/contourf3d_demo.py - -:: - - from mpl_toolkits.mplot3d import axes3d - import matplotlib.pyplot as plt - from matplotlib import cm - - fig = plt.figure() - ax = fig.gca(projection='3d') - X, Y, Z = axes3d.get_test_data(0.05) - cset = ax.contourf(X, Y, Z, cmap=cm.coolwarm) - ax.clabel(cset, fontsize=9, inline=1) - - plt.show() - - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/mplot3d/contourf3d_demo2.txt b/dev/_sources/examples/mplot3d/contourf3d_demo2.txt deleted file mode 100644 index a683efdca0f..00000000000 --- a/dev/_sources/examples/mplot3d/contourf3d_demo2.txt +++ /dev/null @@ -1,40 +0,0 @@ -.. _mplot3d-contourf3d_demo2: - -mplot3d example code: contourf3d_demo2.py -========================================= - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/mplot3d/contourf3d_demo2.py - -:: - - """ - .. versionadded:: 1.1.0 - This demo depends on new features added to contourf3d. - """ - - from mpl_toolkits.mplot3d import axes3d - import matplotlib.pyplot as plt - from matplotlib import cm - - fig = plt.figure() - ax = fig.gca(projection='3d') - X, Y, Z = axes3d.get_test_data(0.05) - ax.plot_surface(X, Y, Z, rstride=8, cstride=8, alpha=0.3) - cset = ax.contourf(X, Y, Z, zdir='z', offset=-100, cmap=cm.coolwarm) - cset = ax.contourf(X, Y, Z, zdir='x', offset=-40, cmap=cm.coolwarm) - cset = ax.contourf(X, Y, Z, zdir='y', offset=40, cmap=cm.coolwarm) - - ax.set_xlabel('X') - ax.set_xlim(-40, 40) - ax.set_ylabel('Y') - ax.set_ylim(-40, 40) - ax.set_zlabel('Z') - ax.set_zlim(-100, 100) - - plt.show() - - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/mplot3d/hist3d_demo.txt b/dev/_sources/examples/mplot3d/hist3d_demo.txt deleted file mode 100644 index 8ed1d86c0e7..00000000000 --- a/dev/_sources/examples/mplot3d/hist3d_demo.txt +++ /dev/null @@ -1,37 +0,0 @@ -.. _mplot3d-hist3d_demo: - -mplot3d example code: hist3d_demo.py -==================================== - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/mplot3d/hist3d_demo.py - -:: - - from mpl_toolkits.mplot3d import Axes3D - import matplotlib.pyplot as plt - import numpy as np - - fig = plt.figure() - ax = fig.add_subplot(111, projection='3d') - x, y = np.random.rand(2, 100) * 4 - hist, xedges, yedges = np.histogram2d(x, y, bins=4) - - elements = (len(xedges) - 1) * (len(yedges) - 1) - xpos, ypos = np.meshgrid(xedges[:-1]+0.25, yedges[:-1]+0.25) - - xpos = xpos.flatten() - ypos = ypos.flatten() - zpos = np.zeros(elements) - dx = 0.5 * np.ones_like(zpos) - dy = dx.copy() - dz = hist.flatten() - - ax.bar3d(xpos, ypos, zpos, dx, dy, dz, color='b', zsort='average') - - plt.show() - - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/mplot3d/index.txt b/dev/_sources/examples/mplot3d/index.txt deleted file mode 100644 index b5d86cd7d6d..00000000000 --- a/dev/_sources/examples/mplot3d/index.txt +++ /dev/null @@ -1,40 +0,0 @@ -.. _mplot3d-examples-index: - -############################################## -mplot3d Examples -############################################## - -.. htmlonly:: - - :Release: |version| - :Date: |today| - -.. toctree:: - :maxdepth: 1 - - 2dcollections3d_demo <2dcollections3d_demo.rst> - bars3d_demo - contour3d_demo - contour3d_demo2 - contour3d_demo3 - contourf3d_demo - contourf3d_demo2 - hist3d_demo - lines3d_demo - lorenz_attractor - mixed_subplots_demo - offset_demo - pathpatch3d_demo - polys3d_demo - rotate_axes3d_demo - scatter3d_demo - subplot3d_demo - surface3d_demo - surface3d_demo2 - surface3d_demo3 - surface3d_radial_demo - text3d_demo - trisurf3d_demo - trisurf3d_demo2 - wire3d_animation_demo - wire3d_demo diff --git a/dev/_sources/examples/mplot3d/lines3d_demo.txt b/dev/_sources/examples/mplot3d/lines3d_demo.txt deleted file mode 100644 index f970380ed1b..00000000000 --- a/dev/_sources/examples/mplot3d/lines3d_demo.txt +++ /dev/null @@ -1,33 +0,0 @@ -.. _mplot3d-lines3d_demo: - -mplot3d example code: lines3d_demo.py -===================================== - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/mplot3d/lines3d_demo.py - -:: - - import matplotlib as mpl - from mpl_toolkits.mplot3d import Axes3D - import numpy as np - import matplotlib.pyplot as plt - - mpl.rcParams['legend.fontsize'] = 10 - - fig = plt.figure() - ax = fig.gca(projection='3d') - theta = np.linspace(-4 * np.pi, 4 * np.pi, 100) - z = np.linspace(-2, 2, 100) - r = z**2 + 1 - x = r * np.sin(theta) - y = r * np.cos(theta) - ax.plot(x, y, z, label='parametric curve') - 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/dev/_sources/examples/mplot3d/lorenz_attractor.txt b/dev/_sources/examples/mplot3d/lorenz_attractor.txt deleted file mode 100644 index 8fb80b0d62e..00000000000 --- a/dev/_sources/examples/mplot3d/lorenz_attractor.txt +++ /dev/null @@ -1,64 +0,0 @@ -.. _mplot3d-lorenz_attractor: - -mplot3d example code: lorenz_attractor.py -========================================= - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/mplot3d/lorenz_attractor.py - -:: - - # Plot of the Lorenz Attractor based on Edward Lorenz's 1963 "Deterministic - # Nonperiodic Flow" publication. - # http://journals.ametsoc.org/doi/abs/10.1175/1520-0469%281963%29020%3C0130%3ADNF%3E2.0.CO%3B2 - # - # Note: Because this is a simple non-linear ODE, it would be more easily - # done using SciPy's ode solver, but this approach depends only - # upon NumPy. - - import numpy as np - import matplotlib.pyplot as plt - from mpl_toolkits.mplot3d import Axes3D - - - def lorenz(x, y, z, s=10, r=28, b=2.667) : - x_dot = s*(y - x) - y_dot = r*x - y - x*z - z_dot = x*y - b*z - return x_dot, y_dot, z_dot - - - dt = 0.01 - stepCnt = 10000 - - # Need one more for the initial values - xs = np.empty((stepCnt + 1,)) - ys = np.empty((stepCnt + 1,)) - zs = np.empty((stepCnt + 1,)) - - # Setting initial values - xs[0], ys[0], zs[0] = (0., 1., 1.05) - - # Stepping through "time". - for i in range(stepCnt) : - # Derivatives of the X, Y, Z state - x_dot, y_dot, z_dot = lorenz(xs[i], ys[i], zs[i]) - xs[i + 1] = xs[i] + (x_dot * dt) - ys[i + 1] = ys[i] + (y_dot * dt) - zs[i + 1] = zs[i] + (z_dot * dt) - - fig = plt.figure() - ax = fig.gca(projection='3d') - - ax.plot(xs, ys, zs) - ax.set_xlabel("X Axis") - ax.set_ylabel("Y Axis") - ax.set_zlabel("Z Axis") - ax.set_title("Lorenz Attractor") - - plt.show() - - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/mplot3d/mixed_subplots_demo.txt b/dev/_sources/examples/mplot3d/mixed_subplots_demo.txt deleted file mode 100644 index 04ebec7e69f..00000000000 --- a/dev/_sources/examples/mplot3d/mixed_subplots_demo.txt +++ /dev/null @@ -1,63 +0,0 @@ -.. _mplot3d-mixed_subplots_demo: - -mplot3d example code: mixed_subplots_demo.py -============================================ - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/mplot3d/mixed_subplots_demo.py - -:: - - """ - Demonstrate the mixing of 2d and 3d subplots - """ - from mpl_toolkits.mplot3d import Axes3D - import matplotlib.pyplot as plt - import numpy as np - - def f(t): - s1 = np.cos(2*np.pi*t) - e1 = np.exp(-t) - return np.multiply(s1,e1) - - - ################ - # First subplot - ################ - t1 = np.arange(0.0, 5.0, 0.1) - t2 = np.arange(0.0, 5.0, 0.02) - t3 = np.arange(0.0, 2.0, 0.01) - - # Twice as tall as it is wide. - fig = plt.figure(figsize=plt.figaspect(2.)) - fig.suptitle('A tale of 2 subplots') - ax = fig.add_subplot(2, 1, 1) - l = ax.plot(t1, f(t1), 'bo', - t2, f(t2), 'k--', markerfacecolor='green') - ax.grid(True) - ax.set_ylabel('Damped oscillation') - - - ################# - # Second subplot - ################# - ax = fig.add_subplot(2, 1, 2, projection='3d') - X = np.arange(-5, 5, 0.25) - xlen = len(X) - Y = np.arange(-5, 5, 0.25) - ylen = len(Y) - X, Y = np.meshgrid(X, Y) - R = np.sqrt(X**2 + Y**2) - Z = np.sin(R) - - surf = ax.plot_surface(X, Y, Z, rstride=1, cstride=1, - linewidth=0, antialiased=False) - - ax.set_zlim3d(-1, 1) - - plt.show() - - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/mplot3d/offset_demo.txt b/dev/_sources/examples/mplot3d/offset_demo.txt deleted file mode 100644 index 00b4b8206b1..00000000000 --- a/dev/_sources/examples/mplot3d/offset_demo.txt +++ /dev/null @@ -1,40 +0,0 @@ -.. _mplot3d-offset_demo: - -mplot3d example code: offset_demo.py -==================================== - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/mplot3d/offset_demo.py - -:: - - from mpl_toolkits.mplot3d import Axes3D - import matplotlib.pyplot as plt - import numpy as np - - # This example demonstrates mplot3d's offset text display. - # As one rotates the 3D figure, the offsets should remain oriented - # same way as the axis label, and should also be located "away" - # from the center of the plot. - # - # This demo triggers the display of the offset text for the x and - # y axis by adding 1e5 to X and Y. Anything less would not - # automatically trigger it. - - fig = plt.figure() - ax = fig.gca(projection='3d') - X, Y = np.mgrid[0:6*np.pi:0.25, 0:4*np.pi:0.25] - Z = np.sqrt(np.abs(np.cos(X) + np.cos(Y))) - - surf = ax.plot_surface(X + 1e5, Y + 1e5, Z, cmap='autumn', cstride=2, rstride=2) - ax.set_xlabel("X-Label") - ax.set_ylabel("Y-Label") - ax.set_zlabel("Z-Label") - ax.set_zlim(0, 2) - - plt.show() - - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/mplot3d/pathpatch3d_demo.txt b/dev/_sources/examples/mplot3d/pathpatch3d_demo.txt deleted file mode 100644 index 916e29144df..00000000000 --- a/dev/_sources/examples/mplot3d/pathpatch3d_demo.txt +++ /dev/null @@ -1,67 +0,0 @@ -.. _mplot3d-pathpatch3d_demo: - -mplot3d example code: pathpatch3d_demo.py -========================================= - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/mplot3d/pathpatch3d_demo.py - -:: - - import matplotlib.pyplot as plt - from matplotlib.patches import Circle, PathPatch - # register Axes3D class with matplotlib by importing Axes3D - from mpl_toolkits.mplot3d import Axes3D - import mpl_toolkits.mplot3d.art3d as art3d - from matplotlib.text import TextPath - from matplotlib.transforms import Affine2D - - - def text3d(ax, xyz, s, zdir="z", size=None, angle=0, usetex=False, **kwargs): - - x, y, z = xyz - if zdir == "y": - xy1, z1 = (x, z), y - elif zdir == "y": - xy1, z1 = (y, z), x - else: - xy1, z1 = (x, y), z - - text_path = TextPath((0, 0), s, size=size, usetex=usetex) - trans = Affine2D().rotate(angle).translate(xy1[0], xy1[1]) - - p1 = PathPatch(trans.transform_path(text_path), **kwargs) - ax.add_patch(p1) - art3d.pathpatch_2d_to_3d(p1, z=z1, zdir=zdir) - - - fig = plt.figure() - ax = fig.add_subplot(111, projection='3d') - - p = Circle((5, 5), 3) - ax.add_patch(p) - art3d.pathpatch_2d_to_3d(p, z=0, zdir="x") - - - text3d(ax, (4, -2, 0), "X-axis", zdir="z", size=.5, usetex=False, - ec="none", fc="k") - text3d(ax, (12, 4, 0), "Y-axis", zdir="z", size=.5, usetex=False, - angle=.5*3.14159, ec="none", fc="k") - text3d(ax, (12, 10, 4), "Z-axis", zdir="y", size=.5, usetex=False, - angle=.5*3.14159, ec="none", fc="k") - - text3d(ax, (1, 5, 0), - r"$\displaystyle G_{\mu\nu} + \Lambda g_{\mu\nu} = " - r"\frac{8\pi G}{c^4} T_{\mu\nu} $", - zdir="z", size=1, usetex=True, - ec="none", fc="k") - - ax.set_xlim3d(0, 10) - ax.set_ylim3d(0, 10) - ax.set_zlim3d(0, 10) - - plt.show() - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/mplot3d/polys3d_demo.txt b/dev/_sources/examples/mplot3d/polys3d_demo.txt deleted file mode 100644 index 833dd5cfb3f..00000000000 --- a/dev/_sources/examples/mplot3d/polys3d_demo.txt +++ /dev/null @@ -1,47 +0,0 @@ -.. _mplot3d-polys3d_demo: - -mplot3d example code: polys3d_demo.py -===================================== - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/mplot3d/polys3d_demo.py - -:: - - from mpl_toolkits.mplot3d import Axes3D - from matplotlib.collections import PolyCollection - from matplotlib.colors import colorConverter - import matplotlib.pyplot as plt - import numpy as np - - fig = plt.figure() - ax = fig.gca(projection='3d') - - cc = lambda arg: colorConverter.to_rgba(arg, alpha=0.6) - - xs = np.arange(0, 10, 0.4) - verts = [] - zs = [0.0, 1.0, 2.0, 3.0] - for z in zs: - ys = np.random.rand(len(xs)) - ys[0], ys[-1] = 0, 0 - verts.append(list(zip(xs, ys))) - - poly = PolyCollection(verts, facecolors = [cc('r'), cc('g'), cc('b'), - cc('y')]) - poly.set_alpha(0.7) - ax.add_collection3d(poly, zs=zs, zdir='y') - - ax.set_xlabel('X') - ax.set_xlim3d(0, 10) - ax.set_ylabel('Y') - ax.set_ylim3d(-1, 4) - ax.set_zlabel('Z') - ax.set_zlim3d(0, 1) - - plt.show() - - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/mplot3d/rotate_axes3d_demo.txt b/dev/_sources/examples/mplot3d/rotate_axes3d_demo.txt deleted file mode 100644 index 1c5e3299b2c..00000000000 --- a/dev/_sources/examples/mplot3d/rotate_axes3d_demo.txt +++ /dev/null @@ -1,29 +0,0 @@ -.. _mplot3d-rotate_axes3d_demo: - -mplot3d example code: rotate_axes3d_demo.py -=========================================== - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/mplot3d/rotate_axes3d_demo.py - -:: - - from mpl_toolkits.mplot3d import axes3d - import matplotlib.pyplot as plt - import numpy as np - - plt.ion() - - fig = plt.figure() - ax = fig.add_subplot(111, projection='3d') - X, Y, Z = axes3d.get_test_data(0.1) - ax.plot_wireframe(X, Y, Z, rstride=5, cstride=5) - - for angle in range(0, 360): - ax.view_init(30, angle) - plt.draw() - - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/mplot3d/scatter3d_demo.txt b/dev/_sources/examples/mplot3d/scatter3d_demo.txt deleted file mode 100644 index 7a6308d2b46..00000000000 --- a/dev/_sources/examples/mplot3d/scatter3d_demo.txt +++ /dev/null @@ -1,36 +0,0 @@ -.. _mplot3d-scatter3d_demo: - -mplot3d example code: scatter3d_demo.py -======================================= - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/mplot3d/scatter3d_demo.py - -:: - - import numpy as np - from mpl_toolkits.mplot3d import Axes3D - import matplotlib.pyplot as plt - - def randrange(n, vmin, vmax): - return (vmax-vmin)*np.random.rand(n) + vmin - - fig = plt.figure() - ax = fig.add_subplot(111, projection='3d') - n = 100 - for c, m, zl, zh in [('r', 'o', -50, -25), ('b', '^', -30, -5)]: - xs = randrange(n, 23, 32) - ys = randrange(n, 0, 100) - zs = randrange(n, zl, zh) - ax.scatter(xs, ys, zs, c=c, marker=m) - - ax.set_xlabel('X Label') - ax.set_ylabel('Y Label') - ax.set_zlabel('Z Label') - - plt.show() - - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/mplot3d/subplot3d_demo.txt b/dev/_sources/examples/mplot3d/subplot3d_demo.txt deleted file mode 100644 index f12474e1f1e..00000000000 --- a/dev/_sources/examples/mplot3d/subplot3d_demo.txt +++ /dev/null @@ -1,46 +0,0 @@ -.. _mplot3d-subplot3d_demo: - -mplot3d example code: subplot3d_demo.py -======================================= - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/mplot3d/subplot3d_demo.py - -:: - - from mpl_toolkits.mplot3d.axes3d import Axes3D - import matplotlib.pyplot as plt - - - # imports specific to the plots in this example - import numpy as np - from matplotlib import cm - from mpl_toolkits.mplot3d.axes3d import get_test_data - - # Twice as wide as it is tall. - fig = plt.figure(figsize=plt.figaspect(0.5)) - - #---- First subplot - ax = fig.add_subplot(1, 2, 1, projection='3d') - X = np.arange(-5, 5, 0.25) - Y = np.arange(-5, 5, 0.25) - X, Y = np.meshgrid(X, Y) - R = np.sqrt(X**2 + Y**2) - Z = np.sin(R) - surf = ax.plot_surface(X, Y, Z, rstride=1, cstride=1, cmap=cm.coolwarm, - linewidth=0, antialiased=False) - ax.set_zlim3d(-1.01, 1.01) - - fig.colorbar(surf, shrink=0.5, aspect=10) - - #---- Second subplot - ax = fig.add_subplot(1, 2, 2, projection='3d') - X, Y, Z = get_test_data(0.05) - ax.plot_wireframe(X, Y, Z, rstride=10, cstride=10) - - plt.show() - - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/mplot3d/surface3d_demo.txt b/dev/_sources/examples/mplot3d/surface3d_demo.txt deleted file mode 100644 index a97a09f5e74..00000000000 --- a/dev/_sources/examples/mplot3d/surface3d_demo.txt +++ /dev/null @@ -1,38 +0,0 @@ -.. _mplot3d-surface3d_demo: - -mplot3d example code: surface3d_demo.py -======================================= - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/mplot3d/surface3d_demo.py - -:: - - from mpl_toolkits.mplot3d import Axes3D - from matplotlib import cm - from matplotlib.ticker import LinearLocator, FormatStrFormatter - import matplotlib.pyplot as plt - import numpy as np - - fig = plt.figure() - ax = fig.gca(projection='3d') - X = np.arange(-5, 5, 0.25) - Y = np.arange(-5, 5, 0.25) - X, Y = np.meshgrid(X, Y) - R = np.sqrt(X**2 + Y**2) - Z = np.sin(R) - surf = ax.plot_surface(X, Y, Z, rstride=1, cstride=1, cmap=cm.coolwarm, - linewidth=0, antialiased=False) - ax.set_zlim(-1.01, 1.01) - - ax.zaxis.set_major_locator(LinearLocator(10)) - ax.zaxis.set_major_formatter(FormatStrFormatter('%.02f')) - - fig.colorbar(surf, shrink=0.5, aspect=5) - - plt.show() - - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/mplot3d/surface3d_demo2.txt b/dev/_sources/examples/mplot3d/surface3d_demo2.txt deleted file mode 100644 index 2c048d46df8..00000000000 --- a/dev/_sources/examples/mplot3d/surface3d_demo2.txt +++ /dev/null @@ -1,31 +0,0 @@ -.. _mplot3d-surface3d_demo2: - -mplot3d example code: surface3d_demo2.py -======================================== - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/mplot3d/surface3d_demo2.py - -:: - - from mpl_toolkits.mplot3d import Axes3D - import matplotlib.pyplot as plt - import numpy as np - - fig = plt.figure() - ax = fig.add_subplot(111, projection='3d') - - u = np.linspace(0, 2 * np.pi, 100) - v = np.linspace(0, np.pi, 100) - - x = 10 * np.outer(np.cos(u), np.sin(v)) - y = 10 * np.outer(np.sin(u), np.sin(v)) - z = 10 * np.outer(np.ones(np.size(u)), np.cos(v)) - ax.plot_surface(x, y, z, rstride=4, cstride=4, color='b') - - plt.show() - - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/mplot3d/surface3d_demo3.txt b/dev/_sources/examples/mplot3d/surface3d_demo3.txt deleted file mode 100644 index d87a9191799..00000000000 --- a/dev/_sources/examples/mplot3d/surface3d_demo3.txt +++ /dev/null @@ -1,44 +0,0 @@ -.. _mplot3d-surface3d_demo3: - -mplot3d example code: surface3d_demo3.py -======================================== - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/mplot3d/surface3d_demo3.py - -:: - - from mpl_toolkits.mplot3d import Axes3D - from matplotlib import cm - from matplotlib.ticker import LinearLocator - import matplotlib.pyplot as plt - import numpy as np - - fig = plt.figure() - ax = fig.gca(projection='3d') - X = np.arange(-5, 5, 0.25) - xlen = len(X) - Y = np.arange(-5, 5, 0.25) - ylen = len(Y) - X, Y = np.meshgrid(X, Y) - R = np.sqrt(X**2 + Y**2) - Z = np.sin(R) - - colortuple = ('y', 'b') - colors = np.empty(X.shape, dtype=str) - for y in range(ylen): - for x in range(xlen): - colors[x, y] = colortuple[(x + y) % len(colortuple)] - - surf = ax.plot_surface(X, Y, Z, rstride=1, cstride=1, facecolors=colors, - linewidth=0, antialiased=False) - - ax.set_zlim3d(-1, 1) - ax.w_zaxis.set_major_locator(LinearLocator(6)) - - plt.show() - - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/mplot3d/surface3d_radial_demo.txt b/dev/_sources/examples/mplot3d/surface3d_radial_demo.txt deleted file mode 100644 index 4f1f402b8b8..00000000000 --- a/dev/_sources/examples/mplot3d/surface3d_radial_demo.txt +++ /dev/null @@ -1,40 +0,0 @@ -.. _mplot3d-surface3d_radial_demo: - -mplot3d example code: surface3d_radial_demo.py -============================================== - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/mplot3d/surface3d_radial_demo.py - -:: - - # By Armin Moser - - from mpl_toolkits.mplot3d import Axes3D - import matplotlib - import numpy as np - from matplotlib import cm - from matplotlib import pyplot as plt - step = 0.04 - maxval = 1.0 - fig = plt.figure() - ax = fig.add_subplot(111, projection='3d') - - # create supporting points in polar coordinates - r = np.linspace(0,1.25,50) - p = np.linspace(0,2*np.pi,50) - R,P = np.meshgrid(r,p) - # transform them to cartesian system - X,Y = R*np.cos(P),R*np.sin(P) - - Z = ((R**2 - 1)**2) - ax.plot_surface(X, Y, Z, rstride=1, cstride=1, cmap=cm.YlGnBu_r) - ax.set_zlim3d(0, 1) - ax.set_xlabel(r'$\phi_\mathrm{real}$') - ax.set_ylabel(r'$\phi_\mathrm{im}$') - ax.set_zlabel(r'$V(\phi)$') - plt.show() - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/mplot3d/text3d_demo.txt b/dev/_sources/examples/mplot3d/text3d_demo.txt deleted file mode 100644 index ae07a29b0bd..00000000000 --- a/dev/_sources/examples/mplot3d/text3d_demo.txt +++ /dev/null @@ -1,42 +0,0 @@ -.. _mplot3d-text3d_demo: - -mplot3d example code: text3d_demo.py -==================================== - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/mplot3d/text3d_demo.py - -:: - - from mpl_toolkits.mplot3d import Axes3D - import matplotlib.pyplot as plt - - fig = plt.figure() - ax = fig.gca(projection='3d') - - zdirs = (None, 'x', 'y', 'z', (1, 1, 0), (1, 1, 1)) - xs = (2, 6, 4, 9, 7, 2) - ys = (6, 4, 8, 7, 2, 2) - zs = (4, 2, 5, 6, 1, 7) - - for zdir, x, y, z in zip(zdirs, xs, ys, zs): - label = '(%d, %d, %d), dir=%s' % (x, y, z, zdir) - ax.text(x, y, z, label, zdir) - - ax.text(1, 1, 1, "red", color='red') - ax.text2D(0.05, 0.95, "2D Text", transform=ax.transAxes) - - ax.set_xlim3d(0, 10) - ax.set_ylim3d(0, 10) - ax.set_zlim3d(0, 10) - - ax.set_xlabel('X axis') - ax.set_ylabel('Y axis') - ax.set_zlabel('Z axis') - - plt.show() - - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/mplot3d/trisurf3d_demo.txt b/dev/_sources/examples/mplot3d/trisurf3d_demo.txt deleted file mode 100644 index 0d45595f380..00000000000 --- a/dev/_sources/examples/mplot3d/trisurf3d_demo.txt +++ /dev/null @@ -1,46 +0,0 @@ -.. _mplot3d-trisurf3d_demo: - -mplot3d example code: trisurf3d_demo.py -======================================= - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/mplot3d/trisurf3d_demo.py - -:: - - from mpl_toolkits.mplot3d import Axes3D - from matplotlib import cm - import matplotlib.pyplot as plt - import numpy as np - - n_angles = 36 - n_radii = 8 - - # An array of radii - # Does not include radius r=0, this is to eliminate duplicate points - radii = np.linspace(0.125, 1.0, n_radii) - - # An array of angles - angles = np.linspace(0, 2*np.pi, n_angles, endpoint=False) - - # Repeat all angles for each radius - angles = np.repeat(angles[...,np.newaxis], n_radii, axis=1) - - # Convert polar (radii, angles) coords to cartesian (x, y) coords - # (0, 0) is added here. There are no duplicate points in the (x, y) plane - x = np.append(0, (radii*np.cos(angles)).flatten()) - y = np.append(0, (radii*np.sin(angles)).flatten()) - - # Pringle surface - z = np.sin(-x*y) - - fig = plt.figure() - ax = fig.gca(projection='3d') - - ax.plot_trisurf(x, y, z, cmap=cm.jet, linewidth=0.2) - - plt.show() - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/mplot3d/trisurf3d_demo2.txt b/dev/_sources/examples/mplot3d/trisurf3d_demo2.txt deleted file mode 100644 index ec31cf86bbe..00000000000 --- a/dev/_sources/examples/mplot3d/trisurf3d_demo2.txt +++ /dev/null @@ -1,69 +0,0 @@ -.. _mplot3d-trisurf3d_demo2: - -mplot3d example code: trisurf3d_demo2.py -======================================== - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/mplot3d/trisurf3d_demo2.py - -:: - - import numpy as np - import matplotlib.pyplot as plt - from mpl_toolkits.mplot3d import Axes3D - import matplotlib.tri as mtri - - # u, v are parameterisation variables - u = (np.linspace(0, 2.0 * np.pi, endpoint=True, num=50) * np.ones((10, 1))).flatten() - v = np.repeat(np.linspace(-0.5, 0.5, endpoint=True, num=10), repeats=50).flatten() - - # This is the Mobius mapping, taking a u, v pair and returning an x, y, z - # triple - x = (1 + 0.5 * v * np.cos(u / 2.0)) * np.cos(u) - y = (1 + 0.5 * v * np.cos(u / 2.0)) * np.sin(u) - z = 0.5 * v * np.sin(u / 2.0) - - # Triangulate parameter space to determine the triangles - tri = mtri.Triangulation(u, v) - - fig = plt.figure() - ax = fig.add_subplot(1, 1, 1, projection='3d') - - # The triangles in parameter space determine which x, y, z points are - # connected by an edge - ax.plot_trisurf(x, y, z, triangles=tri.triangles, cmap=plt.cm.Spectral) - - ax.set_zlim(-1, 1) - - # First create the x and y coordinates of the points. - n_angles = 36 - n_radii = 8 - min_radius = 0.25 - radii = np.linspace(min_radius, 0.95, n_radii) - - angles = np.linspace(0, 2*np.pi, n_angles, endpoint=False) - angles = np.repeat(angles[...,np.newaxis], n_radii, axis=1) - angles[:,1::2] += np.pi/n_angles - - x = (radii*np.cos(angles)).flatten() - y = (radii*np.sin(angles)).flatten() - z = (np.cos(radii)*np.cos(angles*3.0)).flatten() - - # Create the Triangulation; no triangles so Delaunay triangulation created. - triang = mtri.Triangulation(x, y) - - # Mask off unwanted triangles. - xmid = x[triang.triangles].mean(axis=1) - ymid = y[triang.triangles].mean(axis=1) - mask = np.where(xmid*xmid + ymid*ymid < min_radius*min_radius, 1, 0) - triang.set_mask(mask) - - # tripcolor plot. - fig = plt.figure() - ax = fig.add_subplot(1, 1, 1, projection='3d') - ax.plot_trisurf(triang, z, cmap=plt.cm.CMRmap) - plt.show() - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/mplot3d/wire3d_animation_demo.txt b/dev/_sources/examples/mplot3d/wire3d_animation_demo.txt deleted file mode 100644 index 93006a66b9b..00000000000 --- a/dev/_sources/examples/mplot3d/wire3d_animation_demo.txt +++ /dev/null @@ -1,52 +0,0 @@ -.. _mplot3d-wire3d_animation_demo: - -mplot3d example code: wire3d_animation_demo.py -============================================== - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/mplot3d/wire3d_animation_demo.py - -:: - - from __future__ import print_function - """ - A very simple 'animation' of a 3D plot - """ - from mpl_toolkits.mplot3d import axes3d - import matplotlib.pyplot as plt - import numpy as np - import time - - def generate(X, Y, phi): - R = 1 - np.sqrt(X**2 + Y**2) - return np.cos(2 * np.pi * X + phi) * R - - plt.ion() - fig = plt.figure() - ax = fig.add_subplot(111, projection='3d') - - xs = np.linspace(-1, 1, 50) - ys = np.linspace(-1, 1, 50) - X, Y = np.meshgrid(xs, ys) - Z = generate(X, Y, 0.0) - - wframe = None - tstart = time.time() - for phi in np.linspace(0, 360 / 2 / np.pi, 100): - - oldcol = wframe - - Z = generate(X, Y, phi) - wframe = ax.plot_wireframe(X, Y, Z, rstride=2, cstride=2) - - # Remove old line collection before drawing - if oldcol is not None: - ax.collections.remove(oldcol) - - plt.draw() - - print ('FPS: %f' % (100 / (time.time() - tstart))) - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/mplot3d/wire3d_demo.txt b/dev/_sources/examples/mplot3d/wire3d_demo.txt deleted file mode 100644 index 9c5ed43c9b0..00000000000 --- a/dev/_sources/examples/mplot3d/wire3d_demo.txt +++ /dev/null @@ -1,25 +0,0 @@ -.. _mplot3d-wire3d_demo: - -mplot3d example code: wire3d_demo.py -==================================== - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/mplot3d/wire3d_demo.py - -:: - - from mpl_toolkits.mplot3d import axes3d - import matplotlib.pyplot as plt - import numpy as np - - fig = plt.figure() - ax = fig.add_subplot(111, projection='3d') - X, Y, Z = axes3d.get_test_data(0.05) - ax.plot_wireframe(X, Y, Z, rstride=10, cstride=10) - - plt.show() - - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/old_animation/animate_decay_tk_blit.txt b/dev/_sources/examples/old_animation/animate_decay_tk_blit.txt deleted file mode 100644 index 93208cc3947..00000000000 --- a/dev/_sources/examples/old_animation/animate_decay_tk_blit.txt +++ /dev/null @@ -1,71 +0,0 @@ -.. _old_animation-animate_decay_tk_blit: - -old_animation example code: animate_decay_tk_blit.py -==================================================== - -[`source code `_] - -:: - - from __future__ import print_function - 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/dev/_sources/examples/old_animation/animation_blit_fltk.txt b/dev/_sources/examples/old_animation/animation_blit_fltk.txt deleted file mode 100644 index 10a1b02f2a3..00000000000 --- a/dev/_sources/examples/old_animation/animation_blit_fltk.txt +++ /dev/null @@ -1,67 +0,0 @@ -.. _old_animation-animation_blit_fltk: - -old_animation example code: animation_blit_fltk.py -================================================== - -[`source code `_] - -:: - - from __future__ import print_function - 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/dev/_sources/examples/old_animation/animation_blit_gtk.txt b/dev/_sources/examples/old_animation/animation_blit_gtk.txt deleted file mode 100644 index c439f7eb32d..00000000000 --- a/dev/_sources/examples/old_animation/animation_blit_gtk.txt +++ /dev/null @@ -1,82 +0,0 @@ -.. _old_animation-animation_blit_gtk: - -old_animation example code: animation_blit_gtk.py -================================================= - -[`source code `_] - -:: - - #!/usr/bin/env python - - from __future__ import print_function - - # 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 update_line(*args): - print('you are here', update_line.cnt) - 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(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 - update_line.background = None - - - def start_anim(event): - gobject.idle_add(update_line) - canvas.mpl_disconnect(start_anim.cid) - - start_anim.cid = canvas.mpl_connect('draw_event', start_anim) - - - - plt.show() - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/old_animation/animation_blit_gtk2.txt b/dev/_sources/examples/old_animation/animation_blit_gtk2.txt deleted file mode 100644 index bc82e45e3a3..00000000000 --- a/dev/_sources/examples/old_animation/animation_blit_gtk2.txt +++ /dev/null @@ -1,181 +0,0 @@ -.. _old_animation-animation_blit_gtk2: - -old_animation example code: animation_blit_gtk2.py -================================================== - -[`source code `_] - -:: - - #!/usr/bin/env python - - from __future__ import print_function - - """ - 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/dev/_sources/examples/old_animation/animation_blit_qt.txt b/dev/_sources/examples/old_animation/animation_blit_qt.txt deleted file mode 100644 index d67f60bd945..00000000000 --- a/dev/_sources/examples/old_animation/animation_blit_qt.txt +++ /dev/null @@ -1,78 +0,0 @@ -.. _old_animation-animation_blit_qt: - -old_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 - - from __future__ import print_function - - 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/dev/_sources/examples/old_animation/animation_blit_qt4.txt b/dev/_sources/examples/old_animation/animation_blit_qt4.txt deleted file mode 100644 index 4a1e28df433..00000000000 --- a/dev/_sources/examples/old_animation/animation_blit_qt4.txt +++ /dev/null @@ -1,89 +0,0 @@ -.. _old_animation-animation_blit_qt4: - -old_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 - - from __future__ import print_function - - 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/dev/_sources/examples/old_animation/animation_blit_tk.txt b/dev/_sources/examples/old_animation/animation_blit_tk.txt deleted file mode 100644 index 9d698e269e6..00000000000 --- a/dev/_sources/examples/old_animation/animation_blit_tk.txt +++ /dev/null @@ -1,66 +0,0 @@ -.. _old_animation-animation_blit_tk: - -old_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 - - from __future__ import print_function - - 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/dev/_sources/examples/old_animation/animation_blit_wx.txt b/dev/_sources/examples/old_animation/animation_blit_wx.txt deleted file mode 100644 index 0786c53e8f3..00000000000 --- a/dev/_sources/examples/old_animation/animation_blit_wx.txt +++ /dev/null @@ -1,90 +0,0 @@ -.. _old_animation-animation_blit_wx: - -old_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 - - from __future__ import print_function - - # 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/dev/_sources/examples/old_animation/draggable_legend.txt b/dev/_sources/examples/old_animation/draggable_legend.txt deleted file mode 100644 index 28082efdbcb..00000000000 --- a/dev/_sources/examples/old_animation/draggable_legend.txt +++ /dev/null @@ -1,55 +0,0 @@ -.. _old_animation-draggable_legend: - -old_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("ada.png", asfileobj=False) - arr_ada = read_png(fn) - - imagebox = OffsetImage(arr_ada, 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/dev/_sources/examples/old_animation/dynamic_collection.txt b/dev/_sources/examples/old_animation/dynamic_collection.txt deleted file mode 100644 index 102f08873d5..00000000000 --- a/dev/_sources/examples/old_animation/dynamic_collection.txt +++ /dev/null @@ -1,64 +0,0 @@ -.. _old_animation-dynamic_collection: - -old_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/dev/_sources/examples/old_animation/dynamic_image_gtkagg.txt b/dev/_sources/examples/old_animation/dynamic_image_gtkagg.txt deleted file mode 100644 index 07775c7fe68..00000000000 --- a/dev/_sources/examples/old_animation/dynamic_image_gtkagg.txt +++ /dev/null @@ -1,58 +0,0 @@ -.. _old_animation-dynamic_image_gtkagg: - -old_animation example code: dynamic_image_gtkagg.py -=================================================== - -[`source code `_] - -:: - - #!/usr/bin/env python - - from __future__ import print_function - """ - 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/dev/_sources/examples/old_animation/dynamic_image_wxagg2.txt b/dev/_sources/examples/old_animation/dynamic_image_wxagg2.txt deleted file mode 100644 index 90ef7d4b783..00000000000 --- a/dev/_sources/examples/old_animation/dynamic_image_wxagg2.txt +++ /dev/null @@ -1,112 +0,0 @@ -.. _old_animation-dynamic_image_wxagg2: - -old_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/dev/_sources/examples/old_animation/gtk_timeout.txt b/dev/_sources/examples/old_animation/gtk_timeout.txt deleted file mode 100644 index c28e967a3e2..00000000000 --- a/dev/_sources/examples/old_animation/gtk_timeout.txt +++ /dev/null @@ -1,31 +0,0 @@ -.. _old_animation-gtk_timeout: - -old_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/dev/_sources/examples/old_animation/histogram_tkagg.txt b/dev/_sources/examples/old_animation/histogram_tkagg.txt deleted file mode 100644 index eef82469fc7..00000000000 --- a/dev/_sources/examples/old_animation/histogram_tkagg.txt +++ /dev/null @@ -1,82 +0,0 @@ -.. _old_animation-histogram_tkagg: - -old_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/dev/_sources/examples/old_animation/index.txt b/dev/_sources/examples/old_animation/index.txt deleted file mode 100644 index 33c99f93f94..00000000000 --- a/dev/_sources/examples/old_animation/index.txt +++ /dev/null @@ -1,34 +0,0 @@ -.. _old_animation-examples-index: - -############################################## -old_animation Examples -############################################## - -.. htmlonly:: - - :Release: |version| - :Date: |today| - -.. toctree:: - :maxdepth: 1 - - animate_decay_tk_blit - animation_blit_fltk - animation_blit_gtk - animation_blit_gtk2 - animation_blit_qt - animation_blit_qt4 - animation_blit_tk - animation_blit_wx - draggable_legend - dynamic_collection - dynamic_image_gtkagg - dynamic_image_wxagg2 - gtk_timeout - histogram_tkagg - movie_demo - simple_anim_gtk - simple_anim_tkagg - simple_idle_wx - simple_timer_wx - strip_chart_demo diff --git a/dev/_sources/examples/old_animation/movie_demo.txt b/dev/_sources/examples/old_animation/movie_demo.txt deleted file mode 100644 index a02e72f7b75..00000000000 --- a/dev/_sources/examples/old_animation/movie_demo.txt +++ /dev/null @@ -1,170 +0,0 @@ -.. _old_animation-movie_demo: - -old_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. - # - - from __future__ import print_function - - 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/dev/_sources/examples/old_animation/simple_anim_gtk.txt b/dev/_sources/examples/old_animation/simple_anim_gtk.txt deleted file mode 100644 index 1a44805b829..00000000000 --- a/dev/_sources/examples/old_animation/simple_anim_gtk.txt +++ /dev/null @@ -1,43 +0,0 @@ -.. _old_animation-simple_anim_gtk: - -old_animation example code: simple_anim_gtk.py -============================================== - -[`source code `_] - -:: - - """ - A simple example of an animated plot using a gtk backend - """ - from __future__ import print_function - 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/dev/_sources/examples/old_animation/simple_anim_tkagg.txt b/dev/_sources/examples/old_animation/simple_anim_tkagg.txt deleted file mode 100644 index 238989ee78e..00000000000 --- a/dev/_sources/examples/old_animation/simple_anim_tkagg.txt +++ /dev/null @@ -1,40 +0,0 @@ -.. _old_animation-simple_anim_tkagg: - -old_animation example code: simple_anim_tkagg.py -================================================ - -[`source code `_] - -:: - - #!/usr/bin/env python - - """ - A simple example of an animated plot in tkagg - """ - from __future__ import print_function - 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/dev/_sources/examples/old_animation/simple_idle_wx.txt b/dev/_sources/examples/old_animation/simple_idle_wx.txt deleted file mode 100644 index 4f24f0bf666..00000000000 --- a/dev/_sources/examples/old_animation/simple_idle_wx.txt +++ /dev/null @@ -1,42 +0,0 @@ -.. _old_animation-simple_idle_wx: - -old_animation example code: simple_idle_wx.py -============================================= - -[`source code `_] - -:: - - """ - A simple example of an animated plot using a wx backend - """ - from __future__ import print_function - 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/dev/_sources/examples/old_animation/simple_timer_wx.txt b/dev/_sources/examples/old_animation/simple_timer_wx.txt deleted file mode 100644 index 09fe81068a6..00000000000 --- a/dev/_sources/examples/old_animation/simple_timer_wx.txt +++ /dev/null @@ -1,49 +0,0 @@ -.. _old_animation-simple_timer_wx: - -old_animation example code: simple_timer_wx.py -============================================== - -[`source code `_] - -:: - - from __future__ import print_function - """ - 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/dev/_sources/examples/old_animation/strip_chart_demo.txt b/dev/_sources/examples/old_animation/strip_chart_demo.txt deleted file mode 100644 index c8fbfaad104..00000000000 --- a/dev/_sources/examples/old_animation/strip_chart_demo.txt +++ /dev/null @@ -1,84 +0,0 @@ -.. _old_animation-strip_chart_demo: - -old_animation example code: strip_chart_demo.py -=============================================== - -[`source code `_] - -:: - - """ - Emulate an oscilloscope. Requires the animation API introduced in - matplotlib 0.84. See - http://www.scipy.org/wikis/topical_software/Animations for an - explanation. - - This example uses gtk but does not depend on it intimately. It just - uses the idle handler to trigger events. You can plug this into a - different GUI that supports animation (GTKAgg, TkAgg, WXAgg) and use - your toolkits idle/timer functions. - """ - import gobject - import matplotlib - matplotlib.use('GTKAgg') - import numpy as np - from matplotlib.lines import Line2D - - - class Scope: - def __init__(self, ax, maxt=10, dt=0.01): - self.ax = ax - self.canvas = ax.figure.canvas - self.dt = dt - self.maxt = maxt - self.tdata = [0] - self.ydata = [0] - self.line = Line2D(self.tdata, self.ydata, animated=True) - self.ax.add_line(self.line) - self.background = None - self.canvas.mpl_connect('draw_event', self.update_background) - self.ax.set_ylim(-.1, 1.1) - self.ax.set_xlim(0, self.maxt) - - def update_background(self, event): - self.background = self.canvas.copy_from_bbox(self.ax.bbox) - - def emitter(self, p=0.01): - 'return a random value with probability p, else 0' - v = np.random.rand(1) - if v>p: return 0. - else: return np.random.rand(1) - - def update(self, *args): - if self.background is None: return True - y = self.emitter() - 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() - - self.canvas.restore_region(self.background) - - t = self.tdata[-1] + self.dt - self.tdata.append(t) - self.ydata.append(y) - self.line.set_data(self.tdata, self.ydata) - self.ax.draw_artist(self.line) - - self.canvas.blit(self.ax.bbox) - return True - - - from pylab import figure, show - - fig = figure() - ax = fig.add_subplot(111) - scope = Scope(ax) - gobject.idle_add(scope.update) - - show() - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/pie_and_polar_charts/index.txt b/dev/_sources/examples/pie_and_polar_charts/index.txt deleted file mode 100644 index 4f67152315e..00000000000 --- a/dev/_sources/examples/pie_and_polar_charts/index.txt +++ /dev/null @@ -1,17 +0,0 @@ -.. _pie_and_polar_charts-examples-index: - -############################################## -pie_and_polar_charts Examples -############################################## - -.. htmlonly:: - - :Release: |version| - :Date: |today| - -.. toctree:: - :maxdepth: 1 - - pie_demo_features - polar_bar_demo - polar_scatter_demo diff --git a/dev/_sources/examples/pie_and_polar_charts/pie_demo_features.txt b/dev/_sources/examples/pie_and_polar_charts/pie_demo_features.txt deleted file mode 100644 index cf1271f5081..00000000000 --- a/dev/_sources/examples/pie_and_polar_charts/pie_demo_features.txt +++ /dev/null @@ -1,46 +0,0 @@ -.. _pie_and_polar_charts-pie_demo_features: - -pie_and_polar_charts example code: pie_demo_features.py -======================================================= - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/pie_and_polar_charts/pie_demo_features.py - -:: - - """ - Demo of a basic pie chart plus a few additional features. - - In addition to the basic pie chart, this demo shows a few optional features: - - * slice labels - * auto-labeling the percentage - * offsetting a slice with "explode" - * drop-shadow - * custom start angle - - Note about the custom start angle: - - The default ``startangle`` is 0, which would start the "Frogs" slice on the - positive x-axis. This example sets ``startangle = 90`` such that everything is - rotated counter-clockwise by 90 degrees, and the frog slice starts on the - positive y-axis. - """ - import matplotlib.pyplot as plt - - - # The slices will be ordered and plotted counter-clockwise. - labels = 'Frogs', 'Hogs', 'Dogs', 'Logs' - sizes = [15, 30, 45, 10] - colors = ['yellowgreen', 'gold', 'lightskyblue', 'lightcoral'] - explode = (0, 0.1, 0, 0) # only "explode" the 2nd slice (i.e. 'Hogs') - - plt.pie(sizes, explode=explode, labels=labels, colors=colors, - autopct='%1.1f%%', shadow=True, startangle=90) - # Set aspect ratio to be equal so that pie is drawn as a circle. - plt.axis('equal') - plt.show() - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/pie_and_polar_charts/polar_bar_demo.txt b/dev/_sources/examples/pie_and_polar_charts/polar_bar_demo.txt deleted file mode 100644 index a3cd6e4e0ef..00000000000 --- a/dev/_sources/examples/pie_and_polar_charts/polar_bar_demo.txt +++ /dev/null @@ -1,35 +0,0 @@ -.. _pie_and_polar_charts-polar_bar_demo: - -pie_and_polar_charts example code: polar_bar_demo.py -==================================================== - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/pie_and_polar_charts/polar_bar_demo.py - -:: - - """ - Demo of bar plot on a polar axis. - """ - import numpy as np - import matplotlib.pyplot as plt - - - N = 20 - theta = np.linspace(0.0, 2 * np.pi, N, endpoint=False) - radii = 10 * np.random.rand(N) - width = np.pi / 4 * np.random.rand(N) - - ax = plt.subplot(111, polar=True) - bars = ax.bar(theta, radii, width=width, bottom=0.0) - - # Use custom colors and opacity - for r, bar in zip(radii, bars): - bar.set_facecolor(plt.cm.jet(r / 10.)) - bar.set_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/dev/_sources/examples/pie_and_polar_charts/polar_scatter_demo.txt b/dev/_sources/examples/pie_and_polar_charts/polar_scatter_demo.txt deleted file mode 100644 index acbd956da11..00000000000 --- a/dev/_sources/examples/pie_and_polar_charts/polar_scatter_demo.txt +++ /dev/null @@ -1,35 +0,0 @@ -.. _pie_and_polar_charts-polar_scatter_demo: - -pie_and_polar_charts example code: polar_scatter_demo.py -======================================================== - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/pie_and_polar_charts/polar_scatter_demo.py - -:: - - """ - Demo of scatter plot on a polar axis. - - Size increases radially in this example and color increases with angle (just to - verify the symbols are being scattered correctly). - """ - import numpy as np - import matplotlib.pyplot as plt - - - N = 150 - r = 2 * np.random.rand(N) - theta = 2 * np.pi * np.random.rand(N) - area = 200 * r**2 * np.random.rand(N) - colors = theta - - ax = plt.subplot(111, polar=True) - c = plt.scatter(theta, r, c=colors, s=area, cmap=plt.cm.hsv) - c.set_alpha(0.75) - - plt.show() - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/pylab_examples/accented_text.txt b/dev/_sources/examples/pylab_examples/accented_text.txt deleted file mode 100644 index 393668b6871..00000000000 --- a/dev/_sources/examples/pylab_examples/accented_text.txt +++ /dev/null @@ -1,36 +0,0 @@ -.. _pylab_examples-accented_text: - -pylab_examples example code: accented_text.py -============================================= - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/pylab_examples/accented_text.py - -:: - - #!/usr/bin/env python - """ - matplotlib supports accented characters via TeX mathtext - - The following accents are provided: \hat, \breve, \grave, \bar, - \acute, \tilde, \vec, \dot, \ddot. All of them have the same syntax, - eg to make an overbar you do \bar{o} or to make an o umlaut you do - \ddot{o}. The shortcuts are also provided, eg: \"o \'e \`e \~n \.x - \^y - - """ - from pylab import * - - axes([0.1, 0.15, 0.8, 0.75]) - plot(range(10)) - - title(r'$\ddot{o}\acute{e}\grave{e}\hat{O}\breve{i}\bar{A}\tilde{n}\vec{q}$', fontsize=20) - # shorthand is also supported and curly's are optional - xlabel(r"""$\"o\ddot o \'e\`e\~n\.x\^y$""", fontsize=20) - - - show() - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/pylab_examples/agg_buffer_to_array.txt b/dev/_sources/examples/pylab_examples/agg_buffer_to_array.txt deleted file mode 100644 index 3950c0ede1b..00000000000 --- a/dev/_sources/examples/pylab_examples/agg_buffer_to_array.txt +++ /dev/null @@ -1,38 +0,0 @@ -.. _pylab_examples-agg_buffer_to_array: - -pylab_examples example code: agg_buffer_to_array.py -=================================================== - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/pylab_examples/agg_buffer_to_array.py - -:: - - import matplotlib - from pylab import figure, show - import numpy as np - - # make an agg figure - fig = figure() - ax = fig.add_subplot(111) - ax.plot([1,2,3]) - ax.set_title('a simple figure') - fig.canvas.draw() - - # grab the pixel buffer and dump it into a numpy array - buf = fig.canvas.buffer_rgba() - l, b, w, h = fig.bbox.bounds - # The array needs to be copied, because the underlying buffer - # may be reallocated when the window is resized. - X = np.frombuffer(buf, np.uint8).copy() - X.shape = h,w,4 - - # now display the array X as an Axes in a new figure - fig2 = figure() - ax2 = fig2.add_subplot(111, frameon=False) - ax2.imshow(X) - show() - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/pylab_examples/alignment_test.txt b/dev/_sources/examples/pylab_examples/alignment_test.txt deleted file mode 100644 index b31da31c002..00000000000 --- a/dev/_sources/examples/pylab_examples/alignment_test.txt +++ /dev/null @@ -1,96 +0,0 @@ -.. _pylab_examples-alignment_test: - -pylab_examples example code: alignment_test.py -============================================== - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/pylab_examples/alignment_test.py - -:: - - #!/usr/bin/env python - """ - You can precisely layout text in data or axes (0,1) coordinates. This - example shows you some of the alignment and rotation specifications to - layout text - """ - - from pylab import * - from matplotlib.lines import Line2D - from matplotlib.patches import Rectangle - - # build a rectangle in axes coords - left, width = .25, .5 - bottom, height = .25, .5 - right = left + width - top = bottom + height - ax = gca() - p = Rectangle((left, bottom), width, height, - fill=False, - ) - p.set_transform(ax.transAxes) - p.set_clip_on(False) - ax.add_patch(p) - - - ax.text(left, bottom, 'left top', - horizontalalignment='left', - verticalalignment='top', - transform=ax.transAxes) - - ax.text(left, bottom, 'left bottom', - horizontalalignment='left', - verticalalignment='bottom', - transform=ax.transAxes) - - ax.text(right, top, 'right bottom', - horizontalalignment='right', - verticalalignment='bottom', - transform=ax.transAxes) - - ax.text(right, top, 'right top', - horizontalalignment='right', - verticalalignment='top', - transform=ax.transAxes) - - ax.text(right, bottom, 'center top', - horizontalalignment='center', - verticalalignment='top', - transform=ax.transAxes) - - ax.text(left, 0.5*(bottom+top), 'right center', - horizontalalignment='right', - verticalalignment='center', - rotation='vertical', - transform=ax.transAxes) - - ax.text(left, 0.5*(bottom+top), 'left center', - horizontalalignment='left', - verticalalignment='center', - rotation='vertical', - transform=ax.transAxes) - - ax.text(0.5*(left+right), 0.5*(bottom+top), 'middle', - horizontalalignment='center', - verticalalignment='center', - transform=ax.transAxes) - - ax.text(right, 0.5*(bottom+top), 'centered', - horizontalalignment='center', - verticalalignment='center', - rotation='vertical', - transform=ax.transAxes) - - ax.text(left, top, 'rotated\nwith newlines', - horizontalalignment='center', - verticalalignment='center', - rotation=45, - transform=ax.transAxes) - - axis('off') - - show() - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/pylab_examples/anchored_artists.txt b/dev/_sources/examples/pylab_examples/anchored_artists.txt deleted file mode 100644 index c7418574fdc..00000000000 --- a/dev/_sources/examples/pylab_examples/anchored_artists.txt +++ /dev/null @@ -1,131 +0,0 @@ -.. _pylab_examples-anchored_artists: - -pylab_examples example code: anchored_artists.py -================================================ - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/pylab_examples/anchored_artists.py - -:: - - from matplotlib.patches import Rectangle, Ellipse - - from matplotlib.offsetbox import AnchoredOffsetbox, AuxTransformBox, VPacker,\ - TextArea, DrawingArea - - - class AnchoredText(AnchoredOffsetbox): - def __init__(self, s, loc, pad=0.4, borderpad=0.5, prop=None, frameon=True): - - self.txt = TextArea(s, - minimumdescent=False) - - - super(AnchoredText, self).__init__(loc, pad=pad, borderpad=borderpad, - child=self.txt, - prop=prop, - frameon=frameon) - - - class AnchoredSizeBar(AnchoredOffsetbox): - def __init__(self, transform, size, label, loc, - pad=0.1, borderpad=0.1, sep=2, prop=None, frameon=True): - """ - Draw a horizontal bar with the size in data coordinate of the give axes. - A label will be drawn underneath (center-aligned). - - pad, borderpad in fraction of the legend font size (or prop) - sep in points. - """ - self.size_bar = AuxTransformBox(transform) - self.size_bar.add_artist(Rectangle((0,0), size, 0, fc="none")) - - self.txt_label = TextArea(label, minimumdescent=False) - - self._box = VPacker(children=[self.size_bar, self.txt_label], - align="center", - pad=0, sep=sep) - - AnchoredOffsetbox.__init__(self, loc, pad=pad, borderpad=borderpad, - child=self._box, - prop=prop, - frameon=frameon) - - - class AnchoredEllipse(AnchoredOffsetbox): - def __init__(self, transform, width, height, angle, loc, - pad=0.1, borderpad=0.1, prop=None, frameon=True): - """ - Draw an ellipse the size in data coordinate of the give axes. - - pad, borderpad in fraction of the legend font size (or prop) - """ - self._box = AuxTransformBox(transform) - self.ellipse = Ellipse((0,0), width, height, angle) - self._box.add_artist(self.ellipse) - - AnchoredOffsetbox.__init__(self, loc, pad=pad, borderpad=borderpad, - child=self._box, - prop=prop, - frameon=frameon) - - - - class AnchoredDrawingArea(AnchoredOffsetbox): - def __init__(self, width, height, xdescent, ydescent, - loc, pad=0.4, borderpad=0.5, prop=None, frameon=True): - - self.da = DrawingArea(width, height, xdescent, ydescent, clip=True) - - super(AnchoredDrawingArea, self).__init__(loc, pad=pad, borderpad=borderpad, - child=self.da, - prop=None, - frameon=frameon) - - - - if __name__ == "__main__": - - import matplotlib.pyplot as plt - - ax = plt.gca() - ax.set_aspect(1.) - - at = AnchoredText("Figure 1a", - loc=2, frameon=True) - at.patch.set_boxstyle("round,pad=0.,rounding_size=0.2") - ax.add_artist(at) - - 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) - - # 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) - - # 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) - - 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/dev/_sources/examples/pylab_examples/animation_demo.txt b/dev/_sources/examples/pylab_examples/animation_demo.txt deleted file mode 100644 index b60c86b3429..00000000000 --- a/dev/_sources/examples/pylab_examples/animation_demo.txt +++ /dev/null @@ -1,41 +0,0 @@ -.. _pylab_examples-animation_demo: - -pylab_examples example code: animation_demo.py -============================================== - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/pylab_examples/animation_demo.py - -:: - - """ - Pyplot animation example. - - The method shown here is only for very simple, low-performance - use. For more demanding applications, look at the animation - module and the examples that use it. - """ - - import matplotlib.pyplot as plt - import numpy as np - - x = np.arange(6) - y = np.arange(5) - z = x * y[:,np.newaxis] - - for i in xrange(5): - if i==0: - p = plt.imshow(z) - fig = plt.gcf() - plt.clim() # clamp the color limits - plt.title("Boring slide show") - else: - z = z + 2 - p.set_data(z) - - print("step", i) - plt.pause(0.5) - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/pylab_examples/annotation_demo.txt b/dev/_sources/examples/pylab_examples/annotation_demo.txt deleted file mode 100644 index 63ec1cff0bc..00000000000 --- a/dev/_sources/examples/pylab_examples/annotation_demo.txt +++ /dev/null @@ -1,155 +0,0 @@ -.. _pylab_examples-annotation_demo: - -pylab_examples example code: annotation_demo.py -=============================================== - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/pylab_examples/annotation_demo.py - -:: - - """ - Some examples of how to annotate points in figures. You specify an - annotation point xy=(x,y) and a text point xytext=(x,y) for the - annotated points and text location, respectively. Optionally, you can - specify the coordinate system of xy and xytext with one of the - following strings for xycoords and textcoords (default is 'data') - - - 'figure points' : points from the lower left corner of the figure - 'figure pixels' : pixels from the lower left corner of the figure - 'figure fraction' : 0,0 is lower left of figure and 1,1 is upper, right - 'axes points' : points from lower left corner of axes - 'axes pixels' : pixels from lower left corner of axes - 'axes fraction' : 0,1 is lower left of axes and 1,1 is upper right - 'offset points' : Specify an offset (in points) from the xy value - 'data' : use the axes data coordinate system - - Optionally, you can specify arrow properties which draws and arrow - from the text to the annotated point by giving a dictionary of arrow - properties - - Valid keys are - - width : the width of the arrow in points - frac : the fraction of the arrow length occupied by the head - headwidth : the width of the base of the arrow head in points - shrink : move the tip and base some percent away from the - annotated point and text - any key for matplotlib.patches.polygon (eg facecolor) - - For physical coordinate systems (points or pixels) the origin is the - (bottom, left) of the figure or axes. If the value is negative, - however, the origin is from the (right, top) of the figure or axes, - analogous to negative indexing of sequences. - """ - - - from matplotlib.pyplot import figure, show - from matplotlib.patches import Ellipse - import numpy as np - - - if 1: - # if only one location is given, the text and xypoint being - # annotated are assumed to be the same - fig = figure() - ax = fig.add_subplot(111, autoscale_on=False, xlim=(-1,5), ylim=(-3,5)) - - t = np.arange(0.0, 5.0, 0.01) - s = np.cos(2*np.pi*t) - line, = ax.plot(t, s, lw=3, color='purple') - - ax.annotate('axes center', xy=(.5, .5), xycoords='axes fraction', - horizontalalignment='center', verticalalignment='center') - - ax.annotate('pixels', xy=(20, 20), xycoords='figure pixels') - - ax.annotate('points', xy=(100, 300), xycoords='figure points') - - ax.annotate('offset', xy=(1, 1), xycoords='data', - xytext=(-15, 10), textcoords='offset points', - arrowprops=dict(facecolor='black', shrink=0.05), - horizontalalignment='right', verticalalignment='bottom', - ) - - ax.annotate('local max', xy=(3, 1), xycoords='data', - xytext=(0.8, 0.95), textcoords='axes fraction', - arrowprops=dict(facecolor='black', shrink=0.05), - horizontalalignment='right', verticalalignment='top', - ) - - ax.annotate('a fractional title', xy=(.025, .975), - xycoords='figure fraction', - horizontalalignment='left', verticalalignment='top', - fontsize=20) - - # use negative points or pixels to specify from right, top -10, 10 - # is 10 points to the left of the right side of the axes and 10 - # points above the bottom - ax.annotate('bottom right (points)', xy=(-10, 10), - xycoords='axes points', - horizontalalignment='right', verticalalignment='bottom', - fontsize=20) - - - if 1: - # you can specify the xypoint and the xytext in different - # positions and coordinate systems, and optionally turn on a - # connecting line and mark the point with a marker. Annotations - # work on polar axes too. In the example below, the xy point is - # in native coordinates (xycoords defaults to 'data'). For a - # polar axes, this is in (theta, radius) space. The text in this - # example is placed in the fractional figure coordinate system. - # Text keyword args like horizontal and vertical alignment are - # respected - fig = figure() - ax = fig.add_subplot(111, polar=True) - r = np.arange(0,1,0.001) - theta = 2*2*np.pi*r - line, = ax.plot(theta, r, color='#ee8d18', lw=3) - - ind = 800 - thisr, thistheta = r[ind], theta[ind] - ax.plot([thistheta], [thisr], 'o') - ax.annotate('a polar annotation', - xy=(thistheta, thisr), # theta, radius - xytext=(0.05, 0.05), # fraction, fraction - textcoords='figure fraction', - arrowprops=dict(facecolor='black', shrink=0.05), - horizontalalignment='left', - verticalalignment='bottom', - ) - - - if 1: - # You can also use polar notation on a cartesian axes. Here the - # native coordinate system ('data') is cartesian, so you need to - # specify the xycoords and textcoords as 'polar' if you want to - # use (theta, radius) - - el = Ellipse((0,0), 10, 20, facecolor='r', alpha=0.5) - - fig = figure() - ax = fig.add_subplot(111, aspect='equal') - ax.add_artist(el) - el.set_clip_box(ax.bbox) - ax.annotate('the top', - xy=(np.pi/2., 10.), # theta, radius - xytext=(np.pi/3, 20.), # theta, radius - xycoords='polar', - textcoords='polar', - arrowprops=dict(facecolor='black', shrink=0.05), - horizontalalignment='left', - verticalalignment='bottom', - clip_on=True, # clip to the axes bounding box - ) - - ax.set_xlim(-20, 20) - ax.set_ylim(-20, 20) - - show() - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/pylab_examples/annotation_demo2.txt b/dev/_sources/examples/pylab_examples/annotation_demo2.txt deleted file mode 100644 index 903d634ddcc..00000000000 --- a/dev/_sources/examples/pylab_examples/annotation_demo2.txt +++ /dev/null @@ -1,170 +0,0 @@ -.. _pylab_examples-annotation_demo2: - -pylab_examples example code: annotation_demo2.py -================================================ - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/pylab_examples/annotation_demo2.py - -:: - - - from matplotlib.pyplot import figure, show - from matplotlib.patches import Ellipse - import numpy as np - - if 1: - fig = figure(1,figsize=(8,5)) - ax = fig.add_subplot(111, autoscale_on=False, xlim=(-1,5), ylim=(-4,3)) - - t = np.arange(0.0, 5.0, 0.01) - s = np.cos(2*np.pi*t) - line, = ax.plot(t, s, lw=3, color='purple') - - ax.annotate('arrowstyle', xy=(0, 1), xycoords='data', - xytext=(-50, 30), textcoords='offset points', - arrowprops=dict(arrowstyle="->") - ) - - ax.annotate('arc3', xy=(0.5, -1), xycoords='data', - xytext=(-30, -30), textcoords='offset points', - arrowprops=dict(arrowstyle="->", - connectionstyle="arc3,rad=.2") - ) - - ax.annotate('arc', xy=(1., 1), xycoords='data', - xytext=(-40, 30), textcoords='offset points', - arrowprops=dict(arrowstyle="->", - connectionstyle="arc,angleA=0,armA=30,rad=10"), - ) - - ax.annotate('arc', xy=(1.5, -1), xycoords='data', - xytext=(-40, -30), textcoords='offset points', - arrowprops=dict(arrowstyle="->", - connectionstyle="arc,angleA=0,armA=20,angleB=-90,armB=15,rad=7"), - ) - - ax.annotate('angle', xy=(2., 1), xycoords='data', - xytext=(-50, 30), textcoords='offset points', - arrowprops=dict(arrowstyle="->", - connectionstyle="angle,angleA=0,angleB=90,rad=10"), - ) - - ax.annotate('angle3', xy=(2.5, -1), xycoords='data', - xytext=(-50, -30), textcoords='offset points', - arrowprops=dict(arrowstyle="->", - connectionstyle="angle3,angleA=0,angleB=-90"), - ) - - - ax.annotate('angle', xy=(3., 1), xycoords='data', - xytext=(-50, 30), textcoords='offset points', - bbox=dict(boxstyle="round", fc="0.8"), - arrowprops=dict(arrowstyle="->", - connectionstyle="angle,angleA=0,angleB=90,rad=10"), - ) - - ax.annotate('angle', xy=(3.5, -1), xycoords='data', - xytext=(-70, -60), textcoords='offset points', - size=20, - bbox=dict(boxstyle="round4,pad=.5", fc="0.8"), - arrowprops=dict(arrowstyle="->", - connectionstyle="angle,angleA=0,angleB=-90,rad=10"), - ) - - ax.annotate('angle', xy=(4., 1), xycoords='data', - xytext=(-50, 30), textcoords='offset points', - bbox=dict(boxstyle="round", fc="0.8"), - arrowprops=dict(arrowstyle="->", - shrinkA=0, shrinkB=10, - connectionstyle="angle,angleA=0,angleB=90,rad=10"), - ) - - - ann = ax.annotate('', xy=(4., 1.), xycoords='data', - xytext=(4.5, -1), textcoords='data', - arrowprops=dict(arrowstyle="<->", - connectionstyle="bar", - ec="k", - shrinkA=5, shrinkB=5, - ) - ) - - - if 1: - fig = figure(2) - fig.clf() - ax = fig.add_subplot(111, autoscale_on=False, xlim=(-1,5), ylim=(-5,3)) - - el = Ellipse((2, -1), 0.5, 0.5) - ax.add_patch(el) - - ax.annotate('$->$', xy=(2., -1), xycoords='data', - xytext=(-150, -140), textcoords='offset points', - bbox=dict(boxstyle="round", fc="0.8"), - arrowprops=dict(arrowstyle="->", - patchB=el, - connectionstyle="angle,angleA=90,angleB=0,rad=10"), - ) - - ax.annotate('fancy', xy=(2., -1), xycoords='data', - xytext=(-100, 60), textcoords='offset points', - size=20, - #bbox=dict(boxstyle="round", fc="0.8"), - arrowprops=dict(arrowstyle="fancy", - fc="0.6", ec="none", - patchB=el, - connectionstyle="angle3,angleA=0,angleB=-90"), - ) - - ax.annotate('simple', xy=(2., -1), xycoords='data', - xytext=(100, 60), textcoords='offset points', - size=20, - #bbox=dict(boxstyle="round", fc="0.8"), - arrowprops=dict(arrowstyle="simple", - fc="0.6", ec="none", - patchB=el, - connectionstyle="arc3,rad=0.3"), - ) - - ax.annotate('wedge', xy=(2., -1), xycoords='data', - xytext=(-100, -100), textcoords='offset points', - size=20, - #bbox=dict(boxstyle="round", fc="0.8"), - arrowprops=dict(arrowstyle="wedge,tail_width=0.7", - fc="0.6", ec="none", - patchB=el, - connectionstyle="arc3,rad=-0.3"), - ) - - - ann = ax.annotate('wedge', xy=(2., -1), xycoords='data', - xytext=(0, -45), textcoords='offset points', - size=20, - bbox=dict(boxstyle="round", fc=(1.0, 0.7, 0.7), ec=(1., .5, .5)), - arrowprops=dict(arrowstyle="wedge,tail_width=1.", - fc=(1.0, 0.7, 0.7), ec=(1., .5, .5), - patchA=None, - patchB=el, - relpos=(0.2, 0.8), - connectionstyle="arc3,rad=-0.1"), - ) - - ann = ax.annotate('wedge', xy=(2., -1), xycoords='data', - xytext=(35, 0), textcoords='offset points', - size=20, va="center", - bbox=dict(boxstyle="round", fc=(1.0, 0.7, 0.7), ec="none"), - arrowprops=dict(arrowstyle="wedge,tail_width=1.", - fc=(1.0, 0.7, 0.7), ec="none", - patchA=None, - patchB=el, - relpos=(0.2, 0.5), - ) - ) - - - show() - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/pylab_examples/annotation_demo3.txt b/dev/_sources/examples/pylab_examples/annotation_demo3.txt deleted file mode 100644 index fd727228797..00000000000 --- a/dev/_sources/examples/pylab_examples/annotation_demo3.txt +++ /dev/null @@ -1,115 +0,0 @@ -.. _pylab_examples-annotation_demo3: - -pylab_examples example code: annotation_demo3.py -================================================ - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/pylab_examples/annotation_demo3.py - -:: - - import matplotlib.pyplot as plt - - fig = plt.figure(1) - fig.clf() - - ax1 = plt.subplot(121) - ax2 = plt.subplot(122) - - bbox_args = dict(boxstyle="round", fc="0.8") - arrow_args = dict(arrowstyle="->") - - ax1.annotate('figure fraction : 0, 0', xy=(0, 0), xycoords='figure fraction', - xytext=(20, 20), textcoords='offset points', - ha="left", va="bottom", - bbox=bbox_args, - arrowprops=arrow_args - ) - - ax1.annotate('figure fraction : 1, 1', xy=(1, 1), xycoords='figure fraction', - xytext=(-20, -20), textcoords='offset points', - ha="right", va="top", - bbox=bbox_args, - arrowprops=arrow_args - ) - - ax1.annotate('axes fraction : 0, 0', xy=(0, 0), xycoords='axes fraction', - xytext=(20, 20), textcoords='offset points', - ha="left", va="bottom", - bbox=bbox_args, - arrowprops=arrow_args - ) - - ax1.annotate('axes fraction : 1, 1', xy=(1, 1), xycoords='axes fraction', - xytext=(-20, -20), textcoords='offset points', - ha="right", va="top", - bbox=bbox_args, - arrowprops=arrow_args - ) - - - an1 = ax1.annotate('Drag me 1', xy=(.5, .7), xycoords='data', - #xytext=(.5, .7), textcoords='data', - ha="center", va="center", - bbox=bbox_args, - #arrowprops=arrow_args - ) - - an2 = ax1.annotate('Drag me 2', xy=(.5, .5), xycoords=an1, - xytext=(.5, .3), textcoords='axes fraction', - ha="center", va="center", - bbox=bbox_args, - arrowprops=dict(patchB=an1.get_bbox_patch(), - connectionstyle="arc3,rad=0.2", - **arrow_args) - ) - - an3 = ax1.annotate('', xy=(.5, .5), xycoords=an2, - xytext=(.5, .5), textcoords=an1, - ha="center", va="center", - bbox=bbox_args, - arrowprops=dict(patchA=an1.get_bbox_patch(), - patchB=an2.get_bbox_patch(), - connectionstyle="arc3,rad=0.2", - **arrow_args) - ) - - - - t = ax2.annotate('xy=(0, 1)\nxycoords=("data", "axes fraction")', - xy=(0, 1), xycoords=("data", 'axes fraction'), - xytext=(0, -20), textcoords='offset points', - ha="center", va="top", - bbox=bbox_args, - arrowprops=arrow_args - ) - - from matplotlib.text import OffsetFrom - - ax2.annotate('xy=(0.5, 0)\nxycoords=artist', - xy=(0.5, 0.), xycoords=t, - xytext=(0, -20), textcoords='offset points', - ha="center", va="top", - bbox=bbox_args, - arrowprops=arrow_args - ) - - ax2.annotate('xy=(0.8, 0.5)\nxycoords=ax1.transData', - xy=(0.8, 0.5), xycoords=ax1.transData, - xytext=(10, 10), textcoords=OffsetFrom(ax2.bbox, (0, 0), "points"), - ha="left", va="bottom", - bbox=bbox_args, - arrowprops=arrow_args - ) - - ax2.set_xlim(-2, 2) - ax2.set_ylim(-2, 2) - - an1.draggable() - an2.draggable() - - plt.show() - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/pylab_examples/anscombe.txt b/dev/_sources/examples/pylab_examples/anscombe.txt deleted file mode 100644 index f49dc02a996..00000000000 --- a/dev/_sources/examples/pylab_examples/anscombe.txt +++ /dev/null @@ -1,73 +0,0 @@ -.. _pylab_examples-anscombe: - -pylab_examples example code: anscombe.py -======================================== - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/pylab_examples/anscombe.py - -:: - - #!/usr/bin/env python - - from __future__ import print_function - """ - Edward Tufte uses this example from Anscombe to show 4 datasets of x - and y that have the same mean, standard deviation, and regression - line, but which are qualitatively different. - - matplotlib fun for a rainy day - """ - - from pylab import * - - x = array([10, 8, 13, 9, 11, 14, 6, 4, 12, 7, 5]) - y1 = array([8.04, 6.95, 7.58, 8.81, 8.33, 9.96, 7.24, 4.26, 10.84, 4.82, 5.68]) - y2 = array([9.14, 8.14, 8.74, 8.77, 9.26, 8.10, 6.13, 3.10, 9.13, 7.26, 4.74]) - y3 = array([7.46, 6.77, 12.74, 7.11, 7.81, 8.84, 6.08, 5.39, 8.15, 6.42, 5.73]) - x4 = array([8,8,8,8,8,8,8,19,8,8,8]) - y4 = array([6.58,5.76,7.71,8.84,8.47,7.04,5.25,12.50,5.56,7.91,6.89]) - - def fit(x): - return 3+0.5*x - - - - xfit = array( [amin(x), amax(x) ] ) - - subplot(221) - plot(x,y1,'ks', xfit, fit(xfit), 'r-', lw=2) - axis([2,20,2,14]) - setp(gca(), xticklabels=[], yticks=(4,8,12), xticks=(0,10,20)) - text(3,12, 'I', fontsize=20) - - subplot(222) - plot(x,y2,'ks', xfit, fit(xfit), 'r-', lw=2) - axis([2,20,2,14]) - setp(gca(), xticklabels=[], yticks=(4,8,12), yticklabels=[], xticks=(0,10,20)) - text(3,12, 'II', fontsize=20) - - subplot(223) - plot(x,y3,'ks', xfit, fit(xfit), 'r-', lw=2) - axis([2,20,2,14]) - text(3,12, 'III', fontsize=20) - setp(gca(), yticks=(4,8,12), xticks=(0,10,20)) - - subplot(224) - - xfit = array([amin(x4),amax(x4)]) - plot(x4,y4,'ks', xfit, fit(xfit), 'r-', lw=2) - axis([2,20,2,14]) - setp(gca(), yticklabels=[], yticks=(4,8,12), xticks=(0,10,20)) - text(3,12, 'IV', fontsize=20) - - #verify the stats - pairs = (x,y1), (x,y2), (x,y3), (x4,y4) - for x,y in pairs: - print ('mean=%1.2f, std=%1.2f, r=%1.2f'%(mean(y), std(y), corrcoef(x,y)[0][1])) - - show() - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/pylab_examples/arctest.txt b/dev/_sources/examples/pylab_examples/arctest.txt deleted file mode 100644 index ec4f9423845..00000000000 --- a/dev/_sources/examples/pylab_examples/arctest.txt +++ /dev/null @@ -1,32 +0,0 @@ -.. _pylab_examples-arctest: - -pylab_examples example code: arctest.py -======================================= - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/pylab_examples/arctest.py - -:: - - #!/usr/bin/env python - from pylab import * - - def f(t): - 'a damped exponential' - s1 = cos(2*pi*t) - e1 = exp(-t) - return multiply(s1,e1) - - t1 = arange(0.0, 5.0, .2) - - - l = plot(t1, f(t1), 'ro') - setp(l, 'markersize', 30) - setp(l, 'markerfacecolor', 'b') - - show() - - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/pylab_examples/arrow_demo.txt b/dev/_sources/examples/pylab_examples/arrow_demo.txt deleted file mode 100644 index 85ce551eeb2..00000000000 --- a/dev/_sources/examples/pylab_examples/arrow_demo.txt +++ /dev/null @@ -1,326 +0,0 @@ -.. _pylab_examples-arrow_demo: - -pylab_examples example code: arrow_demo.py -========================================== - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/pylab_examples/arrow_demo.py - -:: - - #!/usr/bin/env python - """Arrow drawing example for the new fancy_arrow facilities. - - Code contributed by: Rob Knight - - usage: - - python arrow_demo.py realistic|full|sample|extreme - - - """ - from pylab import * - - rates_to_bases={'r1':'AT', 'r2':'TA', 'r3':'GA','r4':'AG','r5':'CA','r6':'AC', \ - 'r7':'GT', 'r8':'TG', 'r9':'CT','r10':'TC','r11':'GC','r12':'CG'} - numbered_bases_to_rates = dict([(v,k) for k, v in rates_to_bases.items()]) - lettered_bases_to_rates = dict([(v, 'r'+v) for k, v in rates_to_bases.items()]) - def add_dicts(d1, d2): - """Adds two dicts and returns the result.""" - result = d1.copy() - result.update(d2) - return result - - def make_arrow_plot(data, size=4, display='length', shape='right', \ - max_arrow_width=0.03, arrow_sep = 0.02, alpha=0.5, \ - normalize_data=False, ec=None, labelcolor=None, \ - head_starts_at_zero=True, rate_labels=lettered_bases_to_rates,\ - **kwargs): - """Makes an arrow plot. - - Parameters: - - data: dict with probabilities for the bases and pair transitions. - size: size of the graph in inches. - display: 'length', 'width', or 'alpha' for arrow property to change. - shape: 'full', 'left', or 'right' for full or half arrows. - max_arrow_width: maximum width of an arrow, data coordinates. - arrow_sep: separation between arrows in a pair, data coordinates. - alpha: maximum opacity of arrows, default 0.8. - - **kwargs can be anything allowed by a Arrow object, e.g. - linewidth and edgecolor. - """ - - xlim(-0.5,1.5) - ylim(-0.5,1.5) - gcf().set_size_inches(size,size) - xticks([]) - yticks([]) - max_text_size = size*12 - min_text_size = size - label_text_size = size*2.5 - text_params={'ha':'center', 'va':'center', 'family':'sans-serif',\ - 'fontweight':'bold'} - r2 = sqrt(2) - - deltas = {\ - 'AT':(1,0), - 'TA':(-1,0), - 'GA':(0,1), - 'AG':(0,-1), - 'CA':(-1/r2, 1/r2), - 'AC':(1/r2, -1/r2), - 'GT':(1/r2, 1/r2), - 'TG':(-1/r2,-1/r2), - 'CT':(0,1), - 'TC':(0,-1), - 'GC':(1,0), - 'CG':(-1,0) - } - - colors = {\ - 'AT':'r', - 'TA':'k', - 'GA':'g', - 'AG':'r', - 'CA':'b', - 'AC':'r', - 'GT':'g', - 'TG':'k', - 'CT':'b', - 'TC':'k', - 'GC':'g', - 'CG':'b' - } - - label_positions = {\ - 'AT':'center', - 'TA':'center', - 'GA':'center', - 'AG':'center', - 'CA':'left', - 'AC':'left', - 'GT':'left', - 'TG':'left', - 'CT':'center', - 'TC':'center', - 'GC':'center', - 'CG':'center' - } - - - def do_fontsize(k): - return float(clip(max_text_size*sqrt(data[k]),\ - min_text_size,max_text_size)) - - A = text(0,1, '$A_3$', color='r', size=do_fontsize('A'), **text_params) - T = text(1,1, '$T_3$', color='k', size=do_fontsize('T'), **text_params) - G = text(0,0, '$G_3$', color='g', size=do_fontsize('G'), **text_params) - C = text(1,0, '$C_3$', color='b', size=do_fontsize('C'), **text_params) - - arrow_h_offset = 0.25 #data coordinates, empirically determined - max_arrow_length = 1 - 2*arrow_h_offset - - max_arrow_width = max_arrow_width - max_head_width = 2.5*max_arrow_width - max_head_length = 2*max_arrow_width - arrow_params={'length_includes_head':True, 'shape':shape, \ - 'head_starts_at_zero':head_starts_at_zero} - ax = gca() - sf = 0.6 #max arrow size represents this in data coords - - d = (r2/2 + arrow_h_offset - 0.5)/r2 #distance for diags - r2v = arrow_sep/r2 #offset for diags - - #tuple of x, y for start position - positions = {\ - 'AT': (arrow_h_offset, 1+arrow_sep), - 'TA': (1-arrow_h_offset, 1-arrow_sep), - 'GA': (-arrow_sep, arrow_h_offset), - 'AG': (arrow_sep, 1-arrow_h_offset), - 'CA': (1-d-r2v, d-r2v), - 'AC': (d+r2v, 1-d+r2v), - 'GT': (d-r2v, d+r2v), - 'TG': (1-d+r2v, 1-d-r2v), - 'CT': (1-arrow_sep, arrow_h_offset), - 'TC': (1+arrow_sep, 1-arrow_h_offset), - 'GC': (arrow_h_offset, arrow_sep), - 'CG': (1-arrow_h_offset, -arrow_sep), - } - - if normalize_data: - #find maximum value for rates, i.e. where keys are 2 chars long - max_val = 0 - for k, v in data.items(): - if len(k) == 2: - max_val = max(max_val, v) - #divide rates by max val, multiply by arrow scale factor - for k, v in data.items(): - data[k] = v/max_val*sf - - def draw_arrow(pair, alpha=alpha, ec=ec, labelcolor=labelcolor): - #set the length of the arrow - if display == 'length': - length = max_head_length+(max_arrow_length-max_head_length)*\ - data[pair]/sf - else: - length = max_arrow_length - #set the transparency of the arrow - if display == 'alph': - alpha = min(data[pair]/sf, alpha) - else: - alpha=alpha - #set the width of the arrow - if display == 'width': - scale = data[pair]/sf - width = max_arrow_width*scale - head_width = max_head_width*scale - head_length = max_head_length*scale - else: - width = max_arrow_width - head_width = max_head_width - head_length = max_head_length - - fc = colors[pair] - ec = ec or fc - - x_scale, y_scale = deltas[pair] - x_pos, y_pos = positions[pair] - arrow(x_pos, y_pos, x_scale*length, y_scale*length, \ - fc=fc, ec=ec, alpha=alpha, width=width, head_width=head_width, \ - head_length=head_length, **arrow_params) - - #figure out coordinates for text - #if drawing relative to base: x and y are same as for arrow - #dx and dy are one arrow width left and up - #need to rotate based on direction of arrow, use x_scale and y_scale - #as sin x and cos x? - sx, cx = y_scale, x_scale - - where = label_positions[pair] - if where == 'left': - orig_position = 3*array([[max_arrow_width, max_arrow_width]]) - elif where == 'absolute': - orig_position = array([[max_arrow_length/2.0, 3*max_arrow_width]]) - elif where == 'right': - orig_position = array([[length-3*max_arrow_width,\ - 3*max_arrow_width]]) - elif where == 'center': - orig_position = array([[length/2.0, 3*max_arrow_width]]) - else: - raise ValueError("Got unknown position parameter %s" % where) - - - - M = array([[cx, sx],[-sx,cx]]) - coords = dot(orig_position, M) + [[x_pos, y_pos]] - x, y = ravel(coords) - orig_label = rate_labels[pair] - label = '$%s_{_{\mathrm{%s}}}$' % (orig_label[0], orig_label[1:]) - - text(x, y, label, size=label_text_size, ha='center', va='center', \ - color=labelcolor or fc) - - for p in positions.keys(): - draw_arrow(p) - - #test data - all_on_max = dict([(i, 1) for i in 'TCAG'] + \ - [(i+j, 0.6) for i in 'TCAG' for j in 'TCAG']) - - realistic_data = { - 'A':0.4, - 'T':0.3, - 'G':0.5, - 'C':0.2, - 'AT':0.4, - 'AC':0.3, - 'AG':0.2, - 'TA':0.2, - 'TC':0.3, - 'TG':0.4, - 'CT':0.2, - 'CG':0.3, - 'CA':0.2, - 'GA':0.1, - 'GT':0.4, - 'GC':0.1, - } - - extreme_data = { - 'A':0.75, - 'T':0.10, - 'G':0.10, - 'C':0.05, - 'AT':0.6, - 'AC':0.3, - 'AG':0.1, - 'TA':0.02, - 'TC':0.3, - 'TG':0.01, - 'CT':0.2, - 'CG':0.5, - 'CA':0.2, - 'GA':0.1, - 'GT':0.4, - 'GC':0.2, - } - - sample_data = { - 'A':0.2137, - 'T':0.3541, - 'G':0.1946, - 'C':0.2376, - 'AT':0.0228, - 'AC':0.0684, - 'AG':0.2056, - 'TA':0.0315, - 'TC':0.0629, - 'TG':0.0315, - 'CT':0.1355, - 'CG':0.0401, - 'CA':0.0703, - 'GA':0.1824, - 'GT':0.0387, - 'GC':0.1106, - } - - - if __name__ == '__main__': - from sys import argv - d = None - if len(argv) > 1: - if argv[1] == 'full': - d = all_on_max - scaled = False - elif argv[1] == 'extreme': - d = extreme_data - scaled = False - elif argv[1] == 'realistic': - d = realistic_data - scaled = False - elif argv[1] == 'sample': - d = sample_data - scaled = True - if d is None: - d = all_on_max - scaled=False - if len(argv) > 2: - display = argv[2] - else: - display = 'length' - - size = 4 - figure(figsize=(size,size)) - - make_arrow_plot(d, display=display, linewidth=0.001, edgecolor=None, - normalize_data=scaled, head_starts_at_zero=True, size=size) - - draw() - - show() - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/pylab_examples/arrow_simple_demo.txt b/dev/_sources/examples/pylab_examples/arrow_simple_demo.txt deleted file mode 100644 index 571f695b118..00000000000 --- a/dev/_sources/examples/pylab_examples/arrow_simple_demo.txt +++ /dev/null @@ -1,19 +0,0 @@ -.. _pylab_examples-arrow_simple_demo: - -pylab_examples example code: arrow_simple_demo.py -================================================= - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/pylab_examples/arrow_simple_demo.py - -:: - - import matplotlib.pyplot as plt - - ax = plt.axes() - ax.arrow(0, 0, 0.5, 0.5, head_width=0.05, head_length=0.1, fc='k', ec='k') - plt.show() - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/pylab_examples/aspect_loglog.txt b/dev/_sources/examples/pylab_examples/aspect_loglog.txt deleted file mode 100644 index f8675642190..00000000000 --- a/dev/_sources/examples/pylab_examples/aspect_loglog.txt +++ /dev/null @@ -1,36 +0,0 @@ -.. _pylab_examples-aspect_loglog: - -pylab_examples example code: aspect_loglog.py -============================================= - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/pylab_examples/aspect_loglog.py - -:: - - import matplotlib.pyplot as plt - - ax1 = plt.subplot(121) - ax1.set_xscale("log") - ax1.set_yscale("log") - ax1.set_xlim(1e1, 1e3) - ax1.set_ylim(1e2, 1e3) - ax1.set_aspect(1) - ax1.set_title("adjustable = box") - - ax2 = plt.subplot(122) - ax2.set_xscale("log") - ax2.set_yscale("log") - ax2.set_adjustable("datalim") - ax2.plot([1,3, 10], [1, 9, 100], "o-") - ax2.set_xlim(1e-1, 1e2) - ax2.set_ylim(1e-1, 1e3) - ax2.set_aspect(1) - ax2.set_title("adjustable = datalim") - - 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/dev/_sources/examples/pylab_examples/axes_demo.txt b/dev/_sources/examples/pylab_examples/axes_demo.txt deleted file mode 100644 index 48a7cb3d5c2..00000000000 --- a/dev/_sources/examples/pylab_examples/axes_demo.txt +++ /dev/null @@ -1,46 +0,0 @@ -.. _pylab_examples-axes_demo: - -pylab_examples example code: axes_demo.py -========================================= - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/pylab_examples/axes_demo.py - -:: - - #!/usr/bin/env python - - from pylab import * - - # create some data to use for the plot - dt = 0.001 - t = arange(0.0, 10.0, dt) - r = exp(-t[:1000]/0.05) # impulse response - x = randn(len(t)) - s = convolve(x,r)[:len(x)]*dt # colored noise - - # the main axes is subplot(111) by default - plot(t, s) - axis([0, 1, 1.1*amin(s), 2*amax(s) ]) - xlabel('time (s)') - ylabel('current (nA)') - title('Gaussian colored noise') - - # this is an inset axes over the main axes - a = axes([.65, .6, .2, .2], axisbg='y') - n, bins, patches = hist(s, 400, normed=1) - title('Probability') - setp(a, xticks=[], yticks=[]) - - # this is another inset axes over the main axes - a = axes([0.2, 0.6, .2, .2], axisbg='y') - plot(t[:len(r)], r) - title('Impulse response') - setp(a, xlim=(0,.2), xticks=[], yticks=[]) - - - show() - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/pylab_examples/axes_props.txt b/dev/_sources/examples/pylab_examples/axes_props.txt deleted file mode 100644 index 3d5830d759a..00000000000 --- a/dev/_sources/examples/pylab_examples/axes_props.txt +++ /dev/null @@ -1,76 +0,0 @@ -.. _pylab_examples-axes_props: - -pylab_examples example code: axes_props.py -========================================== - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/pylab_examples/axes_props.py - -:: - - #!/usr/bin/env python - """ - You can control the axis tick and grid properties - """ - - from pylab import * - - t = arange(0.0, 2.0, 0.01) - s = sin(2*pi*t) - plot(t, s) - grid(True) - - # MATLAB style - xticklines = getp(gca(), 'xticklines') - yticklines = getp(gca(), 'yticklines') - xgridlines = getp(gca(), 'xgridlines') - ygridlines = getp(gca(), 'ygridlines') - xticklabels = getp(gca(), 'xticklabels') - yticklabels = getp(gca(), 'yticklabels') - - setp(xticklines, 'linewidth', 3) - setp(yticklines, 'linewidth', 3) - setp(xgridlines, 'linestyle', '-') - setp(ygridlines, 'linestyle', '-') - setp(yticklabels, 'color', 'r', fontsize='medium') - setp(xticklabels, 'color', 'r', fontsize='medium') - - - - show() - - - """ - # the same script, python style - from pylab import * - - t = arange(0.0, 2.0, 0.01) - s = sin(2*pi*t) - ax = subplot(111) - ax.plot(t, s) - ax.grid(True) - - ticklines = ax.get_xticklines() - ticklines.extend( ax.get_yticklines() ) - gridlines = ax.get_xgridlines() - gridlines.extend( ax.get_ygridlines() ) - ticklabels = ax.get_xticklabels() - ticklabels.extend( ax.get_yticklabels() ) - - for line in ticklines: - line.set_linewidth(3) - - for line in gridlines: - line.set_linestyle('-') - - for label in ticklabels: - label.set_color('r') - label.set_fontsize('medium') - - show() - - """ - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/pylab_examples/axes_zoom_effect.txt b/dev/_sources/examples/pylab_examples/axes_zoom_effect.txt deleted file mode 100644 index 42e53d9f40f..00000000000 --- a/dev/_sources/examples/pylab_examples/axes_zoom_effect.txt +++ /dev/null @@ -1,132 +0,0 @@ -.. _pylab_examples-axes_zoom_effect: - -pylab_examples example code: axes_zoom_effect.py -================================================ - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/pylab_examples/axes_zoom_effect.py - -:: - - from matplotlib.transforms import Bbox, TransformedBbox, \ - blended_transform_factory - - from mpl_toolkits.axes_grid1.inset_locator import BboxPatch, BboxConnector,\ - BboxConnectorPatch - - - def connect_bbox(bbox1, bbox2, - loc1a, loc2a, loc1b, loc2b, - prop_lines, prop_patches=None): - if prop_patches is None: - prop_patches = prop_lines.copy() - prop_patches["alpha"] = prop_patches.get("alpha", 1)*0.2 - - c1 = BboxConnector(bbox1, bbox2, loc1=loc1a, loc2=loc2a, **prop_lines) - c1.set_clip_on(False) - c2 = BboxConnector(bbox1, bbox2, loc1=loc1b, loc2=loc2b, **prop_lines) - c2.set_clip_on(False) - - bbox_patch1 = BboxPatch(bbox1, **prop_patches) - bbox_patch2 = BboxPatch(bbox2, **prop_patches) - - p = BboxConnectorPatch(bbox1, bbox2, - #loc1a=3, loc2a=2, loc1b=4, loc2b=1, - loc1a=loc1a, loc2a=loc2a, loc1b=loc1b, loc2b=loc2b, - **prop_patches) - p.set_clip_on(False) - - return c1, c2, bbox_patch1, bbox_patch2, p - - - def zoom_effect01(ax1, ax2, xmin, xmax, **kwargs): - """ - ax1 : the main axes - ax1 : the zoomed axes - (xmin,xmax) : the limits of the colored area in both plot axes. - - connect ax1 & ax2. The x-range of (xmin, xmax) in both axes will - be marked. The keywords parameters will be used ti create - patches. - - """ - - trans1 = blended_transform_factory(ax1.transData, ax1.transAxes) - trans2 = blended_transform_factory(ax2.transData, ax2.transAxes) - - bbox = Bbox.from_extents(xmin, 0, xmax, 1) - - mybbox1 = TransformedBbox(bbox, trans1) - mybbox2 = TransformedBbox(bbox, trans2) - - prop_patches=kwargs.copy() - prop_patches["ec"]="none" - prop_patches["alpha"]=0.2 - - c1, c2, bbox_patch1, bbox_patch2, p = \ - connect_bbox(mybbox1, mybbox2, - loc1a=3, loc2a=2, loc1b=4, loc2b=1, - prop_lines=kwargs, prop_patches=prop_patches) - - ax1.add_patch(bbox_patch1) - ax2.add_patch(bbox_patch2) - ax2.add_patch(c1) - ax2.add_patch(c2) - ax2.add_patch(p) - - return c1, c2, bbox_patch1, bbox_patch2, p - - - def zoom_effect02(ax1, ax2, **kwargs): - """ - ax1 : the main axes - ax1 : the zoomed axes - - Similar to zoom_effect01. The xmin & xmax will be taken from the - ax1.viewLim. - """ - - tt = ax1.transScale + (ax1.transLimits + ax2.transAxes) - trans = blended_transform_factory(ax2.transData, tt) - - mybbox1 = ax1.bbox - mybbox2 = TransformedBbox(ax1.viewLim, trans) - - prop_patches=kwargs.copy() - prop_patches["ec"]="none" - prop_patches["alpha"]=0.2 - - c1, c2, bbox_patch1, bbox_patch2, p = \ - connect_bbox(mybbox1, mybbox2, - loc1a=3, loc2a=2, loc1b=4, loc2b=1, - prop_lines=kwargs, prop_patches=prop_patches) - - ax1.add_patch(bbox_patch1) - ax2.add_patch(bbox_patch2) - ax2.add_patch(c1) - ax2.add_patch(c2) - ax2.add_patch(p) - - return c1, c2, bbox_patch1, bbox_patch2, p - - - import matplotlib.pyplot as plt - - plt.figure(1, figsize=(5,5)) - ax1 = plt.subplot(221) - ax2 = plt.subplot(212) - ax2.set_xlim(0, 1) - ax2.set_xlim(0, 5) - zoom_effect01(ax1, ax2, 0.2, 0.8) - - - ax1 = plt.subplot(222) - ax1.set_xlim(2, 3) - ax2.set_xlim(0, 5) - zoom_effect02(ax1, ax2) - - plt.show() - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/pylab_examples/axhspan_demo.txt b/dev/_sources/examples/pylab_examples/axhspan_demo.txt deleted file mode 100644 index 2583557de4f..00000000000 --- a/dev/_sources/examples/pylab_examples/axhspan_demo.txt +++ /dev/null @@ -1,46 +0,0 @@ -.. _pylab_examples-axhspan_demo: - -pylab_examples example code: axhspan_demo.py -============================================ - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/pylab_examples/axhspan_demo.py - -:: - - import numpy as np - import matplotlib.pyplot as plt - - t = np.arange(-1,2, .01) - s = np.sin(2*np.pi*t) - - plt.plot(t,s) - # draw a thick red hline at y=0 that spans the xrange - l = plt.axhline(linewidth=4, color='r') - - # draw a default hline at y=1 that spans the xrange - l = plt.axhline(y=1) - - # draw a default vline at x=1 that spans the yrange - l = plt.axvline(x=1) - - # draw a thick blue vline at x=0 that spans the upper quadrant of - # the yrange - l = plt.axvline(x=0, ymin=0.75, linewidth=4, color='b') - - # draw a default hline at y=.5 that spans the the middle half of - # the axes - l = plt.axhline(y=.5, xmin=0.25, xmax=0.75) - - p = plt.axhspan(0.25, 0.75, facecolor='0.5', alpha=0.5) - - p = plt.axvspan(1.25, 1.55, facecolor='g', alpha=0.5) - - plt.axis([-1,2,-1,2]) - - - plt.show() - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/pylab_examples/axis_equal_demo.txt b/dev/_sources/examples/pylab_examples/axis_equal_demo.txt deleted file mode 100644 index e78c2da4227..00000000000 --- a/dev/_sources/examples/pylab_examples/axis_equal_demo.txt +++ /dev/null @@ -1,50 +0,0 @@ -.. _pylab_examples-axis_equal_demo: - -pylab_examples example code: axis_equal_demo.py -=============================================== - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/pylab_examples/axis_equal_demo.py - -:: - - '''This example is only interesting when ran in interactive mode''' - - from pylab import * - - # Plot circle or radius 3 - - an = linspace(0,2*pi,100) - - subplot(221) - plot( 3*cos(an), 3*sin(an) ) - title('not equal, looks like ellipse',fontsize=10) - - subplot(222) - plot( 3*cos(an), 3*sin(an) ) - axis('equal') - title('equal, looks like circle',fontsize=10) - - subplot(223) - plot( 3*cos(an), 3*sin(an) ) - axis('equal') - axis([-3,3,-3,3]) - title('looks like circle, even after changing limits',fontsize=10) - - subplot(224) - plot( 3*cos(an), 3*sin(an) ) - axis('equal') - axis([-3,3,-3,3]) - plot([0,4],[0,4]) - title('still equal after adding line',fontsize=10) - - show() - - - - - - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/pylab_examples/bar_stacked.txt b/dev/_sources/examples/pylab_examples/bar_stacked.txt deleted file mode 100644 index cf1c612622e..00000000000 --- a/dev/_sources/examples/pylab_examples/bar_stacked.txt +++ /dev/null @@ -1,39 +0,0 @@ -.. _pylab_examples-bar_stacked: - -pylab_examples example code: bar_stacked.py -=========================================== - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/pylab_examples/bar_stacked.py - -:: - - #!/usr/bin/env python - # a stacked bar plot with errorbars - import numpy as np - import matplotlib.pyplot as plt - - - N = 5 - menMeans = (20, 35, 30, 35, 27) - womenMeans = (25, 32, 34, 20, 25) - menStd = (2, 3, 4, 1, 2) - womenStd = (3, 5, 2, 3, 3) - ind = np.arange(N) # the x locations for the groups - width = 0.35 # the width of the bars: can also be len(x) sequence - - p1 = plt.bar(ind, menMeans, width, color='r', yerr=womenStd) - p2 = plt.bar(ind, womenMeans, width, color='y', - bottom=menMeans, yerr=menStd) - - plt.ylabel('Scores') - plt.title('Scores by group and gender') - plt.xticks(ind+width/2., ('G1', 'G2', 'G3', 'G4', 'G5') ) - plt.yticks(np.arange(0,81,10)) - plt.legend( (p1[0], p2[0]), ('Men', 'Women') ) - - plt.show() - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/pylab_examples/barb_demo.txt b/dev/_sources/examples/pylab_examples/barb_demo.txt deleted file mode 100644 index 65962e668e8..00000000000 --- a/dev/_sources/examples/pylab_examples/barb_demo.txt +++ /dev/null @@ -1,67 +0,0 @@ -.. _pylab_examples-barb_demo: - -pylab_examples example code: barb_demo.py -========================================= - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/pylab_examples/barb_demo.py - -:: - - ''' - Demonstration of wind barb plots - ''' - import matplotlib.pyplot as plt - import numpy as np - - x = np.linspace(-5, 5, 5) - X,Y = np.meshgrid(x, x) - U, V = 12*X, 12*Y - - data = [(-1.5, .5, -6, -6), - (1, -1, -46, 46), - (-3, -1, 11, -11), - (1, 1.5, 80, 80), - (0.5, 0.25, 25, 15), - (-1.5, -0.5, -5, 40)] - - data = np.array(data, dtype=[('x', np.float32), ('y', np.float32), - ('u', np.float32), ('v', np.float32)]) - - #Default parameters, uniform grid - ax = plt.subplot(2,2,1) - ax.barbs(X, Y, U, V) - - #Arbitrary set of vectors, make them longer and change the pivot point - #(point around which they're rotated) to be the middle - ax = plt.subplot(2,2,2) - ax.barbs(data['x'], data['y'], data['u'], data['v'], length=8, pivot='middle') - - #Showing colormapping with uniform grid. Fill the circle for an empty barb, - #don't round the values, and change some of the size parameters - ax = plt.subplot(2,2,3) - ax.barbs(X, Y, U, V, np.sqrt(U*U + V*V), fill_empty=True, rounding=False, - sizes=dict(emptybarb=0.25, spacing=0.2, height=0.3)) - - #Change colors as well as the increments for parts of the barbs - ax = plt.subplot(2,2,4) - ax.barbs(data['x'], data['y'], data['u'], data['v'], flagcolor='r', - barbcolor=['b','g'], barb_increments=dict(half=10, full=20, flag=100), - flip_barb=True) - - #Masked arrays are also supported - masked_u = np.ma.masked_array(data['u']) - masked_u[4] = 1000 #Bad value that should not be plotted when masked - masked_u[4] = np.ma.masked - - #Identical plot to panel 2 in the first figure, but with the point at - #(0.5, 0.25) missing (masked) - fig2 = plt.figure() - ax = fig2.add_subplot(1, 1, 1) - ax.barbs(data['x'], data['y'], masked_u, data['v'], length=8, pivot='middle') - - plt.show() - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/pylab_examples/barchart_demo.txt b/dev/_sources/examples/pylab_examples/barchart_demo.txt deleted file mode 100644 index e1f0b12b99d..00000000000 --- a/dev/_sources/examples/pylab_examples/barchart_demo.txt +++ /dev/null @@ -1,57 +0,0 @@ -.. _pylab_examples-barchart_demo: - -pylab_examples example code: barchart_demo.py -============================================= - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/pylab_examples/barchart_demo.py - -:: - - """ - Bar chart demo with pairs of bars grouped for easy comparison. - """ - import numpy as np - import matplotlib.pyplot as plt - - - n_groups = 5 - - means_men = (20, 35, 30, 35, 27) - std_men = (2, 3, 4, 1, 2) - - means_women = (25, 32, 34, 20, 25) - std_women = (3, 5, 2, 3, 3) - - index = np.arange(n_groups) - bar_width = 0.35 - - opacity = 0.4 - error_config = {'ecolor': '0.3'} - - rects1 = plt.bar(index, means_men, bar_width, - alpha=opacity, - color='b', - yerr=std_men, - error_kw=error_config, - label='Men') - - rects2 = plt.bar(index + bar_width, means_women, bar_width, - alpha=opacity, - color='r', - yerr=std_women, - error_kw=error_config, - label='Women') - - plt.xlabel('Group') - plt.ylabel('Scores') - plt.title('Scores by group and gender') - plt.xticks(index + bar_width, ('A', 'B', 'C', 'D', 'E')) - plt.legend() - - plt.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/dev/_sources/examples/pylab_examples/barchart_demo2.txt b/dev/_sources/examples/pylab_examples/barchart_demo2.txt deleted file mode 100644 index d8d2a3f6467..00000000000 --- a/dev/_sources/examples/pylab_examples/barchart_demo2.txt +++ /dev/null @@ -1,121 +0,0 @@ -.. _pylab_examples-barchart_demo2: - -pylab_examples example code: barchart_demo2.py -============================================== - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/pylab_examples/barchart_demo2.py - -:: - - """ - Thanks Josh Hemann for the example - - This examples comes from an application in which grade school gym - teachers wanted to be able to show parents how their child did across - a handful of fitness tests, and importantly, relative to how other - children did. To extract the plotting code for demo purposes, we'll - just make up some data for little Johnny Doe... - - """ - import numpy as np - import matplotlib.pyplot as plt - import pylab - from matplotlib.patches import Polygon - from matplotlib.ticker import MaxNLocator - - - - student = 'Johnny Doe' - grade = 2 - gender = 'boy' - cohortSize = 62 #The number of other 2nd grade boys - - numTests = 5 - testNames = ['Pacer Test', 'Flexed Arm\n Hang', 'Mile Run', 'Agility', - 'Push Ups'] - testMeta = ['laps', 'sec', 'min:sec', 'sec', ''] - scores = ['7', '48', '12:52', '17', '14'] - rankings = np.round(np.random.uniform(0, 1, numTests)*100, 0) - - fig = plt.figure(figsize=(9,7)) - ax1 = fig.add_subplot(111) - plt.subplots_adjust(left=0.115, right=0.88) - fig.canvas.set_window_title('Eldorado K-8 Fitness Chart') - pos = np.arange(numTests)+0.5 #Center bars on the Y-axis ticks - rects = ax1.barh(pos, rankings, align='center', height=0.5, color='m') - - ax1.axis([0,100,0,5]) - pylab.yticks(pos, testNames) - ax1.set_title('Johnny Doe') - plt.text(50, -0.5, 'Cohort Size: ' + str(cohortSize), - horizontalalignment='center', size='small') - - # Set the right-hand Y-axis ticks and labels and set X-axis tick marks at the - # deciles - ax2 = ax1.twinx() - ax2.plot([100,100], [0, 5], 'white', alpha=0.1) - ax2.xaxis.set_major_locator(MaxNLocator(11)) - xticks = pylab.setp(ax2, xticklabels=['0','10','20','30','40','50','60', - '70', - '80','90','100']) - ax2.xaxis.grid(True, linestyle='--', which='major', color='grey', - alpha=0.25) - #Plot a solid vertical gridline to highlight the median position - plt.plot([50,50], [0, 5], 'grey', alpha=0.25) - - # Build up the score labels for the right Y-axis by first appending a carriage - # return to each string and then tacking on the appropriate meta information - # (i.e., 'laps' vs 'seconds'). We want the labels centered on the ticks, so if - # there is no meta info (like for pushups) then don't add the carriage return to - # the string - - def withnew(i, scr): - if testMeta[i] != '' : return '%s\n'%scr - else: return scr - scoreLabels = [withnew(i, scr) for i,scr in enumerate(scores)] - scoreLabels = [i+j for i,j in zip(scoreLabels, testMeta)] - pylab.yticks(pos, scoreLabels) - ax2.set_ylabel('Test Scores') - #Make list of numerical suffixes corresponding to position in a list - # 0 1 2 3 4 5 6 7 8 9 - suffixes =['th', 'st', 'nd', 'rd', 'th', 'th', 'th', 'th', 'th', 'th'] - ax2.set_xlabel('Percentile Ranking Across ' + str(grade) + suffixes[grade] \ - + ' Grade ' + gender.title() + 's') - - # Lastly, write in the ranking inside each bar to aid in interpretation - for rect in rects: - # Rectangle widths are already integer-valued but are floating - # type, so it helps to remove the trailing decimal point and 0 by - # converting width to int type - width = int(rect.get_width()) - - # Figure out what the last digit (width modulo 10) so we can add - # the appropriate numerical suffix (e.g., 1st, 2nd, 3rd, etc) - lastDigit = width % 10 - # Note that 11, 12, and 13 are special cases - if (width == 11) or (width == 12) or (width == 13): - suffix = 'th' - else: - suffix = suffixes[lastDigit] - - rankStr = str(width) + suffix - if (width < 5): # The bars aren't wide enough to print the ranking inside - xloc = width + 1 # Shift the text to the right side of the right edge - clr = 'black' # Black against white background - align = 'left' - else: - xloc = 0.98*width # Shift the text to the left side of the right edge - clr = 'white' # White on magenta - align = 'right' - - yloc = rect.get_y()+rect.get_height()/2.0 #Center the text vertically in the bar - ax1.text(xloc, yloc, rankStr, horizontalalignment=align, - verticalalignment='center', color=clr, weight='bold') - - plt.show() - - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/pylab_examples/barcode_demo.txt b/dev/_sources/examples/pylab_examples/barcode_demo.txt deleted file mode 100644 index 194c7cad2eb..00000000000 --- a/dev/_sources/examples/pylab_examples/barcode_demo.txt +++ /dev/null @@ -1,40 +0,0 @@ -.. _pylab_examples-barcode_demo: - -pylab_examples example code: barcode_demo.py -============================================ - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/pylab_examples/barcode_demo.py - -:: - - from matplotlib.pyplot import figure, show, cm - from numpy import where - from numpy.random import rand - - # the bar - x = where(rand(500)>0.7, 1.0, 0.0) - - axprops = dict(xticks=[], yticks=[]) - barprops = dict(aspect='auto', cmap=cm.binary, interpolation='nearest') - - fig = figure() - - # a vertical barcode -- this is broken at present - x.shape = len(x), 1 - ax = fig.add_axes([0.1, 0.3, 0.1, 0.6], **axprops) - ax.imshow(x, **barprops) - - x = x.copy() - # a horizontal barcode - x.shape = 1, len(x) - ax = fig.add_axes([0.3, 0.1, 0.6, 0.1], **axprops) - ax.imshow(x, **barprops) - - - show() - - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/pylab_examples/barh_demo.txt b/dev/_sources/examples/pylab_examples/barh_demo.txt deleted file mode 100644 index 10f0d3d8fcc..00000000000 --- a/dev/_sources/examples/pylab_examples/barh_demo.txt +++ /dev/null @@ -1,34 +0,0 @@ -.. _pylab_examples-barh_demo: - -pylab_examples example code: barh_demo.py -========================================= - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/pylab_examples/barh_demo.py - -:: - - #!/usr/bin/env python - # make a horizontal bar chart - - from pylab import * - val = 3+10*rand(5) # the bar lengths - pos = arange(5)+.5 # the bar centers on the y axis - - figure(1) - barh(pos,val, align='center') - yticks(pos, ('Tom', 'Dick', 'Harry', 'Slim', 'Jim')) - xlabel('Performance') - title('How fast do you want to go today?') - grid(True) - - figure(2) - barh(pos,val, xerr=rand(5), ecolor='r', align='center') - yticks(pos, ('Tom', 'Dick', 'Harry', 'Slim', 'Jim')) - xlabel('Performance') - - show() - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/pylab_examples/boxplot_demo.txt b/dev/_sources/examples/pylab_examples/boxplot_demo.txt deleted file mode 100644 index d9052fb4925..00000000000 --- a/dev/_sources/examples/pylab_examples/boxplot_demo.txt +++ /dev/null @@ -1,72 +0,0 @@ -.. _pylab_examples-boxplot_demo: - -pylab_examples example code: boxplot_demo.py -============================================ - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/pylab_examples/boxplot_demo.py - -:: - - #!/usr/bin/python - - # - # Example boxplot code - # - - from pylab import * - - # fake up some data - spread= rand(50) * 100 - center = ones(25) * 50 - flier_high = rand(10) * 100 + 100 - flier_low = rand(10) * -100 - data =concatenate((spread, center, flier_high, flier_low), 0) - - # basic plot - boxplot(data) - - # notched plot - figure() - boxplot(data,1) - - # change outlier point symbols - figure() - boxplot(data,0,'gD') - - # don't show outlier points - figure() - boxplot(data,0,'') - - # horizontal boxes - figure() - boxplot(data,0,'rs',0) - - # change whisker length - figure() - boxplot(data,0,'rs',0,0.75) - - # fake up some more data - spread= rand(50) * 100 - center = ones(25) * 40 - flier_high = rand(10) * 100 + 100 - flier_low = rand(10) * -100 - d2 = concatenate( (spread, center, flier_high, flier_low), 0 ) - data.shape = (-1, 1) - d2.shape = (-1, 1) - #data = concatenate( (data, d2), 1 ) - # Making a 2-D array only works if all the columns are the - # same length. If they are not, then use a list instead. - # This is actually more efficient because boxplot converts - # a 2-D array into a list of vectors internally anyway. - data = [data, d2, d2[::2,0]] - # multiple box plots on one figure - figure() - boxplot(data) - - show() - - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/pylab_examples/boxplot_demo2.txt b/dev/_sources/examples/pylab_examples/boxplot_demo2.txt deleted file mode 100644 index e24fd7e364b..00000000000 --- a/dev/_sources/examples/pylab_examples/boxplot_demo2.txt +++ /dev/null @@ -1,135 +0,0 @@ -.. _pylab_examples-boxplot_demo2: - -pylab_examples example code: boxplot_demo2.py -============================================= - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/pylab_examples/boxplot_demo2.py - -:: - - """ - Thanks Josh Hemann for the example - """ - - import numpy as np - import matplotlib.pyplot as plt - from matplotlib.patches import Polygon - - - # Generate some data from five different probability distributions, - # each with different characteristics. We want to play with how an IID - # bootstrap resample of the data preserves the distributional - # properties of the original sample, and a boxplot is one visual tool - # to make this assessment - numDists = 5 - randomDists = ['Normal(1,1)',' Lognormal(1,1)', 'Exp(1)', 'Gumbel(6,4)', - 'Triangular(2,9,11)'] - N = 500 - norm = np.random.normal(1,1, N) - logn = np.random.lognormal(1,1, N) - expo = np.random.exponential(1, N) - gumb = np.random.gumbel(6, 4, N) - tria = np.random.triangular(2, 9, 11, N) - - # Generate some random indices that we'll use to resample the original data - # arrays. For code brevity, just use the same random indices for each array - bootstrapIndices = np.random.random_integers(0, N-1, N) - normBoot = norm[bootstrapIndices] - expoBoot = expo[bootstrapIndices] - gumbBoot = gumb[bootstrapIndices] - lognBoot = logn[bootstrapIndices] - triaBoot = tria[bootstrapIndices] - - data = [norm, normBoot, logn, lognBoot, expo, expoBoot, gumb, gumbBoot, - tria, triaBoot] - - fig = plt.figure(figsize=(10,6)) - fig.canvas.set_window_title('A Boxplot Example') - ax1 = fig.add_subplot(111) - plt.subplots_adjust(left=0.075, right=0.95, top=0.9, bottom=0.25) - - bp = plt.boxplot(data, notch=0, sym='+', vert=1, whis=1.5) - plt.setp(bp['boxes'], color='black') - plt.setp(bp['whiskers'], color='black') - plt.setp(bp['fliers'], color='red', marker='+') - - # Add a horizontal grid to the plot, but make it very light in color - # so we can use it for reading data values but not be distracting - ax1.yaxis.grid(True, linestyle='-', which='major', color='lightgrey', - alpha=0.5) - - # Hide these grid behind plot objects - ax1.set_axisbelow(True) - ax1.set_title('Comparison of IID Bootstrap Resampling Across Five Distributions') - ax1.set_xlabel('Distribution') - ax1.set_ylabel('Value') - - # Now fill the boxes with desired colors - boxColors = ['darkkhaki','royalblue'] - numBoxes = numDists*2 - medians = range(numBoxes) - for i in range(numBoxes): - box = bp['boxes'][i] - boxX = [] - boxY = [] - for j in range(5): - boxX.append(box.get_xdata()[j]) - boxY.append(box.get_ydata()[j]) - boxCoords = zip(boxX,boxY) - # Alternate between Dark Khaki and Royal Blue - k = i % 2 - boxPolygon = Polygon(boxCoords, facecolor=boxColors[k]) - ax1.add_patch(boxPolygon) - # Now draw the median lines back over what we just filled in - med = bp['medians'][i] - medianX = [] - medianY = [] - for j in range(2): - medianX.append(med.get_xdata()[j]) - medianY.append(med.get_ydata()[j]) - plt.plot(medianX, medianY, 'k') - medians[i] = medianY[0] - # Finally, overplot the sample averages, with horizontal alignment - # in the center of each box - plt.plot([np.average(med.get_xdata())], [np.average(data[i])], - color='w', marker='*', markeredgecolor='k') - - # Set the axes ranges and axes labels - ax1.set_xlim(0.5, numBoxes+0.5) - top = 40 - bottom = -5 - ax1.set_ylim(bottom, top) - xtickNames = plt.setp(ax1, xticklabels=np.repeat(randomDists, 2)) - plt.setp(xtickNames, rotation=45, fontsize=8) - - # Due to the Y-axis scale being different across samples, it can be - # hard to compare differences in medians across the samples. Add upper - # X-axis tick labels with the sample medians to aid in comparison - # (just use two decimal places of precision) - pos = np.arange(numBoxes)+1 - upperLabels = [str(np.round(s, 2)) for s in medians] - weights = ['bold', 'semibold'] - for tick,label in zip(range(numBoxes),ax1.get_xticklabels()): - k = tick % 2 - ax1.text(pos[tick], top-(top*0.05), upperLabels[tick], - horizontalalignment='center', size='x-small', weight=weights[k], - color=boxColors[k]) - - # Finally, add a basic legend - plt.figtext(0.80, 0.08, str(N) + ' Random Numbers' , - backgroundcolor=boxColors[0], color='black', weight='roman', - size='x-small') - plt.figtext(0.80, 0.045, 'IID Bootstrap Resample', - backgroundcolor=boxColors[1], - color='white', weight='roman', size='x-small') - plt.figtext(0.80, 0.015, '*', color='white', backgroundcolor='silver', - weight='roman', size='medium') - plt.figtext(0.815, 0.013, ' Average Value', color='black', weight='roman', - size='x-small') - - plt.show() - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/pylab_examples/boxplot_demo3.txt b/dev/_sources/examples/pylab_examples/boxplot_demo3.txt deleted file mode 100644 index 1d0fc5d9efd..00000000000 --- a/dev/_sources/examples/pylab_examples/boxplot_demo3.txt +++ /dev/null @@ -1,63 +0,0 @@ -.. _pylab_examples-boxplot_demo3: - -pylab_examples example code: boxplot_demo3.py -============================================= - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/pylab_examples/boxplot_demo3.py - -:: - - import matplotlib.pyplot as plt - import matplotlib.transforms as mtransforms - import numpy as np - - def fakeBootStrapper(n): - ''' - This is just a placeholder for the user's method of - bootstrapping the median and its confidence intervals. - - Returns an arbitrary median and confidence intervals - packed into a tuple - ''' - if n == 1: - med = 0.1 - CI = (-0.25, 0.25) - else: - med = 0.2 - CI = (-0.35, 0.50) - - return med, CI - - - - np.random.seed(2) - inc = 0.1 - e1 = np.random.normal(0, 1, size=(500,)) - e2 = np.random.normal(0, 1, size=(500,)) - e3 = np.random.normal(0, 1 + inc, size=(500,)) - e4 = np.random.normal(0, 1 + 2*inc, size=(500,)) - - treatments = [e1,e2,e3,e4] - med1, CI1 = fakeBootStrapper(1) - med2, CI2 = fakeBootStrapper(2) - medians = [None, None, med1, med2] - conf_intervals = [None, None, CI1, CI2] - - fig = plt.figure() - ax = fig.add_subplot(111) - pos = np.array(range(len(treatments)))+1 - bp = ax.boxplot(treatments, sym='k+', positions=pos, - notch=1, bootstrap=5000, - usermedians=medians, - conf_intervals=conf_intervals) - - ax.set_xlabel('treatment') - ax.set_ylabel('response') - plt.setp(bp['whiskers'], color='k', linestyle='-' ) - plt.setp(bp['fliers'], markersize=3.0) - plt.show() - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/pylab_examples/break.txt b/dev/_sources/examples/pylab_examples/break.txt deleted file mode 100644 index ceeb3f35591..00000000000 --- a/dev/_sources/examples/pylab_examples/break.txt +++ /dev/null @@ -1,22 +0,0 @@ -.. _pylab_examples-break: - -pylab_examples example code: break.py -===================================== - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/pylab_examples/break.py - -:: - - #!/usr/bin/env python - from pylab import * - - - gcf().text(0.5, 0.95, - 'Distance Histograms by Category is a really long title') - - show() - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/pylab_examples/broken_axis.txt b/dev/_sources/examples/pylab_examples/broken_axis.txt deleted file mode 100644 index 69fe1ee5b63..00000000000 --- a/dev/_sources/examples/pylab_examples/broken_axis.txt +++ /dev/null @@ -1,75 +0,0 @@ -.. _pylab_examples-broken_axis: - -pylab_examples example code: broken_axis.py -=========================================== - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/pylab_examples/broken_axis.py - -:: - - """ - Broken axis example, where the y-axis will have a portion cut out. - """ - import matplotlib.pylab as plt - import numpy as np - - - # 30 points between 0 0.2] originally made using np.random.rand(30)*.2 - pts = np.array([ 0.015, 0.166, 0.133, 0.159, 0.041, 0.024, 0.195, - 0.039, 0.161, 0.018, 0.143, 0.056, 0.125, 0.096, 0.094, 0.051, - 0.043, 0.021, 0.138, 0.075, 0.109, 0.195, 0.05 , 0.074, 0.079, - 0.155, 0.02 , 0.01 , 0.061, 0.008]) - - # Now let's make two outlier points which are far away from everything. - pts[[3,14]] += .8 - - # If we were to simply plot pts, we'd lose most of the interesting - # details due to the outliers. So let's 'break' or 'cut-out' the y-axis - # into two portions - use the top (ax) for the outliers, and the bottom - # (ax2) for the details of the majority of our data - f,(ax,ax2) = plt.subplots(2,1,sharex=True) - - # plot the same data on both axes - ax.plot(pts) - ax2.plot(pts) - - # zoom-in / limit the view to different portions of the data - ax.set_ylim(.78,1.) # outliers only - ax2.set_ylim(0,.22) # most of the data - - # hide the spines between ax and ax2 - ax.spines['bottom'].set_visible(False) - ax2.spines['top'].set_visible(False) - ax.xaxis.tick_top() - ax.tick_params(labeltop='off') # don't put tick labels at the top - ax2.xaxis.tick_bottom() - - # This looks pretty good, and was fairly painless, but you can get that - # cut-out diagonal lines look with just a bit more work. The important - # thing to know here is that in axes coordinates, which are always - # between 0-1, spine endpoints are at these locations (0,0), (0,1), - # (1,0), and (1,1). Thus, we just need to put the diagonals in the - # appropriate corners of each of our axes, and so long as we use the - # right transform and disable clipping. - - d = .015 # how big to make the diagonal lines in axes coordinates - # arguments to pass plot, just so we don't keep repeating them - kwargs = dict(transform=ax.transAxes, color='k', clip_on=False) - ax.plot((-d,+d),(-d,+d), **kwargs) # top-left diagonal - ax.plot((1-d,1+d),(-d,+d), **kwargs) # top-right diagonal - - kwargs.update(transform=ax2.transAxes) # switch to the bottom axes - ax2.plot((-d,+d),(1-d,1+d), **kwargs) # bottom-left diagonal - ax2.plot((1-d,1+d),(1-d,1+d), **kwargs) # bottom-right diagonal - - # What's cool about this is that now if we vary the distance between - # ax and ax2 via f.subplots_adjust(hspace=...) or plt.subplot_tool(), - # the diagonal lines will move accordingly, and stay right at the tips - # of the spines they are 'breaking' - - plt.show() - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/pylab_examples/broken_barh.txt b/dev/_sources/examples/pylab_examples/broken_barh.txt deleted file mode 100644 index 8e4cf9b7d58..00000000000 --- a/dev/_sources/examples/pylab_examples/broken_barh.txt +++ /dev/null @@ -1,37 +0,0 @@ -.. _pylab_examples-broken_barh: - -pylab_examples example code: broken_barh.py -=========================================== - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/pylab_examples/broken_barh.py - -:: - - """ - Make a "broken" horizontal bar plot, ie one with gaps - """ - import matplotlib.pyplot as plt - - fig = plt.figure() - ax = fig.add_subplot(111) - ax.broken_barh([ (110, 30), (150, 10) ] , (10, 9), facecolors='blue') - ax.broken_barh([ (10, 50), (100, 20), (130, 10)] , (20, 9), - facecolors=('red', 'yellow', 'green')) - ax.set_ylim(5,35) - ax.set_xlim(0,200) - ax.set_xlabel('seconds since start') - ax.set_yticks([15,25]) - ax.set_yticklabels(['Bill', 'Jim']) - ax.grid(True) - ax.annotate('race interrupted', (61, 25), - xytext=(0.8, 0.9), textcoords='axes fraction', - arrowprops=dict(facecolor='black', shrink=0.05), - fontsize=16, - horizontalalignment='right', verticalalignment='top') - - plt.show() - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/pylab_examples/centered_ticklabels.txt b/dev/_sources/examples/pylab_examples/centered_ticklabels.txt deleted file mode 100644 index b168caf6347..00000000000 --- a/dev/_sources/examples/pylab_examples/centered_ticklabels.txt +++ /dev/null @@ -1,59 +0,0 @@ -.. _pylab_examples-centered_ticklabels: - -pylab_examples example code: centered_ticklabels.py -=================================================== - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/pylab_examples/centered_ticklabels.py - -:: - - # sometimes it is nice to have ticklabels centered. mpl currently - # associates a label with a tick, and the label can be aligned - # 'center', 'left', or 'right' using the horizontal alignment property: - # - # - # for label in ax.xaxis.get_xticklabels(): - # label.set_horizontalalignment('right') - # - # - # but this doesn't help center the label between ticks. One solution - # is to "face it". Use the minor ticks to place a tick centered - # between the major ticks. Here is an example that labels the months, - # centered between the ticks - - import datetime - import numpy as np - import matplotlib - import matplotlib.cbook as cbook - import matplotlib.dates as dates - import matplotlib.ticker as ticker - import matplotlib.pyplot as plt - - # load some financial data; apple's stock price - fh = cbook.get_sample_data('aapl.npy.gz') - r = np.load(fh); fh.close() - r = r[-250:] # get the last 250 days - - fig = plt.figure() - ax = fig.add_subplot(111) - ax.plot(r.date, r.adj_close) - - ax.xaxis.set_major_locator(dates.MonthLocator()) - ax.xaxis.set_minor_locator(dates.MonthLocator(bymonthday=15)) - - ax.xaxis.set_major_formatter(ticker.NullFormatter()) - ax.xaxis.set_minor_formatter(dates.DateFormatter('%b')) - - for tick in ax.xaxis.get_minor_ticks(): - tick.tick1line.set_markersize(0) - tick.tick2line.set_markersize(0) - tick.label1.set_horizontalalignment('center') - - imid = len(r)/2 - ax.set_xlabel(str(r.date[imid].year)) - plt.show() - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/pylab_examples/clippedline.txt b/dev/_sources/examples/pylab_examples/clippedline.txt deleted file mode 100644 index 69a1de93ed8..00000000000 --- a/dev/_sources/examples/pylab_examples/clippedline.txt +++ /dev/null @@ -1,74 +0,0 @@ -.. _pylab_examples-clippedline: - -pylab_examples example code: clippedline.py -=========================================== - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/pylab_examples/clippedline.py - -:: - - """ - Clip a line according to the current xlimits, and change the marker - style when zoomed in. - - It is not clear this example is still needed or valid; clipping - is now automatic for Line2D objects when x is sorted in - ascending order. - - """ - - from matplotlib.lines import Line2D - import numpy as np - from pylab import figure, show - - class ClippedLine(Line2D): - """ - Clip the xlimits to the axes view limits -- this example assumes x is sorted - """ - - def __init__(self, ax, *args, **kwargs): - Line2D.__init__(self, *args, **kwargs) - self.ax = ax - - - def set_data(self, *args, **kwargs): - Line2D.set_data(self, *args, **kwargs) - self.recache() - self.xorig = np.array(self._x) - self.yorig = np.array(self._y) - - def draw(self, renderer): - xlim = self.ax.get_xlim() - - ind0, ind1 = np.searchsorted(self.xorig, xlim) - self._x = self.xorig[ind0:ind1] - self._y = self.yorig[ind0:ind1] - N = len(self._x) - if N<1000: - self._marker = 's' - self._linestyle = '-' - else: - self._marker = None - self._linestyle = '-' - - - Line2D.draw(self, renderer) - - - fig = figure() - ax = fig.add_subplot(111, autoscale_on=False) - - t = np.arange(0.0, 100.0, 0.01) - s = np.sin(2*np.pi*t) - line = ClippedLine(ax, t, s, color='g', ls='-', lw=2) - ax.add_line(line) - ax.set_xlim(10,30) - ax.set_ylim(-1.1,1.1) - show() - - - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/pylab_examples/cohere_demo.txt b/dev/_sources/examples/pylab_examples/cohere_demo.txt deleted file mode 100644 index 697c5c76a90..00000000000 --- a/dev/_sources/examples/pylab_examples/cohere_demo.txt +++ /dev/null @@ -1,50 +0,0 @@ -.. _pylab_examples-cohere_demo: - -pylab_examples example code: cohere_demo.py -=========================================== - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/pylab_examples/cohere_demo.py - -:: - - #!/usr/bin/env python - """ - Compute the coherence of two signals - """ - import numpy as np - import matplotlib.pyplot as plt - - # make a little extra space between the subplots - plt.subplots_adjust(wspace=0.5) - - dt = 0.01 - t = np.arange(0, 30, dt) - nse1 = np.random.randn(len(t)) # white noise 1 - nse2 = np.random.randn(len(t)) # white noise 2 - r = np.exp(-t/0.05) - - cnse1 = np.convolve(nse1, r, mode='same')*dt # colored noise 1 - cnse2 = np.convolve(nse2, r, mode='same')*dt # colored noise 2 - - # two signals with a coherent part and a random part - s1 = 0.01*np.sin(2*np.pi*10*t) + cnse1 - s2 = 0.01*np.sin(2*np.pi*10*t) + cnse2 - - plt.subplot(211) - plt.plot(t, s1, 'b-', t, s2, 'g-') - plt.xlim(0,5) - plt.xlabel('time') - plt.ylabel('s1 and s2') - plt.grid(True) - - plt.subplot(212) - cxy, f = plt.cohere(s1, s2, 256, 1./dt) - plt.ylabel('coherence') - plt.show() - - - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/pylab_examples/color_by_yvalue.txt b/dev/_sources/examples/pylab_examples/color_by_yvalue.txt deleted file mode 100644 index d369bf1f189..00000000000 --- a/dev/_sources/examples/pylab_examples/color_by_yvalue.txt +++ /dev/null @@ -1,32 +0,0 @@ -.. _pylab_examples-color_by_yvalue: - -pylab_examples example code: color_by_yvalue.py -=============================================== - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/pylab_examples/color_by_yvalue.py - -:: - - # use masked arrays to plot a line with different colors by y-value - from numpy import logical_or, arange, sin, pi - from numpy import ma - from matplotlib.pyplot import plot, show - - t = arange(0.0, 2.0, 0.01) - s = sin(2*pi*t) - - upper = 0.77 - lower = -0.77 - - - supper = ma.masked_where(s < upper, s) - slower = ma.masked_where(s > lower, s) - smiddle = ma.masked_where(logical_or(supper), s) - - plot(t, slower, 'r', t, smiddle, 'b', t, supper, 'g') - show() - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/pylab_examples/color_demo.txt b/dev/_sources/examples/pylab_examples/color_demo.txt deleted file mode 100644 index e6615c7a7d1..00000000000 --- a/dev/_sources/examples/pylab_examples/color_demo.txt +++ /dev/null @@ -1,40 +0,0 @@ -.. _pylab_examples-color_demo: - -pylab_examples example code: color_demo.py -========================================== - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/pylab_examples/color_demo.py - -:: - - #!/usr/bin/env python - """ - matplotlib gives you 4 ways to specify colors, - - 1) as a single letter string, ala MATLAB - - 2) as an html style hex string or html color name - - 3) as an R,G,B tuple, where R,G,B, range from 0-1 - - 4) as a string representing a floating point number - from 0 to 1, corresponding to shades of gray. - - See help(colors) for more info. - """ - from pylab import * - - subplot(111, axisbg='darkslategray') - #subplot(111, axisbg='#ababab') - t = arange(0.0, 2.0, 0.01) - s = sin(2*pi*t) - plot(t, s, 'y') - xlabel('time (s)', color='r') - ylabel('voltage (mV)', color='0.5') # grayscale color - title('About as silly as it gets, folks', color='#afeeee') - show() - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/pylab_examples/colorbar_tick_labelling_demo.txt b/dev/_sources/examples/pylab_examples/colorbar_tick_labelling_demo.txt deleted file mode 100644 index 57296ba7e5f..00000000000 --- a/dev/_sources/examples/pylab_examples/colorbar_tick_labelling_demo.txt +++ /dev/null @@ -1,50 +0,0 @@ -.. _pylab_examples-colorbar_tick_labelling_demo: - -pylab_examples example code: colorbar_tick_labelling_demo.py -============================================================ - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/pylab_examples/colorbar_tick_labelling_demo.py - -:: - - """Produce custom labelling for a colorbar. - - Contributed by Scott Sinclair - """ - - import matplotlib.pyplot as plt - import numpy as np - from matplotlib import cm - from numpy.random import randn - - # Make plot with vertical (default) colorbar - fig = plt.figure() - ax = fig.add_subplot(111) - - data = np.clip(randn(250, 250), -1, 1) - - cax = ax.imshow(data, interpolation='nearest', cmap=cm.coolwarm) - ax.set_title('Gaussian noise with vertical colorbar') - - # Add colorbar, make sure to specify tick locations to match desired ticklabels - cbar = fig.colorbar(cax, ticks=[-1, 0, 1]) - cbar.ax.set_yticklabels(['< -1', '0', '> 1'])# vertically oriented colorbar - - # Make plot with horizontal colorbar - fig = plt.figure() - ax = fig.add_subplot(111) - - data = np.clip(randn(250, 250), -1, 1) - - cax = ax.imshow(data, interpolation='nearest', cmap=cm.afmhot) - ax.set_title('Gaussian noise with horizontal colorbar') - - cbar = fig.colorbar(cax, ticks=[-1, 0, 1], orientation='horizontal') - cbar.ax.set_xticklabels(['Low', 'Medium', 'High'])# horizontal colorbar - - plt.show() - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/pylab_examples/colours.txt b/dev/_sources/examples/pylab_examples/colours.txt deleted file mode 100644 index d7c43e83d26..00000000000 --- a/dev/_sources/examples/pylab_examples/colours.txt +++ /dev/null @@ -1,63 +0,0 @@ -.. _pylab_examples-colours: - -pylab_examples example code: colours.py -======================================= - -[`source code `_] - -:: - - #!/usr/bin/env python - # -*- noplot -*- - """ - Some simple functions to generate colours. - """ - import numpy as np - from matplotlib.colors import colorConverter - - def pastel(colour, weight=2.4): - """ Convert colour into a nice pastel shade""" - rgb = np.asarray(colorConverter.to_rgb(colour)) - # scale colour - maxc = max(rgb) - if maxc < 1.0 and maxc > 0: - # scale colour - scale = 1.0 / maxc - rgb = rgb * scale - # now decrease saturation - total = rgb.sum() - slack = 0 - for x in rgb: - slack += 1.0 - x - - # want to increase weight from total to weight - # pick x s.t. slack * x == weight - total - # x = (weight - total) / slack - x = (weight - total) / slack - - rgb = [c + (x * (1.0-c)) for c in rgb] - - return rgb - - def get_colours(n): - """ Return n pastel colours. """ - base = np.asarray([[1,0,0], [0,1,0], [0,0,1]]) - - if n <= 3: - return base[0:n] - - # how many new colours to we need to insert between - # red and green and between green and blue? - needed = (((n - 3) + 1) / 2, (n - 3) / 2) - - colours = [] - for start in (0, 1): - for x in np.linspace(0, 1, needed[start]+2): - colours.append((base[start] * (1.0 - x)) + - (base[start+1] * x)) - - return [pastel(c) for c in colours[0:n]] - - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/pylab_examples/contour_demo.txt b/dev/_sources/examples/pylab_examples/contour_demo.txt deleted file mode 100644 index 95776631491..00000000000 --- a/dev/_sources/examples/pylab_examples/contour_demo.txt +++ /dev/null @@ -1,128 +0,0 @@ -.. _pylab_examples-contour_demo: - -pylab_examples example code: contour_demo.py -============================================ - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/pylab_examples/contour_demo.py - -:: - - #!/usr/bin/env python - """ - Illustrate simple contour plotting, contours on an image with - a colorbar for the contours, and labelled contours. - - See also contour_image.py. - """ - import matplotlib - import numpy as np - import matplotlib.cm as cm - import matplotlib.mlab as mlab - import matplotlib.pyplot as plt - - matplotlib.rcParams['xtick.direction'] = 'out' - matplotlib.rcParams['ytick.direction'] = 'out' - - delta = 0.025 - x = np.arange(-3.0, 3.0, delta) - y = np.arange(-2.0, 2.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) - # difference of Gaussians - Z = 10.0 * (Z2 - Z1) - - - - # Create a simple contour plot with labels using default colors. The - # inline argument to clabel will control whether the labels are draw - # over the line segments of the contour, removing the lines beneath - # the label - plt.figure() - CS = plt.contour(X, Y, Z) - plt.clabel(CS, inline=1, fontsize=10) - plt.title('Simplest default with labels') - - - # contour labels can be placed manually by providing list of positions - # (in data coordinate). See ginput_manual_clabel.py for interactive - # placement. - plt.figure() - CS = plt.contour(X, Y, Z) - manual_locations = [(-1, -1.4), (-0.62, -0.7), (-2, 0.5), (1.7, 1.2), (2.0, 1.4), (2.4, 1.7)] - plt.clabel(CS, inline=1, fontsize=10, manual=manual_locations) - plt.title('labels at selected locations') - - - # You can force all the contours to be the same color. - plt.figure() - CS = plt.contour(X, Y, Z, 6, - colors='k', # negative contours will be dashed by default - ) - plt.clabel(CS, fontsize=9, inline=1) - plt.title('Single color - negative contours dashed') - - # You can set negative contours to be solid instead of dashed: - matplotlib.rcParams['contour.negative_linestyle'] = 'solid' - plt.figure() - CS = plt.contour(X, Y, Z, 6, - colors='k', # negative contours will be dashed by default - ) - plt.clabel(CS, fontsize=9, inline=1) - plt.title('Single color - negative contours solid') - - - # And you can manually specify the colors of the contour - plt.figure() - CS = plt.contour(X, Y, Z, 6, - linewidths=np.arange(.5, 4, .5), - colors=('r', 'green', 'blue', (1,1,0), '#afeeee', '0.5') - ) - plt.clabel(CS, fontsize=9, inline=1) - plt.title('Crazy lines') - - - # Or you can use a colormap to specify the colors; the default - # colormap will be used for the contour lines - plt.figure() - im = plt.imshow(Z, interpolation='bilinear', origin='lower', - cmap=cm.gray, extent=(-3,3,-2,2)) - levels = np.arange(-1.2, 1.6, 0.2) - CS = plt.contour(Z, levels, - origin='lower', - linewidths=2, - extent=(-3,3,-2,2)) - - #Thicken the zero contour. - zc = CS.collections[6] - plt.setp(zc, linewidth=4) - - plt.clabel(CS, levels[1::2], # label every second level - inline=1, - fmt='%1.1f', - fontsize=14) - - # make a colorbar for the contour lines - CB = plt.colorbar(CS, shrink=0.8, extend='both') - - plt.title('Lines with colorbar') - #plt.hot() # Now change the colormap for the contour lines and colorbar - plt.flag() - - # We can still add a colorbar for the image, too. - CBI = plt.colorbar(im, orientation='horizontal', shrink=0.8) - - # This makes the original colorbar look a bit out of place, - # so let's improve its position. - - l,b,w,h = plt.gca().get_position().bounds - ll,bb,ww,hh = CB.ax.get_position().bounds - CB.ax.set_position([ll, b+0.1*h, ww, h*0.8]) - - - plt.show() - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/pylab_examples/contour_image.txt b/dev/_sources/examples/pylab_examples/contour_image.txt deleted file mode 100644 index 80c8f26d6c1..00000000000 --- a/dev/_sources/examples/pylab_examples/contour_image.txt +++ /dev/null @@ -1,120 +0,0 @@ -.. _pylab_examples-contour_image: - -pylab_examples example code: contour_image.py -============================================= - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/pylab_examples/contour_image.py - -:: - - #!/usr/bin/env python - ''' - Test combinations of contouring, filled contouring, and image plotting. - For contour labelling, see contour_demo.py. - - The emphasis in this demo is on showing how to make contours register - correctly on images, and on how to get both of them oriented as - desired. In particular, note the usage of the "origin" and "extent" - keyword arguments to imshow and contour. - ''' - from pylab import * - - #Default delta is large because that makes it fast, and it illustrates - # the correct registration between image and contours. - delta = 0.5 - - extent = (-3,4,-4,3) - - x = arange(-3.0, 4.001, delta) - y = arange(-4.0, 3.001, delta) - X, Y = meshgrid(x, y) - Z1 = bivariate_normal(X, Y, 1.0, 1.0, 0.0, 0.0) - Z2 = bivariate_normal(X, Y, 1.5, 0.5, 1, 1) - Z = (Z1 - Z2) * 10 - - levels = arange(-2.0, 1.601, 0.4) # Boost the upper limit to avoid truncation - # errors. - - norm = cm.colors.Normalize(vmax=abs(Z).max(), vmin=-abs(Z).max()) - cmap = cm.PRGn - - figure() - - - subplot(2,2,1) - - cset1 = contourf(X, Y, Z, levels, - cmap=cm.get_cmap(cmap, len(levels)-1), - norm=norm, - ) - # It is not necessary, but for the colormap, we need only the - # number of levels minus 1. To avoid discretization error, use - # either this number or a large number such as the default (256). - - #If we want lines as well as filled regions, we need to call - # contour separately; don't try to change the edgecolor or edgewidth - # of the polygons in the collections returned by contourf. - # Use levels output from previous call to guarantee they are the same. - cset2 = contour(X, Y, Z, cset1.levels, - colors = 'k', - hold='on') - # We don't really need dashed contour lines to indicate negative - # regions, so let's turn them off. - for c in cset2.collections: - c.set_linestyle('solid') - - # It is easier here to make a separate call to contour than - # to set up an array of colors and linewidths. - # We are making a thick green line as a zero contour. - # Specify the zero level as a tuple with only 0 in it. - cset3 = contour(X, Y, Z, (0,), - colors = 'g', - linewidths = 2, - hold='on') - title('Filled contours') - colorbar(cset1) - #hot() - - - subplot(2,2,2) - - imshow(Z, extent=extent, cmap=cmap, norm=norm) - v = axis() - contour(Z, levels, hold='on', colors = 'k', - origin='upper', extent=extent) - axis(v) - title("Image, origin 'upper'") - - subplot(2,2,3) - - imshow(Z, origin='lower', extent=extent, cmap=cmap, norm=norm) - v = axis() - contour(Z, levels, hold='on', colors = 'k', - origin='lower', extent=extent) - axis(v) - title("Image, origin 'lower'") - - subplot(2,2,4) - - # We will use the interpolation "nearest" here to show the actual - # image pixels. - # Note that the contour lines don't extend to the edge of the box. - # This is intentional. The Z values are defined at the center of each - # image pixel (each color block on the following subplot), so the - # domain that is contoured does not extend beyond these pixel centers. - im = imshow(Z, interpolation='nearest', extent=extent, cmap=cmap, norm=norm) - v = axis() - contour(Z, levels, hold='on', colors = 'k', - origin='image', extent=extent) - axis(v) - ylim = get(gca(), 'ylim') - setp(gca(), ylim=ylim[::-1]) - title("Image, origin from rc, reversed y-axis") - colorbar(im) - - show() - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/pylab_examples/contour_label_demo.txt b/dev/_sources/examples/pylab_examples/contour_label_demo.txt deleted file mode 100644 index 756f77f7de9..00000000000 --- a/dev/_sources/examples/pylab_examples/contour_label_demo.txt +++ /dev/null @@ -1,101 +0,0 @@ -.. _pylab_examples-contour_label_demo: - -pylab_examples example code: contour_label_demo.py -================================================== - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/pylab_examples/contour_label_demo.py - -:: - - #!/usr/bin/env python - """ - Illustrate some of the more advanced things that one can do with - contour labels. - - See also contour_demo.py. - """ - import matplotlib - import numpy as np - import matplotlib.cm as cm - import matplotlib.mlab as mlab - import matplotlib.ticker as ticker - import matplotlib.pyplot as plt - - matplotlib.rcParams['xtick.direction'] = 'out' - matplotlib.rcParams['ytick.direction'] = 'out' - - ################################################## - # Define our surface - ################################################## - delta = 0.025 - x = np.arange(-3.0, 3.0, delta) - y = np.arange(-2.0, 2.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) - # difference of Gaussians - Z = 10.0 * (Z2 - Z1) - - ################################################## - # Make contour labels using creative float classes - # Follows suggestion of Manuel Metz - ################################################## - plt.figure() - - # Basic contour plot - CS = plt.contour(X, Y, Z) - - # Define a class that forces representation of float to look a certain way - # This remove trailing zero so '1.0' becomes '1' - class nf(float): - def __repr__(self): - str = '%.1f' % (self.__float__(),) - if str[-1]=='0': - return '%.0f' % self.__float__() - else: - return '%.1f' % self.__float__() - - # Recast levels to new class - CS.levels = [nf(val) for val in CS.levels ] - - # Label levels with specially formatted floats - if plt.rcParams["text.usetex"]: - fmt = r'%r \%%' - else: - fmt = '%r %%' - plt.clabel(CS, CS.levels, inline=True, fmt=fmt, fontsize=10) - - ################################################## - # Label contours with arbitrary strings using a - # dictionary - ################################################## - plt.figure() - - # Basic contour plot - CS = plt.contour(X, Y, Z) - - fmt = {} - strs = [ 'first', 'second', 'third', 'fourth', 'fifth', 'sixth', 'seventh' ] - for l,s in zip( CS.levels, strs ): - fmt[l] = s - - # Label every other level using strings - plt.clabel(CS,CS.levels[::2],inline=True,fmt=fmt,fontsize=10) - - # Use a Formatter - - plt.figure() - - CS = plt.contour(X, Y, 100**Z, locator=plt.LogLocator()) - fmt = ticker.LogFormatterMathtext() - fmt.create_dummy_axis() - plt.clabel(CS, CS.levels, fmt=fmt) - plt.title("$100^Z$") - - plt.show() - - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/pylab_examples/contourf_demo.txt b/dev/_sources/examples/pylab_examples/contourf_demo.txt deleted file mode 100644 index 0f689177282..00000000000 --- a/dev/_sources/examples/pylab_examples/contourf_demo.txt +++ /dev/null @@ -1,121 +0,0 @@ -.. _pylab_examples-contourf_demo: - -pylab_examples example code: contourf_demo.py -============================================= - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/pylab_examples/contourf_demo.py - -:: - - #!/usr/bin/env python - import numpy as np - import matplotlib.pyplot as plt - - origin = 'lower' - #origin = 'upper' - - delta = 0.025 - - x = y = np.arange(-3.0, 3.01, delta) - X, Y = np.meshgrid(x, y) - Z1 = plt.mlab.bivariate_normal(X, Y, 1.0, 1.0, 0.0, 0.0) - Z2 = plt.mlab.bivariate_normal(X, Y, 1.5, 0.5, 1, 1) - Z = 10 * (Z1 - Z2) - - nr, nc = Z.shape - - # put NaNs in one corner: - Z[-nr//6:, -nc//6:] = np.nan - # contourf will convert these to masked - - - Z = np.ma.array(Z) - # mask another corner: - Z[:nr//6, :nc//6] = np.ma.masked - - # mask a circle in the middle: - interior = np.sqrt((X**2) + (Y**2)) < 0.5 - Z[interior] = np.ma.masked - - - # We are using automatic selection of contour levels; - # this is usually not such a good idea, because they don't - # occur on nice boundaries, but we do it here for purposes - # of illustration. - CS = plt.contourf(X, Y, Z, 10, # [-1, -0.1, 0, 0.1], - #alpha=0.5, - cmap=plt.cm.bone, - origin=origin) - - # Note that in the following, we explicitly pass in a subset of - # the contour levels used for the filled contours. Alternatively, - # We could pass in additional levels to provide extra resolution, - # or leave out the levels kwarg to use all of the original levels. - - CS2 = plt.contour(CS, levels=CS.levels[::2], - colors = 'r', - origin=origin, - hold='on') - - plt.title('Nonsense (3 masked regions)') - plt.xlabel('word length anomaly') - plt.ylabel('sentence length anomaly') - - # Make a colorbar for the ContourSet returned by the contourf call. - cbar = plt.colorbar(CS) - cbar.ax.set_ylabel('verbosity coefficient') - # Add the contour line levels to the colorbar - cbar.add_lines(CS2) - - plt.figure() - - # Now make a contour plot with the levels specified, - # and with the colormap generated automatically from a list - # of colors. - levels = [-1.5, -1, -0.5, 0, 0.5, 1] - CS3 = plt.contourf(X, Y, Z, levels, - colors = ('r', 'g', 'b'), - origin=origin, - extend='both') - # Our data range extends outside the range of levels; make - # data below the lowest contour level yellow, and above the - # highest level cyan: - CS3.cmap.set_under('yellow') - CS3.cmap.set_over('cyan') - - CS4 = plt.contour(X, Y, Z, levels, - colors = ('k',), - linewidths = (3,), - origin = origin) - plt.title('Listed colors (3 masked regions)') - plt.clabel(CS4, fmt = '%2.1f', colors = 'w', fontsize=14) - - # Notice that the colorbar command gets all the information it - # needs from the ContourSet object, CS3. - plt.colorbar(CS3) - - # Illustrate all 4 possible "extend" settings: - extends = ["neither", "both", "min", "max"] - cmap = plt.cm.get_cmap("winter") - cmap.set_under("magenta") - cmap.set_over("yellow") - # Note: contouring simply excludes masked or nan regions, so - # instead of using the "bad" colormap value for them, it draws - # nothing at all in them. Therefore the following would have - # no effect: - #cmap.set_bad("red") - - fig, axs = plt.subplots(2,2) - for ax, extend in zip(axs.ravel(), extends): - cs = ax.contourf(X, Y, Z, levels, cmap=cmap, extend=extend, origin=origin) - fig.colorbar(cs, ax=ax, shrink=0.9) - ax.set_title("extend = %s" % extend) - ax.locator_params(nbins=4) - - plt.show() - - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/pylab_examples/contourf_hatching.txt b/dev/_sources/examples/pylab_examples/contourf_hatching.txt deleted file mode 100644 index 12974876dec..00000000000 --- a/dev/_sources/examples/pylab_examples/contourf_hatching.txt +++ /dev/null @@ -1,59 +0,0 @@ -.. _pylab_examples-contourf_hatching: - -pylab_examples example code: contourf_hatching.py -================================================= - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/pylab_examples/contourf_hatching.py - -:: - - import matplotlib.pyplot as plt - import numpy as np - - - # invent some numbers, turning the x and y arrays into simple - # 2d arrays, which make combining them together easier. - x = np.linspace(-3, 5, 150).reshape(1, -1) - y = np.linspace(-3, 5, 120).reshape(-1, 1) - z = np.cos(x) + np.sin(y) - - # we no longer need x and y to be 2 dimensional, so flatten them. - x, y = x.flatten(), y.flatten() - - - # --------------------------------------------- - # | Plot #1 | - # --------------------------------------------- - # the simplest hatched plot with a colorbar - fig = plt.figure() - cs = plt.contourf(x, y, z, hatches=['-', '/', '\\', '//'], - cmap=plt.get_cmap('gray'), - extend='both', alpha=0.5 - ) - plt.colorbar() - - - # --------------------------------------------- - # | Plot #2 | - # --------------------------------------------- - # a plot of hatches without color with a legend - plt.figure() - n_levels = 6 - plt.contour(x, y, z, n_levels, colors='black', linestyles='-') - cs = plt.contourf(x, y, z, n_levels, colors='none', - hatches=['.', '/', '\\', None, '\\\\', '*'], - extend='lower' - ) - - # create a legend for the contour set - artists, labels = cs.legend_elements() - plt.legend(artists, labels, handleheight=2) - - - - plt.show() - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/pylab_examples/contourf_log.txt b/dev/_sources/examples/pylab_examples/contourf_log.txt deleted file mode 100644 index cdb9d60f8d0..00000000000 --- a/dev/_sources/examples/pylab_examples/contourf_log.txt +++ /dev/null @@ -1,62 +0,0 @@ -.. _pylab_examples-contourf_log: - -pylab_examples example code: contourf_log.py -============================================ - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/pylab_examples/contourf_log.py - -:: - - ''' - Demonstrate use of a log color scale in contourf - ''' - - from matplotlib import pyplot as P - import numpy as np - from numpy import ma - from matplotlib import colors, ticker, cm - from matplotlib.mlab import bivariate_normal - - N = 100 - x = np.linspace(-3.0, 3.0, N) - y = np.linspace(-2.0, 2.0, N) - - X, Y = np.meshgrid(x, y) - - # A low hump with a spike coming out of the top right. - # Needs to have z/colour axis on a log scale so we see both hump and spike. - # linear scale only shows the spike. - z = (bivariate_normal(X, Y, 0.1, 0.2, 1.0, 1.0) - + 0.1 * bivariate_normal(X, Y, 1.0, 1.0, 0.0, 0.0)) - - # Put in some negative values (lower left corner) to cause trouble with logs: - z[:5, :5] = -1 - - # The following is not strictly essential, but it will eliminate - # a warning. Comment it out to see the warning. - z = ma.masked_where(z<= 0, z) - - - # Automatic selection of levels works; setting the - # log locator tells contourf to use a log scale: - cs = P.contourf(X, Y, z, locator=ticker.LogLocator(), cmap=cm.PuBu_r) - - # Alternatively, you can manually set the levels - # and the norm: - #lev_exp = np.arange(np.floor(np.log10(z.min())-1), - # np.ceil(np.log10(z.max())+1)) - #levs = np.power(10, lev_exp) - #cs = P.contourf(X, Y, z, levs, norm=colors.LogNorm()) - - #The 'extend' kwarg does not work yet with a log scale. - - cbar = P.colorbar() - - P.show() - - - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/pylab_examples/coords_demo.txt b/dev/_sources/examples/pylab_examples/coords_demo.txt deleted file mode 100644 index 4816da0e589..00000000000 --- a/dev/_sources/examples/pylab_examples/coords_demo.txt +++ /dev/null @@ -1,53 +0,0 @@ -.. _pylab_examples-coords_demo: - -pylab_examples example code: coords_demo.py -=========================================== - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/pylab_examples/coords_demo.py - -:: - - #!/usr/bin/env python - - """ - An example of how to interact with the plotting canvas by connecting - to move and click events - """ - from __future__ import print_function - import sys - from pylab import * - - t = arange(0.0, 1.0, 0.01) - s = sin(2*pi*t) - ax = subplot(111) - ax.plot(t,s) - - - def on_move(event): - # get the x and y pixel coords - x, y = event.x, event.y - - if event.inaxes: - ax = event.inaxes # the axes instance - print ('data coords %f %f' % (event.xdata, event.ydata)) - - def on_click(event): - # get the x and y coords, flip y from top to bottom - x, y = event.x, event.y - if event.button==1: - if event.inaxes is not None: - print ('data coords %f %f' % (event.xdata, event.ydata)) - - binding_id = connect('motion_notify_event', on_move) - connect('button_press_event', on_click) - - if "test_disconnect" in sys.argv: - print ("disconnecting console coordinate printout...") - disconnect(binding_id) - - show() - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/pylab_examples/coords_report.txt b/dev/_sources/examples/pylab_examples/coords_report.txt deleted file mode 100644 index c4879bdf4c1..00000000000 --- a/dev/_sources/examples/pylab_examples/coords_report.txt +++ /dev/null @@ -1,32 +0,0 @@ -.. _pylab_examples-coords_report: - -pylab_examples example code: coords_report.py -============================================= - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/pylab_examples/coords_report.py - -:: - - #!/usr/bin/env python - - # override the default reporting of coords - - from pylab import * - - def millions(x): - return '$%1.1fM' % (x*1e-6) - - x = rand(20) - y = 1e7*rand(20) - - ax = subplot(111) - ax.fmt_ydata = millions - plot(x, y, 'o') - - show() - - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/pylab_examples/csd_demo.txt b/dev/_sources/examples/pylab_examples/csd_demo.txt deleted file mode 100644 index 2c9384615ab..00000000000 --- a/dev/_sources/examples/pylab_examples/csd_demo.txt +++ /dev/null @@ -1,50 +0,0 @@ -.. _pylab_examples-csd_demo: - -pylab_examples example code: csd_demo.py -======================================== - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/pylab_examples/csd_demo.py - -:: - - #!/usr/bin/env python - """ - Compute the cross spectral density of two signals - """ - import numpy as np - import matplotlib.pyplot as plt - - # make a little extra space between the subplots - plt.subplots_adjust(wspace=0.5) - - dt = 0.01 - t = np.arange(0, 30, dt) - nse1 = np.random.randn(len(t)) # white noise 1 - nse2 = np.random.randn(len(t)) # white noise 2 - r = np.exp(-t/0.05) - - cnse1 = np.convolve(nse1, r, mode='same')*dt # colored noise 1 - cnse2 = np.convolve(nse2, r, mode='same')*dt # colored noise 2 - - # two signals with a coherent part and a random part - s1 = 0.01*np.sin(2*np.pi*10*t) + cnse1 - s2 = 0.01*np.sin(2*np.pi*10*t) + cnse2 - - plt.subplot(211) - plt.plot(t, s1, 'b-', t, s2, 'g-') - plt.xlim(0,5) - plt.xlabel('time') - plt.ylabel('s1 and s2') - plt.grid(True) - - plt.subplot(212) - cxy, f = plt.csd(s1, s2, 256, 1./dt) - plt.ylabel('CSD (db)') - plt.show() - - - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/pylab_examples/cursor_demo.txt b/dev/_sources/examples/pylab_examples/cursor_demo.txt deleted file mode 100644 index 0a4b5cc0896..00000000000 --- a/dev/_sources/examples/pylab_examples/cursor_demo.txt +++ /dev/null @@ -1,92 +0,0 @@ -.. _pylab_examples-cursor_demo: - -pylab_examples example code: cursor_demo.py -=========================================== - -[`source code `_] - -:: - - #!/usr/bin/env python - # -*- noplot -*- - - """ - - This example shows how to use matplotlib to provide a data cursor. It - uses matplotlib to draw the cursor and may be a slow since this - requires redrawing the figure with every mouse move. - - Faster cursoring is possible using native GUI drawing, as in - wxcursor_demo.py - """ - from __future__ import print_function - from pylab import * - - - class Cursor: - def __init__(self, ax): - self.ax = ax - self.lx = ax.axhline(color='k') # the horiz line - self.ly = ax.axvline(color='k') # the vert line - - # text location in axes coords - self.txt = ax.text( 0.7, 0.9, '', transform=ax.transAxes) - - def mouse_move(self, event): - if not event.inaxes: return - - x, y = event.xdata, event.ydata - # update the line positions - self.lx.set_ydata(y ) - self.ly.set_xdata(x ) - - self.txt.set_text( 'x=%1.2f, y=%1.2f'%(x,y) ) - draw() - - - class SnaptoCursor: - """ - Like Cursor but the crosshair snaps to the nearest x,y point - For simplicity, I'm assuming x is sorted - """ - def __init__(self, ax, x, y): - self.ax = ax - self.lx = ax.axhline(color='k') # the horiz line - self.ly = ax.axvline(color='k') # the vert line - self.x = x - self.y = y - # text location in axes coords - self.txt = ax.text( 0.7, 0.9, '', transform=ax.transAxes) - - def mouse_move(self, event): - - if not event.inaxes: return - - x, y = event.xdata, event.ydata - - indx = searchsorted(self.x, [x])[0] - x = self.x[indx] - y = self.y[indx] - # update the line positions - self.lx.set_ydata(y ) - self.ly.set_xdata(x ) - - self.txt.set_text( 'x=%1.2f, y=%1.2f'%(x,y) ) - print ('x=%1.2f, y=%1.2f'%(x,y)) - draw() - - t = arange(0.0, 1.0, 0.01) - s = sin(2*2*pi*t) - ax = subplot(111) - - cursor = Cursor(ax) - #cursor = SnaptoCursor(ax, t, s) - connect('motion_notify_event', cursor.mouse_move) - - ax.plot(t, s, 'o') - axis([0,1,-1,1]) - show() - - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/pylab_examples/custom_cmap.txt b/dev/_sources/examples/pylab_examples/custom_cmap.txt deleted file mode 100644 index 79b09bf559c..00000000000 --- a/dev/_sources/examples/pylab_examples/custom_cmap.txt +++ /dev/null @@ -1,207 +0,0 @@ -.. _pylab_examples-custom_cmap: - -pylab_examples example code: custom_cmap.py -=========================================== - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/pylab_examples/custom_cmap.py - -:: - - #!/usr/bin/env python - - import numpy as np - import matplotlib.pyplot as plt - from matplotlib.colors import LinearSegmentedColormap - - """ - - Example: suppose you want red to increase from 0 to 1 over the bottom - half, green to do the same over the middle half, and blue over the top - half. Then you would use: - - cdict = {'red': ((0.0, 0.0, 0.0), - (0.5, 1.0, 1.0), - (1.0, 1.0, 1.0)), - - 'green': ((0.0, 0.0, 0.0), - (0.25, 0.0, 0.0), - (0.75, 1.0, 1.0), - (1.0, 1.0, 1.0)), - - 'blue': ((0.0, 0.0, 0.0), - (0.5, 0.0, 0.0), - (1.0, 1.0, 1.0))} - - If, as in this example, there are no discontinuities in the r, g, and b - components, then it is quite simple: the second and third element of - each tuple, above, is the same--call it "y". The first element ("x") - defines interpolation intervals over the full range of 0 to 1, and it - must span that whole range. In other words, the values of x divide the - 0-to-1 range into a set of segments, and y gives the end-point color - values for each segment. - - Now consider the green. cdict['green'] is saying that for - 0 <= x <= 0.25, y is zero; no green. - 0.25 < x <= 0.75, y varies linearly from 0 to 1. - x > 0.75, y remains at 1, full green. - - If there are discontinuities, then it is a little more complicated. - Label the 3 elements in each row in the cdict entry for a given color as - (x, y0, y1). Then for values of x between x[i] and x[i+1] the color - value is interpolated between y1[i] and y0[i+1]. - - Going back to the cookbook example, look at cdict['red']; because y0 != - y1, it is saying that for x from 0 to 0.5, red increases from 0 to 1, - but then it jumps down, so that for x from 0.5 to 1, red increases from - 0.7 to 1. Green ramps from 0 to 1 as x goes from 0 to 0.5, then jumps - back to 0, and ramps back to 1 as x goes from 0.5 to 1. - - row i: x y0 y1 - / - / - row i+1: x y0 y1 - - Above is an attempt to show that for x in the range x[i] to x[i+1], the - interpolation is between y1[i] and y0[i+1]. So, y0[0] and y1[-1] are - never used. - - """ - - - - cdict1 = {'red': ((0.0, 0.0, 0.0), - (0.5, 0.0, 0.1), - (1.0, 1.0, 1.0)), - - 'green': ((0.0, 0.0, 0.0), - (1.0, 0.0, 0.0)), - - 'blue': ((0.0, 0.0, 1.0), - (0.5, 0.1, 0.0), - (1.0, 0.0, 0.0)) - } - - cdict2 = {'red': ((0.0, 0.0, 0.0), - (0.5, 0.0, 1.0), - (1.0, 0.1, 1.0)), - - 'green': ((0.0, 0.0, 0.0), - (1.0, 0.0, 0.0)), - - 'blue': ((0.0, 0.0, 0.1), - (0.5, 1.0, 0.0), - (1.0, 0.0, 0.0)) - } - - cdict3 = {'red': ((0.0, 0.0, 0.0), - (0.25,0.0, 0.0), - (0.5, 0.8, 1.0), - (0.75,1.0, 1.0), - (1.0, 0.4, 1.0)), - - 'green': ((0.0, 0.0, 0.0), - (0.25,0.0, 0.0), - (0.5, 0.9, 0.9), - (0.75,0.0, 0.0), - (1.0, 0.0, 0.0)), - - 'blue': ((0.0, 0.0, 0.4), - (0.25,1.0, 1.0), - (0.5, 1.0, 0.8), - (0.75,0.0, 0.0), - (1.0, 0.0, 0.0)) - } - - # Make a modified version of cdict3 with some transparency - # in the middle of the range. - cdict4 = cdict3.copy() - cdict4['alpha'] = ((0.0, 1.0, 1.0), - # (0.25,1.0, 1.0), - (0.5, 0.3, 0.3), - # (0.75,1.0, 1.0), - (1.0, 1.0, 1.0)) - - - # Now we will use this example to illustrate 3 ways of - # handling custom colormaps. - # First, the most direct and explicit: - - blue_red1 = LinearSegmentedColormap('BlueRed1', cdict1) - - # Second, create the map explicitly and register it. - # Like the first method, this method works with any kind - # of Colormap, not just - # a LinearSegmentedColormap: - - blue_red2 = LinearSegmentedColormap('BlueRed2', cdict2) - plt.register_cmap(cmap=blue_red2) - - # Third, for LinearSegmentedColormap only, - # leave everything to register_cmap: - - plt.register_cmap(name='BlueRed3', data=cdict3) # optional lut kwarg - plt.register_cmap(name='BlueRedAlpha', data=cdict4) - - # Make some illustrative fake data: - - x = np.arange(0, np.pi, 0.1) - y = np.arange(0, 2*np.pi, 0.1) - X, Y = np.meshgrid(x,y) - Z = np.cos(X) * np.sin(Y) * 10 - - # Make the figure: - - plt.figure(figsize=(6,9)) - plt.subplots_adjust(left=0.02, bottom=0.06, right=0.95, top=0.94, wspace=0.05) - - # Make 4 subplots: - - plt.subplot(2,2,1) - plt.imshow(Z, interpolation='nearest', cmap=blue_red1) - plt.colorbar() - - plt.subplot(2,2,2) - cmap = plt.get_cmap('BlueRed2') - plt.imshow(Z, interpolation='nearest', cmap=cmap) - plt.colorbar() - - # Now we will set the third cmap as the default. One would - # not normally do this in the middle of a script like this; - # it is done here just to illustrate the method. - - plt.rcParams['image.cmap'] = 'BlueRed3' - - plt.subplot(2,2,3) - plt.imshow(Z, interpolation='nearest') - plt.colorbar() - plt.title("Alpha = 1") - - # Or as yet another variation, we can replace the rcParams - # specification *before* the imshow with the following *after* - # imshow. - # This sets the new default *and* sets the colormap of the last - # image-like item plotted via pyplot, if any. - # - - plt.subplot(2,2,4) - # Draw a line with low zorder so it will be behind the image. - plt.plot([0, 10*np.pi], [0, 20*np.pi], color='c', lw=20, zorder=-1) - - plt.imshow(Z, interpolation='nearest') - plt.colorbar() - - # Here it is: changing the colormap for the current image and its - # colorbar after they have been plotted. - plt.set_cmap('BlueRedAlpha') - plt.title("Varying alpha") - # - - plt.suptitle('Custom Blue-Red colormaps', fontsize=16) - - plt.show() - - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/pylab_examples/custom_figure_class.txt b/dev/_sources/examples/pylab_examples/custom_figure_class.txt deleted file mode 100644 index b81e7d15836..00000000000 --- a/dev/_sources/examples/pylab_examples/custom_figure_class.txt +++ /dev/null @@ -1,35 +0,0 @@ -.. _pylab_examples-custom_figure_class: - -pylab_examples example code: custom_figure_class.py -=================================================== - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/pylab_examples/custom_figure_class.py - -:: - - """ - You can pass a custom Figure constructor to figure if you want to derive from the default Figure. This simple example creates a figure with a figure title - """ - from matplotlib.pyplot import figure, show - from matplotlib.figure import Figure - - class MyFigure(Figure): - def __init__(self, *args, **kwargs): - """ - custom kwarg figtitle is a figure title - """ - figtitle = kwargs.pop('figtitle', 'hi mom') - Figure.__init__(self, *args, **kwargs) - self.text(0.5, 0.95, figtitle, ha='center') - - fig = figure(FigureClass=MyFigure, figtitle='my title') - ax = fig.add_subplot(111) - ax.plot([1,2,3]) - - show() - - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/pylab_examples/custom_ticker1.txt b/dev/_sources/examples/pylab_examples/custom_ticker1.txt deleted file mode 100644 index b6104445b7c..00000000000 --- a/dev/_sources/examples/pylab_examples/custom_ticker1.txt +++ /dev/null @@ -1,43 +0,0 @@ -.. _pylab_examples-custom_ticker1: - -pylab_examples example code: custom_ticker1.py -============================================== - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/pylab_examples/custom_ticker1.py - -:: - - #!/usr/bin/env python - - """ - The new ticker code was designed to explicitly support user customized - ticking. The documentation - http://matplotlib.org/matplotlib.ticker.html details this - process. That code defines a lot of preset tickers but was primarily - designed to be user extensible. - - In this example a user defined function is used to format the ticks in - millions of dollars on the y axis - """ - from matplotlib.ticker import FuncFormatter - from pylab import * - - x = arange(4) - money = [1.5e5, 2.5e6, 5.5e6, 2.0e7] - - def millions(x, pos): - 'The two args are the value and tick position' - return '$%1.1fM' % (x*1e-6) - - formatter = FuncFormatter(millions) - - ax = subplot(111) - ax.yaxis.set_major_formatter(formatter) - bar(x, money) - xticks( x + 0.5, ('Bill', 'Fred', 'Mary', 'Sue') ) - show() - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/pylab_examples/customize_rc.txt b/dev/_sources/examples/pylab_examples/customize_rc.txt deleted file mode 100644 index 66f48e0cbd6..00000000000 --- a/dev/_sources/examples/pylab_examples/customize_rc.txt +++ /dev/null @@ -1,65 +0,0 @@ -.. _pylab_examples-customize_rc: - -pylab_examples example code: customize_rc.py -============================================ - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/pylab_examples/customize_rc.py - -:: - - - """ - I'm not trying to make a good looking figure here, but just to show - some examples of customizing rc params on the fly - - If you like to work interactively, and need to create different sets - of defaults for figures (eg one set of defaults for publication, one - set for interactive exploration), you may want to define some - functions in a custom module that set the defaults, eg - - def set_pub(): - rc('font', weight='bold') # bold fonts are easier to see - rc('tick', labelsize=15) # tick labels bigger - rc('lines', lw=1, color='k') # thicker black lines (no budget for color!) - rc('grid', c='0.5', ls='-', lw=0.5) # solid gray grid lines - rc('savefig', dpi=300) # higher res outputs - - - - Then as you are working interactively, you just need to do - - >>> set_pub() - >>> subplot(111) - >>> plot([1,2,3]) - >>> savefig('myfig') - >>> rcdefaults() # restore the defaults - - """ - from pylab import * - - subplot(311) - plot([1,2,3]) - - # the axes attributes need to be set before the call to subplot - rc('font', weight='bold') - rc('xtick.major', size=5, pad=7) - rc('xtick', labelsize=15) - - # using aliases for color, linestyle and linewidth; gray, solid, thick - rc('grid', c='0.5', ls='-', lw=5) - rc('lines', lw=2, color='g') - subplot(312) - - plot([1,2,3]) - grid(True) - - rcdefaults() - subplot(313) - plot([1,2,3]) - grid(True) - show() - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/pylab_examples/dannys_example.txt b/dev/_sources/examples/pylab_examples/dannys_example.txt deleted file mode 100644 index 1052a1d7b50..00000000000 --- a/dev/_sources/examples/pylab_examples/dannys_example.txt +++ /dev/null @@ -1,73 +0,0 @@ -.. _pylab_examples-dannys_example: - -pylab_examples example code: dannys_example.py -============================================== - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/pylab_examples/dannys_example.py - -:: - - import matplotlib - matplotlib.rc('text', usetex = True) - import pylab - import numpy as np - - ## interface tracking profiles - N = 500 - delta = 0.6 - X = -1 + 2. * np.arange(N) / (N - 1) - pylab.plot(X, (1 - np.tanh(4. * X / delta)) / 2, ## phase field tanh profiles - X, (X + 1) / 2, ## level set distance function - X, (1.4 + np.tanh(4. * X / delta)) / 4, ## composition profile - X, X < 0, 'k--', ## sharp interface - linewidth = 5) - - ## legend - pylab.legend((r'phase field', r'level set', r'composition', r'sharp interface'), shadow = True, loc = (0.01, 0.55)) - ltext = pylab.gca().get_legend().get_texts() - pylab.setp(ltext[0], fontsize = 20, color = 'b') - pylab.setp(ltext[1], fontsize = 20, color = 'g') - pylab.setp(ltext[2], fontsize = 20, color = 'r') - pylab.setp(ltext[3], fontsize = 20, color = 'k') - - ## the arrow - height = 0.1 - offset = 0.02 - pylab.plot((-delta / 2., delta / 2), (height, height), 'k', linewidth = 2) - pylab.plot((-delta / 2, -delta / 2 + offset * 2), (height, height - offset), 'k', linewidth = 2) - pylab.plot((-delta / 2, -delta / 2 + offset * 2), (height, height + offset), 'k', linewidth = 2) - pylab.plot((delta / 2, delta / 2 - offset * 2), (height, height - offset), 'k', linewidth = 2) - pylab.plot((delta / 2, delta / 2 - offset * 2), (height, height + offset), 'k', linewidth = 2) - pylab.text(-0.06, height - 0.06, r'$\delta$', {'color' : 'k', 'fontsize' : 24}) - - ## X-axis label - pylab.xticks((-1, 0, 1), ('-1', '0', '1'), color = 'k', size = 20) - - ## Left Y-axis labels - pylab.ylabel(r'\bf{phase field} $\phi$', {'color' : 'b', - 'fontsize' : 20 }) - pylab.yticks((0, 0.5, 1), ('0', '.5', '1'), color = 'k', size = 20) - - ## Right Y-axis labels - pylab.text(1.05, 0.5, r"\bf{level set} $\phi$", {'color' : 'g', 'fontsize' : 20}, - horizontalalignment = 'left', - verticalalignment = 'center', - rotation = 90, - clip_on = False) - pylab.text(1.01, -0.02, "-1", {'color' : 'k', 'fontsize' : 20}) - pylab.text(1.01, 0.98, "1", {'color' : 'k', 'fontsize' : 20}) - pylab.text(1.01, 0.48, "0", {'color' : 'k', 'fontsize' : 20}) - - ## level set equations - pylab.text(0.1, 0.85, r'$|\nabla\phi| = 1,$ \newline $ \frac{\partial \phi}{\partial t} + U|\nabla \phi| = 0$', {'color' : 'g', 'fontsize' : 20}) - - ## phase field equations - pylab.text(0.2, 0.15, r'$\mathcal{F} = \int f\left( \phi, c \right) dV,$ \newline $ \frac{ \partial \phi } { \partial t } = -M_{ \phi } \frac{ \delta \mathcal{F} } { \delta \phi }$', - {'color' : 'b', 'fontsize' : 20}) - - pylab.show() - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/pylab_examples/dash_control.txt b/dev/_sources/examples/pylab_examples/dash_control.txt deleted file mode 100644 index 8707b6bfa2c..00000000000 --- a/dev/_sources/examples/pylab_examples/dash_control.txt +++ /dev/null @@ -1,28 +0,0 @@ -.. _pylab_examples-dash_control: - -pylab_examples example code: dash_control.py -============================================ - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/pylab_examples/dash_control.py - -:: - - #!/usr/bin/env python - - """ - You can precisely specify dashes with an on/off ink rect sequence in - points. - """ - from pylab import * - - dashes = [5,2,10,5] # 5 points on, 2 off, 3 on, 1 off - - l, = plot(arange(20), '--') - l.set_dashes(dashes) - - show() - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/pylab_examples/dashpointlabel.txt b/dev/_sources/examples/pylab_examples/dashpointlabel.txt deleted file mode 100644 index e6d3ae3e954..00000000000 --- a/dev/_sources/examples/pylab_examples/dashpointlabel.txt +++ /dev/null @@ -1,54 +0,0 @@ -.. _pylab_examples-dashpointlabel: - -pylab_examples example code: dashpointlabel.py -============================================== - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/pylab_examples/dashpointlabel.py - -:: - - import pylab - - DATA = ((1, 3), - (2, 4), - (3, 1), - (4, 2)) - # dash_style = - # direction, length, (text)rotation, dashrotation, push - # (The parameters are varied to show their effects, - # not for visual appeal). - dash_style = ( - (0, 20, -15, 30, 10), - (1, 30, 0, 15, 10), - (0, 40, 15, 15, 10), - (1, 20, 30, 60, 10), - ) - - fig = pylab.figure() - ax = fig.add_subplot(111) - - - (x,y) = zip(*DATA) - ax.plot(x, y, marker='o') - for i in range(len(DATA)): - (x,y) = DATA[i] - (dd, dl, r, dr, dp) = dash_style[i] - #print 'dashlen call', dl - t = ax.text(x, y, str((x,y)), withdash=True, - dashdirection=dd, - dashlength=dl, - rotation=r, - dashrotation=dr, - dashpush=dp, - ) - - ax.set_xlim((0.0, 5.0)) - ax.set_ylim((0.0, 5.0)) - - pylab.show() - - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/pylab_examples/data_helper.txt b/dev/_sources/examples/pylab_examples/data_helper.txt deleted file mode 100644 index 0ff8257f090..00000000000 --- a/dev/_sources/examples/pylab_examples/data_helper.txt +++ /dev/null @@ -1,72 +0,0 @@ -.. _pylab_examples-data_helper: - -pylab_examples example code: data_helper.py -=========================================== - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/pylab_examples/data_helper.py - -:: - - #!/usr/bin/env python - # Some functions to load a return data for the plot demos - - from numpy import fromstring, argsort, take, array, resize - import matplotlib.cbook as cbook - def get_two_stock_data(): - """ - load stock time and price data for two stocks The return values - (d1,p1,d2,p2) are the trade time (in days) and prices for stocks 1 - and 2 (intc and aapl) - """ - ticker1, ticker2 = 'INTC', 'AAPL' - - file1 = cbook.get_sample_data('INTC.dat.gz') - file2 = cbook.get_sample_data('AAPL.dat.gz') - M1 = fromstring( file1.read(), '=len(self.dates) or ind<0: return '' - - return self.dates[ind].strftime(self.fmt) - - formatter = MyFormatter(r.date) - - fig = figure() - ax = fig.add_subplot(111) - ax.xaxis.set_major_formatter(formatter) - ax.plot(numpy.arange(len(r)), r.close, 'o-') - fig.autofmt_xdate() - show() - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/pylab_examples/demo_agg_filter.txt b/dev/_sources/examples/pylab_examples/demo_agg_filter.txt deleted file mode 100644 index e8b90e59631..00000000000 --- a/dev/_sources/examples/pylab_examples/demo_agg_filter.txt +++ /dev/null @@ -1,348 +0,0 @@ -.. _pylab_examples-demo_agg_filter: - -pylab_examples example code: demo_agg_filter.py -=============================================== - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/pylab_examples/demo_agg_filter.py - -:: - - import matplotlib.pyplot as plt - - import numpy as np - import matplotlib.cm as cm - import matplotlib.mlab as mlab - - def smooth1d(x, window_len): - # copied from http://www.scipy.org/Cookbook/SignalSmooth - - s=np.r_[2*x[0]-x[window_len:1:-1],x,2*x[-1]-x[-1:-window_len:-1]] - w = np.hanning(window_len) - y=np.convolve(w/w.sum(),s,mode='same') - return y[window_len-1:-window_len+1] - - def smooth2d(A, sigma=3): - - window_len = max(int(sigma), 3)*2+1 - A1 = np.array([smooth1d(x, window_len) for x in np.asarray(A)]) - A2 = np.transpose(A1) - A3 = np.array([smooth1d(x, window_len) for x in A2]) - A4 = np.transpose(A3) - - return A4 - - - - - class BaseFilter(object): - def prepare_image(self, src_image, dpi, pad): - ny, nx, depth = src_image.shape - #tgt_image = np.zeros([pad*2+ny, pad*2+nx, depth], dtype="d") - padded_src = np.zeros([pad*2+ny, pad*2+nx, depth], dtype="d") - padded_src[pad:-pad, pad:-pad,:] = src_image[:,:,:] - - return padded_src#, tgt_image - - def get_pad(self, dpi): - return 0 - - def __call__(self, im, dpi): - pad = self.get_pad(dpi) - padded_src = self.prepare_image(im, dpi, pad) - tgt_image = self.process_image(padded_src, dpi) - return tgt_image, -pad, -pad - - - class OffsetFilter(BaseFilter): - def __init__(self, offsets=None): - if offsets is None: - self.offsets = (0, 0) - else: - self.offsets = offsets - - def get_pad(self, dpi): - return int(max(*self.offsets)/72.*dpi) - - def process_image(self, padded_src, dpi): - ox, oy = self.offsets - a1 = np.roll(padded_src, int(ox/72.*dpi), axis=1) - a2 = np.roll(a1, -int(oy/72.*dpi), axis=0) - return a2 - - class GaussianFilter(BaseFilter): - "simple gauss filter" - def __init__(self, sigma, alpha=0.5, color=None): - self.sigma = sigma - self.alpha = alpha - if color is None: - self.color=(0, 0, 0) - else: - self.color=color - - def get_pad(self, dpi): - return int(self.sigma*3/72.*dpi) - - - def process_image(self, padded_src, dpi): - #offsetx, offsety = int(self.offsets[0]), int(self.offsets[1]) - tgt_image = np.zeros_like(padded_src) - aa = smooth2d(padded_src[:,:,-1]*self.alpha, - self.sigma/72.*dpi) - tgt_image[:,:,-1] = aa - tgt_image[:,:,:-1] = self.color - return tgt_image - - class DropShadowFilter(BaseFilter): - def __init__(self, sigma, alpha=0.3, color=None, offsets=None): - self.gauss_filter = GaussianFilter(sigma, alpha, color) - self.offset_filter = OffsetFilter(offsets) - - def get_pad(self, dpi): - return max(self.gauss_filter.get_pad(dpi), - self.offset_filter.get_pad(dpi)) - - def process_image(self, padded_src, dpi): - t1 = self.gauss_filter.process_image(padded_src, dpi) - t2 = self.offset_filter.process_image(t1, dpi) - return t2 - - - from matplotlib.colors import LightSource - - class LightFilter(BaseFilter): - "simple gauss filter" - def __init__(self, sigma, fraction=0.5): - self.gauss_filter = GaussianFilter(sigma, alpha=1) - self.light_source = LightSource() - self.fraction = fraction - #hsv_min_val=0.5,hsv_max_val=0.9, - # hsv_min_sat=0.1,hsv_max_sat=0.1) - def get_pad(self, dpi): - return self.gauss_filter.get_pad(dpi) - - def process_image(self, padded_src, dpi): - t1 = self.gauss_filter.process_image(padded_src, dpi) - elevation = t1[:,:,3] - rgb = padded_src[:,:,:3] - - rgb2 = self.light_source.shade_rgb(rgb, elevation, - fraction=self.fraction) - - tgt = np.empty_like(padded_src) - tgt[:,:,:3] = rgb2 - tgt[:,:,3] = padded_src[:,:,3] - - return tgt - - - - class GrowFilter(BaseFilter): - "enlarge the area" - def __init__(self, pixels, color=None): - self.pixels = pixels - if color is None: - self.color=(1, 1, 1) - else: - self.color=color - - def __call__(self, im, dpi): - pad = self.pixels - ny, nx, depth = im.shape - new_im = np.empty([pad*2+ny, pad*2+nx, depth], dtype="d") - alpha = new_im[:,:,3] - alpha.fill(0) - alpha[pad:-pad, pad:-pad] = im[:,:,-1] - alpha2 = np.clip(smooth2d(alpha, self.pixels/72.*dpi) * 5, 0, 1) - new_im[:,:,-1] = alpha2 - new_im[:,:,:-1] = self.color - offsetx, offsety = -pad, -pad - - return new_im, offsetx, offsety - - - from matplotlib.artist import Artist - - class FilteredArtistList(Artist): - """ - A simple container to draw filtered artist. - """ - def __init__(self, artist_list, filter): - self._artist_list = artist_list - self._filter = filter - Artist.__init__(self) - - def draw(self, renderer): - renderer.start_rasterizing() - renderer.start_filter() - for a in self._artist_list: - a.draw(renderer) - renderer.stop_filter(self._filter) - renderer.stop_rasterizing() - - - - import matplotlib.transforms as mtransforms - - def filtered_text(ax): - # mostly copied from contour_demo.py - - # prepare image - delta = 0.025 - x = np.arange(-3.0, 3.0, delta) - y = np.arange(-2.0, 2.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) - # difference of Gaussians - Z = 10.0 * (Z2 - Z1) - - - # draw - im = ax.imshow(Z, interpolation='bilinear', origin='lower', - cmap=cm.gray, extent=(-3,3,-2,2)) - levels = np.arange(-1.2, 1.6, 0.2) - CS = ax.contour(Z, levels, - origin='lower', - linewidths=2, - extent=(-3,3,-2,2)) - - ax.set_aspect("auto") - - # contour label - cl = ax.clabel(CS, levels[1::2], # label every second level - inline=1, - fmt='%1.1f', - fontsize=11) - - # change clable color to black - from matplotlib.patheffects import Normal - for t in cl: - t.set_color("k") - t.set_path_effects([Normal()]) # to force TextPath (i.e., same font in all backends) - - # Add white glows to improve visibility of labels. - white_glows = FilteredArtistList(cl, GrowFilter(3)) - ax.add_artist(white_glows) - white_glows.set_zorder(cl[0].get_zorder()-0.1) - - ax.xaxis.set_visible(False) - ax.yaxis.set_visible(False) - - - def drop_shadow_line(ax): - # copied from examples/misc/svg_filter_line.py - - # draw lines - l1, = ax.plot([0.1, 0.5, 0.9], [0.1, 0.9, 0.5], "bo-", - mec="b", mfc="w", lw=5, mew=3, ms=10, label="Line 1") - l2, = ax.plot([0.1, 0.5, 0.9], [0.5, 0.2, 0.7], "ro-", - mec="r", mfc="w", lw=5, mew=3, ms=10, label="Line 1") - - - gauss = DropShadowFilter(4) - - for l in [l1, l2]: - - # draw shadows with same lines with slight offset. - - xx = l.get_xdata() - yy = l.get_ydata() - shadow, = ax.plot(xx, yy) - shadow.update_from(l) - - # offset transform - ot = mtransforms.offset_copy(l.get_transform(), ax.figure, - x=4.0, y=-6.0, units='points') - - shadow.set_transform(ot) - - - # adjust zorder of the shadow lines so that it is drawn below the - # original lines - shadow.set_zorder(l.get_zorder()-0.5) - shadow.set_agg_filter(gauss) - shadow.set_rasterized(True) # to support mixed-mode renderers - - - - ax.set_xlim(0., 1.) - ax.set_ylim(0., 1.) - - ax.xaxis.set_visible(False) - ax.yaxis.set_visible(False) - - - - - def drop_shadow_patches(ax): - # copyed from barchart_demo.py - N = 5 - menMeans = (20, 35, 30, 35, 27) - - ind = np.arange(N) # the x locations for the groups - width = 0.35 # the width of the bars - - rects1 = ax.bar(ind, menMeans, width, color='r', ec="w", lw=2) - - womenMeans = (25, 32, 34, 20, 25) - rects2 = ax.bar(ind+width+0.1, womenMeans, width, color='y', ec="w", lw=2) - - #gauss = GaussianFilter(1.5, offsets=(1,1), ) - gauss = DropShadowFilter(5, offsets=(1,1), ) - shadow = FilteredArtistList(rects1+rects2, gauss) - ax.add_artist(shadow) - shadow.set_zorder(rects1[0].get_zorder()-0.1) - - ax.set_xlim(ind[0]-0.5, ind[-1]+1.5) - ax.set_ylim(0, 40) - - ax.xaxis.set_visible(False) - ax.yaxis.set_visible(False) - - - def light_filter_pie(ax): - fracs = [15,30,45, 10] - explode=(0, 0.05, 0, 0) - pies = ax.pie(fracs, explode=explode) - ax.patch.set_visible(True) - - light_filter = LightFilter(9) - for p in pies[0]: - p.set_agg_filter(light_filter) - p.set_rasterized(True) # to support mixed-mode renderers - p.set(ec="none", - lw=2) - - gauss = DropShadowFilter(9, offsets=(3,4), alpha=0.7) - shadow = FilteredArtistList(pies[0], gauss) - ax.add_artist(shadow) - shadow.set_zorder(pies[0][0].get_zorder()-0.1) - - - if 1: - - plt.figure(1, figsize=(6, 6)) - plt.subplots_adjust(left=0.05, right=0.95) - - ax = plt.subplot(221) - filtered_text(ax) - - ax = plt.subplot(222) - drop_shadow_line(ax) - - ax = plt.subplot(223) - drop_shadow_patches(ax) - - ax = plt.subplot(224) - ax.set_aspect(1) - light_filter_pie(ax) - ax.set_frame_on(True) - - plt.show() - - - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/pylab_examples/demo_annotation_box.txt b/dev/_sources/examples/pylab_examples/demo_annotation_box.txt deleted file mode 100644 index cda993cea55..00000000000 --- a/dev/_sources/examples/pylab_examples/demo_annotation_box.txt +++ /dev/null @@ -1,108 +0,0 @@ -.. _pylab_examples-demo_annotation_box: - -pylab_examples example code: demo_annotation_box.py -=================================================== - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/pylab_examples/demo_annotation_box.py - -:: - - import matplotlib.pyplot as plt - from matplotlib.offsetbox import TextArea, DrawingArea, OffsetImage, \ - AnnotationBbox - from matplotlib.cbook import get_sample_data - - import numpy as np - - if 1: - fig = plt.gcf() - fig.clf() - ax = plt.subplot(111) - - offsetbox = TextArea("Test 1", minimumdescent=False) - - xy = (0.5, 0.7) - - ax.plot(xy[0], xy[1], ".r") - - ab = AnnotationBbox(offsetbox, xy, - xybox=(-20, 40), - xycoords='data', - boxcoords="offset points", - arrowprops=dict(arrowstyle="->")) - ax.add_artist(ab) - - offsetbox = TextArea("Test", minimumdescent=False) - - ab = AnnotationBbox(offsetbox, xy, - xybox=(1.02, xy[1]), - xycoords='data', - boxcoords=("axes fraction", "data"), - box_alignment=(0.,0.5), - arrowprops=dict(arrowstyle="->")) - ax.add_artist(ab) - - - from matplotlib.patches import Circle - da = DrawingArea(20, 20, 0, 0) - p = Circle((10, 10), 10) - da.add_artist(p) - - xy = [0.3, 0.55] - ab = AnnotationBbox(da, xy, - xybox=(1.02, xy[1]), - xycoords='data', - boxcoords=("axes fraction", "data"), - box_alignment=(0.,0.5), - arrowprops=dict(arrowstyle="->")) - #arrowprops=None) - - ax.add_artist(ab) - - - arr = np.arange(100).reshape((10,10)) - im = OffsetImage(arr, zoom=2) - - ab = AnnotationBbox(im, xy, - xybox=(-50., 50.), - xycoords='data', - boxcoords="offset points", - pad=0.3, - arrowprops=dict(arrowstyle="->")) - #arrowprops=None) - - ax.add_artist(ab) - - - # another image - - - from matplotlib._png import read_png - fn = get_sample_data("grace_hopper.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) - - ax.set_xlim(0, 1) - ax.set_ylim(0, 1) - - - 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/dev/_sources/examples/pylab_examples/demo_bboximage.txt b/dev/_sources/examples/pylab_examples/demo_bboximage.txt deleted file mode 100644 index 28c3d0f9dcf..00000000000 --- a/dev/_sources/examples/pylab_examples/demo_bboximage.txt +++ /dev/null @@ -1,76 +0,0 @@ -.. _pylab_examples-demo_bboximage: - -pylab_examples example code: demo_bboximage.py -============================================== - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/pylab_examples/demo_bboximage.py - -:: - - import matplotlib.pyplot as plt - import numpy as np - from matplotlib.image import BboxImage - from matplotlib.transforms import Bbox, TransformedBbox - - if __name__ == "__main__": - - fig = plt.figure(1) - ax = plt.subplot(121) - - txt = ax.text(0.5, 0.5, "test", size=30, ha="center", color="w") - kwargs = dict() - - bbox_image = BboxImage(txt.get_window_extent, - norm = None, - origin=None, - clip_on=False, - **kwargs - ) - a = np.arange(256).reshape(1,256)/256. - bbox_image.set_data(a) - ax.add_artist(bbox_image) - - - ax = plt.subplot(122) - a = np.linspace(0, 1, 256).reshape(1,-1) - a = np.vstack((a,a)) - - maps = sorted(m for m in plt.cm.datad if not m.endswith("_r")) - #nmaps = len(maps) + 1 - - #fig.subplots_adjust(top=0.99, bottom=0.01, left=0.2, right=0.99) - - ncol = 2 - nrow = len(maps)//ncol + 1 - - xpad_fraction = 0.3 - dx = 1./(ncol + xpad_fraction*(ncol-1)) - - ypad_fraction = 0.3 - dy = 1./(nrow + ypad_fraction*(nrow-1)) - - for i,m in enumerate(maps): - ix, iy = divmod(i, nrow) - #plt.figimage(a, 10, i*10, cmap=plt.get_cmap(m), origin='lower') - bbox0 = Bbox.from_bounds(ix*dx*(1+xpad_fraction), - 1.-iy*dy*(1+ypad_fraction)-dy, - dx, dy) - bbox = TransformedBbox(bbox0, ax.transAxes) - - bbox_image = BboxImage(bbox, - cmap = plt.get_cmap(m), - norm = None, - origin=None, - **kwargs - ) - - bbox_image.set_data(a) - ax.add_artist(bbox_image) - - 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/dev/_sources/examples/pylab_examples/demo_ribbon_box.txt b/dev/_sources/examples/pylab_examples/demo_ribbon_box.txt deleted file mode 100644 index 85ccae20a86..00000000000 --- a/dev/_sources/examples/pylab_examples/demo_ribbon_box.txt +++ /dev/null @@ -1,155 +0,0 @@ -.. _pylab_examples-demo_ribbon_box: - -pylab_examples example code: demo_ribbon_box.py -=============================================== - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/pylab_examples/demo_ribbon_box.py - -:: - - import matplotlib.pyplot as plt - import numpy as np - from matplotlib.image import BboxImage - - from matplotlib._png import read_png - import matplotlib.colors - from matplotlib.cbook import get_sample_data - - class RibbonBox(object): - - original_image = read_png(get_sample_data("Minduka_Present_Blue_Pack.png", - asfileobj=False)) - cut_location = 70 - b_and_h = original_image[:,:,2] - color = original_image[:,:,2] - original_image[:,:,0] - alpha = original_image[:,:,3] - nx = original_image.shape[1] - - def __init__(self, color): - rgb = matplotlib.colors.colorConverter.to_rgb(color) - - im = np.empty(self.original_image.shape, - self.original_image.dtype) - - - im[:,:,:3] = self.b_and_h[:,:,np.newaxis] - im[:,:,:3] -= self.color[:,:,np.newaxis]*(1.-np.array(rgb)) - im[:,:,3] = self.alpha - - self.im = im - - - def get_stretched_image(self, stretch_factor): - stretch_factor = max(stretch_factor, 1) - ny, nx, nch = self.im.shape - ny2 = int(ny*stretch_factor) - - stretched_image = np.empty((ny2, nx, nch), - self.im.dtype) - cut = self.im[self.cut_location,:,:] - stretched_image[:,:,:] = cut - stretched_image[:self.cut_location,:,:] = \ - self.im[:self.cut_location,:,:] - stretched_image[-(ny-self.cut_location):,:,:] = \ - self.im[-(ny-self.cut_location):,:,:] - - self._cached_im = stretched_image - return stretched_image - - - - class RibbonBoxImage(BboxImage): - zorder = 1 - - def __init__(self, bbox, color, - cmap = None, - norm = None, - interpolation=None, - origin=None, - filternorm=1, - filterrad=4.0, - resample = False, - **kwargs - ): - - BboxImage.__init__(self, bbox, - cmap = cmap, - norm = norm, - interpolation=interpolation, - origin=origin, - filternorm=filternorm, - filterrad=filterrad, - resample = resample, - **kwargs - ) - - self._ribbonbox = RibbonBox(color) - self._cached_ny = None - - - def draw(self, renderer, *args, **kwargs): - - bbox = self.get_window_extent(renderer) - stretch_factor = bbox.height / bbox.width - - ny = int(stretch_factor*self._ribbonbox.nx) - if self._cached_ny != ny: - arr = self._ribbonbox.get_stretched_image(stretch_factor) - self.set_array(arr) - self._cached_ny = ny - - BboxImage.draw(self, renderer, *args, **kwargs) - - - if 1: - from matplotlib.transforms import Bbox, TransformedBbox - from matplotlib.ticker import ScalarFormatter - - fig = plt.gcf() - fig.clf() - ax = plt.subplot(111) - - years = np.arange(2004, 2009) - box_colors = [(0.8, 0.2, 0.2), - (0.2, 0.8, 0.2), - (0.2, 0.2, 0.8), - (0.7, 0.5, 0.8), - (0.3, 0.8, 0.7), - ] - heights = np.random.random(years.shape) * 7000 + 3000 - - fmt = ScalarFormatter(useOffset=False) - ax.xaxis.set_major_formatter(fmt) - - for year, h, bc in zip(years, heights, box_colors): - bbox0 = Bbox.from_extents(year-0.4, 0., year+0.4, h) - bbox = TransformedBbox(bbox0, ax.transData) - rb_patch = RibbonBoxImage(bbox, bc, interpolation="bicubic") - - ax.add_artist(rb_patch) - - ax.annotate(r"%d" % (int(h/100.)*100), - (year, h), va="bottom", ha="center") - - patch_gradient = BboxImage(ax.bbox, - interpolation="bicubic", - zorder=0.1, - ) - gradient = np.zeros((2, 2, 4), dtype=np.float) - gradient[:,:,:3] = [1, 1, 0.] - gradient[:,:,3] = [[0.1, 0.3],[0.3, 0.5]] # alpha channel - patch_gradient.set_array(gradient) - ax.add_artist(patch_gradient) - - - ax.set_xlim(years[0]-0.5, years[-1]+0.5) - ax.set_ylim(0, 10000) - - fig.savefig('ribbon_box.png') - plt.show() - - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/pylab_examples/demo_text_path.txt b/dev/_sources/examples/pylab_examples/demo_text_path.txt deleted file mode 100644 index 5c9bba21a57..00000000000 --- a/dev/_sources/examples/pylab_examples/demo_text_path.txt +++ /dev/null @@ -1,169 +0,0 @@ -.. _pylab_examples-demo_text_path: - -pylab_examples example code: demo_text_path.py -============================================== - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/pylab_examples/demo_text_path.py - -:: - - - # -*- coding: utf-8 -*- - - import matplotlib.pyplot as plt - from matplotlib.image import BboxImage - import numpy as np - from matplotlib.transforms import IdentityTransform - - import matplotlib.patches as mpatches - - from matplotlib.offsetbox import AnnotationBbox,\ - AnchoredOffsetbox, AuxTransformBox - - from matplotlib.cbook import get_sample_data - - from matplotlib.text import TextPath - - - class PathClippedImagePatch(mpatches.PathPatch): - """ - The given image is used to draw the face of the patch. Internally, - it uses BboxImage whose clippath set to the path of the patch. - - FIXME : The result is currently dpi dependent. - """ - def __init__(self, path, bbox_image, **kwargs): - mpatches.PathPatch.__init__(self, path, **kwargs) - self._init_bbox_image(bbox_image) - - def set_facecolor(self, color): - """simply ignore facecolor""" - mpatches.PathPatch.set_facecolor(self, "none") - - def _init_bbox_image(self, im): - - bbox_image = BboxImage(self.get_window_extent, - norm = None, - origin=None, - ) - bbox_image.set_transform(IdentityTransform()) - - bbox_image.set_data(im) - self.bbox_image = bbox_image - - def draw(self, renderer=None): - - - # the clip path must be updated every draw. any solution? -JJ - self.bbox_image.set_clip_path(self._path, self.get_transform()) - self.bbox_image.draw(renderer) - - mpatches.PathPatch.draw(self, renderer) - - - if 1: - - usetex = plt.rcParams["text.usetex"] - - fig = plt.figure(1) - - # EXAMPLE 1 - - ax = plt.subplot(211) - - from matplotlib._png import read_png - fn = get_sample_data("grace_hopper.png", asfileobj=False) - arr = read_png(fn) - - text_path = TextPath((0, 0), "!?", size=150) - p = PathClippedImagePatch(text_path, arr, ec="k", - transform=IdentityTransform()) - - #p.set_clip_on(False) - - # make offset box - offsetbox = AuxTransformBox(IdentityTransform()) - offsetbox.add_artist(p) - - # make anchored offset box - ao = AnchoredOffsetbox(loc=2, child=offsetbox, frameon=True, borderpad=0.2) - ax.add_artist(ao) - - # another text - from matplotlib.patches import PathPatch - if usetex: - r = r"\mbox{textpath supports mathtext \& \TeX}" - else: - r = r"textpath supports mathtext & TeX" - - text_path = TextPath((0, 0), r, - size=20, usetex=usetex) - - p1 = PathPatch(text_path, ec="w", lw=3, fc="w", alpha=0.9, - transform=IdentityTransform()) - p2 = PathPatch(text_path, ec="none", fc="k", - transform=IdentityTransform()) - - offsetbox2 = AuxTransformBox(IdentityTransform()) - offsetbox2.add_artist(p1) - offsetbox2.add_artist(p2) - - ab = AnnotationBbox(offsetbox2, (0.95, 0.05), - xycoords='axes fraction', - boxcoords="offset points", - box_alignment=(1.,0.), - frameon=False - ) - ax.add_artist(ab) - - ax.imshow([[0,1,2],[1,2,3]], cmap=plt.cm.gist_gray_r, - interpolation="bilinear", - aspect="auto") - - - - # EXAMPLE 2 - - ax = plt.subplot(212) - - arr = np.arange(256).reshape(1,256)/256. - - if usetex: - s = r"$\displaystyle\left[\sum_{n=1}^\infty\frac{-e^{i\pi}}{2^n}\right]$!" - else: - s = r"$\left[\sum_{n=1}^\infty\frac{-e^{i\pi}}{2^n}\right]$!" - text_path = TextPath((0, 0), s, size=40, usetex=usetex) - text_patch = PathClippedImagePatch(text_path, arr, ec="none", - transform=IdentityTransform()) - - shadow1 = mpatches.Shadow(text_patch, 1, -1, props=dict(fc="none", ec="0.6", lw=3)) - shadow2 = mpatches.Shadow(text_patch, 1, -1, props=dict(fc="0.3", ec="none")) - - - # make offset box - offsetbox = AuxTransformBox(IdentityTransform()) - offsetbox.add_artist(shadow1) - offsetbox.add_artist(shadow2) - offsetbox.add_artist(text_patch) - - # place the anchored offset box using AnnotationBbox - ab = AnnotationBbox(offsetbox, (0.5, 0.5), - xycoords='data', - boxcoords="offset points", - box_alignment=(0.5,0.5), - ) - #text_path.set_size(10) - - ax.add_artist(ab) - - ax.set_xlim(0, 1) - ax.set_ylim(0, 1) - - - 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/dev/_sources/examples/pylab_examples/demo_text_rotation_mode.txt b/dev/_sources/examples/pylab_examples/demo_text_rotation_mode.txt deleted file mode 100644 index 17c794289ee..00000000000 --- a/dev/_sources/examples/pylab_examples/demo_text_rotation_mode.txt +++ /dev/null @@ -1,59 +0,0 @@ -.. _pylab_examples-demo_text_rotation_mode: - -pylab_examples example code: demo_text_rotation_mode.py -======================================================= - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/pylab_examples/demo_text_rotation_mode.py - -:: - - - #clf() - from mpl_toolkits.axes_grid1.axes_grid import ImageGrid - - def test_rotation_mode(fig, mode, subplot_location): - ha_list = "left center right".split() - va_list = "top center baseline bottom".split() - grid = ImageGrid(fig, subplot_location, - nrows_ncols=(len(va_list), len(ha_list)), - share_all=True, aspect=True, #label_mode='1', - cbar_mode=None) - - for ha, ax in zip(ha_list, grid.axes_row[-1]): - ax.axis["bottom"].label.set_text(ha) - - grid.axes_row[0][1].set_title(mode, size="large") - - for va, ax in zip(va_list, grid.axes_column[0]): - ax.axis["left"].label.set_text(va) - - i = 0 - for va in va_list: - for ha in ha_list: - ax = grid[i] - for axis in ax.axis.values(): - axis.toggle(ticks=False, ticklabels=False) - - ax.text(0.5, 0.5, "Tpg", - size="large", rotation=40, - bbox=dict(boxstyle="square,pad=0.", - ec="none", fc="0.5", alpha=0.5), - ha=ha, va=va, - rotation_mode=mode) - ax.axvline(0.5) - ax.axhline(0.5) - i += 1 - - if 1: - import matplotlib.pyplot as plt - fig = plt.figure(1, figsize=(5.5,4 )) - fig.clf() - - test_rotation_mode(fig, "default", 121) - test_rotation_mode(fig, "anchor", 122) - plt.show() - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/pylab_examples/demo_tight_layout.txt b/dev/_sources/examples/pylab_examples/demo_tight_layout.txt deleted file mode 100644 index 110182c9396..00000000000 --- a/dev/_sources/examples/pylab_examples/demo_tight_layout.txt +++ /dev/null @@ -1,119 +0,0 @@ -.. _pylab_examples-demo_tight_layout: - -pylab_examples example code: demo_tight_layout.py -================================================= - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/pylab_examples/demo_tight_layout.py - -:: - - - import matplotlib.pyplot as plt - - - import random - fontsizes = [8, 16, 24, 32] - def example_plot(ax): - ax.plot([1, 2]) - ax.set_xlabel('x-label', fontsize=random.choice(fontsizes)) - ax.set_ylabel('y-label', fontsize=random.choice(fontsizes)) - ax.set_title('Title', fontsize=random.choice(fontsizes)) - - fig, ax = plt.subplots() - example_plot(ax) - plt.tight_layout() - - fig, ((ax1, ax2), (ax3, ax4)) = plt.subplots(nrows=2, ncols=2) - example_plot(ax1) - example_plot(ax2) - example_plot(ax3) - example_plot(ax4) - plt.tight_layout() - - fig, (ax1, ax2) = plt.subplots(nrows=2, ncols=1) - example_plot(ax1) - example_plot(ax2) - plt.tight_layout() - - fig, (ax1, ax2) = plt.subplots(nrows=1, ncols=2) - example_plot(ax1) - example_plot(ax2) - plt.tight_layout() - - fig, axes = plt.subplots(nrows=3, ncols=3) - for row in axes: - for ax in row: - example_plot(ax) - plt.tight_layout() - - - fig = plt.figure() - - ax1 = plt.subplot(221) - ax2 = plt.subplot(223) - ax3 = plt.subplot(122) - - example_plot(ax1) - example_plot(ax2) - example_plot(ax3) - - plt.tight_layout() - - - fig = plt.figure() - - ax1 = plt.subplot2grid((3, 3), (0, 0)) - ax2 = plt.subplot2grid((3, 3), (0, 1), colspan=2) - ax3 = plt.subplot2grid((3, 3), (1, 0), colspan=2, rowspan=2) - ax4 = plt.subplot2grid((3, 3), (1, 2), rowspan=2) - - example_plot(ax1) - example_plot(ax2) - example_plot(ax3) - example_plot(ax4) - - plt.tight_layout() - - plt.show() - - - fig = plt.figure() - - import matplotlib.gridspec as gridspec - - gs1 = gridspec.GridSpec(3, 1) - ax1 = fig.add_subplot(gs1[0]) - ax2 = fig.add_subplot(gs1[1]) - ax3 = fig.add_subplot(gs1[2]) - - example_plot(ax1) - example_plot(ax2) - example_plot(ax3) - - gs1.tight_layout(fig, rect=[None, None, 0.45, None]) - - gs2 = gridspec.GridSpec(2, 1) - ax4 = fig.add_subplot(gs2[0]) - ax5 = fig.add_subplot(gs2[1]) - - #example_plot(ax4) - #example_plot(ax5) - - gs2.tight_layout(fig, rect=[0.45, None, None, None]) - - # now match the top and bottom of two gridspecs. - top = min(gs1.top, gs2.top) - bottom = max(gs1.bottom, gs2.bottom) - - gs1.update(top=top, bottom=bottom) - gs2.update(top=top, bottom=bottom) - - plt.show() - - - - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/pylab_examples/dolphin.txt b/dev/_sources/examples/pylab_examples/dolphin.txt deleted file mode 100644 index afae091c13a..00000000000 --- a/dev/_sources/examples/pylab_examples/dolphin.txt +++ /dev/null @@ -1,105 +0,0 @@ -.. _pylab_examples-dolphin: - -pylab_examples example code: dolphin.py -======================================= - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/pylab_examples/dolphin.py - -:: - - import matplotlib.cm as cm - import matplotlib.pyplot as plt - from matplotlib.patches import Circle, PathPatch - from matplotlib.path import Path - from matplotlib.transforms import Affine2D - import numpy as np - - - r = np.random.rand(50) - t = np.random.rand(50) * np.pi * 2.0 - x = r * np.cos(t) - y = r * np.sin(t) - - fig = plt.figure(figsize=(6,6)) - ax = plt.subplot(111) - circle = Circle((0, 0), 1, facecolor='none', - edgecolor=(0,0.8,0.8), linewidth=3, alpha=0.5) - ax.add_patch(circle) - - im = plt.imshow(np.random.random((100, 100)), - origin='lower', cmap=cm.winter, - interpolation='spline36', - extent=([-1, 1, -1, 1])) - im.set_clip_path(circle) - - plt.plot(x, y, 'o', color=(0.9, 0.9, 1.0), alpha=0.8) - - # Dolphin from OpenClipart library by Andy Fitzsimon - # - # - # - # - # - - dolphin = """ - M -0.59739425,160.18173 C -0.62740401,160.18885 -0.57867129,160.11183 - -0.57867129,160.11183 C -0.57867129,160.11183 -0.5438361,159.89315 - -0.39514638,159.81496 C -0.24645668,159.73678 -0.18316813,159.71981 - -0.18316813,159.71981 C -0.18316813,159.71981 -0.10322971,159.58124 - -0.057804323,159.58725 C -0.029723983,159.58913 -0.061841603,159.60356 - -0.071265813,159.62815 C -0.080250183,159.65325 -0.082918513,159.70554 - -0.061841203,159.71248 C -0.040763903,159.7194 -0.0066711426,159.71091 - 0.077336307,159.73612 C 0.16879567,159.76377 0.28380306,159.86448 - 0.31516668,159.91533 C 0.3465303,159.96618 0.5011127,160.1771 - 0.5011127,160.1771 C 0.63668998,160.19238 0.67763022,160.31259 - 0.66556395,160.32668 C 0.65339985,160.34212 0.66350443,160.33642 - 0.64907098,160.33088 C 0.63463742,160.32533 0.61309688,160.297 - 0.5789627,160.29339 C 0.54348657,160.28968 0.52329693,160.27674 - 0.50728856,160.27737 C 0.49060916,160.27795 0.48965803,160.31565 - 0.46114204,160.33673 C 0.43329696,160.35786 0.4570711,160.39871 - 0.43309565,160.40685 C 0.4105108,160.41442 0.39416631,160.33027 - 0.3954995,160.2935 C 0.39683269,160.25672 0.43807996,160.21522 - 0.44567915,160.19734 C 0.45327833,160.17946 0.27946869,159.9424 - -0.061852613,159.99845 C -0.083965233,160.0427 -0.26176109,160.06683 - -0.26176109,160.06683 C -0.30127962,160.07028 -0.21167141,160.09731 - -0.24649368,160.1011 C -0.32642366,160.11569 -0.34521187,160.06895 - -0.40622293,160.0819 C -0.467234,160.09485 -0.56738444,160.17461 - -0.59739425,160.18173 - """ - - vertices = [] - codes = [] - parts = dolphin.split() - i = 0 - code_map = { - 'M': (Path.MOVETO, 1), - 'C': (Path.CURVE4, 3), - 'L': (Path.LINETO, 1) - } - - while i < len(parts): - code = parts[i] - path_code, npoints = code_map[code] - codes.extend([path_code] * npoints) - vertices.extend([[float(x) for x in y.split(',')] for y in parts[i+1:i+npoints+1]]) - i += npoints + 1 - vertices = np.array(vertices, np.float) - vertices[:,1] -= 160 - - dolphin_path = Path(vertices, codes) - dolphin_patch = PathPatch(dolphin_path, facecolor=(0.6, 0.6, 0.6), - edgecolor=(0.0, 0.0, 0.0)) - ax.add_patch(dolphin_patch) - - vertices = Affine2D().rotate_deg(60).transform(vertices) - dolphin_path2 = Path(vertices, codes) - dolphin_patch2 = PathPatch(dolphin_path2, facecolor=(0.5, 0.5, 0.5), - edgecolor=(0.0, 0.0, 0.0)) - ax.add_patch(dolphin_patch2) - - plt.show() - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/pylab_examples/ellipse_collection.txt b/dev/_sources/examples/pylab_examples/ellipse_collection.txt deleted file mode 100644 index c021e70441f..00000000000 --- a/dev/_sources/examples/pylab_examples/ellipse_collection.txt +++ /dev/null @@ -1,48 +0,0 @@ -.. _pylab_examples-ellipse_collection: - -pylab_examples example code: ellipse_collection.py -================================================== - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/pylab_examples/ellipse_collection.py - -:: - - import matplotlib.pyplot as plt - import numpy as np - from matplotlib.collections import EllipseCollection - - x = np.arange(10) - y = np.arange(15) - X, Y = np.meshgrid(x, y) - - XY = np.hstack((X.ravel()[:,np.newaxis], Y.ravel()[:,np.newaxis])) - - ww = X/10.0 - hh = Y/15.0 - aa = X*9 - - - ax = plt.subplot(1,1,1) - - ec = EllipseCollection( - ww, - hh, - aa, - units='x', - offsets=XY, - transOffset=ax.transData) - ec.set_array((X+Y).ravel()) - ax.add_collection(ec) - ax.autoscale_view() - ax.set_xlabel('X') - ax.set_ylabel('y') - cbar = plt.colorbar(ec) - cbar.set_label('X+Y') - plt.show() - - - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/pylab_examples/ellipse_demo.txt b/dev/_sources/examples/pylab_examples/ellipse_demo.txt deleted file mode 100644 index ace208d474d..00000000000 --- a/dev/_sources/examples/pylab_examples/ellipse_demo.txt +++ /dev/null @@ -1,34 +0,0 @@ -.. _pylab_examples-ellipse_demo: - -pylab_examples example code: ellipse_demo.py -============================================ - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/pylab_examples/ellipse_demo.py - -:: - - from pylab import figure, show, rand - from matplotlib.patches import Ellipse - - NUM = 250 - - ells = [Ellipse(xy=rand(2)*10, width=rand(), height=rand(), angle=rand()*360) - for i in range(NUM)] - - fig = figure() - ax = fig.add_subplot(111, aspect='equal') - for e in ells: - ax.add_artist(e) - e.set_clip_box(ax.bbox) - e.set_alpha(rand()) - e.set_facecolor(rand(3)) - - ax.set_xlim(0, 10) - ax.set_ylim(0, 10) - - show() - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/pylab_examples/ellipse_rotated.txt b/dev/_sources/examples/pylab_examples/ellipse_rotated.txt deleted file mode 100644 index 4a5946cb97c..00000000000 --- a/dev/_sources/examples/pylab_examples/ellipse_rotated.txt +++ /dev/null @@ -1,33 +0,0 @@ -.. _pylab_examples-ellipse_rotated: - -pylab_examples example code: ellipse_rotated.py -=============================================== - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/pylab_examples/ellipse_rotated.py - -:: - - from pylab import * - from matplotlib.patches import Ellipse - - delta = 45.0 # degrees - - angles = arange(0, 360+delta, delta) - ells = [Ellipse((1, 1), 4, 2, a) for a in angles] - - a = subplot(111, aspect='equal') - - for e in ells: - e.set_clip_box(a.bbox) - e.set_alpha(0.1) - a.add_artist(e) - - xlim(-2, 4) - ylim(-1, 3) - - show() - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/pylab_examples/equal_aspect_ratio.txt b/dev/_sources/examples/pylab_examples/equal_aspect_ratio.txt deleted file mode 100644 index 624e0edecd0..00000000000 --- a/dev/_sources/examples/pylab_examples/equal_aspect_ratio.txt +++ /dev/null @@ -1,34 +0,0 @@ -.. _pylab_examples-equal_aspect_ratio: - -pylab_examples example code: equal_aspect_ratio.py -================================================== - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/pylab_examples/equal_aspect_ratio.py - -:: - - #!/usr/bin/env python - """ - Example: simple line plot. - Show how to make a plot that has equal aspect ratio - """ - from pylab import * - - t = arange(0.0, 1.0+0.01, 0.01) - s = cos(2*2*pi*t) - plot(t, s, '-', lw=2) - - xlabel('time (s)') - ylabel('voltage (mV)') - title('About as simple as it gets, folks') - grid(True) - - axes().set_aspect('equal', 'datalim') - - - show() - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/pylab_examples/errorbar_demo.txt b/dev/_sources/examples/pylab_examples/errorbar_demo.txt deleted file mode 100644 index 17ae20fb3db..00000000000 --- a/dev/_sources/examples/pylab_examples/errorbar_demo.txt +++ /dev/null @@ -1,62 +0,0 @@ -.. _pylab_examples-errorbar_demo: - -pylab_examples example code: errorbar_demo.py -============================================= - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/pylab_examples/errorbar_demo.py - -:: - - #!/usr/bin/env python - import numpy as np - import matplotlib.pyplot as plt - - # example data - x = np.arange(0.1, 4, 0.5) - y = np.exp(-x) - - # example variable error bar values - yerr = 0.1 + 0.2*np.sqrt(x) - xerr = 0.1 + yerr - - # First illustrate basic pyplot interface, using defaults where possible. - plt.figure() - plt.errorbar(x, y, xerr=0.2, yerr=0.4) - plt.title("Simplest errorbars, 0.2 in x, 0.4 in y") - - # Now switch to a more OO interface to exercise more features. - fig, axs = plt.subplots(nrows=2, ncols=2, sharex=True) - ax = axs[0,0] - ax.errorbar(x, y, yerr=yerr, fmt='o') - ax.set_title('Vert. symmetric') - - # With 4 subplots, reduce the number of axis ticks to avoid crowding. - ax.locator_params(nbins=4) - - ax = axs[0,1] - ax.errorbar(x, y, xerr=xerr, fmt='o') - ax.set_title('Hor. symmetric') - - ax = axs[1,0] - ax.errorbar(x, y, yerr=[yerr, 2*yerr], xerr=[xerr, 2*xerr], fmt='--o') - ax.set_title('H, V asymmetric') - - ax = axs[1,1] - ax.set_yscale('log') - # Here we have to be careful to keep all y values positive: - ylower = np.maximum(1e-2, y - yerr) - yerr_lower = y - ylower - - ax.errorbar(x, y, yerr=[yerr_lower, 2*yerr], xerr=xerr, - fmt='o', ecolor='g', capthick=2) - ax.set_title('Mixed sym., log y') - - fig.suptitle('Variable errorbars') - - plt.show() - - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/pylab_examples/errorbar_limits.txt b/dev/_sources/examples/pylab_examples/errorbar_limits.txt deleted file mode 100644 index aece8543f2c..00000000000 --- a/dev/_sources/examples/pylab_examples/errorbar_limits.txt +++ /dev/null @@ -1,54 +0,0 @@ -.. _pylab_examples-errorbar_limits: - -pylab_examples example code: errorbar_limits.py -=============================================== - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/pylab_examples/errorbar_limits.py - -:: - - ''' - Illustration of upper and lower limit symbols on errorbars - ''' - - from math import pi - from numpy import array, arange, sin - import pylab as P - - fig = P.figure() - x = arange(10.0) - y = sin(arange(10.0)/20.0*pi) - - P.errorbar(x,y,yerr=0.1,capsize=3) - - y = sin(arange(10.0)/20.0*pi) + 1 - P.errorbar(x,y,yerr=0.1, uplims=True) - - y = sin(arange(10.0)/20.0*pi) + 2 - upperlimits = array([1,0]*5) - lowerlimits = array([0,1]*5) - P.errorbar(x, y, yerr=0.1, uplims=upperlimits, lolims=lowerlimits) - - P.xlim(-1,10) - - fig = P.figure() - x = arange(10.0)/10.0 - y = (x+0.1)**2 - - P.errorbar(x, y, xerr=0.1, xlolims=True) - y = (x+0.1)**3 - - P.errorbar(x+0.6, y, xerr=0.1, xuplims=upperlimits, xlolims=lowerlimits) - - y = (x+0.1)**4 - P.errorbar(x+1.2, y, xerr=0.1, xuplims=True) - - P.xlim(-0.2,2.4) - P.ylim(-0.1,1.3) - - P.show() - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/pylab_examples/errorbar_subsample.txt b/dev/_sources/examples/pylab_examples/errorbar_subsample.txt deleted file mode 100644 index 89aa553e42f..00000000000 --- a/dev/_sources/examples/pylab_examples/errorbar_subsample.txt +++ /dev/null @@ -1,44 +0,0 @@ -.. _pylab_examples-errorbar_subsample: - -pylab_examples example code: errorbar_subsample.py -================================================== - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/pylab_examples/errorbar_subsample.py - -:: - - ''' - Demo for the errorevery keyword to show data full accuracy data plots with - few errorbars. - ''' - - import numpy as np - import matplotlib.pyplot as plt - - # example data - x = np.arange(0.1, 4, 0.1) - y = np.exp(-x) - - # example variable error bar values - yerr = 0.1 + 0.1*np.sqrt(x) - - - # Now switch to a more OO interface to exercise more features. - fig, axs = plt.subplots(nrows=1, ncols=2, sharex=True) - ax = axs[0] - ax.errorbar(x, y, yerr=yerr) - ax.set_title('all errorbars') - - ax = axs[1] - ax.errorbar(x, y, yerr=yerr, errorevery=5) - ax.set_title('only every 5th errorbar') - - - fig.suptitle('Errorbar subsampling for better visualibility') - - plt.show() - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/pylab_examples/eventcollection_demo.txt b/dev/_sources/examples/pylab_examples/eventcollection_demo.txt deleted file mode 100644 index 7a1e32284ab..00000000000 --- a/dev/_sources/examples/pylab_examples/eventcollection_demo.txt +++ /dev/null @@ -1,68 +0,0 @@ -.. _pylab_examples-eventcollection_demo: - -pylab_examples example code: eventcollection_demo.py -==================================================== - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/pylab_examples/eventcollection_demo.py - -:: - - #!/usr/bin/env python - # -*- Coding:utf-8 -*- - '''Plot two curves, then use EventCollections to mark the locations of the x - and y data points on the respective axes for each curve''' - - import matplotlib.pyplot as plt - from matplotlib.collections import EventCollection - import numpy as np - - # create random data - np.random.seed(50) - xdata = np.random.random([2, 10]) - - # split the data into two parts - xdata1 = xdata[0, :] - xdata2 = xdata[1, :] - - # sort the data so it makes clean curves - xdata1.sort() - xdata2.sort() - - # create some y data points - ydata1 = xdata1 ** 2 - ydata2 = 1 - xdata2 ** 3 - - # plot the data - fig = plt.figure() - ax = fig.add_subplot(1, 1, 1) - ax.plot(xdata1, ydata1, 'r', xdata2, ydata2, 'b') - - # create the events marking the x data points - xevents1 = EventCollection(xdata1, color=[1, 0, 0], linelength=0.05) - xevents2 = EventCollection(xdata2, color=[0, 0, 1], linelength=0.05) - - # create the events marking the y data points - yevents1 = EventCollection(ydata1, color=[1, 0, 0], linelength=0.05, - orientation='vertical') - yevents2 = EventCollection(ydata2, color=[0, 0, 1], linelength=0.05, - orientation='vertical') - - # add the events to the axis - ax.add_collection(xevents1) - ax.add_collection(xevents2) - ax.add_collection(yevents1) - ax.add_collection(yevents2) - - # set the limits - ax.set_xlim([0, 1]) - ax.set_ylim([0, 1]) - - ax.set_title('line plot with data points') - - # display the plot - plt.show() - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/pylab_examples/eventplot_demo.txt b/dev/_sources/examples/pylab_examples/eventplot_demo.txt deleted file mode 100644 index 02565fa38b7..00000000000 --- a/dev/_sources/examples/pylab_examples/eventplot_demo.txt +++ /dev/null @@ -1,81 +0,0 @@ -.. _pylab_examples-eventplot_demo: - -pylab_examples example code: eventplot_demo.py -============================================== - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/pylab_examples/eventplot_demo.py - -:: - - #!/usr/bin/env python - # -*- Coding:utf-8 -*- - '''an eventplot showing sequences of events with various line properties - the plot is shown in both horizontal and vertical orientations''' - - import matplotlib.pyplot as plt - import numpy as np - - # set the random seed - np.random.seed(0) - - # create random data - data1 = np.random.random([6, 50]) - - # set different colors for each set of positions - colors1 = np.array([[1, 0, 0], - [0, 1, 0], - [0, 0, 1], - [1, 1, 0], - [1, 0, 1], - [0, 1, 1]]) - - # set different line properties for each set of positions - # note that some overlap - lineoffsets1 = np.array([-15, -3, 1, 1.5, 6, 10]) - linelengths1 = [5, 2, 1, 1, 3, 1.5] - - fig = plt.figure() - - # create a horizontal plot - ax1 = fig.add_subplot(221) - ax1.eventplot(data1, colors=colors1, lineoffsets=lineoffsets1, - linelengths=linelengths1) - ax1.set_title('horizontal eventplot 1') - - - # create a vertical plot - ax2 = fig.add_subplot(223) - ax2.eventplot(data1, colors=colors1, lineoffsets=lineoffsets1, - linelengths=linelengths1, orientation='vertical') - ax2.set_title('vertical eventplot 1') - - # create another set of random data. - # the gamma distribution is only used fo aesthetic purposes - data2 = np.random.gamma(4, size=[60, 50]) - - # use individual values for the parameters this time - # these values will be used for all data sets (except lineoffsets2, which - # sets the increment between each data set in this usage) - colors2 = [[0, 0, 0]] - lineoffsets2 = 1 - linelengths2 = 1 - - # create a horizontal plot - ax1 = fig.add_subplot(222) - ax1.eventplot(data2, colors=colors2, lineoffsets=lineoffsets2, - linelengths=linelengths2) - ax1.set_title('horizontal eventplot 2') - - - # create a vertical plot - ax2 = fig.add_subplot(224) - ax2.eventplot(data2, colors=colors2, lineoffsets=lineoffsets2, - linelengths=linelengths2, orientation='vertical') - ax2.set_title('vertical eventplot 2') - - plt.show() - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/pylab_examples/fancyarrow_demo.txt b/dev/_sources/examples/pylab_examples/fancyarrow_demo.txt deleted file mode 100644 index 2722c985356..00000000000 --- a/dev/_sources/examples/pylab_examples/fancyarrow_demo.txt +++ /dev/null @@ -1,64 +0,0 @@ -.. _pylab_examples-fancyarrow_demo: - -pylab_examples example code: fancyarrow_demo.py -=============================================== - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/pylab_examples/fancyarrow_demo.py - -:: - - import matplotlib.patches as mpatches - import matplotlib.pyplot as plt - - styles = mpatches.ArrowStyle.get_styles() - - ncol=2 - nrow = (len(styles)+1) // ncol - figheight = (nrow+0.5) - fig1 = plt.figure(1, (4.*ncol/1.5, figheight/1.5)) - fontsize = 0.2 * 70 - - - ax = fig1.add_axes([0, 0, 1, 1], frameon=False, aspect=1.) - - ax.set_xlim(0, 4*ncol) - ax.set_ylim(0, figheight) - - def to_texstring(s): - s = s.replace("<", r"$<$") - s = s.replace(">", r"$>$") - s = s.replace("|", r"$|$") - return s - - for i, (stylename, styleclass) in enumerate(sorted(styles.items())): - x = 3.2 + (i//nrow)*4 - y = (figheight - 0.7 - i%nrow) # /figheight - p = mpatches.Circle((x, y), 0.2, fc="w") - ax.add_patch(p) - - ax.annotate(to_texstring(stylename), (x, y), - (x-1.2, y), - #xycoords="figure fraction", textcoords="figure fraction", - ha="right", va="center", - size=fontsize, - arrowprops=dict(arrowstyle=stylename, - patchB=p, - shrinkA=5, - shrinkB=5, - fc="w", ec="k", - connectionstyle="arc3,rad=-0.05", - ), - bbox=dict(boxstyle="square", fc="w")) - - ax.xaxis.set_visible(False) - ax.yaxis.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/dev/_sources/examples/pylab_examples/fancybox_demo.txt b/dev/_sources/examples/pylab_examples/fancybox_demo.txt deleted file mode 100644 index 6ec7a3dbf57..00000000000 --- a/dev/_sources/examples/pylab_examples/fancybox_demo.txt +++ /dev/null @@ -1,185 +0,0 @@ -.. _pylab_examples-fancybox_demo: - -pylab_examples example code: fancybox_demo.py -============================================= - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/pylab_examples/fancybox_demo.py - -:: - - import matplotlib.pyplot as plt - import matplotlib.transforms as mtransforms - from matplotlib.patches import FancyBboxPatch - - - # Bbox object around which the fancy box will be drawn. - bb = mtransforms.Bbox([[0.3, 0.4], [0.7, 0.6]]) - - def draw_bbox(ax, bb): - # boxstyle=square with pad=0, i.e. bbox itself. - p_bbox = FancyBboxPatch((bb.xmin, bb.ymin), - abs(bb.width), abs(bb.height), - boxstyle="square,pad=0.", - ec="k", fc="none", zorder=10., - ) - ax.add_patch(p_bbox) - - def test1(ax): - - # a fancy box with round corners. pad=0.1 - p_fancy = FancyBboxPatch((bb.xmin, bb.ymin), - abs(bb.width), abs(bb.height), - boxstyle="round,pad=0.1", - fc=(1., .8, 1.), - ec=(1., 0.5, 1.)) - - - ax.add_patch(p_fancy) - - ax.text(0.1, 0.8, - r' boxstyle="round,pad=0.1"', - size=10, transform=ax.transAxes) - - # draws control points for the fancy box. - #l = p_fancy.get_path().vertices - #ax.plot(l[:,0], l[:,1], ".") - - # draw the original bbox in black - draw_bbox(ax, bb) - - - def test2(ax): - - # bbox=round has two optional argument. pad and rounding_size. - # They can be set during the initialization. - p_fancy = FancyBboxPatch((bb.xmin, bb.ymin), - abs(bb.width), abs(bb.height), - boxstyle="round,pad=0.1", - fc=(1., .8, 1.), - ec=(1., 0.5, 1.)) - - - ax.add_patch(p_fancy) - - # boxstyle and its argument can be later modified with - # set_boxstyle method. Note that the old attributes are simply - # forgotten even if the boxstyle name is same. - - p_fancy.set_boxstyle("round,pad=0.1, rounding_size=0.2") - #or - #p_fancy.set_boxstyle("round", pad=0.1, rounding_size=0.2) - - ax.text(0.1, 0.8, - ' boxstyle="round,pad=0.1\n rounding\\_size=0.2"', - size=10, transform=ax.transAxes) - - # draws control points for the fancy box. - #l = p_fancy.get_path().vertices - #ax.plot(l[:,0], l[:,1], ".") - - draw_bbox(ax, bb) - - - - def test3(ax): - - # mutation_scale determine overall scale of the mutation, - # i.e. both pad and rounding_size is scaled according to this - # value. - p_fancy = FancyBboxPatch((bb.xmin, bb.ymin), - abs(bb.width), abs(bb.height), - boxstyle="round,pad=0.1", - mutation_scale=2., - fc=(1., .8, 1.), - ec=(1., 0.5, 1.)) - - - ax.add_patch(p_fancy) - - ax.text(0.1, 0.8, - ' boxstyle="round,pad=0.1"\n mutation\\_scale=2', - size=10, transform=ax.transAxes) - - # draws control points for the fancy box. - #l = p_fancy.get_path().vertices - #ax.plot(l[:,0], l[:,1], ".") - - draw_bbox(ax, bb) - - - - def test4(ax): - - # When the aspect ratio of the axes is not 1, the fancy box may - # not be what you expected (green) - - p_fancy = FancyBboxPatch((bb.xmin, bb.ymin), - abs(bb.width), abs(bb.height), - boxstyle="round,pad=0.2", - fc="none", - ec=(0., .5, 0.), zorder=4) - - - ax.add_patch(p_fancy) - - - # You can compensate this by setting the mutation_aspect (pink). - p_fancy = FancyBboxPatch((bb.xmin, bb.ymin), - abs(bb.width), abs(bb.height), - boxstyle="round,pad=0.3", - mutation_aspect=.5, - fc=(1., 0.8, 1.), - ec=(1., 0.5, 1.)) - - - ax.add_patch(p_fancy) - - ax.text(0.1, 0.8, - ' boxstyle="round,pad=0.3"\n mutation\\_aspect=.5', - size=10, transform=ax.transAxes) - - draw_bbox(ax, bb) - - - - def test_all(): - plt.clf() - - ax = plt.subplot(2, 2, 1) - test1(ax) - ax.set_xlim(0., 1.) - ax.set_ylim(0., 1.) - ax.set_title("test1") - ax.set_aspect(1.) - - - ax = plt.subplot(2, 2, 2) - ax.set_title("test2") - test2(ax) - ax.set_xlim(0., 1.) - ax.set_ylim(0., 1.) - ax.set_aspect(1.) - - ax = plt.subplot(2, 2, 3) - ax.set_title("test3") - test3(ax) - ax.set_xlim(0., 1.) - ax.set_ylim(0., 1.) - ax.set_aspect(1) - - ax = plt.subplot(2, 2, 4) - ax.set_title("test4") - test4(ax) - ax.set_xlim(-0.5, 1.5) - ax.set_ylim(0., 1.) - ax.set_aspect(2.) - - plt.draw() - plt.show() - - test_all() - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/pylab_examples/fancybox_demo2.txt b/dev/_sources/examples/pylab_examples/fancybox_demo2.txt deleted file mode 100644 index a7113b109a2..00000000000 --- a/dev/_sources/examples/pylab_examples/fancybox_demo2.txt +++ /dev/null @@ -1,32 +0,0 @@ -.. _pylab_examples-fancybox_demo2: - -pylab_examples example code: fancybox_demo2.py -============================================== - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/pylab_examples/fancybox_demo2.py - -:: - - import matplotlib.patches as mpatch - import matplotlib.pyplot as plt - - styles = mpatch.BoxStyle.get_styles() - - figheight = (len(styles)+.5) - fig1 = plt.figure(1, (4/1.5, figheight/1.5)) - fontsize = 0.3 * 72 - - for i, (stylename, styleclass) in enumerate(styles.items()): - fig1.text(0.5, (float(len(styles)) - 0.5 - i)/figheight, stylename, - ha="center", - size=fontsize, - transform=fig1.transFigure, - bbox=dict(boxstyle=stylename, fc="w", ec="k")) - 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/dev/_sources/examples/pylab_examples/fancytextbox_demo.txt b/dev/_sources/examples/pylab_examples/fancytextbox_demo.txt deleted file mode 100644 index cba601da572..00000000000 --- a/dev/_sources/examples/pylab_examples/fancytextbox_demo.txt +++ /dev/null @@ -1,35 +0,0 @@ -.. _pylab_examples-fancytextbox_demo: - -pylab_examples example code: fancytextbox_demo.py -================================================= - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/pylab_examples/fancytextbox_demo.py - -:: - - import matplotlib.pyplot as plt - - plt.text(0.6, 0.5, "test", size=50, rotation=30., - ha="center", va="center", - bbox = dict(boxstyle="round", - ec=(1., 0.5, 0.5), - fc=(1., 0.8, 0.8), - ) - ) - - plt.text(0.5, 0.4, "test", size=50, rotation=-30., - ha="right", va="top", - bbox = dict(boxstyle="square", - ec=(1., 0.5, 0.5), - fc=(1., 0.8, 0.8), - ) - ) - - - 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/dev/_sources/examples/pylab_examples/figimage_demo.txt b/dev/_sources/examples/pylab_examples/figimage_demo.txt deleted file mode 100644 index cf290018b96..00000000000 --- a/dev/_sources/examples/pylab_examples/figimage_demo.txt +++ /dev/null @@ -1,36 +0,0 @@ -.. _pylab_examples-figimage_demo: - -pylab_examples example code: figimage_demo.py -============================================= - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/pylab_examples/figimage_demo.py - -:: - - """ - This illustrates placing images directly in the figure, with no axes. - - """ - import numpy as np - import matplotlib - import matplotlib.cm as cm - import matplotlib.pyplot as plt - - - fig = plt.figure() - Z = np.arange(10000.0) - Z.shape = 100,100 - Z[:,50:] = 1. - - im1 = plt.figimage(Z, xo=50, yo=0, cmap=cm.jet, origin='lower') - im2 = plt.figimage(Z, xo=100, yo=100, alpha=.8, cmap=cm.jet, origin='lower') - - plt.show() - - - - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/pylab_examples/figlegend_demo.txt b/dev/_sources/examples/pylab_examples/figlegend_demo.txt deleted file mode 100644 index 5f429be1262..00000000000 --- a/dev/_sources/examples/pylab_examples/figlegend_demo.txt +++ /dev/null @@ -1,33 +0,0 @@ -.. _pylab_examples-figlegend_demo: - -pylab_examples example code: figlegend_demo.py -============================================== - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/pylab_examples/figlegend_demo.py - -:: - - import numpy as np - import matplotlib.pyplot as plt - - fig = plt.figure() - ax1 = fig.add_axes([0.1, 0.1, 0.4, 0.7]) - ax2 = fig.add_axes([0.55, 0.1, 0.4, 0.7]) - - x = np.arange(0.0, 2.0, 0.02) - y1 = np.sin(2*np.pi*x) - y2 = np.exp(-x) - l1, l2 = ax1.plot(x, y1, 'rs-', x, y2, 'go') - - y3 = np.sin(4*np.pi*x) - y4 = np.exp(-2*x) - l3, l4 = ax2.plot(x, y3, 'yd-', x, y3, 'k^') - - fig.legend((l1, l2), ('Line 1', 'Line 2'), 'upper left') - fig.legend((l3, l4), ('Line 3', 'Line 4'), 'upper right') - plt.show() - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/pylab_examples/figure_title.txt b/dev/_sources/examples/pylab_examples/figure_title.txt deleted file mode 100644 index 78c37bfbccc..00000000000 --- a/dev/_sources/examples/pylab_examples/figure_title.txt +++ /dev/null @@ -1,43 +0,0 @@ -.. _pylab_examples-figure_title: - -pylab_examples example code: figure_title.py -============================================ - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/pylab_examples/figure_title.py - -:: - - #!/usr/bin/env python - from matplotlib.font_manager import FontProperties - from pylab import * - - def f(t): - s1 = cos(2*pi*t) - e1 = exp(-t) - return multiply(s1,e1) - - t1 = arange(0.0, 5.0, 0.1) - t2 = arange(0.0, 5.0, 0.02) - t3 = arange(0.0, 2.0, 0.01) - - - subplot(121) - plot(t1, f(t1), 'bo', t2, f(t2), 'k') - title('subplot 1') - ylabel('Damped oscillation') - suptitle('This is a somewhat long figure title', fontsize=16) - - - subplot(122) - plot(t3, cos(2*pi*t3), 'r--') - xlabel('time (s)') - title('subplot 2') - ylabel('Undamped') - - show() - - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/pylab_examples/fill_between_demo.txt b/dev/_sources/examples/pylab_examples/fill_between_demo.txt deleted file mode 100644 index a06a1b926ea..00000000000 --- a/dev/_sources/examples/pylab_examples/fill_between_demo.txt +++ /dev/null @@ -1,81 +0,0 @@ -.. _pylab_examples-fill_between_demo: - -pylab_examples example code: fill_between_demo.py -================================================= - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/pylab_examples/fill_between_demo.py - -:: - - #!/usr/bin/env python - import matplotlib.mlab as mlab - from matplotlib.pyplot import figure, show - import numpy as np - - x = np.arange(0.0, 2, 0.01) - y1 = np.sin(2*np.pi*x) - y2 = 1.2*np.sin(4*np.pi*x) - - fig = figure() - ax1 = fig.add_subplot(311) - ax2 = fig.add_subplot(312, sharex=ax1) - ax3 = fig.add_subplot(313, sharex=ax1) - - ax1.fill_between(x, 0, y1) - ax1.set_ylabel('between y1 and 0') - - ax2.fill_between(x, y1, 1) - ax2.set_ylabel('between y1 and 1') - - ax3.fill_between(x, y1, y2) - ax3.set_ylabel('between y1 and y2') - ax3.set_xlabel('x') - - # now fill between y1 and y2 where a logical condition is met. Note - # this is different than calling - # fill_between(x[where], y1[where],y2[where] - # because of edge effects over multiple contiguous regions. - fig = figure() - ax = fig.add_subplot(211) - ax.plot(x, y1, x, y2, color='black') - ax.fill_between(x, y1, y2, where=y2>=y1, facecolor='green', interpolate=True) - ax.fill_between(x, y1, y2, where=y2<=y1, facecolor='red', interpolate=True) - ax.set_title('fill between where') - - # Test support for masked arrays. - y2 = np.ma.masked_greater(y2, 1.0) - ax1 = fig.add_subplot(212, sharex=ax) - ax1.plot(x, y1, x, y2, color='black') - ax1.fill_between(x, y1, y2, where=y2>=y1, facecolor='green', interpolate=True) - ax1.fill_between(x, y1, y2, where=y2<=y1, facecolor='red', interpolate=True) - ax1.set_title('Now regions with y2>1 are masked') - - # This example illustrates a problem; because of the data - # gridding, there are undesired unfilled triangles at the crossover - # points. A brute-force solution would be to interpolate all - # arrays to a very fine grid before plotting. - - # show how to use transforms to create axes spans where a certain condition is satisfied - fig = figure() - ax = fig.add_subplot(111) - y = np.sin(4*np.pi*x) - ax.plot(x, y, color='black') - - # use the data coordinates for the x-axis and the axes coordinates for the y-axis - import matplotlib.transforms as mtransforms - trans = mtransforms.blended_transform_factory(ax.transData, ax.transAxes) - theta = 0.9 - ax.axhline(theta, color='green', lw=2, alpha=0.5) - ax.axhline(-theta, color='red', lw=2, alpha=0.5) - ax.fill_between(x, 0, 1, where=y>theta, facecolor='green', alpha=0.5, transform=trans) - ax.fill_between(x, 0, 1, where=y<-theta, facecolor='red', alpha=0.5, transform=trans) - - - - show() - - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/pylab_examples/fill_betweenx_demo.txt b/dev/_sources/examples/pylab_examples/fill_betweenx_demo.txt deleted file mode 100644 index ba730d2ca18..00000000000 --- a/dev/_sources/examples/pylab_examples/fill_betweenx_demo.txt +++ /dev/null @@ -1,64 +0,0 @@ -.. _pylab_examples-fill_betweenx_demo: - -pylab_examples example code: fill_betweenx_demo.py -================================================== - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/pylab_examples/fill_betweenx_demo.py - -:: - - import matplotlib.mlab as mlab - from matplotlib.pyplot import figure, show - import numpy as np - - ## Copy of fill_between.py but using fill_betweenx() instead. - - x = np.arange(0.0, 2, 0.01) - y1 = np.sin(2*np.pi*x) - y2 = 1.2*np.sin(4*np.pi*x) - - fig = figure() - ax1 = fig.add_subplot(311) - ax2 = fig.add_subplot(312, sharex=ax1) - ax3 = fig.add_subplot(313, sharex=ax1) - - ax1.fill_betweenx(x, 0, y1) - ax1.set_ylabel('between y1 and 0') - - ax2.fill_betweenx(x, y1, 1) - ax2.set_ylabel('between y1 and 1') - - ax3.fill_betweenx(x, y1, y2) - ax3.set_ylabel('between y1 and y2') - ax3.set_xlabel('x') - - # now fill between y1 and y2 where a logical condition is met. Note - # this is different than calling - # fill_between(x[where], y1[where],y2[where] - # because of edge effects over multiple contiguous regions. - fig = figure() - ax = fig.add_subplot(211) - ax.plot(y1, x, y2, x, color='black') - ax.fill_betweenx(x, y1, y2, where=y2>=y1, facecolor='green') - ax.fill_betweenx(x, y1, y2, where=y2<=y1, facecolor='red') - ax.set_title('fill between where') - - # Test support for masked arrays. - y2 = np.ma.masked_greater(y2, 1.0) - ax1 = fig.add_subplot(212, sharex=ax) - ax1.plot(y1, x, y2, x, color='black') - ax1.fill_betweenx(x, y1, y2, where=y2>=y1, facecolor='green') - ax1.fill_betweenx(x, y1, y2, where=y2<=y1, facecolor='red') - ax1.set_title('Now regions with y2 > 1 are masked') - - # This example illustrates a problem; because of the data - # gridding, there are undesired unfilled triangles at the crossover - # points. A brute-force solution would be to interpolate all - # arrays to a very fine grid before plotting. - - show() - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/pylab_examples/fill_demo.txt b/dev/_sources/examples/pylab_examples/fill_demo.txt deleted file mode 100644 index 15eb5b9af77..00000000000 --- a/dev/_sources/examples/pylab_examples/fill_demo.txt +++ /dev/null @@ -1,24 +0,0 @@ -.. _pylab_examples-fill_demo: - -pylab_examples example code: fill_demo.py -========================================= - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/pylab_examples/fill_demo.py - -:: - - #!/usr/bin/env python - import numpy as np - import matplotlib.pyplot as plt - - t = np.arange(0.0, 1.01, 0.01) - s = np.sin(2*2*np.pi*t) - - plt.fill(t, s*np.exp(-5*t), 'r') - 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/dev/_sources/examples/pylab_examples/fill_demo2.txt b/dev/_sources/examples/pylab_examples/fill_demo2.txt deleted file mode 100644 index 3423fd8e94d..00000000000 --- a/dev/_sources/examples/pylab_examples/fill_demo2.txt +++ /dev/null @@ -1,24 +0,0 @@ -.. _pylab_examples-fill_demo2: - -pylab_examples example code: fill_demo2.py -========================================== - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/pylab_examples/fill_demo2.py - -:: - - from matplotlib.pyplot import figure, show - from numpy import arange, sin, pi - - fig = figure() - ax = fig.add_subplot(111) - t = arange(0.0,3.01,0.01) - s = sin(2*pi*t) - c = sin(4*pi*t) - ax.fill(t, s, 'b', t, c, 'g', alpha=0.2) - show() - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/pylab_examples/fill_spiral.txt b/dev/_sources/examples/pylab_examples/fill_spiral.txt deleted file mode 100644 index f0e82896938..00000000000 --- a/dev/_sources/examples/pylab_examples/fill_spiral.txt +++ /dev/null @@ -1,38 +0,0 @@ -.. _pylab_examples-fill_spiral: - -pylab_examples example code: fill_spiral.py -=========================================== - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/pylab_examples/fill_spiral.py - -:: - - #!/usr/bin/env python - - from pylab import * - - theta = arange(0,8*pi,0.1) - a=1 - b=.2 - - for dt in arange(0,2*pi,pi/2.0): - - x = a*cos( theta+dt )*exp(b*theta) - y = a*sin( theta+dt )*exp(b*theta) - - dt = dt+pi/4.0 - - x2 = a*cos( theta+dt )*exp(b*theta) - y2 = a*sin( theta+dt )*exp(b*theta) - - xf = concatenate( (x,x2[::-1]) ) - yf = concatenate( (y,y2[::-1]) ) - - p1=fill(xf,yf) - - show() - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/pylab_examples/filledmarker_demo.txt b/dev/_sources/examples/pylab_examples/filledmarker_demo.txt deleted file mode 100644 index 46544de090c..00000000000 --- a/dev/_sources/examples/pylab_examples/filledmarker_demo.txt +++ /dev/null @@ -1,52 +0,0 @@ -.. _pylab_examples-filledmarker_demo: - -pylab_examples example code: filledmarker_demo.py -================================================= - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/pylab_examples/filledmarker_demo.py - -:: - - import itertools - - import numpy as np - import matplotlib.lines as mlines - import matplotlib.pyplot as plt - - colors = itertools.cycle(['b', 'g', 'r', 'c', 'm', 'y', 'k']) - altcolor = 'lightgreen' - - plt.rcParams['text.usetex'] = False # otherwise, '^' will cause trouble - - y = np.arange(10) - for marker in mlines.Line2D.filled_markers: - f = plt.figure() - f.text(.5,.95, "marker = %r" % marker, ha='center') - for i,fs in enumerate(mlines.Line2D.fillStyles): - color = colors.next() - - ax = f.add_subplot(121) - ax.plot(2*(4-i)+y, c=color, - marker=marker, - markersize=20, - fillstyle=fs, - label=fs) - ax.legend(loc=2) - ax.set_title('fillstyle') - - ax = f.add_subplot(122) - ax.plot(2*(4-i)+y, c=color, - marker=marker, - markersize=20, - markerfacecoloralt=altcolor, - fillstyle=fs, - label=fs) - ax.legend(loc=2) - ax.set_title('fillstyle') - - plt.show() - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/pylab_examples/finance_demo.txt b/dev/_sources/examples/pylab_examples/finance_demo.txt deleted file mode 100644 index a3b056db676..00000000000 --- a/dev/_sources/examples/pylab_examples/finance_demo.txt +++ /dev/null @@ -1,52 +0,0 @@ -.. _pylab_examples-finance_demo: - -pylab_examples example code: finance_demo.py -============================================ - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/pylab_examples/finance_demo.py - -:: - - #!/usr/bin/env python - from pylab import * - from matplotlib.dates import DateFormatter, WeekdayLocator, HourLocator, \ - DayLocator, MONDAY - from matplotlib.finance import quotes_historical_yahoo, candlestick,\ - plot_day_summary, candlestick2 - - # (Year, month, day) tuples suffice as args for quotes_historical_yahoo - date1 = ( 2004, 2, 1) - date2 = ( 2004, 4, 12 ) - - - mondays = WeekdayLocator(MONDAY) # major ticks on the mondays - alldays = DayLocator() # minor ticks on the days - weekFormatter = DateFormatter('%b %d') # e.g., Jan 12 - dayFormatter = DateFormatter('%d') # e.g., 12 - - quotes = quotes_historical_yahoo('INTC', date1, date2) - if len(quotes) == 0: - raise SystemExit - - fig = figure() - fig.subplots_adjust(bottom=0.2) - ax = fig.add_subplot(111) - ax.xaxis.set_major_locator(mondays) - ax.xaxis.set_minor_locator(alldays) - ax.xaxis.set_major_formatter(weekFormatter) - #ax.xaxis.set_minor_formatter(dayFormatter) - - #plot_day_summary(ax, quotes, ticksize=3) - candlestick(ax, quotes, width=0.6) - - ax.xaxis_date() - ax.autoscale_view() - setp( gca().get_xticklabels(), rotation=45, horizontalalignment='right') - - show() - - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/pylab_examples/finance_work2.txt b/dev/_sources/examples/pylab_examples/finance_work2.txt deleted file mode 100644 index 64ba947d07b..00000000000 --- a/dev/_sources/examples/pylab_examples/finance_work2.txt +++ /dev/null @@ -1,223 +0,0 @@ -.. _pylab_examples-finance_work2: - -pylab_examples example code: finance_work2.py -============================================= - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/pylab_examples/finance_work2.py - -:: - - import datetime - import numpy as np - import matplotlib.colors as colors - import matplotlib.finance as finance - import matplotlib.dates as mdates - import matplotlib.ticker as mticker - import matplotlib.mlab as mlab - import matplotlib.pyplot as plt - import matplotlib.font_manager as font_manager - - - startdate = datetime.date(2006,1,1) - today = enddate = datetime.date.today() - ticker = 'SPY' - - - fh = finance.fetch_historical_yahoo(ticker, startdate, enddate) - # a numpy record array with fields: date, open, high, low, close, volume, adj_close) - - r = mlab.csv2rec(fh); fh.close() - r.sort() - - - def moving_average(x, n, type='simple'): - """ - compute an n period moving average. - - type is 'simple' | 'exponential' - - """ - x = np.asarray(x) - if type=='simple': - weights = np.ones(n) - else: - weights = np.exp(np.linspace(-1., 0., n)) - - weights /= weights.sum() - - - a = np.convolve(x, weights, mode='full')[:len(x)] - a[:n] = a[n] - return a - - def relative_strength(prices, n=14): - """ - compute the n period relative strength indicator - http://stockcharts.com/school/doku.php?id=chart_school:glossary_r#relativestrengthindex - http://www.investopedia.com/terms/r/rsi.asp - """ - - deltas = np.diff(prices) - seed = deltas[:n+1] - up = seed[seed>=0].sum()/n - down = -seed[seed<0].sum()/n - rs = up/down - rsi = np.zeros_like(prices) - rsi[:n] = 100. - 100./(1.+rs) - - for i in range(n, len(prices)): - delta = deltas[i-1] # cause the diff is 1 shorter - - if delta>0: - upval = delta - downval = 0. - else: - upval = 0. - downval = -delta - - up = (up*(n-1) + upval)/n - down = (down*(n-1) + downval)/n - - rs = up/down - rsi[i] = 100. - 100./(1.+rs) - - return rsi - - def moving_average_convergence(x, nslow=26, nfast=12): - """ - compute the MACD (Moving Average Convergence/Divergence) using a fast and slow exponential moving avg' - return value is emaslow, emafast, macd which are len(x) arrays - """ - emaslow = moving_average(x, nslow, type='exponential') - emafast = moving_average(x, nfast, type='exponential') - return emaslow, emafast, emafast - emaslow - - - plt.rc('axes', grid=True) - plt.rc('grid', color='0.75', linestyle='-', linewidth=0.5) - - textsize = 9 - left, width = 0.1, 0.8 - rect1 = [left, 0.7, width, 0.2] - rect2 = [left, 0.3, width, 0.4] - rect3 = [left, 0.1, width, 0.2] - - - fig = plt.figure(facecolor='white') - axescolor = '#f6f6f6' # the axes background color - - ax1 = fig.add_axes(rect1, axisbg=axescolor) #left, bottom, width, height - ax2 = fig.add_axes(rect2, axisbg=axescolor, sharex=ax1) - ax2t = ax2.twinx() - ax3 = fig.add_axes(rect3, axisbg=axescolor, sharex=ax1) - - - - ### plot the relative strength indicator - prices = r.adj_close - rsi = relative_strength(prices) - fillcolor = 'darkgoldenrod' - - ax1.plot(r.date, rsi, color=fillcolor) - ax1.axhline(70, color=fillcolor) - ax1.axhline(30, color=fillcolor) - ax1.fill_between(r.date, rsi, 70, where=(rsi>=70), facecolor=fillcolor, edgecolor=fillcolor) - ax1.fill_between(r.date, rsi, 30, where=(rsi<=30), facecolor=fillcolor, edgecolor=fillcolor) - ax1.text(0.6, 0.9, '>70 = overbought', va='top', transform=ax1.transAxes, fontsize=textsize) - ax1.text(0.6, 0.1, '<30 = oversold', transform=ax1.transAxes, fontsize=textsize) - ax1.set_ylim(0, 100) - ax1.set_yticks([30,70]) - ax1.text(0.025, 0.95, 'RSI (14)', va='top', transform=ax1.transAxes, fontsize=textsize) - ax1.set_title('%s daily'%ticker) - - ### plot the price and volume data - dx = r.adj_close - r.close - low = r.low + dx - high = r.high + dx - - deltas = np.zeros_like(prices) - deltas[1:] = np.diff(prices) - up = deltas>0 - ax2.vlines(r.date[up], low[up], high[up], color='black', label='_nolegend_') - ax2.vlines(r.date[~up], low[~up], high[~up], color='black', label='_nolegend_') - ma20 = moving_average(prices, 20, type='simple') - ma200 = moving_average(prices, 200, type='simple') - - linema20, = ax2.plot(r.date, ma20, color='blue', lw=2, label='MA (20)') - linema200, = ax2.plot(r.date, ma200, color='red', lw=2, label='MA (200)') - - - last = r[-1] - s = '%s O:%1.2f H:%1.2f L:%1.2f C:%1.2f, V:%1.1fM Chg:%+1.2f' % ( - today.strftime('%d-%b-%Y'), - last.open, last.high, - last.low, last.close, - last.volume*1e-6, - last.close-last.open ) - t4 = ax2.text(0.3, 0.9, s, transform=ax2.transAxes, fontsize=textsize) - - props = font_manager.FontProperties(size=10) - leg = ax2.legend(loc='center left', shadow=True, fancybox=True, prop=props) - leg.get_frame().set_alpha(0.5) - - - volume = (r.close*r.volume)/1e6 # dollar volume in millions - vmax = volume.max() - poly = ax2t.fill_between(r.date, volume, 0, label='Volume', facecolor=fillcolor, edgecolor=fillcolor) - ax2t.set_ylim(0, 5*vmax) - ax2t.set_yticks([]) - - - ### compute the MACD indicator - fillcolor = 'darkslategrey' - nslow = 26 - nfast = 12 - nema = 9 - emaslow, emafast, macd = moving_average_convergence(prices, nslow=nslow, nfast=nfast) - ema9 = moving_average(macd, nema, type='exponential') - ax3.plot(r.date, macd, color='black', lw=2) - ax3.plot(r.date, ema9, color='blue', lw=1) - ax3.fill_between(r.date, macd-ema9, 0, alpha=0.5, facecolor=fillcolor, edgecolor=fillcolor) - - - ax3.text(0.025, 0.95, 'MACD (%d, %d, %d)'%(nfast, nslow, nema), va='top', - transform=ax3.transAxes, fontsize=textsize) - - #ax3.set_yticks([]) - # turn off upper axis tick labels, rotate the lower ones, etc - for ax in ax1, ax2, ax2t, ax3: - if ax!=ax3: - for label in ax.get_xticklabels(): - label.set_visible(False) - else: - for label in ax.get_xticklabels(): - label.set_rotation(30) - label.set_horizontalalignment('right') - - ax.fmt_xdata = mdates.DateFormatter('%Y-%m-%d') - - - - class MyLocator(mticker.MaxNLocator): - def __init__(self, *args, **kwargs): - mticker.MaxNLocator.__init__(self, *args, **kwargs) - - def __call__(self, *args, **kwargs): - return mticker.MaxNLocator.__call__(self, *args, **kwargs) - - # at most 5 ticks, pruning the upper and lower so they don't overlap - # with other ticks - #ax2.yaxis.set_major_locator(mticker.MaxNLocator(5, prune='both')) - #ax3.yaxis.set_major_locator(mticker.MaxNLocator(5, prune='both')) - - ax2.yaxis.set_major_locator(MyLocator(5, prune='both')) - ax3.yaxis.set_major_locator(MyLocator(5, prune='both')) - - plt.show() - - - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/pylab_examples/findobj_demo.txt b/dev/_sources/examples/pylab_examples/findobj_demo.txt deleted file mode 100644 index 664741330a9..00000000000 --- a/dev/_sources/examples/pylab_examples/findobj_demo.txt +++ /dev/null @@ -1,51 +0,0 @@ -.. _pylab_examples-findobj_demo: - -pylab_examples example code: findobj_demo.py -============================================ - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/pylab_examples/findobj_demo.py - -:: - - """ - Recursively find all objects that match some criteria - """ - import numpy as np - import matplotlib.pyplot as plt - import matplotlib.text as text - - a = np.arange(0,3,.02) - b = np.arange(0,3,.02) - c = np.exp(a) - d = c[::-1] - - fig = plt.figure() - ax = fig.add_subplot(111) - plt.plot(a,c,'k--',a,d,'k:',a,c+d,'k') - plt.legend(('Model length', 'Data length', 'Total message length'), - 'upper center', shadow=True) - plt.ylim([-1,20]) - plt.grid(False) - plt.xlabel('Model complexity --->') - plt.ylabel('Message length --->') - plt.title('Minimum Message Length') - - # match on arbitrary function - def myfunc(x): - return hasattr(x, 'set_color') and not hasattr(x, 'set_facecolor') - - for o in fig.findobj(myfunc): - o.set_color('blue') - - # match on class instances - for o in fig.findobj(text.Text): - o.set_fontstyle('italic') - - - - plt.show() - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/pylab_examples/font_table_ttf.txt b/dev/_sources/examples/pylab_examples/font_table_ttf.txt deleted file mode 100644 index 1822792f306..00000000000 --- a/dev/_sources/examples/pylab_examples/font_table_ttf.txt +++ /dev/null @@ -1,82 +0,0 @@ -.. _pylab_examples-font_table_ttf: - -pylab_examples example code: font_table_ttf.py -============================================== - -[`source code `_] - -:: - - #!/usr/bin/env python - # -*- noplot -*- - """ - matplotlib has support for freetype fonts. Here's a little example - using the 'table' command to build a font table that shows the glyphs - by character code. - - Usage python font_table_ttf.py somefile.ttf - """ - - import sys - import os - - import matplotlib - from matplotlib.ft2font import FT2Font - from matplotlib.font_manager import FontProperties - from pylab import figure, table, show, axis, title - - try: - unichr - except NameError: - # Python 3 - unichr = chr - - # the font table grid - - labelc = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', - 'A', 'B', 'C', 'D', 'E', 'F'] - labelr = ['00', '10', '20', '30', '40', '50', '60', '70', '80', '90', - 'A0', 'B0', 'C0', 'D0', 'E0', 'F0'] - - if len(sys.argv) > 1: - fontname = sys.argv[1] - else: - fontname = os.path.join(matplotlib.get_data_path(), - 'fonts', 'ttf', 'Vera.ttf') - - font = FT2Font(fontname) - codes = list(font.get_charmap().items()) - codes.sort() - - # a 16,16 array of character strings - chars = [['' for c in range(16)] for r in range(16)] - colors = [[(0.95, 0.95, 0.95) for c in range(16)] for r in range(16)] - - figure(figsize=(8, 4), dpi=120) - for ccode, glyphind in codes: - if ccode >= 256: - continue - r, c = divmod(ccode, 16) - s = unichr(ccode) - chars[r][c] = s - - lightgrn = (0.5, 0.8, 0.5) - title(fontname) - tab = table(cellText=chars, - rowLabels=labelr, - colLabels=labelc, - rowColours=[lightgrn]*16, - colColours=[lightgrn]*16, - cellColours=colors, - cellLoc='center', - loc='upper left') - - for key, cell in tab.get_celld().items(): - row, col = key - if row > 0 and col > 0: - cell.set_text_props(fontproperties=FontProperties(fname=fontname)) - axis('off') - show() - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/pylab_examples/fonts_demo.txt b/dev/_sources/examples/pylab_examples/fonts_demo.txt deleted file mode 100644 index 8de26ffd878..00000000000 --- a/dev/_sources/examples/pylab_examples/fonts_demo.txt +++ /dev/null @@ -1,129 +0,0 @@ -.. _pylab_examples-fonts_demo: - -pylab_examples example code: fonts_demo.py -========================================== - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/pylab_examples/fonts_demo.py - -:: - - #!/usr/bin/env python - """ - Show how to set custom font properties. - - For interactive users, you can also use kwargs to the text command, - which requires less typing. See examples/fonts_demo_kw.py - """ - from matplotlib.font_manager import FontProperties - from pylab import * - - subplot(111, axisbg='w') - - font0 = FontProperties() - alignment = {'horizontalalignment':'center', 'verticalalignment':'baseline'} - ### Show family options - - family = ['serif', 'sans-serif', 'cursive', 'fantasy', 'monospace'] - - font1 = font0.copy() - font1.set_size('large') - - t = text(-0.8, 0.9, 'family', fontproperties=font1, - **alignment) - - yp = [0.7, 0.5, 0.3, 0.1, -0.1, -0.3, -0.5] - - for k in range(5): - font = font0.copy() - font.set_family(family[k]) - if k == 2: - font.set_name('Script MT') - t = text(-0.8, yp[k], family[k], fontproperties=font, - **alignment) - - ### Show style options - - style = ['normal', 'italic', 'oblique'] - - t = text(-0.4, 0.9, 'style', fontproperties=font1, - **alignment) - - for k in range(3): - font = font0.copy() - font.set_family('sans-serif') - font.set_style(style[k]) - t = text(-0.4, yp[k], style[k], fontproperties=font, - **alignment) - - ### Show variant options - - variant= ['normal', 'small-caps'] - - t = text(0.0, 0.9, 'variant', fontproperties=font1, - **alignment) - - for k in range(2): - font = font0.copy() - font.set_family('serif') - font.set_variant(variant[k]) - t = text( 0.0, yp[k], variant[k], fontproperties=font, - **alignment) - - ### Show weight options - - weight = ['light', 'normal', 'medium', 'semibold', 'bold', 'heavy', 'black'] - - t = text( 0.4, 0.9, 'weight', fontproperties=font1, - **alignment) - - for k in range(7): - font = font0.copy() - font.set_weight(weight[k]) - t = text( 0.4, yp[k], weight[k], fontproperties=font, - **alignment) - - ### Show size options - - size = ['xx-small', 'x-small', 'small', 'medium', 'large', - 'x-large', 'xx-large'] - - t = text( 0.8, 0.9, 'size', fontproperties=font1, - **alignment) - - for k in range(7): - font = font0.copy() - font.set_size(size[k]) - t = text( 0.8, yp[k], size[k], fontproperties=font, - **alignment) - - ### Show bold italic - - font = font0.copy() - font.set_style('italic') - font.set_weight('bold') - font.set_size('x-small') - t = text(0, 0.1, 'bold italic', fontproperties=font, - **alignment) - - font = font0.copy() - font.set_style('italic') - font.set_weight('bold') - font.set_size('medium') - t = text(0, 0.2, 'bold italic', fontproperties=font, - **alignment) - - font = font0.copy() - font.set_style('italic') - font.set_weight('bold') - font.set_size('x-large') - t = text(0, 0.3, 'bold italic', fontproperties=font, - **alignment) - - axis([-1,1,0,1]) - - show() - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/pylab_examples/fonts_demo_kw.txt b/dev/_sources/examples/pylab_examples/fonts_demo_kw.txt deleted file mode 100644 index a39f4be976b..00000000000 --- a/dev/_sources/examples/pylab_examples/fonts_demo_kw.txt +++ /dev/null @@ -1,98 +0,0 @@ -.. _pylab_examples-fonts_demo_kw: - -pylab_examples example code: fonts_demo_kw.py -============================================= - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/pylab_examples/fonts_demo_kw.py - -:: - - #!/usr/bin/env python - """ - Same as fonts_demo using kwargs. If you prefer a more pythonic, OO - style of coding, see examples/fonts_demo.py. - - """ - from matplotlib.font_manager import FontProperties - from pylab import * - - subplot(111, axisbg='w') - alignment = {'horizontalalignment':'center', 'verticalalignment':'baseline'} - ### Show family options - - family = ['serif', 'sans-serif', 'cursive', 'fantasy', 'monospace'] - - t = text(-0.8, 0.9, 'family', size='large', **alignment) - - yp = [0.7, 0.5, 0.3, 0.1, -0.1, -0.3, -0.5] - - for k in range(5): - if k == 2: - t = text(-0.8, yp[k], family[k], family=family[k], - name='Script MT', **alignment) - else: - t = text(-0.8, yp[k], family[k], family=family[k], **alignment) - - ### Show style options - - style = ['normal', 'italic', 'oblique'] - - t = text(-0.4, 0.9, 'style', **alignment) - - for k in range(3): - t = text(-0.4, yp[k], style[k], family='sans-serif', style=style[k], - **alignment) - - ### Show variant options - - variant= ['normal', 'small-caps'] - - t = text(0.0, 0.9, 'variant', **alignment) - - for k in range(2): - t = text( 0.0, yp[k], variant[k], family='serif', variant=variant[k], - **alignment) - - ### Show weight options - - weight = ['light', 'normal', 'medium', 'semibold', 'bold', 'heavy', 'black'] - - t = text( 0.4, 0.9, 'weight', **alignment) - - for k in range(7): - t = text( 0.4, yp[k], weight[k], weight=weight[k], - **alignment) - - ### Show size options - - size = ['xx-small', 'x-small', 'small', 'medium', 'large', - 'x-large', 'xx-large'] - - t = text( 0.8, 0.9, 'size', **alignment) - - for k in range(7): - t = text( 0.8, yp[k], size[k], size=size[k], - **alignment) - - x = 0 - ### Show bold italic - t = text(x, 0.1, 'bold italic', style='italic', - weight='bold', size='x-small', - **alignment) - - t = text(x, 0.2, 'bold italic', - style = 'italic', weight='bold', size='medium', - **alignment) - - t = text(x, 0.3, 'bold italic', - style='italic', weight='bold', size='x-large', - **alignment) - - axis([-1, 1, 0, 1]) - - show() - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/pylab_examples/ganged_plots.txt b/dev/_sources/examples/pylab_examples/ganged_plots.txt deleted file mode 100644 index 6778702ef2a..00000000000 --- a/dev/_sources/examples/pylab_examples/ganged_plots.txt +++ /dev/null @@ -1,59 +0,0 @@ -.. _pylab_examples-ganged_plots: - -pylab_examples example code: ganged_plots.py -============================================ - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/pylab_examples/ganged_plots.py - -:: - - #!/usr/bin/env python - """ - To create plots that share a common axes (visually) you can set the - hspace between the subplots close to zero (do not use zero itself). - Normally you'll want to turn off the tick labels on all but one of the - axes. - - In this example the plots share a common xaxis but you can follow the - same logic to supply a common y axis. - """ - from pylab import * - - t = arange(0.0, 2.0, 0.01) - - s1 = sin(2*pi*t) - s2 = exp(-t) - s3 = s1*s2 - - # axes rect in relative 0,1 coords left, bottom, width, height. Turn - # off xtick labels on all but the lower plot - - - f = figure() - subplots_adjust(hspace=0.001) - - - ax1 = subplot(311) - ax1.plot(t,s1) - yticks(arange(-0.9, 1.0, 0.4)) - ylim(-1,1) - - ax2 = subplot(312, sharex=ax1) - ax2.plot(t,s2) - yticks(arange(0.1, 1.0, 0.2)) - ylim(0,1) - - ax3 = subplot(313, sharex=ax1) - ax3.plot(t,s3) - yticks(arange(-0.9, 1.0, 0.4)) - ylim(-1,1) - - xticklabels = ax1.get_xticklabels()+ax2.get_xticklabels() - setp(xticklabels, visible=False) - - show() - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/pylab_examples/geo_demo.txt b/dev/_sources/examples/pylab_examples/geo_demo.txt deleted file mode 100644 index c6815562f7c..00000000000 --- a/dev/_sources/examples/pylab_examples/geo_demo.txt +++ /dev/null @@ -1,36 +0,0 @@ -.. _pylab_examples-geo_demo: - -pylab_examples example code: geo_demo.py -======================================== - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/pylab_examples/geo_demo.py - -:: - - import numpy as np - #np.seterr("raise") - - from pylab import * - - subplot(221, projection="aitoff") - title("Aitoff") - grid(True) - - subplot(222, projection="hammer") - title("Hammer") - grid(True) - - subplot(223, projection="lambert") - title("Lambert") - grid(True) - - subplot(224, projection="mollweide") - title("Mollweide") - grid(True) - - show() - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/pylab_examples/ginput_demo.txt b/dev/_sources/examples/pylab_examples/ginput_demo.txt deleted file mode 100644 index 860adb81ced..00000000000 --- a/dev/_sources/examples/pylab_examples/ginput_demo.txt +++ /dev/null @@ -1,23 +0,0 @@ -.. _pylab_examples-ginput_demo: - -pylab_examples example code: ginput_demo.py -=========================================== - -[`source code `_] - -:: - - # -*- noplot -*- - - from __future__ import print_function - - from pylab import arange, plot, sin, ginput, show - t = arange(10) - plot(t, sin(t)) - print("Please click") - x = ginput(3) - print("clicked",x) - show() - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/pylab_examples/ginput_manual_clabel.txt b/dev/_sources/examples/pylab_examples/ginput_manual_clabel.txt deleted file mode 100644 index f002daa67e6..00000000000 --- a/dev/_sources/examples/pylab_examples/ginput_manual_clabel.txt +++ /dev/null @@ -1,108 +0,0 @@ -.. _pylab_examples-ginput_manual_clabel: - -pylab_examples example code: ginput_manual_clabel.py -==================================================== - -[`source code `_] - -:: - - #!/usr/bin/env python - # -*- noplot -*- - - from __future__ import print_function - """ - This provides examples of uses of interactive functions, such as ginput, - waitforbuttonpress and manual clabel placement. - - This script must be run interactively using a backend that has a - graphical user interface (for example, using GTKAgg backend, but not - PS backend). - - See also ginput_demo.py - """ - import time - import matplotlib - import numpy as np - import matplotlib.cm as cm - import matplotlib.mlab as mlab - import matplotlib.pyplot as plt - - def tellme(s): - print(s) - plt.title(s,fontsize=16) - plt.draw() - - ################################################## - # Define a triangle by clicking three points - ################################################## - plt.clf() - plt.axis([-1.,1.,-1.,1.]) - plt.setp(plt.gca(),autoscale_on=False) - - tellme('You will define a triangle, click to begin') - - plt.waitforbuttonpress() - - happy = False - while not happy: - pts = [] - while len(pts) < 3: - tellme('Select 3 corners with mouse') - pts = np.asarray( plt.ginput(3,timeout=-1) ) - if len(pts) < 3: - tellme('Too few points, starting over') - time.sleep(1) # Wait a second - - ph = plt.fill( pts[:,0], pts[:,1], 'r', lw=2 ) - - tellme('Happy? Key click for yes, mouse click for no') - - happy = plt.waitforbuttonpress() - - # Get rid of fill - if not happy: - for p in ph: p.remove() - - ################################################## - # Now contour according to distance from triangle - # corners - just an example - ################################################## - - # Define a nice function of distance from individual pts - def f(x,y,pts): - z = np.zeros_like(x) - for p in pts: - z = z + 1/(np.sqrt((x-p[0])**2+(y-p[1])**2)) - return 1/z - - X,Y = np.meshgrid( np.linspace(-1,1,51), np.linspace(-1,1,51) ) - Z = f(X,Y,pts) - - CS = plt.contour( X, Y, Z, 20 ) - - tellme( 'Use mouse to select contour label locations, middle button to finish' ) - CL = plt.clabel( CS, manual=True ) - - ################################################## - # Now do a zoom - ################################################## - tellme( 'Now do a nested zoom, click to begin' ) - plt.waitforbuttonpress() - - happy = False - while not happy: - tellme( 'Select two corners of zoom, middle mouse button to finish' ) - pts = np.asarray( plt.ginput(2,timeout=-1) ) - - happy = len(pts) < 2 - if happy: break - - pts = np.sort(pts,axis=0) - plt.axis( pts.T.ravel() ) - - tellme('All Done!') - plt.show() - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/pylab_examples/gradient_bar.txt b/dev/_sources/examples/pylab_examples/gradient_bar.txt deleted file mode 100644 index 681d7fc905d..00000000000 --- a/dev/_sources/examples/pylab_examples/gradient_bar.txt +++ /dev/null @@ -1,42 +0,0 @@ -.. _pylab_examples-gradient_bar: - -pylab_examples example code: gradient_bar.py -============================================ - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/pylab_examples/gradient_bar.py - -:: - - from matplotlib.pyplot import figure, show, cm - from numpy import arange - from numpy.random import rand - - def gbar(ax, x, y, width=0.5, bottom=0): - X = [[.6, .6],[.7,.7]] - for left,top in zip(x, y): - right = left+width - ax.imshow(X, interpolation='bicubic', cmap=cm.Blues, - extent=(left, right, bottom, top), alpha=1) - - fig = figure() - - xmin, xmax = xlim = 0,10 - ymin, ymax = ylim = 0,1 - ax = fig.add_subplot(111, xlim=xlim, ylim=ylim, - autoscale_on=False) - X = [[.6, .6],[.7,.7]] - - ax.imshow(X, interpolation='bicubic', cmap=cm.copper, - extent=(xmin, xmax, ymin, ymax), alpha=1) - - N = 10 - x = arange(N)+0.25 - y = rand(N) - gbar(ax, x, y, width=0.7) - ax.set_aspect('auto') - show() - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/pylab_examples/griddata_demo.txt b/dev/_sources/examples/pylab_examples/griddata_demo.txt deleted file mode 100644 index 90ac50042ba..00000000000 --- a/dev/_sources/examples/pylab_examples/griddata_demo.txt +++ /dev/null @@ -1,55 +0,0 @@ -.. _pylab_examples-griddata_demo: - -pylab_examples example code: griddata_demo.py -============================================= - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/pylab_examples/griddata_demo.py - -:: - - from numpy.random import uniform, seed - from matplotlib.mlab import griddata - import matplotlib.pyplot as plt - import numpy as np - # make up data. - #npts = int(raw_input('enter # of random points to plot:')) - seed(0) - npts = 200 - x = uniform(-2,2,npts) - y = uniform(-2,2,npts) - z = x*np.exp(-x**2-y**2) - # define grid. - xi = np.linspace(-2.1,2.1,100) - yi = np.linspace(-2.1,2.1,200) - # grid the data. - zi = griddata(x,y,z,xi,yi,interp='linear') - # contour the gridded data, plotting dots at the nonuniform data points. - CS = plt.contour(xi,yi,zi,15,linewidths=0.5,colors='k') - CS = plt.contourf(xi,yi,zi,15,cmap=plt.cm.rainbow, - vmax=abs(zi).max(), vmin=-abs(zi).max()) - plt.colorbar() # draw colorbar - # plot data points. - plt.scatter(x,y,marker='o',c='b',s=5,zorder=10) - plt.xlim(-2,2) - plt.ylim(-2,2) - plt.title('griddata test (%d points)' % npts) - plt.show() - - # test case that scikits.delaunay fails on, but natgrid passes.. - #data = np.array([[-1, -1], [-1, 0], [-1, 1], - # [ 0, -1], [ 0, 0], [ 0, 1], - # [ 1, -1 - np.finfo(np.float_).eps], [ 1, 0], [ 1, 1], - # ]) - #x = data[:,0] - #y = data[:,1] - #z = x*np.exp(-x**2-y**2) - ## define grid. - #xi = np.linspace(-1.1,1.1,100) - #yi = np.linspace(-1.1,1.1,100) - ## grid the data. - #zi = griddata(x,y,z,xi,yi) - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/pylab_examples/hatch_demo.txt b/dev/_sources/examples/pylab_examples/hatch_demo.txt deleted file mode 100644 index 9fdba2ea750..00000000000 --- a/dev/_sources/examples/pylab_examples/hatch_demo.txt +++ /dev/null @@ -1,45 +0,0 @@ -.. _pylab_examples-hatch_demo: - -pylab_examples example code: hatch_demo.py -========================================== - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/pylab_examples/hatch_demo.py - -:: - - """ - Hatching (pattern filled polygons) is supported currently in the PS, - PDF, SVG and Agg backends only. - """ - import matplotlib.pyplot as plt - from matplotlib.patches import Ellipse, Polygon - - fig = plt.figure() - ax1 = fig.add_subplot(131) - ax1.bar(range(1,5), range(1,5), color='red', edgecolor='black', hatch="/") - ax1.bar(range(1,5), [6] * 4, bottom=range(1,5), color='blue', edgecolor='black', hatch='//') - ax1.set_xticks([1.5,2.5,3.5,4.5]) - - ax2 = fig.add_subplot(132) - bars = ax2.bar(range(1,5), range(1,5), color='yellow', ecolor='black') + \ - ax2.bar(range(1, 5), [6] * 4, bottom=range(1,5), color='green', ecolor='black') - ax2.set_xticks([1.5,2.5,3.5,4.5]) - - patterns = ('-', '+', 'x', '\\', '*', 'o', 'O', '.') - for bar, pattern in zip(bars, patterns): - bar.set_hatch(pattern) - - ax3 = fig.add_subplot(133) - ax3.fill([1,3,3,1],[1,1,2,2], fill=False, hatch='\\') - ax3.add_patch(Ellipse((4,1.5), 4, 0.5, fill=False, hatch='*')) - ax3.add_patch(Polygon([[0,0],[4,1.1],[6,2.5],[2,1.4]], closed=True, - fill=False, hatch='/')) - ax3.set_xlim((0,6)) - ax3.set_ylim((0,2.5)) - - plt.show() - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/pylab_examples/hexbin_demo.txt b/dev/_sources/examples/pylab_examples/hexbin_demo.txt deleted file mode 100644 index b6b201249fe..00000000000 --- a/dev/_sources/examples/pylab_examples/hexbin_demo.txt +++ /dev/null @@ -1,49 +0,0 @@ -.. _pylab_examples-hexbin_demo: - -pylab_examples example code: hexbin_demo.py -=========================================== - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/pylab_examples/hexbin_demo.py - -:: - - """ - hexbin is an axes method or pyplot function that is essentially - a pcolor of a 2-D histogram with hexagonal cells. It can be - much more informative than a scatter plot; in the first subplot - below, try substituting 'scatter' for 'hexbin'. - """ - - import numpy as np - import matplotlib.pyplot as plt - - np.random.seed(0) - n = 100000 - x = np.random.standard_normal(n) - y = 2.0 + 3.0 * x + 4.0 * np.random.standard_normal(n) - xmin = x.min() - xmax = x.max() - ymin = y.min() - ymax = y.max() - - plt.subplots_adjust(hspace=0.5) - plt.subplot(121) - plt.hexbin(x,y, cmap=plt.cm.YlOrRd_r) - plt.axis([xmin, xmax, ymin, ymax]) - plt.title("Hexagon binning") - cb = plt.colorbar() - cb.set_label('counts') - - plt.subplot(122) - plt.hexbin(x,y,bins='log', cmap=plt.cm.YlOrRd_r) - plt.axis([xmin, xmax, ymin, ymax]) - plt.title("With a log color scale") - cb = plt.colorbar() - cb.set_label('log10(N)') - - plt.show() - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/pylab_examples/hexbin_demo2.txt b/dev/_sources/examples/pylab_examples/hexbin_demo2.txt deleted file mode 100644 index af414c10c4c..00000000000 --- a/dev/_sources/examples/pylab_examples/hexbin_demo2.txt +++ /dev/null @@ -1,70 +0,0 @@ -.. _pylab_examples-hexbin_demo2: - -pylab_examples example code: hexbin_demo2.py -============================================ - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/pylab_examples/hexbin_demo2.py - -:: - - """ - hexbin is an axes method or pyplot function that is essentially a - pcolor of a 2-D histogram with hexagonal cells. - """ - - import numpy as np - import matplotlib.pyplot as plt - import matplotlib.mlab as mlab - - delta = 0.025 - 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 - - x = X.ravel() - y = Y.ravel() - z = Z.ravel() - - if 1: - # make some points 20 times more common than others, but same mean - xcond = (-1 < x) & (x < 1) - ycond = (-2 < y) & (y < 0) - cond = xcond & ycond - xnew = x[cond] - ynew = y[cond] - znew = z[cond] - for i in range(20): - x = np.hstack((x,xnew)) - y = np.hstack((y,ynew)) - z = np.hstack((z,znew)) - - xmin = x.min() - xmax = x.max() - ymin = y.min() - ymax = y.max() - - gridsize=30 - - plt.subplot(211) - plt.hexbin(x,y, C=z, gridsize=gridsize, marginals=True, cmap=plt.cm.RdBu, - vmax=abs(z).max(), vmin=-abs(z).max()) - plt.axis([xmin, xmax, ymin, ymax]) - cb = plt.colorbar() - cb.set_label('mean value') - - - plt.subplot(212) - plt.hexbin(x,y, gridsize=gridsize, cmap=plt.cm.Blues_r) - plt.axis([xmin, xmax, ymin, ymax]) - cb = plt.colorbar() - cb.set_label('N observations') - - plt.show() - - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/pylab_examples/hist2d_demo.txt b/dev/_sources/examples/pylab_examples/hist2d_demo.txt deleted file mode 100644 index 29243f69f27..00000000000 --- a/dev/_sources/examples/pylab_examples/hist2d_demo.txt +++ /dev/null @@ -1,21 +0,0 @@ -.. _pylab_examples-hist2d_demo: - -pylab_examples example code: hist2d_demo.py -=========================================== - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/pylab_examples/hist2d_demo.py - -:: - - from pylab import * - x = randn(1000) - y = randn(1000)+5 - - #normal distribution center at x=0 and y=5 - hist2d(x,y,bins=40) - show() - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/pylab_examples/hist2d_log_demo.txt b/dev/_sources/examples/pylab_examples/hist2d_log_demo.txt deleted file mode 100644 index 504885988dc..00000000000 --- a/dev/_sources/examples/pylab_examples/hist2d_log_demo.txt +++ /dev/null @@ -1,24 +0,0 @@ -.. _pylab_examples-hist2d_log_demo: - -pylab_examples example code: hist2d_log_demo.py -=============================================== - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/pylab_examples/hist2d_log_demo.py - -:: - - from matplotlib.colors import LogNorm - from pylab import * - - #normal distribution center at x=0 and y=5 - x = randn(100000) - y = randn(100000)+5 - - hist2d(x, y, bins=40, norm=LogNorm()) - colorbar() - show() - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/pylab_examples/hist_colormapped.txt b/dev/_sources/examples/pylab_examples/hist_colormapped.txt deleted file mode 100644 index 3fc49c60201..00000000000 --- a/dev/_sources/examples/pylab_examples/hist_colormapped.txt +++ /dev/null @@ -1,38 +0,0 @@ -.. _pylab_examples-hist_colormapped: - -pylab_examples example code: hist_colormapped.py -================================================ - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/pylab_examples/hist_colormapped.py - -:: - - import numpy as n - from pylab import figure, show - import matplotlib.cm as cm - import matplotlib.colors as colors - - fig = figure() - ax = fig.add_subplot(111) - Ntotal = 1000 - N, bins, patches = ax.hist(n.random.rand(Ntotal), 20) - - #I'll color code by height, but you could use any scalar - - - # we need to normalize the data to 0..1 for the full - # range of the colormap - fracs = N.astype(float)/N.max() - norm = colors.normalize(fracs.min(), fracs.max()) - - for thisfrac, thispatch in zip(fracs, patches): - color = cm.jet(norm(thisfrac)) - thispatch.set_facecolor(color) - - - show() - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/pylab_examples/histogram_demo.txt b/dev/_sources/examples/pylab_examples/histogram_demo.txt deleted file mode 100644 index 6d5948ed8a0..00000000000 --- a/dev/_sources/examples/pylab_examples/histogram_demo.txt +++ /dev/null @@ -1,36 +0,0 @@ -.. _pylab_examples-histogram_demo: - -pylab_examples example code: histogram_demo.py -============================================== - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/pylab_examples/histogram_demo.py - -:: - - #!/usr/bin/env python - import numpy as np - import matplotlib.mlab as mlab - import matplotlib.pyplot as plt - - mu, sigma = 100, 15 - x = mu + sigma*np.random.randn(10000) - - # the histogram of the data - n, bins, patches = plt.hist(x, 50, normed=1, facecolor='green', alpha=0.75) - - # add a 'best fit' line - y = mlab.normpdf( bins, mu, sigma) - l = plt.plot(bins, y, 'r--', linewidth=1) - - plt.xlabel('Smarts') - plt.ylabel('Probability') - plt.title(r'$\mathrm{Histogram\ of\ IQ:}\ \mu=100,\ \sigma=15$') - plt.axis([40, 160, 0, 0.03]) - 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/dev/_sources/examples/pylab_examples/histogram_demo_extended.txt b/dev/_sources/examples/pylab_examples/histogram_demo_extended.txt deleted file mode 100644 index f1fb7587554..00000000000 --- a/dev/_sources/examples/pylab_examples/histogram_demo_extended.txt +++ /dev/null @@ -1,136 +0,0 @@ -.. _pylab_examples-histogram_demo_extended: - -pylab_examples example code: histogram_demo_extended.py -======================================================= - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/pylab_examples/histogram_demo_extended.py - -:: - - #!/usr/bin/env python - import numpy as np - import pylab as P - - # - # The hist() function now has a lot more options - # - - # - # first create a single histogram - # - mu, sigma = 200, 25 - x = mu + sigma*P.randn(10000) - - # the histogram of the data with histtype='step' - n, bins, patches = P.hist(x, 50, normed=1, histtype='stepfilled') - P.setp(patches, 'facecolor', 'g', 'alpha', 0.75) - - # add a line showing the expected distribution - y = P.normpdf( bins, mu, sigma) - l = P.plot(bins, y, 'k--', linewidth=1.5) - - - # - # create a histogram by providing the bin edges (unequally spaced) - # - P.figure() - - bins = [100,125,150,160,170,180,190,200,210,220,230,240,250,275,300] - # the histogram of the data with histtype='step' - n, bins, patches = P.hist(x, bins, normed=1, histtype='bar', rwidth=0.8) - - # - # now we create a cumulative histogram of the data - # - P.figure() - - n, bins, patches = P.hist(x, 50, normed=1, histtype='step', cumulative=True) - - # add a line showing the expected distribution - y = P.normpdf( bins, mu, sigma).cumsum() - y /= y[-1] - l = P.plot(bins, y, 'k--', linewidth=1.5) - - # create a second data-set with a smaller standard deviation - sigma2 = 15. - x = mu + sigma2*P.randn(10000) - - n, bins, patches = P.hist(x, bins=bins, normed=1, histtype='step', cumulative=True) - - # add a line showing the expected distribution - y = P.normpdf( bins, mu, sigma2).cumsum() - y /= y[-1] - l = P.plot(bins, y, 'r--', linewidth=1.5) - - # finally overplot a reverted cumulative histogram - n, bins, patches = P.hist(x, bins=bins, normed=1, - histtype='step', cumulative=-1) - - - P.grid(True) - P.ylim(0, 1.05) - - - # - # histogram has the ability to plot multiple data in parallel ... - # Note the new color kwarg, used to override the default, which - # uses the line color cycle. - # - P.figure() - - # create a new data-set - x = mu + sigma*P.randn(1000,3) - - n, bins, patches = P.hist(x, 10, normed=1, histtype='bar', - color=['crimson', 'burlywood', 'chartreuse'], - label=['Crimson', 'Burlywood', 'Chartreuse']) - P.legend() - - # - # ... or we can stack the data - # - P.figure() - - n, bins, patches = P.hist(x, 10, normed=1, histtype='bar', stacked=True) - - P.show() - - # - # we can also stack using the step histtype - # - - P.figure() - - n, bins, patches = P.hist(x, 10, histtype='step', stacked=True, fill=True) - - P.show() - - # - # finally: make a multiple-histogram of data-sets with different length - # - x0 = mu + sigma*P.randn(10000) - x1 = mu + sigma*P.randn(7000) - x2 = mu + sigma*P.randn(3000) - - # and exercise the weights option by arbitrarily giving the first half - # of each series only half the weight of the others: - - w0 = np.ones_like(x0) - w0[:len(x0)/2] = 0.5 - w1 = np.ones_like(x1) - w1[:len(x1)/2] = 0.5 - w2 = np.ones_like(x2) - w2[:len(x2)/2] = 0.5 - - - - P.figure() - - n, bins, patches = P.hist( [x0,x1,x2], 10, weights=[w0, w1, w2], histtype='bar') - - P.show() - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/pylab_examples/histogram_percent_demo.txt b/dev/_sources/examples/pylab_examples/histogram_percent_demo.txt deleted file mode 100644 index 0af87b49e72..00000000000 --- a/dev/_sources/examples/pylab_examples/histogram_percent_demo.txt +++ /dev/null @@ -1,43 +0,0 @@ -.. _pylab_examples-histogram_percent_demo: - -pylab_examples example code: histogram_percent_demo.py -====================================================== - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/pylab_examples/histogram_percent_demo.py - -:: - - import matplotlib - from numpy.random import randn - import matplotlib.pyplot as plt - from matplotlib.ticker import FuncFormatter - - def to_percent(y, position): - # Ignore the passed in position. This has the effect of scaling the default - # tick locations. - s = str(100 * y) - - # The percent symbol needs escaping in latex - if matplotlib.rcParams['text.usetex'] == True: - return s + r'$\%$' - else: - return s + '%' - - x = randn(5000) - - # Make a normed histogram. It'll be multiplied by 100 later. - plt.hist(x, bins=50, normed=True) - - # Create the formatter using the function to_percent. This multiplies all the - # default labels by 100, making them all percentages - formatter = FuncFormatter(to_percent) - - # Set the formatter - plt.gca().yaxis.set_major_formatter(formatter) - - plt.show() - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/pylab_examples/hline_demo.txt b/dev/_sources/examples/pylab_examples/hline_demo.txt deleted file mode 100644 index b05bb4667e9..00000000000 --- a/dev/_sources/examples/pylab_examples/hline_demo.txt +++ /dev/null @@ -1,37 +0,0 @@ -.. _pylab_examples-hline_demo: - -pylab_examples example code: hline_demo.py -========================================== - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/pylab_examples/hline_demo.py - -:: - - #!/usr/bin/env python - import numpy as np - import matplotlib.pyplot as plt - - def f(t): - s1 = np.sin(2*np.pi*t) - e1 = np.exp(-t) - return np.absolute((s1*e1))+.05 - - - t = np.arange(0.0, 5.0, 0.1) - s = f(t) - nse = np.random.normal(0.0, 0.3, t.shape) * s - - - plt.plot(s+nse, t, 'b^') - plt.hlines(t, [0], s, lw=2) - plt.xlabel('time (s)') - plt.title('Comparison of model with data') - - plt.xlim(xmin=0) - plt.show() - - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/pylab_examples/hyperlinks.txt b/dev/_sources/examples/pylab_examples/hyperlinks.txt deleted file mode 100644 index cd0697dc368..00000000000 --- a/dev/_sources/examples/pylab_examples/hyperlinks.txt +++ /dev/null @@ -1,45 +0,0 @@ -.. _pylab_examples-hyperlinks: - -pylab_examples example code: hyperlinks.py -========================================== - -[`source code `_] - -:: - - #!/usr/bin/env python - # -*- noplot -*- - - """ - This example demonstrates how to set a hyperlinks on various kinds of elements. - - This currently only works with the SVG backend. - """ - - import numpy as np - import matplotlib.cm as cm - import matplotlib.mlab as mlab - import matplotlib.pyplot as plt - - f = plt.figure() - s = plt.scatter([1,2,3],[4,5,6]) - s.set_urls(['http://www.bbc.co.uk/news','http://www.google.com',None]) - f.canvas.print_figure('scatter.svg') - - f = plt.figure() - delta = 0.025 - 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 - - im = plt.imshow(Z, interpolation='bilinear', cmap=cm.gray, - origin='lower', extent=[-3,3,-3,3]) - - im.set_url('http://www.google.com') - f.canvas.print_figure('image.svg') - - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/pylab_examples/image_clip_path.txt b/dev/_sources/examples/pylab_examples/image_clip_path.txt deleted file mode 100644 index 371500b2981..00000000000 --- a/dev/_sources/examples/pylab_examples/image_clip_path.txt +++ /dev/null @@ -1,40 +0,0 @@ -.. _pylab_examples-image_clip_path: - -pylab_examples example code: image_clip_path.py -=============================================== - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/pylab_examples/image_clip_path.py - -:: - - #!/usr/bin/env python - import numpy as np - import matplotlib.cm as cm - import matplotlib.mlab as mlab - import matplotlib.pyplot as plt - from matplotlib.path import Path - from matplotlib.patches import PathPatch - - delta = 0.025 - 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 - - path = Path([[0, 1], [1, 0], [0, -1], [-1, 0], [0, 1]]) - patch = PathPatch(path, facecolor='none') - plt.gca().add_patch(patch) - - im = plt.imshow(Z, interpolation='bilinear', cmap=cm.gray, - origin='lower', extent=[-3,3,-3,3], - clip_path=patch, clip_on=True) - 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/dev/_sources/examples/pylab_examples/image_demo.txt b/dev/_sources/examples/pylab_examples/image_demo.txt deleted file mode 100644 index c7898d6c999..00000000000 --- a/dev/_sources/examples/pylab_examples/image_demo.txt +++ /dev/null @@ -1,33 +0,0 @@ -.. _pylab_examples-image_demo: - -pylab_examples example code: image_demo.py -========================================== - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/pylab_examples/image_demo.py - -:: - - #!/usr/bin/env python - import numpy as np - import matplotlib.cm as cm - import matplotlib.mlab as mlab - import matplotlib.pyplot as plt - - delta = 0.025 - 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 - - im = plt.imshow(Z, interpolation='bilinear', cmap=cm.RdYlGn, - origin='lower', extent=[-3,3,-3,3], - vmax=abs(Z).max(), vmin=-abs(Z).max()) - - plt.show() - - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/pylab_examples/image_demo2.txt b/dev/_sources/examples/pylab_examples/image_demo2.txt deleted file mode 100644 index e743306fc1c..00000000000 --- a/dev/_sources/examples/pylab_examples/image_demo2.txt +++ /dev/null @@ -1,50 +0,0 @@ -.. _pylab_examples-image_demo2: - -pylab_examples example code: image_demo2.py -=========================================== - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/pylab_examples/image_demo2.py - -:: - - #!/usr/bin/env python - - from __future__ import print_function - from pylab import * - import matplotlib.cbook as cbook - - w, h = 512, 512 - - datafile = cbook.get_sample_data('ct.raw.gz', asfileobj=True) - s = datafile.read() - A = fromstring(s, uint16).astype(float) - A *= 1.0/max(A) - A.shape = w, h - - extent = (0, 25, 0, 25) - im = imshow(A, cmap=cm.hot, origin='upper', extent=extent) - - markers = [(15.9, 14.5), (16.8, 15)] - x,y = zip(*markers) - plot(x, y, 'o') - #axis([0,25,0,25]) - - - - #axis('off') - title('CT density') - - if 0: - x = asum(A,0) - subplot(212) - bar(arange(w), x) - xlim(0,h-1) - ylabel('density') - setp(gca(), 'xticklabels', []) - - show() - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/pylab_examples/image_demo3.txt b/dev/_sources/examples/pylab_examples/image_demo3.txt deleted file mode 100644 index fc5b47cea02..00000000000 --- a/dev/_sources/examples/pylab_examples/image_demo3.txt +++ /dev/null @@ -1,35 +0,0 @@ -.. _pylab_examples-image_demo3: - -pylab_examples example code: image_demo3.py -=========================================== - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/pylab_examples/image_demo3.py - -:: - - #!/usr/bin/env python - from pylab import * - try: - from PIL import Image - except ImportError: - raise SystemExit("PIL must be installed to run this example") - - import matplotlib.cbook as cbook - - datafile = cbook.get_sample_data('lena.jpg') - lena = Image.open(datafile) - dpi = rcParams['figure.dpi'] - figsize = lena.size[0]/dpi, lena.size[1]/dpi - - figure(figsize=figsize) - ax = axes([0,0,1,1], frameon=False) - ax.set_axis_off() - im = imshow(lena) - - show() - - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/pylab_examples/image_interp.txt b/dev/_sources/examples/pylab_examples/image_interp.txt deleted file mode 100644 index 45d339294ad..00000000000 --- a/dev/_sources/examples/pylab_examples/image_interp.txt +++ /dev/null @@ -1,77 +0,0 @@ -.. _pylab_examples-image_interp: - -pylab_examples example code: image_interp.py -============================================ - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/pylab_examples/image_interp.py - -:: - - #!/usr/bin/env python - """ - The same (small) array, interpolated with three different - interpolation methods. - - The center of the pixel at A[i,j] is plotted at i+0.5, i+0.5. If you - are using interpolation='nearest', the region bounded by (i,j) and - (i+1,j+1) will have the same color. If you are using interpolation, - the pixel center will have the same color as it does with nearest, but - other pixels will be interpolated between the neighboring pixels. - - Earlier versions of matplotlib (<0.63) tried to hide the edge effects - from you by setting the view limits so that they would not be visible. - A recent bugfix in antigrain, and a new implementation in the - matplotlib._image module which takes advantage of this fix, no longer - makes this necessary. To prevent edge effects, when doing - interpolation, the matplotlib._image module now pads the input array - with identical pixels around the edge. e.g., if you have a 5x5 array - with colors a-y as below - - - a b c d e - f g h i j - k l m n o - p q r s t - u v w x y - - the _image module creates the padded array, - - a a b c d e e - a a b c d e e - f f g h i j j - k k l m n o o - p p q r s t t - o u v w x y y - o u v w x y y - - does the interpolation/resizing, and then extracts the central region. - This allows you to plot the full range of your array w/o edge effects, - and for example to layer multiple images of different sizes over one - another with different interpolation methods - see - examples/layer_images.py. It also implies a performance hit, as this - new temporary, padded array must be created. Sophisticated - interpolation also implies a performance hit, so if you need maximal - performance or have very large images, interpolation='nearest' is - suggested. - - """ - from pylab import * - A = rand(5,5) - figure(1) - imshow(A, interpolation='nearest') - grid(True) - - figure(2) - imshow(A, interpolation='bilinear') - grid(True) - - figure(3) - imshow(A, interpolation='bicubic') - grid(True) - - show() - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/pylab_examples/image_masked.txt b/dev/_sources/examples/pylab_examples/image_masked.txt deleted file mode 100644 index ccb1ed7060b..00000000000 --- a/dev/_sources/examples/pylab_examples/image_masked.txt +++ /dev/null @@ -1,69 +0,0 @@ -.. _pylab_examples-image_masked: - -pylab_examples example code: image_masked.py -============================================ - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/pylab_examples/image_masked.py - -:: - - #!/usr/bin/env python - '''imshow with masked array input and out-of-range colors. - - The second subplot illustrates the use of BoundaryNorm to - get a filled contour effect. - ''' - - from pylab import * - from numpy import ma - import matplotlib.colors as colors - - delta = 0.025 - x = y = arange(-3.0, 3.0, delta) - X, Y = meshgrid(x, y) - Z1 = bivariate_normal(X, Y, 1.0, 1.0, 0.0, 0.0) - Z2 = bivariate_normal(X, Y, 1.5, 0.5, 1, 1) - Z = 10 * (Z2-Z1) # difference of Gaussians - - # Set up a colormap: - palette = cm.gray - palette.set_over('r', 1.0) - palette.set_under('g', 1.0) - palette.set_bad('b', 1.0) - # Alternatively, we could use - # palette.set_bad(alpha = 0.0) - # to make the bad region transparent. This is the default. - # If you comment out all the palette.set* lines, you will see - # all the defaults; under and over will be colored with the - # first and last colors in the palette, respectively. - Zm = ma.masked_where(Z > 1.2, Z) - - # By setting vmin and vmax in the norm, we establish the - # range to which the regular palette color scale is applied. - # Anything above that range is colored based on palette.set_over, etc. - - subplot(1,2,1) - im = imshow(Zm, interpolation='bilinear', - cmap=palette, - norm = colors.Normalize(vmin = -1.0, vmax = 1.0, clip = False), - origin='lower', extent=[-3,3,-3,3]) - title('Green=low, Red=high, Blue=bad') - colorbar(im, extend='both', orientation='horizontal', shrink=0.8) - - subplot(1,2,2) - im = imshow(Zm, interpolation='nearest', - cmap=palette, - norm = colors.BoundaryNorm([-1, -0.5, -0.2, 0, 0.2, 0.5, 1], - ncolors=256, clip = False), - origin='lower', extent=[-3,3,-3,3]) - title('With BoundaryNorm') - colorbar(im, extend='both', spacing='proportional', - orientation='horizontal', shrink=0.8) - - show() - - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/pylab_examples/image_nonuniform.txt b/dev/_sources/examples/pylab_examples/image_nonuniform.txt deleted file mode 100644 index 83e7c47d4f4..00000000000 --- a/dev/_sources/examples/pylab_examples/image_nonuniform.txt +++ /dev/null @@ -1,74 +0,0 @@ -.. _pylab_examples-image_nonuniform: - -pylab_examples example code: image_nonuniform.py -================================================ - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/pylab_examples/image_nonuniform.py - -:: - - ''' - This illustrates the NonUniformImage class, which still needs - an axes method interface; either a separate interface, or a - generalization of imshow. - ''' - - from matplotlib.pyplot import figure, show - import numpy as np - from matplotlib.image import NonUniformImage - from matplotlib import cm - - interp='nearest' - - x = np.linspace(-4, 4, 9) - x2 = x**3 - y = np.linspace(-4, 4, 9) - #print 'Size %d points' % (len(x) * len(y)) - z = np.sqrt(x[np.newaxis,:]**2 + y[:,np.newaxis]**2) - - fig = figure() - fig.suptitle('NonUniformImage class') - ax = fig.add_subplot(221) - im = NonUniformImage(ax, interpolation=interp, extent=(-4,4,-4,4), - cmap=cm.Purples) - im.set_data(x, y, z) - ax.images.append(im) - ax.set_xlim(-4,4) - ax.set_ylim(-4,4) - ax.set_title(interp) - - ax = fig.add_subplot(222) - im = NonUniformImage(ax, interpolation=interp, extent=(-64,64,-4,4), - cmap=cm.Purples) - im.set_data(x2, y, z) - ax.images.append(im) - ax.set_xlim(-64,64) - ax.set_ylim(-4,4) - ax.set_title(interp) - - interp = 'bilinear' - - ax = fig.add_subplot(223) - im = NonUniformImage(ax, interpolation=interp, extent=(-4,4,-4,4), - cmap=cm.Purples) - im.set_data(x, y, z) - ax.images.append(im) - ax.set_xlim(-4,4) - ax.set_ylim(-4,4) - ax.set_title(interp) - - ax = fig.add_subplot(224) - im = NonUniformImage(ax, interpolation=interp, extent=(-64,64,-4,4), - cmap=cm.Purples) - im.set_data(x2, y, z) - ax.images.append(im) - ax.set_xlim(-64,64) - ax.set_ylim(-4,4) - ax.set_title(interp) - - show() - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/pylab_examples/image_origin.txt b/dev/_sources/examples/pylab_examples/image_origin.txt deleted file mode 100644 index 70e05b3a4eb..00000000000 --- a/dev/_sources/examples/pylab_examples/image_origin.txt +++ /dev/null @@ -1,38 +0,0 @@ -.. _pylab_examples-image_origin: - -pylab_examples example code: image_origin.py -============================================ - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/pylab_examples/image_origin.py - -:: - - #!/usr/bin/env python - """ - You can specify whether images should be plotted with the array origin - x[0,0] in the upper left or upper right by using the origin parameter. - You can also control the default be setting image.origin in your - matplotlibrc file; see http://matplotlib.org/matplotlibrc - """ - from pylab import * - - x = arange(100.0); x.shape = 10,10 - - interp = 'bilinear'; - #interp = 'nearest'; - lim = -2,11,-2,6 - subplot(211, axisbg='g') - title('blue should be up') - imshow(x, origin='upper', interpolation=interp) - #axis(lim) - - subplot(212, axisbg='y') - title('blue should be down') - imshow(x, origin='lower', interpolation=interp) - #axis(lim) - show() - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/pylab_examples/image_slices_viewer.txt b/dev/_sources/examples/pylab_examples/image_slices_viewer.txt deleted file mode 100644 index 873126b3c0e..00000000000 --- a/dev/_sources/examples/pylab_examples/image_slices_viewer.txt +++ /dev/null @@ -1,60 +0,0 @@ -.. _pylab_examples-image_slices_viewer: - -pylab_examples example code: image_slices_viewer.py -=================================================== - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/pylab_examples/image_slices_viewer.py - -:: - - from __future__ import print_function - import numpy - from matplotlib.pyplot import figure, show - - - - - class IndexTracker: - def __init__(self, ax, X): - self.ax = ax - ax.set_title('use scroll wheel to navigate images') - - self.X = X - rows,cols,self.slices = X.shape - self.ind = self.slices/2 - - self.im = ax.imshow(self.X[:,:,self.ind]) - self.update() - - def onscroll(self, event): - print ("%s %s" % (event.button, event.step)) - if event.button=='up': - self.ind = numpy.clip(self.ind+1, 0, self.slices-1) - else: - self.ind = numpy.clip(self.ind-1, 0, self.slices-1) - - - self.update() - - def update(self): - self.im.set_data(self.X[:,:,self.ind]) - ax.set_ylabel('slice %s'%self.ind) - self.im.axes.figure.canvas.draw() - - - fig = figure() - ax = fig.add_subplot(111) - - X = numpy.random.rand(20,20,40) - - tracker = IndexTracker(ax, X) - - - - fig.canvas.mpl_connect('scroll_event', tracker.onscroll) - show() - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/pylab_examples/index.txt b/dev/_sources/examples/pylab_examples/index.txt deleted file mode 100644 index b9f897162bc..00000000000 --- a/dev/_sources/examples/pylab_examples/index.txt +++ /dev/null @@ -1,238 +0,0 @@ -.. _pylab_examples-examples-index: - -############################################## -pylab_examples Examples -############################################## - -.. htmlonly:: - - :Release: |version| - :Date: |today| - -.. toctree:: - :maxdepth: 1 - - accented_text - agg_buffer_to_array - alignment_test - anchored_artists - animation_demo - annotation_demo - annotation_demo2 - annotation_demo3 - anscombe - arctest - arrow_demo - arrow_simple_demo - aspect_loglog - axes_demo - axes_props - axes_zoom_effect - axhspan_demo - axis_equal_demo - bar_stacked - barb_demo - barchart_demo - barchart_demo2 - barcode_demo - boxplot_demo - boxplot_demo2 - boxplot_demo3 - break - broken_axis - broken_barh - centered_ticklabels - clippedline - cohere_demo - color_by_yvalue - color_demo - colorbar_tick_labelling_demo - colours - contour_demo - contour_image - contour_label_demo - contourf_demo - contourf_hatching - contourf_log - coords_demo - coords_report - csd_demo - cursor_demo - custom_cmap - custom_figure_class - custom_ticker1 - customize_rc - dannys_example - dashpointlabel - data_helper - date_demo1 - date_demo2 - date_demo_convert - date_demo_rrule - date_index_formatter - demo_agg_filter - demo_annotation_box - demo_bboximage - demo_ribbon_box - demo_text_path - demo_text_rotation_mode - demo_tight_layout - dolphin - ellipse_collection - ellipse_demo - ellipse_rotated - equal_aspect_ratio - errorbar_limits - errorbar_subsample - eventcollection_demo - eventplot_demo - fancyarrow_demo - fancybox_demo - fancybox_demo2 - fancytextbox_demo - figimage_demo - figlegend_demo - figure_title - fill_between_demo - fill_betweenx_demo - fill_spiral - filledmarker_demo - finance_demo - finance_work2 - findobj_demo - font_table_ttf - fonts_demo - fonts_demo_kw - ganged_plots - geo_demo - ginput_demo - ginput_manual_clabel - gradient_bar - griddata_demo - hatch_demo - hexbin_demo - hexbin_demo2 - hist2d_demo - hist2d_log_demo - hist_colormapped - histogram_demo_extended - histogram_percent_demo - hyperlinks - image_clip_path - image_demo - image_demo2 - image_interp - image_masked - image_nonuniform - image_origin - image_slices_viewer - interp_demo - invert_axes - layer_images - legend_auto - legend_demo - legend_demo2 - legend_demo3 - legend_demo4 - legend_demo_custom_handler - legend_scatter - legend_translucent - line_collection - line_collection2 - line_styles - load_converter - loadrec - log_bar - log_demo - log_test - logo - major_minor_demo1 - major_minor_demo2 - manual_axis - marker_path - masked_demo - mathtext_demo - mathtext_examples - matplotlib_icon - matshow - movie_demo - mri_demo - mri_with_eeg - multi_image - multicolored_line - multiline - multipage_pdf - multiple_figs_demo - multiple_yaxis_with_spines - nan_test - newscalarformatter_demo - patheffect_demo - pcolor_demo - pcolor_log - pcolor_small - pie_demo2 - plotfile_demo - polar_demo - polar_legend - print_stdout - psd_demo - psd_demo2 - psd_demo3 - psd_demo_complex - pstest - pythonic_matplotlib - quadmesh_demo - quiver_demo - scatter_custom_symbol - scatter_demo2 - scatter_hist - scatter_masked - scatter_profile - scatter_star_poly - scatter_symbol - set_and_get - shading_example - shared_axis_across_figures - shared_axis_demo - simple_plot - simple_plot_fps - specgram_demo - spine_placement_demo - spy_demos - stackplot_demo - stackplot_demo2 - stem_plot - step_demo - stix_fonts_demo - stock_demo - subplot_demo - subplot_toolbar - subplots_adjust - subplots_demo - symlog_demo - system_monitor - table_demo - tex_demo - tex_unicode_demo - text_handles - text_rotation - text_rotation_relative_to_line - titles_demo - to_numeric - toggle_images - transoffset - tricontour_demo - tricontour_smooth_delaunay - tricontour_smooth_user - tricontour_vs_griddata - trigradient_demo - triinterp_demo - tripcolor_demo - triplot_demo - usetex_baseline_test - usetex_demo - usetex_fonteffects - vline_hline_demo - webapp_demo - xcorr_demo - zorder_demo diff --git a/dev/_sources/examples/pylab_examples/integral_demo.txt b/dev/_sources/examples/pylab_examples/integral_demo.txt deleted file mode 100644 index 0607e7458c0..00000000000 --- a/dev/_sources/examples/pylab_examples/integral_demo.txt +++ /dev/null @@ -1,48 +0,0 @@ -.. _pylab_examples-integral_demo: - -pylab_examples example code: integral_demo.py -============================================= - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/pylab_examples/integral_demo.py - -:: - - #!/usr/bin/env python - - # implement the example graphs/integral from pyx - from pylab import * - from matplotlib.patches import Polygon - - def func(x): - return (x-3)*(x-5)*(x-7)+85 - - ax = subplot(111) - - a, b = 2, 9 # integral area - x = arange(0, 10, 0.01) - y = func(x) - plot(x, y, linewidth=1) - - # make the shaded region - ix = arange(a, b, 0.01) - iy = func(ix) - verts = [(a,0)] + list(zip(ix,iy)) + [(b,0)] - poly = Polygon(verts, facecolor='0.8', edgecolor='k') - ax.add_patch(poly) - - text(0.5 * (a + b), 30, - r"$\int_a^b f(x)\mathrm{d}x$", horizontalalignment='center', - fontsize=20) - - axis([0,10, 0, 180]) - figtext(0.9, 0.05, 'x') - figtext(0.1, 0.9, 'y') - ax.set_xticks((a,b)) - ax.set_xticklabels(('a','b')) - ax.set_yticks([]) - show() - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/pylab_examples/interp_demo.txt b/dev/_sources/examples/pylab_examples/interp_demo.txt deleted file mode 100644 index de904e7427c..00000000000 --- a/dev/_sources/examples/pylab_examples/interp_demo.txt +++ /dev/null @@ -1,28 +0,0 @@ -.. _pylab_examples-interp_demo: - -pylab_examples example code: interp_demo.py -=========================================== - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/pylab_examples/interp_demo.py - -:: - - from matplotlib.pyplot import figure, show - from numpy import pi, sin, linspace - from matplotlib.mlab import stineman_interp - - x = linspace(0,2*pi,20); - y = sin(x); yp = None - xi = linspace(x[0],x[-1],100); - yi = stineman_interp(xi,x,y,yp); - - fig = figure() - ax = fig.add_subplot(111) - ax.plot(x,y,'ro',xi,yi,'-b.') - show() - - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/pylab_examples/invert_axes.txt b/dev/_sources/examples/pylab_examples/invert_axes.txt deleted file mode 100644 index 07601a2ce4a..00000000000 --- a/dev/_sources/examples/pylab_examples/invert_axes.txt +++ /dev/null @@ -1,35 +0,0 @@ -.. _pylab_examples-invert_axes: - -pylab_examples example code: invert_axes.py -=========================================== - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/pylab_examples/invert_axes.py - -:: - - #!/usr/bin/env python - """ - - You can use decreasing axes by flipping the normal order of the axis - limits - - """ - from pylab import * - - t = arange(0.01, 5.0, 0.01) - s = exp(-t) - plot(t, s) - - xlim(5,0) # decreasing time - - xlabel('decreasing time (s)') - ylabel('voltage (mV)') - title('Should be growing...') - grid(True) - - show() - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/pylab_examples/layer_images.txt b/dev/_sources/examples/pylab_examples/layer_images.txt deleted file mode 100644 index 12d8a932891..00000000000 --- a/dev/_sources/examples/pylab_examples/layer_images.txt +++ /dev/null @@ -1,57 +0,0 @@ -.. _pylab_examples-layer_images: - -pylab_examples example code: layer_images.py -============================================ - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/pylab_examples/layer_images.py - -:: - - #!/usr/bin/env python - """ - Layer images above one another using alpha blending - """ - from __future__ import division - from pylab import * - - def func3(x,y): - return (1- x/2 + x**5 + y**3)*exp(-x**2-y**2) - - # make these smaller to increase the resolution - dx, dy = 0.05, 0.05 - - x = arange(-3.0, 3.0, dx) - y = arange(-3.0, 3.0, dy) - X,Y = meshgrid(x, y) - - # when layering multiple images, the images need to have the same - # extent. This does not mean they need to have the same shape, but - # they both need to render to the same coordinate system determined by - # xmin, xmax, ymin, ymax. Note if you use different interpolations - # for the images their apparent extent could be different due to - # interpolation edge effects - - - xmin, xmax, ymin, ymax = amin(x), amax(x), amin(y), amax(y) - extent = xmin, xmax, ymin, ymax - fig = plt.figure(frameon=False) - - Z1 = array(([0,1]*4 + [1,0]*4)*4); Z1.shape = 8,8 # chessboard - im1 = imshow(Z1, cmap=cm.gray, interpolation='nearest', - extent=extent) - hold(True) - - Z2 = func3(X, Y) - - im2 = imshow(Z2, cmap=cm.jet, alpha=.9, interpolation='bilinear', - extent=extent) - #axis([xmin, xmax, ymin, ymax]) - - show() - - - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/pylab_examples/legend_auto.txt b/dev/_sources/examples/pylab_examples/legend_auto.txt deleted file mode 100644 index 5327b414c9b..00000000000 --- a/dev/_sources/examples/pylab_examples/legend_auto.txt +++ /dev/null @@ -1,110 +0,0 @@ -.. _pylab_examples-legend_auto: - -pylab_examples example code: legend_auto.py -=========================================== - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/pylab_examples/legend_auto.py - -:: - - """ - This file was written to test matplotlib's autolegend placement - algorithm, but shows lots of different ways to create legends so is - useful as a general examples - - Thanks to John Gill and Phil ?? for help at the matplotlib sprint at - pycon 2005 where the auto-legend support was written. - """ - from pylab import * - import sys - - rcParams['legend.loc'] = 'best' - - N = 100 - x = arange(N) - - def fig_1(): - figure(1) - t = arange(0, 40.0 * pi, 0.1) - l, = plot(t, 100*sin(t), 'r', label='sine') - legend(framealpha=0.5) - - def fig_2(): - figure(2) - plot(x, 'o', label='x=y') - legend() - - def fig_3(): - figure(3) - plot(x, -x, 'o', label='x= -y') - legend() - - def fig_4(): - figure(4) - plot(x, ones(len(x)), 'o', label='y=1') - plot(x, -ones(len(x)), 'o', label='y=-1') - legend() - - def fig_5(): - figure(5) - n, bins, patches = hist(randn(1000), 40, normed=1) - l, = plot(bins, normpdf(bins, 0.0, 1.0), 'r--', label='fit', linewidth=3) - legend([l, patches[0]], ['fit', 'hist']) - - def fig_6(): - figure(6) - plot(x, 50-x, 'o', label='y=1') - plot(x, x-50, 'o', label='y=-1') - legend() - - def fig_7(): - figure(7) - xx = x - (N/2.0) - plot(xx, (xx*xx)-1225, 'bo', label='$y=x^2$') - plot(xx, 25*xx, 'go', label='$y=25x$') - plot(xx, -25*xx, 'mo', label='$y=-25x$') - legend() - - def fig_8(): - figure(8) - b1 = bar(x, x, color='m') - b2 = bar(x, x[::-1], color='g') - legend([b1[0], b2[0]], ['up', 'down']) - - def fig_9(): - figure(9) - b1 = bar(x, -x) - b2 = bar(x, -x[::-1], color='r') - legend([b1[0], b2[0]], ['down', 'up']) - - def fig_10(): - figure(10) - b1 = bar(x, x, bottom=-100, color='m') - b2 = bar(x, x[::-1], bottom=-100, color='g') - b3 = bar(x, -x, bottom=100) - b4 = bar(x, -x[::-1], bottom=100, color='r') - legend([b1[0], b2[0], b3[0], b4[0]], ['bottom right', 'bottom left', - 'top left', 'top right']) - - if __name__ == '__main__': - nfigs = 10 - figures = [] - for f in sys.argv[1:]: - try: - figures.append(int(f)) - except ValueError: - pass - if len(figures) == 0: - figures = range(1, nfigs+1) - - for fig in figures: - fn_name = "fig_%d" % fig - fn = globals()[fn_name] - fn() - - show() - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/pylab_examples/legend_demo.txt b/dev/_sources/examples/pylab_examples/legend_demo.txt deleted file mode 100644 index c1386a85ce3..00000000000 --- a/dev/_sources/examples/pylab_examples/legend_demo.txt +++ /dev/null @@ -1,56 +0,0 @@ -.. _pylab_examples-legend_demo: - -pylab_examples example code: legend_demo.py -=========================================== - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/pylab_examples/legend_demo.py - -:: - - """ - Demo of the legend function with a few features. - - In addition to the basic legend, this demo shows a few optional features: - - * Custom legend placement. - * A keyword argument to a drop-shadow. - * Setting the background color. - * Setting the font size. - * Setting the line width. - """ - import numpy as np - import matplotlib.pyplot as plt - - - # Example data - a = np.arange(0,3, .02) - b = np.arange(0,3, .02) - c = np.exp(a) - d = c[::-1] - - # Create plots with pre-defined labels. - # Alternatively, you can pass labels explicitly when calling `legend`. - 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') - - # Now add the legend with some customizations. - legend = ax.legend(loc='upper center', shadow=True) - - # The frame is matplotlib.patches.Rectangle instance surrounding the legend. - frame = legend.get_frame() - frame.set_facecolor('0.90') - - # Set the fontsize - for label in legend.get_texts(): - label.set_fontsize('large') - - for label in legend.get_lines(): - label.set_linewidth(1.5) # the legend line width - plt.show() - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/pylab_examples/legend_demo2.txt b/dev/_sources/examples/pylab_examples/legend_demo2.txt deleted file mode 100644 index 182c4724b0d..00000000000 --- a/dev/_sources/examples/pylab_examples/legend_demo2.txt +++ /dev/null @@ -1,37 +0,0 @@ -.. _pylab_examples-legend_demo2: - -pylab_examples example code: legend_demo2.py -============================================ - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/pylab_examples/legend_demo2.py - -:: - - # Make a legend for specific lines. - import matplotlib.pyplot as plt - import numpy as np - - - t1 = np.arange(0.0, 2.0, 0.1) - t2 = np.arange(0.0, 2.0, 0.01) - - # note that plot returns a list of lines. The "l1, = plot" usage - # extracts the first element of the list into l1 using tuple - # unpacking. So l1 is a Line2D instance, not a sequence of lines - l1, = plt.plot(t2, np.exp(-t2)) - l2, l3 = plt.plot(t2, np.sin(2 * np.pi * t2), '--go', t1, np.log(1 + t1), '.') - l4, = plt.plot(t2, np.exp(-t2) * np.sin(2 * np.pi * t2), 'rs-.') - - plt.legend( (l2, l4), ('oscillatory', 'damped'), 'upper right', shadow=True) - plt.xlabel('time') - plt.ylabel('volts') - plt.title('Damped oscillation') - plt.show() - - - - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/pylab_examples/legend_demo3.txt b/dev/_sources/examples/pylab_examples/legend_demo3.txt deleted file mode 100644 index 3d7765d2668..00000000000 --- a/dev/_sources/examples/pylab_examples/legend_demo3.txt +++ /dev/null @@ -1,47 +0,0 @@ -.. _pylab_examples-legend_demo3: - -pylab_examples example code: legend_demo3.py -============================================ - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/pylab_examples/legend_demo3.py - -:: - - #!/usr/bin/env python - import matplotlib - matplotlib.rcParams['legend.fancybox'] = True - import matplotlib.pyplot as plt - import numpy as np - - def myplot(ax): - t1 = np.arange(0.0, 1.0, 0.1) - for n in [1, 2, 3, 4]: - ax.plot(t1, t1**n, label="n=%d"%(n,)) - - ax1 = plt.subplot(3,1,1) - ax1.plot([1], label="multi\nline") - ax1.plot([1], label="$2^{2^2}$") - ax1.plot([1], label=r"$\frac{1}{2}\pi$") - ax1.legend(loc=1, ncol=3, shadow=True) - - ax2 = plt.subplot(3,1,2) - myplot(ax2) - ax2.legend(loc="center left", bbox_to_anchor=[0.5, 0.5], - ncol=2, shadow=True, title="Legend") - ax2.get_legend().get_title().set_color("red") - - ax3 = plt.subplot(3,1,3) - myplot(ax3) - ax3.legend(shadow=True, fancybox=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/dev/_sources/examples/pylab_examples/legend_demo4.txt b/dev/_sources/examples/pylab_examples/legend_demo4.txt deleted file mode 100644 index 52f3d50947a..00000000000 --- a/dev/_sources/examples/pylab_examples/legend_demo4.txt +++ /dev/null @@ -1,45 +0,0 @@ -.. _pylab_examples-legend_demo4: - -pylab_examples example code: legend_demo4.py -============================================ - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/pylab_examples/legend_demo4.py - -:: - - import matplotlib.pyplot as plt - - ax = plt.subplot(311) - - b1 = ax.bar([0, 1, 2], [0.2, 0.3, 0.1], width=0.4, - label="Bar 1", align="center") - - b2 = ax.bar([0.5, 1.5, 2.5], [0.3, 0.2, 0.2], color="red", width=0.4, - label="Bar 2", align="center") - - ax.legend() - - ax = plt.subplot(312) - - err1 = ax.errorbar([0, 1, 2], [2, 3, 1], xerr=0.4, fmt="s", - label="test 1") - err2 = ax.errorbar([0, 1, 2], [3, 2, 4], yerr=0.3, fmt="o", - label="test 2") - err3 = ax.errorbar([0, 1, 2], [1, 1, 3], xerr=0.4, yerr=0.3, fmt="^", - label="test 3") - - ax.legend() - - ax = plt.subplot(313) - - ll = ax.stem([0.3, 1.5, 2.7], [1, 3.6, 2.7], label="stem 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/dev/_sources/examples/pylab_examples/legend_demo_custom_handler.txt b/dev/_sources/examples/pylab_examples/legend_demo_custom_handler.txt deleted file mode 100644 index 946c9cc19cd..00000000000 --- a/dev/_sources/examples/pylab_examples/legend_demo_custom_handler.txt +++ /dev/null @@ -1,44 +0,0 @@ -.. _pylab_examples-legend_demo_custom_handler: - -pylab_examples example code: legend_demo_custom_handler.py -========================================================== - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/pylab_examples/legend_demo_custom_handler.py - -:: - - import matplotlib.pyplot as plt - import numpy as np - - ax = plt.subplot(111, aspect=1) - x, y = np.random.randn(2, 20) - #[1.1, 2, 2.8], [1.1, 2, 1.8] - l1, = ax.plot(x,y, "k+", mew=3, ms=12) - l2, = ax.plot(x,y, "w+", mew=1, ms=10) - - import matplotlib.patches as mpatches - c = mpatches.Circle((0, 0), 1, fc="g", ec="r", lw=3) - ax.add_patch(c) - - - - from matplotlib.legend_handler import HandlerPatch - - def make_legend_ellipse(legend, orig_handle, - xdescent, ydescent, - width, height, fontsize): - p = mpatches.Ellipse(xy=(0.5*width-0.5*xdescent, 0.5*height-0.5*ydescent), - width = width+xdescent, height=(height+ydescent)) - - return p - - plt.legend([c, (l1, l2)], ["Label 1", "Label 2"], - handler_map={mpatches.Circle:HandlerPatch(patch_func=make_legend_ellipse), - }) - - plt.show() - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/pylab_examples/legend_scatter.txt b/dev/_sources/examples/pylab_examples/legend_scatter.txt deleted file mode 100644 index 461564e631f..00000000000 --- a/dev/_sources/examples/pylab_examples/legend_scatter.txt +++ /dev/null @@ -1,35 +0,0 @@ -.. _pylab_examples-legend_scatter: - -pylab_examples example code: legend_scatter.py -============================================== - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/pylab_examples/legend_scatter.py - -:: - - #!/usr/bin/env python - from pylab import * - - N=1000 - - props = dict( alpha=0.5, edgecolors='none' ) - - handles = [] - colours = ['red', 'green', 'blue', 'magenta', 'cyan', 'yellow'] - colours = ['red', 'green', 'blue'] - for colour in colours: - x, y = rand(2,N) - s = 400.0 * rand(N) - handles.append(scatter(x, y, c=colour, s=s, **props)) - - legend(handles, colours) - grid(True) - - show() - - - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/pylab_examples/legend_translucent.txt b/dev/_sources/examples/pylab_examples/legend_translucent.txt deleted file mode 100644 index 488009c7e39..00000000000 --- a/dev/_sources/examples/pylab_examples/legend_translucent.txt +++ /dev/null @@ -1,32 +0,0 @@ -.. _pylab_examples-legend_translucent: - -pylab_examples example code: legend_translucent.py -================================================== - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/pylab_examples/legend_translucent.py - -:: - - #!/usr/bin/python - # - # Show how to add a translucent legend - - # import pyplot module - import matplotlib.pyplot as plt - - # draw 2 crossing lines - plt.plot([0,1], label='going up') - plt.plot([1,0], label='going down') - - # add the legend in the middle of the plot - leg = plt.legend(fancybox=True, loc='center') - # set the alpha value of the legend: it will be translucent - leg.get_frame().set_alpha(0.5) - - # show the plot - plt.show() - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/pylab_examples/line_collection.txt b/dev/_sources/examples/pylab_examples/line_collection.txt deleted file mode 100644 index ca640afd37a..00000000000 --- a/dev/_sources/examples/pylab_examples/line_collection.txt +++ /dev/null @@ -1,56 +0,0 @@ -.. _pylab_examples-line_collection: - -pylab_examples example code: line_collection.py -=============================================== - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/pylab_examples/line_collection.py - -:: - - import matplotlib.pyplot as plt - from matplotlib.collections import LineCollection - from matplotlib.colors import colorConverter - - import numpy as np - - # In order to efficiently plot many lines in a single set of axes, - # Matplotlib has the ability to add the lines all at once. Here is a - # simple example showing how it is done. - - x = np.arange(100) - # Here are many sets of y to plot vs x - ys = x[:50, np.newaxis] + x[np.newaxis, :] - - segs = np.zeros((50, 100, 2), float) - segs[:,:,1] = ys - segs[:,:,0] = x - - # Mask some values to test masked array support: - segs = np.ma.masked_where((segs > 50) & (segs < 60), segs) - - # We need to set the plot limits. - ax = plt.axes() - ax.set_xlim(x.min(), x.max()) - ax.set_ylim(ys.min(), ys.max()) - - # colors is sequence of rgba tuples - # linestyle is a string or dash tuple. Legal string values are - # solid|dashed|dashdot|dotted. The dash tuple is (offset, onoffseq) - # where onoffseq is an even length tuple of on and off ink in points. - # If linestyle is omitted, 'solid' is used - # See matplotlib.collections.LineCollection for more information - line_segments = LineCollection(segs, - linewidths = (0.5,1,1.5,2), - colors = [colorConverter.to_rgba(i) \ - for i in ('b','g','r','c','m','y','k')], - linestyle = 'solid') - ax.add_collection(line_segments) - ax.set_title('Line collection with masked arrays') - plt.show() - - - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/pylab_examples/line_collection2.txt b/dev/_sources/examples/pylab_examples/line_collection2.txt deleted file mode 100644 index ce64aef868b..00000000000 --- a/dev/_sources/examples/pylab_examples/line_collection2.txt +++ /dev/null @@ -1,48 +0,0 @@ -.. _pylab_examples-line_collection2: - -pylab_examples example code: line_collection2.py -================================================ - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/pylab_examples/line_collection2.py - -:: - - from pylab import * - from matplotlib.collections import LineCollection - - # In order to efficiently plot many lines in a single set of axes, - # Matplotlib has the ability to add the lines all at once. Here is a - # simple example showing how it is done. - - N = 50 - x = arange(N) - # Here are many sets of y to plot vs x - ys = [x+i for i in x] - - # We need to set the plot limits, they will not autoscale - ax = axes() - ax.set_xlim((amin(x),amax(x))) - ax.set_ylim((amin(amin(ys)),amax(amax(ys)))) - - # colors is sequence of rgba tuples - # linestyle is a string or dash tuple. Legal string values are - # solid|dashed|dashdot|dotted. The dash tuple is (offset, onoffseq) - # where onoffseq is an even length tuple of on and off ink in points. - # If linestyle is omitted, 'solid' is used - # See matplotlib.collections.LineCollection for more information - line_segments = LineCollection([list(zip(x,y)) for y in ys], # Make a sequence of x,y pairs - linewidths = (0.5,1,1.5,2), - linestyles = 'solid') - line_segments.set_array(x) - ax.add_collection(line_segments) - fig = gcf() - axcb = fig.colorbar(line_segments) - axcb.set_label('Line Number') - ax.set_title('Line Collection with mapped colors') - sci(line_segments) # This allows interactive changing of the colormap. - show() - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/pylab_examples/line_styles.txt b/dev/_sources/examples/pylab_examples/line_styles.txt deleted file mode 100644 index 62473ad10a6..00000000000 --- a/dev/_sources/examples/pylab_examples/line_styles.txt +++ /dev/null @@ -1,59 +0,0 @@ -.. _pylab_examples-line_styles: - -pylab_examples example code: line_styles.py -=========================================== - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/pylab_examples/line_styles.py - -:: - - #!/usr/bin/env python - # This should probably be replaced with a demo that shows all - # line and marker types in a single panel, with labels. - - import matplotlib.pyplot as plt - from matplotlib.lines import Line2D - import numpy as np - - t = np.arange(0.0, 1.0, 0.1) - s = np.sin(2*np.pi*t) - linestyles = ['_', '-', '--', ':'] - markers = [] - for m in Line2D.markers: - try: - if len(m) == 1 and m != ' ': - markers.append(m) - except TypeError: - pass - - styles = markers + [ - r'$\lambda$', - r'$\bowtie$', - r'$\circlearrowleft$', - r'$\clubsuit$', - r'$\checkmark$'] - - colors = ('b', 'g', 'r', 'c', 'm', 'y', 'k') - - plt.figure(figsize=(8,8)) - - axisNum = 0 - for row in range(6): - for col in range(5): - axisNum += 1 - ax = plt.subplot(6, 5, axisNum) - color = colors[axisNum % len(colors)] - if axisNum < len(linestyles): - plt.plot(t, s, linestyles[axisNum], color=color, markersize=10) - else: - style = styles[(axisNum - len(linestyles)) % len(styles)] - plt.plot(t, s, linestyle='None', marker=style, color=color, markersize=10) - ax.set_yticklabels([]) - ax.set_xticklabels([]) - - plt.show() - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/pylab_examples/load_converter.txt b/dev/_sources/examples/pylab_examples/load_converter.txt deleted file mode 100644 index 135b91a1c0d..00000000000 --- a/dev/_sources/examples/pylab_examples/load_converter.txt +++ /dev/null @@ -1,34 +0,0 @@ -.. _pylab_examples-load_converter: - -pylab_examples example code: load_converter.py -============================================== - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/pylab_examples/load_converter.py - -:: - - from __future__ import print_function - from matplotlib.dates import strpdate2num - #from matplotlib.mlab import load - import numpy as np - from pylab import figure, show - import matplotlib.cbook as cbook - - datafile = cbook.get_sample_data('msft.csv', asfileobj=False) - print('loading', datafile) - - dates, closes = np.loadtxt( - datafile, delimiter=',', - converters={0:strpdate2num('%d-%b-%y')}, - skiprows=1, usecols=(0,2), unpack=True) - - fig = figure() - ax = fig.add_subplot(111) - ax.plot_date(dates, closes, '-') - fig.autofmt_xdate() - show() - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/pylab_examples/loadrec.txt b/dev/_sources/examples/pylab_examples/loadrec.txt deleted file mode 100644 index 983e9fc752b..00000000000 --- a/dev/_sources/examples/pylab_examples/loadrec.txt +++ /dev/null @@ -1,37 +0,0 @@ -.. _pylab_examples-loadrec: - -pylab_examples example code: loadrec.py -======================================= - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/pylab_examples/loadrec.py - -:: - - from __future__ import print_function - from matplotlib import mlab - from pylab import figure, show - import matplotlib.cbook as cbook - - datafile = cbook.get_sample_data('msft.csv', asfileobj=False) - print('loading', datafile) - a = mlab.csv2rec(datafile) - a.sort() - print(a.dtype) - - fig = figure() - ax = fig.add_subplot(111) - ax.plot(a.date, a.adj_close, '-') - fig.autofmt_xdate() - - # if you have xlwt installed, you can output excel - try: - import mpl_toolkits.exceltools as exceltools - exceltools.rec2excel(a, 'test.xls') - except ImportError: - pass - show() - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/pylab_examples/log_bar.txt b/dev/_sources/examples/pylab_examples/log_bar.txt deleted file mode 100644 index 84089ec2cad..00000000000 --- a/dev/_sources/examples/pylab_examples/log_bar.txt +++ /dev/null @@ -1,39 +0,0 @@ -.. _pylab_examples-log_bar: - -pylab_examples example code: log_bar.py -======================================= - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/pylab_examples/log_bar.py - -:: - - #!/usr/bin/env python - - from matplotlib import pylab - - data = ((3,1000), (10,3), (100,30), (500, 800), (50,1)) - - pylab.xlabel("FOO") - pylab.ylabel("FOO") - pylab.title("Testing") - pylab.gca().set_yscale('log') - - dim = len(data[0]) - w = 0.75 - dimw = w / dim - - x = pylab.arange(len(data)) - for i in range(len(data[0])) : - y = [d[i] for d in data] - b = pylab.bar(x + i * dimw, y, dimw, bottom=0.001) - pylab.gca().set_xticks(x + w / 2) - pylab.gca().set_ylim( (0.001,1000)) - - pylab.show() - - - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/pylab_examples/log_demo.txt b/dev/_sources/examples/pylab_examples/log_demo.txt deleted file mode 100644 index a9ae7917877..00000000000 --- a/dev/_sources/examples/pylab_examples/log_demo.txt +++ /dev/null @@ -1,52 +0,0 @@ -.. _pylab_examples-log_demo: - -pylab_examples example code: log_demo.py -======================================== - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/pylab_examples/log_demo.py - -:: - - - import numpy as np - import matplotlib.pyplot as plt - - plt.subplots_adjust(hspace=0.4) - t = np.arange(0.01, 20.0, 0.01) - - # log y axis - plt.subplot(221) - plt.semilogy(t, np.exp(-t/5.0)) - plt.title('semilogy') - plt.grid(True) - - # log x axis - plt.subplot(222) - plt.semilogx(t, np.sin(2*np.pi*t)) - plt.title('semilogx') - plt.grid(True) - - # log x and y axis - plt.subplot(223) - plt.loglog(t, 20*np.exp(-t/10.0), basex=2) - plt.grid(True) - plt.title('loglog base 4 on x') - - # with errorbars: clip non-positive values - ax = plt.subplot(224) - ax.set_xscale("log", nonposx='clip') - ax.set_yscale("log", nonposy='clip') - - x = 10.0**np.linspace(0.0, 2.0, 20) - y = x**2.0 - plt.errorbar(x, y, xerr=0.1*x, yerr=5.0+0.75*y) - ax.set_ylim(ymin=0.1) - ax.set_title('Errorbars go negative') - - - plt.show() - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/pylab_examples/log_test.txt b/dev/_sources/examples/pylab_examples/log_test.txt deleted file mode 100644 index 0b96e826b0e..00000000000 --- a/dev/_sources/examples/pylab_examples/log_test.txt +++ /dev/null @@ -1,24 +0,0 @@ -.. _pylab_examples-log_test: - -pylab_examples example code: log_test.py -======================================== - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/pylab_examples/log_test.py - -:: - - #!/usr/bin/env python - from pylab import * - - dt = 0.01 - t = arange(dt, 20.0, dt) - - semilogx(t, exp(-t/5.0)) - grid(True) - - show() - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/pylab_examples/logo.txt b/dev/_sources/examples/pylab_examples/logo.txt deleted file mode 100644 index a05f052d154..00000000000 --- a/dev/_sources/examples/pylab_examples/logo.txt +++ /dev/null @@ -1,42 +0,0 @@ -.. _pylab_examples-logo: - -pylab_examples example code: logo.py -==================================== - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/pylab_examples/logo.py - -:: - - #!/usr/bin/env python - # This file generates the matplotlib web page logo - - from __future__ import print_function - from pylab import * - import matplotlib.cbook as cbook - - # convert data to mV - datafile = cbook.get_sample_data('membrane.dat', asfileobj=False) - print('loading', datafile) - - x = 1000*0.1*fromstring(file(datafile, 'rb').read(), float32) - # 0.0005 is the sample interval - t = 0.0005*arange(len(x)) - figure(1, figsize=(7,1), dpi=100) - ax = subplot(111, axisbg='y') - plot(t, x) - text(0.5, 0.5,'matplotlib', color='r', - fontsize=40, fontname='Courier', - horizontalalignment='center', - verticalalignment='center', - transform = ax.transAxes, - ) - axis([1, 1.72,-60, 10]) - setp(gca(), 'xticklabels', []) - setp(gca(), 'yticklabels', []) - - show() - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/pylab_examples/major_minor_demo1.txt b/dev/_sources/examples/pylab_examples/major_minor_demo1.txt deleted file mode 100644 index f1872a00123..00000000000 --- a/dev/_sources/examples/pylab_examples/major_minor_demo1.txt +++ /dev/null @@ -1,67 +0,0 @@ -.. _pylab_examples-major_minor_demo1: - -pylab_examples example code: major_minor_demo1.py -================================================= - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/pylab_examples/major_minor_demo1.py - -:: - - #!/usr/bin/env python - """ - Demonstrate how to use major and minor tickers. - - The two relevant userland classes are Locators and Formatters. - Locators determine where the ticks are and formatters control the - formatting of ticks. - - Minor ticks are off by default (NullLocator and NullFormatter). You - can turn minor ticks on w/o labels by setting the minor locator. You - can also turn labeling on for the minor ticker by setting the minor - formatter - - Make a plot with major ticks that are multiples of 20 and minor ticks - that are multiples of 5. Label major ticks with %d formatting but - don't label minor ticks - - The MultipleLocator ticker class is used to place ticks on multiples of - some base. The FormatStrFormatter uses a string format string (eg - '%d' or '%1.2f' or '%1.1f cm' ) to format the tick - - The pylab interface grid command changes the grid settings of the - major ticks of the y and y axis together. If you want to control the - grid of the minor ticks for a given axis, use for example - - ax.xaxis.grid(True, which='minor') - - Note, you should not use the same locator between different Axis - because the locator stores references to the Axis data and view limits - - """ - - from pylab import * - from matplotlib.ticker import MultipleLocator, FormatStrFormatter - - majorLocator = MultipleLocator(20) - majorFormatter = FormatStrFormatter('%d') - minorLocator = MultipleLocator(5) - - - t = arange(0.0, 100.0, 0.1) - s = sin(0.1*pi*t)*exp(-t*0.01) - - ax = subplot(111) - plot(t,s) - - ax.xaxis.set_major_locator(majorLocator) - ax.xaxis.set_major_formatter(majorFormatter) - - #for the minor ticks, use no labels; default NullFormatter - ax.xaxis.set_minor_locator(minorLocator) - - show() - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/pylab_examples/major_minor_demo2.txt b/dev/_sources/examples/pylab_examples/major_minor_demo2.txt deleted file mode 100644 index 5a233b1ad66..00000000000 --- a/dev/_sources/examples/pylab_examples/major_minor_demo2.txt +++ /dev/null @@ -1,48 +0,0 @@ -.. _pylab_examples-major_minor_demo2: - -pylab_examples example code: major_minor_demo2.py -================================================= - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/pylab_examples/major_minor_demo2.py - -:: - - #!/usr/bin/env python - """ - Automatic tick selection for major and minor ticks. - - Use interactive pan and zoom to see how the tick intervals - change. There will be either 4 or 5 minor tick intervals - per major interval, depending on the major interval. - """ - - import numpy as np - import matplotlib.pyplot as plt - from matplotlib.ticker import AutoMinorLocator - - # One can supply an argument to AutoMinorLocator to - # specify a fixed number of minor intervals per major interval, e.g.: - # minorLocator = AutoMinorLocator(2) - # would lead to a single minor tick between major ticks. - - minorLocator = AutoMinorLocator() - - - t = np.arange(0.0, 100.0, 0.01) - s = np.sin(2*np.pi*t)*np.exp(-t*0.01) - - ax = plt.subplot(111) - plt.plot(t,s) - - ax.xaxis.set_minor_locator(minorLocator) - - plt.tick_params(which='both', width=2) - plt.tick_params(which='major', length=7) - plt.tick_params(which='minor', length=4, 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/dev/_sources/examples/pylab_examples/manual_axis.txt b/dev/_sources/examples/pylab_examples/manual_axis.txt deleted file mode 100644 index f398b1442d0..00000000000 --- a/dev/_sources/examples/pylab_examples/manual_axis.txt +++ /dev/null @@ -1,71 +0,0 @@ -.. _pylab_examples-manual_axis: - -pylab_examples example code: manual_axis.py -=========================================== - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/pylab_examples/manual_axis.py - -:: - - """ - The techniques here are no longer required with the new support for - spines in matplotlib -- see - http://matplotlib.org/examples/pylab_examples/spine_placement_demo.html. - - This example should be considered deprecated and is left just for demo - purposes for folks wanting to make a pseudo-axis - - """ - - import numpy as np - from pylab import figure, show - import matplotlib.lines as lines - - def make_xaxis(ax, yloc, offset=0.05, **props): - xmin, xmax = ax.get_xlim() - locs = [loc for loc in ax.xaxis.get_majorticklocs() - if loc>=xmin and loc<=xmax] - tickline, = ax.plot(locs, [yloc]*len(locs),linestyle='', - marker=lines.TICKDOWN, **props) - axline, = ax.plot([xmin, xmax], [yloc, yloc], **props) - tickline.set_clip_on(False) - axline.set_clip_on(False) - for loc in locs: - ax.text(loc, yloc-offset, '%1.1f'%loc, - horizontalalignment='center', - verticalalignment='top') - - def make_yaxis(ax, xloc=0, offset=0.05, **props): - ymin, ymax = ax.get_ylim() - locs = [loc for loc in ax.yaxis.get_majorticklocs() - if loc>=ymin and loc<=ymax] - tickline, = ax.plot([xloc]*len(locs), locs, linestyle='', - marker=lines.TICKLEFT, **props) - axline, = ax.plot([xloc, xloc], [ymin, ymax], **props) - tickline.set_clip_on(False) - axline.set_clip_on(False) - - for loc in locs: - ax.text(xloc-offset, loc, '%1.1f'%loc, - verticalalignment='center', - horizontalalignment='right') - - - props = dict(color='black', linewidth=2, markeredgewidth=2) - x = np.arange(200.) - y = np.sin(2*np.pi*x/200.) + np.random.rand(200)-0.5 - fig = figure(facecolor='white') - ax = fig.add_subplot(111, frame_on=False) - ax.axison = False - ax.plot(x, y, 'd', markersize=8, markerfacecolor='blue') - ax.set_xlim(0, 200) - ax.set_ylim(-1.5, 1.5) - make_xaxis(ax, 0, offset=0.1, **props) - make_yaxis(ax, 0, offset=5, **props) - - show() - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/pylab_examples/marker_path.txt b/dev/_sources/examples/pylab_examples/marker_path.txt deleted file mode 100644 index fa209d92cc2..00000000000 --- a/dev/_sources/examples/pylab_examples/marker_path.txt +++ /dev/null @@ -1,30 +0,0 @@ -.. _pylab_examples-marker_path: - -pylab_examples example code: marker_path.py -=========================================== - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/pylab_examples/marker_path.py - -:: - - import matplotlib.pyplot as plt - import matplotlib.path as mpath - import numpy as np - - - star = mpath.Path.unit_regular_star(6) - circle = mpath.Path.unit_circle() - # concatenate the circle with an internal cutout of the star - verts = np.concatenate([circle.vertices, star.vertices[::-1, ...]]) - codes = np.concatenate([circle.codes, star.codes]) - cut_star = mpath.Path(verts, codes) - - - plt.plot(np.arange(10)**2, '--r', marker=cut_star, markersize=15) - - plt.show() - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/pylab_examples/masked_demo.txt b/dev/_sources/examples/pylab_examples/masked_demo.txt deleted file mode 100644 index 9109746f045..00000000000 --- a/dev/_sources/examples/pylab_examples/masked_demo.txt +++ /dev/null @@ -1,40 +0,0 @@ -.. _pylab_examples-masked_demo: - -pylab_examples example code: masked_demo.py -=========================================== - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/pylab_examples/masked_demo.py - -:: - - #!/usr/bin/env python - ''' - Plot lines with points masked out. - - This would typically be used with gappy data, to - break the line at the data gaps. - ''' - - from pylab import * - - x = ma.arange(0, 2*pi, 0.02) - y = ma.sin(x) - y1 = sin(2*x) - y2 = sin(3*x) - ym1 = ma.masked_where(y1 > 0.5, y1) - ym2 = ma.masked_where(y2 < -0.5, y2) - - lines = plot(x, y, 'r', x, ym1, 'g', x, ym2, 'bo') - setp(lines[0], linewidth = 4) - setp(lines[1], linewidth = 2) - setp(lines[2], markersize = 10) - - legend( ('No mask', 'Masked if > 0.5', 'Masked if < -0.5') , - loc = 'upper right') - title('Masked line demo') - show() - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/pylab_examples/mathtext_demo.txt b/dev/_sources/examples/pylab_examples/mathtext_demo.txt deleted file mode 100644 index a1df062c8d4..00000000000 --- a/dev/_sources/examples/pylab_examples/mathtext_demo.txt +++ /dev/null @@ -1,43 +0,0 @@ -.. _pylab_examples-mathtext_demo: - -pylab_examples example code: mathtext_demo.py -============================================= - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/pylab_examples/mathtext_demo.py - -:: - - #!/usr/bin/env python - """ - Use matplotlib's internal LaTeX parser and layout engine. For true - latex rendering, see the text.usetex option - """ - import numpy as np - from matplotlib.pyplot import figure, show - - fig = figure() - fig.subplots_adjust(bottom=0.2) - - ax = fig.add_subplot(111, axisbg='y') - ax.plot([1,2,3], 'r') - x = np.arange(0.0, 3.0, 0.1) - - ax.grid(True) - ax.set_xlabel(r'$\Delta_i^j$', fontsize=20) - ax.set_ylabel(r'$\Delta_{i+1}^j$', fontsize=20) - tex = r'$\mathcal{R}\prod_{i=\alpha_{i+1}}^\infty a_i\sin(2 \pi f x_i)$' - - ax.text(1, 1.6, tex, fontsize=20, va='bottom') - - ax.legend([r"$\sqrt{x^2}$"]) - - ax.set_title(r'$\Delta_i^j \hspace{0.4} \mathrm{versus} \hspace{0.4} \Delta_{i+1}^j$', fontsize=20) - - - show() - - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/pylab_examples/mathtext_examples.txt b/dev/_sources/examples/pylab_examples/mathtext_examples.txt deleted file mode 100644 index 535d5859f3b..00000000000 --- a/dev/_sources/examples/pylab_examples/mathtext_examples.txt +++ /dev/null @@ -1,110 +0,0 @@ -.. _pylab_examples-mathtext_examples: - -pylab_examples example code: mathtext_examples.py -================================================= - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/pylab_examples/mathtext_examples.py - -:: - - #!/usr/bin/env python - - from __future__ import print_function - - import os, sys, re - - import gc - - stests = [ - r'$a+b+\dots+\dot{s}+\ldots$', - r'$x \doteq y$', - r'\$100.00 $\alpha \_$', - r'$\frac{\$100.00}{y}$', - r'$x y$', - r'$x+y\ x=y\ x 0xffff: - # stests.append(ur'$\mathrm{\ue0f2 \U0001D538}$') - - - from pylab import * - - def doall(): - tests = stests - - figure(figsize=(8, (len(tests) * 1) + 2)) - plot([0, 0], 'r') - grid(False) - axis([0, 3, -len(tests), 0]) - yticks(arange(len(tests)) * -1) - for i, s in enumerate(tests): - print (i, s) - text(0.1, -i, s, fontsize=20) - - #savefig('mathtext_examples') - #close('all') - show() - - if '--latex' in sys.argv: - fd = open("mathtext_examples.ltx", "w") - fd.write("\\documentclass{article}\n") - fd.write("\\begin{document}\n") - fd.write("\\begin{enumerate}\n") - - for i, s in enumerate(stests): - s = re.sub(r"(?`_] - -:: - - #!/usr/bin/env python - # -*- noplot -*- - - from __future__ import print_function - - import os, sys - from pylab import * - - files = [] - figure(figsize=(5,5)) - ax = subplot(111) - for i in range(50): # 50 frames - cla() - imshow(rand(5,5), interpolation='nearest') - fname = '_tmp%03d.png'%i - print('Saving frame', fname) - savefig(fname) - files.append(fname) - - print('Making movie animation.mpg - this make take a while') - os.system("mencoder 'mf://_tmp*.png' -mf type=png:fps=10 -ovc lavc -lavcopts vcodec=wmv2 -oac copy -o animation.mpg") - #os.system("convert _tmp*.png animation.mng") - - # cleanup - for fname in files: os.remove(fname) - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/pylab_examples/mri_demo.txt b/dev/_sources/examples/pylab_examples/mri_demo.txt deleted file mode 100644 index 9560b40221d..00000000000 --- a/dev/_sources/examples/pylab_examples/mri_demo.txt +++ /dev/null @@ -1,29 +0,0 @@ -.. _pylab_examples-mri_demo: - -pylab_examples example code: mri_demo.py -======================================== - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/pylab_examples/mri_demo.py - -:: - - #!/usr/bin/env python - - from __future__ import print_function - from pylab import * - import matplotlib.cbook as cbook - # data are 256x256 16 bit integers - dfile = cbook.get_sample_data('s1045.ima.gz') - im = np.fromstring(dfile.read(), np.uint16).astype(float) - im.shape = 256, 256 - - #imshow(im, ColormapJet(256)) - imshow(im, cmap=cm.gray) - axis('off') - - show() - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/pylab_examples/mri_with_eeg.txt b/dev/_sources/examples/pylab_examples/mri_with_eeg.txt deleted file mode 100644 index a18e1fa580d..00000000000 --- a/dev/_sources/examples/pylab_examples/mri_with_eeg.txt +++ /dev/null @@ -1,92 +0,0 @@ -.. _pylab_examples-mri_with_eeg: - -pylab_examples example code: mri_with_eeg.py -============================================ - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/pylab_examples/mri_with_eeg.py - -:: - - #!/usr/bin/env python - - """ - This now uses the imshow command instead of pcolor which *is much - faster* - """ - from __future__ import division, print_function - - import numpy as np - - from matplotlib.pyplot import * - from matplotlib.collections import LineCollection - import matplotlib.cbook as cbook - # I use if 1 to break up the different regions of code visually - - if 1: # load the data - # data are 256x256 16 bit integers - dfile = cbook.get_sample_data('s1045.ima.gz') - im = np.fromstring(dfile.read(), np.uint16).astype(float) - im.shape = 256, 256 - - if 1: # plot the MRI in pcolor - subplot(221) - imshow(im, cmap=cm.gray) - axis('off') - - if 1: # plot the histogram of MRI intensity - subplot(222) - im = np.ravel(im) - im = im[np.nonzero(im)] # ignore the background - im = im/(2.0**15) # normalize - hist(im, 100) - xticks([-1, -.5, 0, .5, 1]) - yticks([]) - xlabel('intensity') - ylabel('MRI density') - - if 1: # plot the EEG - # load the data - - numSamples, numRows = 800,4 - eegfile = cbook.get_sample_data('eeg.dat', asfileobj=False) - print ('loading eeg %s' % eegfile) - data = np.fromstring(open(eegfile, 'rb').read(), float) - data.shape = numSamples, numRows - t = 10.0 * np.arange(numSamples, dtype=float)/numSamples - ticklocs = [] - ax = subplot(212) - xlim(0,10) - xticks(np.arange(10)) - dmin = data.min() - dmax = data.max() - dr = (dmax - dmin)*0.7 # Crowd them a bit. - y0 = dmin - y1 = (numRows-1) * dr + dmax - ylim(y0, y1) - - segs = [] - for i in range(numRows): - segs.append(np.hstack((t[:,np.newaxis], data[:,i,np.newaxis]))) - ticklocs.append(i*dr) - - offsets = np.zeros((numRows,2), dtype=float) - offsets[:,1] = ticklocs - - lines = LineCollection(segs, offsets=offsets, - transOffset=None, - ) - - ax.add_collection(lines) - - # set the yticks to use axes coords on the y axis - ax.set_yticks(ticklocs) - ax.set_yticklabels(['PG3', 'PG5', 'PG7', 'PG9']) - - xlabel('time (s)') - - show() - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/pylab_examples/multi_image.txt b/dev/_sources/examples/pylab_examples/multi_image.txt deleted file mode 100644 index 255e92d3406..00000000000 --- a/dev/_sources/examples/pylab_examples/multi_image.txt +++ /dev/null @@ -1,97 +0,0 @@ -.. _pylab_examples-multi_image: - -pylab_examples example code: multi_image.py -=========================================== - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/pylab_examples/multi_image.py - -:: - - #!/usr/bin/env python - ''' - Make a set of images with a single colormap, norm, and colorbar. - - It also illustrates colorbar tick labelling with a multiplier. - ''' - - from matplotlib.pyplot import figure, show, axes, sci - from matplotlib import cm, colors - from matplotlib.font_manager import FontProperties - from numpy import amin, amax, ravel - from numpy.random import rand - - Nr = 3 - Nc = 2 - - fig = figure() - cmap = cm.cool - - figtitle = 'Multiple images' - t = fig.text(0.5, 0.95, figtitle, - horizontalalignment='center', - fontproperties=FontProperties(size=16)) - - cax = fig.add_axes([0.2, 0.08, 0.6, 0.04]) - - w = 0.4 - h = 0.22 - ax = [] - images = [] - vmin = 1e40 - vmax = -1e40 - for i in range(Nr): - for j in range(Nc): - pos = [0.075 + j*1.1*w, 0.18 + i*1.2*h, w, h] - a = fig.add_axes(pos) - if i > 0: - a.set_xticklabels([]) - # Make some fake data with a range that varies - # somewhat from one plot to the next. - data =((1+i+j)/10.0)*rand(10,20)*1e-6 - dd = ravel(data) - # Manually find the min and max of all colors for - # use in setting the color scale. - vmin = min(vmin, amin(dd)) - vmax = max(vmax, amax(dd)) - images.append(a.imshow(data, cmap=cmap)) - - ax.append(a) - - # Set the first image as the master, with all the others - # observing it for changes in cmap or norm. - - class ImageFollower: - 'update image in response to changes in clim or cmap on another image' - def __init__(self, follower): - self.follower = follower - def __call__(self, leader): - self.follower.set_cmap(leader.get_cmap()) - self.follower.set_clim(leader.get_clim()) - - norm = colors.Normalize(vmin=vmin, vmax=vmax) - for i, im in enumerate(images): - im.set_norm(norm) - if i > 0: - images[0].callbacksSM.connect('changed', ImageFollower(im)) - - # The colorbar is also based on this master image. - fig.colorbar(images[0], cax, orientation='horizontal') - - # We need the following only if we want to run this interactively and - # modify the colormap: - - axes(ax[0]) # Return the current axes to the first one, - sci(images[0]) # because the current image must be in current axes. - - show() - - - - - - - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/pylab_examples/multicolored_line.txt b/dev/_sources/examples/pylab_examples/multicolored_line.txt deleted file mode 100644 index fc2dbca71a1..00000000000 --- a/dev/_sources/examples/pylab_examples/multicolored_line.txt +++ /dev/null @@ -1,67 +0,0 @@ -.. _pylab_examples-multicolored_line: - -pylab_examples example code: multicolored_line.py -================================================= - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/pylab_examples/multicolored_line.py - -:: - - #!/usr/bin/env python - ''' - Color parts of a line based on its properties, e.g., slope. - ''' - import numpy as np - import matplotlib.pyplot as plt - from matplotlib.collections import LineCollection - from matplotlib.colors import ListedColormap, BoundaryNorm - - x = np.linspace(0, 3 * np.pi, 500) - y = np.sin(x) - z = np.cos(0.5 * (x[:-1] + x[1:])) # first derivative - - # Create a colormap for red, green and blue and a norm to color - # f' < -0.5 red, f' > 0.5 blue, and the rest green - cmap = ListedColormap(['r', 'g', 'b']) - norm = BoundaryNorm([-1, -0.5, 0.5, 1], cmap.N) - - # Create a set of line segments so that we can color them individually - # This creates the points as a N x 1 x 2 array so that we can stack points - # together easily to get the segments. The segments array for line collection - # needs to be numlines x points per line x 2 (x and y) - points = np.array([x, y]).T.reshape(-1, 1, 2) - segments = np.concatenate([points[:-1], points[1:]], axis=1) - - # Create the line collection object, setting the colormapping parameters. - # Have to set the actual values used for colormapping separately. - lc = LineCollection(segments, cmap=cmap, norm=norm) - lc.set_array(z) - lc.set_linewidth(3) - - fig1 = plt.figure() - plt.gca().add_collection(lc) - plt.xlim(x.min(), x.max()) - plt.ylim(-1.1, 1.1) - - # Now do a second plot coloring the curve using a continuous colormap - t = np.linspace(0, 10, 200) - x = np.cos(np.pi * t) - y = np.sin(t) - points = np.array([x, y]).T.reshape(-1, 1, 2) - segments = np.concatenate([points[:-1], points[1:]], axis=1) - - lc = LineCollection(segments, cmap=plt.get_cmap('copper'), - norm=plt.Normalize(0, 10)) - lc.set_array(t) - lc.set_linewidth(3) - - fig2 = plt.figure() - plt.gca().add_collection(lc) - plt.xlim(-1, 1) - plt.ylim(-1, 1) - plt.show() - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/pylab_examples/multiline.txt b/dev/_sources/examples/pylab_examples/multiline.txt deleted file mode 100644 index 91496db2804..00000000000 --- a/dev/_sources/examples/pylab_examples/multiline.txt +++ /dev/null @@ -1,60 +0,0 @@ -.. _pylab_examples-multiline: - -pylab_examples example code: multiline.py -========================================= - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/pylab_examples/multiline.py - -:: - - #!/usr/bin/env python - from pylab import * - #from matplotlib.pyplot import * - #from numpy import arange - - if 1: - figure(figsize=(7, 4)) - ax = subplot(121) - ax.set_aspect(1) - plot(arange(10)) - xlabel('this is a xlabel\n(with newlines!)') - ylabel('this is vertical\ntest', multialignment='center') - #ylabel('this is another!') - text(2, 7,'this is\nyet another test', - rotation=45, - horizontalalignment = 'center', - verticalalignment = 'top', - multialignment = 'center') - - grid(True) - - - - subplot(122) - - text(0.29, 0.7, "Mat\nTTp\n123", size=18, - va="baseline", ha="right", multialignment="left", - bbox=dict(fc="none")) - - text(0.34, 0.7, "Mag\nTTT\n123", size=18, - va="baseline", ha="left", multialignment="left", - bbox=dict(fc="none")) - - text(0.95, 0.7, "Mag\nTTT$^{A^A}$\n123", size=18, - va="baseline", ha="right", multialignment="left", - bbox=dict(fc="none")) - - xticks([0.2, 0.4, 0.6, 0.8, 1.], - ["Jan\n2009","Feb\n2009","Mar\n2009", "Apr\n2009", "May\n2009"]) - - axhline(0.7) - title("test line spacing for multiline text") - - subplots_adjust(bottom=0.25, top=0.8) - draw() - show() - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/pylab_examples/multipage_pdf.txt b/dev/_sources/examples/pylab_examples/multipage_pdf.txt deleted file mode 100644 index a68ae9bf3c8..00000000000 --- a/dev/_sources/examples/pylab_examples/multipage_pdf.txt +++ /dev/null @@ -1,57 +0,0 @@ -.. _pylab_examples-multipage_pdf: - -pylab_examples example code: multipage_pdf.py -============================================= - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/pylab_examples/multipage_pdf.py - -:: - - # This is a demo of creating a pdf file with several pages. - - import datetime - import numpy as np - import matplotlib - from matplotlib.backends.backend_pdf import PdfPages - from pylab import * - - # Create the PdfPages object to which we will save the pages: - pdf = PdfPages('multipage_pdf.pdf') - - figure(figsize=(3,3)) - plot(range(7), [3,1,4,1,5,9,2], 'r-o') - title('Page One') - savefig(pdf, format='pdf') # note the format='pdf' argument! - close() - - rc('text', usetex=True) - figure(figsize=(8,6)) - x = np.arange(0,5,0.1) - plot(x, np.sin(x), 'b-') - title('Page Two') - pdf.savefig() # here's another way - or you could do pdf.savefig(1) - close() - - rc('text', usetex=False) - fig=figure(figsize=(4,5)) - plot(x, x*x, 'ko') - title('Page Three') - pdf.savefig(fig) # or you can pass a Figure object to pdf.savefig - close() - - # We can also set the file's metadata via the PdfPages object: - d = pdf.infodict() - d['Title'] = 'Multipage PDF Example' - d['Author'] = u'Jouni K. Sepp\xe4nen' - d['Subject'] = 'How to create a multipage pdf file and set its metadata' - d['Keywords'] = 'PdfPages multipage keywords author title subject' - d['CreationDate'] = datetime.datetime(2009,11,13) - d['ModDate'] = datetime.datetime.today() - - # Remember to close the object - otherwise the file will not be usable - pdf.close() - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/pylab_examples/multiple_figs_demo.txt b/dev/_sources/examples/pylab_examples/multiple_figs_demo.txt deleted file mode 100644 index 7d7f8b05edf..00000000000 --- a/dev/_sources/examples/pylab_examples/multiple_figs_demo.txt +++ /dev/null @@ -1,43 +0,0 @@ -.. _pylab_examples-multiple_figs_demo: - -pylab_examples example code: multiple_figs_demo.py -================================================== - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/pylab_examples/multiple_figs_demo.py - -:: - - #!/usr/bin/env python - # Working with multiple figure windows and subplots - from pylab import * - - t = arange(0.0, 2.0, 0.01) - s1 = sin(2*pi*t) - s2 = sin(4*pi*t) - - figure(1) - subplot(211) - plot(t,s1) - subplot(212) - plot(t,2*s1) - - figure(2) - plot(t,s2) - - # now switch back to figure 1 and make some changes - figure(1) - subplot(211) - plot(t,s2, 'gs') - setp(gca(), 'xticklabels', []) - - figure(1) - savefig('fig1') - figure(2) - savefig('fig2') - - show() - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/pylab_examples/multiple_yaxis_with_spines.txt b/dev/_sources/examples/pylab_examples/multiple_yaxis_with_spines.txt deleted file mode 100644 index 350781f8b13..00000000000 --- a/dev/_sources/examples/pylab_examples/multiple_yaxis_with_spines.txt +++ /dev/null @@ -1,68 +0,0 @@ -.. _pylab_examples-multiple_yaxis_with_spines: - -pylab_examples example code: multiple_yaxis_with_spines.py -========================================================== - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/pylab_examples/multiple_yaxis_with_spines.py - -:: - - import matplotlib.pyplot as plt - - def make_patch_spines_invisible(ax): - ax.set_frame_on(True) - ax.patch.set_visible(False) - for sp in ax.spines.itervalues(): - sp.set_visible(False) - - fig = plt.figure() - fig.subplots_adjust(right=0.75) - - host = fig.add_subplot(111) - par1 = host.twinx() - par2 = host.twinx() - - # Offset the right spine of par2. The ticks and label have already been - # placed on the right by twinx above. - par2.spines["right"].set_position(("axes", 1.2)) - # Having been created by twinx, par2 has its frame off, so the line of its - # detached spine is invisible. First, activate the frame but make the patch - # and spines invisible. - make_patch_spines_invisible(par2) - # Second, show the right spine. - par2.spines["right"].set_visible(True) - - p1, = host.plot([0, 1, 2], [0, 1, 2], "b-", label="Density") - p2, = par1.plot([0, 1, 2], [0, 3, 2], "r-", label="Temperature") - p3, = par2.plot([0, 1, 2], [50, 30, 15], "g-", label="Velocity") - - host.set_xlim(0, 2) - host.set_ylim(0, 2) - par1.set_ylim(0, 4) - par2.set_ylim(1, 65) - - host.set_xlabel("Distance") - host.set_ylabel("Density") - par1.set_ylabel("Temperature") - par2.set_ylabel("Velocity") - - host.yaxis.label.set_color(p1.get_color()) - par1.yaxis.label.set_color(p2.get_color()) - par2.yaxis.label.set_color(p3.get_color()) - - tkw = dict(size=4, width=1.5) - host.tick_params(axis='y', colors=p1.get_color(), **tkw) - par1.tick_params(axis='y', colors=p2.get_color(), **tkw) - par2.tick_params(axis='y', colors=p3.get_color(), **tkw) - host.tick_params(axis='x', **tkw) - - lines = [p1, p2, p3] - - host.legend(lines, [l.get_label() for l in lines]) - - plt.show() - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/pylab_examples/nan_test.txt b/dev/_sources/examples/pylab_examples/nan_test.txt deleted file mode 100644 index 8e7dbbd99a7..00000000000 --- a/dev/_sources/examples/pylab_examples/nan_test.txt +++ /dev/null @@ -1,45 +0,0 @@ -.. _pylab_examples-nan_test: - -pylab_examples example code: nan_test.py -======================================== - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/pylab_examples/nan_test.py - -:: - - #!/usr/bin/env python - """ - Example: simple line plots with NaNs inserted. - """ - from pylab import * - import numpy as np - - t = arange(0.0, 1.0+0.01, 0.01) - s = cos(2*2*pi*t) - t[41:60] = NaN - #t[50:60] = np.inf - - subplot(2,1,1) - plot(t, s, '-', lw=2) - - xlabel('time (s)') - ylabel('voltage (mV)') - title('A sine wave with a gap of NaNs between 0.4 and 0.6') - grid(True) - - subplot(2,1,2) - t[0] = NaN - t[-1] = NaN - plot(t, s, '-', lw=2) - title('Also with NaN in first and last point') - - xlabel('time (s)') - ylabel('more nans') - grid(True) - - show() - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/pylab_examples/newscalarformatter_demo.txt b/dev/_sources/examples/pylab_examples/newscalarformatter_demo.txt deleted file mode 100644 index 7a021b20d30..00000000000 --- a/dev/_sources/examples/pylab_examples/newscalarformatter_demo.txt +++ /dev/null @@ -1,102 +0,0 @@ -.. _pylab_examples-newscalarformatter_demo: - -pylab_examples example code: newscalarformatter_demo.py -======================================================= - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/pylab_examples/newscalarformatter_demo.py - -:: - - #!/usr/bin/env python - # Demonstrating the improvements and options of the proposed new ScalarFormatter - from pylab import * - from matplotlib.ticker import OldScalarFormatter - - x=frange(0,1,.01) - f=figure(figsize=(6,6)) - f.text(0.5,0.975,'The old formatter',horizontalalignment='center',verticalalignment='top') - subplot(221) - plot(x*1e5+1e10,x*1e-10+1e-5) - gca().xaxis.set_major_formatter(OldScalarFormatter()) - gca().yaxis.set_major_formatter(OldScalarFormatter()) - subplot(222) - plot(x*1e5,x*1e-4) - gca().xaxis.set_major_formatter(OldScalarFormatter()) - gca().yaxis.set_major_formatter(OldScalarFormatter()) - subplot(223) - plot(-x*1e5-1e10,-x*1e-5-1e-10) - gca().xaxis.set_major_formatter(OldScalarFormatter()) - gca().yaxis.set_major_formatter(OldScalarFormatter()) - subplot(224) - plot(-x*1e5,-x*1e-4) - gca().xaxis.set_major_formatter(OldScalarFormatter()) - gca().yaxis.set_major_formatter(OldScalarFormatter()) - - x=frange(0,1,.01) - f=figure(figsize=(6,6)) - f.text(0.5,0.975,'The new formatter, default settings',horizontalalignment='center', - verticalalignment='top') - subplot(221) - plot(x*1e5+1e10,x*1e-10+1e-5) - gca().xaxis.set_major_formatter(ScalarFormatter()) - gca().yaxis.set_major_formatter(ScalarFormatter()) - subplot(222) - plot(x*1e5,x*1e-4) - gca().xaxis.set_major_formatter(ScalarFormatter()) - gca().yaxis.set_major_formatter(ScalarFormatter()) - subplot(223) - plot(-x*1e5-1e10,-x*1e-5-1e-10) - gca().xaxis.set_major_formatter(ScalarFormatter()) - gca().yaxis.set_major_formatter(ScalarFormatter()) - subplot(224) - plot(-x*1e5,-x*1e-4) - gca().xaxis.set_major_formatter(ScalarFormatter()) - gca().yaxis.set_major_formatter(ScalarFormatter()) - - x=frange(0,1,.01) - f=figure(figsize=(6,6)) - f.text(0.5,0.975,'The new formatter, no numerical offset',horizontalalignment='center', - verticalalignment='top') - subplot(221) - plot(x*1e5+1e10,x*1e-10+1e-5) - gca().xaxis.set_major_formatter(ScalarFormatter(useOffset=False)) - gca().yaxis.set_major_formatter(ScalarFormatter(useOffset=False)) - subplot(222) - plot(x*1e5,x*1e-4) - gca().xaxis.set_major_formatter(ScalarFormatter(useOffset=False)) - gca().yaxis.set_major_formatter(ScalarFormatter(useOffset=False)) - subplot(223) - plot(-x*1e5-1e10,-x*1e-5-1e-10) - gca().xaxis.set_major_formatter(ScalarFormatter(useOffset=False)) - gca().yaxis.set_major_formatter(ScalarFormatter(useOffset=False)) - subplot(224) - plot(-x*1e5,-x*1e-4) - gca().xaxis.set_major_formatter(ScalarFormatter(useOffset=False)) - gca().yaxis.set_major_formatter(ScalarFormatter(useOffset=False)) - - x=frange(0,1,.01) - f=figure(figsize=(6,6)) - f.text(0.5,0.975,'The new formatter, with mathtext',horizontalalignment='center', - verticalalignment='top') - subplot(221) - plot(x*1e5+1e10,x*1e-10+1e-5) - gca().xaxis.set_major_formatter(ScalarFormatter(useMathText=True)) - gca().yaxis.set_major_formatter(ScalarFormatter(useMathText=True)) - subplot(222) - plot(x*1e5,x*1e-4) - gca().xaxis.set_major_formatter(ScalarFormatter(useMathText=True)) - gca().yaxis.set_major_formatter(ScalarFormatter(useMathText=True)) - subplot(223) - plot(-x*1e5-1e10,-x*1e-5-1e-10) - gca().xaxis.set_major_formatter(ScalarFormatter(useMathText=True)) - gca().yaxis.set_major_formatter(ScalarFormatter(useMathText=True)) - subplot(224) - plot(-x*1e5,-x*1e-4) - gca().xaxis.set_major_formatter(ScalarFormatter(useMathText=True)) - gca().yaxis.set_major_formatter(ScalarFormatter(useMathText=True)) - show() - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/pylab_examples/patheffect_demo.txt b/dev/_sources/examples/pylab_examples/patheffect_demo.txt deleted file mode 100644 index 57c4b5d150c..00000000000 --- a/dev/_sources/examples/pylab_examples/patheffect_demo.txt +++ /dev/null @@ -1,51 +0,0 @@ -.. _pylab_examples-patheffect_demo: - -pylab_examples example code: patheffect_demo.py -=============================================== - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/pylab_examples/patheffect_demo.py - -:: - - import matplotlib.pyplot as plt - import matplotlib.patheffects as PathEffects - import numpy as np - - if 1: - plt.figure(1, figsize=(8,3)) - ax1 = plt.subplot(131) - ax1.imshow([[1,2],[2,3]]) - txt = ax1.annotate("test", (1., 1.), (0., 0), - arrowprops=dict(arrowstyle="->", - connectionstyle="angle3", lw=2), - size=20, ha="center") - - txt.set_path_effects([PathEffects.withStroke(linewidth=3, - foreground="w")]) - txt.arrow_patch.set_path_effects([PathEffects.Stroke(linewidth=5, - foreground="w"), - PathEffects.Normal()]) - - ax2 = plt.subplot(132) - arr = np.arange(25).reshape((5,5)) - ax2.imshow(arr) - cntr = ax2.contour(arr, colors="k") - clbls = ax2.clabel(cntr, fmt="%2.0f", use_clabeltext=True) - plt.setp(clbls, - path_effects=[PathEffects.withStroke(linewidth=3, - foreground="w")]) - - - # shadow as a path effect - ax3 = plt.subplot(133) - p1, = ax3.plot([0, 1], [0, 1]) - leg = ax3.legend([p1], ["Line 1"], fancybox=True, loc=2) - leg.legendPatch.set_path_effects([PathEffects.withSimplePatchShadow()]) - - plt.show() - - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/pylab_examples/pcolor_demo.txt b/dev/_sources/examples/pylab_examples/pcolor_demo.txt deleted file mode 100644 index 86bfcfb45ce..00000000000 --- a/dev/_sources/examples/pylab_examples/pcolor_demo.txt +++ /dev/null @@ -1,70 +0,0 @@ -.. _pylab_examples-pcolor_demo: - -pylab_examples example code: pcolor_demo.py -=========================================== - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/pylab_examples/pcolor_demo.py - -:: - - """ - Demonstrates similarities between pcolor, pcolormesh, imshow and pcolorfast - for drawing quadrilateral grids. - - """ - import matplotlib.pyplot as plt - import numpy as np - - # make these smaller to increase the resolution - dx, dy = 0.15, 0.05 - - # generate 2 2d grids for the x & y bounds - y, x = np.mgrid[slice(-3, 3 + dy, dy), - slice(-3, 3 + dx, dx)] - z = (1 - x / 2. + x ** 5 + y ** 3) * np.exp(-x ** 2 - y ** 2) - # x and y are bounds, so z should be the value *inside* those bounds. - # Therefore, remove the last value from the z array. - z = z[:-1, :-1] - z_min, z_max = -np.abs(z).max(), np.abs(z).max() - - - - plt.subplot(2, 2, 1) - plt.pcolor(x, y, z, cmap='RdBu', vmin=z_min, vmax=z_max) - plt.title('pcolor') - # set the limits of the plot to the limits of the data - plt.axis([x.min(), x.max(), y.min(), y.max()]) - plt.colorbar() - - - - plt.subplot(2, 2, 2) - plt.pcolormesh(x, y, z, cmap='RdBu', vmin=z_min, vmax=z_max) - plt.title('pcolormesh') - # set the limits of the plot to the limits of the data - plt.axis([x.min(), x.max(), y.min(), y.max()]) - plt.colorbar() - - - - plt.subplot(2, 2, 3) - plt.imshow(z, cmap='RdBu', vmin=z_min, vmax=z_max, - extent=[x.min(), x.max(), y.min(), y.max()], - interpolation='nearest', origin='lower') - plt.title('image (interp. nearest)') - plt.colorbar() - - - - ax = plt.subplot(2, 2, 4) - ax.pcolorfast(x, y, z, cmap='RdBu', vmin=z_min, vmax=z_max) - plt.title('pcolorfast') - plt.colorbar() - - - - plt.show() - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/pylab_examples/pcolor_demo2.txt b/dev/_sources/examples/pylab_examples/pcolor_demo2.txt deleted file mode 100644 index e159dd5f093..00000000000 --- a/dev/_sources/examples/pylab_examples/pcolor_demo2.txt +++ /dev/null @@ -1,45 +0,0 @@ -.. _pylab_examples-pcolor_demo2: - -pylab_examples example code: pcolor_demo2.py -============================================ - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/pylab_examples/pcolor_demo2.py - -:: - - #!/usr/bin/env python - """ - See pcolor_demo2 for a much faster way of generating pcolor plots - """ - from __future__ import division - from pylab import * - - def func3(x,y): - return (1- x/2 + x**5 + y**3)*exp(-x**2-y**2) - - - # make these smaller to increase the resolution - dx, dy = 0.05, 0.05 - - x = arange(-3.0, 3.0, dx) - y = arange(-3.0, 3.0, dy) - X,Y = meshgrid(x, y) - - Z = func3(X, Y) - - - ax = subplot(111) - im = imshow(Z, cmap=cm.RdBu, vmax=abs(Z).max(), vmin=-abs(Z).max()) - #im.set_interpolation('nearest') - #im.set_interpolation('bicubic') - im.set_interpolation('bilinear') - #ax.set_image_extent(-3, 3, -3, 3) - - show() - - - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/pylab_examples/pcolor_log.txt b/dev/_sources/examples/pylab_examples/pcolor_log.txt deleted file mode 100644 index 8c081d3060d..00000000000 --- a/dev/_sources/examples/pylab_examples/pcolor_log.txt +++ /dev/null @@ -1,39 +0,0 @@ -.. _pylab_examples-pcolor_log: - -pylab_examples example code: pcolor_log.py -========================================== - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/pylab_examples/pcolor_log.py - -:: - - import matplotlib.pyplot as plt - from matplotlib.colors import LogNorm - import numpy as np - from matplotlib.mlab import bivariate_normal - - - N = 100 - X, Y = np.mgrid[-3:3:complex(0, N), -2:2:complex(0, N)] - - # A low hump with a spike coming out of the top right. - # Needs to have z/colour axis on a log scale so we see both hump and spike. - # linear scale only shows the spike. - Z1 = bivariate_normal(X, Y, 0.1, 0.2, 1.0, 1.0) + 0.1 * bivariate_normal(X, Y, 1.0, 1.0, 0.0, 0.0) - - plt.subplot(2,1,1) - plt.pcolor(X, Y, Z1, norm=LogNorm(vmin=Z1.min(), vmax=Z1.max()), cmap='PuBu_r') - plt.colorbar() - - plt.subplot(2,1,2) - plt.pcolor(X, Y, Z1, cmap='PuBu_r') - plt.colorbar() - - - plt.show() - - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/pylab_examples/pcolor_small.txt b/dev/_sources/examples/pylab_examples/pcolor_small.txt deleted file mode 100644 index 76280a2630f..00000000000 --- a/dev/_sources/examples/pylab_examples/pcolor_small.txt +++ /dev/null @@ -1,28 +0,0 @@ -.. _pylab_examples-pcolor_small: - -pylab_examples example code: pcolor_small.py -============================================ - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/pylab_examples/pcolor_small.py - -:: - - import matplotlib.pyplot as plt - from numpy.random import rand - - Z = rand(6,10) - - plt.subplot(2,1,1) - c = plt.pcolor(Z) - plt.title('default: no edges') - - plt.subplot(2,1,2) - c = plt.pcolor(Z, edgecolors='k', linewidths=4) - plt.title('thick edges') - - plt.show() - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/pylab_examples/pie_demo.txt b/dev/_sources/examples/pylab_examples/pie_demo.txt deleted file mode 100644 index 95085723332..00000000000 --- a/dev/_sources/examples/pylab_examples/pie_demo.txt +++ /dev/null @@ -1,44 +0,0 @@ -.. _pylab_examples-pie_demo: - -pylab_examples example code: pie_demo.py -======================================== - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/pylab_examples/pie_demo.py - -:: - - """ - Make a pie chart - see - http://matplotlib.sf.net/matplotlib.pylab.html#-pie for the docstring. - - This example shows a basic pie chart with labels optional features, - like autolabeling the percentage, offsetting a slice with "explode", - adding a shadow, and changing the starting angle. - - """ - from pylab import * - - # make a square figure and axes - figure(1, figsize=(6,6)) - ax = axes([0.1, 0.1, 0.8, 0.8]) - - # The slices will be ordered and plotted counter-clockwise. - labels = 'Frogs', 'Hogs', 'Dogs', 'Logs' - fracs = [15, 30, 45, 10] - explode=(0, 0.05, 0, 0) - - pie(fracs, explode=explode, labels=labels, - autopct='%1.1f%%', shadow=True, startangle=90) - # The default startangle is 0, which would start - # the Frogs slice on the x-axis. With startangle=90, - # everything is rotated counter-clockwise by 90 degrees, - # so the plotting starts on the positive y-axis. - - title('Raining Hogs and Dogs', bbox={'facecolor':'0.8', 'pad':5}) - - show() - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/pylab_examples/pie_demo2.txt b/dev/_sources/examples/pylab_examples/pie_demo2.txt deleted file mode 100644 index 4799e05fae4..00000000000 --- a/dev/_sources/examples/pylab_examples/pie_demo2.txt +++ /dev/null @@ -1,72 +0,0 @@ -.. _pylab_examples-pie_demo2: - -pylab_examples example code: pie_demo2.py -========================================= - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/pylab_examples/pie_demo2.py - -:: - - """ - Make a pie charts of varying size - see - http://matplotlib.org/api/pyplot_api.html#matplotlib.pyplot.pie for the docstring. - - This example shows a basic pie charts with labels optional features, - like autolabeling the percentage, offsetting a slice with "explode" - and adding a shadow, in different sizes. - - """ - import matplotlib.pyplot as plt - from matplotlib.gridspec import GridSpec - - # Some data - - labels = 'Frogs', 'Hogs', 'Dogs', 'Logs' - fracs = [15, 30, 45, 10] - - explode=(0, 0.05, 0, 0) - - # Make square figures and axes - - the_grid = GridSpec(2, 2) - - plt.subplot(the_grid[0, 0], aspect=1) - - plt.pie(fracs, labels=labels, autopct='%1.1f%%', shadow=True) - - plt.subplot(the_grid[0, 1], aspect=1) - - plt.pie(fracs, explode=explode, labels=labels, autopct='%.0f%%', shadow=True) - - plt.subplot(the_grid[1, 0], aspect=1) - - patches, texts, autotexts = plt.pie(fracs, labels=labels, - autopct='%.0f%%', - shadow=True, radius=0.5) - - # Make the labels on the small plot easier to read. - for t in texts: - t.set_size('smaller') - for t in autotexts: - t.set_size('x-small') - autotexts[0].set_color('y') - - plt.subplot(the_grid[1, 1], aspect=1) - - patches, texts, autotexts = plt.pie(fracs, explode=explode, - labels=labels, autopct='%.0f%%', - shadow=False, radius=0.5) - # Turn off shadow for tiny plot - # with exploded slice. - for t in texts: - t.set_size('smaller') - for t in autotexts: - t.set_size('x-small') - autotexts[0].set_color('y') - - plt.show() - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/pylab_examples/plotfile_demo.txt b/dev/_sources/examples/pylab_examples/plotfile_demo.txt deleted file mode 100644 index 7f3fcba965a..00000000000 --- a/dev/_sources/examples/pylab_examples/plotfile_demo.txt +++ /dev/null @@ -1,51 +0,0 @@ -.. _pylab_examples-plotfile_demo: - -pylab_examples example code: plotfile_demo.py -============================================= - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/pylab_examples/plotfile_demo.py - -:: - - from pylab import plotfile, show, gca - import matplotlib.cbook as cbook - - fname = cbook.get_sample_data('msft.csv', asfileobj=False) - fname2 = cbook.get_sample_data('data_x_x2_x3.csv', asfileobj=False) - - # test 1; use ints - plotfile(fname, (0,5,6)) - - # test 2; use names - plotfile(fname, ('date', 'volume', 'adj_close')) - - # test 3; use semilogy for volume - plotfile(fname, ('date', 'volume', 'adj_close'), plotfuncs={'volume': 'semilogy'}) - - # test 4; use semilogy for volume - plotfile(fname, (0,5,6), plotfuncs={5:'semilogy'}) - - #test 5; single subplot - plotfile(fname, ('date', 'open', 'high', 'low', 'close'), subplots=False) - - # test 6; labeling, if no names in csv-file - plotfile(fname2, cols=(0,1,2), delimiter=' ', - names=['$x$', '$f(x)=x^2$', '$f(x)=x^3$']) - - # test 7; more than one file per figure--illustrated here with a single file - plotfile(fname2, cols=(0, 1), delimiter=' ') - plotfile(fname2, cols=(0, 2), newfig=False, delimiter=' ') # use current figure - gca().set_xlabel(r'$x$') - gca().set_ylabel(r'$f(x) = x^2, x^3$') - - # test 8; use bar for volume - plotfile(fname, (0,5,6), plotfuncs={5:'bar'}) - - show() - - - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/pylab_examples/polar_bar.txt b/dev/_sources/examples/pylab_examples/polar_bar.txt deleted file mode 100644 index 7af03e4bd94..00000000000 --- a/dev/_sources/examples/pylab_examples/polar_bar.txt +++ /dev/null @@ -1,35 +0,0 @@ -.. _pylab_examples-polar_bar: - -pylab_examples example code: polar_bar.py -========================================= - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/pylab_examples/polar_bar.py - -:: - - #!/usr/bin/env python - - import numpy as np - import matplotlib.cm as cm - from matplotlib.pyplot import figure, show, rc - - - # force square figure and square axes looks better for polar, IMO - fig = figure(figsize=(8,8)) - ax = fig.add_axes([0.1, 0.1, 0.8, 0.8], polar=True) - - N = 20 - theta = np.arange(0.0, 2*np.pi, 2*np.pi/N) - radii = 10*np.random.rand(N) - width = np.pi/4*np.random.rand(N) - 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.5) - - show() - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/pylab_examples/polar_demo.txt b/dev/_sources/examples/pylab_examples/polar_demo.txt deleted file mode 100644 index 58375aa4e28..00000000000 --- a/dev/_sources/examples/pylab_examples/polar_demo.txt +++ /dev/null @@ -1,31 +0,0 @@ -.. _pylab_examples-polar_demo: - -pylab_examples example code: polar_demo.py -========================================== - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/pylab_examples/polar_demo.py - -:: - - """ - Demo of a line plot on a polar axis. - """ - import numpy as np - import matplotlib.pyplot as plt - - - r = np.arange(0, 3.0, 0.01) - theta = 2 * np.pi * r - - ax = plt.subplot(111, polar=True) - ax.plot(theta, r, color='r', linewidth=3) - ax.set_rmax(2.0) - ax.grid(True) - - ax.set_title("A line plot on a polar axis", va='bottom') - plt.show() - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/pylab_examples/polar_legend.txt b/dev/_sources/examples/pylab_examples/polar_legend.txt deleted file mode 100644 index 04a7617fc6a..00000000000 --- a/dev/_sources/examples/pylab_examples/polar_legend.txt +++ /dev/null @@ -1,35 +0,0 @@ -.. _pylab_examples-polar_legend: - -pylab_examples example code: polar_legend.py -============================================ - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/pylab_examples/polar_legend.py - -:: - - #!/usr/bin/env python - - import numpy as np - from matplotlib.pyplot import figure, show, rc - - # radar green, solid grid lines - rc('grid', color='#316931', linewidth=1, linestyle='-') - rc('xtick', labelsize=15) - rc('ytick', labelsize=15) - - # force square figure and square axes looks better for polar, IMO - fig = figure(figsize=(8,8)) - ax = fig.add_axes([0.1, 0.1, 0.8, 0.8], polar=True, axisbg='#d5de9c') - - r = np.arange(0, 3.0, 0.01) - theta = 2*np.pi*r - ax.plot(theta, r, color='#ee8d18', lw=3, label='a line') - ax.plot(0.5*theta, r, color='blue', ls='--', lw=3, label='another line') - ax.legend() - - show() - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/pylab_examples/polar_scatter.txt b/dev/_sources/examples/pylab_examples/polar_scatter.txt deleted file mode 100644 index f2af4ddd7f1..00000000000 --- a/dev/_sources/examples/pylab_examples/polar_scatter.txt +++ /dev/null @@ -1,31 +0,0 @@ -.. _pylab_examples-polar_scatter: - -pylab_examples example code: polar_scatter.py -============================================= - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/pylab_examples/polar_scatter.py - -:: - - #!/usr/bin/env python - # a polar scatter plot; size increases radially in this example and - # color increases with angle (just to verify the symbols are being - # scattered correctly). In a real example, this would be wasting - # dimensionality of the plot - from pylab import * - - N = 150 - r = 2*rand(N) - theta = 2*pi*rand(N) - area = 200*r**2*rand(N) - colors = theta - ax = subplot(111, polar=True) - c = scatter(theta, r, c=colors, s=area, cmap=cm.hsv) - c.set_alpha(0.75) - - show() - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/pylab_examples/poormans_contour.txt b/dev/_sources/examples/pylab_examples/poormans_contour.txt deleted file mode 100644 index f27024b53c9..00000000000 --- a/dev/_sources/examples/pylab_examples/poormans_contour.txt +++ /dev/null @@ -1,43 +0,0 @@ -.. _pylab_examples-poormans_contour: - -pylab_examples example code: poormans_contour.py -================================================ - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/pylab_examples/poormans_contour.py - -:: - - #!/usr/bin/env python - """ - Use a pcolor or imshow with a custom colormap to make a contour plot. - - Since this example was initially written, a proper contour routine was - added to matplotlib - see contour_demo.py and - http://matplotlib.sf.net/matplotlib.pylab.html#-contour. - """ - - from pylab import * - - - delta = 0.01 - x = arange(-3.0, 3.0, delta) - y = arange(-3.0, 3.0, delta) - X,Y = meshgrid(x, y) - Z1 = bivariate_normal(X, Y, 1.0, 1.0, 0.0, 0.0) - Z2 = bivariate_normal(X, Y, 1.5, 0.5, 1, 1) - Z = Z2 - Z1 # difference of Gaussians - - cmap = cm.get_cmap('PiYG', 11) # 11 discrete colors - - im = imshow(Z, cmap=cmap, interpolation='bilinear', - vmax=abs(Z).max(), vmin=-abs(Z).max()) - axis('off') - colorbar() - - show() - - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/pylab_examples/print_stdout.txt b/dev/_sources/examples/pylab_examples/print_stdout.txt deleted file mode 100644 index 670b3d79bf2..00000000000 --- a/dev/_sources/examples/pylab_examples/print_stdout.txt +++ /dev/null @@ -1,25 +0,0 @@ -.. _pylab_examples-print_stdout: - -pylab_examples example code: print_stdout.py -============================================ - -[`source code `_] - -:: - - #!/usr/bin/env python - # -*- noplot -*- - # print png to standard out - # usage: python print_stdout.py > somefile.png - import sys - import matplotlib - matplotlib.use('Agg') - from pylab import * - - plot([1,2,3]) - - savefig(sys.stdout) - show() - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/pylab_examples/psd_demo.txt b/dev/_sources/examples/pylab_examples/psd_demo.txt deleted file mode 100644 index 2ec3f66d28f..00000000000 --- a/dev/_sources/examples/pylab_examples/psd_demo.txt +++ /dev/null @@ -1,50 +0,0 @@ -.. _pylab_examples-psd_demo: - -pylab_examples example code: psd_demo.py -======================================== - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/pylab_examples/psd_demo.py - -:: - - #!/usr/bin/env python - # python - - from pylab import * - - dt = 0.01 - t = arange(0,10,dt) - nse = randn(len(t)) - r = exp(-t/0.05) - - cnse = convolve(nse, r)*dt - cnse = cnse[:len(t)] - s = 0.1*sin(2*pi*t) + cnse - - subplot(211) - plot(t,s) - subplot(212) - psd(s, 512, 1/dt) - - show() - """ - % compare with MATLAB - dt = 0.01; - t = [0:dt:10]; - nse = randn(size(t)); - r = exp(-t/0.05); - cnse = conv(nse, r)*dt; - cnse = cnse(1:length(t)); - s = 0.1*sin(2*pi*t) + cnse; - - subplot(211) - plot(t,s) - subplot(212) - psd(s, 512, 1/dt) - - """ - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/pylab_examples/psd_demo2.txt b/dev/_sources/examples/pylab_examples/psd_demo2.txt deleted file mode 100644 index e04366ddf10..00000000000 --- a/dev/_sources/examples/pylab_examples/psd_demo2.txt +++ /dev/null @@ -1,56 +0,0 @@ -.. _pylab_examples-psd_demo2: - -pylab_examples example code: psd_demo2.py -========================================= - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/pylab_examples/psd_demo2.py - -:: - - #This example shows the effects of some of the different PSD parameters - import numpy as np - import matplotlib.pyplot as plt - - dt = np.pi / 100. - fs = 1. / dt - t = np.arange(0, 8, dt) - y = 10. * np.sin(2 * np.pi * 4 * t) + 5. * np.sin(2 * np.pi * 4.25 * t) - y = y + np.random.randn(*t.shape) - - #Plot the raw time series - fig = plt.figure() - fig.subplots_adjust(hspace=0.45, wspace=0.3) - ax = fig.add_subplot(2, 1, 1) - ax.plot(t, y) - - #Plot the PSD with different amounts of zero padding. This uses the entire - #time series at once - ax2 = fig.add_subplot(2, 3, 4) - ax2.psd(y, NFFT=len(t), pad_to=len(t), Fs=fs) - ax2.psd(y, NFFT=len(t), pad_to=len(t)*2, Fs=fs) - ax2.psd(y, NFFT=len(t), pad_to=len(t)*4, Fs=fs) - plt.title('zero padding') - - #Plot the PSD with different block sizes, Zero pad to the length of the original - #data sequence. - ax3 = fig.add_subplot(2, 3, 5, sharex=ax2, sharey=ax2) - ax3.psd(y, NFFT=len(t), pad_to=len(t), Fs=fs) - ax3.psd(y, NFFT=len(t)//2, pad_to=len(t), Fs=fs) - ax3.psd(y, NFFT=len(t)//4, pad_to=len(t), Fs=fs) - ax3.set_ylabel('') - plt.title('block size') - - #Plot the PSD with different amounts of overlap between blocks - ax4 = fig.add_subplot(2, 3, 6, sharex=ax2, sharey=ax2) - ax4.psd(y, NFFT=len(t)//2, pad_to=len(t), noverlap=0, Fs=fs) - ax4.psd(y, NFFT=len(t)//2, pad_to=len(t), noverlap=int(0.05*len(t)/2.), Fs=fs) - ax4.psd(y, NFFT=len(t)//2, pad_to=len(t), noverlap=int(0.2*len(t)/2.), Fs=fs) - ax4.set_ylabel('') - plt.title('overlap') - - plt.show() - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/pylab_examples/psd_demo3.txt b/dev/_sources/examples/pylab_examples/psd_demo3.txt deleted file mode 100644 index 53c0497f8af..00000000000 --- a/dev/_sources/examples/pylab_examples/psd_demo3.txt +++ /dev/null @@ -1,50 +0,0 @@ -.. _pylab_examples-psd_demo3: - -pylab_examples example code: psd_demo3.py -========================================= - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/pylab_examples/psd_demo3.py - -:: - - #This is a ported version of a MATLAB example from the signal processing - #toolbox that showed some difference at one time between Matplotlib's and - #MATLAB's scaling of the PSD. - - import numpy as np - import matplotlib.pyplot as plt - import matplotlib.mlab as mlab - - fs = 1000 - t = np.linspace(0, 0.3, 301) - A = np.array([2, 8]).reshape(-1, 1) - f = np.array([150, 140]).reshape(-1, 1) - xn = (A * np.sin(2 * np.pi * f * t)).sum(axis=0) + 5 * np.random.randn(*t.shape) - - yticks = np.arange(-50, 30, 10) - xticks = np.arange(0,550,100) - plt.subplots_adjust(hspace=0.45, wspace=0.3) - plt.subplot(1,2,1) - - plt.psd(xn, NFFT=301, Fs=fs, window=mlab.window_none, pad_to=1024, - scale_by_freq=True) - plt.title('Periodogram') - plt.yticks(yticks) - plt.xticks(xticks) - plt.grid(True) - - plt.subplot(1,2,2) - plt.psd(xn, NFFT=150, Fs=fs, window=mlab.window_none, noverlap=75, pad_to=512, - scale_by_freq=True) - plt.title('Welch') - plt.xticks(xticks) - plt.yticks(yticks) - plt.ylabel('') - 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/dev/_sources/examples/pylab_examples/psd_demo_complex.txt b/dev/_sources/examples/pylab_examples/psd_demo_complex.txt deleted file mode 100644 index 80fa93b3589..00000000000 --- a/dev/_sources/examples/pylab_examples/psd_demo_complex.txt +++ /dev/null @@ -1,52 +0,0 @@ -.. _pylab_examples-psd_demo_complex: - -pylab_examples example code: psd_demo_complex.py -================================================ - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/pylab_examples/psd_demo_complex.py - -:: - - #This is a ported version of a MATLAB example from the signal processing - #toolbox that showed some difference at one time between Matplotlib's and - #MATLAB's scaling of the PSD. This differs from psd_demo3.py in that - #this uses a complex signal, so we can see that complex PSD's work properly - import numpy as np - import matplotlib.pyplot as plt - import matplotlib.mlab as mlab - - fs = 1000 - t = np.linspace(0, 0.3, 301) - A = np.array([2, 8]).reshape(-1, 1) - f = np.array([150, 140]).reshape(-1, 1) - xn = (A * np.exp(2j * np.pi * f * t)).sum(axis=0) + 5 * np.random.randn(*t.shape) - - yticks = np.arange(-50, 30, 10) - xticks = np.arange(-500,550,100) - plt.subplots_adjust(hspace=0.45, wspace=0.3) - ax = plt.subplot(1, 2, 1) - - plt.psd(xn, NFFT=301, Fs=fs, window=mlab.window_none, pad_to=1024, - scale_by_freq=True) - plt.title('Periodogram') - plt.yticks(yticks) - plt.xticks(xticks) - plt.grid(True) - plt.xlim(-500, 500) - - plt.subplot(1, 2, 2, sharex=ax, sharey=ax) - plt.psd(xn, NFFT=150, Fs=fs, window=mlab.window_none, noverlap=75, pad_to=512, - scale_by_freq=True) - plt.title('Welch') - plt.xticks(xticks) - plt.yticks(yticks) - plt.ylabel('') - plt.grid(True) - plt.xlim(-500, 500) - - plt.show() - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/pylab_examples/pstest.txt b/dev/_sources/examples/pylab_examples/pstest.txt deleted file mode 100644 index 9bfa815166a..00000000000 --- a/dev/_sources/examples/pylab_examples/pstest.txt +++ /dev/null @@ -1,42 +0,0 @@ -.. _pylab_examples-pstest: - -pylab_examples example code: pstest.py -====================================== - -[`source code `_] - -:: - - #!/usr/bin/env python - # -*- noplot -*- - import matplotlib - matplotlib.use('PS') - from pylab import * - - def f(t): - s1 = cos(2*pi*t) - e1 = exp(-t) - return multiply(s1,e1) - - t1 = arange(0.0, 5.0, .1) - t2 = arange(0.0, 5.0, 0.02) - t3 = arange(0.0, 2.0, 0.01) - - figure(1) - subplot(211) - l = plot(t1, f(t1), 'k^') - setp(l, markerfacecolor='k', markeredgecolor='r') - title('A tale of 2 subplots', fontsize=14, fontname='Courier') - ylabel('Signal 1', fontsize=12) - subplot(212) - l = plot(t1, f(t1), 'k>') - - - ylabel('Signal 2', fontsize=12) - xlabel('time (s)', fontsize=12) - - show() - - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/pylab_examples/pythonic_matplotlib.txt b/dev/_sources/examples/pylab_examples/pythonic_matplotlib.txt deleted file mode 100644 index cc1ebfed8f9..00000000000 --- a/dev/_sources/examples/pylab_examples/pythonic_matplotlib.txt +++ /dev/null @@ -1,96 +0,0 @@ -.. _pylab_examples-pythonic_matplotlib: - -pylab_examples example code: pythonic_matplotlib.py -=================================================== - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/pylab_examples/pythonic_matplotlib.py - -:: - - #!/usr/bin/env python - """ - Some people prefer to write more pythonic, object oriented, code - rather than use the pylab interface to matplotlib. This example shows - you how. - - Unless you are an application developer, I recommend using part of the - pylab interface, particularly the figure, close, subplot, axes, and - show commands. These hide a lot of complexity from you that you don't - need to see in normal figure creation, like instantiating DPI - instances, managing the bounding boxes of the figure elements, - creating and reaslizing GUI windows and embedding figures in them. - - - If you are an application developer and want to embed matplotlib in - your application, follow the lead of examples/embedding_in_wx.py, - examples/embedding_in_gtk.py or examples/embedding_in_tk.py. In this - case you will want to control the creation of all your figures, - embedding them in application windows, etc. - - If you are a web application developer, you may want to use the - example in webapp_demo.py, which shows how to use the backend agg - figure canvase directly, with none of the globals (current figure, - current axes) that are present in the pylab interface. Note that - there is no reason why the pylab interface won't work for web - application developers, however. - - If you see an example in the examples dir written in pylab interface, - and you want to emulate that using the true python method calls, there - is an easy mapping. Many of those examples use 'set' to control - figure properties. Here's how to map those commands onto instance - methods - - The syntax of set is - - setp(object or sequence, somestring, attribute) - - if called with an object, set calls - - object.set_somestring(attribute) - - if called with a sequence, set does - - for object in sequence: - object.set_somestring(attribute) - - So for your example, if a is your axes object, you can do - - a.set_xticklabels([]) - a.set_yticklabels([]) - a.set_xticks([]) - a.set_yticks([]) - """ - - - from pylab import figure, show - from numpy import arange, sin, pi - - t = arange(0.0, 1.0, 0.01) - - fig = figure(1) - - ax1 = fig.add_subplot(211) - ax1.plot(t, sin(2*pi*t)) - ax1.grid(True) - ax1.set_ylim( (-2,2) ) - ax1.set_ylabel('1 Hz') - ax1.set_title('A sine wave or two') - - for label in ax1.get_xticklabels(): - label.set_color('r') - - - ax2 = fig.add_subplot(212) - ax2.plot(t, sin(2*2*pi*t)) - ax2.grid(True) - ax2.set_ylim( (-2,2) ) - l = ax2.set_xlabel('Hi mom') - l.set_color('g') - l.set_fontsize('large') - - show() - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/pylab_examples/quadmesh_demo.txt b/dev/_sources/examples/pylab_examples/quadmesh_demo.txt deleted file mode 100644 index 423331cf87e..00000000000 --- a/dev/_sources/examples/pylab_examples/quadmesh_demo.txt +++ /dev/null @@ -1,59 +0,0 @@ -.. _pylab_examples-quadmesh_demo: - -pylab_examples example code: quadmesh_demo.py -============================================= - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/pylab_examples/quadmesh_demo.py - -:: - - #!/usr/bin/env python - """ - pcolormesh uses a QuadMesh, a faster generalization of pcolor, but - with some restrictions. - - This demo illustrates a bug in quadmesh with masked data. - """ - - import numpy as np - from matplotlib.pyplot import figure, show, savefig - from matplotlib import cm, colors - from numpy import ma - - n = 12 - x = np.linspace(-1.5,1.5,n) - y = np.linspace(-1.5,1.5,n*2) - X,Y = np.meshgrid(x,y); - Qx = np.cos(Y) - np.cos(X) - Qz = np.sin(Y) + np.sin(X) - Qx = (Qx + 1.1) - Z = np.sqrt(X**2 + Y**2)/5; - Z = (Z - Z.min()) / (Z.max() - Z.min()) - - # The color array can include masked values: - Zm = ma.masked_where(np.fabs(Qz) < 0.5*np.amax(Qz), Z) - - - fig = figure() - ax = fig.add_subplot(121) - ax.set_axis_bgcolor("#bdb76b") - ax.pcolormesh(Qx,Qz,Z, shading='gouraud') - ax.set_title('Without masked values') - - ax = fig.add_subplot(122) - ax.set_axis_bgcolor("#bdb76b") - # You can control the color of the masked region: - #cmap = cm.jet - #cmap.set_bad('r', 1.0) - #ax.pcolormesh(Qx,Qz,Zm, cmap=cmap) - # Or use the default, which is transparent: - col = ax.pcolormesh(Qx,Qz,Zm,shading='gouraud') - ax.set_title('With masked values') - - - show() - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/pylab_examples/quiver_demo.txt b/dev/_sources/examples/pylab_examples/quiver_demo.txt deleted file mode 100644 index 368260c4b38..00000000000 --- a/dev/_sources/examples/pylab_examples/quiver_demo.txt +++ /dev/null @@ -1,98 +0,0 @@ -.. _pylab_examples-quiver_demo: - -pylab_examples example code: quiver_demo.py -=========================================== - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/pylab_examples/quiver_demo.py - -:: - - ''' - Demonstration of quiver and quiverkey functions. This is using the - new version coming from the code in quiver.py. - - Known problem: the plot autoscaling does not take into account - the arrows, so those on the boundaries are often out of the picture. - This is *not* an easy problem to solve in a perfectly general way. - The workaround is to manually expand the axes. - - ''' - from pylab import * - from numpy import ma - - X,Y = meshgrid( arange(0,2*pi,.2),arange(0,2*pi,.2) ) - U = cos(X) - V = sin(Y) - - #1 - figure() - Q = quiver( U, V) - qk = quiverkey(Q, 0.5, 0.92, 2, r'$2 \frac{m}{s}$', labelpos='W', - fontproperties={'weight': 'bold'}) - l,r,b,t = axis() - dx, dy = r-l, t-b - axis([l-0.05*dx, r+0.05*dx, b-0.05*dy, t+0.05*dy]) - - title('Minimal arguments, no kwargs') - - #2 - figure() - Q = quiver( X, Y, U, V, units='width') - qk = quiverkey(Q, 0.9, 0.95, 2, r'$2 \frac{m}{s}$', - labelpos='E', - coordinates='figure', - fontproperties={'weight': 'bold'}) - axis([-1, 7, -1, 7]) - title('scales with plot width, not view') - - #3 - figure() - Q = quiver( X[::3, ::3], Y[::3, ::3], U[::3, ::3], V[::3, ::3], - pivot='mid', color='r', units='inches' ) - qk = quiverkey(Q, 0.5, 0.03, 1, r'$1 \frac{m}{s}$', fontproperties={'weight': 'bold'}) - plot( X[::3, ::3], Y[::3, ::3], 'k.') - axis([-1, 7, -1, 7]) - title("pivot='mid'; every third arrow; units='inches'") - - #4 - figure() - M = sqrt(pow(U, 2) + pow(V, 2)) - Q = quiver( X, Y, U, V, M, units='x', pivot='tip', width=0.022, scale=1/0.15) - qk = quiverkey(Q, 0.9, 1.05, 1, r'$1 \frac{m}{s}$', - labelpos='E', - fontproperties={'weight': 'bold'}) - plot(X, Y, 'k.') - axis([-1, 7, -1, 7]) - title("scales with x view; pivot='tip'") - - #5 - figure() - Q = quiver( X[::3, ::3], Y[::3, ::3], U[::3, ::3], V[::3, ::3], - color='r', units='x', - linewidths=(2,), edgecolors=('k'), headaxislength=5 ) - qk = quiverkey(Q, 0.5, 0.03, 1, r'$1 \frac{m}{s}$', fontproperties={'weight': 'bold'}) - axis([-1, 7, -1, 7]) - title("triangular head; scale with x view; black edges") - - #6 - figure() - M = zeros(U.shape, dtype='bool') - M[U.shape[0]/3:2*U.shape[0]/3,U.shape[1]/3:2*U.shape[1]/3] = True - U = ma.masked_array(U, mask=M) - V = ma.masked_array(V, mask=M) - Q = quiver( U, V) - qk = quiverkey(Q, 0.5, 0.92, 2, r'$2 \frac{m}{s}$', labelpos='W', - fontproperties={'weight': 'bold'}) - l,r,b,t = axis() - dx, dy = r-l, t-b - axis([l-0.05*dx, r+0.05*dx, b-0.05*dy, t+0.05*dy]) - title('Minimal arguments, no kwargs - masked values') - - - show() - - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/pylab_examples/scatter_custom_symbol.txt b/dev/_sources/examples/pylab_examples/scatter_custom_symbol.txt deleted file mode 100644 index edd5c522d92..00000000000 --- a/dev/_sources/examples/pylab_examples/scatter_custom_symbol.txt +++ /dev/null @@ -1,32 +0,0 @@ -.. _pylab_examples-scatter_custom_symbol: - -pylab_examples example code: scatter_custom_symbol.py -===================================================== - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/pylab_examples/scatter_custom_symbol.py - -:: - - from matplotlib.pyplot import figure, show - from numpy import arange, pi, cos, sin, pi - from numpy.random import rand - - # unit area ellipse - rx, ry = 3., 1. - area = rx * ry * pi - theta = arange(0, 2*pi+0.01, 0.1) - verts = list(zip(rx/area*cos(theta), ry/area*sin(theta))) - - x,y,s,c = rand(4, 30) - s*= 10**2. - - fig = figure() - ax = fig.add_subplot(111) - ax.scatter(x,y,s,c,marker=None,verts =verts) - - show() - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/pylab_examples/scatter_demo.txt b/dev/_sources/examples/pylab_examples/scatter_demo.txt deleted file mode 100644 index 721831b08b7..00000000000 --- a/dev/_sources/examples/pylab_examples/scatter_demo.txt +++ /dev/null @@ -1,24 +0,0 @@ -.. _pylab_examples-scatter_demo: - -pylab_examples example code: scatter_demo.py -============================================ - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/pylab_examples/scatter_demo.py - -:: - - #!/usr/bin/env python - from pylab import * - - N = 30 - x = 0.9*rand(N) - y = 0.9*rand(N) - area = pi*(10 * rand(N))**2 # 0 to 10 point radiuses - scatter(x,y,s=area, marker='^', c='r') - - show() - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/pylab_examples/scatter_demo2.txt b/dev/_sources/examples/pylab_examples/scatter_demo2.txt deleted file mode 100644 index b36c885525e..00000000000 --- a/dev/_sources/examples/pylab_examples/scatter_demo2.txt +++ /dev/null @@ -1,49 +0,0 @@ -.. _pylab_examples-scatter_demo2: - -pylab_examples example code: scatter_demo2.py -============================================= - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/pylab_examples/scatter_demo2.py - -:: - - """ - Demo of scatter plot with varying marker colors and sizes. - """ - import numpy as np - import matplotlib.pyplot as plt - import matplotlib.cbook as cbook - - # 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') - price_data = np.load(datafile).view(np.recarray) - price_data = price_data[-250:] # get the most recent 250 trading days - - delta1 = np.diff(price_data.adj_close)/price_data.adj_close[:-1] - - # Marker size in units of points^2 - volume = (15 * price_data.volume[:-2] / price_data.volume[0])**2 - close = 0.003 * price_data.close[:-2] / 0.003 * price_data.open[:-2] - - fig, ax = plt.subplots() - ax.scatter(delta1[:-1], delta1[1:], c=close, s=volume, alpha=0.5) - - ax.set_xlabel(r'$\Delta_i$', fontsize=20) - ax.set_ylabel(r'$\Delta_{i+1}$', fontsize=20) - ax.set_title('Volume and percent change') - - ax.grid(True) - 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/dev/_sources/examples/pylab_examples/scatter_hist.txt b/dev/_sources/examples/pylab_examples/scatter_hist.txt deleted file mode 100644 index a43d4ed36c8..00000000000 --- a/dev/_sources/examples/pylab_examples/scatter_hist.txt +++ /dev/null @@ -1,63 +0,0 @@ -.. _pylab_examples-scatter_hist: - -pylab_examples example code: scatter_hist.py -============================================ - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/pylab_examples/scatter_hist.py - -:: - - import numpy as np - import matplotlib.pyplot as plt - from matplotlib.ticker import NullFormatter - - # the random data - x = np.random.randn(1000) - y = np.random.randn(1000) - - nullfmt = NullFormatter() # no labels - - # definitions for the axes - left, width = 0.1, 0.65 - bottom, height = 0.1, 0.65 - bottom_h = left_h = left+width+0.02 - - rect_scatter = [left, bottom, width, height] - rect_histx = [left, bottom_h, width, 0.2] - rect_histy = [left_h, bottom, 0.2, height] - - # start with a rectangular Figure - plt.figure(1, figsize=(8,8)) - - axScatter = plt.axes(rect_scatter) - axHistx = plt.axes(rect_histx) - axHisty = plt.axes(rect_histy) - - # no labels - axHistx.xaxis.set_major_formatter(nullfmt) - axHisty.yaxis.set_major_formatter(nullfmt) - - # the scatter plot: - axScatter.scatter(x, y) - - # 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 - - axScatter.set_xlim( (-lim, lim) ) - axScatter.set_ylim( (-lim, lim) ) - - bins = np.arange(-lim, lim + binwidth, binwidth) - axHistx.hist(x, bins=bins) - axHisty.hist(y, bins=bins, orientation='horizontal') - - axHistx.set_xlim( axScatter.get_xlim() ) - axHisty.set_ylim( axScatter.get_ylim() ) - - plt.show() - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/pylab_examples/scatter_masked.txt b/dev/_sources/examples/pylab_examples/scatter_masked.txt deleted file mode 100644 index fd8c21f232e..00000000000 --- a/dev/_sources/examples/pylab_examples/scatter_masked.txt +++ /dev/null @@ -1,33 +0,0 @@ -.. _pylab_examples-scatter_masked: - -pylab_examples example code: scatter_masked.py -============================================== - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/pylab_examples/scatter_masked.py - -:: - - #!/usr/bin/env python - from pylab import * - - N = 100 - r0 = 0.6 - x = 0.9*rand(N) - y = 0.9*rand(N) - area = pi*(10 * rand(N))**2 # 0 to 10 point radiuses - c = sqrt(area) - r = sqrt(x*x+y*y) - area1 = ma.masked_where(r < r0, area) - area2 = ma.masked_where(r >= r0, area) - scatter(x,y,s=area1, marker='^', c=c, hold='on') - scatter(x,y,s=area2, marker='o', c=c) - # Show the boundary between the regions: - theta = arange(0, pi/2, 0.01) - plot(r0*cos(theta), r0*sin(theta)) - - show() - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/pylab_examples/scatter_profile.txt b/dev/_sources/examples/pylab_examples/scatter_profile.txt deleted file mode 100644 index a69c18a6158..00000000000 --- a/dev/_sources/examples/pylab_examples/scatter_profile.txt +++ /dev/null @@ -1,36 +0,0 @@ -.. _pylab_examples-scatter_profile: - -pylab_examples example code: scatter_profile.py -=============================================== - -[`source code `_] - -:: - - #!/usr/bin/env python - # -*- noplot -*- - - """ - N Classic Base renderer Ext renderer - 20 0.22 0.14 0.14 - 100 0.16 0.14 0.13 - 1000 0.45 0.26 0.17 - 10000 3.30 1.31 0.53 - 50000 19.30 6.53 1.98 - """ - from __future__ import print_function - import pylab - - import time - - - for N in (20,100,1000,10000,50000): - tstart = time.time() - x = 0.9*pylab.rand(N) - y = 0.9*pylab.rand(N) - s = 20*pylab.rand(N) - pylab.scatter(x,y,s) - print ('%d symbols in %1.2f s' % (N, time.time()-tstart)) - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/pylab_examples/scatter_star_poly.txt b/dev/_sources/examples/pylab_examples/scatter_star_poly.txt deleted file mode 100644 index c6f5dbface9..00000000000 --- a/dev/_sources/examples/pylab_examples/scatter_star_poly.txt +++ /dev/null @@ -1,44 +0,0 @@ -.. _pylab_examples-scatter_star_poly: - -pylab_examples example code: scatter_star_poly.py -================================================= - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/pylab_examples/scatter_star_poly.py - -:: - - import numpy as np - import matplotlib.pyplot as plt - - - x = np.random.rand(10) - y = np.random.rand(10) - z = np.sqrt(x**2 + y**2) - - plt.subplot(321) - plt.scatter(x,y,s=80, c=z, marker=">") - - plt.subplot(322) - plt.scatter(x,y,s=80, c=z, marker=(5,0)) - - verts = list(zip([-1.,1.,1.,-1.],[-1.,-1.,1.,-1.])) - plt.subplot(323) - plt.scatter(x,y,s=80, c=z, marker=(verts,0)) - # equivalent: - #plt.scatter(x,y,s=80, c=z, marker=None, verts=verts) - - plt.subplot(324) - plt.scatter(x,y,s=80, c=z, marker=(5,1)) - - plt.subplot(325) - plt.scatter(x,y,s=80, c=z, marker='+') - - plt.subplot(326) - plt.scatter(x,y,s=80, c=z, marker=(5,2)) - - plt.show() - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/pylab_examples/scatter_symbol.txt b/dev/_sources/examples/pylab_examples/scatter_symbol.txt deleted file mode 100644 index e9ac7998191..00000000000 --- a/dev/_sources/examples/pylab_examples/scatter_symbol.txt +++ /dev/null @@ -1,28 +0,0 @@ -.. _pylab_examples-scatter_symbol: - -pylab_examples example code: scatter_symbol.py -============================================== - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/pylab_examples/scatter_symbol.py - -:: - - from matplotlib import pyplot as plt - import numpy as np - import matplotlib - - x = np.arange(0.0, 50.0, 2.0) - y = x ** 1.3 + np.random.rand(*x.shape) * 30.0 - s = np.random.rand(*x.shape) * 800 + 500 - - plt.scatter(x, y, s, c="g", alpha=0.5, marker=r'$\clubsuit$', - label="Luck") - plt.xlabel("Leprechauns") - plt.ylabel("Gold") - plt.legend(loc=2) - plt.show() - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/pylab_examples/set_and_get.txt b/dev/_sources/examples/pylab_examples/set_and_get.txt deleted file mode 100644 index 2809841989b..00000000000 --- a/dev/_sources/examples/pylab_examples/set_and_get.txt +++ /dev/null @@ -1,111 +0,0 @@ -.. _pylab_examples-set_and_get: - -pylab_examples example code: set_and_get.py -=========================================== - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/pylab_examples/set_and_get.py - -:: - - """ - - MATLAB and pylab allow you to use setp and get to set and get - object properties, as well as to do introspection on the object - - set - To set the linestyle of a line to be dashed, you can do - - >>> line, = plot([1,2,3]) - >>> setp(line, linestyle='--') - - If you want to know the valid types of arguments, you can provide the - name of the property you want to set without a value - - >>> setp(line, 'linestyle') - linestyle: [ '-' | '--' | '-.' | ':' | 'steps' | 'None' ] - - If you want to see all the properties that can be set, and their - possible values, you can do - - >>> setp(line) - - set operates on a single instance or a list of instances. If you are - in query mode introspecting the possible values, only the first - instance in the sequence is used. When actually setting values, all - the instances will be set. e.g., suppose you have a list of two lines, - the following will make both lines thicker and red - - >>> x = arange(0,1.0,0.01) - >>> y1 = sin(2*pi*x) - >>> y2 = sin(4*pi*x) - >>> lines = plot(x, y1, x, y2) - >>> setp(lines, linewidth=2, color='r') - - - get: - - get returns the value of a given attribute. You can use get to query - the value of a single attribute - - >>> getp(line, 'linewidth') - 0.5 - - or all the attribute/value pairs - - >>> getp(line) - aa = True - alpha = 1.0 - antialiased = True - c = b - clip_on = True - color = b - ... long listing skipped ... - - Aliases: - - To reduce keystrokes in interactive mode, a number of properties - have short aliases, eg 'lw' for 'linewidth' and 'mec' for - 'markeredgecolor'. When calling set or get in introspection mode, - these properties will be listed as 'fullname or aliasname', as in - - - - - """ - - from __future__ import print_function - from pylab import * - - - x = arange(0,1.0,0.01) - y1 = sin(2*pi*x) - y2 = sin(4*pi*x) - lines = plot(x, y1, x, y2) - l1, l2 = lines - setp(lines, linestyle='--') # set both to dashed - setp(l1, linewidth=2, color='r') # line1 is thick and red - setp(l2, linewidth=1, color='g') # line2 is thicker and green - - - print ('Line setters') - setp(l1) - print ('Line getters') - getp(l1) - - print ('Rectangle setters') - setp(gca().patch) - print ('Rectangle getters') - getp(gca().patch) - - t = title('Hi mom') - print ('Text setters') - setp(t) - print ('Text getters') - getp(t) - - show() - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/pylab_examples/shading_example.txt b/dev/_sources/examples/pylab_examples/shading_example.txt deleted file mode 100644 index bf9ff8eb524..00000000000 --- a/dev/_sources/examples/pylab_examples/shading_example.txt +++ /dev/null @@ -1,42 +0,0 @@ -.. _pylab_examples-shading_example: - -pylab_examples example code: shading_example.py -=============================================== - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/pylab_examples/shading_example.py - -:: - - import numpy as np - import matplotlib.pyplot as plt - from matplotlib.colors import LightSource - - # example showing how to make shaded relief plots - # like Mathematica - # (http://reference.wolfram.com/mathematica/ref/ReliefPlot.html) - # or Generic Mapping Tools - # (http://gmt.soest.hawaii.edu/gmt/doc/gmt/html/GMT_Docs/node145.html) - - # test data - X,Y=np.mgrid[-5:5:0.05,-5:5:0.05] - Z=np.sqrt(X**2+Y**2)+np.sin(X**2+Y**2) - # create light source object. - ls = LightSource(azdeg=0,altdeg=65) - # shade data, creating an rgb array. - rgb = ls.shade(Z,plt.cm.copper) - # plot un-shaded and shaded images. - plt.figure(figsize=(12,5)) - plt.subplot(121) - plt.imshow(Z,cmap=plt.cm.copper) - plt.title('imshow') - plt.xticks([]); plt.yticks([]) - plt.subplot(122) - plt.imshow(rgb) - plt.title('imshow with shading') - plt.xticks([]); plt.yticks([]) - plt.show() - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/pylab_examples/shared_axis_across_figures.txt b/dev/_sources/examples/pylab_examples/shared_axis_across_figures.txt deleted file mode 100644 index 3128aac434b..00000000000 --- a/dev/_sources/examples/pylab_examples/shared_axis_across_figures.txt +++ /dev/null @@ -1,40 +0,0 @@ -.. _pylab_examples-shared_axis_across_figures: - -pylab_examples example code: shared_axis_across_figures.py -========================================================== - -[`source code `_] - -:: - - """ - connect the data limits on the axes in one figure with the axes in - another. This is not the right way to do this for two axes in the - same figure -- use the sharex and sharey property in that case - """ - # -*- noplot -*- - import numpy - from pylab import figure, show - - fig1 = figure() - fig2 = figure() - - ax1 = fig1.add_subplot(111) - ax2 = fig2.add_subplot(111, sharex=ax1, sharey=ax1) - - ax1.plot(numpy.random.rand(100), 'o') - ax2.plot(numpy.random.rand(100), 'o') - - # In the latest release, it is no longer necessary to do anything - # special to share axes across figures: - - # ax1.sharex_foreign(ax2) - # ax2.sharex_foreign(ax1) - - # ax1.sharey_foreign(ax2) - # ax2.sharey_foreign(ax1) - - show() - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/pylab_examples/shared_axis_demo.txt b/dev/_sources/examples/pylab_examples/shared_axis_demo.txt deleted file mode 100644 index d7cfa63b868..00000000000 --- a/dev/_sources/examples/pylab_examples/shared_axis_demo.txt +++ /dev/null @@ -1,66 +0,0 @@ -.. _pylab_examples-shared_axis_demo: - -pylab_examples example code: shared_axis_demo.py -================================================ - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/pylab_examples/shared_axis_demo.py - -:: - - """ - You can share the x or y axis limits for one axis with another by - passing an axes instance as a sharex or sharey kwarg. - - Changing the axis limits on one axes will be reflected automatically - in the other, and vice-versa, so when you navigate with the toolbar - the axes will follow each other on their shared axes. Ditto for - changes in the axis scaling (eg log vs linear). However, it is - possible to have differences in tick labeling, eg you can selectively - turn off the tick labels on one axes. - - The example below shows how to customize the tick labels on the - various axes. Shared axes share the tick locator, tick formatter, - view limits, and transformation (eg log, linear). But the ticklabels - themselves do not share properties. This is a feature and not a bug, - because you may want to make the tick labels smaller on the upper - axes, eg in the example below. - - If you want to turn off the ticklabels for a given axes (eg on - subplot(211) or subplot(212), you cannot do the standard trick - - setp(ax2, xticklabels=[]) - - because this changes the tick Formatter, which is shared among all - axes. But you can alter the visibility of the labels, which is a - property - - setp( ax2.get_xticklabels(), visible=False) - - - """ - from pylab import * - - t = arange(0.01, 5.0, 0.01) - s1 = sin(2*pi*t) - s2 = exp(-t) - s3 = sin(4*pi*t) - ax1 = subplot(311) - plot(t,s1) - setp( ax1.get_xticklabels(), fontsize=6) - - ## share x only - ax2 = subplot(312, sharex=ax1) - plot(t, s2) - # make these tick labels invisible - setp( ax2.get_xticklabels(), visible=False) - - # share x and y - ax3 = subplot(313, sharex=ax1, sharey=ax1) - plot(t, s3) - xlim(0.01,5.0) - show() - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/pylab_examples/show_colormaps.txt b/dev/_sources/examples/pylab_examples/show_colormaps.txt deleted file mode 100644 index 1f04c50a5ed..00000000000 --- a/dev/_sources/examples/pylab_examples/show_colormaps.txt +++ /dev/null @@ -1,39 +0,0 @@ -.. _pylab_examples-show_colormaps: - -pylab_examples example code: show_colormaps.py -============================================== - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/pylab_examples/show_colormaps.py - -:: - - # This example comes from the Cookbook on www.scipy.org. According to the - # history, Andrew Straw did the conversion from an old page, but it is - # unclear who the original author is. - import numpy as np - import matplotlib.pyplot as plt - - a = np.linspace(0, 1, 256).reshape(1,-1) - a = np.vstack((a,a)) - - # Get a list of the colormaps in matplotlib. Ignore the ones that end with - # '_r' because these are simply reversed versions of ones that don't end - # with '_r' - maps = sorted(m for m in plt.cm.datad if not m.endswith("_r")) - nmaps = len(maps) + 1 - - fig = plt.figure(figsize=(5,10)) - fig.subplots_adjust(top=0.99, bottom=0.01, left=0.2, right=0.99) - for i,m in enumerate(maps): - ax = plt.subplot(nmaps, 1, i+1) - plt.axis("off") - plt.imshow(a, aspect='auto', cmap=plt.get_cmap(m), origin='lower') - pos = list(ax.get_position().bounds) - fig.text(pos[0] - 0.01, pos[1], m, fontsize=10, horizontalalignment='right') - - plt.show() - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/pylab_examples/simple_plot.txt b/dev/_sources/examples/pylab_examples/simple_plot.txt deleted file mode 100644 index a4fbe6e05f9..00000000000 --- a/dev/_sources/examples/pylab_examples/simple_plot.txt +++ /dev/null @@ -1,26 +0,0 @@ -.. _pylab_examples-simple_plot: - -pylab_examples example code: simple_plot.py -=========================================== - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/pylab_examples/simple_plot.py - -:: - - from pylab import * - - t = arange(0.0, 2.0, 0.01) - s = sin(2*pi*t) - plot(t, s, linewidth=1.0) - - xlabel('time (s)') - ylabel('voltage (mV)') - title('About as simple as it gets, folks') - grid(True) - savefig("test.png") - show() - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/pylab_examples/simple_plot_fps.txt b/dev/_sources/examples/pylab_examples/simple_plot_fps.txt deleted file mode 100644 index 48e6170f316..00000000000 --- a/dev/_sources/examples/pylab_examples/simple_plot_fps.txt +++ /dev/null @@ -1,46 +0,0 @@ -.. _pylab_examples-simple_plot_fps: - -pylab_examples example code: simple_plot_fps.py -=============================================== - -[`source code `_] - -:: - - #!/usr/bin/env python - - """ - Example: simple line plot. - Show how to make and save a simple line plot with labels, title and grid - """ - # -*- noplot -*- - from __future__ import print_function - from pylab import * - - ion() - - t = arange(0.0, 1.0+0.001, 0.001) - s = cos(2*2*pi*t) - plot(t, s, '-', lw=2) - - xlabel('time (s)') - ylabel('voltage (mV)') - title('About as simple as it gets, folks') - grid(True) - - import time - - frames = 100.0 - t = time.time() - c = time.clock() - for i in range(int(frames)): - part = i / frames - axis([0.0, 1.0 - part, -1.0 + part, 1.0 - part]) - wallclock = time.time() - t - user = time.clock() - c - print ("wallclock:", wallclock) - print ("user:", user) - print ("fps:", frames / wallclock) - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/pylab_examples/specgram_demo.txt b/dev/_sources/examples/pylab_examples/specgram_demo.txt deleted file mode 100644 index 8aa8334c63c..00000000000 --- a/dev/_sources/examples/pylab_examples/specgram_demo.txt +++ /dev/null @@ -1,44 +0,0 @@ -.. _pylab_examples-specgram_demo: - -pylab_examples example code: specgram_demo.py -============================================= - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/pylab_examples/specgram_demo.py - -:: - - #!/usr/bin/env python - from pylab import * - - dt = 0.0005 - t = arange(0.0, 20.0, dt) - s1 = sin(2*pi*100*t) - s2 = 2*sin(2*pi*400*t) - - # create a transient "chirp" - mask = where(logical_and(t>10, t<12), 1.0, 0.0) - s2 = s2 * mask - - # add some noise into the mix - nse = 0.01*randn(len(t)) - - x = s1 + s2 + nse # the signal - NFFT = 1024 # the length of the windowing segments - Fs = int(1.0/dt) # the sampling frequency - - # Pxx is the segments x freqs array of instantaneous power, freqs is - # the frequency vector, bins are the centers of the time bins in which - # the power is computed, and im is the matplotlib.image.AxesImage - # instance - - ax1 = subplot(211) - plot(t, x) - subplot(212, sharex=ax1) - Pxx, freqs, bins, im = specgram(x, NFFT=NFFT, Fs=Fs, noverlap=900, - cmap=cm.gist_heat) - show() - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/pylab_examples/spine_placement_demo.txt b/dev/_sources/examples/pylab_examples/spine_placement_demo.txt deleted file mode 100644 index 0ea52480d78..00000000000 --- a/dev/_sources/examples/pylab_examples/spine_placement_demo.txt +++ /dev/null @@ -1,114 +0,0 @@ -.. _pylab_examples-spine_placement_demo: - -pylab_examples example code: spine_placement_demo.py -==================================================== - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/pylab_examples/spine_placement_demo.py - -:: - - import numpy as np - import matplotlib.pyplot as plt - - - fig = plt.figure() - x = np.linspace(-np.pi,np.pi,100) - y = 2*np.sin(x) - - ax = fig.add_subplot(2,2,1) - ax.set_title('centered spines') - ax.plot(x,y) - ax.spines['left'].set_position('center') - ax.spines['right'].set_color('none') - ax.spines['bottom'].set_position('center') - ax.spines['top'].set_color('none') - ax.spines['left'].set_smart_bounds(True) - ax.spines['bottom'].set_smart_bounds(True) - ax.xaxis.set_ticks_position('bottom') - ax.yaxis.set_ticks_position('left') - - ax = fig.add_subplot(2,2,2) - ax.set_title('zeroed spines') - ax.plot(x,y) - ax.spines['left'].set_position('zero') - ax.spines['right'].set_color('none') - ax.spines['bottom'].set_position('zero') - ax.spines['top'].set_color('none') - ax.spines['left'].set_smart_bounds(True) - ax.spines['bottom'].set_smart_bounds(True) - ax.xaxis.set_ticks_position('bottom') - ax.yaxis.set_ticks_position('left') - - ax = fig.add_subplot(2,2,3) - ax.set_title('spines at axes (0.6, 0.1)') - ax.plot(x,y) - ax.spines['left'].set_position(('axes',0.6)) - ax.spines['right'].set_color('none') - ax.spines['bottom'].set_position(('axes',0.1)) - ax.spines['top'].set_color('none') - ax.spines['left'].set_smart_bounds(True) - ax.spines['bottom'].set_smart_bounds(True) - ax.xaxis.set_ticks_position('bottom') - ax.yaxis.set_ticks_position('left') - - ax = fig.add_subplot(2,2,4) - ax.set_title('spines at data (1,2)') - ax.plot(x,y) - ax.spines['left'].set_position(('data',1)) - ax.spines['right'].set_color('none') - ax.spines['bottom'].set_position(('data',2)) - ax.spines['top'].set_color('none') - ax.spines['left'].set_smart_bounds(True) - ax.spines['bottom'].set_smart_bounds(True) - ax.xaxis.set_ticks_position('bottom') - ax.yaxis.set_ticks_position('left') - # ---------------------------------------------------- - - def adjust_spines(ax,spines): - for loc, spine in ax.spines.items(): - if loc in spines: - spine.set_position(('outward',10)) # outward by 10 points - spine.set_smart_bounds(True) - else: - spine.set_color('none') # don't draw spine - - # turn off ticks where there is no spine - if 'left' in spines: - ax.yaxis.set_ticks_position('left') - else: - # no yaxis ticks - ax.yaxis.set_ticks([]) - - if 'bottom' in spines: - ax.xaxis.set_ticks_position('bottom') - else: - # no xaxis ticks - ax.xaxis.set_ticks([]) - - fig = plt.figure() - - x = np.linspace(0,2*np.pi,100) - y = 2*np.sin(x) - - ax = fig.add_subplot(2,2,1) - ax.plot(x,y) - adjust_spines(ax,['left']) - - ax = fig.add_subplot(2,2,2) - ax.plot(x,y) - adjust_spines(ax,[]) - - ax = fig.add_subplot(2,2,3) - ax.plot(x,y) - adjust_spines(ax,['left','bottom']) - - ax = fig.add_subplot(2,2,4) - ax.plot(x,y) - adjust_spines(ax,['bottom']) - - plt.show() - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/pylab_examples/spy_demos.txt b/dev/_sources/examples/pylab_examples/spy_demos.txt deleted file mode 100644 index 903b162c93d..00000000000 --- a/dev/_sources/examples/pylab_examples/spy_demos.txt +++ /dev/null @@ -1,38 +0,0 @@ -.. _pylab_examples-spy_demos: - -pylab_examples example code: spy_demos.py -========================================= - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/pylab_examples/spy_demos.py - -:: - - """ - Plot the sparsity pattern of arrays - """ - - from matplotlib.pyplot import figure, show - import numpy - - fig = figure() - ax1 = fig.add_subplot(221) - ax2 = fig.add_subplot(222) - ax3 = fig.add_subplot(223) - ax4 = fig.add_subplot(224) - - x = numpy.random.randn(20,20) - x[5] = 0. - x[:,12] = 0. - - ax1.spy(x, markersize=5) - ax2.spy(x, precision=0.1, markersize=5) - - ax3.spy(x) - ax4.spy(x, precision=0.1) - - show() - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/pylab_examples/stackplot_demo.txt b/dev/_sources/examples/pylab_examples/stackplot_demo.txt deleted file mode 100644 index ef5c2426709..00000000000 --- a/dev/_sources/examples/pylab_examples/stackplot_demo.txt +++ /dev/null @@ -1,32 +0,0 @@ -.. _pylab_examples-stackplot_demo: - -pylab_examples example code: stackplot_demo.py -============================================== - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/pylab_examples/stackplot_demo.py - -:: - - import numpy as np - from matplotlib import pyplot as plt - - fnx = lambda : np.random.randint(5, 50, 10) - y = np.row_stack((fnx(), fnx(), fnx())) - x = np.arange(10) - - y1, y2, y3 = fnx(), fnx(), fnx() - - fig = plt.figure() - ax = fig.add_subplot(111) - ax.stackplot(x, y) - plt.show() - - fig = plt.figure() - ax = fig.add_subplot(111) - ax.stackplot(x, y1, y2, y3) - plt.show() - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/pylab_examples/stackplot_demo2.txt b/dev/_sources/examples/pylab_examples/stackplot_demo2.txt deleted file mode 100644 index ce8f4735fc5..00000000000 --- a/dev/_sources/examples/pylab_examples/stackplot_demo2.txt +++ /dev/null @@ -1,40 +0,0 @@ -.. _pylab_examples-stackplot_demo2: - -pylab_examples example code: stackplot_demo2.py -=============================================== - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/pylab_examples/stackplot_demo2.py - -:: - - import numpy as np - import matplotlib.pyplot as plt - - np.random.seed(0) - def layers(n, m): - """ - Return *n* random Gaussian mixtures, each of length *m*. - """ - def bump(a): - x = 1 / (.1 + np.random.random()) - y = 2 * np.random.random() - .5 - z = 10 / (.1 + np.random.random()) - for i in range(m): - w = (i / float(m) - y) * z - a[i] += x * np.exp(-w * w) - a = np.zeros((m, n)) - for i in range(n): - for j in range(5): - bump(a[:, i]) - return a - - d = layers(3, 100) - - plt.subplots() - plt.stackplot(range(100), d.T, baseline='wiggle') - plt.show() - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/pylab_examples/stem_plot.txt b/dev/_sources/examples/pylab_examples/stem_plot.txt deleted file mode 100644 index cf72231a634..00000000000 --- a/dev/_sources/examples/pylab_examples/stem_plot.txt +++ /dev/null @@ -1,23 +0,0 @@ -.. _pylab_examples-stem_plot: - -pylab_examples example code: stem_plot.py -========================================= - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/pylab_examples/stem_plot.py - -:: - - #!/usr/bin/env python - from pylab import * - - x = linspace(0.1, 2*pi, 10) - markerline, stemlines, baseline = stem(x, cos(x), '-.') - setp(markerline, 'markerfacecolor', 'b') - setp(baseline, 'color','r', 'linewidth', 2) - - show() - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/pylab_examples/step_demo.txt b/dev/_sources/examples/pylab_examples/step_demo.txt deleted file mode 100644 index c7061fe4fa6..00000000000 --- a/dev/_sources/examples/pylab_examples/step_demo.txt +++ /dev/null @@ -1,40 +0,0 @@ -.. _pylab_examples-step_demo: - -pylab_examples example code: step_demo.py -========================================= - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/pylab_examples/step_demo.py - -:: - - import numpy as np - from numpy import ma - from matplotlib.pyplot import step, legend, xlim, ylim, show - - x = np.arange(1, 7, 0.4) - y0 = np.sin(x) - y = y0.copy() + 2.5 - - step(x, y, label='pre (default)') - - y -= 0.5 - step(x, y, where='mid', label='mid') - - y -= 0.5 - step(x, y, where='post', label='post') - - y = ma.masked_where((y0>-0.15)&(y0<0.15), y - 0.5) - step(x,y, label='masked (pre)') - - legend() - - xlim(0, 7) - ylim(-0.5, 4) - - show() - - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/pylab_examples/stix_fonts_demo.txt b/dev/_sources/examples/pylab_examples/stix_fonts_demo.txt deleted file mode 100644 index e41cdc78b74..00000000000 --- a/dev/_sources/examples/pylab_examples/stix_fonts_demo.txt +++ /dev/null @@ -1,71 +0,0 @@ -.. _pylab_examples-stix_fonts_demo: - -pylab_examples example code: stix_fonts_demo.py -=============================================== - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/pylab_examples/stix_fonts_demo.py - -:: - - #!/usr/bin/env python - - from __future__ import unicode_literals - - import os, sys, re - - import gc - - stests = [ - r'$\mathcircled{123} \mathrm{\mathcircled{123}} \mathbf{\mathcircled{123}}$', - r'$\mathsf{Sans \Omega} \mathrm{\mathsf{Sans \Omega}} \mathbf{\mathsf{Sans \Omega}}$', - r'$\mathtt{Monospace}$', - r'$\mathcal{CALLIGRAPHIC}$', - r'$\mathbb{Blackboard \pi}$', - r'$\mathrm{\mathbb{Blackboard \pi}}$', - r'$\mathbf{\mathbb{Blackboard \pi}}$', - r'$\mathfrak{Fraktur} \mathbf{\mathfrak{Fraktur}}$', - r'$\mathscr{Script}$'] - - if sys.maxunicode > 0xffff: - s = r'Direct Unicode: $\u23ce \mathrm{\ue0f2 \U0001D538}$' - - from pylab import * - - def doall(): - tests = stests - - figure(figsize=(8, (len(tests) * 1) + 2)) - plot([0, 0], 'r') - grid(False) - axis([0, 3, -len(tests), 0]) - yticks(arange(len(tests)) * -1) - for i, s in enumerate(tests): - #print (i, s.encode("ascii", "backslashreplace")) - text(0.1, -i, s, fontsize=32) - - savefig('stix_fonts_example') - #close('all') - show() - - if '--latex' in sys.argv: - fd = open("stix_fonts_examples.ltx", "w") - fd.write("\\documentclass{article}\n") - fd.write("\\begin{document}\n") - fd.write("\\begin{enumerate}\n") - - for i, s in enumerate(stests): - s = re.sub(r"(?`_] - -:: - - #!/usr/bin/env python - # -*- noplot -*- - import time - from pylab import * - - def get_memory(): - "Simulate a function that returns system memory" - return 100*(0.5+0.5*sin(0.5*pi*time.time())) - - def get_cpu(): - "Simulate a function that returns cpu usage" - return 100*(0.5+0.5*sin(0.2*pi*(time.time()-0.25))) - - def get_net(): - "Simulate a function that returns network bandwidth" - return 100*(0.5+0.5*sin(0.7*pi*(time.time()-0.1))) - - def get_stats(): - return get_memory(), get_cpu(), get_net() - - # turn interactive mode on for dynamic updates. If you aren't in - # interactive mode, you'll need to use a GUI event handler/timer. - ion() - - fig = figure(1) - ax = subplot(111) - ind = arange(1,4) - pm, pc, pn = bar(ind, get_stats()) - centers = ind + 0.5*pm.get_width() - pm.set_facecolor('r') - pc.set_facecolor('g') - pn.set_facecolor('b') - ax.set_xlim([0.5,4]) - ax.set_xticks(centers) - ax.set_ylim([0,100]) - ax.set_xticklabels(['Memory', 'CPU', 'Bandwidth']) - ax.set_ylabel('Percent usage') - ax.set_title('System Monitor') - - for i in range(200): # run for a little while - m,c,n = get_stats() - - pm.set_height(m) - pc.set_height(c) - pn.set_height(n) - ax.set_ylim([0,100]) - - draw() - - - - - - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/pylab_examples/table_demo.txt b/dev/_sources/examples/pylab_examples/table_demo.txt deleted file mode 100644 index 5b2495e3eda..00000000000 --- a/dev/_sources/examples/pylab_examples/table_demo.txt +++ /dev/null @@ -1,69 +0,0 @@ -.. _pylab_examples-table_demo: - -pylab_examples example code: table_demo.py -========================================== - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/pylab_examples/table_demo.py - -:: - - """ - Demo of table function to display a table within a plot. - """ - import numpy as np - import matplotlib.pyplot as plt - - - data = [[ 66386, 174296, 75131, 577908, 32015], - [ 58230, 381139, 78045, 99308, 160454], - [ 89135, 80552, 152558, 497981, 603535], - [ 78415, 81858, 150656, 193263, 69638], - [ 139361, 331509, 343164, 781380, 52269]] - - columns = ('Freeze', 'Wind', 'Flood', 'Quake', 'Hail') - rows = ['%d year' % x for x in (100, 50, 20, 10, 5)] - - values = np.arange(0, 2500, 500) - value_increment = 1000 - - # Get some pastel shades for the colors - colors = plt.cm.BuPu(np.linspace(0, 0.5, len(columns))) - n_rows = len(data) - - index = np.arange(len(columns)) + 0.3 - bar_width = 0.4 - - # Initialize the vertical-offset for the stacked bar chart. - y_offset = np.array([0.0] * len(columns)) - - # Plot bars and create text labels for the table - cell_text = [] - for row in range(n_rows): - plt.bar(index, data[row], bar_width, bottom=y_offset, color=colors[row]) - y_offset = y_offset + data[row] - cell_text.append(['%1.1f' % (x/1000.0) for x in y_offset]) - # Reverse colors and text labels to display the last value at the top. - colors = colors[::-1] - cell_text.reverse() - - # Add a table at the bottom of the axes - the_table = plt.table(cellText=cell_text, - rowLabels=rows, - rowColours=colors, - colLabels=columns, - loc='bottom') - - # Adjust layout to make room for the table: - plt.subplots_adjust(left=0.2, bottom=0.2) - - plt.ylabel("Loss in ${0}'s".format(value_increment)) - plt.yticks(values * value_increment, ['%d' % val for val in values]) - plt.xticks([]) - plt.title('Loss by Disaster') - - plt.show() - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/pylab_examples/tex_demo.txt b/dev/_sources/examples/pylab_examples/tex_demo.txt deleted file mode 100644 index 55596edd26b..00000000000 --- a/dev/_sources/examples/pylab_examples/tex_demo.txt +++ /dev/null @@ -1,44 +0,0 @@ -.. _pylab_examples-tex_demo: - -pylab_examples example code: tex_demo.py -======================================== - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/pylab_examples/tex_demo.py - -:: - - """ - You can use TeX to render all of your matplotlib text if the rc - parameter text.usetex is set. This works currently on the agg and ps - backends, and requires that you have tex and the other dependencies - described at http://matplotlib.org/users/usetex.html - properly installed on your system. The first time you run a script - you will see a lot of output from tex and associated tools. The next - time, the run may be silent, as a lot of the information is cached in - ~/.tex.cache - - """ - import numpy as np - import matplotlib.pyplot as plt - - - plt.rc('text', usetex=True) - plt.rc('font', family='serif') - plt.figure(1, figsize=(6,4)) - ax = plt.axes([0.1, 0.1, 0.8, 0.7]) - t = np.linspace(0.0, 1.0, 100) - s = np.cos(4 * np.pi * t) + 2 - plt.plot(t, s) - - plt.xlabel(r'\textbf{time (s)}') - plt.ylabel(r'\textit{voltage (mV)}',fontsize=16) - plt.title(r"\TeX\ is Number $\displaystyle\sum_{n=1}^\infty" - r"\frac{-e^{i\pi}}{2^n}$!", fontsize=16, color='r') - plt.grid(True) - plt.savefig('tex_demo') - plt.show() - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/pylab_examples/tex_unicode_demo.txt b/dev/_sources/examples/pylab_examples/tex_unicode_demo.txt deleted file mode 100644 index a1880036143..00000000000 --- a/dev/_sources/examples/pylab_examples/tex_unicode_demo.txt +++ /dev/null @@ -1,40 +0,0 @@ -.. _pylab_examples-tex_unicode_demo: - -pylab_examples example code: tex_unicode_demo.py -================================================ - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/pylab_examples/tex_unicode_demo.py - -:: - - #!/usr/bin/env python - # -*- coding: utf-8 -*- - """ - This demo is tex_demo.py modified to have unicode. See that file for - more information. - """ - from __future__ import unicode_literals - import matplotlib as mpl - mpl.rcParams['text.usetex']=True - mpl.rcParams['text.latex.unicode']=True - from numpy import arange, cos, pi - from matplotlib.pyplot import (figure, axes, plot, xlabel, ylabel, title, - grid, savefig, show) - - figure(1, figsize=(6,4)) - ax = axes([0.1, 0.1, 0.8, 0.7]) - t = arange(0.0, 1.0+0.01, 0.01) - s = cos(2*2*pi*t)+2 - plot(t, s) - - xlabel(r'\textbf{time (s)}') - ylabel(r'\textit{Velocity (\u00B0/sec)}', fontsize=16) - title(r"\TeX\ is Number $\displaystyle\sum_{n=1}^\infty\frac{-e^{i\pi}}{2^n}$!", - fontsize=16, color='r') - grid(True) - show() - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/pylab_examples/text_handles.txt b/dev/_sources/examples/pylab_examples/text_handles.txt deleted file mode 100644 index 5c052371b08..00000000000 --- a/dev/_sources/examples/pylab_examples/text_handles.txt +++ /dev/null @@ -1,44 +0,0 @@ -.. _pylab_examples-text_handles: - -pylab_examples example code: text_handles.py -============================================ - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/pylab_examples/text_handles.py - -:: - - #!/usr/bin/env python - #Controlling the properties of axis text using handles - - # See examples/text_themes.py for a more elegant, pythonic way to control - # fonts. After all, if we were slaves to MATLAB , we wouldn't be - # using python! - - from pylab import * - - - def f(t): - s1 = sin(2*pi*t) - e1 = exp(-t) - return multiply(s1,e1) - - t1 = arange(0.0, 5.0, 0.1) - t2 = arange(0.0, 5.0, 0.02) - - - subplot(111) - plot(t1, f(t1), 'bo', t2, f(t2), 'k') - text(3.0, 0.6, 'f(t) = exp(-t) sin(2 pi t)') - ttext = title('Fun with text!') - ytext = ylabel('Damped oscillation') - xtext = xlabel('time (s)') - - setp(ttext, size='large', color='r', style='italic') - setp(xtext, size='medium', name='courier', weight='bold', color='g') - setp(ytext, size='medium', name='helvetica', weight='light', color='b') - show() - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/pylab_examples/text_rotation.txt b/dev/_sources/examples/pylab_examples/text_rotation.txt deleted file mode 100644 index e5bf2cec47a..00000000000 --- a/dev/_sources/examples/pylab_examples/text_rotation.txt +++ /dev/null @@ -1,55 +0,0 @@ -.. _pylab_examples-text_rotation: - -pylab_examples example code: text_rotation.py -============================================= - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/pylab_examples/text_rotation.py - -:: - - #!/usr/bin/env python - """ - The way matplotlib does text layout is counter-intuitive to some, so - this example is designed to make it a little clearer. The text is - aligned by it's bounding box (the rectangular box that surrounds the - ink rectangle). The order of operations is basically rotation then - alignment, rather than alignment then rotation. Basically, the text - is centered at your x,y location, rotated around this point, and then - aligned according to the bounding box of the rotated text. - - So if you specify left, bottom alignment, the bottom left of the - bounding box of the rotated text will be at the x,y coordinate of the - text. - - But a picture is worth a thousand words! - """ - from pylab import * - - def addtext(props): - text(0.5, 0.5, 'text 0', props, rotation=0) - text(1.5, 0.5, 'text 45', props, rotation=45) - text(2.5, 0.5, 'text 135', props, rotation=135) - text(3.5, 0.5, 'text 225', props, rotation=225) - text(4.5, 0.5, 'text -45', props, rotation=-45) - yticks([0,.5,1]) - grid(True) - - # the text bounding box - bbox = {'fc':'0.8', 'pad':0} - - subplot(211) - addtext({'ha':'center', 'va':'center', 'bbox':bbox}) - xlim(0,5) - xticks(arange(0, 5.1, 0.5), []) - ylabel('center / center') - subplot(212) - addtext({'ha':'left', 'va':'bottom', 'bbox':bbox}) - xlim(0,5) - xticks(arange(0, 5.1, 0.5)) - ylabel('left / bottom') - show() - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/pylab_examples/text_rotation_relative_to_line.txt b/dev/_sources/examples/pylab_examples/text_rotation_relative_to_line.txt deleted file mode 100644 index e36422e9281..00000000000 --- a/dev/_sources/examples/pylab_examples/text_rotation_relative_to_line.txt +++ /dev/null @@ -1,50 +0,0 @@ -.. _pylab_examples-text_rotation_relative_to_line: - -pylab_examples example code: text_rotation_relative_to_line.py -============================================================== - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/pylab_examples/text_rotation_relative_to_line.py - -:: - - #!/usr/bin/env python - """ - Text objects in matplotlib are normally rotated with respect to the - screen coordinate system (i.e., 45 degrees rotation plots text along a - line that is in between horizontal and vertical no matter how the axes - are changed). However, at times one wants to rotate text with respect - to something on the plot. In this case, the correct angle won't be - the angle of that object in the plot coordinate system, but the angle - that that object APPEARS in the screen coordinate system. This angle - is found by transforming the angle from the plot to the screen - coordinate system, as shown in the example below. - """ - from pylab import * - - # Plot diagonal line (45 degrees) - h = plot( r_[:10], r_[:10] ) - - # set limits so that it no longer looks on screen to be 45 degrees - xlim([-10,20]) - - # Locations to plot text - l1 = array((1,1)) - l2 = array((5,5)) - - # Rotate angle - angle = 45 - trans_angle = gca().transData.transform_angles(array((45,)), - l2.reshape((1,2)))[0] - - # Plot text - th1 = text(l1[0],l1[1],'text not rotated correctly',fontsize=16, - rotation=angle) - th2 = text(l2[0],l2[1],'text not rotated correctly',fontsize=16, - rotation=trans_angle) - - show() - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/pylab_examples/text_themes.txt b/dev/_sources/examples/pylab_examples/text_themes.txt deleted file mode 100644 index 2eafa54601c..00000000000 --- a/dev/_sources/examples/pylab_examples/text_themes.txt +++ /dev/null @@ -1,38 +0,0 @@ -.. _pylab_examples-text_themes: - -pylab_examples example code: text_themes.py -=========================================== - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/pylab_examples/text_themes.py - -:: - - #!/usr/bin/env python - from pylab import * - - font = {'family' : 'serif', - 'color' : 'r', - 'weight' : 'normal', - 'size' : 12, - } - - def f(t): - s1 = cos(2*pi*t) - e1 = exp(-t) - return multiply(s1,e1) - - t1 = arange(0.0, 5.0, 0.1) - t2 = arange(0.0, 5.0, 0.02) - - plot(t1, f(t1), 'bo', t2, f(t2), 'k') - title('Damped exponential decay', font, size='large', color='r') - text(2, 0.65, r'$\cos(2 \pi t) \exp(-t)$', color='k') - xlabel('time (s)', font, style='italic') - ylabel('voltage (mV)', font) - - show() - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/pylab_examples/titles_demo.txt b/dev/_sources/examples/pylab_examples/titles_demo.txt deleted file mode 100644 index 979c2124d26..00000000000 --- a/dev/_sources/examples/pylab_examples/titles_demo.txt +++ /dev/null @@ -1,29 +0,0 @@ -.. _pylab_examples-titles_demo: - -pylab_examples example code: titles_demo.py -=========================================== - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/pylab_examples/titles_demo.py - -:: - - #!/usr/bin/env python - """ - matplotlib can display plot titles centered, flush with the left side of - a set of axes, and flush with the right side of a set of axes. - - """ - import matplotlib.pyplot as plt - - plt.plot(range(10)) - - plt.title('Center Title') - plt.title('Left Title', loc='left') - plt.title('Right Title', loc='right') - - plt.show() - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/pylab_examples/to_numeric.txt b/dev/_sources/examples/pylab_examples/to_numeric.txt deleted file mode 100644 index 32e5fe74c62..00000000000 --- a/dev/_sources/examples/pylab_examples/to_numeric.txt +++ /dev/null @@ -1,48 +0,0 @@ -.. _pylab_examples-to_numeric: - -pylab_examples example code: to_numeric.py -========================================== - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/pylab_examples/to_numeric.py - -:: - - #!/usr/bin/env python - """ - Use backend agg to access the figure canvas as an RGB string and then - convert it to an array and pass the string it to PIL for - rendering - """ - - import pylab - from matplotlib.backends.backend_agg import FigureCanvasAgg - - try: - from PIL import Image - except ImportError: - raise SystemExit("PIL must be installed to run this example") - - pylab.plot([1,2,3]) - - canvas = pylab.get_current_fig_manager().canvas - - agg = canvas.switch_backends(FigureCanvasAgg) - agg.draw() - s = agg.tostring_rgb() - - # get the width and the height to resize the matrix - l,b,w,h = agg.figure.bbox.bounds - w, h = int(w), int(h) - - - X = pylab.fromstring(s, pylab.uint8) - X.shape = h, w, 3 - - im = Image.fromstring( "RGB", (w,h), s) - im.show() - - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/pylab_examples/toggle_images.txt b/dev/_sources/examples/pylab_examples/toggle_images.txt deleted file mode 100644 index e0df3f06fb3..00000000000 --- a/dev/_sources/examples/pylab_examples/toggle_images.txt +++ /dev/null @@ -1,58 +0,0 @@ -.. _pylab_examples-toggle_images: - -pylab_examples example code: toggle_images.py -============================================= - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/pylab_examples/toggle_images.py - -:: - - #!/usr/bin/env python - """ toggle between two images by pressing "t" - - The basic idea is to load two images (they can be different shapes) and plot - them to the same axes with hold "on". Then, toggle the visible property of - them using keypress event handling - - If you want two images with different shapes to be plotted with the same - extent, they must have the same "extent" property - - As usual, we'll define some random images for demo. Real data is much more - exciting! - - Note, on the wx backend on some platforms (eg linux), you have to - first click on the figure before the keypress events are activated. - If you know how to fix this, please email us! - - """ - - from pylab import * - - # two images x1 is initially visible, x2 is not - x1 = rand(100, 100) - x2 = rand(150, 175) - - # arbitrary extent - both images must have same extent if you want - # them to be resampled into the same axes space - extent = (0,1,0,1) - im1 = imshow(x1, extent=extent) - im2 = imshow(x2, extent=extent, hold=True) - im2.set_visible(False) - - def toggle_images(event): - 'toggle the visible state of the two images' - if event.key != 't': return - b1 = im1.get_visible() - b2 = im2.get_visible() - im1.set_visible(not b1) - im2.set_visible(not b2) - draw() - - connect('key_press_event', toggle_images) - - show() - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/pylab_examples/transoffset.txt b/dev/_sources/examples/pylab_examples/transoffset.txt deleted file mode 100644 index dce6bf62227..00000000000 --- a/dev/_sources/examples/pylab_examples/transoffset.txt +++ /dev/null @@ -1,71 +0,0 @@ -.. _pylab_examples-transoffset: - -pylab_examples example code: transoffset.py -=========================================== - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/pylab_examples/transoffset.py - -:: - - #!/usr/bin/env python - - ''' - This illustrates the use of transforms.offset_copy to - make a transform that positions a drawing element such as - a text string at a specified offset in screen coordinates - (dots or inches) relative to a location given in any - coordinates. - - Every Artist--the mpl class from which classes such as - Text and Line are derived--has a transform that can be - set when the Artist is created, such as by the corresponding - pylab command. By default this is usually the Axes.transData - transform, going from data units to screen dots. We can - use the offset_copy function to make a modified copy of - this transform, where the modification consists of an - offset. - ''' - - import pylab as P - from matplotlib.transforms import offset_copy - - X = P.arange(7) - Y = X**2 - - fig = P.figure(figsize=(5,10)) - ax = P.subplot(2,1,1) - - # If we want the same offset for each text instance, - # we only need to make one transform. To get the - # transform argument to offset_copy, we need to make the axes - # first; the subplot command above is one way to do this. - - transOffset = offset_copy(ax.transData, fig=fig, - x = 0.05, y=0.10, units='inches') - - for x, y in zip(X, Y): - P.plot((x,),(y,), 'ro') - P.text(x, y, '%d, %d' % (int(x),int(y)), transform=transOffset) - - - # offset_copy works for polar plots also. - - ax = P.subplot(2,1,2, polar=True) - - transOffset = offset_copy(ax.transData, fig=fig, y = 6, units='dots') - - for x, y in zip(X, Y): - P.polar((x,),(y,), 'ro') - P.text(x, y, '%d, %d' % (int(x),int(y)), - transform=transOffset, - horizontalalignment='center', - verticalalignment='bottom') - - - P.show() - - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/pylab_examples/tricontour_demo.txt b/dev/_sources/examples/pylab_examples/tricontour_demo.txt deleted file mode 100644 index 9da119b2f2f..00000000000 --- a/dev/_sources/examples/pylab_examples/tricontour_demo.txt +++ /dev/null @@ -1,112 +0,0 @@ -.. _pylab_examples-tricontour_demo: - -pylab_examples example code: tricontour_demo.py -=============================================== - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/pylab_examples/tricontour_demo.py - -:: - - """ - Contour plots of unstructured triangular grids. - """ - import matplotlib.pyplot as plt - import matplotlib.tri as tri - import numpy as np - import math - - # Creating a Triangulation without specifying the triangles results in the - # Delaunay triangulation of the points. - - # First create the x and y coordinates of the points. - n_angles = 48 - n_radii = 8 - min_radius = 0.25 - radii = np.linspace(min_radius, 0.95, n_radii) - - angles = np.linspace(0, 2*math.pi, n_angles, endpoint=False) - angles = np.repeat(angles[...,np.newaxis], n_radii, axis=1) - angles[:,1::2] += math.pi/n_angles - - x = (radii*np.cos(angles)).flatten() - y = (radii*np.sin(angles)).flatten() - z = (np.cos(radii)*np.cos(angles*3.0)).flatten() - - # Create the Triangulation; no triangles so Delaunay triangulation created. - triang = tri.Triangulation(x, y) - - # Mask off unwanted triangles. - xmid = x[triang.triangles].mean(axis=1) - ymid = y[triang.triangles].mean(axis=1) - mask = np.where(xmid*xmid + ymid*ymid < min_radius*min_radius, 1, 0) - triang.set_mask(mask) - - # pcolor plot. - plt.figure() - plt.gca().set_aspect('equal') - plt.tricontourf(triang, z) - plt.colorbar() - plt.tricontour(triang, z, colors='k') - plt.title('Contour plot of Delaunay triangulation') - - # You can specify your own triangulation rather than perform a Delaunay - # triangulation of the points, where each triangle is given by the indices of - # the three points that make up the triangle, ordered in either a clockwise or - # anticlockwise manner. - - xy = np.asarray([ - [-0.101,0.872],[-0.080,0.883],[-0.069,0.888],[-0.054,0.890],[-0.045,0.897], - [-0.057,0.895],[-0.073,0.900],[-0.087,0.898],[-0.090,0.904],[-0.069,0.907], - [-0.069,0.921],[-0.080,0.919],[-0.073,0.928],[-0.052,0.930],[-0.048,0.942], - [-0.062,0.949],[-0.054,0.958],[-0.069,0.954],[-0.087,0.952],[-0.087,0.959], - [-0.080,0.966],[-0.085,0.973],[-0.087,0.965],[-0.097,0.965],[-0.097,0.975], - [-0.092,0.984],[-0.101,0.980],[-0.108,0.980],[-0.104,0.987],[-0.102,0.993], - [-0.115,1.001],[-0.099,0.996],[-0.101,1.007],[-0.090,1.010],[-0.087,1.021], - [-0.069,1.021],[-0.052,1.022],[-0.052,1.017],[-0.069,1.010],[-0.064,1.005], - [-0.048,1.005],[-0.031,1.005],[-0.031,0.996],[-0.040,0.987],[-0.045,0.980], - [-0.052,0.975],[-0.040,0.973],[-0.026,0.968],[-0.020,0.954],[-0.006,0.947], - [ 0.003,0.935],[ 0.006,0.926],[ 0.005,0.921],[ 0.022,0.923],[ 0.033,0.912], - [ 0.029,0.905],[ 0.017,0.900],[ 0.012,0.895],[ 0.027,0.893],[ 0.019,0.886], - [ 0.001,0.883],[-0.012,0.884],[-0.029,0.883],[-0.038,0.879],[-0.057,0.881], - [-0.062,0.876],[-0.078,0.876],[-0.087,0.872],[-0.030,0.907],[-0.007,0.905], - [-0.057,0.916],[-0.025,0.933],[-0.077,0.990],[-0.059,0.993] ]) - x = xy[:,0]*180/3.14159 - y = xy[:,1]*180/3.14159 - x0 = -5 - y0 = 52 - z = np.exp(-0.01*( (x-x0)*(x-x0) + (y-y0)*(y-y0) )) - - triangles = np.asarray([ - [67,66, 1],[65, 2,66],[ 1,66, 2],[64, 2,65],[63, 3,64],[60,59,57], - [ 2,64, 3],[ 3,63, 4],[ 0,67, 1],[62, 4,63],[57,59,56],[59,58,56], - [61,60,69],[57,69,60],[ 4,62,68],[ 6, 5, 9],[61,68,62],[69,68,61], - [ 9, 5,70],[ 6, 8, 7],[ 4,70, 5],[ 8, 6, 9],[56,69,57],[69,56,52], - [70,10, 9],[54,53,55],[56,55,53],[68,70, 4],[52,56,53],[11,10,12], - [69,71,68],[68,13,70],[10,70,13],[51,50,52],[13,68,71],[52,71,69], - [12,10,13],[71,52,50],[71,14,13],[50,49,71],[49,48,71],[14,16,15], - [14,71,48],[17,19,18],[17,20,19],[48,16,14],[48,47,16],[47,46,16], - [16,46,45],[23,22,24],[21,24,22],[17,16,45],[20,17,45],[21,25,24], - [27,26,28],[20,72,21],[25,21,72],[45,72,20],[25,28,26],[44,73,45], - [72,45,73],[28,25,29],[29,25,31],[43,73,44],[73,43,40],[72,73,39], - [72,31,25],[42,40,43],[31,30,29],[39,73,40],[42,41,40],[72,33,31], - [32,31,33],[39,38,72],[33,72,38],[33,38,34],[37,35,38],[34,38,35], - [35,37,36] ]) - - # Rather than create a Triangulation object, can simply pass x, y and triangles - # arrays to tripcolor directly. It would be better to use a Triangulation object - # if the same triangulation was to be used more than once to save duplicated - # calculations. - plt.figure() - plt.gca().set_aspect('equal') - plt.tricontourf(x, y, triangles, z) - plt.colorbar() - plt.title('Contour plot of user-specified triangulation') - plt.xlabel('Longitude (degrees)') - plt.ylabel('Latitude (degrees)') - - plt.show() - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/pylab_examples/tricontour_smooth_delaunay.txt b/dev/_sources/examples/pylab_examples/tricontour_smooth_delaunay.txt deleted file mode 100644 index ab4e0b2f5cf..00000000000 --- a/dev/_sources/examples/pylab_examples/tricontour_smooth_delaunay.txt +++ /dev/null @@ -1,147 +0,0 @@ -.. _pylab_examples-tricontour_smooth_delaunay: - -pylab_examples example code: tricontour_smooth_delaunay.py -========================================================== - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/pylab_examples/tricontour_smooth_delaunay.py - -:: - - """ - Demonstrates high-resolution tricontouring of a random set of points ; - a matplotlib.tri.TriAnalyzer is used to improve the plot quality. - - The initial data points and triangular grid for this demo are: - - a set of random points is instantiated, inside [-1, 1] x [-1, 1] square - - A Delaunay triangulation of these points is then computed, of which a - random subset of triangles is masked out by the user (based on - *init_mask_frac* parameter). This simulates invalidated data. - - The proposed generic procedure to obtain a high resolution contouring of such - a data set is the following: - 1) Compute an extended mask with a matplotlib.tri.TriAnalyzer, which will - exclude badly shaped (flat) triangles from the border of the - triangulation. Apply the mask to the triangulation (using set_mask). - 2) Refine and interpolate the data using a - matplotlib.tri.UniformTriRefiner. - 3) Plot the refined data with tricontour. - - """ - from matplotlib.tri import Triangulation, TriAnalyzer, UniformTriRefiner - import matplotlib.pyplot as plt - import matplotlib.cm as cm - import numpy as np - - - #----------------------------------------------------------------------------- - # Analytical test function - #----------------------------------------------------------------------------- - def experiment_res(x, y): - """ An analytic function representing experiment results """ - x = 2.*x - r1 = np.sqrt((0.5-x)**2 + (0.5-y)**2) - theta1 = np.arctan2(0.5-x, 0.5-y) - r2 = np.sqrt((-x-0.2)**2 + (-y-0.2)**2) - theta2 = np.arctan2(-x-0.2, -y-0.2) - z = (4*(np.exp((r1/10)**2)-1)*30. * np.cos(3*theta1) + - (np.exp((r2/10)**2)-1)*30. * np.cos(5*theta2) + - 2*(x**2 + y**2)) - return (np.max(z)-z)/(np.max(z)-np.min(z)) - - #----------------------------------------------------------------------------- - # Generating the initial data test points and triangulation for the demo - #----------------------------------------------------------------------------- - # User parameters for data test points - n_test = 200 # Number of test data points, tested from 3 to 5000 for subdiv=3 - - subdiv = 3 # Number of recursive subdivisions of the initial mesh for smooth - # plots. Values >3 might result in a very high number of triangles - # for the refine mesh: new triangles numbering = (4**subdiv)*ntri - - init_mask_frac = 0.0 # Float > 0. adjusting the proportion of - # (invalid) initial triangles which will be masked - # out. Enter 0 for no mask. - - min_circle_ratio = .01 # Minimum circle ratio - border triangles with circle - # ratio below this will be masked if they touch a - # border. Suggested value 0.01 ; Use -1 to keep - # all triangles. - - # Random points - random_gen = np.random.mtrand.RandomState(seed=127260) - x_test = random_gen.uniform(-1., 1., size=n_test) - y_test = random_gen.uniform(-1., 1., size=n_test) - z_test = experiment_res(x_test, y_test) - - # meshing with Delaunay triangulation - tri = Triangulation(x_test, y_test) - ntri = tri.triangles.shape[0] - - # Some invalid data are masked out - mask_init = np.zeros(ntri, dtype=np.bool) - masked_tri = random_gen.randint(0, ntri, int(ntri*init_mask_frac)) - mask_init[masked_tri] = True - tri.set_mask(mask_init) - - - #----------------------------------------------------------------------------- - # Improving the triangulation before high-res plots: removing flat triangles - #----------------------------------------------------------------------------- - # masking badly shaped triangles at the border of the triangular mesh. - mask = TriAnalyzer(tri).get_flat_tri_mask(min_circle_ratio) - tri.set_mask(mask) - - # refining the data - refiner = UniformTriRefiner(tri) - tri_refi, z_test_refi = refiner.refine_field(z_test, subdiv=subdiv) - - # analytical 'results' for comparison - z_expected = experiment_res(tri_refi.x, tri_refi.y) - - # for the demo: loading the 'flat' triangles for plot - flat_tri = Triangulation(x_test, y_test) - flat_tri.set_mask(~mask) - - - #----------------------------------------------------------------------------- - # Now the plots - #----------------------------------------------------------------------------- - # User options for plots - plot_tri = True # plot of the base triangulation - plot_masked_tri = True # plot of the excessively flat excluded triangles - plot_refi_tri = False # plot of the refined triangulation - plot_expected = False # plot of the analytical function values for comparison - - - # Graphical options for tricontouring - levels = np.arange(0., 1., 0.025) - cmap = cm.get_cmap(name='Blues', lut=None) - - plt.figure() - plt.gca().set_aspect('equal') - plt.title("Filtering a Delaunay mesh\n" + - "(application to high-resolution tricontouring)") - - # 1) plot of the refined (computed) data countours: - plt.tricontour(tri_refi, z_test_refi, levels=levels, cmap=cmap, - linewidths=[2.0, 0.5, 1.0, 0.5]) - # 2) plot of the expected (analytical) data countours (dashed): - if plot_expected: - plt.tricontour(tri_refi, z_expected, levels=levels, cmap=cmap, - linestyles='--') - # 3) plot of the fine mesh on which interpolation was done: - if plot_refi_tri: - plt.triplot(tri_refi, color='0.97') - # 4) plot of the initial 'coarse' mesh: - if plot_tri: - plt.triplot(tri, color='0.7') - # 4) plot of the unvalidated triangles from naive Delaunay Triangulation: - if plot_masked_tri: - plt.triplot(flat_tri, color='red') - - plt.show() - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/pylab_examples/tricontour_smooth_user.txt b/dev/_sources/examples/pylab_examples/tricontour_smooth_user.txt deleted file mode 100644 index 6c48d1d0f40..00000000000 --- a/dev/_sources/examples/pylab_examples/tricontour_smooth_user.txt +++ /dev/null @@ -1,90 +0,0 @@ -.. _pylab_examples-tricontour_smooth_user: - -pylab_examples example code: tricontour_smooth_user.py -====================================================== - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/pylab_examples/tricontour_smooth_user.py - -:: - - """ - Demonstrates high-resolution tricontouring on user-defined triangular grids - with matplotlib.tri.UniformTriRefiner - """ - from matplotlib.tri import Triangulation, UniformTriRefiner - import matplotlib.pyplot as plt - import matplotlib.cm as cm - import numpy as np - import math - - - #----------------------------------------------------------------------------- - # Analytical test function - #----------------------------------------------------------------------------- - def function_z(x, y): - """ A function of 2 variables """ - r1 = np.sqrt((0.5-x)**2 + (0.5-y)**2) - theta1 = np.arctan2(0.5-x, 0.5-y) - r2 = np.sqrt((-x-0.2)**2 + (-y-0.2)**2) - theta2 = np.arctan2(-x-0.2, -y-0.2) - z = -(2*(np.exp((r1/10)**2)-1)*30. * np.cos(7.*theta1) + - (np.exp((r2/10)**2)-1)*30. * np.cos(11.*theta2) + - 0.7*(x**2 + y**2)) - return (np.max(z)-z)/(np.max(z)-np.min(z)) - - #----------------------------------------------------------------------------- - # Creating a Triangulation - #----------------------------------------------------------------------------- - # First create the x and y coordinates of the points. - n_angles = 20 - n_radii = 10 - min_radius = 0.15 - radii = np.linspace(min_radius, 0.95, n_radii) - - angles = np.linspace(0, 2*math.pi, n_angles, endpoint=False) - angles = np.repeat(angles[..., np.newaxis], n_radii, axis=1) - angles[:, 1::2] += math.pi/n_angles - - x = (radii*np.cos(angles)).flatten() - y = (radii*np.sin(angles)).flatten() - z = function_z(x, y) - - # Now create the Triangulation. - # (Creating a Triangulation without specifying the triangles results in the - # Delaunay triangulation of the points.) - triang = Triangulation(x, y) - - # Mask off unwanted triangles. - xmid = x[triang.triangles].mean(axis=1) - ymid = y[triang.triangles].mean(axis=1) - mask = np.where(xmid*xmid + ymid*ymid < min_radius*min_radius, 1, 0) - triang.set_mask(mask) - - #----------------------------------------------------------------------------- - # Refine data - #----------------------------------------------------------------------------- - refiner = UniformTriRefiner(triang) - tri_refi, z_test_refi = refiner.refine_field(z, subdiv=3) - - #----------------------------------------------------------------------------- - # Plot the triangulation and the high-res iso-contours - #----------------------------------------------------------------------------- - plt.figure() - plt.gca().set_aspect('equal') - plt.triplot(triang, lw=0.5, color='white') - - levels = np.arange(0., 1., 0.025) - cmap = cm.get_cmap(name='terrain', lut=None) - plt.tricontourf(tri_refi, z_test_refi, levels=levels, cmap=cmap) - plt.tricontour(tri_refi, z_test_refi, levels=levels, - colors=['0.25', '0.5', '0.5', '0.5', '0.5'], - linewidths=[1.0, 0.5, 0.5, 0.5, 0.5]) - - plt.title("High-resolution tricontouring") - - plt.show() - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/pylab_examples/tricontour_vs_griddata.txt b/dev/_sources/examples/pylab_examples/tricontour_vs_griddata.txt deleted file mode 100644 index a9d0edacc98..00000000000 --- a/dev/_sources/examples/pylab_examples/tricontour_vs_griddata.txt +++ /dev/null @@ -1,64 +0,0 @@ -.. _pylab_examples-tricontour_vs_griddata: - -pylab_examples example code: tricontour_vs_griddata.py -====================================================== - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/pylab_examples/tricontour_vs_griddata.py - -:: - - """ - Comparison of griddata and tricontour for an unstructured triangular grid. - """ - from __future__ import print_function - import matplotlib.pyplot as plt - import matplotlib.tri as tri - import numpy as np - from numpy.random import uniform, seed - from matplotlib.mlab import griddata - import time - - seed(0) - npts = 200 - ngridx = 100 - ngridy = 200 - x = uniform(-2,2,npts) - y = uniform(-2,2,npts) - z = x*np.exp(-x**2-y**2) - - # griddata and contour. - start = time.clock() - plt.subplot(211) - xi = np.linspace(-2.1,2.1,ngridx) - yi = np.linspace(-2.1,2.1,ngridy) - zi = griddata(x,y,z,xi,yi,interp='linear') - plt.contour(xi,yi,zi,15,linewidths=0.5,colors='k') - plt.contourf(xi,yi,zi,15,cmap=plt.cm.rainbow, - norm=plt.normalize(vmax=abs(zi).max(), vmin=-abs(zi).max())) - plt.colorbar() # draw colorbar - plt.plot(x, y, 'ko', ms=3) - plt.xlim(-2,2) - plt.ylim(-2,2) - plt.title('griddata and contour (%d points, %d grid points)' % (npts, ngridx*ngridy)) - print ('griddata and contour seconds: %f' % (time.clock() - start)) - - # tricontour. - start = time.clock() - plt.subplot(212) - triang = tri.Triangulation(x, y) - plt.tricontour(x, y, z, 15, linewidths=0.5, colors='k') - plt.tricontourf(x, y, z, 15, cmap=plt.cm.rainbow, - norm=plt.normalize(vmax=abs(zi).max(), vmin=-abs(zi).max())) - plt.colorbar() - plt.plot(x, y, 'ko', ms=3) - plt.xlim(-2,2) - plt.ylim(-2,2) - plt.title('tricontour (%d points)' % npts) - print ('tricontour seconds: %f' % (time.clock() - start)) - - plt.show() - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/pylab_examples/trigradient_demo.txt b/dev/_sources/examples/pylab_examples/trigradient_demo.txt deleted file mode 100644 index 7e014f7fefb..00000000000 --- a/dev/_sources/examples/pylab_examples/trigradient_demo.txt +++ /dev/null @@ -1,95 +0,0 @@ -.. _pylab_examples-trigradient_demo: - -pylab_examples example code: trigradient_demo.py -================================================ - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/pylab_examples/trigradient_demo.py - -:: - - """ - Demonstrates computation of gradient with matplotlib.tri.CubicTriInterpolator. - """ - from matplotlib.tri import Triangulation, UniformTriRefiner,\ - CubicTriInterpolator - import matplotlib.pyplot as plt - import matplotlib.cm as cm - import numpy as np - import math - - - #----------------------------------------------------------------------------- - # Electrical potential of a dipole - #----------------------------------------------------------------------------- - def dipole_potential(x, y): - """ The electric dipole potential V """ - r_sq = x**2 + y**2 - theta = np.arctan2(y, x) - z = np.cos(theta)/r_sq - return (np.max(z)-z) / (np.max(z)-np.min(z)) - - - #----------------------------------------------------------------------------- - # Creating a Triangulation - #----------------------------------------------------------------------------- - # First create the x and y coordinates of the points. - n_angles = 30 - n_radii = 10 - min_radius = 0.2 - radii = np.linspace(min_radius, 0.95, n_radii) - - angles = np.linspace(0, 2*math.pi, n_angles, endpoint=False) - angles = np.repeat(angles[..., np.newaxis], n_radii, axis=1) - angles[:, 1::2] += math.pi/n_angles - - x = (radii*np.cos(angles)).flatten() - y = (radii*np.sin(angles)).flatten() - V = dipole_potential(x, y) - - # Create the Triangulation; no triangles specified so Delaunay triangulation - # created. - triang = Triangulation(x, y) - - # Mask off unwanted triangles. - xmid = x[triang.triangles].mean(axis=1) - ymid = y[triang.triangles].mean(axis=1) - mask = np.where(xmid*xmid + ymid*ymid < min_radius*min_radius, 1, 0) - triang.set_mask(mask) - - #----------------------------------------------------------------------------- - # Refine data - interpolates the electrical potential V - #----------------------------------------------------------------------------- - refiner = UniformTriRefiner(triang) - tri_refi, z_test_refi = refiner.refine_field(V, subdiv=3) - - #----------------------------------------------------------------------------- - # Computes the electrical field (Ex, Ey) as gradient of electrical potential - #----------------------------------------------------------------------------- - tci = CubicTriInterpolator(triang, -V) - # Gradient requested here at the mesh nodes but could be anywhere else: - (Ex, Ey) = tci.gradient(triang.x, triang.y) - E_norm = np.sqrt(Ex**2 + Ey**2) - - #----------------------------------------------------------------------------- - # Plot the triangulation, the potential iso-contours and the vector field - #----------------------------------------------------------------------------- - plt.figure() - plt.gca().set_aspect('equal') - plt.triplot(triang, color='0.8') - - levels = np.arange(0., 1., 0.01) - cmap = cm.get_cmap(name='hot', lut=None) - plt.tricontour(tri_refi, z_test_refi, levels=levels, cmap=cmap, - linewidths=[2.0, 1.0, 1.0, 1.0]) - # Plots direction of the electrical vector field - plt.quiver(triang.x, triang.y, Ex/E_norm, Ey/E_norm, - units='xy', scale=10., zorder=3, color='blue', - width=0.007, headwidth=3., headlength=4.) - - plt.title('Gradient plot: an electrical dipole') - plt.show() - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/pylab_examples/triinterp_demo.txt b/dev/_sources/examples/pylab_examples/triinterp_demo.txt deleted file mode 100644 index b4eb6f5f7b0..00000000000 --- a/dev/_sources/examples/pylab_examples/triinterp_demo.txt +++ /dev/null @@ -1,71 +0,0 @@ -.. _pylab_examples-triinterp_demo: - -pylab_examples example code: triinterp_demo.py -============================================== - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/pylab_examples/triinterp_demo.py - -:: - - """ - Interpolation from triangular grid to quad grid. - """ - import matplotlib.pyplot as plt - import matplotlib.tri as mtri - import numpy as np - - # Create triangulation. - x = np.asarray([0, 1, 2, 3, 0.5, 1.5, 2.5, 1, 2, 1.5]) - y = np.asarray([0, 0, 0, 0, 1.0, 1.0, 1.0, 2, 2, 3.0]) - triangles = [[0, 1, 4], [1, 2, 5], [2, 3, 6], [1, 5, 4], [2, 6, 5], [4, 5, 7], - [5, 6, 8], [5, 8, 7], [7, 8, 9]] - triang = mtri.Triangulation(x, y, triangles) - - # Interpolate to regularly-spaced quad grid. - z = np.cos(1.5*x)*np.cos(1.5*y) - xi, yi = np.meshgrid(np.linspace(0, 3, 20), np.linspace(0, 3, 20)) - - interp_lin = mtri.LinearTriInterpolator(triang, z) - zi_lin = interp_lin(xi, yi) - - interp_cubic_geom = mtri.CubicTriInterpolator(triang, z, kind='geom') - zi_cubic_geom = interp_cubic_geom(xi, yi) - - interp_cubic_min_E = mtri.CubicTriInterpolator(triang, z, kind='min_E') - zi_cubic_min_E = interp_cubic_min_E(xi, yi) - - - # Plot the triangulation. - plt.subplot(221) - plt.tricontourf(triang, z) - plt.triplot(triang, 'ko-') - plt.title('Triangular grid') - - # Plot linear interpolation to quad grid. - plt.subplot(222) - plt.contourf(xi, yi, zi_lin) - plt.plot(xi, yi, 'k-', alpha=0.5) - plt.plot(xi.T, yi.T, 'k-', alpha=0.5) - plt.title("Linear interpolation") - - # Plot cubic interpolation to quad grid, kind=geom - plt.subplot(223) - plt.contourf(xi, yi, zi_cubic_geom) - plt.plot(xi, yi, 'k-', alpha=0.5) - plt.plot(xi.T, yi.T, 'k-', alpha=0.5) - plt.title("Cubic interpolation,\nkind='geom'") - - # Plot cubic interpolation to quad grid, kind=min_E - plt.subplot(224) - plt.contourf(xi, yi, zi_cubic_min_E) - plt.plot(xi, yi, 'k-', alpha=0.5) - plt.plot(xi.T, yi.T, 'k-', alpha=0.5) - plt.title("Cubic interpolation,\nkind='min_E'") - - plt.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/dev/_sources/examples/pylab_examples/tripcolor_demo.txt b/dev/_sources/examples/pylab_examples/tripcolor_demo.txt deleted file mode 100644 index 9d284b60f2e..00000000000 --- a/dev/_sources/examples/pylab_examples/tripcolor_demo.txt +++ /dev/null @@ -1,124 +0,0 @@ -.. _pylab_examples-tripcolor_demo: - -pylab_examples example code: tripcolor_demo.py -============================================== - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/pylab_examples/tripcolor_demo.py - -:: - - """ - Pseudocolor plots of unstructured triangular grids. - """ - import matplotlib.pyplot as plt - import matplotlib.tri as tri - import numpy as np - import math - - # Creating a Triangulation without specifying the triangles results in the - # Delaunay triangulation of the points. - - # First create the x and y coordinates of the points. - n_angles = 36 - n_radii = 8 - min_radius = 0.25 - radii = np.linspace(min_radius, 0.95, n_radii) - - angles = np.linspace(0, 2*math.pi, n_angles, endpoint=False) - angles = np.repeat(angles[...,np.newaxis], n_radii, axis=1) - angles[:,1::2] += math.pi/n_angles - - x = (radii*np.cos(angles)).flatten() - y = (radii*np.sin(angles)).flatten() - z = (np.cos(radii)*np.cos(angles*3.0)).flatten() - - # Create the Triangulation; no triangles so Delaunay triangulation created. - triang = tri.Triangulation(x, y) - - # Mask off unwanted triangles. - xmid = x[triang.triangles].mean(axis=1) - ymid = y[triang.triangles].mean(axis=1) - mask = np.where(xmid*xmid + ymid*ymid < min_radius*min_radius, 1, 0) - triang.set_mask(mask) - - # tripcolor plot. - plt.figure() - plt.gca().set_aspect('equal') - plt.tripcolor(triang, z, shading='flat', cmap=plt.cm.rainbow) - plt.colorbar() - plt.title('tripcolor of Delaunay triangulation, flat shading') - - # Illustrate Gouraud shading. - plt.figure() - plt.gca().set_aspect('equal') - plt.tripcolor(triang, z, shading='gouraud', cmap=plt.cm.rainbow) - plt.colorbar() - plt.title('tripcolor of Delaunay triangulation, gouraud shading') - - - # You can specify your own triangulation rather than perform a Delaunay - # triangulation of the points, where each triangle is given by the indices of - # the three points that make up the triangle, ordered in either a clockwise or - # anticlockwise manner. - - xy = np.asarray([ - [-0.101,0.872],[-0.080,0.883],[-0.069,0.888],[-0.054,0.890],[-0.045,0.897], - [-0.057,0.895],[-0.073,0.900],[-0.087,0.898],[-0.090,0.904],[-0.069,0.907], - [-0.069,0.921],[-0.080,0.919],[-0.073,0.928],[-0.052,0.930],[-0.048,0.942], - [-0.062,0.949],[-0.054,0.958],[-0.069,0.954],[-0.087,0.952],[-0.087,0.959], - [-0.080,0.966],[-0.085,0.973],[-0.087,0.965],[-0.097,0.965],[-0.097,0.975], - [-0.092,0.984],[-0.101,0.980],[-0.108,0.980],[-0.104,0.987],[-0.102,0.993], - [-0.115,1.001],[-0.099,0.996],[-0.101,1.007],[-0.090,1.010],[-0.087,1.021], - [-0.069,1.021],[-0.052,1.022],[-0.052,1.017],[-0.069,1.010],[-0.064,1.005], - [-0.048,1.005],[-0.031,1.005],[-0.031,0.996],[-0.040,0.987],[-0.045,0.980], - [-0.052,0.975],[-0.040,0.973],[-0.026,0.968],[-0.020,0.954],[-0.006,0.947], - [ 0.003,0.935],[ 0.006,0.926],[ 0.005,0.921],[ 0.022,0.923],[ 0.033,0.912], - [ 0.029,0.905],[ 0.017,0.900],[ 0.012,0.895],[ 0.027,0.893],[ 0.019,0.886], - [ 0.001,0.883],[-0.012,0.884],[-0.029,0.883],[-0.038,0.879],[-0.057,0.881], - [-0.062,0.876],[-0.078,0.876],[-0.087,0.872],[-0.030,0.907],[-0.007,0.905], - [-0.057,0.916],[-0.025,0.933],[-0.077,0.990],[-0.059,0.993] ]) - x = xy[:,0]*180/3.14159 - y = xy[:,1]*180/3.14159 - - triangles = np.asarray([ - [67,66, 1],[65, 2,66],[ 1,66, 2],[64, 2,65],[63, 3,64],[60,59,57], - [ 2,64, 3],[ 3,63, 4],[ 0,67, 1],[62, 4,63],[57,59,56],[59,58,56], - [61,60,69],[57,69,60],[ 4,62,68],[ 6, 5, 9],[61,68,62],[69,68,61], - [ 9, 5,70],[ 6, 8, 7],[ 4,70, 5],[ 8, 6, 9],[56,69,57],[69,56,52], - [70,10, 9],[54,53,55],[56,55,53],[68,70, 4],[52,56,53],[11,10,12], - [69,71,68],[68,13,70],[10,70,13],[51,50,52],[13,68,71],[52,71,69], - [12,10,13],[71,52,50],[71,14,13],[50,49,71],[49,48,71],[14,16,15], - [14,71,48],[17,19,18],[17,20,19],[48,16,14],[48,47,16],[47,46,16], - [16,46,45],[23,22,24],[21,24,22],[17,16,45],[20,17,45],[21,25,24], - [27,26,28],[20,72,21],[25,21,72],[45,72,20],[25,28,26],[44,73,45], - [72,45,73],[28,25,29],[29,25,31],[43,73,44],[73,43,40],[72,73,39], - [72,31,25],[42,40,43],[31,30,29],[39,73,40],[42,41,40],[72,33,31], - [32,31,33],[39,38,72],[33,72,38],[33,38,34],[37,35,38],[34,38,35], - [35,37,36] ]) - - xmid = x[triangles].mean(axis=1) - ymid = y[triangles].mean(axis=1) - x0 = -5 - y0 = 52 - zfaces = np.exp(-0.01*( (xmid-x0)*(xmid-x0) + (ymid-y0)*(ymid-y0) )) - - # Rather than create a Triangulation object, can simply pass x, y and triangles - # arrays to tripcolor directly. It would be better to use a Triangulation object - # if the same triangulation was to be used more than once to save duplicated - # calculations. - # Can specify one color value per face rather than one per point by using the - # facecolors kwarg. - plt.figure() - plt.gca().set_aspect('equal') - plt.tripcolor(x, y, triangles, facecolors=zfaces, edgecolors='k') - plt.colorbar() - plt.title('tripcolor of user-specified triangulation') - plt.xlabel('Longitude (degrees)') - plt.ylabel('Latitude (degrees)') - - plt.show() - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/pylab_examples/triplot_demo.txt b/dev/_sources/examples/pylab_examples/triplot_demo.txt deleted file mode 100644 index 71e58851b4e..00000000000 --- a/dev/_sources/examples/pylab_examples/triplot_demo.txt +++ /dev/null @@ -1,106 +0,0 @@ -.. _pylab_examples-triplot_demo: - -pylab_examples example code: triplot_demo.py -============================================ - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/pylab_examples/triplot_demo.py - -:: - - """ - Creating and plotting unstructured triangular grids. - """ - import matplotlib.pyplot as plt - import matplotlib.tri as tri - import numpy as np - import math - - # Creating a Triangulation without specifying the triangles results in the - # Delaunay triangulation of the points. - - # First create the x and y coordinates of the points. - n_angles = 36 - n_radii = 8 - min_radius = 0.25 - radii = np.linspace(min_radius, 0.95, n_radii) - - angles = np.linspace(0, 2*math.pi, n_angles, endpoint=False) - angles = np.repeat(angles[...,np.newaxis], n_radii, axis=1) - angles[:,1::2] += math.pi/n_angles - - x = (radii*np.cos(angles)).flatten() - y = (radii*np.sin(angles)).flatten() - - # Create the Triangulation; no triangles so Delaunay triangulation created. - triang = tri.Triangulation(x, y) - - # Mask off unwanted triangles. - xmid = x[triang.triangles].mean(axis=1) - ymid = y[triang.triangles].mean(axis=1) - mask = np.where(xmid*xmid + ymid*ymid < min_radius*min_radius, 1, 0) - triang.set_mask(mask) - - # Plot the triangulation. - plt.figure() - plt.gca().set_aspect('equal') - plt.triplot(triang, 'bo-') - plt.title('triplot of Delaunay triangulation') - - - # You can specify your own triangulation rather than perform a Delaunay - # triangulation of the points, where each triangle is given by the indices of - # the three points that make up the triangle, ordered in either a clockwise or - # anticlockwise manner. - - xy = np.asarray([ - [-0.101,0.872],[-0.080,0.883],[-0.069,0.888],[-0.054,0.890],[-0.045,0.897], - [-0.057,0.895],[-0.073,0.900],[-0.087,0.898],[-0.090,0.904],[-0.069,0.907], - [-0.069,0.921],[-0.080,0.919],[-0.073,0.928],[-0.052,0.930],[-0.048,0.942], - [-0.062,0.949],[-0.054,0.958],[-0.069,0.954],[-0.087,0.952],[-0.087,0.959], - [-0.080,0.966],[-0.085,0.973],[-0.087,0.965],[-0.097,0.965],[-0.097,0.975], - [-0.092,0.984],[-0.101,0.980],[-0.108,0.980],[-0.104,0.987],[-0.102,0.993], - [-0.115,1.001],[-0.099,0.996],[-0.101,1.007],[-0.090,1.010],[-0.087,1.021], - [-0.069,1.021],[-0.052,1.022],[-0.052,1.017],[-0.069,1.010],[-0.064,1.005], - [-0.048,1.005],[-0.031,1.005],[-0.031,0.996],[-0.040,0.987],[-0.045,0.980], - [-0.052,0.975],[-0.040,0.973],[-0.026,0.968],[-0.020,0.954],[-0.006,0.947], - [ 0.003,0.935],[ 0.006,0.926],[ 0.005,0.921],[ 0.022,0.923],[ 0.033,0.912], - [ 0.029,0.905],[ 0.017,0.900],[ 0.012,0.895],[ 0.027,0.893],[ 0.019,0.886], - [ 0.001,0.883],[-0.012,0.884],[-0.029,0.883],[-0.038,0.879],[-0.057,0.881], - [-0.062,0.876],[-0.078,0.876],[-0.087,0.872],[-0.030,0.907],[-0.007,0.905], - [-0.057,0.916],[-0.025,0.933],[-0.077,0.990],[-0.059,0.993] ]) - x = xy[:,0]*180/3.14159 - y = xy[:,1]*180/3.14159 - - triangles = np.asarray([ - [67,66, 1],[65, 2,66],[ 1,66, 2],[64, 2,65],[63, 3,64],[60,59,57], - [ 2,64, 3],[ 3,63, 4],[ 0,67, 1],[62, 4,63],[57,59,56],[59,58,56], - [61,60,69],[57,69,60],[ 4,62,68],[ 6, 5, 9],[61,68,62],[69,68,61], - [ 9, 5,70],[ 6, 8, 7],[ 4,70, 5],[ 8, 6, 9],[56,69,57],[69,56,52], - [70,10, 9],[54,53,55],[56,55,53],[68,70, 4],[52,56,53],[11,10,12], - [69,71,68],[68,13,70],[10,70,13],[51,50,52],[13,68,71],[52,71,69], - [12,10,13],[71,52,50],[71,14,13],[50,49,71],[49,48,71],[14,16,15], - [14,71,48],[17,19,18],[17,20,19],[48,16,14],[48,47,16],[47,46,16], - [16,46,45],[23,22,24],[21,24,22],[17,16,45],[20,17,45],[21,25,24], - [27,26,28],[20,72,21],[25,21,72],[45,72,20],[25,28,26],[44,73,45], - [72,45,73],[28,25,29],[29,25,31],[43,73,44],[73,43,40],[72,73,39], - [72,31,25],[42,40,43],[31,30,29],[39,73,40],[42,41,40],[72,33,31], - [32,31,33],[39,38,72],[33,72,38],[33,38,34],[37,35,38],[34,38,35], - [35,37,36] ]) - - # Rather than create a Triangulation object, can simply pass x, y and triangles - # arrays to triplot directly. It would be better to use a Triangulation object - # if the same triangulation was to be used more than once to save duplicated - # calculations. - plt.figure() - plt.gca().set_aspect('equal') - plt.triplot(x, y, triangles, 'go-') - plt.title('triplot of user-specified triangulation') - plt.xlabel('Longitude (degrees)') - plt.ylabel('Latitude (degrees)') - - plt.show() - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/pylab_examples/unicode_demo.txt b/dev/_sources/examples/pylab_examples/unicode_demo.txt deleted file mode 100644 index e17f4a4a837..00000000000 --- a/dev/_sources/examples/pylab_examples/unicode_demo.txt +++ /dev/null @@ -1,29 +0,0 @@ -.. _pylab_examples-unicode_demo: - -pylab_examples example code: unicode_demo.py -============================================ - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/pylab_examples/unicode_demo.py - -:: - - #!/usr/bin/python - # -*- coding: utf-8 -*- - - from __future__ import unicode_literals - - import pylab - - pylab.plot([1, 2, 4]) - pylab.title('Développés et fabriqués') - pylab.xlabel("réactivité nous permettent d'être sélectionnés et adoptés") - pylab.ylabel('André was here!') - pylab.text( 0.5, 2.5, 'Institut für Festkörperphysik', rotation=45) - pylab.text( 1, 1.5, 'AVA (check kerning)') - - pylab.show() - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/pylab_examples/usetex_baseline_test.txt b/dev/_sources/examples/pylab_examples/usetex_baseline_test.txt deleted file mode 100644 index 2a089a8d192..00000000000 --- a/dev/_sources/examples/pylab_examples/usetex_baseline_test.txt +++ /dev/null @@ -1,94 +0,0 @@ -.. _pylab_examples-usetex_baseline_test: - -pylab_examples example code: usetex_baseline_test.py -==================================================== - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/pylab_examples/usetex_baseline_test.py - -:: - - - import matplotlib - import matplotlib.pyplot as plt - import matplotlib.axes as maxes - - from matplotlib import rcParams - rcParams['text.usetex']=True - rcParams['text.latex.unicode']=True - - class Axes(maxes.Axes): - """ - A hackish way to simultaneously draw texts w/ usetex=True and - usetex=False in the same figure. It does not work in the ps backend. - """ - def __init__(self, *kl, **kw): - self.usetex = kw.pop("usetex", "False") - self.preview = kw.pop("preview", "False") - - maxes.Axes.__init__(self, *kl, **kw) - - def draw(self, renderer): - usetex = plt.rcParams["text.usetex"] - preview = plt.rcParams["text.latex.preview"] - plt.rcParams["text.usetex"] = self.usetex - plt.rcParams["text.latex.preview"] = self.preview - - maxes.Axes.draw(self, renderer) - - plt.rcParams["text.usetex"] = usetex - plt.rcParams["text.latex.preview"] = preview - - Subplot = maxes.subplot_class_factory(Axes) - - - def test_window_extent(ax, usetex, preview): - - va = "baseline" - ax.xaxis.set_visible(False) - ax.yaxis.set_visible(False) - - - #t = ax.text(0., 0., r"mlp", va="baseline", size=150) - text_kw = dict(va=va, - size=50, - bbox=dict(pad=0., ec="k", fc="none")) - - - test_strings = ["lg", r"$\frac{1}{2}\pi$", - r"$p^{3^A}$", r"$p_{3_2}$"] - - ax.axvline(0, color="r") - - for i, s in enumerate(test_strings): - - ax.axhline(i, color="r") - ax.text(0., 3-i, s, **text_kw) - - ax.set_xlim(-0.1,1.1) - ax.set_ylim(-.8,3.9) - - - ax.set_title("usetex=%s\npreview=%s" % (str(usetex), str(preview))) - - - - F = plt.figure(figsize=(2.*3,6.5)) - - for i, usetex, preview in [[0, False, False], - [1, True, False], - [2, True, True]]: - ax = Subplot(F, 1, 3, i+1, usetex=usetex, preview=preview) - F.add_subplot(ax) - F.subplots_adjust(top=0.85) - - test_window_extent(ax, usetex=usetex, preview=preview) - - - 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/dev/_sources/examples/pylab_examples/usetex_demo.txt b/dev/_sources/examples/pylab_examples/usetex_demo.txt deleted file mode 100644 index 3624b856c97..00000000000 --- a/dev/_sources/examples/pylab_examples/usetex_demo.txt +++ /dev/null @@ -1,77 +0,0 @@ -.. _pylab_examples-usetex_demo: - -pylab_examples example code: usetex_demo.py -=========================================== - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/pylab_examples/usetex_demo.py - -:: - - import matplotlib - matplotlib.rc('text', usetex = True) - import pylab - import numpy as np - - ## interface tracking profiles - N = 500 - delta = 0.6 - X = -1 + 2. * np.arange(N) / (N - 1) - pylab.plot(X, (1 - np.tanh(4. * X / delta)) / 2, ## phase field tanh profiles - X, (X + 1) / 2, ## level set distance function - X, (1.4 + np.tanh(4. * X / delta)) / 4, ## composition profile - X, X < 0, 'k--', ## sharp interface - linewidth = 5) - - ## legend - pylab.legend((r'phase field', r'level set', r'composition', r'sharp interface'), shadow = True, loc = (0.01, 0.55)) - - ltext = pylab.gca().get_legend().get_texts() - pylab.setp(ltext[0], fontsize = 20, color = 'b') - pylab.setp(ltext[1], fontsize = 20, color = 'g') - pylab.setp(ltext[2], fontsize = 20, color = 'r') - pylab.setp(ltext[3], fontsize = 20, color = 'k') - - ## the arrow - height = 0.1 - offset = 0.02 - pylab.plot((-delta / 2., delta / 2), (height, height), 'k', linewidth = 2) - pylab.plot((-delta / 2, -delta / 2 + offset * 2), (height, height - offset), 'k', linewidth = 2) - pylab.plot((-delta / 2, -delta / 2 + offset * 2), (height, height + offset), 'k', linewidth = 2) - pylab.plot((delta / 2, delta / 2 - offset * 2), (height, height - offset), 'k', linewidth = 2) - pylab.plot((delta / 2, delta / 2 - offset * 2), (height, height + offset), 'k', linewidth = 2) - pylab.text(-0.06, height - 0.06, r'$\delta$', {'color' : 'k', 'fontsize' : 24}) - - ## X-axis label - pylab.xticks((-1, 0, 1), ('-1', '0', '1'), color = 'k', size = 20) - - ## Left Y-axis labels - pylab.ylabel(r'\bf{phase field} $\phi$', {'color' : 'b', - 'fontsize' : 20 }) - pylab.yticks((0, 0.5, 1), ('0', '.5', '1'), color = 'k', size = 20) - - ## Right Y-axis labels - pylab.text(1.05, 0.5, r"\bf{level set} $\phi$", {'color' : 'g', 'fontsize' : 20}, - horizontalalignment = 'left', - verticalalignment = 'center', - rotation = 90, - clip_on = False) - pylab.text(1.01, -0.02, "-1", {'color' : 'k', 'fontsize' : 20}) - pylab.text(1.01, 0.98, "1", {'color' : 'k', 'fontsize' : 20}) - pylab.text(1.01, 0.48, "0", {'color' : 'k', 'fontsize' : 20}) - - ## level set equations - pylab.text(0.1, 0.85, r'$|\nabla\phi| = 1,$ \newline $ \frac{\partial \phi}{\partial t} + U|\nabla \phi| = 0$', {'color' : 'g', 'fontsize' : 20}) - - ## phase field equations - pylab.text(0.2, 0.15, r'$\mathcal{F} = \int f\left( \phi, c \right) dV,$ \newline $ \frac{ \partial \phi } { \partial t } = -M_{ \phi } \frac{ \delta \mathcal{F} } { \delta \phi }$', {'color' : 'b', 'fontsize' : 20}) - - ## these went wrong in pdf in a previous version - pylab.text(-.9,.42,r'gamma: $\gamma$', {'color': 'r', 'fontsize': 20}) - pylab.text(-.9,.36,r'Omega: $\Omega$', {'color': 'b', 'fontsize': 20}) - - pylab.show() - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/pylab_examples/usetex_fonteffects.txt b/dev/_sources/examples/pylab_examples/usetex_fonteffects.txt deleted file mode 100644 index 79759bfb227..00000000000 --- a/dev/_sources/examples/pylab_examples/usetex_fonteffects.txt +++ /dev/null @@ -1,36 +0,0 @@ -.. _pylab_examples-usetex_fonteffects: - -pylab_examples example code: usetex_fonteffects.py -================================================== - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/pylab_examples/usetex_fonteffects.py - -:: - - # This script demonstrates that font effects specified in your pdftex.map - # are now supported in pdf usetex. - - import matplotlib - matplotlib.rc('text', usetex=True) - import pylab - - def setfont(font): - return r'\font\a %s at 14pt\a ' % font - - for y, font, text in zip(range(5), - ['ptmr8r', 'ptmri8r', 'ptmro8r', 'ptmr8rn', 'ptmrr8re'], - ['Nimbus Roman No9 L ' + x for x in - ['', 'Italics (real italics for comparison)', - '(slanted)', '(condensed)', '(extended)']]): - pylab.text(0, y, setfont(font) + text) - - pylab.ylim(-1, 5) - pylab.xlim(-0.2, 0.6) - pylab.setp(pylab.gca(), frame_on=False, xticks=(), yticks=()) - pylab.title('Usetex font effects') - pylab.savefig('usetex_fonteffects.pdf') - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/pylab_examples/vertical_ticklabels.txt b/dev/_sources/examples/pylab_examples/vertical_ticklabels.txt deleted file mode 100644 index efad60b4bcf..00000000000 --- a/dev/_sources/examples/pylab_examples/vertical_ticklabels.txt +++ /dev/null @@ -1,21 +0,0 @@ -.. _pylab_examples-vertical_ticklabels: - -pylab_examples example code: vertical_ticklabels.py -=================================================== - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/pylab_examples/vertical_ticklabels.py - -:: - - #!/usr/bin/env python - from pylab import * - - plot([1,2,3,4], [1,4,9,16]) - locs, labels = xticks([1,2,3,4], ['Frogs', 'Hogs', 'Bogs', 'Slogs']) - setp(labels, 'rotation', 'vertical') - show() - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/pylab_examples/vline_demo.txt b/dev/_sources/examples/pylab_examples/vline_demo.txt deleted file mode 100644 index d4060880da3..00000000000 --- a/dev/_sources/examples/pylab_examples/vline_demo.txt +++ /dev/null @@ -1,35 +0,0 @@ -.. _pylab_examples-vline_demo: - -pylab_examples example code: vline_demo.py -========================================== - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/pylab_examples/vline_demo.py - -:: - - #!/usr/bin/env python - from matplotlib.pyplot import * - from numpy import sin, exp, absolute, pi, arange - from numpy.random import normal - - def f(t): - s1 = sin(2*pi*t) - e1 = exp(-t) - return absolute((s1*e1))+.05 - - - t = arange(0.0, 5.0, 0.1) - s = f(t) - nse = normal(0.0, 0.3, t.shape) * s - - plot(t, s+nse, 'b^') - vlines(t, [0], s) - xlabel('time (s)') - title('Comparison of model with data') - show() - - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/pylab_examples/vline_hline_demo.txt b/dev/_sources/examples/pylab_examples/vline_hline_demo.txt deleted file mode 100644 index fe83b9ce162..00000000000 --- a/dev/_sources/examples/pylab_examples/vline_hline_demo.txt +++ /dev/null @@ -1,50 +0,0 @@ -.. _pylab_examples-vline_hline_demo: - -pylab_examples example code: vline_hline_demo.py -================================================ - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/pylab_examples/vline_hline_demo.py - -:: - - #!/usr/bin/env python - - """ - Small demonstration of the hlines and vlines plots. - """ - - from matplotlib import pyplot as plt - from numpy import sin, exp, absolute, pi, arange - from numpy.random import normal - - - def f(t): - s1 = sin(2 * pi * t) - e1 = exp(-t) - return absolute((s1 * e1)) + .05 - - - t = arange(0.0, 5.0, 0.1) - s = f(t) - nse = normal(0.0, 0.3, t.shape) * s - - fig = plt.figure(figsize=(12, 6)) - vax = fig.add_subplot(121) - hax = fig.add_subplot(122) - - vax.plot(t, s + nse, 'b^') - vax.vlines(t, [0], s) - vax.set_xlabel('time (s)') - vax.set_title('Vertical lines demo') - - hax.plot(s + nse, t, 'b^') - hax.hlines(t, [0], s, lw=2) - hax.set_xlabel('time (s)') - hax.set_title('Horizontal lines demo') - - plt.show() - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/pylab_examples/webapp_demo.txt b/dev/_sources/examples/pylab_examples/webapp_demo.txt deleted file mode 100644 index 3c8f35d38c5..00000000000 --- a/dev/_sources/examples/pylab_examples/webapp_demo.txt +++ /dev/null @@ -1,70 +0,0 @@ -.. _pylab_examples-webapp_demo: - -pylab_examples example code: webapp_demo.py -=========================================== - -[`source code `_] - -:: - - #!/usr/bin/env python - # -*- noplot -*- - """ - This example shows how to use the agg backend directly to create - images, which may be of use to web application developers who want - full control over their code without using the pyplot interface to - manage figures, figure closing etc. - - .. note:: - - It is not necessary to avoid using the pyplot interface in order to - create figures without a graphical front-end - simply setting - the backend to "Agg" would be sufficient. - - - It is also worth noting that, because matplotlib can save figures to file-like - object, matplotlib can also be used inside a cgi-script *without* needing to - write a figure to disk. - - """ - - from matplotlib.backends.backend_agg import FigureCanvasAgg - from matplotlib.figure import Figure - import numpy as np - - - def make_fig(): - """ - Make a figure and save it to "webagg.png". - - """ - fig = Figure() - ax = fig.add_subplot(1, 1, 1) - - ax.plot([1, 2, 3], 'ro--', markersize=12, markerfacecolor='g') - - # make a translucent scatter collection - x = np.random.rand(100) - y = np.random.rand(100) - area = np.pi * (10 * np.random.rand(100)) ** 2 # 0 to 10 point radiuses - c = ax.scatter(x, y, area) - c.set_alpha(0.5) - - # add some text decoration - ax.set_title('My first image') - ax.set_ylabel('Some numbers') - ax.set_xticks((.2, .4, .6, .8)) - labels = ax.set_xticklabels(('Bill', 'Fred', 'Ted', 'Ed')) - - # To set object properties, you can either iterate over the - # objects manually, or define you own set command, as in setapi - # above. - for label in labels: - label.set_rotation(45) - label.set_fontsize(12) - - FigureCanvasAgg(fig).print_png('webapp.png', dpi=150) - - make_fig() - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/pylab_examples/xcorr_demo.txt b/dev/_sources/examples/pylab_examples/xcorr_demo.txt deleted file mode 100644 index 7d74cb05126..00000000000 --- a/dev/_sources/examples/pylab_examples/xcorr_demo.txt +++ /dev/null @@ -1,31 +0,0 @@ -.. _pylab_examples-xcorr_demo: - -pylab_examples example code: xcorr_demo.py -========================================== - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/pylab_examples/xcorr_demo.py - -:: - - import matplotlib.pyplot as plt - import numpy as np - - x,y = np.random.randn(2,100) - fig = plt.figure() - ax1 = fig.add_subplot(211) - ax1.xcorr(x, y, usevlines=True, maxlags=50, normed=True, lw=2) - ax1.grid(True) - ax1.axhline(0, color='black', lw=2) - - ax2 = fig.add_subplot(212, sharex=ax1) - ax2.acorr(x, usevlines=True, normed=True, maxlags=50, lw=2) - ax2.grid(True) - ax2.axhline(0, color='black', lw=2) - - plt.show() - - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/pylab_examples/zorder_demo.txt b/dev/_sources/examples/pylab_examples/zorder_demo.txt deleted file mode 100644 index 7b1c5ab48ba..00000000000 --- a/dev/_sources/examples/pylab_examples/zorder_demo.txt +++ /dev/null @@ -1,58 +0,0 @@ -.. _pylab_examples-zorder_demo: - -pylab_examples example code: zorder_demo.py -=========================================== - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/pylab_examples/zorder_demo.py - -:: - - #!/usr/bin/env python - """ - The default drawing order for axes is patches, lines, text. This - order is determined by the zorder attribute. The following defaults - are set - - Artist Z-order - Patch / PatchCollection 1 - Line2D / LineCollection 2 - Text 3 - - You can change the order for individual artists by setting the zorder. Any - individual plot() call can set a value for the zorder of that particular item. - - In the fist subplot below, the lines are drawn above the patch - collection from the scatter, which is the default. - - In the subplot below, the order is reversed. - - The second figure shows how to control the zorder of individual lines. - """ - - from pylab import * - x = rand(20); y = rand(20) - - subplot(211) - plot(x, y, 'r', lw=3) - scatter(x,y,s=120) - - subplot(212) - plot(x, y, 'r', zorder=1, lw=3) - scatter(x,y,s=120, zorder=2) - - # A new figure, with individually ordered items - x=frange(0,2*pi,npts=100) - figure() - plot(x,sin(x),linewidth=10, color='black',label='zorder=10',zorder = 10) # on top - plot(x,cos(1.3*x),linewidth=10, color='red', label='zorder=1',zorder = 1) # bottom - plot(x,sin(2.1*x),linewidth=10, color='green', label='zorder=3',zorder = 3) - axhline(0,linewidth=10, color='blue', label='zorder=2',zorder = 2) - l = legend() - l.set_zorder(20) # put the legend on top - - show() - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/shapes_and_collections/artist_reference.txt b/dev/_sources/examples/shapes_and_collections/artist_reference.txt deleted file mode 100644 index 880cccf89d6..00000000000 --- a/dev/_sources/examples/shapes_and_collections/artist_reference.txt +++ /dev/null @@ -1,118 +0,0 @@ -.. _shapes_and_collections-artist_reference: - -shapes_and_collections example code: artist_reference.py -======================================================== - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/shapes_and_collections/artist_reference.py - -:: - - """ - Reference for matplotlib artists - - This example displays several of matplotlib's graphics primitives (artists) - drawn using matplotlib API. A full list of artists and the documentation is - available at http://matplotlib.org/api/artist_api.html. - - Copyright (c) 2010, Bartosz Telenczuk - BSD License - """ - import matplotlib.pyplot as plt; plt.rcdefaults() - from mpltools import style; style.use('gallery') - - import numpy as np - import matplotlib.pyplot as plt - import matplotlib.path as mpath - import matplotlib.lines as mlines - import matplotlib.patches as mpatches - from matplotlib.collections import PatchCollection - - - def label(xy, text): - y = xy[1] - 0.15 # shift y-value for label so that it's below the artist - plt.text(xy[0], y, text, ha="center", family='sans-serif', size=14) - - - fig, ax = plt.subplots() - # create 3x3 grid to plot the artists - grid = np.mgrid[0.2:0.8:3j, 0.2:0.8:3j].reshape(2, -1).T - - patches = [] - - # add a circle - circle = mpatches.Circle(grid[0], 0.1,ec="none") - patches.append(circle) - label(grid[0], "Circle") - - # add a rectangle - rect = mpatches.Rectangle(grid[1] - [0.025, 0.05], 0.05, 0.1, ec="none") - patches.append(rect) - label(grid[1], "Rectangle") - - # add a wedge - wedge = mpatches.Wedge(grid[2], 0.1, 30, 270, ec="none") - patches.append(wedge) - label(grid[2], "Wedge") - - # add a Polygon - polygon = mpatches.RegularPolygon(grid[3], 5, 0.1) - patches.append(polygon) - label(grid[3], "Polygon") - - #add an ellipse - ellipse = mpatches.Ellipse(grid[4], 0.2, 0.1) - patches.append(ellipse) - label(grid[4], "Ellipse") - - #add an arrow - arrow = mpatches.Arrow(grid[5, 0]-0.05, grid[5, 1]-0.05, 0.1, 0.1, width=0.1) - patches.append(arrow) - label(grid[5], "Arrow") - - # add a path patch - Path = mpath.Path - path_data = [ - (Path.MOVETO, [ 0.018, -0.11 ]), - (Path.CURVE4, [-0.031, -0.051]), - (Path.CURVE4, [-0.115, 0.073]), - (Path.CURVE4, [-0.03 , 0.073]), - (Path.LINETO, [-0.011, 0.039]), - (Path.CURVE4, [ 0.043, 0.121]), - (Path.CURVE4, [ 0.075, -0.005]), - (Path.CURVE4, [ 0.035, -0.027]), - (Path.CLOSEPOLY, [0.018, -0.11]) - ] - codes, verts = zip(*path_data) - path = mpath.Path(verts + grid[6], codes) - patch = mpatches.PathPatch(path) - patches.append(patch) - label(grid[6], "PathPatch") - - # add a fancy box - fancybox = mpatches.FancyBboxPatch( - grid[7] - [0.025, 0.05], 0.05, 0.1, - boxstyle=mpatches.BoxStyle("Round", pad=0.02)) - patches.append(fancybox) - label(grid[7], "FancyBoxPatch") - - # add a line - x,y = np.array([[-0.06, 0.0, 0.1], [0.05, -0.05, 0.05]]) - line = mlines.Line2D(x + grid[8, 0], y + grid[8, 1], lw=5., alpha=0.3) - label(grid[8], "Line2D") - - colors = np.linspace(0, 1, len(patches)) - collection = PatchCollection(patches, cmap=plt.cm.hsv, alpha=0.3) - collection.set_array(np.array(colors)) - ax.add_collection(collection) - ax.add_line(line) - - plt.subplots_adjust(left=0, right=1, bottom=0, top=1) - plt.axis('equal') - plt.axis('off') - - plt.show() - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/shapes_and_collections/index.txt b/dev/_sources/examples/shapes_and_collections/index.txt deleted file mode 100644 index 1c625ab3397..00000000000 --- a/dev/_sources/examples/shapes_and_collections/index.txt +++ /dev/null @@ -1,17 +0,0 @@ -.. _shapes_and_collections-examples-index: - -############################################## -shapes_and_collections Examples -############################################## - -.. htmlonly:: - - :Release: |version| - :Date: |today| - -.. toctree:: - :maxdepth: 1 - - artist_reference - path_patch_demo - scatter_demo diff --git a/dev/_sources/examples/shapes_and_collections/path_patch_demo.txt b/dev/_sources/examples/shapes_and_collections/path_patch_demo.txt deleted file mode 100644 index 1cc5774fbd6..00000000000 --- a/dev/_sources/examples/shapes_and_collections/path_patch_demo.txt +++ /dev/null @@ -1,48 +0,0 @@ -.. _shapes_and_collections-path_patch_demo: - -shapes_and_collections example code: path_patch_demo.py -======================================================= - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/shapes_and_collections/path_patch_demo.py - -:: - - """ - Demo of a PathPatch object. - """ - import matplotlib.path as mpath - import matplotlib.patches as mpatches - import matplotlib.pyplot as plt - - - fig, ax = plt.subplots() - - Path = mpath.Path - path_data = [ - (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(*path_data) - path = mpath.Path(verts, codes) - patch = mpatches.PathPatch(path, facecolor='r', alpha=0.5) - ax.add_patch(patch) - - # plot control points and connecting lines - x, y = zip(*path.vertices) - line, = ax.plot(x, y, 'go-') - - ax.grid() - ax.axis('equal') - plt.show() - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/shapes_and_collections/scatter_demo.txt b/dev/_sources/examples/shapes_and_collections/scatter_demo.txt deleted file mode 100644 index 5f1422ef99e..00000000000 --- a/dev/_sources/examples/shapes_and_collections/scatter_demo.txt +++ /dev/null @@ -1,28 +0,0 @@ -.. _shapes_and_collections-scatter_demo: - -shapes_and_collections example code: scatter_demo.py -==================================================== - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/shapes_and_collections/scatter_demo.py - -:: - - """ - Simple demo of a scatter plot. - """ - import numpy as np - import matplotlib.pyplot as plt - - - N = 50 - x = np.random.rand(N) - y = np.random.rand(N) - area = np.pi * (15 * np.random.rand(N))**2 # 0 to 15 point radiuses - - plt.scatter(x, y, s=area, 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/dev/_sources/examples/showcase/index.txt b/dev/_sources/examples/showcase/index.txt deleted file mode 100644 index 38bc13e881c..00000000000 --- a/dev/_sources/examples/showcase/index.txt +++ /dev/null @@ -1,15 +0,0 @@ -.. _showcase-examples-index: - -############################################## -showcase Examples -############################################## - -.. htmlonly:: - - :Release: |version| - :Date: |today| - -.. toctree:: - :maxdepth: 1 - - integral_demo diff --git a/dev/_sources/examples/showcase/integral_demo.txt b/dev/_sources/examples/showcase/integral_demo.txt deleted file mode 100644 index d0d20400fa5..00000000000 --- a/dev/_sources/examples/showcase/integral_demo.txt +++ /dev/null @@ -1,65 +0,0 @@ -.. _showcase-integral_demo: - -showcase example code: integral_demo.py -======================================= - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/showcase/integral_demo.py - -:: - - """ - Plot demonstrating the integral as the area under a curve. - - Although this is a simple example, it demonstrates some important tweaks: - - * A simple line plot with custom color and line width. - * A shaded region created using a Polygon patch. - * A text label with mathtext rendering. - * figtext calls to label the x- and y-axes. - * Use of axis spines to hide the top and right spines. - * Custom tick placement and labels. - """ - import numpy as np - import matplotlib.pyplot as plt - from matplotlib.patches import Polygon - - - def func(x): - return (x - 3) * (x - 5) * (x - 7) + 85 - - - a, b = 2, 9 # integral limits - x = np.linspace(0, 10) - y = func(x) - - fig, ax = plt.subplots() - plt.plot(x, y, 'r', linewidth=2) - plt.ylim(ymin=0) - - # Make the shaded region - ix = np.linspace(a, b) - iy = func(ix) - verts = [(a, 0)] + list(zip(ix, iy)) + [(b, 0)] - poly = Polygon(verts, facecolor='0.9', edgecolor='0.5') - ax.add_patch(poly) - - plt.text(0.5 * (a + b), 30, r"$\int_a^b f(x)\mathrm{d}x$", - horizontalalignment='center', fontsize=20) - - plt.figtext(0.9, 0.05, '$x$') - plt.figtext(0.1, 0.9, '$y$') - - ax.spines['right'].set_visible(False) - ax.spines['top'].set_visible(False) - ax.xaxis.set_ticks_position('bottom') - - ax.set_xticks((a, b)) - ax.set_xticklabels(('$a$', '$b$')) - 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/dev/_sources/examples/specialty_plots/hinton_demo.txt b/dev/_sources/examples/specialty_plots/hinton_demo.txt deleted file mode 100644 index c44fc53317c..00000000000 --- a/dev/_sources/examples/specialty_plots/hinton_demo.txt +++ /dev/null @@ -1,55 +0,0 @@ -.. _specialty_plots-hinton_demo: - -specialty_plots example code: hinton_demo.py -============================================ - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/specialty_plots/hinton_demo.py - -:: - - """ - Demo of a function to create Hinton diagrams. - - Hinton diagrams are useful for visualizing the values of a 2D array (e.g. - a weight matrix): Positive and negative values are represented by white and - black squares, respectively, and the size of each square represents the - magnitude of each value. - - Initial idea from David Warde-Farley on the SciPy Cookbook - """ - import numpy as np - import matplotlib.pyplot as plt - - - def hinton(matrix, max_weight=None, ax=None): - """Draw Hinton diagram for visualizing a weight matrix.""" - ax = ax if ax is not None else plt.gca() - - if not max_weight: - max_weight = 2**np.ceil(np.log(np.abs(matrix).max())/np.log(2)) - - ax.patch.set_facecolor('gray') - ax.set_aspect('equal', 'box') - ax.xaxis.set_major_locator(plt.NullLocator()) - ax.yaxis.set_major_locator(plt.NullLocator()) - - for (x,y),w in np.ndenumerate(matrix): - color = 'white' if w > 0 else 'black' - size = np.sqrt(np.abs(w)) - rect = plt.Rectangle([x - size / 2, y - size / 2], size, size, - facecolor=color, edgecolor=color) - ax.add_patch(rect) - - ax.autoscale_view() - ax.invert_yaxis() - - - if __name__ == '__main__': - hinton(np.random.rand(20, 20) - 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/dev/_sources/examples/specialty_plots/index.txt b/dev/_sources/examples/specialty_plots/index.txt deleted file mode 100644 index 6c63cf065e9..00000000000 --- a/dev/_sources/examples/specialty_plots/index.txt +++ /dev/null @@ -1,15 +0,0 @@ -.. _specialty_plots-examples-index: - -############################################## -specialty_plots Examples -############################################## - -.. htmlonly:: - - :Release: |version| - :Date: |today| - -.. toctree:: - :maxdepth: 1 - - hinton_demo diff --git a/dev/_sources/examples/statistics/errorbar_demo.txt b/dev/_sources/examples/statistics/errorbar_demo.txt deleted file mode 100644 index c9af0863fd3..00000000000 --- a/dev/_sources/examples/statistics/errorbar_demo.txt +++ /dev/null @@ -1,27 +0,0 @@ -.. _statistics-errorbar_demo: - -statistics example code: errorbar_demo.py -========================================= - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/statistics/errorbar_demo.py - -:: - - """ - Demo of the errorbar function. - """ - import numpy as np - import matplotlib.pyplot as plt - - # example data - x = np.arange(0.1, 4, 0.5) - y = np.exp(-x) - - plt.errorbar(x, y, xerr=0.2, yerr=0.4) - plt.show() - - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/statistics/errorbar_demo_features.txt b/dev/_sources/examples/statistics/errorbar_demo_features.txt deleted file mode 100644 index 3f08e63eaa3..00000000000 --- a/dev/_sources/examples/statistics/errorbar_demo_features.txt +++ /dev/null @@ -1,53 +0,0 @@ -.. _statistics-errorbar_demo_features: - -statistics example code: errorbar_demo_features.py -================================================== - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/statistics/errorbar_demo_features.py - -:: - - """ - Demo of errorbar function with different ways of specifying error bars. - - Errors can be specified as a constant value (as shown in `errorbar_demo.py`), - or as demonstrated in this example, they can be specified by an N x 1 or 2 x N, - where N is the number of data points. - - N x 1: - Error varies for each point, but the error values are symmetric (i.e. the - lower and upper values are equal). - - 2 x N: - Error varies for each point, and the lower and upper limits (in that order) - are different (asymmetric case) - - In addition, this example demonstrates how to use log scale with errorbar. - """ - import numpy as np - import matplotlib.pyplot as plt - - # example data - x = np.arange(0.1, 4, 0.5) - y = np.exp(-x) - # example error bar values that vary with x-position - error = 0.1 + 0.2 * x - # error bar values w/ different -/+ errors - lower_error = 0.4 * error - upper_error = error - asymmetric_error = [lower_error, upper_error] - - fig, (ax0, ax1) = plt.subplots(nrows=2, sharex=True) - ax0.errorbar(x, y, yerr=error, fmt='-o') - ax0.set_title('variable, symmetric error') - - ax1.errorbar(x, y, xerr=asymmetric_error, fmt='o') - ax1.set_title('variable, asymmetric error') - ax1.set_yscale('log') - plt.show() - - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/statistics/histogram_demo_features.txt b/dev/_sources/examples/statistics/histogram_demo_features.txt deleted file mode 100644 index eb849156670..00000000000 --- a/dev/_sources/examples/statistics/histogram_demo_features.txt +++ /dev/null @@ -1,49 +0,0 @@ -.. _statistics-histogram_demo_features: - -statistics example code: histogram_demo_features.py -=================================================== - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/statistics/histogram_demo_features.py - -:: - - """ - Demo of the histogram (hist) function with a few features. - - In addition to the basic histogram, this demo shows a few optional features: - - * Setting the number of data bins - * The ``normed`` flag, which normalizes bin heights so that the integral of - the histogram is 1. The resulting histogram is a probability density. - * Setting the face color of the bars - * Setting the opacity (alpha value). - - """ - import numpy as np - import matplotlib.mlab as mlab - import matplotlib.pyplot as plt - - - # example data - mu = 100 # mean of distribution - sigma = 15 # standard deviation of distribution - x = mu + sigma * np.random.randn(10000) - - num_bins = 50 - # the histogram of the data - n, bins, patches = plt.hist(x, num_bins, normed=1, facecolor='green', alpha=0.5) - # add a 'best fit' line - y = mlab.normpdf(bins, mu, sigma) - plt.plot(bins, y, 'r--') - plt.xlabel('Smarts') - plt.ylabel('Probability') - plt.title(r'Histogram of IQ: $\mu=100$, $\sigma=15$') - - # Tweak spacing to prevent clipping of ylabel - plt.subplots_adjust(left=0.15) - plt.show() - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/statistics/index.txt b/dev/_sources/examples/statistics/index.txt deleted file mode 100644 index b008ac7ba80..00000000000 --- a/dev/_sources/examples/statistics/index.txt +++ /dev/null @@ -1,17 +0,0 @@ -.. _statistics-examples-index: - -############################################## -statistics Examples -############################################## - -.. htmlonly:: - - :Release: |version| - :Date: |today| - -.. toctree:: - :maxdepth: 1 - - errorbar_demo - errorbar_demo_features - histogram_demo_features diff --git a/dev/_sources/examples/subplots_axes_and_figures/index.txt b/dev/_sources/examples/subplots_axes_and_figures/index.txt deleted file mode 100644 index e934b122a44..00000000000 --- a/dev/_sources/examples/subplots_axes_and_figures/index.txt +++ /dev/null @@ -1,15 +0,0 @@ -.. _subplots_axes_and_figures-examples-index: - -############################################## -subplots_axes_and_figures Examples -############################################## - -.. htmlonly:: - - :Release: |version| - :Date: |today| - -.. toctree:: - :maxdepth: 1 - - subplot_demo diff --git a/dev/_sources/examples/subplots_axes_and_figures/subplot_demo.txt b/dev/_sources/examples/subplots_axes_and_figures/subplot_demo.txt deleted file mode 100644 index 0b7b4c0b17a..00000000000 --- a/dev/_sources/examples/subplots_axes_and_figures/subplot_demo.txt +++ /dev/null @@ -1,38 +0,0 @@ -.. _subplots_axes_and_figures-subplot_demo: - -subplots_axes_and_figures example code: subplot_demo.py -======================================================= - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/subplots_axes_and_figures/subplot_demo.py - -:: - - """ - Simple demo with multiple subplots. - """ - import numpy as np - import matplotlib.pyplot as plt - - - x1 = np.linspace(0.0, 5.0) - x2 = np.linspace(0.0, 2.0) - - y1 = np.cos(2 * np.pi * x1) * np.exp(-x1) - y2 = np.cos(2 * np.pi * x2) - - plt.subplot(2, 1, 1) - plt.plot(x1, y1, 'yo-') - plt.title('A tale of 2 subplots') - plt.ylabel('Damped oscillation') - - plt.subplot(2, 1, 2) - plt.plot(x2, y2, 'r.-') - plt.xlabel('time (s)') - plt.ylabel('Undamped') - - plt.show() - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/tests/backend_driver.txt b/dev/_sources/examples/tests/backend_driver.txt deleted file mode 100644 index ebf16e5dcee..00000000000 --- a/dev/_sources/examples/tests/backend_driver.txt +++ /dev/null @@ -1,538 +0,0 @@ -.. _tests-backend_driver: - -tests example code: backend_driver.py -===================================== - -[`source code `_] - -:: - - #!/usr/bin/env python - - from __future__ import print_function, division - """ - This is used to drive many of the examples across the backends, for - regression testing, and comparing backend efficiency. - - You can specify the backends to be tested either via the --backends - switch, which takes a comma-separated list, or as separate arguments, - e.g. - - python backend_driver.py agg ps - - would test the agg and ps backends. If no arguments are given, a - default list of backends will be tested. - - Interspersed with the backend arguments can be switches for the Python - interpreter executing the tests. If entering such arguments causes an - option parsing error with the driver script, separate them from driver - switches with a --. - """ - - import os - import time - import sys - import glob - from optparse import OptionParser - - import matplotlib.rcsetup as rcsetup - from matplotlib.cbook import Bunch, dedent - - - all_backends = list(rcsetup.all_backends) # to leave the original list alone - - # actual physical directory for each dir - dirs = dict(files=os.path.join('..', 'lines_bars_and_markers'), - shapes=os.path.join('..', 'shapes_and_collections'), - images=os.path.join('..', 'images_contours_and_fields'), - pie=os.path.join('..', 'pie_and_polar_charts'), - text=os.path.join('..', 'text_labels_and_annotations'), - ticks=os.path.join('..', 'ticks_and_spines'), - subplots=os.path.join('..', 'subplots_axes_and_figures'), - specialty=os.path.join('..', 'specialty_plots'), - showcase=os.path.join('..', 'showcase'), - pylab = os.path.join('..', 'pylab_examples'), - api = os.path.join('..', 'api'), - units = os.path.join('..', 'units'), - mplot3d = os.path.join('..', 'mplot3d')) - - - # files in each dir - files = dict() - - files['lines'] = [ - 'barh_demo.py', - 'fill_demo.py', - 'fill_demo_features.py', - 'line_demo_dash_control.py', - ] - - files['shapes'] = [ - 'path_patch_demo.py', - 'scatter_demo.py', - ] - - files['colors'] = [ - 'color_cycle_demo.py', - ] - - files['images'] = [ - 'imshow_demo.py', - ] - - files['statistics'] = [ - 'errorbar_demo.py', - 'errorbar_demo_features.py', - 'histogram_demo_features.py', - ] - - files['pie'] = [ - 'pie_demo.py', - 'polar_bar_demo.py', - 'polar_scatter_demo.py', - ] - - files['text_labels_and_annotations'] = [ - 'text_demo_fontdict.py', - 'unicode_demo.py', - ] - - files['ticks_and_spines'] = [ - 'spines_demo_bounds.py', - 'ticklabels_demo_rotation.py', - ] - - files['subplots_axes_and_figures'] = [ - 'subplot_demo.py', - ] - - files['showcase'] = [ - 'integral_demo.py', - ] - - files['pylab'] = [ - 'accented_text.py', - 'alignment_test.py', - 'annotation_demo.py', - 'annotation_demo.py', - 'annotation_demo2.py', - 'annotation_demo2.py', - 'anscombe.py', - 'arctest.py', - 'arrow_demo.py', - 'axes_demo.py', - 'axes_props.py', - 'axhspan_demo.py', - 'axis_equal_demo.py', - 'bar_stacked.py', - 'barb_demo.py', - 'barchart_demo.py', - 'barcode_demo.py', - 'boxplot_demo.py', - 'broken_barh.py', - 'clippedline.py', - 'cohere_demo.py', - 'color_by_yvalue.py', - 'color_demo.py', - 'colorbar_tick_labelling_demo.py', - 'contour_demo.py', - 'contour_image.py', - 'contour_label_demo.py', - 'contourf_demo.py', - 'contourf_log.py', - 'coords_demo.py', - 'coords_report.py', - 'csd_demo.py', - 'cursor_demo.py', - 'custom_cmap.py', - 'custom_figure_class.py', - 'custom_ticker1.py', - 'customize_rc.py', - 'dashpointlabel.py', - 'date_demo1.py', - 'date_demo2.py', - 'date_demo_convert.py', - 'date_demo_rrule.py', - 'date_index_formatter.py', - 'dolphin.py', - 'ellipse_collection.py', - 'ellipse_demo.py', - 'ellipse_rotated.py', - 'equal_aspect_ratio.py', - 'errorbar_limits.py', - 'fancyarrow_demo.py', - 'fancybox_demo.py', - 'fancybox_demo2.py', - 'fancytextbox_demo.py', - 'figimage_demo.py', - 'figlegend_demo.py', - 'figure_title.py', - 'fill_between_demo.py', - 'fill_spiral.py', - 'finance_demo.py', - 'findobj_demo.py', - 'fonts_demo.py', - 'fonts_demo_kw.py', - 'ganged_plots.py', - 'geo_demo.py', - 'gradient_bar.py', - 'griddata_demo.py', - 'hatch_demo.py', - 'hexbin_demo.py', - 'hexbin_demo2.py', - 'hist_colormapped.py', - 'histogram_demo_extended.py', - 'vline_hline_demo.py', - - 'image_clip_path.py', - 'image_demo.py', - 'image_demo2.py', - 'image_interp.py', - 'image_masked.py', - 'image_nonuniform.py', - 'image_origin.py', - 'image_slices_viewer.py', - 'interp_demo.py', - 'invert_axes.py', - 'layer_images.py', - 'legend_auto.py', - 'legend_demo.py', - 'legend_demo2.py', - 'legend_demo3.py', - 'legend_scatter.py', - 'line_collection.py', - 'line_collection2.py', - 'line_styles.py', - 'log_bar.py', - 'log_demo.py', - 'log_test.py', - 'major_minor_demo1.py', - 'major_minor_demo2.py', - 'manual_axis.py', - 'masked_demo.py', - 'mathtext_demo.py', - 'mathtext_examples.py', - 'matplotlib_icon.py', - 'matshow.py', - 'mri_demo.py', - 'mri_with_eeg.py', - 'multi_image.py', - 'multiline.py', - 'multiple_figs_demo.py', - 'nan_test.py', - 'newscalarformatter_demo.py', - 'pcolor_demo.py', - 'pcolor_log.py', - 'pcolor_small.py', - 'pie_demo2.py', - 'plotfile_demo.py', - 'polar_demo.py', - 'polar_legend.py', - 'psd_demo.py', - 'psd_demo2.py', - 'psd_demo3.py', - 'quadmesh_demo.py', - 'quiver_demo.py', - 'scatter_custom_symbol.py', - 'scatter_demo2.py', - 'scatter_masked.py', - 'scatter_profile.py', - 'scatter_star_poly.py', - #'set_and_get.py', - 'shared_axis_across_figures.py', - 'shared_axis_demo.py', - 'simple_plot.py', - 'specgram_demo.py', - 'spine_placement_demo.py', - 'spy_demos.py', - 'stem_plot.py', - 'step_demo.py', - 'stix_fonts_demo.py', - 'stock_demo.py', - 'subplots_adjust.py', - 'symlog_demo.py', - 'table_demo.py', - 'text_handles.py', - 'text_rotation.py', - 'text_rotation_relative_to_line.py', - 'transoffset.py', - 'xcorr_demo.py', - 'zorder_demo.py', - ] - - - files['api'] = [ - 'agg_oo.py', - 'barchart_demo.py', - 'bbox_intersect.py', - 'collections_demo.py', - 'colorbar_only.py', - 'custom_projection_example.py', - 'custom_scale_example.py', - 'date_demo.py', - 'date_index_formatter.py', - 'donut_demo.py', - 'font_family_rc.py', - 'image_zcoord.py', - 'joinstyle.py', - 'legend_demo.py', - 'line_with_text.py', - 'logo2.py', - 'mathtext_asarray.py', - 'patch_collection.py', - 'quad_bezier.py', - 'scatter_piecharts.py', - 'span_regions.py', - 'two_scales.py', - 'unicode_minus.py', - 'watermark_image.py', - 'watermark_text.py', - ] - - files['units'] = [ - 'annotate_with_units.py', - #'artist_tests.py', # broken, fixme - 'bar_demo2.py', - #'bar_unit_demo.py', # broken, fixme - #'ellipse_with_units.py', # broken, fixme - 'radian_demo.py', - 'units_sample.py', - #'units_scatter.py', # broken, fixme - - ] - - files['mplot3d'] = [ - '2dcollections3d_demo.py', - 'bars3d_demo.py', - 'contour3d_demo.py', - 'contour3d_demo2.py', - 'contourf3d_demo.py', - 'lines3d_demo.py', - 'polys3d_demo.py', - 'scatter3d_demo.py', - 'surface3d_demo.py', - 'surface3d_demo2.py', - 'text3d_demo.py', - 'wire3d_demo.py', - ] - - # dict from dir to files we know we don't want to test (eg examples - # not using pyplot, examples requiring user input, animation examples, - # examples that may only work in certain environs (usetex examples?), - # examples that generate multiple figures - - excluded = { - 'pylab' : ['__init__.py', 'toggle_images.py',], - 'units' : ['__init__.py', 'date_support.py',], - } - - def report_missing(dir, flist): - 'report the py files in dir that are not in flist' - globstr = os.path.join(dir, '*.py') - fnames = glob.glob(globstr) - - pyfiles = set([os.path.split(fullpath)[-1] for fullpath in set(fnames)]) - - exclude = set(excluded.get(dir, [])) - flist = set(flist) - missing = list(pyfiles-flist-exclude) - missing.sort() - if missing: - print ('%s files not tested: %s'%(dir, ', '.join(missing))) - - def report_all_missing(directories): - for f in directories: - report_missing(dirs[f], files[f]) - - - # tests known to fail on a given backend - - failbackend = dict( - svg = ('tex_demo.py', ), - agg = ('hyperlinks.py', ), - pdf = ('hyperlinks.py', ), - ps = ('hyperlinks.py', ), - ) - - - try: - import subprocess - def run(arglist): - try: - ret = subprocess.call(arglist) - except KeyboardInterrupt: - sys.exit() - else: - return ret - except ImportError: - def run(arglist): - os.system(' '.join(arglist)) - - def drive(backend, directories, python=['python'], switches = []): - exclude = failbackend.get(backend, []) - - # Clear the destination directory for the examples - path = backend - if os.path.exists(path): - import glob - for fname in os.listdir(path): - os.unlink(os.path.join(path, fname)) - else: - os.mkdir(backend) - failures = [] - - testcases = [os.path.join(dirs[d], fname) - for d in directories - for fname in files[d]] - - for fullpath in testcases: - print ('\tdriving %-40s' % (fullpath)), - sys.stdout.flush() - fpath, fname = os.path.split(fullpath) - - if fname in exclude: - print ('\tSkipping %s, known to fail on backend: %s'%backend) - continue - - basename, ext = os.path.splitext(fname) - outfile = os.path.join(path, basename) - tmpfile_name = '_tmp_%s.py' % basename - tmpfile = open(tmpfile_name, 'w') - - future_imports = 'from __future__ import division, print_function' - for line in open(fullpath): - line_lstrip = line.lstrip() - if line_lstrip.startswith("#"): - tmpfile.write(line) - elif 'unicode_literals' in line: - future_imports = future_imports + ', unicode_literals' - - tmpfile.writelines(( - future_imports+'\n', - 'import sys\n', - 'sys.path.append("%s")\n' % fpath.replace('\\', '\\\\'), - 'import matplotlib\n', - 'matplotlib.use("%s")\n' % backend, - 'from pylab import savefig\n', - 'import numpy\n', - 'numpy.seterr(invalid="ignore")\n', - )) - for line in open(fullpath): - line_lstrip = line.lstrip() - if (line_lstrip.startswith('from __future__ import') or - line_lstrip.startswith('matplotlib.use') or - line_lstrip.startswith('savefig') or - line_lstrip.startswith('show')): - continue - tmpfile.write(line) - if backend in rcsetup.interactive_bk: - tmpfile.write('show()') - else: - tmpfile.write('\nsavefig(r"%s", dpi=150)' % outfile) - - tmpfile.close() - start_time = time.time() - program = [x % {'name': basename} for x in python] - ret = run(program + [tmpfile_name] + switches) - end_time = time.time() - print ("%s %s" % ((end_time - start_time), ret)) - #os.system('%s %s %s' % (python, tmpfile_name, ' '.join(switches))) - os.remove(tmpfile_name) - if ret: - failures.append(fullpath) - return failures - - def parse_options(): - doc = (__doc__ and __doc__.split('\n\n')) or " " - op = OptionParser(description=doc[0].strip(), - usage='%prog [options] [--] [backends and switches]', - #epilog='\n'.join(doc[1:]) # epilog not supported on my python2.4 machine: JDH - ) - op.disable_interspersed_args() - op.set_defaults(dirs='pylab,api,units,mplot3d', - clean=False, coverage=False, valgrind=False) - op.add_option('-d', '--dirs', '--directories', type='string', - dest='dirs', help=dedent(''' - Run only the tests in these directories; comma-separated list of - one or more of: pylab (or pylab_examples), api, units, mplot3d''')) - op.add_option('-b', '--backends', type='string', dest='backends', - help=dedent(''' - Run tests only for these backends; comma-separated list of - one or more of: agg, ps, svg, pdf, template, cairo, - Default is everything except cairo.''')) - op.add_option('--clean', action='store_true', dest='clean', - help='Remove result directories, run no tests') - op.add_option('-c', '--coverage', action='store_true', dest='coverage', - help='Run in coverage.py') - op.add_option('-v', '--valgrind', action='store_true', dest='valgrind', - help='Run in valgrind') - - options, args = op.parse_args() - switches = [x for x in args if x.startswith('--')] - backends = [x.lower() for x in args if not x.startswith('--')] - if options.backends: - backends += [be.lower() for be in options.backends.split(',')] - - result = Bunch( - dirs = options.dirs.split(','), - backends = backends or ['agg', 'ps', 'svg', 'pdf', 'template'], - clean = options.clean, - coverage = options.coverage, - valgrind = options.valgrind, - switches = switches) - if 'pylab_examples' in result.dirs: - result.dirs[result.dirs.index('pylab_examples')] = 'pylab' - #print result - return (result) - - if __name__ == '__main__': - times = {} - failures = {} - options = parse_options() - - if options.clean: - localdirs = [d for d in glob.glob('*') if os.path.isdir(d)] - all_backends_set = set(all_backends) - for d in localdirs: - if d.lower() not in all_backends_set: - continue - print ('removing %s'%d) - for fname in glob.glob(os.path.join(d, '*')): - os.remove(fname) - os.rmdir(d) - for fname in glob.glob('_tmp*.py'): - os.remove(fname) - - print ('all clean...') - raise SystemExit - if options.coverage: - python = ['coverage.py', '-x'] - elif options.valgrind: - python = ['valgrind', '--tool=memcheck', '--leak-check=yes', - '--log-file=%(name)s', sys.executable] - elif sys.platform == 'win32': - python = [sys.executable] - else: - python = [sys.executable] - - report_all_missing(options.dirs) - for backend in options.backends: - print ('testing %s %s' % (backend, ' '.join(options.switches))) - t0 = time.time() - failures[backend] = \ - drive(backend, options.dirs, python, options.switches) - t1 = time.time() - times[backend] = (t1-t0)/60.0 - - # print times - for backend, elapsed in times.items(): - print ('Backend %s took %1.2f minutes to complete' % (backend, elapsed)) - failed = failures[backend] - if failed: - print (' Failures: %s' % failed) - if 'template' in times: - print ('\ttemplate ratio %1.3f, template residual %1.3f' % ( - elapsed/times['template'], elapsed-times['template'])) - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/tests/index.txt b/dev/_sources/examples/tests/index.txt deleted file mode 100644 index 67b1b43b5d4..00000000000 --- a/dev/_sources/examples/tests/index.txt +++ /dev/null @@ -1,15 +0,0 @@ -.. _tests-examples-index: - -############################################## -tests Examples -############################################## - -.. htmlonly:: - - :Release: |version| - :Date: |today| - -.. toctree:: - :maxdepth: 1 - - backend_driver diff --git a/dev/_sources/examples/text_labels_and_annotations/index.txt b/dev/_sources/examples/text_labels_and_annotations/index.txt deleted file mode 100644 index 87f0e33e0e7..00000000000 --- a/dev/_sources/examples/text_labels_and_annotations/index.txt +++ /dev/null @@ -1,16 +0,0 @@ -.. _text_labels_and_annotations-examples-index: - -############################################## -text_labels_and_annotations Examples -############################################## - -.. htmlonly:: - - :Release: |version| - :Date: |today| - -.. toctree:: - :maxdepth: 1 - - text_demo_fontdict - unicode_demo diff --git a/dev/_sources/examples/text_labels_and_annotations/text_demo_fontdict.txt b/dev/_sources/examples/text_labels_and_annotations/text_demo_fontdict.txt deleted file mode 100644 index 84dddaac6c4..00000000000 --- a/dev/_sources/examples/text_labels_and_annotations/text_demo_fontdict.txt +++ /dev/null @@ -1,39 +0,0 @@ -.. _text_labels_and_annotations-text_demo_fontdict: - -text_labels_and_annotations example code: text_demo_fontdict.py -=============================================================== - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/text_labels_and_annotations/text_demo_fontdict.py - -:: - - """ - Demo using fontdict to control style of text and labels. - """ - import numpy as np - import matplotlib.pyplot as plt - - - font = {'family' : 'serif', - 'color' : 'darkred', - 'weight' : 'normal', - 'size' : 16, - } - - x = np.linspace(0.0, 5.0, 100) - y = np.cos(2 * np.pi * x) * np.exp(-x) - - plt.plot(x, y, 'k') - plt.title('Damped exponential decay', fontdict=font) - plt.text(2, 0.65, r'$\cos(2 \pi t) \exp(-t)$', fontdict=font) - plt.xlabel('time (s)', fontdict=font) - plt.ylabel('voltage (mV)', fontdict=font) - - # Tweak spacing to prevent clipping of ylabel - plt.subplots_adjust(left=0.15) - plt.show() - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/text_labels_and_annotations/unicode_demo.txt b/dev/_sources/examples/text_labels_and_annotations/unicode_demo.txt deleted file mode 100644 index 72257a9c275..00000000000 --- a/dev/_sources/examples/text_labels_and_annotations/unicode_demo.txt +++ /dev/null @@ -1,30 +0,0 @@ -.. _text_labels_and_annotations-unicode_demo: - -text_labels_and_annotations example code: unicode_demo.py -========================================================= - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/text_labels_and_annotations/unicode_demo.py - -:: - - # -*- coding: utf-8 -*- - """ - Demo of unicode support in text and labels. - """ - from __future__ import unicode_literals - - import matplotlib.pyplot as plt - - - plt.title('Développés et fabriqués') - plt.xlabel("réactivité nous permettent d'être sélectionnés et adoptés") - plt.ylabel('André was here!') - plt.text( 0.2, 0.8, 'Institut für Festkörperphysik', rotation=45) - plt.text( 0.4, 0.2, 'AVA (check kerning)') - - plt.show() - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/ticks_and_spines/index.txt b/dev/_sources/examples/ticks_and_spines/index.txt deleted file mode 100644 index baf4a382c2b..00000000000 --- a/dev/_sources/examples/ticks_and_spines/index.txt +++ /dev/null @@ -1,18 +0,0 @@ -.. _ticks_and_spines-examples-index: - -############################################## -ticks_and_spines Examples -############################################## - -.. htmlonly:: - - :Release: |version| - :Date: |today| - -.. toctree:: - :maxdepth: 1 - - spines_demo - spines_demo_bounds - spines_demo_dropped - ticklabels_demo_rotation diff --git a/dev/_sources/examples/ticks_and_spines/spines_demo.txt b/dev/_sources/examples/ticks_and_spines/spines_demo.txt deleted file mode 100644 index 6c9544691a0..00000000000 --- a/dev/_sources/examples/ticks_and_spines/spines_demo.txt +++ /dev/null @@ -1,45 +0,0 @@ -.. _ticks_and_spines-spines_demo: - -ticks_and_spines example code: spines_demo.py -============================================= - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/ticks_and_spines/spines_demo.py - -:: - - """ - Basic demo of axis spines. - - This demo compares a normal axes, with spines on all four sides, and an axes - with spines only on the left and bottom. - """ - import numpy as np - import matplotlib.pyplot as plt - - - x = np.linspace(0, 2 * np.pi, 100) - y = 2 * np.sin(x) - - fig, (ax0, ax1) = plt.subplots(nrows=2) - - ax0.plot(x, y) - ax0.set_title('normal spines') - - ax1.plot(x, y) - ax1.set_title('bottom-left spines') - - # Hide the right and top spines - ax1.spines['right'].set_visible(False) - ax1.spines['top'].set_visible(False) - # Only show ticks on the left and bottom spines - ax1.yaxis.set_ticks_position('left') - ax1.xaxis.set_ticks_position('bottom') - - # Tweak spacing between subplots to prevent labels from overlapping - plt.subplots_adjust(hspace=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/dev/_sources/examples/ticks_and_spines/spines_demo_bounds.txt b/dev/_sources/examples/ticks_and_spines/spines_demo_bounds.txt deleted file mode 100644 index ed19b40db17..00000000000 --- a/dev/_sources/examples/ticks_and_spines/spines_demo_bounds.txt +++ /dev/null @@ -1,46 +0,0 @@ -.. _ticks_and_spines-spines_demo_bounds: - -ticks_and_spines example code: spines_demo_bounds.py -==================================================== - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/ticks_and_spines/spines_demo_bounds.py - -:: - - """ - Demo of spines using custom bounds to limit the extent of the spine. - """ - import numpy as np - import matplotlib.pyplot as plt - - - x = np.linspace(0, 2*np.pi, 50) - y = np.sin(x) - y2 = y + 0.1 * np.random.normal(size=x.shape) - - fig, ax = plt.subplots() - ax.plot(x, y, 'k--') - ax.plot(x, y2, 'ro') - - # set ticks and tick labels - ax.set_xlim((0, 2*np.pi)) - ax.set_xticks([0, np.pi, 2*np.pi]) - ax.set_xticklabels(['0', '$\pi$','2$\pi$']) - ax.set_ylim((-1.5, 1.5)) - ax.set_yticks([-1, 0, 1]) - - # Only draw spine between the y-ticks - ax.spines['left'].set_bounds(-1, 1) - # Hide the right and top spines - ax.spines['right'].set_visible(False) - ax.spines['top'].set_visible(False) - # Only show ticks on the left and bottom spines - ax.yaxis.set_ticks_position('left') - ax.xaxis.set_ticks_position('bottom') - - plt.show() - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/ticks_and_spines/spines_demo_dropped.txt b/dev/_sources/examples/ticks_and_spines/spines_demo_dropped.txt deleted file mode 100644 index f4fd092cecb..00000000000 --- a/dev/_sources/examples/ticks_and_spines/spines_demo_dropped.txt +++ /dev/null @@ -1,38 +0,0 @@ -.. _ticks_and_spines-spines_demo_dropped: - -ticks_and_spines example code: spines_demo_dropped.py -===================================================== - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/ticks_and_spines/spines_demo_dropped.py - -:: - - """ - Demo of spines offset from the axes (a.k.a. "dropped spines"). - """ - import numpy as np - import matplotlib.pyplot as plt - - - fig, ax = plt.subplots() - - image = np.random.uniform(size=(10, 10)) - ax.imshow(image, cmap=plt.cm.gray, interpolation='nearest') - ax.set_title('dropped spines') - - # Move left and bottom spines outward by 10 points - ax.spines['left'].set_position(('outward', 10)) - ax.spines['bottom'].set_position(('outward', 10)) - # Hide the right and top spines - ax.spines['right'].set_visible(False) - ax.spines['top'].set_visible(False) - # Only show ticks on the left and bottom spines - ax.yaxis.set_ticks_position('left') - ax.xaxis.set_ticks_position('bottom') - - plt.show() - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/ticks_and_spines/ticklabels_demo_rotation.txt b/dev/_sources/examples/ticks_and_spines/ticklabels_demo_rotation.txt deleted file mode 100644 index c4df17e3b6d..00000000000 --- a/dev/_sources/examples/ticks_and_spines/ticklabels_demo_rotation.txt +++ /dev/null @@ -1,32 +0,0 @@ -.. _ticks_and_spines-ticklabels_demo_rotation: - -ticks_and_spines example code: ticklabels_demo_rotation.py -========================================================== - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/ticks_and_spines/ticklabels_demo_rotation.py - -:: - - """ - Demo of custom tick-labels with user-defined rotation. - """ - import matplotlib.pyplot as plt - - - x = [1, 2, 3, 4] - y = [1, 4, 9, 6] - labels = ['Frogs', 'Hogs', 'Bogs', 'Slogs'] - - plt.plot(x, y, 'ro') - # You can specify a rotation for the tick labels in degrees or with keywords. - plt.xticks(x, labels, rotation='vertical') - # Pad margins so that markers don't get clipped by the axes - plt.margins(0.2) - # Tweak spacing to prevent clipping of tick-labels - plt.subplots_adjust(bottom=0.15) - plt.show() - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/units/annotate_with_units.txt b/dev/_sources/examples/units/annotate_with_units.txt deleted file mode 100644 index 28460ae874f..00000000000 --- a/dev/_sources/examples/units/annotate_with_units.txt +++ /dev/null @@ -1,40 +0,0 @@ -.. _units-annotate_with_units: - -units example code: annotate_with_units.py -========================================== - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/units/annotate_with_units.py - -:: - - import matplotlib.pyplot as plt - from basic_units import cm - - fig = plt.figure() - ax = fig.add_subplot(111) - - - ax.annotate( "Note 01", [0.5*cm, 0.5*cm] ) - - # xy and text both unitized - ax.annotate('local max', xy=(3*cm, 1*cm), xycoords='data', - xytext=(0.8*cm, 0.95*cm), textcoords='data', - arrowprops=dict(facecolor='black', shrink=0.05), - horizontalalignment='right', verticalalignment='top') - - # mixing units w/ nonunits - ax.annotate('local max', xy=(3*cm, 1*cm), xycoords='data', - xytext=(0.8, 0.95), textcoords='axes fraction', - arrowprops=dict(facecolor='black', shrink=0.05), - horizontalalignment='right', verticalalignment='top') - - - ax.set_xlim(0*cm, 4*cm) - ax.set_ylim(0*cm, 4*cm) - plt.show() - - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/units/artist_tests.txt b/dev/_sources/examples/units/artist_tests.txt deleted file mode 100644 index 13eefca2527..00000000000 --- a/dev/_sources/examples/units/artist_tests.txt +++ /dev/null @@ -1,69 +0,0 @@ -.. _units-artist_tests: - -units example code: artist_tests.py -=================================== - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/units/artist_tests.py - -:: - - """ - Test unit support with each of the matplotlib primitive artist types - - The axes handles unit conversions and the artists keep a pointer to - their axes parent, so you must init the artists with the axes instance - if you want to initialize them with unit data, or else they will not - know how to convert the units to scalars - """ - import random - import matplotlib.lines as lines - import matplotlib.patches as patches - import matplotlib.text as text - import matplotlib.collections as collections - import matplotlib.units as units - - from basic_units import cm, inch - import numpy as np - from matplotlib.pyplot import figure, show - - fig = figure() - ax = fig.add_subplot(111) - ax.xaxis.set_units(cm) - ax.yaxis.set_units(cm) - - if 0: - # test a line collection - # Not supported at present. - verts = [] - for i in range(10): - # a random line segment in inches - verts.append(zip(*inch*10*np.random.rand(2, random.randint(2,15)))) - lc = collections.LineCollection(verts, axes=ax) - ax.add_collection(lc) - - # test a plain-ol-line - line = lines.Line2D([0*cm, 1.5*cm], [0*cm, 2.5*cm], lw=2, color='black', axes=ax) - ax.add_line(line) - - if 0: - # test a patch - # Not supported at present. - rect = patches.Rectangle( (1*cm, 1*cm), width=5*cm, height=2*cm, alpha=0.2, axes=ax) - ax.add_patch(rect) - - - t = text.Text(3*cm, 2.5*cm, 'text label', ha='left', va='bottom', axes=ax) - ax.add_artist(t) - - ax.set_xlim(-1*cm, 10*cm) - ax.set_ylim(-1*cm, 10*cm) - #ax.xaxis.set_units(inch) - ax.grid(True) - ax.set_title("Artists with units") - show() - - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/units/bar_demo2.txt b/dev/_sources/examples/units/bar_demo2.txt deleted file mode 100644 index f2a5fb8c9c6..00000000000 --- a/dev/_sources/examples/units/bar_demo2.txt +++ /dev/null @@ -1,50 +0,0 @@ -.. _units-bar_demo2: - -units example code: bar_demo2.py -================================ - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/units/bar_demo2.py - -:: - - """ - plot using a variety of cm vs inches conversions. The example shows - how default unit instrospection works (ax1), how various keywords can - be used to set the x and y units to override the defaults (ax2, ax3, - ax4) and how one can set the xlimits using scalars (ax3, current units - assumed) or units (conversions applied to get the numbers to current - units) - - """ - import numpy as np - from basic_units import cm, inch - import matplotlib.pyplot as plt - - - cms = cm *np.arange(0, 10, 2) - bottom=0*cm - width=0.8*cm - - fig = plt.figure() - - ax1 = fig.add_subplot(2,2,1) - ax1.bar(cms, cms, bottom=bottom) - - ax2 = fig.add_subplot(2,2,2) - ax2.bar(cms, cms, bottom=bottom, width=width, xunits=cm, yunits=inch) - - ax3 = fig.add_subplot(2,2,3) - ax3.bar(cms, cms, bottom=bottom, width=width, xunits=inch, yunits=cm) - ax3.set_xlim(2, 6) # scalars are interpreted in current units - - ax4 = fig.add_subplot(2,2,4) - ax4.bar(cms, cms, bottom=bottom, width=width, xunits=inch, yunits=inch) - #fig.savefig('simple_conversion_plot.png') - ax4.set_xlim(2*cm, 6*cm) # cm are converted to inches - - plt.show() - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/units/bar_unit_demo.txt b/dev/_sources/examples/units/bar_unit_demo.txt deleted file mode 100644 index 45d826acbf1..00000000000 --- a/dev/_sources/examples/units/bar_unit_demo.txt +++ /dev/null @@ -1,46 +0,0 @@ -.. _units-bar_unit_demo: - -units example code: bar_unit_demo.py -==================================== - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/units/bar_unit_demo.py - -:: - - #!/usr/bin/env python - import numpy as np - from basic_units import cm, inch - import matplotlib.pyplot as plt - - - N = 5 - menMeans = (150*cm, 160*cm, 146*cm, 172*cm, 155*cm) - menStd = ( 20*cm, 30*cm, 32*cm, 10*cm, 20*cm) - - fig = plt.figure() - ax = fig.add_subplot(111) - - ind = np.arange(N) # the x locations for the groups - width = 0.35 # the width of the bars - p1 = ax.bar(ind, menMeans, width, color='r', bottom=0*cm, yerr=menStd) - - - womenMeans = (145*cm, 149*cm, 172*cm, 165*cm, 200*cm) - womenStd = (30*cm, 25*cm, 20*cm, 31*cm, 22*cm) - p2 = ax.bar(ind+width, womenMeans, width, color='y', bottom=0*cm, yerr=womenStd) - - ax.set_title('Scores by group and gender') - ax.set_xticks(ind+width) - ax.set_xticklabels( ('G1', 'G2', 'G3', 'G4', 'G5') ) - - ax.legend( (p1[0], p2[0]), ('Men', 'Women') ) - ax.yaxis.set_units(inch) - ax.autoscale_view() - - #plt.savefig('barchart_demo') - plt.show() - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/units/basic_units.txt b/dev/_sources/examples/units/basic_units.txt deleted file mode 100644 index f458034cc5c..00000000000 --- a/dev/_sources/examples/units/basic_units.txt +++ /dev/null @@ -1,385 +0,0 @@ -.. _units-basic_units: - -units example code: basic_units.py -================================== - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/units/basic_units.py - -:: - - import math - - import numpy as np - - import matplotlib.units as units - import matplotlib.ticker as ticker - from matplotlib.axes import Axes - from matplotlib.cbook import iterable - - - class ProxyDelegate(object): - def __init__(self, fn_name, proxy_type): - self.proxy_type = proxy_type - self.fn_name = fn_name - - def __get__(self, obj, objtype=None): - return self.proxy_type(self.fn_name, obj) - - - class TaggedValueMeta (type): - def __init__(cls, name, bases, dict): - for fn_name in cls._proxies.keys(): - try: - dummy = getattr(cls, fn_name) - except AttributeError: - setattr(cls, fn_name, - ProxyDelegate(fn_name, cls._proxies[fn_name])) - - - class PassThroughProxy(object): - def __init__(self, fn_name, obj): - self.fn_name = fn_name - self.target = obj.proxy_target - - def __call__(self, *args): - fn = getattr(self.target, self.fn_name) - ret = fn(*args) - return ret - - - class ConvertArgsProxy(PassThroughProxy): - def __init__(self, fn_name, obj): - PassThroughProxy.__init__(self, fn_name, obj) - self.unit = obj.unit - - def __call__(self, *args): - converted_args = [] - for a in args: - try: - converted_args.append(a.convert_to(self.unit)) - except AttributeError: - converted_args.append(TaggedValue(a, self.unit)) - converted_args = tuple([c.get_value() for c in converted_args]) - return PassThroughProxy.__call__(self, *converted_args) - - - class ConvertReturnProxy(PassThroughProxy): - def __init__(self, fn_name, obj): - PassThroughProxy.__init__(self, fn_name, obj) - self.unit = obj.unit - - def __call__(self, *args): - ret = PassThroughProxy.__call__(self, *args) - if (type(ret) == type(NotImplemented)): - return NotImplemented - return TaggedValue(ret, self.unit) - - - class ConvertAllProxy(PassThroughProxy): - def __init__(self, fn_name, obj): - PassThroughProxy.__init__(self, fn_name, obj) - self.unit = obj.unit - - def __call__(self, *args): - converted_args = [] - arg_units = [self.unit] - for a in args: - if hasattr(a, 'get_unit') and not hasattr(a, 'convert_to'): - # if this arg has a unit type but no conversion ability, - # this operation is prohibited - return NotImplemented - - if hasattr(a, 'convert_to'): - try: - a = a.convert_to(self.unit) - except: - pass - arg_units.append(a.get_unit()) - converted_args.append(a.get_value()) - else: - converted_args.append(a) - if hasattr(a, 'get_unit'): - arg_units.append(a.get_unit()) - else: - arg_units.append(None) - converted_args = tuple(converted_args) - ret = PassThroughProxy.__call__(self, *converted_args) - if (type(ret) == type(NotImplemented)): - return NotImplemented - ret_unit = unit_resolver(self.fn_name, arg_units) - if (ret_unit == NotImplemented): - return NotImplemented - return TaggedValue(ret, ret_unit) - - - class _TaggedValue(object): - - _proxies = {'__add__': ConvertAllProxy, - '__sub__': ConvertAllProxy, - '__mul__': ConvertAllProxy, - '__rmul__': ConvertAllProxy, - '__cmp__': ConvertAllProxy, - '__lt__': ConvertAllProxy, - '__gt__': ConvertAllProxy, - '__len__': PassThroughProxy} - - def __new__(cls, value, unit): - # generate a new subclass for value - value_class = type(value) - try: - subcls = type('TaggedValue_of_%s' % (value_class.__name__), - tuple([cls, value_class]), - {}) - if subcls not in units.registry: - units.registry[subcls] = basicConverter - return object.__new__(subcls, value, unit) - except TypeError: - if cls not in units.registry: - units.registry[cls] = basicConverter - return object.__new__(cls, value, unit) - - def __init__(self, value, unit): - self.value = value - self.unit = unit - self.proxy_target = self.value - - def __getattribute__(self, name): - if (name.startswith('__')): - return object.__getattribute__(self, name) - variable = object.__getattribute__(self, 'value') - if (hasattr(variable, name) and name not in self.__class__.__dict__): - return getattr(variable, name) - return object.__getattribute__(self, name) - - def __array__(self, t=None, context=None): - if t is not None: - return np.asarray(self.value).astype(t) - else: - return np.asarray(self.value, 'O') - - def __array_wrap__(self, array, context): - return TaggedValue(array, self.unit) - - def __repr__(self): - return 'TaggedValue(' + repr(self.value) + ', ' + repr(self.unit) + ')' - - def __str__(self): - return str(self.value) + ' in ' + str(self.unit) - - def __len__(self): - return len(self.value) - - def __iter__(self): - class IteratorProxy(object): - def __init__(self, iter, unit): - self.iter = iter - self.unit = unit - - def __next__(self): - value = next(self.iter) - return TaggedValue(value, self.unit) - next = __next__ # for Python 2 - return IteratorProxy(iter(self.value), self.unit) - - def get_compressed_copy(self, mask): - new_value = np.ma.masked_array(self.value, mask=mask).compressed() - return TaggedValue(new_value, self.unit) - - def convert_to(self, unit): - if (unit == self.unit or not unit): - return self - new_value = self.unit.convert_value_to(self.value, unit) - return TaggedValue(new_value, unit) - - def get_value(self): - return self.value - - def get_unit(self): - return self.unit - - - TaggedValue = TaggedValueMeta('TaggedValue', (_TaggedValue, ), {}) - - - class BasicUnit(object): - def __init__(self, name, fullname=None): - self.name = name - if fullname is None: - fullname = name - self.fullname = fullname - self.conversions = dict() - - def __repr__(self): - return 'BasicUnit(%s)'%self.name - - def __str__(self): - return self.fullname - - def __call__(self, value): - return TaggedValue(value, self) - - def __mul__(self, rhs): - value = rhs - unit = self - if hasattr(rhs, 'get_unit'): - value = rhs.get_value() - unit = rhs.get_unit() - unit = unit_resolver('__mul__', (self, unit)) - if (unit == NotImplemented): - return NotImplemented - return TaggedValue(value, unit) - - def __rmul__(self, lhs): - return self*lhs - - def __array_wrap__(self, array, context): - return TaggedValue(array, self) - - def __array__(self, t=None, context=None): - ret = np.array([1]) - if t is not None: - return ret.astype(t) - else: - return ret - - def add_conversion_factor(self, unit, factor): - def convert(x): - return x*factor - self.conversions[unit] = convert - - def add_conversion_fn(self, unit, fn): - self.conversions[unit] = fn - - def get_conversion_fn(self, unit): - return self.conversions[unit] - - def convert_value_to(self, value, unit): - conversion_fn = self.conversions[unit] - ret = conversion_fn(value) - return ret - - def get_unit(self): - return self - - - class UnitResolver(object): - def addition_rule(self, units): - for unit_1, unit_2 in zip(units[:-1], units[1:]): - if (unit_1 != unit_2): - return NotImplemented - return units[0] - - def multiplication_rule(self, units): - non_null = [u for u in units if u] - if (len(non_null) > 1): - return NotImplemented - return non_null[0] - - op_dict = { - '__mul__': multiplication_rule, - '__rmul__': multiplication_rule, - '__add__': addition_rule, - '__radd__': addition_rule, - '__sub__': addition_rule, - '__rsub__': addition_rule} - - def __call__(self, operation, units): - if (operation not in self.op_dict): - return NotImplemented - - return self.op_dict[operation](self, units) - - - unit_resolver = UnitResolver() - - cm = BasicUnit('cm', 'centimeters') - inch = BasicUnit('inch', 'inches') - inch.add_conversion_factor(cm, 2.54) - cm.add_conversion_factor(inch, 1/2.54) - - radians = BasicUnit('rad', 'radians') - degrees = BasicUnit('deg', 'degrees') - radians.add_conversion_factor(degrees, 180.0/np.pi) - degrees.add_conversion_factor(radians, np.pi/180.0) - - secs = BasicUnit('s', 'seconds') - hertz = BasicUnit('Hz', 'Hertz') - minutes = BasicUnit('min', 'minutes') - - secs.add_conversion_fn(hertz, lambda x: 1./x) - secs.add_conversion_factor(minutes, 1/60.0) - - - # radians formatting - def rad_fn(x, pos=None): - n = int((x / np.pi) * 2.0 + 0.25) - if n == 0: - return '0' - elif n == 1: - return r'$\pi/2$' - elif n == 2: - return r'$\pi$' - elif n % 2 == 0: - return r'$%s\pi$' % (n/2,) - else: - return r'$%s\pi/2$' % (n,) - - - class BasicUnitConverter(units.ConversionInterface): - - @staticmethod - def axisinfo(unit, axis): - 'return AxisInfo instance for x and unit' - - if unit==radians: - return units.AxisInfo( - majloc=ticker.MultipleLocator(base=np.pi/2), - majfmt=ticker.FuncFormatter(rad_fn), - label=unit.fullname, - ) - elif unit==degrees: - return units.AxisInfo( - majloc=ticker.AutoLocator(), - majfmt=ticker.FormatStrFormatter(r'$%i^\circ$'), - label=unit.fullname, - ) - elif unit is not None: - if hasattr(unit, 'fullname'): - return units.AxisInfo(label=unit.fullname) - elif hasattr(unit, 'unit'): - return units.AxisInfo(label=unit.unit.fullname) - return None - - @staticmethod - def convert(val, unit, axis): - if units.ConversionInterface.is_numlike(val): - return val - if iterable(val): - return [thisval.convert_to(unit).get_value() for thisval in val] - else: - return val.convert_to(unit).get_value() - - @staticmethod - def default_units(x, axis): - 'return the default unit for x or None' - if iterable(x): - for thisx in x: - return thisx.unit - return x.unit - - - def cos(x): - if iterable(x): - return [math.cos(val.convert_to(radians).get_value()) for val in x] - else: - return math.cos(x.convert_to(radians).get_value()) - - - basicConverter = BasicUnitConverter() - units.registry[BasicUnit] = basicConverter - units.registry[TaggedValue] = basicConverter - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/units/ellipse_with_units.txt b/dev/_sources/examples/units/ellipse_with_units.txt deleted file mode 100644 index c4bbeb595ec..00000000000 --- a/dev/_sources/examples/units/ellipse_with_units.txt +++ /dev/null @@ -1,84 +0,0 @@ -.. _units-ellipse_with_units: - -units example code: ellipse_with_units.py -========================================= - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/units/ellipse_with_units.py - -:: - - """ - Compare the ellipse generated with arcs versus a polygonal approximation - """ - from basic_units import cm - import numpy as np - from matplotlib import patches - import matplotlib.pyplot as plt - - - xcenter, ycenter = 0.38*cm, 0.52*cm - #xcenter, ycenter = 0., 0. - width, height = 1e-1*cm, 3e-1*cm - angle = -30 - - theta = np.arange(0.0, 360.0, 1.0)*np.pi/180.0 - x = 0.5 * width * np.cos(theta) - y = 0.5 * height * np.sin(theta) - - rtheta = angle*np.pi/180. - R = np.array([ - [np.cos(rtheta), -np.sin(rtheta)], - [np.sin(rtheta), np.cos(rtheta)], - ]) - - - x, y = np.dot(R, np.array([x, y])) - x += xcenter - y += ycenter - - fig = plt.figure() - ax = fig.add_subplot(211, aspect='auto') - ax.fill(x, y, alpha=0.2, facecolor='yellow', edgecolor='yellow', linewidth=1, zorder=1) - - e1 = patches.Ellipse((xcenter, ycenter), width, height, - angle=angle, linewidth=2, fill=False, zorder=2) - - ax.add_patch(e1) - - ax = fig.add_subplot(212, aspect='equal') - ax.fill(x, y, alpha=0.2, facecolor='green', edgecolor='green', zorder=1) - e2 = patches.Ellipse((xcenter, ycenter), width, height, - angle=angle, linewidth=2, fill=False, zorder=2) - - - ax.add_patch(e2) - - #fig.savefig('ellipse_compare.png') - fig.savefig('ellipse_compare') - - fig = plt.figure() - ax = fig.add_subplot(211, aspect='auto') - ax.fill(x, y, alpha=0.2, facecolor='yellow', edgecolor='yellow', linewidth=1, zorder=1) - - e1 = patches.Arc((xcenter, ycenter), width, height, - angle=angle, linewidth=2, fill=False, zorder=2) - - ax.add_patch(e1) - - ax = fig.add_subplot(212, aspect='equal') - ax.fill(x, y, alpha=0.2, facecolor='green', edgecolor='green', zorder=1) - e2 = patches.Arc((xcenter, ycenter), width, height, - angle=angle, linewidth=2, fill=False, zorder=2) - - - ax.add_patch(e2) - - #fig.savefig('arc_compare.png') - fig.savefig('arc_compare') - - plt.show() - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/units/evans_test.txt b/dev/_sources/examples/units/evans_test.txt deleted file mode 100644 index f54161e56f0..00000000000 --- a/dev/_sources/examples/units/evans_test.txt +++ /dev/null @@ -1,105 +0,0 @@ -.. _units-evans_test: - -units example code: evans_test.py -================================= - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/units/evans_test.py - -:: - - """ - A mockup "Foo" units class which supports - conversion and different tick formatting depending on the "unit". - Here the "unit" is just a scalar conversion factor, but this example shows mpl is - entirely agnostic to what kind of units client packages use - """ - from matplotlib.cbook import iterable - import matplotlib.units as units - import matplotlib.ticker as ticker - import matplotlib.pyplot as plt - - - class Foo: - def __init__( self, val, unit=1.0 ): - self.unit = unit - self._val = val * unit - - def value( self, unit ): - if unit is None: unit = self.unit - return self._val / unit - - class FooConverter: - - @staticmethod - def axisinfo(unit, axis): - 'return the Foo AxisInfo' - if unit==1.0 or unit==2.0: - return units.AxisInfo( - majloc = ticker.IndexLocator( 8, 0 ), - majfmt = ticker.FormatStrFormatter("VAL: %s"), - label='foo', - ) - - else: - return None - - @staticmethod - def convert(obj, unit, axis): - """ - convert obj using unit. If obj is a sequence, return the - converted sequence - """ - if units.ConversionInterface.is_numlike(obj): - return obj - - if iterable(obj): - return [o.value(unit) for o in obj] - else: - return obj.value(unit) - - @staticmethod - def default_units(x, axis): - 'return the default unit for x or None' - if iterable(x): - for thisx in x: - return thisx.unit - else: - return x.unit - - units.registry[Foo] = FooConverter() - - # create some Foos - x = [] - for val in range( 0, 50, 2 ): - x.append( Foo( val, 1.0 ) ) - - # and some arbitrary y data - y = [i for i in range( len(x) ) ] - - - # plot specifying units - fig = plt.figure() - fig.suptitle("Custom units") - fig.subplots_adjust(bottom=0.2) - ax = fig.add_subplot(1,2,2) - ax.plot( x, y, 'o', xunits=2.0 ) - for label in ax.get_xticklabels(): - label.set_rotation(30) - label.set_ha('right') - ax.set_title("xunits = 2.0") - - - # plot without specifying units; will use the None branch for axisinfo - ax = fig.add_subplot(1,2,1) - ax.plot( x, y ) # uses default units - ax.set_title('default units') - for label in ax.get_xticklabels(): - label.set_rotation(30) - label.set_ha('right') - - plt.show() - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/units/index.txt b/dev/_sources/examples/units/index.txt deleted file mode 100644 index 468167da268..00000000000 --- a/dev/_sources/examples/units/index.txt +++ /dev/null @@ -1,24 +0,0 @@ -.. _units-examples-index: - -############################################## -units Examples -############################################## - -.. htmlonly:: - - :Release: |version| - :Date: |today| - -.. toctree:: - :maxdepth: 1 - - annotate_with_units - artist_tests - bar_demo2 - bar_unit_demo - basic_units - ellipse_with_units - evans_test - radian_demo - units_sample - units_scatter diff --git a/dev/_sources/examples/units/radian_demo.txt b/dev/_sources/examples/units/radian_demo.txt deleted file mode 100644 index 76284717452..00000000000 --- a/dev/_sources/examples/units/radian_demo.txt +++ /dev/null @@ -1,35 +0,0 @@ -.. _units-radian_demo: - -units example code: radian_demo.py -================================== - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/units/radian_demo.py - -:: - - """ - Plot with radians from the basic_units mockup example package - This example shows how the unit class can determine the tick locating, - formatting and axis labeling. - """ - import numpy as np - from basic_units import radians, degrees, cos - from matplotlib.pyplot import figure, show - - x = [val*radians for val in np.arange(0, 15, 0.01)] - - fig = figure() - fig.subplots_adjust(hspace=0.3) - - ax = fig.add_subplot(211) - line1, = ax.plot(x, cos(x), xunits=radians) - - ax = fig.add_subplot(212) - line2, = ax.plot(x, cos(x), xunits=degrees) - - show() - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/units/units_sample.txt b/dev/_sources/examples/units/units_sample.txt deleted file mode 100644 index 5f1d3944676..00000000000 --- a/dev/_sources/examples/units/units_sample.txt +++ /dev/null @@ -1,47 +0,0 @@ -.. _units-units_sample: - -units example code: units_sample.py -=================================== - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/units/units_sample.py - -:: - - """ - plot using a variety of cm vs inches conversions. The example shows - how default unit instrospection works (ax1), how various keywords can - be used to set the x and y units to override the defaults (ax2, ax3, - ax4) and how one can set the xlimits using scalars (ax3, current units - assumed) or units (conversions applied to get the numbers to current - units) - - """ - from basic_units import cm, inch - import matplotlib.pyplot as plt - import numpy - - cms = cm *numpy.arange(0, 10, 2) - - fig = plt.figure() - - ax1 = fig.add_subplot(2,2,1) - ax1.plot(cms, cms) - - ax2 = fig.add_subplot(2,2,2) - ax2.plot(cms, cms, xunits=cm, yunits=inch) - - ax3 = fig.add_subplot(2,2,3) - ax3.plot(cms, cms, xunits=inch, yunits=cm) - ax3.set_xlim(3, 6) # scalars are interpreted in current units - - ax4 = fig.add_subplot(2,2,4) - ax4.plot(cms, cms, xunits=inch, yunits=inch) - #fig.savefig('simple_conversion_plot.png') - ax4.set_xlim(3*cm, 6*cm) # cm are converted to inches - - plt.show() - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/units/units_scatter.txt b/dev/_sources/examples/units/units_scatter.txt deleted file mode 100644 index 018fa1f1836..00000000000 --- a/dev/_sources/examples/units/units_scatter.txt +++ /dev/null @@ -1,51 +0,0 @@ -.. _units-units_scatter: - -units example code: units_scatter.py -==================================== - - - -.. plot:: /home/mdboom/Work/builds/matplotlib/doc/mpl_examples/units/units_scatter.py - -:: - - """ - Demonstrate unit handling - - basic_units is a mockup of a true units package used for testing - purposed, which illustrates the basic interface that a units package - must provide to matplotlib. - - The example below shows support for unit conversions over masked - arrays. - """ - import numpy as np - from basic_units import secs, hertz, minutes - from matplotlib.pylab import figure, show - - # create masked array - - - xsecs = secs*np.ma.MaskedArray((1,2,3,4,5,6,7,8), (1,0,1,0,0,0,1,0), np.float) - #xsecs = secs*np.arange(1,10.) - - fig = figure() - ax1 = fig.add_subplot(3,1,1) - ax1.scatter(xsecs, xsecs) - #ax1.set_ylabel('seconds') - ax1.axis([0,10,0,10]) - - ax2 = fig.add_subplot(3,1,2, sharex=ax1) - ax2.scatter(xsecs, xsecs, yunits=hertz) - ax2.axis([0,10,0,1]) - - ax3 = fig.add_subplot(3,1,3, sharex=ax1) - ax3.scatter(xsecs, xsecs, yunits=hertz) - ax3.yaxis.set_units(minutes) - ax3.axis([0,10,0,1]) - - show() - - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/user_interfaces/embedding_in_gtk.txt b/dev/_sources/examples/user_interfaces/embedding_in_gtk.txt deleted file mode 100644 index f9f1d0af95f..00000000000 --- a/dev/_sources/examples/user_interfaces/embedding_in_gtk.txt +++ /dev/null @@ -1,45 +0,0 @@ -.. _user_interfaces-embedding_in_gtk: - -user_interfaces example code: embedding_in_gtk.py -================================================= - -[`source code `_] - -:: - - #!/usr/bin/env python - """ - show how to add a matplotlib FigureCanvasGTK or FigureCanvasGTKAgg widget to a - gtk.Window - """ - - import gtk - - from matplotlib.figure import Figure - from numpy import arange, sin, pi - - # uncomment to select /GTK/GTKAgg/GTKCairo - #from matplotlib.backends.backend_gtk import FigureCanvasGTK as FigureCanvas - from matplotlib.backends.backend_gtkagg import FigureCanvasGTKAgg as FigureCanvas - #from matplotlib.backends.backend_gtkcairo import FigureCanvasGTKCairo as FigureCanvas - - - win = gtk.Window() - win.connect("destroy", lambda x: gtk.main_quit()) - win.set_default_size(400,300) - win.set_title("Embedding in GTK") - - f = Figure(figsize=(5,4), dpi=100) - a = f.add_subplot(111) - t = arange(0.0,3.0,0.01) - s = sin(2*pi*t) - a.plot(t,s) - - canvas = FigureCanvas(f) # a gtk.DrawingArea - win.add(canvas) - - win.show_all() - gtk.main() - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/user_interfaces/embedding_in_gtk2.txt b/dev/_sources/examples/user_interfaces/embedding_in_gtk2.txt deleted file mode 100644 index 95cc9febcee..00000000000 --- a/dev/_sources/examples/user_interfaces/embedding_in_gtk2.txt +++ /dev/null @@ -1,64 +0,0 @@ -.. _user_interfaces-embedding_in_gtk2: - -user_interfaces example code: embedding_in_gtk2.py -================================================== - -[`source code `_] - -:: - - #!/usr/bin/env python - """ - show how to add a matplotlib FigureCanvasGTK or FigureCanvasGTKAgg widget and - a toolbar to a gtk.Window - """ - import gtk - - from matplotlib.figure import Figure - from numpy import arange, sin, pi - - # uncomment to select /GTK/GTKAgg/GTKCairo - #from matplotlib.backends.backend_gtk import FigureCanvasGTK as FigureCanvas - from matplotlib.backends.backend_gtkagg import FigureCanvasGTKAgg as FigureCanvas - #from matplotlib.backends.backend_gtkcairo import FigureCanvasGTKCairo as FigureCanvas - - # or NavigationToolbar for classic - #from matplotlib.backends.backend_gtk import NavigationToolbar2GTK as NavigationToolbar - from matplotlib.backends.backend_gtkagg import NavigationToolbar2GTKAgg as NavigationToolbar - - # implement the default mpl key bindings - from matplotlib.backend_bases import key_press_handler - - win = gtk.Window() - win.connect("destroy", lambda x: gtk.main_quit()) - win.set_default_size(400,300) - win.set_title("Embedding in GTK") - - vbox = gtk.VBox() - win.add(vbox) - - fig = Figure(figsize=(5,4), dpi=100) - ax = fig.add_subplot(111) - t = arange(0.0,3.0,0.01) - s = sin(2*pi*t) - - ax.plot(t,s) - - - canvas = FigureCanvas(fig) # a gtk.DrawingArea - vbox.pack_start(canvas) - toolbar = NavigationToolbar(canvas, win) - vbox.pack_start(toolbar, False, False) - - - def on_key_event(event): - print('you pressed %s'%event.key) - key_press_handler(event, canvas, toolbar) - - canvas.mpl_connect('key_press_event', on_key_event) - - win.show_all() - gtk.main() - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/user_interfaces/embedding_in_gtk3.txt b/dev/_sources/examples/user_interfaces/embedding_in_gtk3.txt deleted file mode 100644 index 9d4823d5651..00000000000 --- a/dev/_sources/examples/user_interfaces/embedding_in_gtk3.txt +++ /dev/null @@ -1,47 +0,0 @@ -.. _user_interfaces-embedding_in_gtk3: - -user_interfaces example code: embedding_in_gtk3.py -================================================== - -[`source code `_] - -:: - - #!/usr/bin/env python - """ - demonstrate adding a FigureCanvasGTK3Agg widget to a Gtk.ScrolledWindow - using GTK3 accessed via pygobject - """ - - from gi.repository import Gtk - - from matplotlib.figure import Figure - from numpy import arange, sin, pi - from matplotlib.backends.backend_gtk3agg import FigureCanvasGTK3Agg as FigureCanvas - - win = Gtk.Window() - win.connect("delete-event", Gtk.main_quit ) - win.set_default_size(400,300) - win.set_title("Embedding in GTK") - - f = Figure(figsize=(5,4), dpi=100) - a = f.add_subplot(111) - t = arange(0.0,3.0,0.01) - s = sin(2*pi*t) - a.plot(t,s) - - sw = Gtk.ScrolledWindow() - win.add (sw) - # A scrolled window border goes outside the scrollbars and viewport - sw.set_border_width (10) - - canvas = FigureCanvas(f) # a Gtk.DrawingArea - canvas.set_size_request(800,600) - sw.add_with_viewport (canvas) - - win.show_all() - Gtk.main() - - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/user_interfaces/embedding_in_gtk3_panzoom.txt b/dev/_sources/examples/user_interfaces/embedding_in_gtk3_panzoom.txt deleted file mode 100644 index 0a3ede82d6b..00000000000 --- a/dev/_sources/examples/user_interfaces/embedding_in_gtk3_panzoom.txt +++ /dev/null @@ -1,49 +0,0 @@ -.. _user_interfaces-embedding_in_gtk3_panzoom: - -user_interfaces example code: embedding_in_gtk3_panzoom.py -========================================================== - -[`source code `_] - -:: - - #!/usr/bin/env python - """ - demonstrate NavigationToolbar with GTK3 accessed via pygobject - """ - - from gi.repository import Gtk - - from matplotlib.figure import Figure - from numpy import arange, sin, pi - from matplotlib.backends.backend_gtk3agg import FigureCanvasGTK3Agg as FigureCanvas - from matplotlib.backends.backend_gtk3 import NavigationToolbar2GTK3 as NavigationToolbar - - win = Gtk.Window() - win.connect("delete-event", Gtk.main_quit ) - win.set_default_size(400,300) - win.set_title("Embedding in GTK") - - f = Figure(figsize=(5,4), dpi=100) - a = f.add_subplot(1,1,1) - t = arange(0.0,3.0,0.01) - s = sin(2*pi*t) - a.plot(t,s) - - vbox = Gtk.VBox() - win.add(vbox) - - # Add canvas to vbox - canvas = FigureCanvas(f) # a Gtk.DrawingArea - vbox.pack_start(canvas, True, True, 0) - - # Create toolbar - toolbar = NavigationToolbar(canvas, win) - vbox.pack_start(toolbar, False, False, 0) - - win.show_all() - Gtk.main() - - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/user_interfaces/embedding_in_qt.txt b/dev/_sources/examples/user_interfaces/embedding_in_qt.txt deleted file mode 100644 index 48242a12829..00000000000 --- a/dev/_sources/examples/user_interfaces/embedding_in_qt.txt +++ /dev/null @@ -1,149 +0,0 @@ -.. _user_interfaces-embedding_in_qt: - -user_interfaces example code: embedding_in_qt.py -================================================ - -[`source code `_] - -:: - - #! /usr/bin/env python - - # embedding_in_qt.py --- Simple Qt application embedding matplotlib canvases - # - # Copyright (C) 2005 Florent Rougon - # - # This file is an example program for matplotlib. It may be used and - # modified with no restriction; raw copies as well as modified versions - # may be distributed without limitation. - - from __future__ import unicode_literals - import sys, os, random - from qt import * - - from numpy import arange, sin, pi - from matplotlib.backends.backend_qtagg import FigureCanvasQTAgg as FigureCanvas - from matplotlib.figure import Figure - - # This seems to be what PyQt expects, according to the examples shipped in - # its distribution. - TRUE = 1 - FALSE = 0 - - progname = os.path.basename(sys.argv[0]) - progversion = "0.1" - - # Note: color-intensive applications may require a different color allocation - # strategy. - #QApplication.setColorSpec(QApplication.NormalColor) - app = QApplication(sys.argv) - - class MyMplCanvas(FigureCanvas): - """Ultimately, this is a QWidget (as well as a FigureCanvasAgg, etc.).""" - def __init__(self, parent=None, width=5, height=4, dpi=100): - self.fig = Figure(figsize=(width, height), dpi=dpi) - self.axes = self.fig.add_subplot(111) - # We want the axes cleared every time plot() is called - self.axes.hold(False) - - self.compute_initial_figure() - - FigureCanvas.__init__(self, self.fig) - self.reparent(parent, QPoint(0, 0)) - - FigureCanvas.setSizePolicy(self, - QSizePolicy.Expanding, - QSizePolicy.Expanding) - FigureCanvas.updateGeometry(self) - - def sizeHint(self): - w, h = self.get_width_height() - return QSize(w, h) - - def minimumSizeHint(self): - return QSize(10, 10) - - - class MyStaticMplCanvas(MyMplCanvas): - """Simple canvas with a sine plot.""" - def compute_initial_figure(self): - t = arange(0.0, 3.0, 0.01) - s = sin(2*pi*t) - self.axes.plot(t, s) - - - class MyDynamicMplCanvas(MyMplCanvas): - """A canvas that updates itself every second with a new plot.""" - def __init__(self, *args, **kwargs): - MyMplCanvas.__init__(self, *args, **kwargs) - timer = QTimer(self, "canvas update timer") - QObject.connect(timer, SIGNAL("timeout()"), self.update_figure) - timer.start(1000, FALSE) - - def compute_initial_figure(self): - self.axes.plot([0, 1, 2, 3], [1, 2, 0, 4], 'r') - - def update_figure(self): - # Build a list of 4 random integers between 0 and 10 (both inclusive) - l = [ random.randint(0, 10) for i in range(4) ] - - self.axes.plot([0, 1, 2, 3], l, 'r') - self.draw() - - - class ApplicationWindow(QMainWindow): - def __init__(self): - QMainWindow.__init__(self, None, - "application main window", - Qt.WType_TopLevel | Qt.WDestructiveClose) - - self.file_menu = QPopupMenu(self) - self.file_menu.insertItem('&Quit', self.fileQuit, Qt.CTRL + Qt.Key_Q) - self.menuBar().insertItem('&File', self.file_menu) - - self.help_menu = QPopupMenu(self) - self.menuBar().insertSeparator() - self.menuBar().insertItem('&Help', self.help_menu) - - self.help_menu.insertItem('&About', self.about) - - self.main_widget = QWidget(self, "Main widget") - - l = QVBoxLayout(self.main_widget) - sc = MyStaticMplCanvas(self.main_widget, width=5, height=4, dpi=100) - dc = MyDynamicMplCanvas(self.main_widget, width=5, height=4, dpi=100) - l.addWidget(sc) - l.addWidget(dc) - - self.main_widget.setFocus() - self.setCentralWidget(self.main_widget) - - self.statusBar().message("All hail matplotlib!", 2000) - - def fileQuit(self): - qApp.exit(0) - - def closeEvent(self, ce): - self.fileQuit() - - def about(self): - QMessageBox.about(self, "About %s" % progname, - """%(prog)s version %(version)s - Copyright \N{COPYRIGHT SIGN} 2005 Florent Rougon - - This program is a simple example of a Qt application embedding matplotlib - canvases. - - It may be used and modified with no restriction; raw copies as well as - modified versions may be distributed without limitation.""" - % {"prog": progname, "version": progversion}) - - - aw = ApplicationWindow() - aw.setCaption("%s" % progname) - qApp.setMainWidget(aw) - aw.show() - sys.exit(qApp.exec_loop()) - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/user_interfaces/embedding_in_qt4.txt b/dev/_sources/examples/user_interfaces/embedding_in_qt4.txt deleted file mode 100644 index 3e4cecec90b..00000000000 --- a/dev/_sources/examples/user_interfaces/embedding_in_qt4.txt +++ /dev/null @@ -1,141 +0,0 @@ -.. _user_interfaces-embedding_in_qt4: - -user_interfaces example code: embedding_in_qt4.py -================================================= - -[`source code `_] - -:: - - #!/usr/bin/env python - - # embedding_in_qt4.py --- Simple Qt4 application embedding matplotlib canvases - # - # Copyright (C) 2005 Florent Rougon - # 2006 Darren Dale - # - # This file is an example program for matplotlib. It may be used and - # modified with no restriction; raw copies as well as modified versions - # may be distributed without limitation. - - from __future__ import unicode_literals - import sys, os, random - from PyQt4 import QtGui, QtCore - - from numpy import arange, sin, pi - from matplotlib.backends.backend_qt4agg import FigureCanvasQTAgg as FigureCanvas - from matplotlib.figure import Figure - - progname = os.path.basename(sys.argv[0]) - progversion = "0.1" - - - class MyMplCanvas(FigureCanvas): - """Ultimately, this is a QWidget (as well as a FigureCanvasAgg, etc.).""" - def __init__(self, parent=None, width=5, height=4, dpi=100): - fig = Figure(figsize=(width, height), dpi=dpi) - self.axes = fig.add_subplot(111) - # We want the axes cleared every time plot() is called - self.axes.hold(False) - - self.compute_initial_figure() - - # - FigureCanvas.__init__(self, fig) - self.setParent(parent) - - FigureCanvas.setSizePolicy(self, - QtGui.QSizePolicy.Expanding, - QtGui.QSizePolicy.Expanding) - FigureCanvas.updateGeometry(self) - - def compute_initial_figure(self): - pass - - - class MyStaticMplCanvas(MyMplCanvas): - """Simple canvas with a sine plot.""" - def compute_initial_figure(self): - t = arange(0.0, 3.0, 0.01) - s = sin(2*pi*t) - self.axes.plot(t, s) - - - class MyDynamicMplCanvas(MyMplCanvas): - """A canvas that updates itself every second with a new plot.""" - def __init__(self, *args, **kwargs): - MyMplCanvas.__init__(self, *args, **kwargs) - timer = QtCore.QTimer(self) - QtCore.QObject.connect(timer, QtCore.SIGNAL("timeout()"), self.update_figure) - timer.start(1000) - - def compute_initial_figure(self): - self.axes.plot([0, 1, 2, 3], [1, 2, 0, 4], 'r') - - def update_figure(self): - # Build a list of 4 random integers between 0 and 10 (both inclusive) - l = [ random.randint(0, 10) for i in range(4) ] - - self.axes.plot([0, 1, 2, 3], l, 'r') - self.draw() - - - class ApplicationWindow(QtGui.QMainWindow): - def __init__(self): - QtGui.QMainWindow.__init__(self) - self.setAttribute(QtCore.Qt.WA_DeleteOnClose) - self.setWindowTitle("application main window") - - self.file_menu = QtGui.QMenu('&File', self) - self.file_menu.addAction('&Quit', self.fileQuit, - QtCore.Qt.CTRL + QtCore.Qt.Key_Q) - self.menuBar().addMenu(self.file_menu) - - self.help_menu = QtGui.QMenu('&Help', self) - self.menuBar().addSeparator() - self.menuBar().addMenu(self.help_menu) - - self.help_menu.addAction('&About', self.about) - - self.main_widget = QtGui.QWidget(self) - - l = QtGui.QVBoxLayout(self.main_widget) - sc = MyStaticMplCanvas(self.main_widget, width=5, height=4, dpi=100) - dc = MyDynamicMplCanvas(self.main_widget, width=5, height=4, dpi=100) - l.addWidget(sc) - l.addWidget(dc) - - self.main_widget.setFocus() - self.setCentralWidget(self.main_widget) - - self.statusBar().showMessage("All hail matplotlib!", 2000) - - def fileQuit(self): - self.close() - - def closeEvent(self, ce): - self.fileQuit() - - def about(self): - QtGui.QMessageBox.about(self, "About", - """embedding_in_qt4.py example - Copyright 2005 Florent Rougon, 2006 Darren Dale - - This program is a simple example of a Qt4 application embedding matplotlib - canvases. - - It may be used and modified with no restriction; raw copies as well as - modified versions may be distributed without limitation.""" - ) - - - qApp = QtGui.QApplication(sys.argv) - - aw = ApplicationWindow() - aw.setWindowTitle("%s" % progname) - aw.show() - sys.exit(qApp.exec_()) - #qApp.exec_() - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/user_interfaces/embedding_in_qt4_wtoolbar.txt b/dev/_sources/examples/user_interfaces/embedding_in_qt4_wtoolbar.txt deleted file mode 100644 index 3dbd65e8bfb..00000000000 --- a/dev/_sources/examples/user_interfaces/embedding_in_qt4_wtoolbar.txt +++ /dev/null @@ -1,79 +0,0 @@ -.. _user_interfaces-embedding_in_qt4_wtoolbar: - -user_interfaces example code: embedding_in_qt4_wtoolbar.py -========================================================== - -[`source code `_] - -:: - - from __future__ import print_function - - import sys - - import numpy as np - from matplotlib.figure import Figure - from matplotlib.backend_bases import key_press_handler - from matplotlib.backends.backend_qt4agg import ( - FigureCanvasQTAgg as FigureCanvas, - NavigationToolbar2QTAgg as NavigationToolbar) - from PyQt4.QtCore import * - from PyQt4.QtGui import * - - - class AppForm(QMainWindow): - def __init__(self, parent=None): - QMainWindow.__init__(self, parent) - #self.x, self.y = self.get_data() - self.data = self.get_data2() - self.create_main_frame() - self.on_draw() - - def create_main_frame(self): - self.main_frame = QWidget() - - self.fig = Figure((5.0, 4.0), dpi=100) - self.canvas = FigureCanvas(self.fig) - self.canvas.setParent(self.main_frame) - self.canvas.setFocusPolicy(Qt.StrongFocus) - self.canvas.setFocus() - - self.mpl_toolbar = NavigationToolbar(self.canvas, self.main_frame) - - self.canvas.mpl_connect('key_press_event', self.on_key_press) - - vbox = QVBoxLayout() - vbox.addWidget(self.canvas) # the matplotlib canvas - vbox.addWidget(self.mpl_toolbar) - self.main_frame.setLayout(vbox) - self.setCentralWidget(self.main_frame) - - def get_data2(self): - return np.arange(20).reshape([4, 5]).copy() - - def on_draw(self): - self.fig.clear() - self.axes = self.fig.add_subplot(111) - #self.axes.plot(self.x, self.y, 'ro') - self.axes.imshow(self.data, interpolation='nearest') - #self.axes.plot([1,2,3]) - self.canvas.draw() - - def on_key_press(self, event): - print('you pressed', event.key) - # implement the default mpl key press events described at - # http://matplotlib.org/users/navigation_toolbar.html#navigation-keyboard-shortcuts - key_press_handler(event, self.canvas, self.mpl_toolbar) - - - def main(): - app = QApplication(sys.argv) - form = AppForm() - form.show() - app.exec_() - - if __name__ == "__main__": - main() - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/user_interfaces/embedding_in_tk.txt b/dev/_sources/examples/user_interfaces/embedding_in_tk.txt deleted file mode 100644 index ebf9a2a8f16..00000000000 --- a/dev/_sources/examples/user_interfaces/embedding_in_tk.txt +++ /dev/null @@ -1,71 +0,0 @@ -.. _user_interfaces-embedding_in_tk: - -user_interfaces example code: embedding_in_tk.py -================================================ - -[`source code `_] - -:: - - #!/usr/bin/env python - - import matplotlib - matplotlib.use('TkAgg') - - from numpy import arange, sin, pi - from matplotlib.backends.backend_tkagg import FigureCanvasTkAgg, NavigationToolbar2TkAgg - # implement the default mpl key bindings - from matplotlib.backend_bases import key_press_handler - - - from matplotlib.figure import Figure - - import sys - if sys.version_info[0] < 3: - import Tkinter as Tk - else: - import tkinter as Tk - - root = Tk.Tk() - root.wm_title("Embedding in TK") - - - f = Figure(figsize=(5,4), dpi=100) - a = f.add_subplot(111) - t = arange(0.0,3.0,0.01) - s = sin(2*pi*t) - - a.plot(t,s) - - - # a tk.DrawingArea - canvas = FigureCanvasTkAgg(f, master=root) - canvas.show() - canvas.get_tk_widget().pack(side=Tk.TOP, fill=Tk.BOTH, expand=1) - - toolbar = NavigationToolbar2TkAgg( canvas, root ) - toolbar.update() - canvas._tkcanvas.pack(side=Tk.TOP, fill=Tk.BOTH, expand=1) - - def on_key_event(event): - print('you pressed %s'%event.key) - key_press_handler(event, canvas, toolbar) - - canvas.mpl_connect('key_press_event', on_key_event) - - def _quit(): - root.quit() # stops mainloop - root.destroy() # this is necessary on Windows to prevent - # Fatal Python Error: PyEval_RestoreThread: NULL tstate - - button = Tk.Button(master=root, text='Quit', command=_quit) - button.pack(side=Tk.BOTTOM) - - Tk.mainloop() - # If you put root.destroy() here, it will cause an error if - # the window is closed with the window manager. - - - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/user_interfaces/embedding_in_tk2.txt b/dev/_sources/examples/user_interfaces/embedding_in_tk2.txt deleted file mode 100644 index 835bd459d48..00000000000 --- a/dev/_sources/examples/user_interfaces/embedding_in_tk2.txt +++ /dev/null @@ -1,57 +0,0 @@ -.. _user_interfaces-embedding_in_tk2: - -user_interfaces example code: embedding_in_tk2.py -================================================= - -[`source code `_] - -:: - - #!/usr/bin/env python - import matplotlib - matplotlib.use('TkAgg') - - from numpy import arange, sin, pi - from matplotlib.backends.backend_tkagg import FigureCanvasTkAgg, NavigationToolbar2TkAgg - from matplotlib.figure import Figure - - import sys - if sys.version_info[0] < 3: - import Tkinter as Tk - else: - import tkinter as Tk - - def destroy(e): sys.exit() - - root = Tk.Tk() - root.wm_title("Embedding in TK") - #root.bind("", destroy) - - - f = Figure(figsize=(5,4), dpi=100) - a = f.add_subplot(111) - t = arange(0.0,3.0,0.01) - s = sin(2*pi*t) - - a.plot(t,s) - a.set_title('Tk embedding') - a.set_xlabel('X axis label') - a.set_ylabel('Y label') - - - # a tk.DrawingArea - canvas = FigureCanvasTkAgg(f, master=root) - canvas.show() - canvas.get_tk_widget().pack(side=Tk.TOP, fill=Tk.BOTH, expand=1) - - #toolbar = NavigationToolbar2TkAgg( canvas, root ) - #toolbar.update() - canvas._tkcanvas.pack(side=Tk.TOP, fill=Tk.BOTH, expand=1) - - button = Tk.Button(master=root, text='Quit', command=sys.exit) - button.pack(side=Tk.BOTTOM) - - Tk.mainloop() - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/user_interfaces/embedding_in_wx2.txt b/dev/_sources/examples/user_interfaces/embedding_in_wx2.txt deleted file mode 100644 index 70ed4e99cad..00000000000 --- a/dev/_sources/examples/user_interfaces/embedding_in_wx2.txt +++ /dev/null @@ -1,100 +0,0 @@ -.. _user_interfaces-embedding_in_wx2: - -user_interfaces example code: embedding_in_wx2.py -================================================= - -[`source code `_] - -:: - - #!/usr/bin/env python - """ - An example of how to use wx or wxagg in an application with the new - toolbar - comment out the setA_toolbar line for no toolbar - """ - - # Used to guarantee to use at least Wx2.8 - import wxversion - wxversion.ensureMinimal('2.8') - - from numpy import arange, sin, pi - - import matplotlib - - # uncomment the following to use wx rather than wxagg - #matplotlib.use('WX') - #from matplotlib.backends.backend_wx import FigureCanvasWx as FigureCanvas - - # comment out the following to use wx rather than wxagg - matplotlib.use('WXAgg') - from matplotlib.backends.backend_wxagg import FigureCanvasWxAgg as FigureCanvas - - from matplotlib.backends.backend_wx import NavigationToolbar2Wx - - from matplotlib.figure import Figure - - import wx - - class CanvasFrame(wx.Frame): - - def __init__(self): - wx.Frame.__init__(self,None,-1, - 'CanvasFrame',size=(550,350)) - - self.SetBackgroundColour(wx.NamedColour("WHITE")) - - self.figure = Figure() - self.axes = self.figure.add_subplot(111) - t = arange(0.0,3.0,0.01) - s = sin(2*pi*t) - - self.axes.plot(t,s) - self.canvas = FigureCanvas(self, -1, self.figure) - - self.sizer = wx.BoxSizer(wx.VERTICAL) - self.sizer.Add(self.canvas, 1, wx.LEFT | wx.TOP | wx.GROW) - self.SetSizer(self.sizer) - self.Fit() - - self.add_toolbar() # comment this out for no toolbar - - - def add_toolbar(self): - self.toolbar = NavigationToolbar2Wx(self.canvas) - self.toolbar.Realize() - if wx.Platform == '__WXMAC__': - # Mac platform (OSX 10.3, MacPython) does not seem to cope with - # having a toolbar in a sizer. This work-around gets the buttons - # back, but at the expense of having the toolbar at the top - self.SetToolBar(self.toolbar) - else: - # On Windows platform, default window size is incorrect, so set - # toolbar width to figure width. - tw, th = self.toolbar.GetSizeTuple() - fw, fh = self.canvas.GetSizeTuple() - # By adding toolbar in sizer, we are able to put it at the bottom - # of the frame - so appearance is closer to GTK version. - # As noted above, doesn't work for Mac. - self.toolbar.SetSize(wx.Size(fw, th)) - self.sizer.Add(self.toolbar, 0, wx.LEFT | wx.EXPAND) - # update the axes menu on the toolbar - self.toolbar.update() - - - def OnPaint(self, event): - self.canvas.draw() - - class App(wx.App): - - def OnInit(self): - 'Create the main window and insert the custom frame' - frame = CanvasFrame() - frame.Show(True) - - return True - - app = App(0) - app.MainLoop() - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/user_interfaces/embedding_in_wx3.txt b/dev/_sources/examples/user_interfaces/embedding_in_wx3.txt deleted file mode 100644 index fa5855db719..00000000000 --- a/dev/_sources/examples/user_interfaces/embedding_in_wx3.txt +++ /dev/null @@ -1,174 +0,0 @@ -.. _user_interfaces-embedding_in_wx3: - -user_interfaces example code: embedding_in_wx3.py -================================================= - -[`source code `_] - -:: - - #!/usr/bin/env python - - """ - Copyright (C) 2003-2004 Andrew Straw, 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 - - This is yet another example of using matplotlib with wx. Hopefully - this is pretty full-featured: - - - both matplotlib toolbar and WX buttons manipulate plot - - full wxApp framework, including widget interaction - - XRC (XML wxWidgets resource) file to create GUI (made with XRCed) - - This was derived from embedding_in_wx and dynamic_image_wxagg. - - Thanks to matplotlib and wx teams for creating such great software! - - """ - from __future__ import print_function - - # Used to guarantee to use at least Wx2.8 - import wxversion - wxversion.ensureMinimal('2.8') - - import sys, time, os, gc - import matplotlib - matplotlib.use('WXAgg') - import matplotlib.cm as cm - import matplotlib.cbook as cbook - from matplotlib.backends.backend_wxagg import Toolbar, FigureCanvasWxAgg - from matplotlib.figure import Figure - import numpy as np - - import wx - import wx.xrc as xrc - - ERR_TOL = 1e-5 # floating point slop for peak-detection - - - matplotlib.rc('image', origin='lower') - - class PlotPanel(wx.Panel): - - def __init__(self, parent): - wx.Panel.__init__(self, parent, -1) - - self.fig = Figure((5,4), 75) - self.canvas = FigureCanvasWxAgg(self, -1, self.fig) - self.toolbar = Toolbar(self.canvas) #matplotlib toolbar - self.toolbar.Realize() - #self.toolbar.set_active([0,1]) - - # Now put all into a sizer - sizer = wx.BoxSizer(wx.VERTICAL) - # This way of adding to sizer allows resizing - sizer.Add(self.canvas, 1, wx.LEFT|wx.TOP|wx.GROW) - # Best to allow the toolbar to resize! - sizer.Add(self.toolbar, 0, wx.GROW) - self.SetSizer(sizer) - self.Fit() - - def init_plot_data(self): - a = self.fig.add_subplot(111) - - x = np.arange(120.0)*2*np.pi/60.0 - y = np.arange(100.0)*2*np.pi/50.0 - self.x, self.y = np.meshgrid(x, y) - z = np.sin(self.x) + np.cos(self.y) - self.im = a.imshow( z, cmap=cm.jet)#, interpolation='nearest') - - zmax = np.amax(z) - ERR_TOL - ymax_i, xmax_i = np.nonzero(z >= zmax) - if self.im.origin == 'upper': - ymax_i = z.shape[0]-ymax_i - self.lines = a.plot(xmax_i,ymax_i,'ko') - - self.toolbar.update() # Not sure why this is needed - ADS - - def GetToolBar(self): - # You will need to override GetToolBar if you are using an - # unmanaged toolbar in your frame - return self.toolbar - - def OnWhiz(self,evt): - self.x += np.pi/15 - self.y += np.pi/20 - z = np.sin(self.x) + np.cos(self.y) - self.im.set_array(z) - - zmax = np.amax(z) - ERR_TOL - ymax_i, xmax_i = np.nonzero(z >= zmax) - if self.im.origin == 'upper': - ymax_i = z.shape[0]-ymax_i - self.lines[0].set_data(xmax_i,ymax_i) - - self.canvas.draw() - - def onEraseBackground(self, evt): - # this is supposed to prevent redraw flicker on some X servers... - pass - - class MyApp(wx.App): - def OnInit(self): - xrcfile = cbook.get_sample_data('embedding_in_wx3.xrc', asfileobj=False) - print('loading', xrcfile) - - self.res = xrc.XmlResource(xrcfile) - - # main frame and panel --------- - - self.frame = self.res.LoadFrame(None,"MainFrame") - self.panel = xrc.XRCCTRL(self.frame,"MainPanel") - - # matplotlib panel ------------- - - # container for matplotlib panel (I like to make a container - # panel for our panel so I know where it'll go when in XRCed.) - plot_container = xrc.XRCCTRL(self.frame,"plot_container_panel") - sizer = wx.BoxSizer(wx.VERTICAL) - - # matplotlib panel itself - self.plotpanel = PlotPanel(plot_container) - self.plotpanel.init_plot_data() - - # wx boilerplate - sizer.Add(self.plotpanel, 1, wx.EXPAND) - plot_container.SetSizer(sizer) - - # whiz button ------------------ - - whiz_button = xrc.XRCCTRL(self.frame,"whiz_button") - wx.EVT_BUTTON(whiz_button, whiz_button.GetId(), - self.plotpanel.OnWhiz) - - # bang button ------------------ - - bang_button = xrc.XRCCTRL(self.frame,"bang_button") - wx.EVT_BUTTON(bang_button, bang_button.GetId(), - self.OnBang) - - # final setup ------------------ - - sizer = self.panel.GetSizer() - self.frame.Show(1) - - self.SetTopWindow(self.frame) - - return True - - def OnBang(self,event): - bang_count = xrc.XRCCTRL(self.frame,"bang_count") - bangs = bang_count.GetValue() - bangs = int(bangs)+1 - bang_count.SetValue(str(bangs)) - - if __name__ == '__main__': - app = MyApp(0) - app.MainLoop() - - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/user_interfaces/embedding_in_wx4.txt b/dev/_sources/examples/user_interfaces/embedding_in_wx4.txt deleted file mode 100644 index 1cfac199bd8..00000000000 --- a/dev/_sources/examples/user_interfaces/embedding_in_wx4.txt +++ /dev/null @@ -1,130 +0,0 @@ -.. _user_interfaces-embedding_in_wx4: - -user_interfaces example code: embedding_in_wx4.py -================================================= - -[`source code `_] - -:: - - #!/usr/bin/env python - """ - An example of how to use wx or wxagg in an application with a custom - toolbar - """ - - # Used to guarantee to use at least Wx2.8 - import wxversion - wxversion.ensureMinimal('2.8') - - from numpy import arange, sin, pi - - import matplotlib - - matplotlib.use('WXAgg') - from matplotlib.backends.backend_wxagg import FigureCanvasWxAgg as FigureCanvas - from matplotlib.backends.backend_wxagg import NavigationToolbar2WxAgg - - from matplotlib.backends.backend_wx import _load_bitmap - from matplotlib.figure import Figure - from numpy.random import rand - - import wx - - class MyNavigationToolbar(NavigationToolbar2WxAgg): - """ - Extend the default wx toolbar with your own event handlers - """ - ON_CUSTOM = wx.NewId() - def __init__(self, canvas, cankill): - NavigationToolbar2WxAgg.__init__(self, canvas) - - # for simplicity I'm going to reuse a bitmap from wx, you'll - # probably want to add your own. - self.AddSimpleTool(self.ON_CUSTOM, _load_bitmap('stock_left.xpm'), - 'Click me', 'Activate custom contol') - wx.EVT_TOOL(self, self.ON_CUSTOM, self._on_custom) - - def _on_custom(self, evt): - # add some text to the axes in a random location in axes (0,1) - # coords) with a random color - - # get the axes - ax = self.canvas.figure.axes[0] - - # generate a random location can color - x,y = tuple(rand(2)) - rgb = tuple(rand(3)) - - # add the text and draw - ax.text(x, y, 'You clicked me', - transform=ax.transAxes, - color=rgb) - self.canvas.draw() - evt.Skip() - - - class CanvasFrame(wx.Frame): - - def __init__(self): - wx.Frame.__init__(self,None,-1, - 'CanvasFrame',size=(550,350)) - - self.SetBackgroundColour(wx.NamedColour("WHITE")) - - self.figure = Figure(figsize=(5,4), dpi=100) - self.axes = self.figure.add_subplot(111) - t = arange(0.0,3.0,0.01) - s = sin(2*pi*t) - - self.axes.plot(t,s) - - self.canvas = FigureCanvas(self, -1, self.figure) - - self.sizer = wx.BoxSizer(wx.VERTICAL) - self.sizer.Add(self.canvas, 1, wx.TOP | wx.LEFT | wx.EXPAND) - # Capture the paint message - wx.EVT_PAINT(self, self.OnPaint) - - self.toolbar = MyNavigationToolbar(self.canvas, True) - self.toolbar.Realize() - if wx.Platform == '__WXMAC__': - # Mac platform (OSX 10.3, MacPython) does not seem to cope with - # having a toolbar in a sizer. This work-around gets the buttons - # back, but at the expense of having the toolbar at the top - self.SetToolBar(self.toolbar) - else: - # On Windows platform, default window size is incorrect, so set - # toolbar width to figure width. - tw, th = self.toolbar.GetSizeTuple() - fw, fh = self.canvas.GetSizeTuple() - # By adding toolbar in sizer, we are able to put it at the bottom - # of the frame - so appearance is closer to GTK version. - # As noted above, doesn't work for Mac. - self.toolbar.SetSize(wx.Size(fw, th)) - self.sizer.Add(self.toolbar, 0, wx.LEFT | wx.EXPAND) - - # update the axes menu on the toolbar - self.toolbar.update() - self.SetSizer(self.sizer) - self.Fit() - - - def OnPaint(self, event): - self.canvas.draw() - event.Skip() - - class App(wx.App): - - def OnInit(self): - 'Create the main window and insert the custom frame' - frame = CanvasFrame() - frame.Show(True) - - return True - - app = App(0) - app.MainLoop() - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/user_interfaces/embedding_in_wx5.txt b/dev/_sources/examples/user_interfaces/embedding_in_wx5.txt deleted file mode 100644 index 4ffa3f4b21f..00000000000 --- a/dev/_sources/examples/user_interfaces/embedding_in_wx5.txt +++ /dev/null @@ -1,64 +0,0 @@ -.. _user_interfaces-embedding_in_wx5: - -user_interfaces example code: embedding_in_wx5.py -================================================= - -[`source code `_] - -:: - - # Used to guarantee to use at least Wx2.8 - import wxversion - wxversion.ensureMinimal('2.8') - - import wx - import wx.aui - import matplotlib as mpl - from matplotlib.backends.backend_wxagg import FigureCanvasWxAgg as Canvas - from matplotlib.backends.backend_wxagg import NavigationToolbar2Wx as Toolbar - - class Plot(wx.Panel): - def __init__(self, parent, id = -1, dpi = None, **kwargs): - wx.Panel.__init__(self, parent, id=id, **kwargs) - self.figure = mpl.figure.Figure(dpi=dpi, figsize=(2,2)) - self.canvas = Canvas(self, -1, self.figure) - self.toolbar = Toolbar(self.canvas) - self.toolbar.Realize() - - sizer = wx.BoxSizer(wx.VERTICAL) - sizer.Add(self.canvas,1,wx.EXPAND) - sizer.Add(self.toolbar, 0 , wx.LEFT | wx.EXPAND) - self.SetSizer(sizer) - - class PlotNotebook(wx.Panel): - def __init__(self, parent, id = -1): - wx.Panel.__init__(self, parent, id=id) - self.nb = wx.aui.AuiNotebook(self) - sizer = wx.BoxSizer() - sizer.Add(self.nb, 1, wx.EXPAND) - self.SetSizer(sizer) - - def add(self,name="plot"): - page = Plot(self.nb) - self.nb.AddPage(page,name) - return page.figure - - - def demo(): - app = wx.PySimpleApp() - frame = wx.Frame(None,-1,'Plotter') - plotter = PlotNotebook(frame) - axes1 = plotter.add('figure 1').gca() - axes1.plot([1,2,3],[2,1,4]) - axes2 = plotter.add('figure 2').gca() - axes2.plot([1,2,3,4,5],[2,1,4,2,3]) - #axes1.figure.canvas.draw() - #axes2.figure.canvas.draw() - frame.Show() - app.MainLoop() - - if __name__ == "__main__": demo() - - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/user_interfaces/fourier_demo_wx.txt b/dev/_sources/examples/user_interfaces/fourier_demo_wx.txt deleted file mode 100644 index bb407927d94..00000000000 --- a/dev/_sources/examples/user_interfaces/fourier_demo_wx.txt +++ /dev/null @@ -1,226 +0,0 @@ -.. _user_interfaces-fourier_demo_wx: - -user_interfaces example code: fourier_demo_wx.py -================================================ - -[`source code `_] - -:: - - import numpy as np - import wx - - import matplotlib - matplotlib.interactive(False) - matplotlib.use('WXAgg') - from matplotlib.backends.backend_wxagg import FigureCanvasWxAgg - from matplotlib.figure import Figure - from matplotlib.pyplot import gcf, setp - - - class Knob: - """ - Knob - simple class with a "setKnob" method. - A Knob instance is attached to a Param instance, e.g., param.attach(knob) - Base class is for documentation purposes. - """ - def setKnob(self, value): - pass - - - class Param: - """ - The idea of the "Param" class is that some parameter in the GUI may have - several knobs that both control it and reflect the parameter's state, e.g. - a slider, text, and dragging can all change the value of the frequency in - the waveform of this example. - The class allows a cleaner way to update/"feedback" to the other knobs when - one is being changed. Also, this class handles min/max constraints for all - the knobs. - Idea - knob list - in "set" method, knob object is passed as well - - the other knobs in the knob list have a "set" method which gets - called for the others. - """ - def __init__(self, initialValue=None, minimum=0., maximum=1.): - self.minimum = minimum - self.maximum = maximum - if initialValue != self.constrain(initialValue): - raise ValueError('illegal initial value') - self.value = initialValue - self.knobs = [] - - def attach(self, knob): - self.knobs += [knob] - - def set(self, value, knob=None): - self.value = value - self.value = self.constrain(value) - for feedbackKnob in self.knobs: - if feedbackKnob != knob: - feedbackKnob.setKnob(self.value) - return self.value - - def constrain(self, value): - if value <= self.minimum: - value = self.minimum - if value >= self.maximum: - value = self.maximum - return value - - - class SliderGroup(Knob): - def __init__(self, parent, label, param): - self.sliderLabel = wx.StaticText(parent, label=label) - self.sliderText = wx.TextCtrl(parent, -1, style=wx.TE_PROCESS_ENTER) - self.slider = wx.Slider(parent, -1) - self.slider.SetMax(param.maximum*1000) - self.setKnob(param.value) - - sizer = wx.BoxSizer(wx.HORIZONTAL) - sizer.Add(self.sliderLabel, 0, wx.EXPAND | wx.ALIGN_CENTER | wx.ALL, border=2) - sizer.Add(self.sliderText, 0, wx.EXPAND | wx.ALIGN_CENTER | wx.ALL, border=2) - sizer.Add(self.slider, 1, wx.EXPAND) - self.sizer = sizer - - self.slider.Bind(wx.EVT_SLIDER, self.sliderHandler) - self.sliderText.Bind(wx.EVT_TEXT_ENTER, self.sliderTextHandler) - - self.param = param - self.param.attach(self) - - def sliderHandler(self, evt): - value = evt.GetInt() / 1000. - self.param.set(value) - - def sliderTextHandler(self, evt): - value = float(self.sliderText.GetValue()) - self.param.set(value) - - def setKnob(self, value): - self.sliderText.SetValue('%g'%value) - self.slider.SetValue(value*1000) - - - class FourierDemoFrame(wx.Frame): - def __init__(self, *args, **kwargs): - wx.Frame.__init__(self, *args, **kwargs) - - self.fourierDemoWindow = FourierDemoWindow(self) - self.frequencySliderGroup = SliderGroup(self, label='Frequency f0:', \ - param=self.fourierDemoWindow.f0) - self.amplitudeSliderGroup = SliderGroup(self, label=' Amplitude a:', \ - param=self.fourierDemoWindow.A) - - sizer = wx.BoxSizer(wx.VERTICAL) - sizer.Add(self.fourierDemoWindow, 1, wx.EXPAND) - sizer.Add(self.frequencySliderGroup.sizer, 0, \ - wx.EXPAND | wx.ALIGN_CENTER | wx.ALL, border=5) - sizer.Add(self.amplitudeSliderGroup.sizer, 0, \ - wx.EXPAND | wx.ALIGN_CENTER | wx.ALL, border=5) - self.SetSizer(sizer) - - - class FourierDemoWindow(wx.Window, Knob): - def __init__(self, *args, **kwargs): - wx.Window.__init__(self, *args, **kwargs) - self.lines = [] - self.figure = Figure() - self.canvas = FigureCanvasWxAgg(self, -1, self.figure) - self.canvas.callbacks.connect('button_press_event', self.mouseDown) - self.canvas.callbacks.connect('motion_notify_event', self.mouseMotion) - self.canvas.callbacks.connect('button_release_event', self.mouseUp) - self.state = '' - self.mouseInfo = (None, None, None, None) - self.f0 = Param(2., minimum=0., maximum=6.) - self.A = Param(1., minimum=0.01, maximum=2.) - self.draw() - - # Not sure I like having two params attached to the same Knob, - # but that is what we have here... it works but feels kludgy - - # although maybe it's not too bad since the knob changes both params - # at the same time (both f0 and A are affected during a drag) - self.f0.attach(self) - self.A.attach(self) - self.Bind(wx.EVT_SIZE, self.sizeHandler) - - def sizeHandler(self, *args, **kwargs): - self.canvas.SetSize(self.GetSize()) - - def mouseDown(self, evt): - if self.lines[0] in self.figure.hitlist(evt): - self.state = 'frequency' - elif self.lines[1] in self.figure.hitlist(evt): - self.state = 'time' - else: - self.state = '' - self.mouseInfo = (evt.xdata, evt.ydata, max(self.f0.value, .1), self.A.value) - - def mouseMotion(self, evt): - if self.state == '': - return - x, y = evt.xdata, evt.ydata - if x is None: # outside the axes - return - x0, y0, f0Init, AInit = self.mouseInfo - self.A.set(AInit+(AInit*(y-y0)/y0), self) - if self.state == 'frequency': - self.f0.set(f0Init+(f0Init*(x-x0)/x0)) - elif self.state == 'time': - if (x-x0)/x0 != -1.: - self.f0.set(1./(1./f0Init+(1./f0Init*(x-x0)/x0))) - - def mouseUp(self, evt): - self.state = '' - - def draw(self): - if not hasattr(self, 'subplot1'): - self.subplot1 = self.figure.add_subplot(211) - self.subplot2 = self.figure.add_subplot(212) - x1, y1, x2, y2 = self.compute(self.f0.value, self.A.value) - color = (1., 0., 0.) - self.lines += self.subplot1.plot(x1, y1, color=color, linewidth=2) - self.lines += self.subplot2.plot(x2, y2, color=color, linewidth=2) - #Set some plot attributes - self.subplot1.set_title("Click and drag waveforms to change frequency and amplitude", fontsize=12) - self.subplot1.set_ylabel("Frequency Domain Waveform X(f)", fontsize = 8) - self.subplot1.set_xlabel("frequency f", fontsize = 8) - self.subplot2.set_ylabel("Time Domain Waveform x(t)", fontsize = 8) - self.subplot2.set_xlabel("time t", fontsize = 8) - self.subplot1.set_xlim([-6, 6]) - self.subplot1.set_ylim([0, 1]) - self.subplot2.set_xlim([-2, 2]) - self.subplot2.set_ylim([-2, 2]) - self.subplot1.text(0.05, .95, r'$X(f) = \mathcal{F}\{x(t)\}$', \ - verticalalignment='top', transform = self.subplot1.transAxes) - self.subplot2.text(0.05, .95, r'$x(t) = a \cdot \cos(2\pi f_0 t) e^{-\pi t^2}$', \ - verticalalignment='top', transform = self.subplot2.transAxes) - - def compute(self, f0, A): - f = np.arange(-6., 6., 0.02) - t = np.arange(-2., 2., 0.01) - x = A*np.cos(2*np.pi*f0*t)*np.exp(-np.pi*t**2) - X = A/2*(np.exp(-np.pi*(f-f0)**2) + np.exp(-np.pi*(f+f0)**2)) - return f, X, t, x - - def repaint(self): - self.canvas.draw() - - def setKnob(self, value): - # Note, we ignore value arg here and just go by state of the params - x1, y1, x2, y2 = self.compute(self.f0.value, self.A.value) - setp(self.lines[0], xdata=x1, ydata=y1) - setp(self.lines[1], xdata=x2, ydata=y2) - self.repaint() - - - class App(wx.App): - def OnInit(self): - self.frame1 = FourierDemoFrame(parent=None, title="Fourier Demo", size=(640, 480)) - self.frame1.Show() - return True - - app = App() - app.MainLoop() - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/user_interfaces/gtk_spreadsheet.txt b/dev/_sources/examples/user_interfaces/gtk_spreadsheet.txt deleted file mode 100644 index 976839f65af..00000000000 --- a/dev/_sources/examples/user_interfaces/gtk_spreadsheet.txt +++ /dev/null @@ -1,107 +0,0 @@ -.. _user_interfaces-gtk_spreadsheet: - -user_interfaces example code: gtk_spreadsheet.py -================================================ - -[`source code `_] - -:: - - #!/usr/bin/env python - """ - Example of embedding matplotlib in an application and interacting with - a treeview to store data. Double click on an entry to update plot - data - - """ - import pygtk - pygtk.require('2.0') - import gtk - from gtk import gdk - - import matplotlib - matplotlib.use('GTKAgg') # or 'GTK' - from matplotlib.backends.backend_gtk import FigureCanvasGTK as FigureCanvas - - from numpy.random import random - from matplotlib.figure import Figure - - - class DataManager(gtk.Window): - numRows, numCols = 20,10 - - data = random((numRows, numCols)) - - def __init__(self): - gtk.Window.__init__(self) - self.set_default_size(600, 600) - self.connect('destroy', lambda win: gtk.main_quit()) - - self.set_title('GtkListStore demo') - self.set_border_width(8) - - vbox = gtk.VBox(False, 8) - self.add(vbox) - - label = gtk.Label('Double click a row to plot the data') - - vbox.pack_start(label, False, False) - - sw = gtk.ScrolledWindow() - sw.set_shadow_type(gtk.SHADOW_ETCHED_IN) - sw.set_policy(gtk.POLICY_NEVER, - gtk.POLICY_AUTOMATIC) - vbox.pack_start(sw, True, True) - - model = self.create_model() - - self.treeview = gtk.TreeView(model) - self.treeview.set_rules_hint(True) - - - # matplotlib stuff - fig = Figure(figsize=(6,4)) - - self.canvas = FigureCanvas(fig) # a gtk.DrawingArea - vbox.pack_start(self.canvas, True, True) - ax = fig.add_subplot(111) - self.line, = ax.plot(self.data[0,:], 'go') # plot the first row - - self.treeview.connect('row-activated', self.plot_row) - sw.add(self.treeview) - - self.add_columns() - - self.add_events(gdk.BUTTON_PRESS_MASK | - gdk.KEY_PRESS_MASK| - gdk.KEY_RELEASE_MASK) - - - def plot_row(self, treeview, path, view_column): - ind, = path # get the index into data - points = self.data[ind,:] - self.line.set_ydata(points) - self.canvas.draw() - - - def add_columns(self): - for i in range(self.numCols): - column = gtk.TreeViewColumn('%d'%i, gtk.CellRendererText(), text=i) - self.treeview.append_column(column) - - - def create_model(self): - types = [float]*self.numCols - store = gtk.ListStore(*types) - - for row in self.data: - store.append(row) - return store - - - manager = DataManager() - manager.show_all() - gtk.main() - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/user_interfaces/histogram_demo_canvasagg.txt b/dev/_sources/examples/user_interfaces/histogram_demo_canvasagg.txt deleted file mode 100644 index 6b7ce73c294..00000000000 --- a/dev/_sources/examples/user_interfaces/histogram_demo_canvasagg.txt +++ /dev/null @@ -1,74 +0,0 @@ -.. _user_interfaces-histogram_demo_canvasagg: - -user_interfaces example code: histogram_demo_canvasagg.py -========================================================= - -[`source code `_] - -:: - - #!/usr/bin/env python - """ - This is an example that shows you how to work directly with the agg - figure canvas to create a figure using the pythonic API. - - In this example, the contents of the agg canvas are extracted to a - string, which can in turn be passed off to PIL or put in a numeric - array - - - """ - from matplotlib.backends.backend_agg import FigureCanvasAgg - from matplotlib.figure import Figure - from matplotlib.mlab import normpdf - from numpy.random import randn - import numpy - - fig = Figure(figsize=(5,4), dpi=100) - ax = fig.add_subplot(111) - - canvas = FigureCanvasAgg(fig) - - mu, sigma = 100, 15 - x = mu + sigma*randn(10000) - - # the histogram of the data - n, bins, patches = ax.hist(x, 50, normed=1) - - # add a 'best fit' line - y = normpdf( bins, mu, sigma) - line, = ax.plot(bins, y, 'r--') - line.set_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)) - - canvas.draw() - - s = canvas.tostring_rgb() # save this and convert to bitmap as needed - - # get the figure dimensions for creating bitmaps or numpy arrays, - # etc. - l,b,w,h = fig.bbox.bounds - w, h = int(w), int(h) - - if 0: - # convert to a numpy array - X = numpy.fromstring(s, numpy.uint8) - X.shape = h, w, 3 - - if 0: - # pass off to PIL - from PIL import Image - im = Image.fromstring( "RGB", (w,h), s) - im.show() - - - - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/user_interfaces/index.txt b/dev/_sources/examples/user_interfaces/index.txt deleted file mode 100644 index b565349c0d7..00000000000 --- a/dev/_sources/examples/user_interfaces/index.txt +++ /dev/null @@ -1,41 +0,0 @@ -.. _user_interfaces-examples-index: - -############################################## -user_interfaces Examples -############################################## - -.. htmlonly:: - - :Release: |version| - :Date: |today| - -.. toctree:: - :maxdepth: 1 - - embedding_in_gtk - embedding_in_gtk2 - embedding_in_gtk3 - embedding_in_gtk3_panzoom - embedding_in_qt - embedding_in_qt4 - embedding_in_qt4_wtoolbar - embedding_in_tk - embedding_in_tk2 - embedding_in_wx2 - embedding_in_wx3 - embedding_in_wx4 - embedding_in_wx5 - fourier_demo_wx - gtk_spreadsheet - histogram_demo_canvasagg - interactive - interactive2 - lineprops_dialog_gtk - mathtext_wx - mpl_with_glade - pylab_with_gtk - rec_edit_gtk_custom - rec_edit_gtk_simple - svg_histogram - svg_tooltip - wxcursor_demo diff --git a/dev/_sources/examples/user_interfaces/interactive.txt b/dev/_sources/examples/user_interfaces/interactive.txt deleted file mode 100644 index 1547c5e1b5b..00000000000 --- a/dev/_sources/examples/user_interfaces/interactive.txt +++ /dev/null @@ -1,253 +0,0 @@ -.. _user_interfaces-interactive: - -user_interfaces example code: interactive.py -============================================ - -[`source code `_] - -:: - - #!/usr/bin/env python - - """Multithreaded interactive interpreter with GTK and Matplotlib support. - - WARNING: - As of 2010/06/25, this is not working, at least on Linux. - I have disabled it as a runnable script. - EF - - - Usage: - - pyint-gtk.py -> starts shell with gtk thread running separately - - pyint-gtk.py -pylab [filename] -> initializes matplotlib, optionally running - the named file. The shell starts after the file is executed. - - Threading code taken from: - http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/65109, by Brian - McErlean and John Finlay. - - Matplotlib support taken from interactive.py in the matplotlib distribution. - - Also borrows liberally from code.py in the Python standard library.""" - - from __future__ import print_function - - __author__ = "Fernando Perez " - - import sys - import code - import threading - - import gobject - import gtk - - try: - import readline - except ImportError: - has_readline = False - else: - has_readline = True - - class MTConsole(code.InteractiveConsole): - """Simple multi-threaded shell""" - - def __init__(self,on_kill=None,*args,**kw): - code.InteractiveConsole.__init__(self,*args,**kw) - self.code_to_run = None - self.ready = threading.Condition() - self._kill = False - if on_kill is None: - on_kill = [] - # Check that all things to kill are callable: - for _ in on_kill: - if not callable(_): - raise TypeError,'on_kill must be a list of callables' - self.on_kill = on_kill - # Set up tab-completer - if has_readline: - import rlcompleter - try: # this form only works with python 2.3 - self.completer = rlcompleter.Completer(self.locals) - except: # simpler for py2.2 - self.completer = rlcompleter.Completer() - - readline.set_completer(self.completer.complete) - # Use tab for completions - readline.parse_and_bind('tab: complete') - # This forces readline to automatically print the above list when tab - # completion is set to 'complete'. - readline.parse_and_bind('set show-all-if-ambiguous on') - # Bindings for incremental searches in the history. These searches - # use the string typed so far on the command line and search - # anything in the previous input history containing them. - readline.parse_and_bind('"\C-r": reverse-search-history') - readline.parse_and_bind('"\C-s": forward-search-history') - - def runsource(self, source, filename="", symbol="single"): - """Compile and run some source in the interpreter. - - Arguments are as for compile_command(). - - One several things can happen: - - 1) The input is incorrect; compile_command() raised an - exception (SyntaxError or OverflowError). A syntax traceback - will be printed by calling the showsyntaxerror() method. - - 2) The input is incomplete, and more input is required; - compile_command() returned None. Nothing happens. - - 3) The input is complete; compile_command() returned a code - object. The code is executed by calling self.runcode() (which - also handles run-time exceptions, except for SystemExit). - - The return value is True in case 2, False in the other cases (unless - an exception is raised). The return value can be used to - decide whether to use sys.ps1 or sys.ps2 to prompt the next - line. - """ - try: - code = self.compile(source, filename, symbol) - except (OverflowError, SyntaxError, ValueError): - # Case 1 - self.showsyntaxerror(filename) - return False - - if code is None: - # Case 2 - return True - - # Case 3 - # Store code in self, so the execution thread can handle it - self.ready.acquire() - self.code_to_run = code - self.ready.wait() # Wait until processed in timeout interval - self.ready.release() - - return False - - def runcode(self): - """Execute a code object. - - When an exception occurs, self.showtraceback() is called to display a - traceback.""" - - self.ready.acquire() - if self._kill: - print('Closing threads...') - sys.stdout.flush() - for tokill in self.on_kill: - tokill() - print('Done.') - - if self.code_to_run is not None: - self.ready.notify() - code.InteractiveConsole.runcode(self,self.code_to_run) - - self.code_to_run = None - self.ready.release() - return True - - def kill (self): - """Kill the thread, returning when it has been shut down.""" - self.ready.acquire() - self._kill = True - self.ready.release() - - class GTKInterpreter(threading.Thread): - """Run gtk.main in the main thread and a python interpreter in a - separate thread. - Python commands can be passed to the thread where they will be executed. - This is implemented by periodically checking for passed code using a - GTK timeout callback. - """ - TIMEOUT = 100 # Millisecond interval between timeouts. - - def __init__(self,banner=None): - threading.Thread.__init__(self) - self.banner = banner - self.shell = MTConsole(on_kill=[gtk.main_quit]) - - def run(self): - self.pre_interact() - self.shell.interact(self.banner) - self.shell.kill() - - def mainloop(self): - self.start() - gobject.timeout_add(self.TIMEOUT, self.shell.runcode) - try: - if gtk.gtk_version[0] >= 2: - gtk.gdk.threads_init() - except AttributeError: - pass - gtk.main() - self.join() - - def pre_interact(self): - """This method should be overridden by subclasses. - - It gets called right before interact(), but after the thread starts. - Typically used to push initialization code into the interpreter""" - - pass - - class MatplotLibInterpreter(GTKInterpreter): - """Threaded interpreter with matplotlib support. - - Note that this explicitly sets GTKAgg as the backend, since it has - specific GTK hooks in it.""" - - def __init__(self,banner=None): - banner = """\nWelcome to matplotlib, a MATLAB-like python environment. - help(matlab) -> help on matlab compatible commands from matplotlib. - help(plotting) -> help on plotting commands. - """ - GTKInterpreter.__init__(self,banner) - - def pre_interact(self): - """Initialize matplotlib before user interaction begins""" - - push = self.shell.push - # Code to execute in user's namespace - lines = ["import matplotlib", - "matplotlib.use('GTKAgg')", - "matplotlib.interactive(1)", - "import matplotlib.pylab as pylab", - "from matplotlib.pylab import *\n"] - - map(push,lines) - - # Execute file if given. - if len(sys.argv)>1: - import matplotlib - matplotlib.interactive(0) # turn off interaction - fname = sys.argv[1] - try: - inFile = file(fname, 'r') - except IOError: - print('*** ERROR *** Could not read file <%s>' % fname) - else: - print('*** Executing file <%s>:' % fname) - for line in inFile: - if line.lstrip().find('show()')==0: continue - print('>>', line) - push(line) - inFile.close() - matplotlib.interactive(1) # turn on interaction - - if __name__ == '__main__': - print("This demo is not presently functional, so running") - print("it as a script has been disabled.") - sys.exit() - # Quick sys.argv hack to extract the option and leave filenames in sys.argv. - # For real option handling, use optparse or getopt. - if len(sys.argv) > 1 and sys.argv[1]=='-pylab': - sys.argv = [sys.argv[0]]+sys.argv[2:] - MatplotLibInterpreter().mainloop() - else: - GTKInterpreter().mainloop() - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/user_interfaces/interactive2.txt b/dev/_sources/examples/user_interfaces/interactive2.txt deleted file mode 100644 index 88de7c99cee..00000000000 --- a/dev/_sources/examples/user_interfaces/interactive2.txt +++ /dev/null @@ -1,392 +0,0 @@ -.. _user_interfaces-interactive2: - -user_interfaces example code: interactive2.py -============================================= - -[`source code `_] - -:: - - #!/usr/bin/env python - - from __future__ import print_function - - # GTK Interactive Console - # (C) 2003, Jon Anderson - # See www.python.org/2.2/license.html for - # license details. - # - import gtk - import gtk.gdk - - import code - import os, sys - import pango - - import __builtin__ - import __main__ - - - banner = """GTK Interactive Python Console - Thanks to Jon Anderson - %s - """ % sys.version - - banner += """ - - Welcome to matplotlib. - - help(matplotlib) -- some general information about matplotlib - help(plotting) -- shows a list of plot specific commands - - """ - class Completer: - """ - Taken from rlcompleter, with readline references stripped, and a local dictionary to use. - """ - def __init__(self, locals): - self.locals = locals - - def complete(self, text, state): - """Return the next possible completion for 'text'. - This is called successively with state == 0, 1, 2, ... until it - returns None. The completion should begin with 'text'. - - """ - if state == 0: - if "." in text: - self.matches = self.attr_matches(text) - else: - self.matches = self.global_matches(text) - try: - return self.matches[state] - except IndexError: - return None - - def global_matches(self, text): - """Compute matches when text is a simple name. - - Return a list of all keywords, built-in functions and names - currently defines in __main__ that match. - - """ - import keyword - matches = [] - n = len(text) - for list in [keyword.kwlist,__builtin__.__dict__.keys(),__main__.__dict__.keys(), self.locals.keys()]: - for word in list: - if word[:n] == text and word != "__builtins__": - matches.append(word) - return matches - - def attr_matches(self, text): - """Compute matches when text contains a dot. - - Assuming the text is of the form NAME.NAME....[NAME], and is - evaluatable in the globals of __main__, it will be evaluated - and its attributes (as revealed by dir()) are used as possible - completions. (For class instances, class members are are also - considered.) - - WARNING: this can still invoke arbitrary C code, if an object - with a __getattr__ hook is evaluated. - - """ - import re - m = re.match(r"(\w+(\.\w+)*)\.(\w*)", text) - if not m: - return - expr, attr = m.group(1, 3) - object = eval(expr, __main__.__dict__, self.locals) - words = dir(object) - if hasattr(object,'__class__'): - words.append('__class__') - words = words + get_class_members(object.__class__) - matches = [] - n = len(attr) - for word in words: - if word[:n] == attr and word != "__builtins__": - matches.append("%s.%s" % (expr, word)) - return matches - - def get_class_members(klass): - ret = dir(klass) - if hasattr(klass,'__bases__'): - for base in klass.__bases__: - ret = ret + get_class_members(base) - return ret - - - - class OutputStream: - """ - A Multiplexing output stream. - It can replace another stream, and tee output to the original stream and too - a GTK textview. - """ - def __init__(self,view,old_out,style): - self.view = view - self.buffer = view.get_buffer() - self.mark = self.buffer.create_mark("End",self.buffer.get_end_iter(), False ) - self.out = old_out - self.style = style - self.tee = 1 - - def write(self,text): - if self.tee: - self.out.write(text) - - end = self.buffer.get_end_iter() - - if not self.view == None: - self.view.scroll_to_mark(self.mark, 0, True, 1, 1) - - self.buffer.insert_with_tags(end,text,self.style) - - class GTKInterpreterConsole(gtk.ScrolledWindow): - """ - An InteractiveConsole for GTK. It's an actual widget, - so it can be dropped in just about anywhere. - """ - def __init__(self): - gtk.ScrolledWindow.__init__(self) - self.set_policy (gtk.POLICY_AUTOMATIC,gtk.POLICY_AUTOMATIC) - - self.text = gtk.TextView() - self.text.set_wrap_mode(True) - - self.interpreter = code.InteractiveInterpreter() - - self.completer = Completer(self.interpreter.locals) - self.buffer = [] - self.history = [] - self.banner = banner - self.ps1 = ">>> " - self.ps2 = "... " - - self.text.add_events( gtk.gdk.KEY_PRESS_MASK ) - self.text.connect( "key_press_event", self.key_pressed ) - - self.current_history = -1 - - self.mark = self.text.get_buffer().create_mark("End",self.text.get_buffer().get_end_iter(), False ) - - #setup colors - self.style_banner = gtk.TextTag("banner") - self.style_banner.set_property( "foreground", "saddle brown" ) - - self.style_ps1 = gtk.TextTag("ps1") - self.style_ps1.set_property( "foreground", "DarkOrchid4" ) - self.style_ps1.set_property( "editable", False ) - self.style_ps1.set_property("font", "courier" ) - - self.style_ps2 = gtk.TextTag("ps2") - self.style_ps2.set_property( "foreground", "DarkOliveGreen" ) - self.style_ps2.set_property( "editable", False ) - self.style_ps2.set_property("font", "courier" ) - - self.style_out = gtk.TextTag("stdout") - self.style_out.set_property( "foreground", "midnight blue" ) - self.style_err = gtk.TextTag("stderr") - self.style_err.set_property( "style", pango.STYLE_ITALIC ) - self.style_err.set_property( "foreground", "red" ) - - self.text.get_buffer().get_tag_table().add(self.style_banner) - self.text.get_buffer().get_tag_table().add(self.style_ps1) - self.text.get_buffer().get_tag_table().add(self.style_ps2) - self.text.get_buffer().get_tag_table().add(self.style_out) - self.text.get_buffer().get_tag_table().add(self.style_err) - - self.stdout = OutputStream(self.text,sys.stdout,self.style_out) - self.stderr = OutputStream(self.text,sys.stderr,self.style_err) - - sys.stderr = self.stderr - sys.stdout = self.stdout - - self.current_prompt = None - - self.write_line(self.banner, self.style_banner) - self.prompt_ps1() - - self.add(self.text) - self.text.show() - - - def reset_history(self): - self.history = [] - - def reset_buffer(self): - self.buffer = [] - - def prompt_ps1(self): - self.current_prompt = self.prompt_ps1 - self.write_line(self.ps1,self.style_ps1) - - def prompt_ps2(self): - self.current_prompt = self.prompt_ps2 - self.write_line(self.ps2,self.style_ps2) - - def write_line(self,text,style=None): - start,end = self.text.get_buffer().get_bounds() - if style==None: - self.text.get_buffer().insert(end,text) - else: - self.text.get_buffer().insert_with_tags(end,text,style) - - self.text.scroll_to_mark(self.mark, 0, True, 1, 1) - - def push(self, line): - - self.buffer.append(line) - if len(line) > 0: - self.history.append(line) - - source = "\n".join(self.buffer) - - more = self.interpreter.runsource(source, "<>") - - if not more: - self.reset_buffer() - - return more - - def key_pressed(self,widget,event): - if event.keyval == gtk.gdk.keyval_from_name('Return'): - return self.execute_line() - - if event.keyval == gtk.gdk.keyval_from_name('Up'): - self.current_history = self.current_history - 1 - if self.current_history < - len(self.history): - self.current_history = - len(self.history) - return self.show_history() - elif event.keyval == gtk.gdk.keyval_from_name('Down'): - self.current_history = self.current_history + 1 - if self.current_history > 0: - self.current_history = 0 - return self.show_history() - elif event.keyval == gtk.gdk.keyval_from_name( 'Home'): - l = self.text.get_buffer().get_line_count() - 1 - start = self.text.get_buffer().get_iter_at_line_offset(l,4) - self.text.get_buffer().place_cursor(start) - return True - elif event.keyval == gtk.gdk.keyval_from_name( 'space') and event.state & gtk.gdk.CONTROL_MASK: - return self.complete_line() - return False - - def show_history(self): - if self.current_history == 0: - return True - else: - self.replace_line( self.history[self.current_history] ) - return True - - def current_line(self): - start,end = self.current_line_bounds() - return self.text.get_buffer().get_text(start,end, True) - - def current_line_bounds(self): - txt_buffer = self.text.get_buffer() - l = txt_buffer.get_line_count() - 1 - - start = txt_buffer.get_iter_at_line(l) - if start.get_chars_in_line() >= 4: - start.forward_chars(4) - end = txt_buffer.get_end_iter() - return start,end - - def replace_line(self,txt): - start,end = self.current_line_bounds() - self.text.get_buffer().delete(start,end) - self.write_line(txt) - - def execute_line(self, line=None): - if line is None: - line = self.current_line() - self.write_line("\n") - else: - self.write_line(line + "\n") - - - more = self.push(line) - - self.text.get_buffer().place_cursor(self.text.get_buffer().get_end_iter()) - - if more: - self.prompt_ps2() - else: - self.prompt_ps1() - - - self.current_history = 0 - - self.window.raise_() - - return True - - def complete_line(self): - line = self.current_line() - tokens = line.split() - token = tokens[-1] - - completions = [] - p = self.completer.complete(token,len(completions)) - while p != None: - completions.append(p) - p = self.completer.complete(token, len(completions)) - - if len(completions) != 1: - self.write_line("\n") - self.write_line("\n".join(completions), self.style_ps1) - self.write_line("\n") - self.current_prompt() - self.write_line(line) - else: - i = line.rfind(token) - line = line[0:i] + completions[0] - self.replace_line(line) - - return True - - - def main(): - w = gtk.Window() - console = GTKInterpreterConsole() - console.set_size_request(640,480) - w.add(console) - - def destroy(arg=None): - gtk.main_quit() - - def key_event(widget,event): - if gtk.gdk.keyval_name( event.keyval) == 'd' and \ - event.state & gtk.gdk.CONTROL_MASK: - destroy() - return False - - w.connect("destroy", destroy) - - w.add_events( gtk.gdk.KEY_PRESS_MASK ) - w.connect( 'key_press_event', key_event) - w.show_all() - - console.execute_line('import matplotlib') - console.execute_line("matplotlib.use('GTKAgg')") - console.execute_line('matplotlib.interactive(1)') - console.execute_line('from pylab import *') - - - if len(sys.argv)>1: - fname = sys.argv[1] - if not os.path.exists(fname): - print('%s does not exist' % fname) - for line in file(fname): - line = line.strip() - - console.execute_line(line) - gtk.main() - - if __name__ == '__main__': - main() - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/user_interfaces/lineprops_dialog_gtk.txt b/dev/_sources/examples/user_interfaces/lineprops_dialog_gtk.txt deleted file mode 100644 index 7f02f57f902..00000000000 --- a/dev/_sources/examples/user_interfaces/lineprops_dialog_gtk.txt +++ /dev/null @@ -1,37 +0,0 @@ -.. _user_interfaces-lineprops_dialog_gtk: - -user_interfaces example code: lineprops_dialog_gtk.py -===================================================== - -[`source code `_] - -:: - - import matplotlib - matplotlib.use('GTKAgg') - from matplotlib.backends.backend_gtk import DialogLineprops - - import numpy as np - import matplotlib.pyplot as plt - - def f(t): - s1 = np.cos(2*np.pi*t) - e1 = np.exp(-t) - return np.multiply(s1,e1) - - t1 = np.arange(0.0, 5.0, 0.1) - t2 = np.arange(0.0, 5.0, 0.02) - t3 = np.arange(0.0, 2.0, 0.01) - - fig = plt.figure() - ax = fig.add_subplot(111) - l1, = ax.plot(t1, f(t1), 'bo', label='line 1') - l2, = ax.plot(t2, f(t2), 'k--', label='line 2') - - dlg = DialogLineprops([l1,l2]) - dlg.show() - plt.show() - - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/user_interfaces/mathtext_wx.txt b/dev/_sources/examples/user_interfaces/mathtext_wx.txt deleted file mode 100644 index 49c22a4c7eb..00000000000 --- a/dev/_sources/examples/user_interfaces/mathtext_wx.txt +++ /dev/null @@ -1,136 +0,0 @@ -.. _user_interfaces-mathtext_wx: - -user_interfaces example code: mathtext_wx.py -============================================ - -[`source code `_] - -:: - - """ - Demonstrates how to convert mathtext to a wx.Bitmap for display in various - controls on wxPython. - """ - - import matplotlib - matplotlib.use("WxAgg") - from numpy import arange, sin, pi, cos, log - from matplotlib.backends.backend_wxagg import FigureCanvasWxAgg as FigureCanvas - from matplotlib.backends.backend_wx import NavigationToolbar2Wx - from matplotlib.figure import Figure - - import wx - - IS_GTK = 'wxGTK' in wx.PlatformInfo - IS_WIN = 'wxMSW' in wx.PlatformInfo - IS_MAC = 'wxMac' in wx.PlatformInfo - - ############################################################ - # This is where the "magic" happens. - from matplotlib.mathtext import MathTextParser - mathtext_parser = MathTextParser("Bitmap") - def mathtext_to_wxbitmap(s): - ftimage, depth = mathtext_parser.parse(s, 150) - return wx.BitmapFromBufferRGBA( - ftimage.get_width(), ftimage.get_height(), - ftimage.as_rgba_str()) - ############################################################ - - functions = [ - (r'$\sin(2 \pi x)$' , lambda x: sin(2*pi*x)), - (r'$\frac{4}{3}\pi x^3$' , lambda x: (4.0 / 3.0) * pi * x**3), - (r'$\cos(2 \pi x)$' , lambda x: cos(2*pi*x)), - (r'$\log(x)$' , lambda x: log(x)) - ] - - class CanvasFrame(wx.Frame): - def __init__(self, parent, title): - wx.Frame.__init__(self, parent, -1, title, size=(550, 350)) - self.SetBackgroundColour(wx.NamedColour("WHITE")) - - self.figure = Figure() - self.axes = self.figure.add_subplot(111) - self.change_plot(0) - - self.canvas = FigureCanvas(self, -1, self.figure) - - self.sizer = wx.BoxSizer(wx.VERTICAL) - self.add_buttonbar() - self.sizer.Add(self.canvas, 1, wx.LEFT | wx.TOP | wx.GROW) - self.add_toolbar() # comment this out for no toolbar - - menuBar = wx.MenuBar() - - # File Menu - menu = wx.Menu() - menu.Append(wx.ID_EXIT, "E&xit\tAlt-X", "Exit this simple sample") - menuBar.Append(menu, "&File") - - if IS_GTK or IS_WIN: - # Equation Menu - menu = wx.Menu() - for i, (mt, func) in enumerate(functions): - bm = mathtext_to_wxbitmap(mt) - item = wx.MenuItem(menu, 1000 + i, "") - item.SetBitmap(bm) - menu.AppendItem(item) - self.Bind(wx.EVT_MENU, self.OnChangePlot, item) - menuBar.Append(menu, "&Functions") - - self.SetMenuBar(menuBar) - - self.SetSizer(self.sizer) - self.Fit() - - def add_buttonbar(self): - self.button_bar = wx.Panel(self) - self.button_bar_sizer = wx.BoxSizer(wx.HORIZONTAL) - self.sizer.Add(self.button_bar, 0, wx.LEFT | wx.TOP | wx.GROW) - - for i, (mt, func) in enumerate(functions): - bm = mathtext_to_wxbitmap(mt) - button = wx.BitmapButton(self.button_bar, 1000 + i, bm) - self.button_bar_sizer.Add(button, 1, wx.GROW) - self.Bind(wx.EVT_BUTTON, self.OnChangePlot, button) - - self.button_bar.SetSizer(self.button_bar_sizer) - - def add_toolbar(self): - """Copied verbatim from embedding_wx2.py""" - self.toolbar = NavigationToolbar2Wx(self.canvas) - self.toolbar.Realize() - if IS_MAC: - self.SetToolBar(self.toolbar) - else: - tw, th = self.toolbar.GetSizeTuple() - fw, fh = self.canvas.GetSizeTuple() - self.toolbar.SetSize(wx.Size(fw, th)) - self.sizer.Add(self.toolbar, 0, wx.LEFT | wx.EXPAND) - self.toolbar.update() - - def OnPaint(self, event): - self.canvas.draw() - - def OnChangePlot(self, event): - self.change_plot(event.GetId() - 1000) - - def change_plot(self, plot_number): - t = arange(1.0,3.0,0.01) - s = functions[plot_number][1](t) - self.axes.clear() - self.axes.plot(t, s) - self.Refresh() - - class MyApp(wx.App): - def OnInit(self): - frame = CanvasFrame(None, "wxPython mathtext demo app") - self.SetTopWindow(frame) - frame.Show(True) - return True - - app = MyApp() - app.MainLoop() - - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/user_interfaces/mpl_with_glade.txt b/dev/_sources/examples/user_interfaces/mpl_with_glade.txt deleted file mode 100644 index 41083282c72..00000000000 --- a/dev/_sources/examples/user_interfaces/mpl_with_glade.txt +++ /dev/null @@ -1,119 +0,0 @@ -.. _user_interfaces-mpl_with_glade: - -user_interfaces example code: mpl_with_glade.py -=============================================== - -[`source code `_] - -:: - - #!/usr/bin/env python - - from __future__ import print_function - import matplotlib - matplotlib.use('GTK') - - from matplotlib.figure import Figure - from matplotlib.axes import Subplot - from matplotlib.backends.backend_gtkagg import FigureCanvasGTKAgg as FigureCanvas - from matplotlib.backends.backend_gtkagg import NavigationToolbar2GTKAgg as NavigationToolbar - from matplotlib.widgets import SpanSelector - - from numpy import arange, sin, pi - import gtk - import gtk.glade - - - def simple_msg(msg, parent=None, title=None): - dialog = gtk.MessageDialog( - parent = None, - type = gtk.MESSAGE_INFO, - buttons = gtk.BUTTONS_OK, - message_format = msg) - if parent is not None: - dialog.set_transient_for(parent) - if title is not None: - dialog.set_title(title) - dialog.show() - dialog.run() - dialog.destroy() - return None - - - - class GladeHandlers: - def on_buttonClickMe_clicked(event): - simple_msg('Nothing to say, really', - parent=widgets['windowMain'], - title='Thanks!') - - class WidgetsWrapper: - def __init__(self): - self.widgets = gtk.glade.XML('mpl_with_glade.glade') - self.widgets.signal_autoconnect(GladeHandlers.__dict__) - - self['windowMain'].connect('destroy', lambda x: gtk.main_quit()) - self['windowMain'].move(10,10) - self.figure = Figure(figsize=(8,6), dpi=72) - self.axis = self.figure.add_subplot(111) - - t = arange(0.0,3.0,0.01) - s = sin(2*pi*t) - self.axis.plot(t,s) - self.axis.set_xlabel('time (s)') - self.axis.set_ylabel('voltage') - - self.canvas = FigureCanvas(self.figure) # a gtk.DrawingArea - self.canvas.show() - self.canvas.set_size_request(600, 400) - self.canvas.set_events( - gtk.gdk.BUTTON_PRESS_MASK | - gtk.gdk.KEY_PRESS_MASK | - gtk.gdk.KEY_RELEASE_MASK - ) - self.canvas.set_flags(gtk.HAS_FOCUS|gtk.CAN_FOCUS) - self.canvas.grab_focus() - - def keypress(widget, event): - print('key press') - def buttonpress(widget, event): - print('button press') - - self.canvas.connect('key_press_event', keypress) - self.canvas.connect('button_press_event', buttonpress) - - def onselect(xmin, xmax): - print(xmin, xmax) - - span = SpanSelector(self.axis, onselect, 'horizontal', useblit=False, - rectprops=dict(alpha=0.5, facecolor='red') ) - - - self['vboxMain'].pack_start(self.canvas, True, True) - self['vboxMain'].show() - - # below is optional if you want the navigation toolbar - self.navToolbar = NavigationToolbar(self.canvas, self['windowMain']) - self.navToolbar.lastDir = '/var/tmp/' - self['vboxMain'].pack_start(self.navToolbar) - self.navToolbar.show() - - sep = gtk.HSeparator() - sep.show() - self['vboxMain'].pack_start(sep, True, True) - - - self['vboxMain'].reorder_child(self['buttonClickMe'],-1) - - - - - - def __getitem__(self, key): - return self.widgets.get_widget(key) - - widgets = WidgetsWrapper() - gtk.main() - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/user_interfaces/printing_in_wx.txt b/dev/_sources/examples/user_interfaces/printing_in_wx.txt deleted file mode 100644 index 487b5663d07..00000000000 --- a/dev/_sources/examples/user_interfaces/printing_in_wx.txt +++ /dev/null @@ -1,200 +0,0 @@ -.. _user_interfaces-printing_in_wx: - -user_interfaces example code: printing_in_wx.py -=============================================== - -[`source code `_] - -:: - - #!/usr/bin/env python - # printing_in_wx.py - # - - from __future__ import print_function - """ - This examples demonstrates Printing (ie, to a printer) with a - matplotlib figure using a wx Frame. This borrows the data from - embedding_in_wx.py, but with several changes: - Menus for - Save export figure (png,eps,bmp) to file - Copy copy bitmap of figure to the system clipboard - Print Setup setup size of figure for printing - Print Preview preview printer page - Print send figure to a system printer - Exit end application - - where 'figure' means an image of the matplotlib canvas - - In addition, "Ctrl-C" is bound to Copy-figure-to-clipboard - - - This is a very simple use of matplotlib, and mostly focused on - demonstrating the interaction between wxPython and the matplotlib - figure canvas. - - Matt Newville - last modified: 12-Nov-2004 - license: use it any way you want - """ - - import wx - import os - import matplotlib - - # either WX or WXAgg can be used here. - # matplotlib.use('WX') - # from matplotlib.backends.backend_wxagg import FigureCanvasWx as FigCanvas - - matplotlib.use('WXAgg') - from matplotlib.backends.backend_wxagg import FigureCanvasWxAgg as FigCanvas - - from matplotlib.figure import Figure - import numpy - - class PlotFrame(wx.Frame): - help_msg=""" Menus for - Save export figure (png,eps,bmp) to file - Copy copy bitmap of figure to the system clipboard - Print Setup setup size of figure for printing - Print Preview preview printer page - Print send figure to a system printer - Exit end application - - where 'figure' means an image of the matplotlib canvas - - In addition, "Ctrl-C" is bound to copy-figure-to-clipboard - """ - - start_msg = """ Use Menus to test printing - or Ctrl-C to copy plot image to clipboard """ - - about_msg = """ printing_in_wx version 0.1 12-Nov-2004 - Matt Newville """ - - def __init__(self): - wx.Frame.__init__(self, None, -1, "Test Printing with WX Backend") - self.fig = Figure((5.0,3.0), 100) - self.canvas= FigCanvas(self, -1, self.fig) - self.axes = self.fig.add_axes([0.15,0.15,0.75,0.75]) - - - sizer = wx.BoxSizer(wx.VERTICAL) - sizer.Add(self.canvas, 1, wx.LEFT|wx.TOP|wx.GROW) - sizer.Add(wx.StaticText(self,-1, self.start_msg), 0, - wx.ALIGN_LEFT|wx.TOP) - - self.canvas.Bind(wx.EVT_KEY_DOWN, self.onKeyEvent) - - self.SetSizer(sizer) - self.Fit() - self.Build_Menus() - self.Plot_Data() - - def Build_Menus(self): - """ build menus """ - MENU_EXIT = wx.NewId() - MENU_SAVE = wx.NewId() - MENU_PRINT = wx.NewId() - MENU_PSETUP= wx.NewId() - MENU_PREVIEW=wx.NewId() - MENU_CLIPB =wx.NewId() - MENU_HELP =wx.NewId() - - menuBar = wx.MenuBar() - - f0 = wx.Menu() - f0.Append(MENU_SAVE, "&Export", "Save Image of Plot") - f0.AppendSeparator() - f0.Append(MENU_PSETUP, "Page Setup...", "Printer Setup") - f0.Append(MENU_PREVIEW,"Print Preview...", "Print Preview") - f0.Append(MENU_PRINT, "&Print", "Print Plot") - f0.AppendSeparator() - f0.Append(MENU_EXIT, "E&xit", "Exit") - menuBar.Append(f0, "&File"); - - f1 = wx.Menu() - f1.Append(MENU_HELP, "Quick Reference", "Quick Reference") - - menuBar.Append(f1, "&Help"); - - self.SetMenuBar(menuBar) - - self.Bind(wx.EVT_MENU, self.onPrint, id=MENU_PRINT) - self.Bind(wx.EVT_MENU, self.onPrinterSetup, id=MENU_PSETUP) - self.Bind(wx.EVT_MENU, self.onPrinterPreview, id=MENU_PREVIEW) - self.Bind(wx.EVT_MENU, self.onClipboard, id=MENU_CLIPB) - self.Bind(wx.EVT_MENU, self.onExport, id=MENU_SAVE) - self.Bind(wx.EVT_MENU, self.onExit , id=MENU_EXIT) - self.Bind(wx.EVT_MENU, self.onHelp, id=MENU_HELP) - - # the printer / clipboard methods are implemented - # in backend_wx, and so are very simple to use. - def onPrinterSetup(self,event=None): - self.canvas.Printer_Setup(event=event) - - def onPrinterPreview(self,event=None): - self.canvas.Printer_Preview(event=event) - - def onPrint(self,event=None): - self.canvas.Printer_Print(event=event) - - def onClipboard(self,event=None): - self.canvas.Copy_to_Clipboard(event=event) - - - def onKeyEvent(self,event=None): - """ capture , act upon keystroke events""" - if event == None: return - key = event.KeyCode() - if (key < wx.WXK_SPACE or key > 255): return - - if (event.ControlDown() and chr(key)=='C'): # Ctrl-C - self.onClipboard(event=event) - - def onHelp(self, event=None): - dlg = wx.MessageDialog(self, self.help_msg, - "Quick Reference", - wx.OK | wx.ICON_INFORMATION) - dlg.ShowModal() - dlg.Destroy() - - def onExport(self,event=None): - """ save figure image to file""" - file_choices = "PNG (*.png)|*.png|" \ - "PS (*.ps)|*.ps|" \ - "EPS (*.eps)|*.eps|" \ - "BMP (*.bmp)|*.bmp" - - thisdir = os.getcwd() - - dlg = wx.FileDialog(self, message='Save Plot Figure as...', - defaultDir = thisdir, defaultFile='plot.png', - wildcard=file_choices, style=wx.SAVE) - - if dlg.ShowModal() == wx.ID_OK: - path = dlg.GetPath() - self.canvas.print_figure(path,dpi=300) - if (path.find(thisdir) == 0): - path = path[len(thisdir)+1:] - print('Saved plot to %s' % path) - - def onExit(self,event=None): - self.Destroy() - - def Plot_Data(self): - t = numpy.arange(0.0,5.0,0.01) - s = numpy.sin(2.0*numpy.pi*t) - c = numpy.cos(0.4*numpy.pi*t) - self.axes.plot(t,s) - self.axes.plot(t,c) - - - if __name__ == '__main__': - app = wx.PySimpleApp() - fig = PlotFrame() - fig.Show(True) - app.MainLoop() - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/user_interfaces/pylab_with_gtk.txt b/dev/_sources/examples/user_interfaces/pylab_with_gtk.txt deleted file mode 100644 index c0aca94df5f..00000000000 --- a/dev/_sources/examples/user_interfaces/pylab_with_gtk.txt +++ /dev/null @@ -1,68 +0,0 @@ -.. _user_interfaces-pylab_with_gtk: - -user_interfaces example code: pylab_with_gtk.py -=============================================== - -[`source code `_] - -:: - - """ - An example of how to use pylab to manage your figure windows, but - modify the GUI by accessing the underlying gtk widgets - """ - from __future__ import print_function - import matplotlib - matplotlib.use('GTKAgg') - import matplotlib.pyplot as plt - - - ax = plt.subplot(111) - plt.plot([1,2,3], 'ro-', label='easy as 1 2 3') - plt.plot([1,4,9], 'gs--', label='easy as 1 2 3 squared') - plt.legend() - - - manager = plt.get_current_fig_manager() - # you can also access the window or vbox attributes this way - toolbar = manager.toolbar - - # now let's add a button to the toolbar - import gtk - next = 8; #where to insert this in the mpl toolbar - button = gtk.Button('Click me') - button.show() - - def clicked(button): - print('hi mom') - button.connect('clicked', clicked) - - toolitem = gtk.ToolItem() - toolitem.show() - toolitem.set_tooltip( - toolbar.tooltips, - 'Click me for fun and profit') - - toolitem.add(button) - toolbar.insert(toolitem, next); next +=1 - - # now let's add a widget to the vbox - label = gtk.Label() - label.set_markup('Drag mouse over axes for position') - label.show() - vbox = manager.vbox - vbox.pack_start(label, False, False) - vbox.reorder_child(manager.toolbar, -1) - - def update(event): - if event.xdata is None: - label.set_markup('Drag mouse over axes for position') - else: - label.set_markup('x,y=(%f, %f)'%(event.xdata, event.ydata)) - - plt.connect('motion_notify_event', update) - - plt.show() - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/user_interfaces/rec_edit_gtk_custom.txt b/dev/_sources/examples/user_interfaces/rec_edit_gtk_custom.txt deleted file mode 100644 index f94a97a646f..00000000000 --- a/dev/_sources/examples/user_interfaces/rec_edit_gtk_custom.txt +++ /dev/null @@ -1,53 +0,0 @@ -.. _user_interfaces-rec_edit_gtk_custom: - -user_interfaces example code: rec_edit_gtk_custom.py -==================================================== - -[`source code `_] - -:: - - """ - generate an editable gtk treeview widget for record arrays with custom - formatting of the cells and show how to limit string entries to a list - of strings - """ - from __future__ import print_function - import gtk - import numpy as np - import matplotlib.mlab as mlab - import matplotlib.cbook as cbook - import mpl_toolkits.gtktools as gtktools - - - datafile = cbook.get_sample_data('demodata.csv', asfileobj=False) - r = mlab.csv2rec(datafile, converterd={'weekdays':str}) - - - formatd = mlab.get_formatd(r) - formatd['date'] = mlab.FormatDate('%Y-%m-%d') - formatd['prices'] = mlab.FormatMillions(precision=1) - formatd['gain'] = mlab.FormatPercent(precision=2) - - # use a drop down combo for weekdays - stringd = dict(weekdays=['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat']) - constant = ['clientid'] # block editing of this field - - - liststore = gtktools.RecListStore(r, formatd=formatd, stringd=stringd) - treeview = gtktools.RecTreeView(liststore, constant=constant) - - def mycallback(liststore, rownum, colname, oldval, newval): - print('verify: old=%s, new=%s, rec=%s'%(oldval, newval, liststore.r[rownum][colname])) - - liststore.callbacks.connect('cell_changed', mycallback) - - win = gtk.Window() - win.set_title('click to edit') - win.add(treeview) - win.show_all() - win.connect('delete-event', lambda *args: gtk.main_quit()) - gtk.main() - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/user_interfaces/rec_edit_gtk_simple.txt b/dev/_sources/examples/user_interfaces/rec_edit_gtk_simple.txt deleted file mode 100644 index 88b9c84d475..00000000000 --- a/dev/_sources/examples/user_interfaces/rec_edit_gtk_simple.txt +++ /dev/null @@ -1,29 +0,0 @@ -.. _user_interfaces-rec_edit_gtk_simple: - -user_interfaces example code: rec_edit_gtk_simple.py -==================================================== - -[`source code `_] - -:: - - """ - Load a CSV file into a record array and edit it in a gtk treeview - """ - - import gtk - import numpy as np - import matplotlib.mlab as mlab - import matplotlib.cbook as cbook - import mpl_toolkits.gtktools as gtktools - - datafile = cbook.get_sample_data('demodata.csv', asfileobj=False) - r = mlab.csv2rec(datafile, converterd={'weekdays':str}) - - liststore, treeview, win = gtktools.edit_recarray(r) - win.set_title('click to edit') - win.connect('delete-event', lambda *args: gtk.main_quit()) - gtk.main() - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/user_interfaces/svg_histogram.txt b/dev/_sources/examples/user_interfaces/svg_histogram.txt deleted file mode 100644 index dffafa67e30..00000000000 --- a/dev/_sources/examples/user_interfaces/svg_histogram.txt +++ /dev/null @@ -1,171 +0,0 @@ -.. _user_interfaces-svg_histogram: - -user_interfaces example code: svg_histogram.py -============================================== - -[`source code `_] - -:: - - #!/usr/bin/env python - #-*- encoding:utf-8 -*- - - """ - Demonstrate how to create an interactive histogram, in which bars - are hidden or shown by cliking on legend markers. - - The interactivity is encoded in ecmascript (javascript) and inserted in - the SVG code in a post-processing step. To render the image, open it in - a web browser. SVG is supported in most web browsers used by Linux and - OSX users. Windows IE9 supports SVG, but earlier versions do not. - - Notes - ----- - The matplotlib backend lets us assign ids to each object. This is the - mechanism used here to relate matplotlib objects created in python and - the corresponding SVG constructs that are parsed in the second step. - While flexible, ids are cumbersome to use for large collection of - objects. Two mechanisms could be used to simplify things: - * systematic grouping of objects into SVG tags, - * assingning classes to each SVG object according to its origin. - - For example, instead of modifying the properties of each individual bar, - the bars from the `hist` function could either be grouped in - a PatchCollection, or be assigned a class="hist_##" attribute. - - CSS could also be used more extensively to replace repetitive markup - troughout the generated SVG. - - __author__="david.huard@gmail.com" - - """ - - - import numpy as np - import matplotlib.pyplot as plt - import xml.etree.ElementTree as ET - from StringIO import StringIO - import json - - plt.rcParams['svg.embed_char_paths'] = 'none' - - # Apparently, this `register_namespace` method works only with - # python 2.7 and up and is necessary to avoid garbling the XML name - # space with ns0. - ET.register_namespace("","http://www.w3.org/2000/svg") - - - - - # --- Create histogram, legend and title --- - plt.figure() - r = np.random.randn(100) - r1 = r + 1 - labels = ['Rabbits', 'Frogs'] - H = plt.hist([r,r1], label=labels) - containers = H[-1] - leg = plt.legend(frameon=False) - plt.title("""From a web browser, click on the legend - marker to toggle the corresponding histogram.""") - - - # --- Add ids to the svg objects we'll modify - - hist_patches = {} - for ic, c in enumerate(containers): - hist_patches['hist_%d'%ic] = [] - for il, element in enumerate(c): - element.set_gid('hist_%d_patch_%d'%(ic, il)) - hist_patches['hist_%d'%ic].append('hist_%d_patch_%d'%(ic,il)) - - # Set ids for the legend patches - for i, t in enumerate(leg.get_patches()): - t.set_gid('leg_patch_%d'%i) - - # Set ids for the text patches - for i, t in enumerate(leg.get_texts()): - t.set_gid('leg_text_%d'%i) - - # Save SVG in a fake file object. - f = StringIO() - plt.savefig(f, format="svg") - - # Create XML tree from the SVG file. - tree, xmlid = ET.XMLID(f.getvalue()) - - - # --- Add interactivity --- - - # Add attributes to the patch objects. - for i, t in enumerate(leg.get_patches()): - el = xmlid['leg_patch_%d'%i] - el.set('cursor', 'pointer') - el.set('onclick', "toggle_hist(this)") - - # Add attributes to the text objects. - for i, t in enumerate(leg.get_texts()): - el = xmlid['leg_text_%d'%i] - el.set('cursor', 'pointer') - el.set('onclick', "toggle_hist(this)") - - # Create script defining the function `toggle_hist`. - # We create a global variable `container` that stores the patches id - # belonging to each histogram. Then a function "toggle_element" sets the - # visibility attribute of all patches of each histogram and the opacity - # of the marker itself. - - script = """ - - """%json.dumps(hist_patches) - - # Add a transition effect - css = tree.getchildren()[0][0] - css.text = css.text + "g {-webkit-transition:opacity 0.4s ease-out;-moz-transition:opacity 0.4s ease-out;}" - - # Insert the script and save to file. - tree.insert(0, ET.XML(script)) - - ET.ElementTree(tree).write("svg_histogram.svg") - - - - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/user_interfaces/svg_tooltip.txt b/dev/_sources/examples/user_interfaces/svg_tooltip.txt deleted file mode 100644 index 3168e42a03b..00000000000 --- a/dev/_sources/examples/user_interfaces/svg_tooltip.txt +++ /dev/null @@ -1,137 +0,0 @@ -.. _user_interfaces-svg_tooltip: - -user_interfaces example code: svg_tooltip.py -============================================ - -[`source code `_] - -:: - - """ - SVG tooltip example - =================== - - This example shows how to create a tooltip that will show up when - hovering over a matplotlib patch. - - Although it is possible to create the tooltip from CSS or javascript, - here we create it in matplotlib and simply toggle its visibility on - when hovering over the patch. This approach provides total control over - the tooltip placement and appearance, at the expense of more code up - front. - - The alternative approach would be to put the tooltip content in `title` - atttributes of SVG objects. Then, using an existing js/CSS library, it - would be relatively straightforward to create the tooltip in the - browser. The content would be dictated by the `title` attribute, and - the appearance by the CSS. - - - :author: David Huard - """ - - - import matplotlib.pyplot as plt - import xml.etree.ElementTree as ET - from StringIO import StringIO - - ET.register_namespace("","http://www.w3.org/2000/svg") - - fig = plt.figure() - ax = fig.add_subplot(111) - - # Create patches to which tooltips will be assigned. - circle = plt.Circle((0,0), 5, fc='blue') - rect = plt.Rectangle((-5, 10), 10, 5, fc='green') - - ax.add_patch(circle) - ax.add_patch(rect) - - # Create the tooltips - circle_tip = ax.annotate('This is a blue circle.', - xy=(0,0), - xytext=(30,-30), - textcoords='offset points', - color='w', - ha='left', - bbox=dict(boxstyle='round,pad=.5', fc=(.1,.1,.1,.92), ec=(1.,1.,1.), lw=1, zorder=1), - ) - - rect_tip = ax.annotate('This is a green rectangle.', - xy=(-5,10), - xytext=(30,40), - textcoords='offset points', - color='w', - ha='left', - bbox=dict(boxstyle='round,pad=.5', fc=(.1,.1,.1,.92), ec=(1.,1.,1.), lw=1, zorder=1), - ) - - - # Set id for the patches - for i, t in enumerate(ax.patches): - t.set_gid('patch_%d'%i) - - # Set id for the annotations - for i, t in enumerate(ax.texts): - t.set_gid('tooltip_%d'%i) - - - # Save the figure in a fake file object - ax.set_xlim(-30, 30) - ax.set_ylim(-30, 30) - ax.set_aspect('equal') - - f = StringIO() - plt.savefig(f, format="svg") - - # --- Add interactivity --- - - # Create XML tree from the SVG file. - tree, xmlid = ET.XMLID(f.getvalue()) - tree.set('onload', 'init(evt)') - - # Hide the tooltips - for i, t in enumerate(ax.texts): - el = xmlid['tooltip_%d'%i] - el.set('visibility', 'hidden') - - # Assign onmouseover and onmouseout callbacks to patches. - for i, t in enumerate(ax.patches): - el = xmlid['patch_%d'%i] - el.set('onmouseover', "ShowTooltip(this)") - el.set('onmouseout', "HideTooltip(this)") - - # This is the script defining the ShowTooltip and HideTooltip functions. - script = """ - - """ - - # Insert the script at the top of the file and save it. - tree.insert(0, ET.XML(script)) - ET.ElementTree(tree).write('svg_tooltip.svg') - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/user_interfaces/wxcursor_demo.txt b/dev/_sources/examples/user_interfaces/wxcursor_demo.txt deleted file mode 100644 index 350e8ddcac0..00000000000 --- a/dev/_sources/examples/user_interfaces/wxcursor_demo.txt +++ /dev/null @@ -1,83 +0,0 @@ -.. _user_interfaces-wxcursor_demo: - -user_interfaces example code: wxcursor_demo.py -============================================== - -[`source code `_] - -:: - - """ - Example to draw a cursor and report the data coords in wx - """ - - import matplotlib - matplotlib.use('WXAgg') - - from matplotlib.backends.backend_wxagg import FigureCanvasWxAgg as FigureCanvas - from matplotlib.backends.backend_wx import NavigationToolbar2Wx - from matplotlib.figure import Figure - from numpy import arange, sin, pi - - import wx - - class CanvasFrame(wx.Frame): - - def __init__(self, ): - wx.Frame.__init__(self,None,-1, - 'CanvasFrame',size=(550,350)) - - self.SetBackgroundColour(wx.NamedColour("WHITE")) - - self.figure = Figure() - self.axes = self.figure.add_subplot(111) - t = arange(0.0,3.0,0.01) - s = sin(2*pi*t) - - self.axes.plot(t,s) - self.axes.set_xlabel('t') - self.axes.set_ylabel('sin(t)') - self.figure_canvas = FigureCanvas(self, -1, self.figure) - - # Note that event is a MplEvent - self.figure_canvas.mpl_connect('motion_notify_event', self.UpdateStatusBar) - self.figure_canvas.Bind(wx.EVT_ENTER_WINDOW, self.ChangeCursor) - - self.sizer = wx.BoxSizer(wx.VERTICAL) - self.sizer.Add(self.figure_canvas, 1, wx.LEFT | wx.TOP | wx.GROW) - self.SetSizer(self.sizer) - self.Fit() - - self.statusBar = wx.StatusBar(self, -1) - self.statusBar.SetFieldsCount(1) - self.SetStatusBar(self.statusBar) - - self.toolbar = NavigationToolbar2Wx(self.figure_canvas) - self.sizer.Add(self.toolbar, 0, wx.LEFT | wx.EXPAND) - self.toolbar.Show() - - def ChangeCursor(self, event): - self.figure_canvas.SetCursor(wx.StockCursor(wx.CURSOR_BULLSEYE)) - - def UpdateStatusBar(self, event): - if event.inaxes: - x, y = event.xdata, event.ydata - self.statusBar.SetStatusText(( "x= " + str(x) + - " y=" +str(y) ), - 0) - - class App(wx.App): - - def OnInit(self): - 'Create the main window and insert the custom frame' - frame = CanvasFrame() - self.SetTopWindow(frame) - frame.Show(True) - return True - - if __name__=='__main__': - app = App(0) - app.MainLoop() - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/widgets/buttons.txt b/dev/_sources/examples/widgets/buttons.txt deleted file mode 100644 index df7a470099f..00000000000 --- a/dev/_sources/examples/widgets/buttons.txt +++ /dev/null @@ -1,52 +0,0 @@ -.. _widgets-buttons: - -widgets example code: buttons.py -================================ - -[`source code `_] - -:: - - - import numpy as np - import matplotlib.pyplot as plt - from matplotlib.widgets import Button - - freqs = np.arange(2, 20, 3) - - ax = plt.subplot(111) - plt.subplots_adjust(bottom=0.2) - t = np.arange(0.0, 1.0, 0.001) - s = np.sin(2*np.pi*freqs[0]*t) - l, = plt.plot(t, s, lw=2) - - - class Index: - ind = 0 - def next(self, event): - self.ind += 1 - i = self.ind % len(freqs) - ydata = np.sin(2*np.pi*freqs[i]*t) - l.set_ydata(ydata) - plt.draw() - - def prev(self, event): - self.ind -= 1 - i = self.ind % len(freqs) - ydata = np.sin(2*np.pi*freqs[i]*t) - l.set_ydata(ydata) - plt.draw() - - callback = Index() - axprev = plt.axes([0.7, 0.05, 0.1, 0.075]) - axnext = plt.axes([0.81, 0.05, 0.1, 0.075]) - bnext = Button(axnext, 'Next') - bnext.on_clicked(callback.next) - bprev = Button(axprev, 'Previous') - bprev.on_clicked(callback.prev) - - plt.show() - - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/widgets/check_buttons.txt b/dev/_sources/examples/widgets/check_buttons.txt deleted file mode 100644 index d61b2cfb356..00000000000 --- a/dev/_sources/examples/widgets/check_buttons.txt +++ /dev/null @@ -1,38 +0,0 @@ -.. _widgets-check_buttons: - -widgets example code: check_buttons.py -====================================== - -[`source code `_] - -:: - - import numpy as np - import matplotlib.pyplot as plt - from matplotlib.widgets import CheckButtons - - t = np.arange(0.0, 2.0, 0.01) - s0 = np.sin(2*np.pi*t) - s1 = np.sin(4*np.pi*t) - s2 = np.sin(6*np.pi*t) - - ax = plt.subplot(111) - l0, = ax.plot(t, s0, visible=False, lw=2) - l1, = ax.plot(t, s1, lw=2) - l2, = ax.plot(t, s2, lw=2) - plt.subplots_adjust(left=0.2) - - rax = plt.axes([0.05, 0.4, 0.1, 0.15]) - check = CheckButtons(rax, ('2 Hz', '4 Hz', '6 Hz'), (False, True, True)) - - def func(label): - if label == '2 Hz': l0.set_visible(not l0.get_visible()) - elif label == '4 Hz': l1.set_visible(not l1.get_visible()) - elif label == '6 Hz': l2.set_visible(not l2.get_visible()) - plt.draw() - check.on_clicked(func) - - plt.show() - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/widgets/cursor.txt b/dev/_sources/examples/widgets/cursor.txt deleted file mode 100644 index 4f76c076cd7..00000000000 --- a/dev/_sources/examples/widgets/cursor.txt +++ /dev/null @@ -1,31 +0,0 @@ -.. _widgets-cursor: - -widgets example code: cursor.py -=============================== - -[`source code `_] - -:: - - #!/usr/bin/env python - - from matplotlib.widgets import Cursor - import numpy as np - import matplotlib.pyplot as plt - - - fig = plt.figure(figsize=(8, 6)) - ax = fig.add_subplot(111, axisbg='#FFFFCC') - - x, y = 4*(np.random.rand(2, 100)-.5) - ax.plot(x, y, 'o') - ax.set_xlim(-2, 2) - ax.set_ylim(-2, 2) - - # set useblit = True on gtkagg for enhanced performance - cursor = Cursor(ax, useblit=True, color='red', linewidth=2 ) - - plt.show() - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/widgets/index.txt b/dev/_sources/examples/widgets/index.txt deleted file mode 100644 index 0e7d818da67..00000000000 --- a/dev/_sources/examples/widgets/index.txt +++ /dev/null @@ -1,24 +0,0 @@ -.. _widgets-examples-index: - -############################################## -widgets Examples -############################################## - -.. htmlonly:: - - :Release: |version| - :Date: |today| - -.. toctree:: - :maxdepth: 1 - - buttons - check_buttons - cursor - lasso_selector_demo - menu - multicursor - radio_buttons - rectangle_selector - slider_demo - span_selector diff --git a/dev/_sources/examples/widgets/lasso_selector_demo.txt b/dev/_sources/examples/widgets/lasso_selector_demo.txt deleted file mode 100644 index f193cf3d796..00000000000 --- a/dev/_sources/examples/widgets/lasso_selector_demo.txt +++ /dev/null @@ -1,101 +0,0 @@ -.. _widgets-lasso_selector_demo: - -widgets example code: lasso_selector_demo.py -============================================ - -[`source code `_] - -:: - - from __future__ import print_function - - import numpy as np - - from matplotlib.widgets import LassoSelector - from matplotlib.path import Path - - try: - raw_input - except NameError: - # Python 3 - raw_input = input - - - class SelectFromCollection(object): - """Select indices from a matplotlib collection using `LassoSelector`. - - Selected indices are saved in the `ind` attribute. This tool highlights - selected points by fading them out (i.e., reducing their alpha values). - If your collection has alpha < 1, this tool will permanently alter them. - - Note that this tool selects collection objects based on their *origins* - (i.e., `offsets`). - - Parameters - ---------- - ax : :class:`~matplotlib.axes.Axes` - Axes to interact with. - - collection : :class:`matplotlib.collections.Collection` subclass - Collection you want to select from. - - alpha_other : 0 <= float <= 1 - To highlight a selection, this tool sets all selected points to an - alpha value of 1 and non-selected points to `alpha_other`. - """ - def __init__(self, ax, collection, alpha_other=0.3): - self.canvas = ax.figure.canvas - self.collection = collection - self.alpha_other = alpha_other - - self.xys = collection.get_offsets() - self.Npts = len(self.xys) - - # Ensure that we have separate colors for each object - self.fc = collection.get_facecolors() - if len(self.fc) == 0: - raise ValueError('Collection must have a facecolor') - elif len(self.fc) == 1: - self.fc = np.tile(self.fc, self.Npts).reshape(self.Npts, -1) - - self.lasso = LassoSelector(ax, onselect=self.onselect) - self.ind = [] - - def onselect(self, verts): - path = Path(verts) - self.ind = np.nonzero([path.contains_point(xy) for xy in self.xys])[0] - self.fc[:, -1] = self.alpha_other - self.fc[self.ind, -1] = 1 - self.collection.set_facecolors(self.fc) - self.canvas.draw_idle() - - def disconnect(self): - self.lasso.disconnect_events() - self.fc[:, -1] = 1 - self.collection.set_facecolors(self.fc) - self.canvas.draw_idle() - - - if __name__ == '__main__': - import matplotlib.pyplot as plt - - plt.ion() - data = np.random.rand(100, 2) - - subplot_kw = dict(xlim=(0, 1), ylim=(0, 1), autoscale_on=False) - fig, ax = plt.subplots(subplot_kw=subplot_kw) - - pts = ax.scatter(data[:, 0], data[:, 1], s=80) - selector = SelectFromCollection(ax, pts) - - plt.draw() - raw_input('Press any key to accept selected points') - print("Selected points:") - print(selector.xys[selector.ind]) - selector.disconnect() - - # Block end of script so you can check that the lasso is disconnected. - raw_input('Press any key to quit') - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/widgets/menu.txt b/dev/_sources/examples/widgets/menu.txt deleted file mode 100644 index 190d409bc72..00000000000 --- a/dev/_sources/examples/widgets/menu.txt +++ /dev/null @@ -1,193 +0,0 @@ -.. _widgets-menu: - -widgets example code: menu.py -============================= - -[`source code `_] - -:: - - from __future__ import division, print_function - import numpy as np - import matplotlib - import matplotlib.colors as colors - import matplotlib.patches as patches - import matplotlib.mathtext as mathtext - import matplotlib.pyplot as plt - import matplotlib.artist as artist - import matplotlib.image as image - - - class ItemProperties: - def __init__(self, fontsize=14, labelcolor='black', bgcolor='yellow', - alpha=1.0): - self.fontsize = fontsize - self.labelcolor = labelcolor - self.bgcolor = bgcolor - self.alpha = alpha - - self.labelcolor_rgb = colors.colorConverter.to_rgb(labelcolor) - self.bgcolor_rgb = colors.colorConverter.to_rgb(bgcolor) - - class MenuItem(artist.Artist): - parser = mathtext.MathTextParser("Bitmap") - padx = 5 - pady = 5 - def __init__(self, fig, labelstr, props=None, hoverprops=None, - on_select=None): - artist.Artist.__init__(self) - - self.set_figure(fig) - self.labelstr = labelstr - - if props is None: - props = ItemProperties() - - if hoverprops is None: - hoverprops = ItemProperties() - - self.props = props - self.hoverprops = hoverprops - - - self.on_select = on_select - - x, self.depth = self.parser.to_mask( - labelstr, fontsize=props.fontsize, dpi=fig.dpi) - - if props.fontsize!=hoverprops.fontsize: - raise NotImplementedError( - 'support for different font sizes not implemented') - - - self.labelwidth = x.shape[1] - self.labelheight = x.shape[0] - - self.labelArray = np.zeros((x.shape[0], x.shape[1], 4)) - self.labelArray[:, :, -1] = x/255. - - self.label = image.FigureImage(fig, origin='upper') - self.label.set_array(self.labelArray) - - # we'll update these later - self.rect = patches.Rectangle((0,0), 1,1) - - self.set_hover_props(False) - - fig.canvas.mpl_connect('button_release_event', self.check_select) - - def check_select(self, event): - over, junk = self.rect.contains(event) - if not over: - return - - if self.on_select is not None: - self.on_select(self) - - def set_extent(self, x, y, w, h): - print(x, y, w, h) - self.rect.set_x(x) - self.rect.set_y(y) - self.rect.set_width(w) - self.rect.set_height(h) - - self.label.ox = x+self.padx - self.label.oy = y-self.depth+self.pady/2. - - self.rect._update_patch_transform() - self.hover = False - - def draw(self, renderer): - self.rect.draw(renderer) - self.label.draw(renderer) - - def set_hover_props(self, b): - if b: - props = self.hoverprops - else: - props = self.props - - r, g, b = props.labelcolor_rgb - self.labelArray[:, :, 0] = r - self.labelArray[:, :, 1] = g - self.labelArray[:, :, 2] = b - self.label.set_array(self.labelArray) - self.rect.set(facecolor=props.bgcolor, alpha=props.alpha) - - def set_hover(self, event): - 'check the hover status of event and return true if status is changed' - b,junk = self.rect.contains(event) - - changed = (b != self.hover) - - if changed: - self.set_hover_props(b) - - - self.hover = b - return changed - - class Menu: - - def __init__(self, fig, menuitems): - self.figure = fig - fig.suppressComposite = True - - self.menuitems = menuitems - self.numitems = len(menuitems) - - maxw = max([item.labelwidth for item in menuitems]) - maxh = max([item.labelheight for item in menuitems]) - - - totalh = self.numitems*maxh + (self.numitems+1)*2*MenuItem.pady - - - x0 = 100 - y0 = 400 - - width = maxw + 2*MenuItem.padx - height = maxh+MenuItem.pady - - for item in menuitems: - left = x0 - bottom = y0-maxh-MenuItem.pady - - - item.set_extent(left, bottom, width, height) - - fig.artists.append(item) - y0 -= maxh + MenuItem.pady - - - fig.canvas.mpl_connect('motion_notify_event', self.on_move) - - def on_move(self, event): - draw = False - for item in self.menuitems: - draw = item.set_hover(event) - if draw: - self.figure.canvas.draw() - break - - - fig = plt.figure() - fig.subplots_adjust(left=0.3) - props = ItemProperties(labelcolor='black', bgcolor='yellow', - fontsize=15, alpha=0.2) - hoverprops = ItemProperties(labelcolor='white', bgcolor='blue', - fontsize=15, alpha=0.2) - - menuitems = [] - for label in ('open', 'close', 'save', 'save as', 'quit'): - def on_select(item): - print('you selected %s' % item.labelstr) - item = MenuItem(fig, label, props=props, hoverprops=hoverprops, - on_select=on_select) - menuitems.append(item) - - menu = Menu(fig, menuitems) - plt.show() - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/widgets/multicursor.txt b/dev/_sources/examples/widgets/multicursor.txt deleted file mode 100644 index 3d750b77bc7..00000000000 --- a/dev/_sources/examples/widgets/multicursor.txt +++ /dev/null @@ -1,29 +0,0 @@ -.. _widgets-multicursor: - -widgets example code: multicursor.py -==================================== - -[`source code `_] - -:: - - import numpy as np - import matplotlib.pyplot as plt - from matplotlib.widgets import MultiCursor - - t = np.arange(0.0, 2.0, 0.01) - s1 = np.sin(2*np.pi*t) - s2 = np.sin(4*np.pi*t) - fig = plt.figure() - ax1 = fig.add_subplot(211) - ax1.plot(t, s1) - - - ax2 = fig.add_subplot(212, sharex=ax1) - ax2.plot(t, s2) - - multi = MultiCursor(fig.canvas, (ax1, ax2), color='r', lw=1) - plt.show() - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/widgets/radio_buttons.txt b/dev/_sources/examples/widgets/radio_buttons.txt deleted file mode 100644 index bce3b9da2d2..00000000000 --- a/dev/_sources/examples/widgets/radio_buttons.txt +++ /dev/null @@ -1,50 +0,0 @@ -.. _widgets-radio_buttons: - -widgets example code: radio_buttons.py -====================================== - -[`source code `_] - -:: - - import numpy as np - import matplotlib.pyplot as plt - from matplotlib.widgets import RadioButtons - - t = np.arange(0.0, 2.0, 0.01) - s0 = np.sin(2*np.pi*t) - s1 = np.sin(4*np.pi*t) - s2 = np.sin(8*np.pi*t) - - ax = plt.subplot(111) - l, = ax.plot(t, s0, lw=2, color='red') - plt.subplots_adjust(left=0.3) - - axcolor = 'lightgoldenrodyellow' - rax = plt.axes([0.05, 0.7, 0.15, 0.15], axisbg=axcolor) - radio = RadioButtons(rax, ('2 Hz', '4 Hz', '8 Hz')) - def hzfunc(label): - hzdict = {'2 Hz':s0, '4 Hz':s1, '8 Hz':s2} - ydata = hzdict[label] - l.set_ydata(ydata) - plt.draw() - radio.on_clicked(hzfunc) - - rax = plt.axes([0.05, 0.4, 0.15, 0.15], axisbg=axcolor) - radio2 = RadioButtons(rax, ('red', 'blue', 'green')) - def colorfunc(label): - l.set_color(label) - plt.draw() - radio2.on_clicked(colorfunc) - - rax = plt.axes([0.05, 0.1, 0.15, 0.15], axisbg=axcolor) - radio3 = RadioButtons(rax, ('-', '--', '-.', 'steps', ':')) - def stylefunc(label): - l.set_linestyle(label) - plt.draw() - radio3.on_clicked(stylefunc) - - plt.show() - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/widgets/rectangle_selector.txt b/dev/_sources/examples/widgets/rectangle_selector.txt deleted file mode 100644 index 7d56260cae0..00000000000 --- a/dev/_sources/examples/widgets/rectangle_selector.txt +++ /dev/null @@ -1,61 +0,0 @@ -.. _widgets-rectangle_selector: - -widgets example code: rectangle_selector.py -=========================================== - -[`source code `_] - -:: - - from __future__ import print_function - """ - Do a mouseclick somewhere, move the mouse to some destination, release - the button. This class gives click- and release-events and also draws - a line or a box from the click-point to the actual mouseposition - (within the same axes) until the button is released. Within the - method 'self.ignore()' it is checked wether the button from eventpress - and eventrelease are the same. - - """ - from matplotlib.widgets import RectangleSelector - import numpy as np - import matplotlib.pyplot as plt - - def line_select_callback(eclick, erelease): - 'eclick and erelease are the press and release events' - x1, y1 = eclick.xdata, eclick.ydata - x2, y2 = erelease.xdata, erelease.ydata - print ("(%3.2f, %3.2f) --> (%3.2f, %3.2f)" % (x1, y1, x2, y2)) - print (" The button you used were: %s %s" % (eclick.button, erelease.button)) - - def toggle_selector(event): - print (' Key pressed.') - if event.key in ['Q', 'q'] and toggle_selector.RS.active: - print (' RectangleSelector deactivated.') - toggle_selector.RS.set_active(False) - if event.key in ['A', 'a'] and not toggle_selector.RS.active: - print (' RectangleSelector activated.') - toggle_selector.RS.set_active(True) - - - current_ax = plt.subplot(111) # make a new plotingrange - N = 100000 # If N is large one can see - x = np.linspace(0.0, 10.0, N) # improvement by use blitting! - - plt.plot(x, +np.sin(.2*np.pi*x), lw=3.5, c='b', alpha=.7) # plot something - plt.plot(x, +np.cos(.2*np.pi*x), lw=3.5, c='r', alpha=.5) - plt.plot(x, -np.sin(.2*np.pi*x), lw=3.5, c='g', alpha=.3) - - print ("\n click --> release") - - # drawtype is 'box' or 'line' or 'none' - toggle_selector.RS = RectangleSelector(current_ax, line_select_callback, - drawtype='box', useblit=True, - button=[1,3], # don't use middle button - minspanx=5, minspany=5, - spancoords='pixels') - plt.connect('key_press_event', toggle_selector) - plt.show() - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/widgets/slider_demo.txt b/dev/_sources/examples/widgets/slider_demo.txt deleted file mode 100644 index 06d74ed561a..00000000000 --- a/dev/_sources/examples/widgets/slider_demo.txt +++ /dev/null @@ -1,56 +0,0 @@ -.. _widgets-slider_demo: - -widgets example code: slider_demo.py -==================================== - -[`source code `_] - -:: - - import numpy as np - import matplotlib.pyplot as plt - from matplotlib.widgets import Slider, Button, RadioButtons - - fig = plt.figure() - ax = fig.add_subplot(111) - plt.subplots_adjust(left=0.25, bottom=0.25) - t = np.arange(0.0, 1.0, 0.001) - a0 = 5 - f0 = 3 - s = a0*np.sin(2*np.pi*f0*t) - l, = plt.plot(t,s, lw=2, color='red') - plt.axis([0, 1, -10, 10]) - - axcolor = 'lightgoldenrodyellow' - axfreq = plt.axes([0.25, 0.1, 0.65, 0.03], axisbg=axcolor) - axamp = plt.axes([0.25, 0.15, 0.65, 0.03], axisbg=axcolor) - - sfreq = Slider(axfreq, 'Freq', 0.1, 30.0, valinit=f0) - samp = Slider(axamp, 'Amp', 0.1, 10.0, valinit=a0) - - def update(val): - amp = samp.val - freq = sfreq.val - l.set_ydata(amp*np.sin(2*np.pi*freq*t)) - fig.canvas.draw_idle() - sfreq.on_changed(update) - samp.on_changed(update) - - resetax = plt.axes([0.8, 0.025, 0.1, 0.04]) - button = Button(resetax, 'Reset', color=axcolor, hovercolor='0.975') - def reset(event): - sfreq.reset() - samp.reset() - button.on_clicked(reset) - - rax = plt.axes([0.025, 0.5, 0.15, 0.15], axisbg=axcolor) - radio = RadioButtons(rax, ('red', 'blue', 'green'), active=0) - def colorfunc(label): - l.set_color(label) - fig.canvas.draw_idle() - radio.on_clicked(colorfunc) - - plt.show() - - -Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`) \ No newline at end of file diff --git a/dev/_sources/examples/widgets/span_selector.txt b/dev/_sources/examples/widgets/span_selector.txt deleted file mode 100644 index c32752c54dd..00000000000 --- a/dev/_sources/examples/widgets/span_selector.txt +++ /dev/null @@ -1,52 +0,0 @@ -.. _widgets-span_selector: - -widgets example code: span_selector.py -====================================== - -[`source code `_] - -:: - - #!/usr/bin/env python - """ - The SpanSelector is a mouse widget to select a xmin/xmax range and plot the - detail view of the selected region in the lower axes - """ - import numpy as np - import matplotlib.pyplot as plt - from matplotlib.widgets import SpanSelector - - fig = plt.figure(figsize=(8,6)) - ax = fig.add_subplot(211, axisbg='#FFFFCC') - - x = np.arange(0.0, 5.0, 0.01) - y = np.sin(2*np.pi*x) + 0.5*np.random.randn(len(x)) - - ax.plot(x, y, '-') - ax.set_ylim(-2,2) - ax.set_title('Press left mouse button and drag to test') - - ax2 = fig.add_subplot(212, axisbg='#FFFFCC') - line2, = ax2.plot(x, y, '-') - - - def onselect(xmin, xmax): - indmin, indmax = np.searchsorted(x, (xmin, xmax)) - indmax = min(len(x)-1, indmax) - - thisx = x[indmin:indmax] - thisy = y[indmin:indmax] - line2.set_data(thisx, thisy) - ax2.set_xlim(thisx[0], thisx[-1]) - ax2.set_ylim(thisy.min(), thisy.max()) - fig.canvas.draw() - - # set useblit True on gtkagg for enhanced performance - span = SpanSelector(ax, onselect, 'horizontal', useblit=True, - rectprops=dict(alpha=0.5, 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/dev/_sources/faq/environment_variables_faq.txt b/dev/_sources/faq/environment_variables_faq.txt deleted file mode 100644 index bcad4cb2563..00000000000 --- a/dev/_sources/faq/environment_variables_faq.txt +++ /dev/null @@ -1,98 +0,0 @@ -.. _environment-variables: - -********************* -Environment Variables -********************* - -.. contents:: - :backlinks: none - - -.. envvar:: HOME - - The user's home directory. On linux, :envvar:`~ ` is shorthand for :envvar:`HOME`. - -.. envvar:: PATH - - The list of directories searched to find executable programs - -.. envvar:: PYTHONPATH - - The list of directories that is added to Python's standard search list when - importing packages and modules - -.. envvar:: MPLCONFIGDIR - - This is the directory used to store user customizations to matplotlib, as - well as some caches to improve performance. If :envvar:`MPLCONFIGDIR` is not - defined, :file:`{HOME}/.matplotlib` is used if it is writable. - Otherwise, the python standard library :func:`tempfile.gettmpdir` is - used to find a base directory in which the :file:`matplotlib` - subdirectory is created. - -.. _setting-linux-osx-environment-variables: - -Setting environment variables in Linux and OS-X -=============================================== - -To list the current value of :envvar:`PYTHONPATH`, which may be empty, try:: - - echo $PYTHONPATH - -The procedure for setting environment variables in depends on what your default -shell is. :program:`BASH` seems to be the most common, but :program:`CSH` is -also common. You should be able to determine which by running at the command -prompt:: - - echo $SHELL - - -BASH/KSH --------- - -To create a new environment variable:: - - export PYTHONPATH=~/Python - -To prepend to an existing environment variable:: - - export PATH=~/bin:${PATH} - -The search order may be important to you, do you want :file:`~/bin` to -be searched first or last? To append to an existing environment -variable:: - - export PATH=${PATH}:~/bin - -To make your changes available in the future, add the commands to your -:file:`~/.bashrc` file. - - -CSH/TCSH --------- - -To create a new environment variable:: - - setenv PYTHONPATH ~/Python - -To prepend to an existing environment variable:: - - setenv PATH ~/bin:${PATH} - -The search order may be important to you, do you want :file:`~/bin` to be searched -first or last? To append to an existing environment variable:: - - setenv PATH ${PATH}:~/bin - -To make your changes available in the future, add the commands to your -:file:`~/.cshrc` file. - -.. _setting-windows-environment-variables: - -Setting environment variables in windows -======================================== - -Open the :program:`Control Panel` (:menuselection:`Start --> Control Panel`), -start the :program:`System` program. Click the :guilabel:`Advanced` tab -and select the :guilabel:`Environment Variables` button. You can edit or add to -the :guilabel:`User Variables`. diff --git a/dev/_sources/faq/howto_faq.txt b/dev/_sources/faq/howto_faq.txt deleted file mode 100644 index d3cf31e515c..00000000000 --- a/dev/_sources/faq/howto_faq.txt +++ /dev/null @@ -1,783 +0,0 @@ -.. _howto-faq: - -****** -How-To -****** - -.. contents:: - :backlinks: none - - -.. _howto-plotting: - -Plotting: howto -================= - -.. _howto-findobj: - -Find all objects in a figure of a certain type ----------------------------------------------- - -Every matplotlib artist (see :ref:`artist-tutorial`) has a method -called :meth:`~matplotlib.artist.Artist.findobj` that can be used to -recursively search the artist for any artists it may contain that meet -some criteria (eg match all :class:`~matplotlib.lines.Line2D` -instances or match some arbitrary filter function). For example, the -following snippet finds every object in the figure which has a -`set_color` property and makes the object blue:: - - def myfunc(x): - return hasattr(x, 'set_color') - - for o in fig.findobj(myfunc): - o.set_color('blue') - -You can also filter on class instances:: - - import matplotlib.text as text - for o in fig.findobj(text.Text): - o.set_fontstyle('italic') - - -.. _howto-transparent: - -Save transparent figures ----------------------------------- - -The :meth:`~matplotlib.pyplot.savefig` command has a keyword argument -*transparent* which, if 'True', will make the figure and axes -backgrounds transparent when saving, but will not affect the displayed -image on the screen. - -If you need finer grained control, eg you do not want full transparency -or you want to affect the screen displayed version as well, you can set -the alpha properties directly. The figure has a -:class:`~matplotlib.patches.Rectangle` instance called *patch* -and the axes has a Rectangle instance called *patch*. You can set -any property on them directly (*facecolor*, *edgecolor*, *linewidth*, -*linestyle*, *alpha*). e.g.:: - - fig = plt.figure() - fig.patch.set_alpha(0.5) - ax = fig.add_subplot(111) - ax.patch.set_alpha(0.5) - -If you need *all* the figure elements to be transparent, there is -currently no global alpha setting, but you can set the alpha channel -on individual elements, e.g.:: - - ax.plot(x, y, alpha=0.5) - ax.set_xlabel('volts', alpha=0.5) - - -.. _howto-multipage: - -Save multiple plots to one pdf file ------------------------------------ - -Many image file formats can only have one image per file, but some -formats support multi-page files. Currently only the pdf backend has -support for this. To make a multi-page pdf file, first initialize the -file:: - - from matplotlib.backends.backend_pdf import PdfPages - pp = PdfPages('multipage.pdf') - -You can give the :class:`~matplotlib.backends.backend_pdf.PdfPages` -object to :func:`~matplotlib.pyplot.savefig`, but you have to specify -the format:: - - plt.savefig(pp, format='pdf') - -An easier way is to call -:meth:`PdfPages.savefig `:: - - pp.savefig() - -Finally, the multipage pdf object has to be closed:: - - pp.close() - - -.. _howto-subplots-adjust: - -Move the edge of an axes to make room for tick labels ----------------------------------------------------------------------------- - -For subplots, you can control the default spacing on the left, right, -bottom, and top as well as the horizontal and vertical spacing between -multiple rows and columns using the -:meth:`matplotlib.figure.Figure.subplots_adjust` method (in pyplot it -is :func:`~matplotlib.pyplot.subplots_adjust`). For example, to move -the bottom of the subplots up to make room for some rotated x tick -labels:: - - fig = plt.figure() - fig.subplots_adjust(bottom=0.2) - ax = fig.add_subplot(111) - -You can control the defaults for these parameters in your -:file:`matplotlibrc` file; see :ref:`customizing-matplotlib`. For -example, to make the above setting permanent, you would set:: - - figure.subplot.bottom : 0.2 # the bottom of the subplots of the figure - -The other parameters you can configure are, with their defaults - -*left* = 0.125 - the left side of the subplots of the figure -*right* = 0.9 - the right side of the subplots of the figure -*bottom* = 0.1 - the bottom of the subplots of the figure -*top* = 0.9 - the top of the subplots of the figure -*wspace* = 0.2 - the amount of width reserved for blank space between subplots -*hspace* = 0.2 - the amount of height reserved for white space between subplots - -If you want additional control, you can create an -:class:`~matplotlib.axes.Axes` using the -:func:`~matplotlib.pyplot.axes` command (or equivalently the figure -:meth:`~matplotlib.figure.Figure.add_axes` method), which allows you to -specify the location explicitly:: - - ax = fig.add_axes([left, bottom, width, height]) - -where all values are in fractional (0 to 1) coordinates. See -:ref:`pylab_examples-axes_demo` for an example of placing axes manually. - -.. _howto-auto-adjust: - -Automatically make room for tick labels ---------------------------------------- - -.. note:: - This is now easier to handle than ever before. - Calling :func:`~matplotlib.pyplot.tight_layout` can fix many common - layout issues. See the :ref:`plotting-guide-tight-layout`. - - The information below is kept here in case it is useful for other - purposes. - -In most use cases, it is enough to simply change the subplots adjust -parameters as described in :ref:`howto-subplots-adjust`. But in some -cases, you don't know ahead of time what your tick labels will be, or -how large they will be (data and labels outside your control may be -being fed into your graphing application), and you may need to -automatically adjust your subplot parameters based on the size of the -tick labels. Any :class:`~matplotlib.text.Text` instance can report -its extent in window coordinates (a negative x coordinate is outside -the window), but there is a rub. - -The :class:`~matplotlib.backend_bases.RendererBase` instance, which is -used to calculate the text size, is not known until the figure is -drawn (:meth:`~matplotlib.figure.Figure.draw`). After the window is -drawn and the text instance knows its renderer, you can call -:meth:`~matplotlib.text.Text.get_window_extent`. One way to solve -this chicken and egg problem is to wait until the figure is draw by -connecting -(:meth:`~matplotlib.backend_bases.FigureCanvasBase.mpl_connect`) to the -"on_draw" signal (:class:`~matplotlib.backend_bases.DrawEvent`) and -get the window extent there, and then do something with it, eg move -the left of the canvas over; see :ref:`event-handling-tutorial`. - -Here is an example that gets a bounding box in relative figure coordinates -(0..1) of each of the labels and uses it to move the left of the subplots -over so that the tick labels fit in the figure - -.. plot:: pyplots/auto_subplots_adjust.py - :include-source: - -.. _howto-ticks: - -Configure the tick linewidths ------------------------------ - -In matplotlib, the ticks are *markers*. All -:class:`~matplotlib.lines.Line2D` objects support a line (solid, -dashed, etc) and a marker (circle, square, tick). The tick linewidth -is controlled by the "markeredgewidth" property:: - - import matplotlib.pyplot as plt - fig = plt.figure() - ax = fig.add_subplot(111) - ax.plot(range(10)) - - for line in ax.get_xticklines() + ax.get_yticklines(): - line.set_markersize(10) - - plt.show() - -The other properties that control the tick marker, and all markers, -are ``markerfacecolor``, ``markeredgecolor``, ``markeredgewidth``, -``markersize``. For more information on configuring ticks, see -:ref:`axis-container` and :ref:`tick-container`. - - -.. _howto-align-label: - -Align my ylabels across multiple subplots ------------------------------------------ - -If you have multiple subplots over one another, and the y data have -different scales, you can often get ylabels that do not align -vertically across the multiple subplots, which can be unattractive. -By default, matplotlib positions the x location of the ylabel so that -it does not overlap any of the y ticks. You can override this default -behavior by specifying the coordinates of the label. The example -below shows the default behavior in the left subplots, and the manual -setting in the right subplots. - -.. plot:: pyplots/align_ylabels.py - :include-source: - -.. _date-index-plots: - -Skip dates where there is no data ---------------------------------- - -When plotting time series, eg financial time series, one often wants -to leave out days on which there is no data, eg weekends. By passing -in dates on the x-xaxis, you get large horizontal gaps on periods when -there is not data. The solution is to pass in some proxy x-data, eg -evenly sampled indices, and then use a custom formatter to format -these as dates. The example below shows how to use an 'index formatter' -to achieve the desired plot:: - - import numpy as np - import matplotlib.pyplot as plt - import matplotlib.mlab as mlab - import matplotlib.ticker as ticker - - r = mlab.csv2rec('../data/aapl.csv') - r.sort() - r = r[-30:] # get the last 30 days - - 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 = plt.figure() - ax = fig.add_subplot(111) - ax.plot(ind, r.adj_close, 'o-') - ax.xaxis.set_major_formatter(ticker.FuncFormatter(format_date)) - fig.autofmt_xdate() - - plt.show() - -.. _point-in-poly: - -Test whether a point is inside a polygon ----------------------------------------- - -The :mod:`~matplotlib.nxutils` provides two high-performance methods: -for a single point use :func:`~matplotlib.nxutils.pnpoly` and for an -array of points use :func:`~matplotlib.nxutils.points_inside_poly`. -For a discussion of the implementation see `pnpoly -`_. - -.. sourcecode:: ipython - - In [25]: import numpy as np - - In [26]: import matplotlib.nxutils as nx - - In [27]: verts = np.array([ [0,0], [0, 1], [1, 1], [1,0]], float) - - In [28]: nx.pnpoly( 0.5, 0.5, verts) - Out[28]: 1 - - In [29]: nx.pnpoly( 0.5, 1.5, verts) - Out[29]: 0 - - In [30]: points = np.random.rand(10,2)*2 - - In [31]: points - Out[31]: - array([[ 1.03597426, 0.61029911], - [ 1.94061056, 0.65233947], - [ 1.08593748, 1.16010789], - [ 0.9255139 , 1.79098751], - [ 1.54564936, 1.15604046], - [ 1.71514397, 1.26147554], - [ 1.19133536, 0.56787764], - [ 0.40939549, 0.35190339], - [ 1.8944715 , 0.61785408], - [ 0.03128518, 0.48144145]]) - - In [32]: nx.points_inside_poly(points, verts) - Out[32]: array([False, False, False, False, False, False, False, True, False, True], dtype=bool) - -.. htmlonly:: - - For a complete example, see :ref:`event_handling-lasso_demo`. - -.. _howto-set-zorder: - -Control the depth of plot elements ----------------------------------- - - -Within an axes, the order that the various lines, markers, text, -collections, etc appear is determined by the -:meth:`~matplotlib.artist.Artist.set_zorder` property. The default -order is patches, lines, text, with collections of lines and -collections of patches appearing at the same level as regular lines -and patches, respectively:: - - line, = ax.plot(x, y, zorder=10) - -.. htmlonly:: - - See :ref:`pylab_examples-zorder_demo` for a complete example. - -You can also use the Axes property -:meth:`~matplotlib.axes.Axes.set_axisbelow` to control whether the grid -lines are placed above or below your other plot elements. - -.. _howto-axis-equal: - -Make the aspect ratio for plots equal -------------------------------------- - -The Axes property :meth:`~matplotlib.axes.Axes.set_aspect` controls the -aspect ratio of the axes. You can set it to be 'auto', 'equal', or -some ratio which controls the ratio:: - - ax = fig.add_subplot(111, aspect='equal') - - - -.. htmlonly:: - - See :ref:`pylab_examples-equal_aspect_ratio` for a complete example. - - -.. _howto-movie: - -Make a movie ------------- - -If you want to take an animated plot and turn it into a movie, the -best approach is to save a series of image files (eg PNG) and use an -external tool to convert them to a movie. You can use `mencoder -`_, -which is part of the `mplayer `_ suite -for this:: - - #fps (frames per second) controls the play speed - mencoder 'mf://*.png' -mf type=png:fps=10 -ovc \\ - lavc -lavcopts vcodec=wmv2 -oac copy -o animation.avi - -The swiss army knife of image tools, ImageMagick's `convert -`_ works for this as -well. - -Here is a simple example script that saves some PNGs, makes them into -a movie, and then cleans up:: - - import os, sys - import matplotlib.pyplot as plt - - files = [] - fig = plt.figure(figsize=(5,5)) - ax = fig.add_subplot(111) - for i in range(50): # 50 frames - ax.cla() - ax.imshow(rand(5,5), interpolation='nearest') - fname = '_tmp%03d.png'%i - print 'Saving frame', fname - fig.savefig(fname) - files.append(fname) - - print 'Making movie animation.mpg - this make take a while' - os.system("mencoder 'mf://_tmp*.png' -mf type=png:fps=10 \\ - -ovc lavc -lavcopts vcodec=wmv2 -oac copy -o animation.mpg") - -.. htmlonly:: - - Josh Lifton provided this example :ref:`old_animation-movie_demo`, which - is possibly dated since it was written in 2004. - - -.. _howto-twoscale: - -Multiple y-axis scales ----------------------- - -A frequent request is to have two scales for the left and right -y-axis, which is possible using :func:`~matplotlib.pyplot.twinx` (more -than two scales are not currently supported, though it is on the wish -list). This works pretty well, though there are some quirks when you -are trying to interactively pan and zoom, because both scales do not get -the signals. - -The approach uses :func:`~matplotlib.pyplot.twinx` (and its sister -:func:`~matplotlib.pyplot.twiny`) to use *2 different axes*, -turning the axes rectangular frame off on the 2nd axes to keep it from -obscuring the first, and manually setting the tick locs and labels as -desired. You can use separate matplotlib.ticker formatters and -locators as desired because the two axes are independent. - -.. plot:: - - import numpy as np - import matplotlib.pyplot as plt - - fig = plt.figure() - ax1 = fig.add_subplot(111) - t = np.arange(0.01, 10.0, 0.01) - s1 = np.exp(t) - ax1.plot(t, s1, 'b-') - ax1.set_xlabel('time (s)') - ax1.set_ylabel('exp') - - ax2 = ax1.twinx() - s2 = np.sin(2*np.pi*t) - ax2.plot(t, s2, 'r.') - ax2.set_ylabel('sin') - plt.show() - - -.. htmlonly:: - - See :ref:`api-two_scales` for a complete example - -.. _howto-batch: - -Generate images without having a window appear ----------------------------------------------- - -The easiest way to do this is use a non-interactive backend (see -:ref:`what-is-a-backend`) such as Agg (for PNGs), PDF, SVG or PS. In -your figure-generating script, just call the -:func:`matplotlib.use` directive before importing pylab or -pyplot:: - - import matplotlib - matplotlib.use('Agg') - import matplotlib.pyplot as plt - plt.plot([1,2,3]) - plt.savefig('myfig') - - -.. seealso:: - :ref:`howto-webapp` for information about running matplotlib inside - of a web application. - -.. _howto-show: - -Use :func:`~matplotlib.pyplot.show` ------------------------------------------- - -When you want to view your plots on your display, -the user interface backend will need to start the GUI mainloop. -This is what :func:`~matplotlib.pyplot.show` does. It tells -matplotlib to raise all of the figure windows created so far and start -the mainloop. Because this mainloop is blocking by default (i.e., script -execution is paused), you should only call this once per script, at the end. -Script execution is resumed after the last window is closed. Therefore, if -you are using matplotlib to generate only images and do not want a user -interface window, you do not need to call ``show`` (see :ref:`howto-batch` -and :ref:`what-is-a-backend`). - -.. note:: - Because closing a figure window invokes the destruction of its plotting - elements, you should call :func:`~matplotlib.pyplot.savefig` *before* - calling ``show`` if you wish to save the figure as well as view it. - -.. versionadded:: v1.0.0 - ``show`` now starts the GUI mainloop only if it isn't already running. - Therefore, multiple calls to ``show`` are now allowed. - -Having ``show`` block further execution of the script or the python -interpreter depends on whether matplotlib is set for interactive mode -or not. In non-interactive mode (the default setting), execution is paused -until the last figure window is closed. In interactive mode, the execution -is not paused, which allows you to create additional figures (but the script -won't finish until the last figure window is closed). - -.. note:: - Support for interactive/non-interactive mode depends upon the backend. - Until version 1.0.0 (and subsequent fixes for 1.0.1), the behavior of - the interactive mode was not consistent across backends. - As of v1.0.1, only the macosx backend differs from other backends - because it does not support non-interactive mode. - - -Because it is expensive to draw, you typically will not want matplotlib -to redraw a figure many times in a script such as the following:: - - plot([1,2,3]) # draw here ? - xlabel('time') # and here ? - ylabel('volts') # and here ? - title('a simple plot') # and here ? - show() - - -However, it is *possible* to force matplotlib to draw after every command, -which might be what you want when working interactively at the -python console (see :ref:`mpl-shell`), but in a script you want to -defer all drawing until the call to ``show``. This is especially -important for complex figures that take some time to draw. -:func:`~matplotlib.pyplot.show` is designed to tell matplotlib that -you're all done issuing commands and you want to draw the figure now. - -.. note:: - - :func:`~matplotlib.pyplot.show` should typically only be called at - most once per script and it should be the last line of your - script. At that point, the GUI takes control of the interpreter. - If you want to force a figure draw, use - :func:`~matplotlib.pyplot.draw` instead. - -Many users are frustrated by ``show`` because they want it to be a -blocking call that raises the figure, pauses the script until they -close the figure, and then allow the script to continue running until -the next figure is created and the next show is made. Something like -this:: - - # WARNING : illustrating how NOT to use show - for i in range(10): - # make figure i - show() - -This is not what show does and unfortunately, because doing blocking -calls across user interfaces can be tricky, is currently unsupported, -though we have made significant progress towards supporting blocking events. - -.. versionadded:: v1.0.0 - As noted earlier, this restriction has been relaxed to allow multiple - calls to ``show``. In *most* backends, you can now expect to be - able to create new figures and raise them in a subsequent call to - ``show`` after closing the figures from a previous call to ``show``. - - -.. _howto-contribute: - -Contributing: howto -=================== - -.. _how-to-submit-patch: - -Submit a patch --------------- - -See :ref:`making-patches` for information on how to make a patch with git. - -If you are posting a patch to fix a code bug, please explain your -patch in words -- what was broken before and how you fixed it. Also, -even if your patch is particularly simple, just a few lines or a -single function replacement, we encourage people to submit git diffs -against HEAD of the branch they are patching. It just makes life -easier for us, since we (fortunately) get a lot of contributions, and -want to receive them in a standard format. If possible, for any -non-trivial change, please include a complete, free-standing example -that the developers can run unmodified which shows the undesired -behavior pre-patch and the desired behavior post-patch, with a clear -verbal description of what to look for. A developer may -have written the function you are working on years ago, and may no -longer be with the project, so it is quite possible you are the world -expert on the code you are patching and we want to hear as much detail -as you can offer. - -When emailing your patch and examples, feel free to paste any code -into the text of the message, indeed we encourage it, but also attach -the patches and examples since many email clients screw up the -formatting of plain text, and we spend lots of needless time trying to -reformat the code to make it usable. - -You should check out the guide to developing matplotlib to make sure -your patch abides by our coding conventions -:ref:`developers-guide-index`. - - -.. _how-to-contribute-docs: - -Contribute to matplotlib documentation --------------------------------------- - -matplotlib is a big library, which is used in many ways, and the -documentation has only scratched the surface of everything it can -do. So far, the place most people have learned all these features are -through studying the examples (:ref:`how-to-search-examples`), which is a -recommended and great way to learn, but it would be nice to have more -official narrative documentation guiding people through all the dark -corners. This is where you come in. - -There is a good chance you know more about matplotlib usage in some -areas, the stuff you do every day, than many of the core developers -who wrote most of the documentation. Just pulled your hair out -compiling matplotlib for windows? Write a FAQ or a section for the -:ref:`installing-faq` page. Are you a digital signal processing wizard? -Write a tutorial on the signal analysis plotting functions like -:func:`~matplotlib.pyplot.xcorr`, :func:`~matplotlib.pyplot.psd` and -:func:`~matplotlib.pyplot.specgram`. Do you use matplotlib with -`django `_ or other popular web -application servers? Write a FAQ or tutorial and we'll find a place -for it in the :ref:`users-guide-index`. Bundle matplotlib in a -`py2exe `_ app? ... I think you get the idea. - -matplotlib is documented using the `sphinx -`_ extensions to restructured text -`(ReST) `_. sphinx is an -extensible python framework for documentation projects which generates -HTML and PDF, and is pretty easy to write; you can see the source for this -document or any page on this site by clicking on the *Show Source* link -at the end of the page in the sidebar (or `here -<../_sources/faq/howto_faq.txt>`_ for this document). - -The sphinx website is a good resource for learning sphinx, but we have -put together a cheat-sheet at :ref:`documenting-matplotlib` which -shows you how to get started, and outlines the matplotlib conventions -and extensions, eg for including plots directly from external code in -your documents. - -Once your documentation contributions are working (and hopefully -tested by actually *building* the docs) you can submit them as a patch -against git. See :ref:`install-git` and :ref:`how-to-submit-patch`. -Looking for something to do? Search for `TODO <../search.html?q=todo>`_. - - - - -.. _howto-webapp: - -Matplotlib in a web application server -====================================== - -Many users report initial problems trying to use maptlotlib in web -application servers, because by default matplotlib ships configured to -work with a graphical user interface which may require an X11 -connection. Since many barebones application servers do not have X11 -enabled, you may get errors if you don't configure matplotlib for use -in these environments. Most importantly, you need to decide what -kinds of images you want to generate (PNG, PDF, SVG) and configure the -appropriate default backend. For 99% of users, this will be the Agg -backend, which uses the C++ `antigrain `_ -rendering engine to make nice PNGs. The Agg backend is also -configured to recognize requests to generate other output formats -(PDF, PS, EPS, SVG). The easiest way to configure matplotlib to use -Agg is to call:: - - # do this before importing pylab or pyplot - import matplotlib - matplotlib.use('Agg') - import matplotlib.pyplot as plt - -For more on configuring your backend, see -:ref:`what-is-a-backend`. - -Alternatively, you can avoid pylab/pyplot altogether, which will give -you a little more control, by calling the API directly as shown in -:ref:`api-agg_oo`. - -You can either generate hardcopy on the filesystem by calling savefig:: - - # do this before importing pylab or pyplot - import matplotlib - matplotlib.use('Agg') - import matplotlib.pyplot as plt - fig = plt.figure() - ax = fig.add_subplot(111) - ax.plot([1,2,3]) - fig.savefig('test.png') - -or by saving to a file handle:: - - import sys - fig.savefig(sys.stdout) - -Here is an example using the Python Imaging Library (PIL). First, the figure -is saved to a StringIO object which is then fed to PIL for further -processing:: - - import StringIO, Image - imgdata = StringIO.StringIO() - fig.savefig(imgdata, format='png') - imgdata.seek(0) # rewind the data - im = Image.open(imgdata) - - -matplotlib with apache ----------------------- - -TODO; see :ref:`how-to-contribute-docs`. - -matplotlib with django ----------------------- - -TODO; see :ref:`how-to-contribute-docs`. - -matplotlib with zope --------------------- - -TODO; see :ref:`how-to-contribute-docs`. - -.. _howto-click-maps: - -Clickable images for HTML -------------------------- - -Andrew Dalke of `Dalke Scientific `_ -has written a nice `article -`_ -on how to make html click maps with matplotlib agg PNGs. We would -also like to add this functionality to SVG and add a SWF backend to -support these kind of images. If you are interested in contributing -to these efforts that would be great. - - -.. _how-to-search-examples: - -Search examples -=============== - -The nearly 300 code :ref:`examples-index` included with the matplotlib -source distribution are full-text searchable from the :ref:`search` -page, but sometimes when you search, you get a lot of results from the -:ref:`api-index` or other documentation that you may not be interested -in if you just want to find a complete, free-standing, working piece -of example code. To facilitate example searches, we have tagged every -code example page with the keyword ``codex`` for *code example* which -shouldn't appear anywhere else on this site except in the FAQ. -So if you want to search for an example that uses an -ellipse, :ref:`search` for ``codex ellipse``. - - -.. _how-to-cite-mpl: - -Cite Matplotlib -=============== - -If you want to refer to matplotlib in a publication, you can use -"Matplotlib: A 2D Graphics Environment" by J. D. Hunter In Computing -in Science & Engineering, Vol. 9, No. 3. (2007), pp. 90-95 (see `this -reference page `_):: - - @article{Hunter:2007, - Address = {10662 LOS VAQUEROS CIRCLE, PO BOX 3014, LOS ALAMITOS, CA 90720-1314 USA}, - Author = {Hunter, John D.}, - Date-Added = {2010-09-23 12:22:10 -0700}, - Date-Modified = {2010-09-23 12:22:10 -0700}, - Isi = {000245668100019}, - Isi-Recid = {155389429}, - Journal = {Computing In Science \& Engineering}, - Month = {May-Jun}, - Number = {3}, - Pages = {90--95}, - Publisher = {IEEE COMPUTER SOC}, - Times-Cited = {21}, - Title = {Matplotlib: A 2D graphics environment}, - Type = {Editorial Material}, - Volume = {9}, - Year = {2007}, - Abstract = {Matplotlib is a 2D graphics package used for Python for application - development, interactive scripting, and publication-quality image - generation across user interfaces and operating systems.}, - Bdsk-Url-1 = {http://gateway.isiknowledge.com/gateway/Gateway.cgi?GWVersion=2&SrcAuth=Alerting&SrcApp=Alerting&DestApp=WOS&DestLinkType=FullRecord;KeyUT=000245668100019}} diff --git a/dev/_sources/faq/index.txt b/dev/_sources/faq/index.txt deleted file mode 100644 index b41610b0565..00000000000 --- a/dev/_sources/faq/index.txt +++ /dev/null @@ -1,22 +0,0 @@ -.. _faq-index: - -################## -The Matplotlib FAQ -################## - -.. htmlonly:: - - :Release: |version| - :Date: |today| - - Frequently asked questions about matplotlib - -.. toctree:: - :maxdepth: 2 - - installing_faq.rst - usage_faq.rst - howto_faq.rst - troubleshooting_faq.rst - environment_variables_faq.rst - diff --git a/dev/_sources/faq/installing_faq.txt b/dev/_sources/faq/installing_faq.txt deleted file mode 100644 index ab2c90c7c92..00000000000 --- a/dev/_sources/faq/installing_faq.txt +++ /dev/null @@ -1,319 +0,0 @@ -.. _installing-faq: - -************* - Installation -************* - - -.. contents:: - :backlinks: none - - -Report a compilation problem -============================ - -See :ref:`reporting-problems`. - -matplotlib compiled fine, but nothing shows up when I use it -============================================================ - -The first thing to try is a :ref:`clean install ` and see if -that helps. If not, the best way to test your install is by running a script, -rather than working interactively from a python shell or an integrated -development environment such as :program:`IDLE` which add additional -complexities. Open up a UNIX shell or a DOS command prompt and cd into a -directory containing a minimal example in a file. Something like -:file:`simple_plot.py` for example:: - - from pylab import * - plot([1,2,3]) - show() - -and run it with:: - - python simple_plot.py --verbose-helpful - -This will give you additional information about which backends matplotlib is -loading, version information, and more. At this point you might want to make -sure you understand matplotlib's :ref:`configuration ` -process, governed by the :file:`matplotlibrc` configuration file which contains -instructions within and the concept of the matplotlib backend. - -If you are still having trouble, see :ref:`reporting-problems`. - -.. _clean-install: - -How to completely remove matplotlib -=================================== - -Occasionally, problems with matplotlib can be solved with a clean -installation of the package. - -The process for removing an installation of matplotlib depends on how -matplotlib was originally installed on your system. Follow the steps -below that goes with your original installation method to cleanly -remove matplotlib from your system. - -Easy Install ------------- - -1. Delete the caches from your :ref:`.matplotlib configuration directory - `. - -2. Run:: - - easy_install -m matplotlib - - -3. Delete any .egg files or directories from your :ref:`installation - directory `. - - - -Windows installer ------------------ - -1. Delete the caches from your :ref:`.matplotlib configuration directory - `. - -2. Use :menuselection:`Start --> Control Panel` to start the :program:`Add and - Remove Software` utility. - -Source install --------------- - -Unfortunately:: - - python setup.py clean - -does not properly clean the build directory, and does nothing to the -install directory. To cleanly rebuild: - -1. Delete the caches from your :ref:`.matplotlib configuration directory - `. - -2. Delete the ``build`` directory in the source tree. - -3. Delete any matplotlib directories or eggs from your :ref:`installation - directory `. - -How to Install -============== - -.. _install-from-git: - -Source install from git ------------------------ - -Clone the main source using one of:: - - git clone git@github.com:matplotlib/matplotlib.git - -or:: - - git clone git://github.com/matplotlib/matplotlib.git - -and build and install as usual with:: - - > cd matplotlib - > python setup.py install - -.. note:: - - If you are on debian/ubuntu, you can get all the dependencies - required to build matplotlib with:: - - sudo apt-get build-dep python-matplotlib - - If you are on Fedora/RedHat, you can get all the dependencies - required to build matplotlib by first installing ``yum-builddep`` - and then running:: - - su -c "yum-builddep python-matplotlib" - - This does not build matplotlib, but it does get all of the - build dependencies, which will make building from source easier. - - -If you want to be able to follow the development branch as it changes -just replace the last step with (make sure you have **setuptools** -installed):: - - > python setup.py develop - -This creates links in the right places and installs the command -line script to the appropriate places. - -.. note:: - Mac OSX users please see the :ref:`build_osx` guide. - -Then, if you want to update your matplotlib at any time, just do:: - - > git pull - -When you run `git pull`, if the output shows that only Python files have been -updated, you are all set. If C files have changed, you need to run the `python -setupegg.py develop` command again to compile them. - -There is more information on :ref:`using git ` in -the developer docs. - - -Linux Notes -=========== - -Because most Linux distributions use some sort of package manager, -we do not provide a pre-built binary for the Linux platform. -Instead, we recommend that you use the "Add Software" method for -your system to install matplotlib. This will guarantee that everything -that is needed for matplotlib will be installed as well. - -If, for some reason, you can not use the package manager, Linux usually -comes with at least a basic build system. Follow the :ref:`instructions -` found above for how to build and install matplotlib. - - -OS-X Notes -========== - -.. _which-python-for-osx: - -Which python for OS X? ----------------------- - -Apple ships with its own python, and many users have had trouble -with it. There are several alternative versions of python that -can be used. If it is feasible, we recommend that you use the enthought -python distribution `EPD `_ -for OS X (which comes with matplotlib and much more). Also available is -`MacPython `_ or the -official OS X version from `python.org `_. - -.. note:: - Before installing any of the binary packages, be sure that all of the - packages were compiled for the same version of python. - Often, the download site for NumPy and matplotlib will display a - supposed 'current' version of the package, but you may need to choose - a different package from the full list that was built for your - combination of python and OSX. - - -.. _install_osx_binaries: - -Installing OSX binaries ------------------------ - -If you want to install matplotlib from one of the binary installers we -build, you have two choices: a mpkg installer, which is a typical -Installer.app, or a binary OSX egg, which you can install via -setuptools' easy_install. - -The mkpg installer will have a "zip" extension, and will have a name -like :file:`matplotlib-1.2.0-py2.7-macosx10.5_mpkg.zip`. -The name of the installer depends on which versions of python, matplotlib, -and OSX it was built for. You need to unzip this file using either the -"unzip" command, or simply double clicking on the it. Then when you -double-click on the resulting mpkd, which will have a name like -:file:`matplotlib-1.2.0-py2.7-macosx10.5.mpkg`, it will run the -Installer.app, prompt you for a password if you need system-wide -installation privileges, and install to a directory like -:file:`/Library/Python/2.7/site-packages/` (exact path depends on your -python version). This directory may not be in your python 'path' variable, -so you should test your installation with:: - - > python -c 'import matplotlib; print matplotlib.__version__, matplotlib.__file__' - -If you get an error like:: - - Traceback (most recent call last): - File "", line 1, in - ImportError: No module named matplotlib - -then you will need to set your PYTHONPATH, eg:: - - export PYTHONPATH=/Library/Python/2.7/site-packages:$PYTHONPATH - -See also ref:`environment-variables`. - -.. _install_from_source_on_osx_epd: - -Building and installing from source on OSX with EPD ---------------------------------------------------- - -If you have the EPD installed (:ref:`which-python-for-osx`), it might turn out -to be rather tricky to install a new version of matplotlib from source on the -Mac OS 10.5 . Here's a procedure that seems to work, at least sometimes: - -0. Remove the ~/.matplotlib folder ("rm -rf ~/.matplotlib"). - -1. Edit the file (make a backup before you start, just in case): -``/Library/Frameworks/Python.framework/Versions/Current/lib/python2.5/config/Makefile``, -removing all occurrences of the string ``-arch ppc``, changing the line -``MACOSX_DEPLOYMENT_TARGET=10.3`` to ``MACOSX_DEPLOYMENT_TARGET=10.5`` and -changing the occurrences of ``MacOSX10.4u.sdk`` into ``MacOSX10.5.sdk`` - -2. In -``/Library/Frameworks/Python.framework/Versions/Current/lib/pythonX.Y/site-packages/easy-install.pth``, -(where X.Y is the version of Python you are building against) -Comment out the line containing the name of the directory in which the -previous version of MPL was installed (Looks something like -``./matplotlib-0.98.5.2n2-py2.5-macosx-10.3-fat.egg``). - -3. Save the following as a shell script, for example -``./install-matplotlib-epd-osx.sh``:: - - NAME=matplotlib - VERSION=v1.1.x - PREFIX=$HOME - #branch="release" - branch="master" - git clone git://github.com/matplotlib/matplotlib.git - cd matplotlib - if [ $branch = "release" ] - then - echo getting the maintenance branch - git checkout -b $VERSION origin/$VERSION - fi - export CFLAGS="-Os -arch i386" - export LDFLAGS="-Os -arch i386" - export PKG_CONFIG_PATH="/usr/x11/lib/pkgconfig" - export ARCHFLAGS="-arch i386" - python setup.py build - # use --prefix if you don't want it installed in the default location: - python setup.py install #--prefix=$PREFIX - cd .. - -Run this script (for example ``sh ./install-matplotlib-epd-osx.sh``) in the -directory in which you want the source code to be placed, or simply type the -commands in the terminal command line. This script sets some local variable -(CFLAGS, LDFLAGS, PKG_CONFIG_PATH, ARCHFLAGS), removes previous installations, -checks out the source from github, builds and installs it. The backend should -to be set to MacOSX. - - -Windows Notes -============= - -.. _windows-installers: - -Binary installers for Windows ------------------------------ - -If you have already installed python, you can use one of the -matplotlib binary installers for windows -- you can get these from the -`download `_ site. -Choose the files that match your version of python (eg ``py2.7`` if -you installed Python 2.7) which have the ``exe`` extension. If you -haven't already installed python, you can get the official version -from the `python web site `_. - -There are also two packaged distributions of python that come -preloaded with matplotlib and many other tools like ipython, numpy, -scipy, vtk and user interface toolkits. These packages are quite -large because they come with so much, but you get everything with -a single click installer. - -* The Enthought Python Distribution `EPD - `_ - -* `python (x, y) `_ diff --git a/dev/_sources/faq/troubleshooting_faq.txt b/dev/_sources/faq/troubleshooting_faq.txt deleted file mode 100644 index a8cc7646fef..00000000000 --- a/dev/_sources/faq/troubleshooting_faq.txt +++ /dev/null @@ -1,160 +0,0 @@ -.. _troubleshooting-faq: - -*************** -Troubleshooting -*************** - -.. contents:: - :backlinks: none - -.. _matplotlib-version: - -Obtaining matplotlib version -============================ - -To find out your matplotlib version number, import it and print the -``__version__`` attribute:: - - >>> import matplotlib - >>> matplotlib.__version__ - '0.98.0' - - -.. _locating-matplotlib-install: - -:file:`matplotlib` install location -=================================== - -You can find what directory matplotlib is installed in by importing it -and printing the ``__file__`` attribute:: - - >>> import matplotlib - >>> matplotlib.__file__ - '/home/jdhunter/dev/lib64/python2.5/site-packages/matplotlib/__init__.pyc' - -.. _locating-matplotlib-config-dir: - -:file:`.matplotlib` directory location -====================================== - -Each user has a :file:`.matplotlib/` directory which may contain a -:ref:`matplotlibrc ` file and various -caches to improve matplotlib's performance. To locate your :file:`.matplotlib/` -directory, use :func:`matplotlib.get_configdir`:: - - >>> import matplotlib as mpl - >>> mpl.get_configdir() - '/home/darren/.matplotlib' - -On unix-like systems, this directory is generally located in your -:envvar:`HOME` directory. On windows, it is in your documents and -settings directory by default:: - - >>> import matplotlib - >>> mpl.get_configdir() - 'C:\\Documents and Settings\\jdhunter\\.matplotlib' - -If you would like to use a different configuration directory, you can -do so by specifying the location in your :envvar:`MPLCONFIGDIR` -environment variable -- see -:ref:`setting-linux-osx-environment-variables`. - - -.. _reporting-problems: - -Getting help -============ - -There are a number of good resources for getting help with matplotlib. -There is a good chance your question has already been asked: - - - The `mailing list archive `_. - - - `Github issues `_. - - - Stackoverflow questions tagged `matplotlib - `_. - -If you are unable to find an answer to your question through search, -please provide the following information in your e-mail to the -`mailing list -`_: - - * your operating system; (Linux/UNIX users: post the output of ``uname -a``) - - * matplotlib version:: - - python -c `import matplotlib; print matplotlib.__version__` - - * where you obtained matplotlib (e.g., your Linux distribution's - packages or the matplotlib Sourceforge site, or the enthought - python distribution `EPD - `_). - - * any customizations to your ``matplotlibrc`` file (see - :ref:`customizing-matplotlib`). - - * if the problem is reproducible, please try to provide a *minimal*, - standalone Python script that demonstrates the problem. This is - *the* critical step. If you can't post a piece of code that we - can run and reproduce your error, the chances of getting help are - significantly diminished. Very often, the mere act of trying to - minimize your code to the smallest bit that produces the error - will help you find a bug in *your* code that is causing the - problem. - - * you can get very helpful debugging output from matlotlib by - running your script with a ``verbose-helpful`` or - ``--verbose-debug`` flags and posting the verbose output the - lists:: - - > python simple_plot.py --verbose-helpful > output.txt - -If you compiled matplotlib yourself, please also provide - - * any changes you have made to ``setup.py`` or ``setupext.py`` - * the output of:: - - rm -rf build - python setup.py build - - The beginning of the build output contains lots of details about your - platform that are useful for the matplotlib developers to diagnose - your problem. - - * your compiler version -- eg, ``gcc --version`` - -Including this information in your first e-mail to the mailing list -will save a lot of time. - -You will likely get a faster response writing to the mailing list than -filing a bug in the bug tracker. Most developers check the bug -tracker only periodically. If your problem has been determined to be -a bug and can not be quickly solved, you may be asked to file a bug in -the tracker so the issue doesn't get lost. - - -.. _git-trouble: - -Problems with recent git versions -================================= - -First make sure you have a clean build and install (see -:ref:`clean-install`), get the latest git update, install it and run a -simple test script in debug mode:: - - rm -rf build - rm -rf /path/to/site-packages/matplotlib* - git pull - python setup.py install > build.out - python examples/pylab_examples/simple_plot.py --verbose-debug > run.out - -and post :file:`build.out` and :file:`run.out` to the -`matplotlib-devel -`_ -mailing list (please do not post git problems to the `users list -`_). - -Of course, you will want to clearly describe your problem, what you -are expecting and what you are getting, but often a clean build and -install will help. See also :ref:`reporting-problems`. diff --git a/dev/_sources/faq/usage_faq.txt b/dev/_sources/faq/usage_faq.txt deleted file mode 100644 index e107c1e6ae7..00000000000 --- a/dev/_sources/faq/usage_faq.txt +++ /dev/null @@ -1,433 +0,0 @@ -.. _usage-faq: - -*************** -Usage -*************** - -.. contents:: - :backlinks: none - - -.. _general_concepts: - -General Concepts -================ - -:mod:`matplotlib` has an extensive codebase that can be daunting to many -new users. However, most of matplotlib can be understood with a fairly -simple conceptual framework and knowledge of a few important points. - -Plotting requires action on a range of levels, from the most general -(e.g., 'contour this 2-D array') to the most specific (e.g., 'color -this screen pixel red'). The purpose of a plotting package is to assist -you in visualizing your data as easily as possible, with all the necessary -control -- that is, by using relatively high-level commands most of -the time, and still have the ability to use the low-level commands when -needed. - -Therefore, everything in matplotlib is organized in a hierarchy. At the top -of the hierarchy is the matplotlib "state-machine environment" which is -provided by the :mod:`matplotlib.pyplot` module. At this level, simple -functions are used to add plot elements (lines, images, text, etc.) to -the current axes in the current figure. - -.. note:: - Pyplot's state-machine environment behaves similarly to MATLAB and - should be most familiar to users with MATLAB experience. - -The next level down in the hierarchy is the first level of the object-oriented -interface, in which pyplot is used only for a few functions such as figure -creation, and the user explicitly creates and keeps track of the figure -and axes objects. At this level, the user uses pyplot to create figures, -and through those figures, one or more axes objects can be created. These -axes objects are then used for most plotting actions. - -For even more control -- which is essential for things like embedding -matplotlib plots in GUI applications -- the pyplot level may be dropped -completely, leaving a purely object-oriented approach. - -.. _pylab: - -Matplotlib, pylab, and pyplot: how are they related? -==================================================== - -Matplotlib is the whole package; :mod:`pylab` is a module in matplotlib -that gets installed alongside :mod:`matplotlib`; and :mod:`matplotlib.pyplot` -is a module in matplotlib. - -Pyplot provides the state-machine interface to the underlying plotting -library in matplotlib. This means that figures and axes are implicitly -and automatically created to achieve the desired plot. For example, -calling ``plot`` from pyplot will automatically create the necessary -figure and axes to achieve the desired plot. Setting a title will -then automatically set that title to the current axes object:: - - import matplotlib.pyplot as plt - - plt.plot(range(10), range(10)) - plt.title("Simple Plot") - plt.show() - -Pylab combines the pyplot functionality (for plotting) with the numpy -functionality (for mathematics and for working with arrays) -in a single namespace, making that namespace -(or environment) even more MATLAB-like. -For example, one can call the `sin` and `cos` functions just like -you could in MATLAB, as well as having all the features of pyplot. - -The pyplot interface is generally preferred for non-interactive plotting -(i.e., scripting). The pylab interface is convenient for interactive -calculations and plotting, as it minimizes typing. Note that this is -what you get if you use the *ipython* shell with the *-pylab* option, -which imports everything from pylab and makes plotting fully interactive. - -.. _coding_styles: - -Coding Styles -================== - -When viewing this documentation and examples, you will find different -coding styles and usage patterns. These styles are perfectly valid -and have their pros and cons. Just about all of the examples can be -converted into another style and achieve the same results. -The only caveat is to avoid mixing the coding styles for your own code. - -.. note:: - Developers for matplotlib have to follow a specific style and guidelines. - See :ref:`developers-guide-index`. - -Of the different styles, there are two that are officially supported. -Therefore, these are the preferred ways to use matplotlib. - -For the preferred pyplot style, the imports at the top of your -scripts will typically be:: - - import matplotlib.pyplot as plt - import numpy as np - -Then one calls, for example, np.arange, np.zeros, np.pi, plt.figure, -plt.plot, plt.show, etc. So, a simple example in this style would be:: - - import matplotlib.pyplot as plt - import numpy as np - x = np.arange(0, 10, 0.2) - y = np.sin(x) - plt.plot(x, y) - plt.show() - -Note that this example used pyplot's state-machine to -automatically and implicitly create a figure and an axes. For full -control of your plots and more advanced usage, use the pyplot interface -for creating figures, and then use the object methods for the rest:: - - import matplotlib.pyplot as plt - import numpy as np - x = np.arange(0, 10, 0.2) - y = np.sin(x) - fig = plt.figure() - ax = fig.add_subplot(111) - ax.plot(x, y) - plt.show() - -Next, the same example using a pure MATLAB-style:: - - from pylab import * - x = arange(0, 10, 0.2) - y = sin(x) - plot(x, y) - show() - - -So, why all the extra typing as one moves away from the pure -MATLAB-style? For very simple things like this example, the only -advantage is academic: the wordier styles are more explicit, more -clear as to where things come from and what is going on. For more -complicated applications, this explicitness and clarity becomes -increasingly valuable, and the richer and more complete object-oriented -interface will likely make the program easier to write and maintain. - -.. _what-is-a-backend: - -What is a backend? -================== - -A lot of documentation on the website and in the mailing lists refers -to the "backend" and many new users are confused by this term. -matplotlib targets many different use cases and output formats. Some -people use matplotlib interactively from the python shell and have -plotting windows pop up when they type commands. Some people embed -matplotlib into graphical user interfaces like wxpython or pygtk to -build rich applications. Others use matplotlib in batch scripts to -generate postscript images from some numerical simulations, and still -others in web application servers to dynamically serve up graphs. - -To support all of these use cases, matplotlib can target different -outputs, and each of these capabilities is called a backend; the -"frontend" is the user facing code, ie the plotting code, whereas the -"backend" does all the hard work behind-the-scenes to make the -figure. There are two types of backends: user interface backends (for -use in pygtk, wxpython, tkinter, qt, macosx, or fltk; also -referred to as "interactive backends") and hardcopy backends to -make image files (PNG, SVG, PDF, PS; also referred to as "non-interactive -backends"). - -There are a two primary ways to configure your backend. One is to set -the ``backend`` parameter in your ``matplotlibrc`` file (see -:ref:`customizing-matplotlib`):: - - backend : WXAgg # use wxpython with antigrain (agg) rendering - -The other is to use the matplotlib :func:`~matplotlib.use` directive:: - - import matplotlib - matplotlib.use('PS') # generate postscript output by default - -If you use the ``use`` directive, this must be done before importing -:mod:`matplotlib.pyplot` or :mod:`matplotlib.pylab`. - -.. note:: - Backend name specifications are not case-sensitive; e.g., 'GTKAgg' - and 'gtkagg' are equivalent. - -With a typical installation of matplotlib, such as from a -binary installer or a linux distribution package, a good default -backend will already be set, allowing both interactive work and -plotting from scripts, with output to the screen and/or to -a file, so at least initially you will not need to use either of the -two methods given above. - -If, however, you want to write graphical user interfaces, or a web -application server (:ref:`howto-webapp`), or need a better -understanding of what is going on, read on. To make things a little -more customizable for graphical user interfaces, matplotlib separates -the concept of the renderer (the thing that actually does the drawing) -from the canvas (the place where the drawing goes). The canonical -renderer for user interfaces is ``Agg`` which uses the `Anti-Grain -Geometry`_ C++ library to make a raster (pixel) image of the figure. -All of the user interfaces except ``macosx`` can be used with -agg rendering, eg -``WXAgg``, ``GTKAgg``, ``QT4Agg``, ``TkAgg``. In -addition, some of the user interfaces support other rendering engines. -For example, with GTK, you can also select GDK rendering (backend -``GTK``) or Cairo rendering (backend ``GTKCairo``). - -For the rendering engines, one can also distinguish between `vector -`_ or `raster -`_ renderers. Vector -graphics languages issue drawing commands like "draw a line from this -point to this point" and hence are scale free, and raster backends -generate a pixel representation of the line whose accuracy depends on a -DPI setting. - -Here is a summary of the matplotlib renderers (there is an eponymous -backed for each; these are *non-interactive backends*, capable of -writing to a file): - -============= ============ ================================================ -Renderer Filetypes Description -============= ============ ================================================ -:term:`AGG` :term:`png` :term:`raster graphics` -- high quality images - using the `Anti-Grain Geometry`_ engine -PS :term:`ps` :term:`vector graphics` -- Postscript_ output - :term:`eps` -PDF :term:`pdf` :term:`vector graphics` -- - `Portable Document Format`_ -SVG :term:`svg` :term:`vector graphics` -- - `Scalable Vector Graphics`_ -:term:`Cairo` :term:`png` :term:`vector graphics` -- - :term:`ps` `Cairo graphics`_ - :term:`pdf` - :term:`svg` - ... -:term:`GDK` :term:`png` :term:`raster graphics` -- - :term:`jpg` the `Gimp Drawing Kit`_ - :term:`tiff` - ... -============= ============ ================================================ - -And here are the user interfaces and renderer combinations supported; -these are *interactive backends*, capable of displaying to the screen -and of using appropriate renderers from the table above to write to -a file: - -============ ================================================================ -Backend Description -============ ================================================================ -GTKAgg Agg rendering to a :term:`GTK` 2.x canvas (requires PyGTK_) -GTK3Agg Agg rendering to a :term:`GTK` 3.x canvas (requires PyGObject_) -GTK GDK rendering to a :term:`GTK` 2.x canvas (not recommended) - (requires PyGTK_) -GTKCairo Cairo rendering to a :term:`GTK` 2.x canvas (requires PyGTK_ - and pycairo_) -GTK3Cairo Cairo rendering to a :term:`GTK` 3.x canvas (requires PyGObject_ - and pycairo_) -WXAgg Agg rendering to to a :term:`wxWidgets` canvas - (requires wxPython_) -WX Native :term:`wxWidgets` drawing to a :term:`wxWidgets` Canvas - (not recommended) (requires wxPython_) -TkAgg Agg rendering to a :term:`Tk` canvas (requires TkInter_) -QtAgg Agg rendering to a :term:`Qt` canvas (requires PyQt_) - (deprecated; use Qt4Agg) -Qt4Agg Agg rendering to a :term:`Qt4` canvas (requires PyQt4_) -FLTKAgg Agg rendering to a :term:`FLTK` canvas (requires pyFLTK_) - (not widely used; consider TKAgg, GTKAgg, WXAgg, or - QT4Agg instead) -macosx Cocoa rendering in OSX windows - (presently lacks blocking show() behavior when matplotlib - is in non-interactive mode) -============ ================================================================ - -.. _`Anti-Grain Geometry`: http://www.antigrain.com/ -.. _Postscript: http://en.wikipedia.org/wiki/PostScript -.. _`Portable Document Format`: http://en.wikipedia.org/wiki/Portable_Document_Format -.. _`Scalable Vector Graphics`: http://en.wikipedia.org/wiki/Scalable_Vector_Graphics -.. _`Cairo graphics`: http://en.wikipedia.org/wiki/Cairo_(graphics) -.. _`Gimp Drawing Kit`: http://en.wikipedia.org/wiki/GDK -.. _PyGTK: http://www.pygtk.org -.. _PyGObject: https://live.gnome.org/PyGObject -.. _pycairo: http://www.cairographics.org/pycairo/ -.. _wxPython: http://www.wxpython.org/ -.. _TkInter: http://wiki.python.org/moin/TkInter -.. _PyQt: http://www.riverbankcomputing.co.uk/software/pyqt/intro -.. _PyQt4: http://www.riverbankcomputing.co.uk/software/pyqt/intro -.. _pyFLTK: http://pyfltk.sourceforge.net - - - -.. _interactive-mode: - -What is interactive mode? -=================================== - -Use of an interactive backend (see :ref:`what-is-a-backend`) -permits--but does not by itself require or ensure--plotting -to the screen. Whether and when plotting to the screen occurs, -and whether a script or shell session continues after a plot -is drawn on the screen, depends on the functions and methods -that are called, and on a state variable that determines whether -matplotlib is in "interactive mode". The default Boolean value is set -by the :file:`matplotlibrc` file, and may be customized like any other -configuration parameter (see :ref:`customizing-matplotlib`). It -may also be set via :func:`matplotlib.interactive`, and its -value may be queried via :func:`matplotlib.is_interactive`. Turning -interactive mode on and off in the middle of a stream of plotting -commands, whether in a script or in a shell, is rarely needed -and potentially confusing, so in the following we will assume all -plotting is done with interactive mode either on or off. - -.. note:: - Major changes related to interactivity, and in particular the - role and behavior of :func:`~matplotlib.pyplot.show`, were made in the - transition to matplotlib version 1.0, and bugs were fixed in - 1.0.1. Here we describe the version 1.0.1 behavior for the - primary interactive backends, with the partial exception of - *macosx*. - -Interactive mode may also be turned on via :func:`matplotlib.pyplot.ion`, -and turned off via :func:`matplotlib.pyplot.ioff`. - -.. note:: - Interactive mode works with suitable backends in ipython and in - the ordinary python shell, but it does *not* work in the IDLE IDE. - - -Interactive example --------------------- - -From an ordinary python prompt, or after invoking ipython with no options, -try this:: - - import matplotlib.pyplot as plt - plt.ion() - plt.plot([1.6, 2.7]) - -Assuming you are running version 1.0.1 or higher, and you have -an interactive backend installed and selected by default, you should -see a plot, and your terminal prompt should also be active; you -can type additional commands such as:: - - plt.title("interactive test") - plt.xlabel("index") - -and you will see the plot being updated after each line. This is -because you are in interactive mode *and* you are using pyplot -functions. Now try an alternative method of modifying the -plot. Get a -reference to the :class:`~matplotlib.axes.Axes` instance, and -call a method of that instance:: - - ax = plt.gca() - ax.plot([3.1, 2.2]) - -Nothing changed, because the Axes methods do not include an -automatic call to :func:`~matplotlib.pyplot.draw_if_interactive`; -that call is added by the pyplot functions. If you are using -methods, then when you want to update the plot on the screen, -you need to call :func:`~matplotlib.pyplot.draw`:: - - plt.draw() - -Now you should see the new line added to the plot. - -Non-interactive example ------------------------ - -Start a fresh session as in the previous example, but now -turn interactive mode off:: - - import matplotlib.pyplot as plt - plt.ioff() - plt.plot([1.6, 2.7]) - -Nothing happened--or at least nothing has shown up on the -screen (unless you are using *macosx* backend, which is -anomalous). To make the plot appear, you need to do this:: - - plt.show() - -Now you see the plot, but your terminal command line is -unresponsive; the :func:`show()` command *blocks* the input -of additional commands until you manually kill the plot -window. - -What good is this--being forced to use a blocking function? -Suppose you need a script that plots the contents of a file -to the screen. You want to look at that plot, and then end -the script. Without some blocking command such as show(), the -script would flash up the plot and then end immediately, -leaving nothing on the screen. - -In addition, non-interactive mode delays all drawing until -show() is called; this is more efficient than redrawing -the plot each time a line in the script adds a new feature. - -Prior to version 1.0, show() generally could not be called -more than once in a single script (although sometimes one -could get away with it); for version 1.0.1 and above, this -restriction is lifted, so one can write a script like this:: - - import numpy as np - import matplotlib.pyplot as plt - plt.ioff() - for i in range(3): - plt.plot(np.random.rand(10)) - plt.show() - -which makes three plots, one at a time. - -Summary -------- - -In interactive mode, pyplot functions automatically draw -to the screen. - -When plotting interactively, if using -object method calls in addition to pyplot functions, then -call :func:`~matplotlib.pyplot.draw` whenever you want to -refresh the plot. - -Use non-interactive mode in scripts in which you want to -generate one or more figures and display them before ending -or generating a new set of figures. In that case, use -:func:`~matplotlib.pyplot.show` to display the figure(s) and -to block execution until you have manually destroyed them. diff --git a/dev/_sources/glossary/index.txt b/dev/_sources/glossary/index.txt deleted file mode 100644 index 0332a7f7b41..00000000000 --- a/dev/_sources/glossary/index.txt +++ /dev/null @@ -1,157 +0,0 @@ - -.. _glossary: - -******** -Glossary -******** - -.. glossary:: - - AGG - The Anti-Grain Geometry (`Agg `_) rendering engine, capable of rendering - high-quality images - - Cairo - The `Cairo graphics `_ engine - - - dateutil - The `dateutil `_ library - provides extensions to the standard datetime module - - EPS - Encapsulated Postscript (`EPS `_) - - FLTK - `FLTK `_ (pronounced "fulltick") is a cross-platform C++ GUI toolkit for - UNIX/Linux (X11), Microsoft Windows, and MacOS X - - freetype - `freetype `_ is a font rasterization - library used by matplotlib which supports TrueType, Type 1, and - OpenType fonts. - - - GDK - The Gimp Drawing Kit for GTK+ - - GTK - The GIMP Toolkit (`GTK `_) graphical user interface library - - JPG - The Joint Photographic Experts Group (`JPEG - `_) compression method and - file format for photographic images - - numpy - `numpy `_ is the standard numerical - array library for python, the successor to Numeric and numarray. - numpy provides fast operations for homogeneous data sets and - common mathematical operations like correlations, standard - deviation, fourier transforms, and convolutions. - - PDF - Adobe's Portable Document Format (`PDF `_) - - PNG - Portable Network Graphics (`PNG - `_), a raster graphics format - that employs lossless data compression which is more suitable - for line art than the lossy jpg format. Unlike the gif format, - png is not encumbered by requirements for a patent license. - - PS - Postscript (`PS `_) is a - vector graphics ASCII text language widely used in printers and - publishing. Postscript was developed by adobe systems and is - starting to show its age: for example is does not have an alpha - channel. PDF was designed in part as a next-generation document - format to replace postscript - - pyfltk - `pyfltk `_ provides python - wrappers for the :term:`FLTK` widgets library for use with - FLTKAgg - - pygtk - `pygtk `_ provides python wrappers for - the :term:`GTK` widgets library for use with the GTK or GTKAgg - backend. Widely used on linux, and is often packages as - 'python-gtk2' - - pyqt - `pyqt `_ provides python - wrappers for the :term:`Qt` widgets library and is required by - the matplotlib QtAgg and Qt4Agg backends. Widely used on linux - and windows; many linux distributions package this as - 'python-qt3' or 'python-qt4'. - - python - `python `_ is an object oriented interpreted - language widely used for scripting, application development, web - application servers, scientific computing and more. - - - pytz - `pytz `_ provides the Olson tz - database in Python. it allows accurate and cross platform - timezone calculations and solves the issue of ambiguous times at - the end of daylight savings - - - Qt - `Qt `__ is a cross-platform - application framework for desktop and embedded development. - - Qt4 - `Qt4 `__ is the most recent - version of Qt cross-platform application framework for desktop - and embedded development. - - raster graphics - `Raster graphics - `_, or bitmaps, - represent an image as an array of pixels which is resolution - dependent. Raster graphics are generally most practical for - photo-realistic images, but do not scale easily without loss of - quality. - - SVG - The Scalable Vector Graphics format (`SVG - `_). An XML based vector - graphics format supported by many web browsers. - - TIFF - Tagged Image File Format (`TIFF - `_) is a - file format for storing images, including photographs and line - art. - - Tk - `Tk `_ is a graphical user interface for Tcl - and many other dynamic languages. It can produce rich, native - applications that run unchanged across Windows, Mac OS X, Linux - and more. - - vector graphics - `vector graphics - `_ use geometrical - primitives based upon mathematical equations to represent images - in computer graphics. Primitives can include points, lines, - curves, and shapes or polygons. Vector graphics are scalable, - which means that they can be resized without suffering from - issues related to inherent resolution like are seen in raster - graphics. Vector graphics are generally most practical for - typesetting and graphic design applications. - - wxpython - `wxpython `_ provides python wrappers - for the :term:`wxWidgets` library for use with the WX and WXAgg - backends. Widely used on linux, OS-X and windows, it is often - packaged by linux distributions as 'python-wxgtk' - - wxWidgets - `WX `_ is cross-platform GUI and - tools library for GTK, MS Windows, and MacOS. It uses native - widgets for each operating system, so applications will have the - look-and-feel that users on that operating system expect. diff --git a/dev/_sources/mpl_toolkits/axes_grid/api/axes_divider_api.txt b/dev/_sources/mpl_toolkits/axes_grid/api/axes_divider_api.txt deleted file mode 100644 index fc090530e66..00000000000 --- a/dev/_sources/mpl_toolkits/axes_grid/api/axes_divider_api.txt +++ /dev/null @@ -1,18 +0,0 @@ - -:mod:`mpl_toolkits.axes_grid.axes_divider` -========================================== - -.. autoclass:: mpl_toolkits.axes_grid.axes_divider.Divider - :members: - :undoc-members: - - -.. autoclass:: mpl_toolkits.axes_grid.axes_divider.AxesLocator - :members: - :undoc-members: - -.. autoclass:: mpl_toolkits.axes_grid.axes_divider.SubplotDivider - :members: - -.. autoclass:: mpl_toolkits.axes_grid.axes_divider.AxesDivider - :members: diff --git a/dev/_sources/mpl_toolkits/axes_grid/api/axes_grid_api.txt b/dev/_sources/mpl_toolkits/axes_grid/api/axes_grid_api.txt deleted file mode 100644 index 15fa8bd2a2c..00000000000 --- a/dev/_sources/mpl_toolkits/axes_grid/api/axes_grid_api.txt +++ /dev/null @@ -1,11 +0,0 @@ - -:mod:`mpl_toolkits.axes_grid.axes_grid` -======================================= - -.. autoclass:: mpl_toolkits.axes_grid.axes_grid.Grid - :members: - :undoc-members: - -.. autoclass:: mpl_toolkits.axes_grid.axes_grid.ImageGrid - :members: - :undoc-members: diff --git a/dev/_sources/mpl_toolkits/axes_grid/api/axes_size_api.txt b/dev/_sources/mpl_toolkits/axes_grid/api/axes_size_api.txt deleted file mode 100644 index 1238bfd903b..00000000000 --- a/dev/_sources/mpl_toolkits/axes_grid/api/axes_size_api.txt +++ /dev/null @@ -1,6 +0,0 @@ -:mod:`mpl_toolkits.axes_grid.axes_size` -======================================= - -.. automodule:: mpl_toolkits.axes_grid.axes_size - :members: Fixed, Scaled, AxesX, AxesY, MaxWidth, MaxHeight, Fraction, Padded, from_any - diff --git a/dev/_sources/mpl_toolkits/axes_grid/api/axis_artist_api.txt b/dev/_sources/mpl_toolkits/axes_grid/api/axis_artist_api.txt deleted file mode 100644 index f18a52daab6..00000000000 --- a/dev/_sources/mpl_toolkits/axes_grid/api/axis_artist_api.txt +++ /dev/null @@ -1,16 +0,0 @@ - -:mod:`mpl_toolkits.axes_grid.axis_artist` -========================================= - -.. autoclass:: mpl_toolkits.axes_grid.axis_artist.AxisArtist - :members: - :undoc-members: - -.. autoclass:: mpl_toolkits.axes_grid.axis_artist.Ticks - :members: - -.. autoclass:: mpl_toolkits.axes_grid.axis_artist.AxisLabel - :members: - -.. autoclass:: mpl_toolkits.axes_grid.axis_artist.TickLabels - :members: diff --git a/dev/_sources/mpl_toolkits/axes_grid/api/index.txt b/dev/_sources/mpl_toolkits/axes_grid/api/index.txt deleted file mode 100644 index 39954892814..00000000000 --- a/dev/_sources/mpl_toolkits/axes_grid/api/index.txt +++ /dev/null @@ -1,15 +0,0 @@ -.. _axes_grid-api-index: - -####################################### - The Matplotlib AxesGrid Toolkit API -####################################### - -:Release: |version| -:Date: |today| - -.. toctree:: - - axes_size_api.rst - axes_divider_api.rst - axes_grid_api.rst - axis_artist_api.rst diff --git a/dev/_sources/mpl_toolkits/axes_grid/index.txt b/dev/_sources/mpl_toolkits/axes_grid/index.txt deleted file mode 100644 index 90f223c8436..00000000000 --- a/dev/_sources/mpl_toolkits/axes_grid/index.txt +++ /dev/null @@ -1,36 +0,0 @@ - -.. _toolkit_axesgrid-index: - -Matplotlib AxesGrid Toolkit -=========================== - -The matplotlib AxesGrid toolkit is a collection of helper classes to -ease displaying multiple images in matplotlib. While the aspect -parameter in matplotlib adjust the position of the single axes, -AxesGrid toolkit provides a framework to adjust the position of -multiple axes according to their aspects. - - -.. image:: ../../_static/demo_axes_grid.png - -.. note:: - AxesGrid toolkit has been a part of matplotlib since v - 0.99. Originally, the toolkit had a single namespace of - *axes_grid*. In more recent version (since svn r8226), the toolkit - has divided into two separate namespace (*axes_grid1* and *axisartist*). - While *axes_grid* namespace is maintained for the backward compatibility, - use of *axes_grid1* and *axisartist* is recommended. - -.. warning:: - *axes_grid* and *axisartist* (but not *axes_grid1*) uses - a custom Axes class (derived from the mpl's original Axes class). - As a side effect, some commands (mostly tick-related) do not work. - Use *axes_grid1* to avoid this, or see how things are different in - *axes_grid* and *axisartist* (LINK needed) - -.. toctree:: - :maxdepth: 2 - - users/overview.rst - users/index.rst - api/index.rst diff --git a/dev/_sources/mpl_toolkits/axes_grid/users/axes_divider.txt b/dev/_sources/mpl_toolkits/axes_grid/users/axes_divider.txt deleted file mode 100644 index fe0b782306c..00000000000 --- a/dev/_sources/mpl_toolkits/axes_grid/users/axes_divider.txt +++ /dev/null @@ -1,93 +0,0 @@ -AxesDivider -=========== - -The axes_divider module provide helper classes to adjust the axes -positions of set of images in the drawing time. - -* :mod:`~mpl_toolkits.axes_grid.axes_size` provides a classes of - units that the size of each axes will be determined. For example, - you can specify a fixed size - -* :class:`~mpl_toolkits.axes_grid.axes_size.Divider` this is the class - that is used calculates the axes position. It divides the given - rectangular area into several areas. You initialize the divider by - setting the horizontal and vertical list of sizes that the division - will be based on. You then use the new_locator method, whose return - value is a callable object that can be used to set the axes_locator - of the axes. - - -You first initialize the divider by specifying its grids, i.e., -horizontal and vertical. - -for example,:: - - rect = [0.2, 0.2, 0.6, 0.6] - horiz=[h0, h1, h2, h3] - vert=[v0, v1, v2] - divider = Divider(fig, rect, horiz, vert) - -where, rect is a bounds of the box that will be divided and h0,..h3, -v0,..v2 need to be an instance of classes in the -:mod:`~mpl_toolkits.axes_grid.axes_size`. They have *get_size* method -that returns a tuple of two floats. The first float is the relative -size, and the second float is the absolute size. Consider a following -grid. - -+-----+-----+-----+-----+ -| v0 | | | | -+-----+-----+-----+-----+ -| v1 | | | | -+-----+-----+-----+-----+ -|h0,v2| h1 | h2 | h3 | -+-----+-----+-----+-----+ - - -* v0 => 0, 2 -* v1 => 2, 0 -* v2 => 3, 0 - -The height of the bottom row is always 2 (axes_divider internally -assumes that the unit is inch). The first and the second rows with -height ratio of 2:3. For example, if the total height of the grid 6, -then the first and second row will each occupy 2/(2+3) and 3/(2+3) of -(6-1) inches. The widths of columns (horiz) will be similarly -determined. When aspect ratio is set, the total height (or width) will -be adjusted accordingly. - - -The :mod:`mpl_toolkits.axes_grid.axes_size` contains several classes -that can be used to set the horizontal and vertical configurations. For -example, for the vertical configuration above will be:: - - from mpl_toolkits.axes_grid.axes_size import Fixed, Scaled - vert = [Fixed(2), Scaled(2), Scaled(3)] - -After you set up the divider object, then you create a locator -instance which will be given to the axes.:: - - locator = divider.new_locator(nx=0, ny=1) - ax.set_axes_locator(locator) - -The return value of the new_locator method is a instance of the -AxesLocator class. It is a callable object that returns the -location and size of the cell at the first column and the second row. -You may create a locator that spans over multiple cells.:: - - locator = divider.new_locator(nx=0, nx=2, ny=1) - -The above locator, when called, will return the position and size of -the cells spanning the first and second column and the first row. You -may consider it as [0:2, 1]. - -See the example, - -.. plot:: mpl_toolkits/axes_grid/figures/simple_axes_divider2.py - :include-source: - -You can adjust the size of the each axes according to their x or y -data limits (AxesX and AxesY), similar to the axes aspect parameter. - -.. plot:: mpl_toolkits/axes_grid/figures/simple_axes_divider3.py - :include-source: - diff --git a/dev/_sources/mpl_toolkits/axes_grid/users/axisartist.txt b/dev/_sources/mpl_toolkits/axes_grid/users/axisartist.txt deleted file mode 100644 index 67cdf64ecfa..00000000000 --- a/dev/_sources/mpl_toolkits/axes_grid/users/axisartist.txt +++ /dev/null @@ -1,457 +0,0 @@ -.. _axisartist-manual: - -==================== -AXISARTIST namespace -==================== - -The AxisArtist namespace includes a derived Axes implementation. The -biggest difference is that the artists responsible to draw axis line, -ticks, ticklabel and axis labels are separated out from the mpl's Axis -class, which are much more than artists in the original mpl. This -change was strongly motivated to support curvilinear grid. Here are a -few things that mpl_tootlkits.axisartist.Axes is different from original -Axes from mpl. - -* Axis elements (axis line(spine), ticks, ticklabel and axis labels) - are drawn by a AxisArtist instance. Unlike Axis, left, right, top - and bottom axis are drawn by separate artists. And each of them may - have different tick location and different tick labels. - -* gridlines are drawn by a Gridlines instance. The change was - motivated that in curvilinear coordinate, a gridline may not cross - axis-lines (i.e., no associated ticks). In the original Axes class, - gridlines are tied to ticks. - -* ticklines can be rotated if necessary (i.e, along the gridlines) - -In summary, all these changes was to support - -* a curvilinear grid. -* a floating axis - -.. plot:: mpl_toolkits/axes_grid/examples/demo_floating_axis.py - - -*mpl_toolkits.axisartist.Axes* class defines a *axis* attribute, which -is a dictionary of AxisArtist instances. By default, the dictionary -has 4 AxisArtist instances, responsible for drawing of left, right, -bottom and top axis. - -xaxis and yaxis attributes are still available, however they are set -to not visible. As separate artists are used for rendering axis, some -axis-related method in mpl may have no effect. -In addition to AxisArtist instances, the mpl_toolkits.axisartist.Axes will -have *gridlines* attribute (Gridlines), which obviously draws grid -lines. - -In both AxisArtist and Gridlines, the calculation of tick and grid -location is delegated to an instance of GridHelper class. -mpl_toolkits.axisartist.Axes class uses GridHelperRectlinear as a grid -helper. The GridHelperRectlinear class is a wrapper around the *xaxis* -and *yaxis* of mpl's original Axes, and it was meant to work as the -way how mpl's original axes works. For example, tick location changes -using set_ticks method and etc. should work as expected. But change in -artist properties (e.g., color) will not work in general, although -some effort has been made so that some often-change attributes (color, -etc.) are respected. - - -AxisArtist -========== - -AxisArtist can be considered as a container artist with following -attributes which will draw ticks, labels, etc. - - * line - * major_ticks, major_ticklabels - * minor_ticks, minor_ticklabels - * offsetText - * label - - -line ----- - -Derived from Line2d class. Responsible for drawing a spinal(?) line. - -major_ticks, minor_ticks ------------------------- - -Derived from Line2d class. Note that ticks are markers. - - -major_ticklabels, minor_ticklabels ----------------------------------- - -Derived from Text. Note that it is not a list of Text artist, but a -single artist (similar to a collection). - -axislabel ---------- - -Derived from Text. - - -Default AxisArtists -------------------- - -By default, following for axis artists are defined.:: - - ax.axis["left"], ax.axis["bottom"], ax.axis["right"], ax.axis["top"] - -The ticklabels and axislabel of the top and the right axis are set to -not visible. - -For example, if you want to change the color attributes of -major_ticklabels of the bottom x-axis :: - - ax.axis["bottom"].major_ticklabels.set_color("b") - -Similarly, to make ticklabels invisible :: - - ax.axis["bottom"].major_ticklabels.set_visible(False) - -AxisAritst provides a helper method to control the visibility of ticks, -ticklabels, and label. To make ticklabel invisible, :: - - ax.axis["bottom"].toggle(ticklabels=False) - -To make all of ticks, ticklabels, and (axis) label invisible :: - - ax.axis["bottom"].toggle(all=False) - -To turn all off but ticks on :: - - ax.axis["bottom"].toggle(all=False, ticks=True) - -To turn all on but (axis) label off :: - - ax.axis["bottom"].toggle(all=True, label=False)) - - -ax.axis's __getitem__ method can take multiple axis names. For -example, to turn ticklabels of "top" and "right" axis on, :: - - ax.axis["top","right"].toggle(ticklabels=True)) - -Note that 'ax.axis["top","right"]' returns a simple proxy object that translate above code to something like below. :: - - for n in ["top","right"]: - ax.axis[n].toggle(ticklabels=True)) - -So, any return values in the for loop are ignored. And you should not -use it anything more than a simple method. - -Like the list indexing ":" means all items, i.e., :: - - ax.axis[:].major_ticks.set_color("r") - -changes tick color in all axis. - - -HowTo -===== - -1. Changing tick locations and label. - - Same as the original mpl's axes.:: - - ax.set_xticks([1,2,3]) - -2. Changing axis properties like color, etc. - - Change the properties of appropriate artists. For example, to change - the color of the ticklabels:: - - ax.axis["left"].major_ticklabels.set_color("r") - -3. To change the attributes of multiple axis:: - - ax.axis["left","bottom"].major_ticklabels.set_color("r") - - or to change the attributes of all axis:: - - ax.axis[:].major_ticklabels.set_color("r") - -4. To change the tick size (length), you need to use - axis.major_ticks.set_ticksize method. To change the direction of - the ticks (ticks are in opposite direction of ticklabels by - default), use axis.major_ticks.set_tick_out method. - - To change the pad between ticks and ticklabels, use - axis.major_ticklabels.set_pad method. - - To change the pad between ticklabels and axis label, - axis.label.set_pad method. - - -Rotation and Alignment of TickLabels -==================================== - -This is also quite different from the original mpl and can be -confusing. When you want to rotate the ticklabels, first consider -using "set_axis_direction" method. :: - - ax1.axis["left"].major_ticklabels.set_axis_direction("top") - ax1.axis["right"].label.set_axis_direction("left") - -.. plot:: mpl_toolkits/axes_grid/figures/simple_axis_direction01.py - -The parameter for set_axis_direction is one of ["left", "right", -"bottom", "top"]. - -You must understand some underlying concept of directions. - - 1. There is a reference direction which is defined as the direction - of the axis line with increasing coordinate. For example, the - reference direction of the left x-axis is from bottom to top. - - .. plot:: mpl_toolkits/axes_grid/figures/axis_direction_demo_step01.py - - The direction, text angle, and alignments of the ticks, ticklabels and - axis-label is determined with respect to the reference direction - - 2. *ticklabel_direction* is either the right-hand side (+) of the - reference direction or the left-hand side (-). - - .. plot:: mpl_toolkits/axes_grid/figures/axis_direction_demo_step02.py - - 3. same for the *label_direction* - - .. plot:: mpl_toolkits/axes_grid/figures/axis_direction_demo_step03.py - - 4. ticks are by default drawn toward the opposite direction of the ticklabels. - - 5. text rotation of ticklabels and label is determined in reference - to the *ticklabel_direction* or *label_direction*, - respectively. The rotation of ticklabels and label is anchored. - - .. plot:: mpl_toolkits/axes_grid/figures/axis_direction_demo_step04.py - - -On the other hand, there is a concept of "axis_direction". This is a -default setting of above properties for each, "bottom", "left", "top", -and "right" axis. - - ========== =========== ========= ========== ========= ========== - ? ? left bottom right top - ---------- ----------- --------- ---------- --------- ---------- - axislabel direction '-' '+' '+' '-' - axislabel rotation 180 0 0 180 - axislabel va center top center bottom - axislabel ha right center right center - ticklabel direction '-' '+' '+' '-' - ticklabels rotation 90 0 -90 180 - ticklabel ha right center right center - ticklabel va center baseline center baseline - ========== =========== ========= ========== ========= ========== - - -And, 'set_axis_direction("top")' means to adjust the text rotation -etc, for settings suitable for "top" axis. The concept of axis -direction can be more clear with curved axis. - -.. plot:: mpl_toolkits/axes_grid/figures/demo_axis_direction.py - -The axis_direction can be adjusted in the AxisArtist level, or in the -level of its child arists, i.e., ticks, ticklabels, and axis-label. :: - - ax1.axis["left"].set_axis_direction("top") - -changes axis_direction of all the associated artist with the "left" -axis, while :: - - ax1.axis["left"].major_ticklabels.set_axis_direction("top") - -changes the axis_direction of only the major_ticklabels. Note that -set_axis_direction in the AxisArtist level changes the -ticklabel_direction and label_direction, while changing the -axis_direction of ticks, ticklabels, and axis-label does not affect -them. - - -If you want to make ticks outward and ticklabels inside the axes, -use invert_ticklabel_direction method. :: - - ax.axis[:].invert_ticklabel_direction() - -A related method is "set_tick_out". It makes ticks outward (as a -matter of fact, it makes ticks toward the opposite direction of the -default direction). :: - - ax.axis[:].major_ticks.set_tick_out(True) - -.. plot:: mpl_toolkits/axes_grid/figures/simple_axis_direction03.py - - -So, in summary, - - * AxisArtist's methods - * set_axis_direction : "left", "right", "bottom", or "top" - * set_ticklabel_direction : "+" or "-" - * set_axislabel_direction : "+" or "-" - * invert_ticklabel_direction - * Ticks' methods (major_ticks and minor_ticks) - * set_tick_out : True or False - * set_ticksize : size in points - * TickLabels' methods (major_ticklabels and minor_ticklabels) - * set_axis_direction : "left", "right", "bottom", or "top" - * set_rotation : angle with respect to the reference direction - * set_ha and set_va : see below - * AxisLabels' methods (label) - * set_axis_direction : "left", "right", "bottom", or "top" - * set_rotation : angle with respect to the reference direction - * set_ha and set_va - - - -Adjusting ticklabels alignment ------------------------------- - -Alignment of TickLabels are treated specially. See below - -.. plot:: mpl_toolkits/axes_grid/figures/demo_ticklabel_alignment.py - -Adjusting pad --------------- - -To change the pad between ticks and ticklabels :: - - ax.axis["left"].major_ticklabels.set_pad(10) - -Or ticklabels and axis-label :: - - ax.axis["left"].label.set_pad(10) - - -.. plot:: mpl_toolkits/axes_grid/figures/simple_axis_pad.py - - -GridHelper -========== - -To actually define a curvilinear coordinate, you have to use your own -grid helper. A generalised version of grid helper class is supplied -and this class should suffice in most of cases. A user may provide -two functions which defines a transformation (and its inverse pair) -from the curved coordinate to (rectilinear) image coordinate. Note that -while ticks and grids are drawn for curved coordinate, the data -transform of the axes itself (ax.transData) is still rectilinear -(image) coordinate. :: - - - from mpl_toolkits.axisartist.grid_helper_curvelinear \ - import GridHelperCurveLinear - from mpl_toolkits.axisartist import Subplot - - # from curved coordinate to rectlinear coordinate. - def tr(x, y): - x, y = np.asarray(x), np.asarray(y) - return x, y-x - - # from rectlinear coordinate to curved coordinate. - 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, 1, 1, grid_helper=grid_helper) - - fig.add_subplot(ax1) - - -You may use matplotlib's Transform instance instead (but a -inverse transformation must be defined). Often, coordinate range in a -curved coordinate system may have a limited range, or may have -cycles. In those cases, a more customized version of grid helper is -required. :: - - - import mpl_toolkits.axisartist.angle_helper as angle_helper - - # PolarAxes.PolarTransform takes radian. However, we want our coordinate - # system in degree - tr = Affine2D().scale(np.pi/180., 1.) + PolarAxes.PolarTransform() - - - # extreme finder : find a range of coordinate. - # 20, 20 : number of sampling points along x, y direction - # The first coordinate (longitude, but theta in polar) - # has a cycle of 360 degree. - # The second coordinate (latitude, but radius in polar) has a minimum of 0 - extreme_finder = angle_helper.ExtremeFinderCycle(20, 20, - lon_cycle = 360, - lat_cycle = None, - lon_minmax = None, - lat_minmax = (0, np.inf), - ) - - # Find a grid values appropriate for the coordinate (degree, - # minute, second). The argument is a approximate number of grids. - grid_locator1 = angle_helper.LocatorDMS(12) - - # 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). - tick_formatter1 = angle_helper.FormatterDMS() - - grid_helper = GridHelperCurveLinear(tr, - extreme_finder=extreme_finder, - grid_locator1=grid_locator1, - tick_formatter1=tick_formatter1 - ) - - -Again, the *transData* of the axes is still a rectilinear coordinate -(image coordinate). You may manually do conversion between two -coordinates, or you may use Parasite Axes for convenience.:: - - ax1 = SubplotHost(fig, 1, 2, 2, grid_helper=grid_helper) - - # 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) - - -.. plot:: mpl_toolkits/axes_grid/examples/demo_curvelinear_grid.py - - - -FloatingAxis -============ - -A floating axis is an axis one of whose data coordinate is fixed, i.e, -its location is not fixed in Axes coordinate but changes as axes data -limits changes. A floating axis can be created using -*new_floating_axis* method. However, it is your responsibility that -the resulting AxisArtist is properly added to the axes. A recommended -way is to add it as an item of Axes's axis attribute.:: - - # floating axis whose first (index starts from 0) 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) - - -See the first example of this page. - -Current Limitations and TODO's -============================== - -The code need more refinement. Here is a incomplete list of issues and TODO's - -* No easy way to support a user customized tick location (for - curvilinear grid). A new Locator class needs to be created. - -* FloatingAxis may have coordinate limits, e.g., a floating axis of x - = 0, but y only spans from 0 to 1. - -* The location of axislabel of FloatingAxis needs to be optionally - given as a coordinate value. ex, a floating axis of x=0 with label at y=1 diff --git a/dev/_sources/mpl_toolkits/axes_grid/users/index.txt b/dev/_sources/mpl_toolkits/axes_grid/users/index.txt deleted file mode 100644 index 9ae9dbdd74b..00000000000 --- a/dev/_sources/mpl_toolkits/axes_grid/users/index.txt +++ /dev/null @@ -1,14 +0,0 @@ -.. _axes_grid_users-guide-index: - -################################################ - The Matplotlib AxesGrid Toolkit User's Guide -################################################ - -:Release: |version| -:Date: |today| - -.. toctree:: - - axes_divider.rst - axisartist.rst - diff --git a/dev/_sources/mpl_toolkits/axes_grid/users/overview.txt b/dev/_sources/mpl_toolkits/axes_grid/users/overview.txt deleted file mode 100644 index c9b70fcdca2..00000000000 --- a/dev/_sources/mpl_toolkits/axes_grid/users/overview.txt +++ /dev/null @@ -1,480 +0,0 @@ -============================ -Overview of AxesGrid toolkit -============================ - -What is AxesGrid toolkit? -========================= - -The matplotlib AxesGrid toolkit is a collection of helper classes, -mainly to ease displaying (multiple) images in matplotlib. - -.. contents:: - :depth: 1 - :local: - -.. note:: - AxesGrid toolkit has been a part of matplotlib since v - 0.99. Originally, the toolkit had a single namespace of - *axes_grid*. In more recent version (since svn r8226), the toolkit - has divided into two separate namespace (*axes_grid1* and *axisartist*). - While *axes_grid* namespace is maintained for the backward compatibility, - use of *axes_grid1* and *axisartist* is recommended. - -.. warning:: - *axes_grid* and *axisartist* (but not *axes_grid1*) uses - a custom Axes class (derived from the mpl's original Axes class). - As a side effect, some commands (mostly tick-related) do not work. - Use *axes_grid1* to avoid this, or see how things are different in - *axes_grid* and *axisartist* (LINK needed) - - -AxesGrid toolkit has two namespaces (*axes_grid1* and *axisartist*). -*axisartist* contains custom Axes class that is meant to support for -curvilinear grids (e.g., the world coordinate system in astronomy). -Unlike mpl's original Axes class which uses Axes.xaxis and Axes.yaxis -to draw ticks, ticklines and etc., Axes in axisartist uses special -artist (AxisArtist) which can handle tick, ticklines and etc. for -curved coordinate systems. - -.. plot:: mpl_toolkits/axes_grid/examples/demo_floating_axis.py - -Since it uses a special artists, some mpl commands that work on -Axes.xaxis and Axes.yaxis may not work. See LINK for more detail. - - -*axes_grid1* is a collection of helper classes to ease displaying -(multiple) images with matplotlib. In matplotlib, the axes location -(and size) is specified in the normalized figure coordinates, which -may not be ideal for displaying images that needs to have a given -aspect ratio. For example, it helps you to have a colorbar whose -height always matches that of the image. `ImageGrid`_, `RGB Axes`_ and -`AxesDivider`_ are helper classes that deals with adjusting the -location of (multiple) Axes. They provides a framework to adjust the -position of multiple axes at the drawing time. `ParasiteAxes`_ -provides twinx(or twiny)-like features so that you can plot different -data (e.g., different y-scale) in a same Axes. `AnchoredArtists`_ -includes custom artists which are placed at some anchored position, -like the legend. - -.. plot:: mpl_toolkits/axes_grid/examples/demo_axes_grid.py - - -AXES_GRID1 -========== - -ImageGrid ---------- - - -A class that creates a grid of Axes. In matplotlib, the axes location -(and size) is specified in the normalized figure coordinates. This may -not be ideal for images that needs to be displayed with a given aspect -ratio. For example, displaying images of a same size with some fixed -padding between them cannot be easily done in matplotlib. ImageGrid is -used in such case. - -.. plot:: mpl_toolkits/axes_grid/examples/simple_axesgrid.py - :include-source: - -* The position of each axes is determined at the drawing time (see - `AxesDivider`_), so that the size of the entire grid fits in the - given rectangle (like the aspect of axes). Note that in this example, - the paddings between axes are fixed even if you changes the figure - size. - -* axes in the same column has a same axes width (in figure - coordinate), and similarly, axes in the same row has a same - height. The widths (height) of the axes in the same row (column) are - scaled according to their view limits (xlim or ylim). - - .. plot:: mpl_toolkits/axes_grid/examples/simple_axesgrid2.py - :include-source: - -* xaxis are shared among axes in a same column. Similarly, yaxis are - shared among axes in a same row. Therefore, changing axis properties - (view limits, tick location, etc. either by plot commands or using - your mouse in interactive backends) of one axes will affect all - other shared axes. - - - -When initialized, ImageGrid creates given number (*ngrids* or *ncols* * -*nrows* if *ngrids* is None) of Axes instances. A sequence-like -interface is provided to access the individual Axes instances (e.g., -grid[0] is the first Axes in the grid. See below for the order of -axes). - - - -AxesGrid takes following arguments, - - - ============= ======== ================================================ - Name Default Description - ============= ======== ================================================ - fig - rect - nrows_ncols number of rows and cols. e.g., (2,2) - ngrids None number of grids. nrows x ncols if None - direction "row" increasing direction of axes number. [row|column] - axes_pad 0.02 pad between axes in inches - add_all True Add axes to figures if True - share_all False xaxis & yaxis of all axes are shared if True - aspect True aspect of axes - label_mode "L" location of tick labels thaw will be displayed. - "1" (only the lower left axes), - "L" (left most and bottom most axes), - or "all". - cbar_mode None [None|single|each] - cbar_location "right" [right|top] - cbar_pad None pad between image axes and colorbar axes - cbar_size "5%" size of the colorbar - axes_class None - ============= ======== ================================================ - - *rect* - specifies the location of the grid. You can either specify - coordinates of the rectangle to be used (e.g., (0.1, 0.1, 0.8, 0.8) - as in the Axes), or the subplot-like position (e.g., "121"). - - *direction* - means the increasing direction of the axes number. - - *aspect* - By default (False), widths and heights of axes in the grid are - scaled independently. If True, they are scaled according to their - data limits (similar to aspect parameter in mpl). - - *share_all* - if True, xaxis and yaxis of all axes are shared. - - *direction* - direction of increasing axes number. For "row", - - +---------+---------+ - | grid[0] | grid[1] | - +---------+---------+ - | grid[2] | grid[3] | - +---------+---------+ - - For "column", - - +---------+---------+ - | grid[0] | grid[2] | - +---------+---------+ - | grid[1] | grid[3] | - +---------+---------+ - -You can also create a colorbar (or colorbars). You can have colorbar -for each axes (cbar_mode="each"), or you can have a single colorbar -for the grid (cbar_mode="single"). The colorbar can be placed on your -right, or top. The axes for each colorbar is stored as a *cbar_axes* -attribute. - - - -The examples below show what you can do with AxesGrid. - -.. plot:: mpl_toolkits/axes_grid/examples/demo_axes_grid.py - - -AxesDivider ------------ - -Behind the scene, the ImageGrid class and the RGBAxes class utilize the -AxesDivider class, whose role is to calculate the location of the axes -at drawing time. While a more about the AxesDivider is (will be) -explained in (yet to be written) AxesDividerGuide, direct use of the -AxesDivider class will not be necessary for most users. The -axes_divider module provides a helper function make_axes_locatable, -which can be useful. It takes a existing axes instance and create a -divider for it. :: - - ax = subplot(1,1,1) - divider = make_axes_locatable(ax) - - - - -*make_axes_locatable* returns an instance of the AxesLocator class, -derived from the Locator. It provides *append_axes* method that -creates a new axes on the given side of ("top", "right", "bottom" and -"left") of the original axes. - - - -colorbar whose height (or width) in sync with the master axes -------------------------------------------------------------- - -.. plot:: mpl_toolkits/axes_grid/figures/simple_colorbar.py - :include-source: - - - - -scatter_hist.py with AxesDivider -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -The "scatter_hist.py" example in mpl can be rewritten using -*make_axes_locatable*. :: - - axScatter = subplot(111) - axScatter.scatter(x, y) - axScatter.set_aspect(1.) - - # create new axes on the right and on the top of the current axes. - divider = make_axes_locatable(axScatter) - axHistx = divider.append_axes("top", size=1.2, pad=0.1, sharex=axScatter) - axHisty = divider.append_axes("right", size=1.2, pad=0.1, sharey=axScatter) - - # the scatter plot: - # histograms - bins = np.arange(-lim, lim + binwidth, binwidth) - axHistx.hist(x, bins=bins) - axHisty.hist(y, bins=bins, orientation='horizontal') - - -See the full source code below. - -.. plot:: mpl_toolkits/axes_grid/examples/scatter_hist.py - - -The scatter_hist using the AxesDivider has some advantage over the -original scatter_hist.py in mpl. For example, you can set the aspect -ratio of the scatter plot, even with the x-axis or y-axis is shared -accordingly. - - -ParasiteAxes ------------- - -The ParasiteAxes is an axes whose location is identical to its host -axes. The location is adjusted in the drawing time, thus it works even -if the host change its location (e.g., images). - -In most cases, you first create a host axes, which provides a few -method that can be used to create parasite axes. They are *twinx*, -*twiny* (which are similar to twinx and twiny in the matplotlib) and -*twin*. *twin* takes an arbitrary transformation that maps between the -data coordinates of the host axes and the parasite axes. *draw* -method of the parasite axes are never called. Instead, host axes -collects artists in parasite axes and draw them as if they belong to -the host axes, i.e., artists in parasite axes are merged to those of -the host axes and then drawn according to their zorder. The host and -parasite axes modifies some of the axes behavior. For example, color -cycle for plot lines are shared between host and parasites. Also, the -legend command in host, creates a legend that includes lines in the -parasite axes. To create a host axes, you may use *host_suplot* or -*host_axes* command. - - -Example 1. twinx -~~~~~~~~~~~~~~~~ - -.. plot:: mpl_toolkits/axes_grid/figures/parasite_simple.py - :include-source: - -Example 2. twin -~~~~~~~~~~~~~~~ - -*twin* without a transform argument treat the parasite axes to have a -same data transform as the host. This can be useful when you want the -top(or right)-axis to have different tick-locations, tick-labels, or -tick-formatter for bottom(or left)-axis. :: - - ax2 = ax.twin() # now, 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$"]) - - -.. plot:: mpl_toolkits/axes_grid/examples/simple_axisline4.py - - - -A more sophisticated example using twin. Note that if you change the -x-limit in the host axes, the x-limit of the parasite axes will change -accordingly. - - -.. plot:: mpl_toolkits/axes_grid/examples/parasite_simple2.py - - -AnchoredArtists ---------------- - -It's a collection of artists whose location is anchored to the (axes) -bbox, like the legend. It is derived from *OffsetBox* in mpl, and -artist need to be drawn in the canvas coordinate. But, there is a -limited support for an arbitrary transform. For example, the ellipse -in the example below will have width and height in the data -coordinate. - -.. plot:: mpl_toolkits/axes_grid/examples/simple_anchored_artists.py - :include-source: - - -InsetLocator ------------- - -:mod:`mpl_toolkits.axes_grid.inset_locator` provides helper classes -and functions to place your (inset) axes at the anchored position of -the parent axes, similarly to AnchoredArtist. - -Using :func:`mpl_toolkits.axes_grid.inset_locator.inset_axes`, you -can have inset axes whose size is either fixed, or a fixed proportion -of the parent axes. For example,:: - - inset_axes = inset_axes(parent_axes, - width="30%", # width = 30% of parent_bbox - height=1., # height : 1 inch - loc=3) - -creates an inset axes whose width is 30% of the parent axes and whose -height is fixed at 1 inch. - -You may creates your inset whose size is determined so that the data -scale of the inset axes to be that of the parent axes multiplied by -some factor. For example, :: - - inset_axes = zoomed_inset_axes(ax, - 0.5, # zoom = 0.5 - loc=1) - -creates an inset axes whose data scale is half of the parent axes. -Here is complete examples. - -.. plot:: mpl_toolkits/axes_grid/examples/inset_locator_demo.py - -For example, :func:`zoomed_inset_axes` can be used when you want the -inset represents the zoom-up of the small portion in the parent axes. -And :mod:`~mpl_toolkits/axes_grid/inset_locator` provides a helper -function :func:`mark_inset` to mark the location of the area -represented by the inset axes. - -.. plot:: mpl_toolkits/axes_grid/examples/inset_locator_demo2.py - :include-source: - - -RGB Axes -~~~~~~~~ - -RGBAxes is a helper class to conveniently show RGB composite -images. Like ImageGrid, the location of axes are adjusted so that the -area occupied by them fits in a given rectangle. Also, the xaxis and -yaxis of each axes are shared. :: - - from mpl_toolkits.axes_grid1.axes_rgb import RGBAxes - - fig = plt.figure(1) - ax = RGBAxes(fig, [0.1, 0.1, 0.8, 0.8]) - - r, g, b = get_rgb() # r,g,b are 2-d images - ax.imshow_rgb(r, g, b, - origin="lower", interpolation="nearest") - - -.. plot:: mpl_toolkits/axes_grid/figures/simple_rgb.py - - -AXISARTIST -========== - - -AxisArtist ----------- - -AxisArtist module provides a custom (and very experimental) Axes -class, where each axis (left, right, top and bottom) have a separate -artist associated which is responsible to draw axis-line, ticks, -ticklabels, label. Also, you can create your own axis, which can pass -through a fixed position in the axes coordinate, or a fixed position -in the data coordinate (i.e., the axis floats around when viewlimit -changes). - -The axes class, by default, have its xaxis and yaxis invisible, and -has 4 additional artists which are responsible to draw axis in -"left","right","bottom" and "top". They are accessed as -ax.axis["left"], ax.axis["right"], and so on, i.e., ax.axis is a -dictionary that contains artists (note that ax.axis is still a -callable methods and it behaves as an original Axes.axis method in -mpl). - -To create an axes, :: - - import mpl_toolkits.axisartist as AA - fig = plt.figure(1) - ax = AA.Axes(fig, [0.1, 0.1, 0.8, 0.8]) - fig.add_axes(ax) - -or to create a subplot :: - - ax = AA.Subplot(fig, 111) - fig.add_subplot(ax) - -For example, you can hide the right, and top axis by :: - - ax.axis["right"].set_visible(False) - ax.axis["top"].set_visible(False) - - -.. plot:: mpl_toolkits/axes_grid/figures/simple_axisline3.py - - -It is also possible to add an extra axis. For example, you may have an -horizontal axis at y=0 (in data coordinate). :: - - ax.axis["y=0"] = ax.new_floating_axis(nth_coord=0, value=0) - -.. plot:: mpl_toolkits/axes_grid/figures/simple_axisartist1.py - :include-source: - - -Or a fixed axis with some offset :: - - # make new (right-side) yaxis, but wth some offset - ax.axis["right2"] = ax.new_fixed_axis(loc="right", - offset=(20, 0)) - - - -AxisArtist with ParasiteAxes -~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Most commands in the axes_grid1 toolkit can take a axes_class keyword -argument, and the commands creates an axes of the given class. For example, -to create a host subplot with axisartist.Axes, :: - - import mpl_tookits.axisartist as AA - from mpl_toolkits.axes_grid1 import host_subplot - - host = host_subplot(111, axes_class=AA.Axes) - - -Here is an example that uses parasiteAxes. - - -.. plot:: mpl_toolkits/axes_grid/examples/demo_parasite_axes2.py - - - -Curvilinear Grid ----------------- - -The motivation behind the AxisArtist module is to support curvilinear grid -and ticks. - -.. plot:: mpl_toolkits/axes_grid/examples/demo_floating_axis.py - -See :ref:`axisartist-manual` for more details. - - -Floating Axes -------------- - -This also support a Floating Axes whose outer axis are defined as -floating axis. - -.. plot:: mpl_toolkits/axes_grid/examples/demo_floating_axes.py - - diff --git a/dev/_sources/mpl_toolkits/index.txt b/dev/_sources/mpl_toolkits/index.txt deleted file mode 100644 index ba010b225e1..00000000000 --- a/dev/_sources/mpl_toolkits/index.txt +++ /dev/null @@ -1,104 +0,0 @@ -.. _toolkits-index: - -.. toctree:: - :hidden: - - axes_grid/index.rst - mplot3d/index.rst - - -######## -Toolkits -######## - -.. htmlonly:: - - :Release: |version| - :Date: |today| - -.. _toolkits: - -Toolkits are collections of application-specific functions that extend matplotlib. - -.. _toolkit_basemap: - -Basemap (*Not distributed with matplotlib*) -============================================ - -Plots data on map projections, with continental and political -boundaries, see `basemap `_ -docs. - -.. image:: http://matplotlib.org/basemap/_images/contour1.png - :height: 400px - - - -Cartopy (*Not distributed with matplotlib*) -============================================ -An alternative mapping library written for matplotlib ``v1.2`` and beyond. -`Cartopy `_ builds on top of -matplotlib to provide object oriented map projection definitions and close -integration with Shapely for powerful yet easy-to-use vector data processing -tools. An example plot from the -`Cartopy gallery `_: - -.. image:: http://scitools.org.uk/cartopy/docs/latest/_images/hurricane_katrina_01_00.png - :height: 400px - - -.. _toolkit_gtk: - -GTK Tools -========= - -mpl_toolkits.gtktools provides some utilities for working with GTK. -This toolkit ships with matplotlib, but requires `pygtk -`_. - - -.. _toolkit_excel: - -Excel Tools -=========== - -mpl_toolkits.exceltools provides some utilities for working with -Excel. This toolkit ships with matplotlib, but requires -`xlwt `_ - - -.. _toolkit_natgrid: - -Natgrid (*Not distributed with matplotlib*) -=========================================== - -mpl_toolkits.natgrid is an interface to natgrid C library for gridding -irregularly spaced data. This requires a separate installation of the -natgrid toolkit from the sourceforge `download -`_ -page. - - -.. _toolkit_mplot3d: - -mplot3d -=========== - -:ref:`mpl_toolkits.mplot3d ` provides some basic 3D plotting (scatter, surf, -line, mesh) tools. Not the fastest or feature complete 3D library out -there, but ships with matplotlib and thus may be a lighter weight -solution for some use cases. - -.. image:: /_images/contourf3d_demo21.png - - -.. _toolkit_axes_grid: - -AxesGrid -======== - -The matplotlib :ref:`AxesGrid ` toolkit is a collection of helper classes to -ease displaying multiple images in matplotlib. The AxesGrid toolkit is -distributed with matplotlib source. - -.. image:: /_static/demo_axes_grid.png diff --git a/dev/_sources/mpl_toolkits/mplot3d/api.txt b/dev/_sources/mpl_toolkits/mplot3d/api.txt deleted file mode 100644 index 64217a482fe..00000000000 --- a/dev/_sources/mpl_toolkits/mplot3d/api.txt +++ /dev/null @@ -1,64 +0,0 @@ -.. _toolkit_mplot3d-api: - -*********** -mplot3d API -*********** -.. contents:: - :backlinks: none - -.. _toolkit_mplot3d-axesapi: - -:mod:`~mpl_toolkits.mplot3d.axes3d` -=================================== - -.. note:: - Significant effort went into bringing axes3d to feature-parity with - regular axes objects for version 1.1.0. However, more work remains. - Please report any functions that do not behave as expected as a bug. - In addition, help and patches would be greatly appreciated! - -.. automodule:: mpl_toolkits.mplot3d.axes3d - :members: - :undoc-members: - :show-inheritance: - - -.. _toolkit_mplot3d-axisapi: - -:mod:`~mpl_toolkits.mplot3d.axis3d` -=================================== - -.. note:: - Historically, axis3d has suffered from having hard-coded constants - controlling the look and feel of the 3D plot. This precluded user - level adjustments such as label spacing, font colors and panel colors. - For version 1.1.0, these constants have been consolidated into a single - private member dictionary, `self._axinfo`, for the axis object. This is - intended only as a stop-gap measure to allow user-level customization, - but it is not intended to be permanent. - -.. automodule:: mpl_toolkits.mplot3d.axis3d - :members: - :undoc-members: - :show-inheritance: - -.. _toolkit_mplot3d-artapi: - -:mod:`~mpl_toolkits.mplot3d.art3d` -================================== - -.. automodule:: mpl_toolkits.mplot3d.art3d - :members: - :undoc-members: - :show-inheritance: - -.. _toolkit_mplot3d-projapi: - -:mod:`~mpl_toolkits.mplot3d.proj3d` -=================================== - -.. automodule:: mpl_toolkits.mplot3d.proj3d - :members: - :undoc-members: - :show-inheritance: - diff --git a/dev/_sources/mpl_toolkits/mplot3d/faq.txt b/dev/_sources/mpl_toolkits/mplot3d/faq.txt deleted file mode 100644 index 625e2315b4d..00000000000 --- a/dev/_sources/mpl_toolkits/mplot3d/faq.txt +++ /dev/null @@ -1,52 +0,0 @@ -.. _toolkit_mplot3d-faq: - -*********** -mplot3d FAQ -*********** - -How is mplot3d different from MayaVi? -===================================== -`MayaVi2 `_ -is a very powerful and featureful 3D graphing library. For advanced -3D scenes and excellent rendering capabilities, it is highly recomended to -use MayaVi2. - -mplot3d was intended to allow users to create simple 3D graphs with the same -"look-and-feel" as matplotlib's 2D plots. Furthermore, users can use the same -toolkit that they are already familiar with to generate both their 2D and 3D -plots. - - -My 3D plot doesn't look right at certain viewing angles -======================================================= -This is probably the most commonly reported issue with mplot3d. The problem -is that -- from some viewing angles -- a 3D object would appear in front -of another object, even though it is physically behind it. This can result in -plots that do not look "physically correct." - -Unfortunately, while some work is being done to reduce the occurance of this -artifact, it is currently an intractable problem, and can not be fully solved -until matplotlib supports 3D graphics rendering at its core. - -The problem occurs due to the reduction of 3D data down to 2D + z-order -scalar. A single value represents the 3rd dimension for all parts of 3D -objects in a collection. Therefore, when the bounding boxes of two collections -intersect, it becomes possible for this artifact to occur. Furthermore, the -intersection of two 3D objects (such as polygons or patches) can not be -rendered properly in matplotlib's 2D rendering engine. - -This problem will likely not be solved until OpenGL support is added to all of -the backends (patches are greatly welcomed). Until then, if you need complex -3D scenes, we recommend using -`MayaVi `_. - - -I don't like how the 3D plot is laid out, how do I change that? -=============================================================== -Historically, mplot3d has suffered from a hard-coding of parameters used -to control visuals such as label spacing, tick length, and grid line width. -Work is being done to eliminate this issue. For matplotlib v1.1.0, there is -a semi-official manner to modify these parameters. See the note in the -:ref:`toolkit_mplot3d-axisapi` section of the mplot3d API documentation for -more information. - diff --git a/dev/_sources/mpl_toolkits/mplot3d/index.txt b/dev/_sources/mpl_toolkits/mplot3d/index.txt deleted file mode 100644 index e5a7bed878b..00000000000 --- a/dev/_sources/mpl_toolkits/mplot3d/index.txt +++ /dev/null @@ -1,27 +0,0 @@ -.. _toolkit_mplot3d-index: -.. currentmodule:: mpl_toolkits.mplot3d - -******* -mplot3d -******* - -Matplotlib mplot3d toolkit -========================== -The mplot3d toolkit adds simple 3D plotting capabilities to matplotlib by -supplying an axes object that can create a 2D projection of a 3D scene. -The resulting graph will have the same look and feel as regular 2D plots. - -.. image:: ../../_static/demo_mplot3d.png - -The interactive backends also provide the ability to rotate and zoom -the 3D scene. One can rotate the 3D scene by simply clicking-and-dragging -the scene. Zooming is done by right-clicking the scene and dragging the -mouse up and down. Note that one does not use the zoom button like one -would use for regular 2D plots. - -.. toctree:: - :maxdepth: 2 - - tutorial.rst - api.rst - faq.rst diff --git a/dev/_sources/mpl_toolkits/mplot3d/tutorial.txt b/dev/_sources/mpl_toolkits/mplot3d/tutorial.txt deleted file mode 100644 index b837b77b8ad..00000000000 --- a/dev/_sources/mpl_toolkits/mplot3d/tutorial.txt +++ /dev/null @@ -1,142 +0,0 @@ -.. _toolkit_mplot3d-tutorial: -.. currentmodule:: mpl_toolkits.mplot3d - -**************** -mplot3d tutorial -**************** -.. contents:: - :backlinks: none - -.. _mplot3d_getting_started: - -Getting started -=============== -An Axes3D object is created just like any other axes using -the projection='3d' keyword. -Create a new :class:`matplotlib.figure.Figure` and -add a new axes to it of type :class:`~mpl_toolkits.mplot3d.Axes3D`:: - - import matplotlib.pyplot as plt - from mpl_toolkits.mplot3d import Axes3D - fig = plt.figure() - ax = fig.add_subplot(111, projection='3d') - -.. versionadded:: 1.0.0 - This approach is the preferred method of creating a 3D axes. - -.. note:: - Prior to version 1.0.0, the method of creating a 3D axes was - different. For those using older versions of matplotlib, change - ``ax = fig.add_subplot(111, projection='3d')`` - to ``ax = Axes3D(fig)``. - -.. _plot3d: - -Line plots -==================== -.. automethod:: Axes3D.plot - -.. plot:: mpl_examples/mplot3d/lines3d_demo.py - -.. _scatter3d: - -Scatter plots -============= -.. automethod:: Axes3D.scatter - -.. plot:: mpl_examples/mplot3d/scatter3d_demo.py - -.. _wireframe: - -Wireframe plots -=============== -.. automethod:: Axes3D.plot_wireframe - -.. plot:: mpl_examples/mplot3d/wire3d_demo.py - -.. _surface: - -Surface plots -============= -.. automethod:: Axes3D.plot_surface - -.. plot:: mpl_examples/mplot3d/surface3d_demo.py -.. plot:: mpl_examples/mplot3d/surface3d_demo2.py -.. plot:: mpl_examples/mplot3d/surface3d_demo3.py - -.. _trisurface: - -Tri-Surface plots -================= -.. automethod:: Axes3D.plot_trisurf - -.. plot:: mpl_examples/mplot3d/trisurf3d_demo.py - - -.. _contour3d: - -Contour plots -============= -.. automethod:: Axes3D.contour - -.. plot:: mpl_examples/mplot3d/contour3d_demo.py -.. plot:: mpl_examples/mplot3d/contour3d_demo2.py -.. plot:: mpl_examples/mplot3d/contour3d_demo3.py - -.. _contourf3d: - -Filled contour plots -==================== -.. automethod:: Axes3D.contourf - -.. plot:: mpl_examples/mplot3d/contourf3d_demo.py -.. plot:: mpl_examples/mplot3d/contourf3d_demo2.py - -.. versionadded:: 1.1.0 - The feature demoed in the second contourf3d example was enabled as a - result of a bugfix for version 1.1.0. - -.. _polygon3d: - -Polygon plots -==================== -.. automethod:: Axes3D.add_collection3d - -.. plot:: mpl_examples/mplot3d/polys3d_demo.py - -.. _bar3d: - -Bar plots -==================== -.. automethod:: Axes3D.bar - -.. plot:: mpl_examples/mplot3d/bars3d_demo.py - -.. _2dcollections3d: - -2D plots in 3D -==================== -.. plot:: mpl_examples/mplot3d/2dcollections3d_demo.py - -.. _text3d: - -Text -==================== -.. automethod:: Axes3D.text - -.. plot:: mpl_examples/mplot3d/text3d_demo.py - -.. _3dsubplots: - -Subplotting -==================== -Having multiple 3D plots in a single figure is the same -as it is for 2D plots. Also, you can have both 2D and 3D plots -in the same figure. - -.. versionadded:: 1.0.0 - Subplotting 3D plots was added in v1.0.0. Earlier version can not - do this. - -.. plot:: mpl_examples/mplot3d/subplot3d_demo.py -.. plot:: mpl_examples/mplot3d/mixed_subplots_demo.py diff --git a/dev/_sources/users/annotations_guide.txt b/dev/_sources/users/annotations_guide.txt deleted file mode 100644 index fa585eb9e30..00000000000 --- a/dev/_sources/users/annotations_guide.txt +++ /dev/null @@ -1,417 +0,0 @@ -.. _plotting-guide-annotation: - -**************** -Annotating Axes -**************** - -Do not proceed unless you already have read :ref:`annotations-tutorial`, -:func:`~matplotlib.pyplot.text` and -:func:`~matplotlib.pyplot.annotate`! - - - - -Annotating with Text with Box -============================= - -Let's start with a simple example. - -.. plot:: users/plotting/examples/annotate_text_arrow.py - - -The :func:`~matplotlib.pyplot.text` function in the pyplot module (or -text method of the Axes class) takes bbox keyword argument, and when -given, a box around the text is drawn. :: - - bbox_props = dict(boxstyle="rarrow,pad=0.3", fc="cyan", ec="b", lw=2) - t = ax.text(0, 0, "Direction", ha="center", va="center", rotation=45, - size=15, - bbox=bbox_props) - - -The patch object associated with the text can be accessed by:: - - bb = t.get_bbox_patch() - -The return value is an instance of FancyBboxPatch and the patch -properties like facecolor, edgewidth, etc. can be accessed and -modified as usual. To change the shape of the box, use *set_boxstyle* -method. :: - - bb.set_boxstyle("rarrow", pad=0.6) - -The arguments are the name of the box style with its attributes as -keyword arguments. Currently, following box styles are implemented. - - ========== ============== ========================== - Class Name Attrs - ========== ============== ========================== - LArrow ``larrow`` pad=0.3 - RArrow ``rarrow`` pad=0.3 - Round ``round`` pad=0.3,rounding_size=None - Round4 ``round4`` pad=0.3,rounding_size=None - Roundtooth ``roundtooth`` pad=0.3,tooth_size=None - Sawtooth ``sawtooth`` pad=0.3,tooth_size=None - Square ``square`` pad=0.3 - ========== ============== ========================== - -.. plot:: mpl_examples/pylab_examples/fancybox_demo2.py - - -Note that the attributes arguments can be specified within the style -name with separating comma (this form can be used as "boxstyle" value -of bbox argument when initializing the text instance) :: - - bb.set_boxstyle("rarrow,pad=0.6") - - - - -Annotating with Arrow -===================== - -The :func:`~matplotlib.pyplot.annotate` function in the pyplot module -(or annotate method of the Axes class) is used to draw an arrow -connecting two points on the plot. :: - - ax.annotate("Annotation", - xy=(x1, y1), xycoords='data', - xytext=(x2, y2), textcoords='offset points', - ) - -This annotates a point at ``xy`` in the given coordinate (``xycoords``) -with the text at ``xytext`` given in ``textcoords``. Often, the -annotated point is specified in the *data* coordinate and the annotating -text in *offset points*. -See :func:`~matplotlib.pyplot.annotate` for available coordinate systems. - -An arrow connecting two point (xy & xytext) can be optionally drawn by -specifying the ``arrowprops`` argument. To draw only an arrow, use -empty string as the first argument. :: - - ax.annotate("", - xy=(0.2, 0.2), xycoords='data', - xytext=(0.8, 0.8), textcoords='data', - arrowprops=dict(arrowstyle="->", - connectionstyle="arc3"), - ) - -.. plot:: users/plotting/examples/annotate_simple01.py - -The arrow drawing takes a few steps. - -1. a connecting path between two points are created. This is - controlled by ``connectionstyle`` key value. - -2. If patch object is given (*patchA* & *patchB*), the path is clipped to - avoid the patch. - -3. The path is further shrunk by given amount of pixels (*shirnkA* - & *shrinkB*) - -4. The path is transmuted to arrow patch, which is controlled by the - ``arrowstyle`` key value. - - -.. plot:: users/plotting/examples/annotate_explain.py - - -The creation of the connecting path between two points is controlled by -``connectionstyle`` key and following styles are available. - - ========== ============================================= - Name Attrs - ========== ============================================= - ``angle`` angleA=90,angleB=0,rad=0.0 - ``angle3`` angleA=90,angleB=0 - ``arc`` angleA=0,angleB=0,armA=None,armB=None,rad=0.0 - ``arc3`` rad=0.0 - ``bar`` armA=0.0,armB=0.0,fraction=0.3,angle=None - ========== ============================================= - -Note that "3" in ``angle3`` and ``arc3`` is meant to indicate that the -resulting path is a quadratic spline segment (three control -points). As will be discussed below, some arrow style option only can -be used when the connecting path is a quadratic spline. - -The behavior of each connection style is (limitedly) demonstrated in the -example below. (Warning : The behavior of the ``bar`` style is currently not -well defined, it may be changed in the future). - -.. plot:: users/plotting/examples/connectionstyle_demo.py - - -The connecting path (after clipping and shrinking) is then mutated to -an arrow patch, according to the given ``arrowstyle``. - - ========== ============================================= - Name Attrs - ========== ============================================= - ``-`` None - ``->`` head_length=0.4,head_width=0.2 - ``-[`` widthB=1.0,lengthB=0.2,angleB=None - ``|-|`` widthA=1.0,widthB=1.0 - ``-|>`` head_length=0.4,head_width=0.2 - ``<-`` head_length=0.4,head_width=0.2 - ``<->`` head_length=0.4,head_width=0.2 - ``<|-`` head_length=0.4,head_width=0.2 - ``<|-|>`` head_length=0.4,head_width=0.2 - ``fancy`` head_length=0.4,head_width=0.4,tail_width=0.4 - ``simple`` head_length=0.5,head_width=0.5,tail_width=0.2 - ``wedge`` tail_width=0.3,shrink_factor=0.5 - ========== ============================================= - -.. plot:: mpl_examples/pylab_examples/fancyarrow_demo.py - -Some arrowstyles only work with connection style that generates a -quadratic-spline segment. They are ``fancy``, ``simple``, and ``wedge``. -For these arrow styles, you must use "angle3" or "arc3" connection -style. - -If the annotation string is given, the patchA is set to the bbox patch -of the text by default. - -.. plot:: users/plotting/examples/annotate_simple02.py - -As in the text command, a box around the text can be drawn using -the ``bbox`` argument. - -.. plot:: users/plotting/examples/annotate_simple03.py - -By default, the starting point is set to the center of the text -extent. This can be adjusted with ``relpos`` key value. The values -are normalized to the extent of the text. For example, (0,0) means -lower-left corner and (1,1) means top-right. - -.. plot:: users/plotting/examples/annotate_simple04.py - - -Placing Artist at the anchored location of the Axes -=================================================== - -There are class of artist that can be placed at the anchored location -of the Axes. A common example is the legend. This type of artists can -be created by using the OffsetBox class. A few predefined classes are -available in ``mpl_toolkits.axes_grid.anchored_artists``. :: - - from mpl_toolkits.axes_grid.anchored_artists import AnchoredText - at = AnchoredText("Figure 1a", - prop=dict(size=8), frameon=True, - loc=2, - ) - at.patch.set_boxstyle("round,pad=0.,rounding_size=0.2") - ax.add_artist(at) - - -.. plot:: users/plotting/examples/anchored_box01.py - - -The *loc* keyword has same meaning as in the legend command. - -A simple application is when the size of the artist (or collection of -artists) is known in pixel size during the time of creation. For -example, If you want to draw a circle with fixed size of 20 pixel x 20 -pixel (radius = 10 pixel), you can utilize -``AnchoredDrawingArea``. The instance is created with a size of the -drawing area (in pixel). And user can add arbitrary artist to the -drawing area. Note that the extents of the artists that are added to -the drawing area has nothing to do with the placement of the drawing -area itself. The initial size only matters. :: - - from mpl_toolkits.axes_grid.anchored_artists import AnchoredDrawingArea - - ada = AnchoredDrawingArea(20, 20, 0, 0, - loc=1, pad=0., frameon=False) - p1 = Circle((10, 10), 10) - ada.drawing_area.add_artist(p1) - p2 = Circle((30, 10), 5, fc="r") - ada.drawing_area.add_artist(p2) - -The artists that are added to the drawing area should not have -transform set (they will be overridden) and the dimension of those -artists are interpreted as a pixel coordinate, i.e., the radius of the -circles in above example are 10 pixel and 5 pixel, respectively. - -.. plot:: users/plotting/examples/anchored_box02.py - -Sometimes, you want to your artists scale with data coordinate (or -other coordinate than canvas pixel). You can use -``AnchoredAuxTransformBox`` class. This is similar to -``AnchoredDrawingArea`` except that the extent of the artist is -determined during the drawing time respecting the specified transform. :: - - from mpl_toolkits.axes_grid.anchored_artists import AnchoredAuxTransformBox - - box = AnchoredAuxTransformBox(ax.transData, loc=2) - el = Ellipse((0,0), width=0.1, height=0.4, angle=30) # in data coordinates! - box.drawing_area.add_artist(el) - -The ellipse in the above example will have width and height -corresponds to 0.1 and 0.4 in data coordinate and will be -automatically scaled when the view limits of the axes change. - -.. plot:: users/plotting/examples/anchored_box03.py - -As in the legend, the bbox_to_anchor argument can be set. Using the -HPacker and VPacker, you can have an arrangement(?) of artist as in the -legend (as a matter of fact, this is how the legend is created). - -.. plot:: users/plotting/examples/anchored_box04.py - -Note that unlike the legend, the ``bbox_transform`` is set -to IdentityTransform by default. - -Using Complex Coordinate with Annotation -======================================== - -The Annotation in matplotlib support several types of coordinate as -described in :ref:`annotations-tutorial`. For an advanced user who wants -more control, it supports a few other options. - - 1. :class:`~matplotlib.transforms.Transform` instance. For example, :: - - ax.annotate("Test", xy=(0.5, 0.5), xycoords=ax.transAxes) - - is identical to :: - - ax.annotate("Test", xy=(0.5, 0.5), xycoords="axes fraction") - - With this, you can annotate a point in other axes. :: - - ax1, ax2 = subplot(121), subplot(122) - ax2.annotate("Test", xy=(0.5, 0.5), xycoords=ax1.transData, - xytext=(0.5, 0.5), textcoords=ax2.transData, - arrowprops=dict(arrowstyle="->")) - - 2. :class:`~matplotlib.artist.Artist` instance. The xy value (or - xytext) is interpreted as a fractional coordinate of the bbox - (return value of *get_window_extent*) of the artist. :: - - an1 = ax.annotate("Test 1", xy=(0.5, 0.5), xycoords="data", - va="center", ha="center", - bbox=dict(boxstyle="round", fc="w")) - an2 = ax.annotate("Test 2", xy=(1, 0.5), xycoords=an1, # (1,0.5) of the an1's bbox - xytext=(30,0), textcoords="offset points", - va="center", ha="left", - bbox=dict(boxstyle="round", fc="w"), - arrowprops=dict(arrowstyle="->")) - - .. plot:: users/plotting/examples/annotate_simple_coord01.py - - Note that it is your responsibility that the extent of the - coordinate artist (*an1* in above example) is determined before *an2* - gets drawn. In most cases, it means that an2 needs to be drawn - later than *an1*. - - - 3. A callable object that returns an instance of either - :class:`~matplotlib.transforms.BboxBase` or - :class:`~matplotlib.transforms.Transform`. If a transform is - returned, it is same as 1 and if bbox is returned, it is same - as 2. The callable object should take a single argument of - renderer instance. For example, following two commands give - identical results :: - - an2 = ax.annotate("Test 2", xy=(1, 0.5), xycoords=an1, - xytext=(30,0), textcoords="offset points") - an2 = ax.annotate("Test 2", xy=(1, 0.5), xycoords=an1.get_window_extent, - xytext=(30,0), textcoords="offset points") - - - 4. A tuple of two coordinate specification. The first item is for - x-coordinate and the second is for y-coordinate. For example, :: - - annotate("Test", xy=(0.5, 1), xycoords=("data", "axes fraction")) - - 0.5 is in data coordinate, and 1 is in normalized axes coordinate. - You may use an artist or transform as with a tuple. For example, - - .. plot:: users/plotting/examples/annotate_simple_coord02.py - :include-source: - - - 5. Sometimes, you want your annotation with some "offset points", but - not from the annotated point but from other - point. :class:`~matplotlib.text.OffsetFrom` is a helper class for such - case. - - .. plot:: users/plotting/examples/annotate_simple_coord03.py - :include-source: - - You may take a look at this example :ref:`pylab_examples-annotation_demo3`. - -Using ConnectorPatch -==================== - -The ConnectorPatch is like an annotation without a text. While the -annotate function is recommended in most of situation, the -ConnectorPatch is useful when you want to connect points in different -axes. :: - - from matplotlib.patches import ConnectionPatch - xy = (0.2, 0.2) - con = ConnectionPatch(xyA=xy, xyB=xy, coordsA="data", coordsB="data", - axesA=ax1, axesB=ax2) - ax2.add_artist(con) - -The above code connects point xy in data coordinate of ``ax1`` to -point xy int data coordinate of ``ax2``. Here is a simple example. - -.. plot:: users/plotting/examples/connect_simple01.py - - -While the ConnectorPatch instance can be added to any axes, but you -may want it to be added to the axes in the latter (?) of the axes -drawing order to prevent overlap (?) by other axes. - - - - -Advanced Topics -*************** - -Zoom effect between Axes -======================== - -mpl_toolkits.axes_grid.inset_locator defines some patch classes useful -for interconnect two axes. Understanding the code requires some -knowledge of how mpl's transform works. But, utilizing it will be -straight forward. - - -.. plot:: mpl_examples/pylab_examples/axes_zoom_effect.py - - -Define Custom BoxStyle -====================== - -You can use a custom box style. The value for the ``boxstyle`` can be a -callable object in following forms.:: - - def __call__(self, x0, y0, width, height, mutation_size, - aspect_ratio=1.): - """ - Given the location and size of the box, return the path of - the box around it. - - - *x0*, *y0*, *width*, *height* : location and size of the box - - *mutation_size* : a reference scale for the mutation. - - *aspect_ratio* : aspect-ration for the mutation. - """ - path = ... - return path - -Here is a complete example. - -.. plot:: users/plotting/examples/custom_boxstyle01.py - -However, it is recommended that you derive from the -matplotlib.patches.BoxStyle._Base as demonstrated below. - -.. plot:: users/plotting/examples/custom_boxstyle02.py - :include-source: - - -Similarly, you can define custom ConnectionStyle and custom ArrowStyle. -See the source code of ``lib/matplotlib/patches.py`` and check -how each style class is defined. diff --git a/dev/_sources/users/annotations_intro.txt b/dev/_sources/users/annotations_intro.txt deleted file mode 100644 index 0b83e1523b3..00000000000 --- a/dev/_sources/users/annotations_intro.txt +++ /dev/null @@ -1,87 +0,0 @@ -.. _annotations-tutorial: - -Annotating text -=============== - -For a more detailed introduction to annotations, see -:ref:`plotting-guide-annotation`. - -The uses of the basic :func:`~matplotlib.pyplot.text` command above -place text at an arbitrary position on the Axes. A common use case of -text is to annotate some feature of the plot, and the -:func:`~matplotlib.Axes.annotate` method provides helper functionality -to make annotations easy. In an annotation, there are two points to -consider: the location being annotated represented by the argument -``xy`` and the location of the text ``xytext``. Both of these -arguments are ``(x,y)`` tuples. - -.. plot:: pyplots/annotation_basic.py - :include-source: - - -In this example, both the ``xy`` (arrow tip) and ``xytext`` locations -(text location) are in data coordinates. There are a variety of other -coordinate systems one can choose -- you can specify the coordinate -system of ``xy`` and ``xytext`` with one of the following strings for -``xycoords`` and ``textcoords`` (default is 'data') - -==================== ==================================================== -argument coordinate system -==================== ==================================================== - 'figure points' points from the lower left corner of the figure - 'figure pixels' pixels from the lower left corner of the figure - 'figure fraction' 0,0 is lower left of figure and 1,1 is upper right - 'axes points' points from lower left corner of axes - 'axes pixels' pixels from lower left corner of axes - 'axes fraction' 0,0 is lower left of axes and 1,1 is upper right - 'data' use the axes data coordinate system -==================== ==================================================== - -For example to place the text coordinates in fractional axes -coordinates, one could do:: - - ax.annotate('local max', xy=(3, 1), xycoords='data', - xytext=(0.8, 0.95), textcoords='axes fraction', - arrowprops=dict(facecolor='black', shrink=0.05), - horizontalalignment='right', verticalalignment='top', - ) - -For physical coordinate systems (points or pixels) the origin is the -(bottom, left) of the figure or axes. If the value is negative, -however, the origin is from the (right, top) of the figure or axes, -analogous to negative indexing of sequences. - -Optionally, you can specify arrow properties which draws an arrow -from the text to the annotated point by giving a dictionary of arrow -properties in the optional keyword argument ``arrowprops``. - - -==================== ===================================================== -``arrowprops`` key description -==================== ===================================================== -width the width of the arrow in points -frac the fraction of the arrow length occupied by the head -headwidth the width of the base of the arrow head in points -shrink move the tip and base some percent away from - the annotated point and text - -\*\*kwargs any key for :class:`matplotlib.patches.Polygon`, - e.g., ``facecolor`` -==================== ===================================================== - - -In the example below, the ``xy`` point is in native coordinates -(``xycoords`` defaults to 'data'). For a polar axes, this is in -(theta, radius) space. The text in this example is placed in the -fractional figure coordinate system. :class:`matplotlib.text.Text` -keyword args like ``horizontalalignment``, ``verticalalignment`` and -``fontsize are passed from the `~matplotlib.Axes.annotate` to the -``Text`` instance - -.. plot:: pyplots/annotation_polar.py - :include-source: - -For more on all the wild and wonderful things you can do with -annotations, including fancy arrows, see :ref:`plotting-guide-annotation` -and :ref:`pylab_examples-annotation_demo`. - diff --git a/dev/_sources/users/artists.txt b/dev/_sources/users/artists.txt deleted file mode 100644 index cff65522de0..00000000000 --- a/dev/_sources/users/artists.txt +++ /dev/null @@ -1,638 +0,0 @@ -.. _artist-tutorial: - -*************** -Artist tutorial -*************** - -There are three layers to the matplotlib API. The -:class:`matplotlib.backend_bases.FigureCanvas` is the area onto which -the figure is drawn, the :class:`matplotlib.backend_bases.Renderer` is -the object which knows how to draw on the -:class:`~matplotlib.backend_bases.FigureCanvas`, and the -:class:`matplotlib.artist.Artist` is the object that knows how to use -a renderer to paint onto the canvas. The -:class:`~matplotlib.backend_bases.FigureCanvas` and -:class:`~matplotlib.backend_bases.Renderer` handle all the details of -talking to user interface toolkits like `wxPython -`_ or drawing languages like PostScript®, and -the ``Artist`` handles all the high level constructs like representing -and laying out the figure, text, and lines. The typical user will -spend 95% of his time working with the ``Artists``. - -There are two types of ``Artists``: primitives and containers. The primitives -represent the standard graphical objects we want to paint onto our canvas: -:class:`~matplotlib.lines.Line2D`, :class:`~matplotlib.patches.Rectangle`, -:class:`~matplotlib.text.Text`, :class:`~matplotlib.image.AxesImage`, etc., and -the containers are places to put them (:class:`~matplotlib.axis.Axis`, -:class:`~matplotlib.axes.Axes` and :class:`~matplotlib.figure.Figure`). The -standard use is to create a :class:`~matplotlib.figure.Figure` instance, use -the ``Figure`` to create one or more :class:`~matplotlib.axes.Axes` or -:class:`~matplotlib.axes.Subplot` instances, and use the ``Axes`` instance -helper methods to create the primitives. In the example below, we create a -``Figure`` instance using :func:`matplotlib.pyplot.figure`, which is a -convenience method for instantiating ``Figure`` instances and connecting them -with your user interface or drawing toolkit ``FigureCanvas``. As we will -discuss below, this is not necessary -- you can work directly with PostScript, -PDF Gtk+, or wxPython ``FigureCanvas`` instances, instantiate your ``Figures`` -directly and connect them yourselves -- but since we are focusing here on the -``Artist`` API we'll let :mod:`~matplotlib.pyplot` handle some of those details -for us:: - - import matplotlib.pyplot as plt - fig = plt.figure() - ax = fig.add_subplot(2,1,1) # two rows, one column, first plot - -The :class:`~matplotlib.axes.Axes` is probably the most important -class in the matplotlib API, and the one you will be working with most -of the time. This is because the ``Axes`` is the plotting area into -which most of the objects go, and the ``Axes`` has many special helper -methods (:meth:`~matplotlib.axes.Axes.plot`, -:meth:`~matplotlib.axes.Axes.text`, -:meth:`~matplotlib.axes.Axes.hist`, -:meth:`~matplotlib.axes.Axes.imshow`) to create the most common -graphics primitives (:class:`~matplotlib.lines.Line2D`, -:class:`~matplotlib.text.Text`, -:class:`~matplotlib.patches.Rectangle`, -:class:`~matplotlib.image.Image`, respectively). These helper methods -will take your data (e.g., ``numpy`` arrays and strings) and create -primitive ``Artist`` instances as needed (e.g., ``Line2D``), add them to -the relevant containers, and draw them when requested. Most of you -are probably familiar with the :class:`~matplotlib.axes.Subplot`, -which is just a special case of an ``Axes`` that lives on a regular -rows by columns grid of ``Subplot`` instances. If you want to create -an ``Axes`` at an arbitrary location, simply use the -:meth:`~matplotlib.figure.Figure.add_axes` method which takes a list -of ``[left, bottom, width, height]`` values in 0-1 relative figure -coordinates:: - - fig2 = plt.figure() - ax2 = fig2.add_axes([0.15, 0.1, 0.7, 0.3]) - -Continuing with our example:: - - import numpy as np - t = np.arange(0.0, 1.0, 0.01) - s = np.sin(2*np.pi*t) - line, = ax.plot(t, s, color='blue', lw=2) - -In this example, ``ax`` is the ``Axes`` instance created by the -``fig.add_subplot`` call above (remember ``Subplot`` is just a -subclass of ``Axes``) and when you call ``ax.plot``, it creates a -``Line2D`` instance and adds it to the :attr:`Axes.lines -` list. In the interactive `ipython -`_ session below, you can see that the -``Axes.lines`` list is length one and contains the same line that was -returned by the ``line, = ax.plot...`` call: - -.. sourcecode:: ipython - - In [101]: ax.lines[0] - Out[101]: - - In [102]: line - Out[102]: - -If you make subsequent calls to ``ax.plot`` (and the hold state is "on" -which is the default) then additional lines will be added to the list. -You can remove lines later simply by calling the list methods; either -of these will work:: - - del ax.lines[0] - ax.lines.remove(line) # one or the other, not both! - -The Axes also has helper methods to configure and decorate the x-axis -and y-axis tick, tick labels and axis labels:: - - xtext = ax.set_xlabel('my xdata') # returns a Text instance - ytext = ax.set_ylabel('my xdata') - -When you call :meth:`ax.set_xlabel `, -it passes the information on the :class:`~matplotlib.text.Text` -instance of the :class:`~matplotlib.axis.XAxis`. Each ``Axes`` -instance contains an :class:`~matplotlib.axis.XAxis` and a -:class:`~matplotlib.axis.YAxis` instance, which handle the layout and -drawing of the ticks, tick labels and axis labels. - -.. I'm commenting this out, since the new Sphinx cross-references -.. sort of take care of this above - MGD - -.. Here are the most important matplotlib modules that contain the -.. classes referenced above - -.. =============== ================== -.. Artist Module -.. =============== ================== -.. Artist matplotlib.artist -.. Rectangle matplotlib.patches -.. Line2D matplotlib.lines -.. Axes matplotlib.axes -.. XAxis and YAxis matplotlib.axis -.. Figure matplotlib.figure -.. Text matplotlib.text -.. =============== ================== - -Try creating the figure below. - -.. plot:: pyplots/fig_axes_labels_simple.py - -.. _customizing-artists: - -Customizing your objects -======================== - -Every element in the figure is represented by a matplotlib -:class:`~matplotlib.artist.Artist`, and each has an extensive list of -properties to configure its appearance. The figure itself contains a -:class:`~matplotlib.patches.Rectangle` exactly the size of the figure, -which you can use to set the background color and transparency of the -figures. Likewise, each :class:`~matplotlib.axes.Axes` bounding box -(the standard white box with black edges in the typical matplotlib -plot, has a ``Rectangle`` instance that determines the color, -transparency, and other properties of the Axes. These instances are -stored as member variables :attr:`Figure.patch -` and :attr:`Axes.patch -` ("Patch" is a name inherited from -MATLAB, and is a 2D "patch" of color on the figure, e.g., rectangles, -circles and polygons). Every matplotlib ``Artist`` has the following -properties - -========== ====================================================================== -Property Description -========== ====================================================================== -alpha The transparency - a scalar from 0-1 -animated A boolean that is used to facilitate animated drawing -axes The axes that the Artist lives in, possibly None -clip_box The bounding box that clips the Artist -clip_on Whether clipping is enabled -clip_path The path the artist is clipped to -contains A picking function to test whether the artist contains the pick point -figure The figure instance the artist lives in, possibly None -label A text label (e.g., for auto-labeling) -picker A python object that controls object picking -transform The transformation -visible A boolean whether the artist should be drawn -zorder A number which determines the drawing order -========== ====================================================================== - -Each of the properties is accessed with an old-fashioned setter or -getter (yes we know this irritates Pythonistas and we plan to support -direct access via properties or traits but it hasn't been done yet). -For example, to multiply the current alpha by a half:: - - a = o.get_alpha() - o.set_alpha(0.5*a) - -If you want to set a number of properties at once, you can also use -the ``set`` method with keyword arguments. For example:: - - o.set(alpha=0.5, zorder=2) - -If you are working interactively at the python shell, a handy way to -inspect the ``Artist`` properties is to use the -:func:`matplotlib.artist.getp` function (simply -:func:`~matplotlib.pylab.getp` in pylab), which lists the properties -and their values. This works for classes derived from ``Artist`` as -well, e.g., ``Figure`` and ``Rectangle``. Here are the ``Figure`` rectangle -properties mentioned above: - -.. sourcecode:: ipython - - In [149]: matplotlib.artist.getp(fig.patch) - alpha = 1.0 - animated = False - antialiased or aa = True - axes = None - clip_box = None - clip_on = False - clip_path = None - contains = None - edgecolor or ec = w - facecolor or fc = 0.75 - figure = Figure(8.125x6.125) - fill = 1 - hatch = None - height = 1 - label = - linewidth or lw = 1.0 - picker = None - transform = - verts = ((0, 0), (0, 1), (1, 1), (1, 0)) - visible = True - width = 1 - window_extent = - x = 0 - y = 0 - zorder = 1 - -.. TODO: Update these URLs - -The docstrings for all of the classes also contain the ``Artist`` -properties, so you can consult the interactive "help" or the -:ref:`artist-api` for a listing of properties for a given object. - -.. _object-containers: - -Object containers -================= - - -Now that we know how to inspect and set the properties of a given -object we want to configure, we need to now how to get at that object. -As mentioned in the introduction, there are two kinds of objects: -primitives and containers. The primitives are usually the things you -want to configure (the font of a :class:`~matplotlib.text.Text` -instance, the width of a :class:`~matplotlib.lines.Line2D`) although -the containers also have some properties as well -- for example the -:class:`~matplotlib.axes.Axes` :class:`~matplotlib.artist.Artist` is a -container that contains many of the primitives in your plot, but it -also has properties like the ``xscale`` to control whether the xaxis -is 'linear' or 'log'. In this section we'll review where the various -container objects store the ``Artists`` that you want to get at. - -.. _figure-container: - -Figure container -================ - -The top level container ``Artist`` is the -:class:`matplotlib.figure.Figure`, and it contains everything in the -figure. The background of the figure is a -:class:`~matplotlib.patches.Rectangle` which is stored in -:attr:`Figure.patch `. As -you add subplots (:meth:`~matplotlib.figure.Figure.add_subplot`) and -axes (:meth:`~matplotlib.figure.Figure.add_axes`) to the figure -these will be appended to the :attr:`Figure.axes -`. These are also returned by the -methods that create them: - -.. sourcecode:: ipython - - In [156]: fig = plt.figure() - - In [157]: ax1 = fig.add_subplot(211) - - In [158]: ax2 = fig.add_axes([0.1, 0.1, 0.7, 0.3]) - - In [159]: ax1 - Out[159]: - - In [160]: print fig.axes - [, ] - -Because the figure maintains the concept of the "current axes" (see -:meth:`Figure.gca ` and -:meth:`Figure.sca `) to support the -pylab/pyplot state machine, you should not insert or remove axes -directly from the axes list, but rather use the -:meth:`~matplotlib.figure.Figure.add_subplot` and -:meth:`~matplotlib.figure.Figure.add_axes` methods to insert, and the -:meth:`~matplotlib.figure.Figure.delaxes` method to delete. You are -free however, to iterate over the list of axes or index into it to get -access to ``Axes`` instances you want to customize. Here is an -example which turns all the axes grids on:: - - for ax in fig.axes: - ax.grid(True) - - -The figure also has its own text, lines, patches and images, which you -can use to add primitives directly. The default coordinate system for -the ``Figure`` will simply be in pixels (which is not usually what you -want) but you can control this by setting the transform property of -the ``Artist`` you are adding to the figure. - -.. TODO: Is that still true? - -More useful is "figure coordinates" where (0, 0) is the bottom-left of -the figure and (1, 1) is the top-right of the figure which you can -obtain by setting the ``Artist`` transform to :attr:`fig.transFigure -`: - -.. sourcecode:: ipython - - In [191]: fig = plt.figure() - - In [192]: l1 = matplotlib.lines.Line2D([0, 1], [0, 1], - transform=fig.transFigure, figure=fig) - - In [193]: l2 = matplotlib.lines.Line2D([0, 1], [1, 0], - transform=fig.transFigure, figure=fig) - - In [194]: fig.lines.extend([l1, l2]) - - In [195]: fig.canvas.draw() - -.. plot:: pyplots/fig_x.py - - -Here is a summary of the Artists the figure contains - -.. TODO: Add xrefs to this table - -================ =============================================================== -Figure attribute Description -================ =============================================================== -axes A list of Axes instances (includes Subplot) -patch The Rectangle background -images A list of FigureImages patches - useful for raw pixel display -legends A list of Figure Legend instances (different from Axes.legends) -lines A list of Figure Line2D instances (rarely used, see Axes.lines) -patches A list of Figure patches (rarely used, see Axes.patches) -texts A list Figure Text instances -================ =============================================================== - -.. _axes-container: - -Axes container -============== - -The :class:`matplotlib.axes.Axes` is the center of the matplotlib -universe -- it contains the vast majority of all the ``Artists`` used -in a figure with many helper methods to create and add these -``Artists`` to itself, as well as helper methods to access and -customize the ``Artists`` it contains. Like the -:class:`~matplotlib.figure.Figure`, it contains a -:class:`~matplotlib.patches.Patch` -:attr:`~matplotlib.axes.Axes.patch` which is a -:class:`~matplotlib.patches.Rectangle` for Cartesian coordinates and a -:class:`~matplotlib.patches.Circle` for polar coordinates; this patch -determines the shape, background and border of the plotting region:: - - ax = fig.add_subplot(111) - rect = ax.patch # a Rectangle instance - rect.set_facecolor('green') - -When you call a plotting method, e.g., the canonical -:meth:`~matplotlib.axes.Axes.plot` and pass in arrays or lists of -values, the method will create a :meth:`matplotlib.lines.Line2D` -instance, update the line with all the ``Line2D`` properties passed as -keyword arguments, add the line to the :attr:`Axes.lines -` container, and returns it to you: - -.. sourcecode:: ipython - - In [213]: x, y = np.random.rand(2, 100) - - In [214]: line, = ax.plot(x, y, '-', color='blue', linewidth=2) - -``plot`` returns a list of lines because you can pass in multiple x, y -pairs to plot, and we are unpacking the first element of the length -one list into the line variable. The line has been added to the -``Axes.lines`` list: - -.. sourcecode:: ipython - - In [229]: print ax.lines - [] - -Similarly, methods that create patches, like -:meth:`~matplotlib.axes.Axes.bar` creates a list of rectangles, will -add the patches to the :attr:`Axes.patches -` list: - -.. sourcecode:: ipython - - In [233]: n, bins, rectangles = ax.hist(np.random.randn(1000), 50, facecolor='yellow') - - In [234]: rectangles - Out[234]: - - In [235]: print len(ax.patches) - -You should not add objects directly to the ``Axes.lines`` or -``Axes.patches`` lists unless you know exactly what you are doing, -because the ``Axes`` needs to do a few things when it creates and adds -an object. It sets the figure and axes property of the ``Artist``, as -well as the default ``Axes`` transformation (unless a transformation -is set). It also inspects the data contained in the ``Artist`` to -update the data structures controlling auto-scaling, so that the view -limits can be adjusted to contain the plotted data. You can, -nonetheless, create objects yourself and add them directly to the -``Axes`` using helper methods like -:meth:`~matplotlib.axes.Axes.add_line` and -:meth:`~matplotlib.axes.Axes.add_patch`. Here is an annotated -interactive session illustrating what is going on: - -.. sourcecode:: ipython - - In [261]: fig = plt.figure() - - In [262]: ax = fig.add_subplot(111) - - # create a rectangle instance - In [263]: rect = matplotlib.patches.Rectangle( (1,1), width=5, height=12) - - # by default the axes instance is None - In [264]: print rect.get_axes() - None - - # and the transformation instance is set to the "identity transform" - In [265]: print rect.get_transform() - - - # now we add the Rectangle to the Axes - In [266]: ax.add_patch(rect) - - # and notice that the ax.add_patch method has set the axes - # instance - In [267]: print rect.get_axes() - Axes(0.125,0.1;0.775x0.8) - - # and the transformation has been set too - In [268]: print rect.get_transform() - - - # the default axes transformation is ax.transData - In [269]: print ax.transData - - - # notice that the xlimits of the Axes have not been changed - In [270]: print ax.get_xlim() - (0.0, 1.0) - - # but the data limits have been updated to encompass the rectangle - In [271]: print ax.dataLim.bounds - (1.0, 1.0, 5.0, 12.0) - - # we can manually invoke the auto-scaling machinery - In [272]: ax.autoscale_view() - - # and now the xlim are updated to encompass the rectangle - In [273]: print ax.get_xlim() - (1.0, 6.0) - - # we have to manually force a figure draw - In [274]: ax.figure.canvas.draw() - - -There are many, many ``Axes`` helper methods for creating primitive -``Artists`` and adding them to their respective containers. The table -below summarizes a small sampling of them, the kinds of ``Artist`` they -create, and where they store them - -============================== ==================== ======================= -Helper method Artist Container -============================== ==================== ======================= -ax.annotate - text annotations Annotate ax.texts -ax.bar - bar charts Rectangle ax.patches -ax.errorbar - error bar plots Line2D and Rectangle ax.lines and ax.patches -ax.fill - shared area Polygon ax.patches -ax.hist - histograms Rectangle ax.patches -ax.imshow - image data AxesImage ax.images -ax.legend - axes legends Legend ax.legends -ax.plot - xy plots Line2D ax.lines -ax.scatter - scatter charts PolygonCollection ax.collections -ax.text - text Text ax.texts -============================== ==================== ======================= - - -In addition to all of these ``Artists``, the ``Axes`` contains two -important ``Artist`` containers: the :class:`~matplotlib.axis.XAxis` -and :class:`~matplotlib.axis.YAxis`, which handle the drawing of the -ticks and labels. These are stored as instance variables -:attr:`~matplotlib.axes.Axes.xaxis` and -:attr:`~matplotlib.axes.Axes.yaxis`. The ``XAxis`` and ``YAxis`` -containers will be detailed below, but note that the ``Axes`` contains -many helper methods which forward calls on to the -:class:`~matplotlib.axis.Axis` instances so you often do not need to -work with them directly unless you want to. For example, you can set -the font size of the ``XAxis`` ticklabels using the ``Axes`` helper -method:: - - for label in ax.get_xticklabels(): - label.set_color('orange') - -Below is a summary of the Artists that the Axes contains - -============== ====================================== -Axes attribute Description -============== ====================================== -artists A list of Artist instances -patch Rectangle instance for Axes background -collections A list of Collection instances -images A list of AxesImage -legends A list of Legend instances -lines A list of Line2D instances -patches A list of Patch instances -texts A list of Text instances -xaxis matplotlib.axis.XAxis instance -yaxis matplotlib.axis.YAxis instance -============== ====================================== - -.. _axis-container: - -Axis containers -=============== - -The :class:`matplotlib.axis.Axis` instances handle the drawing of the -tick lines, the grid lines, the tick labels and the axis label. You -can configure the left and right ticks separately for the y-axis, and -the upper and lower ticks separately for the x-axis. The ``Axis`` -also stores the data and view intervals used in auto-scaling, panning -and zooming, as well as the :class:`~matplotlib.ticker.Locator` and -:class:`~matplotlib.ticker.Formatter` instances which control where -the ticks are placed and how they are represented as strings. - -Each ``Axis`` object contains a :attr:`~matplotlib.axis.Axis.label` attribute -(this is what :mod:`~matplotlib.pylab` modifies in calls to -:func:`~matplotlib.pylab.xlabel` and :func:`~matplotlib.pylab.ylabel`) as well -as a list of major and minor ticks. The ticks are -:class:`~matplotlib.axis.XTick` and :class:`~matplotlib.axis.YTick` instances, -which contain the actual line and text primitives that render the ticks and -ticklabels. Because the ticks are dynamically created as needed (e.g., when -panning and zooming), you should access the lists of major and minor ticks -through their accessor methods :meth:`~matplotlib.axis.Axis.get_major_ticks` -and :meth:`~matplotlib.axis.Axis.get_minor_ticks`. Although the ticks contain -all the primitives and will be covered below, the ``Axis`` methods contain -accessor methods to return the tick lines, tick labels, tick locations etc.: - -.. sourcecode:: ipython - - In [285]: axis = ax.xaxis - - In [286]: axis.get_ticklocs() - Out[286]: array([ 0., 1., 2., 3., 4., 5., 6., 7., 8., 9.]) - - In [287]: axis.get_ticklabels() - Out[287]: - - # note there are twice as many ticklines as labels because by - # default there are tick lines at the top and bottom but only tick - # labels below the xaxis; this can be customized - In [288]: axis.get_ticklines() - Out[288]: - - # by default you get the major ticks back - In [291]: axis.get_ticklines() - Out[291]: - - # but you can also ask for the minor ticks - In [292]: axis.get_ticklines(minor=True) - Out[292]: - -Here is a summary of some of the useful accessor methods of the ``Axis`` -(these have corresponding setters where useful, such as -set_major_formatter) - -====================== ========================================================= -Accessor method Description -====================== ========================================================= -get_scale The scale of the axis, eg 'log' or 'linear' -get_view_interval The interval instance of the axis view limits -get_data_interval The interval instance of the axis data limits -get_gridlines A list of grid lines for the Axis -get_label The axis label - a Text instance -get_ticklabels A list of Text instances - keyword minor=True|False -get_ticklines A list of Line2D instances - keyword minor=True|False -get_ticklocs A list of Tick locations - keyword minor=True|False -get_major_locator The matplotlib.ticker.Locator instance for major ticks -get_major_formatter The matplotlib.ticker.Formatter instance for major ticks -get_minor_locator The matplotlib.ticker.Locator instance for minor ticks -get_minor_formatter The matplotlib.ticker.Formatter instance for minor ticks -get_major_ticks A list of Tick instances for major ticks -get_minor_ticks A list of Tick instances for minor ticks -grid Turn the grid on or off for the major or minor ticks -====================== ========================================================= - -Here is an example, not recommended for its beauty, which customizes -the axes and tick properties - -.. plot:: pyplots/fig_axes_customize_simple.py - :include-source: - - -.. _tick-container: - -Tick containers -=============== - -The :class:`matplotlib.axis.Tick` is the final container object in our -descent from the :class:`~matplotlib.figure.Figure` to the -:class:`~matplotlib.axes.Axes` to the :class:`~matplotlib.axis.Axis` -to the :class:`~matplotlib.axis.Tick`. The ``Tick`` contains the tick -and grid line instances, as well as the label instances for the upper -and lower ticks. Each of these is accessible directly as an attribute -of the ``Tick``. In addition, there are boolean variables that determine -whether the upper labels and ticks are on for the x-axis and whether -the right labels and ticks are on for the y-axis. - -============== ========================================================== -Tick attribute Description -============== ========================================================== -tick1line Line2D instance -tick2line Line2D instance -gridline Line2D instance -label1 Text instance -label2 Text instance -gridOn boolean which determines whether to draw the tickline -tick1On boolean which determines whether to draw the 1st tickline -tick2On boolean which determines whether to draw the 2nd tickline -label1On boolean which determines whether to draw tick label -label2On boolean which determines whether to draw tick label -============== ========================================================== - -Here is an example which sets the formatter for the right side ticks with -dollar signs and colors them green on the right side of the yaxis - -.. plot:: pyplots/dollar_ticks.py - :include-source: diff --git a/dev/_sources/users/credits.txt b/dev/_sources/users/credits.txt deleted file mode 100644 index 980828786bd..00000000000 --- a/dev/_sources/users/credits.txt +++ /dev/null @@ -1,218 +0,0 @@ -.. _credits: - -******* -Credits -******* - - -matplotlib was written by John Hunter and is now developed and -maintained by a number of `active -`_ developers. -The current lead developer of matplotlib is Michael Droettboom. - -Special thanks to those who have made valuable contributions (roughly -in order of first contribution by date). Any list like this is bound -to be incomplete and can't capture the thousands and thousands of -contributions over the years from these and others: - -Jeremy O'Donoghue - wrote the wx backend - -Andrew Straw - Provided much of the log scaling architecture, the fill command, PIL - support for imshow, and provided many examples. He also wrote the - support for dropped axis spines and the `buildbot - `_ unit testing infrastructure - which triggers the JPL/James Evans platform specific builds and - regression test image comparisons from svn matplotlib across - platforms on svn commits. - -Charles Twardy - provided the impetus code for the legend class and has made - countless bug reports and suggestions for improvement. - -Gary Ruben - made many enhancements to errorbar to support x and y - errorbar plots, and added a number of new marker types to plot. - -John Gill - wrote the table class and examples, helped with support for - auto-legend placement, and added support for legending scatter - plots. - -David Moore - wrote the paint backend (no longer used) - -Todd Miller - supported by `STSCI `_ contributed the TkAgg - backend and the numerix module, which allows matplotlib to work with - either numeric or numarray. He also ported image support to the - postscript backend, with much pain and suffering. - -Paul Barrett - supported by `STSCI `_ overhauled font - management to provide an improved, free-standing, platform - independent font manager with a WC3 compliant font finder and cache - mechanism and ported truetype and mathtext to PS. - -Perry Greenfield - supported by `STSCI `_ overhauled and - modernized the goals and priorities page, implemented an improved - colormap framework, and has provided many suggestions and a lot of - insight to the overall design and organization of matplotlib. - -Jared Wahlstrand - wrote the initial SVG backend. - -Steve Chaplin - served as the GTK maintainer and wrote the Cairo and - GTKCairo backends. - -Jim Benson - provided the patch to handle vertical mathttext. - -Gregory Lielens - provided the FltkAgg backend and several patches for the frontend, - including contributions to toolbar2, and support for log ticking - with alternate bases and major and minor log ticking. - -Darren Dale - - did the work to do mathtext exponential labeling for log plots, - added improved support for scalar formatting, and did the lions - share of the `psfrag - `_ - LaTeX support for postscript. He has made substantial contributions - to extending and maintaining the PS and Qt backends, and wrote the - site.cfg and matplotlib.conf build and runtime configuration - support. He setup the infrastructure for the sphinx documentation - that powers the mpl docs. - -Paul Mcguire - provided the pyparsing module on which mathtext relies, and made a - number of optimizations to the matplotlib mathtext grammar. - - -Fernando Perez - has provided numerous bug reports and patches for cleaning up - backend imports and expanding pylab functionality, and provided - matplotlib support in the pylab mode for `ipython - `_. He also provided the - :func:`~matplotlib.pyplot.matshow` command, and wrote TConfig, which - is the basis for the experimental traited mpl configuration. - -Andrew Dalke - of `Dalke Scientific Software `_ contributed the - strftime formatting code to handle years earlier than 1900. - -Jochen Voss - served as PS backend maintainer and has contributed several - bugfixes. - -Nadia Dencheva - - supported by `STSCI `_ provided the contouring and - contour labeling code. - -Baptiste Carvello - provided the key ideas in a patch for proper - shared axes support that underlies ganged plots and multiscale - plots. - -Jeffrey Whitaker - at `NOAA `_ wrote the - :ref:`toolkit_basemap` toolkit - -Sigve Tjoraand, Ted Drain, James Evans - and colleagues at the `JPL `_ collaborated - on the QtAgg backend and sponsored development of a number of - features including custom unit types, datetime support, scale free - ellipses, broken bar plots and more. The JPL team wrote the unit - testing image comparison `infrastructure - `_ - for regression test image comparisons. - -James Amundson - did the initial work porting the qt backend to qt4 - -Eric Firing - has contributed significantly to contouring, masked - array, pcolor, image and quiver support, in addition to ongoing - support and enhancements in performance, design and code quality in - most aspects of matplotlib. - -Daishi Harada - added support for "Dashed Text". See `dashpointlabel.py - `_ and - :class:`~matplotlib.text.TextWithDash`. - -Nicolas Young - added support for byte images to imshow, which are - more efficient in CPU and memory, and added support for irregularly - sampled images. - -The `brainvisa `_ Orsay team and Fernando Perez - added Qt support to `ipython `_ in pylab mode. - - -Charlie Moad - contributed work to matplotlib's Cocoa support and has done a lot of work on the OSX and win32 binary releases. - -Jouni K. Seppänen - wrote the PDF backend and contributed numerous - fixes to the code, to tex support and to the get_sample_data handler - -Paul Kienzle - improved the picking infrastructure for interactive plots, and with - Alex Mont contributed fast rendering code for quadrilateral meshes. - -Michael Droettboom - supported by `STSCI `_ wrote the enhanced - mathtext support, implementing Knuth's box layout algorithms, saving - to file-like objects across backends, and is responsible for - numerous bug-fixes, much better font and unicode support, and - feature and performance enhancements across the matplotlib code - base. He also rewrote the transformation infrastructure to support - custom projections and scales. - -John Porter, Jonathon Taylor and Reinier Heeres - John Porter wrote the mplot3d module for basic 3D plotting in - matplotlib, and Jonathon Taylor and Reinier Heeres ported it to the - refactored transform trunk. - -Jae-Joon Lee - Implemented fancy arrows and boxes, rewrote the legend - support to handle multiple columns and fancy text boxes, wrote the - axes grid toolkit, and has made numerous contributions to the code - and documentation - -Paul Ivanov - Has worked on getting matplotlib integrated better with other tools, - such as Sage and IPython, and getting the test infrastructure - faster, lighter and meaner. Listen to his podcast. - -Tony Yu - Has been involved in matplotlib since the early days, and recently - has contributed stream plotting among many other improvements. He - is the author of mpltools. - -Michiel de Hoon - Wrote and maintains the macosx backend. - -Ian Thomas - Contributed, among other things, the triangulation (tricolor and - tripcontour) methods. - -Benjamin Root - Has significantly improved the capabilities of the 3D plotting. He - has improved matplotlib's documentation and code quality throughout, - and does invaluable triaging of pull requests and bugs. - -Phil Elson - Fixed some deep-seated bugs in the transforms framework, and has - been laser-focused on improving polish throughout matplotlib, - tackling things that have been considered to large and daunting for - a long time. - -Damon McDougall - Added triangulated 3D surfaces and stack plots to matplotlib. diff --git a/dev/_sources/users/customizing.txt b/dev/_sources/users/customizing.txt deleted file mode 100644 index de5716ac3ff..00000000000 --- a/dev/_sources/users/customizing.txt +++ /dev/null @@ -1,76 +0,0 @@ -.. _customizing-matplotlib: - -********************** -Customizing matplotlib -********************** - -.. _customizing-with-matplotlibrc-files: - -The :file:`matplotlibrc` file -============================= - -matplotlib uses :file:`matplotlibrc` configuration files to customize all kinds -of properties, which we call `rc settings` or `rc parameters`. You can control -the defaults of almost every property in matplotlib: figure size and dpi, line -width, color and style, axes, axis and grid properties, text and font -properties and so on. matplotlib looks for :file:`matplotlibrc` in three -locations, in the following order: - -1. :file:`matplotlibrc` in the current working directory, usually used for - specific customizations that you do not want to apply elsewhere. -2. :file:`.matplotlib/matplotlibrc`, for the user's default customizations. See - :ref:`locating-matplotlib-config-dir`. -3. :file:`{INSTALL}/matplotlib/mpl-data/matplotlibrc`, where :file:`{INSTALL}` - is something like :file:`/usr/lib/python2.5/site-packages` on Linux, and - maybe :file:`C:\\Python25\\Lib\\site-packages` on Windows. Every time you - install matplotlib, this file will be overwritten, so if you want your - customizations to be saved, please move this file to your :file:`.matplotlib` - directory. - -To display where the currently active :file:`matplotlibrc` file was -loaded from, one can do the following:: - - >>> import matplotlib - >>> matplotlib.matplotlib_fname() - '/home/foo/.matplotlib/matplotlibrc' - -See below for a sample :ref:`matplotlibrc file`. - -.. _customizing-with-dynamic-rc-settings: - -Dynamic rc settings -=================== - -You can also dynamically change the default rc settings in a python script or -interactively from the python shell. All of the rc settings are stored in a -dictionary-like variable called :data:`matplotlib.rcParams`, which is global to -the matplotlib package. rcParams can be modified directly, for example:: - - import matplotlib as mpl - mpl.rcParams['lines.linewidth'] = 2 - mpl.rcParams['lines.color'] = 'r' - -Matplotlib also provides a couple of convenience functions for modifying rc -settings. The :func:`matplotlib.rc` command can be used to modify multiple -settings in a single group at once, using keyword arguments:: - - import matplotlib as mpl - mpl.rc('lines', linewidth=2, color='r') - -There :func:`matplotlib.rcdefaults` command will restore the standard -matplotlib default settings. - -There is some degree of validation when setting the values of rcParams, see -:mod:`matplotlib.rcsetup` for details. - - -.. _matplotlibrc-sample: - -A sample matplotlibrc file --------------------------------------------------------------------- - -.. htmlonly:: - - `(download) <../_static/matplotlibrc>`__ - -.. literalinclude:: ../../lib/matplotlib/mpl-data/matplotlibrc diff --git a/dev/_sources/users/event_handling.txt b/dev/_sources/users/event_handling.txt deleted file mode 100644 index 03a087bd154..00000000000 --- a/dev/_sources/users/event_handling.txt +++ /dev/null @@ -1,565 +0,0 @@ -.. _event-handling-tutorial: - -************************** -Event handling and picking -************************** - -matplotlib works with 6 user interface toolkits (wxpython, tkinter, -qt, gtk, fltk and macosx) and in order to support features like interactive -panning and zooming of figures, it is helpful to the developers to -have an API for interacting with the figure via key presses and mouse -movements that is "GUI neutral" so we don't have to repeat a lot of -code across the different user interfaces. Although the event -handling API is GUI neutral, it is based on the GTK model, which was -the first user interface matplotlib supported. The events that are -triggered are also a bit richer vis-a-vis matplotlib than standard GUI -events, including information like which :class:`matplotlib.axes.Axes` -the event occurred in. The events also understand the matplotlib -coordinate system, and report event locations in both pixel and data -coordinates. - -.. _event-connections: - -Event connections -================= - -To receive events, you need to write a callback function and then -connect your function to the event manager, which is part of the -:class:`~matplotlib.backend_bases.FigureCanvasBase`. Here is a simple -example that prints the location of the mouse click and which button -was pressed:: - - fig = plt.figure() - ax = fig.add_subplot(111) - ax.plot(np.random.rand(10)) - - def onclick(event): - print 'button=%d, x=%d, y=%d, xdata=%f, ydata=%f'%( - event.button, event.x, event.y, event.xdata, event.ydata) - - cid = fig.canvas.mpl_connect('button_press_event', onclick) - -The ``FigureCanvas`` method -:meth:`~matplotlib.backend_bases.FigureCanvasBase.mpl_connect` returns -a connection id which is simply an integer. When you want to -disconnect the callback, just call:: - - fig.canvas.mpl_disconnect(cid) - -.. note:: - The canvas retains only weak references to the callbacks. Therefore - if a callback is a method of a class instance, you need to retain - a reference to that instance. Otherwise the instance will be - garbage-collected and the callback will vanish. - - -Here are the events that you can connect to, the class instances that -are sent back to you when the event occurs, and the event descriptions - - -======================= ====================================================================================== -Event name Class and description -======================= ====================================================================================== -'button_press_event' :class:`~matplotlib.backend_bases.MouseEvent` - mouse button is pressed -'button_release_event' :class:`~matplotlib.backend_bases.MouseEvent` - mouse button is released -'draw_event' :class:`~matplotlib.backend_bases.DrawEvent` - canvas draw -'key_press_event' :class:`~matplotlib.backend_bases.KeyEvent` - key is pressed -'key_release_event' :class:`~matplotlib.backend_bases.KeyEvent` - key is released -'motion_notify_event' :class:`~matplotlib.backend_bases.MouseEvent` - mouse motion -'pick_event' :class:`~matplotlib.backend_bases.PickEvent` - an object in the canvas is selected -'resize_event' :class:`~matplotlib.backend_bases.ResizeEvent` - figure canvas is resized -'scroll_event' :class:`~matplotlib.backend_bases.MouseEvent` - mouse scroll wheel is rolled -'figure_enter_event' :class:`~matplotlib.backend_bases.LocationEvent` - mouse enters a new figure -'figure_leave_event' :class:`~matplotlib.backend_bases.LocationEvent` - mouse leaves a figure -'axes_enter_event' :class:`~matplotlib.backend_bases.LocationEvent` - mouse enters a new axes -'axes_leave_event' :class:`~matplotlib.backend_bases.LocationEvent` - mouse leaves an axes -======================= ====================================================================================== - -.. _event-attributes: - -Event attributes -================ - -All matplotlib events inherit from the base class -:class:`matplotlib.backend_bases.Event`, which store the attributes: - - ``name`` - the event name - - ``canvas`` - the FigureCanvas instance generating the event - - ``guiEvent`` - the GUI event that triggered the matplotlib event - - -The most common events that are the bread and butter of event handling -are key press/release events and mouse press/release and movement -events. The :class:`~matplotlib.backend_bases.KeyEvent` and -:class:`~matplotlib.backend_bases.MouseEvent` classes that handle -these events are both derived from the LocationEvent, which has the -following attributes - - ``x`` - x position - pixels from left of canvas - - ``y`` - y position - pixels from bottom of canvas - - ``inaxes`` - the :class:`~matplotlib.axes.Axes` instance if mouse is over axes - - ``xdata`` - x coord of mouse in data coords - - ``ydata`` - y coord of mouse in data coords - -Let's look a simple example of a canvas, where a simple line segment -is created every time a mouse is pressed:: - - from matplotlib import pyplot as plt - - class LineBuilder: - def __init__(self, line): - self.line = line - self.xs = list(line.get_xdata()) - self.ys = list(line.get_ydata()) - self.cid = line.figure.canvas.mpl_connect('button_press_event', self) - - def __call__(self, event): - print 'click', event - if event.inaxes!=self.line.axes: return - self.xs.append(event.xdata) - self.ys.append(event.ydata) - self.line.set_data(self.xs, self.ys) - self.line.figure.canvas.draw() - - fig = plt.figure() - ax = fig.add_subplot(111) - ax.set_title('click to build line segments') - line, = ax.plot([0], [0]) # empty line - linebuilder = LineBuilder(line) - - plt.show() - - -The :class:`~matplotlib.backend_bases.MouseEvent` that we just used is a -:class:`~matplotlib.backend_bases.LocationEvent`, so we have access to -the data and pixel coordinates in event.x and event.xdata. In -addition to the ``LocationEvent`` attributes, it has - - ``button`` - button pressed None, 1, 2, 3, 'up', 'down' (up and down are used for scroll events) - - ``key`` - the key pressed: None, any character, 'shift', 'win', or 'control' - -Draggable rectangle exercise ----------------------------- - -Write draggable rectangle class that is initialized with a -:class:`~matplotlib.patches.Rectangle` instance but will move its x,y -location when dragged. Hint: you will need to store the original -``xy`` location of the rectangle which is stored as rect.xy and -connect to the press, motion and release mouse events. When the mouse -is pressed, check to see if the click occurs over your rectangle (see -:meth:`matplotlib.patches.Rectangle.contains`) and if it does, store -the rectangle xy and the location of the mouse click in data coords. -In the motion event callback, compute the deltax and deltay of the -mouse movement, and add those deltas to the origin of the rectangle -you stored. The redraw the figure. On the button release event, just -reset all the button press data you stored as None. - -Here is the solution:: - - import numpy as np - import matplotlib.pyplot as plt - - class DraggableRectangle: - def __init__(self, rect): - self.rect = rect - self.press = None - - def connect(self): - 'connect to all the events we need' - self.cidpress = self.rect.figure.canvas.mpl_connect( - 'button_press_event', self.on_press) - self.cidrelease = self.rect.figure.canvas.mpl_connect( - 'button_release_event', self.on_release) - self.cidmotion = self.rect.figure.canvas.mpl_connect( - 'motion_notify_event', self.on_motion) - - def on_press(self, event): - 'on button press we will see if the mouse is over us and store some data' - if event.inaxes != self.rect.axes: return - - contains, attrd = self.rect.contains(event) - if not contains: return - print 'event contains', self.rect.xy - x0, y0 = self.rect.xy - self.press = x0, y0, event.xdata, event.ydata - - def on_motion(self, event): - 'on motion we will move the rect if the mouse is over us' - if self.press is None: return - if event.inaxes != self.rect.axes: return - x0, y0, xpress, ypress = self.press - dx = event.xdata - xpress - dy = event.ydata - ypress - #print 'x0=%f, xpress=%f, event.xdata=%f, dx=%f, x0+dx=%f'%(x0, xpress, event.xdata, dx, x0+dx) - self.rect.set_x(x0+dx) - self.rect.set_y(y0+dy) - - self.rect.figure.canvas.draw() - - - def on_release(self, event): - 'on release we reset the press data' - self.press = None - self.rect.figure.canvas.draw() - - def disconnect(self): - 'disconnect all the stored connection ids' - self.rect.figure.canvas.mpl_disconnect(self.cidpress) - self.rect.figure.canvas.mpl_disconnect(self.cidrelease) - self.rect.figure.canvas.mpl_disconnect(self.cidmotion) - - fig = plt.figure() - ax = fig.add_subplot(111) - rects = ax.bar(range(10), 20*np.random.rand(10)) - drs = [] - for rect in rects: - dr = DraggableRectangle(rect) - dr.connect() - drs.append(dr) - - plt.show() - - -**Extra credit**: use the animation blit techniques discussed in the -`animations recipe -`_ to make the -animated drawing faster and smoother. - -Extra credit solution:: - - # draggable rectangle with the animation blit techniques; see - # http://www.scipy.org/Cookbook/Matplotlib/Animations - import numpy as np - import matplotlib.pyplot as plt - - class DraggableRectangle: - lock = None # only one can be animated at a time - def __init__(self, rect): - self.rect = rect - self.press = None - self.background = None - - def connect(self): - 'connect to all the events we need' - self.cidpress = self.rect.figure.canvas.mpl_connect( - 'button_press_event', self.on_press) - self.cidrelease = self.rect.figure.canvas.mpl_connect( - 'button_release_event', self.on_release) - self.cidmotion = self.rect.figure.canvas.mpl_connect( - 'motion_notify_event', self.on_motion) - - def on_press(self, event): - 'on button press we will see if the mouse is over us and store some data' - if event.inaxes != self.rect.axes: return - if DraggableRectangle.lock is not None: return - contains, attrd = self.rect.contains(event) - if not contains: return - print 'event contains', self.rect.xy - x0, y0 = self.rect.xy - self.press = x0, y0, event.xdata, event.ydata - DraggableRectangle.lock = self - - # draw everything but the selected rectangle and store the pixel buffer - canvas = self.rect.figure.canvas - axes = self.rect.axes - self.rect.set_animated(True) - canvas.draw() - self.background = canvas.copy_from_bbox(self.rect.axes.bbox) - - # now redraw just the rectangle - axes.draw_artist(self.rect) - - # and blit just the redrawn area - canvas.blit(axes.bbox) - - def on_motion(self, event): - 'on motion we will move the rect if the mouse is over us' - if DraggableRectangle.lock is not self: - return - if event.inaxes != self.rect.axes: return - x0, y0, xpress, ypress = self.press - dx = event.xdata - xpress - dy = event.ydata - ypress - self.rect.set_x(x0+dx) - self.rect.set_y(y0+dy) - - canvas = self.rect.figure.canvas - axes = self.rect.axes - # restore the background region - canvas.restore_region(self.background) - - # redraw just the current rectangle - axes.draw_artist(self.rect) - - # blit just the redrawn area - canvas.blit(axes.bbox) - - def on_release(self, event): - 'on release we reset the press data' - if DraggableRectangle.lock is not self: - return - - self.press = None - DraggableRectangle.lock = None - - # turn off the rect animation property and reset the background - self.rect.set_animated(False) - self.background = None - - # redraw the full figure - self.rect.figure.canvas.draw() - - def disconnect(self): - 'disconnect all the stored connection ids' - self.rect.figure.canvas.mpl_disconnect(self.cidpress) - self.rect.figure.canvas.mpl_disconnect(self.cidrelease) - self.rect.figure.canvas.mpl_disconnect(self.cidmotion) - - fig = plt.figure() - ax = fig.add_subplot(111) - rects = ax.bar(range(10), 20*np.random.rand(10)) - drs = [] - for rect in rects: - dr = DraggableRectangle(rect) - dr.connect() - drs.append(dr) - - plt.show() - - -.. _enter-leave-events: - -Mouse enter and leave -====================== - -If you want to be notified when the mouse enters or leaves a figure or -axes, you can connect to the figure/axes enter/leave events. Here is -a simple example that changes the colors of the axes and figure -background that the mouse is over:: - - """ - Illustrate the figure and axes enter and leave events by changing the - frame colors on enter and leave - """ - 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 = plt.figure() - fig1.suptitle('mouse hover over figure or axes to trigger events') - ax1 = fig1.add_subplot(211) - ax2 = fig1.add_subplot(212) - - 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 = plt.figure() - fig2.suptitle('mouse hover over figure or axes to trigger events') - ax1 = fig2.add_subplot(211) - ax2 = fig2.add_subplot(212) - - 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() - - - -.. _object-picking: - -Object picking -============== - -You can enable picking by setting the ``picker`` property of an -:class:`~matplotlib.artist.Artist` (eg a matplotlib -:class:`~matplotlib.lines.Line2D`, :class:`~matplotlib.text.Text`, -:class:`~matplotlib.patches.Patch`, :class:`~matplotlib.patches.Polygon`, -:class:`~matplotlib.patches.AxesImage`, etc...) - -There are a variety of meanings of the ``picker`` property: - - ``None`` - picking is disabled for this artist (default) - - ``boolean`` - if True then picking will be enabled and the artist will fire a - pick event if the mouse event is over the artist - - ``float`` - if picker is a number it is interpreted as an epsilon tolerance in - points and the the artist will fire off an event if its data is - within epsilon of the mouse event. For some artists like lines - and patch collections, the artist may provide additional data to - the pick event that is generated, eg the indices of the data - within epsilon of the pick event. - - ``function`` - if picker is callable, it is a user supplied function which - determines whether the artist is hit by the mouse event. The - signature is ``hit, props = picker(artist, mouseevent)`` to - determine the hit test. If the mouse event is over the artist, - return ``hit=True`` and props is a dictionary of properties you - want added to the :class:`~matplotlib.backend_bases.PickEvent` - attributes - - -After you have enabled an artist for picking by setting the ``picker`` -property, you need to connect to the figure canvas pick_event to get -pick callbacks on mouse press events. e.g.:: - - def pick_handler(event): - mouseevent = event.mouseevent - artist = event.artist - # now do something with this... - - -The :class:`~matplotlib.backend_bases.PickEvent` which is passed to -your callback is always fired with two attributes: - - ``mouseevent`` the mouse event that generate the pick event. The - mouse event in turn has attributes like ``x`` and ``y`` (the - coords in display space, eg pixels from left, bottom) and xdata, - ydata (the coords in data space). Additionally, you can get - information about which buttons were pressed, which keys were - pressed, which :class:`~matplotlib.axes.Axes` the mouse is over, - etc. See :class:`matplotlib.backend_bases.MouseEvent` for - details. - - ``artist`` - the :class:`~matplotlib.artist.Artist` that generated the pick - event. - -Additionally, certain artists like :class:`~matplotlib.lines.Line2D` -and :class:`~matplotlib.collections.PatchCollection` may attach -additional meta data like the indices into the data that meet the -picker criteria (eg all the points in the line that are within the -specified epsilon tolerance) - -Simple picking example ----------------------- - -In the example below, we set the line picker property to a scalar, so -it represents a tolerance in points (72 points per inch). The onpick -callback function will be called when the pick event it within the -tolerance distance from the line, and has the indices of the data -vertices that are within the pick distance tolerance. Our onpick -callback function simply prints the data that are under the pick -location. Different matplotlib Artists can attach different data to -the PickEvent. For example, ``Line2D`` attaches the ind property, -which are the indices into the line data under the pick point. See -:meth:`~matplotlib.lines.Line2D.pick` for details on the ``PickEvent`` -properties of the line. Here is the code:: - - import numpy as np - import matplotlib.pyplot as plt - - fig = plt.figure() - ax = fig.add_subplot(111) - ax.set_title('click on points') - - line, = ax.plot(np.random.rand(100), 'o', picker=5) # 5 points tolerance - - def onpick(event): - thisline = event.artist - xdata = thisline.get_xdata() - ydata = thisline.get_ydata() - ind = event.ind - print 'onpick points:', zip(xdata[ind], ydata[ind]) - - fig.canvas.mpl_connect('pick_event', onpick) - - plt.show() - - -Picking exercise ----------------- - -Create a data set of 100 arrays of 1000 Gaussian random numbers and -compute the sample mean and standard deviation of each of them (hint: -numpy arrays have a mean and std method) and make a xy marker plot of -the 100 means vs the 100 standard deviations. Connect the line -created by the plot command to the pick event, and plot the original -time series of the data that generated the clicked on points. If more -than one point is within the tolerance of the clicked on point, you -can use multiple subplots to plot the multiple time series. - -Exercise solution:: - - """ - compute the mean and stddev of 100 data sets and plot mean vs stddev. - When you click on one of the mu, sigma points, plot the raw data from - the dataset that generated the mean and stddev - """ - import numpy as np - import matplotlib.pyplot as plt - - X = np.random.rand(100, 1000) - xs = np.mean(X, axis=1) - ys = np.std(X, axis=1) - - fig = plt.figure() - ax = fig.add_subplot(111) - ax.set_title('click on point to plot time series') - line, = ax.plot(xs, ys, 'o', picker=5) # 5 points tolerance - - - def onpick(event): - - if event.artist!=line: return True - - N = len(event.ind) - if not N: return True - - - figi = plt.figure() - for subplotnum, dataind in enumerate(event.ind): - ax = figi.add_subplot(N,1,subplotnum+1) - ax.plot(X[dataind]) - ax.text(0.05, 0.9, 'mu=%1.3f\nsigma=%1.3f'%(xs[dataind], ys[dataind]), - transform=ax.transAxes, va='top') - ax.set_ylim(-0.5, 1.5) - figi.show() - return True - - fig.canvas.mpl_connect('pick_event', onpick) - - plt.show() diff --git a/dev/_sources/users/github_stats.txt b/dev/_sources/users/github_stats.txt deleted file mode 100644 index b6b4384a018..00000000000 --- a/dev/_sources/users/github_stats.txt +++ /dev/null @@ -1,1335 +0,0 @@ - -.. _github-stats: - -Github stats -============ - -GitHub stats for 2012/06/30 - 2013/03/26 (tag: v1.1.1) - -These lists are automatically generated, and may be incomplete or contain duplicates. - -The following 90 authors contributed 1618 commits. - -* Aaron Boushley -* Adam Ginsburg -* Ahmet Bakan -* Amy -* Andreas Hilboll -* Andrew Dawson -* Arnaud Gardelein -* Ben Gamari -* Ben Root -* Bradley M. Froehle -* Brett Graham -* Bussonnier Matthias -* C. Gohlke -* Carl Michal -* Chris Beaumont -* Christoph Dann -* Christoph Gohlke -* Corey Farwell -* Craig M -* Craig Tenney -* Damon McDougall -* Daniel Hyams -* Darren Dale -* David Huard -* Eric Firing -* Ezra Peisach -* Francesco Montesano -* Gellule Xg -* Graham Poulter -* Hubert Holin -* Ian Thomas -* Ignas Anikevicius (gns_ank) -* Jack (aka Daniel) Kelly -* Jack Kelly -* Jae-Joon Lee -* James R. Evans -* Jan-Philip Gehrcke -* Jason Grout -* Jens H. Nielsen -* Jens Hedegaard Nielsen -* Joe Kington -* John Hunter -* Jonathan Waltman -* Jouni K. Seppänen -* Lance Hepler -* Marc Abramowitz -* Martin Spacek -* Matt Giuca -* Matthew Emmett -* Matthias BUSSONNIER -* Michael Droettboom -* Michiel de Hoon -* Mike Kaufman -* Neil -* Nelle Varoquaux -* Nic Eggert -* Nick Semenkovich -* Nikolay Vyahhi -* Paul Ivanov -* Pauli Virtanen -* Peter Würtz -* Phil Elson -* Piti Ongmongkolkul -* Robert Johansson -* Russell Owen -* Ryan Dale -* Ryan May -* Sandro Tosi -* Sebastian Pinnau -* Simon Cross -* Stefan van der Walt -* Takafumi Arakaki -* Thomas A Caswell -* Thomas Kluyver -* Thomas Robitaille -* Till Stensitzki -* Tobias Hoppe -* Tobias Megies -* Tony S Yu -* Zach Pincus -* bblay -* bev-a-tron -* drevicko -* endolith -* goir -* mcelrath -* pelson -* pwuertz -* torfbolt -* vbr - - -We closed a total of 1222 issues, 435 pull requests and 787 regular issues; -this is the full list (generated with the script -:file:`tools/github_stats.py`): - -Pull Requests (435): - -* :ghpull:`1796`: axes.grid lines using lines.marker settings? -* :ghpull:`1846`: Fix the clippath renderering so that it uses no-clip unsigned chars -* :ghpull:`1853`: fill_betweenx signature fixed -* :ghpull:`1854`: BF - prevent a TypeError for lists of vertices -* :ghpull:`1843`: test_backend_pgf: TypeError -* :ghpull:`1848`: add flushing of stdout to update on key event -* :ghpull:`1802`: Step linestyle -* :ghpull:`1127`: Change spectral to nipy_spectral, update docs, leave aliases -* :ghpull:`1804`: MEP10 - documentation improvements on set_xlabel and text of axes.py -* :ghpull:`1764`: Make loc come after fontdict in set_title. Closes #1759 -* :ghpull:`1825`: Work around missing subprocess members on Google App Engine -* :ghpull:`1826`: backend_ps: Do not write to a temporary file unless using an external distiller -* :ghpull:`1827`: MEP10 - documentation improvements on many common plots: scatter plots, ... -* :ghpull:`1834`: finance: Fixed making directories for explicit cachename -* :ghpull:`1832`: BF - correct return type for Axes.get_title -* :ghpull:`1803`: Markers module: PEP8 fixes and MEP10 documentation fixes -* :ghpull:`1795`: MEP10 - refactored hlines and vlines documentation -* :ghpull:`1822`: Improved triinterp_demo pylab example -* :ghpull:`1811`: MultiCursor with additionnal optionnal horizontal bar -* :ghpull:`1817`: Improved test_triinterp_colinear -* :ghpull:`1799`: Corrupt/invalid PDF and EPS files when saving a logscaled plot made with negative values -* :ghpull:`1800`: Agg snapping fixes (for the last time...?) :) -* :ghpull:`1786`: Cubic interpolation for triangular grids -* :ghpull:`1808`: DOC: typo, break lines >80 char, add link to cmaps list -* :ghpull:`1801`: Add .directory files to .gitignore -* :ghpull:`1724`: Re-write stacked step histogram -* :ghpull:`1790`: Fixes problem raised in #1431 (```get_transform``` should not affect ```is_transform_set```) -* :ghpull:`1779`: Bug in postscript backend in Python 3 -* :ghpull:`1797`: PEP8 on colors module -* :ghpull:`1291`: Fix image comparison -* :ghpull:`1791`: Symbol not found: _CGAffineTransformIdentity on MacOS 10.6 -* :ghpull:`1794`: Fix for #1792 -* :ghpull:`1454`: Retool the setup.py infrastructure -* :ghpull:`1785`: Fix test_bbox_inches_tight -* :ghpull:`1784`: Attempt to fix Travis "permission denied" error for Python 3 -* :ghpull:`1775`: Issue #1763 -* :ghpull:`1615`: Offset is empty with usetex when offset is equal to 1 -* :ghpull:`1778`: Fix clip_path_to_rect, add convenience method on Path object for it -* :ghpull:`1669`: Add EventCollection and eventplot -* :ghpull:`1725`: Fix compiler warnings -* :ghpull:`1756`: Remove broken printing_in_wx.py example. -* :ghpull:`1762`: Make cbook safe to import while removing duplicate is_string_like; -* :ghpull:`1252`: Properly passing on horiz-/vertOn to Cursor() -* :ghpull:`1686`: Fix lost ticks -* :ghpull:`1640`: Fix bugs in legend positioning with loc='best' -* :ghpull:`1687`: Update lib/matplotlib/backends/backend_cairo.py -* :ghpull:`1760`: Improved the subplot function documentation and fixed the autogeneration from boilerplate. -* :ghpull:`1716`: PEP8 fixes on the figure module -* :ghpull:`1643`: Clean up code in cbook -* :ghpull:`1755`: Update examples/pylab_examples/histogram_demo_extended.py -* :ghpull:`1497`: Fix for empty collection check in axes.add_collection -* :ghpull:`1685`: Add default savefig directory -* :ghpull:`1698`: Fix bug updating WeakKeyDictionary during iteration -* :ghpull:`1743`: slight tweak to the documentation of `errorbar` -* :ghpull:`1748`: Typo in "Annotation" docstring. -* :ghpull:`1750`: Name missmatch in filetypes.rgba and print_rgb of backend_bases.py -* :ghpull:`1722`: Fix sign of infstr in exceltools.rec2exel -* :ghpull:`1726`: stackplot_test_baseline has different results on 32-bit and 64-bit platforms -* :ghpull:`1577`: PEP8 fixes on the line module -* :ghpull:`1728`: Macosx backend: tweak to coordinates position -* :ghpull:`1718`: Fix set dashes for line collections -* :ghpull:`1721`: rcParams.keys() is not Python 3 compatible -* :ghpull:`1699`: Enable to switch off the removal of comments in csv2rec. -* :ghpull:`1710`: Mixing Arial with mathtext on Windows 8 fails -* :ghpull:`1705`: Qt closeevent fixes for v1.2.x -* :ghpull:`1671`: Feature stack base -* :ghpull:`1684`: Fix hist for log=True and histtype='step' -* :ghpull:`1708`: Fix breaking doc build -* :ghpull:`1644`: NF - Left and right side axes titles -* :ghpull:`1666`: Fix USE_FONTCONFIG=True mode -* :ghpull:`1691`: Fix svg flipping (again) -* :ghpull:`1695`: Alpha kwarg fix -* :ghpull:`1696`: Fixed doc dependency on numpy_ext.numpydoc -* :ghpull:`1665`: MEP10: adding numpydoc and activating autosummary -* :ghpull:`1660`: Explain that matplotlib must be built before the HTML documentation -* :ghpull:`1694`: fixes Issue #1693 -* :ghpull:`1682`: Fixed the expected output from test_arrow_patches.test_fancyarrow. -* :ghpull:`1663`: Fix suptitle -* :ghpull:`1675`: fix "alpha" kwarg in errorbar plot -* :ghpull:`1678`: added QtGui.QMainWindow.closeEvent() to make sure the close event -* :ghpull:`1674`: Fix SVG flip when svg.image_noscale is True -* :ghpull:`1680`: Ignore lib/dateutil -* :ghpull:`1626`: Add framealpha argument for legend -* :ghpull:`1642`: remove `import new` from cbook.py -* :ghpull:`1534`: Make `rc_context` available via pyplot interface -* :ghpull:`1672`: Nuke Travis python 3.1 testing -* :ghpull:`1670`: Deprecate mpl -* :ghpull:`1635`: Recompute Wedge path after change of attributes. -* :ghpull:`1498`: use QMainWindow.closeEvent for close events -* :ghpull:`1617`: Legend: Also calc the bbox of the legend when the frame is not drawn. (1.2.x) -* :ghpull:`1585`: Fix Qt canvas resize_event -* :ghpull:`1611`: change handling of legend labels which are None -* :ghpull:`1657`: Add EventCollection and eventplot -* :ghpull:`1641`: PEP8 fixes on the rcsetup module -* :ghpull:`1650`: _png.read_png crashes on Python 3 with urllib.request object -* :ghpull:`1568`: removed deprecated methods from the axes module. -* :ghpull:`1589`: Fix shifted ylabels (Issue #1571) -* :ghpull:`1634`: add scatterpoints to rcParam -* :ghpull:`1654`: added explicit 'zorder' kwarg to `Colection` and `LineCollection`. -* :ghpull:`1653`: Fix #570 - Reversing a 3d axis should now work properly. -* :ghpull:`1651`: WebAgg: pylab compatibility -* :ghpull:`1505`: Issue 1504: changed how `draw` handles alpha in `markerfacecolor` -* :ghpull:`1655`: add get_segments method to collections.LineCollection -* :ghpull:`1652`: Ignore kdevelop4 project files -* :ghpull:`1613`: Using a stricter check to see if Python was installed as a framework. -* :ghpull:`1599`: Ada Lovelace and Grace Murray Hopper images in place of Lena -* :ghpull:`1582`: Linear tri interpolator -* :ghpull:`1637`: change cbook to relative import -* :ghpull:`1618`: Mplot3d/crashfixes -* :ghpull:`1636`: hexbin log scale is broken in matplotlib 1.2.0 -* :ghpull:`1624`: implemented inverse transform for Mollweide axes -* :ghpull:`1630`: A disconnected callback cannot be reconnected -* :ghpull:`1139`: Make Axes.stem take at least one argument. -* :ghpull:`1426`: WebAgg backend -* :ghpull:`1606`: Document the C/C++ code guidelines -* :ghpull:`1628`: Fix errorbar zorder v1.2 -* :ghpull:`1620`: Fix bug in _AnnotationBase -* :ghpull:`1587`: Mac OS X 10.5 needs an autoreleasepool here to avoid memory leaks. Newer... -* :ghpull:`1597`: new MatplotlibDeprecationWarning class (against master) -* :ghpull:`1596`: new MatplotlibDeprecationWarning class (against 1.2.x) -* :ghpull:`1532`: CXX/Python2/cxx_extensions.cxx:1320: Assertion `ob_refcnt == 0' -* :ghpull:`1604`: Make font_manager ignore KeyErrors for bad fonts -* :ghpull:`1605`: Change printed -> pretty-printed -* :ghpull:`1557`: inverting an axis shouldn't affect the autoscaling setting -* :ghpull:`1603`: ylim=0.0 is not well handled in polar plots -* :ghpull:`1583`: Crash with text.usetex=True and plt.annotate -* :ghpull:`1602`: Fixed typos in docs (squashed version of #1600) -* :ghpull:`1592`: Fix a syntax error in examples (movie_demo.py) -* :ghpull:`1590`: Positional argument specifiers are required by Python 2.6 -* :ghpull:`1579`: Updated custom_projection_example.py to work with v1.2 and newer -* :ghpull:`1578`: Fixed blitting in Gtk3Agg backend -* :ghpull:`1573`: fix issue #1572 caused by PR #1081 -* :ghpull:`1562`: Mac OS X Backend: Removing clip that is no longer needed -* :ghpull:`1574`: Improvements to Sankey class -* :ghpull:`1536`: ENH: add AVConv movie writer for animations -* :ghpull:`1570`: PEP8 fixes on the tests of the dates module -* :ghpull:`1569`: FIX Removes code that does work from the axes module -* :ghpull:`1531`: fix rendering slowdown with big invisible lines (issue #1256) -* :ghpull:`1398`: PEP8 fixes on dates.py -* :ghpull:`1564`: PEP8-compliance on axes.py (patch 4 / 4) -* :ghpull:`1559`: Workaround for QT cursor bug in dock areas -* :ghpull:`1560`: Remove python2.5 support from texmanager.py -* :ghpull:`1555`: Geo projections getting clobbered by 2to3 when used when python3 -* :ghpull:`1477`: alternate fix for issue #997 -* :ghpull:`1522`: PEP8-compliance on axes.py (patch 3 / 4) -* :ghpull:`1550`: PEP8 fixes on the module texmanager -* :ghpull:`1289`: Autoscaling and limits in mplot3d. -* :ghpull:`1551`: PEP8 fixes on the spines module -* :ghpull:`1537`: Fix savefig.extension == "auto" -* :ghpull:`1297`: pyplot.plotfile. gridon option added with default from rcParam. -* :ghpull:`1538`: Remove unnecessary clip from Cairo backend; squashed commit -* :ghpull:`1544`: str.format() doesn't work on python 2.6 -* :ghpull:`1549`: Add citation page to website -* :ghpull:`1514`: Fix streamplot when color argument has NaNs -* :ghpull:`1081`: Propagate mpl.text.Text instances to the backends and fix documentation -* :ghpull:`1533`: ENH: raise a more informative error -* :ghpull:`1540`: Changed mailinglist archive link. -* :ghpull:`1493`: check `ret == False` in Timer._on_timer -* :ghpull:`1523`: DOC: github ribbon does not cover up index link -* :ghpull:`1515`: set_cmap should not require an active image -* :ghpull:`1489`: Documentation update for specgram -* :ghpull:`1527`: fix 2 html color names -* :ghpull:`1524`: Make README.txt consistent reStructuredText -* :ghpull:`1525`: pgf: documentation enhancements -* :ghpull:`1510`: pgf: documentation enhancements -* :ghpull:`1512`: Reorganize the developer docs -* :ghpull:`1518`: PEP8 compliance on the delaunay module -* :ghpull:`1357`: PEP8 fixes on text.py -* :ghpull:`1469`: PEP8-compliance on axes.py (patch 2 / 4) -* :ghpull:`1470`: Add ``test`` and ``test-coverage`` to Makefile -* :ghpull:`1442`: Add savefig_kwargs to Animation.save() method -* :ghpull:`1503`: DOC: 'inout' option for tick_params direction -* :ghpull:`1494`: Added sphinx documentation for Triangulation -* :ghpull:`1480`: Remove dead code in patches -* :ghpull:`1496`: Correct scatter docstring -* :ghpull:`1472`: FIX extra comma in Sankey.add -* :ghpull:`1471`: Improved checking logic of _check_xyz in contour.py -* :ghpull:`1491`: Reintroduce examples.directory rc parameter -* :ghpull:`1405`: Add angle kwarg to patches.Rectangle -* :ghpull:`1278`: Make arrow docstring mention data transform -* :ghpull:`1355`: Add sym-log normalization. -* :ghpull:`1474`: use an imagemap for the "fork me on github" ribbon -* :ghpull:`1485`: Fix leak of gc's in gtkagg backend -* :ghpull:`1374`: PEP8 fixes on widgets.py -* :ghpull:`1379`: PEP8 fixes on quiver.py -* :ghpull:`1399`: PEP8 fixes on patches -* :ghpull:`1395`: PEP8 fixes on contour.py -* :ghpull:`1464`: PEP8-compliance on axes.py (patch 1 / 4) -* :ghpull:`1400`: PEP8 fixes on offsetbox.py -* :ghpull:`1463`: Document the Gtk3 backends -* :ghpull:`1397`: PEP8 fixes on sankey.py -* :ghpull:`1396`: PEP8 fixes on colors -* :ghpull:`1394`: PEP8 fixes on _cm.py -* :ghpull:`1456`: pgf: documentation fixes -* :ghpull:`1450`: Colorbar edges are different in PDF backend -* :ghpull:`1453`: Remove John Hunter's email from mpl docstring -* :ghpull:`1437`: agg_buffer_to_array.py crashes -* :ghpull:`1445`: JRE - Modified 'use' so that it will only warn if the requested backend ... -* :ghpull:`1439`: Remove all mention of make.osx in README.osx -* :ghpull:`1434`: C++11 narrowing conversions -* :ghpull:`1449`: removed setup.py print statement. -* :ghpull:`1420`: Join bbox_extra_artists and bbox_inches -* :ghpull:`1444`: Colorbar edges are different in PDF backend -* :ghpull:`1436`: Exception message improvement. -* :ghpull:`1431`: Fixed transform=None behaviour on Artists. -* :ghpull:`1430`: Add trove classifiers to setup.py -* :ghpull:`1427`: Fix AttrituteError for .lower on tuple of strings -* :ghpull:`1425`: Rebase of #1418 on v1.2.x -* :ghpull:`1411`: Fix transparent markers in PDF backend. Closes #1410 -* :ghpull:`1416`: backend_pdf: optional rgbFace arg in fillp replaces code in draw_markers. Closes #1410 -* :ghpull:`1414`: Fix scilimits docstring in ticklabel_format -* :ghpull:`1314`: Range bug fix for pcolor and pcolormesh -* :ghpull:`1323`: Work around a huge memory leak in PySide on Python 3 -* :ghpull:`1409`: Make table.py use BBox.union over bbox_all -* :ghpull:`1387`: Make setupegg symlink correct dateutil library -* :ghpull:`1404`: PySide segfaults immediately on Linux -* :ghpull:`1406`: Fix bug when stacking histograms with non-integer weights (v1.2.x branch) -* :ghpull:`1403`: Improve "Report a problem" to "Getting help" -* :ghpull:`1380`: Fix svg writer for StringIO objects -* :ghpull:`1388`: Deprecate original NavigationToolbar -* :ghpull:`1389`: Remove unused autolayout_validator() from rcsetup -* :ghpull:`1390`: Fix bad commandline handling -* :ghpull:`1229`: NF - option to make colorbar extensions rectangles -* :ghpull:`1375`: PEP8 fixes on textpath.py -* :ghpull:`1392`: Fix by Yannick Copin for hist autoscaling bug; closes issue #841 -* :ghpull:`1376`: PEP8 fixes on table.py -* :ghpull:`1384`: PEP8 fixes on hatch.py -* :ghpull:`1382`: PEP8 fixes on container.py -* :ghpull:`1378`: PEP8 fixes on stackplot.py -* :ghpull:`1358`: PEP8 fixes on ticker.py -* :ghpull:`1377`: PEP8 fixes on streamplot.py -* :ghpull:`1352`: PEP8 fixes on legend.py -* :ghpull:`1348`: PEP8 fixes on scale.py -* :ghpull:`1367`: Fix typo in transforms.py -* :ghpull:`1345`: PEP8 fixes on backend_bases.py -* :ghpull:`1365`: FIX - travis-ci is failing -* :ghpull:`1351`: PEP8 fixes on transforms.py -* :ghpull:`1349`: PEP8 fixes on type1font.py -* :ghpull:`1360`: PEP8 fixes on tight_layout.py -* :ghpull:`1359`: PEP8 fixes on tight_bbox.py -* :ghpull:`1362`: fixed lognorm clip behavior -* :ghpull:`1350`: PEP8 fixes on units.py -* :ghpull:`1353`: docstring: direct pcolor users to pcolormesh; fix pcolorfast docstring -* :ghpull:`1333`: PEP8 fixes on collections.py -* :ghpull:`1336`: PEP8 fixes to colorbar.py -* :ghpull:`1347`: Remove nonfunctioning cbook.isvector -* :ghpull:`1327`: plt.subplots: Set the visibility of the offset text to false on the shared axes. -* :ghpull:`1335`: PEP8 fixes on cbook.py -* :ghpull:`1334`: PEP8 fixes on blocking_input.py -* :ghpull:`1332`: PEP8 fixes on cm.py -* :ghpull:`1322`: Update Mac build process. Fixes #751 -* :ghpull:`1337`: ENH: allow animations to be saved as animated GIFs -* :ghpull:`1340`: fix drawing error of fancyarrow of simple style (v1.2.x) -* :ghpull:`1330`: Tiny (but serious) bugfixes in image.py -* :ghpull:`1298`: Update trisurf to support custom triangulations -* :ghpull:`1286`: backend_pgf: improve handling of temporary directories -* :ghpull:`1316`: very high negative zorder breaks vector graphic rendering -* :ghpull:`1283`: Fix tripcolor with shading='faceted' -* :ghpull:`1320`: Cursor widget now uses widgetlock; closes Issue #156 -* :ghpull:`1315`: Add documentation of colorbar issue #1188 to colorbar documentation. -* :ghpull:`1307`: Marker not round with markersize=3 -* :ghpull:`1285`: Hide Tk root window until later -* :ghpull:`1305`: Fix pointer syntax error -* :ghpull:`1294`: Update lib/mpl_toolkits/mplot3d/axes3d.py -* :ghpull:`1300`: Pcolormesh and colorbar documentation. -* :ghpull:`1296`: Make Container._remove_method call correctly -* :ghpull:`1293`: Fixed to contour to support the _as_mpl_transform api. -* :ghpull:`1284`: Fix Image Tutorial: plt.imshow instead of mpimg.imshow. -* :ghpull:`1282`: Use file open modes required by csv module -* :ghpull:`1247`: Log axvline -* :ghpull:`1265`: Fixed pre-transform limit calculation bug for contour sets. -* :ghpull:`1275`: backend_pgf: Custom dashstyles and inconcistency with other backends -* :ghpull:`1272`: Fix Objective-C 2.0 error with gcc-4.0 -* :ghpull:`1277`: Fixed bug in MaxNLocator.bin_boundaries -* :ghpull:`1273`: Handled baseline image folder identification for non matplotlib projects... -* :ghpull:`1230`: Fix dpi issue for bitmaps on the OS X backend -* :ghpull:`1251`: backend_pgf. Enable custom dashstyles in the pgf backend -* :ghpull:`1264`: Re-added the matplotlib.dates import on axes -* :ghpull:`1271`: Set axis limits in test_stackplot -* :ghpull:`1269`: Fix typo in docstring -* :ghpull:`1260`: Fix BoundaryNorm interpolation with numpy 1.7rc. -* :ghpull:`1261`: Update six.py to version 1.2 -* :ghpull:`1255`: Fix test_pickle test. -* :ghpull:`1152`: checkable pan/zoom buttons for QT NavigationToolbar -* :ghpull:`1243`: Broken doc links -* :ghpull:`1242`: Doc tidy up. -* :ghpull:`1224`: Imsave alpha -* :ghpull:`1241`: backend_pgf: fix parsing of CR+LF newlines -* :ghpull:`1233`: Fix mri_demo.py fails with mpl 1.2.0rc1 -* :ghpull:`1239`: Fix matplotlib.testing.util.MiniExpect.expect hangs on Windows -* :ghpull:`1240`: backend_pgf: fix parsing of CR+LF newlines -* :ghpull:`1236`: Fix poly_editor.py on Python 3 -* :ghpull:`1232`: Enable dynamic updating for the OS X backend -* :ghpull:`1234`: Fix 2to3 and packaging of dateutil -* :ghpull:`1217`: PEP8 fixes on the axis module -* :ghpull:`1176`: Reverted a previous change to artist transform setting. Fixes legend bug. -* :ghpull:`1231`: fix Typesetting in plot() docstring -* :ghpull:`1215`: PEP8 on lib/matplotlib.afm.py -* :ghpull:`1216`: PEP8 fixes on the animation module -* :ghpull:`1208`: FAIL: matplotlib.tests.test_text.test_contains.test -* :ghpull:`1209`: Pass linewidth to Mac context properly -* :ghpull:`847`: Add stacked kwarg to hist and implement stacked hists for step histtype -* :ghpull:`1228`: backend_pgf: pep8 edits -* :ghpull:`1226`: Add dpi kwarg to PIL image.save method for TIFF file. -* :ghpull:`1222`: Don't try to order the contours of TrueType fonts -* :ghpull:`1166`: PEP8 compliance on colors.py -* :ghpull:`1225`: Added deprecation notices for Qt3-based backends. -* :ghpull:`1190`: Update documentation regarding lines.color -* :ghpull:`1202`: refactored grid_spec.tight_layout and fixed #1055 -* :ghpull:`1221`: revert PR #1125 and #1201 -* :ghpull:`1220`: Figure.show: clarify docstring and error message -* :ghpull:`1167`: PEP8 lib/matplotlib/patches.py -* :ghpull:`1168`: PEP8 compliance on artist.py -* :ghpull:`1213`: Include username in tempdir -* :ghpull:`1182`: Bezier pep8 -* :ghpull:`1206`: README and links fixes -* :ghpull:`1192`: Issue835 2: replacement for #835 -* :ghpull:`1187`: Add a *simple* arrow example -* :ghpull:`1120`: FAIL: matplotlib.tests.test_transforms.test_pre_transform_plotting.test on Python 3.x -* :ghpull:`714`: Initial rework of gen_gallery.py -* :ghpull:`1150`: the affine matrix is calculated in the display coordinate for interpolation='none' -* :ghpull:`1145`: Fix formatter reset when twin{x,y}() is called -* :ghpull:`1201`: Fix typo in object-oriented API -* :ghpull:`1061`: Add log option to Axes.hist2d -* :ghpull:`1125`: Reduce object-oriented boilerplate for users -* :ghpull:`1195`: Fixed pickle tests to use the BufferIO object for python3 support. -* :ghpull:`1198`: Fixed python2.6 support (by removing use of viewvalues on a dict). -* :ghpull:`1197`: Handled future division changes for python3 (fixes #1194). -* :ghpull:`1162`: FIX nose.tools.assert_is is only supported with python2.7 -* :ghpull:`803`: Return arrow collection as 2nd argument of streamplot. -* :ghpull:`1189`: BUG: Fix streamplot when velocity component is exactly zero. -* :ghpull:`1191`: Small bugfixes to the new pickle support. -* :ghpull:`1146`: Fix invalid transformation in InvertedSymmetricalLogTransform. -* :ghpull:`1169`: Subplot.twin[xy] returns a Subplot instance -* :ghpull:`1183`: FIX undefined elements were used at several places in the mlab module -* :ghpull:`498`: get_sample_data still broken on v.1.1.x -* :ghpull:`1170`: Uses tight_layout.get_subplotspec_list to check if all axes are compatible w/ tight_layout -* :ghpull:`1174`: closes #1173 - backporting python2.7 subprocess's check_output to be abl... -* :ghpull:`1175`: Pickling support added. Various whitespace fixes as a result of reading *lots* of code. -* :ghpull:`1098`: suppress exception upon quitting with qt4agg on osx -* :ghpull:`1171`: backend_pgf: handle OSError when testing for xelatex/pdflatex -* :ghpull:`1164`: doc: note contourf hatching in whats_new.rst -* :ghpull:`1153`: PEP8 on artist -* :ghpull:`1163`: tight_layout: fix regression for figures with non SubplotBase Axes -* :ghpull:`1159`: FIX assert_raises cannot be called with ``with\\ -* :ghpull:`1160`: backend_pgf: clarifications and fixes in documentation -* :ghpull:`1154`: six inclusion for dateutil on py3 doesn't work -* :ghpull:`1149`: Add Phil Elson's percentage histogram example -* :ghpull:`1158`: FIX - typo in lib/matplotlib/testing/compare.py -* :ghpull:`1155`: workaround for fixed dpi assumption in adjust_bbox_pdf -* :ghpull:`1142`: What's New: Python 3 paragraph -* :ghpull:`1130`: Fix writing pdf on stdout -* :ghpull:`832`: MPLCONFIGDIR tries to be created in read-only home -* :ghpull:`1140`: BUG: Fix fill_between when NaN values are present -* :ghpull:`1144`: Added tripcolor whats_new section. -* :ghpull:`1010`: Port part of errorfill from Tony Yu's mpltools. -* :ghpull:`1141`: backend_pgf: fix parentheses typo -* :ghpull:`1114`: Make grid accept alpha rcParam -* :ghpull:`1124`: PGF backend, fix #1116, #1118 and #1128 -* :ghpull:`983`: Issues with dateutil and pytz -* :ghpull:`1133`: figure.py: import warnings, and make imports absolute -* :ghpull:`1132`: clean out obsolete matplotlibrc-related bits to close #1123 -* :ghpull:`1131`: Cleanup after the gca test. -* :ghpull:`563`: sankey.add() has mutable defaults -* :ghpull:`731`: Plot limit with transform -* :ghpull:`1107`: Added %s support for labels. -* :ghpull:`774`: Allow automatic use of tight_layout. -* :ghpull:`1122`: DOC: Add streamplot description to What's New page -* :ghpull:`1111`: Fixed transoffset example from failing. -* :ghpull:`840`: Documentation Errors for specgram -* :ghpull:`1088`: For a text artist, if it has a _bbox_patch associated with it, the contains test should reflect this. -* :ghpull:`986`: Add texinfo build target in doc/make.py -* :ghpull:`1076`: PGF backend for XeLaTeX/LuaLaTeX support -* :ghpull:`1090`: External transform api -* :ghpull:`1108`: Fix documentation warnings -* :ghpull:`861`: Add rcfile function (which loads rc params from a given file). -* :ghpull:`1062`: increased the padding on FileMovieWritter.frame_format_str -* :ghpull:`1100`: Doc multi version master -* :ghpull:`1105`: Fixed comma between tests. -* :ghpull:`1095`: Colormap byteorder bug -* :ghpull:`1103`: colorbar: correct error introduced in commit 089024; closes #1102 -* :ghpull:`1067`: Support multi-version documentation on the website -* :ghpull:`1031`: Added 'capthick' kwarg to errorbar() -* :ghpull:`1074`: Added broadcasting support in some mplot3d methods -* :ghpull:`1064`: Locator interface -* :ghpull:`850`: Added tripcolor triangle-centred colour values. -* :ghpull:`1093`: Exposed the callback id for the default key press handler so that it can be easily disabled. Fixes #215. -* :ghpull:`1065`: fixed conversion from pt to inch in tight_layout -* :ghpull:`1082`: doc: in pcolormesh docstring, say what it does. -* :ghpull:`1078`: doc: note that IDLE doesn't work with interactive mode. -* :ghpull:`1071`: patches.polygon: fix bug in handling of path closing, #1018. -* :ghpull:`1057`: Contour norm scaling -* :ghpull:`1056`: Test framework cleanups -* :ghpull:`778`: Make tests faster -* :ghpull:`1024`: broken links in the gallery -* :ghpull:`1054`: stix_fonts_demo.py fails with bad refcount -* :ghpull:`960`: Fixed logformatting for non integer bases. -* :ghpull:`897`: GUI icon in Tkinter -* :ghpull:`1053`: Move Python 3 import of reload() to the module that uses it -* :ghpull:`1049`: Update examples/user_interfaces/embedding_in_wx2.py -* :ghpull:`1050`: Update examples/user_interfaces/embedding_in_wx4.py -* :ghpull:`1051`: Update examples/user_interfaces/mathtext_wx.py -* :ghpull:`1052`: Update examples/user_interfaces/wxcursor_demo.py -* :ghpull:`1047`: Enable building on Python 3.3 for Windows -* :ghpull:`1036`: Move all figures to the front with a non-interactive show() in macosx backend. -* :ghpull:`1042`: Three more plot_directive configuration options -* :ghpull:`1022`: contour: map extended ranges to "under" and "over" values -* :ghpull:`1007`: modifying GTK3 example to use pygobject, and adding a simple example to demonstrate NavigationToolbar in GTK3 -* :ghpull:`1004`: Added savefig.bbox option to matplotlibrc -* :ghpull:`976`: Fix embedding_in_qt4_wtoolbar.py on Python 3 -* :ghpull:`1034`: MdH = allow compilation on recent Mac OS X without compiler warnings -* :ghpull:`1028`: Fix use() so that it is possible to reset the rcParam. -* :ghpull:`1033`: Py3k: reload->imp.reload -* :ghpull:`1002`: Fixed potential overflow exception in the lines.contains() method -* :ghpull:`1025`: Timers -* :ghpull:`989`: Animation subprocess bug -* :ghpull:`898`: Added warnings for easily confusable subplot/subplots invocations -* :ghpull:`963`: Add detection of file extension for file-like objects -* :ghpull:`973`: Fix sankey.py pep8 and py3 compatibility -* :ghpull:`972`: Force closing PIL image files -* :ghpull:`981`: Fix pathpatch3d_demo.py on Python 3 -* :ghpull:`980`: Fix basic_units.py on Python 3. PEP8 and PyLint cleanup. -* :ghpull:`1014`: qt4: remove duplicate file save button; and remove trailing whitespace -* :ghpull:`1011`: fix for bug #996 and related issues -* :ghpull:`985`: support current and future FreeBSD releases -* :ghpull:`1000`: Fix traceback for vlines/hlines, when an empty list or array passed in for x/y. -* :ghpull:`994`: Fix bug in pcolorfast introduced by #901 -* :ghpull:`993`: Fix typo -* :ghpull:`908`: use Qt window title as default savefig filename -* :ghpull:`971`: Close fd temp file following rec2csv_bad_shape test -* :ghpull:`851`: Simple GUI interface enhancements -* :ghpull:`979`: Fix test_mouseclicks.py on Python 3 -* :ghpull:`977`: Fix lasso_selector_demo.py on Python 3 -* :ghpull:`970`: Fix tiff and jpeg export via PIL -* :ghpull:`961`: Issue 807 auto minor locator - -Issues (787): - -* :ghissue:`1839`: matplotlib 1.2.0 doesn't compile with Solaris Studio 12.3 CC -* :ghissue:`1796`: axes.grid lines using lines.marker settings? -* :ghissue:`1846`: Fix the clippath renderering so that it uses no-clip unsigned chars -* :ghissue:`1844`: 1.2.0 regression: custom scale not working -* :ghissue:`1768`: Build fails on travisCI -* :ghissue:`1851`: Fix for the custom scale example -* :ghissue:`1853`: fill_betweenx signature fixed -* :ghissue:`1854`: BF - prevent a TypeError for lists of vertices -* :ghissue:`1840`: BF - prevent a TypeError for lists of vertices in set_marker -* :ghissue:`1842`: test_backend_pgf errors -* :ghissue:`1850`: fill_betweenx signature fixed -* :ghissue:`1843`: test_backend_pgf: TypeError -* :ghissue:`1830`: Keyboard shortcuts work when toolbar not displayed -* :ghissue:`1848`: add flushing of stdout to update on key event -* :ghissue:`1802`: Step linestyle -* :ghissue:`879`: Two colormaps named "spectral" -* :ghissue:`1127`: Change spectral to nipy_spectral, update docs, leave aliases -* :ghissue:`1804`: MEP10 - documentation improvements on set_xlabel and text of axes.py -* :ghissue:`1764`: Make loc come after fontdict in set_title. Closes #1759 -* :ghissue:`1759`: Axes3d error on set_title -* :ghissue:`800`: Still another Agg snapping issue. -* :ghissue:`1727`: 'stepfilled' histogram is not filled properly when setting yscale('log') -* :ghissue:`1612`: setupegg is broken on windows -* :ghissue:`1591`: Image being snapped erroneously -* :ghissue:`1845`: Agg clip rendering fix -* :ghissue:`1838`: plot_surface and transposed arrays -* :ghissue:`1825`: Work around missing subprocess members on Google App Engine -* :ghissue:`1826`: backend_ps: Do not write to a temporary file unless using an external distiller -* :ghissue:`1827`: MEP10 - documentation improvements on many common plots: scatter plots, ... -* :ghissue:`1834`: finance: Fixed making directories for explicit cachename -* :ghissue:`1714`: qt4_editor broken: `TransformNode instances can not be copied` -* :ghissue:`1832`: BF - correct return type for Axes.get_title -* :ghissue:`324`: ability to change curves, axes, labels attributes via UI -* :ghissue:`1803`: Markers module: PEP8 fixes and MEP10 documentation fixes -* :ghissue:`1795`: MEP10 - refactored hlines and vlines documentation -* :ghissue:`1819`: Option for disregarding matplotlibrc, for reproducible batch production of plots -* :ghissue:`1822`: Improved triinterp_demo pylab example -* :ghissue:`1820`: griddata: Allow for easy switching between interpolation mechanisms -* :ghissue:`1811`: MultiCursor with additionnal optionnal horizontal bar -* :ghissue:`1817`: Improved test_triinterp_colinear -* :ghissue:`1799`: Corrupt/invalid PDF and EPS files when saving a logscaled plot made with negative values -* :ghissue:`1800`: Agg snapping fixes (for the last time...?) :) -* :ghissue:`1521`: Triangular grid interpolation and refinement -* :ghissue:`1786`: Cubic interpolation for triangular grids -* :ghissue:`1808`: DOC: typo, break lines >80 char, add link to cmaps list -* :ghissue:`1798`: MEP10 - documentation improvements on set_xlabel and text of axes.py -* :ghissue:`1801`: Add .directory files to .gitignore -* :ghissue:`1765`: Unable to Generate Docs -* :ghissue:`1744`: bottom keyword doesn't work for non-stacked histograms -* :ghissue:`1679`: matplotlib-1.2.0: regression in histogram with barstacked drawing? -* :ghissue:`1724`: Re-write stacked step histogram -* :ghissue:`1790`: Fixes problem raised in #1431 (```get_transform``` should not affect ```is_transform_set```) -* :ghissue:`1779`: Bug in postscript backend in Python 3 -* :ghissue:`1797`: PEP8 on colors module -* :ghissue:`1291`: Fix image comparison -* :ghissue:`1788`: Lower minimum pyparsing version to 1.5.2 -* :ghissue:`1789`: imshow() subplots with shared axes generate unwanted white spaces -* :ghissue:`1793`: font_manager unittest errors -* :ghissue:`1791`: Symbol not found: _CGAffineTransformIdentity on MacOS 10.6 -* :ghissue:`1772`: Python 3.3 build failure -* :ghissue:`1794`: Fix for #1792 -* :ghissue:`1781`: Issues with installing matplotlib on Travis with Python 3 -* :ghissue:`1792`: Matplotlib fails to install pyparsing with Python 2 -* :ghissue:`1454`: Retool the setup.py infrastructure -* :ghissue:`1776`: Documentation style suggestion -* :ghissue:`1785`: Fix test_bbox_inches_tight -* :ghissue:`1784`: Attempt to fix Travis "permission denied" error for Python 3 -* :ghissue:`1775`: Issue #1763 -* :ghissue:`1615`: Offset is empty with usetex when offset is equal to 1 -* :ghissue:`1782`: fix copy-to-clipboard in example -* :ghissue:`1778`: Fix clip_path_to_rect, add convenience method on Path object for it -* :ghissue:`1777`: PyList_SetItem return value bug in clip_path_to_rect (_path.cpp). -* :ghissue:`1773`: emf backend doesn't work with StringIO -* :ghissue:`1669`: Add EventCollection and eventplot -* :ghissue:`1774`: ignore singleton dimensions in ndarrays passed to imshow -* :ghissue:`1619`: Arrow with "simple" style is not robust. Code fix included. -* :ghissue:`1725`: Fix compiler warnings -* :ghissue:`1756`: Remove broken printing_in_wx.py example. -* :ghissue:`1094`: Feature request - make it simpler to use full OO interface -* :ghissue:`1457`: Better object-oriented interface for users -* :ghissue:`1762`: Make cbook safe to import while removing duplicate is_string_like; -* :ghissue:`1019`: Repeated is_string_like function -* :ghissue:`1761`: plot_wireframe does not accept vmin, vmax -* :ghissue:`300`: subplot args desription confusing -* :ghissue:`1252`: Properly passing on horiz-/vertOn to Cursor() -* :ghissue:`1632`: Fix build on Ubuntu 12.10 -* :ghissue:`1686`: Fix lost ticks -* :ghissue:`1640`: Fix bugs in legend positioning with loc='best' -* :ghissue:`1687`: Update lib/matplotlib/backends/backend_cairo.py -* :ghissue:`1760`: Improved the subplot function documentation and fixed the autogeneration from boilerplate. -* :ghissue:`1647`: WIP: Deprecation of the cbook module -* :ghissue:`1662`: is_string_like existed both in matplotlib and matplotlib.cbook -* :ghissue:`1716`: PEP8 fixes on the figure module -* :ghissue:`1643`: Clean up code in cbook -* :ghissue:`953`: subplot docstring improvement (re #300) -* :ghissue:`1112`: Bad kwargs to savefig -* :ghissue:`1755`: Update examples/pylab_examples/histogram_demo_extended.py -* :ghissue:`1754`: Fixed a typo in histogram example code -* :ghissue:`1490`: empty scatter messes up the limits -* :ghissue:`1497`: Fix for empty collection check in axes.add_collection -* :ghissue:`1685`: Add default savefig directory -* :ghissue:`1698`: Fix bug updating WeakKeyDictionary during iteration -* :ghissue:`1743`: slight tweak to the documentation of `errorbar` -* :ghissue:`1748`: Typo in "Annotation" docstring. -* :ghissue:`1750`: Name missmatch in filetypes.rgba and print_rgb of backend_bases.py -* :ghissue:`1749`: Incompatibility with latest stable Numpy build (v1.7) -* :ghissue:`1722`: Fix sign of infstr in exceltools.rec2exel -* :ghissue:`1126`: Qt4 save dialog not functional on CentOS-5 -* :ghissue:`1740`: alpha is not set correctly when using eps format -* :ghissue:`1741`: pcolormesh memory leak -* :ghissue:`1726`: stackplot_test_baseline has different results on 32-bit and 64-bit platforms -* :ghissue:`1577`: PEP8 fixes on the line module -* :ghissue:`1728`: Macosx backend: tweak to coordinates position -* :ghissue:`1701`: dash setting in LineCollection is broken -* :ghissue:`1704`: Contour does not pass a list of linestyles to LineCollection -* :ghissue:`1718`: Fix set dashes for line collections -* :ghissue:`1721`: rcParams.keys() is not Python 3 compatible -* :ghissue:`1723`: Re-write stacked histogram (fixes bugs) -* :ghissue:`1706`: Fix bugs in stacked histograms -* :ghissue:`1401`: RuntimeError: dictionary changed size during iteration from colors.py, 3.3 but not 3.2 -* :ghissue:`1699`: Enable to switch off the removal of comments in csv2rec. -* :ghissue:`1710`: Mixing Arial with mathtext on Windows 8 fails -* :ghissue:`1683`: Remove figure from Gcf when it is closed -* :ghissue:`1705`: Qt closeevent fixes for v1.2.x -* :ghissue:`1504`: markerfacecolor/markeredgecolor alpha issue -* :ghissue:`1671`: Feature stack base -* :ghissue:`1075`: fix hist limit issue for step* for both linear and log scale -* :ghissue:`1659`: super hacky fix to issue #1310 -* :ghissue:`196`: Axes.hist(...log=True) mishandles y-axis minimum value -* :ghissue:`1029`: Implemented fix to issue 196 on github for log=True and histtype='step' -* :ghissue:`1684`: Fix hist for log=True and histtype='step' -* :ghissue:`1707`: Docs build failure -* :ghissue:`1708`: Fix breaking doc build -* :ghissue:`289`: reproducible research: sys.argv[0] in plot footer -* :ghissue:`1633`: Add rcParam option for number of scatterplot symbols -* :ghissue:`1113`: Bug in ax.arrow() -* :ghissue:`987`: angle/rotate keyword for rectangle -* :ghissue:`775`: TypeError in Axes.get_legend_handles_labels -* :ghissue:`331`: stem function ability to take one argument -* :ghissue:`1644`: NF - Left and right side axes titles -* :ghissue:`1666`: Fix USE_FONTCONFIG=True mode -* :ghissue:`1697`: Fix bug updating WeakKeyDictionary during iteration -* :ghissue:`1691`: Fix svg flipping (again) -* :ghissue:`1695`: Alpha kwarg fix -* :ghissue:`1696`: Fixed doc dependency on numpy_ext.numpydoc -* :ghissue:`1665`: MEP10: adding numpydoc and activating autosummary -* :ghissue:`1660`: Explain that matplotlib must be built before the HTML documentation -* :ghissue:`1693`: saving to *.eps broken on master -* :ghissue:`1694`: fixes Issue #1693 -* :ghissue:`1689`: SVG flip issue -* :ghissue:`1681`: Fancy arrow tests are failing -* :ghissue:`1682`: Fixed the expected output from test_arrow_patches.test_fancyarrow. -* :ghissue:`1262`: Using figure.suptitle puts another suptitle on top of any existing one. -* :ghissue:`1663`: Fix suptitle -* :ghissue:`1675`: fix "alpha" kwarg in errorbar plot -* :ghissue:`1610`: plotting legends none -* :ghissue:`1676`: Qt close events don't cascade properly. -* :ghissue:`1678`: added QtGui.QMainWindow.closeEvent() to make sure the close event -* :ghissue:`1673`: Images saved as SVG get upside down when `svg.image_noscale` is True. -* :ghissue:`1674`: Fix SVG flip when svg.image_noscale is True -* :ghissue:`1680`: Ignore lib/dateutil -* :ghissue:`1677`: add changelog for #1626 -* :ghissue:`1626`: Add framealpha argument for legend -* :ghissue:`1608`: Incorrect ylabel placement in twinx -* :ghissue:`1642`: remove `import new` from cbook.py -* :ghissue:`1534`: Make `rc_context` available via pyplot interface -* :ghissue:`1672`: Nuke Travis python 3.1 testing -* :ghissue:`1535`: Deprecate mpl.py (was Remove mpl.py) -* :ghissue:`1670`: Deprecate mpl -* :ghissue:`1517`: ENH: Add baseline feature to stackplot. -* :ghissue:`1635`: Recompute Wedge path after change of attributes. -* :ghissue:`1488`: Continue propagating resize event up the chain -* :ghissue:`1498`: use QMainWindow.closeEvent for close events -* :ghissue:`1617`: Legend: Also calc the bbox of the legend when the frame is not drawn. (1.2.x) -* :ghissue:`1585`: Fix Qt canvas resize_event -* :ghissue:`1629`: Update x,y.z values for an existing Line3D object -* :ghissue:`1611`: change handling of legend labels which are None -* :ghissue:`1657`: Add EventCollection and eventplot -* :ghissue:`1641`: PEP8 fixes on the rcsetup module -* :ghissue:`1650`: _png.read_png crashes on Python 3 with urllib.request object -* :ghissue:`1568`: removed deprecated methods from the axes module. -* :ghissue:`1571`: Y-labels shifted -* :ghissue:`1589`: Fix shifted ylabels (Issue #1571) -* :ghissue:`1276`: Fix overwriting suptitle -* :ghissue:`1661`: Fix travis install failure on py31 -* :ghissue:`1634`: add scatterpoints to rcParam -* :ghissue:`1654`: added explicit 'zorder' kwarg to `Colection` and `LineCollection`. -* :ghissue:`570`: mplot3d reverse axis behavior -* :ghissue:`1653`: Fix #570 - Reversing a 3d axis should now work properly. -* :ghissue:`1651`: WebAgg: pylab compatibility -* :ghissue:`1638`: web_backend is not installed -* :ghissue:`1505`: Issue 1504: changed how `draw` handles alpha in `markerfacecolor` -* :ghissue:`1655`: add get_segments method to collections.LineCollection -* :ghissue:`1649`: add get_segments method to collections.LineCollection -* :ghissue:`1593`: NameError: global name 'iterable' is not defined -* :ghissue:`1652`: Ignore kdevelop4 project files -* :ghissue:`665`: Mac OSX backend keyboard focus stays in terminal -* :ghissue:`1613`: Using a stricter check to see if Python was installed as a framework. -* :ghissue:`1581`: Provide an alternative to lena.png for two examples that use it. -* :ghissue:`1599`: Ada Lovelace and Grace Murray Hopper images in place of Lena -* :ghissue:`1582`: Linear tri interpolator -* :ghissue:`1637`: change cbook to relative import -* :ghissue:`1645`: add get_segments method to collections.LineCollection - updated -* :ghissue:`1639`: Rename web_static to web_backend in setup.py -* :ghissue:`1618`: Mplot3d/crashfixes -* :ghissue:`1636`: hexbin log scale is broken in matplotlib 1.2.0 -* :ghissue:`1624`: implemented inverse transform for Mollweide axes -* :ghissue:`1630`: A disconnected callback cannot be reconnected -* :ghissue:`1139`: Make Axes.stem take at least one argument. -* :ghissue:`1426`: WebAgg backend -* :ghissue:`1606`: Document the C/C++ code guidelines -* :ghissue:`1622`: zorder is not respected by all parts of `errorbar` -* :ghissue:`1628`: Fix errorbar zorder v1.2 -* :ghissue:`1625`: saving pgf to a stream is not supported -* :ghissue:`1588`: Annotations appear in incorrect locations -* :ghissue:`1620`: Fix bug in _AnnotationBase -* :ghissue:`1621`: Package for python 3.3 on OS X -* :ghissue:`1616`: Legend: Also calc the bbox of the legend when the frame is not drawn. -* :ghissue:`1587`: Mac OS X 10.5 needs an autoreleasepool here to avoid memory leaks. Newer... -* :ghissue:`1597`: new MatplotlibDeprecationWarning class (against master) -* :ghissue:`1596`: new MatplotlibDeprecationWarning class (against 1.2.x) -* :ghissue:`1532`: CXX/Python2/cxx_extensions.cxx:1320: Assertion `ob_refcnt == 0' -* :ghissue:`1601`: invalid/misconfigured fonts cause the font manager to fail -* :ghissue:`1604`: Make font_manager ignore KeyErrors for bad fonts -* :ghissue:`1605`: Change printed -> pretty-printed -* :ghissue:`1553`: invert_xaxis() accidentially disables autoscaling -* :ghissue:`1557`: inverting an axis shouldn't affect the autoscaling setting -* :ghissue:`1603`: ylim=0.0 is not well handled in polar plots -* :ghissue:`1583`: Crash with text.usetex=True and plt.annotate -* :ghissue:`1584`: triplot(x, y, simplex) should not modify the simplex array as a side effect. -* :ghissue:`1576`: BUG: tri: prevent Triangulation from modifying specified input -* :ghissue:`1602`: Fixed typos in docs (squashed version of #1600) -* :ghissue:`1600`: Fixed typos in matplotlibrc and docs -* :ghissue:`1592`: Fix a syntax error in examples (movie_demo.py) -* :ghissue:`1572`: axes_grid demo broken -* :ghissue:`201`: Drawing rubberband box outside of view crash backend_macosx -* :ghissue:`1038`: osx backend does not allow font changes -* :ghissue:`1590`: Positional argument specifiers are required by Python 2.6 -* :ghissue:`1579`: Updated custom_projection_example.py to work with v1.2 and newer -* :ghissue:`1578`: Fixed blitting in Gtk3Agg backend -* :ghissue:`1580`: lena.png is indecent and needs to be removed -* :ghissue:`1573`: fix issue #1572 caused by PR #1081 -* :ghissue:`1562`: Mac OS X Backend: Removing clip that is no longer needed -* :ghissue:`1506`: DOC: make example cursor show up in the docs -* :ghissue:`1565`: new MatplotlibDeprecationWarning class -* :ghissue:`776`: ticks based on number of subplots -* :ghissue:`1462`: use plt.subplots() in examples as much as possible -* :ghissue:`1407`: Sankey5 -* :ghissue:`1574`: Improvements to Sankey class -* :ghissue:`1536`: ENH: add AVConv movie writer for animations -* :ghissue:`1570`: PEP8 fixes on the tests of the dates module -* :ghissue:`1465`: Undefined elements in axes module -* :ghissue:`1569`: FIX Removes code that does work from the axes module -* :ghissue:`1250`: Fix Travis tests -* :ghissue:`1566`: pylab overwrites user variable(s) -* :ghissue:`1531`: fix rendering slowdown with big invisible lines (issue #1256) -* :ghissue:`1398`: PEP8 fixes on dates.py -* :ghissue:`1564`: PEP8-compliance on axes.py (patch 4 / 4) -* :ghissue:`1559`: Workaround for QT cursor bug in dock areas -* :ghissue:`1552`: Remove python 2.5 stuff from texmanager.py -* :ghissue:`1560`: Remove python2.5 support from texmanager.py -* :ghissue:`1555`: Geo projections getting clobbered by 2to3 when used when python3 -* :ghissue:`997`: Delaunay interpolator: support grid whose width or height is 1 -* :ghissue:`1477`: alternate fix for issue #997 -* :ghissue:`1556`: Invert axis autoscale fix -* :ghissue:`1554`: Geo projections getting clobbered by 2to3 when used when python3 -* :ghissue:`1522`: PEP8-compliance on axes.py (patch 3 / 4) -* :ghissue:`1548`: Broken i386 + Python 3 build -* :ghissue:`1550`: PEP8 fixes on the module texmanager -* :ghissue:`783`: mplot3d: scatter (and others) incorrectly auto-scale axes after set_[xyz]lim() -* :ghissue:`1289`: Autoscaling and limits in mplot3d. -* :ghissue:`1551`: PEP8 fixes on the spines module -* :ghissue:`1537`: Fix savefig.extension == "auto" -* :ghissue:`1297`: pyplot.plotfile. gridon option added with default from rcParam. -* :ghissue:`1526`: Remove unnecessary clip cairo -* :ghissue:`1538`: Remove unnecessary clip from Cairo backend; squashed commit -* :ghissue:`1544`: str.format() doesn't work on python 2.6 -* :ghissue:`1549`: Add citation page to website -* :ghissue:`1514`: Fix streamplot when color argument has NaNs -* :ghissue:`1487`: MaxNLocator for log-scale -* :ghissue:`1081`: Propagate mpl.text.Text instances to the backends and fix documentation -* :ghissue:`1533`: ENH: raise a more informative error -* :ghissue:`955`: Strange resize behaviour with ImageGrid -* :ghissue:`1003`: Fix for issue #955 -* :ghissue:`1546`: Quiver crashes if given matrices -* :ghissue:`1542`: Wrong __version__numpy__ -* :ghissue:`1540`: Changed mailinglist archive link. -* :ghissue:`1507`: python setup.py build (in parallel) -* :ghissue:`1492`: MacOSX backend blocks in IPython QtConsole -* :ghissue:`1493`: check `ret == False` in Timer._on_timer -* :ghissue:`1523`: DOC: github ribbon does not cover up index link -* :ghissue:`1515`: set_cmap should not require an active image -* :ghissue:`1500`: comment on http://matplotlib.org/users/pgf.html#pgf-tutorial - minor issue with xits font -* :ghissue:`1489`: Documentation update for specgram -* :ghissue:`1527`: fix 2 html color names -* :ghissue:`1524`: Make README.txt consistent reStructuredText -* :ghissue:`1525`: pgf: documentation enhancements -* :ghissue:`1510`: pgf: documentation enhancements -* :ghissue:`1512`: Reorganize the developer docs -* :ghissue:`1518`: PEP8 compliance on the delaunay module -* :ghissue:`1357`: PEP8 fixes on text.py -* :ghissue:`1469`: PEP8-compliance on axes.py (patch 2 / 4) -* :ghissue:`1470`: Add ``test`` and ``test-coverage`` to Makefile -* :ghissue:`1513`: Problems with image sizes -* :ghissue:`1509`: pgf: draw_image() doesn't store path to png files in the pgf source -* :ghissue:`1516`: set_xticklabels changes font when text.usetex is enabled -* :ghissue:`1442`: Add savefig_kwargs to Animation.save() method -* :ghissue:`1511`: Reorganize developer docs -* :ghissue:`1503`: DOC: 'inout' option for tick_params direction -* :ghissue:`1494`: Added sphinx documentation for Triangulation -* :ghissue:`1480`: Remove dead code in patches -* :ghissue:`1496`: Correct scatter docstring -* :ghissue:`1495`: scatter docstring, minor -* :ghissue:`1472`: FIX extra comma in Sankey.add -* :ghissue:`1471`: Improved checking logic of _check_xyz in contour.py -* :ghissue:`998`: fix for issue #997 -* :ghissue:`1479`: Reintroduce examples.directory rc parameter -* :ghissue:`1491`: Reintroduce examples.directory rc parameter -* :ghissue:`1405`: Add angle kwarg to patches.Rectangle -* :ghissue:`1278`: Make arrow docstring mention data transform -* :ghissue:`1475`: make plt.subplot() act as plt.subplot(111) -* :ghissue:`1355`: Add sym-log normalization. -* :ghissue:`1474`: use an imagemap for the "fork me on github" ribbon -* :ghissue:`632`: ENH: More included norms, especially a symlog like norm -* :ghissue:`1466`: Too many open files -* :ghissue:`1485`: Fix leak of gc's in gtkagg backend -* :ghissue:`1484`: V1.2.x Fix leak of gc's in gtkagg backend. -* :ghissue:`1374`: PEP8 fixes on widgets.py -* :ghissue:`1379`: PEP8 fixes on quiver.py -* :ghissue:`1399`: PEP8 fixes on patches -* :ghissue:`1478`: Reintroduce examples.directory rcParams to customize cbook.get_sample_data() lookup location -* :ghissue:`1468`: use an imagemap for the "fork me on github" ribbon -* :ghissue:`1395`: PEP8 fixes on contour.py -* :ghissue:`1473`: offsets.shape(-1,2) -* :ghissue:`1467`: matplotlib 1.2.0 Binary installer for 32-bit Windows for python 2.7 is missing -* :ghissue:`1419`: bbox_extra_artists doesn't work for a table -* :ghissue:`1432`: lengend overlaps graph -* :ghissue:`1464`: PEP8-compliance on axes.py (patch 1 / 4) -* :ghissue:`1400`: PEP8 fixes on offsetbox.py -* :ghissue:`1463`: Document the Gtk3 backends -* :ghissue:`1417`: Pep8 on the axes module -* :ghissue:`1458`: use plt.subplots() in examples as much as possible -* :ghissue:`1459`: Invalid usage suggested in legend docstring -* :ghissue:`1446`: Fix clipping in PDF backend -* :ghissue:`1397`: PEP8 fixes on sankey.py -* :ghissue:`1396`: PEP8 fixes on colors -* :ghissue:`1394`: PEP8 fixes on _cm.py -* :ghissue:`1456`: pgf: documentation fixes -* :ghissue:`1450`: Colorbar edges are different in PDF backend -* :ghissue:`1452`: John Hunter's email address is still listed in matplotlib module docstring. -* :ghissue:`1453`: Remove John Hunter's email from mpl docstring -* :ghissue:`1437`: agg_buffer_to_array.py crashes -* :ghissue:`1447`: yerr argument of bar doesn't work -* :ghissue:`1445`: JRE - Modified 'use' so that it will only warn if the requested backend ... -* :ghissue:`1439`: Remove all mention of make.osx in README.osx -* :ghissue:`108`: Unbundle pycxx -* :ghissue:`1434`: C++11 narrowing conversions -* :ghissue:`1449`: removed setup.py print statement. -* :ghissue:`1443`: Regression in IPython notebook -* :ghissue:`1420`: Join bbox_extra_artists and bbox_inches -* :ghissue:`1444`: Colorbar edges are different in PDF backend -* :ghissue:`1440`: Fix incorrect conversion in PEP8 fixes. -* :ghissue:`1438`: plt.text clips the figure when using bbox_inches='tight' -* :ghissue:`1435`: README.osx still mentions make.osx -* :ghissue:`1433`: Alternative to #1404. Sets the cursor without refering to a FigureManage... -* :ghissue:`1436`: Exception message improvement. -* :ghissue:`1326`: bugfix: creating patches with transform=None -* :ghissue:`1431`: Fixed transform=None behaviour on Artists. -* :ghissue:`1421`: Add table to default_bbox_extra_artists -* :ghissue:`1430`: Add trove classifiers to setup.py -* :ghissue:`1424`: pcolor fails if edgecolors is not a string -* :ghissue:`1427`: Fix AttrituteError for .lower on tuple of strings -* :ghissue:`1425`: Rebase of #1418 on v1.2.x -* :ghissue:`1418`: Tables: Fix get_window_extent for table -* :ghissue:`1411`: Fix transparent markers in PDF backend. Closes #1410 -* :ghissue:`1410`: Open markers incorrect in PDF output -* :ghissue:`1416`: backend_pdf: optional rgbFace arg in fillp replaces code in draw_markers. Closes #1410 -* :ghissue:`1393`: PEP8 fixes on axes.py -* :ghissue:`682`: Manipulation of legend parameters from the navigation toolbar -* :ghissue:`676`: Error in documentation of matplotlib.pyplot.ticklabel_format -* :ghissue:`1414`: Fix scilimits docstring in ticklabel_format -* :ghissue:`1314`: Range bug fix for pcolor and pcolormesh -* :ghissue:`1323`: Work around a huge memory leak in PySide on Python 3 -* :ghissue:`362`: QA on documentation and gallery -* :ghissue:`330`: Matlab fplot -* :ghissue:`304`: scale plot (including labels) to bounding box -* :ghissue:`239`: title does is not displayed correctly, if there is linefeeds -* :ghissue:`235`: hatch linewidth patch -* :ghissue:`229`: collections.PolyCollection set_verts speed-up -* :ghissue:`1385`: replace bbox_all() with Bbox.union() -* :ghissue:`1409`: Make table.py use BBox.union over bbox_all -* :ghissue:`1354`: setupegg.py develop is broken -* :ghissue:`1387`: Make setupegg symlink correct dateutil library -* :ghissue:`1404`: PySide segfaults immediately on Linux -* :ghissue:`1402`: annotate problem when drawing arrows with segments out of axis -* :ghissue:`1361`: Make make.py build docs under python 3 -* :ghissue:`1370`: Bug in #847 (stacked histograms) -* :ghissue:`1372`: Fix bug when stacking histograms with non-integer weights -* :ghissue:`1406`: Fix bug when stacking histograms with non-integer weights (v1.2.x branch) -* :ghissue:`1403`: Improve "Report a problem" to "Getting help" -* :ghissue:`1373`: svgwriter not assigned in FigureCanvasSVG.print_svg for StringIO filename -* :ghissue:`1156`: Add a convenience method to rotate a patch -* :ghissue:`1380`: Fix svg writer for StringIO objects -* :ghissue:`1388`: Deprecate original NavigationToolbar -* :ghissue:`1306`: matplotlib breaks programs with arguments that start with --verbose- -* :ghissue:`1344`: DOC: provide convenience url for seachling MLs + mentioned github issues -* :ghissue:`1389`: Remove unused autolayout_validator() from rcsetup -* :ghissue:`1390`: Fix bad commandline handling -* :ghissue:`1229`: NF - option to make colorbar extensions rectangles -* :ghissue:`1375`: PEP8 fixes on textpath.py -* :ghissue:`1392`: Fix by Yannick Copin for hist autoscaling bug; closes issue #841 -* :ghissue:`1331`: Fix for issue #841 -* :ghissue:`1343`: Date axis formatter problem -* :ghissue:`1376`: PEP8 fixes on table.py -* :ghissue:`1384`: PEP8 fixes on hatch.py -* :ghissue:`1364`: FIXME comment in transforms.py -* :ghissue:`1382`: PEP8 fixes on container.py -* :ghissue:`1378`: PEP8 fixes on stackplot.py -* :ghissue:`1358`: PEP8 fixes on ticker.py -* :ghissue:`1377`: PEP8 fixes on streamplot.py -* :ghissue:`1352`: PEP8 fixes on legend.py -* :ghissue:`1348`: PEP8 fixes on scale.py -* :ghissue:`1367`: Fix typo in transforms.py -* :ghissue:`1345`: PEP8 fixes on backend_bases.py -* :ghissue:`1365`: FIX - travis-ci is failing -* :ghissue:`1351`: PEP8 fixes on transforms.py -* :ghissue:`1349`: PEP8 fixes on type1font.py -* :ghissue:`1360`: PEP8 fixes on tight_layout.py -* :ghissue:`1359`: PEP8 fixes on tight_bbox.py -* :ghissue:`1362`: fixed lognorm clip behavior -* :ghissue:`1346`: Add proxy artist to Axes.fill_between[x] for label support (Issue #1341) -* :ghissue:`1350`: PEP8 fixes on units.py -* :ghissue:`1353`: docstring: direct pcolor users to pcolormesh; fix pcolorfast docstring -* :ghissue:`1333`: PEP8 fixes on collections.py -* :ghissue:`1336`: PEP8 fixes to colorbar.py -* :ghissue:`1347`: Remove nonfunctioning cbook.isvector -* :ghissue:`1327`: plt.subplots: Set the visibility of the offset text to false on the shared axes. -* :ghissue:`1335`: PEP8 fixes on cbook.py -* :ghissue:`1334`: PEP8 fixes on blocking_input.py -* :ghissue:`1332`: PEP8 fixes on cm.py -* :ghissue:`751`: Building on osx with python 3.2 -* :ghissue:`1322`: Update Mac build process. Fixes #751 -* :ghissue:`1161`: Test fails in lib/matplotlib/tests/test_figure.py fails -* :ghissue:`1337`: ENH: allow animations to be saved as animated GIFs -* :ghissue:`1340`: fix drawing error of fancyarrow of simple style (v1.2.x) -* :ghissue:`1339`: pgf backend producing invisible dot -* :ghissue:`1129`: fix drawing error of fancyarrow of simple style -* :ghissue:`1338`: Travis: suppress logs for installing numpy, nose -* :ghissue:`1330`: Tiny (but serious) bugfixes in image.py -* :ghissue:`1328`: Tiny bugfixes in image.py -* :ghissue:`825`: make.osx with Xcode 4.3 -* :ghissue:`1298`: Update trisurf to support custom triangulations -* :ghissue:`1286`: backend_pgf: improve handling of temporary directories -* :ghissue:`1281`: backend_pgf does not delete temp directories on Windows, changes the current directory -* :ghissue:`113`: dpi= doesn't seem to have any effect with MacOS X backend -* :ghissue:`1316`: very high negative zorder breaks vector graphic rendering -* :ghissue:`1283`: Fix tripcolor with shading='faceted' -* :ghissue:`156`: Multicursor not displayed with zoom on -* :ghissue:`1320`: Cursor widget now uses widgetlock; closes Issue #156 -* :ghissue:`1321`: pgf backend. Y-labels in subplot are not alligned after baseline but bottom of letter -* :ghissue:`1301`: Colorbar Add kw arguement to colorbar to reenable edges around faces -* :ghissue:`1315`: Add documentation of colorbar issue #1188 to colorbar documentation. -* :ghissue:`1303`: twinx/twiny misses settings axes -* :ghissue:`1307`: Marker not round with markersize=3 -* :ghissue:`396`: Plotting with negative x values on semilogx -* :ghissue:`661`: remove deprecation notice in hist() -* :ghissue:`1285`: Hide Tk root window until later -* :ghissue:`1304`: 1.0rc2 fails to build on MacOS X 10.4 -* :ghissue:`1305`: Fix pointer syntax error -* :ghissue:`1294`: Update lib/mpl_toolkits/mplot3d/axes3d.py -* :ghissue:`159`: Autoscale in hist() with step and log -* :ghissue:`167`: windows x64 support in _tkagg.so -* :ghissue:`1300`: Pcolormesh and colorbar documentation. -* :ghissue:`1178`: Make colorbar draw edge with facecolor around the faces. -* :ghissue:`1205`: New 'gridon' keyword in plotfile -* :ghissue:`1295`: Exception when using Container.remove -* :ghissue:`1296`: Make Container._remove_method call correctly -* :ghissue:`1293`: Fixed to contour to support the _as_mpl_transform api. -* :ghissue:`1292`: bar3d surfaces not hidden properly -* :ghissue:`1288`: Mplot3d/autoscale fix -* :ghissue:`690`: mplot3d: Interface is inconsistent between contour and surface_plot -* :ghissue:`750`: axes.cla() in mplot3d - grid lines don't fall back. -* :ghissue:`749`: set_xlim in 3D scatter plots? -* :ghissue:`761`: mplot3d, addition to losing color on movement of canvas. -* :ghissue:`802`: ax.get_zticks() amd ax.get_zticklabels not working -* :ghissue:`1284`: Fix Image Tutorial: plt.imshow instead of mpimg.imshow. -* :ghissue:`1282`: Use file open modes required by csv module -* :ghissue:`822`: rc lines.color doesn't have any effect on plot() -* :ghissue:`871`: grid.alpha in matplotlibrc -* :ghissue:`1280`: cannot import name rcParams -* :ghissue:`1089`: savefig to sys.stdout fails with pdf backend -* :ghissue:`1248`: Travis results failing -* :ghissue:`1279`: No figure.add_line (or _patch, etc.) -* :ghissue:`319`: TikZ/PGF backend -* :ghissue:`1270`: Cannot build 1.2.0rc1 for 32-bit Mac python -* :ghissue:`1249`: transAxes isn't working properly with scale='log' -* :ghissue:`1246`: axvline fails with log scaling -* :ghissue:`1247`: Log axvline -* :ghissue:`1258`: Regression: dtype problem with BoundaryNorm -* :ghissue:`1265`: Fixed pre-transform limit calculation bug for contour sets. -* :ghissue:`1275`: backend_pgf: Custom dashstyles and inconcistency with other backends -* :ghissue:`1272`: Fix Objective-C 2.0 error with gcc-4.0 -* :ghissue:`1277`: Fixed bug in MaxNLocator.bin_boundaries -* :ghissue:`1263`: Failing test: ```python tests.py matplotlib.tests.test_axes:test_single_date``` -* :ghissue:`1273`: Handled baseline image folder identification for non matplotlib projects... -* :ghissue:`1230`: Fix dpi issue for bitmaps on the OS X backend -* :ghissue:`1274`: backend_pgf: Custom dashstyles and consistency with other backends -* :ghissue:`1251`: backend_pgf. Enable custom dashstyles in the pgf backend -* :ghissue:`1264`: Re-added the matplotlib.dates import on axes -* :ghissue:`1271`: Set axis limits in test_stackplot -* :ghissue:`1269`: Fix typo in docstring -* :ghissue:`1267`: Doc typo -* :ghissue:`1268`: Doc typo v1.2 -* :ghissue:`1260`: Fix BoundaryNorm interpolation with numpy 1.7rc. -* :ghissue:`1261`: Update six.py to version 1.2 -* :ghissue:`1255`: Fix test_pickle test. -* :ghissue:`1253`: Scatter in Axes3d loses colors -* :ghissue:`1152`: checkable pan/zoom buttons for QT NavigationToolbar -* :ghissue:`1243`: Broken doc links -* :ghissue:`1244`: PGF: Text alignment is off, especially with custom fonts -* :ghissue:`1147`: Set artist colors in one fell swoop -* :ghissue:`1242`: Doc tidy up. -* :ghissue:`1224`: Imsave alpha -* :ghissue:`1241`: backend_pgf: fix parsing of CR+LF newlines -* :ghissue:`1233`: Fix mri_demo.py fails with mpl 1.2.0rc1 -* :ghissue:`1238`: matplotlib.testing.util.MiniExpect.expect hangs on Windows -* :ghissue:`1239`: Fix matplotlib.testing.util.MiniExpect.expect hangs on Windows -* :ghissue:`1237`: Fix `ValueError: could not convert string to float` on Windows/MikTeX -* :ghissue:`1240`: backend_pgf: fix parsing of CR+LF newlines -* :ghissue:`1236`: Fix poly_editor.py on Python 3 -* :ghissue:`1232`: Enable dynamic updating for the OS X backend -* :ghissue:`1234`: Fix 2to3 and packaging of dateutil -* :ghissue:`1070`: Use github for downloads -* :ghissue:`1207`: Add contributor and git stats to documentation -* :ghissue:`1217`: PEP8 fixes on the axis module -* :ghissue:`831`: Stacked hist with histtype='step' (+ new kwargs for hist) -* :ghissue:`1083`: doc/mpl_examples/api/date_demo.py doesn't run -* :ghissue:`1176`: Reverted a previous change to artist transform setting. Fixes legend bug. -* :ghissue:`1231`: fix Typesetting in plot() docstring -* :ghissue:`1215`: PEP8 on lib/matplotlib.afm.py -* :ghissue:`1216`: PEP8 fixes on the animation module -* :ghissue:`1208`: FAIL: matplotlib.tests.test_text.test_contains.test -* :ghissue:`786`: savefig() renders paths and text differently than show() -* :ghissue:`1209`: Pass linewidth to Mac context properly -* :ghissue:`847`: Add stacked kwarg to hist and implement stacked hists for step histtype -* :ghissue:`1228`: backend_pgf: pep8 edits -* :ghissue:`1226`: Add dpi kwarg to PIL image.save method for TIFF file. -* :ghissue:`1211`: PDF renderer draws strange artifacts on '%' character in 1.1.1 -* :ghissue:`1222`: Don't try to order the contours of TrueType fonts -* :ghissue:`1166`: PEP8 compliance on colors.py -* :ghissue:`820`: Use new sphinx method to load searchindex.js -* :ghissue:`1225`: Added deprecation notices for Qt3-based backends. -* :ghissue:`1190`: Update documentation regarding lines.color -* :ghissue:`1212`: Two TKagg widows popping up - should be one -* :ghissue:`1055`: Runtime error in grid_spec.tight_layout() -* :ghissue:`1202`: refactored grid_spec.tight_layout and fixed #1055 -* :ghissue:`1214`: Prevent error when backend has no FigureCanvas -* :ghissue:`1218`: backend wx and wxagg broken by #1125 -* :ghissue:`1221`: revert PR #1125 and #1201 -* :ghissue:`1219`: Show fails on figures created with the object-oriented system -* :ghissue:`1220`: Figure.show: clarify docstring and error message -* :ghissue:`1167`: PEP8 lib/matplotlib/patches.py -* :ghissue:`1096`: Documentation bug: pyplot.arrow does not list enough keywords to successfully draw an arrow -* :ghissue:`1168`: PEP8 compliance on artist.py -* :ghissue:`1213`: Include username in tempdir -* :ghissue:`1182`: Bezier pep8 -* :ghissue:`1177`: Handled baseline image folder identification for non matplotlib projects. -* :ghissue:`1091`: Update README.txt for v1.2 -* :ghissue:`1206`: README and links fixes -* :ghissue:`1192`: Issue835 2: replacement for #835 -* :ghissue:`1187`: Add a *simple* arrow example -* :ghissue:`1120`: FAIL: matplotlib.tests.test_transforms.test_pre_transform_plotting.test on Python 3.x -* :ghissue:`835`: add documentation for figure show method in backend_bases and backend_template -* :ghissue:`714`: Initial rework of gen_gallery.py -* :ghissue:`1150`: the affine matrix is calculated in the display coordinate for interpolation='none' -* :ghissue:`1087`: Update whats new section -* :ghissue:`385`: BUG: plot_directive: look for plot script files relative to the .rst file -* :ghissue:`1110`: twiny overrides formatter and adds another x-axis -* :ghissue:`1145`: Fix formatter reset when twin{x,y}() is called -* :ghissue:`547`: undocumented scatter marker definition change -* :ghissue:`1201`: Fix typo in object-oriented API -* :ghissue:`1061`: Add log option to Axes.hist2d -* :ghissue:`1125`: Reduce object-oriented boilerplate for users -* :ghissue:`1085`: Images shifted relative to other plot feature in vector graphic output formats -* :ghissue:`1195`: Fixed pickle tests to use the BufferIO object for python3 support. -* :ghissue:`1198`: Fixed python2.6 support (by removing use of viewvalues on a dict). -* :ghissue:`1194`: Streamplot result python version dependent -* :ghissue:`1197`: Handled future division changes for python3 (fixes #1194). -* :ghissue:`557`: Crash during date axis setup -* :ghissue:`600`: errorbar(): kwarg 'markevery' not working as expected. -* :ghissue:`174`: Memory leak in example simple_idle_wx.py -* :ghissue:`232`: format in plot_directive sphinx>=1.0.6 compatible patch -* :ghissue:`1162`: FIX nose.tools.assert_is is only supported with python2.7 -* :ghissue:`1165`: tight_layout fails on twinx, twiny -* :ghissue:`803`: Return arrow collection as 2nd argument of streamplot. -* :ghissue:`1189`: BUG: Fix streamplot when velocity component is exactly zero. -* :ghissue:`1191`: Small bugfixes to the new pickle support. -* :ghissue:`323`: native format for figures -* :ghissue:`1146`: Fix invalid transformation in InvertedSymmetricalLogTransform. -* :ghissue:`1169`: Subplot.twin[xy] returns a Subplot instance -* :ghissue:`1183`: FIX undefined elements were used at several places in the mlab module -* :ghissue:`498`: get_sample_data still broken on v.1.1.x -* :ghissue:`1170`: Uses tight_layout.get_subplotspec_list to check if all axes are compatible w/ tight_layout -* :ghissue:`1173`: The PGF backend only works on python2.7 and + -* :ghissue:`1174`: closes #1173 - backporting python2.7 subprocess's check_output to be abl... -* :ghissue:`1175`: Pickling support added. Various whitespace fixes as a result of reading *lots* of code. -* :ghissue:`1179`: Attempt at making travis output shorter. -* :ghissue:`1020`: Picklable figures -* :ghissue:`1098`: suppress exception upon quitting with qt4agg on osx -* :ghissue:`1171`: backend_pgf: handle OSError when testing for xelatex/pdflatex -* :ghissue:`1164`: doc: note contourf hatching in whats_new.rst -* :ghissue:`606`: Unable to configure grid using axisartist -* :ghissue:`1153`: PEP8 on artist -* :ghissue:`1163`: tight_layout: fix regression for figures with non SubplotBase Axes -* :ghissue:`1117`: ERROR: matplotlib.tests.test_axes.test_contour_colorbar.test fails on Python 3 -* :ghissue:`1159`: FIX assert_raises cannot be called with ``with\\ -* :ghissue:`206`: hist normed=True problem? -* :ghissue:`1160`: backend_pgf: clarifications and fixes in documentation -* :ghissue:`1154`: six inclusion for dateutil on py3 doesn't work -* :ghissue:`320`: hist plot in percent -* :ghissue:`1149`: Add Phil Elson's percentage histogram example -* :ghissue:`1158`: FIX - typo in lib/matplotlib/testing/compare.py -* :ghissue:`1135`: Problems with bbox_inches='tight' -* :ghissue:`1155`: workaround for fixed dpi assumption in adjust_bbox_pdf -* :ghissue:`1142`: What's New: Python 3 paragraph -* :ghissue:`1138`: tight_bbox made assumptions about the display-units without checking the figure -* :ghissue:`1130`: Fix writing pdf on stdout -* :ghissue:`832`: MPLCONFIGDIR tries to be created in read-only home -* :ghissue:`1140`: BUG: Fix fill_between when NaN values are present -* :ghissue:`1144`: Added tripcolor whats_new section. -* :ghissue:`1010`: Port part of errorfill from Tony Yu's mpltools. -* :ghissue:`1141`: backend_pgf: fix parentheses typo -* :ghissue:`1114`: Make grid accept alpha rcParam -* :ghissue:`1118`: ERROR: matplotlib.tests.test_backend_pgf.test_pdflatex on Python 3.x -* :ghissue:`1116`: ERROR: matplotlib.tests.test_backend_pgf.test_xelatex -* :ghissue:`1124`: PGF backend, fix #1116, #1118 and #1128 -* :ghissue:`745`: Cannot run tests with Python 3.x on MacOS 10.7 -* :ghissue:`983`: Issues with dateutil and pytz -* :ghissue:`1137`: PGF/Tikz: savefig could not handle a filename -* :ghissue:`1128`: PGF back-end fails on simple graph -* :ghissue:`1133`: figure.py: import warnings, and make imports absolute -* :ghissue:`1123`: Rationalize the number of ancillary (default matplotlibrc) files -* :ghissue:`1132`: clean out obsolete matplotlibrc-related bits to close #1123 -* :ghissue:`1131`: Cleanup after the gca test. -* :ghissue:`563`: sankey.add() has mutable defaults -* :ghissue:`238`: patch for qt4 backend -* :ghissue:`731`: Plot limit with transform -* :ghissue:`1107`: Added %s support for labels. -* :ghissue:`720`: Bug with bbox_inches='tight' -* :ghissue:`1084`: doc/mpl_examples/pylab_examples/transoffset.py not working as expected -* :ghissue:`774`: Allow automatic use of tight_layout. -* :ghissue:`1122`: DOC: Add streamplot description to What's New page -* :ghissue:`1111`: Fixed transoffset example from failing. -* :ghissue:`840`: Documentation Errors for specgram -* :ghissue:`1088`: For a text artist, if it has a _bbox_patch associated with it, the contains test should reflect this. -* :ghissue:`1119`: ERROR: matplotlib.tests.test_image.test_imread_pil_uint16 on Python 3.x -* :ghissue:`353`: Improved output of text in SVG and PDF -* :ghissue:`291`: size information from print_figure -* :ghissue:`986`: Add texinfo build target in doc/make.py -* :ghissue:`1076`: PGF backend for XeLaTeX/LuaLaTeX support -* :ghissue:`1090`: External transform api -* :ghissue:`1108`: Fix documentation warnings -* :ghissue:`811`: Allow tripcolor to directly plot triangle-centered functions -* :ghissue:`1005`: imshow with big-endian data types on OS X -* :ghissue:`892`: Update animation.py docstrings to "raw" Sphinx format -* :ghissue:`861`: Add rcfile function (which loads rc params from a given file). -* :ghissue:`988`: Trim white spaces while saving from Navigation toolbar -* :ghissue:`670`: Add a printer button to the navigation toolbar -* :ghissue:`1062`: increased the padding on FileMovieWritter.frame_format_str -* :ghissue:`188`: MacOSX backend brings up GUI unnecessarily -* :ghissue:`1041`: make.osx SDK location needs updating -* :ghissue:`1043`: Fix show command for Qt backend to raise window to top -* :ghissue:`1046`: test failing on master -* :ghissue:`962`: Bug with figure.savefig(): using AGG, PIL, JPG and StringIO -* :ghissue:`1045`: 1.1.1 not in pypi -* :ghissue:`1100`: Doc multi version master -* :ghissue:`1106`: Published docs for v1.1.1 missing pyplot.polar -* :ghissue:`569`: 3D bar graphs with variable depth -* :ghissue:`359`: new plot style: stackplot -* :ghissue:`297`: pip/easy_install installs old version of matplotlib -* :ghissue:`152`: Scatter3D: arguments (c,s,...) are not taken into account -* :ghissue:`1105`: Fixed comma between tests. -* :ghissue:`1095`: Colormap byteorder bug -* :ghissue:`1102`: examples/pylab_examples/contour_demo.py fails -* :ghissue:`1103`: colorbar: correct error introduced in commit 089024; closes #1102 -* :ghissue:`1067`: Support multi-version documentation on the website -* :ghissue:`1031`: Added 'capthick' kwarg to errorbar() -* :ghissue:`1074`: Added broadcasting support in some mplot3d methods -* :ghissue:`1032`: Axesbase -* :ghissue:`1064`: Locator interface -* :ghissue:`850`: Added tripcolor triangle-centred colour values. -* :ghissue:`1059`: Matplotlib figure window freezes during interactive mode -* :ghissue:`215`: skipping mpl-axes-interaction during key_press_event\'s -* :ghissue:`1093`: Exposed the callback id for the default key press handler so that it can be easily disabled. Fixes #215. -* :ghissue:`909`: Log Formatter for tick labels can't handle non-integer base -* :ghissue:`1065`: fixed conversion from pt to inch in tight_layout -* :ghissue:`1086`: Problem with subplot / matplotlib.dates interaction -* :ghissue:`782`: mplot3d: grid doesn't update after adding a slider to figure? -* :ghissue:`703`: pcolormesh help not helpful -* :ghissue:`1082`: doc: in pcolormesh docstring, say what it does. -* :ghissue:`1068`: Add stairstep plotting functionality -* :ghissue:`1078`: doc: note that IDLE doesn't work with interactive mode. -* :ghissue:`704`: ignore case in `edgecolors` keyword in `pcolormesh` (and possibly other places) -* :ghissue:`708`: set_clim not working with NonUniformImage -* :ghissue:`768`: Add "tight_layout" button to toolbar -* :ghissue:`791`: v1.1.1 release candidate testing -* :ghissue:`844`: imsave/imshow and cmaps -* :ghissue:`939`: test failure: matplotlib.tests.test_mathtext.mathfont_stix_14_test.test -* :ghissue:`875`: Replace "jet" with "hot" as the default colormap -* :ghissue:`881`: "Qualitative" colormaps represented as continuous -* :ghissue:`1072`: For a text artist, if it has a _bbox_patch associated with it, the conta... -* :ghissue:`1071`: patches.polygon: fix bug in handling of path closing, #1018. -* :ghissue:`1018`: BUG: check for closed path in Polygon.set_xy() -* :ghissue:`1066`: fix limit calculation of step* histogram -* :ghissue:`1073`: Mplot3d/input broadcast -* :ghissue:`906`: User-specified medians and conf. intervals in boxplots -* :ghissue:`899`: Update for building matplotlib under Mac OS X 10.7 Lion and XCode > 4.2 -* :ghissue:`1057`: Contour norm scaling -* :ghissue:`1035`: Added a GTK3 implementation of the SubplotTool window. -* :ghissue:`807`: Crash when using zoom tools on a plot: AutoMinorLocator after MultipleLocator gives "ValueError: Need at least two major ticks to find minor tick locations" -* :ghissue:`1023`: New button to toolbar for tight_layout. -* :ghissue:`1056`: Test framework cleanups -* :ghissue:`778`: Make tests faster -* :ghissue:`1048`: some matplotlib examples incompatible with wxpython 2.9 -* :ghissue:`1024`: broken links in the gallery -* :ghissue:`1054`: stix_fonts_demo.py fails with bad refcount -* :ghissue:`960`: Fixed logformatting for non integer bases. -* :ghissue:`897`: GUI icon in Tkinter -* :ghissue:`1053`: Move Python 3 import of reload() to the module that uses it -* :ghissue:`1049`: Update examples/user_interfaces/embedding_in_wx2.py -* :ghissue:`1050`: Update examples/user_interfaces/embedding_in_wx4.py -* :ghissue:`1051`: Update examples/user_interfaces/mathtext_wx.py -* :ghissue:`1052`: Update examples/user_interfaces/wxcursor_demo.py -* :ghissue:`1047`: Enable building on Python 3.3 for Windows -* :ghissue:`819`: Add new plot style: stackplot -* :ghissue:`1036`: Move all figures to the front with a non-interactive show() in macosx backend. -* :ghissue:`1042`: Three more plot_directive configuration options -* :ghissue:`1044`: plots not being displayed in OSX 10.8 -* :ghissue:`1022`: contour: map extended ranges to "under" and "over" values -* :ghissue:`1007`: modifying GTK3 example to use pygobject, and adding a simple example to demonstrate NavigationToolbar in GTK3 -* :ghissue:`1004`: Added savefig.bbox option to matplotlibrc -* :ghissue:`976`: Fix embedding_in_qt4_wtoolbar.py on Python 3 -* :ghissue:`1013`: compilation warnings in _macosx.m -* :ghissue:`1034`: MdH = allow compilation on recent Mac OS X without compiler warnings -* :ghissue:`964`: Animation clear_temp=False reuses old frames -* :ghissue:`1028`: Fix use() so that it is possible to reset the rcParam. -* :ghissue:`1033`: Py3k: reload->imp.reload -* :ghissue:`1002`: Fixed potential overflow exception in the lines.contains() method -* :ghissue:`1025`: Timers -* :ghissue:`989`: Animation subprocess bug -* :ghissue:`898`: Added warnings for easily confusable subplot/subplots invocations -* :ghissue:`963`: Add detection of file extension for file-like objects -* :ghissue:`973`: Fix sankey.py pep8 and py3 compatibility -* :ghissue:`972`: Force closing PIL image files -* :ghissue:`981`: Fix pathpatch3d_demo.py on Python 3 -* :ghissue:`980`: Fix basic_units.py on Python 3. PEP8 and PyLint cleanup. -* :ghissue:`996`: macosx backend broken by #901: QuadMesh fails so colorbar fails -* :ghissue:`1017`: axes.Axes.step() function not documented -* :ghissue:`1014`: qt4: remove duplicate file save button; and remove trailing whitespace -* :ghissue:`655`: implement path_effects for Line2D objects -* :ghissue:`999`: pcolormesh edgecolor of "None" -* :ghissue:`1011`: fix for bug #996 and related issues -* :ghissue:`1009`: Simplify import statement -* :ghissue:`982`: Supported FreeBSD10 as per #225 -* :ghissue:`225`: Add support for FreeBSD >6.x -* :ghissue:`985`: support current and future FreeBSD releases -* :ghissue:`1006`: MacOSX backend throws exception when plotting a quadmesh -* :ghissue:`1000`: Fix traceback for vlines/hlines, when an empty list or array passed in for x/y. -* :ghissue:`1001`: Bug fix for issue #955 -* :ghissue:`994`: Fix bug in pcolorfast introduced by #901 -* :ghissue:`993`: Fix typo -* :ghissue:`908`: use Qt window title as default savefig filename -* :ghissue:`830`: standard key for closing figure ("q") -* :ghissue:`971`: Close fd temp file following rec2csv_bad_shape test -* :ghissue:`851`: Simple GUI interface enhancements -* :ghissue:`979`: Fix test_mouseclicks.py on Python 3 -* :ghissue:`977`: Fix lasso_selector_demo.py on Python 3 -* :ghissue:`970`: Fix tiff and jpeg export via PIL -* :ghissue:`707`: key_press_event in pyqt4 embedded matplotlib -* :ghissue:`243`: Debug version/symbols for win32 -* :ghissue:`255`: Classes in _transforms.h in global namespace -* :ghissue:`961`: Issue 807 auto minor locator -* :ghissue:`345`: string symbol markers ("scattertext" plot) -* :ghissue:`247`: DLL load failed -* :ghissue:`808`: pip install matplotlib fails -* :ghissue:`168`: setupext.py incorrect for Mac OS X -* :ghissue:`213`: Fixing library path in setupext.py for Mac diff --git a/dev/_sources/users/gridspec.txt b/dev/_sources/users/gridspec.txt deleted file mode 100644 index b946fed05ca..00000000000 --- a/dev/_sources/users/gridspec.txt +++ /dev/null @@ -1,161 +0,0 @@ -.. _gridspec-guide: - - -********************************************** -Customizing Location of Subplot Using GridSpec -********************************************** - - ``GridSpec`` - specifies the geometry of the grid that a subplot will be - placed. The number of rows and number of columns of the grid - need to be set. Optionally, the subplot layout parameters - (e.g., left, right, etc.) can be tuned. - - ``SubplotSpec`` - specifies the location of the subplot in the given *GridSpec*. - - ``subplot2grid`` - a helper function that is similar to "pyplot.subplot" but uses - 0-based indexing and let subplot to occupy multiple cells. - - -Basic Example of using subplot2grid -=================================== - -To use subplot2grid, you provide geometry of the grid and the location -of the subplot in the grid. For a simple single-cell subplot:: - - ax = plt.subplot2grid((2,2),(0, 0)) - -is identical to :: - - ax = plt.subplot(2,2,1) - -Note that, unlike matplotlib's subplot, the index starts from 0 in gridspec. - -To create a subplot that spans multiple cells, :: - - ax2 = plt.subplot2grid((3,3), (1, 0), colspan=2) - ax3 = plt.subplot2grid((3,3), (1, 2), rowspan=2) - -For example, the following commands :: - - ax1 = plt.subplot2grid((3,3), (0,0), colspan=3) - ax2 = plt.subplot2grid((3,3), (1,0), colspan=2) - ax3 = plt.subplot2grid((3,3), (1, 2), rowspan=2) - ax4 = plt.subplot2grid((3,3), (2, 0)) - ax5 = plt.subplot2grid((3,3), (2, 1)) - -creates - -.. plot:: users/plotting/examples/demo_gridspec01.py - - -GridSpec and SubplotSpec -======================== - -You can create GridSpec explicitly and use them to create a Subplot. - -For example, :: - - ax = plt.subplot2grid((2,2),(0, 0)) - -is equal to :: - - import matplotlib.gridspec as gridspec - gs = gridspec.GridSpec(2, 2) - ax = plt.subplot(gs[0, 0]) - -A gridspec instance provides array-like (2d or 1d) indexing that -returns the SubplotSpec instance. For, SubplotSpec that spans multiple -cells, use slice. :: - - ax2 = plt.subplot(gs[1,:-1]) - ax3 = plt.subplot(gs[1:, -1]) - -The above example becomes :: - - gs = gridspec.GridSpec(3, 3) - ax1 = plt.subplot(gs[0, :]) - ax2 = plt.subplot(gs[1,:-1]) - ax3 = plt.subplot(gs[1:, -1]) - ax4 = plt.subplot(gs[-1,0]) - ax5 = plt.subplot(gs[-1,-2]) - -.. plot:: users/plotting/examples/demo_gridspec02.py - -Adjust GridSpec layout -====================== - -When a GridSpec is explicitly used, you can adjust the layout -parameters of subplots that are created from the gridspec. :: - - gs1 = gridspec.GridSpec(3, 3) - gs1.update(left=0.05, right=0.48, wspace=0.05) - -This is similar to *subplots_adjust*, but it only affects the subplots -that are created from the given GridSpec. - -The code below :: - - gs1 = gridspec.GridSpec(3, 3) - gs1.update(left=0.05, right=0.48, wspace=0.05) - ax1 = plt.subplot(gs1[:-1, :]) - ax2 = plt.subplot(gs1[-1, :-1]) - ax3 = plt.subplot(gs1[-1, -1]) - - gs2 = gridspec.GridSpec(3, 3) - gs2.update(left=0.55, right=0.98, hspace=0.05) - ax4 = plt.subplot(gs2[:, :-1]) - ax5 = plt.subplot(gs2[:-1, -1]) - ax6 = plt.subplot(gs2[-1, -1]) - -creates - -.. plot:: users/plotting/examples/demo_gridspec03.py - -GridSpec using SubplotSpec -========================== - -You can create GridSpec from the SubplotSpec, in which case its layout -parameters are set to that of the location of the given SubplotSpec. :: - - gs0 = gridspec.GridSpec(1, 2) - - gs00 = gridspec.GridSpecFromSubplotSpec(3, 3, subplot_spec=gs0[0]) - gs01 = gridspec.GridSpecFromSubplotSpec(3, 3, subplot_spec=gs0[1]) - - -.. plot:: users/plotting/examples/demo_gridspec04.py - - -A Complex Nested GridSpec using SubplotSpec -=========================================== - -Here's a more sophisticated example of nested gridspec where we put -a box around each cell of the outer 4x4 grid, by hiding appropriate -spines in each of the inner 3x3 grids. - -.. plot:: users/plotting/examples/demo_gridspec06.py - - -GridSpec with Varying Cell Sizes -================================ - -By default, GridSpec creates cells of equal sizes. You can adjust -relative heights and widths of rows and columns. Note that absolute -values are meaningless, only their relative ratios matter. :: - - gs = gridspec.GridSpec(2, 2, - width_ratios=[1,2], - height_ratios=[4,1] - ) - - ax1 = plt.subplot(gs[0]) - ax2 = plt.subplot(gs[1]) - ax3 = plt.subplot(gs[2]) - ax4 = plt.subplot(gs[3]) - - -.. plot:: users/plotting/examples/demo_gridspec05.py - diff --git a/dev/_sources/users/image_tutorial.txt b/dev/_sources/users/image_tutorial.txt deleted file mode 100644 index dbc74d66ea7..00000000000 --- a/dev/_sources/users/image_tutorial.txt +++ /dev/null @@ -1,397 +0,0 @@ -.. _image_tutorial: - - -************** -Image tutorial -************** - -.. _imaging_startup: - -Startup commands -=================== - -At the very least, you'll need to have access to the -:func:`~matplotlib.pyplot.imshow` function. There are a couple of -ways to do it. The easy way for an interactive environment:: - - $ipython -pylab - -The imshow function is now directly accessible (it's in your -`namespace `_). -See also :ref:`pyplot-tutorial`. - -The more expressive, easier to understand later method (use this in -your scripts to make it easier for others (including your future self) -to read) is to use the matplotlib API (see :ref:`artist-tutorial`) -where you use explicit namespaces and control object creation, etc... - -.. sourcecode:: ipython - - In [1]: import matplotlib.pyplot as plt - In [2]: import matplotlib.image as mpimg - In [3]: import numpy as np - -Examples below will use the latter method, for clarity. In these -examples, if you use the -pylab method, you can skip the "mpimg." and -"plt." prefixes. - -.. _importing_data: - -Importing image data into Numpy arrays -=============================================== - -Plotting image data is supported by the Python Image Library (`PIL -`_). Natively, matplotlib -only supports PNG images. The commands shown below fall back on PIL -if the native read fails. - -The image used in this example is a PNG file, but keep that PIL -requirement in mind for your own data. - -Here's the image we're going to play with: - -.. image:: ../_static/stinkbug.png - -It's a 24-bit RGB PNG image (8 bits for each of R, G, B). Depending -on where you get your data, the other kinds of image that you'll most -likely encounter are RGBA images, which allow for transparency, or -single-channel grayscale (luminosity) images. You can right click on -it and choose "Save image as" to download it to your computer for the -rest of this tutorial. - -And here we go... - -.. sourcecode:: ipython - - In [4]: img=mpimg.imread('stinkbug.png') - Out[4]: - array([[[ 0.40784314, 0.40784314, 0.40784314], - [ 0.40784314, 0.40784314, 0.40784314], - [ 0.40784314, 0.40784314, 0.40784314], - ..., - [ 0.42745098, 0.42745098, 0.42745098], - [ 0.42745098, 0.42745098, 0.42745098], - [ 0.42745098, 0.42745098, 0.42745098]], - - [[ 0.41176471, 0.41176471, 0.41176471], - [ 0.41176471, 0.41176471, 0.41176471], - [ 0.41176471, 0.41176471, 0.41176471], - ..., - [ 0.42745098, 0.42745098, 0.42745098], - [ 0.42745098, 0.42745098, 0.42745098], - [ 0.42745098, 0.42745098, 0.42745098]], - - [[ 0.41960785, 0.41960785, 0.41960785], - [ 0.41568628, 0.41568628, 0.41568628], - [ 0.41568628, 0.41568628, 0.41568628], - ..., - [ 0.43137255, 0.43137255, 0.43137255], - [ 0.43137255, 0.43137255, 0.43137255], - [ 0.43137255, 0.43137255, 0.43137255]], - - ..., - [[ 0.43921569, 0.43921569, 0.43921569], - [ 0.43529412, 0.43529412, 0.43529412], - [ 0.43137255, 0.43137255, 0.43137255], - ..., - [ 0.45490196, 0.45490196, 0.45490196], - [ 0.4509804 , 0.4509804 , 0.4509804 ], - [ 0.4509804 , 0.4509804 , 0.4509804 ]], - - [[ 0.44313726, 0.44313726, 0.44313726], - [ 0.44313726, 0.44313726, 0.44313726], - [ 0.43921569, 0.43921569, 0.43921569], - ..., - [ 0.4509804 , 0.4509804 , 0.4509804 ], - [ 0.44705883, 0.44705883, 0.44705883], - [ 0.44705883, 0.44705883, 0.44705883]], - - [[ 0.44313726, 0.44313726, 0.44313726], - [ 0.4509804 , 0.4509804 , 0.4509804 ], - [ 0.4509804 , 0.4509804 , 0.4509804 ], - ..., - [ 0.44705883, 0.44705883, 0.44705883], - [ 0.44705883, 0.44705883, 0.44705883], - [ 0.44313726, 0.44313726, 0.44313726]]], dtype=float32) - -Note the dtype there - float32. Matplotlib has rescaled the 8 bit -data from each channel to floating point data between 0.0 and 1.0. As -a side note, the only datatype that PIL can work with is uint8. -Matplotlib plotting can handle float32 and uint8, but image -reading/writing for any format other than PNG is limited to uint8 -data. Why 8 bits? Most displays can only render 8 bits per channel -worth of color gradation. Why can they only render 8 bits/channel? -Because that's about all the human eye can see. More here (from a -photography standpoint): `Luminous Landscape bit depth tutorial -`_. - -Each inner list represents a pixel. Here, with an RGB image, there -are 3 values. Since it's a black and white image, R, G, and B are all -similar. An RGBA (where A is alpha, or transparency), has 4 values -per inner list, and a simple luminance image just has one value (and -is thus only a 2-D array, not a 3-D array). For RGB and RGBA images, -matplotlib supports float32 and uint8 data types. For grayscale, -matplotlib supports only float32. If your array data does not meet -one of these descriptions, you need to rescale it. - -.. _plotting_data: - -Plotting numpy arrays as images -=================================== - -So, you have your data in a numpy array (either by importing it, or by -generating it). Let's render it. In Matplotlib, this is performed -using the :func:`~matplotlib.pyplot.imshow` function. Here we'll grab -the plot object. This object gives you an easy way to manipulate the -plot from the prompt. - -.. sourcecode:: ipython - - In [5]: imgplot = plt.imshow(img) - -.. plot:: - - import matplotlib.pyplot as plt - import matplotlib.image as mpimg - import numpy as np - img = mpimg.imread('../_static/stinkbug.png') - imgplot = plt.imshow(img) - -You can also plot any numpy array - just remember that the datatype -must be float32 (and range from 0.0 to 1.0) or uint8. - -.. _Pseudocolor: - -Applying pseudocolor schemes to image plots -------------------------------------------------- - -Pseudocolor can be a useful tool for enhancing contrast and -visualizing your data more easily. This is especially useful when -making presentations of your data using projectors - their contrast is -typically quite poor. - -Pseudocolor is only relevant to single-channel, grayscale, luminosity -images. We currently have an RGB image. Since R, G, and B are all -similar (see for yourself above or in your data), we can just pick one -channel of our data: - -.. sourcecode:: ipython - - In [6]: lum_img = img[:,:,0] - -This is array slicing. You can read more in the `Numpy tutorial -`_. - -.. sourcecode:: ipython - - In [7]: imgplot = plt.imshow(lum_img) - -.. plot:: - - import matplotlib.pyplot as plt - import matplotlib.image as mpimg - import numpy as np - img = mpimg.imread('../_static/stinkbug.png') - lum_img = img[:,:,0] - plt.imshow(lum_img) - -Now, with a luminosity image, the default colormap (aka lookup table, -LUT), is applied. The default is called jet. There are plenty of -others to choose from. Let's set some others using the -:meth:`~matplotlib.image.Image.set_cmap` method on our image plot -object: - -.. sourcecode:: ipython - - In [8]: imgplot.set_cmap('hot') - -.. plot:: - - import matplotlib.pyplot as plt - import matplotlib.image as mpimg - import numpy as np - img = mpimg.imread('../_static/stinkbug.png') - lum_img = img[:,:,0] - imgplot = plt.imshow(lum_img) - imgplot.set_cmap('hot') - -.. sourcecode:: ipython - - In [9]: imgplot.set_cmap('spectral') - -.. plot:: - - import matplotlib.pyplot as plt - import matplotlib.image as mpimg - import numpy as np - img = mpimg.imread('../_static/stinkbug.png') - lum_img = img[:,:,0] - imgplot = plt.imshow(lum_img) - imgplot.set_cmap('spectral') - -There are many other colormap schemes available. See the `list and -images of the colormaps -`_. - -.. _`Color Bars`: - -Color scale reference ------------------------- - -It's helpful to have an idea of what value a color represents. We can -do that by adding color bars. It's as easy as one line: - -.. sourcecode:: ipython - - In [10]: plt.colorbar() - -.. plot:: - - import matplotlib.pyplot as plt - import matplotlib.image as mpimg - import numpy as np - img = mpimg.imread('../_static/stinkbug.png') - lum_img = img[:,:,0] - imgplot = plt.imshow(lum_img) - imgplot.set_cmap('spectral') - plt.colorbar() - -This adds a colorbar to your existing figure. This won't -automatically change if you change you switch to a different -colormap - you have to re-create your plot, and add in the colorbar -again. - -.. _`Data ranges`: - -Examining a specific data range ---------------------------------- - -Sometimes you want to enhance the contrast in your image, or expand -the contrast in a particular region while sacrificing the detail in -colors that don't vary much, or don't matter. A good tool to find -interesting regions is the histogram. To create a histogram of our -image data, we use the :func:`~matplotlib.pyplot.hist` function. - -.. sourcecode:: ipython - - In[10]: plt.hist(lum_img.flatten(), 256, range=(0.0,1.0), fc='k', ec='k') - -.. plot:: - - import matplotlib.pyplot as plt - import matplotlib.image as mpimg - import numpy as np - img = mpimg.imread('../_static/stinkbug.png') - lum_img = img[:,:,0] - plt.hist(lum_img.flatten(), 256, range=(0.0,1.0), fc='black', ec='black') - -Most often, the "interesting" part of the image is around the peak, -and you can get extra contrast by clipping the regions above and/or -below the peak. In our histogram, it looks like there's not much -useful information in the high end (not many white things in the -image). Let's adjust the upper limit, so that we effectively "zoom in -on" part of the histogram. We do this by calling the -:meth:`~matplotlib.image.Image.set_clim` method of the image plot -object. - -.. sourcecode:: ipython - - In[11]: imgplot.set_clim(0.0,0.7) - -.. plot:: - - import matplotlib.pyplot as plt - import matplotlib.image as mpimg - import numpy as np - fig = plt.figure() - a=fig.add_subplot(1,2,1) - img = mpimg.imread('../_static/stinkbug.png') - lum_img = img[:,:,0] - imgplot = plt.imshow(lum_img) - a.set_title('Before') - plt.colorbar(ticks=[0.1,0.3,0.5,0.7], orientation ='horizontal') - a=fig.add_subplot(1,2,2) - imgplot = plt.imshow(lum_img) - imgplot.set_clim(0.0,0.7) - a.set_title('After') - plt.colorbar(ticks=[0.1,0.3,0.5,0.7], orientation='horizontal') - -.. _Interpolation: - -Array Interpolation schemes ---------------------------- - -Interpolation calculates what the color or value of a pixel "should" -be, according to different mathematical schemes. One common place -that this happens is when you resize an image. The number of pixels -change, but you want the same information. Since pixels are discrete, -there's missing space. Interpolation is how you fill that space. -This is why your images sometimes come out looking pixelated when you -blow them up. The effect is more pronounced when the difference -between the original image and the expanded image is greater. Let's -take our image and shrink it. We're effectively discarding pixels, -only keeping a select few. Now when we plot it, that data gets blown -up to the size on your screen. The old pixels aren't there anymore, -and the computer has to draw in pixels to fill that space. - -.. sourcecode:: ipython - - In [8]: import Image - In [9]: img = Image.open('stinkbug.png') # Open image as PIL image object - In [10]: rsize = img.resize((img.size[0]/10,img.size[1]/10)) # Use PIL to resize - In [11]: rsizeArr = np.asarray(rsize) # Get array back - In [12]: imgplot = plt.imshow(rsizeArr) - -.. plot:: - - import matplotlib.pyplot as plt - import matplotlib.image as mpimg - import numpy as np - import Image - img = Image.open('../_static/stinkbug.png') # opens the file using PIL - it's not an array yet - rsize = img.resize((img.size[0]/10,img.size[1]/10)) # resize the image - rsizeArr = np.asarray(rsize) - lum_img = rsizeArr[:,:,0] - imgplot = plt.imshow(rsizeArr) - -Here we have the default interpolation, bilinear, since we did not -give :func:`~matplotlib.pyplot.imshow` any interpolation argument. - -Let's try some others: - -.. sourcecode:: ipython - - In [10]: imgplot.set_interpolation('nearest') - -.. plot:: - - import matplotlib.pyplot as plt - import matplotlib.image as mpimg - import numpy as np - import Image - img = Image.open('../_static/stinkbug.png') # opens the file using PIL - it's not an array yet - rsize = img.resize((img.size[0]/10,img.size[1]/10)) # resize the image - rsizeArr = np.asarray(rsize) - lum_img = rsizeArr[:,:,0] - imgplot = plt.imshow(rsizeArr) - imgplot.set_interpolation('nearest') - -.. sourcecode:: ipython - - In [10]: imgplot.set_interpolation('bicubic') - -.. plot:: - - import matplotlib.pyplot as plt - import matplotlib.image as mpimg - import numpy as np - import Image - img = Image.open('../_static/stinkbug.png') # opens the file using PIL - it's not an array yet - rsize = img.resize((img.size[0]/10,img.size[1]/10)) # resize the image - rsizeArr = np.asarray(rsize) - lum_img = rsizeArr[:,:,0] - imgplot = plt.imshow(rsizeArr) - imgplot.set_interpolation('bicubic') - -Bicubic interpolation is often used when blowing up photos - people -tend to prefer blurry over pixelated. diff --git a/dev/_sources/users/index.txt b/dev/_sources/users/index.txt deleted file mode 100644 index 2b7e9a692a3..00000000000 --- a/dev/_sources/users/index.txt +++ /dev/null @@ -1,39 +0,0 @@ -.. _users-guide-index: - -############ -User's Guide -############ - -.. htmlonly:: - - :Release: |version| - :Date: |today| - -.. toctree:: - :maxdepth: 2 - - intro.rst - installing.rst - pyplot_tutorial.rst - navigation_toolbar.rst - customizing.rst - shell.rst - index_text.rst - image_tutorial.rst - artists.rst - gridspec.rst - tight_layout_guide.rst - legend_guide.rst - event_handling.rst - transforms_tutorial.rst - path_tutorial.rst - annotations_guide.rst - recipes.rst - screenshots.rst - whats_new.rst - github_stats.rst - license.rst - credits.rst - - - diff --git a/dev/_sources/users/index_text.txt b/dev/_sources/users/index_text.txt deleted file mode 100644 index bba1f330299..00000000000 --- a/dev/_sources/users/index_text.txt +++ /dev/null @@ -1,15 +0,0 @@ -.. _text-guide: - -Working with text -################# - -.. toctree:: - - text_intro.rst - text_props.rst - mathtext.rst - pgf.rst - usetex.rst - annotations_intro.rst - - diff --git a/dev/_sources/users/installing.txt b/dev/_sources/users/installing.txt deleted file mode 100644 index e43b117ebd0..00000000000 --- a/dev/_sources/users/installing.txt +++ /dev/null @@ -1,256 +0,0 @@ -.. The source of this document is INSTALL. During the doc build process, -.. this file is copied over to doc/users/installing.rst. -.. Therefore, you must edit INSTALL, *not* doc/users/installing.rst! - -********** -Installing -********** - -There are many different ways to install matplotlib, and the best way -depends on what operating system you are using, what you already have -installed, and how you want to use it. To avoid wading through all -the details (and potential complications) on this page, the easiest -thing for you to do is use one of the pre-packaged python -distributions that already provide matplotlib built-in. The Enthought -Python Distribution `(EPD) -`_ for Windows, OS X or -Redhat is an excellent choice that "just works" out of the box. -Another excellent alternative for Windows users is `Python (x, y) -`_ which tends to be updated a bit more -frequently. Both of these packages include matplotlib and pylab, and -*lots* of other useful tools. matplotlib is also packaged for almost -every major Linux distribution. So if you are on Linux, your package -manager will probably provide matplotlib prebuilt. - - -Manually installing pre-built packages -====================================== - -General instructions --------------------- - -For some people, the prepackaged pythons discussed above are not an -option. That's OK, it's usually pretty easy to get a custom install -working. You will first need to find out if you have python installed -on your machine, and if not, install it. The official python builds -are available for download `here `_, -but OS X users please read :ref:`which-python-for-osx`. - -Once you have python up and running, you will need to install `numpy -`_. numpy provides high-performance array data -structures and mathematical functions, and is a requirement for -matplotlib. You can test your progress:: - - >>> import numpy - >>> print numpy.__version__ - -matplotlib requires numpy version |minimum_numpy_version| or later. -Although it is not a requirement to use matplotlib, we strongly -encourage you to install `ipython `_, which is an -interactive shell for python that is matplotlib-aware. - -Next, we need to get matplotlib installed. We provide prebuilt -binaries for OS X and Windows on the matplotlib `download -`_ page. Click on -the latest release of the "matplotlib" package, choose your python -version (2.6, 2.7 or 3.2) and your platform (macosx or win32). If you -have any problems, please check the :ref:`installing-faq`, search -using Google, and/or post a question the `mailing list -`_. - -If you are on Debian/Ubuntu linux, it suffices to do:: - - > sudo apt-get install python-matplotlib - -Instructions for installing our OSX binaries are found in the FAQ -:ref:`install_osx_binaries`. - - -Once you have ipython, numpy and matplotlib installed, you can use -ipython's "pylab" mode to have a MATLAB-like environment that automatically -handles most of the configuration details for you, so you can get up -and running quickly:: - - johnh@flag:~> ipython -pylab - Python 2.4.5 (#4, Apr 12 2008, 09:09:16) - IPython 0.9.0 -- An enhanced Interactive Python. - - Welcome to pylab, a matplotlib-based Python environment. - For more information, type 'help(pylab)'. - - In [1]: x = randn(10000) - - In [2]: hist(x, 100) - -Note that when testing matplotlib installations from the interactive -python console, there are some issues relating to user interface -toolkits and interactive settings that are discussed in -:ref:`mpl-shell`. - -Installing on Windows ---------------------- - -If you don't already have python installed, you may want to consider -using the Enthought edition of python, which has scipy, numpy, and -wxpython, plus many other useful packages, preinstalled - `Enthought -Python `_. With the Enthought -edition of python + matplotlib installer, the following backends -should work out of the box: agg, wx, wxagg, tkagg, ps, pdf and svg. - -For standard python installations, you will also need to install numpy -in addition to the matplotlib installer. On some systems you will -also need to download msvcp71.dll library, which you can download from -http://www.dll-files.com/dllindex/dll-files.shtml?msvcp71 or other -sites. You will need to unzip the archive and drag the dll into -:file:`c:\windows\system32`. - -All of the GUI backends run on Windows, but TkAgg is probably the -best for interactive use from the standard python shell or ipython. -The Windows installer (:file:`*.exe`) on the download page contains all the -code you need to get up and running. However, there are many -examples that are not included in the Windows installer. If you -want to try the many demos that come in the matplotlib source -distribution, download the zip file and look in the :file:`examples` -subdirectory. - -.. _install_from_source: - -Installing from source -====================== - -If you are interested in contributing to matplotlib development, -running the latest source code, or just like to build everything -yourself, it is not difficult to build matplotlib from source. Grab -the latest *tar.gz* release file from `the download page -`_, or if you want -to develop matplotlib or just need the latest bugfixed version, grab -the latest git version :ref:`install-from-git`. - -Once you have satisfied the requirements detailed below (mainly -python, numpy, libpng and freetype), you can build matplotlib:: - - cd matplotlib - python setup.py build - python setup.py install - -We provide a `setup.cfg -`_ -file that goes with :file:`setup.py` which you can use to customize -the build process. For example, which default backend to use, whether -some of the optional libraries that matplotlib ships with are -installed, and so on. This file will be particularly useful to those -packaging matplotlib. - -If you have installed prerequisites to nonstandard places and need to -inform matplotlib where they are, edit ``setupext.py`` and add the base -dirs to the ``basedir`` dictionary entry for your ``sys.platform``. -e.g., if the header to some required library is in -``/some/path/include/someheader.h``, put ``/some/path`` in the -``basedir`` list for your platform. - -.. _install_requirements: - -Build requirements -================== - -These are external packages which you will need to install before -installing matplotlib. Windows users only need the first two (python -and numpy) since the others are built into the matplotlib Windows -installers available for download at `the download page -_`. If you are -building on OSX, see :ref:`build_osx`. If you are installing -dependencies with a package manager on Linux, you may need to install -the development packages (look for a "-dev" postfix) in addition to -the libraries themselves. - -.. note:: - - If you are on debian/ubuntu, you can get all the dependencies - required to build matplotlib with:: - - sudo apt-get build-dep python-matplotlib - - If you are on Fedora/RedHat, you can get all the dependencies - required to build matplotlib by first installing ``yum-builddep`` - and then running:: - - su -c "yum-builddep python-matplotlib" - - This does not build matplotlib, but it does get the install the - build dependencies, which will make building from source easier. - -:term:`python` 2.6, 2.7, 3.1 or 3.2 - `Download python `_. - -:term:`numpy` |minimum_numpy_version| (or later) - array support for python (`download `_) - -libpng 1.2 (or later) - library for loading and saving :term:`PNG` files (`download - `__). libpng requires - zlib. If you are a Windows user, you can ignore this because we - build support into the matplotlib single-click installer - -:term:`freetype` 1.4 (or later) - library for reading true type font files. If you are a windows - user, you can ignore this since we build support into the - matplotlib single click installer. - -:term:`dateutil` 1.1 or later - Provides extensions to python datetime handling. If using pip, - easy_install or installing from source, the installer will attempt - to download and install `python_dateutil` from PyPI. - -:term:`pyparsing` - Required for matplotlib's mathtext math rendering support. If - using pip, easy_install or installing from source, the installer - will attempt to download and install `pyparsing` from PyPI. - -**Optional** - -These are optional packages which you may want to install to use -matplotlib with a user interface toolkit. See -:ref:`what-is-a-backend` for more details on the optional matplotlib -backends and the capabilities they provide. - -:term:`tk` 8.3 or later - The TCL/Tk widgets library used by the TkAgg backend - -:term:`pyqt` 3.1 or later - The Qt3 widgets library python wrappers for the QtAgg backend - -:term:`pyqt` 4.0 or later - The Qt4 widgets library python wrappers for the Qt4Agg backend - -:term:`pygtk` 2.4 or later - The python wrappers for the GTK widgets library for use with the - GTK or GTKAgg backend - -:term:`wxpython` 2.8 or later - The python wrappers for the wx widgets library for use with the - WX or WXAgg backend - -:term:`pyfltk` 1.0 or later - The python wrappers of the FLTK widgets library for use with FLTKAgg - -**Required libraries that ship with matplotlib** - -:term:`agg` 2.4 - The antigrain C++ rendering engine. matplotlib links against the - agg template source statically, so it will not affect anything on - your system outside of matplotlib. - -:term:`PyCXX` 6.2.4 - A library for writing Python extensions in C++. - -.. _build_osx: - -Building on OSX -=============== - -The build situation on OSX is complicated by the various places one -can get the libpng and freetype requirements (darwinports, fink, -/usr/X11R6) and the different architectures (e.g., x86, ppc, universal) and -the different OSX version (e.g., 10.4 and 10.5). We recommend that you build -the way we do for the OSX release: get the source from the tarball or the -git repository and follow the instruction in :file:`README.osx`. diff --git a/dev/_sources/users/intro.txt b/dev/_sources/users/intro.txt deleted file mode 100644 index dc7a8df3d43..00000000000 --- a/dev/_sources/users/intro.txt +++ /dev/null @@ -1,95 +0,0 @@ -Introduction -============ - -matplotlib is a library for making 2D plots of arrays in `Python -`_. Although it has its origins in emulating -the MATLAB |reg| [*]_ graphics commands, it is -independent of MATLAB, and can be used in a Pythonic, object oriented -way. Although matplotlib is written primarily in pure Python, it -makes heavy use of `NumPy `_ and other extension -code to provide good performance even for large arrays. - -.. |reg| unicode:: 0xAE - :ltrim: - -matplotlib is designed with the philosophy that you should be able to -create simple plots with just a few commands, or just one! If you -want to see a histogram of your data, you shouldn't need to -instantiate objects, call methods, set properties, and so on; it -should just work. - -For years, I used to use MATLAB exclusively for data analysis and -visualization. MATLAB excels at making nice looking plots easy. When -I began working with EEG data, I found that I needed to write -applications to interact with my data, and developed and EEG analysis -application in MATLAB. As the application grew in complexity, -interacting with databases, http servers, manipulating complex data -structures, I began to strain against the limitations of MATLAB as a -programming language, and decided to start over in Python. Python -more than makes up for all of MATLAB's deficiencies as a programming -language, but I was having difficulty finding a 2D plotting package -(for 3D `VTK `_ more than exceeds all of my -needs). - -When I went searching for a Python plotting package, I had several -requirements: - -* Plots should look great - publication quality. One important - requirement for me is that the text looks good (antialiased, etc.) - -* Postscript output for inclusion with TeX documents - -* Embeddable in a graphical user interface for application - development - -* Code should be easy enough that I can understand it and extend - it - -* Making plots should be easy - -Finding no package that suited me just right, I did what any -self-respecting Python programmer would do: rolled up my sleeves and -dived in. Not having any real experience with computer graphics, I -decided to emulate MATLAB's plotting capabilities because that is -something MATLAB does very well. This had the added advantage that -many people have a lot of MATLAB experience, and thus they can -quickly get up to steam plotting in python. From a developer's -perspective, having a fixed user interface (the pylab interface) has -been very useful, because the guts of the code base can be redesigned -without affecting user code. - -The matplotlib code is conceptually divided into three parts: the -*pylab interface* is the set of functions provided by -:mod:`matplotlib.pylab` which allow the user to create plots with code -quite similar to MATLAB figure generating code -(:ref:`pyplot-tutorial`). The *matplotlib frontend* or *matplotlib -API* is the set of classes that do the heavy lifting, creating and -managing figures, text, lines, plots and so on -(:ref:`artist-tutorial`). This is an abstract interface that knows -nothing about output. The *backends* are device dependent drawing -devices, aka renderers, that transform the frontend representation to -hardcopy or a display device (:ref:`what-is-a-backend`). Example -backends: PS creates `PostScript® -`_ hardcopy, SVG -creates `Scalable Vector Graphics `_ -hardcopy, Agg creates PNG output using the high quality `Anti-Grain -Geometry `_ library that ships with -matplotlib, GTK embeds matplotlib in a `Gtk+ `_ -application, GTKAgg uses the Anti-Grain renderer to create a figure -and embed it a Gtk+ application, and so on for `PDF -`_, `WxWidgets -`_, `Tkinter -`_ etc. - -matplotlib is used by many people in many different contexts. Some -people want to automatically generate PostScript files to send -to a printer or publishers. Others deploy matplotlib on a web -application server to generate PNG output for inclusion in -dynamically-generated web pages. Some use matplotlib interactively -from the Python shell in Tkinter on Windows™. My primary use is to -embed matplotlib in a Gtk+ EEG application that runs on Windows, Linux -and Macintosh OS X. - -.. [*] MATLAB is a registered trademark of The MathWorks, Inc. - - diff --git a/dev/_sources/users/legend_guide.txt b/dev/_sources/users/legend_guide.txt deleted file mode 100644 index 7c718de5d3f..00000000000 --- a/dev/_sources/users/legend_guide.txt +++ /dev/null @@ -1,318 +0,0 @@ -.. _plotting-guide-legend: - -************ -Legend guide -************ - -Do not proceed unless you already have read :func:`~matplotlib.pyplot.legend` -and :class:`matplotlib.legend.Legend`! - - -What to be displayed -==================== - -The legend command has a following call signature:: - - legend(*args, **kwargs) - -If len(args) is 2, the first argument should be a list of artist to be -labeled, and the second argument should a list of string labels. If -len(args) is 0, it automatically generate the legend from label -properties of the child artists by calling -:meth:`~matplotlib.axes.Axes.get_legend_handles_labels` method. -For example, *ax.legend()* is equivalent to:: - - handles, labels = ax.get_legend_handles_labels() - ax.legend(handles, labels) - -The :meth:`~matplotlib.axes.Axes.get_legend_handles_labels` method -returns a tuple of two lists, i.e., list of artists and list of labels -(python string). However, it does not return all of its child -artists. It returns artists that are currently supported by matplotlib. - -For matplotlib v1.0 and earlier, the supported artists are as follows. - - * :class:`~matplotlib.lines.Line2D` - * :class:`~matplotlib.patches.Patch` - * :class:`~matplotlib.collections.LineCollection` - * :class:`~matplotlib.collections.RegularPolyCollection` - * :class:`~matplotlib.collections.CircleCollection` - -And, :meth:`~matplotlib.axes.Axes.get_legend_handles_labels` returns -all artists in *ax.lines*, *ax.patches* and -artists in *ax.collection* which are instance of -:class:`~matplotlib.collections.LineCollection` or -:class:`~matplotlib.collections.RegularPolyCollection`. The label -attributes (returned by get_label() method) of collected artists are -used as text labels. If label attribute is empty string or starts with -"_", those artists will be ignored. - - -Therefore, plots drawn by some *pyplot* commands are not supported by -legend. For example, :func:`~matplotlib.pyplot.fill_between` creates -:class:`~matplotlib.collections.PolyCollection` that is not -supported. Also support is limited for some commands that create -multiple artists. For example, :func:`~matplotlib.pyplot.errorbar` -creates multiples :class:`~matplotlib.lines.Line2D` instances. - -Unfortunately, there is no easy workaround when you need legend for an -artist not supported by matplotlib (You may use one of the supported -artist as a proxy. See below) - -In newer version of matplotlib (v1.1 and later), the matplotlib -internals are revised to support - - * complex plots that creates multiple artists (e.g., bar, errorbar, etc) - * custom legend handles - -See below for details of new functionality. - - -Adjusting the Order of Legend items ------------------------------------ - -When you want to customize the list of artists to be displayed in the -legend, or their order of appearance. There are a two options. First, -you can keep lists of artists and labels, and explicitly use these for -the first two argument of the legend call.:: - - p1, = plot([1,2,3]) - p2, = plot([3,2,1]) - p3, = plot([2,3,1]) - legend([p2, p1], ["line 2", "line 1"]) - -Or you may use :meth:`~matplotlib.axes.Axes.get_legend_handles_labels` -to retrieve list of artist and labels and manipulate them before -feeding them to legend call.:: - - ax = subplot(1,1,1) - p1, = ax.plot([1,2,3], label="line 1") - p2, = ax.plot([3,2,1], label="line 2") - p3, = ax.plot([2,3,1], label="line 3") - - handles, labels = ax.get_legend_handles_labels() - - # reverse the order - ax.legend(handles[::-1], labels[::-1]) - - # or sort them by labels - import operator - hl = sorted(zip(handles, labels), - key=operator.itemgetter(1)) - handles2, labels2 = zip(*hl) - - ax.legend(handles2, labels2) - - -Using Proxy Artist ------------------- - -When you want to display legend for an artist not supported by -matplotlib, you may use another artist as a proxy. For -example, you may create a proxy artist without adding it to the axes -(so the proxy artist will not be drawn in the main axes) and feed it -to the legend function.:: - - p = Rectangle((0, 0), 1, 1, fc="r") - legend([p], ["Red Rectangle"]) - - -Multicolumn Legend -================== - -By specifying the keyword argument *ncol*, you can have a multi-column -legend. Also, mode="expand" horizontally expand the legend to fill the -axes area. See `legend_demo3.py -`_ -for example. - - -Legend location -=============== - -The location of the legend can be specified by the keyword argument -*loc*, either by string or a integer number. - -============= ====== - String Number -============= ====== - upper right 1 - upper left 2 - lower left 3 - lower right 4 - right 5 - center left 6 - center right 7 - lower center 8 - upper center 9 - center 10 -============= ====== - -By default, the legend will anchor to the bbox of the axes -(for legend) or the bbox of the figure (figlegend). You can specify -your own bbox using *bbox_to_anchor* argument. *bbox_to_anchor* can be an -instance of :class:`~matplotlib.transforms.BboxBase`, a tuple of 4 -floats (x, y, width, height of the bbox), or a tuple of 2 floats (x, y -with width=height=0). Unless *bbox_transform* argument is given, the -coordinates (even for the bbox instance) are considered as normalized -axes coordinates. - -For example, if you want your axes legend located at the figure corner -(instead of the axes corner):: - - l = legend(bbox_to_anchor=(0, 0, 1, 1), bbox_transform=gcf().transFigure) - -Also, you can place above or outer right-hand side of the axes, - -.. plot:: users/plotting/examples/simple_legend01.py - :include-source: - - -Multiple Legend -=============== - -Sometime, you want to split the legend into multiple ones.:: - - p1, = plot([1,2,3]) - p2, = plot([3,2,1]) - legend([p1], ["Test1"], loc=1) - legend([p2], ["Test2"], loc=4) - -However, the above code only shows the second legend. When the legend -command is called, a new legend instance is created and old ones are -removed from the axes. Thus, you need to manually add the removed -legend. - -.. plot:: users/plotting/examples/simple_legend02.py - :include-source: - -.. _legend-complex-plots: - -Legend of Complex Plots -======================= - -In matplotlib v1.1 and later, the legend is -improved to support more plot commands and ease the customization. - -Artist Container ----------------- - -The Artist Container is simple class (derived from tuple) that -contains multiple artists. This is introduced primarily to support -legends for complex plot commands that create multiple artists. - -Axes instances now have a "containers" attribute (which is a list, and -this is only intended to be used for generating a legend). The items -in this attribute are also returned by -:meth:`~matplotlib.axes.Axes.get_legend_handles_labels`. - -For example, "bar" command creates a series of Rectangle -patches. Previously, it returned a list of these patches. With the -current change, it creates a container object of these rectangle -patches (and these patches are added to Axes.patches attribute as -before) and return it instead. As the container class is derived from -a tuple, it should be backward-compatible. Furthermore, the container -object is added to the Axes.containers attributes so that legend -command can properly create a legend for the bar. Thus, you may do :: - - b1 = bar([0, 1, 2], [0.2, 0.3, 0.1], width=0.4, - label="Bar 1", align="center") - legend() - -or :: - - b1 = bar([0, 1, 2], [0.2, 0.3, 0.1], width=0.4, align="center") - legend([b1], ["Bar 1"]) - - -At this time of writing, however, only "bar", "errorbar", and "stem" are -supported (hopefully the list will increase). Here is an example. - -.. plot:: mpl_examples/pylab_examples/legend_demo4.py - -Legend Handler --------------- - -One of the changes is that drawing of legend handles has been delegated to -legend handlers. For example, :class:`~matplotlib.lines.Line2D` -instances are handled by -:class:`~matplotlib.legend_handler.HandlerLine2D`. The mapping -between the artists and their corresponding handlers are defined in a -handler_map of the legend. The handler_map is a dictionary of -key-handler pair, where key can be an artist instance or its -class. And the handler is a Handler instance. - -Let's consider the following sample code, :: - - legend([p_1, p_2,..., p_i, ...], ["Test 1", "Test 2", ..., "Test i",...]) - -For each *p_i*, matplotlib - - 1. check if *p_i* is in the handler_map - 2. if not, iterate over type(p_i).mro() until a matching key is found - in the handler_map - - -Unless specified, the default handler_map is used. Below is a partial -list of key-handler pairs included in the default handler map. - - * Line2D : legend_handler.HandlerLine2D() - * Patch : legend_handler.HandlerPatch() - * LineCollection : legend_handler.HandlerLineCollection() - * ... - - -The legend() command takes an optional argument of "handler_map". When -provided, the default handler map will be updated (using dict.update -method) with the provided one. :: - - p1, = plot(x, "ro", label="test1") - p2, = plot(y, "b+", ms=10, label="test2") - - my_handler = HandlerLine2D(numpoints=1) - - legend(handler_map={Line2D:my_handler}) - -The above example will use *my_handler* for any Line2D -instances (p1 and p2). :: - - legend(handler_map={p1:HandlerLine2D(numpoints=1)}) - -In the above example, only *p1* will be handled by *my_handler*, while -others will be handled by default handlers. - -The current default handler_map has handlers for errorbar and bar -plots. Also, it includes an entry for `tuple` which is mapped to -`HandlerTuple`. It simply plots over all the handles for items in the -given tuple. For example, - - -.. plot:: - :include-source: - - z = np.random.randn(10) - - p1a, = plt.plot(z, "ro", ms=10, mfc="r", mew=2, mec="r") # red filled circle - p1b, = plt.plot(z[:5], "w+", ms=10, mec="w", mew=2) # white cross - - plt.legend([p1a, (p1a, p1b)], ["Attr A", "Attr A+B"]) - - - -Implement a Custom Handler --------------------------- - -Handler can be any callable object with following signature. :: - - def __call__(self, legend, orig_handle, - fontsize, - handlebox): - -Where *legend* is the legend itself, *orig_handle* is the original -plot (*p_i* in the above example), *fontsize* is the fontsize in -pixels, and *handlebox* is a OffsetBox instance. Within the call, you -create relevant artists (using relevant properties from the *legend* -and/or *orig_handle*) and add them into the handlebox. The artists -needs to be scaled according to the fontsize (note that the size is in -pixel, i.e., this is dpi-scaled value). See :mod:`~matplotlib.legend_handler` -for more details. diff --git a/dev/_sources/users/license.txt b/dev/_sources/users/license.txt deleted file mode 100644 index acf401c29e4..00000000000 --- a/dev/_sources/users/license.txt +++ /dev/null @@ -1,65 +0,0 @@ -.. _license: - -*********************************************** -License -*********************************************** - - -Matplotlib only uses BSD compatible code, and its license is based on -the `PSF `_ license. See the Open -Source Initiative `licenses page -`_ for details on individual -licenses. Non-BSD compatible licenses (eg LGPL) are acceptable in -matplotlib toolkits. For a discussion of the motivations behind the -licencing choice, see :ref:`license-discussion`. - - -License agreement for matplotlib |version| -============================================== - -1. This LICENSE AGREEMENT is between John D. Hunter ("JDH"), and the -Individual or Organization ("Licensee") accessing and otherwise using -matplotlib software in source or binary form and its associated -documentation. - -2. Subject to the terms and conditions of this License Agreement, JDH -hereby grants Licensee a nonexclusive, royalty-free, world-wide license -to reproduce, analyze, test, perform and/or display publicly, prepare -derivative works, distribute, and otherwise use matplotlib |version| -alone or in any derivative version, provided, however, that JDH's -License Agreement and JDH's notice of copyright, i.e., "Copyright (c) -2002-2009 John D. Hunter; All Rights Reserved" are retained in -matplotlib |version| alone or in any derivative version prepared by -Licensee. - -3. In the event Licensee prepares a derivative work that is based on or -incorporates matplotlib |version| or any part thereof, and wants to -make the derivative work available to others as provided herein, then -Licensee hereby agrees to include in any such work a brief summary of -the changes made to matplotlib |version|. - -4. JDH is making matplotlib |version| available to Licensee on an "AS -IS" basis. JDH MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR -IMPLIED. BY WAY OF EXAMPLE, BUT NOT LIMITATION, JDH MAKES NO AND -DISCLAIMS ANY REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR FITNESS -FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF MATPLOTLIB |version| -WILL NOT INFRINGE ANY THIRD PARTY RIGHTS. - -5. JDH SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF MATPLOTLIB -|version| FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR -LOSS AS A RESULT OF MODIFYING, DISTRIBUTING, OR OTHERWISE USING -MATPLOTLIB |version|, OR ANY DERIVATIVE THEREOF, EVEN IF ADVISED OF -THE POSSIBILITY THEREOF. - -6. This License Agreement will automatically terminate upon a material -breach of its terms and conditions. - -7. Nothing in this License Agreement shall be deemed to create any -relationship of agency, partnership, or joint venture between JDH and -Licensee. This License Agreement does not grant permission to use JDH -trademarks or trade name in a trademark sense to endorse or promote -products or services of Licensee, or any third party. - -8. By copying, installing or otherwise using matplotlib |version|, -Licensee agrees to be bound by the terms and conditions of this License -Agreement. diff --git a/dev/_sources/users/mathtext.txt b/dev/_sources/users/mathtext.txt deleted file mode 100644 index 833e86455fe..00000000000 --- a/dev/_sources/users/mathtext.txt +++ /dev/null @@ -1,351 +0,0 @@ -.. _mathtext-tutorial: - -Writing mathematical expressions -================================ - -You can use a subset TeX markup in any matplotlib text string by -placing it inside a pair of dollar signs ($). - -Note that you do not need to have TeX installed, since matplotlib -ships its own TeX expression parser, layout engine and fonts. The -layout engine is a fairly direct adaptation of the layout algorithms -in Donald Knuth's TeX, so the quality is quite good (matplotlib also -provides a ``usetex`` option for those who do want to call out to TeX -to generate their text (see :ref:`usetex-tutorial`). - -Any text element can use math text. You should use raw strings -(precede the quotes with an ``'r'``), and surround the math text with -dollar signs ($), as in TeX. Regular text and mathtext can be -interleaved within the same string. Mathtext can use the Computer -Modern fonts (from (La)TeX), `STIX `_ -fonts (with are designed to blend well with Times) or a Unicode font -that you provide. The mathtext font can be selected with the -customization variable ``mathtext.fontset`` (see -:ref:`customizing-matplotlib`) - -.. note:: - On `"narrow" `_ builds - of Python, if you use the STIX fonts you should also set - ``ps.fonttype`` and ``pdf.fonttype`` to 3 (the default), not 42. - Otherwise `some characters will not be visible - `_. - -Here is a simple example:: - - # plain text - plt.title('alpha > beta') - -produces "alpha > beta". - -Whereas this:: - - # math text - plt.title(r'$\alpha > \beta$') - -produces ":math:`\alpha > \beta`". - -.. note:: - Mathtext should be placed between a pair of dollar signs ($). To - make it easy to display monetary values, e.g., "$100.00", if a - single dollar sign is present in the entire string, it will be - displayed verbatim as a dollar sign. This is a small change from - regular TeX, where the dollar sign in non-math text would have to - be escaped ('\$'). - -.. note:: - While the syntax inside the pair of dollar signs ($) aims to be - TeX-like, the text outside does not. In particular, characters - such as:: - - # $ % & ~ _ ^ \ { } \( \) \[ \] - - have special meaning outside of math mode in TeX. Therefore, these - characters will behave differently depending on the rcParam - ``text.usetex`` flag. See the :ref:`usetex tutorial - ` for more information. - -Subscripts and superscripts ---------------------------- - -To make subscripts and superscripts, use the ``'_'`` and ``'^'`` symbols:: - - r'$\alpha_i > \beta_i$' - -.. math:: - - \alpha_i > \beta_i - -Some symbols automatically put their sub/superscripts under and over -the operator. For example, to write the sum of :math:`x_i` from :math:`0` to -:math:`\infty`, you could do:: - - r'$\sum_{i=0}^\infty x_i$' - -.. math:: - - \sum_{i=0}^\infty x_i - -Fractions, binomials and stacked numbers ----------------------------------------- - -Fractions, binomials and stacked numbers can be created with the -``\frac{}{}``, ``\binom{}{}`` and ``\stackrel{}{}`` commands, -respectively:: - - r'$\frac{3}{4} \binom{3}{4} \stackrel{3}{4}$' - -produces - -.. math:: - - \frac{3}{4} \binom{3}{4} \stackrel{3}{4} - -Fractions can be arbitrarily nested:: - - r'$\frac{5 - \frac{1}{x}}{4}$' - -produces - -.. math:: - - \frac{5 - \frac{1}{x}}{4} - -Note that special care needs to be taken to place parentheses and brackets around -fractions. Doing things the obvious way produces brackets that are -too small:: - - r'$(\frac{5 - \frac{1}{x}}{4})$' - -.. math :: - - (\frac{5 - \frac{1}{x}}{4}) - -The solution is to precede the bracket with ``\left`` and ``\right`` -to inform the parser that those brackets encompass the entire object:: - - r'$\left(\frac{5 - \frac{1}{x}}{4}\right)$' - -.. math :: - - \left(\frac{5 - \frac{1}{x}}{4}\right) - -Radicals --------- - -Radicals can be produced with the ``\sqrt[]{}`` command. For example:: - - r'$\sqrt{2}$' - -.. math :: - - \sqrt{2} - -Any base can (optionally) be provided inside square brackets. Note -that the base must be a simple expression, and can not contain layout -commands such as fractions or sub/superscripts:: - - r'$\sqrt[3]{x}$' - -.. math :: - - \sqrt[3]{x} - -Fonts ------ - -The default font is *italics* for mathematical symbols. - -.. note:: - - This default can be changed using the ``mathtext.default`` rcParam. - This is useful, for example, to use the same font as regular - non-math text for math text, by setting it to ``regular``. - -To change fonts, eg, to write "sin" in a Roman font, enclose the text -in a font command:: - - r'$s(t) = \mathcal{A}\mathrm{sin}(2 \omega t)$' - -.. math:: - - s(t) = \mathcal{A}\mathrm{sin}(2 \omega t) - -More conveniently, many commonly used function names that are typeset in a -Roman font have shortcuts. So the expression above could be written -as follows:: - - r'$s(t) = \mathcal{A}\sin(2 \omega t)$' - -.. math:: - - s(t) = \mathcal{A}\sin(2 \omega t) - -Here "s" and "t" are variable in italics font (default), "sin" is in -Roman font, and the amplitude "A" is in calligraphy font. Note in the -example above the caligraphy ``A`` is squished into the ``sin``. You -can use a spacing command to add a little whitespace between them:: - - s(t) = \mathcal{A}\/\sin(2 \omega t) - -.. math:: - - s(t) = \mathcal{A}\/\sin(2 \omega t) - -The choices available with all fonts are: - - ============================ ================================== - Command Result - ============================ ================================== - ``\mathrm{Roman}`` :math:`\mathrm{Roman}` - ``\mathit{Italic}`` :math:`\mathit{Italic}` - ``\mathtt{Typewriter}`` :math:`\mathtt{Typewriter}` - ``\mathcal{CALLIGRAPHY}`` :math:`\mathcal{CALLIGRAPHY}` - ============================ ================================== - -.. role:: math-stix(math) - :fontset: stix - -When using the `STIX `_ fonts, you also have the choice of: - - ====================================== ========================================= - Command Result - ====================================== ========================================= - ``\mathbb{blackboard}`` :math-stix:`\mathbb{blackboard}` - ``\mathrm{\mathbb{blackboard}}`` :math-stix:`\mathrm{\mathbb{blackboard}}` - ``\mathfrak{Fraktur}`` :math-stix:`\mathfrak{Fraktur}` - ``\mathsf{sansserif}`` :math-stix:`\mathsf{sansserif}` - ``\mathrm{\mathsf{sansserif}}`` :math-stix:`\mathrm{\mathsf{sansserif}}` - ====================================== ========================================= - -.. htmlonly:: - - ====================================== ========================================= - ``\mathcircled{circled}`` :math-stix:`\mathcircled{circled}` - ====================================== ========================================= - -There are also three global "font sets" to choose from, which are -selected using the ``mathtext.fontset`` parameter in -:ref:`matplotlibrc `. - -``cm``: **Computer Modern (TeX)** - -.. image:: ../_static/cm_fontset.png - -``stix``: **STIX** (designed to blend well with Times) - -.. image:: ../_static/stix_fontset.png - -``stixsans``: **STIX sans-serif** - -.. image:: ../_static/stixsans_fontset.png - -Additionally, you can use ``\mathdefault{...}`` or its alias -``\mathregular{...}`` to use the font used for regular text outside of -mathtext. There are a number of limitations to this approach, most -notably that far fewer symbols will be available, but it can be useful -to make math expressions blend well with other text in the plot. - -Custom fonts -~~~~~~~~~~~~ - -mathtext also provides a way to use custom fonts for math. This -method is fairly tricky to use, and should be considered an -experimental feature for patient users only. By setting the rcParam -``mathtext.fontset`` to ``custom``, you can then set the following -parameters, which control which font file to use for a particular set -of math characters. - - ============================== ================================= - Parameter Corresponds to - ============================== ================================= - ``mathtext.it`` ``\mathit{}`` or default italic - ``mathtext.rm`` ``\mathrm{}`` Roman (upright) - ``mathtext.tt`` ``\mathtt{}`` Typewriter (monospace) - ``mathtext.bf`` ``\mathbf{}`` bold italic - ``mathtext.cal`` ``\mathcal{}`` calligraphic - ``mathtext.sf`` ``\mathsf{}`` sans-serif - ============================== ================================= - -Each parameter should be set to a fontconfig font descriptor (as -defined in the yet-to-be-written font chapter). - -.. TODO: Link to font chapter - -The fonts used should have a Unicode mapping in order to find any -non-Latin characters, such as Greek. If you want to use a math symbol -that is not contained in your custom fonts, you can set the rcParam -``mathtext.fallback_to_cm`` to ``True`` which will cause the mathtext -system to use characters from the default Computer Modern fonts -whenever a particular character can not be found in the custom font. - -Note that the math glyphs specified in Unicode have evolved over time, -and many fonts may not have glyphs in the correct place for mathtext. - -Accents -------- - -An accent command may precede any symbol to add an accent above it. -There are long and short forms for some of them. - - ============================== ================================= - Command Result - ============================== ================================= - ``\acute a`` or ``\'a`` :math:`\acute a` - ``\bar a`` :math:`\bar a` - ``\breve a`` :math:`\breve a` - ``\ddot a`` or ``\"a`` :math:`\ddot a` - ``\dot a`` or ``\.a`` :math:`\dot a` - ``\grave a`` or ``\`a`` :math:`\grave a` - ``\hat a`` or ``\^a`` :math:`\hat a` - ``\tilde a`` or ``\~a`` :math:`\tilde a` - ``\vec a`` :math:`\vec a` - ``\overline{abc}`` :math:`\overline{abc}` - ============================== ================================= - -In addition, there are two special accents that automatically adjust -to the width of the symbols below: - - ============================== ================================= - Command Result - ============================== ================================= - ``\widehat{xyz}`` :math:`\widehat{xyz}` - ``\widetilde{xyz}`` :math:`\widetilde{xyz}` - ============================== ================================= - -Care should be taken when putting accents on lower-case i's and j's. -Note that in the following ``\imath`` is used to avoid the extra dot -over the i:: - - r"$\hat i\ \ \hat \imath$" - -.. math:: - - \hat i\ \ \hat \imath - -Symbols -------- - -You can also use a large number of the TeX symbols, as in ``\infty``, -``\leftarrow``, ``\sum``, ``\int``. - -.. math_symbol_table:: - -If a particular symbol does not have a name (as is true of many of the -more obscure symbols in the STIX fonts), Unicode characters can -also be used:: - - ur'$\u23ce$' - -Example -------- - -Here is an example illustrating many of these features in context. - -.. plot:: pyplots/pyplot_mathtext.py - :include-source: - - - - - - diff --git a/dev/_sources/users/navigation_toolbar.txt b/dev/_sources/users/navigation_toolbar.txt deleted file mode 100644 index 6e327621ba4..00000000000 --- a/dev/_sources/users/navigation_toolbar.txt +++ /dev/null @@ -1,140 +0,0 @@ -.. _navigation-toolbar: - -Interactive navigation -====================== - -.. image:: ../_static/toolbar.png - -All figure windows come with a navigation toolbar, which can be used -to navigate through the data set. Here is a description of each of -the buttons at the bottom of the toolbar - -.. image:: ../../lib/matplotlib/mpl-data/images/home.png - -.. image:: ../../lib/matplotlib/mpl-data/images/back.png - -.. image:: ../../lib/matplotlib/mpl-data/images/forward.png - -The ``Forward`` and ``Back`` buttons - These are akin to the web browser forward and back buttons. They - are used to navigate back and forth between previously defined - views. They have no meaning unless you have already navigated - somewhere else using the pan and zoom buttons. This is analogous - to trying to click ``Back`` on your web browser before visiting a - new page --nothing happens. ``Home`` always takes you to the - first, default view of your data. For ``Home``, ``Forward`` and - ``Back``, think web browser where data views are web pages. Use - the pan and zoom to rectangle to define new views. - -.. image:: ../../lib/matplotlib/mpl-data/images/move.png - -The ``Pan/Zoom`` button - This button has two modes: pan and zoom. Click the toolbar button - to activate panning and zooming, then put your mouse somewhere - over an axes. Press the left mouse button and hold it to pan the - figure, dragging it to a new position. When you release it, the - data under the point where you pressed will be moved to the point - where you released. If you press 'x' or 'y' while panning the - motion will be constrained to the x or y axis, respectively. Press - the right mouse button to zoom, dragging it to a new position. - The x axis will be zoomed in proportionate to the rightward - movement and zoomed out proportionate to the leftward movement. - Ditto for the y axis and up/down motions. The point under your - mouse when you begin the zoom remains stationary, allowing you to - zoom to an arbitrary point in the figure. You can use the - modifier keys 'x', 'y' or 'CONTROL' to constrain the zoom to the x - axis, the y axis, or aspect ratio preserve, respectively. - - With polar plots, the pan and zoom functionality behaves - differently. The radius axis labels can be dragged using the left - mouse button. The radius scale can be zoomed in and out using the - right mouse button. - -.. image:: ../../lib/matplotlib/mpl-data/images/zoom_to_rect.png - -The ``Zoom-to-rectangle`` button - Click this toolbar button to activate this mode. Put your mouse - somewhere over and axes and press the left mouse button. Drag the - mouse while holding the button to a new location and release. The - axes view limits will be zoomed to the rectangle you have defined. - There is also an experimental 'zoom out to rectangle' in this mode - with the right button, which will place your entire axes in the - region defined by the zoom out rectangle. - -.. image:: ../../lib/matplotlib/mpl-data/images/subplots.png - -The ``Subplot-configuration`` button - Use this tool to configure the parameters of the subplot: the - left, right, top, bottom, space between the rows and space between - the columns. - -.. image:: ../../lib/matplotlib/mpl-data/images/filesave.png - -The ``Save`` button - Click this button to launch a file save dialog. You can save - files with the following extensions: ``png``, ``ps``, ``eps``, - ``svg`` and ``pdf``. - - -.. _key-event-handling: - -Navigation Keyboard Shortcuts ------------------------------ - -The following table holds all the default keys, which can be overwritten by use of your matplotlibrc (#keymap.\*). - -================================== ================================================= -Command Keyboard Shortcut(s) -================================== ================================================= -Home/Reset **h** or **r** or **home** -Back **c** or **left arrow** or **backspace** -Forward **v** or **right arrow** -Pan/Zoom **p** -Zoom-to-rect **o** -Save **ctrl** + **s** -Toggle fullscreen **ctrl** + **f** -Close plot **ctrl** + **w** -Constrain pan/zoom to x axis hold **x** when panning/zooming with mouse -Constrain pan/zoom to y axis hold **y** when panning/zooming with mouse -Preserve aspect ratio hold **CONTROL** when panning/zooming with mouse -Toggle grid **g** when mouse is over an axes -Toggle x axis scale (log/linear) **L** or **k** when mouse is over an axes -Toggle y axis scale (log/linear) **l** when mouse is over an axes -================================== ================================================= - -If you are using :mod:`matplotlib.pyplot` the toolbar will be created -automatically for every figure. If you are writing your own user -interface code, you can add the toolbar as a widget. The exact syntax -depends on your UI, but we have examples for every supported UI in the -``matplotlib/examples/user_interfaces`` directory. Here is some -example code for GTK:: - - - from matplotlib.figure import Figure - from matplotlib.backends.backend_gtkagg import FigureCanvasGTKAgg as FigureCanvas - from matplotlib.backends.backend_gtkagg import NavigationToolbar2GTKAgg as NavigationToolbar - - win = gtk.Window() - win.connect("destroy", lambda x: gtk.main_quit()) - win.set_default_size(400,300) - win.set_title("Embedding in GTK") - - vbox = gtk.VBox() - win.add(vbox) - - fig = Figure(figsize=(5,4), dpi=100) - ax = fig.add_subplot(111) - ax.plot([1,2,3]) - - canvas = FigureCanvas(fig) # a gtk.DrawingArea - vbox.pack_start(canvas) - toolbar = NavigationToolbar(canvas, win) - vbox.pack_start(toolbar, False, False) - - win.show_all() - gtk.main() - - - - - diff --git a/dev/_sources/users/path_tutorial.txt b/dev/_sources/users/path_tutorial.txt deleted file mode 100644 index d34d80d80a5..00000000000 --- a/dev/_sources/users/path_tutorial.txt +++ /dev/null @@ -1,187 +0,0 @@ -.. _path_tutorial: - -************* -Path Tutorial -************* - -The object underlying all of the :mod:`matplotlib.patch` objects is -the :class:`~matplotlib.path.Path`, which supports the standard set of -moveto, lineto, curveto commands to draw simple and compound outlines -consisting of line segments and splines. The ``Path`` is instantiated -with a (N,2) array of (x,y) vertices, and a N-length array of path -codes. For example to draw the unit rectangle from (0,0) to (1,1), we -could use this code - -.. plot:: - :include-source: - - import matplotlib.pyplot as plt - from matplotlib.path import Path - import matplotlib.patches as patches - - verts = [ - (0., 0.), # left, bottom - (0., 1.), # left, top - (1., 1.), # right, top - (1., 0.), # right, bottom - (0., 0.), # ignored - ] - - codes = [Path.MOVETO, - Path.LINETO, - Path.LINETO, - Path.LINETO, - Path.CLOSEPOLY, - ] - - path = Path(verts, codes) - - fig = plt.figure() - ax = fig.add_subplot(111) - patch = patches.PathPatch(path, facecolor='orange', lw=2) - ax.add_patch(patch) - ax.set_xlim(-2,2) - ax.set_ylim(-2,2) - plt.show() - - -The following path codes are recognized - -============== ================================= ==================================================================================================================== -Code Vertices Description -============== ================================= ==================================================================================================================== -``STOP`` 1 (ignored) A marker for the end of the entire path (currently not required and ignored) -``MOVETO`` 1 Pick up the pen and move to the given vertex. -``LINETO`` 1 Draw a line from the current position to the given vertex. -``CURVE3`` 2 (1 control point, 1 endpoint) Draw a quadratic Bézier curve from the current position, with the given control point, to the given end point. -``CURVE4`` 3 (2 control points, 1 endpoint) Draw a cubic Bézier curve from the current position, with the given control points, to the given end point. -``CLOSEPOLY`` 1 (point itself is ignored) Draw a line segment to the start point of the current polyline. -============== ================================= ==================================================================================================================== - - -.. path-curves: - - -Bézier example -============== - -Some of the path components require multiple vertices to specify them: -for example CURVE 3 is a `bézier -`_ curve with one -control point and one end point, and CURVE4 has three vertices for the -two control points and the end point. The example below shows a -CURVE4 Bézier spline -- the bézier curve will be contained in the -convex hull of the start point, the two control points, and the end -point - -.. plot:: - :include-source: - - import matplotlib.pyplot as plt - from matplotlib.path import Path - import matplotlib.patches as patches - - verts = [ - (0., 0.), # P0 - (0.2, 1.), # P1 - (1., 0.8), # P2 - (0.8, 0.), # P3 - ] - - codes = [Path.MOVETO, - Path.CURVE4, - Path.CURVE4, - Path.CURVE4, - ] - - path = Path(verts, codes) - - fig = plt.figure() - ax = fig.add_subplot(111) - patch = patches.PathPatch(path, facecolor='none', lw=2) - ax.add_patch(patch) - - xs, ys = zip(*verts) - ax.plot(xs, ys, 'x--', lw=2, color='black', ms=10) - - ax.text(-0.05, -0.05, 'P0') - ax.text(0.15, 1.05, 'P1') - ax.text(1.05, 0.85, 'P2') - ax.text(0.85, -0.05, 'P3') - - ax.set_xlim(-0.1, 1.1) - ax.set_ylim(-0.1, 1.1) - plt.show() - -.. compound_paths: - -Compound paths -============== - -All of the simple patch primitives in matplotlib, Rectangle, Circle, -Polygon, etc, are implemented with simple path. Plotting functions -like :meth:`~matplotlib.axes.Axes.hist` and -:meth:`~matplotlib.axes.Axes.bar`, which create a number of -primitives, eg a bunch of Rectangles, can usually be implemented more -efficiently using a compound path. The reason ``bar`` creates a list -of rectangles and not a compound path is largely historical: the -:class:`~matplotlib.path.Path` code is comparatively new and ``bar`` -predates it. While we could change it now, it would break old code, -so here we will cover how to create compound paths, replacing the -functionality in bar, in case you need to do so in your own code for -efficiency reasons, eg you are creating an animated bar plot. - -We will make the histogram chart by creating a series of rectangles -for each histogram bar: the rectangle width is the bin width and the -rectangle height is the number of datapoints in that bin. First we'll -create some random normally distributed data and compute the -histogram. Because numpy returns the bin edges and not centers, the -length of ``bins`` is 1 greater than the length of ``n`` in the -example below:: - - # histogram our data with numpy - data = np.random.randn(1000) - n, bins = np.histogram(data, 100) - -We'll now extract the corners of the rectangles. Each of the -``left``, ``bottom``, etc, arrays below is ``len(n)``, where ``n`` is -the array of counts for each histogram bar:: - - # 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 - -Now we have to construct our compound path, which will consist of a -series of ``MOVETO``, ``LINETO`` and ``CLOSEPOLY`` for each rectangle. -For each rectangle, we need 5 vertices: 1 for the ``MOVETO``, 3 for -the ``LINETO``, and 1 for the ``CLOSEPOLY``. As indicated in the -table above, the vertex 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 - -All that remains is to create the path, attach it to a -:class:`~matplotlib.patch.PathPatch`, and add it to our axes:: - - barpath = path.Path(verts, codes) - patch = patches.PathPatch(barpath, facecolor='green', - edgecolor='yellow', alpha=0.5) - ax.add_patch(patch) - -Here is the result - -.. plot:: pyplots/compound_path_demo.py diff --git a/dev/_sources/users/pgf.txt b/dev/_sources/users/pgf.txt deleted file mode 100644 index 84d48294a80..00000000000 --- a/dev/_sources/users/pgf.txt +++ /dev/null @@ -1,167 +0,0 @@ -.. _pgf-tutorial: - -********************************* -Typesetting With XeLaTeX/LuaLaTeX -********************************* - -Using the ``pgf`` backend, matplotlib can export figures as pgf drawing commands -that can be processed with pdflatex, xelatex or lualatex. XeLaTeX and LuaLaTeX -have full unicode support and can use any font that is installed in the operating -system, making use of advanced typographic features of OpenType, AAT and -Graphite. Pgf pictures created by ``plt.savefig('figure.pgf')`` can be -embedded as raw commands in LaTeX documents. Figures can also be directly -compiled and saved to PDF with ``plt.savefig('figure.pdf')`` by either -switching to the backend - -.. code-block:: python - - matplotlib.use('pgf') - -or registering it for handling pdf output - -.. code-block:: python - - from matplotlib.backends.backend_pgf import FigureCanvasPgf - matplotlib.backend_bases.register_backend('pdf', FigureCanvasPgf) - -The second method allows you to keep using regular interactive backends and to -save xelatex, lualatex or pdflatex compiled PDF files from the graphical user interface. - -Matplotlib's pgf support requires a recent LaTeX_ installation that includes -the TikZ/PGF packages (such as TeXLive_), preferably with XeLaTeX or LuaLaTeX -installed. If either pdftocairo or ghostscript is present on your system, -figures can optionally be saved to PNG images as well. The executables -for all applications must be located on your :envvar:`PATH`. - -Rc parameters that control the behavior of the pgf backend: - - ================= ===================================================== - Parameter Documentation - ================= ===================================================== - pgf.preamble Lines to be included in the LaTeX preamble - pgf.rcfonts Setup fonts from rc params using the fontspec package - pgf.texsystem Either "xelatex" (default), "lualatex" or "pdflatex" - ================= ===================================================== - -.. note:: - - TeX defines a set of special characters, such as:: - - # $ % & ~ _ ^ \ { } - - Generally, these characters must be escaped correctly. For convenience, - some characters (_,^,%) are automatically escaped outside of math - environments. - -.. _pgf-rcfonts: - -Font specification -================== - -The fonts used for obtaining the size of text elements or when compiling -figures to PDF are usually defined in the matplotlib rc parameters. You can -also use the LaTeX default Computer Modern fonts by clearing the lists for -``font.serif``, ``font.sans-serif`` or ``font.monospace``. Please note that -the glyph coverage of these fonts is very limited. If you want to keep the -Computer Modern font face but require extended unicode support, consider -installing the `Computer Modern Unicode `_ -fonts *CMU Serif*, *CMU Sans Serif*, etc. - -When saving to ``.pgf``, the font configuration matplotlib used for the -layout of the figure is included in the header of the text file. - -.. literalinclude:: plotting/examples/pgf_fonts.py - :end-before: plt.savefig - -.. image:: /_static/pgf_fonts.* - - -.. _pgf-preamble: - -Custom preamble -=============== - -Full customization is possible by adding your own commands to the preamble. -Use the ``pgf.preamble`` parameter if you want to configure the math fonts, -using ``unicode-math`` for example, or for loading additional packages. Also, -if you want to do the font configuration yourself instead of using the fonts -specified in the rc parameters, make sure to disable ``pgf.rcfonts``. - -.. htmlonly:: - - .. literalinclude:: plotting/examples/pgf_preamble.py - :end-before: plt.savefig - -.. latexonly:: - - .. literalinclude:: plotting/examples/pgf_preamble.py - :end-before: import matplotlib.pyplot as plt - -.. image:: /_static/pgf_preamble.* - - -.. _pgf-texsystem: - -Choosing the TeX system -======================= - -The TeX system to be used by matplotlib is chosen by the ``pgf.texsystem`` -parameter. Possible values are ``'xelatex'`` (default), ``'lualatex'`` and -``'pdflatex'``. Please note that when selecting pdflatex the fonts and -unicode handling must be configured in the preamble. - -.. literalinclude:: plotting/examples/pgf_texsystem.py - :end-before: plt.savefig - -.. image:: /_static/pgf_texsystem.* - - -.. _pgf-troubleshooting: - -Troubleshooting -=============== - -* Please note that the TeX packages found in some Linux distributions and - MiKTeX installations are dramatically outdated. Make sure to update your - package catalog and upgrade or install a recent TeX distribution. - -* On Windows, the :envvar:`PATH` environment variable may need to be modified - to include the directories containing the latex, dvipng and ghostscript - executables. See :ref:`environment-variables` and - :ref:`setting-windows-environment-variables` for details. - -* A limitation on Windows causes the backend to keep file handles that have - been opened by your application open. As a result, it may not be possible - to delete the corresponding files until the application closes (see - `#1324 `_). - -* Sometimes the font rendering in figures that are saved to png images is - very bad. This happens when the pdftocairo tool is not available and - ghostscript is used for the pdf to png conversion. - -* Make sure what you are trying to do is possible in a LaTeX document, - that your LaTeX syntax is valid and that you are using raw strings - if necessary to avoid unintended escape sequences. - -* The ``pgf.preamble`` rc setting provides lots of flexibility, and lots of - ways to cause problems. When experiencing problems, try to minimalize or - disable the custom preamble. - -* Configuring an ``unicode-math`` environment can be a bit tricky. The - TeXLive distribution for example provides a set of math fonts which are - usually not installed system-wide. XeTeX, unlike LuaLatex, cannot find - these fonts by their name, which is why you might have to specify - ``\setmathfont{xits-math.otf}`` instead of ``\setmathfont{XITS Math}`` or - alternatively make the fonts available to your OS. See this - `tex.stackexchange.com question `_ - for more details. - -* If the font configuration used by matplotlib differs from the font setting - in yout LaTeX document, the alignment of text elements in imported figures - may be off. Check the header of your ``.pgf`` file if you are unsure about - the fonts matplotlib used for the layout. - -* If you still need help, please see :ref:`reporting-problems` - -.. _LaTeX: http://www.tug.org -.. _TeXLive: http://www.tug.org/texlive/ diff --git a/dev/_sources/users/pyplot_tutorial.txt b/dev/_sources/users/pyplot_tutorial.txt deleted file mode 100644 index 9c67249ac9f..00000000000 --- a/dev/_sources/users/pyplot_tutorial.txt +++ /dev/null @@ -1,282 +0,0 @@ -.. _pyplot-tutorial: - -*************** -Pyplot tutorial -*************** - -:mod:`matplotlib.pyplot` is a collection of command style functions -that make matplotlib work like MATLAB. -Each ``pyplot`` function makes -some change to a figure: eg, create a figure, create a plotting area -in a figure, plot some lines in a plotting area, decorate the plot -with labels, etc.... :mod:`matplotlib.pyplot` is stateful, in that it -keeps track of the current figure and plotting area, and the plotting -functions are directed to the current axes - -.. plot:: pyplots/pyplot_simple.py - :include-source: - -You may be wondering why the x-axis ranges from 0-3 and the y-axis -from 1-4. If you provide a single list or array to the -:func:`~matplotlib.pyplot.plot` command, matplotlib assumes it is a -sequence of y values, and automatically generates the x values for -you. Since python ranges start with 0, the default x vector has the -same length as y but starts with 0. Hence the x data are -``[0,1,2,3]``. - -:func:`~matplotlib.pyplot.plot` is a versatile command, and will take -an arbitrary number of arguments. For example, to plot x versus y, -you can issue the command:: - - plt.plot([1,2,3,4], [1,4,9,16]) - -For every x, y pair of arguments, there is an optional third argument -which is the format string that indicates the color and line type of -the plot. The letters and symbols of the format string are from -MATLAB, and you concatenate a color string with a line style string. -The default format string is 'b-', which is a solid blue line. For -example, to plot the above with red circles, you would issue - -.. plot:: pyplots/pyplot_formatstr.py - :include-source: - -See the :func:`~matplotlib.pyplot.plot` documentation for a complete -list of line styles and format strings. The -:func:`~matplotlib.pyplot.axis` command in the example above takes a -list of ``[xmin, xmax, ymin, ymax]`` and specifies the viewport of the -axes. - -If matplotlib were limited to working with lists, it would be fairly -useless for numeric processing. Generally, you will use `numpy -`_ arrays. In fact, all sequences are -converted to numpy arrays internally. The example below illustrates a -plotting several lines with different format styles in one command -using arrays. - -.. plot:: pyplots/pyplot_three.py - :include-source: - -.. _controlling-line-properties: - -Controlling line properties -=========================== - -Lines have many attributes that you can set: linewidth, dash style, -antialiased, etc; see :class:`matplotlib.lines.Line2D`. There are -several ways to set line properties - -* Use keyword args:: - - plt.plot(x, y, linewidth=2.0) - - -* Use the setter methods of the ``Line2D`` instance. ``plot`` returns a list - of lines; eg ``line1, line2 = plot(x1,y1,x2,x2)``. Below I have only - one line so it is a list of length 1. I use tuple unpacking in the - ``line, = plot(x, y, 'o')`` to get the first element of the list:: - - line, = plt.plot(x, y, '-') - line.set_antialiased(False) # turn off antialising - -* Use the :func:`~matplotlib.pyplot.setp` command. The example below - uses a MATLAB-style command to set multiple properties - on a list of lines. ``setp`` works transparently with a list of objects - or a single object. You can either use python keyword arguments or - MATLAB-style string/value pairs:: - - lines = plt.plot(x1, y1, x2, y2) - # use keyword args - plt.setp(lines, color='r', linewidth=2.0) - # or MATLAB style string value pairs - plt.setp(lines, 'color', 'r', 'linewidth', 2.0) - - -Here are the available :class:`~matplotlib.lines.Line2D` properties. - -====================== ================================================== -Property Value Type -====================== ================================================== -alpha float -animated [True | False] -antialiased or aa [True | False] -clip_box a matplotlib.transform.Bbox instance -clip_on [True | False] -clip_path a Path instance and a Transform instance, a Patch -color or c any matplotlib color -contains the hit testing function -dash_capstyle ['butt' | 'round' | 'projecting'] -dash_joinstyle ['miter' | 'round' | 'bevel'] -dashes sequence of on/off ink in points -data (np.array xdata, np.array ydata) -figure a matplotlib.figure.Figure instance -label any string -linestyle or ls [ '-' | '--' | '-.' | ':' | 'steps' | ...] -linewidth or lw float value in points -lod [True | False] -marker [ '+' | ',' | '.' | '1' | '2' | '3' | '4' -markeredgecolor or mec any matplotlib color -markeredgewidth or mew float value in points -markerfacecolor or mfc any matplotlib color -markersize or ms float -markevery None | integer | (startind, stride) -picker used in interactive line selection -pickradius the line pick selection radius -solid_capstyle ['butt' | 'round' | 'projecting'] -solid_joinstyle ['miter' | 'round' | 'bevel'] -transform a matplotlib.transforms.Transform instance -visible [True | False] -xdata np.array -ydata np.array -zorder any number -====================== ================================================== - -To get a list of settable line properties, call the -:func:`~matplotlib.pyplot.setp` function with a line or lines -as argument - -.. sourcecode:: ipython - - In [69]: lines = plt.plot([1,2,3]) - - In [70]: plt.setp(lines) - alpha: float - animated: [True | False] - antialiased or aa: [True | False] - ...snip - -.. _multiple-figs-axes: - -Working with multiple figures and axes -====================================== - - -MATLAB, and :mod:`~matplotlib.pyplot`, have the concept of the current -figure and the current axes. All plotting commands apply to the -current axes. The function :func:`~matplotlib.pyplot.gca` returns the -current axes (a :class:`matplotlib.axes.Axes` instance), and -:func:`~matplotlib.pyplot.gcf` returns the current figure -(:class:`matplotlib.figure.Figure` instance). Normally, you don't have -to worry about this, because it is all taken care of behind the -scenes. Below is a script to create two subplots. - -.. plot:: pyplots/pyplot_two_subplots.py - :include-source: - -The :func:`~matplotlib.pyplot.figure` command here is optional because -``figure(1)`` will be created by default, just as a ``subplot(111)`` -will be created by default if you don't manually specify an axes. The -:func:`~matplotlib.pyplot.subplot` command specifies ``numrows, -numcols, fignum`` where ``fignum`` ranges from 1 to -``numrows*numcols``. The commas in the ``subplot`` command are -optional if ``numrows*numcols<10``. So ``subplot(211)`` is identical -to ``subplot(2,1,1)``. You can create an arbitrary number of subplots -and axes. If you want to place an axes manually, ie, not on a -rectangular grid, use the :func:`~matplotlib.pyplot.axes` command, -which allows you to specify the location as ``axes([left, bottom, -width, height])`` where all values are in fractional (0 to 1) -coordinates. See :ref:`pylab_examples-axes_demo` for an example of -placing axes manually and :ref:`pylab_examples-line_styles` for an -example with lots-o-subplots. - - -You can create multiple figures by using multiple -:func:`~matplotlib.pyplot.figure` calls with an increasing figure -number. Of course, each figure can contain as many axes and subplots -as your heart desires:: - - import matplotlib.pyplot as plt - plt.figure(1) # the first figure - plt.subplot(211) # the first subplot in the first figure - plt.plot([1,2,3]) - plt.subplot(212) # the second subplot in the first figure - plt.plot([4,5,6]) - - - plt.figure(2) # a second figure - plt.plot([4,5,6]) # creates a subplot(111) by default - - plt.figure(1) # figure 1 current; subplot(212) still current - plt.subplot(211) # make subplot(211) in figure1 current - plt.title('Easy as 1,2,3') # subplot 211 title - -You can clear the current figure with :func:`~matplotlib.pyplot.clf` -and the current axes with :func:`~matplotlib.pyplot.cla`. If you find -this statefulness, annoying, don't despair, this is just a thin -stateful wrapper around an object oriented API, which you can use -instead (see :ref:`artist-tutorial`) - -If you are making a long sequence of figures, you need to be aware of one -more thing: the memory required for a figure is not completely -released until the figure is explicitly closed with -:func:`~matplotlib.pyplot.close`. Deleting all references to the -figure, and/or using the window manager to kill the window in which -the figure appears on the screen, is not enough, because pyplot -maintains internal references until :func:`~matplotlib.pyplot.close` -is called. - -.. _working-with-text: - -Working with text -================= - -The :func:`~matplotlib.pyplot.text` command can be used to add text in -an arbitrary location, and the :func:`~matplotlib.pyplot.xlabel`, -:func:`~matplotlib.pyplot.ylabel` and :func:`~matplotlib.pyplot.title` -are used to add text in the indicated locations (see :ref:`text-intro` -for a more detailed example) - -.. plot:: pyplots/pyplot_text.py - :include-source: - - -All of the :func:`~matplotlib.pyplot.text` commands return an -:class:`matplotlib.text.Text` instance. Just as with with lines -above, you can customize the properties by passing keyword arguments -into the text functions or using :func:`~matplotlib.pyplot.setp`:: - - t = plt.xlabel('my data', fontsize=14, color='red') - -These properties are covered in more detail in :ref:`text-properties`. - - -Using mathematical expressions in text --------------------------------------- - -matplotlib accepts TeX equation expressions in any text expression. -For example to write the expression :math:`\sigma_i=15` in the title, -you can write a TeX expression surrounded by dollar signs:: - - plt.title(r'$\sigma_i=15$') - -The ``r`` preceding the title string is important -- it signifies -that the string is a *raw* string and not to treat backslashes and -python escapes. matplotlib has a built-in TeX expression parser and -layout engine, and ships its own math fonts -- for details see -:ref:`mathtext-tutorial`. Thus you can use mathematical text across platforms -without requiring a TeX installation. For those who have LaTeX and -dvipng installed, you can also use LaTeX to format your text and -incorporate the output directly into your display figures or saved -postscript -- see :ref:`usetex-tutorial`. - - -Annotating text ---------------- - -The uses of the basic :func:`~matplotlib.pyplot.text` command above -place text at an arbitrary position on the Axes. A common use case of -text is to annotate some feature of the plot, and the -:func:`~matplotlib.pyplot.annotate` method provides helper -functionality to make annotations easy. In an annotation, there are -two points to consider: the location being annotated represented by -the argument ``xy`` and the location of the text ``xytext``. Both of -these arguments are ``(x,y)`` tuples. - -.. plot:: pyplots/pyplot_annotate.py - :include-source: - -In this basic example, both the ``xy`` (arrow tip) and ``xytext`` -locations (text location) are in data coordinates. There are a -variety of other coordinate systems one can choose -- see -:ref:`annotations-tutorial` and :ref:`plotting-guide-annotation` for -details. More examples can be found in -:ref:`pylab_examples-annotation_demo`. diff --git a/dev/_sources/users/recipes.txt b/dev/_sources/users/recipes.txt deleted file mode 100644 index 216630f9e92..00000000000 --- a/dev/_sources/users/recipes.txt +++ /dev/null @@ -1,367 +0,0 @@ -.. _recipes: - -******************** -Our Favorite Recipes -******************** - -Here is a collection of short tutorials, examples and code snippets -that illustrate some of the useful idioms and tricks to make snazzier -figures and overcome some matplotlib warts. - - -Sharing axis limits and views -============================= - -It's common to make two or more plots which share an axis, eg two -subplots with time as a common axis. When you pan and zoom around on -one, you want the other to move around with you. To facilitate this, -matplotlib Axes support a ``sharex`` and ``sharey`` attribute. When -you create a :func:`~matplotlib.pyplot.subplot` or -:func:`~matplotlib.pyplot.axes` instance, you can pass in a keyword -indicating what axes you want to share with - -.. sourcecode:: ipython - - In [96]: t = np.arange(0, 10, 0.01) - - In [97]: ax1 = plt.subplot(211) - - In [98]: ax1.plot(t, np.sin(2*np.pi*t)) - Out[98]: [] - - In [99]: ax2 = plt.subplot(212, sharex=ax1) - - In [100]: ax2.plot(t, np.sin(4*np.pi*t)) - Out[100]: [] - -Easily creating subplots -======================== - -In early versions of matplotlib, if you wanted to use the pythonic API -and create a figure instance and from that create a grid of subplots, -possibly with shared axes, it involved a fair amount of boilerplate -code. e.g. - -.. sourcecode:: python - - # old style - fig = plt.figure() - ax1 = fig.add_subplot(221) - ax2 = fig.add_subplot(222, sharex=ax1, sharey=ax1) - ax3 = fig.add_subplot(223, sharex=ax1, sharey=ax1) - ax3 = fig.add_subplot(224, sharex=ax1, sharey=ax1) - -Fernando Perez has provided a nice top level method to create in -:func:`~matplotlib.pyplots.subplots` (note the "s" at the end) -everything at once, and turn off x and y sharing for the whole bunch. -You can either unpack the axes individually:: - - # new style method 1; unpack the axes - fig, ((ax1, ax2), (ax3, ax4)) = plt.subplots(2, 2, sharex=True, sharey=True) - ax1.plot(x) - -or get them back as a numrows x numcolumns object array which supports -numpy indexing:: - - # new style method 2; use an axes array - fig, axs = plt.subplots(2, 2, sharex=True, sharey=True) - axs[0,0].plot(x) - - - -Fixing common date annoyances -============================= - - -.. plot:: - :nofigs: - :context: - - # clear the state for context use below - plt.close('all') - -matplotlib allows you to natively plots python datetime instances, and -for the most part does a good job picking tick locations and string -formats. There are a couple of things it does not handle so -gracefully, and here are some tricks to help you work around them. -We'll load up some sample date data which contains datetime.date -objects in a numpy record array:: - - In [63]: datafile = cbook.get_sample_data('goog.npy') - - In [64]: r = np.load(datafile).view(np.recarray) - - In [65]: r.dtype - Out[65]: dtype([('date', '|O4'), ('', '|V4'), ('open', '] - -you will see that the x tick labels are all squashed together. - -.. plot:: - :context: - - import matplotlib.cbook as cbook - datafile = cbook.get_sample_data('goog.npy') - r = np.load(datafile).view(np.recarray) - plt.figure() - plt.plot(r.date, r.close) - plt.title('Default date handling can cause overlapping labels') - -Another annoyance is that if you hover the mouse over a the window and -look in the lower right corner of the matplotlib toolbar -(:ref:`navigation-toolbar`) at the x and y coordinates, you see that -the x locations are formatted the same way the tick labels are, eg -"Dec 2004". What we'd like is for the location in the toolbar to have -a higher degree of precision, eg giving us the exact date out mouse is -hovering over. To fix the first problem, we can use -:func:`matplotlib.figure.Figure.autofmt_xdate` and to fix the second -problem we can use the ``ax.fmt_xdata`` attribute which can be set to -any function that takes a scalar and returns a string. matplotlib has -a number of date formatters built in, so we'll use one of those. - -.. plot:: - :include-source: - :context: - - plt.close('all') - fig, ax = plt.subplots(1) - ax.plot(r.date, r.close) - - # rotate and align the tick labels so they look better - fig.autofmt_xdate() - - # use a more precise date string for the x axis locations in the - # toolbar - import matplotlib.dates as mdates - ax.fmt_xdata = mdates.DateFormatter('%Y-%m-%d') - plt.title('fig.autofmt_xdate fixes the labels') - -Now when you hover your mouse over the plotted data, you'll see date -format strings like 2004-12-01 in the toolbar. - -Fill Between and Alpha -====================== - -The :meth:`~matplotlib.axes.Axes.fill_between` function generates a -shaded region between a min and max boundary that is useful for -illustrating ranges. It has a very handy ``where`` argument to -combine filling with logical ranges, eg to just fill in a curve over -some threshold value. - -At its most basic level, ``fill_between`` can be use to enhance a -graphs visual appearance. Let's compare two graphs of a financial -times with a simple line plot on the left and a filled line on the -right. - -.. plot:: - :include-source: - - import matplotlib.pyplot as plt - import numpy as np - - import matplotlib.cbook as cbook - - # load up some sample financial data - datafile = cbook.get_sample_data('goog.npy') - r = np.load(datafile).view(np.recarray) - - # create two subplots with the shared x and y axes - fig, (ax1, ax2) = plt.subplots(1,2, sharex=True, sharey=True) - - pricemin = r.close.min() - - ax1.plot(r.date, r.close, lw=2) - ax2.fill_between(r.date, pricemin, r.close, facecolor='blue', alpha=0.5) - - for ax in ax1, ax2: - ax.grid(True) - - ax1.set_ylabel('price') - for label in ax2.get_yticklabels(): - label.set_visible(False) - - fig.suptitle('Google (GOOG) daily closing price') - fig.autofmt_xdate() - -The alpha channel is not necessary here, but it can be used to soften -colors for more visually appealing plots. In other examples, as we'll -see below, the alpha channel is functionally useful as the shaded -regions can overlap and alpha allows you to see both. Note that the -postscript format does not support alpha (this is a postscript -limitation, not a matplotlib limitation), so when using alpha save -your figures in PNG, PDF or SVG. - -Our next example computes two populations of random walkers with a -different mean and standard deviation of the normal distributions from -which the steps are drawn. We use shared regions to plot +/- one -standard deviation of the mean position of the population. Here the -alpha channel is useful, not just aesthetic. - -.. plot:: - :include-source: - - import matplotlib.pyplot as plt - import numpy as np - - Nsteps, Nwalkers = 100, 250 - t = np.arange(Nsteps) - - # an (Nsteps x Nwalkers) array of random walk steps - S1 = 0.002 + 0.01*np.random.randn(Nsteps, Nwalkers) - S2 = 0.004 + 0.02*np.random.randn(Nsteps, Nwalkers) - - # an (Nsteps x Nwalkers) array of random walker positions - X1 = S1.cumsum(axis=0) - X2 = S2.cumsum(axis=0) - - - # Nsteps length arrays empirical means and standard deviations of both - # populations over time - mu1 = X1.mean(axis=1) - sigma1 = X1.std(axis=1) - mu2 = X2.mean(axis=1) - sigma2 = X2.std(axis=1) - - # plot it! - fig, ax = plt.subplots(1) - ax.plot(t, mu1, lw=2, label='mean population 1', color='blue') - ax.plot(t, mu1, lw=2, label='mean population 2', color='yellow') - ax.fill_between(t, mu1+sigma1, mu1-sigma1, facecolor='blue', alpha=0.5) - ax.fill_between(t, mu2+sigma2, mu2-sigma2, facecolor='yellow', alpha=0.5) - ax.set_title('random walkers empirical $\mu$ and $\pm \sigma$ interval') - ax.legend(loc='upper left') - ax.set_xlabel('num steps') - ax.set_ylabel('position') - ax.grid() - - -The ``where`` keyword argument is very handy for highlighting certain -regions of the graph. ``where`` takes a boolean mask the same length -as the x, ymin and ymax arguments, and only fills in the region where -the boolean mask is True. In the example below, we simulate a single -random walker and compute the analytic mean and standard deviation of -the population positions. The population mean is shown as the black -dashed line, and the plus/minus one sigma deviation from the mean is -shown as the yellow filled region. We use the where mask -``X>upper_bound`` to find the region where the walker is above the one -sigma boundary, and shade that region blue. - -.. plot:: - :include-source: - - np.random.seed(1234) - - Nsteps = 500 - t = np.arange(Nsteps) - - mu = 0.002 - sigma = 0.01 - - # the steps and position - S = mu + sigma*np.random.randn(Nsteps) - X = S.cumsum() - - # the 1 sigma upper and lower analytic population bounds - lower_bound = mu*t - sigma*np.sqrt(t) - upper_bound = mu*t + sigma*np.sqrt(t) - - fig, ax = plt.subplots(1) - ax.plot(t, X, lw=2, label='walker position', color='blue') - ax.plot(t, mu*t, lw=1, label='population mean', color='black', ls='--') - ax.fill_between(t, lower_bound, upper_bound, facecolor='yellow', alpha=0.5, - label='1 sigma range') - ax.legend(loc='upper left') - - # here we use the where argument to only fill the region where the - # walker is above the population 1 sigma boundary - ax.fill_between(t, upper_bound, X, where=X>upper_bound, facecolor='blue', alpha=0.5) - ax.set_xlabel('num steps') - ax.set_ylabel('position') - ax.grid() - - -Another handy use of filled regions is to highlight horizontal or -vertical spans of an axes -- for that matplotlib has some helper -functions :meth:`~matplotlib.axes.Axes.axhspan` and -:meth:`~matplotlib.axes.Axes.axvspan` and example -:ref:`pylab_examples-axhspan_demo`. - - -Transparent, fancy legends -========================== - -Sometimes you know what your data looks like before you plot it, and -may know for instance that there won't be much data in the upper right -hand corner. Then you can safely create a legend that doesn't overlay -your data:: - - ax.legend(loc='upper right') - -Other times you don't know where your data is, and loc='best' will try -and place the legend:: - - ax.legend(loc='best') - -but still, your legend may overlap your data, and in these cases it's -nice to make the legend frame transparent. - - -.. plot:: - :include-source: - - np.random.seed(1234) - fig, ax = plt.subplots(1) - ax.plot(np.random.randn(300), 'o-', label='normal distribution') - ax.plot(np.random.rand(300), 's-', label='uniform distribution') - ax.set_ylim(-3, 3) - leg = ax.legend(loc='best', fancybox=True) - leg.get_frame().set_alpha(0.5) - - ax.set_title('fancy, transparent legends') - - -Placing text boxes -================== - -When decorating axes with text boxes, two useful tricks are to place -the text in axes coordinates (see :ref:`transforms_tutorial`), so the -text doesn't move around with changes in x or y limits. You can also -use the ``bbox`` property of text to surround the text with a -:class:`~matplotlib.patches.Patch` instance -- the ``bbox`` keyword -argument takes a dictionary with keys that are Patch properties. - -.. plot:: - :include-source: - - np.random.seed(1234) - fig, ax = plt.subplots(1) - x = 30*np.random.randn(10000) - mu = x.mean() - median = np.median(x) - sigma = x.std() - textstr = '$\mu=%.2f$\n$\mathrm{median}=%.2f$\n$\sigma=%.2f$'%(mu, median, sigma) - - ax.hist(x, 50) - # these are matplotlib.patch.Patch properties - props = dict(boxstyle='round', facecolor='wheat', alpha=0.5) - - # place a text box in upper left in axes coords - ax.text(0.05, 0.95, textstr, transform=ax.transAxes, fontsize=14, - verticalalignment='top', bbox=props) - diff --git a/dev/_sources/users/screenshots.txt b/dev/_sources/users/screenshots.txt deleted file mode 100644 index 69adf7c861a..00000000000 --- a/dev/_sources/users/screenshots.txt +++ /dev/null @@ -1,298 +0,0 @@ -.. _matplotlibscreenshots: - -********************** -Screenshots -********************** - -Here you'll find a host of example plots with the code that -generated them. - -Simple Plot -=========== - -Here's a very basic :func:`~matplotlib.pyplot.plot` with text labels: - -.. plot:: mpl_examples/pylab_examples/simple_plot.py - -.. _screenshots_subplot_demo: - -Subplot demo -============ - -Multiple axes (i.e. subplots) are created with the -:func:`~matplotlib.pyplot.subplot` command: - -.. plot:: mpl_examples/subplots_axes_and_figures/subplot_demo.py - -.. _screenshots_histogram_demo: - -Histograms -========== - -The :func:`~matplotlib.pyplot.hist` command automatically generates -histograms and returns the bin counts or probabilities: - -.. plot:: mpl_examples/statistics/histogram_demo_features.py - - -.. _screenshots_path_demo: - -Path demo -========= - -You can add arbitrary paths in matplotlib using the -:mod:`matplotlib.path` module: - -.. plot:: mpl_examples/shapes_and_collections/path_patch_demo.py - -.. _screenshots_mplot3d_surface: - -mplot3d -========= - -The mplot3d toolkit (see :ref:`toolkit_mplot3d-tutorial` and -:ref:`mplot3d-examples-index`) has support for simple 3d graphs -including surface, wireframe, scatter, and bar charts. - -.. plot:: mpl_examples/mplot3d/surface3d_demo.py - -Thanks to John Porter, Jonathon Taylor, Reinier Heeres, and Ben Root for -the `mplot3d` toolkit. This toolkit is included with all standard matplotlib -installs. - -.. _screenshots_ellipse_demo: - - -Streamplot -========== - -The :meth:`~matplotlib.pyplot.streamplot` function plots the streamlines of -a vector field. In addition to simply plotting the streamlines, it allows you -to map the colors and/or line widths of streamlines to a separate parameter, -such as the speed or local intensity of the vector field. - -.. plot:: mpl_examples/images_contours_and_fields/streamplot_demo_features.py - -This feature complements the :meth:`~matplotlib.pyplot.quiver` function for -plotting vector fields. Thanks to Tom Flannaghan and Tony Yu for adding the -streamplot function. - - -Ellipses -======== - -In support of the -`Phoenix `_ mission to -Mars (which used matplotlib to display ground tracking of spacecraft), -Michael Droettboom built on work by Charlie Moad to provide an extremely -accurate 8-spline approximation to elliptical arcs (see -:class:`~matplotlib.patches.Arc`), which are insensitive to zoom level. - -.. plot:: mpl_examples/pylab_examples/ellipse_demo.py - -.. _screenshots_barchart_demo: - -Bar charts -========== - -Bar charts are simple to create using the :func:`~matplotlib.pyplot.bar` -command, which includes customizations such as error bars: - -.. plot:: mpl_examples/pylab_examples/barchart_demo.py - -It's also simple to create stacked bars -(`bar_stacked.py `_), -candlestick bars -(`bar_stacked.py `_), -and horizontal bar charts -(`barh_demo.py `_). - -.. _screenshots_pie_demo: - - -Pie charts -========== - -The :func:`~matplotlib.pyplot.pie` command allows you to easily create pie -charts. Optional features include auto-labeling the percentage of area, -exploding one or more wedges from the center of the pie, and a shadow effect. -Take a close look at the attached code, which generates this figure in just -a few lines of code. - -.. plot:: mpl_examples/pie_and_polar_charts/pie_demo_features.py - -.. _screenshots_table_demo: - -Table demo -========== - -The :func:`~matplotlib.pyplot.table` command adds a text table -to an axes. - -.. plot:: mpl_examples/pylab_examples/table_demo.py - - -.. _screenshots_scatter_demo: - - -Scatter demo -============ - -The :func:`~matplotlib.pyplot.scatter` command makes a scatter plot -with (optional) size and color arguments. This example plots changes -in Google's stock price, with marker sizes reflecting the -trading volume and colors varying with time. Here, the -alpha attribute is used to make semitransparent circle markers. - -.. plot:: mpl_examples/pylab_examples/scatter_demo2.py - - -.. _screenshots_slider_demo: - -Slider demo -=========== - -Matplotlib has basic GUI widgets that are independent of the graphical -user interface you are using, allowing you to write cross GUI figures -and widgets. See :mod:`matplotlib.widgets` and the -`widget examples <../examples/widgets/index.html>`_. - -.. plot:: mpl_examples/widgets/slider_demo.py - - -.. _screenshots_fill_demo: - -Fill demo -========= - -The :func:`~matplotlib.pyplot.fill` command lets you -plot filled curves and polygons: - -.. plot:: mpl_examples/lines_bars_and_markers/fill_demo.py - -Thanks to Andrew Straw for adding this function. - -.. _screenshots_date_demo: - -Date demo -========= - -You can plot date data with major and minor ticks and custom tick formatters -for both. - -.. plot:: mpl_examples/api/date_demo.py - -See :mod:`matplotlib.ticker` and :mod:`matplotlib.dates` for details and usage. - -.. _screenshots_jdh_demo: - -Financial charts -================ - -You can make sophisticated financial plots by combining the various -plot functions, layout commands, and labeling tools provided by matplotlib. -The following example emulates one of the financial plots in -`ChartDirector `_: - - -.. plot:: mpl_examples/pylab_examples/finance_work2.py - - -.. _screenshots_basemap_demo: - -Basemap demo -============ - -Jeff Whitaker's :ref:`toolkit_basemap` add-on toolkit makes it possible to plot data on many different map projections. This example shows how to plot contours, markers and text on an orthographic projection, with NASA's "blue marble" satellite image as a background. - -.. plot:: pyplots/plotmap.py - -.. _screenshots_log_demo: - -Log plots -========= - -The :func:`~matplotlib.pyplot.semilogx`, -:func:`~matplotlib.pyplot.semilogy` and -:func:`~matplotlib.pyplot.loglog` functions simplify the creation of -logarithmic plots. - -.. plot:: mpl_examples/pylab_examples/log_demo.py - -Thanks to Andrew Straw, Darren Dale and Gregory Lielens for contributions -log-scaling infrastructure. - -.. _screenshots_polar_demo: - -Polar plots -=========== - -The :func:`~matplotlib.pyplot.polar` command generates polar plots. - -.. plot:: mpl_examples/pylab_examples/polar_demo.py - -.. _screenshots_legend_demo: - - -Legends -======= - -The :func:`~matplotlib.pyplot.legend` command automatically -generates figure legends, with MATLAB-compatible legend placement -commands. - -.. plot:: mpl_examples/pylab_examples/legend_demo.py - -Thanks to Charles Twardy for input on the legend command. - -.. _screenshots_mathtext_examples_demo: - -Mathtext_examples -================= - -Below is a sampling of the many TeX expressions now supported by matplotlib's -internal mathtext engine. The mathtext module provides TeX style mathematical -expressions using `freetype2 `_ -and the BaKoMa computer modern or `STIX `_ fonts. -See the :mod:`matplotlib.mathtext` module for additional details. - -.. plot:: mpl_examples/pylab_examples/mathtext_examples.py - -Matplotlib's mathtext infrastructure is an independent implementation and -does not require TeX or any external packages installed on your computer. See -the tutorial at :ref:`mathtext-tutorial`. - - -.. _screenshots_tex_demo: - -Native TeX rendering -==================== - -Although matplotlib's internal math rendering engine is quite -powerful, sometimes you need TeX. Matplotlib supports external TeX -rendering of strings with the *usetex* option. - -.. plot:: pyplots/tex_demo.py - -.. _screenshots_eeg_demo: - -EEG demo -========= - -You can embed matplotlib into pygtk, wx, Tk, FLTK, or Qt -applications. Here is a screenshot of an EEG viewer called pbrain, -which is part of the NeuroImaging in Python suite -`NIPY `_. - -.. image:: ../_static/eeg_small.png - -The lower axes uses :func:`~matplotlib.pyplot.specgram` -to plot the spectrogram of one of the EEG channels. - -For examples of how to embed matplotlib in different toolkits, see: - - * :ref:`user_interfaces-embedding_in_gtk2` - * :ref:`user_interfaces-embedding_in_wx2` - * :ref:`user_interfaces-mpl_with_glade` - * :ref:`user_interfaces-embedding_in_qt` - * :ref:`user_interfaces-embedding_in_tk` diff --git a/dev/_sources/users/shell.txt b/dev/_sources/users/shell.txt deleted file mode 100644 index bdc0ff329f3..00000000000 --- a/dev/_sources/users/shell.txt +++ /dev/null @@ -1,147 +0,0 @@ -.. _mpl-shell: - -********************************** -Using matplotlib in a python shell -********************************** - -By default, matplotlib defers drawing until the end of the script -because drawing can be an expensive operation, and you may not want -to update the plot every time a single property is changed, only once -after all the properties have changed. - -But when working from the python shell, you usually do want to update -the plot with every command, eg, after changing the -:func:`~matplotlib.pyplot.xlabel`, or the marker style of a line. -While this is simple in concept, in practice it can be tricky, because -matplotlib is a graphical user interface application under the hood, -and there are some tricks to make the applications work right in a -python shell. - - -.. _ipython-pylab: - -Ipython to the rescue -===================== - -Fortunately, `ipython `_, an enhanced -interactive python shell, has figured out all of these tricks, and is -matplotlib aware, so when you start ipython in the *pylab* mode. - -.. sourcecode:: ipython - - johnh@flag:~> ipython -pylab - Python 2.4.5 (#4, Apr 12 2008, 09:09:16) - IPython 0.9.0 -- An enhanced Interactive Python. - - Welcome to pylab, a matplotlib-based Python environment. - For more information, type 'help(pylab)'. - - In [1]: x = randn(10000) - - In [2]: hist(x, 100) - -it sets everything up for you so interactive plotting works as you -would expect it to. Call :func:`~matplotlib.pyplot.figure` and a -figure window pops up, call :func:`~matplotlib.pyplot.plot` and your -data appears in the figure window. - -Note in the example above that we did not import any matplotlib names -because in pylab mode, ipython will import them automatically. -ipython also turns on *interactive* mode for you, which causes every -pyplot command to trigger a figure update, and also provides a -matplotlib aware ``run`` command to run matplotlib scripts -efficiently. ipython will turn off interactive mode during a ``run`` -command, and then restore the interactive state at the end of the -run so you can continue tweaking the figure manually. - -There has been a lot of recent work to embed ipython, with pylab -support, into various GUI applications, so check on the ipython -mailing `list -`_ for the -latest status. - -.. _other-shells: - -Other python interpreters -========================= - -If you can't use ipython, and still want to use matplotlib/pylab from -an interactive python shell, e.g., the plain-ole standard python -interactive interpreter, you -are going to need to understand what a matplotlib backend is -:ref:`what-is-a-backend`. - - - -With the TkAgg backend, which uses the Tkinter user interface toolkit, -you can use matplotlib from an arbitrary non-gui python shell. Just set your -``backend : TkAgg`` and ``interactive : True`` in your -:file:`matplotlibrc` file (see :ref:`customizing-matplotlib`) and fire -up python. Then:: - - >>> from pylab import * - >>> plot([1,2,3]) - >>> xlabel('hi mom') - -should work out of the box. This is also likely to work with recent -versions of the qt4agg and gtkagg backends, and with the macosx backend -on the Macintosh. Note, in batch mode, -i.e. when making -figures from scripts, interactive mode can be slow since it redraws -the figure with each command. So you may want to think carefully -before making this the default behavior via the :file:`matplotlibrc` -file instead of using the functions listed in the next section. - -Gui shells are at best problematic, because they have to run a -mainloop, but interactive plotting also involves a mainloop. Ipython -has sorted all this out for the primary matplotlib backends. There -may be other shells and IDEs that also work with matplotlib in interactive -mode, but one obvious candidate does not: -the python IDLE IDE is a Tkinter gui app that does -not support pylab interactive mode, regardless of backend. - -.. _controlling-interactive: - -Controlling interactive updating -================================ - -The *interactive* property of the pyplot interface controls whether a -figure canvas is drawn on every pyplot command. If *interactive* is -*False*, then the figure state is updated on every plot command, but -will only be drawn on explicit calls to -:func:`~matplotlib.pyplot.draw`. When *interactive* is -*True*, then every pyplot command triggers a draw. - - -The pyplot interface provides 4 commands that are useful for -interactive control. - -:func:`~matplotlib.pyplot.isinteractive` - returns the interactive setting *True|False* - -:func:`~matplotlib.pyplot.ion` - turns interactive mode on - -:func:`~matplotlib.pyplot.ioff` - turns interactive mode off - -:func:`~matplotlib.pyplot.draw` - forces a figure redraw - -When working with a big figure in which drawing is expensive, you may -want to turn matplotlib's interactive setting off temporarily to avoid -the performance hit:: - - - >>> #create big-expensive-figure - >>> ioff() # turn updates off - >>> title('now how much would you pay?') - >>> xticklabels(fontsize=20, color='green') - >>> draw() # force a draw - >>> savefig('alldone', dpi=300) - >>> close() - >>> ion() # turn updating back on - >>> plot(rand(20), mfc='g', mec='r', ms=40, mew=4, ls='--', lw=3) - - - diff --git a/dev/_sources/users/text_intro.txt b/dev/_sources/users/text_intro.txt deleted file mode 100644 index d4de28a33dc..00000000000 --- a/dev/_sources/users/text_intro.txt +++ /dev/null @@ -1,59 +0,0 @@ -.. _text-intro: - -Text introduction -================= - -matplotlib has excellent text support, including mathematical -expressions, truetype support for raster and vector outputs, newline -separated text with arbitrary rotations, and unicode support. Because -we embed the fonts directly in the output documents, eg for postscript -or PDF, what you see on the screen is what you get in the hardcopy. -`freetype2 `_ support -produces very nice, antialiased fonts, that look good even at small -raster sizes. matplotlib includes its own -:mod:`matplotlib.font_manager`, thanks to Paul Barrett, which -implements a cross platform, W3C compliant font finding algorithm. - -You have total control over every text property (font size, font -weight, text location and color, etc) with sensible defaults set in -the rc file. And significantly for those interested in mathematical -or scientific figures, matplotlib implements a large number of TeX -math symbols and commands, to support :ref:`mathematical expressions -` anywhere in your figure. - - -Basic text commands -=================== - -The following commands are used to create text in the pyplot -interface - -* :func:`~matplotlib.pyplot.text` - add text at an arbitrary location to the ``Axes``; - :meth:`matplotlib.axes.Axes.text` in the API. - -* :func:`~matplotlib.pyplot.xlabel` - add an axis label to the x-axis; - :meth:`matplotlib.axes.Axes.set_xlabel` in the API. - -* :func:`~matplotlib.pyplot.ylabel` - add an axis label to the y-axis; - :meth:`matplotlib.axes.Axes.set_ylabel` in the API. - -* :func:`~matplotlib.pyplot.title` - add a title to the ``Axes``; - :meth:`matplotlib.axes.Axes.set_title` in the API. - -* :func:`~matplotlib.pyplot.figtext` - add text at an arbitrary location to the ``Figure``; - :meth:`matplotlib.figure.Figure.text` in the API. - -* :func:`~matplotlib.pyplot.suptitle` - add a title to the ``Figure``; - :meth:`matplotlib.figure.Figure.suptitle` in the API. - -* :func:`~matplotlib.pyplot.annotate` - add an annotation, with - optional arrow, to the ``Axes`` ; :meth:`matplotlib.axes.Axes.annotate` - in the API. - -All of these functions create and return a -:func:`matplotlib.text.Text` instance, which can be configured with a -variety of font and other properties. The example below shows all of -these commands in action. - -.. plot:: pyplots/text_commands.py - :include-source: diff --git a/dev/_sources/users/text_props.txt b/dev/_sources/users/text_props.txt deleted file mode 100644 index e29ef09e6ea..00000000000 --- a/dev/_sources/users/text_props.txt +++ /dev/null @@ -1,61 +0,0 @@ -.. _text-properties: - -Text properties and layout -========================== - -The :class:`matplotlib.text.Text` instances have a variety of -properties which can be configured via keyword arguments to the text -commands (eg :func:`~matplotlib.pyplot.title`, -:func:`~matplotlib.pyplot.xlabel` and :func:`~matplotlib.pyplot.text`). - -========================== ============================================================================== -Property Value Type -========================== ============================================================================== -alpha float -backgroundcolor any matplotlib color -bbox rectangle prop dict plus key 'pad' which is a pad in points -clip_box a matplotlib.transform.Bbox instance -clip_on [True | False] -clip_path a Path instance and a Transform instance, a Patch -color any matplotlib color -family [ 'serif' | 'sans-serif' | 'cursive' | 'fantasy' | 'monospace' ] -fontproperties a matplotlib.font_manager.FontProperties instance -horizontalalignment or ha [ 'center' | 'right' | 'left' ] -label any string -linespacing float -multialignment ['left' | 'right' | 'center' ] -name or fontname string eg, ['Sans' | 'Courier' | 'Helvetica' ...] -picker [None|float|boolean|callable] -position (x,y) -rotation [ angle in degrees 'vertical' | 'horizontal' -size or fontsize [ size in points | relative size eg 'smaller', 'x-large' ] -style or fontstyle [ 'normal' | 'italic' | 'oblique'] -text string or anything printable with '%s' conversion -transform a matplotlib.transform transformation instance -variant [ 'normal' | 'small-caps' ] -verticalalignment or va [ 'center' | 'top' | 'bottom' | 'baseline' ] -visible [True | False] -weight or fontweight [ 'normal' | 'bold' | 'heavy' | 'light' | 'ultrabold' | 'ultralight'] -x float -y float -zorder any number -========================== ============================================================================== - - -You can layout text with the alignment arguments -``horizontalalignment``, ``verticalalignment``, and -``multialignment``. ``horizontalalignment`` controls whether the x -positional argument for the text indicates the left, center or right -side of the text bounding box. ``verticalalignment`` controls whether -the y positional argument for the text indicates the bottom, center or -top side of the text bounding box. ``multialignment``, for newline -separated strings only, controls whether the different lines are left, -center or right justified. Here is an example which uses the -:func:`~matplotlib.pyplot.text` command to show the various alignment -possibilities. The use of ``transform=ax.transAxes`` throughout the -code indicates that the coordinates are given relative to the axes -bounding box, with 0,0 being the lower left of the axes and 1,1 the -upper right. - -.. plot:: pyplots/text_layout.py - :include-source: diff --git a/dev/_sources/users/tight_layout_guide.txt b/dev/_sources/users/tight_layout_guide.txt deleted file mode 100644 index 4a28c3d2b9b..00000000000 --- a/dev/_sources/users/tight_layout_guide.txt +++ /dev/null @@ -1,324 +0,0 @@ -.. _plotting-guide-tight-layout: - -****************** -Tight Layout guide -****************** - -*tight_layout* automatically adjusts subplot params so that the -subplot(s) fits in to the figure area. This is an experimental -feature and may not work for some cases. It only checks the extents -of ticklabels, axis labels, and titles. - - -Simple Example -============== - -In matplotlib, the location of axes (including subplots) are specified in -normalized figure coordinates. It can happen that your axis labels or -titles (or sometimes even ticklabels) go outside the figure area, and are thus -clipped. - -.. plot:: - :include-source: - :context: - - plt.rcParams['savefig.facecolor'] = "0.8" - - def example_plot(ax, fontsize=12): - ax.plot([1, 2]) - ax.locator_params(nbins=3) - ax.set_xlabel('x-label', fontsize=fontsize) - ax.set_ylabel('y-label', fontsize=fontsize) - ax.set_title('Title', fontsize=fontsize) - - plt.close('all') - fig, ax = plt.subplots() - example_plot(ax, fontsize=24) - -To prevent this, the location of axes needs to be adjusted. For -subplots, this can be done by adjusting the subplot params -(:ref:`howto-subplots-adjust`). Matplotlib v1.1 introduces a new -command :func:`~matplotlib.pyplot.tight_layout` that does this -automatically for you. - -.. plot:: - :include-source: - :context: - - plt.tight_layout() - -When you have multiple subplots, often you see labels of different -axes overlapping each other. - -.. plot:: - :include-source: - :context: - - plt.close('all') - fig, ((ax1, ax2), (ax3, ax4)) = plt.subplots(nrows=2, ncols=2) - example_plot(ax1) - example_plot(ax2) - example_plot(ax3) - example_plot(ax4) - - -:func:`~matplotlib.pyplot.tight_layout` will also adjust spacing between -subplots to minimize the overlaps. - -.. plot:: - :include-source: - :context: - - plt.tight_layout() - -:func:`~matplotlib.pyplot.tight_layout` can take keyword arguments of -*pad*, *w_pad* and *h_pad*. These control the extra padding around the -figure border and between subplots. The pads are specified in fraction -of fontsize. - -.. plot:: - :include-source: - :context: - - plt.tight_layout(pad=0.4, w_pad=0.5, h_pad=1.0) - -:func:`~matplotlib.pyplot.tight_layout` will work even if the sizes of -subplots are different as far as their grid specification is -compatible. In the example below, *ax1* and *ax2* are subplots of a 2x2 -grid, while *ax3* is of a 1x2 grid. - - -.. plot:: - :include-source: - :context: - - plt.close('all') - fig = plt.figure() - - ax1 = plt.subplot(221) - ax2 = plt.subplot(223) - ax3 = plt.subplot(122) - - example_plot(ax1) - example_plot(ax2) - example_plot(ax3) - - plt.tight_layout() - - -It works with subplots created with -:func:`~matplotlib.pyplot.subplot2grid`. In general, subplots created -from the gridspec (:ref:`gridspec-guide`) will work. - -.. plot:: - :include-source: - :context: - - plt.close('all') - fig = plt.figure() - - ax1 = plt.subplot2grid((3, 3), (0, 0)) - ax2 = plt.subplot2grid((3, 3), (0, 1), colspan=2) - ax3 = plt.subplot2grid((3, 3), (1, 0), colspan=2, rowspan=2) - ax4 = plt.subplot2grid((3, 3), (1, 2), rowspan=2) - - example_plot(ax1) - example_plot(ax2) - example_plot(ax3) - example_plot(ax4) - - plt.tight_layout() - - -Although not thoroughly tested, it seems to work for subplots with -aspect != "auto" (e.g., axes with images). - - -.. plot:: - :include-source: - :context: - - arr = np.arange(100).reshape((10,10)) - - plt.close('all') - fig = plt.figure(figsize=(5,4)) - - ax = plt.subplot(111) - im = ax.imshow(arr, interpolation="none") - - plt.tight_layout() - - -Caveats -------- - - * :func:`~matplotlib.pyplot.tight_layout` only considers ticklabels, axis - labels, and titles. Thus, other artists may be clipped and also may - overlap. - - * It assumes that the extra space needed for ticklabels, axis labels, - and titles is independent of original location of axes. This is - often true, but there are rare cases where it is not. - - * pad=0 clips some of the texts by a few pixels. This may be a bug or - a limitation of the current algorithm and it is not clear why it - happens. Meanwhile, use of pad at least larger than 0.3 is - recommended. - - - - -Use with GridSpec ------------------ - -GridSpec has its own :func:`~matplotlib.gridspec.GridSpec.tight_layout` method -(the pyplot api :func:`~matplotlib.pyplot.tight_layout` also works). - -.. plot:: - :include-source: - :context: - - plt.close('all') - fig = plt.figure() - - import matplotlib.gridspec as gridspec - - gs1 = gridspec.GridSpec(2, 1) - ax1 = fig.add_subplot(gs1[0]) - ax2 = fig.add_subplot(gs1[1]) - - example_plot(ax1) - example_plot(ax2) - - gs1.tight_layout(fig) - - -You may provide an optional *rect* parameter, which specifies the bounding box -that the subplots will be fit inside. The coordinates must be in normalized -figure coordinates and the default is (0, 0, 1, 1). - -.. plot:: - :include-source: - :context: - - gs1.tight_layout(fig, rect=[0, 0, 0.5, 1]) - - -For example, this can be used for a figure with multiple gridspecs. - -.. plot:: - :include-source: - :context: - - gs2 = gridspec.GridSpec(3, 1) - - for ss in gs2: - ax = fig.add_subplot(ss) - example_plot(ax) - ax.set_title("") - ax.set_xlabel("") - - ax.set_xlabel("x-label", fontsize=12) - - gs2.tight_layout(fig, rect=[0.5, 0, 1, 1], h_pad=0.5) - - -We may try to match the top and bottom of two grids :: - - top = min(gs1.top, gs2.top) - bottom = max(gs1.bottom, gs2.bottom) - - gs1.update(top=top, bottom=bottom) - gs2.update(top=top, bottom=bottom) - - -While this should be mostly good enough, adjusting top and bottom -may require adjustment of hspace also. To update hspace & vspace, we -call :func:`~matplotlib.gridspec.GridSpec.tight_layout` again with updated -rect argument. Note that the rect argument specifies the area including the -ticklabels, etc. Thus, we will increase the bottom (which is 0 for the normal -case) by the difference between the *bottom* from above and the bottom of each -gridspec. Same thing for the top. - -.. plot:: - :include-source: - :context: - - top = min(gs1.top, gs2.top) - bottom = max(gs1.bottom, gs2.bottom) - - gs1.tight_layout(fig, rect=[None, 0 + (bottom-gs1.bottom), - 0.5, 1 - (gs1.top-top)]) - gs2.tight_layout(fig, rect=[0.5, 0 + (bottom-gs2.bottom), - None, 1 - (gs2.top-top)], - h_pad=0.5) - - - -Use with AxesGrid1 ------------------- - -While limited, the axes_grid1 toolkit is also supported. - - -.. plot:: - :include-source: - :context: - - plt.close('all') - fig = plt.figure() - - from mpl_toolkits.axes_grid1 import Grid - grid = Grid(fig, rect=111, nrows_ncols=(2,2), - axes_pad=0.25, label_mode='L', - ) - - for ax in grid: - example_plot(ax) - ax.title.set_visible(False) - - plt.tight_layout() - - - -Colorbar --------- - -If you create a colorbar with the :func:`~matplotlib.pyplot.colorbar` -command, the created colorbar is an instance of Axes, *not* Subplot, so -tight_layout does not work. With Matplotlib v1.1, you may create a -colorbar as a subplot using the gridspec. - -.. plot:: - :include-source: - :context: - - plt.close('all') - fig = plt.figure(figsize=(4, 4)) - im = plt.imshow(arr, interpolation="none") - - plt.colorbar(im, use_gridspec=True) - - plt.tight_layout() - -Another option is to use AxesGrid1 toolkit to -explicitly create an axes for colorbar. - -.. plot:: - :include-source: - :context: - - plt.close('all') - fig = plt.figure(figsize=(4, 4)) - im = plt.imshow(arr, interpolation="none") - - from mpl_toolkits.axes_grid1 import make_axes_locatable - divider = make_axes_locatable(plt.gca()) - cax = divider.append_axes("right", "5%", pad="3%") - plt.colorbar(im, cax=cax) - - plt.tight_layout() - - - - diff --git a/dev/_sources/users/transforms_tutorial.txt b/dev/_sources/users/transforms_tutorial.txt deleted file mode 100644 index b5fdf38e481..00000000000 --- a/dev/_sources/users/transforms_tutorial.txt +++ /dev/null @@ -1,452 +0,0 @@ -.. _transforms_tutorial: - -************************** -Transformations Tutorial -************************** - -Like any graphics packages, matplotlib is built on top of a -transformation framework to easily move between coordinate systems, -the userland `data` coordinate system, the `axes` coordinate system, -the `figure` coordinate system, and the `display` coordinate system. -In 95% of your plotting, you won't need to think about this, as it -happens under the hood, but as you push the limits of custom figure -generation, it helps to have an understanding of these objects so you -can reuse the existing transformations matplotlib makes available to -you, or create your own (see :mod:`matplotlib.transforms`). The table -below summarizes the existing coordinate systems, the transformation -object you should use to work in that coordinate system, and the -description of that system. In the `Transformation Object` column, -``ax`` is a :class:`~matplotlib.axes.Axes` instance, and ``fig`` is a -:class:`~matplotlib.figure.Figure` instance. - -========== ===================== ============================================================================================================================================================== -Coordinate Transformation Object Description -========== ===================== ============================================================================================================================================================== -`data` ``ax.transData`` The userland data coordinate system, controlled by the xlim and ylim -`axes` ``ax.transAxes`` The coordinate system of the :class:`~matplotlib.axes.Axes`; (0,0) is bottom left of the axes, and (1,1) is top right of the axes -`figure` ``fig.transFigure`` The coordinate system of the :class:`~matplotlib.figure.Figure`; (0,0) is bottom left of the figure, and (1,1) is top right of the figure -`display` `None` This is the pixel coordinate system of the display; (0,0) is the bottom left of the display, and (width, height) is the top right of the display in pixels -========== ===================== ============================================================================================================================================================== - - - -All of the transformation objects in the table above take inputs in -their coordinate system, and transform the input to the `display` -coordinate system. That is why the `display` coordinate system has -`None` for the `Transformation Object` column -- it already is in -display coordinates. The transformations also know how to invert -themselves, to go from `display` back to the native coordinate system. -This is particularly useful when processing events from the user -interface, which typically occur in display space, and you want to -know where the mouse click or key-press occurred in your data -coordinate system. - -.. _data-coords: - -Data coordinates -================ - -Let's start with the most commonly used coordinate, the `data` -coordinate system. Whenever you add data to the axes, matplotlib -updates the datalimits, most commonly updated with the -:meth:`~matplotlib.axes.Axes.set_xlim` and -:meth:`~matplotlib.axes.Axes.set_ylim` methods. For example, in the -figure below, the data limits stretch from 0 to 10 on the x-axis, and --1 to 1 on the y-axis. - -.. plot:: - :include-source: - - import numpy as np - import matplotlib.pyplot as plt - - x = np.arange(0, 10, 0.005) - y = np.exp(-x/2.) * np.sin(2*np.pi*x) - - fig = plt.figure() - ax = fig.add_subplot(111) - ax.plot(x, y) - ax.set_xlim(0, 10) - ax.set_ylim(-1, 1) - - plt.show() - -You can use the ``ax.transData`` instance to transform from your -`data` to your `display` coordinate system, either a single point or a -sequence of points as shown below: - -.. sourcecode:: ipython - - In [14]: type(ax.transData) - Out[14]: - - In [15]: ax.transData.transform((5, 0)) - Out[15]: array([ 335.175, 247. ]) - - In [16]: ax.transData.transform([(5, 0), (1,2)]) - Out[16]: - array([[ 335.175, 247. ], - [ 132.435, 642.2 ]]) - -You can use the :meth:`~matplotlib.transforms.Transform.inverted` -method to create a transform which will take you from display to data -coordinates: - -.. sourcecode:: ipython - - In [41]: inv = ax.transData.inverted() - - In [42]: type(inv) - Out[42]: - - In [43]: inv.transform((335.175, 247.)) - Out[43]: array([ 5., 0.]) - -If your are typing along with this tutorial, the exact values of the -display coordinates may differ if you have a different window size or -dpi setting. Likewise, in the figure below, the display labeled -points are probably not the same as in the ipython session because the -documentation figure size defaults are different. - -.. plot:: pyplots/annotate_transform.py - - -.. note:: - - If you run the source code in the example above in a GUI backend, - you may also find that the two arrows for the `data` and `display` - annotations do not point to exactly the same point. This is because - the display point was computed before the figure was displayed, and - the GUI backend may slightly resize the figure when it is created. - The effect is more pronounced if you resize the figure yourself. - This is one good reason why you rarely want to work in display - space, but you can connect to the ``'on_draw'`` - :class:`~matplotlib.backend_bases.Event` to update figure - coordinates on figure draws; see :ref:`event-handling-tutorial`. - -When you change the x or y limits of your axes, the data limits are -updated so the transformation yields a new display point. Note that -when we just change the ylim, only the y-display coordinate is -altered, and when we change the xlim too, both are altered. More on -this later when we talk about the -:class:`~matplotlib.transforms.Bbox`. - -.. sourcecode:: ipython - - In [54]: ax.transData.transform((5, 0)) - Out[54]: array([ 335.175, 247. ]) - - In [55]: ax.set_ylim(-1,2) - Out[55]: (-1, 2) - - In [56]: ax.transData.transform((5, 0)) - Out[56]: array([ 335.175 , 181.13333333]) - - In [57]: ax.set_xlim(10,20) - Out[57]: (10, 20) - - In [58]: ax.transData.transform((5, 0)) - Out[58]: array([-171.675 , 181.13333333]) - - - -.. _axes-coords: - -Axes coordinates -================ - -After the `data` coordinate system, `axes` is probably the second most -useful coordinate system. Here the point (0,0) is the bottom left of -your axes or subplot, (0.5, 0.5) is the center, and (1.0, 1.0) is the -top right. You can also refer to points outside the range, so (-0.1, -1.1) is to the left and above your axes. This coordinate system is -extremely useful when placing text in your axes, because you often -want a text bubble in a fixed, location, e.g., the upper left of the axes -pane, and have that location remain fixed when you pan or zoom. Here -is a simple example that creates four panels and labels them 'A', 'B', -'C', 'D' as you often see in journals. - -.. plot:: - :include-source: - - import numpy as np - import matplotlib.pyplot as plt - - fig = plt.figure() - for i, label in enumerate(('A', 'B', 'C', 'D')): - ax = fig.add_subplot(2,2,i+1) - ax.text(0.05, 0.95, label, transform=ax.transAxes, - fontsize=16, fontweight='bold', va='top') - - plt.show() - -You can also make lines or patches in the axes coordinate system, but -this is less useful in my experience than using ``ax.transAxes`` for -placing text. Nonetheless, here is a silly example which plots some -random dots in `data` space, and overlays a semi-transparent -:class:`~matplotlib.patches.Circle` centered in the middle of the axes -with a radius one quarter of the axes -- if your axes does not -preserve aspect ratio (see :meth:`~matplotlib.axes.Axes.set_aspect`), -this will look like an ellipse. Use the pan/zoom tool to move around, -or manually change the data xlim and ylim, and you will see the data -move, but the circle will remain fixed because it is not in `data` -coordinates and will always remain at the center of the axes. - -.. plot:: - :include-source: - - import numpy as np - import matplotlib.pyplot as plt - import matplotlib.patches as patches - fig = plt.figure() - ax = fig.add_subplot(111) - x, y = 10*np.random.rand(2, 1000) - ax.plot(x, y, 'go') # plot some data in data coordinates - - circ = patches.Circle((0.5, 0.5), 0.25, transform=ax.transAxes, - facecolor='yellow', alpha=0.5) - ax.add_patch(circ) - - plt.show() - -.. blended_transformations: - -Blended transformations -======================= - -Drawing in `blended` coordinate spaces which mix `axes` with `data` -coordinates is extremely useful, for example to create a horizontal -span which highlights some region of the y-data but spans across the -x-axis regardless of the data limits, pan or zoom level, etc. In fact -these blended lines and spans are so useful, we have built in -functions to make them easy to plot (see -:meth:`~matplotlib.axes.Axes.axhline`, -:meth:`~matplotlib.axes.Axes.axvline`, -:meth:`~matplotlib.axes.Axes.axhspan`, -:meth:`~matplotlib.axes.Axes.axvspan`) but for didactic purposes we -will implement the horizontal span here using a blended -transformation. This trick only works for separable transformations, -like you see in normal Cartesian coordinate systems, but not on -inseparable transformations like the -:class:`~matplotlib.projections.polar.PolarAxes.PolarTransform`. - -.. plot:: - :include-source: - - import numpy as np - import matplotlib.pyplot as plt - import matplotlib.patches as patches - import matplotlib.transforms as transforms - - fig = plt.figure() - ax = fig.add_subplot(111) - - x = np.random.randn(1000) - - ax.hist(x, 30) - ax.set_title(r'$\sigma=1 \/ \dots \/ \sigma=2$', fontsize=16) - - # the x coords of this transformation are data, and the - # y coord are axes - trans = transforms.blended_transform_factory( - ax.transData, ax.transAxes) - - # highlight the 1..2 stddev region with a span. - # We want x to be in data coordinates and y to - # span from 0..1 in axes coords - rect = patches.Rectangle((1,0), width=1, height=1, - transform=trans, color='yellow', - alpha=0.5) - - ax.add_patch(rect) - - plt.show() - -.. note:: - - The blended transformations where x is in data coords and y in axes - coordinates is so useful that we have helper methods to return the - versions mpl uses internally for drawing ticks, ticklabels, etc. - The methods are :meth:`matplotlib.axes.Axes.get_xaxis_transform` and - :meth:`matplotlib.axes.Axes.get_yaxis_transform`. So in the example - above, the call to - :meth:`~matplotlib.transforms.blended_transform_factory` can be - replaced by ``get_xaxis_transform``:: - - trans = ax.get_xaxis_transform() - -.. offset-transforms-shadow: - -Using offset transforms to create a shadow effect -================================================= - -One use of transformations is to create a new transformation that is -offset from another transformation, eg to place one object shifted a -bit relative to another object. Typically you want the shift to be in -some physical dimension, like points or inches rather than in data -coordinates, so that the shift effect is constant at different zoom -levels and dpi settings. - -One use for an offset is to create a shadow effect, where you draw one -object identical to the first just to the right of it, and just below -it, adjusting the zorder to make sure the shadow is drawn first and -then the object it is shadowing above it. The transforms module has a -helper transformation -:class:`~matplotlib.transforms.ScaledTranslation`. It is -instantiated with:: - - trans = ScaledTranslation(xt, yt, scale_trans) - -where `xt` and `yt` are the translation offsets, and `scale_trans` is -a transformation which scales `xt` and `yt` at transformation time -before applying the offsets. A typical use case is to use the figure -``fig.dpi_scale_trans`` transformation for the `scale_trans` argument, -to first scale `xt` and `yt` specified in points to `display` space -before doing the final offset. The dpi and inches offset is a -common-enough use case that we have a special helper function to -create it in :func:`matplotlib.transforms.offset_copy`, which returns -a new transform with an added offset. But in the example below, we'll -create the offset transform ourselves. Note the use of the plus -operator in:: - - offset = transforms.ScaledTranslation(dx, dy, - fig.dpi_scale_trans) - shadow_transform = ax.transData + offset - -showing that can chain transformations using the addition operator. -This code says: first apply the data transformation ``ax.transData`` -and then translate the data by `dx` and `dy` points. In typography, -a`point `_ is -1/72 inches, and by specifying your offsets in points, your figure -will look the same regardless of the dpi resolution it is saved in. - -.. plot:: - :include-source: - - import numpy as np - import matplotlib.pyplot as plt - import matplotlib.patches as patches - import matplotlib.transforms as transforms - - fig = plt.figure() - ax = fig.add_subplot(111) - - # make a simple sine wave - x = np.arange(0., 2., 0.01) - y = np.sin(2*np.pi*x) - line, = ax.plot(x, y, lw=3, color='blue') - - # shift the object over 2 points, and down 2 points - dx, dy = 2/72., -2/72. - offset = transforms.ScaledTranslation(dx, dy, - fig.dpi_scale_trans) - shadow_transform = ax.transData + offset - - # now plot the same data with our offset transform; - # use the zorder to make sure we are below the line - ax.plot(x, y, lw=3, color='gray', - transform=shadow_transform, - zorder=0.5*line.get_zorder()) - - ax.set_title('creating a shadow effect with an offset transform') - plt.show() - - -.. transformation-pipeline: - -The transformation pipeline -=========================== - -The ``ax.transData`` transform we have been working with in this -tutorial is a composite of three different transformations that -comprise the transformation pipeline from `data` -> `display` -coordinates. Michael Droettboom implemented the transformations -framework, taking care to provide a clean API that segregated the -nonlinear projections and scales that happen in polar and logarithmic -plots, from the linear affine transformations that happen when you pan -and zoom. There is an efficiency here, because you can pan and zoom -in your axes which affects the affine transformation, but you may not -need to compute the potentially expensive nonlinear scales or -projections on simple navigation events. It is also possible to -multiply affine transformation matrices together, and then apply them -to coordinates in one step. This is not true of all possible -transformations. - - -Here is how the ``ax.transData`` instance is defined in the basic -separable axis :class:`~matplotlib.axes.Axes` class:: - - self.transData = self.transScale + (self.transLimits + self.transAxes) - -We've been introduced to the ``transAxes`` instance above in -:ref:`axes-coords`, which maps the (0,0), (1,1) corners of the -axes or subplot bounding box to `display` space, so let's look at -these other two pieces. - -``self.transLimits`` is the transformation that takes you from -``data`` to ``axes`` coordinates; i.e., it maps your view xlim and ylim -to the unit space of the axes (and ``transAxes`` then takes that unit -space to display space). We can see this in action here - -.. sourcecode:: ipython - - In [80]: ax = subplot(111) - - In [81]: ax.set_xlim(0, 10) - Out[81]: (0, 10) - - In [82]: ax.set_ylim(-1,1) - Out[82]: (-1, 1) - - In [84]: ax.transLimits.transform((0,-1)) - Out[84]: array([ 0., 0.]) - - In [85]: ax.transLimits.transform((10,-1)) - Out[85]: array([ 1., 0.]) - - In [86]: ax.transLimits.transform((10,1)) - Out[86]: array([ 1., 1.]) - - In [87]: ax.transLimits.transform((5,0)) - Out[87]: array([ 0.5, 0.5]) - -and we can use this same inverted transformation to go from the unit -`axes` coordinates back to `data` coordinates. - -.. sourcecode:: ipython - - In [90]: inv.transform((0.25, 0.25)) - Out[90]: array([ 2.5, -0.5]) - -The final piece is the ``self.transScale`` attribute, which is -responsible for the optional non-linear scaling of the data, e.g., for -logarithmic axes. When an Axes is initially setup, this is just set to -the identity transform, since the basic matplotlib axes has linear -scale, but when you call a logarithmic scaling function like -:meth:`~matplotlib.axes.Axes.semilogx` or explicitly set the scale to -logarithmic with :meth:`~matplotlib.axes.Axes.set_xscale`, then the -``ax.transScale`` attribute is set to handle the nonlinear projection. -The scales transforms are properties of the respective ``xaxis`` and -``yaxis`` :class:`~matplotlib.axis.Axis` instances. For example, when -you call ``ax.set_xscale('log')``, the xaxis updates its scale to a -:class:`matplotlib.scale.LogScale` instance. - -For non-separable axes the PolarAxes, there is one more piece to -consider, the projection transformation. The ``transData`` -:class:`matplotlib.projections.polar.PolarAxes` is similar to that for -the typical separable matplotlib Axes, with one additional piece -``transProjection``:: - - self.transData = self.transScale + self.transProjection + \ - (self.transProjectionAffine + self.transAxes) - -``transProjection`` handles the projection from the space, -e.g., latitude and longitude for map data, or radius and theta for polar -data, to a separable Cartesian coordinate system. There are several -projection examples in the ``matplotlib.projections`` package, and the -best way to learn more is to open the source for those packages and -see how to make your own, since matplotlib supports extensible axes -and projections. Michael Droettboom has provided a nice tutorial -example of creating a hammer projection axes; see -:ref:`api-custom_projection_example`. - diff --git a/dev/_sources/users/usetex.txt b/dev/_sources/users/usetex.txt deleted file mode 100644 index fb8ebdc2f85..00000000000 --- a/dev/_sources/users/usetex.txt +++ /dev/null @@ -1,158 +0,0 @@ -.. _usetex-tutorial: - -************************* -Text rendering With LaTeX -************************* - -Matplotlib has the option to use LaTeX to manage all text layout. This -option is available with the following backends: - -* Agg -* PS -* PDF - -The LaTeX option is activated by setting ``text.usetex : True`` in -your rc settings. Text handling with matplotlib's LaTeX support is -slower than matplotlib's very capable :ref:`mathtext -`, but is more flexible, since different LaTeX -packages (font packages, math packages, etc.) can be used. The -results can be striking, especially when you take care to use the same -fonts in your figures as in the main document. - -Matplotlib's LaTeX support requires a working LaTeX_ installation, dvipng_ -(which may be included with your LaTeX installation), and Ghostscript_ -(GPL Ghostscript 8.60 or later is recommended). The executables for these -external dependencies must all be located on your :envvar:`PATH`. - -There are a couple of options to mention, which can be changed using :ref:`rc -settings `. Here is an example matplotlibrc file:: - - font.family : serif - font.serif : Times, Palatino, New Century Schoolbook, Bookman, Computer Modern Roman - font.sans-serif : Helvetica, Avant Garde, Computer Modern Sans serif - font.cursive : Zapf Chancery - font.monospace : Courier, Computer Modern Typewriter - - text.usetex : true - -The first valid font in each family is the one that will be loaded. If the -fonts are not specified, the Computer Modern fonts are used by default. All of -the other fonts are Adobe fonts. Times and Palatino each have their own -accompanying math fonts, while the other Adobe serif fonts make use of the -Computer Modern math fonts. See the PSNFSS_ documentation for more details. - -To use LaTeX and select Helvetica as the default font, without editing -matplotlibrc use:: - - from matplotlib import rc - rc('font',**{'family':'sans-serif','sans-serif':['Helvetica']}) - ## for Palatino and other serif fonts use: - #rc('font',**{'family':'serif','serif':['Palatino']}) - rc('text', usetex=True) - -Here is the standard example, `tex_demo.py`: - -.. plot:: pyplots/tex_demo.py - :include-source: - -Note that display math mode (``$$ e=mc^2 $$``) is not supported, but adding the -command ``\displaystyle``, as in `tex_demo.py`, will produce the same -results. - -.. note:: - Certain characters require special escaping in TeX, such as:: - - # $ % & ~ _ ^ \ { } \( \) \[ \] - - Therefore, these characters will behave differently depending on - the rcParam ``text.usetex`` flag. - -.. _usetex-unicode: - -usetex with unicode -=================== -It is also possible to use unicode strings with the LaTeX text manager, here is -an example taken from `tex_unicode_demo.py`: - -.. plot:: mpl_examples/pylab_examples/tex_unicode_demo.py - :include-source: - -.. _usetex-postscript: - -Postscript options -================== - -In order to produce encapsulated postscript files that can be embedded in a new -LaTeX document, the default behavior of matplotlib is to distill the output, -which removes some postscript operators used by LaTeX that are illegal in an -eps file. This step produces results which may be unacceptable to some users, -because the text is coarsely rasterized and converted to bitmaps, which are not -scalable like standard postscript, and the text is not searchable. One -workaround is to to set ``ps.distiller.res`` to a higher value (perhaps 6000) -in your rc settings, which will produce larger files but may look better and -scale reasonably. A better workaround, which requires Poppler_ or Xpdf_, can be -activated by changing the ``ps.usedistiller`` rc setting to ``xpdf``. This -alternative produces postscript without rasterizing text, so it scales -properly, can be edited in Adobe Illustrator, and searched text in pdf -documents. - -.. _usetex-hangups: - -Possible hangups -================ - -* On Windows, the :envvar:`PATH` environment variable may need to be modified - to include the directories containing the latex, dvipng and ghostscript - executables. See :ref:`environment-variables` and - :ref:`setting-windows-environment-variables` for details. - -* Using MiKTeX with Computer Modern fonts, if you get odd \*Agg and PNG - results, go to MiKTeX/Options and update your format files - -* The fonts look terrible on screen. You are probably running Mac OS, and there - is some funny business with older versions of dvipng on the mac. Set - ``text.dvipnghack : True`` in your matplotlibrc file. - -* On Ubuntu and Gentoo, the base texlive install does not ship with - the type1cm package. You may need to install some of the extra - packages to get all the goodies that come bundled with other latex - distributions. - -* Some progress has been made so matplotlib uses the dvi files - directly for text layout. This allows latex to be used for text - layout with the pdf and svg backends, as well as the \*Agg and PS - backends. In the future, a latex installation may be the only - external dependency. - -.. _usetex-troubleshooting: - -Troubleshooting -=============== - -* Try deleting your :file:`.matplotlib/tex.cache` directory. If you don't know - where to find :file:`.matplotlib`, see :ref:`locating-matplotlib-config-dir`. - -* Make sure LaTeX, dvipng and ghostscript are each working and on your - :envvar:`PATH`. - -* Make sure what you are trying to do is possible in a LaTeX document, - that your LaTeX syntax is valid and that you are using raw strings - if necessary to avoid unintended escape sequences. - -* Most problems reported on the mailing list have been cleared up by - upgrading Ghostscript_. If possible, please try upgrading to the - latest release before reporting problems to the list. - -* The ``text.latex.preamble`` rc setting is not officially supported. This - option provides lots of flexibility, and lots of ways to cause - problems. Please disable this option before reporting problems to - the mailing list. - -* If you still need help, please see :ref:`reporting-problems` - -.. _LaTeX: http://www.tug.org -.. _dvipng: http://sourceforge.net/projects/dvipng -.. _Ghostscript: http://www.cs.wisc.edu/~ghost/ -.. _PSNFSS: http://www.ctan.org/tex-archive/macros/latex/required/psnfss/psnfss2e.pdf -.. _Poppler: http://poppler.freedesktop.org/ -.. _Xpdf: http://www.foolabs.com/xpdf diff --git a/dev/_sources/users/whats_new.txt b/dev/_sources/users/whats_new.txt deleted file mode 100644 index b87bc11ce09..00000000000 --- a/dev/_sources/users/whats_new.txt +++ /dev/null @@ -1,1042 +0,0 @@ -.. _whats-new: - -************************ -What's new in matplotlib -************************ - -This page just covers the highlights -- for the full story, see the -`CHANGELOG `_ - -For a list of all of the issues and pull requests since the last -revision, see the :ref:`github-stats`. - -.. note:: - Matplotlib version 1.1 is the last major release compatible with Python - versions 2.4 to 2.7. matplotlib 1.2 and later require - versions 2.6, 2.7, and 3.1 and higher. - -.. contents:: Table of Contents - -.. _whats-new-1-3: - -new in matplotlib-1.3 -===================== -``axes.xmargin`` and ``axes.ymargin`` added to rcParams -------------------------------------------------------- -``rcParam`` values (``axes.xmargin`` and ``axes.ymargin``) were added -to configure the default margins used. Previously they were -hard-coded to default to 0, default value of both rcParam values is 0. - -New eventplot plot type -------------------------------------- -Todd Jennings added a :func:`~matplotlib.pyplot.eventplot` function to -create multiple rows or columns of identical line segments - -New EventCollection collections class -------------------------------------- -Todd Jennings created the new :class:`~matplotlib.collections.EventCollection` -class that allows for plotting and manipulating rows or columns of identical -line segments - -Baselines for stackplot ------------------------ -Till Stensitzki added non-zero baselines to :func:`~matplotlib.pyplot.stackplot`. -They may be symmetric or weighted. - -.. plot:: mpl_examples/pylab_examples/stackplot_demo2.py - -Improved ``bbox_inches="tight"`` functionality ----------------------------------------------- -Passing ``bbox_inches="tight"`` through to :func:`plt.save` now takes into account -*all* artists on a figure - this was previously not the case and led to several -corner cases which did not function as expected. - -Remember save directory ------------------------ -Martin Spacek made the save figure dialog remember the last directory saved -to. The default is configurable with the new `savefig.directory` setting -in `matplotlibrc`. - -Initialize a rotated rectangle ------------------------------- -Damon McDougall extended the :class:`~matplotlib.patches.Rectangle` constructor -to accept an `angle` kwarg, specifying the rotation of a rectangle in degrees. - -Rectangular colorbar extensions -------------------------------- -Andrew Dawson added a new keyword argument *extendrect* to -:meth:`~matplotlib.pyplot.colorbar` to optionally make colorbar -extensions rectangular instead of triangular. - -Calling subplot() without arguments ------------------------------------ -A call to :func:`~matplotlib.pyplot.subplot` without any arguments now -acts the same as `subplot(111)` or `subplot(1,1,1)` -- it creates one axes for -the whole figure. This was already the behavior for both -:func:`~matplotlib.pyplot.axes` and :func:`~matplotlib.pyplot.subplots`, and -now this consistency is shared with :func:`~matplotlib.pyplot.subplot`. - -Anchored text support ---------------------- -The `svg` and `pgf` backends are now able to save text alignment information -to their output formats. This allows to edit text elements in saved figures, -using Inkscape for example, while preserving their intended position. For -`svg` please note that you'll have to disable the default text-to-path -conversion (`mpl.rc('svg', fonttype='none')`). - -Triangular grid interpolation ------------------------------ -Geoffroy Billotey and Ian Thomas added classes to perform interpolation within -triangular grids: (:class:`~matplotlib.tri.LinearTriInterpolator` and -:class:`~matplotlib.tri.CubicTriInterpolator`) and a utility class to find -the triangles in which points lie ( -:class:`~matplotlib.tri.TrapezoidMapTriFinder`). -A helper class to perform mesh refinement and smooth contouring was also added -(:class:`~matplotlib.tri.UniformTriRefiner`). -Finally, a class implementing some basic tools for triangular mesh improvement -was added (:class:`~matplotlib.tri.TriAnalyzer`). - -.. plot:: mpl_examples/pylab_examples/tricontour_smooth_user.py - -Left and right side axes titles -------------------------------- -Andrew Dawson added the ability to add axes titles flush with the left and -right sides of the top of the axes using a new keyword argument `loc` to -:func:`~matplotlib.pyplot.title`. - -Improved manual contour plot label positioning ----------------------------------------------- - -Brian Mattern modified the manual contour plot label positioning code to -interpolate along line segments and find the actual closest point on a -contour to the requested position. Previously, the closest path vertex was -used, which, in the case of straight contours was sometimes quite distant -from the requested location. Much more precise label positioning is now -possible. - -Quickly find rcParams ---------------------- -Phil Elson made it easier to search for rcParameters by passing a -valid regular expression to :func:`matplotlib.RcParams.find_all`. -:class:`matplotlib.RcParams` now also has a pretty repr and str representation -so that search results are printed prettily: - - >>> import matplotlib - >>> print(matplotlib.rcParams.find_all('\.size')) - RcParams({'font.size': 12, - 'xtick.major.size': 4, - 'xtick.minor.size': 2, - 'ytick.major.size': 4, - 'ytick.minor.size': 2}) - -Better vertical text alignment ------------------------------- - -The vertical alignment of text is now consistent across backends. You -may see small differences in text placement, particularly with rotated -text. - -If you are using a custom backend, note that the `draw_text` renderer -method is now passed the location of the baseline, not the location of -the bottom of the text bounding box. - -``savefig.jpeg_quality`` added to rcParams ------------------------------------------------------------------------------- -``rcParam`` value ``savefig.jpeg_quality`` was added so that the user can -configure the default quality used when a figure is written as a JPEG. The -default quality is 95; previously, the default quality was 75. This change -minimizes the artifacting inherent in JPEG images, particularly with images -that have sharp changes in color as plots often do. - -Full control of the background color ------------------------------------- -Wes Campaigne and Phil Elson fixed the Agg backend such that PNGs are now -saved with the correct background color when :meth:`fig.patch.get_alpha` is -not 1. - - -.. _whats-new-1-2-2: - -new in matplotlib 1.2.2 -======================= - -Improved collections --------------------- - -The individual items of a collection may now have different alpha -values and be rendered correctly. This also fixes a bug where -collections were always filled in the PDF backend. - -Multiple images on same axes are correctly transparent ------------------------------------------------------- - -When putting multiple images onto the same axes, the background color -of the axes will now show through correctly. - -.. _whats-new-1-2: - -new in matplotlib-1.2 -===================== - -Python 3.x support ------------------- - -Matplotlib 1.2 is the first version to support Python 3.x, -specifically Python 3.1 and 3.2. To make this happen in a reasonable -way, we also had to drop support for Python versions earlier than 2.6. - -This work was done by Michael Droettboom, the Cape Town Python Users' -Group, many others and supported financially in part by the SAGE -project. - -The following GUI backends work under Python 3.x: Gtk3Cairo, Qt4Agg, -TkAgg and MacOSX. The other GUI backends do not yet have adequate -bindings for Python 3.x, but continue to work on Python 2.6 and 2.7, -particularly the Qt and QtAgg backends (which have been -deprecated). The non-GUI backends, such as PDF, PS and SVG, work on -both Python 2.x and 3.x. - -Features that depend on the Python Imaging Library, such as JPEG -handling, do not work, since the version of PIL for Python 3.x is not -sufficiently mature. - -PGF/TikZ backend ----------------- -Peter Würtz wrote a backend that allows matplotlib to export figures as -drawing commands for LaTeX. These can be processed by PdfLaTeX, XeLaTeX or -LuaLaTeX using the PGF/TikZ package. Usage examples and documentation are -found in :ref:`pgf-tutorial`. - -.. image:: /_static/pgf_preamble.* - -Locator interface ------------------ - -Philip Elson exposed the intelligence behind the tick Locator classes with a -simple interface. For instance, to get no more than 5 sensible steps which -span the values 10 and 19.5:: - - >>> import matplotlib.ticker as mticker - >>> locator = mticker.MaxNLocator(nbins=5) - >>> print(locator.tick_values(10, 19.5)) - [ 10. 12. 14. 16. 18. 20.] - -Tri-Surface Plots ------------------ - -Damon McDougall added a new plotting method for the -:mod:`~mpl_toolkits.mplot3d` toolkit called -:meth:`~mpl_toolkits.mplot3d.axes3d.Axes3D.plot_trisurf`. - -.. plot:: mpl_examples/mplot3d/trisurf3d_demo.py - -Control the lengths of colorbar extensions ------------------------------------------- - -Andrew Dawson added a new keyword argument *extendfrac* to -:meth:`~matplotlib.pyplot.colorbar` to control the length of -minimum and maximum colorbar extensions. - -.. plot:: - - import matplotlib.pyplot as plt - import numpy as np - - x = y = np.linspace(0., 2*np.pi, 100) - X, Y = np.meshgrid(x, y) - Z = np.cos(X) * np.sin(0.5*Y) - - clevs = [-.75, -.5, -.25, 0., .25, .5, .75] - cmap = plt.cm.get_cmap(name='jet', lut=8) - - ax1 = plt.subplot(211) - cs1 = plt.contourf(x, y, Z, clevs, cmap=cmap, extend='both') - cb1 = plt.colorbar(orientation='horizontal', extendfrac=None) - cb1.set_label('Default length colorbar extensions') - - ax2 = plt.subplot(212) - cs2 = plt.contourf(x, y, Z, clevs, cmap=cmap, extend='both') - cb2 = plt.colorbar(orientation='horizontal', extendfrac='auto') - cb2.set_label('Custom length colorbar extensions') - - plt.show() - - -Figures are picklable ---------------------- - -Philip Elson added an experimental feature to make figures picklable -for quick and easy short-term storage of plots. Pickle files -are not designed for long term storage, are unsupported when restoring a pickle -saved in another matplotlib version and are insecure when restoring a pickle -from an untrusted source. Having said this, they are useful for short term -storage for later modification inside matplotlib. - - -Set default bounding box in matplotlibrc ------------------------------------------- - -Two new defaults are available in the matplotlibrc configuration file: -``savefig.bbox``, which can be set to 'standard' or 'tight', and -``savefig.pad_inches``, which controls the bounding box padding. - - -New Boxplot Functionality -------------------------- - -Users can now incorporate their own methods for computing the median and its -confidence intervals into the :meth:`~matplotlib.axes.boxplot` method. For -every column of data passed to boxplot, the user can specify an accompanying -median and confidence interval. - -.. plot:: mpl_examples/pylab_examples/boxplot_demo3.py - - -New RC parameter functionality ------------------------------- - -Matthew Emmett added a function and a context manager to help manage RC -parameters: :func:`~matplotlib.rc_file` and :class:`~matplotlib.rc_context`. -To load RC parameters from a file:: - - >>> mpl.rc_file('mpl.rc') - -To temporarily use RC parameters:: - - >>> with mpl.rc_context(fname='mpl.rc', rc={'text.usetex': True}): - >>> ... - - -Streamplot ----------- - -Tom Flannaghan and Tony Yu have added a new -:meth:`~matplotlib.pyplot.streamplot` function to plot the streamlines of -a vector field. This has been a long-requested feature and complements the -existing :meth:`~matplotlib.pyplot.quiver` function for plotting vector fields. -In addition to simply plotting the streamlines of the vector field, -:meth:`~matplotlib.pyplot.streamplot` allows users to map the colors and/or -line widths of the streamlines to a separate parameter, such as the speed or -local intensity of the vector field. - -.. plot:: mpl_examples/images_contours_and_fields/streamplot_demo_features.py - - -New hist functionality ----------------------- - -Nic Eggert added a new `stacked` kwarg to :meth:`~matplotlib.pyplot.hist` that -allows creation of stacked histograms using any of the histogram types. -Previously, this functionality was only available by using the `barstacked` -histogram type. Now, when `stacked=True` is passed to the function, any of the -histogram types can be stacked. The `barstacked` histogram type retains its -previous functionality for backwards compatibility. - -Updated shipped dependencies ----------------------------- - -The following dependencies that ship with matplotlib and are -optionally installed alongside it have been updated: - - - `pytz ` 2012d - - - `dateutil ` 1.5 on Python 2.x, - and 2.1 on Python 3.x - - -Face-centred colors in tripcolor plots --------------------------------------- - -Ian Thomas extended :meth:`~matplotlib.pyplot.tripcolor` to allow one color -value to be specified for each triangular face rather than for each point in -a triangulation. - -.. plot:: mpl_examples/pylab_examples/tripcolor_demo.py - -Hatching patterns in filled contour plots, with legends -------------------------------------------------------- - -Phil Elson added support for hatching to -:func:`~matplotlib.pyplot.contourf`, together with the ability -to use a legend to identify contoured ranges. - -.. plot:: mpl_examples/pylab_examples/contourf_hatching.py - -Known issues in the matplotlib-1.2 release ------------------------------------------- - -- When using the Qt4Agg backend with IPython 0.11 or later, the save - dialog will not display. This should be fixed in a future version - of IPython. - -.. _whats-new-1-1: - -new in matplotlib-1.1 -===================== - -Sankey Diagrams ---------------- - -Kevin Davies has extended Yannick Copin's original Sankey example into a module -(:mod:`~matplotlib.sankey`) and provided new examples -(:ref:`api-sankey_demo_basics`, :ref:`api-sankey_demo_links`, -:ref:`api-sankey_demo_rankine`). - -.. plot:: mpl_examples/api/sankey_demo_rankine.py - -Animation ---------- - -Ryan May has written a backend-independent framework for creating -animated figures. The :mod:`~matplotlib.animation` module is intended -to replace the backend-specific examples formerly in the -:ref:`examples-index` listings. Examples using the new framework are -in :ref:`animation-examples-index`; see the entrancing :ref:`double -pendulum ` which uses -:meth:`matplotlib.animation.Animation.save` to create the movie below. - -.. raw:: html - - - -This should be considered as a beta release of the framework; -please try it and provide feedback. - - -Tight Layout ------------- - -A frequent issue raised by users of matplotlib is the lack of a layout -engine to nicely space out elements of the plots. While matplotlib still -adheres to the philosophy of giving users complete control over the placement -of plot elements, Jae-Joon Lee created the :mod:`~matplotlib.tight_layout` -module and introduced a new -command :func:`~matplotlib.pyplot.tight_layout` -to address the most common layout issues. - -.. plot:: - - plt.rcParams['savefig.facecolor'] = "0.8" - plt.rcParams['figure.figsize'] = 4, 3 - - fig, axes_list = plt.subplots(2, 1) - for ax in axes_list.flat: - ax.set(xlabel="x-label", ylabel="y-label", title="before tight_layout") - ax.locator_params(nbins=3) - - plt.show() - - plt.rcParams['savefig.facecolor'] = "0.8" - plt.rcParams['figure.figsize'] = 4, 3 - - fig, axes_list = plt.subplots(2, 1) - for ax in axes_list.flat: - ax.set(xlabel="x-label", ylabel="y-label", title="after tight_layout") - ax.locator_params(nbins=3) - - plt.tight_layout() - plt.show() - -The usage of this functionality can be as simple as :: - - plt.tight_layout() - -and it will adjust the spacing between subplots -so that the axis labels do not overlap with neighboring subplots. A -:ref:`plotting-guide-tight-layout` has been created to show how to use -this new tool. - -PyQT4, PySide, and IPython --------------------------- - -Gerald Storer made the Qt4 backend compatible with PySide as -well as PyQT4. At present, however, PySide does not support -the PyOS_InputHook mechanism for handling gui events while -waiting for text input, so it cannot be used with the new -version 0.11 of `IPython `_. Until this -feature appears in PySide, IPython users should use -the PyQT4 wrapper for QT4, which remains the matplotlib default. - -An rcParam entry, "backend.qt4", has been added to allow users -to select PyQt4, PyQt4v2, or PySide. The latter two use the -Version 2 Qt API. In most cases, users can ignore this rcParam -variable; it is available to aid in testing, and to provide control -for users who are embedding matplotlib in a PyQt4 or PySide app. - - -Legend ------- - -Jae-Joon Lee has improved plot legends. First, -legends for complex plots such as :meth:`~matplotlib.pyplot.stem` plots -will now display correctly. Second, the 'best' placement of a legend has -been improved in the presence of NANs. - -See :ref:`legend-complex-plots` for more detailed explanation and -examples. - -.. plot:: mpl_examples/pylab_examples/legend_demo4.py - -mplot3d -------- - -In continuing the efforts to make 3D plotting in matplotlib just as easy -as 2D plotting, Ben Root has made several improvements to the -:mod:`~mpl_toolkits.mplot3d` module. - -* :class:`~mpl_toolkits.mplot3d.axes3d.Axes3D` has been - improved to bring the class towards feature-parity with regular - Axes objects - -* Documentation for :ref:`toolkit_mplot3d-index` was significantly expanded - -* Axis labels and orientation improved - -* Most 3D plotting functions now support empty inputs - -* Ticker offset display added: - -.. plot:: mpl_examples/mplot3d/offset_demo.py - -* :meth:`~mpl_toolkits.mplot3d.axes3d.Axes3D.contourf` - gains *zdir* and *offset* kwargs. You can now do this: - -.. plot:: mpl_examples/mplot3d/contourf3d_demo2.py - -Numerix support removed ------------------------ - -After more than two years of deprecation warnings, Numerix support has -now been completely removed from matplotlib. - -Markers -------- - -The list of available markers for :meth:`~matplotlib.pyplot.plot` and -:meth:`~matplotlib.pyplot.scatter` has now been merged. While they -were mostly similar, some markers existed for one function, but not -the other. This merge did result in a conflict for the 'd' diamond -marker. Now, 'd' will be interpreted to always mean "thin" diamond -while 'D' will mean "regular" diamond. - -Thanks to Michael Droettboom for this effort. - -Other improvements ------------------- - -* Unit support for polar axes and :func:`~matplotlib.axes.Axes.arrow` - -* :class:`~matplotlib.projections.polar.PolarAxes` gains getters and setters for - "theta_direction", and "theta_offset" to allow for theta to go in - either the clock-wise or counter-clockwise direction and to specify where zero - degrees should be placed. - :meth:`~matplotlib.projections.polar.PolarAxes.set_theta_zero_location` is an - added convenience function. - -* Fixed error in argument handling for tri-functions such as - :meth:`~matplotlib.pyplot.tripcolor` - -* ``axes.labelweight`` parameter added to rcParams. - -* For :meth:`~matplotlib.pyplot.imshow`, *interpolation='nearest'* will - now always perform an interpolation. A "none" option has been added to - indicate no interpolation at all. - -* An error in the Hammer projection has been fixed. - -* *clabel* for :meth:`~matplotlib.pyplot.contour` now accepts a callable. - Thanks to Daniel Hyams for the original patch. - -* Jae-Joon Lee added the :class:`~mpl_toolkits.axes_grid1.axes_divider.HBox` - and :class:`~mpl_toolkits.axes_grid1.axes_divider.VBox` classes. - -* Christoph Gohlke reduced memory usage in :meth:`~matplotlib.pyplot.imshow`. - -* :meth:`~matplotlib.pyplot.scatter` now accepts empty inputs. - -* The behavior for 'symlog' scale has been fixed, but this may result - in some minor changes to existing plots. This work was refined by - ssyr. - -* Peter Butterworth added named figure support to - :func:`~matplotlib.pyplot.figure`. - -* Michiel de Hoon has modified the MacOSX backend to make - its interactive behavior consistent with the other backends. - -* Pim Schellart added a new colormap called "cubehelix". - Sameer Grover also added a colormap called "coolwarm". See it and all - other colormaps :ref:`here `. - -* Many bug fixes and documentation improvements. - -.. _whats-new-1-0: - -new in matplotlib-1.0 -====================== - -.. _whats-new-html5: - -HTML5/Canvas backend ---------------------- - -Simon Ratcliffe and Ludwig Schwardt have released an `HTML5/Canvas -`_ backend for matplotlib. The -backend is almost feature complete, and they have done a lot of work -comparing their html5 rendered images with our core renderer Agg. The -backend features client/server interactive navigation of matplotlib -figures in an html5 compliant browser. - -Sophisticated subplot grid layout ---------------------------------- - -Jae-Joon Lee has written :mod:`~matplotlib.gridspec`, a new module for -doing complex subplot layouts, featuring row and column spans and -more. See :ref:`gridspec-guide` for a tutorial overview. - -.. plot:: users/plotting/examples/demo_gridspec01.py - -Easy pythonic subplots ------------------------ - -Fernando Perez got tired of all the boilerplate code needed to create a -figure and multiple subplots when using the matplotlib API, and wrote -a :func:`~matplotlib.pyplot.subplots` helper function. Basic usage -allows you to create the figure and an array of subplots with numpy -indexing (starts with 0). e.g.:: - - fig, axarr = plt.subplots(2, 2) - axarr[0,0].plot([1,2,3]) # upper, left - -See :ref:`pylab_examples-subplots_demo` for several code examples. - -Contour fixes and and triplot ---------------------------------- - -Ian Thomas has fixed a long-standing bug that has vexed our most -talented developers for years. :func:`~matplotlib.pyplot.contourf` -now handles interior masked regions, and the boundaries of line and -filled contours coincide. - -Additionally, he has contributed a new module :mod:`~matplotlib.tri` and -helper function :func:`~matplotlib.pyplot.triplot` for creating and -plotting unstructured triangular grids. - -.. plot:: mpl_examples/pylab_examples/triplot_demo.py - -multiple calls to show supported ---------------------------------- - -A long standing request is to support multiple calls to -:func:`~matplotlib.pyplot.show`. This has been difficult because it -is hard to get consistent behavior across operating systems, user -interface toolkits and versions. Eric Firing has done a lot of work -on rationalizing show across backends, with the desired behavior to -make show raise all newly created figures and block execution until -they are closed. Repeated calls to show should raise newly created -figures since the last call. Eric has done a lot of testing on the -user interface toolkits and versions and platforms he has access to, -but it is not possible to test them all, so please report problems to -the `mailing list -`_ -and `bug tracker -`_. - - -mplot3d graphs can be embedded in arbitrary axes -------------------------------------------------- - -You can now place an mplot3d graph into an arbitrary axes location, -supporting mixing of 2D and 3D graphs in the same figure, and/or -multiple 3D graphs in a single figure, using the "projection" keyword -argument to add_axes or add_subplot. Thanks Ben Root. - -.. plot:: pyplots/whats_new_1_subplot3d.py - -tick_params ------------- - -Eric Firing wrote tick_params, a convenience method for changing the -appearance of ticks and tick labels. See pyplot function -:func:`~matplotlib.pyplot.tick_params` and associated Axes method -:meth:`~matplotlib.axes.Axes.tick_params`. - -Lots of performance and feature enhancements ---------------------------------------------- - - -* Faster magnification of large images, and the ability to zoom in to - a single pixel - -* Local installs of documentation work better - -* Improved "widgets" -- mouse grabbing is supported - -* More accurate snapping of lines to pixel boundaries - -* More consistent handling of color, particularly the alpha channel, - throughout the API - -Much improved software carpentry ---------------------------------- - -The matplotlib trunk is probably in as good a shape as it has ever -been, thanks to improved `software carpentry -`_. We now have a `buildbot -`_ which runs a suite of `nose -`_ regression tests on every -svn commit, auto-generating a set of images and comparing them against -a set of known-goods, sending emails to developers on failures with a -pixel-by-pixel `image comparison -`_. Releases and release -bugfixes happen in branches, allowing active new feature development -to happen in the trunk while keeping the release branches stable. -Thanks to Andrew Straw, Michael Droettboom and other matplotlib -developers for the heavy lifting. - -Bugfix marathon ----------------- - -Eric Firing went on a bug fixing and closing marathon, closing over -100 bugs on the `bug tracker -`_ with -help from Jae-Joon Lee, Michael Droettboom, Christoph Gohlke and -Michiel de Hoon. - - -.. _whats-new-0-99: - -new in matplotlib-0.99 -====================== - - - -New documentation ------------------ - -Jae-Joon Lee has written two new guides :ref:`plotting-guide-legend` -and :ref:`plotting-guide-annotation`. Michael Sarahan has written -:ref:`image_tutorial`. John Hunter has written two new tutorials on -working with paths and transformations: :ref:`path_tutorial` and -:ref:`transforms_tutorial`. - -.. _whats-new-mplot3d: - -mplot3d --------- - - -Reinier Heeres has ported John Porter's mplot3d over to the new -matplotlib transformations framework, and it is now available as a -toolkit mpl_toolkits.mplot3d (which now comes standard with all mpl -installs). See :ref:`mplot3d-examples-index` and -:ref:`toolkit_mplot3d-tutorial` - -.. plot:: pyplots/whats_new_99_mplot3d.py - -.. _whats-new-axes-grid: - -axes grid toolkit ------------------ - -Jae-Joon Lee has added a new toolkit to ease displaying multiple images in -matplotlib, as well as some support for curvilinear grids to support -the world coordinate system. The toolkit is included standard with all -new mpl installs. See :ref:`axes_grid-examples-index` and -:ref:`axes_grid_users-guide-index`. - -.. plot:: pyplots/whats_new_99_axes_grid.py - -.. _whats-new-spine: - -Axis spine placement --------------------- - -Andrew Straw has added the ability to place "axis spines" -- the lines -that denote the data limits -- in various arbitrary locations. No -longer are your axis lines constrained to be a simple rectangle around -the figure -- you can turn on or off left, bottom, right and top, as -well as "detach" the spine to offset it away from the data. See -:ref:`pylab_examples-spine_placement_demo` and -:class:`matplotlib.spines.Spine`. - -.. plot:: pyplots/whats_new_99_spines.py - - -.. _whats-new-0-98-4: - -new in 0.98.4 -============= - -It's been four months since the last matplotlib release, and there are -a lot of new features and bug-fixes. - -Thanks to Charlie Moad for testing and preparing the source release, -including binaries for OS X and Windows for python 2.4 and 2.5 (2.6 -and 3.0 will not be available until numpy is available on those -releases). Thanks to the many developers who contributed to this -release, with contributions from Jae-Joon Lee, Michael Droettboom, -Ryan May, Eric Firing, Manuel Metz, Jouni K. Seppänen, Jeff Whitaker, -Darren Dale, David Kaplan, Michiel de Hoon and many others who -submitted patches - -.. _legend-refactor: - -Legend enhancements --------------------- - -Jae-Joon has rewritten the legend class, and added support for -multiple columns and rows, as well as fancy box drawing. See -:func:`~matplotlib.pyplot.legend` and -:class:`matplotlib.legend.Legend`. - -.. plot:: pyplots/whats_new_98_4_legend.py - -.. _fancy-annotations: - -Fancy annotations and arrows ------------------------------ - -Jae-Joon has added lots of support to annotations for drawing fancy -boxes and connectors in annotations. See -:func:`~matplotlib.pyplot.annotate` and -:class:`~matplotlib.patches.BoxStyle`, -:class:`~matplotlib.patches.ArrowStyle`, and -:class:`~matplotlib.patches.ConnectionStyle`. - -.. plot:: pyplots/whats_new_98_4_fancy.py - -.. _psd-amplitude: - - -Native OS X backend --------------------- - -Michiel de Hoon has provided a native Mac OSX backend that is almost -completely implemented in C. The backend can therefore use Quartz -directly and, depending on the application, can be orders of magnitude -faster than the existing backends. In addition, no third-party -libraries are needed other than Python and NumPy. The backend is -interactive from the usual terminal application on Mac using regular -Python. It hasn't been tested with ipython yet, but in principle it -should to work there as well. Set 'backend : macosx' in your -matplotlibrc file, or run your script with:: - - > python myfile.py -dmacosx - -psd amplitude scaling -------------------------- - -Ryan May did a lot of work to rationalize the amplitude scaling of -:func:`~matplotlib.pyplot.psd` and friends. See -:ref:`pylab_examples-psd_demo2`. and :ref:`pylab_examples-psd_demo3`. -The changes should increase MATLAB -compatibility and increase scaling options. - -.. _fill-between: - -Fill between ------------------- - -Added a :func:`~matplotlib.pyplot.fill_between` function to make it -easier to do shaded region plots in the presence of masked data. You -can pass an *x* array and a *ylower* and *yupper* array to fill -between, and an optional *where* argument which is a logical mask -where you want to do the filling. - -.. plot:: pyplots/whats_new_98_4_fill_between.py - -Lots more ------------ - -Here are the 0.98.4 notes from the CHANGELOG:: - - Added mdehoon's native macosx backend from sf patch 2179017 - JDH - - Removed the prints in the set_*style commands. Return the list of - pretty-printed strings instead - JDH - - Some of the changes Michael made to improve the output of the - property tables in the rest docs broke of made difficult to use - some of the interactive doc helpers, eg setp and getp. Having all - the rest markup in the ipython shell also confused the docstrings. - I added a new rc param docstring.harcopy, to format the docstrings - differently for hardcopy and other use. The ArtistInspector - could use a little refactoring now since there is duplication of - effort between the rest out put and the non-rest output - JDH - - Updated spectral methods (psd, csd, etc.) to scale one-sided - densities by a factor of 2 and, optionally, scale all densities by - the sampling frequency. This gives better MATLAB - compatibility. -RM - - Fixed alignment of ticks in colorbars. -MGD - - drop the deprecated "new" keyword of np.histogram() for numpy 1.2 - or later. -JJL - - Fixed a bug in svg backend that new_figure_manager() ignores - keywords arguments such as figsize, etc. -JJL - - Fixed a bug that the handlelength of the new legend class set too - short when numpoints=1 -JJL - - Added support for data with units (e.g., dates) to - Axes.fill_between. -RM - - Added fancybox keyword to legend. Also applied some changes for - better look, including baseline adjustment of the multiline texts - so that it is center aligned. -JJL - - The transmuter classes in the patches.py are reorganized as - subclasses of the Style classes. A few more box and arrow styles - are added. -JJL - - Fixed a bug in the new legend class that didn't allowed a tuple of - coordinate values as loc. -JJL - - Improve checks for external dependencies, using subprocess - (instead of deprecated popen*) and distutils (for version - checking) - DSD - - Reimplementation of the legend which supports baseline alignment, - multi-column, and expand mode. - JJL - - Fixed histogram autoscaling bug when bins or range are given - explicitly (fixes Debian bug 503148) - MM - - Added rcParam axes.unicode_minus which allows plain hyphen for - minus when False - JDH - - Added scatterpoints support in Legend. patch by Erik Tollerud - - JJL - - Fix crash in log ticking. - MGD - - Added static helper method BrokenHBarCollection.span_where and - Axes/pyplot method fill_between. See - examples/pylab/fill_between.py - JDH - - Add x_isdata and y_isdata attributes to Artist instances, and use - them to determine whether either or both coordinates are used when - updating dataLim. This is used to fix autoscaling problems that - had been triggered by axhline, axhspan, axvline, axvspan. - EF - - Update the psd(), csd(), cohere(), and specgram() methods of Axes - and the csd() cohere(), and specgram() functions in mlab to be in - sync with the changes to psd(). In fact, under the hood, these - all call the same core to do computations. - RM - - Add 'pad_to' and 'sides' parameters to mlab.psd() to allow - controlling of zero padding and returning of negative frequency - components, respectively. These are added in a way that does not - change the API. - RM - - Fix handling of c kwarg by scatter; generalize is_string_like to - accept numpy and numpy.ma string array scalars. - RM and EF - - Fix a possible EINTR problem in dviread, which might help when - saving pdf files from the qt backend. - JKS - - Fix bug with zoom to rectangle and twin axes - MGD - - Added Jae Joon's fancy arrow, box and annotation enhancements -- - see examples/pylab_examples/annotation_demo2.py - - Autoscaling is now supported with shared axes - EF - - Fixed exception in dviread that happened with Minion - JKS - - set_xlim, ylim now return a copy of the viewlim array to avoid - modify inplace surprises - - Added image thumbnail generating function - matplotlib.image.thumbnail. See examples/misc/image_thumbnail.py - - JDH - - Applied scatleg patch based on ideas and work by Erik Tollerud and - Jae-Joon Lee. - MM - - Fixed bug in pdf backend: if you pass a file object for output - instead of a filename, e.g., in a wep app, we now flush the object - at the end. - JKS - - Add path simplification support to paths with gaps. - EF - - Fix problem with AFM files that don't specify the font's full name - or family name. - JKS - - Added 'scilimits' kwarg to Axes.ticklabel_format() method, for - easy access to the set_powerlimits method of the major - ScalarFormatter. - EF - - Experimental new kwarg borderpad to replace pad in legend, based - on suggestion by Jae-Joon Lee. - EF - - Allow spy to ignore zero values in sparse arrays, based on patch - by Tony Yu. Also fixed plot to handle empty data arrays, and - fixed handling of markers in figlegend. - EF - - Introduce drawstyles for lines. Transparently split linestyles - like 'steps--' into drawstyle 'steps' and linestyle '--'. Legends - always use drawstyle 'default'. - MM - - Fixed quiver and quiverkey bugs (failure to scale properly when - resizing) and added additional methods for determining the arrow - angles - EF - - Fix polar interpolation to handle negative values of theta - MGD - - Reorganized cbook and mlab methods related to numerical - calculations that have little to do with the goals of those two - modules into a separate module numerical_methods.py Also, added - ability to select points and stop point selection with keyboard in - ginput and manual contour labeling code. Finally, fixed contour - labeling bug. - DMK - - Fix backtick in Postscript output. - MGD - - [ 2089958 ] Path simplification for vector output backends - Leverage the simplification code exposed through path_to_polygons - to simplify certain well-behaved paths in the vector backends - (PDF, PS and SVG). "path.simplify" must be set to True in - matplotlibrc for this to work. - MGD - - Add "filled" kwarg to Path.intersects_path and - Path.intersects_bbox. - MGD - - Changed full arrows slightly to avoid an xpdf rendering problem - reported by Friedrich Hagedorn. - JKS - - Fix conversion of quadratic to cubic Bezier curves in PDF and PS - backends. Patch by Jae-Joon Lee. - JKS - - Added 5-point star marker to plot command q- EF - - Fix hatching in PS backend - MGD - - Fix log with base 2 - MGD - - Added support for bilinear interpolation in - NonUniformImage; patch by Gregory Lielens. - EF - - Added support for multiple histograms with data of - different length - MM - - Fix step plots with log scale - MGD - - Fix masked arrays with markers in non-Agg backends - MGD - - Fix clip_on kwarg so it actually works correctly - MGD - - Fix locale problems in SVG backend - MGD - - fix quiver so masked values are not plotted - JSW - - improve interactive pan/zoom in qt4 backend on windows - DSD - - Fix more bugs in NaN/inf handling. In particular, path - simplification (which does not handle NaNs or infs) will be turned - off automatically when infs or NaNs are present. Also masked - arrays are now converted to arrays with NaNs for consistent - handling of masks and NaNs - MGD and EF diff --git a/dev/_static/CHANGELOG b/dev/_static/CHANGELOG deleted file mode 100644 index 8f810db398e..00000000000 --- a/dev/_static/CHANGELOG +++ /dev/null @@ -1,5188 +0,0 @@ -2013-04-25 Changed all instances of: - - from matplotlib import MatplotlibDeprecationWarning as mplDeprecation - to: - - from cbook import mplDeprecation - - and removed the import into the matplotlib namespace in __init__.py - Thomas Caswell - - -2013-04-15 Added 'axes.xmargin' and 'axes.ymargin' to rpParams to set default - margins on auto-scaleing. - TAC - -2013-03-19 Added support for passing `linestyle` kwarg to `step` so all `plot` - kwargs are passed to the underlying `plot` call. -TAC - -2013-02-25 Added classes CubicTriInterpolator, UniformTriRefiner, TriAnalyzer - to matplotlib.tri module. - GBy - -2013-01-23 Add 'savefig.directory' to rcParams to remember and fill in the last - directory saved to for figure save dialogs - Martin Spacek - -2013-01-13 Add eventplot method to axes and pyplot and EventCollection class - to collections. - -2013-01-08 Added two extra titles to axes which are flush with the left and - right edges of the plot respectively. - Andrew Dawson - -2013-01-07 Add framealpha keyword argument to legend - PO - -2013-01-16 Till Stensitzki added a baseline feature to stackplot - -2012-12-22 Added classes for interpolation within triangular grids - (LinearTriInterpolator) and to find the triangles in which points - lie (TrapezoidMapTriFinder) to matplotlib.tri module. - IMT - -2012-12-05 Added MatplotlibDeprecationWarning class for signaling deprecation. - Matplotlib developers can use this class as follows: - - from matplotlib import MatplotlibDeprecationWarning as mplDeprecation - - In light of the fact that Python builtin DeprecationWarnings are - ignored by default as of Python 2.7, this class was put in to allow - for the signaling of deprecation, but via UserWarnings which are - not ignored by default. - PI - -2012-11-27 Added the *mtext* parameter for supplying matplotlib.text.Text - instances to RendererBase.draw_tex and RendererBase.draw_text. - This allows backends to utilize additional text attributes, like - the alignment of text elements. - pwuertz - -2012-11-26 deprecate matplotlib/mpl.py, which was used only in pylab.py and is - now replaced by the more suitable `import matplotlib as mpl`. - PI - -2012-11-25 Make rc_context available via pyplot interface - PI - -2012-11-16 plt.set_cmap no longer throws errors if there is not already - an active colorable artist, such as an image, and just sets - up the colormap to use from that point forward. - PI - -2012-11-16 Added the funcction _get_rbga_face, which is identical to - _get_rbg_face except it return a (r,g,b,a) tuble, to line2D. - Modified Line2D.draw to use _get_rbga_face to get the markerface - color so that any alpha set by markerfacecolor will respected. - - Thomas Caswell - -2012-11-13 Add a symmetric log normalization class to colors.py. - Also added some tests for the normalization class. - Till Stensitzki - -2012-11-12 Make axes.stem take at least one argument. - Uses a default range(n) when the first arg not provided. - Damon McDougall - -2012-11-09 Make plt.subplot() without arguments act as subplot(111) - PI - -2012-10-05 Add support for saving animations as animated GIFs. - JVDP - -2012-08-11 Fix path-closing bug in patches.Polygon, so that regardless - of whether the path is the initial one or was subsequently - set by set_xy(), get_xy() will return a closed path if and - only if get_closed() is True. Thanks to Jacob Vanderplas. - EF - -2012-08-05 When a norm is passed to contourf, either or both of the - vmin, vmax attributes of that norm are now respected. - Formerly they were respected only if both were - specified. In addition, vmin and/or vmax can now - be passed to contourf directly as kwargs. - EF - -2012-07-24 Contourf handles the extend kwarg by mapping the extended - ranges outside the normed 0-1 range so that they are - handled by colormap colors determined by the set_under - and set_over methods. Previously the extended ranges - were mapped to 0 or 1 so that the "under" and "over" - colormap colors were ignored. This change also increases - slightly the color contrast for a given set of contour - levels. - EF - -2012-06-24 Make use of mathtext in tick labels configurable - DSD - -2012-06-05 Images loaded through PIL are now ordered correctly - CG - -2012-06-02 Add new Axes method and pyplot function, hist2d. - PO - -2012-05-31 Remove support for 'cairo.' style of backend specification. - Deprecate 'cairo.format' and 'savefig.extension' rcParams and - replace with 'savefig.format'. - Martin Spacek - -2012-05-29 pcolormesh now obeys the passed in "edgecolor" kwarg. - To support this, the "shading" argument to pcolormesh now only - takes "flat" or "gouraud". To achieve the old "faceted" behavior, - pass "edgecolors='k'". - MGD - -2012-05-22 Added radius kwarg to pie charts. - HH - -2012-05-22 Collections now have a setting "offset_position" to select whether - the offsets are given in "screen" coordinates (default, - following the old behavior) or "data" coordinates. This is currently - used internally to improve the performance of hexbin. - - As a result, the "draw_path_collection" backend methods have grown - a new argument "offset_position". - MGD - -2012-05-04 Add a new argument to pie charts - startingangle - that - allows one to specify the angle offset for the first wedge - of the chart. - EP - -2012-05-03 symlog scale now obeys the logarithmic base. Previously, it was - completely ignored and always treated as base e. - MGD - -2012-05-03 Allow linscalex/y keyword to symlog scale that allows the size of - the linear portion relative to the logarithmic portion to be - adjusted. - MGD - -2012-04-14 Added new plot style: stackplot. This new feature supports stacked - area plots. - Damon McDougall - -2012-04-06 When path clipping changes a LINETO to a MOVETO, it also - changes any CLOSEPOLY command to a LINETO to the initial - point. This fixes a problem with pdf and svg where the - CLOSEPOLY would then draw a line to the latest MOVETO - position instead of the intended initial position. - JKS - -2012-03-27 Add support to ImageGrid for placing colorbars only at - one edge of each column/row. - RMM - -2012-03-07 Refactor movie writing into useful classes that make use - of pipes to write image data to ffmpeg or mencoder. Also - improve settings for these and the ability to pass custom - options. - RMM - -2012-02-29 errorevery keyword added to errorbar to enable errorbar - subsampling. fixes issue #600. - -2012-02-28 Added plot_trisurf to the mplot3d toolkit. This supports plotting - three dimensional surfaces on an irregular grid. - Damon McDougall - -2012-01-23 The radius labels in polar plots no longer use a fixed - padding, but use a different alignment depending on the - quadrant they are in. This fixes numerical problems when - (rmax - rmin) gets too small. - MGD - -2012-01-08 Add axes.streamplot to plot streamlines of a velocity field. - Adapted from Tom Flannaghan streamplot implementation. -TSY - -2011-12-29 ps and pdf markers are now stroked only if the line width - is nonzero for consistency with agg, fixes issue #621. - JKS - -2011-12-27 Work around an EINTR bug in some versions of subprocess. - JKS - -2011-10-25 added support for \operatorname to mathtext, - including the ability to insert spaces, such as - $\operatorname{arg\,max}$ - PI - -2011-08-18 Change api of Axes.get_tightbbox and add an optional - keyword parameter *call_axes_locator*. - JJL - -2011-07-29 A new rcParam "axes.formatter.use_locale" was added, that, - when True, will use the current locale to format tick - labels. This means that, for example, in the fr_FR locale, - ',' will be used as a decimal separator. - MGD - -2011-07-15 The set of markers available in the plot() and scatter() - commands has been unified. In general, this gives more - options to both than were previously available, however, - there is one backward-incompatible change to the markers in - scatter: - - "d" used to mean "diamond", it now means "narrow - diamond". "D" can be used for a "diamond". - - -MGD - -2011-07-13 Fix numerical problems in symlog scale, particularly when - linthresh <= 1.0. Symlog plots may look different if one - was depending on the old broken behavior - MGD - -2011-07-10 Fixed argument handling error in tripcolor/triplot/tricontour, - issue #203. - IMT - -2011-07-08 Many functions added to mplot3d.axes3d to bring Axes3D - objects more feature-parity with regular Axes objects. - Significant revisions to the documentation as well. - - BVR - -2011-07-07 Added compatibility with IPython strategy for picking - a version of Qt4 support, and an rcParam for making - the choice explicitly: backend.qt4. - EF - -2011-07-07 Modified AutoMinorLocator to improve automatic choice of - the number of minor intervals per major interval, and - to allow one to specify this number via a kwarg. - EF - -2011-06-28 3D versions of scatter, plot, plot_wireframe, plot_surface, - bar3d, and some other functions now support empty inputs. - BVR - -2011-06-22 Add set_theta_offset, set_theta_direction and - set_theta_zero_location to polar axes to control the - location of 0 and directionality of theta. - MGD - -2011-06-22 Add axes.labelweight parameter to set font weight to axis - labels - MGD. - -2011-06-20 Add pause function to pyplot. - EF - -2011-06-16 Added *bottom* keyword parameter for the stem command. - Also, implemented a legend handler for the stem plot. - - JJL - -2011-06-16 Added legend.frameon rcParams. - Mike Kaufman - -2011-05-31 Made backend_qt4 compatible with PySide . - Gerald Storer - -2011-04-17 Disable keyboard auto-repeat in qt4 backend by ignoring - key events resulting from auto-repeat. This makes - constrained zoom/pan work. - EF - -2011-04-14 interpolation="nearest" always interpolate images. A new - mode "none" is introduced for no interpolation - JJL - -2011-04-03 Fixed broken pick interface to AsteriskCollection objects - used by scatter. - EF - -2011-04-01 The plot directive Sphinx extension now supports all of the - features in the Numpy fork of that extension. These - include doctest formatting, an 'include-source' option, and - a number of new configuration options. - MGD - -2011-03-29 Wrapped ViewVCCachedServer definition in a factory function. - This class now inherits from urllib2.HTTPSHandler in order - to fetch data from github, but HTTPSHandler is not defined - if python was built without SSL support. - DSD - -2011-03-10 Update pytz version to 2011c, thanks to Simon Cross. - JKS - -2011-03-06 Add standalone tests.py test runner script. - JKS - -2011-03-06 Set edgecolor to 'face' for scatter asterisk-type - symbols; this fixes a bug in which these symbols were - not responding to the c kwarg. The symbols have no - face area, so only the edgecolor is visible. - EF - -2011-02-27 Support libpng version 1.5.x; suggestion by Michael - Albert. Changed installation specification to a - minimum of libpng version 1.2. - EF - -2011-02-20 clabel accepts a callable as an fmt kwarg; modified - patch by Daniel Hyams. - EF - -2011-02-18 scatter([], []) is now valid. Also fixed issues - with empty collections - BVR - -2011-02-07 Quick workaround for dviread bug #3175113 - JKS - -2011-02-05 Add cbook memory monitoring for Windows, using - tasklist. - EF - -2011-02-05 Speed up Normalize and LogNorm by using in-place - operations and by using float32 for float32 inputs - and for ints of 2 bytes or shorter; based on - patch by Christoph Gohlke. - EF - -2011-02-04 Changed imshow to use rgba as uint8 from start to - finish, instead of going through an intermediate - step as double precision; thanks to Christoph Gohlke. - EF - -2011-01-13 Added zdir and offset arguments to contourf3d to - bring contourf3d in feature parity with contour3d. - BVR - -2011-01-04 Tag 1.0.1 for release at r8896 - -2011-01-03 Added display of ticker offset to 3d plots. - BVR - -2011-01-03 Turn off tick labeling on interior subplots for - pyplots.subplots when sharex/sharey is True. - JDH - -2010-12-29 Implement axes_divider.HBox and VBox. -JJL - - -2010-11-22 Fixed error with Hammer projection. - BVR - -2010-11-12 Fixed the placement and angle of axis labels in 3D plots. - BVR - -2010-11-07 New rc parameters examples.download and examples.directory - allow bypassing the download mechanism in get_sample_data. - - JKS - -2010-10-04 Fix JPEG saving bug: only accept the kwargs documented - by PIL for JPEG files. - JKS - -2010-09-15 Remove unused _wxagg extension and numerix.h. - EF - -2010-08-25 Add new framework for doing animations with examples.- RM - -2010-08-21 Remove unused and inappropriate methods from Tick classes: - set_view_interval, get_minpos, and get_data_interval are - properly found in the Axis class and don't need to be - duplicated in XTick and YTick. - EF - -2010-08-21 Change Axis.set_view_interval() so that when updating an - existing interval, it respects the orientation of that - interval, and can enlarge but not reduce the interval. - This fixes a bug in which Axis.set_ticks would - change the view limits of an inverted axis. Whether - set_ticks should be affecting the viewLim at all remains - an open question. - EF - -2010-08-16 Handle NaN's correctly in path analysis routines. Fixes a - bug where the best location for a legend was not calculated - correctly when the line contains NaNs. - MGD - -2010-08-14 Fix bug in patch alpha handling, and in bar color kwarg - EF - -2010-08-12 Removed all traces of numerix module after 17 months of - deprecation warnings. - EF - -2010-08-05 Added keyword arguments 'thetaunits' and 'runits' for polar - plots. Fixed PolarAxes so that when it set default - Formatters, it marked them as such. Fixed semilogx and - semilogy to no longer blindly reset the ticker information - on the non-log axis. Axes.arrow can now accept unitized - data. - JRE - -2010-08-03 Add support for MPLSETUPCFG variable for custom setup.cfg - filename. Used by sage buildbot to build an mpl w/ no gui - support - JDH - -2010-08-01 Create directory specified by MPLCONFIGDIR if it does - not exist. - ADS - -2010-07-20 Return Qt4's default cursor when leaving the canvas - DSD - -2010-07-06 Tagging for mpl 1.0 at r8502 - - -2010-07-05 Added Ben Root's patch to put 3D plots in arbitrary axes, - allowing you to mix 3d and 2d in different axes/subplots or - to have multiple 3D plots in one figure. See - examples/mplot3d/subplot3d_demo.py - JDH - -2010-07-05 Preferred kwarg names in set_xlim are now 'left' and - 'right'; in set_ylim, 'bottom' and 'top'; original - kwargs are still accepted without complaint. - EF - -2010-07-05 TkAgg and FltkAgg backends are now consistent with other - interactive backends: when used in scripts from the - command line (not from ipython -pylab), show blocks, - and can be called more than once. - EF - -2010-07-02 Modified CXX/WrapPython.h to fix "swab bug" on solaris so - mpl can compile on Solaris with CXX6 in the trunk. Closes - tracker bug 3022815 - JDH - -2010-06-30 Added autoscale convenience method and corresponding - pyplot function for simplified control of autoscaling; - and changed axis, set_xlim, and set_ylim so that by - default, they turn off the autoscaling on the relevent - axis or axes. Therefore one can call set_xlim before - plotting a line, for example, and the limits will be - retained. - EF - -2010-06-20 Added Axes.tick_params and corresponding pyplot function - to control tick and tick label appearance after an Axes - has been created. - EF - -2010-06-09 Allow Axes.grid to control minor gridlines; allow - Axes.grid and Axis.grid to control major and minor - gridlines in the same method call. - EF - -2010-06-06 Change the way we do split/dividend adjustments in - finance.py to handle dividends and fix the zero division bug reported - in sf bug 2949906 and 2123566. Note that volume is not adjusted - because the Yahoo CSV does not distinguish between share - split and dividend adjustments making it near impossible to - get volume adjustement right (unless we want to guess based - on the size of the adjustment or scrape the html tables, - which we don't) - JDH - -2010-06-06 Updated dateutil to 1.5 and pytz to 2010h. - -2010-06-02 Add error_kw kwarg to Axes.bar(). - EF - -2010-06-01 Fix pcolormesh() and QuadMesh to pass on kwargs as - appropriate. - RM - -2010-05-18 Merge mpl_toolkits.gridspec into the main tree. - JJL - -2010-05-04 Improve backend_qt4 so it displays figures with the - correct size - DSD - -2010-04-20 Added generic support for connecting to a timer for events. This - adds TimerBase, TimerGTK, TimerQT, TimerWx, and TimerTk to - the backends and a new_timer() method to each backend's - canvas to allow ease of creating a new timer. - RM - -2010-04-20 Added margins() Axes method and pyplot function. - EF - -2010-04-18 update the axes_grid documentation. -JJL - -2010-04-18 Control MaxNLocator parameters after instantiation, - and via Axes.locator_params method, with corresponding - pyplot function. -EF - -2010-04-18 Control ScalarFormatter offsets directly and via the - Axes.ticklabel_format() method, and add that to pyplot. -EF - -2010-04-16 Add a close_event to the backends. -RM - -2010-04-06 modify axes_grid examples to use axes_grid1 and axisartist. -JJL - -2010-04-06 rebase axes_grid using axes_grid1 and axisartist modules. -JJL - -2010-04-06 axes_grid toolkit is splitted into two separate modules, - axes_grid1 and axisartist. -JJL - -2010-04-05 Speed up import: import pytz only if and when it is - needed. It is not needed if the rc timezone is UTC. - EF - -2010-04-03 Added color kwarg to Axes.hist(), based on work by - Jeff Klukas. - EF - -2010-03-24 refactor colorbar code so that no cla() is necessary when - mappable is changed. -JJL - -2010-03-22 fix incorrect rubber band during the zoom mode when mouse - leaves the axes. -JJL - -2010-03-21 x/y key during the zoom mode only changes the x/y limits. -JJL - -2010-03-20 Added pyplot.sca() function suggested by JJL. - EF - -2010-03-20 Added conditional support for new Tooltip API in gtk backend. - EF - -2010-03-20 Changed plt.fig_subplot() to plt.subplots() after discussion on - list, and changed its API to return axes as a numpy object array - (with control of dimensions via squeeze keyword). FP. - -2010-03-13 Manually brought in commits from branch - - ------------------------------------------------------------------------ - r8191 | leejjoon | 2010-03-13 17:27:57 -0500 (Sat, 13 Mar 2010) | 1 line - - fix the bug that handles for scatter are incorrectly set when dpi!=72. - Thanks to Ray Speth for the bug report. - - -2010-03-03 Manually brought in commits from branch via diff/patch - (svnmerge is broken) - - ------------------------------------------------------------------------ - r8175 | leejjoon | 2010-03-03 10:03:30 -0800 (Wed, 03 Mar 2010) | 1 line - - fix arguments of allow_rasterization.draw_wrapper - ------------------------------------------------------------------------ - r8174 | jdh2358 | 2010-03-03 09:15:58 -0800 (Wed, 03 Mar 2010) | 1 line - - added support for favicon in docs build - ------------------------------------------------------------------------ - r8173 | jdh2358 | 2010-03-03 08:56:16 -0800 (Wed, 03 Mar 2010) | 1 line - - applied Mattias get_bounds patch - ------------------------------------------------------------------------ - r8172 | jdh2358 | 2010-03-03 08:31:42 -0800 (Wed, 03 Mar 2010) | 1 line - - fix svnmerge download instructions - ------------------------------------------------------------------------ - r8171 | jdh2358 | 2010-03-03 07:47:48 -0800 (Wed, 03 Mar 2010) | 1 line - - - -2010-02-25 add annotation_demo3.py that demonstrates new functionality. -JJL - -2010-02-25 refactor Annotation to support arbitrary Transform as xycoords - or textcoords. Also, if a tuple of two coordinates is provided, - they are interpreted as coordinates for each x and y position. - -JJL - -2010-02-24 Added pyplot.fig_subplot(), to create a figure and a group of - subplots in a single call. This offers an easier pattern than - manually making figures and calling add_subplot() multiple times. FP - -2010-02-17 Added Gokhan's and Mattias' customizable keybindings patch - for the toolbar. You can now set the keymap.* properties - in the matplotlibrc file. Newbindings were added for - toggling log scaling on the x-axis. JDH - -2010-02-16 Committed TJ's filled marker patch for - left|right|bottom|top|full filled markers. See - examples/pylab_examples/filledmarker_demo.py. JDH - -2010-02-11 Added 'bootstrap' option to boxplot. This allows bootstrap - estimates of median confidence intervals. Based on an - initial patch by Paul Hobson. - ADS - -2010-02-06 Added setup.cfg "basedirlist" option to override setting - in setupext.py "basedir" dictionary; added "gnu0" - platform requested by Benjamin Drung. - EF - -2010-02-06 Added 'xy' scaling option to EllipseCollection. - EF - -2010-02-03 Made plot_directive use a custom PlotWarning category, so that - warnings can be turned into fatal errors easily if desired. - FP - -2010-01-29 Added draggable method to Legend to allow mouse drag - placement. Thanks Adam Fraser. JDH - -2010-01-25 Fixed a bug reported by Olle Engdegard, when using - histograms with stepfilled and log=True - MM - -2010-01-16 Upgraded CXX to 6.1.1 - JDH - -2009-01-16 Don't create minor ticks on top of existing major - ticks. Patch by Neil Crighton. -ADS - -2009-01-16 Ensure three minor ticks always drawn (SF# 2924245). Patch - by Neil Crighton. -ADS - -2010-01-16 Applied patch by Ian Thomas to fix two contouring - problems: now contourf handles interior masked regions, - and the boundaries of line and filled contours coincide. - EF - -2009-01-11 The color of legend patch follows the rc parameters - axes.facecolor and axes.edgecolor. -JJL - -2009-01-11 adjustable of Axes can be "box-forced" which allow - sharing axes. -JJL - -2009-01-11 Add add_click and pop_click methods in - BlockingContourLabeler. -JJL - - -2010-01-03 Added rcParams['axes.color_cycle'] - EF - -2010-01-03 Added Pierre's qt4 formlayout editor and toolbar button - JDH - -2009-12-31 Add support for using math text as marker symbols (Thanks to tcb) - - MGD - -2009-12-31 Commit a workaround for a regression in PyQt4-4.6.{0,1} - DSD - -2009-12-22 Fix cmap data for gist_earth_r, etc. -JJL - -2009-12-20 spines: put spines in data coordinates, add set_bounds() - call. -ADS - -2009-12-18 Don't limit notch size in boxplot to q1-q3 range, as this - is effectively making the data look better than it is. - ADS - -2009-12-18 mlab.prctile handles even-length data, such that the median - is the mean of the two middle values. - ADS - -2009-12-15 Add raw-image (unsampled) support for the ps backend. - JJL - -2009-12-14 Add patch_artist kwarg to boxplot, but keep old default. - Convert boxplot_demo2.py to use the new patch_artist. - ADS - -2009-12-06 axes_grid: reimplemented AxisArtist with FloatingAxes support. - Added new examples. - JJL - -2009-12-01 Applied Laurent Dufrechou's patch to improve blitting with - the qt4 backend - DSD - -2009-11-13 The pdf backend now allows changing the contents of - a pdf file's information dictionary via PdfPages.infodict. - JKS - -2009-11-12 font_manager.py should no longer cause EINTR on Python 2.6 - (but will on the 2.5 version of subprocess). Also the - fc-list command in that file was fixed so now it should - actually find the list of fontconfig fonts. - JKS - -2009-11-10 Single images, and all images in renderers with - option_image_nocomposite (i.e. agg, macosx and the svg - backend when rcParams['svg.image_noscale'] is True), are - now drawn respecting the zorder relative to other - artists. (Note that there may now be inconsistencies across - backends when more than one image is drawn at varying - zorders, but this change introduces correct behavior for - the backends in which it's easy to do so.) - -2009-10-21 Make AutoDateLocator more configurable by adding options - to control the maximum and minimum number of ticks. Also - add control of the intervals to be used for ticking. This - does not change behavior but opens previously hard-coded - behavior to runtime modification`. - RMM - -2009-10-19 Add "path_effects" support for Text and Patch. See - examples/pylab_examples/patheffect_demo.py -JJL - -2009-10-19 Add "use_clabeltext" option to clabel. If True, clabels - will be created with ClabelText class, which recalculates - rotation angle of the label during the drawing time. -JJL - -2009-10-16 Make AutoDateFormatter actually use any specified - timezone setting.This was only working correctly - when no timezone was specified. - RMM - -2009-09-27 Beginnings of a capability to test the pdf backend. - JKS - -2009-09-27 Add a savefig.extension rcparam to control the default - filename extension used by savefig. - JKS - -=============================================== -2009-09-21 Tagged for release 0.99.1 - -2009-09-20 Fix usetex spacing errors in pdf backend. - JKS - -2009-09-20 Add Sphinx extension to highlight IPython console sessions, - originally authored (I think) by Michael Droetboom. - FP - -2009-09-20 Fix off-by-one error in dviread.Tfm, and additionally protect - against exceptions in case a dvi font is missing some metrics. - JKS - -2009-09-15 Implement draw_text and draw_tex method of backend_base using - the textpath module. Implement draw_tex method of the svg - backend. - JJL - -2009-09-15 Don't fail on AFM files containing floating-point bounding boxes - JKS - -2009-09-13 AxesGrid : add modified version of colorbar. Add colorbar - location howto. - JJL - -2009-09-07 AxesGrid : implemented axisline style. - Added a demo examples/axes_grid/demo_axisline_style.py- JJL - -2009-09-04 Make the textpath class as a separate moduel - (textpath.py). Add support for mathtext and tex.- JJL - -2009-09-01 Added support for Gouraud interpolated triangles. - pcolormesh now accepts shading='gouraud' as an option. - MGD - -2009-08-29 Added matplotlib.testing package, which contains a Nose - plugin and a decorator that lets tests be marked as - KnownFailures - ADS - -2009-08-20 Added scaled dict to AutoDateFormatter for customized - scales - JDH - -2009-08-15 Pyplot interface: the current image is now tracked at the - figure and axes level, addressing tracker item 1656374. - EF - -2009-08-15 Docstrings are now manipulated with decorators defined - in a new module, docstring.py, thanks to Jason Coombs. - EF - -2009-08-14 Add support for image filtering for agg back end. See the example - demo_agg_filter.py. -JJL - -2009-08-09 AnnotationBbox added. Similar to Annotation, but works with - OffsetBox instead of Text. See the example - demo_annotation_box.py. -JJL - -2009-08-07 BboxImage implemented. Two examples, demo_bboximage.py and - demo_ribbon_box.py added. - JJL - -2009-08-07 In an effort to simplify the backend API, all clipping rectangles - and paths are now passed in using GraphicsContext objects, even - on collections and images. Therefore: - - draw_path_collection(self, master_transform, cliprect, clippath, - clippath_trans, paths, all_transforms, offsets, - offsetTrans, facecolors, edgecolors, linewidths, - linestyles, antialiaseds, urls) - - becomes: - - draw_path_collection(self, gc, master_transform, paths, all_transforms, - offsets, offsetTrans, facecolors, edgecolors, - linewidths, linestyles, antialiaseds, urls) - - - - draw_quad_mesh(self, master_transform, cliprect, clippath, - clippath_trans, meshWidth, meshHeight, coordinates, - offsets, offsetTrans, facecolors, antialiased, - showedges) - - becomes: - - draw_quad_mesh(self, gc, master_transform, meshWidth, meshHeight, - coordinates, offsets, offsetTrans, facecolors, - antialiased, showedges) - - - - draw_image(self, x, y, im, bbox, clippath=None, clippath_trans=None) - - becomes: - - draw_image(self, gc, x, y, im) - - - MGD - -2009-08-06 Tagging the 0.99.0 release at svn r7397 - JDH - - * fixed an alpha colormapping bug posted on sf 2832575 - - * fix typo in axes_divider.py. use nanmin, nanmax in angle_helper.py - (patch by Christoph Gohlke) - - * remove dup gui event in enter/leave events in gtk - - * lots of fixes for os x binaries (Thanks Russell Owen) - - * attach gtk events to mpl events -- fixes sf bug 2816580 - - * applied sf patch 2815064 (middle button events for wx) and - patch 2818092 (resize events for wx) - - * fixed boilerplate.py so it doesn't break the ReST docs. - - * removed a couple of cases of mlab.load - - * fixed rec2csv win32 file handle bug from sf patch 2831018 - - * added two examples from Josh Hemann: examples/pylab_examples/barchart_demo2.py - and examples/pylab_examples/boxplot_demo2.py - - * handled sf bugs 2831556 and 2830525; better bar error messages and - backend driver configs - - * added miktex win32 patch from sf patch 2820194 - - * apply sf patches 2830233 and 2823885 for osx setup and 64 bit; thanks Michiel - -2009-08-04 Made cbook.get_sample_data make use of the ETag and Last-Modified - headers of mod_dav_svn. - JKS - -2009-08-03 Add PathCollection; modify contourf to use complex - paths instead of simple paths with cuts. - EF - - -2009-08-03 Fixed boilerplate.py so it doesn't break the ReST docs. - JKS - -2009-08-03 pylab no longer provides a load and save function. These - are available in matplotlib.mlab, or you can use - numpy.loadtxt and numpy.savetxt for text files, or np.save - and np.load for binary numpy arrays. - JDH - -2009-07-31 Added cbook.get_sample_data for urllib enabled fetching and - cacheing of data needed for examples. See - examples/misc/sample_data_demo.py - JDH - -2009-07-31 Tagging 0.99.0.rc1 at 7314 - MGD - -2009-07-30 Add set_cmap and register_cmap, and improve get_cmap, - to provide convenient handling of user-generated - colormaps. Reorganized _cm and cm modules. - EF - -2009-07-28 Quiver speed improved, thanks to tip by Ray Speth. -EF - -2009-07-27 Simplify argument handling code for plot method. -EF - -2009-07-25 Allow "plot(1, 2, 'r*')" to work. - EF - -2009-07-22 Added an 'interp' keyword to griddata so the faster linear - interpolation method can be chosen. Default is 'nn', so - default behavior (using natural neighbor method) is unchanged (JSW) - -2009-07-22 Improved boilerplate.py so that it generates the correct - signatures for pyplot functions. - JKS - -2009-07-19 Fixed the docstring of Axes.step to reflect the correct - meaning of the kwargs "pre" and "post" - See SF bug - https://sourceforge.net/tracker/index.php?func=detail&aid=2823304&group_id=80706&atid=560720 - - JDH - -2009-07-18 Fix support for hatches without color fills to pdf and svg - backends. Add an example of that to hatch_demo.py. - JKS - -2009-07-17 Removed fossils from swig version of agg backend. - EF - -2009-07-14 initial submission of the annotation guide. -JJL - -2009-07-14 axes_grid : minor improvements in anchored_artists and - inset_locator. -JJL - -2009-07-14 Fix a few bugs in ConnectionStyle algorithms. Add - ConnectionPatch class. -JJL - -2009-07-11 Added a fillstyle Line2D property for half filled markers - -- see examples/pylab_examples/fillstyle_demo.py JDH - -2009-07-08 Attempt to improve performance of qt4 backend, do not call - qApp.processEvents while processing an event. Thanks Ole - Streicher for tracking this down - DSD - -2009-06-24 Add withheader option to mlab.rec2csv and changed - use_mrecords default to False in mlab.csv2rec since this is - partially broken - JDH - -2009-06-24 backend_agg.draw_marker quantizes the main path (as in the - draw_path). - JJL - -2009-06-24 axes_grid: floating axis support added. - JJL - -2009-06-14 Add new command line options to backend_driver.py to support - running only some directories of tests - JKS - -2009-06-13 partial cleanup of mlab and its importation in pylab - EF - -2009-06-13 Introduce a rotation_mode property for the Text artist. See - examples/pylab_examples/demo_text_rotation_mode.py -JJL - -2009-06-07 add support for bz2 files per sf support request 2794556 - - JDH - -2009-06-06 added a properties method to the artist and inspector to - return a dict mapping property name -> value; see sf - feature request 2792183 - JDH - -2009-06-06 added Neil's auto minor tick patch; sf patch #2789713 - JDH - -2009-06-06 do not apply alpha to rgba color conversion if input is - already rgba - JDH - -2009-06-03 axes_grid : Initial check-in of curvelinear grid support. See - examples/axes_grid/demo_curvelinear_grid.py - JJL - -2009-06-01 Add set_color method to Patch - EF - -2009-06-01 Spine is now derived from Patch - ADS - -2009-06-01 use cbook.is_string_like() instead of isinstance() for spines - ADS - -2009-06-01 cla() support for spines - ADS - -2009-06-01 Removed support for gtk < 2.4. - EF - -2009-05-29 Improved the animation_blit_qt4 example, which was a mix - of the object-oriented and pylab interfaces. It is now - strictly object-oriented - DSD - -2009-05-28 Fix axes_grid toolkit to work with spine patch by ADS. - JJL - -2009-05-28 Applied fbianco's patch to handle scroll wheel events in - the qt4 backend - DSD - -2009-05-26 Add support for "axis spines" to have arbitrary location. -ADS - -2009-05-20 Add an empty matplotlibrc to the tests/ directory so that running - tests will use the default set of rcparams rather than the user's - config. - RMM - -2009-05-19 Axis.grid(): allow use of which='major,minor' to have grid - on major and minor ticks. -ADS - -2009-05-18 Make psd(), csd(), and cohere() wrap properly for complex/two-sided - versions, like specgram() (SF #2791686) - RMM - -2009-05-18 Fix the linespacing bug of multiline text (#1239682). See - examples/pylab_examples/multiline.py -JJL - -2009-05-18 Add *annotation_clip* attr. for text.Annotation class. - If True, annotation is only drawn when the annotated point is - inside the axes area. -JJL - -2009-05-17 Fix bug(#2749174) that some properties of minor ticks are - not conserved -JJL - -2009-05-17 applied Michiel's sf patch 2790638 to turn off gtk event - loop in setupext for pygtk>=2.15.10 - JDH - -2009-05-17 applied Michiel's sf patch 2792742 to speed up Cairo and - macosx collections; speedups can be 20x. Also fixes some - bugs in which gc got into inconsistent state - -====================================================================== - -2008-05-17 Release 0.98.5.3 at r7107 from the branch - JDH - -2009-05-13 An optional offset and bbox support in restore_bbox. - Add animation_blit_gtk2.py. -JJL - -2009-05-13 psfrag in backend_ps now uses baseline-alignment - when preview.sty is used ((default is - bottom-alignment). Also, a small api imporvement - in OffsetBox-JJL - -2009-05-13 When the x-coordinate of a line is monotonically - increasing, it is now automatically clipped at - the stage of generating the transformed path in - the draw method; this greatly speeds up zooming and - panning when one is looking at a short segment of - a long time series, for example. - EF - -2009-05-11 aspect=1 in log-log plot gives square decades. -JJL - -2009-05-08 clabel takes new kwarg, rightside_up; if False, labels - will not be flipped to keep them rightside-up. This - allows the use of clabel to make streamfunction arrows, - as requested by Evan Mason. - EF - -2009-05-07 'labelpad' can now be passed when setting x/y labels. This - allows controlling the spacing between the label and its - axis. - RMM - -2009-05-06 print_ps now uses mixed-mode renderer. Axes.draw rasterize - artists whose zorder smaller than rasterization_zorder. - -JJL - -2009-05-06 Per-artist Rasterization, originally by Eric Bruning. -JJ - -2009-05-05 Add an example that shows how to make a plot that updates - using data from another process. Thanks to Robert - Cimrman - RMM - -2009-05-05 Add Axes.get_legend_handles_labels method. - JJL - -2009-05-04 Fix bug that Text.Annotation is still drawn while set to - not visible. - JJL - -2009-05-04 Added TJ's fill_betweenx patch - JDH - -2009-05-02 Added options to plotfile based on question from - Joseph Smidt and patch by Matthias Michler. - EF - - -2009-05-01 Changed add_artist and similar Axes methods to - return their argument. - EF - -2009-04-30 Incorrect eps bbox for landscape mode fixed - JJL - -2009-04-28 Fixed incorrect bbox of eps output when usetex=True. - JJL - -2009-04-24 Changed use of os.open* to instead use subprocess.Popen. - os.popen* are deprecated in 2.6 and are removed in 3.0. - RMM - -2009-04-20 Worked on axes_grid documentation. Added - axes_grid.inset_locator. - JJL - -2009-04-17 Initial check-in of the axes_grid toolkit. - JJL - -2009-04-17 Added a support for bbox_to_anchor in - offsetbox.AnchoredOffsetbox. Improved a documentation. - - JJL - -2009-04-16 Fixed a offsetbox bug that multiline texts are not - correctly aligned. - JJL - -2009-04-16 Fixed a bug in mixed mode renderer that images produced by - an rasterizing backend are placed with incorrect size. - - JJL - -2009-04-14 Added Jonathan Taylor's Reinier Heeres' port of John - Porters' mplot3d to svn trunk. Package in - mpl_toolkits.mplot3d and demo is examples/mplot3d/demo.py. - Thanks Reiner - -2009-04-06 The pdf backend now escapes newlines and linefeeds in strings. - Fixes sf bug #2708559; thanks to Tiago Pereira for the report. - -2009-04-06 texmanager.make_dvi now raises an error if LaTeX failed to - create an output file. Thanks to Joao Luis Silva for reporting - this. - JKS - -2009-04-05 _png.read_png() reads 12 bit PNGs (patch from - Tobias Wood) - ADS - -2009-04-04 Allow log axis scale to clip non-positive values to - small positive value; this is useful for errorbars. - EF - -2009-03-28 Make images handle nan in their array argument. - A helper, cbook.safe_masked_invalid() was added. - EF - -2009-03-25 Make contour and contourf handle nan in their Z argument. - EF - -2009-03-20 Add AuxTransformBox in offsetbox.py to support some transformation. - anchored_text.py example is enhanced and renamed - (anchored_artists.py). - JJL - -2009-03-20 Add "bar" connection style for annotation - JJL - -2009-03-17 Fix bugs in edge color handling by contourf, found - by Jae-Joon Lee. - EF - -2009-03-14 Added 'LightSource' class to colors module for - creating shaded relief maps. shading_example.py - added to illustrate usage. - JSW - -2009-03-11 Ensure wx version >= 2.8; thanks to Sandro Tosi and - Chris Barker. - EF - -2009-03-10 Fix join style bug in pdf. - JKS - -2009-03-07 Add pyplot access to figure number list - EF - -2009-02-28 hashing of FontProperties accounts current rcParams - JJL - -2009-02-28 Prevent double-rendering of shared axis in twinx, twiny - EF - -2009-02-26 Add optional bbox_to_anchor argument for legend class - JJL - -2009-02-26 Support image clipping in pdf backend. - JKS - -2009-02-25 Improve tick location subset choice in FixedLocator. - EF - -2009-02-24 Deprecate numerix, and strip out all but the numpy - part of the code. - EF - -2009-02-21 Improve scatter argument handling; add an early error - message, allow inputs to have more than one dimension. - EF - -2009-02-16 Move plot_directive.py to the installed source tree. Add - support for inline code content - MGD - -2009-02-16 Move mathmpl.py to the installed source tree so it is - available to other projects. - MGD - -2009-02-14 Added the legend title support - JJL - -2009-02-10 Fixed a bug in backend_pdf so it doesn't break when the setting - pdf.use14corefonts=True is used. Added test case in - unit/test_pdf_use14corefonts.py. - NGR - -2009-02-08 Added a new imsave function to image.py and exposed it in - the pyplot interface - GR - -2009-02-04 Some reorgnization of the legend code. anchored_text.py - added as an example. - JJL - -2009-02-04 Add extent keyword arg to hexbin - ADS - -2009-02-04 Fix bug in mathtext related to \dots and \ldots - MGD - -2009-02-03 Change default joinstyle to round - MGD - -2009-02-02 Reduce number of marker XObjects in pdf output - JKS - -2009-02-02 Change default resolution on polar plot to 1 - MGD - -2009-02-02 Avoid malloc errors in ttconv for fonts that don't have - e.g., PostName (a version of Tahoma triggered this) - JKS - -2009-01-30 Remove support for pyExcelerator in exceltools -- use xlwt - instead - JDH - -2009-01-29 Document 'resolution' kwarg for polar plots. Support it - when using pyplot.polar, not just Figure.add_axes. - MGD - -2009-01-29 Rework the nan-handling/clipping/quantizing/simplification - framework so each is an independent part of a pipeline. - Expose the C++-implementation of all of this so it can be - used from all Python backends. Add rcParam - "path.simplify_threshold" to control the threshold of - similarity below which vertices will be removed. - -2009-01-26 Improved tight bbox option of the savefig. - JJL - -2009-01-26 Make curves and NaNs play nice together - MGD - -2009-01-21 Changed the defaults of acorr and xcorr to use - usevlines=True, maxlags=10 and normed=True since these are - the best defaults - -2009-01-19 Fix bug in quiver argument handling. - EF - -2009-01-19 Fix bug in backend_gtk: don't delete nonexistent toolbar. - EF - -2009-01-16 Implement bbox_inches option for savefig. If bbox_inches is - "tight", try to determine the tight bounding box. - JJL - -2009-01-16 Fix bug in is_string_like so it doesn't raise an - unnecessary exception. - EF - -2009-01-16 Fix an infinite recursion in the unit registry when searching - for a converter for a sequence of strings. Add a corresponding - test. - RM - -2009-01-16 Bugfix of C typedef of MPL_Int64 that was failing on - Windows XP 64 bit, as reported by George Goussard on numpy - mailing list. - ADS - -2009-01-16 Added helper function LinearSegmentedColormap.from_list to - facilitate building simple custom colomaps. See - examples/pylab_examples/custom_cmap_fromlist.py - JDH - -2009-01-16 Applied Michiel's patch for macosx backend to fix rounding - bug. Closed sf bug 2508440 - JSW - -2009-01-10 Applied Michiel's hatch patch for macosx backend and - draw_idle patch for qt. Closes sf patched 2497785 and - 2468809 - JDH - -2009-01-10 Fix bug in pan/zoom with log coordinates. - EF - -2009-01-06 Fix bug in setting of dashed negative contours. - EF - -2009-01-06 Be fault tolerant when len(linestyles)>NLev in contour. - MM - -2009-01-06 Added marginals kwarg to hexbin to plot marginal densities - JDH - -2009-01-06 Change user-visible multipage pdf object to PdfPages to - avoid accidents with the file-like PdfFile. - JKS - -2009-01-05 Fix a bug in pdf usetex: allow using non-embedded fonts. - JKS - -2009-01-05 optional use of preview.sty in usetex mode. - JJL - -2009-01-02 Allow multipage pdf files. - JKS - -2008-12-31 Improve pdf usetex by adding support for font effects - (slanting and extending). - JKS - -2008-12-29 Fix a bug in pdf usetex support, which occurred if the same - Type-1 font was used with different encodings, e.g., with - Minion Pro and MnSymbol. - JKS - -2008-12-20 fix the dpi-dependent offset of Shadow. - JJL - -2008-12-20 fix the hatch bug in the pdf backend. minor update - in docs and example - JJL - -2008-12-19 Add axes_locator attribute in Axes. Two examples are added. - - JJL - -2008-12-19 Update Axes.legend documnetation. /api/api_changes.rst is also - updated to describe chages in keyword parameters. - Issue a warning if old keyword parameters are used. - JJL - -2008-12-18 add new arrow style, a line + filled triangles. -JJL - -================================================================== -2008-12-18 Re-Released 0.98.5.2 from v0_98_5_maint at r6679 - Released 0.98.5.2 from v0_98_5_maint at r6667 - -2008-12-18 Removed configobj, experimental traits and doc/mpl_data link - JDH - -2008-12-18 Fix bug where a line with NULL data limits prevents - subsequent data limits from calculating correctly - MGD - -2008-12-17 Major documentation generator changes - MGD - -2008-12-17 Applied macosx backend patch with support for path - collections, quadmesh, etc... - JDH - -2008-12-17 fix dpi-dependent behavior of text bbox and arrow in annotate - -JJL - -2008-12-17 Add group id support in artist. Two examples which - demostrate svg filter are added. -JJL - -2008-12-16 Another attempt to fix dpi-dependent behavior of Legend. -JJL - -2008-12-16 Fixed dpi-dependent behavior of Legend and fancybox in Text. - -2008-12-16 Added markevery property to Line2D to support subsampling - of markers - JDH -2008-12-15 Removed mpl_data symlink in docs. On platforms that do not - support symlinks, these become copies, and the font files - are large, so the distro becomes unneccessarily bloaded. - Keeping the mpl_examples dir because relative links are - harder for the plot directive and the *.py files are not so - large. - JDH - -2008-12-15 Fix \$ in non-math text with usetex off. Document - differences between usetex on/off - MGD - -2008-12-15 Fix anti-aliasing when auto-snapping - MGD - -2008-12-15 Fix grid lines not moving correctly during pan and zoom - MGD - -2008-12-12 Preparations to eliminate maskedarray rcParams key: its - use will now generate a warning. Similarly, importing - the obsolote numerix.npyma will generate a warning. - EF - -2008-12-12 Added support for the numpy.histogram() weights parameter - to the axes hist() method. Docs taken from numpy - MM - -2008-12-12 Fixed warning in hist() with numpy 1.2 - MM - -2008-12-12 Removed external packages: configobj and enthought.traits - which are only required by the experimental traited config - and are somewhat out of date. If needed, install them - independently, see: - - http://code.enthought.com/projects/traits - - and: - - http://www.voidspace.org.uk/python/configobj.html - -2008-12-12 Added support to asign labels to histograms of multiple - data. - MM - -================================================================= -2008-12-11 Released 0.98.5 at svn r6573 - -2008-12-11 Use subprocess.Popen instead of os.popen in dviread - (Windows problem reported by Jorgen Stenarson) - JKS - -2008-12-10 Added Michael's font_manager fix and Jae-Joon's - figure/subplot fix. Bumped version number to 0.98.5 - JDH - -================================================================= -2008-12-09 Released 0.98.4 at svn r6536 - -2008-12-08 Added mdehoon's native macosx backend from sf patch 2179017 - JDH - -2008-12-08 Removed the prints in the set_*style commands. Return the - list of pprinted strings instead - JDH - -2008-12-08 Some of the changes Michael made to improve the output of - the property tables in the rest docs broke of made - difficult to use some of the interactive doc helpers, e.g., - setp and getp. Having all the rest markup in the ipython - shell also confused the docstrings. I added a new rc param - docstring.harcopy, to format the docstrings differently for - hardcopy and other use. Ther ArtistInspector could use a - little refactoring now since there is duplication of effort - between the rest out put and the non-rest output - JDH - -2008-12-08 Updated spectral methods (psd, csd, etc.) to scale one-sided - densities by a factor of 2 and, optionally, scale all densities - by the sampling frequency. This gives better MatLab - compatibility. -RM - -2008-12-08 Fixed alignment of ticks in colorbars. -MGD - -2008-12-07 drop the deprecated "new" keyword of np.histogram() for - numpy 1.2 or later. -JJL - -2008-12-06 Fixed a bug in svg backend that new_figure_manager() - ignores keywords arguments such as figsize, etc. -JJL - -2008-12-05 Fixed a bug that the handlelength of the new legend class - set too short when numpoints=1 -JJL - -2008-12-04 Added support for data with units (e.g., dates) to - Axes.fill_between. -RM - -2008-12-04 Added fancybox keyword to legend. Also applied some changes - for better look, including baseline adjustment of the - multiline texts so that it is center aligned. -JJL - -2008-12-02 The transmuter classes in the patches.py are reorganized as - subclasses of the Style classes. A few more box and arrow - styles are added. -JJL - -2008-12-02 Fixed a bug in the new legend class that didn't allowed - a tuple of coordinate vlaues as loc. -JJL - -2008-12-02 Improve checks for external dependencies, using subprocess - (instead of deprecated popen*) and distutils (for version - checking) - DSD - -2008-11-30 Reimplementaion of the legend which supports baseline alignement, - multi-column, and expand mode. - JJL - -2008-12-01 Fixed histogram autoscaling bug when bins or range are given - explicitly (fixes Debian bug 503148) - MM - -2008-11-25 Added rcParam axes.unicode_minus which allows plain hypen - for minus when False - JDH - -2008-11-25 Added scatterpoints support in Legend. patch by Erik - Tollerud - JJL - -2008-11-24 Fix crash in log ticking. - MGD - -2008-11-20 Added static helper method BrokenHBarCollection.span_where - and Axes/pyplot method fill_between. See - examples/pylab/fill_between.py - JDH - -2008-11-12 Add x_isdata and y_isdata attributes to Artist instances, - and use them to determine whether either or both - coordinates are used when updating dataLim. This is - used to fix autoscaling problems that had been triggered - by axhline, axhspan, axvline, axvspan. - EF - -2008-11-11 Update the psd(), csd(), cohere(), and specgram() methods - of Axes and the csd() cohere(), and specgram() functions - in mlab to be in sync with the changes to psd(). - In fact, under the hood, these all call the same core - to do computations. - RM - -2008-11-11 Add 'pad_to' and 'sides' parameters to mlab.psd() to - allow controlling of zero padding and returning of - negative frequency components, respecitively. These are - added in a way that does not change the API. - RM - -2008-11-10 Fix handling of c kwarg by scatter; generalize - is_string_like to accept numpy and numpy.ma string - array scalars. - RM and EF - -2008-11-09 Fix a possible EINTR problem in dviread, which might help - when saving pdf files from the qt backend. - JKS - -2008-11-05 Fix bug with zoom to rectangle and twin axes - MGD - -2008-10-24 Added Jae Joon's fancy arrow, box and annotation - enhancements -- see - examples/pylab_examples/annotation_demo2.py - -2008-10-23 Autoscaling is now supported with shared axes - EF - -2008-10-23 Fixed exception in dviread that happened with Minion - JKS - -2008-10-21 set_xlim, ylim now return a copy of the viewlim array to - avoid modify inplace surprises - -2008-10-20 Added image thumbnail generating function - matplotlib.image.thumbnail. See - examples/misc/image_thumbnail.py - JDH - -2008-10-20 Applied scatleg patch based on ideas and work by Erik - Tollerud and Jae-Joon Lee. - MM - -2008-10-11 Fixed bug in pdf backend: if you pass a file object for - output instead of a filename, e.g., in a wep app, we now - flush the object at the end. - JKS - -2008-10-08 Add path simplification support to paths with gaps. - EF - -2008-10-05 Fix problem with AFM files that don't specify the font's - full name or family name. - JKS - -2008-10-04 Added 'scilimits' kwarg to Axes.ticklabel_format() method, - for easy access to the set_powerlimits method of the - major ScalarFormatter. - EF - -2008-10-04 Experimental new kwarg borderpad to replace pad in legend, - based on suggestion by Jae-Joon Lee. - EF - -2008-09-27 Allow spy to ignore zero values in sparse arrays, based - on patch by Tony Yu. Also fixed plot to handle empty - data arrays, and fixed handling of markers in figlegend. - EF - -2008-09-24 Introduce drawstyles for lines. Transparently split linestyles - like 'steps--' into drawstyle 'steps' and linestyle '--'. - Legends always use drawstyle 'default'. - MM - -2008-09-18 Fixed quiver and quiverkey bugs (failure to scale properly - when resizing) and added additional methods for determining - the arrow angles - EF - -2008-09-18 Fix polar interpolation to handle negative values of theta - MGD - -2008-09-14 Reorganized cbook and mlab methods related to numerical - calculations that have little to do with the goals of those two - modules into a separate module numerical_methods.py - Also, added ability to select points and stop point selection - with keyboard in ginput and manual contour labeling code. - Finally, fixed contour labeling bug. - DMK - -2008-09-11 Fix backtick in Postscript output. - MGD - -2008-09-10 [ 2089958 ] Path simplification for vector output backends - Leverage the simplification code exposed through - path_to_polygons to simplify certain well-behaved paths in - the vector backends (PDF, PS and SVG). "path.simplify" - must be set to True in matplotlibrc for this to work. - - MGD - -2008-09-10 Add "filled" kwarg to Path.intersects_path and - Path.intersects_bbox. - MGD - -2008-09-07 Changed full arrows slightly to avoid an xpdf rendering - problem reported by Friedrich Hagedorn. - JKS - -2008-09-07 Fix conversion of quadratic to cubic Bezier curves in PDF - and PS backends. Patch by Jae-Joon Lee. - JKS - -2008-09-06 Added 5-point star marker to plot command - EF - -2008-09-05 Fix hatching in PS backend - MGD - -2008-09-03 Fix log with base 2 - MGD - -2008-09-01 Added support for bilinear interpolation in - NonUniformImage; patch by Gregory Lielens. - EF - -2008-08-28 Added support for multiple histograms with data of - different length - MM - -2008-08-28 Fix step plots with log scale - MGD - -2008-08-28 Fix masked arrays with markers in non-Agg backends - MGD - -2008-08-28 Fix clip_on kwarg so it actually works correctly - MGD - -2008-08-25 Fix locale problems in SVG backend - MGD - -2008-08-22 fix quiver so masked values are not plotted - JSW - -2008-08-18 improve interactive pan/zoom in qt4 backend on windows - DSD - -2008-08-11 Fix more bugs in NaN/inf handling. In particular, path simplification - (which does not handle NaNs or infs) will be turned off automatically - when infs or NaNs are present. Also masked arrays are now converted - to arrays with NaNs for consistent handling of masks and NaNs - - MGD and EF - -================================================================= -2008-08-03 Released 0.98.3 at svn r5947 - -2008-08-01 Backported memory leak fixes in _ttconv.cpp - MGD - -2008-07-31 Added masked array support to griddata. - JSW - -2008-07-26 Added optional C and reduce_C_function arguments to - axes.hexbin(). This allows hexbin to accumulate the values - of C based on the x,y coordinates and display in hexagonal - bins. - ADS - -2008-07-24 Deprecated (raise NotImplementedError) all the mlab2 - functions from matplotlib.mlab out of concern that some of - them were not clean room implementations. JDH - -2008-07-24 Rewrite of a significant portion of the clabel code (class - ContourLabeler) to improve inlining. - DMK - -2008-07-22 Added Barbs polygon collection (similar to Quiver) for plotting - wind barbs. Added corresponding helpers to Axes and pyplot as - well. (examples/pylab_examples/barb_demo.py shows it off.) - RMM - -2008-07-21 Added scikits.delaunay as matplotlib.delaunay. Added griddata - function in matplotlib.mlab, with example (griddata_demo.py) in - pylab_examples. griddata function will use mpl_toolkits._natgrid - if installed. - JSW - -2008-07-21 Re-introduced offset_copy that works in the context of the - new transforms. - MGD - -2008-07-21 Committed patch by Ryan May to add get_offsets and - set_offsets to Collections base class - EF - -2008-07-21 Changed the "asarray" strategy in image.py so that - colormapping of masked input should work for all - image types (thanks Klaus Zimmerman) - EF - -2008-07-20 Rewrote cbook.delete_masked_points and corresponding - unit test to support rgb color array inputs, datetime - inputs, etc. - EF - -2008-07-20 Renamed unit/axes_unit.py to cbook_unit.py and modified - in accord with Ryan's move of delete_masked_points from - axes to cbook. - EF - -2008-07-18 Check for nan and inf in axes.delete_masked_points(). - This should help hexbin and scatter deal with nans. - ADS - -2008-07-17 Added ability to manually select contour label locations. - Also added a waitforbuttonpress function. - DMK - -2008-07-17 Fix bug with NaNs at end of path (thanks, Andrew Straw for - the report) - MGD - -2008-07-16 Improve error handling in texmanager, thanks to Ian Henry - for reporting - DSD - -2008-07-12 Added support for external backends with the - "module://my_backend" syntax - JDH - -2008-07-11 Fix memory leak related to shared axes. Grouper should - store weak references. - MGD - -2008-07-10 Bugfix: crash displaying fontconfig pattern - MGD - -2008-07-10 Bugfix: [ 2013963 ] update_datalim_bounds in Axes not works - MGD - -2008-07-10 Bugfix: [ 2014183 ] multiple imshow() causes gray edges - MGD - -2008-07-09 Fix rectangular axes patch on polar plots bug - MGD - -2008-07-09 Improve mathtext radical rendering - MGD - -2008-07-08 Improve mathtext superscript placement - MGD - -2008-07-07 Fix custom scales in pcolormesh (thanks Matthew Turk) - MGD - -2008-07-03 Implemented findobj method for artist and pyplot - see - examples/pylab_examples/findobj_demo.py - JDH - -2008-06-30 Another attempt to fix TextWithDash - DSD - -2008-06-30 Removed Qt4 NavigationToolbar2.destroy -- it appears to - have been unnecessary and caused a bug reported by P. - Raybaut - DSD - -2008-06-27 Fixed tick positioning bug - MM - -2008-06-27 Fix dashed text bug where text was at the wrong end of the - dash - MGD - -2008-06-26 Fix mathtext bug for expressions like $x_{\leftarrow}$ - MGD - -2008-06-26 Fix direction of horizontal/vertical hatches - MGD - -2008-06-25 Figure.figurePatch renamed Figure.patch, Axes.axesPatch - renamed Axes.patch, Axes.axesFrame renamed Axes.frame, - Axes.get_frame, which returns Axes.patch, is deprecated. - Examples and users guide updated - JDH - -2008-06-25 Fix rendering quality of pcolor - MGD - -================================================================= -2008-06-24 Released 0.98.2 at svn r5667 - (source only for debian) JDH - -2008-06-24 Added "transparent" kwarg to savefig. - MGD - -2008-06-24 Applied Stefan's patch to draw a single centered marker over - a line with numpoints==1 - JDH - -2008-06-23 Use splines to render circles in scatter plots - MGD - -=============================================================== -2008-06-22 Released 0.98.1 at revision 5637 - -2008-06-22 Removed axes3d support and replaced it with a - NotImplementedError for one release cycle - -2008-06-21 fix marker placement bug in backend_ps - DSD - -2008-06-20 [ 1978629 ] scale documentation missing/incorrect for log - MGD - -2008-06-20 Added closed kwarg to PolyCollection. Fixes bug [ 1994535 - ] still missing lines on graph with svn (r 5548). - MGD - -2008-06-20 Added set/get_closed method to Polygon; fixes error - in hist - MM - -2008-06-19 Use relative font sizes (e.g., 'medium' and 'large') in - rcsetup.py and matplotlibrc.template so that text will - be scaled by default when changing rcParams['font.size'] - - EF - -2008-06-17 Add a generic PatchCollection class that can contain any - kind of patch. - MGD - -2008-06-13 Change pie chart label alignment to avoid having labels - overwrite the pie - MGD - -2008-06-12 Added some helper functions to the mathtext parser to - return bitmap arrays or write pngs to make it easier to use - mathtext outside the context of an mpl figure. modified - the mathpng sphinxext to use the mathtext png save - functionality - see examples/api/mathtext_asarray.py - JDH - -2008-06-11 Use matplotlib.mathtext to render math expressions in - online docs - MGD - -2008-06-11 Move PNG loading/saving to its own extension module, and - remove duplicate code in _backend_agg.cpp and _image.cpp - that does the same thing - MGD - -2008-06-11 Numerous mathtext bugfixes, primarily related to - dpi-independence - MGD - -2008-06-10 Bar now applies the label only to the first patch only, and - sets '_nolegend_' for the other patch labels. This lets - autolegend work as expected for hist and bar - see - https://sourceforge.net/tracker/index.php?func=detail&aid=1986597&group_id=80706&atid=560720 - JDH - -2008-06-10 Fix text baseline alignment bug. [ 1985420 ] Repair of - baseline alignment in Text._get_layout. Thanks Stan West - - MGD - -2008-06-09 Committed Gregor's image resample patch to downsampling - images with new rcparam image.resample - JDH - -2008-06-09 Don't install Enthought.Traits along with matplotlib. For - matplotlib developers convenience, it can still be - installed by setting an option in setup.cfg while we figure - decide if there is a future for the traited config - DSD - -2008-06-09 Added range keyword arg to hist() - MM - -2008-06-07 Moved list of backends to rcsetup.py; made use of lower - case for backend names consistent; use validate_backend - when importing backends subpackage - EF - -2008-06-06 hist() revision, applied ideas proposed by Erik Tollerud and - Olle Engdegard: make histtype='step' unfilled by default - and introduce histtype='stepfilled'; use default color - cycle; introduce reverse cumulative histogram; new align - keyword - MM - -2008-06-06 Fix closed polygon patch and also provide the option to - not close the polygon - MGD - -2008-06-05 Fix some dpi-changing-related problems with PolyCollection, - as called by Axes.scatter() - MGD - -2008-06-05 Fix image drawing so there is no extra space to the right - or bottom - MGD - -2006-06-04 Added a figure title command suptitle as a Figure method - and pyplot command -- see examples/figure_title.py - JDH - -2008-06-02 Added support for log to hist with histtype='step' and fixed - a bug for log-scale stacked histograms - MM - -=============================================================== -2008-05-29 Released 0.98.0 at revision 5314 - -2008-05-29 matplotlib.image.imread now no longer always returns RGBA - -- if the image is luminance or RGB, it will return a MxN - or MxNx3 array if possible. Also uint8 is no longer always - forced to float. - -2008-05-29 Implement path clipping in PS backend - JDH - -2008-05-29 Fixed two bugs in texmanager.py: - improved comparison of dvipng versions - fixed a bug introduced when get_grey method was added - - DSD - -2008-05-28 Fix crashing of PDFs in xpdf and ghostscript when two-byte - characters are used with Type 3 fonts - MGD - -2008-05-28 Allow keyword args to configure widget properties as - requested in - http://sourceforge.net/tracker/index.php?func=detail&aid=1866207&group_id=80706&atid=560722 - - JDH - -2008-05-28 Replaced '-' with u'\u2212' for minus sign as requested in - http://sourceforge.net/tracker/index.php?func=detail&aid=1962574&group_id=80706&atid=560720 - -2008-05-28 zero width/height Rectangles no longer influence the - autoscaler. Useful for log histograms with empty bins - - JDH - -2008-05-28 Fix rendering of composite glyphs in Type 3 conversion - (particularly as evidenced in the Eunjin.ttf Korean font) - Thanks Jae-Joon Lee for finding this! - -2008-05-27 Rewrote the cm.ScalarMappable callback infrastructure to - use cbook.CallbackRegistry rather than custom callback - handling. Amy users of add_observer/notify of the - cm.ScalarMappable should uae the - cm.ScalarMappable.callbacksSM CallbackRegistry instead. JDH - -2008-05-27 Fix TkAgg build on Ubuntu 8.04 (and hopefully a more - general solution for other platforms, too.) - -2008-05-24 Added PIL support for loading images to imread (if PIL is - available) - JDH - -2008-05-23 Provided a function and a method for controlling the - plot color cycle. - EF - -2008-05-23 Major revision of hist(). Can handle 2D arrays and create - stacked histogram plots; keyword 'width' deprecated and - rwidth (relative width) introduced; align='edge' changed - to center of bin - MM - -2008-05-22 Added support for ReST-based doumentation using Sphinx. - Documents are located in doc/, and are broken up into - a users guide and an API reference. To build, run the - make.py files. Sphinx-0.4 is needed to build generate xml, - which will be useful for rendering equations with mathml, - use sphinx from svn until 0.4 is released - DSD - -2008-05-21 Fix segfault in TkAgg backend - MGD - -2008-05-21 Fix a "local variable unreferenced" bug in plotfile - MM - -2008-05-19 Fix crash when Windows can not access the registry to - determine font path [Bug 1966974, thanks Patrik Simons] - MGD - -2008-05-16 removed some unneeded code w/ the python 2.4 requirement. - cbook no longer provides compatibility for reversed, - enumerate, set or izip. removed lib/subprocess, mpl1, - sandbox/units, and the swig code. This stuff should remain - on the maintenance branch for archival purposes. JDH - -2008-05-16 Reorganized examples dir - JDH - -2008-05-16 Added 'elinewidth' keyword arg to errorbar, based on patch - by Christopher Brown - MM - -2008-05-16 Added 'cumulative' keyword arg to hist to plot cumulative - histograms. For normed hists, this is normalized to one - MM - -2008-05-15 Fix Tk backend segfault on some machines - MGD - -2008-05-14 Don't use stat on Windows (fixes font embedding problem) - MGD - -2008-05-09 Fix /singlequote (') in Postscript backend - MGD - -2008-05-08 Fix kerning in SVG when embedding character outlines - MGD - -2008-05-07 Switched to future numpy histogram semantic in hist - MM - -2008-05-06 Fix strange colors when blitting in QtAgg and Qt4Agg - MGD - -2008-05-05 pass notify_axes_change to the figure's add_axobserver - in the qt backends, like we do for the other backends. - Thanks Glenn Jones for the report - DSD - -2008-05-02 Added step histograms, based on patch by Erik Tollerud. - MM - -2008-05-02 On PyQt <= 3.14 there is no way to determine the underlying - Qt version. [1851364] - MGD - -2008-05-02 Don't call sys.exit() when pyemf is not found [1924199] - - MGD - -2008-05-02 Update _subprocess.c from upstream Python 2.5.2 to get a - few memory and reference-counting-related bugfixes. See - bug 1949978. - MGD - -2008-04-30 Added some record array editing widgets for gtk -- see - examples/rec_edit*.py - JDH - -2008-04-29 Fix bug in mlab.sqrtm - MM - -2008-04-28 Fix bug in SVG text with Mozilla-based viewers (the symbol - tag is not supported) - MGD - -2008-04-27 Applied patch by Michiel de Hoon to add hexbin - axes method and pyplot function - EF - -2008-04-25 Enforce python >= 2.4; remove subprocess build - EF - -2008-04-25 Enforce the numpy requirement at build time - JDH - -2008-04-24 Make numpy 1.1 and python 2.3 required when importing - matplotlib - EF - -2008-04-24 Fix compilation issues on VS2003 (Thanks Martin Spacek for - all the help) - MGD - -2008-04-24 Fix sub/superscripts when the size of the font has been - changed - MGD - -2008-04-22 Use "svg.embed_char_paths" consistently everywhere - MGD - -2008-04-20 Add support to MaxNLocator for symmetric axis autoscaling. - EF - -2008-04-20 Fix double-zoom bug. - MM - -2008-04-15 Speed up color mapping. - EF - -2008-04-12 Speed up zooming and panning of dense images. - EF - -2008-04-11 Fix global font rcParam setting after initialization - time. - MGD - -2008-04-11 Revert commits 5002 and 5031, which were intended to - avoid an unnecessary call to draw(). 5002 broke saving - figures before show(). 5031 fixed the problem created in - 5002, but broke interactive plotting. Unnecessary call to - draw still needs resolution - DSD - -2008-04-07 Improve color validation in rc handling, suggested - by Lev Givon - EF - -2008-04-02 Allow to use both linestyle definition arguments, '-' and - 'solid' etc. in plots/collections - MM - -2008-03-27 Fix saving to Unicode filenames with Agg backend - (other backends appear to already work...) - (Thanks, Christopher Barker) - MGD - -2008-03-26 Fix SVG backend bug that prevents copying and pasting in - Inkscape (thanks Kaushik Ghose) - MGD - -2008-03-24 Removed an unnecessary call to draw() in the backend_qt* - mouseReleaseEvent. Thanks to Ted Drain - DSD - -2008-03-23 Fix a pdf backend bug which sometimes caused the outermost - gsave to not be balanced with a grestore. - JKS - -2008-03-20 Fixed a minor bug in ContourSet._process_linestyles when - len(linestyles)==Nlev - MM - -2008-03-19 Changed ma import statements to "from numpy import ma"; - this should work with past and future versions of - numpy, whereas "import numpy.ma as ma" will work only - with numpy >= 1.05, and "import numerix.npyma as ma" - is obsolete now that maskedarray is replacing the - earlier implementation, as of numpy 1.05. - -2008-03-14 Removed an apparently unnecessary call to - FigureCanvasAgg.draw in backend_qt*agg. Thanks to Ted - Drain - DSD - -2008-03-10 Workaround a bug in backend_qt4agg's blitting due to a - buffer width/bbox width mismatch in _backend_agg's - copy_from_bbox - DSD - -2008-02-29 Fix class Wx toolbar pan and zoom functions (Thanks Jeff - Peery) - MGD - -2008-02-16 Added some new rec array functionality to mlab - (rec_summarize, rec2txt and rec_groupby). See - examples/rec_groupby_demo.py. Thanks to Tim M for rec2txt. - -2008-02-12 Applied Erik Tollerud's span selector patch - JDH - -2008-02-11 Update plotting() doc string to refer to getp/setp. - JKS - -2008-02-10 Fixed a problem with square roots in the pdf backend with - usetex. - JKS - -2008-02-08 Fixed minor __str__ bugs so getp(gca()) works. - JKS - -2008-02-05 Added getters for title, xlabel, ylabel, as requested - by Brandon Kieth - EF - -2008-02-05 Applied Gael's ginput patch and created - examples/ginput_demo.py - JDH - -2008-02-03 Expose interpnames, a list of valid interpolation - methods, as an AxesImage class attribute. - EF - -2008-02-03 Added BoundaryNorm, with examples in colorbar_only.py - and image_masked.py. - EF - -2008-02-03 Force dpi=72 in pdf backend to fix picture size bug. - JKS - -2008-02-01 Fix doubly-included font problem in Postscript backend - MGD - -2008-02-01 Fix reference leak in ft2font Glyph objects. - MGD - -2008-01-31 Don't use unicode strings with usetex by default - DSD - -2008-01-31 Fix text spacing problems in PDF backend with *some* fonts, - such as STIXGeneral. - -2008-01-31 Fix \sqrt with radical number (broken by making [ and ] - work below) - MGD - -2008-01-27 Applied Martin Teichmann's patch to improve the Qt4 - backend. Uses Qt's builtin toolbars and statusbars. - See bug 1828848 - DSD - -2008-01-10 Moved toolkits to mpl_toolkits, made mpl_toolkits - a namespace package - JSWHIT - -2008-01-10 Use setup.cfg to set the default parameters (tkagg, - numpy) when building windows installers - DSD - -2008-01-10 Fix bug displaying [ and ] in mathtext - MGD - -2008-01-10 Fix bug when displaying a tick value offset with scientific - notation. (Manifests itself as a warning that the \times - symbol can not be found). - MGD - -2008-01-10 Use setup.cfg to set the default parameters (tkagg, - numpy) when building windows installers - DSD - -=============================================================== -2008-01-06 Released 0.91.2 at revision 4802 - -2007-12-26 Reduce too-late use of matplotlib.use() to a warning - instead of an exception, for backwards compatibility - EF - -2007-12-25 Fix bug in errorbar, identified by Noriko Minakawa - EF - -2007-12-25 Changed masked array importing to work with the upcoming - numpy 1.05 (now the maskedarray branch) as well as with - earlier versions. - EF - -2007-12-16 rec2csv saves doubles without losing precision. Also, it - does not close filehandles passed in open. - JDH,ADS - -2007-12-13 Moved rec2gtk to matplotlib.toolkits.gtktools and rec2excel - to matplotlib.toolkits.exceltools - JDH - -2007-12-12 Support alpha-blended text in the Agg and Svg backends - - MGD - -2007-12-10 Fix SVG text rendering bug. - MGD - -2007-12-10 Increase accuracy of circle and ellipse drawing by using an - 8-piece bezier approximation, rather than a 4-piece one. - Fix PDF, SVG and Cairo backends so they can draw paths - (meaning ellipses as well). - MGD - -2007-12-07 Issue a warning when drawing an image on a non-linear axis. - MGD - -2007-12-06 let widgets.Cursor initialize to the lower x and y bounds - rather than 0,0, which can cause havoc for dates and other - transforms - DSD - -2007-12-06 updated references to mpl data directories for py2exe - DSD - -2007-12-06 fixed a bug in rcsetup, see bug 1845057 - DSD - -2007-12-05 Fix how fonts are cached to avoid loading the same one multiple times. - (This was a regression since 0.90 caused by the refactoring of - font_manager.py) - MGD - -2007-12-05 Support arbitrary rotation of usetex text in Agg backend. - MGD - -2007-12-04 Support '|' as a character in mathtext - MGD - -=============================================================== -2007-11-27 Released 0.91.1 at revision 4517 - -=============================================================== -2007-11-27 Released 0.91.0 at revision 4478 - -2007-11-13 All backends now support writing to a file-like object, not - just a regular file. savefig() can be passed a file-like - object in place of a file path. - MGD - -2007-11-13 Improved the default backend selection at build time: - SVG -> Agg -> TkAgg -> WXAgg -> GTK -> GTKAgg. The last usable - backend in this progression will be chosen in the default - config file. If a backend is defined in setup.cfg, that will - be the default backend - DSD - -2007-11-13 Improved creation of default config files at build time for - traited config package - DSD - -2007-11-12 Exposed all the build options in setup.cfg. These options are - read into a dict called "options" by setupext.py. Also, added - "-mpl" tags to the version strings for packages provided by - matplotlib. Versions provided by mpl will be identified and - updated on subsequent installs - DSD - -2007-11-12 Added support for STIX fonts. A new rcParam, - mathtext.fontset, can be used to choose between: - - 'cm': - The TeX/LaTeX Computer Modern fonts - - 'stix': - The STIX fonts (see stixfonts.org) - - 'stixsans': - The STIX fonts, using sans-serif glyphs by default - - 'custom': - A generic Unicode font, in which case the mathtext font - must be specified using mathtext.bf, mathtext.it, - mathtext.sf etc. - - Added a new example, stix_fonts_demo.py to show how to access - different fonts and unusual symbols. - - - MGD - -2007-11-12 Options to disable building backend extension modules moved - from setup.py to setup.cfg - DSD - -2007-11-09 Applied Martin Teichmann's patch 1828813: a QPainter is used in - paintEvent, which has to be destroyed using the method end(). If - matplotlib raises an exception before the call to end - and it - does if you feed it with bad data - this method end() is never - called and Qt4 will start spitting error messages - -2007-11-09 Moved pyparsing back into matplotlib namespace. Don't use - system pyparsing, API is too variable from one release - to the next - DSD - -2007-11-08 Made pylab use straight numpy instead of oldnumeric - by default - EF - -2007-11-08 Added additional record array utilites to mlab (rec2excel, - rec2gtk, rec_join, rec_append_field, rec_drop_field) - JDH - -2007-11-08 Updated pytz to version 2007g - DSD - -2007-11-08 Updated pyparsing to version 1.4.8 - DSD - -2007-11-08 Moved csv2rec to recutils and added other record array - utilities - JDH - -2007-11-08 If available, use existing pyparsing installation - DSD - -2007-11-07 Removed old enthought.traits from lib/matplotlib, added - Gael Varoquaux's enthought.traits-2.6b1, which is stripped - of setuptools. The package is installed to site-packages - if not already available - DSD - -2007-11-05 Added easy access to minor tick properties; slight mod - of patch by Pierre G-M - EF - -2007-11-02 Commited Phil Thompson's patch 1599876, fixes to Qt4Agg - backend and qt4 blitting demo - DSD - -2007-11-02 Commited Phil Thompson's patch 1599876, fixes to Qt4Agg - backend and qt4 blitting demo - DSD - -2007-10-31 Made log color scale easier to use with contourf; - automatic level generation now works. - EF - -2007-10-29 TRANSFORMS REFACTORING - - The primary goal of this refactoring was to make it easier - to extend matplotlib to support new kinds of projections. - This is primarily an internal improvement, and the possible - user-visible changes it allows are yet to come. - - The transformation framework was completely rewritten in - Python (with Numpy). This will make it easier to add news - kinds of transformations without writing C/C++ code. - - Transforms are composed into a 'transform tree', made of - transforms whose value depends on other transforms (their - children). When the contents of children change, their - parents are automatically updated to reflect those changes. - To do this an "invalidation" method is used: when children - change, all of their ancestors are marked as "invalid". - When the value of a transform is accessed at a later time, - its value is recomputed only if it is invalid, otherwise a - cached value may be used. This prevents unnecessary - recomputations of transforms, and contributes to better - interactive performance. - - The framework can be used for both affine and non-affine - transformations. However, for speed, we want use the - backend renderers to perform affine transformations - whenever possible. Therefore, it is possible to perform - just the affine or non-affine part of a transformation on a - set of data. The affine is always assumed to occur after - the non-affine. For any transform: - - full transform == non-affine + affine - - Much of the drawing has been refactored in terms of - compound paths. Therefore, many methods have been removed - from the backend interface and replaced with a a handful to - draw compound paths. This will make updating the backends - easier, since there is less to update. It also should make - the backends more consistent in terms of functionality. - - User visible changes: - - - POLAR PLOTS: Polar plots are now interactively zoomable, - and the r-axis labels can be interactively rotated. - Straight line segments are now interpolated to follow the - curve of the r-axis. - - - Non-rectangular clipping works in more backends and with - more types of objects. - - - Sharing an axis across figures is now done in exactly - the same way as sharing an axis between two axes in the - same figure: - - fig1 = figure() - fig2 = figure() - - ax1 = fig1.add_subplot(111) - ax2 = fig2.add_subplot(111, sharex=ax1, sharey=ax1) - - - linestyles now include steps-pre, steps-post and - steps-mid. The old step still works and is equivalent to - step-pre. - - - Multiple line styles may be provided to a collection. - - See API_CHANGES for more low-level information about this - refactoring. - -2007-10-24 Added ax kwarg to Figure.colorbar and pyplot.colorbar - EF - -2007-10-19 Removed a gsave/grestore pair surrounding _draw_ps, which - was causing a loss graphics state info (see "EPS output - problem - scatter & edgecolors" on mpl-dev, 2007-10-29) - - DSD - -2007-10-15 Fixed a bug in patches.Ellipse that was broken for - aspect='auto'. Scale free ellipses now work properly for - equal and auto on Agg and PS, and they fall back on a - polygonal approximation for nonlinear transformations until - we convince oursleves that the spline approximation holds - for nonlinear transformations. Added - unit/ellipse_compare.py to compare spline with vertex - approx for both aspects. JDH - -2007-10-05 remove generator expressions from texmanager and mpltraits. - generator expressions are not supported by python-2.3 - DSD - -2007-10-01 Made matplotlib.use() raise an exception if called after - backends has been imported. - EF - -2007-09-30 Modified update* methods of Bbox and Interval so they - work with reversed axes. Prior to this, trying to - set the ticks on a reversed axis failed with an - uninformative error message. - EF - -2007-09-30 Applied patches to axes3d to fix index error problem - EF - -2007-09-24 Applied Eike Welk's patch reported on mpl-dev on 2007-09-22 - Fixes a bug with multiple plot windows in the qt backend, - ported the changes to backend_qt4 as well - DSD - -2007-09-21 Changed cbook.reversed to yield the same result as the - python reversed builtin - DSD - -2007-09-13 The usetex support in the pdf backend is more usable now, - so I am enabling it. - JKS - -2007-09-12 Fixed a Axes.bar unit bug - JDH - -2007-09-10 Made skiprows=1 the default on csv2rec - JDH - -2007-09-09 Split out the plotting part of pylab and put it in - pyplot.py; removed numerix from the remaining pylab.py, - which imports everything from pyplot.py. The intention - is that apart from cleanups, the result of importing - from pylab is nearly unchanged, but there is the - new alternative of importing from pyplot to get - the state-engine graphics without all the numeric - functions. - Numpified examples; deleted two that were obsolete; - modified some to use pyplot. - EF - -2007-09-08 Eliminated gd and paint backends - EF - -2007-09-06 .bmp file format is now longer an alias for .raw - -2007-09-07 Added clip path support to pdf backend. - JKS - -2007-09-06 Fixed a bug in the embedding of Type 1 fonts in PDF. - Now it doesn't crash Preview.app. - JKS - -2007-09-06 Refactored image saving code so that all GUI backends can - save most image types. See FILETYPES for a matrix of - backends and their supported file types. - Backend canvases should no longer write their own print_figure() - method -- instead they should write a print_xxx method for - each filetype they can output and add an entry to their - class-scoped filetypes dictionary. - MGD - -2007-09-05 Fixed Qt version reporting in setupext.py - DSD - -2007-09-04 Embedding Type 1 fonts in PDF, and thus usetex support - via dviread, sort of works. To test, enable it by - renaming _draw_tex to draw_tex. - JKS - -2007-09-03 Added ability of errorbar show limits via caret or - arrowhead ends on the bars; patch by Manual Metz. - EF - -2007-09-03 Created type1font.py, added features to AFM and FT2Font - (see API_CHANGES), started work on embedding Type 1 fonts - in pdf files. - JKS - -2007-09-02 Continued work on dviread.py. - JKS - -2007-08-16 Added a set_extent method to AxesImage, allow data extent - to be modified after initial call to imshow - DSD - -2007-08-14 Fixed a bug in pyqt4 subplots-adjust. Thanks to - Xavier Gnata for the report and suggested fix - DSD - -2007-08-13 Use pickle to cache entire fontManager; change to using - font_manager module-level function findfont wrapper for - the fontManager.findfont method - EF - -2007-08-11 Numpification and cleanup of mlab.py and some examples - EF - -2007-08-06 Removed mathtext2 - -2007-07-31 Refactoring of distutils scripts. - - Will not fail on the entire build if an optional Python - package (e.g., Tkinter) is installed but its development - headers are not (e.g., tk-devel). Instead, it will - continue to build all other extensions. - - Provide an overview at the top of the output to display - what dependencies and their versions were found, and (by - extension) what will be built. - - Use pkg-config, when available, to find freetype2, since - this was broken on Mac OS-X when using MacPorts in a non- - standard location. - -2007-07-30 Reorganized configuration code to work with traited config - objects. The new config system is located in the - matplotlib.config package, but it is disabled by default. - To enable it, set NEWCONFIG=True in matplotlib.__init__.py. - The new configuration system will still use the old - matplotlibrc files by default. To switch to the experimental, - traited configuration, set USE_TRAITED_CONFIG=True in - config.__init__.py. - -2007-07-29 Changed default pcolor shading to flat; added aliases - to make collection kwargs agree with setter names, so - updating works; related minor cleanups. - Removed quiver_classic, scatter_classic, pcolor_classic. - EF - -2007-07-26 Major rewrite of mathtext.py, using the TeX box layout model. - - There is one (known) backward incompatible change. The - font commands (\cal, \rm, \it, \tt) now behave as TeX does: - they are in effect until the next font change command or - the end of the grouping. Therefore uses of $\cal{R}$ - should be changed to ${\cal R}$. Alternatively, you may - use the new LaTeX-style font commands (\mathcal, \mathrm, - \mathit, \mathtt) which do affect the following group, - e.g., $\mathcal{R}$. - - Other new features include: - - - Math may be interspersed with non-math text. Any text - with an even number of $'s (non-escaped) will be sent to - the mathtext parser for layout. - - - Sub/superscripts are less likely to accidentally overlap. - - - Support for sub/superscripts in either order, e.g., $x^i_j$ - and $x_j^i$ are equivalent. - - - Double sub/superscripts (e.g., $x_i_j$) are considered - ambiguous and raise an exception. Use braces to disambiguate. - - - $\frac{x}{y}$ can be used for displaying fractions. - - - $\sqrt[3]{x}$ can be used to display the radical symbol - with a root number and body. - - - $\left(\frac{x}{y}\right)$ may be used to create - parentheses and other delimiters that automatically - resize to the height of their contents. - - - Spacing around operators etc. is now generally more like - TeX. - - - Added support (and fonts) for boldface (\bf) and - sans-serif (\sf) symbols. - - - Log-like function name shortcuts are supported. For - example, $\sin(x)$ may be used instead of ${\rm sin}(x)$ - - - Limited use of kerning for the easy case (same font) - - Behind the scenes, the pyparsing.py module used for doing - the math parsing was updated to the latest stable version - (1.4.6). A lot of duplicate code was refactored out of the - Font classes. - - - MGD - -2007-07-19 completed numpification of most trivial cases - NN - -2007-07-19 converted non-numpy relicts throughout the code - NN - -2007-07-19 replaced the Python code in numerix/ by a minimal wrapper around - numpy that explicitly mentions all symbols that need to be - addressed for further numpification - NN - -2007-07-18 make usetex respect changes to rcParams. texmanager used to - only configure itself when it was created, now it - reconfigures when rcParams are changed. Thank you Alexander - Schmolck for contributing a patch - DSD - -2007-07-17 added validation to setting and changing rcParams - DSD - -2007-07-17 bugfix segfault in transforms module. Thanks Ben North for - the patch. - ADS - -2007-07-16 clean up some code in ticker.ScalarFormatter, use unicode to - render multiplication sign in offset ticklabel - DSD - -2007-07-16 fixed a formatting bug in ticker.ScalarFormatter's scientific - notation (10^0 was being rendered as 10 in some cases) - DSD - -2007-07-13 Add MPL_isfinite64() and MPL_isinf64() for testing - doubles in (the now misnamed) MPL_isnan.h. - ADS - -2007-07-13 The matplotlib._isnan module removed (use numpy.isnan) - ADS - -2007-07-13 Some minor cleanups in _transforms.cpp - ADS - -2007-07-13 Removed the rest of the numerix extension code detritus, - numpified axes.py, and cleaned up the imports in axes.py - - JDH - -2007-07-13 Added legend.loc as configurable option that could in - future default to 'best'. - NN - -2007-07-12 Bugfixes in mlab.py to coerce inputs into numpy arrays. -ADS - -2007-07-11 Added linespacing kwarg to text.Text - EF - -2007-07-11 Added code to store font paths in SVG files. - MGD - -2007-07-10 Store subset of TTF font as a Type 3 font in PDF files. - MGD - -2007-07-09 Store subset of TTF font as a Type 3 font in PS files. - MGD - -2007-07-09 Applied Paul's pick restructure pick and add pickers, - sourceforge patch 1749829 - JDH - - -2007-07-09 Applied Allan's draw_lines agg optimization. JDH - - -2007-07-08 Applied Carl Worth's patch to fix cairo draw_arc - SC - -2007-07-07 fixed bug 1712099: xpdf distiller on windows - DSD - -2007-06-30 Applied patches to tkagg, gtk, and wx backends to reduce - memory leakage. Patches supplied by Mike Droettboom; - see tracker numbers 1745400, 1745406, 1745408. - Also made unit/memleak_gui.py more flexible with - command-line options. - EF - -2007-06-30 Split defaultParams into separate file rcdefaults (together with - validation code). Some heavy refactoring was necessary to do so, - but the overall behavior should be the same as before. - NN - -2007-06-27 Added MPLCONFIGDIR for the default location for mpl data - and configuration. useful for some apache installs where - HOME is not writable. Tried to clean up the logic in - _get_config_dir to support non-writable HOME where are - writable HOME/.matplotlib already exists - JDH - -2007-06-27 Fixed locale bug reported at - http://sourceforge.net/tracker/index.php?func=detail&aid=1744154&group_id=80706&atid=560720 - by adding a cbook.unicode_safe function - JDH - -2007-06-27 Applied Micheal's tk savefig bugfix described at - http://sourceforge.net/tracker/index.php?func=detail&aid=1716732&group_id=80706&atid=560720 - Thanks Michael! - - -2007-06-27 Patch for get_py2exe_datafiles() to work with new directory - layout. (Thanks Tocer and also Werner Bruhin.) -ADS - - -2007-06-27 Added a scroll event to the mpl event handling system and - implemented it for backends GTK* -- other backend - users/developers/maintainers, please add support for your - backend. - JDH - -2007-06-25 Changed default to clip=False in colors.Normalize; - modified ColorbarBase for easier colormap display - EF - -2007-06-13 Added maskedarray option to rc, numerix - EF - -2007-06-11 Python 2.5 compatibility fix for mlab.py - EF - -2007-06-10 In matplotlibrc file, use 'dashed' | 'solid' instead - of a pair of floats for contour.negative_linestyle - EF - -2007-06-08 Allow plot and fill fmt string to be any mpl string - colorspec - EF - -2007-06-08 Added gnuplot file plotfile function to pylab -- see - examples/plotfile_demo.py - JDH - -2007-06-07 Disable build of numarray and Numeric extensions for - internal MPL use and the numerix layer. - ADS - -2007-06-07 Added csv2rec to matplotlib.mlab to support automatically - converting csv files to record arrays using type - introspection, and turned on native datetime support using - the new units support in matplotlib.dates. See - examples/loadrec.py ! JDH - -2007-06-07 Simplified internal code of _auto_legend_data - NN - -2007-06-04 Added labeldistance arg to Axes.pie to control the raidal - distance of the wedge labels - JDH - -2007-06-03 Turned mathtext in SVG into single with multiple - objects (easier to edit in inkscape). - NN - -=============================================================== -2007-06-02 Released 0.90.1 at revision 3352 - -2007-06-02 Display only meaningful labels when calling legend() - without args. - NN - -2007-06-02 Have errorbar follow the color cycle even if line is not plotted. - Suppress plotting of errorbar caps for capsize=0. - NN - -2007-06-02 Set markers to same alpha value as line. - NN - -2007-06-02 Fix mathtext position in svg backend. - NN - -2007-06-01 Deprecate Numeric and numarray for use as numerix. Props to - Travis -- job well done. - ADS - -2007-05-18 Added LaTeX unicode support. Enable with the - 'text.latex.unicode' rcParam. This requires the ucs and - inputenc LaTeX packages. - ADS - -2007-04-23 Fixed some problems with polar -- added general polygon - clipping to clip the lines a nd grids to the polar axes. - Added support for set_rmax to easily change the maximum - radial grid. Added support for polar legend - JDH - -2007-04-16 Added Figure.autofmt_xdate to handle adjusting the bottom - and rotating the tick labels for date plots when the ticks - often overlap - JDH - -2007-04-09 Beginnings of usetex support for pdf backend. -JKS - -2007-04-07 Fixed legend/LineCollection bug. Added label support - to collections. - EF - -2007-04-06 Removed deprecated support for a float value as a gray-scale; - now it must be a string, like '0.5'. Added alpha kwarg to - ColorConverter.to_rgba_list. - EF - -2007-04-06 Fixed rotation of ellipses in pdf backend - (sf bug #1690559) -JKS - -2007-04-04 More matshow tweaks; documentation updates; new method - set_bounds() for formatters and locators. - EF - -2007-04-02 Fixed problem with imshow and matshow of integer arrays; - fixed problems with changes to color autoscaling. - EF - -2007-04-01 Made image color autoscaling work correctly with - a tracking colorbar; norm.autoscale now scales - unconditionally, while norm.autoscale_None changes - only None-valued vmin, vmax. - EF - -2007-03-31 Added a qt-based subplot-adjustment dialog - DSD - -2007-03-30 Fixed a bug in backend_qt4, reported on mpl-dev - DSD - -2007-03-26 Removed colorbar_classic from figure.py; fixed bug in - Figure.clf() in which _axobservers was not getting - cleared. Modernization and cleanups. - EF - -2007-03-26 Refactored some of the units support -- units now live in - the respective x and y Axis instances. See also - API_CHANGES for some alterations to the conversion - interface. JDH - -2007-03-25 Fix masked array handling in quiver.py for numpy. (Numeric - and numarray support for masked arrays is broken in other - ways when using quiver. I didn't pursue that.) - ADS - -2007-03-23 Made font_manager.py close opened files. - JKS - -2007-03-22 Made imshow default extent match matshow - EF - -2007-03-22 Some more niceties for xcorr -- a maxlags option, normed - now works for xcorr as well as axorr, usevlines is - supported, and a zero correlation hline is added. See - examples/xcorr_demo.py. Thanks Sameer for the patch. - - JDH - -2007-03-21 Axes.vlines and Axes.hlines now create and returns a - LineCollection, not a list of lines. This is much faster. - The kwarg signature has changed, so consult the docs. - Modified Axes.errorbar which uses vlines and hlines. See - API_CHANGES; the return signature for these three functions - is now different - -2007-03-20 Refactored units support and added new examples - JDH - -2007-03-19 Added Mike's units patch - JDH - -2007-03-18 Matshow as an Axes method; test version matshow1() in - pylab; added 'integer' Boolean kwarg to MaxNLocator - initializer to force ticks at integer locations. - EF - -2007-03-17 Preliminary support for clipping to paths agg - JDH - -2007-03-17 Text.set_text() accepts anything convertible with '%s' - EF - -2007-03-14 Add masked-array support to hist. - EF - -2007-03-03 Change barh to take a kwargs dict and pass it to bar. - Fixes sf bug #1669506. - -2007-03-02 Add rc parameter pdf.inheritcolor, which disables all - color-setting operations in the pdf backend. The idea is - that you include the resulting file in another program and - set the colors (both stroke and fill color) there, so you - can use the same pdf file for e.g., a paper and a - presentation and have them in the surrounding color. You - will probably not want to draw figure and axis frames in - that case, since they would be filled in the same color. - JKS - -2007-02-26 Prevent building _wxagg.so with broken Mac OS X wxPython. - ADS - -2007-02-23 Require setuptools for Python 2.3 - ADS - -2007-02-22 WXAgg accelerator updates - KM - WXAgg's C++ accelerator has been fixed to use the correct wxBitmap - constructor. - - The backend has been updated to use new wxPython functionality to - provide fast blit() animation without the C++ accelerator. This - requires wxPython 2.8 or later. Previous versions of wxPython can - use the C++ acclerator or the old pure Python routines. - - setup.py no longer builds the C++ accelerator when wxPython >= 2.8 - is present. - - The blit() method is now faster regardless of which agg/wxPython - conversion routines are used. - -2007-02-21 Applied the PDF backend patch by Nicolas Grilly. - This impacts several files and directories in matplotlib: - - - Created the directory lib/matplotlib/mpl-data/fonts/pdfcorefonts, - holding AFM files for the 14 PDF core fonts. These fonts are - embedded in every PDF viewing application. - - - setup.py: Added the directory pdfcorefonts to package_data. - - - lib/matplotlib/__init__.py: Added the default parameter - 'pdf.use14corefonts'. When True, the PDF backend uses - only the 14 PDF core fonts. - - - lib/matplotlib/afm.py: Added some keywords found in - recent AFM files. Added a little workaround to handle - Euro symbol. - - - lib/matplotlib/fontmanager.py: Added support for the 14 - PDF core fonts. These fonts have a dedicated cache (file - pdfcorefont.cache), not the same as for other AFM files - (file .afmfont.cache). Also cleaned comments to conform - to CODING_GUIDE. - - - lib/matplotlib/backends/backend_pdf.py: - Added support for 14 PDF core fonts. - Fixed some issues with incorrect character widths and - encodings (works only for the most common encoding, - WinAnsiEncoding, defined by the official PDF Reference). - Removed parameter 'dpi' because it causes alignment issues. - - -JKS (patch by Nicolas Grilly) - -2007-02-17 Changed ft2font.get_charmap, and updated all the files where - get_charmap is mentioned - ES - -2007-02-13 Added barcode demo- JDH - -2007-02-13 Added binary colormap to cm - JDH - -2007-02-13 Added twiny to pylab - JDH - -2007-02-12 Moved data files into lib/matplotlib so that setuptools' - develop mode works. Re-organized the mpl-data layout so - that this source structure is maintained in the - installation. (I.e. the 'fonts' and 'images' - sub-directories are maintained in site-packages.) Suggest - removing site-packages/matplotlib/mpl-data and - ~/.matplotlib/ttffont.cache before installing - ADS - -2007-02-07 Committed Rob Hetland's patch for qt4: remove - references to text()/latin1(), plus some improvements - to the toolbar layout - DSD - -=============================================================== -2007-02-06 Released 0.90.0 at revision 3003 - -2007-01-22 Extended the new picker API to text, patches and patch - collections. Added support for user customizable pick hit - testing and attribute tagging of the PickEvent - Details - and examples in examples/pick_event_demo.py - JDH - -2007-01-16 Begun work on a new pick API using the mpl event handling - frameowrk. Artists will define their own pick method with - a configurable epsilon tolerance and return pick attrs. - All artists that meet the tolerance threshold will fire a - PickEvent with artist dependent attrs; e.g., a Line2D can set - the indices attribute that shows the indices into the line - that are within epsilon of the pick point. See - examples/pick_event_demo.py. The implementation of pick - for the remaining Artists remains to be done, but the core - infrastructure at the level of event handling is in place - with a proof-of-concept implementation for Line2D - JDH - -2007-01-16 src/_image.cpp: update to use Py_ssize_t (for 64-bit systems). - Use return value of fread() to prevent warning messages - SC. - -2007-01-15 src/_image.cpp: combine buffer_argb32() and buffer_bgra32() into - a new method color_conv(format) - SC - -2007-01-14 backend_cairo.py: update draw_arc() so that - examples/arctest.py looks correct - SC - -2007-01-12 backend_cairo.py: enable clipping. Update draw_image() so that - examples/contour_demo.py looks correct - SC - -2007-01-12 backend_cairo.py: fix draw_image() so that examples/image_demo.py - now looks correct - SC - -2007-01-11 Added Axes.xcorr and Axes.acorr to plot the cross - correlation of x vs y or the autocorrelation of x. pylab - wrappers also provided. See examples/xcorr_demo.py - JDH - -2007-01-10 Added "Subplot.label_outer" method. It will set the - visibility of the ticklabels so that yticklabels are only - visible in the first column and xticklabels are only - visible in the last row - JDH - -2007-01-02 Added additional kwarg documentation - JDH - -2006-12-28 Improved error message for nonpositive input to log - transform; added log kwarg to bar, barh, and hist, - and modified bar method to behave sensibly by default - when the ordinate has a log scale. (This only works - if the log scale is set before or by the call to bar, - hence the utility of the log kwarg.) - EF - -2006-12-27 backend_cairo.py: update draw_image() and _draw_mathtext() to work - with numpy - SC - -2006-12-20 Fixed xpdf dependency check, which was failing on windows. - Removed ps2eps dependency check. - DSD - -2006-12-19 Added Tim Leslie's spectral patch - JDH - -2006-12-17 Added rc param 'axes.formatter.limits' to control - the default threshold for switching to scientific - notation. Added convenience method - Axes.ticklabel_format() for turning scientific notation - on or off on either or both axes. - EF - -2006-12-16 Added ability to turn control scientific notation - in ScalarFormatter - EF - -2006-12-16 Enhanced boxplot to handle more flexible inputs - EF - -2006-12-13 Replaced calls to where() in colors.py with much faster - clip() and putmask() calls; removed inappropriate - uses of getmaskorNone (which should be needed only - very rarely); all in response to profiling by - David Cournapeau. Also fixed bugs in my 2-D - array support from 12-09. - EF - -2006-12-09 Replaced spy and spy2 with the new spy that combines - marker and image capabilities - EF - -2006-12-09 Added support for plotting 2-D arrays with plot: - columns are plotted as in Matlab - EF - -2006-12-09 Added linewidth kwarg to bar and barh; fixed arg - checking bugs - EF - -2006-12-07 Made pcolormesh argument handling match pcolor; - fixed kwarg handling problem noted by Pierre GM - EF - -2006-12-06 Made pcolor support vector X and/or Y instead of - requiring 2-D arrays - EF - -2006-12-05 Made the default Artist._transform None (rather than - invoking identity_transform for each artist only to have it - overridden later). Use artist.get_transform() rather than - artist._transform, even in derived classes, so that the - default transform will be created lazily as needed - JDH - -2006-12-03 Added LogNorm to colors.py as illustrated by - examples/pcolor_log.py, based on suggestion by - Jim McDonald. Colorbar modified to handle LogNorm. - Norms have additional "inverse" method. - EF - -2006-12-02 Changed class names in colors.py to match convention: - normalize -> Normalize, no_norm -> NoNorm. Old names - are still available. - Changed __init__.py rc defaults to match those in - matplotlibrc - EF - -2006-11-22 Fixed bug in set_*lim that I had introduced on 11-15 - EF - -2006-11-22 Added examples/clippedline.py, which shows how to clip line - data based on view limits -- it also changes the marker - style when zoomed in - JDH - -2006-11-21 Some spy bug-fixes and added precision arg per Robert C's - suggestion - JDH - -2006-11-19 Added semi-automatic docstring generation detailing all the - kwargs that functions take using the artist introspection - tools; e.g., 'help text now details the scatter kwargs - that control the Text properties - JDH - -2006-11-17 Removed obsolete scatter_classic, leaving a stub to - raise NotImplementedError; same for pcolor_classic - EF - -2006-11-15 Removed obsolete pcolor_classic - EF - -2006-11-15 Fixed 1588908 reported by Russel Owen; factored - nonsingular method out of ticker.py, put it into - transforms.py as a function, and used it in - set_xlim and set_ylim. - EF - -2006-11-14 Applied patch 1591716 by Ulf Larssen to fix a bug in - apply_aspect. Modified and applied patch - 1594894 by mdehoon to fix bugs and improve - formatting in lines.py. Applied patch 1573008 - by Greg Willden to make psd etc. plot full frequency - range for complex inputs. - EF - -2006-11-14 Improved the ability of the colorbar to track - changes in corresponding image, pcolor, or - contourf. - EF - -2006-11-11 Fixed bug that broke Numeric compatibility; - added support for alpha to colorbar. The - alpha information is taken from the mappable - object, not specified as a kwarg. - EF - -2006-11-05 Added broken_barh function for makring a sequence of - horizontal bars broken by gaps -- see examples/broken_barh.py - -2006-11-05 Removed lineprops and markerprops from the Annotation code - and replaced them with an arrow configurable with kwarg - arrowprops. See examples/annotation_demo.py - JDH - -2006-11-02 Fixed a pylab subplot bug that was causing axes to be - deleted with hspace or wspace equals zero in - subplots_adjust - JDH - -2006-10-31 Applied axes3d patch 1587359 - http://sourceforge.net/tracker/index.php?func=detail&aid=1587359&group_id=80706&atid=560722 - JDH - -=============================================================== -2006-10-26 Released 0.87.7 at revision 2835 - -2006-10-25 Made "tiny" kwarg in Locator.nonsingular much smaller - EF - -2006-10-17 Closed sf bug 1562496 update line props dash/solid/cap/join - styles - JDH - -2006-10-17 Complete overhaul of the annotations API and example code - - See matplotlib.text.Annotation and - examples/annotation_demo.py JDH - -2006-10-12 Committed Manuel Metz's StarPolygon code and - examples/scatter_star_poly.py - JDH - - -2006-10-11 commented out all default values in matplotlibrc.template - Default values should generally be taken from defaultParam in - __init__.py - the file matplotlib should only contain those values - that the user wants to explicitly change from the default. - (see thread "marker color handling" on matplotlib-devel) - -2006-10-10 Changed default comment character for load to '#' - JDH - -2006-10-10 deactivated rcfile-configurability of markerfacecolor - and markeredgecolor. Both are now hardcoded to the special value - 'auto' to follow the line color. Configurability at run-time - (using function arguments) remains functional. - NN - -2006-10-07 introduced dummy argument magnification=1.0 to - FigImage.make_image to satisfy unit test figimage_demo.py - The argument is not yet handled correctly, which should only - show up when using non-standard DPI settings in PS backend, - introduced by patch #1562394. - NN - -2006-10-06 add backend-agnostic example: simple3d.py - NN - -2006-09-29 fix line-breaking for SVG-inline images (purely cosmetic) - NN - -2006-09-29 reworked set_linestyle and set_marker - markeredgecolor and markerfacecolor now default to - a special value "auto" that keeps the color in sync with - the line color - further, the intelligence of axes.plot is cleaned up, - improved and simplified. Complete compatibility cannot be - guaranteed, but the new behavior should be much more predictable - (see patch #1104615 for details) - NN - -2006-09-29 changed implementation of clip-path in SVG to work around a - limitation in inkscape - NN - -2006-09-29 added two options to matplotlibrc: - svg.image_inline - svg.image_noscale - see patch #1533010 for details - NN - -2006-09-29 axes.py: cleaned up kwargs checking - NN - -2006-09-29 setup.py: cleaned up setup logic - NN - -2006-09-29 setup.py: check for required pygtk versions, fixes bug #1460783 - SC - -=============================================================== -2006-09-27 Released 0.87.6 at revision 2783 - -2006-09-24 Added line pointers to the Annotation code, and a pylab - interface. See matplotlib.text.Annotation, - examples/annotation_demo.py and - examples/annotation_demo_pylab.py - JDH - -2006-09-18 mathtext2.py: The SVG backend now supports the same things that - the AGG backend does. Fixed some bugs with rendering, and out of - bounds errors in the AGG backend - ES. Changed the return values - of math_parse_s_ft2font_svg to support lines (fractions etc.) - -2006-09-17 Added an Annotation class to facilitate annotating objects - and an examples file examples/annotation_demo.py. I want - to add dash support as in TextWithDash, but haven't decided - yet whether inheriting from TextWithDash is the right base - class or if another approach is needed - JDH - -=============================================================== -2006-09-05 Released 0.87.5 at revision 2761 - -2006-09-04 Added nxutils for some numeric add-on extension code -- - specifically a better/more efficient inside polygon tester (see - unit/inside_poly_*.py) - JDH - -2006-09-04 Made bitstream fonts the rc default - JDH - -2006-08-31 Fixed alpha-handling bug in ColorConverter, affecting - collections in general and contour/contourf in - particular. - EF - -2006-08-30 ft2font.cpp: Added draw_rect_filled method (now used by mathtext2 - to draw the fraction bar) to FT2Font - ES - -2006-08-29 setupext.py: wrap calls to tk.getvar() with str(). On some - systems, getvar returns a Tcl_Obj instead of a string - DSD - -2006-08-28 mathtext2.py: Sub/superscripts can now be complex (i.e. - fractions etc.). The demo is also updated - ES - -2006-08-28 font_manager.py: Added /usr/local/share/fonts to list of - X11 font directories - DSD - -2006-08-28 mahtext2.py: Initial support for complex fractions. Also, - rendering is now completely separated from parsing. The - sub/superscripts now work better. - Updated the mathtext2_demo.py - ES - -2006-08-27 qt backends: don't create a QApplication when backend is - imported, do it when the FigureCanvasQt is created. Simplifies - applications where mpl is embedded in qt. Updated - embedding_in_qt* examples - DSD - -2006-08-27 mahtext2.py: Now the fonts are searched in the OS font dir and - in the mpl-data dir. Also env is not a dict anymore. - ES - -2006-08-26 minor changes to __init__.py, mathtex2_demo.py. Added matplotlibrc - key "mathtext.mathtext2" (removed the key "mathtext2") - ES - -2006-08-21 mathtext2.py: Initial support for fractions - Updated the mathtext2_demo.py - _mathtext_data.py: removed "\" from the unicode dicts - mathtext.py: Minor modification (because of _mathtext_data.py)- ES - -2006-08-20 Added mathtext2.py: Replacement for mathtext.py. Supports _ ^, - \rm, \cal etc., \sin, \cos etc., unicode, recursive nestings, - inline math mode. The only backend currently supported is Agg - __init__.py: added new rc params for mathtext2 - added mathtext2_demo.py example - ES - -2006-08-19 Added embedding_in_qt4.py example - DSD - -2006-08-11 Added scale free Ellipse patch for Agg - CM - -2006-08-10 Added converters to and from julian dates to matplotlib.dates - (num2julian and julian2num) - JDH - -2006-08-08 Fixed widget locking so multiple widgets could share the - event handling - JDH - -2006-08-07 Added scale free Ellipse patch to SVG and PS - CM - -2006-08-05 Re-organized imports in numerix for numpy 1.0b2 -- TEO - -2006-08-04 Added draw_markers to PDF backend. - JKS - -2006-08-01 Fixed a bug in postscript's rendering of dashed lines - DSD - -2006-08-01 figure.py: savefig() update docstring to add support for 'format' - argument. - backend_cairo.py: print_figure() add support 'format' argument. - SC - -2006-07-31 Don't let postscript's xpdf distiller compress images - DSD - -2006-07-31 Added shallowcopy() methods to all Transformations; - removed copy_bbox_transform and copy_bbox_transform_shallow - from transforms.py; - added offset_copy() function to transforms.py to - facilitate positioning artists with offsets. - See examples/transoffset.py. - EF - -2006-07-31 Don't let postscript's xpdf distiller compress images - DSD - -2006-07-29 Fixed numerix polygon bug reported by Nick Fotopoulos. - Added inverse_numerix_xy() transform method. - Made autoscale_view() preserve axis direction - (e.g., increasing down).- EF - -2006-07-28 Added shallow bbox copy routine for transforms -- mainly - useful for copying transforms to apply offset to. - JDH - -2006-07-28 Added resize method to FigureManager class - for Qt and Gtk backend - CM - -2006-07-28 Added subplots_adjust button to Qt backend - CM - -2006-07-26 Use numerix more in collections. - Quiver now handles masked arrays. - EF - -2006-07-22 Fixed bug #1209354 - DSD - -2006-07-22 make scatter() work with the kwarg "color". Closes bug - 1285750 - DSD - -2006-07-20 backend_cairo.py: require pycairo 1.2.0. - print_figure() update to output SVG using cairo. - -2006-07-19 Added blitting for Qt4Agg - CM - -2006-07-19 Added lasso widget and example examples/lasso_demo.py - JDH - -2006-07-18 Added blitting for QtAgg backend - CM - -2006-07-17 Fixed bug #1523585: skip nans in semilog plots - DSD - -2006-07-12 Add support to render the scientific notation label - over the right-side y-axis - DSD - -=============================================================== -2006-07-11 Released 0.87.4 at revision 2558 - -2006-07-07 Fixed a usetex bug with older versions of latex - DSD - -2006-07-07 Add compatibility for NumPy 1.0 - TEO - -2006-06-29 Added a Qt4Agg backend. Thank you James Amundson - DSD - -2006-06-26 Fixed a usetex bug. On windows, usetex will prcess - postscript output in the current directory rather than - in a temp directory. This is due to the use of spaces - and tildes in windows paths, which cause problems with - latex. The subprocess module is no longer used. - DSD - -2006-06-22 Various changes to bar(), barh(), and hist(). - Added 'edgecolor' keyword arg to bar() and barh(). - The x and y args in barh() have been renamed to width - and bottom respectively, and their order has been swapped - to maintain a (position, value) order ala matlab. left, - height, width and bottom args can now all be scalars or - sequences. barh() now defaults to edge alignment instead - of center alignment. Added a keyword arg 'align' to bar(), - barh() and hist() that controls between edge or center bar - alignment. Fixed ignoring the rcParams['patch.facecolor'] - for bar color in bar() and barh(). Fixed ignoring the - rcParams['lines.color'] for error bar color in bar() - and barh(). Fixed a bug where patches would be cleared - when error bars were plotted if rcParams['axes.hold'] - was False. - MAS - -2006-06-22 Added support for numerix 2-D arrays as alternatives to - a sequence of (x,y) tuples for specifying paths in - collections, quiver, contour, pcolor, transforms. - Fixed contour bug involving setting limits for - color mapping. Added numpy-style all() to numerix. - EF - -2006-06-20 Added custom FigureClass hook to pylab interface - see - examples/custom_figure_class.py - -2006-06-16 Added colormaps from gist (gist_earth, gist_stern, - gist_rainbow, gist_gray, gist_yarg, gist_heat, gist_ncar) - JW - -2006-06-16 Added a pointer to parent in figure canvas so you can - access the container with fig.canvas.manager. Useful if - you want to set the window title, e.g., in gtk - fig.canvas.manager.window.set_title, though a GUI neutral - method would be preferable JDH - -2006-06-16 Fixed colorbar.py to handle indexed colors (i.e., - norm = no_norm()) by centering each colored region - on its index. - EF - -2006-06-15 Added scalex and scaley to Axes.autoscale_view to support - selective autoscaling just the x or y axis, and supported - these command in plot so you can say plot(something, - scaley=False) and just the x axis will be autoscaled. - Modified axvline and axhline to support this, so for - example axvline will no longer autoscale the y axis. JDH - -2006-06-13 Fix so numpy updates are backward compatible - TEO - -2006-06-12 Updated numerix to handle numpy restructuring of - oldnumeric - TEO - -2006-06-12 Updated numerix.fft to handle numpy restructuring - Added ImportError to numerix.linear_algebra for numpy -TEO - -2006-06-11 Added quiverkey command to pylab and Axes, using - QuiverKey class in quiver.py. Changed pylab and Axes - to use quiver2 if possible, but drop back to the - newly-renamed quiver_classic if necessary. Modified - examples/quiver_demo.py to illustrate the new quiver - and quiverkey. Changed LineCollection implementation - slightly to improve compatibility with PolyCollection. - EF - -2006-06-11 Fixed a usetex bug for windows, running latex on files - with spaces in their names or paths was failing - DSD - -2006-06-09 Made additions to numerix, changes to quiver to make it - work with all numeric flavors. - EF - -2006-06-09 Added quiver2 function to pylab and method to axes, - with implementation via a Quiver class in quiver.py. - quiver2 will replace quiver before the next release; - it is placed alongside it initially to facilitate - testing and transition. See also - examples/quiver2_demo.py. - EF - -2006-06-08 Minor bug fix to make ticker.py draw proper minus signs - with usetex - DSD - -=============================================================== -2006-06-06 Released 0.87.3 at revision 2432 - -2006-05-30 More partial support for polygons with outline or fill, - but not both. Made LineCollection inherit from - ScalarMappable. - EF - -2006-05-29 Yet another revision of aspect-ratio handling. - EF - -2006-05-27 Committed a patch to prevent stroking zero-width lines in - the svg backend - DSD - -2006-05-24 Fixed colorbar positioning bug identified by Helge - Avlesen, and improved the algorithm; added a 'pad' - kwarg to control the spacing between colorbar and - parent axes. - EF - -2006-05-23 Changed color handling so that collection initializers - can take any mpl color arg or sequence of args; deprecated - float as grayscale, replaced by string representation of - float. - EF - -2006-05-19 Fixed bug: plot failed if all points were masked - EF - -2006-05-19 Added custom symbol option to scatter - JDH - -2006-05-18 New example, multi_image.py; colorbar fixed to show - offset text when the ScalarFormatter is used; FixedFormatter - augmented to accept and display offset text. - EF - -2006-05-14 New colorbar; old one is renamed to colorbar_classic. - New colorbar code is in colorbar.py, with wrappers in - figure.py and pylab.py. - Fixed aspect-handling bug reported by Michael Mossey. - Made backend_bases.draw_quad_mesh() run.- EF - -2006-05-08 Changed handling of end ranges in contourf: replaced - "clip-ends" kwarg with "extend". See docstring for - details. -EF - -2006-05-08 Added axisbelow to rc - JDH - -2006-05-08 If using PyGTK require version 2.2+ - SC - -2006-04-19 Added compression support to PDF backend, controlled by - new pdf.compression rc setting. - JKS - -2006-04-19 Added Jouni's PDF backend - -2006-04-18 Fixed a bug that caused agg to not render long lines - -2006-04-16 Masked array support for pcolormesh; made pcolormesh support the - same combinations of X,Y,C dimensions as pcolor does; - improved (I hope) description of grid used in pcolor, - pcolormesh. - EF - -2006-04-14 Reorganized axes.py - EF - -2006-04-13 Fixed a bug Ryan found using usetex with sans-serif fonts and - exponential tick labels - DSD - -2006-04-11 Refactored backend_ps and backend_agg to prevent module-level - texmanager imports. Now these imports only occur if text.usetex - rc setting is true - DSD - -2006-04-10 Committed changes required for building mpl on win32 - platforms with visual studio. This allows wxpython - blitting for fast animations. - CM - -2006-04-10 Fixed an off-by-one bug in Axes.change_geometry. - -2006-04-10 Fixed bug in pie charts where wedge wouldn't have label in - legend. Submitted by Simon Hildebrandt. - ADS - -2006-05-06 Usetex makes temporary latex and dvi files in a temporary - directory, rather than in the user's current working - directory - DSD - -2006-04-05 Apllied Ken's wx deprecation warning patch closing sf patch - #1465371 - JDH - -2006-04-05 Added support for the new API in the postscript backend. - Allows values to be masked using nan's, and faster file - creation - DSD - -2006-04-05 Use python's subprocess module for usetex calls to - external programs. subprocess catches when they exit - abnormally so an error can be raised. - DSD - -2006-04-03 Fixed the bug in which widgets would not respond to - events. This regressed the twinx functionality, so I - also updated subplots_adjust to update axes that share - an x or y with a subplot instance. - CM - -2006-04-02 Moved PBox class to transforms and deleted pbox.py; - made pylab axis command a thin wrapper for Axes.axis; - more tweaks to aspect-ratio handling; fixed Axes.specgram - to account for the new imshow default of unit aspect - ratio; made contour set the Axes.dataLim. - EF - -2006-03-31 Fixed the Qt "Underlying C/C++ object deleted" bug. - JRE - -2006-03-31 Applied Vasily Sulatskov's Qt Navigation Toolbar enhancement. - JRE - -2006-03-31 Ported Norbert's rewriting of Halldor's stineman_interp - algorithm to make it numerix compatible and added code to - matplotlib.mlab. See examples/interp_demo.py - JDH - -2006-03-30 Fixed a bug in aspect ratio handling; blocked potential - crashes when panning with button 3; added axis('image') - support. - EF - -2006-03-28 More changes to aspect ratio handling; new PBox class - in new file pbox.py to facilitate resizing and repositioning - axes; made PolarAxes maintain unit aspect ratio. - EF - -2006-03-23 Refactored TextWithDash class to inherit from, rather than - delegate to, the Text class. Improves object inspection - and closes bug # 1357969 - DSD - -2006-03-22 Improved aspect ratio handling, including pylab interface. - Interactive resizing, pan, zoom of images and plots - (including panels with a shared axis) should work. - Additions and possible refactoring are still likely. - EF - -2006-03-21 Added another colorbrewer colormap (RdYlBu) - JSWHIT - -2006-03-21 Fixed tickmarks for logscale plots over very large ranges. - Closes bug # 1232920 - DSD - -2006-03-21 Added Rob Knight's arrow code; see examples/arrow_demo.py - JDH - -2006-03-20 Added support for masking values with nan's, using ADS's - isnan module and the new API. Works for *Agg backends - DSD - -2006-03-20 Added contour.negative_linestyle rcParam - ADS - -2006-03-20 Added _isnan extension module to test for nan with Numeric - - ADS - -2006-03-17 Added Paul and Alex's support for faceting with quadmesh - in sf patch 1411223 - JDH - -2006-03-17 Added Charle Twardy's pie patch to support colors=None. - Closes sf patch 1387861 - JDH - -2006-03-17 Applied sophana's patch to support overlapping axes with - toolbar navigation by toggling activation with the 'a' key. - Closes sf patch 1432252 - JDH - -2006-03-17 Applied Aarre's linestyle patch for backend EMF; closes sf - patch 1449279 - JDH - -2006-03-17 Applied Jordan Dawe's patch to support kwarg properties - for grid lines in the grid command. Closes sf patch - 1451661 - JDH - -2006-03-17 Center postscript output on page when using usetex - DSD - -2006-03-17 subprocess module built if Python <2.4 even if subprocess - can be imported from an egg - ADS - -2006-03-17 Added _subprocess.c from Python upstream and hopefully - enabled building (without breaking) on Windows, although - not tested. - ADS - -2006-03-17 Updated subprocess.py to latest Python upstream and - reverted name back to subprocess.py - ADS - -2006-03-16 Added John Porter's 3D handling code - - -=============================================================== -2006-03-16 Released 0.87.2 at revision 2150 - -2006-03-15 Fixed bug in MaxNLocator revealed by daigos@infinito.it. - The main change is that Locator.nonsingular now adjusts - vmin and vmax if they are nearly the same, not just if - they are equal. A new kwarg, "tiny", sets the threshold. - - EF - -2006-03-14 Added import of compatibility library for newer numpy - linear_algebra - TEO - -2006-03-12 Extended "load" function to support individual columns and - moved "load" and "save" into matplotlib.mlab so they can be - used outside of pylab -- see examples/load_converter.py - - JDH - -2006-03-12 Added AutoDateFormatter and AutoDateLocator submitted - by James Evans. Try the load_converter.py example for a - demo. - ADS - -2006-03-11 Added subprocess module from python-2.4 - DSD - -2006-03-11 Fixed landscape orientation support with the usetex - option. The backend_ps print_figure method was - getting complicated, I added a _print_figure_tex - method to maintain some degree of sanity - DSD - -2006-03-11 Added "papertype" savefig kwarg for setting - postscript papersizes. papertype and ps.papersize - rc setting can also be set to "auto" to autoscale - pagesizes - DSD - -2006-03-09 Apply P-J's patch to make pstoeps work on windows - patch report # 1445612 - DSD - -2006-03-09 Make backend rc parameter case-insensitive - DSD - -2006-03-07 Fixed bug in backend_ps related to C0-C6 papersizes, - which were causing problems with postscript viewers. - Supported page sizes include letter, legal, ledger, - A0-A10, and B0-B10 - DSD - -=============================================================== -2006-03-07 Released 0.87.1 - -2006-03-04 backend_cairo.py: - fix get_rgb() bug reported by Keith Briggs. - Require pycairo 1.0.2. - Support saving png to file-like objects. - SC - -2006-03-03 Fixed pcolor handling of vmin, vmax - EF - -2006-03-02 improve page sizing with usetex with the latex - geometry package. Closes bug # 1441629 - DSD - -2006-03-02 Fixed dpi problem with usetex png output. Accepted a - modified version of patch # 1441809 - DSD - -2006-03-01 Fixed axis('scaled') to deal with case xmax < xmin - JSWHIT - -2006-03-01 Added reversed colormaps (with '_r' appended to name) - JSWHIT - -2006-02-27 Improved eps bounding boxes with usetex - DSD - -2006-02-27 Test svn commit, again! - -2006-02-27 Fixed two dependency checking bugs related to usetex - on Windows - DSD - -2006-02-27 Made the rc deprecation warnings a little more human - readable. - -2006-02-26 Update the previous gtk.main_quit() bug fix to use gtk.main_level() - - SC - -2006-02-24 Implemented alpha support in contour and contourf - EF - -2006-02-22 Fixed gtk main quit bug when quit was called before - mainloop. - JDH - -2006-02-22 Small change to colors.py to workaround apparent - bug in numpy masked array module - JSWHIT - -2006-02-22 Fixed bug in ScalarMappable.to_rgba() reported by - Ray Jones, and fixed incorrect fix found by Jeff - Whitaker - EF - -=============================================================== -2006-02-22 Released 0.87 - -2006-02-21 Fixed portrait/landscape orientation in postscript backend - DSD - -2006-02-21 Fix bug introduced in yesterday's bug fix - SC - -2006-02-20 backend_gtk.py FigureCanvasGTK.draw(): fix bug reported by - David Tremouilles - SC - -2006-02-20 Remove the "pygtk.require('2.4')" error from - examples/embedding_in_gtk2.py - SC - -2006-02-18 backend_gtk.py FigureCanvasGTK.draw(): simplify to use (rather than - duplicate) the expose_event() drawing code - SC - -2006-02-12 Added stagger or waterfall plot capability to LineCollection; - illustrated in examples/collections.py. - EF - -2006-02-11 Massive cleanup of the usetex code in the postscript backend. Possibly - fixed the clipping issue users were reporting with older versions of - ghostscript - DSD - -2006-02-11 Added autolim kwarg to axes.add_collection. Changed - collection get_verts() methods accordingly. - EF - -2006-02-09 added a temporary rc parameter text.dvipnghack, to allow Mac users to get nice - results with the usetex option. - DSD - -2006-02-09 Fixed a bug related to setting font sizes with the usetex option. - DSD - -2006-02-09 Fixed a bug related to usetex's latex code. - DSD - -2006-02-09 Modified behavior of font.size rc setting. You should define font.size in pts, - which will set the "medium" or default fontsize. Special text sizes like axis - labels or tick labels can be given relative font sizes like small, large, - x-large, etc. and will scale accordingly. - DSD - -2006-02-08 Added py2exe specific datapath check again. Also added new - py2exe helper function get_py2exe_datafiles for use in py2exe - setup.py scripts. - CM - -2006-02-02 Added box function to pylab - -2006-02-02 Fixed a problem in setupext.py, tk library formatted in unicode - caused build problems - DSD - -2006-02-01 Dropped TeX engine support in usetex to focus on LaTeX. - DSD - -2006-01-29 Improved usetex option to respect the serif, sans-serif, monospace, - and cursive rc settings. Removed the font.latex.package rc setting, - it is no longer required - DSD - -2006-01-29 Fixed tex's caching to include font.family rc information - DSD - -2006-01-29 Fixed subpixel rendering bug in *Agg that was causing - uneven gridlines - JDH - -2006-01-28 Added fontcmd to backend_ps's RendererPS.draw_tex, to support other - font families in eps output - DSD - -2006-01-28 Added MaxNLocator to ticker.py, and changed contour.py to - use it by default. - EF - -2006-01-28 Added fontcmd to backend_ps's RendererPS.draw_tex, to support other - font families in eps output - DSD - -2006-01-27 Buffered reading of matplotlibrc parameters in order to allow - 'verbose' settings to be processed first (allows verbose.report - during rc validation process) - DSD - -2006-01-27 Removed setuptools support from setup.py and created a - separate setupegg.py file to replace it. - CM - -2006-01-26 Replaced the ugly datapath logic with a cleaner approach from - http://wiki.python.org/moin/DistutilsInstallDataScattered. - Overrides the install_data command. - CM - -2006-01-24 Don't use character typecodes in cntr.c --- changed to use - defined typenumbers instead. - TEO - -2006-01-24 Fixed some bugs in usetex's and ps.usedistiller's dependency - -2006-01-24 Added masked array support to scatter - EF - -2006-01-24 Fixed some bugs in usetex's and ps.usedistiller's dependency - checking - DSD - -=============================================================== -2006-01-24 Released 0.86.2 - -2006-01-20 Added a converters dict to pylab load to convert selected - coloumns to float -- especially useful for files with date - strings, uses a datestr2num converter - JDH - -2006-01-20 Added datestr2num to matplotlib dates to convert a string - or sequence of strings to a matplotlib datenum - -2006-01-18 Added quadrilateral pcolormesh patch 1409190 by Alex Mont - and Paul Kienzle -- this is *Agg only for now. See - examples/quadmesh_demo.py - JDH - -2006-01-18 Added Jouni's boxplot patch - JDH - -2006-01-18 Added comma delimiter for pylab save - JDH - -2006-01-12 Added Ryan's legend patch - JDH - - -2006-1-12 Fixed numpy / numeric to use .dtype.char to keep in SYNC with numpy SVN - -=============================================================== -2006-1-11 Released 0.86.1 - -2006-1-11 Fixed setup.py for win32 build and added rc template to the MANIFEST.in - -2006-1-10 Added xpdf distiller option. matplotlibrc ps.usedistiller can now be - none, false, ghostscript, or xpdf. Validation checks for - dependencies. This needs testing, but the xpdf option should produce - the highest-quality output and small file sizes - DSD - -2006-01-10 For the usetex option, backend_ps now does all the LaTeX work in the - os's temp directory - DSD - -2006-1-10 Added checks for usetex dependencies. - DSD - -======================================================================= -2006-1-9 Released 0.86 - -2006-1-4 Changed to support numpy (new name for scipy_core) - TEO - -2006-1-4 Added Mark's scaled axes patch for shared axis - -2005-12-28 Added Chris Barker's build_wxagg patch - JDH - -2005-12-27 Altered numerix/scipy to support new scipy package - structure - TEO -2005-12-20 Fixed Jame's Boyles date tick reversal problem - JDH - -2005-12-20 Added Jouni's rc patch to support lists of keys to set on - - JDH - -2005-12-12 Updated pyparsing and mathtext for some speed enhancements - (Thanks Paul McGuire) and minor fixes to scipy numerix and - setuptools - -2005-12-12 Matplotlib data is now installed as package_data in - the matplotlib module. This gets rid of checking the - many possibilities in matplotlib._get_data_path() - CM - -2005-12-11 Support for setuptools/pkg_resources to build and use - matplotlib as an egg. Still allows matplotlib to exist - using a traditional distutils install. - ADS - -2005-12-03 Modified setup to build matplotlibrc based on compile time - findings. It will set numerix in the order of scipy, - numarray, Numeric depending on which are founds, and - backend as in preference order GTKAgg, WXAgg, TkAgg, GTK, - Agg, PS - -2005-12-03 Modified scipy patch to support Numeric, scipy and numarray - Some work remains to be done because some of the scipy - imports are broken if only the core is installed. e.g., - apparently we need from scipy.basic.fftpack import * rather - than from scipy.fftpack import * - -2005-12-03 Applied some fixes to Nicholas Young's nonuniform image - patch - -2005-12-01 Applied Alex Gontmakher hatch patch - PS only for now - -2005-11-30 Added Rob McMullen's EMF patch - -2005-11-30 Added Daishi's patch for scipy - -2005-11-30 Fixed out of bounds draw markers segfault in agg - -2005-11-28 Got TkAgg blitting working 100% (cross fingers) correctly. - CM - -2005-11-27 Multiple changes in cm.py, colors.py, figure.py, image.py, - contour.py, contour_demo.py; new _cm.py, examples/image_masked.py. - 1) Separated the color table data from cm.py out into - a new file, _cm.py, to make it easier to find the actual - code in cm.py and to add new colormaps. Also added - some line breaks to the color data dictionaries. Everything - from _cm.py is imported by cm.py, so the split should be - transparent. - 2) Enabled automatic generation of a colormap from - a list of colors in contour; see modified - examples/contour_demo.py. - 3) Support for imshow of a masked array, with the - ability to specify colors (or no color at all) for - masked regions, and for regions that are above or - below the normally mapped region. See - examples/image_masked.py. - 4) In support of the above, added two new classes, - ListedColormap, and no_norm, to colors.py, and modified - the Colormap class to include common functionality. Added - a clip kwarg to the normalize class. Reworked color - handling in contour.py, especially in the ContourLabeller - mixin. - - EF - -2005-11-25 Changed text.py to ensure color is hashable. EF - -======================================================================= -2005-11-16 Released 0.85 - -2005-11-16 Changed the default default linewidth in rc to 1.0 - -2005-11-16 Replaced agg_to_gtk_drawable with pure pygtk pixbuf code in - backend_gtkagg. When the equivalent is doe for blit, the - agg extension code will no longer be needed - -2005-11-16 Added a maxdict item to cbook to prevent caches from - growing w/o bounds - -2005-11-15 Fixed a colorup/colordown reversal bug in finance.py -- - Thanks Gilles - -2005-11-15 Applied Jouni K Steppanen's boxplot patch SF patch#1349997 - - JDH - - -2005-11-09 added axisbelow attr for Axes to determine whether ticks and such - are above or below the actors - -2005-11-08 Added Nicolas' irregularly spaced image patch - - -2005-11-08 Deprecated HorizontalSpanSelector and replaced with - SpanSelection that takes a third arg, direction. The - new SpanSelector supports horizontal and vertical span - selection, and the appropriate min/max is returned. - CM - -2005-11-08 Added lineprops dialog for gtk - -2005-11-03 Added FIFOBuffer class to mlab to support real time feeds - and examples/fifo_buffer.py - -2005-11-01 Contributed Nickolas Young's patch for afm mathtext to - support mathtext based upon the standard postscript Symbol - font when ps.usetex = True. - -2005-10-26 Added support for scatter legends - thanks John Gill - -2005-10-20 Fixed image clipping bug that made some tex labels - disappear. JDH - -2005-10-14 Removed sqrt from dvipng 1.6 alpha channel mask. - -2005-10-14 Added width kwarg to hist function - -2005-10-10 Replaced all instances of os.rename with shutil.move - -2005-10-05 Added Michael Brady's ydate patch - -2005-10-04 Added rkern's texmanager patch - -2005-09-25 contour.py modified to use a single ContourSet class - that handles filled contours, line contours, and labels; - added keyword arg (clip_ends) to contourf. - Colorbar modified to work with new ContourSet object; - if the ContourSet has lines rather than polygons, the - colorbar will follow suit. Fixed a bug introduced in - 0.84, in which contourf(...,colors=...) was broken - EF - -======================================================================= -2005-09-19 Released 0.84 - -2005-09-14 Added a new 'resize_event' which triggers a callback with a - backend_bases.ResizeEvent object - JDH - -2005-09-14 font_manager.py: removed chkfontpath from x11FontDirectory() - SC - -2005-09-14 Factored out auto date locator/formatter factory code into - matplotlib.date.date_ticker_factory; applies John Bryne's - quiver patch. - -2005-09-13 Added Mark's axes positions history patch #1286915 - -2005-09-09 Added support for auto canvas resizing with - fig.set_figsize_inches(9,5,forward=True) # inches - OR - fig.resize(400,300) # pixels - -2005-09-07 figure.py: update Figure.draw() to use the updated - renderer.draw_image() so that examples/figimage_demo.py works again. - examples/stock_demo.py: remove data_clipping (which no longer - exists) - SC - -2005-09-06 Added Eric's tick.direction patch: in or out in rc - -2005-09-06 Added Martin's rectangle selector widget - -2005-09-04 Fixed a logic err in text.py that was preventing rgxsuper - from matching - JDH - -2005-08-29 Committed Ken's wx blit patch #1275002 - -2005-08-26 colorbar modifications - now uses contourf instead of imshow - so that colors used by contourf are displayed correctly. - Added two new keyword args (cspacing and clabels) that are - only relevant for ContourMappable images - JSWHIT - -2005-08-24 Fixed a PS image bug reported by Darren - JDH - -2005-08-23 colors.py: change hex2color() to accept unicode strings as well as - normal strings. Use isinstance() instead of types.IntType etc - SC - -2005-08-16 removed data_clipping line and rc property - JDH - -2005-08-22 backend_svg.py: Remove redundant "x=0.0 y=0.0" from svg element. - Increase svg version from 1.0 to 1.1. Add viewBox attribute to svg - element to allow SVG documents to scale-to-fit into an arbitrary - viewport - SC - -2005-08-16 Added Eric's dot marker patch - JDH - -2005-08-08 Added blitting/animation for TkAgg - CM - -2005-08-05 Fixed duplicate tickline bug - JDH - -2005-08-05 Fixed a GTK animation bug that cropped up when doing - animations in gtk//gtkagg canvases that had widgets packed - above them - -2005-08-05 Added Clovis Goldemberg patch to the tk save dialog - -2005-08-04 Removed origin kwarg from backend.draw_image. origin is - handled entirely by the frontend now. - -2005-07-03 Fixed a bug related to TeX commands in backend_ps - -2005-08-03 Fixed SVG images to respect upper and lower origins. - -2005-08-03 Added flipud method to image and removed it from to_str. - -2005-07-29 Modified figure.figaspect to take an array or number; - modified backend_svg to write utf-8 - JDH - -2005-07-30 backend_svg.py: embed png image files in svg rather than linking - to a separate png file, fixes bug #1245306 (thanks to Norbert Nemec - for the patch) - SC - -======================================================================= - -2005-07-29 Released 0.83.2 - -2005-07-27 Applied SF patch 1242648: minor rounding error in - IndexDateFormatter in dates.py - -2005-07-27 Applied sf patch 1244732: Scale axis such that circle - looks like circle - JDH -2005-07-29 Improved message reporting in texmanager and backend_ps - DSD - -2005-07-28 backend_gtk.py: update FigureCanvasGTK.draw() (needed due to the - recent expose_event() change) so that examples/anim.py works in the - usual way - SC - -2005-07-26 Added new widgets Cursor and HorizontalSpanSelector to - matplotlib.widgets. See examples/widgets/cursor.py and - examples/widgets/span_selector.py - JDH - -2005-07-26 added draw event to mpl event hierarchy -- triggered on - figure.draw - -2005-07-26 backend_gtk.py: allow 'f' key to toggle window fullscreen mode - -2005-07-26 backend_svg.py: write "<.../>" elements all on one line and remove - surplus spaces - SC - -2005-07-25 backend_svg.py: simplify code by deleting GraphicsContextSVG and - RendererSVG.new_gc(), and moving the gc.get_capstyle() code into - RendererSVG._get_gc_props_svg() - SC - -2005-07-24 backend_gtk.py: call FigureCanvasBase.motion_notify_event() on - all motion-notify-events, not just ones where a modifier key or - button has been pressed (fixes bug report from Niklas Volbers) - SC - -2005-07-24 backend_gtk.py: modify print_figure() use own pixmap, fixing - problems where print_figure() overwrites the display pixmap. - return False from all button/key etc events - to allow the event - to propagate further - SC - -2005-07-23 backend_gtk.py: change expose_event from using set_back_pixmap(); - clear() to draw_drawable() - SC - -2005-07-23 backend_gtk.py: removed pygtk.require() - matplotlib/__init__.py: delete 'FROZEN' and 'McPLError' which are - no longer used - SC - -2005-07-22 backend_gdk.py: removed pygtk.require() - SC - -2005-07-21 backend_svg.py: Remove unused imports. Remove methods doc strings - which just duplicate the docs from backend_bases.py. Rename - draw_mathtext to _draw_mathtext. - SC - -2005-07-17 examples/embedding_in_gtk3.py: new example demonstrating placing - a FigureCanvas in a gtk.ScrolledWindow - SC - -2005-07-14 Fixed a Windows related bug (#1238412) in texmanager - DSD - -2005-07-11 Fixed color kwarg bug, setting color=1 or 0 caused an - exception - DSD - -2005-07-07 Added Eric's MA set_xdata Line2D fix - JDH - -2005-07-06 Made HOME/.matplotlib the new config dir where the - matplotlibrc file, the ttf.cache, and the tex.cache live. - The new default filenames in .matplotlib have no leading - dot and are not hidden. e.g., the new names are matplotlibrc - tex.cache ttffont.cache. This is how ipython does it so it - must be right. If old files are found, a warning is issued - and they are moved to the new location. Also fixed - texmanager to put all files, including temp files in - ~/.matplotlib/tex.cache, which allows you to usetex in - non-writable dirs. - -2005-07-05 Fixed bug #1231611 in subplots adjust layout. The problem - was that the text cacheing mechanism was not using the - transformation affine in the key. - JDH - -2005-07-05 Fixed default backend import problem when using API (SF bug - # 1209354 - see API_CHANGES for more info - JDH - -2005-07-04 backend_gtk.py: require PyGTK version 2.0.0 or higher - SC - -2005-06-30 setupext.py: added numarray_inc_dirs for building against - numarray when not installed in standard location - ADS - -2005-06-27 backend_svg.py: write figure width, height as int, not float. - Update to fix some of the pychecker warnings - SC - -2005-06-23 Updated examples/agg_test.py to demonstrate curved paths - and fills - JDH - -2005-06-21 Moved some texmanager and backend_agg tex caching to class - level rather than instance level - JDH - -2005-06-20 setupext.py: fix problem where _nc_backend_gdk is installed to the - wrong directory - SC - -2005-06-19 Added 10.4 support for CocoaAgg. - CM - -2005-06-18 Move Figure.get_width_height() to FigureCanvasBase and return - int instead of float. - SC - -2005-06-18 Applied Ted Drain's QtAgg patch: 1) Changed the toolbar to - be a horizontal bar of push buttons instead of a QToolbar - and updated the layout algorithms in the main window - accordingly. This eliminates the ability to drag and drop - the toolbar and detach it from the window. 2) Updated the - resize algorithm in the main window to show the correct - size for the plot widget as requested. This works almost - correctly right now. It looks to me like the final size of - the widget is off by the border of the main window but I - haven't figured out a way to get that information yet. We - could just add a small margin to the new size but that - seems a little hacky. 3) Changed the x/y location label to - be in the toolbar like the Tk backend instead of as a - status line at the bottom of the widget. 4) Changed the - toolbar pixmaps to use the ppm files instead of the png - files. I noticed that the Tk backend buttons looked much - nicer and it uses the ppm files so I switched them. - -2005-06-17 Modified the gtk backend to not queue mouse motion events. - This allows for live updates when dragging a slider. - CM - -2005-06-17 Added starter CocoaAgg backend. Only works on OS 10.3 for - now and requires PyObjC. (10.4 is high priority) - CM - -2005-06-17 Upgraded pyparsing and applied Paul McGuire's suggestions - for speeding things up. This more than doubles the speed - of mathtext in my simple tests. JDH - -2005-06-16 Applied David Cooke's subplot make_key patch - -======================================================== - -2005-06-15 0.82 released - -2005-06-15 Added subplot config tool to GTK* backends -- note you must - now import the NavigationToolbar2 from your backend of - choice rather than from backend_gtk because it needs to - know about the backend specific canvas -- see - examples/embedding_in_gtk2.py. Ditto for wx backend -- see - examples/embedding_in_wxagg.py - -2005-06-15 backend_cairo.py: updated to use pycairo 0.5.0 - SC - -2005-06-14 Wrote some GUI neutral widgets (Button, Slider, - RadioButtons, CheckButtons) in matplotlib.widgets. See - examples/widgets/*.py - JDH - -2005-06-14 Exposed subplot parameters as rc vars and as the fig - SubplotParams instance subplotpars. See - figure.SubplotParams, figure.Figure.subplots_adjust and the - pylab method subplots_adjust and - examples/subplots_adjust.py . Also added a GUI neutral - widget for adjusting subplots, see - examples/subplot_toolbar.py - JDH - -2005-06-13 Exposed cap and join style for lines with new rc params and - line properties - - lines.dash_joinstyle : miter # miter|round|bevel - lines.dash_capstyle : butt # butt|round|projecting - lines.solid_joinstyle : miter # miter|round|bevel - lines.solid_capstyle : projecting # butt|round|projecting - - -2005-06-13 Added kwargs to Axes init - -2005-06-13 Applied Baptiste's tick patch - JDH - -2005-06-13 Fixed rc alias 'l' bug reported by Fernando by removing - aliases for mainlevel rc options. - JDH - -2005-06-10 Fixed bug #1217637 in ticker.py - DSD - -2005-06-07 Fixed a bug in texmanager.py: .aux files not being removed - DSD - -2005-06-08 Added Sean Richard's hist binning fix -- see API_CHANGES - JDH - -2005-06-07 Fixed a bug in texmanager.py: .aux files not being removed - - DSD - - -===================================================================== - -2005-06-07 matplotlib-0.81 released - -2005-06-06 Added autoscale_on prop to axes - -2005-06-06 Added Nick's picker "among" patch - JDH - -2005-06-05 Fixed a TeX/LaTeX font discrepency in backend_ps. - DSD - -2005-06-05 Added a ps.distill option in rc settings. If True, postscript - output will be distilled using ghostscript, which should trim - the file size and allow it to load more quickly. Hopefully this - will address the issue of large ps files due to font - definitions. Tested with gnu-ghostscript-8.16. - DSD - -2005-06-03 Improved support for tex handling of text in backend_ps. - DSD - -2005-06-03 Added rc options to render text with tex or latex, and to select - the latex font package. - DSD - -2005-06-03 Fixed a bug in ticker.py causing a ZeroDivisionError - -2005-06-02 backend_gtk.py remove DBL_BUFFER, add line to expose_event to - try to fix pygtk 2.6 redraw problem - SC - -2005-06-01 The default behavior of ScalarFormatter now renders scientific - notation and large numerical offsets in a label at the end of - the axis. - DSD - -2005-06-01 Added Nicholas' frombyte image patch - JDH - -2005-05-31 Added vertical TeX support for agg - JDH - -2005-05-31 Applied Eric's cntr patch - JDH - -2005-05-27 Finally found the pesky agg bug (which Maxim was kind - enough to fix within hours) that was causing a segfault in - the win32 cached marker drawing. Now windows users can get - the enormouse performance benefits of caced markers w/o - those occasional pesy screenshots. - JDH - -2005-05-27 Got win32 build system working again, using a more recent - version of gtk and pygtk in the win32 build, gtk 2.6 from - http://www.gimp.org/~tml/gimp/win32/downloads.html (you - will also need libpng12.dll to use these). I haven't - tested whether this binary build of mpl for win32 will work - with older gtk runtimes, so you may need to upgrade. - -2005-05-27 Fixed bug where 2nd wxapp could be started if using wxagg - backend. - ADS - -2005-05-26 Added Daishi text with dash patch -- see examples/dashtick.py - -2005-05-26 Moved backend_latex functionality into backend_ps. If - text.usetex=True, the PostScript backend will use LaTeX to - generate the .ps or .eps file. Ghostscript is required for - eps output. - DSD - -2005-05-24 Fixed alignment and color issues in latex backend. - DSD - -2005-05-21 Fixed raster problem for small rasters with dvipng -- looks - like it was a premultipled alpha problem - JDH - -2005-05-20 Added linewidth and faceted kwarg to scatter to control - edgewidth and color. Also added autolegend patch to - inspect line segments. - -2005-05-18 Added Orsay and JPL qt fixes - JDH - -2005-05-17 Added a psfrag latex backend -- some alignment issues need - to be worked out. Run with -dLaTeX and a *.tex file and - *.eps file are generated. latex and dvips the generated - latex file to get ps output. Note xdvi *does* not work, - you must generate ps.- JDH - -2005-05-13 Added Florent Rougon's Axis set_label1 - patch - -2005-05-17 pcolor optimization, fixed bug in previous pcolor patch - JSWHIT - -2005-05-16 Added support for masked arrays in pcolor - JSWHIT - - -2005-05-12 Started work on TeX text for antigrain using pngdvi -- see - examples/tex_demo.py and the new module - matplotlib.texmanager. Rotated text not supported and - rendering small glyps is not working right yet. BUt large - fontsizes and/or high dpi saved figs work great. - -2005-05-10 New image resize options interpolation options. New values - for the interp kwarg are - - 'nearest', 'bilinear', 'bicubic', 'spline16', 'spline36', - 'hanning', 'hamming', 'hermite', 'kaiser', 'quadric', - 'catrom', 'gaussian', 'bessel', 'mitchell', 'sinc', - 'lanczos', 'blackman' - - See help(imshow) for details, particularly the - interpolation, filternorm and filterrad kwargs - - -2005-05-10 Applied Eric's contour mem leak fixes - JDH - -2005-05-10 Extended python agg wrapper and started implementing - backend_agg2, an agg renderer based on the python wrapper. - This will be more flexible and easier to extend than the - current backend_agg. See also examples/agg_test.py - JDH - -2005-05-09 Added Marcin's no legend patch to exclude lines from the - autolegend builder - - plot(x, y, label='nolegend') - -2005-05-05 Upgraded to agg23 - -2005-05-05 Added newscalarformatter_demo.py to examples. -DSD - -2005-05-04 Added NewScalarFormatter. Improved formatting of ticklabels, - scientific notation, and the ability to plot large large - numbers with small ranges, by determining a numerical offset. - See ticker.NewScalarFormatter for more details. -DSD - -2005-05-03 Added the option to specify a delimiter in pylab.load -DSD - -2005-04-28 Added Darren's line collection example - -2005-04-28 Fixed aa property in agg - JDH - -2005-04-27 Set postscript page size in .matplotlibrc - DSD - -2005-04-26 Added embedding in qt example. - JDH - -2005-04-14 Applied Michael Brady's qt backend patch: 1) fix a bug - where keyboard input was grabbed by the figure and not - released 2) turn on cursor changes 3) clean up a typo - and commented-out print statement. - JDH - - -2005-04-14 Applied Eric Firing's masked data lines patch and contour - patch. Support for masked arrays has been added to the - plot command and to the Line2D object. Only the valid - points are plotted. A "valid_only" kwarg was added to the - get_xdata() and get_ydata() methods of Line2D; by default - it is False, so that the original data arrays are - returned. Setting it to True returns the plottable points. - - see examples/masked_demo.py - JDH - -2005-04-13 Applied Tim Leslie's arrow key event handling patch - JDH - - -================================================================= -0.80 released - -2005-04-11 Applied a variant of rick's xlim/ylim/axis patch. These - functions now take kwargs to let you selectively alter only - the min or max if desired. e.g., xlim(xmin=2) or - axis(ymax=3). They always return the new lim. - JDH - - -2005-04-11 Incorporated Werner's wx patch -- wx backend should be - compatible with wxpython2.4 and recent versions of 2.5. - Some early versions of wxpython 2.5 will not work because - there was a temporary change in the dc API that was rolled - back to make it 2.4 compliant - -2005-04-11 modified tkagg show so that new figure window pops up on - call to figure - -2005-04-11 fixed wxapp init bug - -2005-04-02 updated backend_ps.draw_lines, draw_markers for use with the - new API - DSD - -2005-04-01 Added editable polygon example - -========================================================================== - -2005-03-31 0.74 released - -2005-03-30 Fixed and added checks for floating point inaccuracy in - ticker.Base - DSD - -2005-03-30 updated /ellipse definition in backend_ps.py to address bug - #1122041 - DSD - -2005-03-29 Added unicode support for Agg and PS - JDH - -2005-03-28 Added Jarrod's svg patch for text - JDH - -2005-03-28 Added Ludal's arrow and quiver patch - JDH - -2005-03-28 Added label kwarg to Axes to facilitate forcing the - creation of new Axes with otherwise identical attributes - -2005-03-28 Applied boxplot and OSX font search patches - -2005-03-27 Added ft2font NULL check to fix Japanase font bug - JDH - -2005-03-27 Added sprint legend patch plus John Gill's tests and fix -- - see examples/legend_auto.py - JDH - -========================================================================== - -2005-03-19 0.73.1 released - -2005-03-19 Reverted wxapp handling because it crashed win32 - JDH - -2005-03-18 Add .number attribute to figure objects returned by figure() - FP - -=========================================================================== -2005-03-18 0.73 released - -2005-03-16 Fixed labelsep bug - -2005-03-16 Applied Darren's ticker fix for small ranges - JDH - -2005-03-16 Fixed tick on horiz colorbar - JDH - -2005-03-16 Added Japanses winreg patch - JDH - -2005-03-15 backend_gtkagg.py: changed to use double buffering, this fixes - the problem reported Joachim Berdal Haga - "Parts of plot lagging - from previous frame in animation". Tested with anim.py and it makes - no noticable difference to performance (23.7 before, 23.6 after) - - SC - -2005-03-14 add src/_backend_gdk.c extension to provide a substitute function - for pixbuf.get_pixels_array(). Currently pixbuf.get_pixels_array() - only works with Numeric, and then only works if pygtk has been - compiled with Numeric support. The change provides a function - pixbuf_get_pixels_array() which works with Numeric and numarray and - is always available. It means that backend_gtk should be able to - display images and mathtext in all circumstances. - SC - -2005-03-11 Upgraded CXX to 5.3.1 - -2005-03-10 remove GraphicsContextPS.set_linestyle() - and GraphicsContextSVG.set_linestyle() since they do no more than - the base class GraphicsContext.set_linestyle() - SC - -2005-03-09 Refactored contour functionality into dedicated module - -2005-03-09 Added Eric's contourf updates and Nadia's clabel functionality - -2005-03-09 Moved colorbar to figure.Figure to expose it for API developers - - JDH - -2005-03-09 backend_cairo.py: implemented draw_markers() - SC - -2005-03-09 cbook.py: only use enumerate() (the python version) if the builtin - version is not available. - Add new function 'izip' which is set to itertools.izip if available - and the python equivalent if not available. - SC - -2005-03-07 backend_gdk.py: remove PIXELS_PER_INCH from points_to_pixels(), but - still use it to adjust font sizes. This allows the GTK version of - line_styles.py to more closely match GTKAgg, previously the markers - were being drawn too large. - SC - -2005-03-01 Added Eric's contourf routines - -2005-03-01 Added start of proper agg SWIG wrapper. I would like to - expose agg functionality directly a the user level and this - module will serve that purpose eventually, and will - hopefully take over most of the functionality of the - current _image and _backend_agg modules. - JDH - -2005-02-28 Fixed polyfit / polyval to convert input args to float - arrays - JDH - - -2005-02-25 Add experimental feature to backend_gtk.py to enable/disable - double buffering (DBL_BUFFER=True/False) - SC - -2005-02-24 colors.py change ColorConverter.to_rgb() so it always returns rgb - (and not rgba), allow cnames keys to be cached, change the exception - raised from RuntimeError to ValueError (like hex2color()) - hex2color() use a regular expression to check the color string is - valid - SC - - -2005-02-23 Added rc param ps.useafm so backend ps can use native afm - fonts or truetype. afme breaks mathtext but causes much - smaller font sizes and may result in images that display - better in some contexts (e.g., pdfs incorporated into latex - docs viewed in acrobat reader). I would like to extend - this approach to allow the user to use truetype only for - mathtext, which should be easy. - -2005-02-23 Used sequence protocol rather than tuple in agg collection - drawing routines for greater flexibility - JDH - - -=========================================================== -2005-02-22 0.72.1 released - -2005-02-21 fixed linestyles for collections -- contour now dashes for - levels <0 - -2005-02-21 fixed ps color bug - JDH - -2005-02-15 fixed missing qt file - -2005-02-15 banished error_msg and report_error. Internal backend - methods like error_msg_gtk are preserved. backend writers, - check your backends, and diff against 0.72 to make sure I - did the right thing! - JDH - - -2005-02-14 Added enthought traits to matplotlib tree - JDH - -=========================================================== - -2005-02-14 0.72 released - -2005-02-14 fix bug in cbook alltrue() and onetrue() - SC - -2005-02-11 updated qtagg backend from Ted - JDH - -2005-02-11 matshow fixes for figure numbering, return value and docs - FP - -2005-02-09 new zorder example for fine control in zorder_demo.py - FP - -2005-02-09 backend renderer draw_lines now has transform in backend, - as in draw_markers; use numerix in _backend_agg, aded small - line optimization to agg - -2005-02-09 subplot now deletes axes that it overlaps - -2005-02-08 Added transparent support for gzipped files in load/save - Fernando - Perez (FP from now on). - -2005-02-08 Small optimizations in PS backend. They may have a big impact for - large plots, otherwise they don't hurt - FP - -2005-02-08 Added transparent support for gzipped files in load/save - Fernando - Perez (FP from now on). - -2005-02-07 Added newstyle path drawing for markers - only implemented - in agg currently - JDH - -2005-02-05 Some superscript text optimizations for ticking log plots - -2005-02-05 Added some default key press events to pylab figures: 'g' - toggles grid - JDH - -2005-02-05 Added some support for handling log switching for lines - that have nonpos data - JDH - -2005-02-04 Added Nadia's contour patch - contour now has matlab - compatible syntax; this also fixed an unequal sized contour - array bug- JDH - -2005-02-04 Modified GTK backends to allow the FigureCanvas to be resized - smaller than its original size - SC - -2005-02-02 Fixed a bug in dates mx2num - JDH - -2005-02-02 Incorporated Fernando's matshow - JDH - -2005-02-01 Added Fernando's figure num patch, including experemental - support for pylab backend switching, LineCOllection.color - warns, savefig now a figure method, fixed a close(fig) bug - - JDH - -2005-01-31 updated datalim in contour - JDH - -2005-01-30 Added backend_qtagg.py provided by Sigve Tjora - SC - -2005-01-28 Added tk.inspect rc param to .matplotlibrc. IDLE users - should set tk.pythoninspect:True and interactive:True and - backend:TkAgg - -2005-01-28 Replaced examples/interactive.py with an updated script from - Fernando Perez - SC - -2005-01-27 Added support for shared x or y axes. See - examples/shared_axis_demo.py and examples/ganged_plots.py - -2005-01-27 Added Lee's patch for missing symbols \leq and \LEFTbracket - to _mathtext_data - JDH - -2005-01-26 Added Baptiste's two scales patch -- see help(twinx) in the - pylab interface for more info. See also - examples/two_scales.py - -2005-01-24 Fixed a mathtext parser bug that prevented font changes in - sub/superscripts - JDH - -2005-01-24 Fixed contour to work w/ interactive changes in colormaps, - clim, etc - JDH - -=============================================================== - -2005-01-21 matplotlib-0.71 released - -2005-01-21 Refactored numerix to solve vexing namespace issues - JDH - -2005-01-21 Applied Nadia's contour bug fix - JDH - -2005-01-20 Made some changes to the contour routine - particularly - region=1 seems t fix a lot of the zigzag strangeness. - Added colormaps as default for contour - JDH - -2005-01-19 Restored builtin names which were overridden (min, max, - abs, round, and sum) in pylab. This is a potentially - significant change for those who were relying on an array - version of those functions that previously overrode builtin - function names. - ADS - -2005-01-18 Added accents to mathtext: \hat, \breve, \grave, \bar, - \acute, \tilde, \vec, \dot, \ddot. All of them have the - same syntax, e.g., to make an overbar you do \bar{o} or to - make an o umlaut you do \ddot{o}. The shortcuts are also - provided, e.g., \"o \'e \`e \~n \.x \^y - JDH - -2005-01-18 Plugged image resize memory leaks - JDH - -2005-01-18 Fixed some mathtext parser problems relating to superscripts - -2005-01-17 Fixed a yticklabel problem for colorbars under change of - clim - JDH - -2005-01-17 Cleaned up Destroy handling in wx reducing memleak/fig from - approx 800k to approx 6k- JDH - -2005-01-17 Added kappa to latex_to_bakoma - JDH - -2005-01-15 Support arbitrary colorbar axes and horizontal colorbars - JDH - -2005-01-15 Fixed colormap number of colors bug so that the colorbar - has the same discretization as the image - JDH - -2005-01-15 Added Nadia's x,y contour fix - JDH - -2005-01-15 backend_cairo: added PDF support which requires pycairo 0.1.4. - Its not usable yet, but is ready for when the Cairo PDF backend - matures - SC - -2005-01-15 Added Nadia's x,y contour fix - -2005-01-12 Fixed set clip_on bug in artist - JDH - -2005-01-11 Reverted pythoninspect in tkagg - JDH - -2005-01-09 Fixed a backend_bases event bug caused when an event is - triggered when location is None - JDH - -2005-01-07 Add patch from Stephen Walton to fix bug in pylab.load() - when the % character is included in a comment. - ADS - -2005-01-07 Added markerscale attribute to Legend class. This allows - the marker size in the legend to be adjusted relative to - that in the plot. - ADS - -2005-01-06 Add patch from Ben Vanhaeren to make the FigureManagerGTK vbox a - public attribute - SC - -==================================================================== -2004-12-30 Release 0.70 - -2004-12-28 Added coord location to key press and added a - examples/picker_demo.py - -2004-12-28 Fixed coords notification in wx toolbar - JDH - -2004-12-28 Moved connection and disconnection event handling to the - FigureCanvasBase. Backends now only need to connect one - time for each of the button press, button release and key - press/release functions. The base class deals with - callbacks and multiple connections. This fixes flakiness - on some backends (tk, wx) in the presence of multiple - connections and/or disconnect - JDH - -2004-12-27 Fixed PS mathtext bug where color was not set - Jochen - please verify correct - JDH - -2004-12-27 Added Shadow class and added shadow kwarg to legend and pie - for shadow effect - JDH - -2004-12-27 Added pie charts and new example/pie_demo.py - -2004-12-23 Fixed an agg text rotation alignment bug, fixed some text - kwarg processing bugs, and added examples/text_rotation.py - to explain and demonstrate how text rotations and alignment - work in matplotlib. - JDH - -====================================================================== - -2004-12-22 0.65.1 released - JDH - -2004-12-22 Fixed colorbar bug which caused colorbar not to respond to - changes in colormap in some instances - JDH - -2004-12-22 Refactored NavigationToolbar in tkagg to support app - embedding , init now takes (canvas, window) rather than - (canvas, figman) - JDH - -2004-12-21 Refactored axes and subplot management - removed - add_subplot and add_axes from the FigureManager. classic - toolbar updates are done via an observer pattern on the - figure using add_axobserver. Figure now maintains the axes - stack (for gca) and supports axes deletion. Ported changes - to GTK, Tk, Wx, and FLTK. Please test! Added delaxes - JDH - -2004-12-21 Lots of image optimizations - 4x performance boost over - 0.65 JDH - -2004-12-20 Fixed a figimage bug where the axes is shown and modified - tkagg to move the destroy binding into the show method. - -2004-12-18 Minor refactoring of NavigationToolbar2 to support - embedding in an application - JDH - -2004-12-14 Added linestyle to collections (currently broken) - JDH - -2004-12-14 Applied Nadia's setupext patch to fix libstdc++ link - problem with contour and solaris -JDH - -2004-12-14 A number of pychecker inspired fixes, including removal of - True and False from cbook which I erroneously thought was - needed for python2.2 - JDH - -2004-12-14 Finished porting doc strings for set introspection. - Used silent_list for many get funcs that return - lists. JDH - -2004-12-13 dates.py: removed all timezone() calls, except for UTC - SC - -====================================================================== - -2004-12-13 0.65 released - JDH - -2004-12-13 colors.py: rgb2hex(), hex2color() made simpler (and faster), also - rgb2hex() - added round() instead of integer truncation - hex2color() - changed 256.0 divisor to 255.0, so now - '#ffffff' becomes (1.0,1.0,1.0) not (0.996,0.996,0.996) - SC - -2004-12-11 Added ion and ioff to pylab interface - JDH - -2004-12-11 backend_template.py: delete FigureCanvasTemplate.realize() - most - backends don't use it and its no longer needed - - backend_ps.py, backend_svg.py: delete show() and - draw_if_interactive() - they are not needed for image backends - - backend_svg.py: write direct to file instead of StringIO - - SC - -2004-12-10 Added zorder to artists to control drawing order of lines, - patches and text in axes. See examples/zoder_demo.py - JDH - -2004-12-10 Fixed colorbar bug with scatter - JDH - -2004-12-10 Added Nadia Dencheva contour code - JDH - -2004-12-10 backend_cairo.py: got mathtext working - SC - -2004-12-09 Added Norm Peterson's svg clipping patch - -2004-12-09 Added Matthew Newville's wx printing patch - -2004-12-09 Migrated matlab to pylab - JDH - -2004-12-09 backend_gtk.py: split into two parts - - backend_gdk.py - an image backend - - backend_gtk.py - A GUI backend that uses GDK - SC - -2004-12-08 backend_gtk.py: remove quit_after_print_xvfb(*args), show_xvfb(), - Dialog_MeasureTool(gtk.Dialog) one month after sending mail to - matplotlib-users asking if anyone still uses these functions - SC - -2004-12-02 backend_bases.py, backend_template.py: updated some of the method - documentation to make them consistent with each other - SC - -2004-12-04 Fixed multiple bindings per event for TkAgg mpl_connect and - mpl_disconnect. Added a "test_disconnect" command line - parameter to coords_demo.py JTM - -2004-12-04 Fixed some legend bugs JDH - -2004-11-30 Added over command for oneoff over plots. e.g., over(plot, x, - y, lw=2). Works with any plot function. - -2004-11-30 Added bbox property to text - JDH - -2004-11-29 Zoom to rect now respect reversed axes limits (for both - linear and log axes). - GL - -2004-11-29 Added the over command to the matlab interface. over - allows you to add an overlay plot regardless of hold - state. - JDH - -2004-11-25 Added Printf to mplutils for printf style format string - formatting in C++ (should help write better exceptions) - -2004-11-24 IMAGE_FORMAT: remove from agg and gtkagg backends as its no longer - used - SC - -2004-11-23 Added matplotlib compatible set and get introspection. See - set_and_get.py - -2004-11-23 applied Norbert's patched and exposed legend configuration - to kwargs - JDH - -2004-11-23 backend_gtk.py: added a default exception handler - SC - -2004-11-18 backend_gtk.py: change so that the backend knows about all image - formats and does not need to use IMAGE_FORMAT in other backends - SC - -2004-11-18 Fixed some report_error bugs in string interpolation as - reported on SF bug tracker- JDH - -2004-11-17 backend_gtkcairo.py: change so all print_figure() calls render using - Cairo and get saved using backend_gtk.print_figure() - SC - -2004-11-13 backend_cairo.py: Discovered the magic number (96) required for - Cairo PS plots to come out the right size. Restored Cairo PS output - and added support for landscape mode - SC - -2004-11-13 Added ishold - JDH - -2004-11-12 Added many new matlab colormaps - autumn bone cool copper - flag gray hot hsv jet pink prism spring summer winter - PG - -2004-11-11 greatly simplify the emitted postscript code - JV - -2004-11-12 Added new plotting functions spy, spy2 for sparse matrix - visualization - JDH - -2004-11-11 Added rgrids, thetragrids for customizing the grid - locations and labels for polar plots - JDH - -2004-11-11 make the Gtk backends build without an X-server connection - JV - -2004-11-10 matplotlib/__init__.py: Added FROZEN to signal we are running under - py2exe (or similar) - is used by backend_gtk.py - SC - -2004-11-09 backend_gtk.py: Made fix suggested by maffew@cat.org.au - to prevent problems when py2exe calls pygtk.require(). - SC - -2004-11-09 backend_cairo.py: Added support for printing to a fileobject. - Disabled cairo PS output which is not working correctly. - SC - -============================================================== -2004-11-08 matplotlib-0.64 released - -2004-11-04 Changed -dbackend processing to only use known backends, so - we don't clobber other non-matplotlib uses of -d, like -debug. - -2004-11-04 backend_agg.py: added IMAGE_FORMAT to list the formats that the - backend can save to. - backend_gtkagg.py: added support for saving JPG files by using the - GTK backend - SC - -2004-10-31 backend_cairo.py: now produces png and ps files (although the figure - sizing needs some work). pycairo did not wrap all the necessary - functions, so I wrapped them myself, they are included in the - backend_cairo.py doc string. - SC - -2004-10-31 backend_ps.py: clean up the generated PostScript code, use - the PostScript stack to hold itermediate values instead of - storing them in the dictionary. - JV - -2004-10-30 backend_ps.py, ft2font.cpp, ft2font.h: fix the position of - text in the PostScript output. The new FT2Font method - get_descent gives the distance between the lower edge of - the bounding box and the baseline of a string. In - backend_ps the text is shifted upwards by this amount. - JV - -2004-10-30 backend_ps.py: clean up the code a lot. Change the - PostScript output to be more DSC compliant. All - definitions for the generated PostScript are now in a - PostScript dictionary 'mpldict'. Moved the long comment - about drawing ellipses from the PostScript output into a - Python comment. - JV - -2004-10-30 backend_gtk.py: removed FigureCanvasGTK.realize() as its no longer - needed. Merged ColorManager into GraphicsContext - backend_bases.py: For set_capstyle/joinstyle() only set cap or - joinstyle if there is no error. - SC - -2004-10-30 backend_gtk.py: tidied up print_figure() and removed some of the - dependency on widget events - SC - -2004-10-28 backend_cairo.py: The renderer is complete except for mathtext, - draw_image() and clipping. gtkcairo works reasonably well. cairo - does not yet create any files since I can't figure how to set the - 'target surface', I don't think pycairo wraps the required functions - - SC - -2004-10-28 backend_gtk.py: Improved the save dialog (GTK 2.4 only) so it - presents the user with a menu of supported image formats - SC - -2004-10-28 backend_svg.py: change print_figure() to restore original face/edge - color - backend_ps.py : change print_figure() to ensure original face/edge - colors are restored even if there's an IOError - SC - -2004-10-27 Applied Norbert's errorbar patch to support barsabove kwarg - -2004-10-27 Applied Norbert's legend patch to support None handles - -2004-10-27 Added two more backends: backend_cairo.py, backend_gtkcairo.py - They are not complete yet, currently backend_gtkcairo just renders - polygons, rectangles and lines - SC - -2004-10-21 Added polar axes and plots - JDH - -2004-10-20 Fixed corrcoef bug exposed by corrcoef(X) where X is matrix - - JDH - -2004-10-19 Added kwarg support to xticks and yticks to set ticklabel - text properties -- thanks to T. Edward Whalen for the suggestion - -2004-10-19 Added support for PIL images in imshow(), image.py - ADS - -2004-10-19 Re-worked exception handling in _image.py and _transforms.py - to avoid masking problems with shared libraries. - JTM - -2004-10-16 Streamlined the matlab interface wrapper, removed the - noplot option to hist - just use mlab.hist instead. - -2004-09-30 Added Andrew Dalke's strftime code to extend the range of - dates supported by the DateFormatter - JDH - -2004-09-30 Added barh - JDH - -2004-09-30 Removed fallback to alternate array package from numerix - so that ImportErrors are easier to debug. JTM - -2004-09-30 Add GTK+ 2.4 support for the message in the toolbar. SC - -2004-09-30 Made some changes to support python22 - lots of doc - fixes. - JDH - -2004-09-29 Added a Verbose class for reporting - JDH - -============================================================== - -2004-09-28 Released 0.63.0 - -2004-09-28 Added save to file object for agg - see - examples/print_stdout.py - -2004-09-24 Reorganized all py code to lib subdir - -2004-09-24 Fixed axes resize image edge effects on interpolation - - required upgrade to agg22 which fixed an agg bug related to - this problem - -2004-09-20 Added toolbar2 message display for backend_tkagg. JTM - - -2004-09-17 Added coords formatter attributes. These must be callable, - and return a string for the x or y data. These will be used - to format the x and y data for the coords box. Default is - the axis major formatter. e.g.: - - # format the coords message box - def price(x): return '$%1.2f'%x - ax.format_xdata = DateFormatter('%Y-%m-%d') - ax.format_ydata = price - - -2004-09-17 Total rewrite of dates handling to use python datetime with - num2date, date2num and drange. pytz for timezone handling, - dateutils for spohisticated ticking. date ranges from - 0001-9999 are supported. rrules allow arbitrary date - ticking. examples/date_demo*.py converted to show new - usage. new example examples/date_demo_rrule.py shows how - to use rrules in date plots. The date locators are much - more general and almost all of them have different - constructors. See matplotlib.dates for more info. - -2004-09-15 Applied Fernando's backend __init__ patch to support easier - backend maintenance. Added his numutils to mlab. JDH - -2004-09-16 Re-designated all files in matplotlib/images as binary and - w/o keyword substitution using "cvs admin -kb *.svg ...". - See binary files in "info cvs" under Linux. This was messing - up builds from CVS on windows since CVS was doing lf -> cr/lf - and keyword substitution on the bitmaps. - JTM - -2004-09-15 Modified setup to build array-package-specific extensions - for those extensions which are array-aware. Setup builds - extensions automatically for either Numeric, numarray, or - both, depending on what you have installed. Python proxy - modules for the array-aware extensions import the version - optimized for numarray or Numeric determined by numerix. - - JTM - -2004-09-15 Moved definitions of infinity from mlab to numerix to avoid - divide by zero warnings for numarray - JTM - -2004-09-09 Added axhline, axvline, axhspan and axvspan - -============================================================== -2004-08-30 matplotlib 0.62.4 released - -2004-08-30 Fixed a multiple images with different extent bug, - Fixed markerfacecolor as RGB tuple - -2004-08-27 Mathtext now more than 5x faster. Thanks to Paul Mcguire - for fixes both to pyparsing and to the matplotlib grammar! - mathtext broken on python2.2 - -2004-08-25 Exposed Darren's and Greg's log ticking and formatting - options to semilogx and friends - -2004-08-23 Fixed grid w/o args to toggle grid state - JDH - -2004-08-11 Added Gregory's log patches for major and minor ticking - -2004-08-18 Some pixel edge effects fixes for images - -2004-08-18 Fixed TTF files reads in backend_ps on win32. - -2004-08-18 Added base and subs properties for logscale plots, user - modifiable using - set_[x,y]scale('log',base=b,subs=[mt1,mt2,...]) - GL - -2004-08-18 fixed a bug exposed by trying to find the HOME dir on win32 - thanks to Alan Issac for pointing to the light - JDH - -2004-08-18 fixed errorbar bug in setting ecolor - JDH - -2004-08-12 Added Darren Dale's exponential ticking patch - -2004-08-11 Added Gregory's fltkagg backend - -========================================================================== -2004-08-09 matplotlib-0.61.0 released - -2004-08-08 backend_gtk.py: get rid of the final PyGTK deprecation warning by - replacing gtkOptionMenu with gtkMenu in the 2.4 version of the - classic toolbar. - -2004-08-06 Added Tk zoom to rect rectangle, proper idle drawing, and - keybinding - JDH - -2004-08-05 Updated installing.html and INSTALL - JDH - -2004-08-01 backend_gtk.py: move all drawing code into the expose_event() - -2004-07-28 Added Greg's toolbar2 and backend_*agg patches - JDH - -2004-07-28 Added image.imread with support for loading png into - numerix arrays - -2004-07-28 Added key modifiers to events - implemented dynamic updates - and rubber banding for interactive pan/zoom - JDH - -2004-07-27 did a readthrough of SVG, replacing all the string - additions with string interps for efficiency, fixed some - layout problems, added font and image support (through - external pngs) - JDH - -2004-07-25 backend_gtk.py: modify toolbar2 to make it easier to support GTK+ - 2.4. Add GTK+ 2.4 toolbar support. - SC - -2004-07-24 backend_gtk.py: Simplified classic toolbar creation - SC - -2004-07-24 Added images/matplotlib.svg to be used when GTK+ windows are - minimised - SC - -2004-07-22 Added right mouse click zoom for NavigationToolbar2 panning - mode. - JTM - -2004-07-22 Added NavigationToolbar2 support to backend_tkagg. - Minor tweak to backend_bases. - JTM - -2004-07-22 Incorporated Gergory's renderer cache and buffer object - cache - JDH - -2004-07-22 Backend_gtk.py: Added support for GtkFileChooser, changed - FileSelection/FileChooser so that only one instance pops up, - and made them both modal. - SC - -2004-07-21 Applied backend_agg memory leak patch from hayden - - jocallo@online.no. Found and fixed a leak in binary - operations on transforms. Moral of the story: never incref - where you meant to decref! Fixed several leaks in ft2font: - moral of story: almost always return Py::asObject over - Py::Object - JDH - -2004-07-21 Fixed a to string memory allocation bug in agg and image - modules - JDH - -2004-07-21 Added mpl_connect and mpl_disconnect to matlab interface - - JDH - -2004-07-21 Added beginnings of users_guide to CVS - JDH - -2004-07-20 ported toolbar2 to wx - -2004-07-20 upgraded to agg21 - JDH - -2004-07-20 Added new icons for toolbar2 - JDH - -2004-07-19 Added vertical mathtext for *Agg and GTK - thanks Jim - Benson! - JDH - -2004-07-16 Added ps/eps/svg savefig options to wx and gtk JDH - -2004-07-15 Fixed python framework tk finder in setupext.py - JDH - -2004-07-14 Fixed layer images demo which was broken by the 07/12 image - extent fixes - JDH - -2004-07-13 Modified line collections to handle arbitrary length - segments for each line segment. - JDH - -2004-07-13 Fixed problems with image extent and origin - - set_image_extent deprecated. Use imshow(blah, blah, - extent=(xmin, xmax, ymin, ymax) instead - JDH - -2004-07-12 Added prototype for new nav bar with codifed event - handling. Use mpl_connect rather than connect for - matplotlib event handling. toolbar style determined by rc - toolbar param. backend status: gtk: prototype, wx: in - progress, tk: not started - JDH - -2004-07-11 backend_gtk.py: use builtin round() instead of redefining it. - - SC - -2004-07-10 Added embedding_in_wx3 example - ADS - -2004-07-09 Added dynamic_image_wxagg to examples - ADS - -2004-07-09 added support for embedding TrueType fonts in PS files - PEB - -2004-07-09 fixed a sfnt bug exposed if font cache is not built - -2004-07-09 added default arg None to matplotlib.matlab grid command to - toggle current grid state - -============================ - -2004-07-08 0.60.2 released - -2004-07-08 fixed a mathtext bug for '6' - -2004-07-08 added some numarray bug workarounds - -======= - -2004-07-07 0.60 released - -2004-07-07 Fixed a bug in dynamic_demo_wx - - -2004-07-07 backend_gtk.py: raise SystemExit immediately if - 'import pygtk' fails - SC - -2004-07-05 Added new mathtext commands \over{sym1}{sym2} and - \under{sym1}{sym2} - -2004-07-05 Unified image and patch collections colormapping and - scaling args. Updated docstrings for all - JDH - -2004-07-05 Fixed a figure legend bug and added - examples/figlegend_demo.py - JDH - -2004-07-01 Fixed a memory leak in image and agg to string methods - -2004-06-25 Fixed fonts_demo spacing problems and added a kwargs - version of the fonts_demo fonts_demo_kw.py - JDH - -2004-06-25 finance.py: handle case when urlopen() fails - SC - -2004-06-24 Support for multiple images on axes and figure, with - blending. Support for upper and lower image origins. - clim, jet and gray functions in matlab interface operate on - current image - JDH - -2004-06-23 ported code to Perry's new colormap and norm scheme. Added - new rc attributes image.aspect, image.interpolation, - image.cmap, image.lut, image.origin - -2004-06-20 backend_gtk.py: replace gtk.TRUE/FALSE with True/False. - simplified _make_axis_menu(). - SC - -2004-06-19 anim_tk.py: Updated to use TkAgg by default (not GTK) - backend_gtk_py: Added '_' in front of private widget - creation functions - SC - -2004-06-17 backend_gtk.py: Create a GC once in realise(), not every - time draw() is called. - SC - -2004-06-16 Added new py2exe FAQ entry and added frozen support in - get_data_path for py2exe - JDH - -2004-06-16 Removed GTKGD, which was always just a proof-of-concept - backend - JDH - -2004-06-16 backend_gtk.py updates to replace deprecated functions - gtk.mainquit(), gtk.mainloop(). - Update NavigationToolbar to use the new GtkToolbar API - SC - -2004-06-15 removed set_default_font from font_manager to unify font - customization using the new function rc. See API_CHANGES - for more info. The examples fonts_demo.py and - fonts_demo_kw.py are ported to the new API - JDH - -2004-06-15 Improved (yet again!) axis scaling to properly handle - singleton plots - JDH - -2004-06-15 Restored the old FigureCanvasGTK.draw() - SC - -2004-06-11 More memory leak fixes in transforms and ft2font - JDH - -2004-06-11 Eliminated numerix .numerix file and environment variable - NUMERIX. Fixed bug which prevented command line overrides: - --numarray or --numeric. - JTM - -2004-06-10 Added rc configuration function rc; deferred all rc param - setting until object creation time; added new rc attrs: - lines.markerfacecolor, lines.markeredgecolor, - lines.markeredgewidth, patch.linewidth, patch.facecolor, - patch.edgecolor, patch.antialiased; see - examples/customize_rc.py for usage - JDH - - ---------------------------------------------------------------- -2004-06-09 0.54.2 released - -2004-06-08 Rewrote ft2font using CXX as part of general memory leak - fixes; also fixed transform memory leaks - JDH - -2004-06-07 Fixed several problems with log ticks and scaling - JDH - -2004-06-07 Fixed width/height issues for images - JDH - -2004-06-03 Fixed draw_if_interactive bug for semilogx; - -2004-06-02 Fixed text clipping to clip to axes - JDH - -2004-06-02 Fixed leading newline text and multiple newline text - JDH - -2004-06-02 Fixed plot_date to return lines - JDH - -2004-06-01 Fixed plot to work with x or y having shape N,1 or 1,N - JDH - -2004-05-31 Added renderer markeredgewidth attribute of Line2D. - ADS - -2004-05-29 Fixed tick label clipping to work with navigation. - -2004-05-28 Added renderer grouping commands to support groups in - SVG/PS. - JDH - -2004-05-28 Fixed, this time I really mean it, the singleton plot - plot([0]) scaling bug; Fixed Flavio's shape = N,1 bug - JDH - -2004-05-28 added colorbar - JDH - -2004-05-28 Made some changes to the matplotlib.colors.Colormap to - propertly support clim - JDH - ------------------------------------------------------------------ -2004-05-27 0.54.1 released - -2004-05-27 Lots of small bug fixes: rotated text at negative angles, - errorbar capsize and autoscaling, right tick label - position, gtkagg on win98, alpha of figure background, - singleton plots - JDH - -2004-05-26 Added Gary's errorbar stuff and made some fixes for length - one plots and constant data plots - JDH - -2004-05-25 Tweaked TkAgg backend so that canvas.draw() works - more like the other backends. Fixed a bug resulting - in 2 draws per figure mangager show(). - JTM - ------------------------------------------------------------- -2004-05-19 0.54 released - -2004-05-18 Added newline seperated text with rotations to text.Text - layout - JDH - -2004-05-16 Added fast pcolor using PolyCollections. - JDH - -2004-05-14 Added fast polygon collections - changed scatter to use - them. Added multiple symbols to scatter. 10x speedup on - large scatters using *Agg and 5X speedup for ps. - JDH - -2004-05-14 On second thought... created an "nx" namespace in - in numerix which maps type names onto typecodes - the same way for both numarray and Numeric. This - undoes my previous change immediately below. To get a - typename for Int16 useable in a Numeric extension: - say nx.Int16. - JTM - -2004-05-15 Rewrote transformation class in extension code, simplified - all the artist constructors - JDH - -2004-05-14 Modified the type definitions in the numarray side of - numerix so that they are Numeric typecodes and can be - used with Numeric compilex extensions. The original - numarray types were renamed to type. - JTM - -2004-05-06 Gary Ruben sent me a bevy of new plot symbols and markers. - See matplotlib.matlab.plot - JDH - -2004-05-06 Total rewrite of mathtext - factored ft2font stuff out of - layout engine and defined abstract class for font handling - to lay groundwork for ps mathtext. Rewrote parser and made - layout engine much more precise. Fixed all the layout - hacks. Added spacing commands \/ and \hspace. Added - composite chars and defined angstrom. - JDH - -2004-05-05 Refactored text instances out of backend; aligned - text with arbitrary rotations is now supported - JDH - -2004-05-05 Added a Matrix capability for numarray to numerix. JTM - -2004-05-04 Updated whats_new.html.template to use dictionary and - template loop, added anchors for all versions and items; - updated goals.txt to use those for links. PG - -2004-05-04 Added fonts_demo.py to backend_driver, and AFM and TTF font - caches to font_manager.py - PEB - -2004-05-03 Redid goals.html.template to use a goals.txt file that - has a pseudo restructured text organization. PG - -2004-05-03 Removed the close buttons on all GUIs and added the python - #! bang line to the examples following Steve Chaplin's - advice on matplotlib dev - -2004-04-29 Added CXX and rewrote backend_agg using it; tracked down - and fixed agg memory leak - JDH - -2004-04-29 Added stem plot command - JDH - -2004-04-28 Fixed PS scaling and centering bug - JDH - -2004-04-26 Fixed errorbar autoscale problem - JDH - -2004-04-22 Fixed copy tick attribute bug, fixed singular datalim - ticker bug; fixed mathtext fontsize interactive bug. - JDH - -2004-04-21 Added calls to draw_if_interactive to axes(), legend(), - and pcolor(). Deleted duplicate pcolor(). - JTM - ------------------------------------------------------------- -2004-04-21 matplotlib 0.53 release - -2004-04-19 Fixed vertical alignment bug in PS backend - JDH - -2004-04-17 Added support for two scales on the "same axes" with tick - different ticking and labeling left right or top bottom. - See examples/two_scales.py - JDH - -2004-04-17 Added default dirs as list rather than single dir in - setupext.py - JDH - -2004-04-16 Fixed wx exception swallowing bug (and there was much - rejoicing!) - JDH - -2004-04-16 Added new ticker locator a formatter, fixed default font - return - JDH - -2004-04-16 Added get_name method to FontProperties class. Fixed font lookup - in GTK and WX backends. - PEB - -2004-04-16 Added get- and set_fontstyle msethods. - PEB - -2004-04-10 Mathtext fixes: scaling with dpi, - JDH - -2004-04-09 Improved font detection algorithm. - PEB - -2004-04-09 Move deprecation warnings from text.py to __init__.py - PEB - -2004-04-09 Added default font customization - JDH - -2004-04-08 Fixed viewlim set problem on axes and axis. - JDH - -2004-04-07 Added validate_comma_sep_str and font properties paramaters to - __init__. Removed font families and added rcParams to - FontProperties __init__ arguments in font_manager. Added - default font property parameters to .matplotlibrc file with - descriptions. Added deprecation warnings to the get_- and - set_fontXXX methods of the Text object. - PEB - -2004-04-06 Added load and save commands for ASCII data - JDH - -2004-04-05 Improved font caching by not reading AFM fonts until needed. - Added better documentation. Changed the behaviour of the - get_family, set_family, and set_name methods of FontProperties. - - PEB - -2004-04-05 Added WXAgg backend - JDH - -2004-04-04 Improved font caching in backend_agg with changes to - font_manager - JDH - -2004-03-29 Fixed fontdicts and kwargs to work with new font manager - - JDH - - - - - - - - --------------------------------------------- -This is the Old, stale, never used changelog - -2002-12-10 - Added a TODO file and CHANGELOG. Lots to do -- get - crackin'! - - - Fixed y zoom tool bug - - - Adopted a compromise fix for the y data clipping problem. - The problem was that for solid lines, the y data clipping - (as opposed to the gc clipping) caused artifactual - horizontal solid lines near the ylim boundaries. I did a - 5% offset hack in Axes set_ylim functions which helped, - but didn't cure the problem for very high gain y zooms. - So I disabled y data clipping for connected lines . If - you need extensive y clipping, either plot(y,x) because x - data clipping is always enabled, or change the _set_clip - code to 'if 1' as indicated in the lines.py src. See - _set_clip in lines.py and set_ylim in figure.py for more - information. - - -2002-12-11 - Added a measurement dialog to the figure window to - measure axes position and the delta x delta y with a left - mouse drag. These defaults can be overridden by deriving - from Figure and overrriding button_press_event, - button_release_event, and motion_notify_event, - and _dialog_measure_tool. - - - fixed the navigation dialog so you can check the axes the - navigation buttons apply to. - - - -2003-04-23 Released matplotlib v0.1 - -2003-04-24 Added a new line style PixelLine2D which is the plots the - markers as pixels (as small as possible) with format - symbol ',' - - Added a new class Patch with derived classes Rectangle, - RegularPolygon and Circle - -2003-04-25 Implemented new functions errorbar, scatter and hist - - Added a new line type '|' which is a vline. syntax is - plot(x, Y, '|') where y.shape = len(x),2 and each row gives - the ymin,ymax for the respective values of x. Previously I - had implemented vlines as a list of lines, but I needed the - efficientcy of the numeric clipping for large numbers of - vlines outside the viewport, so I wrote a dedicated class - Vline2D which derives from Line2D - - -2003-05-01 - - Fixed ytick bug where grid and tick show outside axis viewport with gc clip - -2003-05-14 - - Added new ways to specify colors 1) matlab format string 2) - html-style hex string, 3) rgb tuple. See examples/color_demo.py - -2003-05-28 - - Changed figure rendering to draw form a pixmap to reduce flicker. - See examples/system_monitor.py for an example where the plot is - continusouly updated w/o flicker. This example is meant to - simulate a system monitor that shows free CPU, RAM, etc... - -2003-08-04 - - Added Jon Anderson's GTK shell, which doesn't require pygtk to - have threading built-in and looks nice! - -2003-08-25 - - Fixed deprecation warnings for python2.3 and pygtk-1.99.18 - -2003-08-26 - - Added figure text with new example examples/figtext.py - - -2003-08-27 - - Fixed bugs i figure text with font override dictionairies and fig - text that was placed outside the window bounding box - -2003-09-1 thru 2003-09-15 - - Added a postscript and a GD module backend - -2003-09-16 - - Fixed font scaling and point scaling so circles, squares, etc on - lines will scale with DPI as will fonts. Font scaling is not fully - implemented on the gtk backend because I have not figured out how - to scale fonts to arbitrary sizes with GTK - -2003-09-17 - - Fixed figure text bug which crashed X windows on long figure text - extending beyond display area. This was, I believe, due to the - vestigial erase functionality that was no longer needed since I - began rendering to a pixmap - -2003-09-30 Added legend - -2003-10-01 Fixed bug when colors are specified with rgb tuple or hex - string. - - -2003-10-21 Andrew Straw provided some legend code which I modified - and incorporated. Thanks Andrew! - -2003-10-27 Fixed a bug in axis.get_view_distance that affected zoom in - versus out with interactive scrolling, and a bug in the axis text - reset system that prevented the text from being redrawn on a - interactive gtk view lim set with the widget - - Fixed a bug in that prevented the manual setting of ticklabel - strings from working properly - -2003-11-02 - Do a nearest neighbor color pick on GD when - allocate fails - -2003-11-02 - - Added pcolor plot - - Added MRI example - - Fixed bug that screwed up label position if xticks or yticks were - empty - - added nearest neighbor color picker when GD max colors exceeded - - fixed figure background color bug in GD backend - -2003-11-10 - 2003-11-11 - - major refactoring. - * Ticks (with labels, lines and grid) handled by dedicated class - * Artist now know bounding box and dpi - * Bounding boxes and transforms handled by dedicated classes - * legend in dedicated class. Does a better job of alignment and - bordering. Can be initialized with specific line instances. - See examples/legend_demo2.py - - -2003-11-14 Fixed legend positioning bug and added new position args - -2003-11-16 Finsihed porting GD to new axes API - - -2003-11-20 - add TM for matlab on website and in docs - - -2003-11-20 - make a nice errorbar and scatter screenshot - -2003-11-20 - auto line style cycling for multiple line types - broken - -2003-11-18 (using inkrect) :logical rect too big on gtk backend - -2003-11-18 ticks don't reach edge of axes in gtk mode -- - rounding error? - -2003-11-20 - port Gary's errorbar code to new API before 0.40 - -2003-11-20 - problem with stale _set_font. legend axes box - doesn't resize on save in GTK backend -- see htdocs legend_demo.py - -2003-11-21 - make a dash-dot dict for the GC - -2003-12-15 - fix install path bug diff --git a/dev/_static/John-hunter-crop-2.jpg b/dev/_static/John-hunter-crop-2.jpg deleted file mode 100644 index 48abd2e5762..00000000000 Binary files a/dev/_static/John-hunter-crop-2.jpg and /dev/null differ diff --git a/dev/_static/ajax-loader.gif b/dev/_static/ajax-loader.gif deleted file mode 100644 index 61faf8cab23..00000000000 Binary files a/dev/_static/ajax-loader.gif and /dev/null differ diff --git a/dev/_static/basic.css b/dev/_static/basic.css deleted file mode 100644 index a04c8e13727..00000000000 --- a/dev/_static/basic.css +++ /dev/null @@ -1,540 +0,0 @@ -/* - * basic.css - * ~~~~~~~~~ - * - * Sphinx stylesheet -- basic theme. - * - * :copyright: Copyright 2007-2013 by the Sphinx team, see AUTHORS. - * :license: BSD, see LICENSE for details. - * - */ - -/* -- main layout ----------------------------------------------------------- */ - -div.clearer { - clear: both; -} - -/* -- relbar ---------------------------------------------------------------- */ - -div.related { - width: 100%; - font-size: 90%; -} - -div.related h3 { - display: none; -} - -div.related ul { - margin: 0; - padding: 0 0 0 10px; - list-style: none; -} - -div.related li { - display: inline; -} - -div.related li.right { - float: right; - margin-right: 5px; -} - -/* -- sidebar --------------------------------------------------------------- */ - -div.sphinxsidebarwrapper { - padding: 10px 5px 0 10px; -} - -div.sphinxsidebar { - float: left; - width: 230px; - margin-left: -100%; - font-size: 90%; -} - -div.sphinxsidebar ul { - list-style: none; -} - -div.sphinxsidebar ul ul, -div.sphinxsidebar ul.want-points { - margin-left: 20px; - list-style: square; -} - -div.sphinxsidebar ul ul { - margin-top: 0; - margin-bottom: 0; -} - -div.sphinxsidebar form { - margin-top: 10px; -} - -div.sphinxsidebar input { - border: 1px solid #98dbcc; - font-family: sans-serif; - font-size: 1em; -} - -div.sphinxsidebar #searchbox input[type="text"] { - width: 170px; -} - -div.sphinxsidebar #searchbox input[type="submit"] { - width: 30px; -} - -img { - border: 0; -} - -/* -- search page ----------------------------------------------------------- */ - -ul.search { - margin: 10px 0 0 20px; - padding: 0; -} - -ul.search li { - padding: 5px 0 5px 20px; - background-image: url(file.png); - background-repeat: no-repeat; - background-position: 0 7px; -} - -ul.search li a { - font-weight: bold; -} - -ul.search li div.context { - color: #888; - margin: 2px 0 0 30px; - text-align: left; -} - -ul.keywordmatches li.goodmatch a { - font-weight: bold; -} - -/* -- index page ------------------------------------------------------------ */ - -table.contentstable { - width: 90%; -} - -table.contentstable p.biglink { - line-height: 150%; -} - -a.biglink { - font-size: 1.3em; -} - -span.linkdescr { - font-style: italic; - padding-top: 5px; - font-size: 90%; -} - -/* -- general index --------------------------------------------------------- */ - -table.indextable { - width: 100%; -} - -table.indextable td { - text-align: left; - vertical-align: top; -} - -table.indextable dl, table.indextable dd { - margin-top: 0; - margin-bottom: 0; -} - -table.indextable tr.pcap { - height: 10px; -} - -table.indextable tr.cap { - margin-top: 10px; - background-color: #f2f2f2; -} - -img.toggler { - margin-right: 3px; - margin-top: 3px; - cursor: pointer; -} - -div.modindex-jumpbox { - border-top: 1px solid #ddd; - border-bottom: 1px solid #ddd; - margin: 1em 0 1em 0; - padding: 0.4em; -} - -div.genindex-jumpbox { - border-top: 1px solid #ddd; - border-bottom: 1px solid #ddd; - margin: 1em 0 1em 0; - padding: 0.4em; -} - -/* -- general body styles --------------------------------------------------- */ - -a.headerlink { - visibility: hidden; -} - -h1:hover > a.headerlink, -h2:hover > a.headerlink, -h3:hover > a.headerlink, -h4:hover > a.headerlink, -h5:hover > a.headerlink, -h6:hover > a.headerlink, -dt:hover > a.headerlink { - visibility: visible; -} - -div.body p.caption { - text-align: inherit; -} - -div.body td { - text-align: left; -} - -.field-list ul { - padding-left: 1em; -} - -.first { - margin-top: 0 !important; -} - -p.rubric { - margin-top: 30px; - font-weight: bold; -} - -img.align-left, .figure.align-left, object.align-left { - clear: left; - float: left; - margin-right: 1em; -} - -img.align-right, .figure.align-right, object.align-right { - clear: right; - float: right; - margin-left: 1em; -} - -img.align-center, .figure.align-center, object.align-center { - display: block; - margin-left: auto; - margin-right: auto; -} - -.align-left { - text-align: left; -} - -.align-center { - text-align: center; -} - -.align-right { - text-align: right; -} - -/* -- sidebars -------------------------------------------------------------- */ - -div.sidebar { - margin: 0 0 0.5em 1em; - border: 1px solid #ddb; - padding: 7px 7px 0 7px; - background-color: #ffe; - width: 40%; - float: right; -} - -p.sidebar-title { - font-weight: bold; -} - -/* -- topics ---------------------------------------------------------------- */ - -div.topic { - border: 1px solid #ccc; - padding: 7px 7px 0 7px; - margin: 10px 0 10px 0; -} - -p.topic-title { - font-size: 1.1em; - font-weight: bold; - margin-top: 10px; -} - -/* -- admonitions ----------------------------------------------------------- */ - -div.admonition { - margin-top: 10px; - margin-bottom: 10px; - padding: 7px; -} - -div.admonition dt { - font-weight: bold; -} - -div.admonition dl { - margin-bottom: 0; -} - -p.admonition-title { - margin: 0px 10px 5px 0px; - font-weight: bold; -} - -div.body p.centered { - text-align: center; - margin-top: 25px; -} - -/* -- tables ---------------------------------------------------------------- */ - -table.docutils { - border: 0; - border-collapse: collapse; -} - -table.docutils td, table.docutils th { - padding: 1px 8px 1px 5px; - border-top: 0; - border-left: 0; - border-right: 0; - border-bottom: 1px solid #aaa; -} - -table.field-list td, table.field-list th { - border: 0 !important; -} - -table.footnote td, table.footnote th { - border: 0 !important; -} - -th { - text-align: left; - padding-right: 5px; -} - -table.citation { - border-left: solid 1px gray; - margin-left: 1px; -} - -table.citation td { - border-bottom: none; -} - -/* -- other body styles ----------------------------------------------------- */ - -ol.arabic { - list-style: decimal; -} - -ol.loweralpha { - list-style: lower-alpha; -} - -ol.upperalpha { - list-style: upper-alpha; -} - -ol.lowerroman { - list-style: lower-roman; -} - -ol.upperroman { - list-style: upper-roman; -} - -dl { - margin-bottom: 15px; -} - -dd p { - margin-top: 0px; -} - -dd ul, dd table { - margin-bottom: 10px; -} - -dd { - margin-top: 3px; - margin-bottom: 10px; - margin-left: 30px; -} - -dt:target, .highlighted { - background-color: #fbe54e; -} - -dl.glossary dt { - font-weight: bold; - font-size: 1.1em; -} - -.field-list ul { - margin: 0; - padding-left: 1em; -} - -.field-list p { - margin: 0; -} - -.refcount { - color: #060; -} - -.optional { - font-size: 1.3em; -} - -.versionmodified { - font-style: italic; -} - -.system-message { - background-color: #fda; - padding: 5px; - border: 3px solid red; -} - -.footnote:target { - background-color: #ffa; -} - -.line-block { - display: block; - margin-top: 1em; - margin-bottom: 1em; -} - -.line-block .line-block { - margin-top: 0; - margin-bottom: 0; - margin-left: 1.5em; -} - -.guilabel, .menuselection { - font-family: sans-serif; -} - -.accelerator { - text-decoration: underline; -} - -.classifier { - font-style: oblique; -} - -abbr, acronym { - border-bottom: dotted 1px; - cursor: help; -} - -/* -- code displays --------------------------------------------------------- */ - -pre { - overflow: auto; - overflow-y: hidden; /* fixes display issues on Chrome browsers */ -} - -td.linenos pre { - padding: 5px 0px; - border: 0; - background-color: transparent; - color: #aaa; -} - -table.highlighttable { - margin-left: 0.5em; -} - -table.highlighttable td { - padding: 0 0.5em 0 0.5em; -} - -tt.descname { - background-color: transparent; - font-weight: bold; - font-size: 1.2em; -} - -tt.descclassname { - background-color: transparent; -} - -tt.xref, a tt { - background-color: transparent; - font-weight: bold; -} - -h1 tt, h2 tt, h3 tt, h4 tt, h5 tt, h6 tt { - background-color: transparent; -} - -.viewcode-link { - float: right; -} - -.viewcode-back { - float: right; - font-family: sans-serif; -} - -div.viewcode-block:target { - margin: -1px -10px; - padding: 0 10px; -} - -/* -- math display ---------------------------------------------------------- */ - -img.math { - vertical-align: middle; -} - -div.body div.math p { - text-align: center; -} - -span.eqno { - float: right; -} - -/* -- printout stylesheet --------------------------------------------------- */ - -@media print { - div.document, - div.documentwrapper, - div.bodywrapper { - margin: 0 !important; - width: 100%; - } - - div.sphinxsidebar, - div.related, - div.footer, - #top-link { - display: none; - } -} \ No newline at end of file diff --git a/dev/_static/cm_fontset.png b/dev/_static/cm_fontset.png deleted file mode 100644 index 328ba1348fa..00000000000 Binary files a/dev/_static/cm_fontset.png and /dev/null differ diff --git a/dev/_static/comment-bright.png b/dev/_static/comment-bright.png deleted file mode 100644 index 551517b8c83..00000000000 Binary files a/dev/_static/comment-bright.png and /dev/null differ diff --git a/dev/_static/comment-close.png b/dev/_static/comment-close.png deleted file mode 100644 index 09b54be46da..00000000000 Binary files a/dev/_static/comment-close.png and /dev/null differ diff --git a/dev/_static/comment.png b/dev/_static/comment.png deleted file mode 100644 index 92feb52b882..00000000000 Binary files a/dev/_static/comment.png and /dev/null differ diff --git a/dev/_static/contents.png b/dev/_static/contents.png deleted file mode 100644 index 7fb82154a17..00000000000 Binary files a/dev/_static/contents.png and /dev/null differ diff --git a/dev/_static/default.css b/dev/_static/default.css deleted file mode 100644 index e534a07802b..00000000000 --- a/dev/_static/default.css +++ /dev/null @@ -1,256 +0,0 @@ -/* - * default.css_t - * ~~~~~~~~~~~~~ - * - * Sphinx stylesheet -- default theme. - * - * :copyright: Copyright 2007-2013 by the Sphinx team, see AUTHORS. - * :license: BSD, see LICENSE for details. - * - */ - -@import url("basic.css"); - -/* -- page layout ----------------------------------------------------------- */ - -body { - font-family: sans-serif; - font-size: 100%; - background-color: #11303d; - color: #000; - margin: 0; - padding: 0; -} - -div.document { - background-color: #1c4e63; -} - -div.documentwrapper { - float: left; - width: 100%; -} - -div.bodywrapper { - margin: 0 0 0 230px; -} - -div.body { - background-color: #ffffff; - color: #000000; - padding: 0 20px 30px 20px; -} - -div.footer { - color: #ffffff; - width: 100%; - padding: 9px 0 9px 0; - text-align: center; - font-size: 75%; -} - -div.footer a { - color: #ffffff; - text-decoration: underline; -} - -div.related { - background-color: #133f52; - line-height: 30px; - color: #ffffff; -} - -div.related a { - color: #ffffff; -} - -div.sphinxsidebar { -} - -div.sphinxsidebar h3 { - font-family: 'Trebuchet MS', sans-serif; - color: #ffffff; - font-size: 1.4em; - font-weight: normal; - margin: 0; - padding: 0; -} - -div.sphinxsidebar h3 a { - color: #ffffff; -} - -div.sphinxsidebar h4 { - font-family: 'Trebuchet MS', sans-serif; - color: #ffffff; - font-size: 1.3em; - font-weight: normal; - margin: 5px 0 0 0; - padding: 0; -} - -div.sphinxsidebar p { - color: #ffffff; -} - -div.sphinxsidebar p.topless { - margin: 5px 10px 10px 10px; -} - -div.sphinxsidebar ul { - margin: 10px; - padding: 0; - color: #ffffff; -} - -div.sphinxsidebar a { - color: #98dbcc; -} - -div.sphinxsidebar input { - border: 1px solid #98dbcc; - font-family: sans-serif; - font-size: 1em; -} - - - -/* -- hyperlink styles ------------------------------------------------------ */ - -a { - color: #355f7c; - text-decoration: none; -} - -a:visited { - color: #355f7c; - text-decoration: none; -} - -a:hover { - text-decoration: underline; -} - - - -/* -- body styles ----------------------------------------------------------- */ - -div.body h1, -div.body h2, -div.body h3, -div.body h4, -div.body h5, -div.body h6 { - font-family: 'Trebuchet MS', sans-serif; - background-color: #f2f2f2; - font-weight: normal; - color: #20435c; - border-bottom: 1px solid #ccc; - margin: 20px -20px 10px -20px; - padding: 3px 0 3px 10px; -} - -div.body h1 { margin-top: 0; font-size: 200%; } -div.body h2 { font-size: 160%; } -div.body h3 { font-size: 140%; } -div.body h4 { font-size: 120%; } -div.body h5 { font-size: 110%; } -div.body h6 { font-size: 100%; } - -a.headerlink { - color: #c60f0f; - font-size: 0.8em; - padding: 0 4px 0 4px; - text-decoration: none; -} - -a.headerlink:hover { - background-color: #c60f0f; - color: white; -} - -div.body p, div.body dd, div.body li { - text-align: justify; - line-height: 130%; -} - -div.admonition p.admonition-title + p { - display: inline; -} - -div.admonition p { - margin-bottom: 5px; -} - -div.admonition pre { - margin-bottom: 5px; -} - -div.admonition ul, div.admonition ol { - margin-bottom: 5px; -} - -div.note { - background-color: #eee; - border: 1px solid #ccc; -} - -div.seealso { - background-color: #ffc; - border: 1px solid #ff6; -} - -div.topic { - background-color: #eee; -} - -div.warning { - background-color: #ffe4e4; - border: 1px solid #f66; -} - -p.admonition-title { - display: inline; -} - -p.admonition-title:after { - content: ":"; -} - -pre { - padding: 5px; - background-color: #eeffcc; - color: #333333; - line-height: 120%; - border: 1px solid #ac9; - border-left: none; - border-right: none; -} - -tt { - background-color: #ecf0f3; - padding: 0 1px 0 1px; - font-size: 0.95em; -} - -th { - background-color: #ede; -} - -.warning tt { - background: #efc2c2; -} - -.note tt { - background: #d6d6d6; -} - -.viewcode-back { - font-family: sans-serif; -} - -div.viewcode-block:target { - background-color: #f4debf; - border-top: 1px solid #ac9; - border-bottom: 1px solid #ac9; -} \ No newline at end of file diff --git a/dev/_static/demo_axes_grid.png b/dev/_static/demo_axes_grid.png deleted file mode 100644 index 9af9fdfe638..00000000000 Binary files a/dev/_static/demo_axes_grid.png and /dev/null differ diff --git a/dev/_static/demo_mplot3d.png b/dev/_static/demo_mplot3d.png deleted file mode 100644 index e1d9b77240f..00000000000 Binary files a/dev/_static/demo_mplot3d.png and /dev/null differ diff --git a/dev/_static/doctools.js b/dev/_static/doctools.js deleted file mode 100644 index 8614442ebe8..00000000000 --- a/dev/_static/doctools.js +++ /dev/null @@ -1,235 +0,0 @@ -/* - * doctools.js - * ~~~~~~~~~~~ - * - * Sphinx JavaScript utilities for all documentation. - * - * :copyright: Copyright 2007-2013 by the Sphinx team, see AUTHORS. - * :license: BSD, see LICENSE for details. - * - */ - -/** - * select a different prefix for underscore - */ -$u = _.noConflict(); - -/** - * make the code below compatible with browsers without - * an installed firebug like debugger -if (!window.console || !console.firebug) { - var names = ["log", "debug", "info", "warn", "error", "assert", "dir", - "dirxml", "group", "groupEnd", "time", "timeEnd", "count", "trace", - "profile", "profileEnd"]; - window.console = {}; - for (var i = 0; i < names.length; ++i) - window.console[names[i]] = function() {}; -} - */ - -/** - * small helper function to urldecode strings - */ -jQuery.urldecode = function(x) { - return decodeURIComponent(x).replace(/\+/g, ' '); -}; - -/** - * small helper function to urlencode strings - */ -jQuery.urlencode = encodeURIComponent; - -/** - * This function returns the parsed url parameters of the - * current request. Multiple values per key are supported, - * it will always return arrays of strings for the value parts. - */ -jQuery.getQueryParameters = function(s) { - if (typeof s == 'undefined') - s = document.location.search; - var parts = s.substr(s.indexOf('?') + 1).split('&'); - var result = {}; - for (var i = 0; i < parts.length; i++) { - var tmp = parts[i].split('=', 2); - var key = jQuery.urldecode(tmp[0]); - var value = jQuery.urldecode(tmp[1]); - if (key in result) - result[key].push(value); - else - result[key] = [value]; - } - return result; -}; - -/** - * highlight a given string on a jquery object by wrapping it in - * span elements with the given class name. - */ -jQuery.fn.highlightText = function(text, className) { - function highlight(node) { - if (node.nodeType == 3) { - var val = node.nodeValue; - var pos = val.toLowerCase().indexOf(text); - if (pos >= 0 && !jQuery(node.parentNode).hasClass(className)) { - var span = document.createElement("span"); - span.className = className; - span.appendChild(document.createTextNode(val.substr(pos, text.length))); - node.parentNode.insertBefore(span, node.parentNode.insertBefore( - document.createTextNode(val.substr(pos + text.length)), - node.nextSibling)); - node.nodeValue = val.substr(0, pos); - } - } - else if (!jQuery(node).is("button, select, textarea")) { - jQuery.each(node.childNodes, function() { - highlight(this); - }); - } - } - return this.each(function() { - highlight(this); - }); -}; - -/** - * Small JavaScript module for the documentation. - */ -var Documentation = { - - init : function() { - this.fixFirefoxAnchorBug(); - this.highlightSearchWords(); - this.initIndexTable(); - }, - - /** - * i18n support - */ - TRANSLATIONS : {}, - PLURAL_EXPR : function(n) { return n == 1 ? 0 : 1; }, - LOCALE : 'unknown', - - // gettext and ngettext don't access this so that the functions - // can safely bound to a different name (_ = Documentation.gettext) - gettext : function(string) { - var translated = Documentation.TRANSLATIONS[string]; - if (typeof translated == 'undefined') - return string; - return (typeof translated == 'string') ? translated : translated[0]; - }, - - ngettext : function(singular, plural, n) { - var translated = Documentation.TRANSLATIONS[singular]; - if (typeof translated == 'undefined') - return (n == 1) ? singular : plural; - return translated[Documentation.PLURALEXPR(n)]; - }, - - addTranslations : function(catalog) { - for (var key in catalog.messages) - this.TRANSLATIONS[key] = catalog.messages[key]; - this.PLURAL_EXPR = new Function('n', 'return +(' + catalog.plural_expr + ')'); - this.LOCALE = catalog.locale; - }, - - /** - * add context elements like header anchor links - */ - addContextElements : function() { - $('div[id] > :header:first').each(function() { - $('\u00B6'). - attr('href', '#' + this.id). - attr('title', _('Permalink to this headline')). - appendTo(this); - }); - $('dt[id]').each(function() { - $('\u00B6'). - attr('href', '#' + this.id). - attr('title', _('Permalink to this definition')). - appendTo(this); - }); - }, - - /** - * workaround a firefox stupidity - */ - fixFirefoxAnchorBug : function() { - if (document.location.hash && $.browser.mozilla) - window.setTimeout(function() { - document.location.href += ''; - }, 10); - }, - - /** - * highlight the search words provided in the url in the text - */ - highlightSearchWords : function() { - var params = $.getQueryParameters(); - var terms = (params.highlight) ? params.highlight[0].split(/\s+/) : []; - if (terms.length) { - var body = $('div.body'); - window.setTimeout(function() { - $.each(terms, function() { - body.highlightText(this.toLowerCase(), 'highlighted'); - }); - }, 10); - $('') - .appendTo($('#searchbox')); - } - }, - - /** - * init the domain index toggle buttons - */ - initIndexTable : function() { - var togglers = $('img.toggler').click(function() { - var src = $(this).attr('src'); - var idnum = $(this).attr('id').substr(7); - $('tr.cg-' + idnum).toggle(); - if (src.substr(-9) == 'minus.png') - $(this).attr('src', src.substr(0, src.length-9) + 'plus.png'); - else - $(this).attr('src', src.substr(0, src.length-8) + 'minus.png'); - }).css('display', ''); - if (DOCUMENTATION_OPTIONS.COLLAPSE_INDEX) { - togglers.click(); - } - }, - - /** - * helper function to hide the search marks again - */ - hideSearchWords : function() { - $('#searchbox .highlight-link').fadeOut(300); - $('span.highlighted').removeClass('highlighted'); - }, - - /** - * make the url absolute - */ - makeURL : function(relativeURL) { - return DOCUMENTATION_OPTIONS.URL_ROOT + '/' + relativeURL; - }, - - /** - * get the current relative url - */ - getCurrentURL : function() { - var path = document.location.pathname; - var parts = path.split(/\//); - $.each(DOCUMENTATION_OPTIONS.URL_ROOT.split(/\//), function() { - if (this == '..') - parts.pop(); - }); - var url = parts.join('/'); - return path.substring(url.lastIndexOf('/') + 1, path.length - 1); - } -}; - -// quick alias for translations -_ = Documentation.gettext; - -$(document).ready(function() { - Documentation.init(); -}); diff --git a/dev/_static/down-pressed.png b/dev/_static/down-pressed.png deleted file mode 100644 index 6f7ad782782..00000000000 Binary files a/dev/_static/down-pressed.png and /dev/null differ diff --git a/dev/_static/down.png b/dev/_static/down.png deleted file mode 100644 index 3003a88770d..00000000000 Binary files a/dev/_static/down.png and /dev/null differ diff --git a/dev/_static/eeg_large.png b/dev/_static/eeg_large.png deleted file mode 100644 index 6224f4c2de6..00000000000 Binary files a/dev/_static/eeg_large.png and /dev/null differ diff --git a/dev/_static/eeg_small.png b/dev/_static/eeg_small.png deleted file mode 100644 index fb02af5b4a3..00000000000 Binary files a/dev/_static/eeg_small.png and /dev/null differ diff --git a/dev/_static/favicon.ico b/dev/_static/favicon.ico deleted file mode 100644 index dc57242b5b9..00000000000 Binary files a/dev/_static/favicon.ico and /dev/null differ diff --git a/dev/_static/file.png b/dev/_static/file.png deleted file mode 100644 index d18082e397e..00000000000 Binary files a/dev/_static/file.png and /dev/null differ diff --git a/dev/_static/icon.png b/dev/_static/icon.png deleted file mode 100644 index 3ec68e5014a..00000000000 Binary files a/dev/_static/icon.png and /dev/null differ diff --git a/dev/_static/jquery.js b/dev/_static/jquery.js deleted file mode 100644 index 198b3ff07d8..00000000000 --- a/dev/_static/jquery.js +++ /dev/null @@ -1,4 +0,0 @@ -/*! jQuery v1.7.1 jquery.com | jquery.org/license */ -(function(a,b){function cy(a){return f.isWindow(a)?a:a.nodeType===9?a.defaultView||a.parentWindow:!1}function cv(a){if(!ck[a]){var b=c.body,d=f("<"+a+">").appendTo(b),e=d.css("display");d.remove();if(e==="none"||e===""){cl||(cl=c.createElement("iframe"),cl.frameBorder=cl.width=cl.height=0),b.appendChild(cl);if(!cm||!cl.createElement)cm=(cl.contentWindow||cl.contentDocument).document,cm.write((c.compatMode==="CSS1Compat"?"":"")+""),cm.close();d=cm.createElement(a),cm.body.appendChild(d),e=f.css(d,"display"),b.removeChild(cl)}ck[a]=e}return ck[a]}function cu(a,b){var c={};f.each(cq.concat.apply([],cq.slice(0,b)),function(){c[this]=a});return c}function ct(){cr=b}function cs(){setTimeout(ct,0);return cr=f.now()}function cj(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}function ci(){try{return new a.XMLHttpRequest}catch(b){}}function cc(a,c){a.dataFilter&&(c=a.dataFilter(c,a.dataType));var d=a.dataTypes,e={},g,h,i=d.length,j,k=d[0],l,m,n,o,p;for(g=1;g0){if(c!=="border")for(;g=0===c})}function S(a){return!a||!a.parentNode||a.parentNode.nodeType===11}function K(){return!0}function J(){return!1}function n(a,b,c){var d=b+"defer",e=b+"queue",g=b+"mark",h=f._data(a,d);h&&(c==="queue"||!f._data(a,e))&&(c==="mark"||!f._data(a,g))&&setTimeout(function(){!f._data(a,e)&&!f._data(a,g)&&(f.removeData(a,d,!0),h.fire())},0)}function m(a){for(var b in a){if(b==="data"&&f.isEmptyObject(a[b]))continue;if(b!=="toJSON")return!1}return!0}function l(a,c,d){if(d===b&&a.nodeType===1){var e="data-"+c.replace(k,"-$1").toLowerCase();d=a.getAttribute(e);if(typeof d=="string"){try{d=d==="true"?!0:d==="false"?!1:d==="null"?null:f.isNumeric(d)?parseFloat(d):j.test(d)?f.parseJSON(d):d}catch(g){}f.data(a,c,d)}else d=b}return d}function h(a){var b=g[a]={},c,d;a=a.split(/\s+/);for(c=0,d=a.length;c)[^>]*$|#([\w\-]*)$)/,j=/\S/,k=/^\s+/,l=/\s+$/,m=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,n=/^[\],:{}\s]*$/,o=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,p=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,q=/(?:^|:|,)(?:\s*\[)+/g,r=/(webkit)[ \/]([\w.]+)/,s=/(opera)(?:.*version)?[ \/]([\w.]+)/,t=/(msie) ([\w.]+)/,u=/(mozilla)(?:.*? rv:([\w.]+))?/,v=/-([a-z]|[0-9])/ig,w=/^-ms-/,x=function(a,b){return(b+"").toUpperCase()},y=d.userAgent,z,A,B,C=Object.prototype.toString,D=Object.prototype.hasOwnProperty,E=Array.prototype.push,F=Array.prototype.slice,G=String.prototype.trim,H=Array.prototype.indexOf,I={};e.fn=e.prototype={constructor:e,init:function(a,d,f){var g,h,j,k;if(!a)return this;if(a.nodeType){this.context=this[0]=a,this.length=1;return this}if(a==="body"&&!d&&c.body){this.context=c,this[0]=c.body,this.selector=a,this.length=1;return this}if(typeof a=="string"){a.charAt(0)!=="<"||a.charAt(a.length-1)!==">"||a.length<3?g=i.exec(a):g=[null,a,null];if(g&&(g[1]||!d)){if(g[1]){d=d instanceof e?d[0]:d,k=d?d.ownerDocument||d:c,j=m.exec(a),j?e.isPlainObject(d)?(a=[c.createElement(j[1])],e.fn.attr.call(a,d,!0)):a=[k.createElement(j[1])]:(j=e.buildFragment([g[1]],[k]),a=(j.cacheable?e.clone(j.fragment):j.fragment).childNodes);return e.merge(this,a)}h=c.getElementById(g[2]);if(h&&h.parentNode){if(h.id!==g[2])return f.find(a);this.length=1,this[0]=h}this.context=c,this.selector=a;return this}return!d||d.jquery?(d||f).find(a):this.constructor(d).find(a)}if(e.isFunction(a))return f.ready(a);a.selector!==b&&(this.selector=a.selector,this.context=a.context);return e.makeArray(a,this)},selector:"",jquery:"1.7.1",length:0,size:function(){return this.length},toArray:function(){return F.call(this,0)},get:function(a){return a==null?this.toArray():a<0?this[this.length+a]:this[a]},pushStack:function(a,b,c){var d=this.constructor();e.isArray(a)?E.apply(d,a):e.merge(d,a),d.prevObject=this,d.context=this.context,b==="find"?d.selector=this.selector+(this.selector?" ":"")+c:b&&(d.selector=this.selector+"."+b+"("+c+")");return d},each:function(a,b){return e.each(this,a,b)},ready:function(a){e.bindReady(),A.add(a);return this},eq:function(a){a=+a;return a===-1?this.slice(a):this.slice(a,a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(F.apply(this,arguments),"slice",F.call(arguments).join(","))},map:function(a){return this.pushStack(e.map(this,function(b,c){return a.call(b,c,b)}))},end:function(){return this.prevObject||this.constructor(null)},push:E,sort:[].sort,splice:[].splice},e.fn.init.prototype=e.fn,e.extend=e.fn.extend=function(){var a,c,d,f,g,h,i=arguments[0]||{},j=1,k=arguments.length,l=!1;typeof i=="boolean"&&(l=i,i=arguments[1]||{},j=2),typeof i!="object"&&!e.isFunction(i)&&(i={}),k===j&&(i=this,--j);for(;j0)return;A.fireWith(c,[e]),e.fn.trigger&&e(c).trigger("ready").off("ready")}},bindReady:function(){if(!A){A=e.Callbacks("once memory");if(c.readyState==="complete")return setTimeout(e.ready,1);if(c.addEventListener)c.addEventListener("DOMContentLoaded",B,!1),a.addEventListener("load",e.ready,!1);else if(c.attachEvent){c.attachEvent("onreadystatechange",B),a.attachEvent("onload",e.ready);var b=!1;try{b=a.frameElement==null}catch(d){}c.documentElement.doScroll&&b&&J()}}},isFunction:function(a){return e.type(a)==="function"},isArray:Array.isArray||function(a){return e.type(a)==="array"},isWindow:function(a){return a&&typeof a=="object"&&"setInterval"in a},isNumeric:function(a){return!isNaN(parseFloat(a))&&isFinite(a)},type:function(a){return a==null?String(a):I[C.call(a)]||"object"},isPlainObject:function(a){if(!a||e.type(a)!=="object"||a.nodeType||e.isWindow(a))return!1;try{if(a.constructor&&!D.call(a,"constructor")&&!D.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}var d;for(d in a);return d===b||D.call(a,d)},isEmptyObject:function(a){for(var b in a)return!1;return!0},error:function(a){throw new Error(a)},parseJSON:function(b){if(typeof b!="string"||!b)return null;b=e.trim(b);if(a.JSON&&a.JSON.parse)return a.JSON.parse(b);if(n.test(b.replace(o,"@").replace(p,"]").replace(q,"")))return(new Function("return "+b))();e.error("Invalid JSON: "+b)},parseXML:function(c){var d,f;try{a.DOMParser?(f=new DOMParser,d=f.parseFromString(c,"text/xml")):(d=new ActiveXObject("Microsoft.XMLDOM"),d.async="false",d.loadXML(c))}catch(g){d=b}(!d||!d.documentElement||d.getElementsByTagName("parsererror").length)&&e.error("Invalid XML: "+c);return d},noop:function(){},globalEval:function(b){b&&j.test(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(w,"ms-").replace(v,x)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toUpperCase()===b.toUpperCase()},each:function(a,c,d){var f,g=0,h=a.length,i=h===b||e.isFunction(a);if(d){if(i){for(f in a)if(c.apply(a[f],d)===!1)break}else for(;g0&&a[0]&&a[j-1]||j===0||e.isArray(a));if(k)for(;i1?i.call(arguments,0):b,j.notifyWith(k,e)}}function l(a){return function(c){b[a]=arguments.length>1?i.call(arguments,0):c,--g||j.resolveWith(j,b)}}var b=i.call(arguments,0),c=0,d=b.length,e=Array(d),g=d,h=d,j=d<=1&&a&&f.isFunction(a.promise)?a:f.Deferred(),k=j.promise();if(d>1){for(;c
a",d=q.getElementsByTagName("*"),e=q.getElementsByTagName("a")[0];if(!d||!d.length||!e)return{};g=c.createElement("select"),h=g.appendChild(c.createElement("option")),i=q.getElementsByTagName("input")[0],b={leadingWhitespace:q.firstChild.nodeType===3,tbody:!q.getElementsByTagName("tbody").length,htmlSerialize:!!q.getElementsByTagName("link").length,style:/top/.test(e.getAttribute("style")),hrefNormalized:e.getAttribute("href")==="/a",opacity:/^0.55/.test(e.style.opacity),cssFloat:!!e.style.cssFloat,checkOn:i.value==="on",optSelected:h.selected,getSetAttribute:q.className!=="t",enctype:!!c.createElement("form").enctype,html5Clone:c.createElement("nav").cloneNode(!0).outerHTML!=="<:nav>",submitBubbles:!0,changeBubbles:!0,focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0},i.checked=!0,b.noCloneChecked=i.cloneNode(!0).checked,g.disabled=!0,b.optDisabled=!h.disabled;try{delete q.test}catch(s){b.deleteExpando=!1}!q.addEventListener&&q.attachEvent&&q.fireEvent&&(q.attachEvent("onclick",function(){b.noCloneEvent=!1}),q.cloneNode(!0).fireEvent("onclick")),i=c.createElement("input"),i.value="t",i.setAttribute("type","radio"),b.radioValue=i.value==="t",i.setAttribute("checked","checked"),q.appendChild(i),k=c.createDocumentFragment(),k.appendChild(q.lastChild),b.checkClone=k.cloneNode(!0).cloneNode(!0).lastChild.checked,b.appendChecked=i.checked,k.removeChild(i),k.appendChild(q),q.innerHTML="",a.getComputedStyle&&(j=c.createElement("div"),j.style.width="0",j.style.marginRight="0",q.style.width="2px",q.appendChild(j),b.reliableMarginRight=(parseInt((a.getComputedStyle(j,null)||{marginRight:0}).marginRight,10)||0)===0);if(q.attachEvent)for(o in{submit:1,change:1,focusin:1})n="on"+o,p=n in q,p||(q.setAttribute(n,"return;"),p=typeof q[n]=="function"),b[o+"Bubbles"]=p;k.removeChild(q),k=g=h=j=q=i=null,f(function(){var a,d,e,g,h,i,j,k,m,n,o,r=c.getElementsByTagName("body")[0];!r||(j=1,k="position:absolute;top:0;left:0;width:1px;height:1px;margin:0;",m="visibility:hidden;border:0;",n="style='"+k+"border:5px solid #000;padding:0;'",o="
"+""+"
",a=c.createElement("div"),a.style.cssText=m+"width:0;height:0;position:static;top:0;margin-top:"+j+"px",r.insertBefore(a,r.firstChild),q=c.createElement("div"),a.appendChild(q),q.innerHTML="
t
",l=q.getElementsByTagName("td"),p=l[0].offsetHeight===0,l[0].style.display="",l[1].style.display="none",b.reliableHiddenOffsets=p&&l[0].offsetHeight===0,q.innerHTML="",q.style.width=q.style.paddingLeft="1px",f.boxModel=b.boxModel=q.offsetWidth===2,typeof q.style.zoom!="undefined"&&(q.style.display="inline",q.style.zoom=1,b.inlineBlockNeedsLayout=q.offsetWidth===2,q.style.display="",q.innerHTML="
",b.shrinkWrapBlocks=q.offsetWidth!==2),q.style.cssText=k+m,q.innerHTML=o,d=q.firstChild,e=d.firstChild,h=d.nextSibling.firstChild.firstChild,i={doesNotAddBorder:e.offsetTop!==5,doesAddBorderForTableAndCells:h.offsetTop===5},e.style.position="fixed",e.style.top="20px",i.fixedPosition=e.offsetTop===20||e.offsetTop===15,e.style.position=e.style.top="",d.style.overflow="hidden",d.style.position="relative",i.subtractsBorderForOverflowNotVisible=e.offsetTop===-5,i.doesNotIncludeMarginInBodyOffset=r.offsetTop!==j,r.removeChild(a),q=a=null,f.extend(b,i))});return b}();var j=/^(?:\{.*\}|\[.*\])$/,k=/([A-Z])/g;f.extend({cache:{},uuid:0,expando:"jQuery"+(f.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(a){a=a.nodeType?f.cache[a[f.expando]]:a[f.expando];return!!a&&!m(a)},data:function(a,c,d,e){if(!!f.acceptData(a)){var g,h,i,j=f.expando,k=typeof c=="string",l=a.nodeType,m=l?f.cache:a,n=l?a[j]:a[j]&&j,o=c==="events";if((!n||!m[n]||!o&&!e&&!m[n].data)&&k&&d===b)return;n||(l?a[j]=n=++f.uuid:n=j),m[n]||(m[n]={},l||(m[n].toJSON=f.noop));if(typeof c=="object"||typeof c=="function")e?m[n]=f.extend(m[n],c):m[n].data=f.extend(m[n].data,c);g=h=m[n],e||(h.data||(h.data={}),h=h.data),d!==b&&(h[f.camelCase(c)]=d);if(o&&!h[c])return g.events;k?(i=h[c],i==null&&(i=h[f.camelCase(c)])):i=h;return i}},removeData:function(a,b,c){if(!!f.acceptData(a)){var d,e,g,h=f.expando,i=a.nodeType,j=i?f.cache:a,k=i?a[h]:h;if(!j[k])return;if(b){d=c?j[k]:j[k].data;if(d){f.isArray(b)||(b in d?b=[b]:(b=f.camelCase(b),b in d?b=[b]:b=b.split(" ")));for(e=0,g=b.length;e-1)return!0;return!1},val:function(a){var c,d,e,g=this[0];{if(!!arguments.length){e=f.isFunction(a);return this.each(function(d){var g=f(this),h;if(this.nodeType===1){e?h=a.call(this,d,g.val()):h=a,h==null?h="":typeof h=="number"?h+="":f.isArray(h)&&(h=f.map(h,function(a){return a==null?"":a+""})),c=f.valHooks[this.nodeName.toLowerCase()]||f.valHooks[this.type];if(!c||!("set"in c)||c.set(this,h,"value")===b)this.value=h}})}if(g){c=f.valHooks[g.nodeName.toLowerCase()]||f.valHooks[g.type];if(c&&"get"in c&&(d=c.get(g,"value"))!==b)return d;d=g.value;return typeof d=="string"?d.replace(q,""):d==null?"":d}}}}),f.extend({valHooks:{option:{get:function(a){var b=a.attributes.value;return!b||b.specified?a.value:a.text}},select:{get:function(a){var b,c,d,e,g=a.selectedIndex,h=[],i=a.options,j=a.type==="select-one";if(g<0)return null;c=j?g:0,d=j?g+1:i.length;for(;c=0}),c.length||(a.selectedIndex=-1);return c}}},attrFn:{val:!0,css:!0,html:!0,text:!0,data:!0,width:!0,height:!0,offset:!0},attr:function(a,c,d,e){var g,h,i,j=a.nodeType;if(!!a&&j!==3&&j!==8&&j!==2){if(e&&c in f.attrFn)return f(a)[c](d);if(typeof a.getAttribute=="undefined")return f.prop(a,c,d);i=j!==1||!f.isXMLDoc(a),i&&(c=c.toLowerCase(),h=f.attrHooks[c]||(u.test(c)?x:w));if(d!==b){if(d===null){f.removeAttr(a,c);return}if(h&&"set"in h&&i&&(g=h.set(a,d,c))!==b)return g;a.setAttribute(c,""+d);return d}if(h&&"get"in h&&i&&(g=h.get(a,c))!==null)return g;g=a.getAttribute(c);return g===null?b:g}},removeAttr:function(a,b){var c,d,e,g,h=0;if(b&&a.nodeType===1){d=b.toLowerCase().split(p),g=d.length;for(;h=0}})});var z=/^(?:textarea|input|select)$/i,A=/^([^\.]*)?(?:\.(.+))?$/,B=/\bhover(\.\S+)?\b/,C=/^key/,D=/^(?:mouse|contextmenu)|click/,E=/^(?:focusinfocus|focusoutblur)$/,F=/^(\w*)(?:#([\w\-]+))?(?:\.([\w\-]+))?$/,G=function(a){var b=F.exec(a);b&&(b[1]=(b[1]||"").toLowerCase(),b[3]=b[3]&&new RegExp("(?:^|\\s)"+b[3]+"(?:\\s|$)"));return b},H=function(a,b){var c=a.attributes||{};return(!b[1]||a.nodeName.toLowerCase()===b[1])&&(!b[2]||(c.id||{}).value===b[2])&&(!b[3]||b[3].test((c["class"]||{}).value))},I=function(a){return f.event.special.hover?a:a.replace(B,"mouseenter$1 mouseleave$1")}; -f.event={add:function(a,c,d,e,g){var h,i,j,k,l,m,n,o,p,q,r,s;if(!(a.nodeType===3||a.nodeType===8||!c||!d||!(h=f._data(a)))){d.handler&&(p=d,d=p.handler),d.guid||(d.guid=f.guid++),j=h.events,j||(h.events=j={}),i=h.handle,i||(h.handle=i=function(a){return typeof f!="undefined"&&(!a||f.event.triggered!==a.type)?f.event.dispatch.apply(i.elem,arguments):b},i.elem=a),c=f.trim(I(c)).split(" ");for(k=0;k=0&&(h=h.slice(0,-1),k=!0),h.indexOf(".")>=0&&(i=h.split("."),h=i.shift(),i.sort());if((!e||f.event.customEvent[h])&&!f.event.global[h])return;c=typeof c=="object"?c[f.expando]?c:new f.Event(h,c):new f.Event(h),c.type=h,c.isTrigger=!0,c.exclusive=k,c.namespace=i.join("."),c.namespace_re=c.namespace?new RegExp("(^|\\.)"+i.join("\\.(?:.*\\.)?")+"(\\.|$)"):null,o=h.indexOf(":")<0?"on"+h:"";if(!e){j=f.cache;for(l in j)j[l].events&&j[l].events[h]&&f.event.trigger(c,d,j[l].handle.elem,!0);return}c.result=b,c.target||(c.target=e),d=d!=null?f.makeArray(d):[],d.unshift(c),p=f.event.special[h]||{};if(p.trigger&&p.trigger.apply(e,d)===!1)return;r=[[e,p.bindType||h]];if(!g&&!p.noBubble&&!f.isWindow(e)){s=p.delegateType||h,m=E.test(s+h)?e:e.parentNode,n=null;for(;m;m=m.parentNode)r.push([m,s]),n=m;n&&n===e.ownerDocument&&r.push([n.defaultView||n.parentWindow||a,s])}for(l=0;le&&i.push({elem:this,matches:d.slice(e)});for(j=0;j0?this.on(b,null,a,c):this.trigger(b)},f.attrFn&&(f.attrFn[b]=!0),C.test(b)&&(f.event.fixHooks[b]=f.event.keyHooks),D.test(b)&&(f.event.fixHooks[b]=f.event.mouseHooks)}),function(){function x(a,b,c,e,f,g){for(var h=0,i=e.length;h0){k=j;break}}j=j[a]}e[h]=k}}}function w(a,b,c,e,f,g){for(var h=0,i=e.length;h+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,d="sizcache"+(Math.random()+"").replace(".",""),e=0,g=Object.prototype.toString,h=!1,i=!0,j=/\\/g,k=/\r\n/g,l=/\W/;[0,0].sort(function(){i=!1;return 0});var m=function(b,d,e,f){e=e||[],d=d||c;var h=d;if(d.nodeType!==1&&d.nodeType!==9)return[];if(!b||typeof b!="string")return e;var i,j,k,l,n,q,r,t,u=!0,v=m.isXML(d),w=[],x=b;do{a.exec(""),i=a.exec(x);if(i){x=i[3],w.push(i[1]);if(i[2]){l=i[3];break}}}while(i);if(w.length>1&&p.exec(b))if(w.length===2&&o.relative[w[0]])j=y(w[0]+w[1],d,f);else{j=o.relative[w[0]]?[d]:m(w.shift(),d);while(w.length)b=w.shift(),o.relative[b]&&(b+=w.shift()),j=y(b,j,f)}else{!f&&w.length>1&&d.nodeType===9&&!v&&o.match.ID.test(w[0])&&!o.match.ID.test(w[w.length-1])&&(n=m.find(w.shift(),d,v),d=n.expr?m.filter(n.expr,n.set)[0]:n.set[0]);if(d){n=f?{expr:w.pop(),set:s(f)}:m.find(w.pop(),w.length===1&&(w[0]==="~"||w[0]==="+")&&d.parentNode?d.parentNode:d,v),j=n.expr?m.filter(n.expr,n.set):n.set,w.length>0?k=s(j):u=!1;while(w.length)q=w.pop(),r=q,o.relative[q]?r=w.pop():q="",r==null&&(r=d),o.relative[q](k,r,v)}else k=w=[]}k||(k=j),k||m.error(q||b);if(g.call(k)==="[object Array]")if(!u)e.push.apply(e,k);else if(d&&d.nodeType===1)for(t=0;k[t]!=null;t++)k[t]&&(k[t]===!0||k[t].nodeType===1&&m.contains(d,k[t]))&&e.push(j[t]);else for(t=0;k[t]!=null;t++)k[t]&&k[t].nodeType===1&&e.push(j[t]);else s(k,e);l&&(m(l,h,e,f),m.uniqueSort(e));return e};m.uniqueSort=function(a){if(u){h=i,a.sort(u);if(h)for(var b=1;b0},m.find=function(a,b,c){var d,e,f,g,h,i;if(!a)return[];for(e=0,f=o.order.length;e":function(a,b){var c,d=typeof b=="string",e=0,f=a.length;if(d&&!l.test(b)){b=b.toLowerCase();for(;e=0)?c||d.push(h):c&&(b[g]=!1));return!1},ID:function(a){return a[1].replace(j,"")},TAG:function(a,b){return a[1].replace(j,"").toLowerCase()},CHILD:function(a){if(a[1]==="nth"){a[2]||m.error(a[0]),a[2]=a[2].replace(/^\+|\s*/g,"");var b=/(-?)(\d*)(?:n([+\-]?\d*))?/.exec(a[2]==="even"&&"2n"||a[2]==="odd"&&"2n+1"||!/\D/.test(a[2])&&"0n+"+a[2]||a[2]);a[2]=b[1]+(b[2]||1)-0,a[3]=b[3]-0}else a[2]&&m.error(a[0]);a[0]=e++;return a},ATTR:function(a,b,c,d,e,f){var g=a[1]=a[1].replace(j,"");!f&&o.attrMap[g]&&(a[1]=o.attrMap[g]),a[4]=(a[4]||a[5]||"").replace(j,""),a[2]==="~="&&(a[4]=" "+a[4]+" ");return a},PSEUDO:function(b,c,d,e,f){if(b[1]==="not")if((a.exec(b[3])||"").length>1||/^\w/.test(b[3]))b[3]=m(b[3],null,null,c);else{var g=m.filter(b[3],c,d,!0^f);d||e.push.apply(e,g);return!1}else if(o.match.POS.test(b[0])||o.match.CHILD.test(b[0]))return!0;return b},POS:function(a){a.unshift(!0);return a}},filters:{enabled:function(a){return a.disabled===!1&&a.type!=="hidden"},disabled:function(a){return a.disabled===!0},checked:function(a){return a.checked===!0},selected:function(a){a.parentNode&&a.parentNode.selectedIndex;return a.selected===!0},parent:function(a){return!!a.firstChild},empty:function(a){return!a.firstChild},has:function(a,b,c){return!!m(c[3],a).length},header:function(a){return/h\d/i.test(a.nodeName)},text:function(a){var b=a.getAttribute("type"),c=a.type;return a.nodeName.toLowerCase()==="input"&&"text"===c&&(b===c||b===null)},radio:function(a){return a.nodeName.toLowerCase()==="input"&&"radio"===a.type},checkbox:function(a){return a.nodeName.toLowerCase()==="input"&&"checkbox"===a.type},file:function(a){return a.nodeName.toLowerCase()==="input"&&"file"===a.type},password:function(a){return a.nodeName.toLowerCase()==="input"&&"password"===a.type},submit:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"submit"===a.type},image:function(a){return a.nodeName.toLowerCase()==="input"&&"image"===a.type},reset:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"reset"===a.type},button:function(a){var b=a.nodeName.toLowerCase();return b==="input"&&"button"===a.type||b==="button"},input:function(a){return/input|select|textarea|button/i.test(a.nodeName)},focus:function(a){return a===a.ownerDocument.activeElement}},setFilters:{first:function(a,b){return b===0},last:function(a,b,c,d){return b===d.length-1},even:function(a,b){return b%2===0},odd:function(a,b){return b%2===1},lt:function(a,b,c){return bc[3]-0},nth:function(a,b,c){return c[3]-0===b},eq:function(a,b,c){return c[3]-0===b}},filter:{PSEUDO:function(a,b,c,d){var e=b[1],f=o.filters[e];if(f)return f(a,c,b,d);if(e==="contains")return(a.textContent||a.innerText||n([a])||"").indexOf(b[3])>=0;if(e==="not"){var g=b[3];for(var h=0,i=g.length;h=0}},ID:function(a,b){return a.nodeType===1&&a.getAttribute("id")===b},TAG:function(a,b){return b==="*"&&a.nodeType===1||!!a.nodeName&&a.nodeName.toLowerCase()===b},CLASS:function(a,b){return(" "+(a.className||a.getAttribute("class"))+" ").indexOf(b)>-1},ATTR:function(a,b){var c=b[1],d=m.attr?m.attr(a,c):o.attrHandle[c]?o.attrHandle[c](a):a[c]!=null?a[c]:a.getAttribute(c),e=d+"",f=b[2],g=b[4];return d==null?f==="!=":!f&&m.attr?d!=null:f==="="?e===g:f==="*="?e.indexOf(g)>=0:f==="~="?(" "+e+" ").indexOf(g)>=0:g?f==="!="?e!==g:f==="^="?e.indexOf(g)===0:f==="$="?e.substr(e.length-g.length)===g:f==="|="?e===g||e.substr(0,g.length+1)===g+"-":!1:e&&d!==!1},POS:function(a,b,c,d){var e=b[2],f=o.setFilters[e];if(f)return f(a,c,b,d)}}},p=o.match.POS,q=function(a,b){return"\\"+(b-0+1)};for(var r in o.match)o.match[r]=new RegExp(o.match[r].source+/(?![^\[]*\])(?![^\(]*\))/.source),o.leftMatch[r]=new RegExp(/(^(?:.|\r|\n)*?)/.source+o.match[r].source.replace(/\\(\d+)/g,q));var s=function(a,b){a=Array.prototype.slice.call(a,0);if(b){b.push.apply(b,a);return b}return a};try{Array.prototype.slice.call(c.documentElement.childNodes,0)[0].nodeType}catch(t){s=function(a,b){var c=0,d=b||[];if(g.call(a)==="[object Array]")Array.prototype.push.apply(d,a);else if(typeof a.length=="number")for(var e=a.length;c",e.insertBefore(a,e.firstChild),c.getElementById(d)&&(o.find.ID=function(a,c,d){if(typeof c.getElementById!="undefined"&&!d){var e=c.getElementById(a[1]);return e?e.id===a[1]||typeof e.getAttributeNode!="undefined"&&e.getAttributeNode("id").nodeValue===a[1]?[e]:b:[]}},o.filter.ID=function(a,b){var c=typeof a.getAttributeNode!="undefined"&&a.getAttributeNode("id");return a.nodeType===1&&c&&c.nodeValue===b}),e.removeChild(a),e=a=null}(),function(){var a=c.createElement("div");a.appendChild(c.createComment("")),a.getElementsByTagName("*").length>0&&(o.find.TAG=function(a,b){var c=b.getElementsByTagName(a[1]);if(a[1]==="*"){var d=[];for(var e=0;c[e];e++)c[e].nodeType===1&&d.push(c[e]);c=d}return c}),a.innerHTML="",a.firstChild&&typeof a.firstChild.getAttribute!="undefined"&&a.firstChild.getAttribute("href")!=="#"&&(o.attrHandle.href=function(a){return a.getAttribute("href",2)}),a=null}(),c.querySelectorAll&&function(){var a=m,b=c.createElement("div"),d="__sizzle__";b.innerHTML="

";if(!b.querySelectorAll||b.querySelectorAll(".TEST").length!==0){m=function(b,e,f,g){e=e||c;if(!g&&!m.isXML(e)){var h=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(b);if(h&&(e.nodeType===1||e.nodeType===9)){if(h[1])return s(e.getElementsByTagName(b),f);if(h[2]&&o.find.CLASS&&e.getElementsByClassName)return s(e.getElementsByClassName(h[2]),f)}if(e.nodeType===9){if(b==="body"&&e.body)return s([e.body],f);if(h&&h[3]){var i=e.getElementById(h[3]);if(!i||!i.parentNode)return s([],f);if(i.id===h[3])return s([i],f)}try{return s(e.querySelectorAll(b),f)}catch(j){}}else if(e.nodeType===1&&e.nodeName.toLowerCase()!=="object"){var k=e,l=e.getAttribute("id"),n=l||d,p=e.parentNode,q=/^\s*[+~]/.test(b);l?n=n.replace(/'/g,"\\$&"):e.setAttribute("id",n),q&&p&&(e=e.parentNode);try{if(!q||p)return s(e.querySelectorAll("[id='"+n+"'] "+b),f)}catch(r){}finally{l||k.removeAttribute("id")}}}return a(b,e,f,g)};for(var e in a)m[e]=a[e];b=null}}(),function(){var a=c.documentElement,b=a.matchesSelector||a.mozMatchesSelector||a.webkitMatchesSelector||a.msMatchesSelector;if(b){var d=!b.call(c.createElement("div"),"div"),e=!1;try{b.call(c.documentElement,"[test!='']:sizzle")}catch(f){e=!0}m.matchesSelector=function(a,c){c=c.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!m.isXML(a))try{if(e||!o.match.PSEUDO.test(c)&&!/!=/.test(c)){var f=b.call(a,c);if(f||!d||a.document&&a.document.nodeType!==11)return f}}catch(g){}return m(c,null,null,[a]).length>0}}}(),function(){var a=c.createElement("div");a.innerHTML="
";if(!!a.getElementsByClassName&&a.getElementsByClassName("e").length!==0){a.lastChild.className="e";if(a.getElementsByClassName("e").length===1)return;o.order.splice(1,0,"CLASS"),o.find.CLASS=function(a,b,c){if(typeof b.getElementsByClassName!="undefined"&&!c)return b.getElementsByClassName(a[1])},a=null}}(),c.documentElement.contains?m.contains=function(a,b){return a!==b&&(a.contains?a.contains(b):!0)}:c.documentElement.compareDocumentPosition?m.contains=function(a,b){return!!(a.compareDocumentPosition(b)&16)}:m.contains=function(){return!1},m.isXML=function(a){var b=(a?a.ownerDocument||a:0).documentElement;return b?b.nodeName!=="HTML":!1};var y=function(a,b,c){var d,e=[],f="",g=b.nodeType?[b]:b;while(d=o.match.PSEUDO.exec(a))f+=d[0],a=a.replace(o.match.PSEUDO,"");a=o.relative[a]?a+"*":a;for(var h=0,i=g.length;h0)for(h=g;h=0:f.filter(a,this).length>0:this.filter(a).length>0)},closest:function(a,b){var c=[],d,e,g=this[0];if(f.isArray(a)){var h=1;while(g&&g.ownerDocument&&g!==b){for(d=0;d-1:f.find.matchesSelector(g,a)){c.push(g);break}g=g.parentNode;if(!g||!g.ownerDocument||g===b||g.nodeType===11)break}}c=c.length>1?f.unique(c):c;return this.pushStack(c,"closest",a)},index:function(a){if(!a)return this[0]&&this[0].parentNode?this.prevAll().length:-1;if(typeof a=="string")return f.inArray(this[0],f(a));return f.inArray(a.jquery?a[0]:a,this)},add:function(a,b){var c=typeof a=="string"?f(a,b):f.makeArray(a&&a.nodeType?[a]:a),d=f.merge(this.get(),c);return this.pushStack(S(c[0])||S(d[0])?d:f.unique(d))},andSelf:function(){return this.add(this.prevObject)}}),f.each({parent:function(a){var b=a.parentNode;return b&&b.nodeType!==11?b:null},parents:function(a){return f.dir(a,"parentNode")},parentsUntil:function(a,b,c){return f.dir(a,"parentNode",c)},next:function(a){return f.nth(a,2,"nextSibling")},prev:function(a){return f.nth(a,2,"previousSibling")},nextAll:function(a){return f.dir(a,"nextSibling")},prevAll:function(a){return f.dir(a,"previousSibling")},nextUntil:function(a,b,c){return f.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return f.dir(a,"previousSibling",c)},siblings:function(a){return f.sibling(a.parentNode.firstChild,a)},children:function(a){return f.sibling(a.firstChild)},contents:function(a){return f.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:f.makeArray(a.childNodes)}},function(a,b){f.fn[a]=function(c,d){var e=f.map(this,b,c);L.test(a)||(d=c),d&&typeof d=="string"&&(e=f.filter(d,e)),e=this.length>1&&!R[a]?f.unique(e):e,(this.length>1||N.test(d))&&M.test(a)&&(e=e.reverse());return this.pushStack(e,a,P.call(arguments).join(","))}}),f.extend({filter:function(a,b,c){c&&(a=":not("+a+")");return b.length===1?f.find.matchesSelector(b[0],a)?[b[0]]:[]:f.find.matches(a,b)},dir:function(a,c,d){var e=[],g=a[c];while(g&&g.nodeType!==9&&(d===b||g.nodeType!==1||!f(g).is(d)))g.nodeType===1&&e.push(g),g=g[c];return e},nth:function(a,b,c,d){b=b||1;var e=0;for(;a;a=a[c])if(a.nodeType===1&&++e===b)break;return a},sibling:function(a,b){var c=[];for(;a;a=a.nextSibling)a.nodeType===1&&a!==b&&c.push(a);return c}});var V="abbr|article|aside|audio|canvas|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",W=/ jQuery\d+="(?:\d+|null)"/g,X=/^\s+/,Y=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,Z=/<([\w:]+)/,$=/",""],legend:[1,"
","
"],thead:[1,"","
"],tr:[2,"","
"],td:[3,"","
"],col:[2,"","
"],area:[1,"",""],_default:[0,"",""]},bh=U(c);bg.optgroup=bg.option,bg.tbody=bg.tfoot=bg.colgroup=bg.caption=bg.thead,bg.th=bg.td,f.support.htmlSerialize||(bg._default=[1,"div
","
"]),f.fn.extend({text:function(a){if(f.isFunction(a))return this.each(function(b){var c=f(this);c.text(a.call(this,b,c.text()))});if(typeof a!="object"&&a!==b)return this.empty().append((this[0]&&this[0].ownerDocument||c).createTextNode(a));return f.text(this)},wrapAll:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapAll(a.call(this,b))});if(this[0]){var b=f(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&a.firstChild.nodeType===1)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapInner(a.call(this,b))});return this.each(function(){var b=f(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=f.isFunction(a);return this.each(function(c){f(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){f.nodeName(this,"body")||f(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.appendChild(a)})},prepend:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this)});if(arguments.length){var a=f.clean(arguments);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this.nextSibling)});if(arguments.length){var a=this.pushStack(this,"after",arguments);a.push.apply(a,f.clean(arguments));return a}},remove:function(a,b){for(var c=0,d;(d=this[c])!=null;c++)if(!a||f.filter(a,[d]).length)!b&&d.nodeType===1&&(f.cleanData(d.getElementsByTagName("*")),f.cleanData([d])),d.parentNode&&d.parentNode.removeChild(d);return this},empty:function() -{for(var a=0,b;(b=this[a])!=null;a++){b.nodeType===1&&f.cleanData(b.getElementsByTagName("*"));while(b.firstChild)b.removeChild(b.firstChild)}return this},clone:function(a,b){a=a==null?!1:a,b=b==null?a:b;return this.map(function(){return f.clone(this,a,b)})},html:function(a){if(a===b)return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(W,""):null;if(typeof a=="string"&&!ba.test(a)&&(f.support.leadingWhitespace||!X.test(a))&&!bg[(Z.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(Y,"<$1>");try{for(var c=0,d=this.length;c1&&l0?this.clone(!0):this).get();f(e[h])[b](j),d=d.concat(j)}return this.pushStack(d,a,e.selector)}}),f.extend({clone:function(a,b,c){var d,e,g,h=f.support.html5Clone||!bc.test("<"+a.nodeName)?a.cloneNode(!0):bo(a);if((!f.support.noCloneEvent||!f.support.noCloneChecked)&&(a.nodeType===1||a.nodeType===11)&&!f.isXMLDoc(a)){bk(a,h),d=bl(a),e=bl(h);for(g=0;d[g];++g)e[g]&&bk(d[g],e[g])}if(b){bj(a,h);if(c){d=bl(a),e=bl(h);for(g=0;d[g];++g)bj(d[g],e[g])}}d=e=null;return h},clean:function(a,b,d,e){var g;b=b||c,typeof b.createElement=="undefined"&&(b=b.ownerDocument||b[0]&&b[0].ownerDocument||c);var h=[],i;for(var j=0,k;(k=a[j])!=null;j++){typeof k=="number"&&(k+="");if(!k)continue;if(typeof k=="string")if(!_.test(k))k=b.createTextNode(k);else{k=k.replace(Y,"<$1>");var l=(Z.exec(k)||["",""])[1].toLowerCase(),m=bg[l]||bg._default,n=m[0],o=b.createElement("div");b===c?bh.appendChild(o):U(b).appendChild(o),o.innerHTML=m[1]+k+m[2];while(n--)o=o.lastChild;if(!f.support.tbody){var p=$.test(k),q=l==="table"&&!p?o.firstChild&&o.firstChild.childNodes:m[1]===""&&!p?o.childNodes:[];for(i=q.length-1;i>=0;--i)f.nodeName(q[i],"tbody")&&!q[i].childNodes.length&&q[i].parentNode.removeChild(q[i])}!f.support.leadingWhitespace&&X.test(k)&&o.insertBefore(b.createTextNode(X.exec(k)[0]),o.firstChild),k=o.childNodes}var r;if(!f.support.appendChecked)if(k[0]&&typeof (r=k.length)=="number")for(i=0;i=0)return b+"px"}}}),f.support.opacity||(f.cssHooks.opacity={get:function(a,b){return br.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?parseFloat(RegExp.$1)/100+"":b?"1":""},set:function(a,b){var c=a.style,d=a.currentStyle,e=f.isNumeric(b)?"alpha(opacity="+b*100+")":"",g=d&&d.filter||c.filter||"";c.zoom=1;if(b>=1&&f.trim(g.replace(bq,""))===""){c.removeAttribute("filter");if(d&&!d.filter)return}c.filter=bq.test(g)?g.replace(bq,e):g+" "+e}}),f(function(){f.support.reliableMarginRight||(f.cssHooks.marginRight={get:function(a,b){var c;f.swap(a,{display:"inline-block"},function(){b?c=bz(a,"margin-right","marginRight"):c=a.style.marginRight});return c}})}),c.defaultView&&c.defaultView.getComputedStyle&&(bA=function(a,b){var c,d,e;b=b.replace(bs,"-$1").toLowerCase(),(d=a.ownerDocument.defaultView)&&(e=d.getComputedStyle(a,null))&&(c=e.getPropertyValue(b),c===""&&!f.contains(a.ownerDocument.documentElement,a)&&(c=f.style(a,b)));return c}),c.documentElement.currentStyle&&(bB=function(a,b){var c,d,e,f=a.currentStyle&&a.currentStyle[b],g=a.style;f===null&&g&&(e=g[b])&&(f=e),!bt.test(f)&&bu.test(f)&&(c=g.left,d=a.runtimeStyle&&a.runtimeStyle.left,d&&(a.runtimeStyle.left=a.currentStyle.left),g.left=b==="fontSize"?"1em":f||0,f=g.pixelLeft+"px",g.left=c,d&&(a.runtimeStyle.left=d));return f===""?"auto":f}),bz=bA||bB,f.expr&&f.expr.filters&&(f.expr.filters.hidden=function(a){var b=a.offsetWidth,c=a.offsetHeight;return b===0&&c===0||!f.support.reliableHiddenOffsets&&(a.style&&a.style.display||f.css(a,"display"))==="none"},f.expr.filters.visible=function(a){return!f.expr.filters.hidden(a)});var bD=/%20/g,bE=/\[\]$/,bF=/\r?\n/g,bG=/#.*$/,bH=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,bI=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,bJ=/^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,bK=/^(?:GET|HEAD)$/,bL=/^\/\//,bM=/\?/,bN=/)<[^<]*)*<\/script>/gi,bO=/^(?:select|textarea)/i,bP=/\s+/,bQ=/([?&])_=[^&]*/,bR=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,bS=f.fn.load,bT={},bU={},bV,bW,bX=["*/"]+["*"];try{bV=e.href}catch(bY){bV=c.createElement("a"),bV.href="",bV=bV.href}bW=bR.exec(bV.toLowerCase())||[],f.fn.extend({load:function(a,c,d){if(typeof a!="string"&&bS)return bS.apply(this,arguments);if(!this.length)return this;var e=a.indexOf(" ");if(e>=0){var g=a.slice(e,a.length);a=a.slice(0,e)}var h="GET";c&&(f.isFunction(c)?(d=c,c=b):typeof c=="object"&&(c=f.param(c,f.ajaxSettings.traditional),h="POST"));var i=this;f.ajax({url:a,type:h,dataType:"html",data:c,complete:function(a,b,c){c=a.responseText,a.isResolved()&&(a.done(function(a){c=a}),i.html(g?f("
").append(c.replace(bN,"")).find(g):c)),d&&i.each(d,[c,b,a])}});return this},serialize:function(){return f.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?f.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||bO.test(this.nodeName)||bI.test(this.type))}).map(function(a,b){var c=f(this).val();return c==null?null:f.isArray(c)?f.map(c,function(a,c){return{name:b.name,value:a.replace(bF,"\r\n")}}):{name:b.name,value:c.replace(bF,"\r\n")}}).get()}}),f.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(a,b){f.fn[b]=function(a){return this.on(b,a)}}),f.each(["get","post"],function(a,c){f[c]=function(a,d,e,g){f.isFunction(d)&&(g=g||e,e=d,d=b);return f.ajax({type:c,url:a,data:d,success:e,dataType:g})}}),f.extend({getScript:function(a,c){return f.get(a,b,c,"script")},getJSON:function(a,b,c){return f.get(a,b,c,"json")},ajaxSetup:function(a,b){b?b_(a,f.ajaxSettings):(b=a,a=f.ajaxSettings),b_(a,b);return a},ajaxSettings:{url:bV,isLocal:bJ.test(bW[1]),global:!0,type:"GET",contentType:"application/x-www-form-urlencoded",processData:!0,async:!0,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":bX},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":a.String,"text html":!0,"text json":f.parseJSON,"text xml":f.parseXML},flatOptions:{context:!0,url:!0}},ajaxPrefilter:bZ(bT),ajaxTransport:bZ(bU),ajax:function(a,c){function w(a,c,l,m){if(s!==2){s=2,q&&clearTimeout(q),p=b,n=m||"",v.readyState=a>0?4:0;var o,r,u,w=c,x=l?cb(d,v,l):b,y,z;if(a>=200&&a<300||a===304){if(d.ifModified){if(y=v.getResponseHeader("Last-Modified"))f.lastModified[k]=y;if(z=v.getResponseHeader("Etag"))f.etag[k]=z}if(a===304)w="notmodified",o=!0;else try{r=cc(d,x),w="success",o=!0}catch(A){w="parsererror",u=A}}else{u=w;if(!w||a)w="error",a<0&&(a=0)}v.status=a,v.statusText=""+(c||w),o?h.resolveWith(e,[r,w,v]):h.rejectWith(e,[v,w,u]),v.statusCode(j),j=b,t&&g.trigger("ajax"+(o?"Success":"Error"),[v,d,o?r:u]),i.fireWith(e,[v,w]),t&&(g.trigger("ajaxComplete",[v,d]),--f.active||f.event.trigger("ajaxStop"))}}typeof a=="object"&&(c=a,a=b),c=c||{};var d=f.ajaxSetup({},c),e=d.context||d,g=e!==d&&(e.nodeType||e instanceof f)?f(e):f.event,h=f.Deferred(),i=f.Callbacks("once memory"),j=d.statusCode||{},k,l={},m={},n,o,p,q,r,s=0,t,u,v={readyState:0,setRequestHeader:function(a,b){if(!s){var c=a.toLowerCase();a=m[c]=m[c]||a,l[a]=b}return this},getAllResponseHeaders:function(){return s===2?n:null},getResponseHeader:function(a){var c;if(s===2){if(!o){o={};while(c=bH.exec(n))o[c[1].toLowerCase()]=c[2]}c=o[a.toLowerCase()]}return c===b?null:c},overrideMimeType:function(a){s||(d.mimeType=a);return this},abort:function(a){a=a||"abort",p&&p.abort(a),w(0,a);return this}};h.promise(v),v.success=v.done,v.error=v.fail,v.complete=i.add,v.statusCode=function(a){if(a){var b;if(s<2)for(b in a)j[b]=[j[b],a[b]];else b=a[v.status],v.then(b,b)}return this},d.url=((a||d.url)+"").replace(bG,"").replace(bL,bW[1]+"//"),d.dataTypes=f.trim(d.dataType||"*").toLowerCase().split(bP),d.crossDomain==null&&(r=bR.exec(d.url.toLowerCase()),d.crossDomain=!(!r||r[1]==bW[1]&&r[2]==bW[2]&&(r[3]||(r[1]==="http:"?80:443))==(bW[3]||(bW[1]==="http:"?80:443)))),d.data&&d.processData&&typeof d.data!="string"&&(d.data=f.param(d.data,d.traditional)),b$(bT,d,c,v);if(s===2)return!1;t=d.global,d.type=d.type.toUpperCase(),d.hasContent=!bK.test(d.type),t&&f.active++===0&&f.event.trigger("ajaxStart");if(!d.hasContent){d.data&&(d.url+=(bM.test(d.url)?"&":"?")+d.data,delete d.data),k=d.url;if(d.cache===!1){var x=f.now(),y=d.url.replace(bQ,"$1_="+x);d.url=y+(y===d.url?(bM.test(d.url)?"&":"?")+"_="+x:"")}}(d.data&&d.hasContent&&d.contentType!==!1||c.contentType)&&v.setRequestHeader("Content-Type",d.contentType),d.ifModified&&(k=k||d.url,f.lastModified[k]&&v.setRequestHeader("If-Modified-Since",f.lastModified[k]),f.etag[k]&&v.setRequestHeader("If-None-Match",f.etag[k])),v.setRequestHeader("Accept",d.dataTypes[0]&&d.accepts[d.dataTypes[0]]?d.accepts[d.dataTypes[0]]+(d.dataTypes[0]!=="*"?", "+bX+"; q=0.01":""):d.accepts["*"]);for(u in d.headers)v.setRequestHeader(u,d.headers[u]);if(d.beforeSend&&(d.beforeSend.call(e,v,d)===!1||s===2)){v.abort();return!1}for(u in{success:1,error:1,complete:1})v[u](d[u]);p=b$(bU,d,c,v);if(!p)w(-1,"No Transport");else{v.readyState=1,t&&g.trigger("ajaxSend",[v,d]),d.async&&d.timeout>0&&(q=setTimeout(function(){v.abort("timeout")},d.timeout));try{s=1,p.send(l,w)}catch(z){if(s<2)w(-1,z);else throw z}}return v},param:function(a,c){var d=[],e=function(a,b){b=f.isFunction(b)?b():b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};c===b&&(c=f.ajaxSettings.traditional);if(f.isArray(a)||a.jquery&&!f.isPlainObject(a))f.each(a,function(){e(this.name,this.value)});else for(var g in a)ca(g,a[g],c,e);return d.join("&").replace(bD,"+")}}),f.extend({active:0,lastModified:{},etag:{}});var cd=f.now(),ce=/(\=)\?(&|$)|\?\?/i;f.ajaxSetup({jsonp:"callback",jsonpCallback:function(){return f.expando+"_"+cd++}}),f.ajaxPrefilter("json jsonp",function(b,c,d){var e=b.contentType==="application/x-www-form-urlencoded"&&typeof b.data=="string";if(b.dataTypes[0]==="jsonp"||b.jsonp!==!1&&(ce.test(b.url)||e&&ce.test(b.data))){var g,h=b.jsonpCallback=f.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,i=a[h],j=b.url,k=b.data,l="$1"+h+"$2";b.jsonp!==!1&&(j=j.replace(ce,l),b.url===j&&(e&&(k=k.replace(ce,l)),b.data===k&&(j+=(/\?/.test(j)?"&":"?")+b.jsonp+"="+h))),b.url=j,b.data=k,a[h]=function(a){g=[a]},d.always(function(){a[h]=i,g&&f.isFunction(i)&&a[h](g[0])}),b.converters["script json"]=function(){g||f.error(h+" was not called");return g[0]},b.dataTypes[0]="json";return"script"}}),f.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(a){f.globalEval(a);return a}}}),f.ajaxPrefilter("script",function(a){a.cache===b&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),f.ajaxTransport("script",function(a){if(a.crossDomain){var d,e=c.head||c.getElementsByTagName("head")[0]||c.documentElement;return{send:function(f,g){d=c.createElement("script"),d.async="async",a.scriptCharset&&(d.charset=a.scriptCharset),d.src=a.url,d.onload=d.onreadystatechange=function(a,c){if(c||!d.readyState||/loaded|complete/.test(d.readyState))d.onload=d.onreadystatechange=null,e&&d.parentNode&&e.removeChild(d),d=b,c||g(200,"success")},e.insertBefore(d,e.firstChild)},abort:function(){d&&d.onload(0,1)}}}});var cf=a.ActiveXObject?function(){for(var a in ch)ch[a](0,1)}:!1,cg=0,ch;f.ajaxSettings.xhr=a.ActiveXObject?function(){return!this.isLocal&&ci()||cj()}:ci,function(a){f.extend(f.support,{ajax:!!a,cors:!!a&&"withCredentials"in a})}(f.ajaxSettings.xhr()),f.support.ajax&&f.ajaxTransport(function(c){if(!c.crossDomain||f.support.cors){var d;return{send:function(e,g){var h=c.xhr(),i,j;c.username?h.open(c.type,c.url,c.async,c.username,c.password):h.open(c.type,c.url,c.async);if(c.xhrFields)for(j in c.xhrFields)h[j]=c.xhrFields[j];c.mimeType&&h.overrideMimeType&&h.overrideMimeType(c.mimeType),!c.crossDomain&&!e["X-Requested-With"]&&(e["X-Requested-With"]="XMLHttpRequest");try{for(j in e)h.setRequestHeader(j,e[j])}catch(k){}h.send(c.hasContent&&c.data||null),d=function(a,e){var j,k,l,m,n;try{if(d&&(e||h.readyState===4)){d=b,i&&(h.onreadystatechange=f.noop,cf&&delete ch[i]);if(e)h.readyState!==4&&h.abort();else{j=h.status,l=h.getAllResponseHeaders(),m={},n=h.responseXML,n&&n.documentElement&&(m.xml=n),m.text=h.responseText;try{k=h.statusText}catch(o){k=""}!j&&c.isLocal&&!c.crossDomain?j=m.text?200:404:j===1223&&(j=204)}}}catch(p){e||g(-1,p)}m&&g(j,k,m,l)},!c.async||h.readyState===4?d():(i=++cg,cf&&(ch||(ch={},f(a).unload(cf)),ch[i]=d),h.onreadystatechange=d)},abort:function(){d&&d(0,1)}}}});var ck={},cl,cm,cn=/^(?:toggle|show|hide)$/,co=/^([+\-]=)?([\d+.\-]+)([a-z%]*)$/i,cp,cq=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]],cr;f.fn.extend({show:function(a,b,c){var d,e;if(a||a===0)return this.animate(cu("show",3),a,b,c);for(var g=0,h=this.length;g=i.duration+this.startTime){this.now=this.end,this.pos=this.state=1,this.update(),i.animatedProperties[this.prop]=!0;for(b in i.animatedProperties)i.animatedProperties[b]!==!0&&(g=!1);if(g){i.overflow!=null&&!f.support.shrinkWrapBlocks&&f.each(["","X","Y"],function(a,b){h.style["overflow"+b]=i.overflow[a]}),i.hide&&f(h).hide();if(i.hide||i.show)for(b in i.animatedProperties)f.style(h,b,i.orig[b]),f.removeData(h,"fxshow"+b,!0),f.removeData(h,"toggle"+b,!0);d=i.complete,d&&(i.complete=!1,d.call(h))}return!1}i.duration==Infinity?this.now=e:(c=e-this.startTime,this.state=c/i.duration,this.pos=f.easing[i.animatedProperties[this.prop]](this.state,c,0,1,i.duration),this.now=this.start+(this.end-this.start)*this.pos),this.update();return!0}},f.extend(f.fx,{tick:function(){var a,b=f.timers,c=0;for(;c-1,k={},l={},m,n;j?(l=e.position(),m=l.top,n=l.left):(m=parseFloat(h)||0,n=parseFloat(i)||0),f.isFunction(b)&&(b=b.call(a,c,g)),b.top!=null&&(k.top=b.top-g.top+m),b.left!=null&&(k.left=b.left-g.left+n),"using"in b?b.using.call(a,k):e.css(k)}},f.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),c=this.offset(),d=cx.test(b[0].nodeName)?{top:0,left:0}:b.offset();c.top-=parseFloat(f.css(a,"marginTop"))||0,c.left-=parseFloat(f.css(a,"marginLeft"))||0,d.top+=parseFloat(f.css(b[0],"borderTopWidth"))||0,d.left+=parseFloat(f.css(b[0],"borderLeftWidth"))||0;return{top:c.top-d.top,left:c.left-d.left}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||c.body;while(a&&!cx.test(a.nodeName)&&f.css(a,"position")==="static")a=a.offsetParent;return a})}}),f.each(["Left","Top"],function(a,c){var d="scroll"+c;f.fn[d]=function(c){var e,g;if(c===b){e=this[0];if(!e)return null;g=cy(e);return g?"pageXOffset"in g?g[a?"pageYOffset":"pageXOffset"]:f.support.boxModel&&g.document.documentElement[d]||g.document.body[d]:e[d]}return this.each(function(){g=cy(this),g?g.scrollTo(a?f(g).scrollLeft():c,a?c:f(g).scrollTop()):this[d]=c})}}),f.each(["Height","Width"],function(a,c){var d=c.toLowerCase();f.fn["inner"+c]=function(){var a=this[0];return a?a.style?parseFloat(f.css(a,d,"padding")):this[d]():null},f.fn["outer"+c]=function(a){var b=this[0];return b?b.style?parseFloat(f.css(b,d,a?"margin":"border")):this[d]():null},f.fn[d]=function(a){var e=this[0];if(!e)return a==null?null:this;if(f.isFunction(a))return this.each(function(b){var c=f(this);c[d](a.call(this,b,c[d]()))});if(f.isWindow(e)){var g=e.document.documentElement["client"+c],h=e.document.body;return e.document.compatMode==="CSS1Compat"&&g||h&&h["client"+c]||g}if(e.nodeType===9)return Math.max(e.documentElement["client"+c],e.body["scroll"+c],e.documentElement["scroll"+c],e.body["offset"+c],e.documentElement["offset"+c]);if(a===b){var i=f.css(e,d),j=parseFloat(i);return f.isNumeric(j)?j:i}return this.css(d,typeof a=="string"?a:a+"px")}}),a.jQuery=a.$=f,typeof define=="function"&&define.amd&&define.amd.jQuery&&define("jquery",[],function(){return f})})(window); \ No newline at end of file diff --git a/dev/_static/logo2.png b/dev/_static/logo2.png deleted file mode 100644 index dc2d80cefe3..00000000000 Binary files a/dev/_static/logo2.png and /dev/null differ diff --git a/dev/_static/logo_sidebar.png b/dev/_static/logo_sidebar.png deleted file mode 100644 index edc9cbd008a..00000000000 Binary files a/dev/_static/logo_sidebar.png and /dev/null differ diff --git a/dev/_static/logo_sidebar_horiz.png b/dev/_static/logo_sidebar_horiz.png deleted file mode 100644 index b9bf002c1c6..00000000000 Binary files a/dev/_static/logo_sidebar_horiz.png and /dev/null differ diff --git a/dev/_static/matplotlibrc b/dev/_static/matplotlibrc deleted file mode 100644 index eec3cc2ca97..00000000000 --- a/dev/_static/matplotlibrc +++ /dev/null @@ -1,460 +0,0 @@ -### MATPLOTLIBRC FORMAT - -# This is a sample matplotlib configuration file - you can find a copy -# of it on your system in -# site-packages/matplotlib/mpl-data/matplotlibrc. If you edit it -# there, please note that it will be overwritten in your next install. -# If you want to keep a permanent local copy that will not be -# overwritten, place it in HOME/.matplotlib/matplotlibrc (unix/linux -# like systems) and C:\Documents and Settings\yourname\.matplotlib -# (win32 systems). -# -# This file is best viewed in a editor which supports python mode -# syntax highlighting. Blank lines, or lines starting with a comment -# symbol, are ignored, as are trailing comments. Other lines must -# have the format -# key : val # optional comment -# -# Colors: for the color values below, you can either use - a -# matplotlib color string, such as r, k, or b - an rgb tuple, such as -# (1.0, 0.5, 0.0) - a hex string, such as ff00ff or #ff00ff - a scalar -# grayscale intensity such as 0.75 - a legal html color name, eg red, -# blue, darkslategray - -#### CONFIGURATION BEGINS HERE - -# the default backend; one of GTK GTKAgg GTKCairo GTK3Agg GTK3Cairo -# CocoaAgg FltkAgg MacOSX QtAgg Qt4Agg TkAgg WX WXAgg Agg Cairo GDK PS -# PDF SVG Template -# You can also deploy your own backend outside of matplotlib by -# referring to the module name (which must be in the PYTHONPATH) as -# 'module://my_backend' -backend : qt4agg - -# If you are using the Qt4Agg backend, you can choose here -# to use the PyQt4 bindings or the newer PySide bindings to -# the underlying Qt4 toolkit. -#backend.qt4 : PyQt4 # PyQt4 | PySide - -# Note that this can be overridden by the environment variable -# QT_API used by Enthought Tool Suite (ETS); valid values are -# "pyqt" and "pyside". The "pyqt" setting has the side effect of -# forcing the use of Version 2 API for QString and QVariant. - -# The port to use for the web server in the WebAgg backend. -# webagg.port : 8888 - -# If webagg.port is unavailable, a number of other random ports will -# be tried until one that is available is found. -# webagg.port_retries : 50 - -# When True, open the webbrowser to the plot that is shown -# webagg.open_in_browser : True - -# if you are running pyplot inside a GUI and your backend choice -# conflicts, we will automatically try to find a compatible one for -# you if backend_fallback is True -#backend_fallback: True - -#interactive : False -#toolbar : toolbar2 # None | toolbar2 ("classic" is deprecated) -#timezone : UTC # a pytz timezone string, eg US/Central or Europe/Paris - -# Where your matplotlib data lives if you installed to a non-default -# location. This is where the matplotlib fonts, bitmaps, etc reside -#datapath : /home/jdhunter/mpldata - - -### LINES -# See http://matplotlib.org/api/artist_api.html#module-matplotlib.lines for more -# information on line properties. -#lines.linewidth : 1.0 # line width in points -#lines.linestyle : - # solid line -#lines.color : blue # has no affect on plot(); see axes.color_cycle -#lines.marker : None # the default marker -#lines.markeredgewidth : 0.5 # the line width around the marker symbol -#lines.markersize : 6 # markersize, in points -#lines.dash_joinstyle : miter # miter|round|bevel -#lines.dash_capstyle : butt # butt|round|projecting -#lines.solid_joinstyle : miter # miter|round|bevel -#lines.solid_capstyle : projecting # butt|round|projecting -#lines.antialiased : True # render lines in antialised (no jaggies) - -### PATCHES -# Patches are graphical objects that fill 2D space, like polygons or -# circles. See -# http://matplotlib.org/api/artist_api.html#module-matplotlib.patches -# information on patch properties -#patch.linewidth : 1.0 # edge width in points -#patch.facecolor : blue -#patch.edgecolor : black -#patch.antialiased : True # render patches in antialised (no jaggies) - -### FONT -# -# font properties used by text.Text. See -# http://matplotlib.org/api/font_manager_api.html for more -# information on font properties. The 6 font properties used for font -# matching are given below with their default values. -# -# The font.family property has five values: 'serif' (e.g., Times), -# 'sans-serif' (e.g., Helvetica), 'cursive' (e.g., Zapf-Chancery), -# 'fantasy' (e.g., Western), and 'monospace' (e.g., Courier). Each of -# these font families has a default list of font names in decreasing -# order of priority associated with them. -# -# The font.style property has three values: normal (or roman), italic -# or oblique. The oblique style will be used for italic, if it is not -# present. -# -# The font.variant property has two values: normal or small-caps. For -# TrueType fonts, which are scalable fonts, small-caps is equivalent -# to using a font size of 'smaller', or about 83% of the current font -# size. -# -# The font.weight property has effectively 13 values: normal, bold, -# bolder, lighter, 100, 200, 300, ..., 900. Normal is the same as -# 400, and bold is 700. bolder and lighter are relative values with -# respect to the current weight. -# -# The font.stretch property has 11 values: ultra-condensed, -# extra-condensed, condensed, semi-condensed, normal, semi-expanded, -# expanded, extra-expanded, ultra-expanded, wider, and narrower. This -# property is not currently implemented. -# -# The font.size property is the default font size for text, given in pts. -# 12pt is the standard value. -# -#font.family : sans-serif -#font.style : normal -#font.variant : normal -#font.weight : medium -#font.stretch : normal -# note that font.size controls default text sizes. To configure -# special text sizes tick labels, axes, labels, title, etc, see the rc -# settings for axes and ticks. Special text sizes can be defined -# relative to font.size, using the following values: xx-small, x-small, -# small, medium, large, x-large, xx-large, larger, or smaller -#font.size : 12.0 -#font.serif : Bitstream Vera Serif, New Century Schoolbook, Century Schoolbook L, Utopia, ITC Bookman, Bookman, Nimbus Roman No9 L, Times New Roman, Times, Palatino, Charter, serif -#font.sans-serif : Bitstream Vera Sans, Lucida Grande, Verdana, Geneva, Lucid, Arial, Helvetica, Avant Garde, sans-serif -#font.cursive : Apple Chancery, Textile, Zapf Chancery, Sand, cursive -#font.fantasy : Comic Sans MS, Chicago, Charcoal, Impact, Western, fantasy -#font.monospace : Bitstream Vera Sans Mono, Andale Mono, Nimbus Mono L, Courier New, Courier, Fixed, Terminal, monospace - -### TEXT -# text properties used by text.Text. See -# http://matplotlib.org/api/artist_api.html#module-matplotlib.text for more -# information on text properties - -#text.color : black - -### LaTeX customizations. See http://www.scipy.org/Wiki/Cookbook/Matplotlib/UsingTex -#text.usetex : False # use latex for all text handling. The following fonts - # are supported through the usual rc parameter settings: - # new century schoolbook, bookman, times, palatino, - # zapf chancery, charter, serif, sans-serif, helvetica, - # avant garde, courier, monospace, computer modern roman, - # computer modern sans serif, computer modern typewriter - # If another font is desired which can loaded using the - # LaTeX \usepackage command, please inquire at the - # matplotlib mailing list -#text.latex.unicode : False # use "ucs" and "inputenc" LaTeX packages for handling - # unicode strings. -#text.latex.preamble : # IMPROPER USE OF THIS FEATURE WILL LEAD TO LATEX FAILURES - # AND IS THEREFORE UNSUPPORTED. PLEASE DO NOT ASK FOR HELP - # IF THIS FEATURE DOES NOT DO WHAT YOU EXPECT IT TO. - # preamble is a comma separated list of LaTeX statements - # that are included in the LaTeX document preamble. - # An example: - # text.latex.preamble : \usepackage{bm},\usepackage{euler} - # The following packages are always loaded with usetex, so - # beware of package collisions: color, geometry, graphicx, - # type1cm, textcomp. Adobe Postscript (PSSNFS) font packages - # may also be loaded, depending on your font settings - -#text.dvipnghack : None # some versions of dvipng don't handle alpha - # channel properly. Use True to correct - # and flush ~/.matplotlib/tex.cache - # before testing and False to force - # correction off. None will try and - # guess based on your dvipng version - -#text.hinting : 'auto' # May be one of the following: - # 'none': Perform no hinting - # 'auto': Use freetype's autohinter - # 'native': Use the hinting information in the - # font file, if available, and if your - # freetype library supports it - # 'either': Use the native hinting information, - # or the autohinter if none is available. - # For backward compatibility, this value may also be - # True === 'auto' or False === 'none'. -text.hinting_factor : 8 # Specifies the amount of softness for hinting in the - # horizontal direction. A value of 1 will hint to full - # pixels. A value of 2 will hint to half pixels etc. - -#text.antialiased : True # If True (default), the text will be antialiased. - # This only affects the Agg backend. - -# The following settings allow you to select the fonts in math mode. -# They map from a TeX font name to a fontconfig font pattern. -# These settings are only used if mathtext.fontset is 'custom'. -# Note that this "custom" mode is unsupported and may go away in the -# future. -#mathtext.cal : cursive -#mathtext.rm : serif -#mathtext.tt : monospace -#mathtext.it : serif:italic -#mathtext.bf : serif:bold -#mathtext.sf : sans -#mathtext.fontset : cm # Should be 'cm' (Computer Modern), 'stix', - # 'stixsans' or 'custom' -#mathtext.fallback_to_cm : True # When True, use symbols from the Computer Modern - # fonts when a symbol can not be found in one of - # the custom math fonts. - -#mathtext.default : it # The default font to use for math. - # Can be any of the LaTeX font names, including - # the special name "regular" for the same font - # used in regular text. - -### AXES -# default face and edge color, default tick sizes, -# default fontsizes for ticklabels, and so on. See -# http://matplotlib.org/api/axes_api.html#module-matplotlib.axes -#axes.hold : True # whether to clear the axes by default on -#axes.facecolor : white # axes background color -#axes.edgecolor : black # axes edge color -#axes.linewidth : 1.0 # edge linewidth -#axes.grid : False # display grid or not -#axes.titlesize : large # fontsize of the axes title -#axes.labelsize : medium # fontsize of the x any y labels -#axes.labelweight : normal # weight of the x and y labels -#axes.labelcolor : black -#axes.axisbelow : False # whether axis gridlines and ticks are below - # the axes elements (lines, text, etc) -#axes.formatter.limits : -7, 7 # use scientific notation if log10 - # of the axis range is smaller than the - # first or larger than the second -#axes.formatter.use_locale : False # When True, format tick labels - # according to the user's locale. - # For example, use ',' as a decimal - # separator in the fr_FR locale. -#axes.formatter.use_mathtext : False # When True, use mathtext for scientific - # notation. -#axes.unicode_minus : True # use unicode for the minus symbol - # rather than hyphen. See - # http://en.wikipedia.org/wiki/Plus_and_minus_signs#Character_codes -#axes.color_cycle : b, g, r, c, m, y, k # color cycle for plot lines - # as list of string colorspecs: - # single letter, long name, or - # web-style hex -#axes.xmargin : 0 # x margin. See `axes.Axes.margins` -#axes.ymargin : 0 # y margin See `axes.Axes.margins` - -#polaraxes.grid : True # display grid on polar axes -#axes3d.grid : True # display grid on 3d axes - -### TICKS -# see http://matplotlib.org/api/axis_api.html#matplotlib.axis.Tick -#xtick.major.size : 4 # major tick size in points -#xtick.minor.size : 2 # minor tick size in points -#xtick.major.width : 0.5 # major tick width in points -#xtick.minor.width : 0.5 # minor tick width in points -#xtick.major.pad : 4 # distance to major tick label in points -#xtick.minor.pad : 4 # distance to the minor tick label in points -#xtick.color : k # color of the tick labels -#xtick.labelsize : medium # fontsize of the tick labels -#xtick.direction : in # direction: in, out, or inout - -#ytick.major.size : 4 # major tick size in points -#ytick.minor.size : 2 # minor tick size in points -#ytick.major.width : 0.5 # major tick width in points -#ytick.minor.width : 0.5 # minor tick width in points -#ytick.major.pad : 4 # distance to major tick label in points -#ytick.minor.pad : 4 # distance to the minor tick label in points -#ytick.color : k # color of the tick labels -#ytick.labelsize : medium # fontsize of the tick labels -#ytick.direction : in # direction: in, out, or inout - - -### GRIDS -#grid.color : black # grid color -#grid.linestyle : : # dotted -#grid.linewidth : 0.5 # in points -#grid.alpha : 1.0 # transparency, between 0.0 and 1.0 - -### Legend -#legend.fancybox : False # if True, use a rounded box for the - # legend, else a rectangle -#legend.isaxes : True -#legend.numpoints : 2 # the number of points in the legend line -#legend.fontsize : large -#legend.pad : 0.0 # deprecated; the fractional whitespace inside the legend border -#legend.borderpad : 0.5 # border whitespace in fontsize units -#legend.markerscale : 1.0 # the relative size of legend markers vs. original -# the following dimensions are in axes coords -#legend.labelsep : 0.010 # deprecated; the vertical space between the legend entries -#legend.labelspacing : 0.5 # the vertical space between the legend entries in fraction of fontsize -#legend.handlelen : 0.05 # deprecated; the length of the legend lines -#legend.handlelength : 2. # the length of the legend lines in fraction of fontsize -#legend.handleheight : 0.7 # the height of the legend handle in fraction of fontsize -#legend.handletextsep : 0.02 # deprecated; the space between the legend line and legend text -#legend.handletextpad : 0.8 # the space between the legend line and legend text in fraction of fontsize -#legend.axespad : 0.02 # deprecated; the border between the axes and legend edge -#legend.borderaxespad : 0.5 # the border between the axes and legend edge in fraction of fontsize -#legend.columnspacing : 2. # the border between the axes and legend edge in fraction of fontsize -#legend.shadow : False -#legend.frameon : True # whether or not to draw a frame around legend -#legend.scatterpoints : 3 # number of scatter points - -### FIGURE -# See http://matplotlib.org/api/figure_api.html#matplotlib.figure.Figure -#figure.figsize : 8, 6 # figure size in inches -#figure.dpi : 80 # figure dots per inch -#figure.facecolor : 0.75 # figure facecolor; 0.75 is scalar gray -#figure.edgecolor : white # figure edgecolor -#figure.autolayout : False # When True, automatically adjust subplot - # parameters to make the plot fit the figure - -# The figure subplot parameters. All dimensions are a fraction of the -# figure width or height -#figure.subplot.left : 0.125 # the left side of the subplots of the figure -#figure.subplot.right : 0.9 # the right side of the subplots of the figure -#figure.subplot.bottom : 0.1 # the bottom of the subplots of the figure -#figure.subplot.top : 0.9 # the top of the subplots of the figure -#figure.subplot.wspace : 0.2 # the amount of width reserved for blank space between subplots -#figure.subplot.hspace : 0.2 # the amount of height reserved for white space between subplots - -### IMAGES -#image.aspect : equal # equal | auto | a number -#image.interpolation : bilinear # see help(imshow) for options -#image.cmap : jet # gray | jet etc... -#image.lut : 256 # the size of the colormap lookup table -#image.origin : upper # lower | upper -#image.resample : False - -### CONTOUR PLOTS -#contour.negative_linestyle : dashed # dashed | solid - -### Agg rendering -### Warning: experimental, 2008/10/10 -#agg.path.chunksize : 0 # 0 to disable; values in the range - # 10000 to 100000 can improve speed slightly - # and prevent an Agg rendering failure - # when plotting very large data sets, - # especially if they are very gappy. - # It may cause minor artifacts, though. - # A value of 20000 is probably a good - # starting point. -### SAVING FIGURES -#path.simplify : True # When True, simplify paths by removing "invisible" - # points to reduce file size and increase rendering - # speed -#path.simplify_threshold : 0.1 # The threshold of similarity below which - # vertices will be removed in the simplification - # process -#path.snap : True # When True, rectilinear axis-aligned paths will be snapped to - # the nearest pixel when certain criteria are met. When False, - # paths will never be snapped. - -# the default savefig params can be different from the display params -# e.g., you may want a higher resolution, or to make the figure -# background white -#savefig.dpi : 100 # figure dots per inch -#savefig.facecolor : white # figure facecolor when saving -#savefig.edgecolor : white # figure edgecolor when saving -#savefig.format : png # png, ps, pdf, svg -#savefig.bbox : standard # 'tight' or 'standard'. -#savefig.pad_inches : 0.1 # Padding to be used when bbox is set to 'tight' -#savefig.jpeg_quality: 95 # when a jpeg is saved, the default quality parameter. -#savefig.directory : ~ # default directory in savefig dialog box, - # leave empty to always use current working directory - -# tk backend params -#tk.window_focus : False # Maintain shell focus for TkAgg - -# ps backend params -#ps.papersize : letter # auto, letter, legal, ledger, A0-A10, B0-B10 -#ps.useafm : False # use of afm fonts, results in small files -#ps.usedistiller : False # can be: None, ghostscript or xpdf - # Experimental: may produce smaller files. - # xpdf intended for production of publication quality files, - # but requires ghostscript, xpdf and ps2eps -#ps.distiller.res : 6000 # dpi -#ps.fonttype : 3 # Output Type 3 (Type3) or Type 42 (TrueType) - -# pdf backend params -#pdf.compression : 6 # integer from 0 to 9 - # 0 disables compression (good for debugging) -#pdf.fonttype : 3 # Output Type 3 (Type3) or Type 42 (TrueType) - -# svg backend params -#svg.image_inline : True # write raster image data directly into the svg file -#svg.image_noscale : False # suppress scaling of raster data embedded in SVG -#svg.fonttype : 'path' # How to handle SVG fonts: -# 'none': Assume fonts are installed on the machine where the SVG will be viewed. -# 'path': Embed characters as paths -- supported by most SVG renderers -# 'svgfont': Embed characters as SVG fonts -- supported only by Chrome, -# Opera and Safari - -# docstring params -#docstring.hardcopy = False # set this when you want to generate hardcopy docstring - -# Set the verbose flags. This controls how much information -# matplotlib gives you at runtime and where it goes. The verbosity -# levels are: silent, helpful, debug, debug-annoying. Any level is -# inclusive of all the levels below it. If your setting is "debug", -# you'll get all the debug and helpful messages. When submitting -# problems to the mailing-list, please set verbose to "helpful" or "debug" -# and paste the output into your report. -# -# The "fileo" gives the destination for any calls to verbose.report. -# These objects can a filename, or a filehandle like sys.stdout. -# -# You can override the rc default verbosity from the command line by -# giving the flags --verbose-LEVEL where LEVEL is one of the legal -# levels, eg --verbose-helpful. -# -# You can access the verbose instance in your code -# from matplotlib import verbose. -#verbose.level : silent # one of silent, helpful, debug, debug-annoying -#verbose.fileo : sys.stdout # a log filename, sys.stdout or sys.stderr - -# Event keys to interact with figures/plots via keyboard. -# Customize these settings according to your needs. -# Leave the field(s) empty if you don't need a key-map. (i.e., fullscreen : '') - -#keymap.fullscreen : f # toggling -#keymap.home : h, r, home # home or reset mnemonic -#keymap.back : left, c, backspace # forward / backward keys to enable -#keymap.forward : right, v # left handed quick navigation -#keymap.pan : p # pan mnemonic -#keymap.zoom : o # zoom mnemonic -#keymap.save : s # saving current figure -#keymap.quit : ctrl+w # close the current figure -#keymap.grid : g # switching on/off a grid in current axes -#keymap.yscale : l # toggle scaling of y-axes ('log'/'linear') -#keymap.xscale : L, k # toggle scaling of x-axes ('log'/'linear') -#keymap.all_axes : a # enable all axes - -# Control location of examples data files -#examples.directory : '' # directory to look in for custom installation - -###ANIMATION settings -#animation.writer : ffmpeg # MovieWriter 'backend' to use -#animation.codec : mp4 # Codec to use for writing movie -#animation.bitrate: -1 # Controls size/quality tradeoff for movie. - # -1 implies let utility auto-determine -#animation.frame_format: 'png' # Controls frame format used by temp files -#animation.ffmpeg_path: 'ffmpeg' # Path to ffmpeg binary. Without full path - # $PATH is searched -#animation.ffmpeg_args: '' # Additional arguments to pass to ffmpeg -#animation.avconv_path: 'avconv' # Path to avconv binary. Without full path - # $PATH is searched -#animation.avconv_args: '' # Additional arguments to pass to avconv -#animation.mencoder_path: 'mencoder' - # Path to mencoder binary. Without full path - # $PATH is searched -#animation.mencoder_args: '' # Additional arguments to pass to mencoder diff --git a/dev/_static/minus.png b/dev/_static/minus.png deleted file mode 100644 index da1c5620d10..00000000000 Binary files a/dev/_static/minus.png and /dev/null differ diff --git a/dev/_static/mpl.css b/dev/_static/mpl.css deleted file mode 100644 index bd174f670d4..00000000000 --- a/dev/_static/mpl.css +++ /dev/null @@ -1,568 +0,0 @@ -/** - * Alternate Sphinx design - * Originally created by Armin Ronacher for Werkzeug, adapted by Georg Brandl. - */ - -body { - font-family: 'Lucida Grande', 'Lucida Sans Unicode', 'Geneva', 'Verdana', sans-serif; - font-size: 14px; - letter-spacing: -0.01em; - line-height: 150%; - text-align: center; - /*background-color: #AFC1C4; */ - background-color: #BFD1D4; - color: black; - padding: 0; - border: 1px solid #aaa; - - margin: 0px 80px 0px 80px; - min-width: 740px; -} - -a { - color: #CA7900; - text-decoration: none; -} - -a:hover { - color: #2491CF; -} - -pre { - font-family: 'Consolas', 'Deja Vu Sans Mono', 'Bitstream Vera Sans Mono', monospace; - font-size: 0.95em; - letter-spacing: 0.015em; - padding: 0.5em; - border: 1px solid #ccc; - background-color: #f8f8f8; -} - -td.linenos pre { - padding: 0.5em 0; - border: 0; - background-color: transparent; - color: #aaa; -} - -table.highlighttable { - margin-left: 0.5em; -} - -table.highlighttable td { - padding: 0 0.5em 0 0.5em; -} - -cite, code, tt { - font-family: 'Consolas', 'Deja Vu Sans Mono', 'Bitstream Vera Sans Mono', monospace; - font-size: 0.95em; - letter-spacing: 0.01em; -} - -hr { - border: 1px solid #abc; - margin: 2em; -} - -tt { - background-color: #f2f2f2; - border-bottom: 1px solid #ddd; - color: #333; -} - -tt.descname { - background-color: transparent; - font-weight: bold; - font-size: 1.2em; - border: 0; -} - -tt.descclassname { - background-color: transparent; - border: 0; -} - -tt.xref { - background-color: transparent; - font-weight: bold; - border: 0; -} - -a tt { - background-color: transparent; - font-weight: bold; - border: 0; - color: #CA7900; -} - -a tt:hover { - color: #2491CF; -} - -dl { - margin-bottom: 15px; -} - -dd p { - margin-top: 0px; -} - -dd ul, dd table { - margin-bottom: 10px; -} - -dd { - margin-top: 3px; - margin-bottom: 10px; - margin-left: 30px; -} - -.refcount { - color: #060; -} - -dt:target, -.highlight { - background-color: #fbe54e; -} - -dl.class, dl.function { - border-top: 2px solid #888; -} - -dl.method, dl.attribute { - border-top: 1px solid #aaa; -} - -dl.glossary dt { - font-weight: bold; - font-size: 1.1em; -} - -pre { - line-height: 120%; -} - -pre a { - color: inherit; - text-decoration: underline; -} - -.first { - margin-top: 0 !important; -} - -div.document { - background-color: white; - text-align: left; - background-image: url(contents.png); - background-repeat: repeat-x; -} - -/* -div.documentwrapper { - width: 100%; -} -*/ - -div.clearer { - clear: both; -} - -div.related h3 { - display: none; -} - -div.related ul { - background-image: url(navigation.png); - height: 2em; - list-style: none; - border-top: 1px solid #ddd; - border-bottom: 1px solid #ddd; - margin: 0; - padding-left: 10px; -} - -div.related ul li { - margin: 0; - padding: 0; - height: 2em; - float: left; -} - -div.related ul li.right { - float: right; - margin-right: 5px; -} - -div.related ul li a { - margin: 0; - padding: 0 5px 0 5px; - line-height: 1.75em; - color: #EE9816; -} - -div.related ul li a:hover { - color: #3CA8E7; -} - -div.body { - margin: 0; - padding: 0.5em 20px 20px 20px; -} - -div.bodywrapper { - margin: 0 240px 0 0; - border-right: 1px solid #ccc; -} - -div.body a { - text-decoration: underline; -} - -div.sphinxsidebar { - margin: 0; - padding: 0.5em 15px 15px 0; - width: 210px; - float: right; - text-align: left; -/* margin-left: -100%; */ -} - -div.sphinxsidebar h4, div.sphinxsidebar h3 { - margin: 1em 0 0.5em 0; - font-size: 0.9em; - padding: 0.1em 0 0.1em 0.5em; - color: white; - border: 1px solid #86989B; - background-color: #AFC1C4; -} - -div.sphinxsidebar ul { - padding-left: 1.5em; - margin-top: 7px; - list-style: none; - padding: 0; - line-height: 130%; -} - -div.sphinxsidebar ul ul { - list-style: square; - margin-left: 20px; -} - -p { - margin: 0.8em 0 0.5em 0; -} - -p.rubric { - font-weight: bold; -} - -h1 { - margin: 0; - padding: 0.7em 0 0.3em 0; - font-size: 1.5em; - color: #11557C; -} - -h2 { - margin: 1.3em 0 0.2em 0; - font-size: 1.35em; - padding: 0; -} - -h3 { - margin: 1em 0 -0.3em 0; - font-size: 1.2em; -} - -h1 a, h2 a, h3 a, h4 a, h5 a, h6 a { - color: black!important; -} - -h1 a.anchor, h2 a.anchor, h3 a.anchor, h4 a.anchor, h5 a.anchor, h6 a.anchor { - display: none; - margin: 0 0 0 0.3em; - padding: 0 0.2em 0 0.2em; - color: #aaa!important; -} - -h1:hover a.anchor, h2:hover a.anchor, h3:hover a.anchor, h4:hover a.anchor, -h5:hover a.anchor, h6:hover a.anchor { - display: inline; -} - -h1 a.anchor:hover, h2 a.anchor:hover, h3 a.anchor:hover, h4 a.anchor:hover, -h5 a.anchor:hover, h6 a.anchor:hover { - color: #777; - background-color: #eee; -} - -table { - border-collapse: collapse; - margin: 0 -0.5em 0 -0.5em; -} - -table td, table th { - padding: 0.2em 0.5em 0.2em 0.5em; -} - -div.footer { - background-color: #E3EFF1; - color: #86989B; - padding: 3px 8px 3px 0; - clear: both; - font-size: 0.8em; - text-align: right; -} - -div.footer a { - color: #86989B; - text-decoration: underline; -} - -div.pagination { - margin-top: 2em; - padding-top: 0.5em; - border-top: 1px solid black; - text-align: center; -} - -div.sphinxsidebar ul.toc { - margin: 1em 0 1em 0; - padding: 0 0 0 0.5em; - list-style: none; -} - -div.sphinxsidebar ul.toc li { - margin: 0.5em 0 0.5em 0; - font-size: 0.9em; - line-height: 130%; -} - -div.sphinxsidebar ul.toc li p { - margin: 0; - padding: 0; -} - -div.sphinxsidebar ul.toc ul { - margin: 0.2em 0 0.2em 0; - padding: 0 0 0 1.8em; -} - -div.sphinxsidebar ul.toc ul li { - padding: 0; -} - -div.admonition, div.warning { - font-size: 0.9em; - margin: 1em 0 0 0; - border: 1px solid #86989B; - background-color: #f7f7f7; -} - -div.admonition p, div.warning p { - margin: 0.5em 1em 0.5em 1em; - padding: 0; -} - -div.admonition pre, div.warning pre { - margin: 0.4em 1em 0.4em 1em; -} - -div.admonition p.admonition-title, -div.warning p.admonition-title { - margin: 0; - padding: 0.1em 0 0.1em 0.5em; - color: white; - border-bottom: 1px solid #86989B; - font-weight: bold; - background-color: #AFC1C4; -} - -div.warning { - border: 1px solid #940000; -} - -div.warning p.admonition-title { - background-color: #CF0000; - border-bottom-color: #940000; -} - -div.admonition ul, div.admonition ol, -div.warning ul, div.warning ol { - margin: 0.1em 0.5em 0.5em 3em; - padding: 0; -} - -div.versioninfo { - margin: 1em 0 0 0; - border: 1px solid #ccc; - background-color: #DDEAF0; - padding: 8px; - line-height: 1.3em; - font-size: 0.9em; -} - - -a.headerlink { - color: #c60f0f!important; - font-size: 1em; - margin-left: 6px; - padding: 0 4px 0 4px; - text-decoration: none!important; - visibility: hidden; -} - -h1:hover > a.headerlink, -h2:hover > a.headerlink, -h3:hover > a.headerlink, -h4:hover > a.headerlink, -h5:hover > a.headerlink, -h6:hover > a.headerlink, -dt:hover > a.headerlink { - visibility: visible; -} - -a.headerlink:hover { - background-color: #ccc; - color: white!important; -} - -table.indextable td { - text-align: left; - vertical-align: top; -} - -table.indextable dl, table.indextable dd { - margin-top: 0; - margin-bottom: 0; -} - -table.indextable tr.pcap { - height: 10px; -} - -table.indextable tr.cap { - margin-top: 10px; - background-color: #f2f2f2; -} - -img.toggler { - margin-right: 3px; - margin-top: 3px; - cursor: pointer; -} - -img.inheritance { - border: 0px -} - -form.pfform { - margin: 10px 0 20px 0; -} - -table.contentstable { - width: 90%; -} - -table.contentstable p.biglink { - line-height: 150%; -} - -a.biglink { - font-size: 1.3em; -} - -span.linkdescr { - font-style: italic; - padding-top: 5px; - font-size: 90%; -} - -ul.search { - margin: 10px 0 0 20px; - padding: 0; -} - -ul.search li { - padding: 5px 0 5px 20px; - background-image: url(file.png); - background-repeat: no-repeat; - background-position: 0 7px; -} - -ul.search li a { - font-weight: bold; -} - -ul.search li div.context { - color: #888; - margin: 2px 0 0 30px; - text-align: left; -} - -ul.keywordmatches li.goodmatch a { - font-weight: bold; -} - -table.docutils { - border-spacing: 2px; - border-collapse: collapse; - border-top-width: 1px; - border-right-width: 0px; - border-bottom-width: 1px; - border-left-width: 0px; -} - -table.docutils tr:nth-child(even) { - background-color: #F3F3FF; -} -table.docutils tr:nth-child(odd) { - background-color: #FFFFEE; -} - -table.docutils tr { - border-style: solid none solid none; - border-width: 1px 0 1px 0; - border-color: #AAAAAA; -} - -table.docutils th { - padding: 1px 8px 1px 5px; -} - -table.docutils td { - border-width: 1px 0 1px 0; -} - -#matplotlib-examples ul li{ - font-size: large; -} - -#matplotlib-examples ul li ul{ - margin-bottom:20px; - overflow:hidden; - border-top:1px solid #ccc; -} - -#matplotlib-examples ul li ul li { - font-size: small; - line-height:1.75em; - display:inline; - float: left; - width: 22em; -} - -#overview ul li ul{ - margin-bottom:20px; - overflow:hidden; - border-top:1px solid #ccc; -} - -#overview ul li ul li { - display:inline; - float: left; - width: 30em; -} - diff --git a/dev/_static/navigation.png b/dev/_static/navigation.png deleted file mode 100644 index 1081dc1439f..00000000000 Binary files a/dev/_static/navigation.png and /dev/null differ diff --git a/dev/_static/opensearch.xml b/dev/_static/opensearch.xml deleted file mode 100644 index 16b72606062..00000000000 --- a/dev/_static/opensearch.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - Matplotlib - Search Matplotlib 1.3.x documentation - utf-8 - - Matplotlib 1.3.x documentation - - \ No newline at end of file diff --git a/dev/_static/pgf_fonts.pdf b/dev/_static/pgf_fonts.pdf deleted file mode 100644 index 9f9bf0bae67..00000000000 Binary files a/dev/_static/pgf_fonts.pdf and /dev/null differ diff --git a/dev/_static/pgf_fonts.png b/dev/_static/pgf_fonts.png deleted file mode 100644 index d4ef689f9b3..00000000000 Binary files a/dev/_static/pgf_fonts.png and /dev/null differ diff --git a/dev/_static/pgf_preamble.pdf b/dev/_static/pgf_preamble.pdf deleted file mode 100644 index e8e08504321..00000000000 Binary files a/dev/_static/pgf_preamble.pdf and /dev/null differ diff --git a/dev/_static/pgf_preamble.png b/dev/_static/pgf_preamble.png deleted file mode 100644 index 6841e3b9bdd..00000000000 Binary files a/dev/_static/pgf_preamble.png and /dev/null differ diff --git a/dev/_static/pgf_texsystem.pdf b/dev/_static/pgf_texsystem.pdf deleted file mode 100644 index fbae0ea766f..00000000000 Binary files a/dev/_static/pgf_texsystem.pdf and /dev/null differ diff --git a/dev/_static/pgf_texsystem.png b/dev/_static/pgf_texsystem.png deleted file mode 100644 index 6075e7b764d..00000000000 Binary files a/dev/_static/pgf_texsystem.png and /dev/null differ diff --git a/dev/_static/plus.png b/dev/_static/plus.png deleted file mode 100644 index b3cb37425ea..00000000000 Binary files a/dev/_static/plus.png and /dev/null differ diff --git a/dev/_static/pygments.css b/dev/_static/pygments.css deleted file mode 100644 index d79caa151c2..00000000000 --- a/dev/_static/pygments.css +++ /dev/null @@ -1,62 +0,0 @@ -.highlight .hll { background-color: #ffffcc } -.highlight { background: #eeffcc; } -.highlight .c { color: #408090; font-style: italic } /* Comment */ -.highlight .err { border: 1px solid #FF0000 } /* Error */ -.highlight .k { color: #007020; font-weight: bold } /* Keyword */ -.highlight .o { color: #666666 } /* Operator */ -.highlight .cm { color: #408090; font-style: italic } /* Comment.Multiline */ -.highlight .cp { color: #007020 } /* Comment.Preproc */ -.highlight .c1 { color: #408090; font-style: italic } /* Comment.Single */ -.highlight .cs { color: #408090; background-color: #fff0f0 } /* Comment.Special */ -.highlight .gd { color: #A00000 } /* Generic.Deleted */ -.highlight .ge { font-style: italic } /* Generic.Emph */ -.highlight .gr { color: #FF0000 } /* Generic.Error */ -.highlight .gh { color: #000080; font-weight: bold } /* Generic.Heading */ -.highlight .gi { color: #00A000 } /* Generic.Inserted */ -.highlight .go { color: #333333 } /* Generic.Output */ -.highlight .gp { color: #c65d09; font-weight: bold } /* Generic.Prompt */ -.highlight .gs { font-weight: bold } /* Generic.Strong */ -.highlight .gu { color: #800080; font-weight: bold } /* Generic.Subheading */ -.highlight .gt { color: #0044DD } /* Generic.Traceback */ -.highlight .kc { color: #007020; font-weight: bold } /* Keyword.Constant */ -.highlight .kd { color: #007020; font-weight: bold } /* Keyword.Declaration */ -.highlight .kn { color: #007020; font-weight: bold } /* Keyword.Namespace */ -.highlight .kp { color: #007020 } /* Keyword.Pseudo */ -.highlight .kr { color: #007020; font-weight: bold } /* Keyword.Reserved */ -.highlight .kt { color: #902000 } /* Keyword.Type */ -.highlight .m { color: #208050 } /* Literal.Number */ -.highlight .s { color: #4070a0 } /* Literal.String */ -.highlight .na { color: #4070a0 } /* Name.Attribute */ -.highlight .nb { color: #007020 } /* Name.Builtin */ -.highlight .nc { color: #0e84b5; font-weight: bold } /* Name.Class */ -.highlight .no { color: #60add5 } /* Name.Constant */ -.highlight .nd { color: #555555; font-weight: bold } /* Name.Decorator */ -.highlight .ni { color: #d55537; font-weight: bold } /* Name.Entity */ -.highlight .ne { color: #007020 } /* Name.Exception */ -.highlight .nf { color: #06287e } /* Name.Function */ -.highlight .nl { color: #002070; font-weight: bold } /* Name.Label */ -.highlight .nn { color: #0e84b5; font-weight: bold } /* Name.Namespace */ -.highlight .nt { color: #062873; font-weight: bold } /* Name.Tag */ -.highlight .nv { color: #bb60d5 } /* Name.Variable */ -.highlight .ow { color: #007020; font-weight: bold } /* Operator.Word */ -.highlight .w { color: #bbbbbb } /* Text.Whitespace */ -.highlight .mf { color: #208050 } /* Literal.Number.Float */ -.highlight .mh { color: #208050 } /* Literal.Number.Hex */ -.highlight .mi { color: #208050 } /* Literal.Number.Integer */ -.highlight .mo { color: #208050 } /* Literal.Number.Oct */ -.highlight .sb { color: #4070a0 } /* Literal.String.Backtick */ -.highlight .sc { color: #4070a0 } /* Literal.String.Char */ -.highlight .sd { color: #4070a0; font-style: italic } /* Literal.String.Doc */ -.highlight .s2 { color: #4070a0 } /* Literal.String.Double */ -.highlight .se { color: #4070a0; font-weight: bold } /* Literal.String.Escape */ -.highlight .sh { color: #4070a0 } /* Literal.String.Heredoc */ -.highlight .si { color: #70a0d0; font-style: italic } /* Literal.String.Interpol */ -.highlight .sx { color: #c65d09 } /* Literal.String.Other */ -.highlight .sr { color: #235388 } /* Literal.String.Regex */ -.highlight .s1 { color: #4070a0 } /* Literal.String.Single */ -.highlight .ss { color: #517918 } /* Literal.String.Symbol */ -.highlight .bp { color: #007020 } /* Name.Builtin.Pseudo */ -.highlight .vc { color: #bb60d5 } /* Name.Variable.Class */ -.highlight .vg { color: #bb60d5 } /* Name.Variable.Global */ -.highlight .vi { color: #bb60d5 } /* Name.Variable.Instance */ -.highlight .il { color: #208050 } /* Literal.Number.Integer.Long */ \ No newline at end of file diff --git a/dev/_static/searchtools.js b/dev/_static/searchtools.js deleted file mode 100644 index 56676b25be8..00000000000 --- a/dev/_static/searchtools.js +++ /dev/null @@ -1,622 +0,0 @@ -/* - * searchtools.js_t - * ~~~~~~~~~~~~~~~~ - * - * Sphinx JavaScript utilties for the full-text search. - * - * :copyright: Copyright 2007-2013 by the Sphinx team, see AUTHORS. - * :license: BSD, see LICENSE for details. - * - */ - - -/** - * Porter Stemmer - */ -var Stemmer = function() { - - var step2list = { - ational: 'ate', - tional: 'tion', - enci: 'ence', - anci: 'ance', - izer: 'ize', - bli: 'ble', - alli: 'al', - entli: 'ent', - eli: 'e', - ousli: 'ous', - ization: 'ize', - ation: 'ate', - ator: 'ate', - alism: 'al', - iveness: 'ive', - fulness: 'ful', - ousness: 'ous', - aliti: 'al', - iviti: 'ive', - biliti: 'ble', - logi: 'log' - }; - - var step3list = { - icate: 'ic', - ative: '', - alize: 'al', - iciti: 'ic', - ical: 'ic', - ful: '', - ness: '' - }; - - var c = "[^aeiou]"; // consonant - var v = "[aeiouy]"; // vowel - var C = c + "[^aeiouy]*"; // consonant sequence - var V = v + "[aeiou]*"; // vowel sequence - - var mgr0 = "^(" + C + ")?" + V + C; // [C]VC... is m>0 - var meq1 = "^(" + C + ")?" + V + C + "(" + V + ")?$"; // [C]VC[V] is m=1 - var mgr1 = "^(" + C + ")?" + V + C + V + C; // [C]VCVC... is m>1 - var s_v = "^(" + C + ")?" + v; // vowel in stem - - this.stemWord = function (w) { - var stem; - var suffix; - var firstch; - var origword = w; - - if (w.length < 3) - return w; - - var re; - var re2; - var re3; - var re4; - - firstch = w.substr(0,1); - if (firstch == "y") - w = firstch.toUpperCase() + w.substr(1); - - // Step 1a - re = /^(.+?)(ss|i)es$/; - re2 = /^(.+?)([^s])s$/; - - if (re.test(w)) - w = w.replace(re,"$1$2"); - else if (re2.test(w)) - w = w.replace(re2,"$1$2"); - - // Step 1b - re = /^(.+?)eed$/; - re2 = /^(.+?)(ed|ing)$/; - if (re.test(w)) { - var fp = re.exec(w); - re = new RegExp(mgr0); - if (re.test(fp[1])) { - re = /.$/; - w = w.replace(re,""); - } - } - else if (re2.test(w)) { - var fp = re2.exec(w); - stem = fp[1]; - re2 = new RegExp(s_v); - if (re2.test(stem)) { - w = stem; - re2 = /(at|bl|iz)$/; - re3 = new RegExp("([^aeiouylsz])\\1$"); - re4 = new RegExp("^" + C + v + "[^aeiouwxy]$"); - if (re2.test(w)) - w = w + "e"; - else if (re3.test(w)) { - re = /.$/; - w = w.replace(re,""); - } - else if (re4.test(w)) - w = w + "e"; - } - } - - // Step 1c - re = /^(.+?)y$/; - if (re.test(w)) { - var fp = re.exec(w); - stem = fp[1]; - re = new RegExp(s_v); - if (re.test(stem)) - w = stem + "i"; - } - - // Step 2 - re = /^(.+?)(ational|tional|enci|anci|izer|bli|alli|entli|eli|ousli|ization|ation|ator|alism|iveness|fulness|ousness|aliti|iviti|biliti|logi)$/; - if (re.test(w)) { - var fp = re.exec(w); - stem = fp[1]; - suffix = fp[2]; - re = new RegExp(mgr0); - if (re.test(stem)) - w = stem + step2list[suffix]; - } - - // Step 3 - re = /^(.+?)(icate|ative|alize|iciti|ical|ful|ness)$/; - if (re.test(w)) { - var fp = re.exec(w); - stem = fp[1]; - suffix = fp[2]; - re = new RegExp(mgr0); - if (re.test(stem)) - w = stem + step3list[suffix]; - } - - // Step 4 - re = /^(.+?)(al|ance|ence|er|ic|able|ible|ant|ement|ment|ent|ou|ism|ate|iti|ous|ive|ize)$/; - re2 = /^(.+?)(s|t)(ion)$/; - if (re.test(w)) { - var fp = re.exec(w); - stem = fp[1]; - re = new RegExp(mgr1); - if (re.test(stem)) - w = stem; - } - else if (re2.test(w)) { - var fp = re2.exec(w); - stem = fp[1] + fp[2]; - re2 = new RegExp(mgr1); - if (re2.test(stem)) - w = stem; - } - - // Step 5 - re = /^(.+?)e$/; - if (re.test(w)) { - var fp = re.exec(w); - stem = fp[1]; - re = new RegExp(mgr1); - re2 = new RegExp(meq1); - re3 = new RegExp("^" + C + v + "[^aeiouwxy]$"); - if (re.test(stem) || (re2.test(stem) && !(re3.test(stem)))) - w = stem; - } - re = /ll$/; - re2 = new RegExp(mgr1); - if (re.test(w) && re2.test(w)) { - re = /.$/; - w = w.replace(re,""); - } - - // and turn initial Y back to y - if (firstch == "y") - w = firstch.toLowerCase() + w.substr(1); - return w; - } -} - - - -/** - * Simple result scoring code. - */ -var Scorer = { - // Implement the following function to further tweak the score for each result - // The function takes a result array [filename, title, anchor, descr, score] - // and returns the new score. - /* - score: function(result) { - return result[4]; - }, - */ - - // query matches the full name of an object - objNameMatch: 11, - // or matches in the last dotted part of the object name - objPartialMatch: 6, - // Additive scores depending on the priority of the object - objPrio: {0: 15, // used to be importantResults - 1: 5, // used to be objectResults - 2: -5}, // used to be unimportantResults - // Used when the priority is not in the mapping. - objPrioDefault: 0, - - // query found in title - title: 15, - // query found in terms - term: 5 -}; - - -/** - * Search Module - */ -var Search = { - - _index : null, - _queued_query : null, - _pulse_status : -1, - - init : function() { - var params = $.getQueryParameters(); - if (params.q) { - var query = params.q[0]; - $('input[name="q"]')[0].value = query; - this.performSearch(query); - } - }, - - loadIndex : function(url) { - $.ajax({type: "GET", url: url, data: null, - dataType: "script", cache: true, - complete: function(jqxhr, textstatus) { - if (textstatus != "success") { - document.getElementById("searchindexloader").src = url; - } - }}); - }, - - setIndex : function(index) { - var q; - this._index = index; - if ((q = this._queued_query) !== null) { - this._queued_query = null; - Search.query(q); - } - }, - - hasIndex : function() { - return this._index !== null; - }, - - deferQuery : function(query) { - this._queued_query = query; - }, - - stopPulse : function() { - this._pulse_status = 0; - }, - - startPulse : function() { - if (this._pulse_status >= 0) - return; - function pulse() { - var i; - Search._pulse_status = (Search._pulse_status + 1) % 4; - var dotString = ''; - for (i = 0; i < Search._pulse_status; i++) - dotString += '.'; - Search.dots.text(dotString); - if (Search._pulse_status > -1) - window.setTimeout(pulse, 500); - } - pulse(); - }, - - /** - * perform a search for something (or wait until index is loaded) - */ - performSearch : function(query) { - // create the required interface elements - this.out = $('#search-results'); - this.title = $('

' + _('Searching') + '

').appendTo(this.out); - this.dots = $('').appendTo(this.title); - this.status = $('

').appendTo(this.out); - this.output = $('
'); - } - // Prettify the comment rating. - comment.pretty_rating = comment.rating + ' point' + - (comment.rating == 1 ? '' : 's'); - // Make a class (for displaying not yet moderated comments differently) - comment.css_class = comment.displayed ? '' : ' moderate'; - // Create a div for this comment. - var context = $.extend({}, opts, comment); - var div = $(renderTemplate(commentTemplate, context)); - - // If the user has voted on this comment, highlight the correct arrow. - if (comment.vote) { - var direction = (comment.vote == 1) ? 'u' : 'd'; - div.find('#' + direction + 'v' + comment.id).hide(); - div.find('#' + direction + 'u' + comment.id).show(); - } - - if (opts.moderator || comment.text != '[deleted]') { - div.find('a.reply').show(); - if (comment.proposal_diff) - div.find('#sp' + comment.id).show(); - if (opts.moderator && !comment.displayed) - div.find('#cm' + comment.id).show(); - if (opts.moderator || (opts.username == comment.username)) - div.find('#dc' + comment.id).show(); - } - return div; - } - - /** - * A simple template renderer. Placeholders such as <%id%> are replaced - * by context['id'] with items being escaped. Placeholders such as <#id#> - * are not escaped. - */ - function renderTemplate(template, context) { - var esc = $(document.createElement('div')); - - function handle(ph, escape) { - var cur = context; - $.each(ph.split('.'), function() { - cur = cur[this]; - }); - return escape ? esc.text(cur || "").html() : cur; - } - - return template.replace(/<([%#])([\w\.]*)\1>/g, function() { - return handle(arguments[2], arguments[1] == '%' ? true : false); - }); - } - - /** Flash an error message briefly. */ - function showError(message) { - $(document.createElement('div')).attr({'class': 'popup-error'}) - .append($(document.createElement('div')) - .attr({'class': 'error-message'}).text(message)) - .appendTo('body') - .fadeIn("slow") - .delay(2000) - .fadeOut("slow"); - } - - /** Add a link the user uses to open the comments popup. */ - $.fn.comment = function() { - return this.each(function() { - var id = $(this).attr('id').substring(1); - var count = COMMENT_METADATA[id]; - var title = count + ' comment' + (count == 1 ? '' : 's'); - var image = count > 0 ? opts.commentBrightImage : opts.commentImage; - var addcls = count == 0 ? ' nocomment' : ''; - $(this) - .append( - $(document.createElement('a')).attr({ - href: '#', - 'class': 'sphinx-comment-open' + addcls, - id: 'ao' + id - }) - .append($(document.createElement('img')).attr({ - src: image, - alt: 'comment', - title: title - })) - .click(function(event) { - event.preventDefault(); - show($(this).attr('id').substring(2)); - }) - ) - .append( - $(document.createElement('a')).attr({ - href: '#', - 'class': 'sphinx-comment-close hidden', - id: 'ah' + id - }) - .append($(document.createElement('img')).attr({ - src: opts.closeCommentImage, - alt: 'close', - title: 'close' - })) - .click(function(event) { - event.preventDefault(); - hide($(this).attr('id').substring(2)); - }) - ); - }); - }; - - var opts = { - processVoteURL: '/_process_vote', - addCommentURL: '/_add_comment', - getCommentsURL: '/_get_comments', - acceptCommentURL: '/_accept_comment', - deleteCommentURL: '/_delete_comment', - commentImage: '/static/_static/comment.png', - closeCommentImage: '/static/_static/comment-close.png', - loadingImage: '/static/_static/ajax-loader.gif', - commentBrightImage: '/static/_static/comment-bright.png', - upArrow: '/static/_static/up.png', - downArrow: '/static/_static/down.png', - upArrowPressed: '/static/_static/up-pressed.png', - downArrowPressed: '/static/_static/down-pressed.png', - voting: false, - moderator: false - }; - - if (typeof COMMENT_OPTIONS != "undefined") { - opts = jQuery.extend(opts, COMMENT_OPTIONS); - } - - var popupTemplate = '\ -
\ -

\ - Sort by:\ - best rated\ - newest\ - oldest\ -

\ -
Comments
\ -
\ - loading comments...
\ -
    \ -
    \ -

    Add a comment\ - (markup):

    \ -
    \ - reStructured text markup: *emph*, **strong**, \ - ``code``, \ - code blocks: :: and an indented block after blank line
    \ -
    \ - \ -

    \ - \ - Propose a change ▹\ - \ - \ - Propose a change ▿\ - \ -

    \ - \ - \ - \ - \ - \ -
    \ -
    '; - - var commentTemplate = '\ -
    \ -
    \ -
    \ - \ - \ - \ - \ - \ - \ -
    \ -
    \ - \ - \ - \ - \ - \ - \ -
    \ -
    \ -
    \ -

    \ - <%username%>\ - <%pretty_rating%>\ - <%time.delta%>\ -

    \ -
    <#text#>
    \ -

    \ - \ - reply ▿\ - proposal ▹\ - proposal ▿\ - \ - \ -

    \ -
    \
    -<#proposal_diff#>\
    -        
    \ -
      \ -
      \ -
      \ -
      \ - '; - - var replyTemplate = '\ -
    • \ -
      \ -
      \ - \ - \ - \ - \ - \ - \ -
      \ -
    • '; - - $(document).ready(function() { - init(); - }); -})(jQuery); - -$(document).ready(function() { - // add comment anchors for all paragraphs that are commentable - $('.sphinx-has-comment').comment(); - - // highlight search words in search results - $("div.context").each(function() { - var params = $.getQueryParameters(); - var terms = (params.q) ? params.q[0].split(/\s+/) : []; - var result = $(this); - $.each(terms, function() { - result.highlightText(this.toLowerCase(), 'highlighted'); - }); - }); - - // directly open comment window if requested - var anchor = document.location.hash; - if (anchor.substring(0, 9) == '#comment-') { - $('#ao' + anchor.substring(9)).click(); - document.location.hash = '#s' + anchor.substring(9); - } -}); diff --git a/dev/api/afm_api.html b/dev/api/afm_api.html deleted file mode 100644 index 21f9216f0fc..00000000000 --- a/dev/api/afm_api.html +++ /dev/null @@ -1,355 +0,0 @@ - - - - - - - - afm (Adobe Font Metrics interface) — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      Table Of Contents

      - - -

      Previous topic

      -

      The top level matplotlib module

      -

      Next topic

      -

      animation

      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      afm (Adobe Font Metrics interface)

      -
      -

      matplotlib.afm

      -

      This is a python interface to Adobe Font Metrics Files. Although a -number of other python implementations exist (and may be more complete -than mine) I decided not to go with them because either they were -either

      -
      -
        -
      1. copyrighted or used a non-BSD compatible license
      2. -
      3. had too many dependencies and I wanted a free standing lib
      4. -
      5. Did more than I needed and it was easier to write my own than -figure out how to just get what I needed from theirs
      6. -
      -
      -

      It is pretty easy to use, and requires only built-in python libs:

      -
      >>> from afm import AFM
      ->>> fh = open('ptmr8a.afm')
      ->>> afm = AFM(fh)
      ->>> afm.string_width_height('What the heck?')
      -(6220.0, 683)
      ->>> afm.get_fontname()
      -'Times-Roman'
      ->>> afm.get_kern_dist('A', 'f')
      -0
      ->>> afm.get_kern_dist('A', 'y')
      --92.0
      ->>> afm.get_bbox_char('!')
      -[130, -9, 238, 676]
      ->>> afm.get_bbox_font()
      -[-168, -218, 1000, 898]
      -
      -
      -
      -
      AUTHOR:
      -
      John D. Hunter <jdh2358@gmail.com>
      -
      -
      -
      -class matplotlib.afm.AFM(fh)
      -

      Bases: object

      -

      Parse the AFM file in file object fh

      -
      -
      -get_angle()
      -

      Return the fontangle as float

      -
      - -
      -
      -get_bbox_char(c, isord=False)
      -
      - -
      -
      -get_capheight()
      -

      Return the cap height as float

      -
      - -
      -
      -get_familyname()
      -

      Return the font family name, e.g., ‘Times’

      -
      - -
      -
      -get_fontname()
      -

      Return the font name, e.g., ‘Times-Roman’

      -
      - -
      -
      -get_fullname()
      -

      Return the font full name, e.g., ‘Times-Roman’

      -
      - -
      -
      -get_height_char(c, isord=False)
      -

      Get the height of character c from the bounding box. This -is the ink height (space is 0)

      -
      - -
      -
      -get_horizontal_stem_width()
      -

      Return the standard horizontal stem width as float, or None if -not specified in AFM file.

      -
      - -
      -
      -get_kern_dist(c1, c2)
      -

      Return the kerning pair distance (possibly 0) for chars c1 -and c2

      -
      - -
      -
      -get_kern_dist_from_name(name1, name2)
      -

      Return the kerning pair distance (possibly 0) for chars -name1 and name2

      -
      - -
      -
      -get_name_char(c, isord=False)
      -

      Get the name of the character, ie, ‘;’ is ‘semicolon’

      -
      - -
      -
      -get_str_bbox(s)
      -

      Return the string bounding box

      -
      - -
      -
      -get_str_bbox_and_descent(s)
      -

      Return the string bounding box

      -
      - -
      -
      -get_underline_thickness()
      -

      Return the underline thickness as float

      -
      - -
      -
      -get_vertical_stem_width()
      -

      Return the standard vertical stem width as float, or None if -not specified in AFM file.

      -
      - -
      -
      -get_weight()
      -

      Return the font weight, e.g., ‘Bold’ or ‘Roman’

      -
      - -
      -
      -get_width_char(c, isord=False)
      -

      Get the width of the character from the character metric WX -field

      -
      - -
      -
      -get_width_from_char_name(name)
      -

      Get the width of the character from a type1 character name

      -
      - -
      -
      -get_xheight()
      -

      Return the xheight as float

      -
      - -
      -
      -string_width_height(s)
      -

      Return the string width (including kerning) and string height -as a (w, h) tuple.

      -
      - -
      - -
      -
      -matplotlib.afm.parse_afm(fh)
      -

      Parse the Adobe Font Metics file in file handle fh. Return value -is a (dhead, dcmetrics, dkernpairs, dcomposite) tuple where -dhead is a _parse_header() dict, dcmetrics is a -_parse_composites() dict, dkernpairs is a -_parse_kern_pairs() dict (possibly {}), and dcomposite is a -_parse_composites() dict (possibly {})

      -
      - -
      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/api/animation_api.html b/dev/api/animation_api.html deleted file mode 100644 index aa60903510a..00000000000 --- a/dev/api/animation_api.html +++ /dev/null @@ -1,701 +0,0 @@ - - - - - - - - animation — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      Table Of Contents

      - - -

      Previous topic

      -

      afm (Adobe Font Metrics interface)

      -

      Next topic

      -

      artists

      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      animation

      -
      -

      matplotlib.animation

      -
      -
      -class matplotlib.animation.AVConvBase
      -

      Bases: matplotlib.animation.FFMpegBase

      -
      -
      -args_key = 'animation.avconv_args'
      -
      - -
      -
      -exec_key = 'animation.avconv_path'
      -
      - -
      - -
      -
      -class matplotlib.animation.AVConvFileWriter(*args, **kwargs)
      -

      Bases: matplotlib.animation.AVConvBase, matplotlib.animation.FFMpegFileWriter

      -
      - -
      -
      -class matplotlib.animation.AVConvWriter(fps=5, codec=None, bitrate=None, extra_args=None, metadata=None)
      -

      Bases: matplotlib.animation.AVConvBase, matplotlib.animation.FFMpegWriter

      -

      Construct a new MovieWriter object.

      -
      -
      fps: int
      -
      Framerate for movie.
      -
      codec: string or None, optional
      -
      The codec to use. If None (the default) the setting in the -rcParam animation.codec is used.
      -
      bitrate: int or None, optional
      -
      The bitrate for the saved movie file, which is one way to control -the output file size and quality. The default value is None, -which uses the value stored in the rcParam animation.bitrate. -A value of -1 implies that the bitrate should be determined -automatically by the underlying utility.
      -
      extra_args: list of strings or None
      -
      A list of extra string arguments to be passed to the underlying -movie utiltiy. The default is None, which passes the additional -argurments in the ‘animation.extra_args’ rcParam.
      -
      metadata: dict of string:string or None
      -
      A dictionary of keys and values for metadata to include in the -output file. Some keys that may be of use include: -title, artist, genre, subject, copyright, srcform, comment.
      -
      -
      - -
      -
      -class matplotlib.animation.Animation(fig, event_source=None, blit=False)
      -

      Bases: object

      -

      This class wraps the creation of an animation using matplotlib. It is -only a base class which should be subclassed to provide needed behavior.

      -

      fig is the figure object that is used to get draw, resize, and any -other needed events.

      -

      event_source is a class that can run a callback when desired events -are generated, as well as be stopped and started. Examples include timers -(see TimedAnimation) and file system notifications.

      -

      blit is a boolean that controls whether blitting is used to optimize -drawing.

      -
      -
      -new_frame_seq()
      -

      Creates a new sequence of frame information.

      -
      - -
      -
      -new_saved_frame_seq()
      -

      Creates a new sequence of saved/cached frame information.

      -
      - -
      -
      -save(filename, writer=None, fps=None, dpi=None, codec=None, bitrate=None, extra_args=None, metadata=None, extra_anim=None, savefig_kwargs=None)
      -

      Saves a movie file by drawing every frame.

      -

      filename is the output filename, e.g., mymovie.mp4

      -

      writer is either an instance of MovieWriter or a string -key that identifies a class to use, such as ‘ffmpeg’ or ‘mencoder’. -If nothing is passed, the value of the rcparam animation.writer is -used.

      -

      fps is the frames per second in the movie. Defaults to None, -which will use the animation’s specified interval to set the frames -per second.

      -

      dpi controls the dots per inch for the movie frames. This combined -with the figure’s size in inches controls the size of the movie.

      -

      codec is the video codec to be used. Not all codecs are supported -by a given MovieWriter. If none is given, this defaults to the -value specified by the rcparam animation.codec.

      -

      bitrate specifies the amount of bits used per second in the -compressed movie, in kilobits per second. A higher number means a -higher quality movie, but at the cost of increased file size. If no -value is given, this defaults to the value given by the rcparam -animation.bitrate.

      -

      extra_args is a list of extra string arguments to be passed to the -underlying movie utiltiy. The default is None, which passes the -additional argurments in the ‘animation.extra_args’ rcParam.

      -

      metadata is a dictionary of keys and values for metadata to include -in the output file. Some keys that may be of use include: -title, artist, genre, subject, copyright, srcform, comment.

      -

      extra_anim is a list of additional Animation objects that should -be included in the saved movie file. These need to be from the same -matplotlib.Figure instance. Also, animation frames will just be -simply combined, so there should be a 1:1 correspondence between -the frames from the different animations.

      -

      savefig_kwargs is a dictionary containing keyword arguments to be -passed on to the ‘savefig’ command which is called repeatedly to save -the individual frames. This can be used to set tight bounding boxes, -for example.

      -
      - -
      - -
      -
      -class matplotlib.animation.ArtistAnimation(fig, artists, *args, **kwargs)
      -

      Bases: matplotlib.animation.TimedAnimation

      -

      Before calling this function, all plotting should have taken place -and the relevant artists saved.

      -

      frame_info is a list, with each list entry a collection of artists that -represent what needs to be enabled on each frame. These will be disabled -for other frames.

      -
      - -
      -
      -class matplotlib.animation.FFMpegBase
      -
      -
      -args_key = 'animation.ffmpeg_args'
      -
      - -
      -
      -exec_key = 'animation.ffmpeg_path'
      -
      - -
      -
      -output_args
      -
      - -
      - -
      -
      -class matplotlib.animation.FFMpegFileWriter(*args, **kwargs)
      -

      Bases: matplotlib.animation.FileMovieWriter, matplotlib.animation.FFMpegBase

      -
      -
      -supported_formats = ['png', 'jpeg', 'ppm', 'tiff', 'sgi', 'bmp', 'pbm', 'raw', 'rgba']
      -
      - -
      - -
      -
      -class matplotlib.animation.FFMpegWriter(fps=5, codec=None, bitrate=None, extra_args=None, metadata=None)
      -

      Bases: matplotlib.animation.MovieWriter, matplotlib.animation.FFMpegBase

      -

      Construct a new MovieWriter object.

      -
      -
      fps: int
      -
      Framerate for movie.
      -
      codec: string or None, optional
      -
      The codec to use. If None (the default) the setting in the -rcParam animation.codec is used.
      -
      bitrate: int or None, optional
      -
      The bitrate for the saved movie file, which is one way to control -the output file size and quality. The default value is None, -which uses the value stored in the rcParam animation.bitrate. -A value of -1 implies that the bitrate should be determined -automatically by the underlying utility.
      -
      extra_args: list of strings or None
      -
      A list of extra string arguments to be passed to the underlying -movie utiltiy. The default is None, which passes the additional -argurments in the ‘animation.extra_args’ rcParam.
      -
      metadata: dict of string:string or None
      -
      A dictionary of keys and values for metadata to include in the -output file. Some keys that may be of use include: -title, artist, genre, subject, copyright, srcform, comment.
      -
      -
      - -
      -
      -class matplotlib.animation.FileMovieWriter(*args, **kwargs)
      -

      Bases: matplotlib.animation.MovieWriter

      -

      MovieWriter subclass that handles writing to a file.

      -
      -
      -cleanup()
      -
      - -
      -
      -finish()
      -
      - -
      -
      -frame_format
      -

      Format (png, jpeg, etc.) to use for saving the frames, which can be -decided by the individual subclasses.

      -
      - -
      -
      -setup(fig, outfile, dpi, frame_prefix='_tmp', clear_temp=True)
      -

      Perform setup for writing the movie file.

      -
      -
      fig: matplotlib.Figure instance
      -
      The figure object that contains the information for frames
      -
      outfile: string
      -
      The filename of the resulting movie file
      -
      dpi: int
      -
      The DPI (or resolution) for the file. This controls the size -in pixels of the resulting movie file.
      -
      frame_prefix: string, optional
      -
      The filename prefix to use for the temporary files. Defaults -to ‘_tmp’
      -
      clear_temp: bool
      -
      Specifies whether the temporary files should be deleted after -the movie is written. (Useful for debugging.) Defaults to True.
      -
      -
      - -
      - -
      -
      -class matplotlib.animation.FuncAnimation(fig, func, frames=None, init_func=None, fargs=None, save_count=None, **kwargs)
      -

      Bases: matplotlib.animation.TimedAnimation

      -

      Makes an animation by repeatedly calling a function func, passing in -(optional) arguments in fargs.

      -

      frames can be a generator, an iterable, or a number of frames.

      -

      init_func is a function used to draw a clear frame. If not given, the -results of drawing from the first item in the frames sequence will be -used. This function will be called once before the first frame.

      -

      If blit=True, func and init_func should return an iterable of -drawables to clear.

      -
      -
      -new_frame_seq()
      -
      - -
      -
      -new_saved_frame_seq()
      -
      - -
      - -
      -
      -class matplotlib.animation.ImageMagickBase
      -
      -
      -args_key = 'animation.convert_args'
      -
      - -
      -
      -delay
      -
      - -
      -
      -exec_key = 'animation.convert_path'
      -
      - -
      -
      -output_args
      -
      - -
      - -
      -
      -class matplotlib.animation.ImageMagickFileWriter(*args, **kwargs)
      -

      Bases: matplotlib.animation.FileMovieWriter, matplotlib.animation.ImageMagickBase

      -
      -
      -supported_formats = ['png', 'jpeg', 'ppm', 'tiff', 'sgi', 'bmp', 'pbm', 'raw', 'rgba']
      -
      - -
      - -
      -
      -class matplotlib.animation.ImageMagickWriter(fps=5, codec=None, bitrate=None, extra_args=None, metadata=None)
      -

      Bases: matplotlib.animation.MovieWriter, matplotlib.animation.ImageMagickBase

      -

      Construct a new MovieWriter object.

      -
      -
      fps: int
      -
      Framerate for movie.
      -
      codec: string or None, optional
      -
      The codec to use. If None (the default) the setting in the -rcParam animation.codec is used.
      -
      bitrate: int or None, optional
      -
      The bitrate for the saved movie file, which is one way to control -the output file size and quality. The default value is None, -which uses the value stored in the rcParam animation.bitrate. -A value of -1 implies that the bitrate should be determined -automatically by the underlying utility.
      -
      extra_args: list of strings or None
      -
      A list of extra string arguments to be passed to the underlying -movie utiltiy. The default is None, which passes the additional -argurments in the ‘animation.extra_args’ rcParam.
      -
      metadata: dict of string:string or None
      -
      A dictionary of keys and values for metadata to include in the -output file. Some keys that may be of use include: -title, artist, genre, subject, copyright, srcform, comment.
      -
      -
      - -
      -
      -class matplotlib.animation.MencoderBase
      -
      -
      -allowed_metadata = ['name', 'artist', 'genre', 'subject', 'copyright', 'srcform', 'comment']
      -
      - -
      -
      -args_key = 'animation.mencoder_args'
      -
      - -
      -
      -exec_key = 'animation.mencoder_path'
      -
      - -
      -
      -output_args
      -
      - -
      - -
      -
      -class matplotlib.animation.MencoderFileWriter(*args, **kwargs)
      -

      Bases: matplotlib.animation.FileMovieWriter, matplotlib.animation.MencoderBase

      -
      -
      -supported_formats = ['png', 'jpeg', 'tga', 'sgi']
      -
      - -
      - -
      -
      -class matplotlib.animation.MencoderWriter(fps=5, codec=None, bitrate=None, extra_args=None, metadata=None)
      -

      Bases: matplotlib.animation.MovieWriter, matplotlib.animation.MencoderBase

      -

      Construct a new MovieWriter object.

      -
      -
      fps: int
      -
      Framerate for movie.
      -
      codec: string or None, optional
      -
      The codec to use. If None (the default) the setting in the -rcParam animation.codec is used.
      -
      bitrate: int or None, optional
      -
      The bitrate for the saved movie file, which is one way to control -the output file size and quality. The default value is None, -which uses the value stored in the rcParam animation.bitrate. -A value of -1 implies that the bitrate should be determined -automatically by the underlying utility.
      -
      extra_args: list of strings or None
      -
      A list of extra string arguments to be passed to the underlying -movie utiltiy. The default is None, which passes the additional -argurments in the ‘animation.extra_args’ rcParam.
      -
      metadata: dict of string:string or None
      -
      A dictionary of keys and values for metadata to include in the -output file. Some keys that may be of use include: -title, artist, genre, subject, copyright, srcform, comment.
      -
      -
      - -
      -
      -class matplotlib.animation.MovieWriter(fps=5, codec=None, bitrate=None, extra_args=None, metadata=None)
      -

      Bases: object

      -

      Base class for writing movies. Fundamentally, what a MovieWriter does -is provide is a way to grab frames by calling grab_frame(). setup() -is called to start the process and finish() is called afterwards. -This class is set up to provide for writing movie frame data to a pipe. -saving() is provided as a context manager to facilitate this process as:

      -
      with moviewriter.saving('myfile.mp4'):
      -    # Iterate over frames
      -    moviewriter.grab_frame()
      -
      -
      -

      The use of the context manager ensures that setup and cleanup are -performed as necessary.

      -
      -
      frame_format: string
      -
      The format used in writing frame data, defaults to ‘rgba’
      -
      -

      Construct a new MovieWriter object.

      -
      -
      fps: int
      -
      Framerate for movie.
      -
      codec: string or None, optional
      -
      The codec to use. If None (the default) the setting in the -rcParam animation.codec is used.
      -
      bitrate: int or None, optional
      -
      The bitrate for the saved movie file, which is one way to control -the output file size and quality. The default value is None, -which uses the value stored in the rcParam animation.bitrate. -A value of -1 implies that the bitrate should be determined -automatically by the underlying utility.
      -
      extra_args: list of strings or None
      -
      A list of extra string arguments to be passed to the underlying -movie utiltiy. The default is None, which passes the additional -argurments in the ‘animation.extra_args’ rcParam.
      -
      metadata: dict of string:string or None
      -
      A dictionary of keys and values for metadata to include in the -output file. Some keys that may be of use include: -title, artist, genre, subject, copyright, srcform, comment.
      -
      -
      -
      -classmethod bin_path()
      -

      Returns the binary path to the commandline tool used by a specific -subclass. This is a class method so that the tool can be looked for -before making a particular MovieWriter subclass available.

      -
      - -
      -
      -cleanup()
      -

      Clean-up and collect the process used to write the movie file.

      -
      - -
      -
      -finish()
      -

      Finish any processing for writing the movie.

      -
      - -
      -
      -frame_size
      -

      A tuple (width,height) in pixels of a movie frame.

      -
      - -
      -
      -grab_frame(**savefig_kwargs)
      -

      Grab the image information from the figure and save as a movie frame. -All keyword arguments in savefig_kwargs are passed on to the ‘savefig’ -command that saves the figure.

      -
      - -
      -
      -classmethod isAvailable()
      -

      Check to see if a MovieWriter subclass is actually available by -running the commandline tool.

      -
      - -
      -
      -saving(*args, **kwds)
      -

      Context manager to facilitate writing the movie file.

      -

      *args are any parameters that should be passed to setup.

      -
      - -
      -
      -setup(fig, outfile, dpi, *args)
      -

      Perform setup for writing the movie file.

      -
      -
      fig: matplotlib.Figure instance
      -
      The figure object that contains the information for frames
      -
      outfile: string
      -
      The filename of the resulting movie file
      -
      dpi: int
      -
      The DPI (or resolution) for the file. This controls the size -in pixels of the resulting movie file.
      -
      -
      - -
      - -
      -
      -class matplotlib.animation.MovieWriterRegistry
      -

      Bases: object

      -
      -
      -is_available(name)
      -
      - -
      -
      -list()
      -

      Get a list of available MovieWriters.

      -
      - -
      -
      -register(name)
      -
      - -
      - -
      -
      -class matplotlib.animation.TimedAnimation(fig, interval=200, repeat_delay=None, repeat=True, event_source=None, *args, **kwargs)
      -

      Bases: matplotlib.animation.Animation

      -

      Animation subclass that supports time-based animation, drawing -a new frame every interval milliseconds.

      -

      repeat controls whether the animation should repeat when the sequence -of frames is completed.

      -

      repeat_delay optionally adds a delay in milliseconds before repeating -the animation.

      -
      - -
      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/api/api_changes.html b/dev/api/api_changes.html deleted file mode 100644 index 6a4402ee6c7..00000000000 --- a/dev/api/api_changes.html +++ /dev/null @@ -1,2215 +0,0 @@ - - - - - - - - API Changes — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - - - -
      -
      -
      -
      - -
      -

      API Changes

      -

      This chapter is a log of changes to matplotlib that affect the -outward-facing API. If updating matplotlib breaks your scripts, this -list may help describe what changes may be necessary in your code or -help figure out possible sources of the changes you are experiencing.

      -

      For new features that were added to matplotlib, please see -What’s new in matplotlib.

      -
      -

      Changes in 1.3.x

      -
        -
      • In FancyArrow, the default arrow head width, -head_width, has been made larger to produce a visible arrow head. The new -value of this kwarg is head_width = 20 * width.
      • -
      • Removed call of grid() in -plotfile(). To draw the axes grid, set to True -matplotlib.rcParams[‘axes.grid’] or axes.grid in .matplotlibrc or -explicitly call grid()
      • -
      • A new keyword extendrect in colorbar() and -ColorbarBase allows one to control the shape -of colorbar extensions.
      • -
      • The mpl module is now deprecated. Those who relied on this -module should transition to simply using import matplotlib as mpl.
      • -
      • The extension of MultiCursor to both vertical -(default) and/or horizontal cursor implied that self.line is replaced -by self.vline for vertical cursors lines and self.hline is added -for the horizontal cursors lines.
      • -
      • On POSIX platforms, the report_memory() function -raises NotImplementedError instead of OSError if the -ps command cannot be run.
      • -
      • The check_output() function has been moved to -subprocess.
      • -
      -
      -
      -

      Changes in 1.2.x

      -
        -
      • The classic option of the rc parameter toolbar is deprecated -and will be removed in the next release.

        -
      • -
      • The isvector() method has been removed since it -is no longer functional.

        -
      • -
      • The rasterization_zorder property on Axes a -zorder below which artists are rasterized. This has defaulted to --30000.0, but it now defaults to None, meaning no artists will be -rasterized. In order to rasterize artists below a given zorder -value, set_rasterization_zorder must be explicitly called.

        -
      • -
      • In scatter(), and scatter, -when specifying a marker using a tuple, the angle is now specified -in degrees, not radians.

        -
      • -
      • Using twinx() or -twiny() no longer overrides the current locaters -and formatters on the axes.

        -
      • -
      • In contourf(), the handling of the extend -kwarg has changed. Formerly, the extended ranges were mapped -after to 0, 1 after being normed, so that they always corresponded -to the extreme values of the colormap. Now they are mapped -outside this range so that they correspond to the special -colormap values determined by the -set_under() and -set_over() methods, which -default to the colormap end points.

        -
      • -
      • The new rc parameter savefig.format replaces cairo.format and -savefig.extension, and sets the default file format used by -matplotlib.figure.Figure.savefig().

        -
      • -
      • In pie() and pie(), one can -now set the radius of the pie; setting the radius to ‘None’ (the default -value), will result in a pie with a radius of 1 as before.

        -
      • -
      • Use of projection_factory() is now deprecated -in favour of axes class identification using -process_projection_requirements() followed by -direct axes class invocation (at the time of writing, functions which do this -are: add_axes(), -add_subplot() and -gca()). Therefore:

        -
        key = figure._make_key(*args, **kwargs)
        -ispolar = kwargs.pop('polar', False)
        -projection = kwargs.pop('projection', None)
        -if ispolar:
        -    if projection is not None and projection != 'polar':
        -        raise ValueError('polar and projection args are inconsistent')
        -    projection = 'polar'
        -ax = projection_factory(projection, self, rect, **kwargs)
        -key = self._make_key(*args, **kwargs)
        -
        -# is now
        -
        -projection_class, kwargs, key = \
        -                   process_projection_requirements(self, *args, **kwargs)
        -ax = projection_class(self, rect, **kwargs)
        -
        -
        -

        This change means that third party objects can expose themselves as -matplotlib axes by providing a _as_mpl_axes method. See -Adding new scales and projections to matplotlib for more detail.

        -
      • -
      • A new keyword extendfrac in colorbar() and -ColorbarBase allows one to control the size of -the triangular minimum and maximum extensions on colorbars.

        -
      • -
      • A new keyword capthick in errorbar() has been -added as an intuitive alias to the markeredgewidth and mew keyword -arguments, which indirectly controlled the thickness of the caps on -the errorbars. For backwards compatibility, specifying either of the -original keyword arguments will override any value provided by -capthick.

        -
      • -
      • Transform subclassing behaviour is now subtly changed. If your transform -implements a non-affine transformation, then it should override the -transform_non_affine method, rather than the generic transform method. -Previously transforms would define transform and then copy the -method into transform_non_affine:

        -
        class MyTransform(mtrans.Transform):
        -    def transform(self, xy):
        -        ...
        -    transform_non_affine = transform
        -
        -
        -

        This approach will no longer function correctly and should be changed to:

        -
        class MyTransform(mtrans.Transform):
        -    def transform_non_affine(self, xy):
        -        ...
        -
        -
        -
      • -
      • Artists no longer have x_isdata or y_isdata attributes; instead -any artist’s transform can be interrogated with -artist_instance.get_transform().contains_branch(ax.transData)

        -
      • -
      • Lines added to an axes now take into account their transform when updating the -data and view limits. This means transforms can now be used as a pre-transform. -For instance:

        -
        >>> import matplotlib.pyplot as plt
        ->>> import matplotlib.transforms as mtrans
        ->>> ax = plt.axes()
        ->>> ax.plot(range(10), transform=mtrans.Affine2D().scale(10) + ax.transData)
        ->>> print(ax.viewLim)
        -Bbox('array([[  0.,   0.],\n       [ 90.,  90.]])')
        -
        -
        -
      • -
      • One can now easily get a transform which goes from one transform’s coordinate -system to another, in an optimized way, using the new subtract method on a -transform. For instance, to go from data coordinates to axes coordinates:

        -
        >>> import matplotlib.pyplot as plt
        ->>> ax = plt.axes()
        ->>> data2ax = ax.transData - ax.transAxes
        ->>> print(ax.transData.depth, ax.transAxes.depth)
        -3, 1
        ->>> print(data2ax.depth)
        -2
        -
        -
        -

        for versions before 1.2 this could only be achieved in a sub-optimal way, -using ax.transData + ax.transAxes.inverted() (depth is a new concept, -but had it existed it would return 4 for this example).

        -
      • -
      • twinx and twiny now returns an instance of SubplotBase if -parent axes is an instance of SubplotBase.

        -
      • -
      • All Qt3-based backends are now deprecated due to the lack of py3k bindings. -Qt and QtAgg backends will continue to work in v1.2.x for py2.6 -and py2.7. It is anticipated that the Qt3 support will be completely -removed for the next release.

        -
      • -
      • ColorConverter, -Colormap and -Normalize now subclasses object

        -
      • -
      • ContourSet instances no longer have a transform attribute. Instead, -access the transform with the get_transform method.

        -
      • -
      -
      -
      -

      Changes in 1.1.x

      -
        -
      • Added new matplotlib.sankey.Sankey for generating Sankey diagrams.
      • -
      • In imshow(), setting interpolation to ‘nearest’ -will now always mean that the nearest-neighbor interpolation is performed. -If you want the no-op interpolation to be performed, choose ‘none’.
      • -
      • There were errors in how the tri-functions were handling input parameters -that had to be fixed. If your tri-plots are not working correctly anymore, -or you were working around apparent mistakes, please see issue #203 in the -github tracker. When in doubt, use kwargs.
      • -
      • The ‘symlog’ scale had some bad behavior in previous versions. This has now -been fixed and users should now be able to use it without frustrations. -The fixes did result in some minor changes in appearance for some users who -may have been depending on the bad behavior.
      • -
      • There is now a common set of markers for all plotting functions. Previously, -some markers existed only for scatter() or just for -plot(). This is now no longer the case. This merge -did result in a conflict. The string ‘d’ now means “thin diamond” while -‘D’ will mean “regular diamond”.
      • -
      -
      -
      -

      Changes beyond 0.99.x

      -
        -
      • The default behavior of matplotlib.axes.Axes.set_xlim(), -matplotlib.axes.Axes.set_ylim(), and -matplotlib.axes.Axes.axis(), and their corresponding -pyplot functions, has been changed: when view limits are -set explicitly with one of these methods, autoscaling is turned -off for the matching axis. A new auto kwarg is available to -control this behavior. The limit kwargs have been renamed to -left and right instead of xmin and xmax, and bottom -and top instead of ymin and ymax. The old names may still -be used, however.
      • -
      • There are five new Axes methods with corresponding pyplot -functions to facilitate autoscaling, tick location, and tick -label formatting, and the general appearance of ticks and -tick labels: -
      • -
      • The matplotlib.axes.Axes.bar() method accepts a error_kw -kwarg; it is a dictionary of kwargs to be passed to the -errorbar function.
      • -
      • The matplotlib.axes.Axes.hist() color kwarg now accepts -a sequence of color specs to match a sequence of datasets.
      • -
      • The EllipseCollection has been -changed in two ways:
          -
        • There is a new units option, ‘xy’, that scales the ellipse with -the data units. This matches the :class:’~matplotlib.patches.Ellipse` -scaling.
        • -
        • The height and width kwargs have been changed to specify -the height and width, again for consistency with -Ellipse, and to better match -their names; previously they specified the half-height and -half-width.
        • -
        -
      • -
      • There is a new rc parameter axes.color_cycle, and the color -cycle is now independent of the rc parameter lines.color. -matplotlib.Axes.set_default_color_cycle() is deprecated.
      • -
      • You can now print several figures to one pdf file and modify the -document information dictionary of a pdf file. See the docstrings -of the class matplotlib.backends.backend_pdf.PdfPages for -more information.
      • -
      • Removed configobj and enthought.traits packages, which are only -required by the experimental traited config and are somewhat out of -date. If needed, install them independently.
      • -
      -
        -
      • The new rc parameter savefig.extension sets the filename extension -that is used by matplotlib.figure.Figure.savefig() if its fname -argument lacks an extension.

        -
      • -
      • In an effort to simplify the backend API, all clipping rectangles -and paths are now passed in using GraphicsContext objects, even -on collections and images. Therefore:

        -
        draw_path_collection(self, master_transform, cliprect, clippath,
        -                     clippath_trans, paths, all_transforms, offsets,
        -                     offsetTrans, facecolors, edgecolors, linewidths,
        -                     linestyles, antialiaseds, urls)
        -
        -# is now
        -
        -draw_path_collection(self, gc, master_transform, paths, all_transforms,
        -                     offsets, offsetTrans, facecolors, edgecolors,
        -                     linewidths, linestyles, antialiaseds, urls)
        -
        -
        -draw_quad_mesh(self, master_transform, cliprect, clippath,
        -               clippath_trans, meshWidth, meshHeight, coordinates,
        -               offsets, offsetTrans, facecolors, antialiased,
        -               showedges)
        -
        -# is now
        -
        -draw_quad_mesh(self, gc, master_transform, meshWidth, meshHeight,
        -               coordinates, offsets, offsetTrans, facecolors,
        -               antialiased, showedges)
        -
        -
        -draw_image(self, x, y, im, bbox, clippath=None, clippath_trans=None)
        -
        -# is now
        -
        -draw_image(self, gc, x, y, im)
        -
        -
        -
      • -
      • There are four new Axes methods with corresponding pyplot -functions that deal with unstructured triangular grids:

        - -
      • -
      -
      -
      -

      Changes in 0.99

      -
        -
      • pylab no longer provides a load and save function. These are -available in matplotlib.mlab, or you can use numpy.loadtxt and -numpy.savetxt for text files, or np.save and np.load for binary -numpy arrays.
      • -
      • User-generated colormaps can now be added to the set recognized -by matplotlib.cm.get_cmap(). Colormaps can be made the -default and applied to the current image using -matplotlib.pyplot.set_cmap().
      • -
      • changed use_mrecords default to False in mlab.csv2rec since this is -partially broken
      • -
      • Axes instances no longer have a “frame” attribute. Instead, use the -new “spines” attribute. Spines is a dictionary where the keys are -the names of the spines (e.g., ‘left’,’right’ and so on) and the -values are the artists that draw the spines. For normal -(rectilinear) axes, these artists are Line2D instances. For other -axes (such as polar axes), these artists may be Patch instances.
      • -
      • Polar plots no longer accept a resolution kwarg. Instead, each Path -must specify its own number of interpolation steps. This is -unlikely to be a user-visible change – if interpolation of data is -required, that should be done before passing it to matplotlib.
      • -
      -
      -
      -

      Changes for 0.98.x

      -
        -
      • psd(), csd(), and cohere() will now automatically wrap negative -frequency components to the beginning of the returned arrays. -This is much more sensible behavior and makes them consistent -with specgram(). The previous behavior was more of an oversight -than a design decision.

        -
      • -
      • Added new keyword parameters nonposx, nonposy to -matplotlib.axes.Axes methods that set log scale -parameters. The default is still to mask out non-positive -values, but the kwargs accept ‘clip’, which causes non-positive -values to be replaced with a very small positive value.

        -
      • -
      • Added new matplotlib.pyplot.fignum_exists() and -matplotlib.pyplot.get_fignums(); they merely expose -information that had been hidden in matplotlib._pylab_helpers.

        -
      • -
      • Deprecated numerix package.

        -
      • -
      • Added new matplotlib.image.imsave() and exposed it to the -matplotlib.pyplot interface.

        -
      • -
      • Remove support for pyExcelerator in exceltools – use xlwt -instead

        -
      • -
      • Changed the defaults of acorr and xcorr to use usevlines=True, -maxlags=10 and normed=True since these are the best defaults

        -
      • -
      • Following keyword parameters for matplotlib.label.Label are now -deprecated and new set of parameters are introduced. The new parameters -are given as a fraction of the font-size. Also, scatteryoffsets, -fancybox and columnspacing are added as keyword parameters.

        -
        -
      ---- - - - - - - - - - - - - - - - - - - - - - - -

      Deprecated

      -

      New

      -

      pad

      -

      borderpad

      -

      labelsep

      -

      labelspacing

      -

      handlelen

      -

      handlelength

      -

      handlestextsep

      -

      handletextpad

      -

      axespad

      -

      borderaxespad

      -
      - - -
    • Removed the configobj and experimental traits rc support

      -
    • -
    • Modified matplotlib.mlab.psd(), matplotlib.mlab.csd(), -matplotlib.mlab.cohere(), and matplotlib.mlab.specgram() -to scale one-sided densities by a factor of 2. Also, optionally -scale the densities by the sampling frequency, which gives true values -of densities that can be integrated by the returned frequency values. -This also gives better MATLAB compatibility. The corresponding -matplotlib.axes.Axes methods and matplotlib.pyplot -functions were updated as well.

      -
    • -
    • Font lookup now uses a nearest-neighbor approach rather than an -exact match. Some fonts may be different in plots, but should be -closer to what was requested.

      -
    • -
    • matplotlib.axes.Axes.set_xlim(), -matplotlib.axes.Axes.set_ylim() now return a copy of the -viewlim array to avoid modify-in-place surprises.

      -
    • -
    • matplotlib.afm.AFM.get_fullname() and -matplotlib.afm.AFM.get_familyname() no longer raise an -exception if the AFM file does not specify these optional -attributes, but returns a guess based on the required FontName -attribute.

      -
    • -
    • Changed precision kwarg in matplotlib.pyplot.spy(); default is -0, and the string value ‘present’ is used for sparse arrays only to -show filled locations.

      -
    • -
    • matplotlib.collections.EllipseCollection added.

      -
    • -
    • Added angles kwarg to matplotlib.pyplot.quiver() for more -flexible specification of the arrow angles.

      -
    • -
    • Deprecated (raise NotImplementedError) all the mlab2 functions from -matplotlib.mlab out of concern that some of them were not -clean room implementations.

      -
    • -
    • Methods matplotlib.collections.Collection.get_offsets() and -matplotlib.collections.Collection.set_offsets() added to -Collection base class.

      -
    • -
    • matplotlib.figure.Figure.figurePatch renamed -matplotlib.figure.Figure.patch; -matplotlib.axes.Axes.axesPatch renamed -matplotlib.axes.Axes.patch; -matplotlib.axes.Axes.axesFrame renamed -matplotlib.axes.Axes.frame. -matplotlib.axes.Axes.get_frame(), which returns -matplotlib.axes.Axes.patch, is deprecated.

      -
    • -
    • Changes in the matplotlib.contour.ContourLabeler attributes -(matplotlib.pyplot.clabel() function) so that they all have a -form like .labelAttribute. The three attributes that are most -likely to be used by end users, .cl, .cl_xy and -.cl_cvalues have been maintained for the moment (in addition to -their renamed versions), but they are deprecated and will eventually -be removed.

      -
    • -
    • Moved several functions in matplotlib.mlab and -matplotlib.cbook into a separate module -matplotlib.numerical_methods because they were unrelated to -the initial purpose of mlab or cbook and appeared more coherent -elsewhere.

      -
    • - - -
      -

      Changes for 0.98.1

      -
        -
      • Removed broken matplotlib.axes3d support and replaced it with -a non-implemented error pointing to 0.91.x
      • -
      -
      -
      -

      Changes for 0.98.0

      -
        -
      • matplotlib.image.imread() now no longer always returns RGBA data—if -the image is luminance or RGB, it will return a MxN or MxNx3 array -if possible. Also uint8 is no longer always forced to float.
      • -
      • Rewrote the matplotlib.cm.ScalarMappable callback -infrastructure to use matplotlib.cbook.CallbackRegistry -rather than custom callback handling. Any users of -matplotlib.cm.ScalarMappable.add_observer() of the -ScalarMappable should use the -matplotlib.cm.ScalarMappable.callbacks -CallbackRegistry instead.
      • -
      • New axes function and Axes method provide control over the plot -color cycle: matplotlib.axes.set_default_color_cycle() and -matplotlib.axes.Axes.set_color_cycle().
      • -
      • matplotlib now requires Python 2.4, so matplotlib.cbook will -no longer provide set, enumerate(), reversed() -or izip() compatibility functions.
      • -
      • In Numpy 1.0, bins are specified by the left edges only. The axes -method matplotlib.axes.Axes.hist() now uses future Numpy 1.3 -semantics for histograms. Providing binedges, the last value gives -the upper-right edge now, which was implicitly set to +infinity in -Numpy 1.0. This also means that the last bin doesn’t contain upper -outliers any more by default.
      • -
      • New axes method and pyplot function, -hexbin(), is an alternative to -scatter() for large datasets. It makes -something like a pcolor() of a 2-D -histogram, but uses hexagonal bins.
      • -
      • New kwarg, symmetric, in matplotlib.ticker.MaxNLocator -allows one require an axis to be centered around zero.
      • -
      • Toolkits must now be imported from mpl_toolkits (not matplotlib.toolkits)
      • -
      -
      -

      Notes about the transforms refactoring

      -

      A major new feature of the 0.98 series is a more flexible and -extensible transformation infrastructure, written in Python/Numpy -rather than a custom C extension.

      -

      The primary goal of this refactoring was to make it easier to -extend matplotlib to support new kinds of projections. This is -mostly an internal improvement, and the possible user-visible -changes it allows are yet to come.

      -

      See matplotlib.transforms for a description of the design of -the new transformation framework.

      -

      For efficiency, many of these functions return views into Numpy -arrays. This means that if you hold on to a reference to them, -their contents may change. If you want to store a snapshot of -their current values, use the Numpy array method copy().

      -

      The view intervals are now stored only in one place – in the -matplotlib.axes.Axes instance, not in the locator instances -as well. This means locators must get their limits from their -matplotlib.axis.Axis, which in turn looks up its limits from -the Axes. If a locator is used temporarily -and not assigned to an Axis or Axes, (e.g., in -matplotlib.contour), a dummy axis must be created to store its -bounds. Call matplotlib.ticker.Locator.create_dummy_axis() to -do so.

      -

      The functionality of Pbox has been merged with -Bbox. Its methods now all return -copies rather than modifying in place.

      -

      The following lists many of the simple changes necessary to update -code from the old transformation framework to the new one. In -particular, methods that return a copy are named with a verb in the -past tense, whereas methods that alter an object in place are named -with a verb in the present tense.

      -
      -

      matplotlib.transforms

      - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      Old methodNew method
      Bbox.get_bounds()transforms.Bbox.bounds
      Bbox.width()transforms.Bbox.width
      Bbox.height()transforms.Bbox.height
      Bbox.intervalx().get_bounds()transforms.Bbox.intervalx
      Bbox.intervalx().set_bounds()[Bbox.intervalx is now a property.]
      Bbox.intervaly().get_bounds()transforms.Bbox.intervaly
      Bbox.intervaly().set_bounds()[Bbox.intervaly is now a property.]
      Bbox.xmin()transforms.Bbox.x0 or -transforms.Bbox.xmin [1]
      Bbox.ymin()transforms.Bbox.y0 or -transforms.Bbox.ymin [1]
      Bbox.xmax()transforms.Bbox.x1 or -transforms.Bbox.xmax [1]
      Bbox.ymax()transforms.Bbox.y1 or -transforms.Bbox.ymax [1]
      Bbox.overlaps(bboxes)Bbox.count_overlaps(bboxes)
      bbox_all(bboxes)Bbox.union(bboxes) -[transforms.Bbox.union() is a staticmethod.]
      lbwh_to_bbox(l, b, w, h)Bbox.from_bounds(x0, y0, w, h) -[transforms.Bbox.from_bounds() is a staticmethod.]
      inverse_transform_bbox(trans, bbox)Bbox.inverse_transformed(trans)
      Interval.contains_open(v)interval_contains_open(tuple, v)
      Interval.contains(v)interval_contains(tuple, v)
      identity_transform()matplotlib.transforms.IdentityTransform
      blend_xy_sep_transform(xtrans, ytrans)blended_transform_factory(xtrans, ytrans)
      scale_transform(xs, ys)Affine2D().scale(xs[, ys])
      get_bbox_transform(boxin, boxout)BboxTransform(boxin, boxout) or -BboxTransformFrom(boxin) or -BboxTransformTo(boxout)
      Transform.seq_xy_tup(points)Transform.transform(points)
      Transform.inverse_xy_tup(points)Transform.inverted().transform(points)
      - - - - - -
      [1](1, 2, 3, 4) The Bbox is bound by the points -(x0, y0) to (x1, y1) and there is no defined order to these points, -that is, x0 is not necessarily the left edge of the box. To get -the left edge of the Bbox, use the read-only property -xmin.
      -
      -
      -

      matplotlib.axes

      - ---- - - - - - - - - - - - - - - - - - - - -
      Old methodNew method
      Axes.get_position()matplotlib.axes.Axes.get_position() [2]
      Axes.set_position()matplotlib.axes.Axes.set_position() [3]
      Axes.toggle_log_lineary()matplotlib.axes.Axes.set_yscale() [4]
      Subplot classremoved.
      -

      The Polar class has moved to matplotlib.projections.polar.

      - - - - - -
      [2]matplotlib.axes.Axes.get_position() used to return a list -of points, now it returns a matplotlib.transforms.Bbox -instance.
      - - - - - -
      [3]matplotlib.axes.Axes.set_position() now accepts either -four scalars or a matplotlib.transforms.Bbox instance.
      - - - - - -
      [4]Since the recfactoring allows for more than two scale types -(‘log’ or ‘linear’), it no longer makes sense to have a toggle. -Axes.toggle_log_lineary() has been removed.
      -
      -
      -

      matplotlib.artist

      - ---- - - - - - - - - - - -
      Old methodNew method
      Artist.set_clip_path(path)Artist.set_clip_path(path, transform) [5]
      - - - - - -
      [5]matplotlib.artist.Artist.set_clip_path() now accepts a -matplotlib.path.Path instance and a -matplotlib.transforms.Transform that will be applied to -the path immediately before clipping.
      -
      -
      -

      matplotlib.collections

      - ---- - - - - - - - - - - -
      Old methodNew method
      linestylelinestyles [6]
      - - - - - -
      [6]Linestyles are now treated like all other collection -attributes, i.e. a single value or multiple values may be -provided.
      -
      -
      -

      matplotlib.colors

      - ---- - - - - - - - - - - -
      Old methodNew method
      ColorConvertor.to_rgba_list(c)ColorConvertor.to_rgba_array(c) -[matplotlib.colors.ColorConvertor.to_rgba_array() -returns an Nx4 Numpy array of RGBA color quadruples.]
      -
      -
      -

      matplotlib.contour

      - ---- - - - - - - - - - - -
      Old methodNew method
      Contour._segmentsmatplotlib.contour.Contour.get_paths`() [Returns a -list of matplotlib.path.Path instances.]
      -
      -
      -

      matplotlib.figure

      - ---- - - - - - - - - - - -
      Old methodNew method
      Figure.dpi.get() / Figure.dpi.set()matplotlib.figure.Figure.dpi (a property)
      -
      -
      -

      matplotlib.patches

      - ---- - - - - - - - - - - -
      Old methodNew method
      Patch.get_verts()matplotlib.patches.Patch.get_path() [Returns a -matplotlib.path.Path instance]
      -
      -
      -

      matplotlib.backend_bases

      - ---- - - - - - - - - - - - - - - - - -
      Old methodNew method
      GraphicsContext.set_clip_rectangle(tuple)GraphicsContext.set_clip_rectangle(bbox)
      GraphicsContext.get_clip_path()GraphicsContext.get_clip_path() [7]
      GraphicsContext.set_clip_path()GraphicsContext.set_clip_path() [8]
      -
      -
      RendererBase
      -

      New methods:

      -
      -
      -

      Changed methods:

      -
      -
      -
      -

      Removed methods:

      -
      -
        -
      • draw_arc
      • -
      • draw_line_collection
      • -
      • draw_line
      • -
      • draw_lines
      • -
      • draw_point
      • -
      • draw_quad_mesh
      • -
      • draw_poly_collection
      • -
      • draw_polygon
      • -
      • draw_rectangle
      • -
      • draw_regpoly_collection
      • -
      -
      - - - - - -
      [7]matplotlib.backend_bases.GraphicsContext.get_clip_path() -returns a tuple of the form (path, affine_transform), where -path is a matplotlib.path.Path instance and -affine_transform is a matplotlib.transforms.Affine2D -instance.
      - - - - - -
      [8]matplotlib.backend_bases.GraphicsContext.set_clip_path() -now only accepts a matplotlib.transforms.TransformedPath -instance.
      -
      -
      -
      -
      -
      -

      Changes for 0.91.2

      -
        -
      • For csv2rec(), checkrows=0 is the new default indicating all rows -will be checked for type inference
      • -
      • A warning is issued when an image is drawn on log-scaled axes, since -it will not log-scale the image data.
      • -
      • Moved rec2gtk() to matplotlib.toolkits.gtktools
      • -
      • Moved rec2excel() to matplotlib.toolkits.exceltools
      • -
      • Removed, dead/experimental ExampleInfo, Namespace and Importer -code from matplotlib.__init__
      • -
      -
      -
      -

      Changes for 0.91.1

      -
      -
      -

      Changes for 0.91.0

      -
        -
      • Changed cbook.is_file_like() to -cbook.is_writable_file_like() and corrected behavior.
      • -
      • Added ax kwarg to pyplot.colorbar() and -Figure.colorbar() so that one can specify the axes object from -which space for the colorbar is to be taken, if one does not want to -make the colorbar axes manually.
      • -
      • Changed cbook.reversed() so it yields a tuple rather than a -(index, tuple). This agrees with the python reversed builtin, -and cbook only defines reversed if python doesn’t provide the -builtin.
      • -
      • Made skiprows=1 the default on csv2rec()
      • -
      • The gd and paint backends have been deleted.
      • -
      • The errorbar method and function now accept additional kwargs -so that upper and lower limits can be indicated by capping the -bar with a caret instead of a straight line segment.
      • -
      • The matplotlib.dviread file now has a parser for files like -psfonts.map and pdftex.map, to map TeX font names to external files.
      • -
      • The file matplotlib.type1font contains a new class for Type 1 -fonts. Currently it simply reads pfa and pfb format files and -stores the data in a way that is suitable for embedding in pdf -files. In the future the class might actually parse the font to -allow e.g., subsetting.
      • -
      • matplotlib.FT2Font now supports FT_Attach_File(). In -practice this can be used to read an afm file in addition to a -pfa/pfb file, to get metrics and kerning information for a Type 1 -font.
      • -
      • The AFM class now supports querying CapHeight and stem -widths. The get_name_char method now has an isord kwarg like -get_width_char.
      • -
      • Changed pcolor() default to shading=’flat’; but as noted now in the -docstring, it is preferable to simply use the edgecolor kwarg.
      • -
      • The mathtext font commands (\cal, \rm, \it, \tt) now -behave as TeX does: they are in effect until the next font change -command or the end of the grouping. Therefore uses of $\cal{R}$ -should be changed to ${\cal R}$. Alternatively, you may use the -new LaTeX-style font commands (\mathcal, \mathrm, -\mathit, \mathtt) which do affect the following group, -e.g., $\mathcal{R}$.
      • -
      • Text creation commands have a new default linespacing and a new -linespacing kwarg, which is a multiple of the maximum vertical -extent of a line of ordinary text. The default is 1.2; -linespacing=2 would be like ordinary double spacing, for example.
      • -
      • Changed default kwarg in -matplotlib.colors.Normalize.__init__`() to clip=False; -clipping silently defeats the purpose of the special over, under, -and bad values in the colormap, thereby leading to unexpected -behavior. The new default should reduce such surprises.
      • -
      • Made the emit property of set_xlim() and -set_ylim() True by default; removed -the Axes custom callback handling into a ‘callbacks’ attribute which -is a CallbackRegistry instance. This now -supports the ‘xlim_changed’ and ‘ylim_changed’ Axes events.
      • -
      -
      -
      -

      Changes for 0.90.1

      -
      The file dviread.py has a (very limited and fragile) dvi reader
      -for usetex support. The API might change in the future so don't
      -depend on it yet.
      -
      -Removed deprecated support for a float value as a gray-scale;
      -now it must be a string, like '0.5'.  Added alpha kwarg to
      -ColorConverter.to_rgba_list.
      -
      -New method set_bounds(vmin, vmax) for formatters, locators sets
      -the viewInterval and dataInterval from floats.
      -
      -Removed deprecated colorbar_classic.
      -
      -Line2D.get_xdata and get_ydata valid_only=False kwarg is replaced
      -by orig=True.  When True, it returns the original data, otherwise
      -the processed data (masked, converted)
      -
      -Some modifications to the units interface.
      -units.ConversionInterface.tickers renamed to
      -units.ConversionInterface.axisinfo and it now returns a
      -units.AxisInfo object rather than a tuple.  This will make it
      -easier to add axis info functionality (eg I added a default label
      -on this iteration) w/o having to change the tuple length and hence
      -the API of the client code every time new functionality is added.
      -Also, units.ConversionInterface.convert_to_value is now simply
      -named units.ConversionInterface.convert.
      -
      -Axes.errorbar uses Axes.vlines and Axes.hlines to draw its error
      -limits int he vertical and horizontal direction.  As you'll see
      -in the changes below, these functions now return a LineCollection
      -rather than a list of lines.  The new return signature for
      -errorbar is  ylins, caplines, errorcollections where
      -errorcollections is a xerrcollection, yerrcollection
      -
      -Axes.vlines and Axes.hlines now create and returns a LineCollection, not a list
      -of lines.  This is much faster.  The kwarg signature has changed,
      -so consult the docs
      -
      -MaxNLocator accepts a new Boolean kwarg ('integer') to force
      -ticks to integer locations.
      -
      -Commands that pass an argument to the Text constructor or to
      -Text.set_text() now accept any object that can be converted
      -with '%s'.  This affects xlabel(), title(), etc.
      -
      -Barh now takes a **kwargs dict instead of most of the old
      -arguments. This helps ensure that bar and barh are kept in sync,
      -but as a side effect you can no longer pass e.g., color as a
      -positional argument.
      -
      -ft2font.get_charmap() now returns a dict that maps character codes
      -to glyph indices (until now it was reversed)
      -
      -Moved data files into lib/matplotlib so that setuptools' develop
      -mode works. Re-organized the mpl-data layout so that this source
      -structure is maintained in the installation. (I.e. the 'fonts' and
      -'images' sub-directories are maintained in site-packages.).
      -Suggest removing site-packages/matplotlib/mpl-data and
      -~/.matplotlib/ttffont.cache before installing
      -
      -
      -
      -

      Changes for 0.90.0

      -
      All artists now implement a "pick" method which users should not
      -call.  Rather, set the "picker" property of any artist you want to
      -pick on (the epsilon distance in points for a hit test) and
      -register with the "pick_event" callback.  See
      -examples/pick_event_demo.py for details
      -
      -Bar, barh, and hist have "log" binary kwarg: log=True
      -sets the ordinate to a log scale.
      -
      -Boxplot can handle a list of vectors instead of just
      -an array, so vectors can have different lengths.
      -
      -Plot can handle 2-D x and/or y; it plots the columns.
      -
      -Added linewidth kwarg to bar and barh.
      -
      -Made the default Artist._transform None (rather than invoking
      -identity_transform for each artist only to have it overridden
      -later).  Use artist.get_transform() rather than artist._transform,
      -even in derived classes, so that the default transform will be
      -created lazily as needed
      -
      -New LogNorm subclass of Normalize added to colors.py.
      -All Normalize subclasses have new inverse() method, and
      -the __call__() method has a new clip kwarg.
      -
      -Changed class names in colors.py to match convention:
      -normalize -> Normalize, no_norm -> NoNorm.  Old names
      -are still available for now.
      -
      -Removed obsolete pcolor_classic command and method.
      -
      -Removed lineprops and markerprops from the Annotation code and
      -replaced them with an arrow configurable with kwarg arrowprops.
      -See examples/annotation_demo.py - JDH
      -
      -
      -
      -

      Changes for 0.87.7

      -
      Completely reworked the annotations API because I found the old
      -API cumbersome.  The new design is much more legible and easy to
      -read.  See matplotlib.text.Annotation and
      -examples/annotation_demo.py
      -
      -markeredgecolor and markerfacecolor cannot be configured in
      -matplotlibrc any more. Instead, markers are generally colored
      -automatically based on the color of the line, unless marker colors
      -are explicitly set as kwargs - NN
      -
      -Changed default comment character for load to '#' - JDH
      -
      -math_parse_s_ft2font_svg from mathtext.py & mathtext2.py now returns
      -width, height, svg_elements. svg_elements is an instance of Bunch (
      -cmbook.py) and has the attributes svg_glyphs and svg_lines, which are both
      -lists.
      -
      -Renderer.draw_arc now takes an additional parameter, rotation.
      -It specifies to draw the artist rotated in degrees anti-
      -clockwise.  It was added for rotated ellipses.
      -
      -Renamed Figure.set_figsize_inches to Figure.set_size_inches to
      -better match the get method, Figure.get_size_inches.
      -
      -Removed the copy_bbox_transform from transforms.py; added
      -shallowcopy methods to all transforms.  All transforms already
      -had deepcopy methods.
      -
      -FigureManager.resize(width, height): resize the window
      -specified in pixels
      -
      -barh: x and y args have been renamed to width and bottom
      -respectively, and their order has been swapped to maintain
      -a (position, value) order.
      -
      -bar and barh: now accept kwarg 'edgecolor'.
      -
      -bar and barh: The left, height, width and bottom args can
      -now all be scalars or sequences; see docstring.
      -
      -barh: now defaults to edge aligned instead of center
      -aligned bars
      -
      -bar, barh and hist: Added a keyword arg 'align' that
      -controls between edge or center bar alignment.
      -
      -Collections: PolyCollection and LineCollection now accept
      -vertices or segments either in the original form [(x,y),
      -(x,y), ...] or as a 2D numerix array, with X as the first column
      -and Y as the second. Contour and quiver output the numerix
      -form.  The transforms methods Bbox.update() and
      -Transformation.seq_xy_tups() now accept either form.
      -
      -Collections: LineCollection is now a ScalarMappable like
      -PolyCollection, etc.
      -
      -Specifying a grayscale color as a float is deprecated; use
      -a string instead, e.g., 0.75 -> '0.75'.
      -
      -Collections: initializers now accept any mpl color arg, or
      -sequence of such args; previously only a sequence of rgba
      -tuples was accepted.
      -
      -Colorbar: completely new version and api; see docstring.  The
      -original version is still accessible as colorbar_classic, but
      -is deprecated.
      -
      -Contourf: "extend" kwarg replaces "clip_ends"; see docstring.
      -Masked array support added to pcolormesh.
      -
      -Modified aspect-ratio handling:
      -    Removed aspect kwarg from imshow
      -    Axes methods:
      -        set_aspect(self, aspect, adjustable=None, anchor=None)
      -        set_adjustable(self, adjustable)
      -        set_anchor(self, anchor)
      -    Pylab interface:
      -        axis('image')
      -
      - Backend developers: ft2font's load_char now takes a flags
      - argument, which you can OR together from the LOAD_XXX
      - constants.
      -
      -
      -
      -

      Changes for 0.86

      -
      Matplotlib data is installed into the matplotlib module.
      -This is similar to package_data.  This should get rid of
      -having to check for many possibilities in _get_data_path().
      -The MATPLOTLIBDATA env key is still checked first to allow
      -for flexibility.
      -
      -1) Separated the color table data from cm.py out into
      -a new file, _cm.py, to make it easier to find the actual
      -code in cm.py and to add new colormaps. Everything
      -from _cm.py is imported by cm.py, so the split should be
      -transparent.
      -2) Enabled automatic generation of a colormap from
      -a list of colors in contour; see modified
      -examples/contour_demo.py.
      -3) Support for imshow of a masked array, with the
      -ability to specify colors (or no color at all) for
      -masked regions, and for regions that are above or
      -below the normally mapped region.  See
      -examples/image_masked.py.
      -4) In support of the above, added two new classes,
      -ListedColormap, and no_norm, to colors.py, and modified
      -the Colormap class to include common functionality. Added
      -a clip kwarg to the normalize class.
      -
      -
      -
      -

      Changes for 0.85

      -
      Made xtick and ytick separate props in rc
      -
      -made pos=None the default for tick formatters rather than 0 to
      -indicate "not supplied"
      -
      -Removed "feature" of minor ticks which prevents them from
      -overlapping major ticks.  Often you want major and minor ticks at
      -the same place, and can offset the major ticks with the pad.  This
      -could be made configurable
      -
      -Changed the internal structure of contour.py to a more OO style.
      -Calls to contour or contourf in axes.py or pylab.py now return
      -a ContourSet object which contains references to the
      -LineCollections or PolyCollections created by the call,
      -as well as the configuration variables that were used.
      -The ContourSet object is a "mappable" if a colormap was used.
      -
      -Added a clip_ends kwarg to contourf. From the docstring:
      -         * clip_ends = True
      -           If False, the limits for color scaling are set to the
      -           minimum and maximum contour levels.
      -           True (default) clips the scaling limits.  Example:
      -           if the contour boundaries are V = [-100, 2, 1, 0, 1, 2, 100],
      -           then the scaling limits will be [-100, 100] if clip_ends
      -           is False, and [-3, 3] if clip_ends is True.
      -Added kwargs linewidths, antialiased, and nchunk to contourf.  These
      -are experimental; see the docstring.
      -
      -Changed Figure.colorbar():
      -    kw argument order changed;
      -    if mappable arg is a non-filled ContourSet, colorbar() shows
      -            lines instead hof polygons.
      -    if mappable arg is a filled ContourSet with clip_ends=True,
      -            the endpoints are not labelled, so as to give the
      -            correct impression of open-endedness.
      -
      -Changed LineCollection.get_linewidths to get_linewidth, for
      -consistency.
      -
      -
      -
      -

      Changes for 0.84

      -
      Unified argument handling between hlines and vlines.  Both now
      -take optionally a fmt argument (as in plot) and a keyword args
      -that can be passed onto Line2D.
      -
      -Removed all references to "data clipping" in rc and lines.py since
      -these were not used and not optimized.  I'm sure they'll be
      -resurrected later with a better implementation when needed.
      -
      -'set' removed - no more deprecation warnings.  Use 'setp' instead.
      -
      -Backend developers: Added flipud method to image and removed it
      -from to_str.  Removed origin kwarg from backend.draw_image.
      -origin is handled entirely by the frontend now.
      -
      -
      -
      -

      Changes for 0.83

      -
      - Made HOME/.matplotlib the new config dir where the matplotlibrc
      -  file, the ttf.cache, and the tex.cache live.  The new default
      -  filenames in .matplotlib have no leading dot and are not hidden.
      -  e.g., the new names are matplotlibrc, tex.cache, and ttffont.cache.
      -  This is how ipython does it so it must be right.
      -
      -  If old files are found, a warning is issued and they are moved to
      -  the new location.
      -
      -- backends/__init__.py no longer imports new_figure_manager,
      -  draw_if_interactive and show from the default backend, but puts
      -  these imports into a call to pylab_setup.  Also, the Toolbar is no
      -  longer imported from WX/WXAgg.  New usage:
      -
      -    from backends import pylab_setup
      -    new_figure_manager, draw_if_interactive, show = pylab_setup()
      -
      -- Moved Figure.get_width_height() to FigureCanvasBase. It now
      -  returns int instead of float.
      -
      -
      -
      -

      Changes for 0.82

      -
      - toolbar import change in GTKAgg, GTKCairo and WXAgg
      -
      -- Added subplot config tool to GTK* backends -- note you must now
      -  import the NavigationToolbar2 from your backend of choice rather
      -  than from backend_gtk because it needs to know about the backend
      -  specific canvas -- see examples/embedding_in_gtk2.py.  Ditto for
      -  wx backend -- see examples/embedding_in_wxagg.py
      -
      -
      -- hist bin change
      -
      -    Sean Richards notes there was a problem in the way we created
      -    the binning for histogram, which made the last bin
      -    underrepresented.  From his post:
      -
      -      I see that hist uses the linspace function to create the bins
      -      and then uses searchsorted to put the values in their correct
      -      bin. That's all good but I am confused over the use of linspace
      -      for the bin creation. I wouldn't have thought that it does
      -      what is needed, to quote the docstring it creates a "Linear
      -      spaced array from min to max". For it to work correctly
      -      shouldn't the values in the bins array be the same bound for
      -      each bin? (i.e. each value should be the lower bound of a
      -      bin). To provide the correct bins for hist would it not be
      -      something like
      -
      -      def bins(xmin, xmax, N):
      -        if N==1: return xmax
      -        dx = (xmax-xmin)/N # instead of N-1
      -        return xmin + dx*arange(N)
      -
      -
      -     This suggestion is implemented in 0.81.  My test script with these
      -     changes does not reveal any bias in the binning
      -
      -      from matplotlib.numerix.mlab import randn, rand, zeros, Float
      -      from matplotlib.mlab import hist, mean
      -
      -      Nbins = 50
      -      Ntests = 200
      -      results = zeros((Ntests,Nbins), typecode=Float)
      -      for i in range(Ntests):
      -          print 'computing', i
      -          x = rand(10000)
      -          n, bins = hist(x, Nbins)
      -          results[i] = n
      -      print mean(results)
      -
      -
      -
      -

      Changes for 0.81

      -
      - pylab and artist "set" functions renamed to setp to avoid clash
      -  with python2.4 built-in set.  Current version will issue a
      -  deprecation warning which will be removed in future versions
      -
      -- imshow interpolation arguments changes for advanced interpolation
      -  schemes.  See help imshow, particularly the interpolation,
      -  filternorm and filterrad kwargs
      -
      -- Support for masked arrays has been added to the plot command and
      -  to the Line2D object.  Only the valid points are plotted.  A
      -  "valid_only" kwarg was added to the get_xdata() and get_ydata()
      -  methods of Line2D; by default it is False, so that the original
      -  data arrays are returned. Setting it to True returns the plottable
      -  points.
      -
      -- contour changes:
      -
      -  Masked arrays: contour and contourf now accept masked arrays as
      -    the variable to be contoured.  Masking works correctly for
      -    contour, but a bug remains to be fixed before it will work for
      -    contourf.  The "badmask" kwarg has been removed from both
      -    functions.
      -
      -   Level argument changes:
      -
      -     Old version: a list of levels as one of the positional
      -     arguments specified the lower bound of each filled region; the
      -     upper bound of the last region was taken as a very large
      -     number.  Hence, it was not possible to specify that z values
      -     between 0 and 1, for example, be filled, and that values
      -     outside that range remain unfilled.
      -
      -     New version: a list of N levels is taken as specifying the
      -     boundaries of N-1 z ranges.  Now the user has more control over
      -     what is colored and what is not.  Repeated calls to contourf
      -     (with different colormaps or color specifications, for example)
      -     can be used to color different ranges of z.  Values of z
      -     outside an expected range are left uncolored.
      -
      -     Example:
      -       Old: contourf(z, [0, 1, 2]) would yield 3 regions: 0-1, 1-2, and >2.
      -       New: it would yield 2 regions: 0-1, 1-2.  If the same 3 regions were
      -       desired, the equivalent list of levels would be [0, 1, 2,
      -       1e38].
      -
      -
      -
      -

      Changes for 0.80

      -
      - xlim/ylim/axis always return the new limits regardless of
      -  arguments.  They now take kwargs which allow you to selectively
      -  change the upper or lower limits while leaving unnamed limits
      -  unchanged.  See help(xlim) for example
      -
      -
      -
      -

      Changes for 0.73

      -
      - Removed deprecated ColormapJet and friends
      -
      -- Removed all error handling from the verbose object
      -
      -- figure num of zero is now allowed
      -
      -
      -
      -

      Changes for 0.72

      -
      - Line2D, Text, and Patch copy_properties renamed update_from and
      -  moved into artist base class
      -
      -- LineCollecitons.color renamed to LineCollections.set_color for
      -  consistency with set/get introspection mechanism,
      -
      -- pylab figure now defaults to num=None, which creates a new figure
      -  with a guaranteed unique number
      -
      -- contour method syntax changed - now it is MATLAB compatible
      -
      -    unchanged: contour(Z)
      -    old: contour(Z, x=Y, y=Y)
      -    new: contour(X, Y, Z)
      -
      -  see http://matplotlib.sf.net/matplotlib.pylab.html#-contour
      -
      -
      - - Increased the default resolution for save command.
      -
      - - Renamed the base attribute of the ticker classes to _base to avoid conflict
      -   with the base method.  Sitt for subs
      -
      - - subs=none now does autosubbing in the tick locator.
      -
      - - New subplots that overlap old will delete the old axes.  If you
      -   do not want this behavior, use fig.add_subplot or the axes
      -   command
      -
      -
      -
      -

      Changes for 0.71

      -
      Significant numerix namespace changes, introduced to resolve
      -namespace clashes between python built-ins and mlab names.
      -Refactored numerix to maintain separate modules, rather than
      -folding all these names into a single namespace.  See the following
      -mailing list threads for more information and background
      -
      -  http://sourceforge.net/mailarchive/forum.php?thread_id=6398890&forum_id=36187
      -  http://sourceforge.net/mailarchive/forum.php?thread_id=6323208&forum_id=36187
      -
      -
      -OLD usage
      -
      -  from matplotlib.numerix import array, mean, fft
      -
      -NEW usage
      -
      -  from matplotlib.numerix import array
      -  from matplotlib.numerix.mlab import mean
      -  from matplotlib.numerix.fft import fft
      -
      -numerix dir structure mirrors numarray (though it is an incomplete
      -implementation)
      -
      -  numerix
      -  numerix/mlab
      -  numerix/linear_algebra
      -  numerix/fft
      -  numerix/random_array
      -
      -but of course you can use 'numerix : Numeric' and still get the
      -symbols.
      -
      -pylab still imports most of the symbols from Numerix, MLab, fft,
      -etc, but is more cautious.  For names that clash with python names
      -(min, max, sum), pylab keeps the builtins and provides the numeric
      -versions with an a* prefix, eg (amin, amax, asum)
      -
      -
      -
      -

      Changes for 0.70

      -
      MplEvent factored into a base class Event and derived classes
      -MouseEvent and KeyEvent
      -
      -Removed definct set_measurement in wx toolbar
      -
      -
      -
      -

      Changes for 0.65.1

      -
      removed add_axes and add_subplot from backend_bases.  Use
      -figure.add_axes and add_subplot instead.  The figure now manages the
      -current axes with gca and sca for get and set current axes.  If you
      -have code you are porting which called, eg, figmanager.add_axes, you
      -can now simply do figmanager.canvas.figure.add_axes.
      -
      -
      -
      -

      Changes for 0.65

      -
      mpl_connect and mpl_disconnect in the MATLAB interface renamed to
      -connect and disconnect
      -
      -Did away with the text methods for angle since they were ambiguous.
      -fontangle could mean fontstyle (obligue, etc) or the rotation of the
      -text.  Use style and rotation instead.
      -
      -
      -
      -

      Changes for 0.63

      -
      Dates are now represented internally as float days since 0001-01-01,
      -UTC.
      -
      -All date tickers and formatters are now in matplotlib.dates, rather
      -than matplotlib.tickers
      -
      -converters have been abolished from all functions and classes.
      -num2date and date2num are now the converter functions for all date
      -plots
      -
      -Most of the date tick locators have a different meaning in their
      -constructors.  In the prior implementation, the first argument was a
      -base and multiples of the base were ticked.  e.g.,
      -
      -  HourLocator(5)  # old: tick every 5 minutes
      -
      -In the new implementation, the explicit points you want to tick are
      -provided as a number or sequence
      -
      -   HourLocator(range(0,5,61))  # new: tick every 5 minutes
      -
      -This gives much greater flexibility.  I have tried to make the
      -default constructors (no args) behave similarly, where possible.
      -
      -Note that YearLocator still works under the base/multiple scheme.
      -The difference between the YearLocator and the other locators is
      -that years are not recurrent.
      -
      -
      -Financial functions:
      -
      -  matplotlib.finance.quotes_historical_yahoo(ticker, date1, date2)
      -
      -   date1, date2 are now datetime instances.  Return value is a list
      -   of quotes where the quote time is a float - days since gregorian
      -   start, as returned by date2num
      -
      -   See examples/finance_demo.py for example usage of new API
      -
      -
      -
      -

      Changes for 0.61

      -
      canvas.connect is now deprecated for event handling.  use
      -mpl_connect and mpl_disconnect instead.  The callback signature is
      -func(event) rather than func(widget, event)
      -
      -
      -
      -

      Changes for 0.60

      -
      ColormapJet and Grayscale are deprecated.  For backwards
      -compatibility, they can be obtained either by doing
      -
      -  from matplotlib.cm import ColormapJet
      -
      -or
      -
      -  from matplotlib.matlab import *
      -
      -They are replaced by cm.jet and cm.grey
      -
      -
      -
      -

      Changes for 0.54.3

      -
      removed the set_default_font / get_default_font scheme from the
      -font_manager to unify customization of font defaults with the rest of
      -the rc scheme.  See examples/font_properties_demo.py and help(rc) in
      -matplotlib.matlab.
      -
      -
      -
      -

      Changes for 0.54

      -
      -

      MATLAB interface

      -
      -

      dpi

      -

      Several of the backends used a PIXELS_PER_INCH hack that I added to -try and make images render consistently across backends. This just -complicated matters. So you may find that some font sizes and line -widths appear different than before. Apologies for the -inconvenience. You should set the dpi to an accurate value for your -screen to get true sizes.

      -
      -
      -

      pcolor and scatter

      -

      There are two changes to the MATLAB interface API, both involving the -patch drawing commands. For efficiency, pcolor and scatter have been -rewritten to use polygon collections, which are a new set of objects -from matplotlib.collections designed to enable efficient handling of -large collections of objects. These new collections make it possible -to build large scatter plots or pcolor plots with no loops at the -python level, and are significantly faster than their predecessors. -The original pcolor and scatter functions are retained as -pcolor_classic and scatter_classic.

      -

      The return value from pcolor is a PolyCollection. Most of the -propertes that are available on rectangles or other patches are also -available on PolyCollections, eg you can say:

      -
      c = scatter(blah, blah)
      -c.set_linewidth(1.0)
      -c.set_facecolor('r')
      -c.set_alpha(0.5)
      -
      -
      -

      or:

      -
      c = scatter(blah, blah)
      -set(c, 'linewidth', 1.0, 'facecolor', 'r', 'alpha', 0.5)
      -
      -
      -

      Because the collection is a single object, you no longer need to loop -over the return value of scatter or pcolor to set properties for the -entire list.

      -

      If you want the different elements of a collection to vary on a -property, eg to have different line widths, see matplotlib.collections -for a discussion on how to set the properties as a sequence.

      -

      For scatter, the size argument is now in points^2 (the area of the -symbol in points) as in MATLAB and is not in data coords as before. -Using sizes in data coords caused several problems. So you will need -to adjust your size arguments accordingly or use scatter_classic.

      -
      -
      -

      mathtext spacing

      -

      For reasons not clear to me (and which I’ll eventually fix) spacing no -longer works in font groups. However, I added three new spacing -commands which compensate for this ‘’ (regular space), ‘/’ (small -space) and ‘hspace{frac}’ where frac is a fraction of fontsize in -points. You will need to quote spaces in font strings, is:

      -
      title(r'$\rm{Histogram\ of\ IQ:}\ \mu=100,\ \sigma=15$')
      -
      -
      -
      -
      -
      -

      Object interface - Application programmers

      -
      -

      Autoscaling

      -
      -
      The x and y axis instances no longer have autoscale view. These are -handled by axes.autoscale_view
      -
      -
      -

      Axes creation

      -
      -

      You should not instantiate your own Axes any more using the OO API. -Rather, create a Figure as before and in place of:

      -
      f = Figure(figsize=(5,4), dpi=100)
      -a = Subplot(f, 111)
      -f.add_axis(a)
      -
      -
      -

      use:

      -
      f = Figure(figsize=(5,4), dpi=100)
      -a = f.add_subplot(111)
      -
      -
      -

      That is, add_axis no longer exists and is replaced by:

      -
      add_axes(rect, axisbg=defaultcolor, frameon=True)
      -add_subplot(num, axisbg=defaultcolor, frameon=True)
      -
      -
      -
      -
      -
      -

      Artist methods

      -
      -
      If you define your own Artists, you need to rename the _draw method -to draw
      -
      -
      -

      Bounding boxes

      -
      -

      matplotlib.transforms.Bound2D is replaced by -matplotlib.transforms.Bbox. If you want to construct a bbox from -left, bottom, width, height (the signature for Bound2D), use -matplotlib.transforms.lbwh_to_bbox, as in

      -
      -
      bbox = clickBBox = lbwh_to_bbox(left, bottom, width, height)
      -

      The Bbox has a different API than the Bound2D. e.g., if you want to -get the width and height of the bbox

      -
      -
      -
      OLD::
      -
      width = fig.bbox.x.interval() -height = fig.bbox.y.interval()
      -
      New::
      -
      width = fig.bbox.width() -height = fig.bbox.height()
      -
      -
      -
      -
      -
      -

      Object constructors

      -
      -

      You no longer pass the bbox, dpi, or transforms to the various -Artist constructors. The old way or creating lines and rectangles -was cumbersome because you had to pass so many attributes to the -Line2D and Rectangle classes not related directly to the geometry -and properties of the object. Now default values are added to the -object when you call axes.add_line or axes.add_patch, so they are -hidden from the user.

      -

      If you want to define a custom transformation on these objects, call -o.set_transform(trans) where trans is a Transformation instance.

      -

      In prior versions of you wanted to add a custom line in data coords, -you would have to do

      -
      -
      -
      l = Line2D(dpi, bbox, x, y,
      -
      color = color, -transx = transx, -transy = transy, -)
      -
      -
      -

      now all you need is

      -
      -
      l = Line2D(x, y, color=color)
      -

      and the axes will set the transformation for you (unless you have -set your own already, in which case it will eave it unchanged)

      -
      -
      -
      -

      Transformations

      -
      -

      The entire transformation architecture has been rewritten. -Previously the x and y transformations where stored in the xaxis and -yaxis instances. The problem with this approach is it only allows -for separable transforms (where the x and y transformations don’t -depend on one another). But for cases like polar, they do. Now -transformations operate on x,y together. There is a new base class -matplotlib.transforms.Transformation and two concrete -implementations, matplotlib.transforms.SeparableTransformation and -matplotlib.transforms.Affine. The SeparableTransformation is -constructed with the bounding box of the input (this determines the -rectangular coordinate system of the input, ie the x and y view -limits), the bounding box of the display, and possibly nonlinear -transformations of x and y. The 2 most frequently used -transformations, data coordinates -> display and axes coordinates -> -display are available as ax.transData and ax.transAxes. See -alignment_demo.py which uses axes coords.

      -

      Also, the transformations should be much faster now, for two reasons

      -
      -
        -
      • they are written entirely in extension code

        -
      • -
      • because they operate on x and y together, they can do the entire -transformation in one loop. Earlier I did something along the -lines of:

        -
        xt = sx*func(x) + tx
        -yt = sy*func(y) + ty
        -
        -
        -

        Although this was done in numerix, it still involves 6 length(x) -for-loops (the multiply, add, and function evaluation each for x -and y). Now all of that is done in a single pass.

        -
      • -
      -
      -

      If you are using transformations and bounding boxes to get the -cursor position in data coordinates, the method calls are a little -different now. See the updated examples/coords_demo.py which shows -you how to do this.

      -

      Likewise, if you are using the artist bounding boxes to pick items -on the canvas with the GUI, the bbox methods are somewhat -different. You will need to see the updated -examples/object_picker.py.

      -

      See unit/transforms_unit.py for many examples using the new -transformations.

      -
      -
      -
      -
      -
      -

      Changes for 0.50

      -
      * refactored Figure class so it is no longer backend dependent.
      -  FigureCanvasBackend takes over the backend specific duties of the
      -  Figure.  matplotlib.backend_bases.FigureBase moved to
      -  matplotlib.figure.Figure.
      -
      -* backends must implement FigureCanvasBackend (the thing that
      -  controls the figure and handles the events if any) and
      -  FigureManagerBackend (wraps the canvas and the window for MATLAB
      -  interface).  FigureCanvasBase implements a backend switching
      -  mechanism
      -
      -* Figure is now an Artist (like everything else in the figure) and
      -  is totally backend independent
      -
      -* GDFONTPATH renamed to TTFPATH
      -
      -* backend faceColor argument changed to rgbFace
      -
      -* colormap stuff moved to colors.py
      -
      -* arg_to_rgb in backend_bases moved to class ColorConverter in
      -  colors.py
      -
      -* GD users must upgrade to gd-2.0.22 and gdmodule-0.52 since new gd
      -  features (clipping, antialiased lines) are now used.
      -
      -* Renderer must implement points_to_pixels
      -
      -Migrating code:
      -
      -MATLAB interface:
      -
      -  The only API change for those using the MATLAB interface is in how
      -  you call figure redraws for dynamically updating figures.  In the
      -  old API, you did
      -
      -    fig.draw()
      -
      -  In the new API, you do
      -
      -    manager = get_current_fig_manager()
      -    manager.canvas.draw()
      -
      -  See the examples system_monitor.py, dynamic_demo.py, and anim.py
      -
      -API
      -
      -  There is one important API change for application developers.
      -  Figure instances used subclass GUI widgets that enabled them to be
      -  placed directly into figures.  e.g., FigureGTK subclassed
      -  gtk.DrawingArea.  Now the Figure class is independent of the
      -  backend, and FigureCanvas takes over the functionality formerly
      -  handled by Figure.  In order to include figures into your apps,
      -  you now need to do, for example
      -
      -    # gtk example
      -    fig = Figure(figsize=(5,4), dpi=100)
      -    canvas = FigureCanvasGTK(fig)  # a gtk.DrawingArea
      -    canvas.show()
      -    vbox.pack_start(canvas)
      -
      -  If you use the NavigationToolbar, this in now intialized with a
      -  FigureCanvas, not a Figure.  The examples embedding_in_gtk.py,
      -  embedding_in_gtk2.py, and mpl_with_glade.py all reflect the new
      -  API so use these as a guide.
      -
      -  All prior calls to
      -
      -   figure.draw()  and
      -   figure.print_figure(args)
      -
      -  should now be
      -
      -   canvas.draw()  and
      -   canvas.print_figure(args)
      -
      -  Apologies for the inconvenience.  This refactorization brings
      -  significant more freedom in developing matplotlib and should bring
      -  better plotting capabilities, so I hope the inconvenience is worth
      -  it.
      -
      -
      -
      -

      Changes for 0.42

      -
      * Refactoring AxisText to be backend independent.  Text drawing and
      -  get_window_extent functionality will be moved to the Renderer.
      -
      -* backend_bases.AxisTextBase is now text.Text module
      -
      -* All the erase and reset functionality removed from AxisText - not
      -  needed with double buffered drawing.  Ditto with state change.
      -  Text instances have a get_prop_tup method that returns a hashable
      -  tuple of text properties which you can use to see if text props
      -  have changed, eg by caching a font or layout instance in a dict
      -  with the prop tup as a key -- see RendererGTK.get_pango_layout in
      -  backend_gtk for an example.
      -
      -* Text._get_xy_display renamed Text.get_xy_display
      -
      -* Artist set_renderer and wash_brushes methods removed
      -
      -* Moved Legend class from matplotlib.axes into matplotlib.legend
      -
      -* Moved Tick, XTick, YTick, Axis, XAxis, YAxis from matplotlib.axes
      -  to matplotlib.axis
      -
      -* moved process_text_args to matplotlib.text
      -
      -* After getting Text handled in a backend independent fashion, the
      -  import process is much cleaner since there are no longer cyclic
      -  dependencies
      -
      -* matplotlib.matlab._get_current_fig_manager renamed to
      -  matplotlib.matlab.get_current_fig_manager to allow user access to
      -  the GUI window attribute, eg figManager.window for GTK and
      -  figManager.frame for wx
      -
      -
      -
      -

      Changes for 0.40

      -
      - Artist
      -    * __init__ takes a DPI instance and a Bound2D instance which is
      -      the bounding box of the artist in display coords
      -    * get_window_extent returns a Bound2D instance
      -    * set_size is removed; replaced by bbox and dpi
      -    * the clip_gc method is removed.  Artists now clip themselves with
      -      their box
      -    * added _clipOn boolean attribute.  If True, gc clip to bbox.
      -
      -- AxisTextBase
      -    * Initialized with a transx, transy which are Transform instances
      -    * set_drawing_area removed
      -    * get_left_right and get_top_bottom are replaced by get_window_extent
      -
      -- Line2D Patches now take transx, transy
      -    * Initialized with a transx, transy which are Transform instances
      -
      -- Patches
      -   * Initialized with a transx, transy which are Transform instances
      -
      -- FigureBase attributes dpi is a DPI intance rather than scalar and
      -  new attribute bbox is a Bound2D in display coords, and I got rid
      -  of the left, width, height, etc... attributes.  These are now
      -  accessible as, for example, bbox.x.min is left, bbox.x.interval()
      -  is width, bbox.y.max is top, etc...
      -
      -- GcfBase attribute pagesize renamed to figsize
      -
      -- Axes
      -    * removed figbg attribute
      -    * added fig instance to __init__
      -    * resizing is handled by figure call to resize.
      -
      -- Subplot
      -    * added fig instance to __init__
      -
      -- Renderer methods for patches now take gcEdge and gcFace instances.
      -  gcFace=None takes the place of filled=False
      -
      -- True and False symbols provided by cbook in a python2.3 compatible
      -  way
      -
      -- new module transforms supplies Bound1D, Bound2D and Transform
      -  instances and more
      -
      -- Changes to the MATLAB helpers API
      -
      -  * _matlab_helpers.GcfBase is renamed by Gcf.  Backends no longer
      -    need to derive from this class.  Instead, they provide a factory
      -    function new_figure_manager(num, figsize, dpi).  The destroy
      -    method of the GcfDerived from the backends is moved to the derived
      -    FigureManager.
      -
      -  * FigureManagerBase moved to backend_bases
      -
      -  * Gcf.get_all_figwins renamed to Gcf.get_all_fig_managers
      -
      -Jeremy:
      -
      -  Make sure to self._reset = False in AxisTextWX._set_font.  This was
      -  something missing in my backend code.
      -
      -
      - - - - - - -
      - - - - - \ No newline at end of file diff --git a/dev/api/artist_api.html b/dev/api/artist_api.html deleted file mode 100644 index da272f93ad5..00000000000 --- a/dev/api/artist_api.html +++ /dev/null @@ -1,6758 +0,0 @@ - - - - - - - - artists — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      Table Of Contents

      - - -

      Previous topic

      -

      animation

      -

      Next topic

      -

      axes

      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      artists

      -

      -Inheritance diagram of matplotlib.patches, matplotlib.lines, matplotlib.text - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

      -
      -

      matplotlib.artist

      -
      -
      -class matplotlib.artist.Artist
      -

      Bases: object

      -

      Abstract base class for someone who renders into a -FigureCanvas.

      -
      -
      -add_callback(func)
      -

      Adds a callback function that will be called whenever one of -the Artist‘s properties changes.

      -

      Returns an id that is useful for removing the callback with -remove_callback() later.

      -
      - -
      -
      -aname = 'Artist'
      -
      - -
      -
      -contains(mouseevent)
      -

      Test whether the artist contains the mouse event.

      -

      Returns the truth value and a dictionary of artist specific details of -selection, such as which points are contained in the pick radius. See -individual artists for details.

      -
      - -
      -
      -convert_xunits(x)
      -

      For artists in an axes, if the xaxis has units support, -convert x using xaxis unit type

      -
      - -
      -
      -convert_yunits(y)
      -

      For artists in an axes, if the yaxis has units support, -convert y using yaxis unit type

      -
      - -
      -
      -draw(renderer, *args, **kwargs)
      -

      Derived classes drawing method

      -
      - -
      -
      -findobj(match=None, include_self=True)
      -

      Find artist objects.

      -

      Recursively find all Artist instances -contained in self.

      -

      match can be

      -
      -
        -
      • None: return all objects contained in artist.
      • -
      • function with signature boolean = match(artist) -used to filter matches
      • -
      • class instance: e.g., Line2D. Only return artists of class type.
      • -
      -
      -

      If include_self is True (default), include self in the list to be -checked for a match.

      -
      - -
      -
      -get_agg_filter()
      -

      return filter function to be used for agg filter

      -
      - -
      -
      -get_alpha()
      -

      Return the alpha value used for blending - not supported on all -backends

      -
      - -
      -
      -get_animated()
      -

      Return the artist’s animated state

      -
      - -
      -
      -get_axes()
      -

      Return the Axes instance the artist -resides in, or None

      -
      - -
      -
      -get_children()
      -

      Return a list of the child Artist`s this -:class:`Artist contains.

      -
      - -
      -
      -get_clip_box()
      -

      Return artist clipbox

      -
      - -
      -
      -get_clip_on()
      -

      Return whether artist uses clipping

      -
      - -
      -
      -get_clip_path()
      -

      Return artist clip path

      -
      - -
      -
      -get_contains()
      -

      Return the _contains test used by the artist, or None for default.

      -
      - -
      -
      -get_figure()
      -

      Return the Figure instance the -artist belongs to.

      -
      - -
      -
      -get_gid()
      -

      Returns the group id

      -
      - -
      -
      -get_label()
      -

      Get the label used for this artist in the legend.

      -
      - -
      -
      -get_picker()
      -

      Return the picker object used by this artist

      -
      - -
      -
      -get_rasterized()
      -

      return True if the artist is to be rasterized

      -
      - -
      -
      -get_snap()
      -

      Returns the snap setting which may be:

      -
      -
        -
      • True: snap vertices to the nearest pixel center
      • -
      • False: leave vertices as-is
      • -
      • None: (auto) If the path contains only rectilinear line -segments, round to the nearest pixel center
      • -
      -
      -

      Only supported by the Agg and MacOSX backends.

      -
      - -
      -
      -get_transform()
      -

      Return the Transform -instance used by this artist.

      -
      - -
      -
      -get_transformed_clip_path_and_affine()
      -

      Return the clip path with the non-affine part of its -transformation applied, and the remaining affine part of its -transformation.

      -
      - -
      -
      -get_url()
      -

      Returns the url

      -
      - -
      -
      -get_visible()
      -

      Return the artist’s visiblity

      -
      - -
      -
      -get_window_extent(renderer)
      -

      Get the axes bounding box in display space. -Subclasses should override for inclusion in the bounding box -“tight” calculation. Default is to return an empty bounding -box at 0, 0.

      -
      - -
      -
      -get_zorder()
      -

      Return the Artist‘s zorder.

      -
      - -
      -
      -have_units()
      -

      Return True if units are set on the x or y axes

      -
      - -
      -
      -hitlist(event)
      -

      List the children of the artist which contain the mouse event event.

      -
      - -
      -
      -is_figure_set()
      -

      Returns True if the artist is assigned to a -Figure.

      -
      - -
      -
      -is_transform_set()
      -

      Returns True if Artist has a transform explicitly -set.

      -
      - -
      -
      -pchanged()
      -

      Fire an event when property changed, calling all of the -registered callbacks.

      -
      - -
      -
      -pick(mouseevent)
      -

      call signature:

      -
      pick(mouseevent)
      -
      -
      -

      each child artist will fire a pick event if mouseevent is over -the artist and the artist has picker set

      -
      - -
      -
      -pickable()
      -

      Return True if Artist is pickable.

      -
      - -
      -
      -properties()
      -

      return a dictionary mapping property name -> value for all Artist props

      -
      - -
      -
      -remove()
      -

      Remove the artist from the figure if possible. The effect -will not be visible until the figure is redrawn, e.g., with -matplotlib.axes.Axes.draw_idle(). Call -matplotlib.axes.Axes.relim() to update the axes limits -if desired.

      -

      Note: relim() will not see -collections even if the collection was added to axes with -autolim = True.

      -

      Note: there is no support for removing the artist’s legend entry.

      -
      - -
      -
      -remove_callback(oid)
      -

      Remove a callback based on its id.

      -
      -

      See also

      -
      -
      add_callback()
      -
      For adding callbacks
      -
      -
      -
      - -
      -
      -set(**kwargs)
      -

      A tkstyle set command, pass kwargs to set properties

      -
      - -
      -
      -set_agg_filter(filter_func)
      -

      set agg_filter fuction.

      -
      - -
      -
      -set_alpha(alpha)
      -

      Set the alpha value used for blending - not supported on -all backends.

      -

      ACCEPTS: float (0.0 transparent through 1.0 opaque)

      -
      - -
      -
      -set_animated(b)
      -

      Set the artist’s animation state.

      -

      ACCEPTS: [True | False]

      -
      - -
      -
      -set_axes(axes)
      -

      Set the Axes instance in which the -artist resides, if any.

      -

      ACCEPTS: an Axes instance

      -
      - -
      -
      -set_clip_box(clipbox)
      -

      Set the artist’s clip Bbox.

      -

      ACCEPTS: a matplotlib.transforms.Bbox instance

      -
      - -
      -
      -set_clip_on(b)
      -

      Set whether artist uses clipping.

      -

      ACCEPTS: [True | False]

      -
      - -
      -
      -set_clip_path(path, transform=None)
      -

      Set the artist’s clip path, which may be:

      -
      -
        -
      • a Patch (or subclass) instance

        -
      • -
      • -
        a Path instance, in which case
        -

        an optional Transform -instance may be provided, which will be applied to the -path before using it for clipping.

        -
        -
        -
      • -
      • None, to remove the clipping path

        -
      • -
      -
      -

      For efficiency, if the path happens to be an axis-aligned -rectangle, this method will set the clipping box to the -corresponding rectangle and set the clipping path to None.

      -

      ACCEPTS: [ (Path, -Transform) | -Patch | None ]

      -
      - -
      -
      -set_contains(picker)
      -

      Replace the contains test used by this artist. The new picker -should be a callable function which determines whether the -artist is hit by the mouse event:

      -
      hit, props = picker(artist, mouseevent)
      -
      -
      -

      If the mouse event is over the artist, return hit = True -and props is a dictionary of properties you want returned -with the contains test.

      -

      ACCEPTS: a callable function

      -
      - -
      -
      -set_figure(fig)
      -

      Set the Figure instance the artist -belongs to.

      -

      ACCEPTS: a matplotlib.figure.Figure instance

      -
      - -
      -
      -set_gid(gid)
      -

      Sets the (group) id for the artist

      -

      ACCEPTS: an id string

      -
      - -
      -
      -set_label(s)
      -

      Set the label to s for auto legend.

      -

      ACCEPTS: string or anything printable with ‘%s’ conversion.

      -
      - -
      -
      -set_lod(on)
      -

      Set Level of Detail on or off. If on, the artists may examine -things like the pixel width of the axes and draw a subset of -their contents accordingly

      -

      ACCEPTS: [True | False]

      -
      - -
      -
      -set_picker(picker)
      -

      Set the epsilon for picking used by this artist

      -

      picker can be one of the following:

      -
      -
        -
      • None: picking is disabled for this artist (default)

        -
      • -
      • A boolean: if True then picking will be enabled and the -artist will fire a pick event if the mouse event is over -the artist

        -
      • -
      • A float: if picker is a number it is interpreted as an -epsilon tolerance in points and the artist will fire -off an event if it’s data is within epsilon of the mouse -event. For some artists like lines and patch collections, -the artist may provide additional data to the pick event -that is generated, e.g., the indices of the data within -epsilon of the pick event

        -
      • -
      • A function: if picker is callable, it is a user supplied -function which determines whether the artist is hit by the -mouse event:

        -
        hit, props = picker(artist, mouseevent)
        -
        -
        -

        to determine the hit test. if the mouse event is over the -artist, return hit=True and props is a dictionary of -properties you want added to the PickEvent attributes.

        -
      • -
      -
      -

      ACCEPTS: [None|float|boolean|callable]

      -
      - -
      -
      -set_rasterized(rasterized)
      -

      Force rasterized (bitmap) drawing in vector backend output.

      -

      Defaults to None, which implies the backend’s default behavior

      -

      ACCEPTS: [True | False | None]

      -
      - -
      -
      -set_snap(snap)
      -

      Sets the snap setting which may be:

      -
      -
        -
      • True: snap vertices to the nearest pixel center
      • -
      • False: leave vertices as-is
      • -
      • None: (auto) If the path contains only rectilinear line -segments, round to the nearest pixel center
      • -
      -
      -

      Only supported by the Agg and MacOSX backends.

      -
      - -
      -
      -set_transform(t)
      -

      Set the Transform instance -used by this artist.

      -

      ACCEPTS: Transform instance

      -
      - -
      -
      -set_url(url)
      -

      Sets the url for the artist

      -

      ACCEPTS: a url string

      -
      - -
      -
      -set_visible(b)
      -

      Set the artist’s visiblity.

      -

      ACCEPTS: [True | False]

      -
      - -
      -
      -set_zorder(level)
      -

      Set the zorder for the artist. Artists with lower zorder -values are drawn first.

      -

      ACCEPTS: any number

      -
      - -
      -
      -update(props)
      -

      Update the properties of this Artist from the -dictionary prop.

      -
      - -
      -
      -update_from(other)
      -

      Copy properties from other to self.

      -
      - -
      -
      -zorder = 0
      -
      - -
      - -
      -
      -class matplotlib.artist.ArtistInspector(o)
      -

      A helper class to inspect an Artist -and return information about it’s settable properties and their -current values.

      -

      Initialize the artist inspector with an -Artist or sequence of Artists. -If a sequence is used, we assume it is a homogeneous sequence (all -Artists are of the same type) and it is your responsibility -to make sure this is so.

      -
      -
      -aliased_name(s)
      -

      return ‘PROPNAME or alias’ if s has an alias, else return -PROPNAME.

      -

      e.g., for the line markerfacecolor property, which has an -alias, return ‘markerfacecolor or mfc’ and for the transform -property, which does not, return ‘transform’

      -
      - -
      -
      -aliased_name_rest(s, target)
      -

      return ‘PROPNAME or alias’ if s has an alias, else return -PROPNAME formatted for ReST

      -

      e.g., for the line markerfacecolor property, which has an -alias, return ‘markerfacecolor or mfc’ and for the transform -property, which does not, return ‘transform’

      -
      - -
      -
      -findobj(match=None)
      -

      Recursively find all matplotlib.artist.Artist -instances contained in self.

      -

      If match is not None, it can be

      -
      -
        -
      • function with signature boolean = match(artist)
      • -
      • class instance: e.g., Line2D
      • -
      -
      -

      used to filter matches.

      -
      - -
      -
      -get_aliases()
      -

      Get a dict mapping fullname -> alias for each alias in -the ArtistInspector.

      -

      e.g., for lines:

      -
      {'markerfacecolor': 'mfc',
      - 'linewidth'      : 'lw',
      -}
      -
      -
      -
      - -
      -
      -get_setters()
      -

      Get the attribute strings with setters for object. e.g., for a line, -return ['markerfacecolor', 'linewidth', ....].

      -
      - -
      -
      -get_valid_values(attr)
      -

      Get the legal arguments for the setter associated with attr.

      -

      This is done by querying the docstring of the function set_attr -for a line that begins with ACCEPTS:

      -

      e.g., for a line linestyle, return -“[ '-' | '--' | '-.' | ':' | 'steps' | 'None' ]”

      -
      - -
      -
      -is_alias(o)
      -

      Return True if method object o is an alias for another -function.

      -
      - -
      -
      -pprint_getters()
      -

      Return the getters and actual values as list of strings.

      -
      - -
      -
      -pprint_setters(prop=None, leadingspace=2)
      -

      If prop is None, return a list of strings of all settable properies -and their valid values.

      -

      If prop is not None, it is a valid property name and that -property will be returned as a string of property : valid -values.

      -
      - -
      -
      -pprint_setters_rest(prop=None, leadingspace=2)
      -

      If prop is None, return a list of strings of all settable properies -and their valid values. Format the output for ReST

      -

      If prop is not None, it is a valid property name and that -property will be returned as a string of property : valid -values.

      -
      - -
      -
      -properties()
      -

      return a dictionary mapping property name -> value

      -
      - -
      - -
      -
      -matplotlib.artist.allow_rasterization(draw)
      -

      Decorator for Artist.draw method. Provides routines -that run before and after the draw call. The before and after functions -are useful for changing artist-dependant renderer attributes or making -other setup function calls, such as starting and flushing a mixed-mode -renderer.

      -
      - -
      -
      -matplotlib.artist.get(obj, property=None)
      -

      Return the value of object’s property. property is an optional string -for the property you want to return

      -

      Example usage:

      -
      getp(obj)  # get all the object properties
      -getp(obj, 'linestyle')  # get the linestyle property
      -
      -
      -

      obj is a Artist instance, e.g., -Line2D or an instance of a -Axes or matplotlib.text.Text. -If the property is ‘somename’, this function returns

      -
      -
      obj.get_somename()
      -

      getp() can be used to query all the gettable properties with -getp(obj). Many properties have aliases for shorter typing, e.g. -‘lw’ is an alias for ‘linewidth’. In the output, aliases and full -property names will be listed as:

      -
      -
      property or alias = value
      -

      e.g.:

      -
      -
      linewidth or lw = 2
      -
      - -
      -
      -matplotlib.artist.getp(obj, property=None)
      -

      Return the value of object’s property. property is an optional string -for the property you want to return

      -

      Example usage:

      -
      getp(obj)  # get all the object properties
      -getp(obj, 'linestyle')  # get the linestyle property
      -
      -
      -

      obj is a Artist instance, e.g., -Line2D or an instance of a -Axes or matplotlib.text.Text. -If the property is ‘somename’, this function returns

      -
      -
      obj.get_somename()
      -

      getp() can be used to query all the gettable properties with -getp(obj). Many properties have aliases for shorter typing, e.g. -‘lw’ is an alias for ‘linewidth’. In the output, aliases and full -property names will be listed as:

      -
      -
      property or alias = value
      -

      e.g.:

      -
      -
      linewidth or lw = 2
      -
      - -
      -
      -matplotlib.artist.kwdoc(a)
      -
      - -
      -
      -matplotlib.artist.setp(obj, *args, **kwargs)
      -

      Set a property on an artist object.

      -

      matplotlib supports the use of setp() (“set property”) and -getp() to set and get object properties, as well as to do -introspection on the object. For example, to set the linestyle of a -line to be dashed, you can do:

      -
      >>> line, = plot([1,2,3])
      ->>> setp(line, linestyle='--')
      -
      -
      -

      If you want to know the valid types of arguments, you can provide the -name of the property you want to set without a value:

      -
      >>> setp(line, 'linestyle')
      -    linestyle: [ '-' | '--' | '-.' | ':' | 'steps' | 'None' ]
      -
      -
      -

      If you want to see all the properties that can be set, and their -possible values, you can do:

      -
      >>> setp(line)
      -    ... long output listing omitted
      -
      -
      -

      setp() operates on a single instance or a list of instances. -If you are in query mode introspecting the possible values, only -the first instance in the sequence is used. When actually setting -values, all the instances will be set. e.g., suppose you have a -list of two lines, the following will make both lines thicker and -red:

      -
      >>> x = arange(0,1.0,0.01)
      ->>> y1 = sin(2*pi*x)
      ->>> y2 = sin(4*pi*x)
      ->>> lines = plot(x, y1, x, y2)
      ->>> setp(lines, linewidth=2, color='r')
      -
      -
      -

      setp() works with the MATLAB style string/value pairs or -with python kwargs. For example, the following are equivalent:

      -
      >>> setp(lines, 'linewidth', 2, 'color', r')  # MATLAB style
      -    ...
      ->>> setp(lines, linewidth=2, color='r')       # python style
      -
      -
      -
      - -
      -
      -

      matplotlib.lines

      -

      This module contains all the 2D line class which can draw with a -variety of line styles, markers and colors.

      -
      -
      -class matplotlib.lines.Line2D(xdata, ydata, linewidth=None, linestyle=None, color=None, marker=None, markersize=None, markeredgewidth=None, markeredgecolor=None, markerfacecolor=None, markerfacecoloralt='none', fillstyle='full', antialiased=None, dash_capstyle=None, solid_capstyle=None, dash_joinstyle=None, solid_joinstyle=None, pickradius=5, drawstyle=None, markevery=None, **kwargs)
      -

      Bases: matplotlib.artist.Artist

      -

      A line - the line can have both a solid linestyle connecting all -the vertices, and a marker at each vertex. Additionally, the -drawing of the solid line is influenced by the drawstyle, eg one -can create “stepped” lines in various styles.

      -

      Create a Line2D instance with x -and y data in sequences xdata, ydata.

      -

      The kwargs are Line2D properties:

      -
      -
      ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      PropertyDescription
      agg_filterunknown
      alphafloat (0.0 transparent through 1.0 opaque)
      animated[True | False]
      antialiased or aa[True | False]
      axesan Axes instance
      clip_boxa matplotlib.transforms.Bbox instance
      clip_on[True | False]
      clip_path[ (Path, Transform) | Patch | None ]
      color or cany matplotlib color
      containsa callable function
      dash_capstyle[‘butt’ | ‘round’ | ‘projecting’]
      dash_joinstyle[‘miter’ | ‘round’ | ‘bevel’]
      dashessequence of on/off ink in points
      data2D array (rows are x, y) or two 1D arrays
      drawstyle[‘default’ | ‘steps’ | ‘steps-pre’ | ‘steps-mid’ | ‘steps-post’]
      figurea matplotlib.figure.Figure instance
      fillstyle[‘full’ | ‘left’ | ‘right’ | ‘bottom’ | ‘top’ | ‘none’]
      gidan id string
      labelstring or anything printable with ‘%s’ conversion.
      linestyle or ls['-' | '--' | '-.' | ':' | 'None' | ' ' | ''] and any drawstyle in combination with a linestyle, e.g., 'steps--'.
      linewidth or lwfloat value in points
      lod[True | False]
      markerunknown
      markeredgecolor or mecany matplotlib color
      markeredgewidth or mewfloat value in points
      markerfacecolor or mfcany matplotlib color
      markerfacecoloralt or mfcaltany matplotlib color
      markersize or msfloat
      markeveryNone | integer | (startind, stride)
      pickerfloat distance in points or callable pick function fn(artist, event)
      pickradiusfloat distance in points
      rasterized[True | False | None]
      snapunknown
      solid_capstyle[‘butt’ | ‘round’ | ‘projecting’]
      solid_joinstyle[‘miter’ | ‘round’ | ‘bevel’]
      transforma matplotlib.transforms.Transform instance
      urla url string
      visible[True | False]
      xdata1D array
      ydata1D array
      zorderany number
      -
      -

      See set_linestyle() for a decription of the line styles, -set_marker() for a description of the markers, and -set_drawstyle() for a description of the draw styles.

      -
      -
      -contains(mouseevent)
      -

      Test whether the mouse event occurred on the line. The pick -radius determines the precision of the location test (usually -within five points of the value). Use -get_pickradius() or -set_pickradius() to view or -modify it.

      -

      Returns True if any values are within the radius along with -{'ind': pointlist}, where pointlist is the set of points -within the radius.

      -

      TODO: sort returned indices by distance

      -
      - -
      -
      -draw(artist, renderer, *args, **kwargs)
      -

      draw the Line with renderer unless visiblity is False

      -
      - -
      -
      -drawStyleKeys = ['default', 'steps-mid', 'steps-pre', 'steps-post', 'steps']
      -
      - -
      -
      -drawStyles = {'default': '_draw_lines', 'steps-mid': '_draw_steps_mid', 'steps': '_draw_steps_pre', 'steps-pre': '_draw_steps_pre', 'steps-post': '_draw_steps_post'}
      -
      - -
      -
      -fillStyles = ('full', 'left', 'right', 'bottom', 'top', 'none')
      -
      - -
      -
      -filled_markers = ('o', 'v', '^', '<', '>', '8', 's', 'p', '*', 'h', 'H', 'D', 'd')
      -
      - -
      -
      -get_aa()
      -

      alias for get_antialiased

      -
      - -
      -
      -get_antialiased()
      -
      - -
      -
      -get_c()
      -

      alias for get_color

      -
      - -
      -
      -get_color()
      -
      - -
      -
      -get_dash_capstyle()
      -

      Get the cap style for dashed linestyles

      -
      - -
      -
      -get_dash_joinstyle()
      -

      Get the join style for dashed linestyles

      -
      - -
      -
      -get_data(orig=True)
      -

      Return the xdata, ydata.

      -

      If orig is True, return the original data

      -
      - -
      -
      -get_drawstyle()
      -
      - -
      -
      -get_fillstyle()
      -

      return the marker fillstyle

      -
      - -
      -
      -get_linestyle()
      -
      - -
      -
      -get_linewidth()
      -
      - -
      -
      -get_ls()
      -

      alias for get_linestyle

      -
      - -
      -
      -get_lw()
      -

      alias for get_linewidth

      -
      - -
      -
      -get_marker()
      -
      - -
      -
      -get_markeredgecolor()
      -
      - -
      -
      -get_markeredgewidth()
      -
      - -
      -
      -get_markerfacecolor()
      -
      - -
      -
      -get_markerfacecoloralt()
      -
      - -
      -
      -get_markersize()
      -
      - -
      -
      -get_markevery()
      -

      return the markevery setting

      -
      - -
      -
      -get_mec()
      -

      alias for get_markeredgecolor

      -
      - -
      -
      -get_mew()
      -

      alias for get_markeredgewidth

      -
      - -
      -
      -get_mfc()
      -

      alias for get_markerfacecolor

      -
      - -
      -
      -get_mfcalt(alt=False)
      -

      alias for get_markerfacecoloralt

      -
      - -
      -
      -get_ms()
      -

      alias for get_markersize

      -
      - -
      -
      -get_path()
      -

      Return the Path object associated -with this line.

      -
      - -
      -
      -get_pickradius()
      -

      return the pick radius used for containment tests

      -
      - -
      -
      -get_solid_capstyle()
      -

      Get the cap style for solid linestyles

      -
      - -
      -
      -get_solid_joinstyle()
      -

      Get the join style for solid linestyles

      -
      - -
      -
      -get_window_extent(renderer)
      -
      - -
      -
      -get_xdata(orig=True)
      -

      Return the xdata.

      -

      If orig is True, return the original data, else the -processed data.

      -
      - -
      -
      -get_xydata()
      -

      Return the xy data as a Nx2 numpy array.

      -
      - -
      -
      -get_ydata(orig=True)
      -

      Return the ydata.

      -

      If orig is True, return the original data, else the -processed data.

      -
      - -
      -
      -is_dashed()
      -

      return True if line is dashstyle

      -
      - -
      -
      -lineStyles = {'': '_draw_nothing', ' ': '_draw_nothing', 'None': '_draw_nothing', '--': '_draw_dashed', '-.': '_draw_dash_dot', '-': '_draw_solid', ':': '_draw_dotted'}
      -
      - -
      -
      -markers = {0: 'tickleft', 1: 'tickright', 2: 'tickup', 3: 'tickdown', 4: 'caretleft', 'D': 'diamond', 6: 'caretup', 7: 'caretdown', 's': 'square', '|': 'vline', '': 'nothing', 'None': 'nothing', 'x': 'x', None: 'nothing', 5: 'caretright', '_': 'hline', '^': 'triangle_up', ' ': 'nothing', 'd': 'thin_diamond', 'h': 'hexagon1', '+': 'plus', '*': 'star', ',': 'pixel', 'o': 'circle', '.': 'point', '1': 'tri_down', 'p': 'pentagon', '3': 'tri_left', '2': 'tri_up', '4': 'tri_right', 'H': 'hexagon2', 'v': 'triangle_down', '8': 'octagon', '<': 'triangle_left', '>': 'triangle_right'}
      -
      - -
      -
      -recache(always=False)
      -
      - -
      -
      -recache_always()
      -
      - -
      -
      -set_aa(val)
      -

      alias for set_antialiased

      -
      - -
      -
      -set_antialiased(b)
      -

      True if line should be drawin with antialiased rendering

      -

      ACCEPTS: [True | False]

      -
      - -
      -
      -set_axes(ax)
      -

      Set the Axes instance in which the -artist resides, if any.

      -

      ACCEPTS: an Axes instance

      -
      - -
      -
      -set_c(val)
      -

      alias for set_color

      -
      - -
      -
      -set_color(color)
      -

      Set the color of the line

      -

      ACCEPTS: any matplotlib color

      -
      - -
      -
      -set_dash_capstyle(s)
      -

      Set the cap style for dashed linestyles

      -

      ACCEPTS: [‘butt’ | ‘round’ | ‘projecting’]

      -
      - -
      -
      -set_dash_joinstyle(s)
      -

      Set the join style for dashed linestyles -ACCEPTS: [‘miter’ | ‘round’ | ‘bevel’]

      -
      - -
      -
      -set_dashes(seq)
      -

      Set the dash sequence, sequence of dashes with on off ink in -points. If seq is empty or if seq = (None, None), the -linestyle will be set to solid.

      -

      ACCEPTS: sequence of on/off ink in points

      -
      - -
      -
      -set_data(*args)
      -

      Set the x and y data

      -

      ACCEPTS: 2D array (rows are x, y) or two 1D arrays

      -
      - -
      -
      -set_drawstyle(drawstyle)
      -

      Set the drawstyle of the plot

      -

      ‘default’ connects the points with lines. The steps variants -produce step-plots. ‘steps’ is equivalent to ‘steps-pre’ and -is maintained for backward-compatibility.

      -
      -
      ACCEPTS: [‘default’ | ‘steps’ | ‘steps-pre’ | ‘steps-mid’ |
      -
      ‘steps-post’]
      -
      -
      - -
      -
      -set_fillstyle(fs)
      -

      Set the marker fill style; ‘full’ means fill the whole marker. -‘none’ means no filling; other options are for half-filled markers.

      -

      ACCEPTS: [‘full’ | ‘left’ | ‘right’ | ‘bottom’ | ‘top’ | ‘none’]

      -
      - -
      -
      -set_linestyle(linestyle)
      -

      Set the linestyle of the line (also accepts drawstyles)

      - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      linestyledescription
      '-'solid
      '--'dashed
      '-.'dash_dot
      ':'dotted
      'None'draw nothing
      ' 'draw nothing
      ''draw nothing
      -

      ‘steps’ is equivalent to ‘steps-pre’ and is maintained for -backward-compatibility.

      -
      -

      See also

      -
      -
      set_drawstyle()
      -
      To set the drawing style (stepping) of the plot.
      -
      -
      -
      -
      ACCEPTS: ['-' | '--' | '-.' | ':' | 'None' |
      -
      ' ' | '']
      -
      -

      and any drawstyle in combination with a linestyle, e.g., 'steps--'.

      -
      - -
      -
      -set_linewidth(w)
      -

      Set the line width in points

      -

      ACCEPTS: float value in points

      -
      - -
      -
      -set_ls(val)
      -

      alias for set_linestyle

      -
      - -
      -
      -set_lw(val)
      -

      alias for set_linewidth

      -
      - -
      -
      -set_marker(marker)
      -

      Set the line marker

      - --- - - - -
      Parameters :

      marker: marker style :

      -
      -

      See markers for full description of possible -argument

      -
      -
      -
      - -
      -
      -set_markeredgecolor(ec)
      -

      Set the marker edge color

      -

      ACCEPTS: any matplotlib color

      -
      - -
      -
      -set_markeredgewidth(ew)
      -

      Set the marker edge width in points

      -

      ACCEPTS: float value in points

      -
      - -
      -
      -set_markerfacecolor(fc)
      -

      Set the marker face color.

      -

      ACCEPTS: any matplotlib color

      -
      - -
      -
      -set_markerfacecoloralt(fc)
      -

      Set the alternate marker face color.

      -

      ACCEPTS: any matplotlib color

      -
      - -
      -
      -set_markersize(sz)
      -

      Set the marker size in points

      -

      ACCEPTS: float

      -
      - -
      -
      -set_markevery(every)
      -

      Set the markevery property to subsample the plot when using -markers. e.g., if markevery=5, every 5-th marker will be -plotted. every can be

      -
      -
      None
      -
      Every point will be plotted
      -
      an integer N
      -
      Every N-th marker will be plotted starting with marker 0
      -
      A length-2 tuple of integers
      -
      every=(start, N) will start at point start and plot every N-th -marker
      -
      -

      ACCEPTS: None | integer | (startind, stride)

      -
      - -
      -
      -set_mec(val)
      -

      alias for set_markeredgecolor

      -
      - -
      -
      -set_mew(val)
      -

      alias for set_markeredgewidth

      -
      - -
      -
      -set_mfc(val)
      -

      alias for set_markerfacecolor

      -
      - -
      -
      -set_mfcalt(val)
      -

      alias for set_markerfacecoloralt

      -
      - -
      -
      -set_ms(val)
      -

      alias for set_markersize

      -
      - -
      -
      -set_picker(p)
      -

      Sets the event picker details for the line.

      -

      ACCEPTS: float distance in points or callable pick function -fn(artist, event)

      -
      - -
      -
      -set_pickradius(d)
      -

      Sets the pick radius used for containment tests

      -

      ACCEPTS: float distance in points

      -
      - -
      -
      -set_solid_capstyle(s)
      -

      Set the cap style for solid linestyles

      -

      ACCEPTS: [‘butt’ | ‘round’ | ‘projecting’]

      -
      - -
      -
      -set_solid_joinstyle(s)
      -

      Set the join style for solid linestyles -ACCEPTS: [‘miter’ | ‘round’ | ‘bevel’]

      -
      - -
      -
      -set_transform(t)
      -

      set the Transformation instance used by this artist

      -

      ACCEPTS: a matplotlib.transforms.Transform instance

      -
      - -
      -
      -set_xdata(x)
      -

      Set the data np.array for x

      -

      ACCEPTS: 1D array

      -
      - -
      -
      -set_ydata(y)
      -

      Set the data np.array for y

      -

      ACCEPTS: 1D array

      -
      - -
      -
      -update_from(other)
      -

      copy properties from other to self

      -
      - -
      -
      -validCap = ('butt', 'round', 'projecting')
      -
      - -
      -
      -validJoin = ('miter', 'round', 'bevel')
      -
      - -
      -
      -zorder = 2
      -
      - -
      - -
      -
      -class matplotlib.lines.VertexSelector(line)
      -

      Manage the callbacks to maintain a list of selected vertices for -matplotlib.lines.Line2D. Derived classes should override -process_selected() to do -something with the picks.

      -

      Here is an example which highlights the selected verts with red -circles:

      -
      import numpy as np
      -import matplotlib.pyplot as plt
      -import matplotlib.lines as lines
      -
      -class HighlightSelected(lines.VertexSelector):
      -    def __init__(self, line, fmt='ro', **kwargs):
      -        lines.VertexSelector.__init__(self, line)
      -        self.markers, = self.axes.plot([], [], fmt, **kwargs)
      -
      -    def process_selected(self, ind, xs, ys):
      -        self.markers.set_data(xs, ys)
      -        self.canvas.draw()
      -
      -fig = plt.figure()
      -ax = fig.add_subplot(111)
      -x, y = np.random.rand(2, 30)
      -line, = ax.plot(x, y, 'bs-', picker=5)
      -
      -selector = HighlightSelected(line)
      -plt.show()
      -
      -
      -

      Initialize the class with a matplotlib.lines.Line2D -instance. The line should already be added to some -matplotlib.axes.Axes instance and should have the -picker property set.

      -
      -
      -onpick(event)
      -

      When the line is picked, update the set of selected indicies.

      -
      - -
      -
      -process_selected(ind, xs, ys)
      -

      Default “do nothing” implementation of the -process_selected() method.

      -

      ind are the indices of the selected vertices. xs and ys -are the coordinates of the selected vertices.

      -
      - -
      - -
      -
      -matplotlib.lines.segment_hits(cx, cy, x, y, radius)
      -

      Determine if any line segments are within radius of a -point. Returns the list of line segments that are within that -radius.

      -
      - -
      -
      -

      matplotlib.patches

      -
      -
      -class matplotlib.patches.Arc(xy, width, height, angle=0.0, theta1=0.0, theta2=360.0, **kwargs)
      -

      Bases: matplotlib.patches.Ellipse

      -

      An elliptical arc. Because it performs various optimizations, it -can not be filled.

      -

      The arc must be used in an Axes -instance—it can not be added directly to a -Figure—because it is optimized to -only render the segments that are inside the axes bounding box -with high resolution.

      -

      The following args are supported:

      -
      -
      xy
      -
      center of ellipse
      -
      width
      -
      length of horizontal axis
      -
      height
      -
      length of vertical axis
      -
      angle
      -
      rotation in degrees (anti-clockwise)
      -
      theta1
      -
      starting angle of the arc in degrees
      -
      theta2
      -
      ending angle of the arc in degrees
      -
      -

      If theta1 and theta2 are not provided, the arc will form a -complete ellipse.

      -

      Valid kwargs are:

      -
      -
      ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      PropertyDescription
      agg_filterunknown
      alphafloat or None
      animated[True | False]
      antialiased or aa[True | False] or None for default
      axesan Axes instance
      clip_boxa matplotlib.transforms.Bbox instance
      clip_on[True | False]
      clip_path[ (Path, Transform) | Patch | None ]
      colormatplotlib color spec
      containsa callable function
      edgecolor or ecmpl color spec, or None for default, or ‘none’ for no color
      facecolor or fcmpl color spec, or None for default, or ‘none’ for no color
      figurea matplotlib.figure.Figure instance
      fill[True | False]
      gidan id string
      hatch[‘/’ | ‘\’ | ‘|’ | ‘-‘ | ‘+’ | ‘x’ | ‘o’ | ‘O’ | ‘.’ | ‘*’]
      labelstring or anything printable with ‘%s’ conversion.
      linestyle or ls[‘solid’ | ‘dashed’ | ‘dashdot’ | ‘dotted’]
      linewidth or lwfloat or None for default
      lod[True | False]
      path_effectsunknown
      picker[None|float|boolean|callable]
      rasterized[True | False | None]
      snapunknown
      transformTransform instance
      urla url string
      visible[True | False]
      zorderany number
      -
      -
      -
      -draw(artist, renderer, *args, **kwargs)
      -

      Ellipses are normally drawn using an approximation that uses -eight cubic bezier splines. The error of this approximation -is 1.89818e-6, according to this unverified source:

      -
      -

      Lancaster, Don. Approximating a Circle or an Ellipse Using -Four Bezier Cubic Splines.

      -

      http://www.tinaja.com/glib/ellipse4.pdf

      -
      -

      There is a use case where very large ellipses must be drawn -with very high accuracy, and it is too expensive to render the -entire ellipse with enough segments (either splines or line -segments). Therefore, in the case where either radius of the -ellipse is large enough that the error of the spline -approximation will be visible (greater than one pixel offset -from the ideal), a different technique is used.

      -

      In that case, only the visible parts of the ellipse are drawn, -with each visible arc using a fixed number of spline segments -(8). The algorithm proceeds as follows:

      -
      -
        -
      1. The points where the ellipse intersects the axes bounding -box are located. (This is done be performing an inverse -transformation on the axes bbox such that it is relative -to the unit circle – this makes the intersection -calculation much easier than doing rotated ellipse -intersection directly).

        -

        This uses the “line intersecting a circle” algorithm -from:

        -
        -

        Vince, John. Geometry for Computer Graphics: Formulae, -Examples & Proofs. London: Springer-Verlag, 2005.

        -
        -
      2. -
      3. The angles of each of the intersection points are -calculated.

        -
      4. -
      5. Proceeding counterclockwise starting in the positive -x-direction, each of the visible arc-segments between the -pairs of vertices are drawn using the bezier arc -approximation technique implemented in -matplotlib.path.Path.arc().

        -
      6. -
      -
      -
      - -
      - -
      -
      -class matplotlib.patches.Arrow(x, y, dx, dy, width=1.0, **kwargs)
      -

      Bases: matplotlib.patches.Patch

      -

      An arrow patch.

      -

      Draws an arrow, starting at (x, y), direction and length -given by (dx, dy) the width of the arrow is scaled by width.

      -

      Valid kwargs are:

      -
      -
      ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      PropertyDescription
      agg_filterunknown
      alphafloat or None
      animated[True | False]
      antialiased or aa[True | False] or None for default
      axesan Axes instance
      clip_boxa matplotlib.transforms.Bbox instance
      clip_on[True | False]
      clip_path[ (Path, Transform) | Patch | None ]
      colormatplotlib color spec
      containsa callable function
      edgecolor or ecmpl color spec, or None for default, or ‘none’ for no color
      facecolor or fcmpl color spec, or None for default, or ‘none’ for no color
      figurea matplotlib.figure.Figure instance
      fill[True | False]
      gidan id string
      hatch[‘/’ | ‘\’ | ‘|’ | ‘-‘ | ‘+’ | ‘x’ | ‘o’ | ‘O’ | ‘.’ | ‘*’]
      labelstring or anything printable with ‘%s’ conversion.
      linestyle or ls[‘solid’ | ‘dashed’ | ‘dashdot’ | ‘dotted’]
      linewidth or lwfloat or None for default
      lod[True | False]
      path_effectsunknown
      picker[None|float|boolean|callable]
      rasterized[True | False | None]
      snapunknown
      transformTransform instance
      urla url string
      visible[True | False]
      zorderany number
      -
      -
      -
      -get_patch_transform()
      -
      - -
      -
      -get_path()
      -
      - -
      - -
      -
      -class matplotlib.patches.ArrowStyle
      -

      Bases: matplotlib.patches._Style

      -

      ArrowStyle is a container class which defines several -arrowstyle classes, which is used to create an arrow path along a -given path. These are mainly used with FancyArrowPatch.

      -

      A arrowstyle object can be either created as:

      -
      ArrowStyle.Fancy(head_length=.4, head_width=.4, tail_width=.4)
      -
      -
      -

      or:

      -
      ArrowStyle("Fancy", head_length=.4, head_width=.4, tail_width=.4)
      -
      -
      -

      or:

      -
      ArrowStyle("Fancy, head_length=.4, head_width=.4, tail_width=.4")
      -
      -
      -

      The following classes are defined

      -
      -
      ----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      ClassNameAttrs
      Curve-None
      CurveB->head_length=0.4,head_width=0.2
      BracketB-[widthB=1.0,lengthB=0.2,angleB=None
      CurveFilledB-|>head_length=0.4,head_width=0.2
      CurveA<-head_length=0.4,head_width=0.2
      CurveAB<->head_length=0.4,head_width=0.2
      CurveFilledA<|-head_length=0.4,head_width=0.2
      CurveFilledAB<|-|>head_length=0.4,head_width=0.2
      BracketA]-widthA=1.0,lengthA=0.2,angleA=None
      BracketAB]-[widthA=1.0,lengthA=0.2,angleA=None,widthB=1.0,lengthB=0.2,angleB=None
      Fancyfancyhead_length=0.4,head_width=0.4,tail_width=0.4
      Simplesimplehead_length=0.5,head_width=0.5,tail_width=0.2
      Wedgewedgetail_width=0.3,shrink_factor=0.5
      BarAB|-|widthA=1.0,angleA=None,widthB=1.0,angleB=None
      -
      -

      An instance of any arrow style class is an callable object, -whose call signature is:

      -
      __call__(self, path, mutation_size, linewidth, aspect_ratio=1.)
      -
      -
      -

      and it returns a tuple of a Path instance and a boolean -value. path is a Path instance along witch the arrow -will be drawn. mutation_size and aspect_ratio has a same -meaning as in BoxStyle. linewidth is a line width to be -stroked. This is meant to be used to correct the location of the -head so that it does not overshoot the destination point, but not all -classes support it.

      -

      (Source code, png, hires.png, pdf)

      -
      -../_images/fancyarrow_demo.png -
      -
      -
      -class BarAB(widthA=1.0, angleA=None, widthB=1.0, angleB=None)
      -

      Bases: matplotlib.patches._Bracket

      -

      An arrow with a bar(|) at both ends.

      -
      -
      widthA
      -
      width of the bracket
      -
      lengthA
      -
      length of the bracket
      -
      angleA
      -
      angle between the bracket and the line
      -
      widthB
      -
      width of the bracket
      -
      lengthB
      -
      length of the bracket
      -
      angleB
      -
      angle between the bracket and the line
      -
      -
      - -
      -
      -class ArrowStyle.BracketA(widthA=1.0, lengthA=0.2, angleA=None)
      -

      Bases: matplotlib.patches._Bracket

      -

      An arrow with a bracket(]) at its end.

      -
      -
      widthA
      -
      width of the bracket
      -
      lengthA
      -
      length of the bracket
      -
      angleA
      -
      angle between the bracket and the line
      -
      -
      - -
      -
      -class ArrowStyle.BracketAB(widthA=1.0, lengthA=0.2, angleA=None, widthB=1.0, lengthB=0.2, angleB=None)
      -

      Bases: matplotlib.patches._Bracket

      -

      An arrow with a bracket(]) at both ends.

      -
      -
      widthA
      -
      width of the bracket
      -
      lengthA
      -
      length of the bracket
      -
      angleA
      -
      angle between the bracket and the line
      -
      widthB
      -
      width of the bracket
      -
      lengthB
      -
      length of the bracket
      -
      angleB
      -
      angle between the bracket and the line
      -
      -
      - -
      -
      -class ArrowStyle.BracketB(widthB=1.0, lengthB=0.2, angleB=None)
      -

      Bases: matplotlib.patches._Bracket

      -

      An arrow with a bracket([) at its end.

      -
      -
      widthB
      -
      width of the bracket
      -
      lengthB
      -
      length of the bracket
      -
      angleB
      -
      angle between the bracket and the line
      -
      -
      - -
      -
      -class ArrowStyle.Curve
      -

      Bases: matplotlib.patches._Curve

      -

      A simple curve without any arrow head.

      -
      - -
      -
      -class ArrowStyle.CurveA(head_length=0.4, head_width=0.2)
      -

      Bases: matplotlib.patches._Curve

      -

      An arrow with a head at its begin point.

      -
      -
      head_length
      -
      length of the arrow head
      -
      head_width
      -
      width of the arrow head
      -
      -
      - -
      -
      -class ArrowStyle.CurveAB(head_length=0.4, head_width=0.2)
      -

      Bases: matplotlib.patches._Curve

      -

      An arrow with heads both at the begin and the end point.

      -
      -
      head_length
      -
      length of the arrow head
      -
      head_width
      -
      width of the arrow head
      -
      -
      - -
      -
      -class ArrowStyle.CurveB(head_length=0.4, head_width=0.2)
      -

      Bases: matplotlib.patches._Curve

      -

      An arrow with a head at its end point.

      -
      -
      head_length
      -
      length of the arrow head
      -
      head_width
      -
      width of the arrow head
      -
      -
      - -
      -
      -class ArrowStyle.CurveFilledA(head_length=0.4, head_width=0.2)
      -

      Bases: matplotlib.patches._Curve

      -

      An arrow with filled triangle head at the begin.

      -
      -
      head_length
      -
      length of the arrow head
      -
      head_width
      -
      width of the arrow head
      -
      -
      - -
      -
      -class ArrowStyle.CurveFilledAB(head_length=0.4, head_width=0.2)
      -

      Bases: matplotlib.patches._Curve

      -

      An arrow with filled triangle heads both at the begin and the end -point.

      -
      -
      head_length
      -
      length of the arrow head
      -
      head_width
      -
      width of the arrow head
      -
      -
      - -
      -
      -class ArrowStyle.CurveFilledB(head_length=0.4, head_width=0.2)
      -

      Bases: matplotlib.patches._Curve

      -

      An arrow with filled triangle head at the end.

      -
      -
      head_length
      -
      length of the arrow head
      -
      head_width
      -
      width of the arrow head
      -
      -
      - -
      -
      -class ArrowStyle.Fancy(head_length=0.4, head_width=0.4, tail_width=0.4)
      -

      Bases: matplotlib.patches._Base

      -

      A fancy arrow. Only works with a quadratic bezier curve.

      -
      -
      head_length
      -
      length of the arrow head
      -
      head_with
      -
      width of the arrow head
      -
      tail_width
      -
      width of the arrow tail
      -
      -
      -
      -transmute(path, mutation_size, linewidth)
      -
      - -
      - -
      -
      -class ArrowStyle.Simple(head_length=0.5, head_width=0.5, tail_width=0.2)
      -

      Bases: matplotlib.patches._Base

      -

      A simple arrow. Only works with a quadratic bezier curve.

      -
      -
      head_length
      -
      length of the arrow head
      -
      head_with
      -
      width of the arrow head
      -
      tail_width
      -
      width of the arrow tail
      -
      -
      -
      -transmute(path, mutation_size, linewidth)
      -
      - -
      - -
      -
      -class ArrowStyle.Wedge(tail_width=0.3, shrink_factor=0.5)
      -

      Bases: matplotlib.patches._Base

      -

      Wedge(?) shape. Only wokrs with a quadratic bezier curve. The -begin point has a width of the tail_width and the end point has a -width of 0. At the middle, the width is shrink_factor*tail_width.

      -
      -
      tail_width
      -
      width of the tail
      -
      shrink_factor
      -
      fraction of the arrow width at the middle point
      -
      -
      -
      -transmute(path, mutation_size, linewidth)
      -
      - -
      - -
      - -
      -
      -class matplotlib.patches.BoxStyle
      -

      Bases: matplotlib.patches._Style

      -

      BoxStyle is a container class which defines several -boxstyle classes, which are used for FancyBoxPatch.

      -

      A style object can be created as:

      -
      BoxStyle.Round(pad=0.2)
      -
      -
      -

      or:

      -
      BoxStyle("Round", pad=0.2)
      -
      -
      -

      or:

      -
      BoxStyle("Round, pad=0.2")
      -
      -
      -

      Following boxstyle classes are defined.

      -
      -
      ----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      ClassNameAttrs
      LArrowlarrowpad=0.3
      RArrowrarrowpad=0.3
      Roundroundpad=0.3,rounding_size=None
      Round4round4pad=0.3,rounding_size=None
      Roundtoothroundtoothpad=0.3,tooth_size=None
      Sawtoothsawtoothpad=0.3,tooth_size=None
      Squaresquarepad=0.3
      -
      -

      An instance of any boxstyle class is an callable object, -whose call signature is:

      -
      __call__(self, x0, y0, width, height, mutation_size, aspect_ratio=1.)
      -
      -
      -

      and returns a Path instance. x0, y0, width and -height specify the location and size of the box to be -drawn. mutation_scale determines the overall size of the -mutation (by which I mean the transformation of the rectangle to -the fancy box). mutation_aspect determines the aspect-ratio of -the mutation.

      -

      (Source code, png, hires.png, pdf)

      -
      -../_images/fancybox_demo2.png -
      -
      -
      -class LArrow(pad=0.3)
      -

      Bases: matplotlib.patches._Base

      -

      (left) Arrow Box

      -
      -
      -transmute(x0, y0, width, height, mutation_size)
      -
      - -
      - -
      -
      -class BoxStyle.RArrow(pad=0.3)
      -

      Bases: matplotlib.patches.LArrow

      -

      (right) Arrow Box

      -
      -
      -transmute(x0, y0, width, height, mutation_size)
      -
      - -
      - -
      -
      -class BoxStyle.Round(pad=0.3, rounding_size=None)
      -

      Bases: matplotlib.patches._Base

      -

      A box with round corners.

      -
      -
      pad
      -
      amount of padding
      -
      rounding_size
      -
      rounding radius of corners. pad if None
      -
      -
      -
      -transmute(x0, y0, width, height, mutation_size)
      -
      - -
      - -
      -
      -class BoxStyle.Round4(pad=0.3, rounding_size=None)
      -

      Bases: matplotlib.patches._Base

      -

      Another box with round edges.

      -
      -
      pad
      -
      amount of padding
      -
      rounding_size
      -
      rounding size of edges. pad if None
      -
      -
      -
      -transmute(x0, y0, width, height, mutation_size)
      -
      - -
      - -
      -
      -class BoxStyle.Roundtooth(pad=0.3, tooth_size=None)
      -

      Bases: matplotlib.patches.Sawtooth

      -

      A roundtooth(?) box.

      -
      -
      pad
      -
      amount of padding
      -
      tooth_size
      -
      size of the sawtooth. pad* if None
      -
      -
      -
      -transmute(x0, y0, width, height, mutation_size)
      -
      - -
      - -
      -
      -class BoxStyle.Sawtooth(pad=0.3, tooth_size=None)
      -

      Bases: matplotlib.patches._Base

      -

      A sawtooth box.

      -
      -
      pad
      -
      amount of padding
      -
      tooth_size
      -
      size of the sawtooth. pad* if None
      -
      -
      -
      -transmute(x0, y0, width, height, mutation_size)
      -
      - -
      - -
      -
      -class BoxStyle.Square(pad=0.3)
      -

      Bases: matplotlib.patches._Base

      -

      A simple square box.

      -
      -
      pad
      -
      amount of padding
      -
      -
      -
      -transmute(x0, y0, width, height, mutation_size)
      -
      - -
      - -
      - -
      -
      -class matplotlib.patches.Circle(xy, radius=5, **kwargs)
      -

      Bases: matplotlib.patches.Ellipse

      -

      A circle patch.

      -

      Create true circle at center xy = (x, y) with given -radius. Unlike CirclePolygon -which is a polygonal approximation, this uses Bézier splines -and is much closer to a scale-free circle.

      -

      Valid kwargs are:

      -
      -
      ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      PropertyDescription
      agg_filterunknown
      alphafloat or None
      animated[True | False]
      antialiased or aa[True | False] or None for default
      axesan Axes instance
      clip_boxa matplotlib.transforms.Bbox instance
      clip_on[True | False]
      clip_path[ (Path, Transform) | Patch | None ]
      colormatplotlib color spec
      containsa callable function
      edgecolor or ecmpl color spec, or None for default, or ‘none’ for no color
      facecolor or fcmpl color spec, or None for default, or ‘none’ for no color
      figurea matplotlib.figure.Figure instance
      fill[True | False]
      gidan id string
      hatch[‘/’ | ‘\’ | ‘|’ | ‘-‘ | ‘+’ | ‘x’ | ‘o’ | ‘O’ | ‘.’ | ‘*’]
      labelstring or anything printable with ‘%s’ conversion.
      linestyle or ls[‘solid’ | ‘dashed’ | ‘dashdot’ | ‘dotted’]
      linewidth or lwfloat or None for default
      lod[True | False]
      path_effectsunknown
      picker[None|float|boolean|callable]
      rasterized[True | False | None]
      snapunknown
      transformTransform instance
      urla url string
      visible[True | False]
      zorderany number
      -
      -
      -
      -get_radius()
      -

      return the radius of the circle

      -
      - -
      -
      -radius
      -

      return the radius of the circle

      -
      - -
      -
      -set_radius(radius)
      -

      Set the radius of the circle

      -

      ACCEPTS: float

      -
      - -
      - -
      -
      -class matplotlib.patches.CirclePolygon(xy, radius=5, resolution=20, **kwargs)
      -

      Bases: matplotlib.patches.RegularPolygon

      -

      A polygon-approximation of a circle patch.

      -

      Create a circle at xy = (x, y) with given radius. -This circle is approximated by a regular polygon with -resolution sides. For a smoother circle drawn with splines, -see Circle.

      -

      Valid kwargs are:

      -
      -
      ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      PropertyDescription
      agg_filterunknown
      alphafloat or None
      animated[True | False]
      antialiased or aa[True | False] or None for default
      axesan Axes instance
      clip_boxa matplotlib.transforms.Bbox instance
      clip_on[True | False]
      clip_path[ (Path, Transform) | Patch | None ]
      colormatplotlib color spec
      containsa callable function
      edgecolor or ecmpl color spec, or None for default, or ‘none’ for no color
      facecolor or fcmpl color spec, or None for default, or ‘none’ for no color
      figurea matplotlib.figure.Figure instance
      fill[True | False]
      gidan id string
      hatch[‘/’ | ‘\’ | ‘|’ | ‘-‘ | ‘+’ | ‘x’ | ‘o’ | ‘O’ | ‘.’ | ‘*’]
      labelstring or anything printable with ‘%s’ conversion.
      linestyle or ls[‘solid’ | ‘dashed’ | ‘dashdot’ | ‘dotted’]
      linewidth or lwfloat or None for default
      lod[True | False]
      path_effectsunknown
      picker[None|float|boolean|callable]
      rasterized[True | False | None]
      snapunknown
      transformTransform instance
      urla url string
      visible[True | False]
      zorderany number
      -
      -
      - -
      -
      -class matplotlib.patches.ConnectionPatch(xyA, xyB, coordsA, coordsB=None, axesA=None, axesB=None, arrowstyle='-', arrow_transmuter=None, connectionstyle='arc3', connector=None, patchA=None, patchB=None, shrinkA=0.0, shrinkB=0.0, mutation_scale=10.0, mutation_aspect=None, clip_on=False, dpi_cor=1.0, **kwargs)
      -

      Bases: matplotlib.patches.FancyArrowPatch

      -

      A ConnectionPatch class is to make -connecting lines between two points (possibly in different axes).

      -

      Connect point xyA in coordsA with point xyB in coordsB

      -

      Valid keys are

      - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      KeyDescription
      arrowstylethe arrow style
      connectionstylethe connection style
      relposdefault is (0.5, 0.5)
      patchAdefault is bounding box of the text
      patchBdefault is None
      shrinkAdefault is 2 points
      shrinkBdefault is 2 points
      mutation_scaledefault is text size (in points)
      mutation_aspectdefault is 1.
      ?any key for matplotlib.patches.PathPatch
      -

      coordsA and coordsB are strings that indicate the -coordinates of xyA and xyB.

      - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      PropertyDescription
      ‘figure points’points from the lower left corner of the figure
      ‘figure pixels’pixels from the lower left corner of the figure
      ‘figure fraction’0,0 is lower left of figure and 1,1 is upper, right
      ‘axes points’points from lower left corner of axes
      ‘axes pixels’pixels from lower left corner of axes
      ‘axes fraction’0,1 is lower left of axes and 1,1 is upper right
      ‘data’use the coordinate system of the object being -annotated (default)
      ‘offset points’Specify an offset (in points) from the xy value
      ‘polar’you can specify theta, r for the annotation, -even in cartesian plots. Note that if you -are using a polar axes, you do not need -to specify polar for the coordinate -system since that is the native “data” coordinate -system.
      -
      -
      -draw(renderer)
      -

      Draw.

      -
      - -
      -
      -get_annotation_clip()
      -

      Return annotation_clip attribute. -See set_annotation_clip() for the meaning of return values.

      -
      - -
      -
      -get_path_in_displaycoord()
      -

      Return the mutated path of the arrow in the display coord

      -
      - -
      -
      -set_annotation_clip(b)
      -

      set annotation_clip attribute.

      -
      -
        -
      • -
        True: the annotation will only be drawn when self.xy is inside the
        -

        axes.

        -
        -
        -
      • -
      • -
        False: the annotation will always be drawn regardless of its
        -

        position.

        -
        -
        -
      • -
      • None: the self.xy will be checked only if xycoords is “data”

        -
      • -
      -
      -
      - -
      - -
      -
      -class matplotlib.patches.ConnectionStyle
      -

      Bases: matplotlib.patches._Style

      -

      ConnectionStyle is a container class which defines -several connectionstyle classes, which is used to create a path -between two points. These are mainly used with -FancyArrowPatch.

      -

      A connectionstyle object can be either created as:

      -
      ConnectionStyle.Arc3(rad=0.2)
      -
      -
      -

      or:

      -
      ConnectionStyle("Arc3", rad=0.2)
      -
      -
      -

      or:

      -
      ConnectionStyle("Arc3, rad=0.2")
      -
      -
      -

      The following classes are defined

      -
      -
      ----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      ClassNameAttrs
      AngleangleangleA=90,angleB=0,rad=0.0
      Angle3angle3angleA=90,angleB=0
      ArcarcangleA=0,angleB=0,armA=None,armB=None,rad=0.0
      Arc3arc3rad=0.0
      BarbararmA=0.0,armB=0.0,fraction=0.3,angle=None
      -
      -

      An instance of any connection style class is an callable object, -whose call signature is:

      -
      __call__(self, posA, posB,
      -         patchA=None, patchB=None,
      -         shrinkA=2., shrinkB=2.)
      -
      -
      -

      and it returns a Path instance. posA and posB are -tuples of x,y coordinates of the two points to be -connected. patchA (or patchB) is given, the returned path is -clipped so that it start (or end) from the boundary of the -patch. The path is further shrunk by shrinkA (or shrinkB) -which is given in points.

      -
      -
      -class Angle(angleA=90, angleB=0, rad=0.0)
      -

      Bases: matplotlib.patches._Base

      -

      Creates a picewise continuous quadratic bezier path between -two points. The path has a one passing-through point placed at -the intersecting point of two lines which crosses the start -(or end) point and has a angle of angleA (or angleB). The -connecting edges are rounded with rad.

      -
      -
      angleA
      -
      starting angle of the path
      -
      angleB
      -
      ending angle of the path
      -
      rad
      -
      rounding radius of the edge
      -
      -
      -
      -connect(posA, posB)
      -
      - -
      - -
      -
      -class ConnectionStyle.Angle3(angleA=90, angleB=0)
      -

      Bases: matplotlib.patches._Base

      -

      Creates a simple quadratic bezier curve between two -points. The middle control points is placed at the -intersecting point of two lines which crosses the start (or -end) point and has a angle of angleA (or angleB).

      -
      -
      angleA
      -
      starting angle of the path
      -
      angleB
      -
      ending angle of the path
      -
      -
      -
      -connect(posA, posB)
      -
      - -
      - -
      -
      -class ConnectionStyle.Arc(angleA=0, angleB=0, armA=None, armB=None, rad=0.0)
      -

      Bases: matplotlib.patches._Base

      -

      Creates a picewise continuous quadratic bezier path between -two points. The path can have two passing-through points, a -point placed at the distance of armA and angle of angleA from -point A, another point with respect to point B. The edges are -rounded with rad.

      -
      -
      angleA :
      -
      starting angle of the path
      -
      angleB :
      -
      ending angle of the path
      -
      armA :
      -
      length of the starting arm
      -
      armB :
      -
      length of the ending arm
      -
      rad :
      -
      rounding radius of the edges
      -
      -
      -
      -connect(posA, posB)
      -
      - -
      - -
      -
      -class ConnectionStyle.Arc3(rad=0.0)
      -

      Bases: matplotlib.patches._Base

      -

      Creates a simple quadratic bezier curve between two -points. The curve is created so that the middle contol points -(C1) is located at the same distance from the start (C0) and -end points(C2) and the distance of the C1 to the line -connecting C0-C2 is rad times the distance of C0-C2.

      -
      -
      rad
      -
      curvature of the curve.
      -
      -
      -
      -connect(posA, posB)
      -
      - -
      - -
      -
      -class ConnectionStyle.Bar(armA=0.0, armB=0.0, fraction=0.3, angle=None)
      -

      Bases: matplotlib.patches._Base

      -

      A line with angle between A and B with armA and -armB. One of the arm is extend so that they are connected in -a right angle. The length of armA is determined by (armA -+ fraction x AB distance). Same for armB.

      -

      armA : minimum length of armA

      -

      armB : minimum length of armB

      -
      -
      fraction : a fraction of the distance between two points that
      -
      will be added to armA and armB.
      -
      angle : angle of the connecting line (if None, parallel to A
      -
      and B)
      -
      -
      -
      -connect(posA, posB)
      -
      - -
      - -
      - -
      -
      -class matplotlib.patches.Ellipse(xy, width, height, angle=0.0, **kwargs)
      -

      Bases: matplotlib.patches.Patch

      -

      A scale-free ellipse.

      -
      -
      xy
      -
      center of ellipse
      -
      width
      -
      total length (diameter) of horizontal axis
      -
      height
      -
      total length (diameter) of vertical axis
      -
      angle
      -
      rotation in degrees (anti-clockwise)
      -
      -

      Valid kwargs are:

      -
      -
      ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      PropertyDescription
      agg_filterunknown
      alphafloat or None
      animated[True | False]
      antialiased or aa[True | False] or None for default
      axesan Axes instance
      clip_boxa matplotlib.transforms.Bbox instance
      clip_on[True | False]
      clip_path[ (Path, Transform) | Patch | None ]
      colormatplotlib color spec
      containsa callable function
      edgecolor or ecmpl color spec, or None for default, or ‘none’ for no color
      facecolor or fcmpl color spec, or None for default, or ‘none’ for no color
      figurea matplotlib.figure.Figure instance
      fill[True | False]
      gidan id string
      hatch[‘/’ | ‘\’ | ‘|’ | ‘-‘ | ‘+’ | ‘x’ | ‘o’ | ‘O’ | ‘.’ | ‘*’]
      labelstring or anything printable with ‘%s’ conversion.
      linestyle or ls[‘solid’ | ‘dashed’ | ‘dashdot’ | ‘dotted’]
      linewidth or lwfloat or None for default
      lod[True | False]
      path_effectsunknown
      picker[None|float|boolean|callable]
      rasterized[True | False | None]
      snapunknown
      transformTransform instance
      urla url string
      visible[True | False]
      zorderany number
      -
      -
      -
      -contains(ev)
      -
      - -
      -
      -get_patch_transform()
      -
      - -
      -
      -get_path()
      -

      Return the vertices of the rectangle

      -
      - -
      - -
      -
      -class matplotlib.patches.FancyArrow(x, y, dx, dy, width=0.001, length_includes_head=False, head_width=None, head_length=None, shape='full', overhang=0, head_starts_at_zero=False, **kwargs)
      -

      Bases: matplotlib.patches.Polygon

      -

      Like Arrow, but lets you set head width and head height independently.

      -
      -
      Constructor arguments
      -
      -
      width: float (default: 0.001)
      -
      width of full arrow tail
      -
      length_includes_head: [True | False] (default: False)
      -
      True if head is to be counted in calculating the length.
      -
      head_width: float or None (default: 3*width)
      -
      total width of the full arrow head
      -
      head_length: float or None (default: 1.5 * head_width)
      -
      length of arrow head
      -
      shape: [‘full’, ‘left’, ‘right’] (default: ‘full’)
      -
      draw the left-half, right-half, or full arrow
      -
      overhang: float (default: 0)
      -
      fraction that the arrow is swept back (0 overhang means -triangular shape). Can be negative or greater than one.
      -
      head_starts_at_zero: [True | False] (default: False)
      -
      if True, the head starts being drawn at coordinate 0 -instead of ending at coordinate 0.
      -
      -
      -
      -

      Other valid kwargs (inherited from Patch) are:

      -
      -
      ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      PropertyDescription
      agg_filterunknown
      alphafloat or None
      animated[True | False]
      antialiased or aa[True | False] or None for default
      axesan Axes instance
      clip_boxa matplotlib.transforms.Bbox instance
      clip_on[True | False]
      clip_path[ (Path, Transform) | Patch | None ]
      colormatplotlib color spec
      containsa callable function
      edgecolor or ecmpl color spec, or None for default, or ‘none’ for no color
      facecolor or fcmpl color spec, or None for default, or ‘none’ for no color
      figurea matplotlib.figure.Figure instance
      fill[True | False]
      gidan id string
      hatch[‘/’ | ‘\’ | ‘|’ | ‘-‘ | ‘+’ | ‘x’ | ‘o’ | ‘O’ | ‘.’ | ‘*’]
      labelstring or anything printable with ‘%s’ conversion.
      linestyle or ls[‘solid’ | ‘dashed’ | ‘dashdot’ | ‘dotted’]
      linewidth or lwfloat or None for default
      lod[True | False]
      path_effectsunknown
      picker[None|float|boolean|callable]
      rasterized[True | False | None]
      snapunknown
      transformTransform instance
      urla url string
      visible[True | False]
      zorderany number
      -
      -
      - -
      -
      -class matplotlib.patches.FancyArrowPatch(posA=None, posB=None, path=None, arrowstyle='simple', arrow_transmuter=None, connectionstyle='arc3', connector=None, patchA=None, patchB=None, shrinkA=2.0, shrinkB=2.0, mutation_scale=1.0, mutation_aspect=None, dpi_cor=1.0, **kwargs)
      -

      Bases: matplotlib.patches.Patch

      -

      A fancy arrow patch. It draws an arrow using the :class:ArrowStyle.

      -

      If posA and posB is given, a path connecting two point are -created according to the connectionstyle. The path will be -clipped with patchA and patchB and further shirnked by -shrinkA and shrinkB. An arrow is drawn along this -resulting path using the arrowstyle parameter. If path -provided, an arrow is drawn along this path and patchA, -patchB, shrinkA, and shrinkB are ignored.

      -

      The connectionstyle describes how posA and posB are -connected. It can be an instance of the ConnectionStyle class -(matplotlib.patches.ConnectionStlye) or a string of the -connectionstyle name, with optional comma-separated -attributes. The following connection styles are available.

      -
      -
      ----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      ClassNameAttrs
      AngleangleangleA=90,angleB=0,rad=0.0
      Angle3angle3angleA=90,angleB=0
      ArcarcangleA=0,angleB=0,armA=None,armB=None,rad=0.0
      Arc3arc3rad=0.0
      BarbararmA=0.0,armB=0.0,fraction=0.3,angle=None
      -
      -

      The arrowstyle describes how the fancy arrow will be -drawn. It can be string of the available arrowstyle names, -with optional comma-separated attributes, or one of the -ArrowStyle instance. The optional attributes are meant to be -scaled with the mutation_scale. The following arrow styles are -available.

      -
      -
      ----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      ClassNameAttrs
      Curve-None
      CurveB->head_length=0.4,head_width=0.2
      BracketB-[widthB=1.0,lengthB=0.2,angleB=None
      CurveFilledB-|>head_length=0.4,head_width=0.2
      CurveA<-head_length=0.4,head_width=0.2
      CurveAB<->head_length=0.4,head_width=0.2
      CurveFilledA<|-head_length=0.4,head_width=0.2
      CurveFilledAB<|-|>head_length=0.4,head_width=0.2
      BracketA]-widthA=1.0,lengthA=0.2,angleA=None
      BracketAB]-[widthA=1.0,lengthA=0.2,angleA=None,widthB=1.0,lengthB=0.2,angleB=None
      Fancyfancyhead_length=0.4,head_width=0.4,tail_width=0.4
      Simplesimplehead_length=0.5,head_width=0.5,tail_width=0.2
      Wedgewedgetail_width=0.3,shrink_factor=0.5
      BarAB|-|widthA=1.0,angleA=None,widthB=1.0,angleB=None
      -
      -
      -
      mutation_scale : a value with which attributes of arrowstyle
      -
      (e.g., head_length) will be scaled. default=1.
      -
      mutation_aspect : The height of the rectangle will be
      -
      squeezed by this value before the mutation and the mutated -box will be stretched by the inverse of it. default=None.
      -
      -

      Valid kwargs are:

      -
      -
      ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      PropertyDescription
      agg_filterunknown
      alphafloat or None
      animated[True | False]
      antialiased or aa[True | False] or None for default
      axesan Axes instance
      clip_boxa matplotlib.transforms.Bbox instance
      clip_on[True | False]
      clip_path[ (Path, Transform) | Patch | None ]
      colormatplotlib color spec
      containsa callable function
      edgecolor or ecmpl color spec, or None for default, or ‘none’ for no color
      facecolor or fcmpl color spec, or None for default, or ‘none’ for no color
      figurea matplotlib.figure.Figure instance
      fill[True | False]
      gidan id string
      hatch[‘/’ | ‘\’ | ‘|’ | ‘-‘ | ‘+’ | ‘x’ | ‘o’ | ‘O’ | ‘.’ | ‘*’]
      labelstring or anything printable with ‘%s’ conversion.
      linestyle or ls[‘solid’ | ‘dashed’ | ‘dashdot’ | ‘dotted’]
      linewidth or lwfloat or None for default
      lod[True | False]
      path_effectsunknown
      picker[None|float|boolean|callable]
      rasterized[True | False | None]
      snapunknown
      transformTransform instance
      urla url string
      visible[True | False]
      zorderany number
      -
      -
      -
      -draw(renderer)
      -
      - -
      -
      -get_arrowstyle()
      -

      Return the arrowstyle object

      -
      - -
      -
      -get_connectionstyle()
      -

      Return the ConnectionStyle instance

      -
      - -
      -
      -get_dpi_cor()
      -

      dpi_cor is currently used for linewidth-related things and -shink factor. Mutation scale is not affected by this.

      -
      - -
      -
      -get_mutation_aspect()
      -

      Return the aspect ratio of the bbox mutation.

      -
      - -
      -
      -get_mutation_scale()
      -

      Return the mutation scale.

      -
      - -
      -
      -get_path()
      -

      return the path of the arrow in the data coordinate. Use -get_path_in_displaycoord() method to retrieve the arrow path -in the display coord.

      -
      - -
      -
      -get_path_in_displaycoord()
      -

      Return the mutated path of the arrow in the display coord

      -
      - -
      -
      -set_arrowstyle(arrowstyle=None, **kw)
      -

      Set the arrow style.

      -
      -
      arrowstyle can be a string with arrowstyle name with optional
      -

      comma-separated attributes. Alternatively, the attrs can -be provided as keywords.

      -

      set_arrowstyle(“Fancy,head_length=0.2”) -set_arrowstyle(“fancy”, head_length=0.2)

      -
      -
      -

      Old attrs simply are forgotten.

      -

      Without argument (or with arrowstyle=None), return -available box styles as a list of strings.

      -
      - -
      -
      -set_connectionstyle(connectionstyle, **kw)
      -

      Set the connection style.

      -
      -
      connectionstyle can be a string with connectionstyle name with
      -

      optional comma-separated attributes. Alternatively, the attrs can be -probided as keywords.

      -

      set_connectionstyle(“arc,angleA=0,armA=30,rad=10”) -set_connectionstyle(“arc”, angleA=0,armA=30,rad=10)

      -
      -
      -

      Old attrs simply are forgotten.

      -

      Without argument (or with connectionstyle=None), return -available styles as a list of strings.

      -
      - -
      -
      -set_dpi_cor(dpi_cor)
      -

      dpi_cor is currently used for linewidth-related things and -shink factor. Mutation scale is not affected by this.

      -
      - -
      -
      -set_mutation_aspect(aspect)
      -

      Set the aspect ratio of the bbox mutation.

      -

      ACCEPTS: float

      -
      - -
      -
      -set_mutation_scale(scale)
      -

      Set the mutation scale.

      -

      ACCEPTS: float

      -
      - -
      -
      -set_patchA(patchA)
      -

      set the begin patch.

      -
      - -
      -
      -set_patchB(patchB)
      -

      set the begin patch

      -
      - -
      -
      -set_positions(posA, posB)
      -

      set the begin end end positions of the connecting -path. Use current vlaue if None.

      -
      - -
      - -
      -
      -class matplotlib.patches.FancyBboxPatch(xy, width, height, boxstyle='round', bbox_transmuter=None, mutation_scale=1.0, mutation_aspect=None, **kwargs)
      -

      Bases: matplotlib.patches.Patch

      -

      Draw a fancy box around a rectangle with lower left at xy*=(*x, -y) with specified width and height.

      -

      FancyBboxPatch class is similar to Rectangle -class, but it draws a fancy box around the rectangle. The -transformation of the rectangle box to the fancy box is delegated -to the BoxTransmuterBase and its derived classes.

      -

      xy = lower left corner

      -

      width, height

      -

      boxstyle determines what kind of fancy box will be drawn. It -can be a string of the style name with a comma separated -attribute, or an instance of BoxStyle. Following box -styles are available.

      -
      -
      ----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      ClassNameAttrs
      LArrowlarrowpad=0.3
      RArrowrarrowpad=0.3
      Roundroundpad=0.3,rounding_size=None
      Round4round4pad=0.3,rounding_size=None
      Roundtoothroundtoothpad=0.3,tooth_size=None
      Sawtoothsawtoothpad=0.3,tooth_size=None
      Squaresquarepad=0.3
      -
      -

      mutation_scale : a value with which attributes of boxstyle -(e.g., pad) will be scaled. default=1.

      -

      mutation_aspect : The height of the rectangle will be -squeezed by this value before the mutation and the mutated -box will be stretched by the inverse of it. default=None.

      -

      Valid kwargs are:

      -
      -
      ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      PropertyDescription
      agg_filterunknown
      alphafloat or None
      animated[True | False]
      antialiased or aa[True | False] or None for default
      axesan Axes instance
      clip_boxa matplotlib.transforms.Bbox instance
      clip_on[True | False]
      clip_path[ (Path, Transform) | Patch | None ]
      colormatplotlib color spec
      containsa callable function
      edgecolor or ecmpl color spec, or None for default, or ‘none’ for no color
      facecolor or fcmpl color spec, or None for default, or ‘none’ for no color
      figurea matplotlib.figure.Figure instance
      fill[True | False]
      gidan id string
      hatch[‘/’ | ‘\’ | ‘|’ | ‘-‘ | ‘+’ | ‘x’ | ‘o’ | ‘O’ | ‘.’ | ‘*’]
      labelstring or anything printable with ‘%s’ conversion.
      linestyle or ls[‘solid’ | ‘dashed’ | ‘dashdot’ | ‘dotted’]
      linewidth or lwfloat or None for default
      lod[True | False]
      path_effectsunknown
      picker[None|float|boolean|callable]
      rasterized[True | False | None]
      snapunknown
      transformTransform instance
      urla url string
      visible[True | False]
      zorderany number
      -
      -
      -
      -get_bbox()
      -
      - -
      -
      -get_boxstyle()
      -

      Return the boxstyle object

      -
      - -
      -
      -get_height()
      -

      Return the height of the rectangle

      -
      - -
      -
      -get_mutation_aspect()
      -

      Return the aspect ratio of the bbox mutation.

      -
      - -
      -
      -get_mutation_scale()
      -

      Return the mutation scale.

      -
      - -
      -
      -get_path()
      -

      Return the mutated path of the rectangle

      -
      - -
      -
      -get_width()
      -

      Return the width of the rectangle

      -
      - -
      -
      -get_x()
      -

      Return the left coord of the rectangle

      -
      - -
      -
      -get_y()
      -

      Return the bottom coord of the rectangle

      -
      - -
      -
      -set_bounds(*args)
      -

      Set the bounds of the rectangle: l,b,w,h

      -

      ACCEPTS: (left, bottom, width, height)

      -
      - -
      -
      -set_boxstyle(boxstyle=None, **kw)
      -

      Set the box style.

      -

      boxstyle can be a string with boxstyle name with optional -comma-separated attributes. Alternatively, the attrs can -be provided as keywords:

      -
      set_boxstyle("round,pad=0.2")
      -set_boxstyle("round", pad=0.2)
      -
      -
      -

      Old attrs simply are forgotten.

      -

      Without argument (or with boxstyle = None), it returns -available box styles.

      -
      - -
      -
      -set_height(h)
      -

      Set the width rectangle

      -

      ACCEPTS: float

      -
      - -
      -
      -set_mutation_aspect(aspect)
      -

      Set the aspect ratio of the bbox mutation.

      -

      ACCEPTS: float

      -
      - -
      -
      -set_mutation_scale(scale)
      -

      Set the mutation scale.

      -

      ACCEPTS: float

      -
      - -
      -
      -set_width(w)
      -

      Set the width rectangle

      -

      ACCEPTS: float

      -
      - -
      -
      -set_x(x)
      -

      Set the left coord of the rectangle

      -

      ACCEPTS: float

      -
      - -
      -
      -set_y(y)
      -

      Set the bottom coord of the rectangle

      -

      ACCEPTS: float

      -
      - -
      - -
      -
      -class matplotlib.patches.Patch(edgecolor=None, facecolor=None, color=None, linewidth=None, linestyle=None, antialiased=None, hatch=None, fill=True, path_effects=None, **kwargs)
      -

      Bases: matplotlib.artist.Artist

      -

      A patch is a 2D artist with a face color and an edge color.

      -

      If any of edgecolor, facecolor, linewidth, or antialiased -are None, they default to their rc params setting.

      -

      The following kwarg properties are supported

      - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      PropertyDescription
      agg_filterunknown
      alphafloat or None
      animated[True | False]
      antialiased or aa[True | False] or None for default
      axesan Axes instance
      clip_boxa matplotlib.transforms.Bbox instance
      clip_on[True | False]
      clip_path[ (Path, Transform) | Patch | None ]
      colormatplotlib color spec
      containsa callable function
      edgecolor or ecmpl color spec, or None for default, or ‘none’ for no color
      facecolor or fcmpl color spec, or None for default, or ‘none’ for no color
      figurea matplotlib.figure.Figure instance
      fill[True | False]
      gidan id string
      hatch[‘/’ | ‘\’ | ‘|’ | ‘-‘ | ‘+’ | ‘x’ | ‘o’ | ‘O’ | ‘.’ | ‘*’]
      labelstring or anything printable with ‘%s’ conversion.
      linestyle or ls[‘solid’ | ‘dashed’ | ‘dashdot’ | ‘dotted’]
      linewidth or lwfloat or None for default
      lod[True | False]
      path_effectsunknown
      picker[None|float|boolean|callable]
      rasterized[True | False | None]
      snapunknown
      transformTransform instance
      urla url string
      visible[True | False]
      zorderany number
      -
      -
      -contains(mouseevent, radius=None)
      -

      Test whether the mouse event occurred in the patch.

      -

      Returns T/F, {}

      -
      - -
      -
      -contains_point(point, radius=None)
      -

      Returns True if the given point is inside the path -(transformed with its transform attribute).

      -
      - -
      -
      -draw(artist, renderer, *args, **kwargs)
      -

      Draw the Patch to the given renderer.

      -
      - -
      -
      -fill
      -

      return whether fill is set

      -
      - -
      -
      -get_aa()
      -

      Returns True if the Patch is to be drawn with antialiasing.

      -
      - -
      -
      -get_antialiased()
      -

      Returns True if the Patch is to be drawn with antialiasing.

      -
      - -
      -
      -get_data_transform()
      -

      Return the Transform instance which -maps data coordinates to physical coordinates.

      -
      - -
      -
      -get_ec()
      -

      Return the edge color of the Patch.

      -
      - -
      -
      -get_edgecolor()
      -

      Return the edge color of the Patch.

      -
      - -
      -
      -get_extents()
      -

      Return a Bbox object defining -the axis-aligned extents of the Patch.

      -
      - -
      -
      -get_facecolor()
      -

      Return the face color of the Patch.

      -
      - -
      -
      -get_fc()
      -

      Return the face color of the Patch.

      -
      - -
      -
      -get_fill()
      -

      return whether fill is set

      -
      - -
      -
      -get_hatch()
      -

      Return the current hatching pattern

      -
      - -
      -
      -get_linestyle()
      -

      Return the linestyle. Will be one of [‘solid’ | ‘dashed’ | -‘dashdot’ | ‘dotted’]

      -
      - -
      -
      -get_linewidth()
      -

      Return the line width in points.

      -
      - -
      -
      -get_ls()
      -

      Return the linestyle. Will be one of [‘solid’ | ‘dashed’ | -‘dashdot’ | ‘dotted’]

      -
      - -
      -
      -get_lw()
      -

      Return the line width in points.

      -
      - -
      -
      -get_patch_transform()
      -

      Return the Transform instance which -takes patch coordinates to data coordinates.

      -

      For example, one may define a patch of a circle which represents a -radius of 5 by providing coordinates for a unit circle, and a -transform which scales the coordinates (the patch coordinate) by 5.

      -
      - -
      -
      -get_path()
      -

      Return the path of this patch

      -
      - -
      -
      -get_path_effects()
      -
      - -
      -
      -get_transform()
      -

      Return the Transform applied -to the Patch.

      -
      - -
      -
      -get_verts()
      -

      Return a copy of the vertices used in this patch

      -

      If the patch contains Bezier curves, the curves will be -interpolated by line segments. To access the curves as -curves, use get_path().

      -
      - -
      -
      -get_window_extent(renderer=None)
      -
      - -
      -
      -set_aa(aa)
      -

      alias for set_antialiased

      -
      - -
      -
      -set_alpha(alpha)
      -

      Set the alpha tranparency of the patch.

      -

      ACCEPTS: float or None

      -
      - -
      -
      -set_antialiased(aa)
      -

      Set whether to use antialiased rendering

      -

      ACCEPTS: [True | False] or None for default

      -
      - -
      -
      -set_color(c)
      -

      Set both the edgecolor and the facecolor.

      -

      ACCEPTS: matplotlib color spec

      -
      -

      See also

      -
      -
      set_facecolor(), set_edgecolor()
      -
      For setting the edge or face color individually.
      -
      -
      -
      - -
      -
      -set_ec(color)
      -

      alias for set_edgecolor

      -
      - -
      -
      -set_edgecolor(color)
      -

      Set the patch edge color

      -

      ACCEPTS: mpl color spec, or None for default, or ‘none’ for no color

      -
      - -
      -
      -set_facecolor(color)
      -

      Set the patch face color

      -

      ACCEPTS: mpl color spec, or None for default, or ‘none’ for no color

      -
      - -
      -
      -set_fc(color)
      -

      alias for set_facecolor

      -
      - -
      -
      -set_fill(b)
      -

      Set whether to fill the patch

      -

      ACCEPTS: [True | False]

      -
      - -
      -
      -set_hatch(hatch)
      -

      Set the hatching pattern

      -

      hatch can be one of:

      -
      /   - diagonal hatching
      -\   - back diagonal
      -|   - vertical
      --   - horizontal
      -+   - crossed
      -x   - crossed diagonal
      -o   - small circle
      -O   - large circle
      -.   - dots
      -*   - stars
      -
      -

      Letters can be combined, in which case all the specified -hatchings are done. If same letter repeats, it increases the -density of hatching of that pattern.

      -

      Hatching is supported in the PostScript, PDF, SVG and Agg -backends only.

      -

      ACCEPTS: [‘/’ | ‘\’ | ‘|’ | ‘-‘ | ‘+’ | ‘x’ | ‘o’ | ‘O’ | ‘.’ | ‘*’]

      -
      - -
      -
      -set_linestyle(ls)
      -

      Set the patch linestyle

      -

      ACCEPTS: [‘solid’ | ‘dashed’ | ‘dashdot’ | ‘dotted’]

      -
      - -
      -
      -set_linewidth(w)
      -

      Set the patch linewidth in points

      -

      ACCEPTS: float or None for default

      -
      - -
      -
      -set_ls(ls)
      -

      alias for set_linestyle

      -
      - -
      -
      -set_lw(lw)
      -

      alias for set_linewidth

      -
      - -
      -
      -set_path_effects(path_effects)
      -

      set path_effects, which should be a list of instances of -matplotlib.patheffect._Base class or its derivatives.

      -
      - -
      -
      -update_from(other)
      -

      Updates this Patch from the properties of other.

      -
      - -
      -
      -zorder = 1
      -
      - -
      - -
      -
      -class matplotlib.patches.PathPatch(path, **kwargs)
      -

      Bases: matplotlib.patches.Patch

      -

      A general polycurve path patch.

      -

      path is a matplotlib.path.Path object.

      -

      Valid kwargs are:

      -
      -
      ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      PropertyDescription
      agg_filterunknown
      alphafloat or None
      animated[True | False]
      antialiased or aa[True | False] or None for default
      axesan Axes instance
      clip_boxa matplotlib.transforms.Bbox instance
      clip_on[True | False]
      clip_path[ (Path, Transform) | Patch | None ]
      colormatplotlib color spec
      containsa callable function
      edgecolor or ecmpl color spec, or None for default, or ‘none’ for no color
      facecolor or fcmpl color spec, or None for default, or ‘none’ for no color
      figurea matplotlib.figure.Figure instance
      fill[True | False]
      gidan id string
      hatch[‘/’ | ‘\’ | ‘|’ | ‘-‘ | ‘+’ | ‘x’ | ‘o’ | ‘O’ | ‘.’ | ‘*’]
      labelstring or anything printable with ‘%s’ conversion.
      linestyle or ls[‘solid’ | ‘dashed’ | ‘dashdot’ | ‘dotted’]
      linewidth or lwfloat or None for default
      lod[True | False]
      path_effectsunknown
      picker[None|float|boolean|callable]
      rasterized[True | False | None]
      snapunknown
      transformTransform instance
      urla url string
      visible[True | False]
      zorderany number
      -
      -
      -

      See also

      -
      -
      Patch
      -
      For additional kwargs
      -
      -
      -
      -
      -get_path()
      -
      - -
      - -
      -
      -class matplotlib.patches.Polygon(xy, closed=True, **kwargs)
      -

      Bases: matplotlib.patches.Patch

      -

      A general polygon patch.

      -

      xy is a numpy array with shape Nx2.

      -

      If closed is True, the polygon will be closed so the -starting and ending points are the same.

      -

      Valid kwargs are:

      -
      -
      ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      PropertyDescription
      agg_filterunknown
      alphafloat or None
      animated[True | False]
      antialiased or aa[True | False] or None for default
      axesan Axes instance
      clip_boxa matplotlib.transforms.Bbox instance
      clip_on[True | False]
      clip_path[ (Path, Transform) | Patch | None ]
      colormatplotlib color spec
      containsa callable function
      edgecolor or ecmpl color spec, or None for default, or ‘none’ for no color
      facecolor or fcmpl color spec, or None for default, or ‘none’ for no color
      figurea matplotlib.figure.Figure instance
      fill[True | False]
      gidan id string
      hatch[‘/’ | ‘\’ | ‘|’ | ‘-‘ | ‘+’ | ‘x’ | ‘o’ | ‘O’ | ‘.’ | ‘*’]
      labelstring or anything printable with ‘%s’ conversion.
      linestyle or ls[‘solid’ | ‘dashed’ | ‘dashdot’ | ‘dotted’]
      linewidth or lwfloat or None for default
      lod[True | False]
      path_effectsunknown
      picker[None|float|boolean|callable]
      rasterized[True | False | None]
      snapunknown
      transformTransform instance
      urla url string
      visible[True | False]
      zorderany number
      -
      -
      -

      See also

      -
      -
      Patch
      -
      For additional kwargs
      -
      -
      -
      -
      -get_closed()
      -
      - -
      -
      -get_path()
      -
      - -
      -
      -get_xy()
      -
      - -
      -
      -set_closed(closed)
      -
      - -
      -
      -set_xy(xy)
      -
      - -
      -
      -xy
      -

      Set/get the vertices of the polygon. This property is -provided for backward compatibility with matplotlib 0.91.x -only. New code should use -get_xy() and -set_xy() instead.

      -
      - -
      - -
      -
      -class matplotlib.patches.Rectangle(xy, width, height, angle=0.0, **kwargs)
      -

      Bases: matplotlib.patches.Patch

      -

      Draw a rectangle with lower left at xy = (x, y) with -specified width and height.

      -
      -
      -
      angle
      -
      rotation in degrees (anti-clockwise)
      -
      -

      fill is a boolean indicating whether to fill the rectangle

      -

      Valid kwargs are:

      -
      - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      PropertyDescription
      agg_filterunknown
      alphafloat or None
      animated[True | False]
      antialiased or aa[True | False] or None for default
      axesan Axes instance
      clip_boxa matplotlib.transforms.Bbox instance
      clip_on[True | False]
      clip_path[ (Path, Transform) | Patch | None ]
      colormatplotlib color spec
      containsa callable function
      edgecolor or ecmpl color spec, or None for default, or ‘none’ for no color
      facecolor or fcmpl color spec, or None for default, or ‘none’ for no color
      figurea matplotlib.figure.Figure instance
      fill[True | False]
      gidan id string
      hatch[‘/’ | ‘\’ | ‘|’ | ‘-‘ | ‘+’ | ‘x’ | ‘o’ | ‘O’ | ‘.’ | ‘*’]
      labelstring or anything printable with ‘%s’ conversion.
      linestyle or ls[‘solid’ | ‘dashed’ | ‘dashdot’ | ‘dotted’]
      linewidth or lwfloat or None for default
      lod[True | False]
      path_effectsunknown
      picker[None|float|boolean|callable]
      rasterized[True | False | None]
      snapunknown
      transformTransform instance
      urla url string
      visible[True | False]
      zorderany number
      -
      -
      -contains(mouseevent)
      -
      - -
      -
      -get_bbox()
      -
      - -
      -
      -get_height()
      -

      Return the height of the rectangle

      -
      - -
      -
      -get_patch_transform()
      -
      - -
      -
      -get_path()
      -

      Return the vertices of the rectangle

      -
      - -
      -
      -get_width()
      -

      Return the width of the rectangle

      -
      - -
      -
      -get_x()
      -

      Return the left coord of the rectangle

      -
      - -
      -
      -get_xy()
      -

      Return the left and bottom coords of the rectangle

      -
      - -
      -
      -get_y()
      -

      Return the bottom coord of the rectangle

      -
      - -
      -
      -set_bounds(*args)
      -

      Set the bounds of the rectangle: l,b,w,h

      -

      ACCEPTS: (left, bottom, width, height)

      -
      - -
      -
      -set_height(h)
      -

      Set the width rectangle

      -

      ACCEPTS: float

      -
      - -
      -
      -set_width(w)
      -

      Set the width rectangle

      -

      ACCEPTS: float

      -
      - -
      -
      -set_x(x)
      -

      Set the left coord of the rectangle

      -

      ACCEPTS: float

      -
      - -
      -
      -set_xy(xy)
      -

      Set the left and bottom coords of the rectangle

      -

      ACCEPTS: 2-item sequence

      -
      - -
      -
      -set_y(y)
      -

      Set the bottom coord of the rectangle

      -

      ACCEPTS: float

      -
      - -
      -
      -xy
      -

      Return the left and bottom coords of the rectangle

      -
      - -
      - -
      -
      -class matplotlib.patches.RegularPolygon(xy, numVertices, radius=5, orientation=0, **kwargs)
      -

      Bases: matplotlib.patches.Patch

      -

      A regular polygon patch.

      -

      Constructor arguments:

      -
      -
      xy
      -
      A length 2 tuple (x, y) of the center.
      -
      numVertices
      -
      the number of vertices.
      -
      radius
      -
      The distance from the center to each of the vertices.
      -
      orientation
      -
      rotates the polygon (in radians).
      -
      -

      Valid kwargs are:

      -
      -
      ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      PropertyDescription
      agg_filterunknown
      alphafloat or None
      animated[True | False]
      antialiased or aa[True | False] or None for default
      axesan Axes instance
      clip_boxa matplotlib.transforms.Bbox instance
      clip_on[True | False]
      clip_path[ (Path, Transform) | Patch | None ]
      colormatplotlib color spec
      containsa callable function
      edgecolor or ecmpl color spec, or None for default, or ‘none’ for no color
      facecolor or fcmpl color spec, or None for default, or ‘none’ for no color
      figurea matplotlib.figure.Figure instance
      fill[True | False]
      gidan id string
      hatch[‘/’ | ‘\’ | ‘|’ | ‘-‘ | ‘+’ | ‘x’ | ‘o’ | ‘O’ | ‘.’ | ‘*’]
      labelstring or anything printable with ‘%s’ conversion.
      linestyle or ls[‘solid’ | ‘dashed’ | ‘dashdot’ | ‘dotted’]
      linewidth or lwfloat or None for default
      lod[True | False]
      path_effectsunknown
      picker[None|float|boolean|callable]
      rasterized[True | False | None]
      snapunknown
      transformTransform instance
      urla url string
      visible[True | False]
      zorderany number
      -
      -
      -
      -get_patch_transform()
      -
      - -
      -
      -get_path()
      -
      - -
      -
      -numvertices
      -
      - -
      -
      -orientation
      -
      - -
      -
      -radius
      -
      - -
      -
      -xy
      -
      - -
      - -
      -
      -class matplotlib.patches.Shadow(patch, ox, oy, props=None, **kwargs)
      -

      Bases: matplotlib.patches.Patch

      -

      Create a shadow of the given patch offset by ox, oy. -props, if not None, is a patch property update dictionary. -If None, the shadow will have have the same color as the face, -but darkened.

      -

      kwargs are

      -
      -
      ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      PropertyDescription
      agg_filterunknown
      alphafloat or None
      animated[True | False]
      antialiased or aa[True | False] or None for default
      axesan Axes instance
      clip_boxa matplotlib.transforms.Bbox instance
      clip_on[True | False]
      clip_path[ (Path, Transform) | Patch | None ]
      colormatplotlib color spec
      containsa callable function
      edgecolor or ecmpl color spec, or None for default, or ‘none’ for no color
      facecolor or fcmpl color spec, or None for default, or ‘none’ for no color
      figurea matplotlib.figure.Figure instance
      fill[True | False]
      gidan id string
      hatch[‘/’ | ‘\’ | ‘|’ | ‘-‘ | ‘+’ | ‘x’ | ‘o’ | ‘O’ | ‘.’ | ‘*’]
      labelstring or anything printable with ‘%s’ conversion.
      linestyle or ls[‘solid’ | ‘dashed’ | ‘dashdot’ | ‘dotted’]
      linewidth or lwfloat or None for default
      lod[True | False]
      path_effectsunknown
      picker[None|float|boolean|callable]
      rasterized[True | False | None]
      snapunknown
      transformTransform instance
      urla url string
      visible[True | False]
      zorderany number
      -
      -
      -
      -draw(renderer)
      -
      - -
      -
      -get_patch_transform()
      -
      - -
      -
      -get_path()
      -
      - -
      - -
      -
      -class matplotlib.patches.Wedge(center, r, theta1, theta2, width=None, **kwargs)
      -

      Bases: matplotlib.patches.Patch

      -

      Wedge shaped patch.

      -

      Draw a wedge centered at x, y center with radius r that -sweeps theta1 to theta2 (in degrees). If width is given, -then a partial wedge is drawn from inner radius r - width -to outer radius r.

      -

      Valid kwargs are:

      -
      -
      ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      PropertyDescription
      agg_filterunknown
      alphafloat or None
      animated[True | False]
      antialiased or aa[True | False] or None for default
      axesan Axes instance
      clip_boxa matplotlib.transforms.Bbox instance
      clip_on[True | False]
      clip_path[ (Path, Transform) | Patch | None ]
      colormatplotlib color spec
      containsa callable function
      edgecolor or ecmpl color spec, or None for default, or ‘none’ for no color
      facecolor or fcmpl color spec, or None for default, or ‘none’ for no color
      figurea matplotlib.figure.Figure instance
      fill[True | False]
      gidan id string
      hatch[‘/’ | ‘\’ | ‘|’ | ‘-‘ | ‘+’ | ‘x’ | ‘o’ | ‘O’ | ‘.’ | ‘*’]
      labelstring or anything printable with ‘%s’ conversion.
      linestyle or ls[‘solid’ | ‘dashed’ | ‘dashdot’ | ‘dotted’]
      linewidth or lwfloat or None for default
      lod[True | False]
      path_effectsunknown
      picker[None|float|boolean|callable]
      rasterized[True | False | None]
      snapunknown
      transformTransform instance
      urla url string
      visible[True | False]
      zorderany number
      -
      -
      -
      -get_path()
      -
      - -
      -
      -set_center(center)
      -
      - -
      -
      -set_radius(radius)
      -
      - -
      -
      -set_theta1(theta1)
      -
      - -
      -
      -set_theta2(theta2)
      -
      - -
      -
      -set_width(width)
      -
      - -
      - -
      -
      -class matplotlib.patches.YAArrow(figure, xytip, xybase, width=4, frac=0.1, headwidth=12, **kwargs)
      -

      Bases: matplotlib.patches.Patch

      -

      Yet another arrow class.

      -

      This is an arrow that is defined in display space and has a tip at -x1, y1 and a base at x2, y2.

      -

      Constructor arguments:

      -
      -
      xytip
      -
      (x, y) location of arrow tip
      -
      xybase
      -
      (x, y) location the arrow base mid point
      -
      figure
      -
      The Figure instance -(fig.dpi)
      -
      width
      -
      The width of the arrow in points
      -
      frac
      -
      The fraction of the arrow length occupied by the head
      -
      headwidth
      -
      The width of the base of the arrow head in points
      -
      -

      Valid kwargs are:

      -
      -
      ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      PropertyDescription
      agg_filterunknown
      alphafloat or None
      animated[True | False]
      antialiased or aa[True | False] or None for default
      axesan Axes instance
      clip_boxa matplotlib.transforms.Bbox instance
      clip_on[True | False]
      clip_path[ (Path, Transform) | Patch | None ]
      colormatplotlib color spec
      containsa callable function
      edgecolor or ecmpl color spec, or None for default, or ‘none’ for no color
      facecolor or fcmpl color spec, or None for default, or ‘none’ for no color
      figurea matplotlib.figure.Figure instance
      fill[True | False]
      gidan id string
      hatch[‘/’ | ‘\’ | ‘|’ | ‘-‘ | ‘+’ | ‘x’ | ‘o’ | ‘O’ | ‘.’ | ‘*’]
      labelstring or anything printable with ‘%s’ conversion.
      linestyle or ls[‘solid’ | ‘dashed’ | ‘dashdot’ | ‘dotted’]
      linewidth or lwfloat or None for default
      lod[True | False]
      path_effectsunknown
      picker[None|float|boolean|callable]
      rasterized[True | False | None]
      snapunknown
      transformTransform instance
      urla url string
      visible[True | False]
      zorderany number
      -
      -
      -
      -get_patch_transform()
      -
      - -
      -
      -get_path()
      -
      - -
      -
      -getpoints(x1, y1, x2, y2, k)
      -

      For line segment defined by (x1, y1) and (x2, y2) -return the points on the line that is perpendicular to the -line and intersects (x2, y2) and the distance from (x2, -y2) of the returned points is k.

      -
      - -
      - -
      -
      -matplotlib.patches.bbox_artist(artist, renderer, props=None, fill=True)
      -

      This is a debug function to draw a rectangle around the bounding -box returned by -get_window_extent() of an artist, -to test whether the artist is returning the correct bbox.

      -

      props is a dict of rectangle props with the additional property -‘pad’ that sets the padding around the bbox in points.

      -
      - -
      -
      -matplotlib.patches.draw_bbox(bbox, renderer, color='k', trans=None)
      -

      This is a debug function to draw a rectangle around the bounding -box returned by -get_window_extent() of an artist, -to test whether the artist is returning the correct bbox.

      -
      - -
      -
      -

      matplotlib.text

      -

      Classes for including text in a figure.

      -
      -
      -class matplotlib.text.Annotation(s, xy, xytext=None, xycoords='data', textcoords=None, arrowprops=None, annotation_clip=None, **kwargs)
      -

      Bases: matplotlib.text.Text, matplotlib.text._AnnotationBase

      -

      A Text class to make annotating things -in the figure, such as Figure, -Axes, -Rectangle, etc., easier.

      -

      Annotate the x, y point xy with text s at x, y -location xytext. (If xytext = None, defaults to xy, -and if textcoords = None, defaults to xycoords).

      -

      arrowprops, if not None, is a dictionary of line properties -(see matplotlib.lines.Line2D) for the arrow that connects -annotation to the point.

      -

      If the dictionary has a key arrowstyle, a FancyArrowPatch -instance is created with the given dictionary and is -drawn. Otherwise, a YAArow patch instance is created and -drawn. Valid keys for YAArow are

      - ---- - - - - - - - - - - - - - - - - - - - - - - -
      KeyDescription
      widththe width of the arrow in points
      fracthe fraction of the arrow length occupied by the head
      headwidththe width of the base of the arrow head in points
      shrinkoftentimes it is convenient to have the arrowtip -and base a bit away from the text and point being -annotated. If d is the distance between the text and -annotated point, shrink will shorten the arrow so the tip -and base are shink percent of the distance d away from -the endpoints. ie, shrink=0.05 is 5%
      ?any key for matplotlib.patches.polygon
      -

      Valid keys for FancyArrowPatch are

      - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      KeyDescription
      arrowstylethe arrow style
      connectionstylethe connection style
      relposdefault is (0.5, 0.5)
      patchAdefault is bounding box of the text
      patchBdefault is None
      shrinkAdefault is 2 points
      shrinkBdefault is 2 points
      mutation_scaledefault is text size (in points)
      mutation_aspectdefault is 1.
      ?any key for matplotlib.patches.PathPatch
      -

      xycoords and textcoords are strings that indicate the -coordinates of xy and xytext.

      - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      PropertyDescription
      ‘figure points’points from the lower left corner of the figure
      ‘figure pixels’pixels from the lower left corner of the figure
      ‘figure fraction’0,0 is lower left of figure and 1,1 is upper right
      ‘axes points’points from lower left corner of axes
      ‘axes pixels’pixels from lower left corner of axes
      ‘axes fraction’0,0 is lower left of axes and 1,1 is upper right
      ‘data’use the coordinate system of the object being -annotated (default)
      ‘offset points’Specify an offset (in points) from the xy value
      ‘polar’you can specify theta, r for the annotation, -even in cartesian plots. Note that if you -are using a polar axes, you do not need -to specify polar for the coordinate -system since that is the native “data” coordinate -system.
      -

      If a ‘points’ or ‘pixels’ option is specified, values will be -added to the bottom-left and if negative, values will be -subtracted from the top-right. e.g.:

      -
      # 10 points to the right of the left border of the axes and
      -# 5 points below the top border
      -xy=(10,-5), xycoords='axes points'
      -
      -
      -

      You may use an instance of -Transform or -Artist. See -Annotating Axes for more details.

      -

      The annotation_clip attribute contols the visibility of the -annotation when it goes outside the axes area. If True, the -annotation will only be drawn when the xy is inside the -axes. If False, the annotation will always be drawn regardless -of its position. The default is None, which behave as True -only if xycoords is”data”.

      -

      Additional kwargs are Text properties:

      -
      -
      ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      PropertyDescription
      agg_filterunknown
      alphafloat (0.0 transparent through 1.0 opaque)
      animated[True | False]
      axesan Axes instance
      backgroundcolorany matplotlib color
      bboxrectangle prop dict
      clip_boxa matplotlib.transforms.Bbox instance
      clip_on[True | False]
      clip_path[ (Path, Transform) | Patch | None ]
      colorany matplotlib color
      containsa callable function
      family or fontfamily or fontname or name[FONTNAME | ‘serif’ | ‘sans-serif’ | ‘cursive’ | ‘fantasy’ | ‘monospace’ ]
      figurea matplotlib.figure.Figure instance
      fontproperties or font_propertiesa matplotlib.font_manager.FontProperties instance
      gidan id string
      horizontalalignment or ha[ ‘center’ | ‘right’ | ‘left’ ]
      labelstring or anything printable with ‘%s’ conversion.
      linespacingfloat (multiple of font size)
      lod[True | False]
      multialignment[‘left’ | ‘right’ | ‘center’ ]
      path_effectsunknown
      picker[None|float|boolean|callable]
      position(x,y)
      rasterized[True | False | None]
      rotation[ angle in degrees | ‘vertical’ | ‘horizontal’ ]
      rotation_modeunknown
      size or fontsize[size in points | ‘xx-small’ | ‘x-small’ | ‘small’ | ‘medium’ | ‘large’ | ‘x-large’ | ‘xx-large’ ]
      snapunknown
      stretch or fontstretch[a numeric value in range 0-1000 | ‘ultra-condensed’ | ‘extra-condensed’ | ‘condensed’ | ‘semi-condensed’ | ‘normal’ | ‘semi-expanded’ | ‘expanded’ | ‘extra-expanded’ | ‘ultra-expanded’ ]
      style or fontstyle[ ‘normal’ | ‘italic’ | ‘oblique’]
      textstring or anything printable with ‘%s’ conversion.
      transformTransform instance
      urla url string
      variant or fontvariant[ ‘normal’ | ‘small-caps’ ]
      verticalalignment or va or ma[ ‘center’ | ‘top’ | ‘bottom’ | ‘baseline’ ]
      visible[True | False]
      weight or fontweight[a numeric value in range 0-1000 | ‘ultralight’ | ‘light’ | ‘normal’ | ‘regular’ | ‘book’ | ‘medium’ | ‘roman’ | ‘semibold’ | ‘demibold’ | ‘demi’ | ‘bold’ | ‘heavy’ | ‘extra bold’ | ‘black’ ]
      xfloat
      yfloat
      zorderany number
      -
      -
      -
      -contains(event)
      -
      - -
      -
      -draw(artist, renderer, *args, **kwargs)
      -

      Draw the Annotation object to the given renderer.

      -
      - -
      -
      -set_figure(fig)
      -
      - -
      -
      -update_bbox_position_size(renderer)
      -

      Update the location and the size of the bbox. This method -should be used when the position and size of the bbox needs to -be updated before actually drawing the bbox.

      -
      - -
      -
      -update_positions(renderer)
      -

      “Update the pixel positions of the annotated point and the -text.

      -
      - -
      - -
      -
      -class matplotlib.text.OffsetFrom(artist, ref_coord, unit='points')
      -

      Bases: object

      -
      -
      -get_unit()
      -
      - -
      -
      -set_unit(unit)
      -
      - -
      - -
      -
      -class matplotlib.text.Text(x=0, y=0, text='', color=None, verticalalignment='baseline', horizontalalignment='left', multialignment=None, fontproperties=None, rotation=None, linespacing=None, rotation_mode=None, path_effects=None, **kwargs)
      -

      Bases: matplotlib.artist.Artist

      -

      Handle storing and drawing of text in window or data coordinates.

      -

      Create a Text instance at x, y -with string text.

      -

      Valid kwargs are

      -
      -
      ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      PropertyDescription
      agg_filterunknown
      alphafloat (0.0 transparent through 1.0 opaque)
      animated[True | False]
      axesan Axes instance
      backgroundcolorany matplotlib color
      bboxrectangle prop dict
      clip_boxa matplotlib.transforms.Bbox instance
      clip_on[True | False]
      clip_path[ (Path, Transform) | Patch | None ]
      colorany matplotlib color
      containsa callable function
      family or fontfamily or fontname or name[FONTNAME | ‘serif’ | ‘sans-serif’ | ‘cursive’ | ‘fantasy’ | ‘monospace’ ]
      figurea matplotlib.figure.Figure instance
      fontproperties or font_propertiesa matplotlib.font_manager.FontProperties instance
      gidan id string
      horizontalalignment or ha[ ‘center’ | ‘right’ | ‘left’ ]
      labelstring or anything printable with ‘%s’ conversion.
      linespacingfloat (multiple of font size)
      lod[True | False]
      multialignment[‘left’ | ‘right’ | ‘center’ ]
      path_effectsunknown
      picker[None|float|boolean|callable]
      position(x,y)
      rasterized[True | False | None]
      rotation[ angle in degrees | ‘vertical’ | ‘horizontal’ ]
      rotation_modeunknown
      size or fontsize[size in points | ‘xx-small’ | ‘x-small’ | ‘small’ | ‘medium’ | ‘large’ | ‘x-large’ | ‘xx-large’ ]
      snapunknown
      stretch or fontstretch[a numeric value in range 0-1000 | ‘ultra-condensed’ | ‘extra-condensed’ | ‘condensed’ | ‘semi-condensed’ | ‘normal’ | ‘semi-expanded’ | ‘expanded’ | ‘extra-expanded’ | ‘ultra-expanded’ ]
      style or fontstyle[ ‘normal’ | ‘italic’ | ‘oblique’]
      textstring or anything printable with ‘%s’ conversion.
      transformTransform instance
      urla url string
      variant or fontvariant[ ‘normal’ | ‘small-caps’ ]
      verticalalignment or va or ma[ ‘center’ | ‘top’ | ‘bottom’ | ‘baseline’ ]
      visible[True | False]
      weight or fontweight[a numeric value in range 0-1000 | ‘ultralight’ | ‘light’ | ‘normal’ | ‘regular’ | ‘book’ | ‘medium’ | ‘roman’ | ‘semibold’ | ‘demibold’ | ‘demi’ | ‘bold’ | ‘heavy’ | ‘extra bold’ | ‘black’ ]
      xfloat
      yfloat
      zorderany number
      -
      -
      -
      -cached = {(0.5, 0.6, 'roundtooth', 'k', 'baseline', 'center', -2862017849760843439, None, None, 80, 129764960): (Bbox('array([[-64.5625, -5. ],\n [ 64.5625, 19. ]])'), [('roundtooth', array([ 129.125, 24. ]), -64.5625, 0.0)]), (799.9999999999999, 640.0, ']-[', 'k', 'center', 'right', 7043629620243261673, None, None, 200, 113962736): (Bbox('array([[-36.875, -19. ],\n [ 0. , 19. ]])'), [(']-[', array([ 36.875, 38. ]), -36.875, -11.0)]), (0.5, 0.4666666666666667, 'rarrow', 'k', 'baseline', 'center', -2862017849760843439, None, None, 80, 129764960): (Bbox('array([[-37.375, -5. ],\n [ 37.375, 19. ]])'), [('rarrow', array([ 74.75, 24. ]), -37.375, 0.0)]), (288.0, 326.4, '$<$$|$-$|$$>$', 'k', 'center', 'right', 7043629620243261673, None, None, 72, 83571856): (Bbox('array([[-40. , -6.7734375],\n [ 0. , 6.7734375]])'), [('$<$$|$-$|$$>$', array([ 40. , 13.546875]), -40.0, -3.8671875)]), (266.66666666666663, 906.6666666666667, '-', 'k', 'center', 'right', 7043629620243261673, None, None, 200, 113962736): (Bbox('array([[-10.25, -19. ],\n [ 0. , 19. ]])'), [('-', array([ 10.25, 38. ]), -10.25, -11.0)]), (0.5, 0.06666666666666667, 'round', 'k', 'baseline', 'center', -2862017849760843439, None, None, 72, 81311056): (Bbox('array([[-29.4140625, -4.578125 ],\n [ 29.4140625, 16.71875 ]])'), [('round', array([ 58.828125, 21.296875]), -29.4140625, 0.0)]), (799.9999999999999, 373.3333333333333, 'simple', 'k', 'center', 'right', 7043629620243261673, None, None, 200, 113962736): (Bbox('array([[-123.875, -19. ],\n [ 0. , 19. ]])'), [('simple', array([ 123.875, 38. ]), -123.875, -11.0)]), (0.5, 0.4666666666666667, 'rarrow', 'k', 'baseline', 'center', -2862017849760843439, None, None, 200, 129763736): (Bbox('array([[-93.2109375, -13. ],\n [ 93.2109375, 46. ]])'), [('rarrow', array([ 186.421875, 59. ]), -93.2109375, 0.0)]), (799.9999999999999, 506.6666666666667, 'fancy', 'k', 'center', 'right', 7043629620243261673, None, None, 200, 113962736): (Bbox('array([[-104.53125, -19. ],\n [ 0. , 19. ]])'), [('fancy', array([ 104.53125, 38. ]), -104.53125, -11.0)]), (0.5, 0.4666666666666667, 'rarrow', 'k', 'baseline', 'center', -2862017849760843439, None, None, 72, 81311056): (Bbox('array([[-33.546875, -4.578125],\n [ 33.546875, 16.71875 ]])'), [('rarrow', array([ 67.09375 , 21.296875]), -33.546875, 0.0)]), (96.0, 38.39999999999999, '$<$$|$-', 'k', 'center', 'right', 7043629620243261673, None, None, 72, 83571856): (Bbox('array([[-23. , -6.7734375],\n [ 0. , 6.7734375]])'), [('$<$$|$-', array([ 23. , 13.546875]), -23.0, -3.8671875)]), (0.5, 0.6, 'roundtooth', 'k', 'baseline', 'center', -2862017849760843439, None, None, 200, 129763736): (Bbox('array([[-161.0625, -13. ],\n [ 161.0625, 46. ]])'), [('roundtooth', array([ 322.125, 59. ]), -161.0625, 0.0)]), (96.0, 278.4, '-$>$', 'k', 'center', 'right', 7043629620243261673, None, None, 72, 83571856): (Bbox('array([[-19. , -6.7734375],\n [ 0. , 6.7734375]])'), [('-$>$', array([ 19. , 13.546875]), -19.0, -3.8671875)]), (0.5, 0.2, 'round4', 'k', 'baseline', 'center', -2862017849760843439, None, None, 72, 81311056): (Bbox('array([[-36.671875, -4.578125],\n [ 36.671875, 16.71875 ]])'), [('round4', array([ 73.34375 , 21.296875]), -36.671875, 0.0)]), (266.66666666666663, 640.0, '-[', 'k', 'center', 'right', 7043629620243261673, None, None, 200, 113962736): (Bbox('array([[-23.5625, -19. ],\n [ 0. , 19. ]])'), [('-[', array([ 23.5625, 38. ]), -23.5625, -11.0)]), (288.0, 230.39999999999998, ']-[', 'k', 'center', 'right', 7043629620243261673, None, None, 72, 83571856): (Bbox('array([[-13.265625 , -6.7734375],\n [ 0. , 6.7734375]])'), [(']-[', array([ 13.265625, 13.546875]), -13.265625, -3.8671875)]), (288.0, 278.4, ']-', 'k', 'center', 'right', 7043629620243261673, None, None, 72, 83571856): (Bbox('array([[-8.484375 , -6.7734375],\n [ 0. , 6.7734375]])'), [(']-', array([ 8.484375, 13.546875]), -8.484375, -3.8671875)]), (799.9999999999999, 106.66666666666666, '$|$-$|$', 'k', 'center', 'right', 7043629620243261673, None, None, 200, 113962736): (Bbox('array([[-32.91918945, -19. ],\n [ 0. , 19. ]])'), [('$|$-$|$', array([ 32.91918945, 38. ]), -32.919189453125, -11.0)]), (320.0, 42.66666666666666, '$|$-$|$', 'k', 'center', 'right', 7043629620243261673, None, None, 80, 113509728): (Bbox('array([[-14.39941406, -7.5 ],\n [ 0. , 7.5 ]])'), [('$|$-$|$', array([ 14.39941406, 15. ]), -14.3994140625, -4.5)]), (0.5, 0.6, 'roundtooth', 'k', 'baseline', 'center', -2862017849760843439, None, None, 72, 81311056): (Bbox('array([[-58.0546875, -4.578125 ],\n [ 58.0546875, 16.71875 ]])'), [('roundtooth', array([ 116.109375, 21.296875]), -58.0546875, 0.0)]), (266.66666666666663, 506.6666666666667, '-$|$$>$', 'k', 'center', 'right', 7043629620243261673, None, None, 200, 113962736): (Bbox('array([[-60.62249146, -19. ],\n [ 0. , 19. ]])'), [('-$|$$>$', array([ 60.62249146, 38. ]), -60.622491455078126, -11.0)]), (288.0, 38.39999999999999, '$|$-$|$', 'k', 'center', 'right', 7043629620243261673, None, None, 72, 83571856): (Bbox('array([[-13. , -6.7734375],\n [ 0. , 6.7734375]])'), [('$|$-$|$', array([ 13. , 13.546875]), -13.0, -3.8671875)]), (96.0, 230.39999999999998, '-[', 'k', 'center', 'right', 7043629620243261673, None, None, 72, 83571856): (Bbox('array([[-8.46875 , -6.7734375],\n [ 0. , 6.7734375]])'), [('-[', array([ 8.46875 , 13.546875]), -8.46875, -3.8671875)]), (0.5, 0.8666666666666667, 'square', 'k', 'baseline', 'center', -2862017849760843439, None, None, 72, 81311056): (Bbox('array([[-35.6640625, -4.578125 ],\n [ 35.6640625, 16.71875 ]])'), [('square', array([ 71.328125, 21.296875]), -35.6640625, 0.0)]), (0.5, 0.3333333333333333, 'larrow', 'k', 'baseline', 'center', -2862017849760843439, None, None, 72, 81311056): (Bbox('array([[-32.078125, -4.578125],\n [ 32.078125, 16.71875 ]])'), [('larrow', array([ 64.15625 , 21.296875]), -32.078125, 0.0)]), (0.5, 0.3333333333333333, 'larrow', 'k', 'baseline', 'center', -2862017849760843439, None, None, 200, 129763736): (Bbox('array([[-89.0859375, -13. ],\n [ 89.0859375, 46. ]])'), [('larrow', array([ 178.171875, 59. ]), -89.0859375, 0.0)]), (0.5, 0.7333333333333333, 'sawtooth', 'k', 'baseline', 'center', -2862017849760843439, None, None, 200, 129763736): (Bbox('array([[-133.625, -13. ],\n [ 133.625, 46. ]])'), [('sawtooth', array([ 267.25, 59. ]), -133.625, 0.0)]), (288.0, 86.39999999999999, 'wedge', 'k', 'center', 'right', 7043629620243261673, None, None, 72, 83571856): (Bbox('array([[-45.125 , -6.7734375],\n [ 0. , 6.7734375]])'), [('wedge', array([ 45.125 , 13.546875]), -45.125, -3.8671875)]), (0.5, 0.8666666666666667, 'square', 'k', 'baseline', 'center', -2862017849760843439, None, None, 200, 129763736): (Bbox('array([[-99.0625, -13. ],\n [ 99.0625, 46. ]])'), [('square', array([ 198.125, 59. ]), -99.0625, 0.0)]), (266.66666666666663, 773.3333333333334, '-$>$', 'k', 'center', 'right', 7043629620243261673, None, None, 200, 113962736): (Bbox('array([[-49.85595093, -19. ],\n [ 0. , 19. ]])'), [('-$>$', array([ 49.85595093, 38. ]), -49.855950927734376, -11.0)]), (0.5, 0.8666666666666667, 'square', 'k', 'baseline', 'center', -2862017849760843439, None, None, 80, 129764960): (Bbox('array([[-39.59375, -5. ],\n [ 39.59375, 19. ]])'), [('square', array([ 79.1875, 24. ]), -39.59375, 0.0)]), (0.5, 0.2, 'round4', 'k', 'baseline', 'center', -2862017849760843439, None, None, 200, 129763736): (Bbox('array([[-101.8125, -13. ],\n [ 101.8125, 46. ]])'), [('round4', array([ 203.625, 59. ]), -101.8125, 0.0)]), (266.66666666666663, 240.0, '$<$-$>$', 'k', 'center', 'right', 7043629620243261673, None, None, 200, 113962736): (Bbox('array([[-87.26255493, -19. ],\n [ 0. , 19. ]])'), [('$<$-$>$', array([ 87.26255493, 38. ]), -87.262554931640636, -11.0)]), (0.5, 0.7333333333333333, 'sawtooth', 'k', 'baseline', 'center', -2862017849760843439, None, None, 80, 129764960): (Bbox('array([[-53.59375, -5. ],\n [ 53.59375, 19. ]])'), [('sawtooth', array([ 107.1875, 24. ]), -53.59375, 0.0)]), (96.0, 182.39999999999998, '-$|$$>$', 'k', 'center', 'right', 7043629620243261673, None, None, 72, 83571856): (Bbox('array([[-23. , -6.7734375],\n [ 0. , 6.7734375]])'), [('-$|$$>$', array([ 23. , 13.546875]), -23.0, -3.8671875)]), (266.66666666666663, 106.66666666666666, '$<$$|$-', 'k', 'center', 'right', 7043629620243261673, None, None, 200, 113962736): (Bbox('array([[-62.29814453, -19. ],\n [ 0. , 19. ]])'), [('$<$$|$-', array([ 62.29814453, 38. ]), -62.298144531250003, -11.0)]), (0.5, 0.3333333333333333, 'larrow', 'k', 'baseline', 'center', -2862017849760843439, None, None, 80, 129764960): (Bbox('array([[-35.6875, -5. ],\n [ 35.6875, 19. ]])'), [('larrow', array([ 71.375, 24. ]), -35.6875, 0.0)]), (0.5, 0.7333333333333333, 'sawtooth', 'k', 'baseline', 'center', -2862017849760843439, None, None, 72, 81311056): (Bbox('array([[-48.171875, -4.578125],\n [ 48.171875, 16.71875 ]])'), [('sawtooth', array([ 96.34375 , 21.296875]), -48.171875, 0.0)]), (0.5, 0.06666666666666667, 'round', 'k', 'baseline', 'center', -2862017849760843439, None, None, 80, 129764960): (Bbox('array([[-32.6875, -5. ],\n [ 32.6875, 19. ]])'), [('round', array([ 65.375, 24. ]), -32.6875, 0.0)]), (799.9999999999999, 773.3333333333334, ']-', 'k', 'center', 'right', 7043629620243261673, None, None, 200, 113962736): (Bbox('array([[-23.5625, -19. ],\n [ 0. , 19. ]])'), [(']-', array([ 23.5625, 38. ]), -23.5625, -11.0)]), (266.66666666666663, 373.3333333333333, '$<$-', 'k', 'center', 'right', 7043629620243261673, None, None, 200, 113962736): (Bbox('array([[-51.531604, -19. ],\n [ 0. , 19. ]])'), [('$<$-', array([ 51.531604, 38. ]), -51.531604003906253, -11.0)]), (288.0, 182.39999999999998, 'fancy', 'k', 'center', 'right', 7043629620243261673, None, None, 72, 83571856): (Bbox('array([[-37.640625 , -6.7734375],\n [ 0. , 6.7734375]])'), [('fancy', array([ 37.640625, 13.546875]), -37.640625, -3.8671875)]), (799.9999999999999, 906.6666666666667, '$<$$|$-$|$$>$', 'k', 'center', 'right', 7043629620243261673, None, None, 200, 113962736): (Bbox('array([[-108.79563599, -19. ],\n [ 0. , 19. ]])'), [('$<$$|$-$|$$>$', array([ 108.79563599, 38. ]), -108.79563598632812, -11.0)]), (288.0, 134.39999999999998, 'simple', 'k', 'center', 'right', 7043629620243261673, None, None, 72, 83571856): (Bbox('array([[-44.71875 , -6.7734375],\n [ 0. , 6.7734375]])'), [('simple', array([ 44.71875 , 13.546875]), -44.71875, -3.8671875)]), (0.5, 0.2, 'round4', 'k', 'baseline', 'center', -2862017849760843439, None, None, 80, 129764960): (Bbox('array([[-40.6875, -5. ],\n [ 40.6875, 19. ]])'), [('round4', array([ 81.375, 24. ]), -40.6875, 0.0)]), (96.0, 326.4, '-', 'k', 'center', 'right', 7043629620243261673, None, None, 72, 83571856): (Bbox('array([[-3.6875 , -6.7734375],\n [ 0. , 6.7734375]])'), [('-', array([ 3.6875 , 13.546875]), -3.6875, -3.8671875)]), (799.9999999999999, 240.0, 'wedge', 'k', 'center', 'right', 7043629620243261673, None, None, 200, 113962736): (Bbox('array([[-125.234375, -19. ],\n [ 0. , 19. ]])'), [('wedge', array([ 125.234375, 38. ]), -125.234375, -11.0)]), (96.0, 86.39999999999999, '$<$-$>$', 'k', 'center', 'right', 7043629620243261673, None, None, 72, 83571856): (Bbox('array([[-32. , -6.7734375],\n [ 0. , 6.7734375]])'), [('$<$-$>$', array([ 32. , 13.546875]), -32.0, -3.8671875)]), (0.5, 0.06666666666666667, 'round', 'k', 'baseline', 'center', -2862017849760843439, None, None, 200, 129763736): (Bbox('array([[-81.6875, -13. ],\n [ 81.6875, 46. ]])'), [('round', array([ 163.375, 59. ]), -81.6875, 0.0)]), (96.0, 134.39999999999998, '$<$-', 'k', 'center', 'right', 7043629620243261673, None, None, 72, 83571856): (Bbox('array([[-19. , -6.7734375],\n [ 0. , 6.7734375]])'), [('$<$-', array([ 19. , 13.546875]), -19.0, -3.8671875)])}
      -
      - -
      -
      -contains(mouseevent)
      -

      Test whether the mouse event occurred in the patch.

      -

      In the case of text, a hit is true anywhere in the -axis-aligned bounding-box containing the text.

      -

      Returns True or False.

      -
      - -
      -
      -draw(artist, renderer, *args, **kwargs)
      -

      Draws the Text object to the given renderer.

      -
      - -
      -
      -get_bbox_patch()
      -

      Return the bbox Patch object. Returns None if the the -FancyBboxPatch is not made.

      -
      - -
      -
      -get_color()
      -

      Return the color of the text

      -
      - -
      -
      -get_family()
      -

      Return the list of font families used for font lookup

      -
      - -
      -
      -get_font_properties()
      -

      alias for get_fontproperties

      -
      - -
      -
      -get_fontfamily()
      -

      alias for get_family

      -
      - -
      -
      -get_fontname()
      -

      alias for get_name

      -
      - -
      -
      -get_fontproperties()
      -

      Return the FontProperties object

      -
      - -
      -
      -get_fontsize()
      -

      alias for get_size

      -
      - -
      -
      -get_fontstretch()
      -

      alias for get_stretch

      -
      - -
      -
      -get_fontstyle()
      -

      alias for get_style

      -
      - -
      -
      -get_fontvariant()
      -

      alias for get_variant

      -
      - -
      -
      -get_fontweight()
      -

      alias for get_weight

      -
      - -
      -
      -get_ha()
      -

      alias for get_horizontalalignment

      -
      - -
      -
      -get_horizontalalignment()
      -

      Return the horizontal alignment as string. Will be one of -‘left’, ‘center’ or ‘right’.

      -
      - -
      -
      -get_name()
      -

      Return the font name as string

      -
      - -
      -
      -get_path_effects()
      -
      - -
      -
      -get_position()
      -

      Return the position of the text as a tuple (x, y)

      -
      - -
      -
      -get_prop_tup()
      -

      Return a hashable tuple of properties.

      -

      Not intended to be human readable, but useful for backends who -want to cache derived information about text (eg layouts) and -need to know if the text has changed.

      -
      - -
      -
      -get_rotation()
      -

      return the text angle as float in degrees

      -
      - -
      -
      -get_rotation_mode()
      -

      get text rotation mode

      -
      - -
      -
      -get_size()
      -

      Return the font size as integer

      -
      - -
      -
      -get_stretch()
      -

      Get the font stretch as a string or number

      -
      - -
      -
      -get_style()
      -

      Return the font style as string

      -
      - -
      -
      -get_text()
      -

      Get the text as string

      -
      - -
      -
      -get_va()
      -

      alias for getverticalalignment()

      -
      - -
      -
      -get_variant()
      -

      Return the font variant as a string

      -
      - -
      -
      -get_verticalalignment()
      -

      Return the vertical alignment as string. Will be one of -‘top’, ‘center’, ‘bottom’ or ‘baseline’.

      -
      - -
      -
      -get_weight()
      -

      Get the font weight as string or number

      -
      - -
      -
      -get_window_extent(renderer=None, dpi=None)
      -

      Return a Bbox object bounding -the text, in display units.

      -

      In addition to being used internally, this is useful for -specifying clickable regions in a png file on a web page.

      -

      renderer defaults to the _renderer attribute of the text -object. This is not assigned until the first execution of -draw(), so you must use this kwarg if you want -to call get_window_extent() prior to the first -draw(). For getting web page regions, it is -simpler to call the method after saving the figure.

      -

      dpi defaults to self.figure.dpi; the renderer dpi is -irrelevant. For the web application, if figure.dpi is not -the value used when saving the figure, then the value that -was used must be specified as the dpi argument.

      -
      - -
      -
      -static is_math_text(s)
      -

      Returns a cleaned string and a boolean flag. -The flag indicates if the given string s contains any mathtext, -determined by counting unescaped dollar signs. If no mathtext -is present, the cleaned string has its dollar signs unescaped. -If usetex is on, the flag always has the value “TeX”.

      -
      - -
      -
      -set_backgroundcolor(color)
      -

      Set the background color of the text by updating the bbox.

      -
      -

      See also

      -
      -
      set_bbox()
      -
      To change the position of the bounding box.
      -
      -
      -

      ACCEPTS: any matplotlib color

      -
      - -
      -
      -set_bbox(rectprops)
      -

      Draw a bounding box around self. rectprops are any settable -properties for a rectangle, eg facecolor=’red’, alpha=0.5.

      -
      -
      t.set_bbox(dict(facecolor=’red’, alpha=0.5))
      -

      If rectprops has “boxstyle” key. A FancyBboxPatch -is initialized with rectprops and will be drawn. The mutation -scale of the FancyBboxPath is set to the fontsize.

      -

      ACCEPTS: rectangle prop dict

      -
      - -
      -
      -set_color(color)
      -

      Set the foreground color of the text

      -

      ACCEPTS: any matplotlib color

      -
      - -
      -
      -set_family(fontname)
      -

      Set the font family. May be either a single string, or a list -of strings in decreasing priority. Each string may be either -a real font name or a generic font class name. If the latter, -the specific font names will be looked up in the -matplotlibrc file.

      -
      -
      ACCEPTS: [FONTNAME | ‘serif’ | ‘sans-serif’ | ‘cursive’ | ‘fantasy’ |
      -
      ‘monospace’ ]
      -
      -
      - -
      -
      -set_font_properties(fp)
      -

      alias for set_fontproperties

      -
      - -
      -
      -set_fontname(fontname)
      -

      alias for set_family

      -
      - -
      -
      -set_fontproperties(fp)
      -

      Set the font properties that control the text. fp must be a -matplotlib.font_manager.FontProperties object.

      -

      ACCEPTS: a matplotlib.font_manager.FontProperties instance

      -
      - -
      -
      -set_fontsize(fontsize)
      -

      alias for set_size

      -
      - -
      -
      -set_fontstretch(stretch)
      -

      alias for set_stretch

      -
      - -
      -
      -set_fontstyle(fontstyle)
      -

      alias for set_style

      -
      - -
      -
      -set_fontvariant(variant)
      -

      alias for set_variant

      -
      - -
      -
      -set_fontweight(weight)
      -

      alias for set_weight

      -
      - -
      -
      -set_ha(align)
      -

      alias for set_horizontalalignment

      -
      - -
      -
      -set_horizontalalignment(align)
      -

      Set the horizontal alignment to one of

      -

      ACCEPTS: [ ‘center’ | ‘right’ | ‘left’ ]

      -
      - -
      -
      -set_linespacing(spacing)
      -

      Set the line spacing as a multiple of the font size. -Default is 1.2.

      -

      ACCEPTS: float (multiple of font size)

      -
      - -
      -
      -set_ma(align)
      -

      alias for set_verticalalignment

      -
      - -
      -
      -set_multialignment(align)
      -

      Set the alignment for multiple lines layout. The layout of the -bounding box of all the lines is determined bu the horizontalalignment -and verticalalignment properties, but the multiline text within that -box can be

      -

      ACCEPTS: [‘left’ | ‘right’ | ‘center’ ]

      -
      - -
      -
      -set_name(fontname)
      -

      alias for set_family

      -
      - -
      -
      -set_path_effects(path_effects)
      -
      - -
      -
      -set_position(xy)
      -

      Set the (x, y) position of the text

      -

      ACCEPTS: (x,y)

      -
      - -
      -
      -set_rotation(s)
      -

      Set the rotation of the text

      -

      ACCEPTS: [ angle in degrees | ‘vertical’ | ‘horizontal’ ]

      -
      - -
      -
      -set_rotation_mode(m)
      -

      set text rotation mode. If “anchor”, the un-rotated text -will first aligned according to their ha and -va, and then will be rotated with the alignement -reference point as a origin. If None (default), the text will be -rotated first then will be aligned.

      -
      - -
      -
      -set_size(fontsize)
      -

      Set the font size. May be either a size string, relative to -the default font size, or an absolute font size in points.

      -
      -
      ACCEPTS: [size in points | ‘xx-small’ | ‘x-small’ | ‘small’ |
      -
      ‘medium’ | ‘large’ | ‘x-large’ | ‘xx-large’ ]
      -
      -
      - -
      -
      -set_stretch(stretch)
      -

      Set the font stretch (horizontal condensation or expansion).

      -
      -
      ACCEPTS: [a numeric value in range 0-1000 | ‘ultra-condensed’ |
      -
      ‘extra-condensed’ | ‘condensed’ | ‘semi-condensed’ | -‘normal’ | ‘semi-expanded’ | ‘expanded’ | ‘extra-expanded’ | -‘ultra-expanded’ ]
      -
      -
      - -
      -
      -set_style(fontstyle)
      -

      Set the font style.

      -

      ACCEPTS: [ ‘normal’ | ‘italic’ | ‘oblique’]

      -
      - -
      -
      -set_text(s)
      -

      Set the text string s

      -

      It may contain newlines (\n) or math in LaTeX syntax.

      -

      ACCEPTS: string or anything printable with ‘%s’ conversion.

      -
      - -
      -
      -set_va(align)
      -

      alias for set_verticalalignment

      -
      - -
      -
      -set_variant(variant)
      -

      Set the font variant, either ‘normal’ or ‘small-caps’.

      -

      ACCEPTS: [ ‘normal’ | ‘small-caps’ ]

      -
      - -
      -
      -set_verticalalignment(align)
      -

      Set the vertical alignment

      -

      ACCEPTS: [ ‘center’ | ‘top’ | ‘bottom’ | ‘baseline’ ]

      -
      - -
      -
      -set_weight(weight)
      -

      Set the font weight.

      -
      -
      ACCEPTS: [a numeric value in range 0-1000 | ‘ultralight’ | ‘light’ |
      -
      ‘normal’ | ‘regular’ | ‘book’ | ‘medium’ | ‘roman’ | -‘semibold’ | ‘demibold’ | ‘demi’ | ‘bold’ | ‘heavy’ | -‘extra bold’ | ‘black’ ]
      -
      -
      - -
      -
      -set_x(x)
      -

      Set the x position of the text

      -

      ACCEPTS: float

      -
      - -
      -
      -set_y(y)
      -

      Set the y position of the text

      -

      ACCEPTS: float

      -
      - -
      -
      -update_bbox_position_size(renderer)
      -

      Update the location and the size of the bbox. This method -should be used when the position and size of the bbox needs to -be updated before actually drawing the bbox.

      -
      - -
      -
      -update_from(other)
      -

      Copy properties from other to self

      -
      - -
      -
      -zorder = 3
      -
      - -
      - -
      -
      -class matplotlib.text.TextWithDash(x=0, y=0, text='', color=None, verticalalignment='center', horizontalalignment='center', multialignment=None, fontproperties=None, rotation=None, linespacing=None, dashlength=0.0, dashdirection=0, dashrotation=None, dashpad=3, dashpush=0)
      -

      Bases: matplotlib.text.Text

      -

      This is basically a Text with a dash -(drawn with a Line2D) before/after -it. It is intended to be a drop-in replacement for -Text, and should behave identically to -it when dashlength = 0.0.

      -

      The dash always comes between the point specified by -set_position() and the text. When a -dash exists, the text alignment arguments (horizontalalignment, -verticalalignment) are ignored.

      -

      dashlength is the length of the dash in canvas units. -(default = 0.0).

      -

      dashdirection is one of 0 or 1, where 0 draws the dash after the -text and 1 before. (default = 0).

      -

      dashrotation specifies the rotation of the dash, and should -generally stay None. In this case -get_dashrotation() returns -get_rotation(). (I.e., the dash takes -its rotation from the text’s rotation). Because the text center is -projected onto the dash, major deviations in the rotation cause -what may be considered visually unappealing results. -(default = None)

      -

      dashpad is a padding length to add (or subtract) space -between the text and the dash, in canvas units. -(default = 3)

      -

      dashpush “pushes” the dash and text away from the point -specified by set_position() by the -amount in canvas units. (default = 0)

      -
      -

      Note

      -

      The alignment of the two objects is based on the bounding box -of the Text, as obtained by -get_window_extent(). This, in -turn, appears to depend on the font metrics as given by the -rendering backend. Hence the quality of the “centering” of the -label text with respect to the dash varies depending on the -backend used.

      -
      -
      -

      Note

      -

      I’m not sure that I got the -get_window_extent() right, -or whether that’s sufficient for providing the object bounding -box.

      -
      -
      -
      -draw(renderer)
      -

      Draw the TextWithDash object to the given renderer.

      -
      - -
      -
      -get_dashdirection()
      -

      Get the direction dash. 1 is before the text and 0 is after.

      -
      - -
      -
      -get_dashlength()
      -

      Get the length of the dash.

      -
      - -
      -
      -get_dashpad()
      -

      Get the extra spacing between the dash and the text, in canvas units.

      -
      - -
      -
      -get_dashpush()
      -

      Get the extra spacing between the dash and the specified text -position, in canvas units.

      -
      - -
      -
      -get_dashrotation()
      -

      Get the rotation of the dash in degrees.

      -
      - -
      -
      -get_figure()
      -

      return the figure instance the artist belongs to

      -
      - -
      -
      -get_position()
      -

      Return the position of the text as a tuple (x, y)

      -
      - -
      -
      -get_prop_tup()
      -

      Return a hashable tuple of properties.

      -

      Not intended to be human readable, but useful for backends who -want to cache derived information about text (eg layouts) and -need to know if the text has changed.

      -
      - -
      -
      -get_window_extent(renderer=None)
      -

      Return a Bbox object bounding -the text, in display units.

      -

      In addition to being used internally, this is useful for -specifying clickable regions in a png file on a web page.

      -

      renderer defaults to the _renderer attribute of the text -object. This is not assigned until the first execution of -draw(), so you must use this kwarg if you want -to call get_window_extent() prior to the first -draw(). For getting web page regions, it is -simpler to call the method after saving the figure.

      -
      - -
      -
      -set_dashdirection(dd)
      -

      Set the direction of the dash following the text. -1 is before the text and 0 is after. The default -is 0, which is what you’d want for the typical -case of ticks below and on the left of the figure.

      -

      ACCEPTS: int (1 is before, 0 is after)

      -
      - -
      -
      -set_dashlength(dl)
      -

      Set the length of the dash.

      -

      ACCEPTS: float (canvas units)

      -
      - -
      -
      -set_dashpad(dp)
      -

      Set the “pad” of the TextWithDash, which is the extra spacing -between the dash and the text, in canvas units.

      -

      ACCEPTS: float (canvas units)

      -
      - -
      -
      -set_dashpush(dp)
      -

      Set the “push” of the TextWithDash, which -is the extra spacing between the beginning -of the dash and the specified position.

      -

      ACCEPTS: float (canvas units)

      -
      - -
      -
      -set_dashrotation(dr)
      -

      Set the rotation of the dash, in degrees

      -

      ACCEPTS: float (degrees)

      -
      - -
      -
      -set_figure(fig)
      -

      Set the figure instance the artist belong to.

      -

      ACCEPTS: a matplotlib.figure.Figure instance

      -
      - -
      -
      -set_position(xy)
      -

      Set the (x, y) position of the TextWithDash.

      -

      ACCEPTS: (x, y)

      -
      - -
      -
      -set_transform(t)
      -

      Set the matplotlib.transforms.Transform instance used -by this artist.

      -

      ACCEPTS: a matplotlib.transforms.Transform instance

      -
      - -
      -
      -set_x(x)
      -

      Set the x position of the TextWithDash.

      -

      ACCEPTS: float

      -
      - -
      -
      -set_y(y)
      -

      Set the y position of the TextWithDash.

      -

      ACCEPTS: float

      -
      - -
      -
      -update_coords(renderer)
      -

      Computes the actual x, y coordinates for text based on the -input x, y and the dashlength. Since the rotation is -with respect to the actual canvas’s coordinates we need to map -back and forth.

      -
      - -
      - -
      -
      -matplotlib.text.get_rotation(rotation)
      -

      Return the text angle as float.

      -

      rotation may be ‘horizontal’, ‘vertical’, or a numeric value in degrees.

      -
      - -
      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/api/axes_api.html b/dev/api/axes_api.html deleted file mode 100644 index 301e70c90ad..00000000000 --- a/dev/api/axes_api.html +++ /dev/null @@ -1,10481 +0,0 @@ - - - - - - - - axes — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      Table Of Contents

      - - -

      Previous topic

      -

      artists

      -

      Next topic

      -

      axis

      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      axes

      -
      -

      matplotlib.axes

      -
      -
      -class matplotlib.axes.Axes(fig, rect, axisbg=None, frameon=True, sharex=None, sharey=None, label='', xscale=None, yscale=None, **kwargs)
      -

      Bases: matplotlib.artist.Artist

      -

      The Axes contains most of the figure elements: -Axis, Tick, -Line2D, Text, -Polygon, etc., and sets the -coordinate system.

      -

      The Axes instance supports callbacks through a callbacks -attribute which is a CallbackRegistry -instance. The events you can connect to are ‘xlim_changed’ and -‘ylim_changed’ and the callback will be called with func(ax) -where ax is the Axes instance.

      -
      -
      -acorr(x, **kwargs)
      -

      Plot the autocorrelation of x.

      -

      Call signature:

      -
      acorr(x, normed=True, detrend=mlab.detrend_none, usevlines=True,
      -      maxlags=10, **kwargs)
      -
      -
      -

      If normed = True, normalize the data by the autocorrelation at -0-th lag. x is detrended by the detrend callable (default no -normalization).

      -

      Data are plotted as plot(lags, c, **kwargs)

      -

      Return value is a tuple (lags, c, line) where:

      -
      -
        -
      • lags are a length 2*maxlags+1 lag vector
      • -
      • c is the 2*maxlags+1 auto correlation vector
      • -
      • line is a Line2D instance -returned by plot()
      • -
      -
      -

      The default linestyle is None and the default marker is -'o', though these can be overridden with keyword args. -The cross correlation is performed with -numpy.correlate() with mode = 2.

      -

      If usevlines is True, vlines() -rather than plot() is used to draw -vertical lines from the origin to the acorr. Otherwise, the -plot style is determined by the kwargs, which are -Line2D properties.

      -

      maxlags is a positive integer detailing the number of lags -to show. The default value of None will return all -(2*len(x)-1) lags.

      -

      The return value is a tuple (lags, c, linecol, b) -where

      -
      -
      -
      -
      -

      See also

      -

      plot() or -vlines() -For documentation on valid kwargs.

      -
      -

      Example:

      -

      xcorr() is top graph, and -acorr() is bottom graph.

      -

      (Source code, png, hires.png, pdf)

      -
      -../_images/xcorr_demo.png -
      -
      - -
      -
      -add_artist(a)
      -

      Add any Artist to the axes.

      -

      Returns the artist.

      -
      - -
      -
      -add_collection(collection, autolim=True)
      -

      Add a Collection instance -to the axes.

      -

      Returns the collection.

      -
      - -
      -
      -add_container(container)
      -

      Add a Container instance -to the axes.

      -

      Returns the collection.

      -
      - -
      -
      -add_line(line)
      -

      Add a Line2D to the list of plot -lines

      -

      Returns the line.

      -
      - -
      -
      -add_patch(p)
      -

      Add a Patch p to the list of -axes patches; the clipbox will be set to the Axes clipping -box. If the transform is not set, it will be set to -transData.

      -

      Returns the patch.

      -
      - -
      -
      -add_table(tab)
      -

      Add a Table instance to the -list of axes tables

      -

      Returns the table.

      -
      - -
      -
      -annotate(*args, **kwargs)
      -

      Create an annotation: a piece of text referring to a data -point.

      -

      Call signature:

      -
      annotate(s, xy, xytext=None, xycoords='data',
      -         textcoords='data', arrowprops=None, **kwargs)
      -
      -
      -

      Keyword arguments:

      -

      Annotate the x, y point xy with text s at x, y -location xytext. (If xytext = None, defaults to xy, -and if textcoords = None, defaults to xycoords).

      -

      arrowprops, if not None, is a dictionary of line properties -(see matplotlib.lines.Line2D) for the arrow that connects -annotation to the point.

      -

      If the dictionary has a key arrowstyle, a FancyArrowPatch -instance is created with the given dictionary and is -drawn. Otherwise, a YAArow patch instance is created and -drawn. Valid keys for YAArow are

      - ---- - - - - - - - - - - - - - - - - - - - - - - -
      KeyDescription
      widththe width of the arrow in points
      fracthe fraction of the arrow length occupied by the head
      headwidththe width of the base of the arrow head in points
      shrinkoftentimes it is convenient to have the arrowtip -and base a bit away from the text and point being -annotated. If d is the distance between the text and -annotated point, shrink will shorten the arrow so the tip -and base are shink percent of the distance d away from -the endpoints. ie, shrink=0.05 is 5%
      ?any key for matplotlib.patches.polygon
      -

      Valid keys for FancyArrowPatch are

      - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      KeyDescription
      arrowstylethe arrow style
      connectionstylethe connection style
      relposdefault is (0.5, 0.5)
      patchAdefault is bounding box of the text
      patchBdefault is None
      shrinkAdefault is 2 points
      shrinkBdefault is 2 points
      mutation_scaledefault is text size (in points)
      mutation_aspectdefault is 1.
      ?any key for matplotlib.patches.PathPatch
      -

      xycoords and textcoords are strings that indicate the -coordinates of xy and xytext.

      - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      PropertyDescription
      ‘figure points’points from the lower left corner of the figure
      ‘figure pixels’pixels from the lower left corner of the figure
      ‘figure fraction’0,0 is lower left of figure and 1,1 is upper right
      ‘axes points’points from lower left corner of axes
      ‘axes pixels’pixels from lower left corner of axes
      ‘axes fraction’0,0 is lower left of axes and 1,1 is upper right
      ‘data’use the coordinate system of the object being -annotated (default)
      ‘offset points’Specify an offset (in points) from the xy value
      ‘polar’you can specify theta, r for the annotation, -even in cartesian plots. Note that if you -are using a polar axes, you do not need -to specify polar for the coordinate -system since that is the native “data” coordinate -system.
      -

      If a ‘points’ or ‘pixels’ option is specified, values will be -added to the bottom-left and if negative, values will be -subtracted from the top-right. e.g.:

      -
      # 10 points to the right of the left border of the axes and
      -# 5 points below the top border
      -xy=(10,-5), xycoords='axes points'
      -
      -
      -

      You may use an instance of -Transform or -Artist. See -Annotating Axes for more details.

      -

      The annotation_clip attribute contols the visibility of the -annotation when it goes outside the axes area. If True, the -annotation will only be drawn when the xy is inside the -axes. If False, the annotation will always be drawn regardless -of its position. The default is None, which behave as True -only if xycoords is”data”.

      -

      Additional kwargs are Text properties:

      -
      -
      ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      PropertyDescription
      agg_filterunknown
      alphafloat (0.0 transparent through 1.0 opaque)
      animated[True | False]
      axesan Axes instance
      backgroundcolorany matplotlib color
      bboxrectangle prop dict
      clip_boxa matplotlib.transforms.Bbox instance
      clip_on[True | False]
      clip_path[ (Path, Transform) | Patch | None ]
      colorany matplotlib color
      containsa callable function
      family or fontfamily or fontname or name[FONTNAME | ‘serif’ | ‘sans-serif’ | ‘cursive’ | ‘fantasy’ | ‘monospace’ ]
      figurea matplotlib.figure.Figure instance
      fontproperties or font_propertiesa matplotlib.font_manager.FontProperties instance
      gidan id string
      horizontalalignment or ha[ ‘center’ | ‘right’ | ‘left’ ]
      labelstring or anything printable with ‘%s’ conversion.
      linespacingfloat (multiple of font size)
      lod[True | False]
      multialignment[‘left’ | ‘right’ | ‘center’ ]
      path_effectsunknown
      picker[None|float|boolean|callable]
      position(x,y)
      rasterized[True | False | None]
      rotation[ angle in degrees | ‘vertical’ | ‘horizontal’ ]
      rotation_modeunknown
      size or fontsize[size in points | ‘xx-small’ | ‘x-small’ | ‘small’ | ‘medium’ | ‘large’ | ‘x-large’ | ‘xx-large’ ]
      snapunknown
      stretch or fontstretch[a numeric value in range 0-1000 | ‘ultra-condensed’ | ‘extra-condensed’ | ‘condensed’ | ‘semi-condensed’ | ‘normal’ | ‘semi-expanded’ | ‘expanded’ | ‘extra-expanded’ | ‘ultra-expanded’ ]
      style or fontstyle[ ‘normal’ | ‘italic’ | ‘oblique’]
      textstring or anything printable with ‘%s’ conversion.
      transformTransform instance
      urla url string
      variant or fontvariant[ ‘normal’ | ‘small-caps’ ]
      verticalalignment or va or ma[ ‘center’ | ‘top’ | ‘bottom’ | ‘baseline’ ]
      visible[True | False]
      weight or fontweight[a numeric value in range 0-1000 | ‘ultralight’ | ‘light’ | ‘normal’ | ‘regular’ | ‘book’ | ‘medium’ | ‘roman’ | ‘semibold’ | ‘demibold’ | ‘demi’ | ‘bold’ | ‘heavy’ | ‘extra bold’ | ‘black’ ]
      xfloat
      yfloat
      zorderany number
      -
      -

      (Source code)

      -
      -../_images/annotation_demo2_00.png -

      (png, hires.png, pdf)

      -
      -
      -../_images/annotation_demo2_01.png -

      (png, hires.png, pdf)

      -
      -
      - -
      -
      -apply_aspect(position=None)
      -

      Use _aspect() and _adjustable() to modify the -axes box or the view limits.

      -
      - -
      -
      -arrow(x, y, dx, dy, **kwargs)
      -

      Add an arrow to the axes.

      -

      Call signature:

      -
      arrow(x, y, dx, dy, **kwargs)
      -
      -
      -

      Draws arrow on specified axis from (x, y) to (x + dx, -y + dy). Uses FancyArrow patch to construct the arrow.

      -

      The resulting arrow is affected by the axes aspect ratio and limits. -This may produce an arrow whose head is not square with its stem. To -create an arrow whose head is square with its stem, use -annotate().

      -

      Optional kwargs control the arrow construction and properties:

      -
      -
      Constructor arguments
      -
      -
      width: float (default: 0.001)
      -
      width of full arrow tail
      -
      length_includes_head: [True | False] (default: False)
      -
      True if head is to be counted in calculating the length.
      -
      head_width: float or None (default: 3*width)
      -
      total width of the full arrow head
      -
      head_length: float or None (default: 1.5 * head_width)
      -
      length of arrow head
      -
      shape: [‘full’, ‘left’, ‘right’] (default: ‘full’)
      -
      draw the left-half, right-half, or full arrow
      -
      overhang: float (default: 0)
      -
      fraction that the arrow is swept back (0 overhang means -triangular shape). Can be negative or greater than one.
      -
      head_starts_at_zero: [True | False] (default: False)
      -
      if True, the head starts being drawn at coordinate 0 -instead of ending at coordinate 0.
      -
      -
      -
      -

      Other valid kwargs (inherited from Patch) are:

      -
      -
      ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      PropertyDescription
      agg_filterunknown
      alphafloat or None
      animated[True | False]
      antialiased or aa[True | False] or None for default
      axesan Axes instance
      clip_boxa matplotlib.transforms.Bbox instance
      clip_on[True | False]
      clip_path[ (Path, Transform) | Patch | None ]
      colormatplotlib color spec
      containsa callable function
      edgecolor or ecmpl color spec, or None for default, or ‘none’ for no color
      facecolor or fcmpl color spec, or None for default, or ‘none’ for no color
      figurea matplotlib.figure.Figure instance
      fill[True | False]
      gidan id string
      hatch[‘/’ | ‘\’ | ‘|’ | ‘-‘ | ‘+’ | ‘x’ | ‘o’ | ‘O’ | ‘.’ | ‘*’]
      labelstring or anything printable with ‘%s’ conversion.
      linestyle or ls[‘solid’ | ‘dashed’ | ‘dashdot’ | ‘dotted’]
      linewidth or lwfloat or None for default
      lod[True | False]
      path_effectsunknown
      picker[None|float|boolean|callable]
      rasterized[True | False | None]
      snapunknown
      transformTransform instance
      urla url string
      visible[True | False]
      zorderany number
      -
      -

      Example:

      -

      (Source code, png, hires.png, pdf)

      -
      -../_images/arrow_demo.png -
      -
      - -
      -
      -autoscale(enable=True, axis='both', tight=None)
      -

      Autoscale the axis view to the data (toggle).

      -

      Convenience method for simple axis view autoscaling. -It turns autoscaling on or off, and then, -if autoscaling for either axis is on, it performs -the autoscaling on the specified axis or axes.

      -
      -
      enable: [True | False | None]
      -
      True (default) turns autoscaling on, False turns it off. -None leaves the autoscaling state unchanged.
      -
      axis: [‘x’ | ‘y’ | ‘both’]
      -
      which axis to operate on; default is ‘both’
      -
      tight: [True | False | None]
      -
      If True, set view limits to data limits; -if False, let the locator and margins expand the view limits; -if None, use tight scaling if the only artist is an image, -otherwise treat tight as False. -The tight setting is retained for future autoscaling -until it is explicitly changed.
      -
      -

      Returns None.

      -
      - -
      -
      -autoscale_view(tight=None, scalex=True, scaley=True)
      -

      Autoscale the view limits using the data limits. You can -selectively autoscale only a single axis, eg, the xaxis by -setting scaley to False. The autoscaling preserves any -axis direction reversal that has already been done.

      -

      The data limits are not updated automatically when artist data are -changed after the artist has been added to an Axes instance. In that -case, use matplotlib.axes.Axes.relim() prior to calling -autoscale_view.

      -
      - -
      -
      -axhline(y=0, xmin=0, xmax=1, **kwargs)
      -

      Add a horizontal line across the axis.

      -

      Call signature:

      -
      axhline(y=0, xmin=0, xmax=1, **kwargs)
      -
      -
      -

      Draw a horizontal line at y from xmin to xmax. With the -default values of xmin = 0 and xmax = 1, this line will -always span the horizontal extent of the axes, regardless of -the xlim settings, even if you change them, e.g., with the -set_xlim() command. That is, the horizontal extent is -in axes coords: 0=left, 0.5=middle, 1.0=right but the y -location is in data coordinates.

      -

      Return value is the Line2D -instance. kwargs are the same as kwargs to plot, and can be -used to control the line properties. e.g.,

      -
        -
      • draw a thick red hline at y = 0 that spans the xrange:

        -
        >>> axhline(linewidth=4, color='r')
        -
        -
        -
      • -
      • draw a default hline at y = 1 that spans the xrange:

        -
        >>> axhline(y=1)
        -
        -
        -
      • -
      • draw a default hline at y = .5 that spans the the middle half of -the xrange:

        -
        >>> axhline(y=.5, xmin=0.25, xmax=0.75)
        -
        -
        -
      • -
      -

      Valid kwargs are Line2D properties, -with the exception of ‘transform’:

      -
      -
      ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      PropertyDescription
      agg_filterunknown
      alphafloat (0.0 transparent through 1.0 opaque)
      animated[True | False]
      antialiased or aa[True | False]
      axesan Axes instance
      clip_boxa matplotlib.transforms.Bbox instance
      clip_on[True | False]
      clip_path[ (Path, Transform) | Patch | None ]
      color or cany matplotlib color
      containsa callable function
      dash_capstyle[‘butt’ | ‘round’ | ‘projecting’]
      dash_joinstyle[‘miter’ | ‘round’ | ‘bevel’]
      dashessequence of on/off ink in points
      data2D array (rows are x, y) or two 1D arrays
      drawstyle[‘default’ | ‘steps’ | ‘steps-pre’ | ‘steps-mid’ | ‘steps-post’]
      figurea matplotlib.figure.Figure instance
      fillstyle[‘full’ | ‘left’ | ‘right’ | ‘bottom’ | ‘top’ | ‘none’]
      gidan id string
      labelstring or anything printable with ‘%s’ conversion.
      linestyle or ls['-' | '--' | '-.' | ':' | 'None' | ' ' | ''] and any drawstyle in combination with a linestyle, e.g., 'steps--'.
      linewidth or lwfloat value in points
      lod[True | False]
      markerunknown
      markeredgecolor or mecany matplotlib color
      markeredgewidth or mewfloat value in points
      markerfacecolor or mfcany matplotlib color
      markerfacecoloralt or mfcaltany matplotlib color
      markersize or msfloat
      markeveryNone | integer | (startind, stride)
      pickerfloat distance in points or callable pick function fn(artist, event)
      pickradiusfloat distance in points
      rasterized[True | False | None]
      snapunknown
      solid_capstyle[‘butt’ | ‘round’ | ‘projecting’]
      solid_joinstyle[‘miter’ | ‘round’ | ‘bevel’]
      transforma matplotlib.transforms.Transform instance
      urla url string
      visible[True | False]
      xdata1D array
      ydata1D array
      zorderany number
      -
      -
      -

      See also

      -
      -
      axhspan()
      -
      for example plot and source code
      -
      -
      -
      - -
      -
      -axhspan(ymin, ymax, xmin=0, xmax=1, **kwargs)
      -

      Add a horizontal span (rectangle) across the axis.

      -

      Call signature:

      -
      axhspan(ymin, ymax, xmin=0, xmax=1, **kwargs)
      -
      -
      -

      y coords are in data units and x coords are in axes (relative -0-1) units.

      -

      Draw a horizontal span (rectangle) from ymin to ymax. -With the default values of xmin = 0 and xmax = 1, this -always spans the xrange, regardless of the xlim settings, even -if you change them, e.g., with the set_xlim() command. -That is, the horizontal extent is in axes coords: 0=left, -0.5=middle, 1.0=right but the y location is in data -coordinates.

      -

      Return value is a matplotlib.patches.Polygon -instance.

      -

      Examples:

      -
        -
      • draw a gray rectangle from y = 0.25-0.75 that spans the -horizontal extent of the axes:

        -
        >>> axhspan(0.25, 0.75, facecolor='0.5', alpha=0.5)
        -
        -
        -
      • -
      -

      Valid kwargs are Polygon properties:

      -
      -
      ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      PropertyDescription
      agg_filterunknown
      alphafloat or None
      animated[True | False]
      antialiased or aa[True | False] or None for default
      axesan Axes instance
      clip_boxa matplotlib.transforms.Bbox instance
      clip_on[True | False]
      clip_path[ (Path, Transform) | Patch | None ]
      colormatplotlib color spec
      containsa callable function
      edgecolor or ecmpl color spec, or None for default, or ‘none’ for no color
      facecolor or fcmpl color spec, or None for default, or ‘none’ for no color
      figurea matplotlib.figure.Figure instance
      fill[True | False]
      gidan id string
      hatch[‘/’ | ‘\’ | ‘|’ | ‘-‘ | ‘+’ | ‘x’ | ‘o’ | ‘O’ | ‘.’ | ‘*’]
      labelstring or anything printable with ‘%s’ conversion.
      linestyle or ls[‘solid’ | ‘dashed’ | ‘dashdot’ | ‘dotted’]
      linewidth or lwfloat or None for default
      lod[True | False]
      path_effectsunknown
      picker[None|float|boolean|callable]
      rasterized[True | False | None]
      snapunknown
      transformTransform instance
      urla url string
      visible[True | False]
      zorderany number
      -
      -

      Example:

      -

      (Source code, png, hires.png, pdf)

      -
      -../_images/axhspan_demo.png -
      -
      - -
      -
      -axis(*v, **kwargs)
      -

      Convenience method for manipulating the x and y view limits -and the aspect ratio of the plot. For details, see -axis().

      -

      kwargs are passed on to set_xlim() and -set_ylim()

      -
      - -
      -
      -axvline(x=0, ymin=0, ymax=1, **kwargs)
      -

      Add a vertical line across the axes.

      -

      Call signature:

      -
      axvline(x=0, ymin=0, ymax=1, **kwargs)
      -
      -
      -

      Draw a vertical line at x from ymin to ymax. With the -default values of ymin = 0 and ymax = 1, this line will -always span the vertical extent of the axes, regardless of the -ylim settings, even if you change them, e.g., with the -set_ylim() command. That is, the vertical extent is in -axes coords: 0=bottom, 0.5=middle, 1.0=top but the x location -is in data coordinates.

      -

      Return value is the Line2D -instance. kwargs are the same as kwargs to plot, and can be -used to control the line properties. e.g.,

      -
        -
      • draw a thick red vline at x = 0 that spans the yrange:

        -
        >>> axvline(linewidth=4, color='r')
        -
        -
        -
      • -
      • draw a default vline at x = 1 that spans the yrange:

        -
        >>> axvline(x=1)
        -
        -
        -
      • -
      • draw a default vline at x = .5 that spans the the middle half of -the yrange:

        -
        >>> axvline(x=.5, ymin=0.25, ymax=0.75)
        -
        -
        -
      • -
      -

      Valid kwargs are Line2D properties, -with the exception of ‘transform’:

      -
      -
      ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      PropertyDescription
      agg_filterunknown
      alphafloat (0.0 transparent through 1.0 opaque)
      animated[True | False]
      antialiased or aa[True | False]
      axesan Axes instance
      clip_boxa matplotlib.transforms.Bbox instance
      clip_on[True | False]
      clip_path[ (Path, Transform) | Patch | None ]
      color or cany matplotlib color
      containsa callable function
      dash_capstyle[‘butt’ | ‘round’ | ‘projecting’]
      dash_joinstyle[‘miter’ | ‘round’ | ‘bevel’]
      dashessequence of on/off ink in points
      data2D array (rows are x, y) or two 1D arrays
      drawstyle[‘default’ | ‘steps’ | ‘steps-pre’ | ‘steps-mid’ | ‘steps-post’]
      figurea matplotlib.figure.Figure instance
      fillstyle[‘full’ | ‘left’ | ‘right’ | ‘bottom’ | ‘top’ | ‘none’]
      gidan id string
      labelstring or anything printable with ‘%s’ conversion.
      linestyle or ls['-' | '--' | '-.' | ':' | 'None' | ' ' | ''] and any drawstyle in combination with a linestyle, e.g., 'steps--'.
      linewidth or lwfloat value in points
      lod[True | False]
      markerunknown
      markeredgecolor or mecany matplotlib color
      markeredgewidth or mewfloat value in points
      markerfacecolor or mfcany matplotlib color
      markerfacecoloralt or mfcaltany matplotlib color
      markersize or msfloat
      markeveryNone | integer | (startind, stride)
      pickerfloat distance in points or callable pick function fn(artist, event)
      pickradiusfloat distance in points
      rasterized[True | False | None]
      snapunknown
      solid_capstyle[‘butt’ | ‘round’ | ‘projecting’]
      solid_joinstyle[‘miter’ | ‘round’ | ‘bevel’]
      transforma matplotlib.transforms.Transform instance
      urla url string
      visible[True | False]
      xdata1D array
      ydata1D array
      zorderany number
      -
      -
      -

      See also

      -
      -
      axhspan()
      -
      for example plot and source code
      -
      -
      -
      - -
      -
      -axvspan(xmin, xmax, ymin=0, ymax=1, **kwargs)
      -

      Add a vertical span (rectangle) across the axes.

      -

      Call signature:

      -
      axvspan(xmin, xmax, ymin=0, ymax=1, **kwargs)
      -
      -
      -

      x coords are in data units and y coords are in axes (relative -0-1) units.

      -

      Draw a vertical span (rectangle) from xmin to xmax. With -the default values of ymin = 0 and ymax = 1, this always -spans the yrange, regardless of the ylim settings, even if you -change them, e.g., with the set_ylim() command. That is, -the vertical extent is in axes coords: 0=bottom, 0.5=middle, -1.0=top but the y location is in data coordinates.

      -

      Return value is the matplotlib.patches.Polygon -instance.

      -

      Examples:

      -
        -
      • draw a vertical green translucent rectangle from x=1.25 to 1.55 that -spans the yrange of the axes:

        -
        >>> axvspan(1.25, 1.55, facecolor='g', alpha=0.5)
        -
        -
        -
      • -
      -

      Valid kwargs are Polygon -properties:

      -
      -
      ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      PropertyDescription
      agg_filterunknown
      alphafloat or None
      animated[True | False]
      antialiased or aa[True | False] or None for default
      axesan Axes instance
      clip_boxa matplotlib.transforms.Bbox instance
      clip_on[True | False]
      clip_path[ (Path, Transform) | Patch | None ]
      colormatplotlib color spec
      containsa callable function
      edgecolor or ecmpl color spec, or None for default, or ‘none’ for no color
      facecolor or fcmpl color spec, or None for default, or ‘none’ for no color
      figurea matplotlib.figure.Figure instance
      fill[True | False]
      gidan id string
      hatch[‘/’ | ‘\’ | ‘|’ | ‘-‘ | ‘+’ | ‘x’ | ‘o’ | ‘O’ | ‘.’ | ‘*’]
      labelstring or anything printable with ‘%s’ conversion.
      linestyle or ls[‘solid’ | ‘dashed’ | ‘dashdot’ | ‘dotted’]
      linewidth or lwfloat or None for default
      lod[True | False]
      path_effectsunknown
      picker[None|float|boolean|callable]
      rasterized[True | False | None]
      snapunknown
      transformTransform instance
      urla url string
      visible[True | False]
      zorderany number
      -
      -
      -

      See also

      -
      -
      axhspan()
      -
      for example plot and source code
      -
      -
      -
      - -
      -
      -bar(left, height, width=0.8, bottom=None, **kwargs)
      -

      Make a bar plot.

      -

      Make a bar plot with rectangles bounded by:

      -
      -
      -
      left, left + width, bottom, bottom + height
      -
      (left, right, bottom and top edges)
      -
      -
      - --- - - - - - -
      Parameters :

      left : sequence of scalars

      -
      -

      the x coordinates of the left sides of the bars

      -
      -

      height : sequence of scalars

      -
      -

      the heights of the bars

      -
      -

      width : scalar or array-like, optional, default: 0.8

      -
      -

      the width(s) of the bars

      -
      -

      bottom : scalar or array-like, optional, default: None

      -
      -

      the y coordinate(s) of the bars

      -
      -

      color : scalar or array-like, optional

      -
      -

      the colors of the bars

      -
      -

      edgecolor : scalar or array-like, optional

      -
      -

      the colors of the bar edges

      -
      -

      linewidth : scalar or array-like, optional, default: None

      -
      -

      width of bar edge(s). If None, use default -linewidth; If 0, don’t draw edges.

      -
      -

      xerr : scalar or array-like, optional, default: None

      -
      -

      if not None, will be used to generate errorbar(s) on the bar chart

      -
      -

      yerr :scalar or array-like, optional, default: None :

      -
      -

      if not None, will be used to generate errorbar(s) on the bar chart

      -
      -

      ecolor : scalar or array-like, optional, default: None

      -
      -

      specifies the color of errorbar(s)

      -
      -

      capsize : integer, optional, default: 3

      -
      -

      determines the length in points of the error bar caps

      -
      -

      error_kw : :

      -
      -

      dictionary of kwargs to be passed to errorbar method. ecolor and -capsize may be specified here rather than as independent kwargs.

      -
      -

      align : [‘edge’ | ‘center’], optional, default: ‘edge’

      -
      -

      If edge, aligns bars by their left edges (for vertical bars) and -by their bottom edges (for horizontal bars). If center, interpret -the left argument as the coordinates of the centers of the bars.

      -
      -

      orientation : ‘vertical’ | ‘horizontal’, optional, default: ‘vertical’

      -
      -

      The orientation of the bars.

      -
      -

      log : boolean, optional, default: False

      -
      -

      If true, sets the axis to be log scale

      -
      -
      Returns :

      :class:`matplotlib.patches.Rectangle` instances. :

      -
      -
      - -
      -
      -barbs(*args, **kw)
      -

      Plot a 2-D field of barbs.

      -

      Call signatures:

      -
      barb(U, V, **kw)
      -barb(U, V, C, **kw)
      -barb(X, Y, U, V, **kw)
      -barb(X, Y, U, V, C, **kw)
      -
      -
      -

      Arguments:

      -
      -
      -
      X, Y:
      -
      The x and y coordinates of the barb locations -(default is head of barb; see pivot kwarg)
      -
      U, V:
      -
      Give the x and y components of the barb shaft
      -
      C:
      -
      An optional array used to map colors to the barbs
      -
      -
      -

      All arguments may be 1-D or 2-D arrays or sequences. If X and Y -are absent, they will be generated as a uniform grid. If U and V -are 2-D arrays but X and Y are 1-D, and if len(X) and len(Y) -match the column and row dimensions of U, then X and Y will be -expanded with numpy.meshgrid().

      -

      U, V, C may be masked arrays, but masked X, Y are not -supported at present.

      -

      Keyword arguments:

      -
      -
      -
      length:
      -
      Length of the barb in points; the other parts of the barb -are scaled against this. -Default is 9
      -
      pivot: [ ‘tip’ | ‘middle’ ]
      -
      The part of the arrow that is at the grid point; the arrow rotates -about this point, hence the name pivot. Default is ‘tip’
      -
      barbcolor: [ color | color sequence ]
      -
      Specifies the color all parts of the barb except any flags. This -parameter is analagous to the edgecolor parameter for polygons, -which can be used instead. However this parameter will override -facecolor.
      -
      flagcolor: [ color | color sequence ]
      -
      Specifies the color of any flags on the barb. This parameter is -analagous to the facecolor parameter for polygons, which can be -used instead. However this parameter will override facecolor. If -this is not set (and C has not either) then flagcolor will be -set to match barbcolor so that the barb has a uniform color. If -C has been set, flagcolor has no effect.
      -
      sizes:
      -

      A dictionary of coefficients specifying the ratio of a given -feature to the length of the barb. Only those values one wishes to -override need to be included. These features include:

      -
      -
        -
      • ‘spacing’ - space between features (flags, full/half barbs)
      • -
      • ‘height’ - height (distance from shaft to top) of a flag or -full barb
      • -
      • ‘width’ - width of a flag, twice the width of a full barb
      • -
      • ‘emptybarb’ - radius of the circle used for low magnitudes
      • -
      -
      -
      -
      fill_empty:
      -
      A flag on whether the empty barbs (circles) that are drawn should -be filled with the flag color. If they are not filled, they will -be drawn such that no color is applied to the center. Default is -False
      -
      rounding:
      -
      A flag to indicate whether the vector magnitude should be rounded -when allocating barb components. If True, the magnitude is -rounded to the nearest multiple of the half-barb increment. If -False, the magnitude is simply truncated to the next lowest -multiple. Default is True
      -
      barb_increments:
      -

      A dictionary of increments specifying values to associate with -different parts of the barb. Only those values one wishes to -override need to be included.

      -
      -
        -
      • ‘half’ - half barbs (Default is 5)
      • -
      • ‘full’ - full barbs (Default is 10)
      • -
      • ‘flag’ - flags (default is 50)
      • -
      -
      -
      -
      flip_barb:
      -
      Either a single boolean flag or an array of booleans. Single -boolean indicates whether the lines and flags should point -opposite to normal for all barbs. An array (which should be the -same size as the other data arrays) indicates whether to flip for -each individual barb. Normal behavior is for the barbs and lines -to point right (comes from wind barbs having these features point -towards low pressure in the Northern Hemisphere.) Default is -False
      -
      -
      -

      Barbs are traditionally used in meteorology as a way to plot the speed -and direction of wind observations, but can technically be used to -plot any two dimensional vector quantity. As opposed to arrows, which -give vector magnitude by the length of the arrow, the barbs give more -quantitative information about the vector magnitude by putting slanted -lines or a triangle for various increments in magnitude, as show -schematically below:

      -
      :     /\    \
      -:    /  \    \
      -:   /    \    \    \
      -:  /      \    \    \
      -: ------------------------------
      -
      -

      The largest increment is given by a triangle (or “flag”). After those -come full lines (barbs). The smallest increment is a half line. There -is only, of course, ever at most 1 half line. If the magnitude is -small and only needs a single half-line and no full lines or -triangles, the half-line is offset from the end of the barb so that it -can be easily distinguished from barbs with a single full line. The -magnitude for the barb shown above would nominally be 65, using the -standard increments of 50, 10, and 5.

      -

      linewidths and edgecolors can be used to customize the barb. -Additional PolyCollection keyword -arguments:

      -
      -
      ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      PropertyDescription
      agg_filterunknown
      alphafloat or None
      animated[True | False]
      antialiased or antialiasedsBoolean or sequence of booleans
      arrayunknown
      axesan Axes instance
      clima length 2 sequence of floats
      clip_boxa matplotlib.transforms.Bbox instance
      clip_on[True | False]
      clip_path[ (Path, Transform) | Patch | None ]
      cmapa colormap or registered colormap name
      colormatplotlib color arg or sequence of rgba tuples
      colorbarunknown
      containsa callable function
      edgecolor or edgecolorsmatplotlib color arg or sequence of rgba tuples
      facecolor or facecolorsmatplotlib color arg or sequence of rgba tuples
      figurea matplotlib.figure.Figure instance
      gidan id string
      hatch[ ‘/’ | ‘\’ | ‘|’ | ‘-‘ | ‘+’ | ‘x’ | ‘o’ | ‘O’ | ‘.’ | ‘*’ ]
      labelstring or anything printable with ‘%s’ conversion.
      linestyle or linestyles or dashes[‘solid’ | ‘dashed’, ‘dashdot’, ‘dotted’ | (offset, on-off-dash-seq) ]
      linewidth or lw or linewidthsfloat or sequence of floats
      lod[True | False]
      normunknown
      offset_positionunknown
      offsetsfloat or sequence of floats
      pathsunknown
      picker[None|float|boolean|callable]
      pickradiusunknown
      rasterized[True | False | None]
      snapunknown
      transformTransform instance
      urla url string
      urlsunknown
      visible[True | False]
      zorderany number
      -
      -

      Example:

      -

      (Source code)

      -
      -../_images/barb_demo_00.png -

      (png, hires.png, pdf)

      -
      -
      -../_images/barb_demo_01.png -

      (png, hires.png, pdf)

      -
      -
      - -
      -
      -barh(bottom, width, height=0.8, left=None, **kwargs)
      -

      Make a horizontal bar plot.

      -

      Call signature:

      -
      barh(bottom, width, height=0.8, left=0, **kwargs)
      -
      -
      -

      Make a horizontal bar plot with rectangles bounded by:

      -
      -
      -
      left, left + width, bottom, bottom + height
      -
      (left, right, bottom and top edges)
      -
      -
      -

      bottom, width, height, and left can be either scalars -or sequences

      -

      Return value is a list of -matplotlib.patches.Rectangle instances.

      -

      Required arguments:

      -
      -
      ---- - - - - - - - - - - - - - -
      ArgumentDescription
      bottomthe vertical positions of the bottom edges of the bars
      widththe lengths of the bars
      -
      -

      Optional keyword arguments:

      -
      -
      ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      KeywordDescription
      heightthe heights (thicknesses) of the bars
      leftthe x coordinates of the left edges of the -bars
      colorthe colors of the bars
      edgecolorthe colors of the bar edges
      linewidthwidth of bar edges; None means use default -linewidth; 0 means don’t draw edges.
      xerrif not None, will be used to generate -errorbars on the bar chart
      yerrif not None, will be used to generate -errorbars on the bar chart
      ecolorspecifies the color of any errorbar
      capsize(default 3) determines the length in -points of the error bar caps
      align‘edge’ (default) | ‘center’
      log[False|True] False (default) leaves the -horizontal axis as-is; True sets it to log -scale
      -
      -

      Setting align = ‘edge’ aligns bars by their bottom edges in -bottom, while align = ‘center’ interprets these values as -the y coordinates of the bar centers.

      -

      The optional arguments color, edgecolor, linewidth, -xerr, and yerr can be either scalars or sequences of -length equal to the number of bars. This enables you to use -barh as the basis for stacked bar charts, or candlestick -plots.

      -

      other optional kwargs:

      -
      -
      ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      PropertyDescription
      agg_filterunknown
      alphafloat or None
      animated[True | False]
      antialiased or aa[True | False] or None for default
      axesan Axes instance
      clip_boxa matplotlib.transforms.Bbox instance
      clip_on[True | False]
      clip_path[ (Path, Transform) | Patch | None ]
      colormatplotlib color spec
      containsa callable function
      edgecolor or ecmpl color spec, or None for default, or ‘none’ for no color
      facecolor or fcmpl color spec, or None for default, or ‘none’ for no color
      figurea matplotlib.figure.Figure instance
      fill[True | False]
      gidan id string
      hatch[‘/’ | ‘\’ | ‘|’ | ‘-‘ | ‘+’ | ‘x’ | ‘o’ | ‘O’ | ‘.’ | ‘*’]
      labelstring or anything printable with ‘%s’ conversion.
      linestyle or ls[‘solid’ | ‘dashed’ | ‘dashdot’ | ‘dotted’]
      linewidth or lwfloat or None for default
      lod[True | False]
      path_effectsunknown
      picker[None|float|boolean|callable]
      rasterized[True | False | None]
      snapunknown
      transformTransform instance
      urla url string
      visible[True | False]
      zorderany number
      -
      -
      - -
      -
      -boxplot(x, notch=False, sym='b+', vert=True, whis=1.5, positions=None, widths=None, patch_artist=False, bootstrap=None, usermedians=None, conf_intervals=None)
      -

      Make a box and whisker plot.

      -

      Call signature:

      -
      boxplot(x, notch=False, sym='+', vert=True, whis=1.5,
      -        positions=None, widths=None, patch_artist=False,
      -        bootstrap=None, usermedians=None, conf_intervals=None)
      -
      -
      -

      Make a box and whisker plot for each column of x or each -vector in sequence x. The box extends from the lower to -upper quartile values of the data, with a line at the median. -The whiskers extend from the box to show the range of the -data. Flier points are those past the end of the whiskers.

      -

      Function Arguments:

      -
      -
      -
      x :
      -
      Array or a sequence of vectors.
      -
      notch : [ False (default) | True ]
      -
      If False (default), produces a rectangular box plot. -If True, will produce a notched box plot
      -
      sym : [ default ‘b+’ ]
      -
      The default symbol for flier points. -Enter an empty string (‘’) if you don’t want to show fliers.
      -
      vert : [ False | True (default) ]
      -
      If True (default), makes the boxes vertical. -If False, makes horizontal boxes.
      -
      whis : [ default 1.5 ]
      -
      Defines the length of the whiskers as a function of the inner -quartile range. They extend to the most extreme data point -within ( whis*(75%-25%) ) data range.
      -
      bootstrap : [ None (default) | integer ]
      -
      Specifies whether to bootstrap the confidence intervals -around the median for notched boxplots. If bootstrap==None, -no bootstrapping is performed, and notches are calculated -using a Gaussian-based asymptotic approximation (see McGill, R., -Tukey, J.W., and Larsen, W.A., 1978, and Kendall and Stuart, -1967). Otherwise, bootstrap specifies the number of times to -bootstrap the median to determine it’s 95% confidence intervals. -Values between 1000 and 10000 are recommended.
      -
      usermedians : [ default None ]
      -
      An array or sequence whose first dimension (or length) is -compatible with x. This overrides the medians computed by -matplotlib for each element of usermedians that is not None. -When an element of usermedians == None, the median will be -computed directly as normal.
      -
      conf_intervals : [ default None ]
      -
      Array or sequence whose first dimension (or length) is compatible -with x and whose second dimension is 2. When the current element -of conf_intervals is not None, the notch locations computed by -matplotlib are overridden (assuming notch is True). When an -element of conf_intervals is None, boxplot compute notches the -method specified by the other kwargs (e.g., bootstrap).
      -
      positions : [ default 1,2,...,n ]
      -
      Sets the horizontal positions of the boxes. The ticks and limits -are automatically set to match the positions.
      -
      widths : [ default 0.5 ]
      -
      Either a scalar or a vector and sets the width of each box. The -default is 0.5, or 0.15*(distance between extreme positions) -if that is smaller.
      -
      patch_artist : [ False (default) | True ]
      -
      If False produces boxes with the Line2D artist -If True produces boxes with the Patch artist
      -
      -
      -

      Returns a dictionary mapping each component of the boxplot -to a list of the matplotlib.lines.Line2D -instances created. That dictionary has the following keys -(assuming vertical boxplots):

      -
      -
        -
      • boxes: the main body of the boxplot showing the quartiles -and the median’s confidence intervals if enabled.
      • -
      • medians: horizonal lines at the median of each box.
      • -
      • whiskers: the vertical lines extending to the most extreme, -n-outlier data points.
      • -
      • caps: the horizontal lines at the ends of the whiskers.
      • -
      • fliers: points representing data that extend beyone the -whiskers (outliers).
      • -
      -
      -

      Example:

      -

      (Source code)

      -
      -../_images/boxplot_demo_00.png -

      (png, hires.png, pdf)

      -
      -
      -../_images/boxplot_demo_01.png -

      (png, hires.png, pdf)

      -
      -
      -../_images/boxplot_demo_02.png -

      (png, hires.png, pdf)

      -
      -
      -../_images/boxplot_demo_03.png -

      (png, hires.png, pdf)

      -
      -
      -../_images/boxplot_demo_04.png -

      (png, hires.png, pdf)

      -
      -
      -../_images/boxplot_demo_05.png -

      (png, hires.png, pdf)

      -
      -
      -../_images/boxplot_demo_06.png -

      (png, hires.png, pdf)

      -
      -
      - -
      -
      -broken_barh(xranges, yrange, **kwargs)
      -

      Plot horizontal bars.

      -

      Call signature:

      -
      broken_barh(self, xranges, yrange, **kwargs)
      -
      -
      -

      A collection of horizontal bars spanning yrange with a sequence of -xranges.

      -

      Required arguments:

      -
      -
      ---- - - - - - - - - - - - - - -
      ArgumentDescription
      xrangessequence of (xmin, xwidth)
      yrangesequence of (ymin, ywidth)
      -
      -

      kwargs are -matplotlib.collections.BrokenBarHCollection -properties:

      -
      -
      ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      PropertyDescription
      agg_filterunknown
      alphafloat or None
      animated[True | False]
      antialiased or antialiasedsBoolean or sequence of booleans
      arrayunknown
      axesan Axes instance
      clima length 2 sequence of floats
      clip_boxa matplotlib.transforms.Bbox instance
      clip_on[True | False]
      clip_path[ (Path, Transform) | Patch | None ]
      cmapa colormap or registered colormap name
      colormatplotlib color arg or sequence of rgba tuples
      colorbarunknown
      containsa callable function
      edgecolor or edgecolorsmatplotlib color arg or sequence of rgba tuples
      facecolor or facecolorsmatplotlib color arg or sequence of rgba tuples
      figurea matplotlib.figure.Figure instance
      gidan id string
      hatch[ ‘/’ | ‘\’ | ‘|’ | ‘-‘ | ‘+’ | ‘x’ | ‘o’ | ‘O’ | ‘.’ | ‘*’ ]
      labelstring or anything printable with ‘%s’ conversion.
      linestyle or linestyles or dashes[‘solid’ | ‘dashed’, ‘dashdot’, ‘dotted’ | (offset, on-off-dash-seq) ]
      linewidth or lw or linewidthsfloat or sequence of floats
      lod[True | False]
      normunknown
      offset_positionunknown
      offsetsfloat or sequence of floats
      pathsunknown
      picker[None|float|boolean|callable]
      pickradiusunknown
      rasterized[True | False | None]
      snapunknown
      transformTransform instance
      urla url string
      urlsunknown
      visible[True | False]
      zorderany number
      -
      -

      these can either be a single argument, ie:

      -
      facecolors = 'black'
      -
      -
      -

      or a sequence of arguments for the various bars, ie:

      -
      facecolors = ('black', 'red', 'green')
      -
      -
      -

      Example:

      -

      (Source code, png, hires.png, pdf)

      -
      -../_images/broken_barh.png -
      -
      - -
      -
      -can_pan()
      -

      Return True if this axes supports any pan/zoom button functionality.

      -
      - -
      -
      -can_zoom()
      -

      Return True if this axes supports the zoom box button functionality.

      -
      - -
      -
      -cla()
      -

      Clear the current axes.

      -
      - -
      -
      -clabel(CS, *args, **kwargs)
      -

      Label a contour plot.

      -

      Call signature:

      -
      clabel(cs, **kwargs)
      -
      -
      -

      Adds labels to line contours in cs, where cs is a -ContourSet object returned by -contour.

      -
      clabel(cs, v, **kwargs)
      -
      -
      -

      only labels contours listed in v.

      -

      Optional keyword arguments:

      -
      -
      -
      fontsize:
      -
      size in points or relative size eg ‘smaller’, ‘x-large’
      -
      colors:
      -
        -
      • if None, the color of each label matches the color of -the corresponding contour
      • -
      • if one string color, e.g., colors = ‘r’ or colors = -‘red’, all labels will be plotted in this color
      • -
      • if a tuple of matplotlib color args (string, float, rgb, etc), -different labels will be plotted in different colors in the order -specified
      • -
      -
      -
      inline:
      -
      controls whether the underlying contour is removed or -not. Default is True.
      -
      inline_spacing:
      -
      space in pixels to leave on each side of label when -placing inline. Defaults to 5. This spacing will be -exact for labels at locations where the contour is -straight, less so for labels on curved contours.
      -
      fmt:
      -
      a format string for the label. Default is ‘%1.3f’ -Alternatively, this can be a dictionary matching contour -levels with arbitrary strings to use for each contour level -(i.e., fmt[level]=string), or it can be any callable, such -as a Formatter instance, that -returns a string when called with a numeric contour level.
      -
      manual:
      -

      if True, contour labels will be placed manually using -mouse clicks. Click the first button near a contour to -add a label, click the second button (or potentially both -mouse buttons at once) to finish adding labels. The third -button can be used to remove the last label added, but -only if labels are not inline. Alternatively, the keyboard -can be used to select label locations (enter to end label -placement, delete or backspace act like the third mouse button, -and any other key will select a label location).

      -

      manual can be an iterable object of x,y tuples. Contour labels -will be created as if mouse is clicked at each x,y positions.

      -
      -
      rightside_up:
      -
      if True (default), label rotations will always be plus -or minus 90 degrees from level.
      -
      use_clabeltext:
      -
      if True (default is False), ClabelText class (instead of -matplotlib.Text) is used to create labels. ClabelText -recalculates rotation angles of texts during the drawing time, -therefore this can be used if aspect of the axes changes.
      -
      -
      -

      (Source code)

      -
      -../_images/contour_demo_00.png -

      (png, hires.png, pdf)

      -
      -
      -../_images/contour_demo_01.png -

      (png, hires.png, pdf)

      -
      -
      -../_images/contour_demo_02.png -

      (png, hires.png, pdf)

      -
      -
      -../_images/contour_demo_03.png -

      (png, hires.png, pdf)

      -
      -
      -../_images/contour_demo_04.png -

      (png, hires.png, pdf)

      -
      -
      -../_images/contour_demo_05.png -

      (png, hires.png, pdf)

      -
      -
      - -
      -
      -clear()
      -

      clear the axes

      -
      - -
      -
      -cohere(x, y, NFFT=256, Fs=2, Fc=0, detrend=<function detrend_none at 0x34d25f0>, window=<function window_hanning at 0x34d2398>, noverlap=0, pad_to=None, sides='default', scale_by_freq=None, **kwargs)
      -

      Plot the coherence between x and y.

      -

      Call signature:

      -
      cohere(x, y, NFFT=256, Fs=2, Fc=0, detrend = mlab.detrend_none,
      -       window = mlab.window_hanning, noverlap=0, pad_to=None,
      -       sides='default', scale_by_freq=None, **kwargs)
      -
      -
      -

      Plot the coherence between x and y. Coherence is the -normalized cross spectral density:

      -

      Keyword arguments:

      -
      -
      -
      NFFT: integer
      -
      The number of data points used in each block for the FFT. -Must be even; a power 2 is most efficient. The default value is 256. -This should NOT be used to get zero padding, or the scaling of the -result will be incorrect. Use pad_to for this instead.
      -
      Fs: scalar
      -
      The sampling frequency (samples per time unit). It is used -to calculate the Fourier frequencies, freqs, in cycles per time -unit. The default value is 2.
      -
      detrend: callable
      -
      The function applied to each segment before fft-ing, -designed to remove the mean or linear trend. Unlike in -MATLAB, where the detrend parameter is a vector, in -matplotlib is it a function. The pylab -module defines detrend_none(), -detrend_mean(), and -detrend_linear(), but you can use -a custom function as well.
      -
      window: callable or ndarray
      -
      A function or a vector of length NFFT. To create window -vectors see window_hanning(), window_none(), -numpy.blackman(), numpy.hamming(), -numpy.bartlett(), scipy.signal(), -scipy.signal.get_window(), etc. The default is -window_hanning(). If a function is passed as the -argument, it must take a data segment as an argument and -return the windowed version of the segment.
      -
      pad_to: integer
      -
      The number of points to which the data segment is padded when -performing the FFT. This can be different from NFFT, which -specifies the number of data points used. While not increasing -the actual resolution of the psd (the minimum distance between -resolvable peaks), this can give more points in the plot, -allowing for more detail. This corresponds to the n parameter -in the call to fft(). The default is None, which sets pad_to -equal to NFFT
      -
      sides: [ ‘default’ | ‘onesided’ | ‘twosided’ ]
      -
      Specifies which sides of the PSD to return. Default gives the -default behavior, which returns one-sided for real data and both -for complex data. ‘onesided’ forces the return of a one-sided PSD, -while ‘twosided’ forces two-sided.
      -
      scale_by_freq: boolean
      -
      Specifies whether the resulting density values should be scaled -by the scaling frequency, which gives density in units of Hz^-1. -This allows for integration over the returned frequency values. -The default is True for MATLAB compatibility.
      -
      noverlap: integer
      -
      The number of points of overlap between blocks. The -default value is 0 (no overlap).
      -
      Fc: integer
      -
      The center frequency of x (defaults to 0), which offsets -the x extents of the plot to reflect the frequency range used -when a signal is acquired and then filtered and downsampled to -baseband.
      -
      -
      -

      The return value is a tuple (Cxy, f), where f are the -frequencies of the coherence vector.

      -

      kwargs are applied to the lines.

      -

      References:

      -
      -
        -
      • Bendat & Piersol – Random Data: Analysis and Measurement -Procedures, John Wiley & Sons (1986)
      • -
      -
      -

      kwargs control the Line2D -properties of the coherence plot:

      -
      -
      ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      PropertyDescription
      agg_filterunknown
      alphafloat (0.0 transparent through 1.0 opaque)
      animated[True | False]
      antialiased or aa[True | False]
      axesan Axes instance
      clip_boxa matplotlib.transforms.Bbox instance
      clip_on[True | False]
      clip_path[ (Path, Transform) | Patch | None ]
      color or cany matplotlib color
      containsa callable function
      dash_capstyle[‘butt’ | ‘round’ | ‘projecting’]
      dash_joinstyle[‘miter’ | ‘round’ | ‘bevel’]
      dashessequence of on/off ink in points
      data2D array (rows are x, y) or two 1D arrays
      drawstyle[‘default’ | ‘steps’ | ‘steps-pre’ | ‘steps-mid’ | ‘steps-post’]
      figurea matplotlib.figure.Figure instance
      fillstyle[‘full’ | ‘left’ | ‘right’ | ‘bottom’ | ‘top’ | ‘none’]
      gidan id string
      labelstring or anything printable with ‘%s’ conversion.
      linestyle or ls['-' | '--' | '-.' | ':' | 'None' | ' ' | ''] and any drawstyle in combination with a linestyle, e.g., 'steps--'.
      linewidth or lwfloat value in points
      lod[True | False]
      markerunknown
      markeredgecolor or mecany matplotlib color
      markeredgewidth or mewfloat value in points
      markerfacecolor or mfcany matplotlib color
      markerfacecoloralt or mfcaltany matplotlib color
      markersize or msfloat
      markeveryNone | integer | (startind, stride)
      pickerfloat distance in points or callable pick function fn(artist, event)
      pickradiusfloat distance in points
      rasterized[True | False | None]
      snapunknown
      solid_capstyle[‘butt’ | ‘round’ | ‘projecting’]
      solid_joinstyle[‘miter’ | ‘round’ | ‘bevel’]
      transforma matplotlib.transforms.Transform instance
      urla url string
      visible[True | False]
      xdata1D array
      ydata1D array
      zorderany number
      -
      -

      Example:

      -

      (Source code, png, hires.png, pdf)

      -
      -../_images/cohere_demo.png -
      -
      - -
      -
      -contains(mouseevent)
      -

      Test whether the mouse event occured in the axes.

      -

      Returns True / False, {}

      -
      - -
      -
      -contains_point(point)
      -

      Returns True if the point (tuple of x,y) is inside the axes -(the area defined by the its patch). A pixel coordinate is -required.

      -
      - -
      -
      -contour(*args, **kwargs)
      -

      Plot contours.

      -

      contour() and -contourf() draw contour lines and -filled contours, respectively. Except as noted, function -signatures and return values are the same for both versions.

      -

      contourf() differs from the MATLAB -version in that it does not draw the polygon edges. -To draw edges, add line contours with -calls to contour().

      -

      Call signatures:

      -
      contour(Z)
      -
      -
      -

      make a contour plot of an array Z. The level values are chosen -automatically.

      -
      contour(X,Y,Z)
      -
      -
      -

      X, Y specify the (x, y) coordinates of the surface

      -
      contour(Z,N)
      -contour(X,Y,Z,N)
      -
      -
      -

      contour N automatically-chosen levels.

      -
      contour(Z,V)
      -contour(X,Y,Z,V)
      -
      -
      -

      draw contour lines at the values specified in sequence V

      -
      contourf(..., V)
      -
      -
      -

      fill the len(V)-1 regions between the values in V

      -
      contour(Z, **kwargs)
      -
      -
      -

      Use keyword args to control colors, linewidth, origin, cmap ... see -below for more details.

      -

      X and Y must both be 2-D with the same shape as Z, or they -must both be 1-D such that len(X) is the number of columns in -Z and len(Y) is the number of rows in Z.

      -

      C = contour(...) returns a -QuadContourSet object.

      -

      Optional keyword arguments:

      -
      -
      -
      colors: [ None | string | (mpl_colors) ]
      -

      If None, the colormap specified by cmap will be used.

      -

      If a string, like ‘r’ or ‘red’, all levels will be plotted in this -color.

      -

      If a tuple of matplotlib color args (string, float, rgb, etc), -different levels will be plotted in different colors in the order -specified.

      -
      -
      alpha: float
      -
      The alpha blending value
      -
      cmap: [ None | Colormap ]
      -
      A cm Colormap instance or -None. If cmap is None and colors is None, a -default Colormap is used.
      -
      norm: [ None | Normalize ]
      -
      A matplotlib.colors.Normalize instance for -scaling data values to colors. If norm is None and -colors is None, the default linear scaling is used.
      -
      vmin, vmax: [ None | scalar ]
      -
      If not None, either or both of these values will be -supplied to the matplotlib.colors.Normalize -instance, overriding the default color scaling based on -levels.
      -
      levels: [level0, level1, ..., leveln]
      -
      A list of floating point numbers indicating the level -curves to draw; eg to draw just the zero contour pass -levels=[0]
      -
      origin: [ None | ‘upper’ | ‘lower’ | ‘image’ ]
      -

      If None, the first value of Z will correspond to the -lower left corner, location (0,0). If ‘image’, the rc -value for image.origin will be used.

      -

      This keyword is not active if X and Y are specified in -the call to contour.

      -
      -
      -

      extent: [ None | (x0,x1,y0,y1) ]

      -
      -

      If origin is not None, then extent is interpreted as -in matplotlib.pyplot.imshow(): it gives the outer -pixel boundaries. In this case, the position of Z[0,0] -is the center of the pixel, not a corner. If origin is -None, then (x0, y0) is the position of Z[0,0], and -(x1, y1) is the position of Z[-1,-1].

      -

      This keyword is not active if X and Y are specified in -the call to contour.

      -
      -
      -
      locator: [ None | ticker.Locator subclass ]
      -
      If locator is None, the default -MaxNLocator is used. The -locator is used to determine the contour levels if they -are not given explicitly via the V argument.
      -
      extend: [ ‘neither’ | ‘both’ | ‘min’ | ‘max’ ]
      -
      Unless this is ‘neither’, contour levels are automatically -added to one or both ends of the range so that all data -are included. These added ranges are then mapped to the -special colormap values which default to the ends of the -colormap range, but can be set via -matplotlib.colors.Colormap.set_under() and -matplotlib.colors.Colormap.set_over() methods.
      -
      xunits, yunits: [ None | registered units ]
      -
      Override axis units by specifying an instance of a -matplotlib.units.ConversionInterface.
      -
      antialiased: [ True | False ]
      -
      enable antialiasing, overriding the defaults. For -filled contours, the default is True. For line contours, -it is taken from rcParams[‘lines.antialiased’].
      -
      -
      -

      contour-only keyword arguments:

      -
      -
      -
      linewidths: [ None | number | tuple of numbers ]
      -

      If linewidths is None, the default width in -lines.linewidth in matplotlibrc is used.

      -

      If a number, all levels will be plotted with this linewidth.

      -

      If a tuple, different levels will be plotted with different -linewidths in the order specified

      -
      -
      linestyles: [ None | ‘solid’ | ‘dashed’ | ‘dashdot’ | ‘dotted’ ]
      -

      If linestyles is None, the default is ‘solid’ unless -the lines are monochrome. In that case, negative -contours will take their linestyle from the matplotlibrc -contour.negative_linestyle setting.

      -

      linestyles can also be an iterable of the above strings -specifying a set of linestyles to be used. If this -iterable is shorter than the number of contour levels -it will be repeated as necessary.

      -
      -
      -
      -

      contourf-only keyword arguments:

      -
      -
      -
      nchunk: [ 0 | integer ]
      -
      If 0, no subdivision of the domain. Specify a positive integer to -divide the domain into subdomains of roughly nchunk by nchunk -points. This may never actually be advantageous, so this option may -be removed. Chunking introduces artifacts at the chunk boundaries -unless antialiased is False.
      -
      hatches:
      -
      A list of cross hatch patterns to use on the filled areas. -If None, no hatching will be added to the contour. -Hatching is supported in the PostScript, PDF, SVG and Agg -backends only.
      -
      -
      -

      Note: contourf fills intervals that are closed at the top; that -is, for boundaries z1 and z2, the filled region is:

      -
      z1 < z <= z2
      -
      -
      -

      There is one exception: if the lowest boundary coincides with -the minimum value of the z array, then that minimum value -will be included in the lowest interval.

      -

      Examples:

      -

      (Source code)

      -
      -../_images/contour_demo_00.png -

      (png, hires.png, pdf)

      -
      -
      -../_images/contour_demo_01.png -

      (png, hires.png, pdf)

      -
      -
      -../_images/contour_demo_02.png -

      (png, hires.png, pdf)

      -
      -
      -../_images/contour_demo_03.png -

      (png, hires.png, pdf)

      -
      -
      -../_images/contour_demo_04.png -

      (png, hires.png, pdf)

      -
      -
      -../_images/contour_demo_05.png -

      (png, hires.png, pdf)

      -
      -

      (Source code)

      -
      -../_images/contourf_demo_00.png -

      (png, hires.png, pdf)

      -
      -
      -../_images/contourf_demo_01.png -

      (png, hires.png, pdf)

      -
      -
      -../_images/contourf_demo_02.png -

      (png, hires.png, pdf)

      -
      -
      - -
      -
      -contourf(*args, **kwargs)
      -

      Plot contours.

      -

      contour() and -contourf() draw contour lines and -filled contours, respectively. Except as noted, function -signatures and return values are the same for both versions.

      -

      contourf() differs from the MATLAB -version in that it does not draw the polygon edges. -To draw edges, add line contours with -calls to contour().

      -

      Call signatures:

      -
      contour(Z)
      -
      -
      -

      make a contour plot of an array Z. The level values are chosen -automatically.

      -
      contour(X,Y,Z)
      -
      -
      -

      X, Y specify the (x, y) coordinates of the surface

      -
      contour(Z,N)
      -contour(X,Y,Z,N)
      -
      -
      -

      contour N automatically-chosen levels.

      -
      contour(Z,V)
      -contour(X,Y,Z,V)
      -
      -
      -

      draw contour lines at the values specified in sequence V

      -
      contourf(..., V)
      -
      -
      -

      fill the len(V)-1 regions between the values in V

      -
      contour(Z, **kwargs)
      -
      -
      -

      Use keyword args to control colors, linewidth, origin, cmap ... see -below for more details.

      -

      X and Y must both be 2-D with the same shape as Z, or they -must both be 1-D such that len(X) is the number of columns in -Z and len(Y) is the number of rows in Z.

      -

      C = contour(...) returns a -QuadContourSet object.

      -

      Optional keyword arguments:

      -
      -
      -
      colors: [ None | string | (mpl_colors) ]
      -

      If None, the colormap specified by cmap will be used.

      -

      If a string, like ‘r’ or ‘red’, all levels will be plotted in this -color.

      -

      If a tuple of matplotlib color args (string, float, rgb, etc), -different levels will be plotted in different colors in the order -specified.

      -
      -
      alpha: float
      -
      The alpha blending value
      -
      cmap: [ None | Colormap ]
      -
      A cm Colormap instance or -None. If cmap is None and colors is None, a -default Colormap is used.
      -
      norm: [ None | Normalize ]
      -
      A matplotlib.colors.Normalize instance for -scaling data values to colors. If norm is None and -colors is None, the default linear scaling is used.
      -
      vmin, vmax: [ None | scalar ]
      -
      If not None, either or both of these values will be -supplied to the matplotlib.colors.Normalize -instance, overriding the default color scaling based on -levels.
      -
      levels: [level0, level1, ..., leveln]
      -
      A list of floating point numbers indicating the level -curves to draw; eg to draw just the zero contour pass -levels=[0]
      -
      origin: [ None | ‘upper’ | ‘lower’ | ‘image’ ]
      -

      If None, the first value of Z will correspond to the -lower left corner, location (0,0). If ‘image’, the rc -value for image.origin will be used.

      -

      This keyword is not active if X and Y are specified in -the call to contour.

      -
      -
      -

      extent: [ None | (x0,x1,y0,y1) ]

      -
      -

      If origin is not None, then extent is interpreted as -in matplotlib.pyplot.imshow(): it gives the outer -pixel boundaries. In this case, the position of Z[0,0] -is the center of the pixel, not a corner. If origin is -None, then (x0, y0) is the position of Z[0,0], and -(x1, y1) is the position of Z[-1,-1].

      -

      This keyword is not active if X and Y are specified in -the call to contour.

      -
      -
      -
      locator: [ None | ticker.Locator subclass ]
      -
      If locator is None, the default -MaxNLocator is used. The -locator is used to determine the contour levels if they -are not given explicitly via the V argument.
      -
      extend: [ ‘neither’ | ‘both’ | ‘min’ | ‘max’ ]
      -
      Unless this is ‘neither’, contour levels are automatically -added to one or both ends of the range so that all data -are included. These added ranges are then mapped to the -special colormap values which default to the ends of the -colormap range, but can be set via -matplotlib.colors.Colormap.set_under() and -matplotlib.colors.Colormap.set_over() methods.
      -
      xunits, yunits: [ None | registered units ]
      -
      Override axis units by specifying an instance of a -matplotlib.units.ConversionInterface.
      -
      antialiased: [ True | False ]
      -
      enable antialiasing, overriding the defaults. For -filled contours, the default is True. For line contours, -it is taken from rcParams[‘lines.antialiased’].
      -
      -
      -

      contour-only keyword arguments:

      -
      -
      -
      linewidths: [ None | number | tuple of numbers ]
      -

      If linewidths is None, the default width in -lines.linewidth in matplotlibrc is used.

      -

      If a number, all levels will be plotted with this linewidth.

      -

      If a tuple, different levels will be plotted with different -linewidths in the order specified

      -
      -
      linestyles: [ None | ‘solid’ | ‘dashed’ | ‘dashdot’ | ‘dotted’ ]
      -

      If linestyles is None, the default is ‘solid’ unless -the lines are monochrome. In that case, negative -contours will take their linestyle from the matplotlibrc -contour.negative_linestyle setting.

      -

      linestyles can also be an iterable of the above strings -specifying a set of linestyles to be used. If this -iterable is shorter than the number of contour levels -it will be repeated as necessary.

      -
      -
      -
      -

      contourf-only keyword arguments:

      -
      -
      -
      nchunk: [ 0 | integer ]
      -
      If 0, no subdivision of the domain. Specify a positive integer to -divide the domain into subdomains of roughly nchunk by nchunk -points. This may never actually be advantageous, so this option may -be removed. Chunking introduces artifacts at the chunk boundaries -unless antialiased is False.
      -
      hatches:
      -
      A list of cross hatch patterns to use on the filled areas. -If None, no hatching will be added to the contour. -Hatching is supported in the PostScript, PDF, SVG and Agg -backends only.
      -
      -
      -

      Note: contourf fills intervals that are closed at the top; that -is, for boundaries z1 and z2, the filled region is:

      -
      z1 < z <= z2
      -
      -
      -

      There is one exception: if the lowest boundary coincides with -the minimum value of the z array, then that minimum value -will be included in the lowest interval.

      -

      Examples:

      -

      (Source code)

      -
      -../_images/contour_demo_00.png -

      (png, hires.png, pdf)

      -
      -
      -../_images/contour_demo_01.png -

      (png, hires.png, pdf)

      -
      -
      -../_images/contour_demo_02.png -

      (png, hires.png, pdf)

      -
      -
      -../_images/contour_demo_03.png -

      (png, hires.png, pdf)

      -
      -
      -../_images/contour_demo_04.png -

      (png, hires.png, pdf)

      -
      -
      -../_images/contour_demo_05.png -

      (png, hires.png, pdf)

      -
      -

      (Source code)

      -
      -../_images/contourf_demo_00.png -

      (png, hires.png, pdf)

      -
      -
      -../_images/contourf_demo_01.png -

      (png, hires.png, pdf)

      -
      -
      -../_images/contourf_demo_02.png -

      (png, hires.png, pdf)

      -
      -
      - -
      -
      -csd(x, y, NFFT=256, Fs=2, Fc=0, detrend=<function detrend_none at 0x34d25f0>, window=<function window_hanning at 0x34d2398>, noverlap=0, pad_to=None, sides='default', scale_by_freq=None, **kwargs)
      -

      Plot cross-spectral density.

      -

      Call signature:

      -
      csd(x, y, NFFT=256, Fs=2, Fc=0, detrend=mlab.detrend_none,
      -    window=mlab.window_hanning, noverlap=0, pad_to=None,
      -    sides='default', scale_by_freq=None, **kwargs)
      -
      -
      -

      The cross spectral density by Welch’s average -periodogram method. The vectors x and y are divided into -NFFT length segments. Each segment is detrended by function -detrend and windowed by function window. The product of -the direct FFTs of x and y are averaged over each segment -to compute , with a scaling to correct for power -loss due to windowing.

      -

      Returns the tuple (Pxy, freqs). P is the cross spectrum -(complex valued), and is -plotted.

      -

      Keyword arguments:

      -
      -
      -
      NFFT: integer
      -
      The number of data points used in each block for the FFT. -Must be even; a power 2 is most efficient. The default value is 256. -This should NOT be used to get zero padding, or the scaling of the -result will be incorrect. Use pad_to for this instead.
      -
      Fs: scalar
      -
      The sampling frequency (samples per time unit). It is used -to calculate the Fourier frequencies, freqs, in cycles per time -unit. The default value is 2.
      -
      detrend: callable
      -
      The function applied to each segment before fft-ing, -designed to remove the mean or linear trend. Unlike in -MATLAB, where the detrend parameter is a vector, in -matplotlib is it a function. The pylab -module defines detrend_none(), -detrend_mean(), and -detrend_linear(), but you can use -a custom function as well.
      -
      window: callable or ndarray
      -
      A function or a vector of length NFFT. To create window -vectors see window_hanning(), window_none(), -numpy.blackman(), numpy.hamming(), -numpy.bartlett(), scipy.signal(), -scipy.signal.get_window(), etc. The default is -window_hanning(). If a function is passed as the -argument, it must take a data segment as an argument and -return the windowed version of the segment.
      -
      pad_to: integer
      -
      The number of points to which the data segment is padded when -performing the FFT. This can be different from NFFT, which -specifies the number of data points used. While not increasing -the actual resolution of the psd (the minimum distance between -resolvable peaks), this can give more points in the plot, -allowing for more detail. This corresponds to the n parameter -in the call to fft(). The default is None, which sets pad_to -equal to NFFT
      -
      sides: [ ‘default’ | ‘onesided’ | ‘twosided’ ]
      -
      Specifies which sides of the PSD to return. Default gives the -default behavior, which returns one-sided for real data and both -for complex data. ‘onesided’ forces the return of a one-sided PSD, -while ‘twosided’ forces two-sided.
      -
      scale_by_freq: boolean
      -
      Specifies whether the resulting density values should be scaled -by the scaling frequency, which gives density in units of Hz^-1. -This allows for integration over the returned frequency values. -The default is True for MATLAB compatibility.
      -
      noverlap: integer
      -
      The number of points of overlap between blocks. The -default value is 0 (no overlap).
      -
      Fc: integer
      -
      The center frequency of x (defaults to 0), which offsets -the x extents of the plot to reflect the frequency range used -when a signal is acquired and then filtered and downsampled to -baseband.
      -
      -
      -
      -
      References:
      -
      Bendat & Piersol – Random Data: Analysis and Measurement -Procedures, John Wiley & Sons (1986)
      -
      -

      kwargs control the Line2D properties:

      -
      -
      ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      PropertyDescription
      agg_filterunknown
      alphafloat (0.0 transparent through 1.0 opaque)
      animated[True | False]
      antialiased or aa[True | False]
      axesan Axes instance
      clip_boxa matplotlib.transforms.Bbox instance
      clip_on[True | False]
      clip_path[ (Path, Transform) | Patch | None ]
      color or cany matplotlib color
      containsa callable function
      dash_capstyle[‘butt’ | ‘round’ | ‘projecting’]
      dash_joinstyle[‘miter’ | ‘round’ | ‘bevel’]
      dashessequence of on/off ink in points
      data2D array (rows are x, y) or two 1D arrays
      drawstyle[‘default’ | ‘steps’ | ‘steps-pre’ | ‘steps-mid’ | ‘steps-post’]
      figurea matplotlib.figure.Figure instance
      fillstyle[‘full’ | ‘left’ | ‘right’ | ‘bottom’ | ‘top’ | ‘none’]
      gidan id string
      labelstring or anything printable with ‘%s’ conversion.
      linestyle or ls['-' | '--' | '-.' | ':' | 'None' | ' ' | ''] and any drawstyle in combination with a linestyle, e.g., 'steps--'.
      linewidth or lwfloat value in points
      lod[True | False]
      markerunknown
      markeredgecolor or mecany matplotlib color
      markeredgewidth or mewfloat value in points
      markerfacecolor or mfcany matplotlib color
      markerfacecoloralt or mfcaltany matplotlib color
      markersize or msfloat
      markeveryNone | integer | (startind, stride)
      pickerfloat distance in points or callable pick function fn(artist, event)
      pickradiusfloat distance in points
      rasterized[True | False | None]
      snapunknown
      solid_capstyle[‘butt’ | ‘round’ | ‘projecting’]
      solid_joinstyle[‘miter’ | ‘round’ | ‘bevel’]
      transforma matplotlib.transforms.Transform instance
      urla url string
      visible[True | False]
      xdata1D array
      ydata1D array
      zorderany number
      -
      -

      Example:

      -

      (Source code, png, hires.png, pdf)

      -
      -../_images/csd_demo.png -
      -
      - -
      -
      -drag_pan(button, key, x, y)
      -

      Called when the mouse moves during a pan operation.

      -

      button is the mouse button number:

      -
        -
      • 1: LEFT
      • -
      • 2: MIDDLE
      • -
      • 3: RIGHT
      • -
      -

      key is a “shift” key

      -

      x, y are the mouse coordinates in display coords.

      -
      -

      Note

      -

      Intended to be overridden by new projection types.

      -
      -
      - -
      -
      -draw(artist, renderer, *args, **kwargs)
      -

      Draw everything (plot lines, axes, labels)

      -
      - -
      -
      -draw_artist(a)
      -

      This method can only be used after an initial draw which -caches the renderer. It is used to efficiently update Axes -data (axis ticks, labels, etc are not updated)

      -
      - -
      -
      -end_pan()
      -

      Called when a pan operation completes (when the mouse button -is up.)

      -
      -

      Note

      -

      Intended to be overridden by new projection types.

      -
      -
      - -
      -
      -errorbar(x, y, yerr=None, xerr=None, fmt='-', ecolor=None, elinewidth=None, capsize=3, barsabove=False, lolims=False, uplims=False, xlolims=False, xuplims=False, errorevery=1, capthick=None, **kwargs)
      -

      Plot an errorbar graph.

      -

      Call signature:

      -
      errorbar(x, y, yerr=None, xerr=None,
      -         fmt='-', ecolor=None, elinewidth=None, capsize=3,
      -         barsabove=False, lolims=False, uplims=False,
      -         xlolims=False, xuplims=False, errorevery=1,
      -         capthick=None)
      -
      -
      -

      Plot x versus y with error deltas in yerr and xerr. -Vertical errorbars are plotted if yerr is not None. -Horizontal errorbars are plotted if xerr is not None.

      -

      x, y, xerr, and yerr can all be scalars, which plots a -single error bar at x, y.

      -

      Optional keyword arguments:

      -
      -
      -
      xerr/yerr: [ scalar | N, Nx1, or 2xN array-like ]
      -

      If a scalar number, len(N) array-like object, or an Nx1 -array-like object, errorbars are drawn at +/-value relative -to the data.

      -

      If a sequence of shape 2xN, errorbars are drawn at -row1 -and +row2 relative to the data.

      -
      -
      fmt: ‘-‘
      -
      The plot format symbol. If fmt is None, only the -errorbars are plotted. This is used for adding -errorbars to a bar plot, for example.
      -
      ecolor: [ None | mpl color ]
      -
      A matplotlib color arg which gives the color the errorbar lines; -if None, use the marker color.
      -
      elinewidth: scalar
      -
      The linewidth of the errorbar lines. If None, use the linewidth.
      -
      capsize: scalar
      -
      The length of the error bar caps in points
      -
      capthick: scalar
      -
      An alias kwarg to markeredgewidth (a.k.a. - mew). This -setting is a more sensible name for the property that -controls the thickness of the error bar cap in points. For -backwards compatibility, if mew or markeredgewidth are given, -then they will over-ride capthick. This may change in future -releases.
      -
      barsabove: [ True | False ]
      -
      if True, will plot the errorbars above the plot -symbols. Default is below.
      -
      lolims / uplims / xlolims / xuplims: [ False | True ]
      -
      These arguments can be used to indicate that a value gives -only upper/lower limits. In that case a caret symbol is -used to indicate this. lims-arguments may be of the same -type as xerr and yerr.
      -
      errorevery: positive integer
      -
      subsamples the errorbars. e.g., if everyerror=5, errorbars for -every 5-th datapoint will be plotted. The data plot itself still -shows all data points.
      -
      -
      -

      All other keyword arguments are passed on to the plot command for the -markers. For example, this code makes big red squares with -thick green edges:

      -
      x,y,yerr = rand(3,10)
      -errorbar(x, y, yerr, marker='s',
      -         mfc='red', mec='green', ms=20, mew=4)
      -
      -
      -

      where mfc, mec, ms and mew are aliases for the longer -property names, markerfacecolor, markeredgecolor, markersize -and markeredgewith.

      -

      valid kwargs for the marker properties are

      -
      -
      ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      PropertyDescription
      agg_filterunknown
      alphafloat (0.0 transparent through 1.0 opaque)
      animated[True | False]
      antialiased or aa[True | False]
      axesan Axes instance
      clip_boxa matplotlib.transforms.Bbox instance
      clip_on[True | False]
      clip_path[ (Path, Transform) | Patch | None ]
      color or cany matplotlib color
      containsa callable function
      dash_capstyle[‘butt’ | ‘round’ | ‘projecting’]
      dash_joinstyle[‘miter’ | ‘round’ | ‘bevel’]
      dashessequence of on/off ink in points
      data2D array (rows are x, y) or two 1D arrays
      drawstyle[‘default’ | ‘steps’ | ‘steps-pre’ | ‘steps-mid’ | ‘steps-post’]
      figurea matplotlib.figure.Figure instance
      fillstyle[‘full’ | ‘left’ | ‘right’ | ‘bottom’ | ‘top’ | ‘none’]
      gidan id string
      labelstring or anything printable with ‘%s’ conversion.
      linestyle or ls['-' | '--' | '-.' | ':' | 'None' | ' ' | ''] and any drawstyle in combination with a linestyle, e.g., 'steps--'.
      linewidth or lwfloat value in points
      lod[True | False]
      markerunknown
      markeredgecolor or mecany matplotlib color
      markeredgewidth or mewfloat value in points
      markerfacecolor or mfcany matplotlib color
      markerfacecoloralt or mfcaltany matplotlib color
      markersize or msfloat
      markeveryNone | integer | (startind, stride)
      pickerfloat distance in points or callable pick function fn(artist, event)
      pickradiusfloat distance in points
      rasterized[True | False | None]
      snapunknown
      solid_capstyle[‘butt’ | ‘round’ | ‘projecting’]
      solid_joinstyle[‘miter’ | ‘round’ | ‘bevel’]
      transforma matplotlib.transforms.Transform instance
      urla url string
      visible[True | False]
      xdata1D array
      ydata1D array
      zorderany number
      -
      -

      Returns (plotline, caplines, barlinecols):

      -
      -
      -
      plotline: Line2D instance
      -
      x, y plot markers and/or line
      -
      caplines: list of error bar cap
      -
      Line2D instances
      -
      barlinecols: list of
      -
      LineCollection instances for -the horizontal and vertical error ranges.
      -
      -
      -

      Example:

      -

      (Source code, png, hires.png, pdf)

      -
      -../_images/errorbar_demo.png -
      -
      - -
      -
      -eventplot(positions, orientation='horizontal', lineoffsets=1, linelengths=1, linewidths=None, colors=None, linestyles='solid', **kwargs)
      -

      Plot identical parallel lines at specific positions.

      -

      Call signature:

      -
      eventplot(positions, orientation='horizontal', lineoffsets=0,
      -          linelengths=1, linewidths=None, color =None,
      -          linestyles='solid'
      -
      -

      Plot parallel lines at the given positions. positions should be a 1D -or 2D array-like object, with each row corresponding to a row or column -of lines.

      -

      This type of plot is commonly used in neuroscience for representing -neural events, where it is commonly called a spike raster, dot raster, -or raster plot.

      -

      However, it is useful in any situation where you wish to show the -timing or position of multiple sets of discrete events, such as the -arrival times of people to a business on each day of the month or the -date of hurricanes each year of the last century.

      -
      -
      orientation : [ ‘horizonal’ | ‘vertical’ ]
      -
      ‘horizonal’ : the lines will be vertical and arranged in rows -“vertical’ : lines will be horizontal and arranged in columns
      -
      lineoffsets :
      -
      A float or array-like containing floats.
      -
      linelengths :
      -
      A float or array-like containing floats.
      -
      linewidths :
      -
      A float or array-like containing floats.
      -
      colors
      -
      must be a sequence of RGBA tuples (eg arbitrary color -strings, etc, not allowed) or a list of such sequences
      -
      linestyles :
      -
      [ ‘solid’ | ‘dashed’ | ‘dashdot’ | ‘dotted’ ] or an array of these -values
      -
      -

      For linelengths, linewidths, colors, and linestyles, if only a single -value is given, that value is applied to all lines. If an array-like -is given, it must have the same length as positions, and each value -will be applied to the corresponding row or column in positions.

      -

      Returns a list of matplotlib.collections.EventCollection -objects that were added.

      -

      kwargs are LineCollection properties:

      -
      -
      ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      PropertyDescription
      agg_filterunknown
      alphafloat or None
      animated[True | False]
      antialiased or antialiasedsBoolean or sequence of booleans
      arrayunknown
      axesan Axes instance
      clima length 2 sequence of floats
      clip_boxa matplotlib.transforms.Bbox instance
      clip_on[True | False]
      clip_path[ (Path, Transform) | Patch | None ]
      cmapa colormap or registered colormap name
      colormatplotlib color arg or sequence of rgba tuples
      colorbarunknown
      containsa callable function
      edgecolor or edgecolorsmatplotlib color arg or sequence of rgba tuples
      facecolor or facecolorsmatplotlib color arg or sequence of rgba tuples
      figurea matplotlib.figure.Figure instance
      gidan id string
      hatch[ ‘/’ | ‘\’ | ‘|’ | ‘-‘ | ‘+’ | ‘x’ | ‘o’ | ‘O’ | ‘.’ | ‘*’ ]
      labelstring or anything printable with ‘%s’ conversion.
      linestyle or linestyles or dashes[‘solid’ | ‘dashed’, ‘dashdot’, ‘dotted’ | (offset, on-off-dash-seq) ]
      linewidth or lw or linewidthsfloat or sequence of floats
      lod[True | False]
      normunknown
      offset_positionunknown
      offsetsfloat or sequence of floats
      pathsunknown
      picker[None|float|boolean|callable]
      pickradiusunknown
      rasterized[True | False | None]
      segmentsunknown
      snapunknown
      transformTransform instance
      urla url string
      urlsunknown
      vertsunknown
      visible[True | False]
      zorderany number
      -
      -

      Example:

      -

      (Source code, png, hires.png, pdf)

      -
      -../_images/eventplot_demo.png -
      -
      - -
      -
      -fill(*args, **kwargs)
      -

      Plot filled polygons.

      -

      Call signature:

      -
      fill(*args, **kwargs)
      -
      -
      -

      args is a variable length argument, allowing for multiple -x, y pairs with an optional color format string; see -plot() for details on the argument -parsing. For example, to plot a polygon with vertices at x, -y in blue.:

      -
      ax.fill(x,y, 'b' )
      -
      -
      -

      An arbitrary number of x, y, color groups can be specified:

      -
      ax.fill(x1, y1, 'g', x2, y2, 'r')
      -
      -
      -

      Return value is a list of Patch -instances that were added.

      -

      The same color strings that plot() -supports are supported by the fill format string.

      -

      If you would like to fill below a curve, e.g., shade a region -between 0 and y along x, use fill_between()

      -

      The closed kwarg will close the polygon when True (default).

      -

      kwargs control the Polygon properties:

      -
      -
      ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      PropertyDescription
      agg_filterunknown
      alphafloat or None
      animated[True | False]
      antialiased or aa[True | False] or None for default
      axesan Axes instance
      clip_boxa matplotlib.transforms.Bbox instance
      clip_on[True | False]
      clip_path[ (Path, Transform) | Patch | None ]
      colormatplotlib color spec
      containsa callable function
      edgecolor or ecmpl color spec, or None for default, or ‘none’ for no color
      facecolor or fcmpl color spec, or None for default, or ‘none’ for no color
      figurea matplotlib.figure.Figure instance
      fill[True | False]
      gidan id string
      hatch[‘/’ | ‘\’ | ‘|’ | ‘-‘ | ‘+’ | ‘x’ | ‘o’ | ‘O’ | ‘.’ | ‘*’]
      labelstring or anything printable with ‘%s’ conversion.
      linestyle or ls[‘solid’ | ‘dashed’ | ‘dashdot’ | ‘dotted’]
      linewidth or lwfloat or None for default
      lod[True | False]
      path_effectsunknown
      picker[None|float|boolean|callable]
      rasterized[True | False | None]
      snapunknown
      transformTransform instance
      urla url string
      visible[True | False]
      zorderany number
      -
      -

      Example:

      -

      (Source code, png, hires.png, pdf)

      -
      -../_images/fill_demo.png -
      -
      - -
      -
      -fill_between(x, y1, y2=0, where=None, interpolate=False, **kwargs)
      -

      Make filled polygons between two curves.

      -

      Call signature:

      -
      fill_between(x, y1, y2=0, where=None, **kwargs)
      -
      -
      -

      Create a PolyCollection -filling the regions between y1 and y2 where -where==True

      -
      -
      -
      x :
      -
      An N-length array of the x data
      -
      y1 :
      -
      An N-length array (or scalar) of the y data
      -
      y2 :
      -
      An N-length array (or scalar) of the y data
      -
      where :
      -
      If None, default to fill between everywhere. If not None, -it is an N-length numpy boolean array and the fill will -only happen over the regions where where==True.
      -
      interpolate :
      -
      If True, interpolate between the two lines to find the -precise point of intersection. Otherwise, the start and -end points of the filled region will only occur on explicit -values in the x array.
      -
      kwargs :
      -
      Keyword args passed on to the -PolyCollection.
      -
      -
      -

      kwargs control the Polygon properties:

      -
      -
      ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      PropertyDescription
      agg_filterunknown
      alphafloat or None
      animated[True | False]
      antialiased or antialiasedsBoolean or sequence of booleans
      arrayunknown
      axesan Axes instance
      clima length 2 sequence of floats
      clip_boxa matplotlib.transforms.Bbox instance
      clip_on[True | False]
      clip_path[ (Path, Transform) | Patch | None ]
      cmapa colormap or registered colormap name
      colormatplotlib color arg or sequence of rgba tuples
      colorbarunknown
      containsa callable function
      edgecolor or edgecolorsmatplotlib color arg or sequence of rgba tuples
      facecolor or facecolorsmatplotlib color arg or sequence of rgba tuples
      figurea matplotlib.figure.Figure instance
      gidan id string
      hatch[ ‘/’ | ‘\’ | ‘|’ | ‘-‘ | ‘+’ | ‘x’ | ‘o’ | ‘O’ | ‘.’ | ‘*’ ]
      labelstring or anything printable with ‘%s’ conversion.
      linestyle or linestyles or dashes[‘solid’ | ‘dashed’, ‘dashdot’, ‘dotted’ | (offset, on-off-dash-seq) ]
      linewidth or lw or linewidthsfloat or sequence of floats
      lod[True | False]
      normunknown
      offset_positionunknown
      offsetsfloat or sequence of floats
      pathsunknown
      picker[None|float|boolean|callable]
      pickradiusunknown
      rasterized[True | False | None]
      snapunknown
      transformTransform instance
      urla url string
      urlsunknown
      visible[True | False]
      zorderany number
      -
      -

      (Source code)

      -
      -../_images/fill_between_demo_00.png -

      (png, hires.png, pdf)

      -
      -
      -../_images/fill_between_demo_01.png -

      (png, hires.png, pdf)

      -
      -
      -../_images/fill_between_demo_02.png -

      (png, hires.png, pdf)

      -
      -
      -

      See also

      -
      -
      fill_betweenx()
      -
      for filling between two sets of x-values
      -
      -
      -
      - -
      -
      -fill_betweenx(y, x1, x2=0, where=None, **kwargs)
      -

      Make filled polygons between two horizontal curves.

      -

      Call signature:

      -
      fill_betweenx(y, x1, x2=0, where=None, **kwargs)
      -
      -
      -

      Create a PolyCollection -filling the regions between x1 and x2 where -where==True

      -
      -
      -
      y :
      -
      An N-length array of the y data
      -
      x1 :
      -
      An N-length array (or scalar) of the x data
      -
      x2 :
      -
      An N-length array (or scalar) of the x data
      -
      where :
      -
      If None, default to fill between everywhere. If not None, -it is a N length numpy boolean array and the fill will -only happen over the regions where where==True
      -
      kwargs :
      -
      keyword args passed on to the -PolyCollection
      -
      -
      -

      kwargs control the Polygon properties:

      -
      -
      ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      PropertyDescription
      agg_filterunknown
      alphafloat or None
      animated[True | False]
      antialiased or antialiasedsBoolean or sequence of booleans
      arrayunknown
      axesan Axes instance
      clima length 2 sequence of floats
      clip_boxa matplotlib.transforms.Bbox instance
      clip_on[True | False]
      clip_path[ (Path, Transform) | Patch | None ]
      cmapa colormap or registered colormap name
      colormatplotlib color arg or sequence of rgba tuples
      colorbarunknown
      containsa callable function
      edgecolor or edgecolorsmatplotlib color arg or sequence of rgba tuples
      facecolor or facecolorsmatplotlib color arg or sequence of rgba tuples
      figurea matplotlib.figure.Figure instance
      gidan id string
      hatch[ ‘/’ | ‘\’ | ‘|’ | ‘-‘ | ‘+’ | ‘x’ | ‘o’ | ‘O’ | ‘.’ | ‘*’ ]
      labelstring or anything printable with ‘%s’ conversion.
      linestyle or linestyles or dashes[‘solid’ | ‘dashed’, ‘dashdot’, ‘dotted’ | (offset, on-off-dash-seq) ]
      linewidth or lw or linewidthsfloat or sequence of floats
      lod[True | False]
      normunknown
      offset_positionunknown
      offsetsfloat or sequence of floats
      pathsunknown
      picker[None|float|boolean|callable]
      pickradiusunknown
      rasterized[True | False | None]
      snapunknown
      transformTransform instance
      urla url string
      urlsunknown
      visible[True | False]
      zorderany number
      -
      -

      (Source code)

      -
      -../_images/fill_betweenx_demo_00.png -

      (png, hires.png, pdf)

      -
      -
      -../_images/fill_betweenx_demo_01.png -

      (png, hires.png, pdf)

      -
      -
      -

      See also

      -
      -
      fill_between()
      -
      for filling between two sets of y-values
      -
      -
      -
      - -
      -
      -format_coord(x, y)
      -

      Return a format string formatting the x, y coord

      -
      - -
      -
      -format_xdata(x)
      -

      Return x string formatted. This function will use the attribute -self.fmt_xdata if it is callable, else will fall back on the xaxis -major formatter

      -
      - -
      -
      -format_ydata(y)
      -

      Return y string formatted. This function will use the -fmt_ydata attribute if it is callable, else will fall -back on the yaxis major formatter

      -
      - -
      -
      -get_adjustable()
      -
      - -
      -
      -get_anchor()
      -
      - -
      -
      -get_aspect()
      -
      - -
      -
      -get_autoscale_on()
      -

      Get whether autoscaling is applied for both axes on plot commands

      -
      - -
      -
      -get_autoscalex_on()
      -

      Get whether autoscaling for the x-axis is applied on plot commands

      -
      - -
      -
      -get_autoscaley_on()
      -

      Get whether autoscaling for the y-axis is applied on plot commands

      -
      - -
      -
      -get_axes_locator()
      -

      return axes_locator

      -
      - -
      -
      -get_axis_bgcolor()
      -

      Return the axis background color

      -
      - -
      -
      -get_axisbelow()
      -

      Get whether axis below is true or not

      -
      - -
      -
      -get_children()
      -

      return a list of child artists

      -
      - -
      -
      -get_cursor_props()
      -

      Return the cursor propertiess as a (linewidth, color) -tuple, where linewidth is a float and color is an RGBA -tuple

      -
      - -
      -
      -get_data_ratio()
      -

      Returns the aspect ratio of the raw data.

      -

      This method is intended to be overridden by new projection -types.

      -
      - -
      -
      -get_data_ratio_log()
      -

      Returns the aspect ratio of the raw data in log scale. -Will be used when both axis scales are in log.

      -
      - -
      -
      -get_default_bbox_extra_artists()
      -
      - -
      -
      -get_frame()
      -

      Return the axes Rectangle frame

      -
      - -
      -
      -get_frame_on()
      -

      Get whether the axes rectangle patch is drawn

      -
      - -
      -
      -get_images()
      -

      return a list of Axes images contained by the Axes

      -
      - -
      -
      -get_legend()
      -

      Return the legend.Legend instance, or None if no legend is defined

      -
      - -
      -
      -get_legend_handles_labels(legend_handler_map=None)
      -

      Return handles and labels for legend

      -

      ax.legend() is equivalent to

      -
      h, l = ax.get_legend_handles_labels()
      -ax.legend(h, l)
      -
      -
      -
      - -
      -
      -get_lines()
      -

      Return a list of lines contained by the Axes

      -
      - -
      -
      -get_navigate()
      -

      Get whether the axes responds to navigation commands

      -
      - -
      -
      -get_navigate_mode()
      -

      Get the navigation toolbar button status: ‘PAN’, ‘ZOOM’, or None

      -
      - -
      -
      -get_position(original=False)
      -

      Return the a copy of the axes rectangle as a Bbox

      -
      - -
      -
      -get_rasterization_zorder()
      -

      Get zorder value below which artists will be rasterized

      -
      - -
      -
      -get_renderer_cache()
      -
      - -
      -
      -get_shared_x_axes()
      -

      Return a copy of the shared axes Grouper object for x axes

      -
      - -
      -
      -get_shared_y_axes()
      -

      Return a copy of the shared axes Grouper object for y axes

      -
      - -
      -
      -get_tightbbox(renderer, call_axes_locator=True)
      -

      Return the tight bounding box of the axes. -The dimension of the Bbox in canvas coordinate.

      -

      If call_axes_locator is False, it does not call the -_axes_locator attribute, which is necessary to get the correct -bounding box. call_axes_locator==False can be used if the -caller is only intereted in the relative size of the tightbbox -compared to the axes bbox.

      -
      - -
      -
      -get_title(loc='center')
      -

      Get an axes title.

      -

      Get one of the three available axes titles. The available titles -are positioned above the axes in the center, flush with the left -edge, and flush with the right edge.

      - --- - - - - - -
      Parameters :

      loc : {‘center’, ‘left’, ‘right’}, str, optional

      -
      -

      Which title to get, defaults to ‘center’

      -
      -
      Returns :

      title: str :

      -
      -

      The title text string.

      -
      -
      -
      - -
      -
      -get_window_extent(*args, **kwargs)
      -

      get the axes bounding box in display space; args and -kwargs are empty

      -
      - -
      -
      -get_xaxis()
      -

      Return the XAxis instance

      -
      - -
      -
      -get_xaxis_text1_transform(pad_points)
      -

      Get the transformation used for drawing x-axis labels, which -will add the given amount of padding (in points) between the -axes and the label. The x-direction is in data coordinates -and the y-direction is in axis coordinates. Returns a -3-tuple of the form:

      -
      (transform, valign, halign)
      -
      -
      -

      where valign and halign are requested alignments for the -text.

      -
      -

      Note

      -

      This transformation is primarily used by the -Axis class, and is meant to be -overridden by new kinds of projections that may need to -place axis elements in different locations.

      -
      -
      - -
      -
      -get_xaxis_text2_transform(pad_points)
      -

      Get the transformation used for drawing the secondary x-axis -labels, which will add the given amount of padding (in points) -between the axes and the label. The x-direction is in data -coordinates and the y-direction is in axis coordinates. -Returns a 3-tuple of the form:

      -
      (transform, valign, halign)
      -
      -
      -

      where valign and halign are requested alignments for the -text.

      -
      -

      Note

      -

      This transformation is primarily used by the -Axis class, and is meant to be -overridden by new kinds of projections that may need to -place axis elements in different locations.

      -
      -
      - -
      -
      -get_xaxis_transform(which='grid')
      -

      Get the transformation used for drawing x-axis labels, ticks -and gridlines. The x-direction is in data coordinates and the -y-direction is in axis coordinates.

      -
      -

      Note

      -

      This transformation is primarily used by the -Axis class, and is meant to be -overridden by new kinds of projections that may need to -place axis elements in different locations.

      -
      -
      - -
      -
      -get_xbound()
      -

      Returns the x-axis numerical bounds where:

      -
      lowerBound < upperBound
      -
      -
      -
      - -
      -
      -get_xgridlines()
      -

      Get the x grid lines as a list of Line2D instances

      -
      - -
      -
      -get_xlabel()
      -

      Get the xlabel text string.

      -
      - -
      -
      -get_xlim()
      -

      Get the x-axis range [left, right]

      -
      - -
      -
      -get_xmajorticklabels()
      -

      Get the xtick labels as a list of Text -instances.

      -
      - -
      -
      -get_xminorticklabels()
      -

      Get the x minor tick labels as a list of -matplotlib.text.Text instances.

      -
      - -
      -
      -get_xscale()
      -

      Return the xaxis scale string: linear, log, symlog

      -
      - -
      -
      -get_xticklabels(minor=False)
      -

      Get the x tick labels as a list of Text -instances.

      -
      - -
      -
      -get_xticklines()
      -

      Get the xtick lines as a list of Line2D instances

      -
      - -
      -
      -get_xticks(minor=False)
      -

      Return the x ticks as a list of locations

      -
      - -
      -
      -get_yaxis()
      -

      Return the YAxis instance

      -
      - -
      -
      -get_yaxis_text1_transform(pad_points)
      -

      Get the transformation used for drawing y-axis labels, which -will add the given amount of padding (in points) between the -axes and the label. The x-direction is in axis coordinates -and the y-direction is in data coordinates. Returns a 3-tuple -of the form:

      -
      (transform, valign, halign)
      -
      -
      -

      where valign and halign are requested alignments for the -text.

      -
      -

      Note

      -

      This transformation is primarily used by the -Axis class, and is meant to be -overridden by new kinds of projections that may need to -place axis elements in different locations.

      -
      -
      - -
      -
      -get_yaxis_text2_transform(pad_points)
      -

      Get the transformation used for drawing the secondary y-axis -labels, which will add the given amount of padding (in points) -between the axes and the label. The x-direction is in axis -coordinates and the y-direction is in data coordinates. -Returns a 3-tuple of the form:

      -
      (transform, valign, halign)
      -
      -
      -

      where valign and halign are requested alignments for the -text.

      -
      -

      Note

      -

      This transformation is primarily used by the -Axis class, and is meant to be -overridden by new kinds of projections that may need to -place axis elements in different locations.

      -
      -
      - -
      -
      -get_yaxis_transform(which='grid')
      -

      Get the transformation used for drawing y-axis labels, ticks -and gridlines. The x-direction is in axis coordinates and the -y-direction is in data coordinates.

      -
      -

      Note

      -

      This transformation is primarily used by the -Axis class, and is meant to be -overridden by new kinds of projections that may need to -place axis elements in different locations.

      -
      -
      - -
      -
      -get_ybound()
      -

      Return y-axis numerical bounds in the form of -lowerBound < upperBound

      -
      - -
      -
      -get_ygridlines()
      -

      Get the y grid lines as a list of Line2D instances

      -
      - -
      -
      -get_ylabel()
      -

      Get the ylabel text string.

      -
      - -
      -
      -get_ylim()
      -

      Get the y-axis range [bottom, top]

      -
      - -
      -
      -get_ymajorticklabels()
      -

      Get the major y tick labels as a list of -Text instances.

      -
      - -
      -
      -get_yminorticklabels()
      -

      Get the minor y tick labels as a list of -Text instances.

      -
      - -
      -
      -get_yscale()
      -

      Return the yaxis scale string: linear, log, symlog

      -
      - -
      -
      -get_yticklabels(minor=False)
      -

      Get the y tick labels as a list of Text -instances

      -
      - -
      -
      -get_yticklines()
      -

      Get the ytick lines as a list of Line2D instances

      -
      - -
      -
      -get_yticks(minor=False)
      -

      Return the y ticks as a list of locations

      -
      - -
      -
      -grid(b=None, which='major', axis='both', **kwargs)
      -

      Turn the axes grids on or off.

      -

      Call signature:

      -
      grid(self, b=None, which='major', axis='both', **kwargs)
      -
      -
      -

      Set the axes grids on or off; b is a boolean. (For MATLAB -compatibility, b may also be a string, ‘on’ or ‘off’.)

      -

      If b is None and len(kwargs)==0, toggle the grid state. If -kwargs are supplied, it is assumed that you want a grid and b -is thus set to True.

      -

      which can be ‘major’ (default), ‘minor’, or ‘both’ to control -whether major tick grids, minor tick grids, or both are affected.

      -

      axis can be ‘both’ (default), ‘x’, or ‘y’ to control which -set of gridlines are drawn.

      -

      kwargs are used to set the grid line properties, eg:

      -
      ax.grid(color='r', linestyle='-', linewidth=2)
      -
      -
      -

      Valid Line2D kwargs are

      -
      -
      ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      PropertyDescription
      agg_filterunknown
      alphafloat (0.0 transparent through 1.0 opaque)
      animated[True | False]
      antialiased or aa[True | False]
      axesan Axes instance
      clip_boxa matplotlib.transforms.Bbox instance
      clip_on[True | False]
      clip_path[ (Path, Transform) | Patch | None ]
      color or cany matplotlib color
      containsa callable function
      dash_capstyle[‘butt’ | ‘round’ | ‘projecting’]
      dash_joinstyle[‘miter’ | ‘round’ | ‘bevel’]
      dashessequence of on/off ink in points
      data2D array (rows are x, y) or two 1D arrays
      drawstyle[‘default’ | ‘steps’ | ‘steps-pre’ | ‘steps-mid’ | ‘steps-post’]
      figurea matplotlib.figure.Figure instance
      fillstyle[‘full’ | ‘left’ | ‘right’ | ‘bottom’ | ‘top’ | ‘none’]
      gidan id string
      labelstring or anything printable with ‘%s’ conversion.
      linestyle or ls['-' | '--' | '-.' | ':' | 'None' | ' ' | ''] and any drawstyle in combination with a linestyle, e.g., 'steps--'.
      linewidth or lwfloat value in points
      lod[True | False]
      markerunknown
      markeredgecolor or mecany matplotlib color
      markeredgewidth or mewfloat value in points
      markerfacecolor or mfcany matplotlib color
      markerfacecoloralt or mfcaltany matplotlib color
      markersize or msfloat
      markeveryNone | integer | (startind, stride)
      pickerfloat distance in points or callable pick function fn(artist, event)
      pickradiusfloat distance in points
      rasterized[True | False | None]
      snapunknown
      solid_capstyle[‘butt’ | ‘round’ | ‘projecting’]
      solid_joinstyle[‘miter’ | ‘round’ | ‘bevel’]
      transforma matplotlib.transforms.Transform instance
      urla url string
      visible[True | False]
      xdata1D array
      ydata1D array
      zorderany number
      -
      -
      - -
      -
      -has_data()
      -

      Return True if any artists have been added to axes.

      -

      This should not be used to determine whether the dataLim -need to be updated, and may not actually be useful for -anything.

      -
      - -
      -
      -hexbin(x, y, C=None, gridsize=100, bins=None, xscale='linear', yscale='linear', extent=None, cmap=None, norm=None, vmin=None, vmax=None, alpha=None, linewidths=None, edgecolors='none', reduce_C_function=<function mean at 0x22f5488>, mincnt=None, marginals=False, **kwargs)
      -

      Make a hexagonal binning plot.

      -

      Call signature:

      -
      hexbin(x, y, C = None, gridsize = 100, bins = None,
      -       xscale = 'linear', yscale = 'linear',
      -       cmap=None, norm=None, vmin=None, vmax=None,
      -       alpha=None, linewidths=None, edgecolors='none'
      -       reduce_C_function = np.mean, mincnt=None, marginals=True
      -       **kwargs)
      -
      -

      Make a hexagonal binning plot of x versus y, where x, -y are 1-D sequences of the same length, N. If C is None -(the default), this is a histogram of the number of occurences -of the observations at (x[i],y[i]).

      -

      If C is specified, it specifies values at the coordinate -(x[i],y[i]). These values are accumulated for each hexagonal -bin and then reduced according to reduce_C_function, which -defaults to numpy’s mean function (np.mean). (If C is -specified, it must also be a 1-D sequence of the same length -as x and y.)

      -

      x, y and/or C may be masked arrays, in which case only -unmasked points will be plotted.

      -

      Optional keyword arguments:

      -
      -
      gridsize: [ 100 | integer ]
      -
      The number of hexagons in the x-direction, default is -100. The corresponding number of hexagons in the -y-direction is chosen such that the hexagons are -approximately regular. Alternatively, gridsize can be a -tuple with two elements specifying the number of hexagons -in the x-direction and the y-direction.
      -
      bins: [ None | ‘log’ | integer | sequence ]
      -

      If None, no binning is applied; the color of each hexagon -directly corresponds to its count value.

      -

      If ‘log’, use a logarithmic scale for the color -map. Internally, is used to -determine the hexagon color.

      -

      If an integer, divide the counts in the specified number -of bins, and color the hexagons accordingly.

      -

      If a sequence of values, the values of the lower bound of -the bins to be used.

      -
      -
      xscale: [ ‘linear’ | ‘log’ ]
      -
      Use a linear or log10 scale on the horizontal axis.
      -
      scale: [ ‘linear’ | ‘log’ ]
      -
      Use a linear or log10 scale on the vertical axis.
      -
      mincnt: [ None | a positive integer ]
      -
      If not None, only display cells with more than mincnt -number of points in the cell
      -
      marginals: [ True | False ]
      -
      if marginals is True, plot the marginal density as -colormapped rectagles along the bottom of the x-axis and -left of the y-axis
      -
      extent: [ None | scalars (left, right, bottom, top) ]
      -
      The limits of the bins. The default assigns the limits -based on gridsize, x, y, xscale and yscale.
      -
      -

      Other keyword arguments controlling color mapping and normalization -arguments:

      -
      -
      cmap: [ None | Colormap ]
      -
      a matplotlib.colors.Colormap instance. If None, -defaults to rc image.cmap.
      -
      norm: [ None | Normalize ]
      -
      matplotlib.colors.Normalize instance is used to -scale luminance data to 0,1.
      -
      vmin / vmax: scalar
      -
      vmin and vmax are used in conjunction with norm to normalize -luminance data. If either are None, the min and max of the color -array C is used. Note if you pass a norm instance, your settings -for vmin and vmax will be ignored.
      -
      alpha: scalar between 0 and 1, or None
      -
      the alpha value for the patches
      -
      linewidths: [ None | scalar ]
      -
      If None, defaults to rc lines.linewidth. Note that this -is a tuple, and if you set the linewidths argument you -must set it as a sequence of floats, as required by -RegularPolyCollection.
      -
      -

      Other keyword arguments controlling the Collection properties:

      -
      -
      edgecolors: [ None | 'none' | mpl color | color sequence ]
      -

      If 'none', draws the edges in the same color as the fill color. -This is the default, as it avoids unsightly unpainted pixels -between the hexagons.

      -

      If None, draws the outlines in the default color.

      -

      If a matplotlib color arg or sequence of rgba tuples, draws the -outlines in the specified color.

      -
      -
      -

      Here are the standard descriptions of all the -Collection kwargs:

      -
      -
      ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      PropertyDescription
      agg_filterunknown
      alphafloat or None
      animated[True | False]
      antialiased or antialiasedsBoolean or sequence of booleans
      arrayunknown
      axesan Axes instance
      clima length 2 sequence of floats
      clip_boxa matplotlib.transforms.Bbox instance
      clip_on[True | False]
      clip_path[ (Path, Transform) | Patch | None ]
      cmapa colormap or registered colormap name
      colormatplotlib color arg or sequence of rgba tuples
      colorbarunknown
      containsa callable function
      edgecolor or edgecolorsmatplotlib color arg or sequence of rgba tuples
      facecolor or facecolorsmatplotlib color arg or sequence of rgba tuples
      figurea matplotlib.figure.Figure instance
      gidan id string
      hatch[ ‘/’ | ‘\’ | ‘|’ | ‘-‘ | ‘+’ | ‘x’ | ‘o’ | ‘O’ | ‘.’ | ‘*’ ]
      labelstring or anything printable with ‘%s’ conversion.
      linestyle or linestyles or dashes[‘solid’ | ‘dashed’, ‘dashdot’, ‘dotted’ | (offset, on-off-dash-seq) ]
      linewidth or lw or linewidthsfloat or sequence of floats
      lod[True | False]
      normunknown
      offset_positionunknown
      offsetsfloat or sequence of floats
      pathsunknown
      picker[None|float|boolean|callable]
      pickradiusunknown
      rasterized[True | False | None]
      snapunknown
      transformTransform instance
      urla url string
      urlsunknown
      visible[True | False]
      zorderany number
      -
      -

      The return value is a -PolyCollection instance; use -get_array() on -this PolyCollection to get -the counts in each hexagon. If marginals is True, horizontal -bar and vertical bar (both PolyCollections) will be attached -to the return collection as attributes hbar and vbar.

      -

      Example:

      -

      (Source code, png, hires.png, pdf)

      -
      -../_images/hexbin_demo.png -
      -
      - -
      -
      -hist(x, bins=10, range=None, normed=False, weights=None, cumulative=False, bottom=None, histtype='bar', align='mid', orientation='vertical', rwidth=None, log=False, color=None, label=None, stacked=False, **kwargs)
      -

      Plot a histogram.

      -

      Compute and draw the histogram of x. The return value is a -tuple (n, bins, patches) or ([n0, n1, ...], bins, -[patches0, patches1,...]) if the input contains multiple -data.

      -

      Multiple data can be provided via x as a list of datasets -of potentially different length ([x0, x1, ...]), or as -a 2-D ndarray in which each column is a dataset. Note that -the ndarray form is transposed relative to the list form.

      -

      Masked arrays are not supported at present.

      - --- - - - - - - - - -
      Parameters :

      x : array_like, shape (n, )

      -
      -

      Input values.

      -
      -

      bins : integer or array_like, optional, default: 10

      -
      -

      If an integer is given, bins + 1 bin edges are returned, -consistently with numpy.histogram() for numpy version >= -1.3. -Unequally spaced bins are supported if bins is a sequence.

      -
      -

      range : tuple, optional, default: None

      -
      -

      The lower and upper range of the bins. Lower and upper outliers -are ignored. If not provided, range is (x.min(), x.max()). Range -has no effect if bins is a sequence.

      -

      If bins is a sequence or range is specified, autoscaling -is based on the specified bin range instead of the -range of x.

      -
      -

      normed : boolean, optional, default: False

      -
      -

      If True, the first element of the return tuple will -be the counts normalized to form a probability density, i.e., -n/(len(x)`dbin), ie the integral of the histogram will sum to -1.

      -
      -

      weights : array_like, shape (n, ), optional, default: None

      -
      -

      An array of weights, of the same shape as x. Each value in x -only contributes its associated weight towards the bin count -(instead of 1). If normed is True, the weights are normalized, -so that the integral of the density over the range remains 1.

      -
      -

      cumulative : boolean, optional, default

      -
      -

      If True, then a histogram is computed where each bin gives the -counts in that bin plus all bins for smaller values. The last bin -gives the total number of datapoints. If normed is also True -then the histogram is normalized such that the last bin equals 1. -If cumulative evaluates to less than 0 (e.g., -1), the direction -of accumulation is reversed. In this case, if normed is also -True, then the histogram is normalized such that the first bin -equals 1.

      -
      -

      histtype : [‘bar’ | ‘barstacked’ | ‘step’ | ‘stepfilled’], optional

      -
      -

      The type of histogram to draw.

      -
        -
      • ‘bar’ is a traditional bar-type histogram. If multiple data -are given the bars are aranged side by side.
      • -
      • ‘barstacked’ is a bar-type histogram where multiple -data are stacked on top of each other.
      • -
      • ‘step’ generates a lineplot that is by default -unfilled.
      • -
      • ‘stepfilled’ generates a lineplot that is by default -filled.
      • -
      -
      -

      align : [‘left’ | ‘mid’ | ‘right’], optional, default: ‘mid’

      -
      -

      Controls how the histogram is plotted.

      -
      -
        -
      • ‘left’: bars are centered on the left bin edges.
      • -
      • ‘mid’: bars are centered between the bin edges.
      • -
      • ‘right’: bars are centered on the right bin edges.
      • -
      -
      -
      -

      orientation : [‘horizontal’ | ‘vertical’], optional

      -
      -

      If ‘horizontal’, barh will be used for -bar-type histograms and the bottom kwarg will be the left edges.

      -
      -

      rwidth : scalar, optional, default: None

      -
      -

      The relative width of the bars as a fraction of the bin width. If -None, automatically compute the width. Ignored if histtype = -‘step’ or ‘stepfilled’.

      -
      -

      log : boolean, optional, default

      -
      -

      If True, the histogram axis will be set to a log scale. If log -is True and x is a 1D array, empty bins will be filtered out -and only the non-empty (n, bins, patches) will be returned.

      -
      -

      color : color or array_like of colors, optional, default: None

      -
      -

      Color spec or sequence of color specs, one per dataset. Default -(None) uses the standard line color sequence.

      -
      -

      label : string, optional, default: ‘’

      -
      -

      String, or sequence of strings to match multiple datasets. Bar -charts yield multiple patches per dataset, but only the first gets -the label, so that the legend command will work as expected.

      -
      -

      stacked : boolean, optional, default

      -
      -

      If True, multiple data are stacked on top of each other If -False multiple data are aranged side by side if histtype is -‘bar’ or on top of each other if histtype is ‘step’

      -
      -
      Returns :

      (n, bins, patches) or ([n0, n1, ...], bins, [patches0, patches1,...]) :

      -
      Other Parameters:
       

      kwargs : Patch properties

      -
      -
      -

      See also

      -
      -
      hist2d
      -
      2D histograms
      -
      -
      -

      Notes

      -

      Until numpy release 1.5, the underlying numpy histogram function was -incorrect with normed`=`True if bin sizes were unequal. MPL -inherited that error. It is now corrected within MPL when using -earlier numpy versions

      -

      Examples

      -

      (Source code, png, hires.png, pdf)

      -
      -../_images/histogram_demo_features.png -
      -
      - -
      -
      -hist2d(x, y, bins=10, range=None, normed=False, weights=None, cmin=None, cmax=None, **kwargs)
      -

      Make a 2D histogram plot.

      - --- - - - - - - - - -
      Parameters :

      x, y: array_like, shape (n, ) :

      -
      -

      Input values

      -
      -

      bins: [None | int | [int, int] | array_like | [array, array]] :

      -
      -

      The bin specification:

      -
      -
        -
      • If int, the number of bins for the two dimensions -(nx=ny=bins).
      • -
      • If [int, int], the number of bins in each dimension -(nx, ny = bins).
      • -
      • If array_like, the bin edges for the two dimensions -(x_edges=y_edges=bins).
      • -
      • If [array, array], the bin edges in each dimension -(x_edges, y_edges = bins).
      • -
      -
      -

      The default value is 10.

      -
      -

      range : array_like shape(2, 2), optional, default: None

      -
      -

      The leftmost and rightmost edges of the bins along each dimension -(if not specified explicitly in the bins parameters): [[xmin, -xmax], [ymin, ymax]]. All values outside of this range will be -considered outliers and not tallied in the histogram.

      -
      -

      normed : boolean, optional, default: False

      -
      -

      Normalize histogram.

      -
      -

      weights : array_like, shape (n, ), optional, default: None

      -
      -

      An array of values w_i weighing each sample (x_i, y_i).

      -
      -

      cmin : scalar, optional, default: None

      -
      -

      All bins that has count less than cmin will not be displayed and -these count values in the return value count histogram will also -be set to nan upon return

      -
      -

      cmax : scalar, optional, default: None

      -
      -

      All bins that has count more than cmax will not be displayed (set -to none before passing to imshow) and these count values in the -return value count histogram will also be set to nan upon return

      -
      -
      Returns :

      The return value is ``(counts, xedges, yedges, Image)``. :

      -
      Other Parameters:
       

      kwargs : pcolorfast() properties.

      -
      -
      -

      See also

      -
      -
      hist
      -
      1D histogram
      -
      -
      -

      Notes

      -

      Rendering the histogram with a logarithmic color scale is -accomplished by passing a colors.LogNorm instance to -the norm keyword argument.

      -

      Examples

      -

      (Source code, png, hires.png, pdf)

      -
      -../_images/hist2d_demo.png -
      -
      - -
      -
      -hlines(y, xmin, xmax, colors='k', linestyles='solid', label='', **kwargs)
      -

      Plot horizontal lines.

      -

      Plot horizontal lines at each y from xmin to xmax.

      - --- - - - - - - - - -
      Parameters :

      y : scalar or 1D array_like

      -
      -

      y-indexes where to plot the lines.

      -
      -

      xmin, xmax : scalar or 1D array_like

      -
      -

      Respective beginning and end of each line. If scalars are -provided, all lines will have same length.

      -
      -

      colors : array_like of colors, optional, default: ‘k’

      -

      linestyles : [‘solid’ | ‘dashed’ | ‘dashdot’ | ‘dotted’], optional

      -

      label : string, optional, default: ‘’

      -
      Returns :

      lines : LineCollection

      -
      Other Parameters:
       

      kwargs : LineCollection properties.

      -
      -
      -

      See also

      -
      -
      vlines
      -
      vertical lines
      -
      -
      -

      Examples

      -

      (Source code, png, hires.png, pdf)

      -
      -../_images/vline_hline_demo.png -
      -
      - -
      -
      -hold(b=None)
      -

      Call signature:

      -
      hold(b=None)
      -
      -
      -

      Set the hold state. If hold is None (default), toggle the -hold state. Else set the hold state to boolean value b.

      -

      Examples:

      -
      # toggle hold
      -hold()
      -
      -# turn hold on
      -hold(True)
      -
      -# turn hold off
      -hold(False)
      -
      -
      -

      When hold is True, subsequent plot commands will be added to -the current axes. When hold is False, the current axes and -figure will be cleared on the next plot command

      -
      - -
      -
      -imshow(X, cmap=None, norm=None, aspect=None, interpolation=None, alpha=None, vmin=None, vmax=None, origin=None, extent=None, shape=None, filternorm=1, filterrad=4.0, imlim=None, resample=None, url=None, **kwargs)
      -

      Display an image on the axes.

      - --- - - - - - - - - -
      Parameters :

      X : array_like, shape (n, m) or (n, m, 3) or (n, m, 4)

      -
      -

      Display the image in X to current axes. X may be a float -array, a uint8 array or a PIL image. If X is an array, it -can have the following shapes:

      -
        -
      • MxN – luminance (grayscale, float array only)
      • -
      • MxNx3 – RGB (float or uint8 array)
      • -
      • MxNx4 – RGBA (float or uint8 array)
      • -
      -

      The value for each component of MxNx3 and MxNx4 float arrays -should be in the range 0.0 to 1.0; MxN float arrays may be -normalised.

      -
      -

      cmap : Colormap, optional, default: None

      -
      -

      If None, default to rc image.cmap value. cmap is ignored when -X has RGB(A) information

      -
      -

      aspect : [‘auto’ | ‘equal’ | scalar], optional, default: None

      -
      -

      If ‘auto’, changes the image aspect ratio to match that of the -axes.

      -

      If ‘equal’, and extent is None, changes the axes aspect ratio to -match that of the image. If extent is not None, the axes -aspect ratio is changed to match that of the extent.

      -

      If None, default to rc image.aspect value.

      -
      -

      interpolation : string, optional, default: None

      -
      -

      Acceptable values are ‘none’, ‘nearest’, ‘bilinear’, ‘bicubic’, -‘spline16’, ‘spline36’, ‘hanning’, ‘hamming’, ‘hermite’, ‘kaiser’, -‘quadric’, ‘catrom’, ‘gaussian’, ‘bessel’, ‘mitchell’, ‘sinc’, -‘lanczos’

      -

      If interpolation is None, default to rc image.interpolation. -See also the filternorm and filterrad parameters. -If interpolation is ‘none’, then no interpolation is performed -on the Agg, ps and pdf backends. Other backends will fall back to -‘nearest’.

      -
      -

      norm : Normalize, optional, default: None

      -
      -

      A Normalize instance is used to scale -luminance data to 0, 1. If None, use the default -func:normalize. norm is only used if X is an array of -floats.

      -
      -

      vmin, vmax : scalar, optional, default: None

      -
      -

      vmin and vmax are used in conjunction with norm to normalize -luminance data. Note if you pass a norm instance, your -settings for vmin and vmax will be ignored.

      -
      -

      alpha : scalar, optional, default: None

      -
      -

      The alpha blending value, between 0 (transparent) and 1 (opaque)

      -
      -

      origin : [‘upper’ | ‘lower’], optional, default: None

      -
      -

      Place the [0,0] index of the array in the upper left or lower left -corner of the axes. If None, default to rc image.origin.

      -
      -

      extent : scalars (left, right, bottom, top), optional, default: None

      -
      -

      Data limits for the axes. The default assigns zero-based row, -column indices to the x, y centers of the pixels.

      -
      -

      shape : scalars (columns, rows), optional, default: None

      -
      -

      For raw buffer images

      -
      -

      filternorm : scalar, optional, default: 1

      -
      -

      A parameter for the antigrain image resize filter. From the -antigrain documentation, if filternorm = 1, the filter -normalizes integer values and corrects the rounding errors. It -doesn’t do anything with the source floating point values, it -corrects only integers according to the rule of 1.0 which means -that any sum of pixel weights must be equal to 1.0. So, the -filter function must produce a graph of the proper shape.

      -
      -

      filterrad : scalar, optional, default: 4.0

      -
      -

      The filter radius for filters that have a radius parameter, i.e. -when interpolation is one of: ‘sinc’, ‘lanczos’ or ‘blackman’

      -
      -
      Returns :

      image : AxesImage

      -
      Other Parameters:
       

      kwargs : Artist properties.

      -
      -
      -

      See also

      -
      -
      matshow
      -
      Plot a matrix or an array as an image.
      -
      -
      -

      Examples

      -

      (Source code, png, hires.png, pdf)

      -
      -../_images/image_demo.png -
      -
      - -
      -
      -in_axes(mouseevent)
      -

      Return True if the given mouseevent (in display coords) -is in the Axes

      -
      - -
      -
      -invert_xaxis()
      -

      Invert the x-axis.

      -
      - -
      -
      -invert_yaxis()
      -

      Invert the y-axis.

      -
      - -
      -
      -ishold()
      -

      return the HOLD status of the axes

      -
      - -
      -
      -legend(*args, **kwargs)
      -

      Place a legend on the current axes.

      -

      Call signature:

      -
      legend(*args, **kwargs)
      -
      -
      -

      Places legend at location loc. Labels are a sequence of -strings and loc can be a string or an integer specifying the -legend location.

      -

      To make a legend with existing lines:

      -
      legend()
      -
      -
      -

      legend() by itself will try and build a legend using the label -property of the lines/patches/collections. You can set the label of -a line by doing:

      -
      plot(x, y, label='my data')
      -
      -
      -

      or:

      -
      line.set_label('my data').
      -
      -

      If label is set to ‘_nolegend_’, the item will not be shown in -legend.

      -

      To automatically generate the legend from labels:

      -
      legend( ('label1', 'label2', 'label3') )
      -
      -
      -

      To make a legend for a list of lines and labels:

      -
      legend( (line1, line2, line3), ('label1', 'label2', 'label3') )
      -
      -
      -

      To make a legend at a given location, using a location argument:

      -
      legend( ('label1', 'label2', 'label3'), loc='upper left')
      -
      -
      -

      or:

      -
      legend((line1, line2, line3), ('label1', 'label2', 'label3'), loc=2)
      -
      -
      -

      The location codes are

      -
      -
      ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      Location StringLocation Code
      ‘best’0
      ‘upper right’1
      ‘upper left’2
      ‘lower left’3
      ‘lower right’4
      ‘right’5
      ‘center left’6
      ‘center right’7
      ‘lower center’8
      ‘upper center’9
      ‘center’10
      -
      -

      Users can specify any arbitrary location for the legend using the -bbox_to_anchor keyword argument. bbox_to_anchor can be an instance -of BboxBase(or its derivatives) or a tuple of 2 or 4 floats. -For example,

      -
      -
      loc = ‘upper right’, bbox_to_anchor = (0.5, 0.5)
      -

      will place the legend so that the upper right corner of the legend at -the center of the axes.

      -

      The legend location can be specified in other coordinate, by using the -bbox_transform keyword.

      -

      The loc itslef can be a 2-tuple giving x,y of the lower-left corner of -the legend in axes coords (bbox_to_anchor is ignored).

      -

      Keyword arguments:

      -
      -
      -
      prop: [ None | FontProperties | dict ]
      -
      A matplotlib.font_manager.FontProperties -instance. If prop is a dictionary, a new instance will be -created with prop. If None, use rc settings.
      -
      fontsize: [size in points | ‘xx-small’ | ‘x-small’ | ‘small’ |
      -
      -
      ‘medium’ | ‘large’ | ‘x-large’ | ‘xx-large’]
      -

      Set the font size. May be either a size string, relative to -the default font size, or an absolute font size in points. This -argument is only used if prop is not specified.

      -
      -
      numpoints: integer
      -
      The number of points in the legend for line
      -
      scatterpoints: integer
      -
      The number of points in the legend for scatter plot
      -
      scatteroffsets: list of floats
      -
      a list of yoffsets for scatter symbols in legend
      -
      markerscale: [ None | scalar ]
      -
      The relative size of legend markers vs. original. If None, -use rc settings.
      -
      frameon: [ True | False ]
      -
      if True, draw a frame around the legend. -The default is set by the rcParam ‘legend.frameon’
      -
      fancybox: [ None | False | True ]
      -
      if True, draw a frame with a round fancybox. If None, -use rc settings
      -
      shadow: [ None | False | True ]
      -
      If True, draw a shadow behind legend. If None, -use rc settings.
      -
      framealpha: [None | float]
      -
      If not None, alpha channel for legend frame. Default None.
      -
      ncol : integer
      -
      number of columns. default is 1
      -
      mode : [ “expand” | None ]
      -
      if mode is “expand”, the legend will be horizontally expanded -to fill the axes area (or bbox_to_anchor)
      -
      bbox_to_anchor: an instance of BboxBase or a tuple of 2 or 4 floats
      -
      the bbox that the legend will be anchored.
      -
      bbox_transform : [ an instance of Transform | None ]
      -
      the transform for the bbox. transAxes if None.
      -
      title : string
      -
      the legend title
      -
      -
      -

      Padding and spacing between various elements use following -keywords parameters. These values are measure in font-size -units. e.g., a fontsize of 10 points and a handlelength=5 -implies a handlelength of 50 points. Values from rcParams -will be used if None.

      - ---- - - - - - - - - - - - - - - - - - - - - - - - - - -
      KeywordDescription
      borderpadthe fractional whitespace inside the legend border
      labelspacingthe vertical space between the legend entries
      handlelengththe length of the legend handles
      handletextpadthe pad between the legend handle and text
      borderaxespadthe pad between the axes and legend border
      columnspacingthe spacing between columns
      -
      -

      Note

      -

      Not all kinds of artist are supported by the legend command. -See Legend guide for details.

      -
      -

      Example:

      -

      (Source code, png, hires.png, pdf)

      -
      -../_images/legend_demo.png -
      -
      -

      See also

      -

      Legend guide.

      -
      -
      - -
      -
      -locator_params(axis='both', tight=None, **kwargs)
      -

      Control behavior of tick locators.

      -

      Keyword arguments:

      -
      -
      axis
      -
      [‘x’ | ‘y’ | ‘both’] Axis on which to operate; -default is ‘both’.
      -
      tight
      -
      [True | False | None] Parameter passed to autoscale_view(). -Default is None, for no change.
      -
      -

      Remaining keyword arguments are passed to directly to the -set_params() method.

      -

      Typically one might want to reduce the maximum number -of ticks and use tight bounds when plotting small -subplots, for example:

      -
      ax.locator_params(tight=True, nbins=4)
      -
      -
      -

      Because the locator is involved in autoscaling, -autoscale_view() is called automatically after -the parameters are changed.

      -

      This presently works only for the -MaxNLocator used -by default on linear axes, but it may be generalized.

      -
      - -
      -
      -loglog(*args, **kwargs)
      -

      Make a plot with log scaling on both the x and y axis.

      -

      Call signature:

      -
      loglog(*args, **kwargs)
      -
      -
      -

      loglog() supports all the keyword -arguments of plot() and -matplotlib.axes.Axes.set_xscale() / -matplotlib.axes.Axes.set_yscale().

      -

      Notable keyword arguments:

      -
      -
      -
      basex/basey: scalar > 1
      -
      Base of the x/y logarithm
      -
      subsx/subsy: [ None | sequence ]
      -
      The location of the minor x/y ticks; None defaults -to autosubs, which depend on the number of decades in the -plot; see matplotlib.axes.Axes.set_xscale() / -matplotlib.axes.Axes.set_yscale() for details
      -
      nonposx/nonposy: [‘mask’ | ‘clip’ ]
      -
      Non-positive values in x or y can be masked as -invalid, or clipped to a very small positive number
      -
      -
      -

      The remaining valid kwargs are -Line2D properties:

      -
      -
      ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      PropertyDescription
      agg_filterunknown
      alphafloat (0.0 transparent through 1.0 opaque)
      animated[True | False]
      antialiased or aa[True | False]
      axesan Axes instance
      clip_boxa matplotlib.transforms.Bbox instance
      clip_on[True | False]
      clip_path[ (Path, Transform) | Patch | None ]
      color or cany matplotlib color
      containsa callable function
      dash_capstyle[‘butt’ | ‘round’ | ‘projecting’]
      dash_joinstyle[‘miter’ | ‘round’ | ‘bevel’]
      dashessequence of on/off ink in points
      data2D array (rows are x, y) or two 1D arrays
      drawstyle[‘default’ | ‘steps’ | ‘steps-pre’ | ‘steps-mid’ | ‘steps-post’]
      figurea matplotlib.figure.Figure instance
      fillstyle[‘full’ | ‘left’ | ‘right’ | ‘bottom’ | ‘top’ | ‘none’]
      gidan id string
      labelstring or anything printable with ‘%s’ conversion.
      linestyle or ls['-' | '--' | '-.' | ':' | 'None' | ' ' | ''] and any drawstyle in combination with a linestyle, e.g., 'steps--'.
      linewidth or lwfloat value in points
      lod[True | False]
      markerunknown
      markeredgecolor or mecany matplotlib color
      markeredgewidth or mewfloat value in points
      markerfacecolor or mfcany matplotlib color
      markerfacecoloralt or mfcaltany matplotlib color
      markersize or msfloat
      markeveryNone | integer | (startind, stride)
      pickerfloat distance in points or callable pick function fn(artist, event)
      pickradiusfloat distance in points
      rasterized[True | False | None]
      snapunknown
      solid_capstyle[‘butt’ | ‘round’ | ‘projecting’]
      solid_joinstyle[‘miter’ | ‘round’ | ‘bevel’]
      transforma matplotlib.transforms.Transform instance
      urla url string
      visible[True | False]
      xdata1D array
      ydata1D array
      zorderany number
      -
      -

      Example:

      -

      (Source code, png, hires.png, pdf)

      -
      -../_images/log_demo.png -
      -
      - -
      -
      -margins(*args, **kw)
      -

      Set or retrieve autoscaling margins.

      -

      signatures:

      -
      margins()
      -
      -
      -

      returns xmargin, ymargin

      -
      margins(margin)
      -
      -margins(xmargin, ymargin)
      -
      -margins(x=xmargin, y=ymargin)
      -
      -margins(..., tight=False)
      -
      -
      -

      All three forms above set the xmargin and ymargin parameters. -All keyword parameters are optional. A single argument -specifies both xmargin and ymargin. The tight parameter -is passed to autoscale_view(), which is executed after -a margin is changed; the default here is True, on the -assumption that when margins are specified, no additional -padding to match tick marks is usually desired. Setting -tight to None will preserve the previous setting.

      -

      Specifying any margin changes only the autoscaling; for example, -if xmargin is not None, then xmargin times the X data -interval will be added to each end of that interval before -it is used in autoscaling.

      -
      - -
      -
      -matshow(Z, **kwargs)
      -

      Plot a matrix or array as an image.

      -

      The matrix will be shown the way it would be printed, with the first -row at the top. Row and column numbering is zero-based.

      - --- - - - - - - - - -
      Parameters :

      Z : array_like shape (n, m)

      -
      -

      The matrix to be displayed.

      -
      -
      Returns :

      image : AxesImage

      -
      Other Parameters:
       

      kwargs : imshow arguments

      -
      -

      Sets origin to ‘upper’, ‘interpolation’ to ‘nearest’ and -‘aspect’ to equal.

      -
      -
      -
      -

      See also

      -
      -
      imshow
      -
      plot an image
      -
      -
      -

      Examples

      -

      (Source code)

      -
      -../_images/matshow_00.png -

      (png, hires.png, pdf)

      -
      -
      -../_images/matshow_01.png -

      (png, hires.png, pdf)

      -
      -
      -../_images/matshow_02.png -

      (png, hires.png, pdf)

      -
      -
      -../_images/matshow_03.png -

      (png, hires.png, pdf)

      -
      -
      -../_images/matshow_04.png -

      (png, hires.png, pdf)

      -
      -
      - -
      -
      -minorticks_off()
      -

      Remove minor ticks from the axes.

      -
      - -
      -
      -minorticks_on()
      -

      Add autoscaling minor ticks to the axes.

      -
      - -
      -
      -name = 'rectilinear'
      -
      - -
      -
      -pcolor(*args, **kwargs)
      -

      Create a pseudocolor plot of a 2-D array.

      -
      -

      Note

      -

      pcolor can be very slow for large arrays; consider -using the similar but much faster -pcolormesh() instead.

      -
      -

      Call signatures:

      -
      pcolor(C, **kwargs)
      -pcolor(X, Y, C, **kwargs)
      -
      -
      -

      C is the array of color values.

      -

      X and Y, if given, specify the (x, y) coordinates of -the colored quadrilaterals; the quadrilateral for C[i,j] has -corners at:

      -
      (X[i,   j],   Y[i,   j]),
      -(X[i,   j+1], Y[i,   j+1]),
      -(X[i+1, j],   Y[i+1, j]),
      -(X[i+1, j+1], Y[i+1, j+1]).
      -
      -

      Ideally the dimensions of X and Y should be one greater -than those of C; if the dimensions are the same, then the -last row and column of C will be ignored.

      -

      Note that the the column index corresponds to the -x-coordinate, and the row index corresponds to y; for -details, see the Grid Orientation section below.

      -

      If either or both of X and Y are 1-D arrays or column vectors, -they will be expanded as needed into the appropriate 2-D arrays, -making a rectangular grid.

      -

      X, Y and C may be masked arrays. If either C[i, j], or one -of the vertices surrounding C[i,j] (X or Y at [i, j], [i+1, j], -[i, j+1],[i+1, j+1]) is masked, nothing is plotted.

      -

      Keyword arguments:

      -
      -
      -
      cmap: [ None | Colormap ]
      -
      A matplotlib.colors.Colormap instance. If None, use -rc settings.
      -
      norm: [ None | Normalize ]
      -
      An matplotlib.colors.Normalize instance is used -to scale luminance data to 0,1. If None, defaults to -normalize().
      -
      vmin/vmax: [ None | scalar ]
      -
      vmin and vmax are used in conjunction with norm to -normalize luminance data. If either is None, it -is autoscaled to the respective min or max -of the color array C. If not None, vmin or -vmax passed in here override any pre-existing values -supplied in the norm instance.
      -
      shading: [ ‘flat’ | ‘faceted’ ]
      -

      If ‘faceted’, a black grid is drawn around each rectangle; if -‘flat’, edges are not drawn. Default is ‘flat’, contrary to -MATLAB.

      -
      -
      This kwarg is deprecated; please use ‘edgecolors’ instead:
      -
        -
      • shading=’flat’ – edgecolors=’none’
      • -
      • shading=’faceted – edgecolors=’k’
      • -
      -
      -
      -
      -
      edgecolors: [ None | 'none' | color | color sequence]
      -

      If None, the rc setting is used by default.

      -

      If 'none', edges will not be visible.

      -

      An mpl color or sequence of colors will set the edge color

      -
      -
      alpha: 0 <= scalar <= 1 or None
      -
      the alpha blending value
      -
      -
      -

      Return value is a matplotlib.collections.Collection -instance.

      -

      The grid orientation follows the MATLAB convention: an -array C with shape (nrows, ncolumns) is plotted with -the column number as X and the row number as Y, increasing -up; hence it is plotted the way the array would be printed, -except that the Y axis is reversed. That is, C is taken -as C*(*y, x).

      -

      Similarly for meshgrid():

      -
      x = np.arange(5)
      -y = np.arange(3)
      -X, Y = meshgrid(x,y)
      -
      -
      -

      is equivalent to:

      -
      X = array([[0, 1, 2, 3, 4],
      -           [0, 1, 2, 3, 4],
      -           [0, 1, 2, 3, 4]])
      -
      -Y = array([[0, 0, 0, 0, 0],
      -           [1, 1, 1, 1, 1],
      -           [2, 2, 2, 2, 2]])
      -
      -
      -

      so if you have:

      -
      C = rand( len(x), len(y))
      -
      -
      -

      then you need:

      -
      pcolor(X, Y, C.T)
      -
      -
      -

      or:

      -
      pcolor(C.T)
      -
      -
      -

      MATLAB pcolor() always discards the last row and column -of C, but matplotlib displays the last row and column if X and -Y are not specified, or if X and Y have one more row and -column than C.

      -

      kwargs can be used to control the -PolyCollection properties:

      -
      -
      ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      PropertyDescription
      agg_filterunknown
      alphafloat or None
      animated[True | False]
      antialiased or antialiasedsBoolean or sequence of booleans
      arrayunknown
      axesan Axes instance
      clima length 2 sequence of floats
      clip_boxa matplotlib.transforms.Bbox instance
      clip_on[True | False]
      clip_path[ (Path, Transform) | Patch | None ]
      cmapa colormap or registered colormap name
      colormatplotlib color arg or sequence of rgba tuples
      colorbarunknown
      containsa callable function
      edgecolor or edgecolorsmatplotlib color arg or sequence of rgba tuples
      facecolor or facecolorsmatplotlib color arg or sequence of rgba tuples
      figurea matplotlib.figure.Figure instance
      gidan id string
      hatch[ ‘/’ | ‘\’ | ‘|’ | ‘-‘ | ‘+’ | ‘x’ | ‘o’ | ‘O’ | ‘.’ | ‘*’ ]
      labelstring or anything printable with ‘%s’ conversion.
      linestyle or linestyles or dashes[‘solid’ | ‘dashed’, ‘dashdot’, ‘dotted’ | (offset, on-off-dash-seq) ]
      linewidth or lw or linewidthsfloat or sequence of floats
      lod[True | False]
      normunknown
      offset_positionunknown
      offsetsfloat or sequence of floats
      pathsunknown
      picker[None|float|boolean|callable]
      pickradiusunknown
      rasterized[True | False | None]
      snapunknown
      transformTransform instance
      urla url string
      urlsunknown
      visible[True | False]
      zorderany number
      -
      -
      -

      Note

      -

      The default antialiaseds is False if the default -edgecolors*=”none” is used. This eliminates artificial lines -at patch boundaries, and works regardless of the value of -alpha. If *edgecolors is not “none”, then the default -antialiaseds is taken from -rcParams[‘patch.antialiased’], which defaults to True. -Stroking the edges may be preferred if alpha is 1, but -will cause artifacts otherwise.

      -
      -
      -

      See also

      -
      -
      pcolormesh()
      -
      For an explanation of the differences between -pcolor and pcolormesh.
      -
      -
      -
      - -
      -
      -pcolorfast(*args, **kwargs)
      -

      pseudocolor plot of a 2-D array

      -

      Experimental; this is a pcolor-type method that -provides the fastest possible rendering with the Agg -backend, and that can handle any quadrilateral grid. -It supports only flat shading (no outlines), it lacks -support for log scaling of the axes, and it does not -have a pyplot wrapper.

      -

      Call signatures:

      -
      ax.pcolorfast(C, **kwargs)
      -ax.pcolorfast(xr, yr, C, **kwargs)
      -ax.pcolorfast(x, y, C, **kwargs)
      -ax.pcolorfast(X, Y, C, **kwargs)
      -
      -
      -

      C is the 2D array of color values corresponding to quadrilateral -cells. Let (nr, nc) be its shape. C may be a masked array.

      -

      ax.pcolorfast(C, **kwargs) is equivalent to -ax.pcolorfast([0,nc], [0,nr], C, **kwargs)

      -

      xr, yr specify the ranges of x and y corresponding to the -rectangular region bounding C. If:

      -
      xr = [x0, x1]
      -
      -
      -

      and:

      -
      yr = [y0,y1]
      -
      -
      -

      then x goes from x0 to x1 as the second index of C goes -from 0 to nc, etc. (x0, y0) is the outermost corner of -cell (0,0), and (x1, y1) is the outermost corner of cell -(nr-1, nc-1). All cells are rectangles of the same size. -This is the fastest version.

      -

      x, y are 1D arrays of length nc +1 and nr +1, respectively, -giving the x and y boundaries of the cells. Hence the cells are -rectangular but the grid may be nonuniform. The speed is -intermediate. (The grid is checked, and if found to be -uniform the fast version is used.)

      -

      X and Y are 2D arrays with shape (nr +1, nc +1) that specify -the (x,y) coordinates of the corners of the colored -quadrilaterals; the quadrilateral for C[i,j] has corners at -(X[i,j],Y[i,j]), (X[i,j+1],Y[i,j+1]), (X[i+1,j],Y[i+1,j]), -(X[i+1,j+1],Y[i+1,j+1]). The cells need not be rectangular. -This is the most general, but the slowest to render. It may -produce faster and more compact output using ps, pdf, and -svg backends, however.

      -

      Note that the the column index corresponds to the x-coordinate, -and the row index corresponds to y; for details, see -the “Grid Orientation” section below.

      -

      Optional keyword arguments:

      -
      -
      -
      cmap: [ None | Colormap ]
      -
      A matplotlib.colors.Colormap instance from cm. If None, -use rc settings.
      -
      norm: [ None | Normalize ]
      -
      A matplotlib.colors.Normalize instance is used to scale -luminance data to 0,1. If None, defaults to normalize()
      -
      vmin/vmax: [ None | scalar ]
      -
      vmin and vmax are used in conjunction with norm to normalize -luminance data. If either are None, the min and max -of the color array C is used. If you pass a norm instance, -vmin and vmax will be None.
      -
      alpha: 0 <= scalar <= 1 or None
      -
      the alpha blending value
      -
      -
      -

      Return value is an image if a regular or rectangular grid -is specified, and a QuadMesh -collection in the general quadrilateral case.

      -
      - -
      -
      -pcolormesh(*args, **kwargs)
      -

      Plot a quadrilateral mesh.

      -

      Call signatures:

      -
      pcolormesh(C)
      -pcolormesh(X, Y, C)
      -pcolormesh(C, **kwargs)
      -
      -
      -

      Create a pseudocolor plot of a 2-D array.

      -

      pcolormesh is similar to pcolor(), -but uses a different mechanism and returns a different -object; pcolor returns a -PolyCollection but pcolormesh -returns a -QuadMesh. It is much faster, -so it is almost always preferred for large arrays.

      -

      C may be a masked array, but X and Y may not. Masked -array support is implemented via cmap and norm; in -contrast, pcolor() simply does not -draw quadrilaterals with masked colors or vertices.

      -

      Keyword arguments:

      -
      -
      -
      cmap: [ None | Colormap ]
      -
      A matplotlib.colors.Colormap instance. If None, use -rc settings.
      -
      norm: [ None | Normalize ]
      -
      A matplotlib.colors.Normalize instance is used to -scale luminance data to 0,1. If None, defaults to -normalize().
      -
      vmin/vmax: [ None | scalar ]
      -
      vmin and vmax are used in conjunction with norm to -normalize luminance data. If either is None, it -is autoscaled to the respective min or max -of the color array C. If not None, vmin or -vmax passed in here override any pre-existing values -supplied in the norm instance.
      -
      shading: [ ‘flat’ | ‘gouraud’ ]
      -
      ‘flat’ indicates a solid color for each quad. When -‘gouraud’, each quad will be Gouraud shaded. When gouraud -shading, edgecolors is ignored.
      -
      edgecolors: [None | 'None' | 'face' | color |
      -
      -
      color sequence]
      -

      If None, the rc setting is used by default.

      -

      If 'None', edges will not be visible.

      -

      If 'face', edges will have the same color as the faces.

      -

      An mpl color or sequence of colors will set the edge color

      -
      -
      alpha: 0 <= scalar <= 1 or None
      -
      the alpha blending value
      -
      -
      -

      Return value is a matplotlib.collections.QuadMesh -object.

      -

      kwargs can be used to control the -matplotlib.collections.QuadMesh properties:

      -
      -
      ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      PropertyDescription
      agg_filterunknown
      alphafloat or None
      animated[True | False]
      antialiased or antialiasedsBoolean or sequence of booleans
      arrayunknown
      axesan Axes instance
      clima length 2 sequence of floats
      clip_boxa matplotlib.transforms.Bbox instance
      clip_on[True | False]
      clip_path[ (Path, Transform) | Patch | None ]
      cmapa colormap or registered colormap name
      colormatplotlib color arg or sequence of rgba tuples
      colorbarunknown
      containsa callable function
      edgecolor or edgecolorsmatplotlib color arg or sequence of rgba tuples
      facecolor or facecolorsmatplotlib color arg or sequence of rgba tuples
      figurea matplotlib.figure.Figure instance
      gidan id string
      hatch[ ‘/’ | ‘\’ | ‘|’ | ‘-‘ | ‘+’ | ‘x’ | ‘o’ | ‘O’ | ‘.’ | ‘*’ ]
      labelstring or anything printable with ‘%s’ conversion.
      linestyle or linestyles or dashes[‘solid’ | ‘dashed’, ‘dashdot’, ‘dotted’ | (offset, on-off-dash-seq) ]
      linewidth or lw or linewidthsfloat or sequence of floats
      lod[True | False]
      normunknown
      offset_positionunknown
      offsetsfloat or sequence of floats
      pathsunknown
      picker[None|float|boolean|callable]
      pickradiusunknown
      rasterized[True | False | None]
      snapunknown
      transformTransform instance
      urla url string
      urlsunknown
      visible[True | False]
      zorderany number
      -
      -
      -

      See also

      -
      -
      pcolor()
      -
      For an explanation of the grid orientation and the -expansion of 1-D X and/or Y to 2-D arrays.
      -
      -
      -
      - -
      -
      -pick(*args)
      -

      Call signature:

      -
      pick(mouseevent)
      -
      -
      -

      each child artist will fire a pick event if mouseevent is over -the artist and the artist has picker set

      -
      - -
      -
      -pie(x, explode=None, labels=None, colors=None, autopct=None, pctdistance=0.6, shadow=False, labeldistance=1.1, startangle=None, radius=None)
      -

      Plot a pie chart.

      -

      Call signature:

      -
      pie(x, explode=None, labels=None,
      -    colors=('b', 'g', 'r', 'c', 'm', 'y', 'k', 'w'),
      -    autopct=None, pctdistance=0.6, shadow=False,
      -    labeldistance=1.1, startangle=None, radius=None)
      -
      -
      -

      Make a pie chart of array x. The fractional area of each -wedge is given by x/sum(x). If sum(x) <= 1, then the values -of x give the fractional area directly and the array will not -be normalized. The wedges are plotted counterclockwise, -by default starting from the x-axis.

      -

      Keyword arguments:

      -
      -
      -
      explode: [ None | len(x) sequence ]
      -
      If not None, is a len(x) array which specifies the -fraction of the radius with which to offset each wedge.
      -
      colors: [ None | color sequence ]
      -
      A sequence of matplotlib color args through which the pie chart -will cycle.
      -
      labels: [ None | len(x) sequence of strings ]
      -
      A sequence of strings providing the labels for each wedge
      -
      autopct: [ None | format string | format function ]
      -
      If not None, is a string or function used to label the wedges -with their numeric value. The label will be placed inside the -wedge. If it is a format string, the label will be fmt%pct. -If it is a function, it will be called.
      -
      pctdistance: scalar
      -
      The ratio between the center of each pie slice and the -start of the text generated by autopct. Ignored if -autopct is None; default is 0.6.
      -
      labeldistance: scalar
      -
      The radial distance at which the pie labels are drawn
      -
      shadow: [ False | True ]
      -
      Draw a shadow beneath the pie.
      -
      startangle: [ None | Offset angle ]
      -
      If not None, rotates the start of the pie chart by angle -degrees counterclockwise from the x-axis.
      -
      -

      radius: [ None | scalar ] -The radius of the pie, if radius is None it will be set to 1.

      -
      -

      The pie chart will probably look best if the figure and axes are -square, or the Axes aspect is equal. e.g.:

      -
      figure(figsize=(8,8))
      -ax = axes([0.1, 0.1, 0.8, 0.8])
      -
      -
      -

      or:

      -
      axes(aspect=1)
      -
      -
      -
      -
      Return value:
      -

      If autopct is None, return the tuple (patches, texts):

      -
      -
      -
      -

      If autopct is not None, return the tuple (patches, -texts, autotexts), where patches and texts are as -above, and autotexts is a list of -Text instances for the numeric -labels.

      -
      -
      -
      - -
      -
      -plot(*args, **kwargs)
      -

      Plot lines and/or markers to the -Axes. args is a variable length -argument, allowing for multiple x, y pairs with an -optional format string. For example, each of the following is -legal:

      -
      plot(x, y)        # plot x and y using default line style and color
      -plot(x, y, 'bo')  # plot x and y using blue circle markers
      -plot(y)           # plot y using x as index array 0..N-1
      -plot(y, 'r+')     # ditto, but with red plusses
      -
      -
      -

      If x and/or y is 2-dimensional, then the corresponding columns -will be plotted.

      -

      An arbitrary number of x, y, fmt groups can be -specified, as in:

      -
      a.plot(x1, y1, 'g^', x2, y2, 'g-')
      -
      -
      -

      Return value is a list of lines that were added.

      -

      By default, each line is assigned a different color specified by a -‘color cycle’. To change this behavior, you can edit the -axes.color_cycle rcParam. Alternatively, you can use -set_default_color_cycle().

      -

      The following format string characters are accepted to control -the line style or marker:

      - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      characterdescription
      '-'solid line style
      '--'dashed line style
      '-.'dash-dot line style
      ':'dotted line style
      '.'point marker
      ','pixel marker
      'o'circle marker
      'v'triangle_down marker
      '^'triangle_up marker
      '<'triangle_left marker
      '>'triangle_right marker
      '1'tri_down marker
      '2'tri_up marker
      '3'tri_left marker
      '4'tri_right marker
      's'square marker
      'p'pentagon marker
      '*'star marker
      'h'hexagon1 marker
      'H'hexagon2 marker
      '+'plus marker
      'x'x marker
      'D'diamond marker
      'd'thin_diamond marker
      '|'vline marker
      '_'hline marker
      -

      The following color abbreviations are supported:

      - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      charactercolor
      ‘b’blue
      ‘g’green
      ‘r’red
      ‘c’cyan
      ‘m’magenta
      ‘y’yellow
      ‘k’black
      ‘w’white
      -

      In addition, you can specify colors in many weird and -wonderful ways, including full names ('green'), hex -strings ('#008000'), RGB or RGBA tuples ((0,1,0,1)) or -grayscale intensities as a string ('0.8'). Of these, the -string specifications can be used in place of a fmt group, -but the tuple forms can be used only as kwargs.

      -

      Line styles and colors are combined in a single format string, as in -'bo' for blue circles.

      -

      The kwargs can be used to set line properties (any property that has -a set_* method). You can use this to set a line label (for auto -legends), linewidth, anitialising, marker face color, etc. Here is an -example:

      -
      plot([1,2,3], [1,2,3], 'go-', label='line 1', linewidth=2)
      -plot([1,2,3], [1,4,9], 'rs',  label='line 2')
      -axis([0, 4, 0, 10])
      -legend()
      -
      -
      -

      If you make multiple lines with one plot command, the kwargs -apply to all those lines, e.g.:

      -
      plot(x1, y1, x2, y2, antialised=False)
      -
      -
      -

      Neither line will be antialiased.

      -

      You do not need to use format strings, which are just -abbreviations. All of the line properties can be controlled -by keyword arguments. For example, you can set the color, -marker, linestyle, and markercolor with:

      -
      plot(x, y, color='green', linestyle='dashed', marker='o',
      -     markerfacecolor='blue', markersize=12).
      -
      -

      See Line2D for details.

      -

      The kwargs are Line2D properties:

      -
      -
      ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      PropertyDescription
      agg_filterunknown
      alphafloat (0.0 transparent through 1.0 opaque)
      animated[True | False]
      antialiased or aa[True | False]
      axesan Axes instance
      clip_boxa matplotlib.transforms.Bbox instance
      clip_on[True | False]
      clip_path[ (Path, Transform) | Patch | None ]
      color or cany matplotlib color
      containsa callable function
      dash_capstyle[‘butt’ | ‘round’ | ‘projecting’]
      dash_joinstyle[‘miter’ | ‘round’ | ‘bevel’]
      dashessequence of on/off ink in points
      data2D array (rows are x, y) or two 1D arrays
      drawstyle[‘default’ | ‘steps’ | ‘steps-pre’ | ‘steps-mid’ | ‘steps-post’]
      figurea matplotlib.figure.Figure instance
      fillstyle[‘full’ | ‘left’ | ‘right’ | ‘bottom’ | ‘top’ | ‘none’]
      gidan id string
      labelstring or anything printable with ‘%s’ conversion.
      linestyle or ls['-' | '--' | '-.' | ':' | 'None' | ' ' | ''] and any drawstyle in combination with a linestyle, e.g., 'steps--'.
      linewidth or lwfloat value in points
      lod[True | False]
      markerunknown
      markeredgecolor or mecany matplotlib color
      markeredgewidth or mewfloat value in points
      markerfacecolor or mfcany matplotlib color
      markerfacecoloralt or mfcaltany matplotlib color
      markersize or msfloat
      markeveryNone | integer | (startind, stride)
      pickerfloat distance in points or callable pick function fn(artist, event)
      pickradiusfloat distance in points
      rasterized[True | False | None]
      snapunknown
      solid_capstyle[‘butt’ | ‘round’ | ‘projecting’]
      solid_joinstyle[‘miter’ | ‘round’ | ‘bevel’]
      transforma matplotlib.transforms.Transform instance
      urla url string
      visible[True | False]
      xdata1D array
      ydata1D array
      zorderany number
      -
      -

      kwargs scalex and scaley, if defined, are passed on to -autoscale_view() to determine -whether the x and y axes are autoscaled; the default is -True.

      -
      - -
      -
      -plot_date(x, y, fmt='bo', tz=None, xdate=True, ydate=False, **kwargs)
      -

      Plot with data with dates.

      -

      Call signature:

      -
      plot_date(x, y, fmt='bo', tz=None, xdate=True,
      -          ydate=False, **kwargs)
      -
      -
      -

      Similar to the plot() command, except -the x or y (or both) data is considered to be dates, and the -axis is labeled accordingly.

      -

      x and/or y can be a sequence of dates represented as float -days since 0001-01-01 UTC.

      -

      Keyword arguments:

      -
      -
      -
      fmt: string
      -
      The plot format string.
      -
      tz: [ None | timezone string | tzinfo instance]
      -
      The time zone to use in labeling dates. If None, defaults to rc -value.
      -
      xdate: [ True | False ]
      -
      If True, the x-axis will be labeled with dates.
      -
      ydate: [ False | True ]
      -
      If True, the y-axis will be labeled with dates.
      -
      -
      -

      Note if you are using custom date tickers and formatters, it -may be necessary to set the formatters/locators after the call -to plot_date() since plot_date() will set the -default tick locator to -matplotlib.dates.AutoDateLocator (if the tick -locator is not already set to a -matplotlib.dates.DateLocator instance) and the -default tick formatter to -matplotlib.dates.AutoDateFormatter (if the tick -formatter is not already set to a -matplotlib.dates.DateFormatter instance).

      -

      Valid kwargs are Line2D properties:

      -
      -
      ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      PropertyDescription
      agg_filterunknown
      alphafloat (0.0 transparent through 1.0 opaque)
      animated[True | False]
      antialiased or aa[True | False]
      axesan Axes instance
      clip_boxa matplotlib.transforms.Bbox instance
      clip_on[True | False]
      clip_path[ (Path, Transform) | Patch | None ]
      color or cany matplotlib color
      containsa callable function
      dash_capstyle[‘butt’ | ‘round’ | ‘projecting’]
      dash_joinstyle[‘miter’ | ‘round’ | ‘bevel’]
      dashessequence of on/off ink in points
      data2D array (rows are x, y) or two 1D arrays
      drawstyle[‘default’ | ‘steps’ | ‘steps-pre’ | ‘steps-mid’ | ‘steps-post’]
      figurea matplotlib.figure.Figure instance
      fillstyle[‘full’ | ‘left’ | ‘right’ | ‘bottom’ | ‘top’ | ‘none’]
      gidan id string
      labelstring or anything printable with ‘%s’ conversion.
      linestyle or ls['-' | '--' | '-.' | ':' | 'None' | ' ' | ''] and any drawstyle in combination with a linestyle, e.g., 'steps--'.
      linewidth or lwfloat value in points
      lod[True | False]
      markerunknown
      markeredgecolor or mecany matplotlib color
      markeredgewidth or mewfloat value in points
      markerfacecolor or mfcany matplotlib color
      markerfacecoloralt or mfcaltany matplotlib color
      markersize or msfloat
      markeveryNone | integer | (startind, stride)
      pickerfloat distance in points or callable pick function fn(artist, event)
      pickradiusfloat distance in points
      rasterized[True | False | None]
      snapunknown
      solid_capstyle[‘butt’ | ‘round’ | ‘projecting’]
      solid_joinstyle[‘miter’ | ‘round’ | ‘bevel’]
      transforma matplotlib.transforms.Transform instance
      urla url string
      visible[True | False]
      xdata1D array
      ydata1D array
      zorderany number
      -
      -
      -

      See also

      -

      dates for helper functions

      -

      date2num(), -num2date() and -drange() for help on creating the required -floating point dates.

      -
      -
      - -
      -
      -psd(x, NFFT=256, Fs=2, Fc=0, detrend=<function detrend_none at 0x34d25f0>, window=<function window_hanning at 0x34d2398>, noverlap=0, pad_to=None, sides='default', scale_by_freq=None, **kwargs)
      -

      Plot the power spectral density.

      -

      Call signature:

      -
      psd(x, NFFT=256, Fs=2, Fc=0, detrend=mlab.detrend_none,
      -    window=mlab.window_hanning, noverlap=0, pad_to=None,
      -    sides='default', scale_by_freq=None, **kwargs)
      -
      -
      -

      The power spectral density by Welch’s average periodogram -method. The vector x is divided into NFFT length -segments. Each segment is detrended by function detrend and -windowed by function window. noverlap gives the length of -the overlap between segments. The -of each segment are averaged to compute Pxx, with a -scaling to correct for power loss due to windowing. Fs is the -sampling frequency.

      -

      Keyword arguments:

      -
      -
      -
      NFFT: integer
      -
      The number of data points used in each block for the FFT. -Must be even; a power 2 is most efficient. The default value is 256. -This should NOT be used to get zero padding, or the scaling of the -result will be incorrect. Use pad_to for this instead.
      -
      Fs: scalar
      -
      The sampling frequency (samples per time unit). It is used -to calculate the Fourier frequencies, freqs, in cycles per time -unit. The default value is 2.
      -
      detrend: callable
      -
      The function applied to each segment before fft-ing, -designed to remove the mean or linear trend. Unlike in -MATLAB, where the detrend parameter is a vector, in -matplotlib is it a function. The pylab -module defines detrend_none(), -detrend_mean(), and -detrend_linear(), but you can use -a custom function as well.
      -
      window: callable or ndarray
      -
      A function or a vector of length NFFT. To create window -vectors see window_hanning(), window_none(), -numpy.blackman(), numpy.hamming(), -numpy.bartlett(), scipy.signal(), -scipy.signal.get_window(), etc. The default is -window_hanning(). If a function is passed as the -argument, it must take a data segment as an argument and -return the windowed version of the segment.
      -
      pad_to: integer
      -
      The number of points to which the data segment is padded when -performing the FFT. This can be different from NFFT, which -specifies the number of data points used. While not increasing -the actual resolution of the psd (the minimum distance between -resolvable peaks), this can give more points in the plot, -allowing for more detail. This corresponds to the n parameter -in the call to fft(). The default is None, which sets pad_to -equal to NFFT
      -
      sides: [ ‘default’ | ‘onesided’ | ‘twosided’ ]
      -
      Specifies which sides of the PSD to return. Default gives the -default behavior, which returns one-sided for real data and both -for complex data. ‘onesided’ forces the return of a one-sided PSD, -while ‘twosided’ forces two-sided.
      -
      scale_by_freq: boolean
      -
      Specifies whether the resulting density values should be scaled -by the scaling frequency, which gives density in units of Hz^-1. -This allows for integration over the returned frequency values. -The default is True for MATLAB compatibility.
      -
      noverlap: integer
      -
      The number of points of overlap between blocks. The default value -is 0 (no overlap).
      -
      Fc: integer
      -
      The center frequency of x (defaults to 0), which offsets -the x extents of the plot to reflect the frequency range used -when a signal is acquired and then filtered and downsampled to -baseband.
      -
      -
      -

      Returns the tuple (Pxx, freqs).

      -

      For plotting, the power is plotted as - for decibels, though Pxx itself -is returned.

      -
      -
      References:
      -
      Bendat & Piersol – Random Data: Analysis and Measurement -Procedures, John Wiley & Sons (1986)
      -
      -

      kwargs control the Line2D properties:

      -
      -
      ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      PropertyDescription
      agg_filterunknown
      alphafloat (0.0 transparent through 1.0 opaque)
      animated[True | False]
      antialiased or aa[True | False]
      axesan Axes instance
      clip_boxa matplotlib.transforms.Bbox instance
      clip_on[True | False]
      clip_path[ (Path, Transform) | Patch | None ]
      color or cany matplotlib color
      containsa callable function
      dash_capstyle[‘butt’ | ‘round’ | ‘projecting’]
      dash_joinstyle[‘miter’ | ‘round’ | ‘bevel’]
      dashessequence of on/off ink in points
      data2D array (rows are x, y) or two 1D arrays
      drawstyle[‘default’ | ‘steps’ | ‘steps-pre’ | ‘steps-mid’ | ‘steps-post’]
      figurea matplotlib.figure.Figure instance
      fillstyle[‘full’ | ‘left’ | ‘right’ | ‘bottom’ | ‘top’ | ‘none’]
      gidan id string
      labelstring or anything printable with ‘%s’ conversion.
      linestyle or ls['-' | '--' | '-.' | ':' | 'None' | ' ' | ''] and any drawstyle in combination with a linestyle, e.g., 'steps--'.
      linewidth or lwfloat value in points
      lod[True | False]
      markerunknown
      markeredgecolor or mecany matplotlib color
      markeredgewidth or mewfloat value in points
      markerfacecolor or mfcany matplotlib color
      markerfacecoloralt or mfcaltany matplotlib color
      markersize or msfloat
      markeveryNone | integer | (startind, stride)
      pickerfloat distance in points or callable pick function fn(artist, event)
      pickradiusfloat distance in points
      rasterized[True | False | None]
      snapunknown
      solid_capstyle[‘butt’ | ‘round’ | ‘projecting’]
      solid_joinstyle[‘miter’ | ‘round’ | ‘bevel’]
      transforma matplotlib.transforms.Transform instance
      urla url string
      visible[True | False]
      xdata1D array
      ydata1D array
      zorderany number
      -
      -

      Example:

      -

      (Source code, png, hires.png, pdf)

      -
      -../_images/psd_demo.png -
      -
      - -
      -
      -quiver(*args, **kw)
      -

      Plot a 2-D field of arrows.

      -

      call signatures:

      -
      quiver(U, V, **kw)
      -quiver(U, V, C, **kw)
      -quiver(X, Y, U, V, **kw)
      -quiver(X, Y, U, V, C, **kw)
      -
      -
      -

      Arguments:

      -
      -
      -
      X, Y:
      -
      The x and y coordinates of the arrow locations (default is tail of -arrow; see pivot kwarg)
      -
      U, V:
      -
      Give the x and y components of the arrow vectors
      -
      C:
      -
      An optional array used to map colors to the arrows
      -
      -
      -

      All arguments may be 1-D or 2-D arrays or sequences. If X and Y -are absent, they will be generated as a uniform grid. If U and V -are 2-D arrays but X and Y are 1-D, and if len(X) and len(Y) -match the column and row dimensions of U, then X and Y will be -expanded with numpy.meshgrid().

      -

      U, V, C may be masked arrays, but masked X, Y are not -supported at present.

      -

      Keyword arguments:

      -
      -
      -
      units: [ ‘width’ | ‘height’ | ‘dots’ | ‘inches’ | ‘x’ | ‘y’ | ‘xy’ ]
      -

      Arrow units; the arrow dimensions except for length are in -multiples of this unit.

      -
        -
      • ‘width’ or ‘height’: the width or height of the axes
      • -
      • ‘dots’ or ‘inches’: pixels or inches, based on the figure dpi
      • -
      • ‘x’, ‘y’, or ‘xy’: X, Y, or sqrt(X^2+Y^2) data units
      • -
      -

      The arrows scale differently depending on the units. For -‘x’ or ‘y’, the arrows get larger as one zooms in; for other -units, the arrow size is independent of the zoom state. For -‘width or ‘height’, the arrow size increases with the width and -height of the axes, respectively, when the the window is resized; -for ‘dots’ or ‘inches’, resizing does not change the arrows.

      -
      -
      angles: [ ‘uv’ | ‘xy’ | array ]
      -
      With the default ‘uv’, the arrow aspect ratio is 1, so that -if U*==*V the angle of the arrow on the plot is 45 degrees -CCW from the x-axis. -With ‘xy’, the arrow points from (x,y) to (x+u, y+v). -Alternatively, arbitrary angles may be specified as an array -of values in degrees, CCW from the x-axis.
      -
      scale: [ None | float ]
      -
      Data units per arrow length unit, e.g., m/s per plot width; a smaller -scale parameter makes the arrow longer. If None, a simple -autoscaling algorithm is used, based on the average vector length -and the number of vectors. The arrow length unit is given by -the scale_units parameter
      -
      scale_units: None, or any of the units options.
      -

      For example, if scale_units is ‘inches’, scale is 2.0, and -(u,v) = (1,0), then the vector will be 0.5 inches long. -If scale_units is ‘width’, then the vector will be half the width -of the axes.

      -

      If scale_units is ‘x’ then the vector will be 0.5 x-axis -units. To plot vectors in the x-y plane, with u and v having -the same units as x and y, use -“angles=’xy’, scale_units=’xy’, scale=1”.

      -
      -
      width:
      -
      Shaft width in arrow units; default depends on choice of units, -above, and number of vectors; a typical starting value is about -0.005 times the width of the plot.
      -
      headwidth: scalar
      -
      Head width as multiple of shaft width, default is 3
      -
      headlength: scalar
      -
      Head length as multiple of shaft width, default is 5
      -
      headaxislength: scalar
      -
      Head length at shaft intersection, default is 4.5
      -
      minshaft: scalar
      -
      Length below which arrow scales, in units of head length. Do not -set this to less than 1, or small arrows will look terrible! -Default is 1
      -
      minlength: scalar
      -
      Minimum length as a multiple of shaft width; if an arrow length -is less than this, plot a dot (hexagon) of this diameter instead. -Default is 1.
      -
      pivot: [ ‘tail’ | ‘middle’ | ‘tip’ ]
      -
      The part of the arrow that is at the grid point; the arrow rotates -about this point, hence the name pivot.
      -
      color: [ color | color sequence ]
      -
      This is a synonym for the -PolyCollection facecolor kwarg. -If C has been set, color has no effect.
      -
      -
      -

      The defaults give a slightly swept-back arrow; to make the head a -triangle, make headaxislength the same as headlength. To make the -arrow more pointed, reduce headwidth or increase headlength and -headaxislength. To make the head smaller relative to the shaft, -scale down all the head parameters. You will probably do best to leave -minshaft alone.

      -

      linewidths and edgecolors can be used to customize the arrow -outlines. Additional PolyCollection -keyword arguments:

      -
      -
      ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      PropertyDescription
      agg_filterunknown
      alphafloat or None
      animated[True | False]
      antialiased or antialiasedsBoolean or sequence of booleans
      arrayunknown
      axesan Axes instance
      clima length 2 sequence of floats
      clip_boxa matplotlib.transforms.Bbox instance
      clip_on[True | False]
      clip_path[ (Path, Transform) | Patch | None ]
      cmapa colormap or registered colormap name
      colormatplotlib color arg or sequence of rgba tuples
      colorbarunknown
      containsa callable function
      edgecolor or edgecolorsmatplotlib color arg or sequence of rgba tuples
      facecolor or facecolorsmatplotlib color arg or sequence of rgba tuples
      figurea matplotlib.figure.Figure instance
      gidan id string
      hatch[ ‘/’ | ‘\’ | ‘|’ | ‘-‘ | ‘+’ | ‘x’ | ‘o’ | ‘O’ | ‘.’ | ‘*’ ]
      labelstring or anything printable with ‘%s’ conversion.
      linestyle or linestyles or dashes[‘solid’ | ‘dashed’, ‘dashdot’, ‘dotted’ | (offset, on-off-dash-seq) ]
      linewidth or lw or linewidthsfloat or sequence of floats
      lod[True | False]
      normunknown
      offset_positionunknown
      offsetsfloat or sequence of floats
      pathsunknown
      picker[None|float|boolean|callable]
      pickradiusunknown
      rasterized[True | False | None]
      snapunknown
      transformTransform instance
      urla url string
      urlsunknown
      visible[True | False]
      zorderany number
      -
      -
      - -
      -
      -quiverkey(*args, **kw)
      -

      Add a key to a quiver plot.

      -

      Call signature:

      -
      quiverkey(Q, X, Y, U, label, **kw)
      -
      -
      -

      Arguments:

      -
      -
      -
      Q:
      -
      The Quiver instance returned by a call to quiver.
      -
      X, Y:
      -
      The location of the key; additional explanation follows.
      -
      U:
      -
      The length of the key
      -
      label:
      -
      A string with the length and units of the key
      -
      -
      -

      Keyword arguments:

      -
      -
      -
      coordinates = [ ‘axes’ | ‘figure’ | ‘data’ | ‘inches’ ]
      -
      Coordinate system and units for X, Y: ‘axes’ and ‘figure’ are -normalized coordinate systems with 0,0 in the lower left and 1,1 -in the upper right; ‘data’ are the axes data coordinates (used for -the locations of the vectors in the quiver plot itself); ‘inches’ -is position in the figure in inches, with 0,0 at the lower left -corner.
      -
      color:
      -
      overrides face and edge colors from Q.
      -
      labelpos = [ ‘N’ | ‘S’ | ‘E’ | ‘W’ ]
      -
      Position the label above, below, to the right, to the left of the -arrow, respectively.
      -
      labelsep:
      -
      Distance in inches between the arrow and the label. Default is -0.1
      -
      labelcolor:
      -
      defaults to default Text color.
      -
      fontproperties:
      -
      A dictionary with keyword arguments accepted by the -FontProperties initializer: -family, style, variant, size, weight
      -
      -
      -

      Any additional keyword arguments are used to override vector -properties taken from Q.

      -

      The positioning of the key depends on X, Y, coordinates, and -labelpos. If labelpos is ‘N’ or ‘S’, X, Y give the position -of the middle of the key arrow. If labelpos is ‘E’, X, Y -positions the head, and if labelpos is ‘W’, X, Y positions the -tail; in either of these two cases, X, Y is somewhere in the -middle of the arrow+label key object.

      -
      - -
      -
      -redraw_in_frame()
      -

      This method can only be used after an initial draw which -caches the renderer. It is used to efficiently update Axes -data (axis ticks, labels, etc are not updated)

      -
      - -
      -
      -relim()
      -

      Recompute the data limits based on current artists.

      -

      At present, Collection -instances are not supported.

      -
      - -
      -
      -reset_position()
      -

      Make the original position the active position

      -
      - -
      -
      -scatter(x, y, s=20, c='b', marker='o', cmap=None, norm=None, vmin=None, vmax=None, alpha=None, linewidths=None, verts=None, **kwargs)
      -

      Make a scatter plot of x vs y, where x and y are sequence like objects -of the same lengths.

      - --- - - - - - - - - -
      Parameters :

      x, y : array_like, shape (n, )

      -
      -

      Input data

      -
      -

      s : scalar or array_like, shape (n, ), optional, default: 20

      -
      -

      size in points^2.

      -
      -

      c : color or sequence of color, optional, default

      -
      -

      c can be a single color format string, or a sequence of color -specifications of length N, or a sequence of N numbers to be -mapped to colors using the cmap and norm specified via kwargs -(see below). Note that c should not be a single numeric RGB or -RGBA sequence because that is indistinguishable from an array of -values to be colormapped. c can be a 2-D array in which the -rows are RGB or RGBA, however.

      -
      -

      marker : MarkerStyle, optional, default: ‘o’

      -
      -

      See markers for more information on the different -styles of markers scatter supports.

      -
      -

      cmap : Colormap, optional, default: None

      -
      -

      A Colormap instance or registered name. -cmap is only used if c is an array of floats. If None, -defaults to rc image.cmap.

      -
      -

      norm : Normalize, optional, default: None

      -
      -

      A Normalize instance is used to scale -luminance data to 0, 1. norm is only used if c is an array of -floats. If None, use the default normalize().

      -
      -

      vmin, vmax : scalar, optional, default: None

      -
      -

      vmin and vmax are used in conjunction with norm to normalize -luminance data. If either are None, the min and max of the -color array is used. Note if you pass a norm instance, your -settings for vmin and vmax will be ignored.

      -
      -

      alpha : scalar, optional, default: None

      -
      -

      The alpha blending value, between 0 (transparent) and 1 (opaque)

      -
      -

      linewidths : scalar or array_like, optional, default: None

      -
      -

      If None, defaults to (lines.linewidth,). Note that this is a -tuple, and if you set the linewidths argument you must set it as a -sequence of floats, as required by -RegularPolyCollection.

      -
      -
      Returns :

      paths : PathCollection

      -
      Other Parameters:
       

      kwargs : Collection properties

      -
      -

      Notes

      -

      Any or all of x, y, s, and c may be masked arrays, in -which case all masks will be combined and only unmasked points -will be plotted.

      -

      Examples

      -

      (Source code, png, hires.png, pdf)

      -
      -../_images/scatter_demo.png -
      -
      - -
      -
      -semilogx(*args, **kwargs)
      -

      Make a plot with log scaling on the x axis.

      -

      Call signature:

      -
      semilogx(*args, **kwargs)
      -
      -
      -

      semilogx() supports all the keyword arguments of -plot() and -matplotlib.axes.Axes.set_xscale().

      -

      Notable keyword arguments:

      -
      -
      -
      basex: scalar > 1
      -
      Base of the x logarithm
      -
      subsx: [ None | sequence ]
      -
      The location of the minor xticks; None defaults to -autosubs, which depend on the number of decades in the -plot; see set_xscale() for -details.
      -
      nonposx: [ ‘mask’ | ‘clip’ ]
      -
      Non-positive values in x can be masked as -invalid, or clipped to a very small positive number
      -
      -
      -

      The remaining valid kwargs are -Line2D properties:

      -
      -
      ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      PropertyDescription
      agg_filterunknown
      alphafloat (0.0 transparent through 1.0 opaque)
      animated[True | False]
      antialiased or aa[True | False]
      axesan Axes instance
      clip_boxa matplotlib.transforms.Bbox instance
      clip_on[True | False]
      clip_path[ (Path, Transform) | Patch | None ]
      color or cany matplotlib color
      containsa callable function
      dash_capstyle[‘butt’ | ‘round’ | ‘projecting’]
      dash_joinstyle[‘miter’ | ‘round’ | ‘bevel’]
      dashessequence of on/off ink in points
      data2D array (rows are x, y) or two 1D arrays
      drawstyle[‘default’ | ‘steps’ | ‘steps-pre’ | ‘steps-mid’ | ‘steps-post’]
      figurea matplotlib.figure.Figure instance
      fillstyle[‘full’ | ‘left’ | ‘right’ | ‘bottom’ | ‘top’ | ‘none’]
      gidan id string
      labelstring or anything printable with ‘%s’ conversion.
      linestyle or ls['-' | '--' | '-.' | ':' | 'None' | ' ' | ''] and any drawstyle in combination with a linestyle, e.g., 'steps--'.
      linewidth or lwfloat value in points
      lod[True | False]
      markerunknown
      markeredgecolor or mecany matplotlib color
      markeredgewidth or mewfloat value in points
      markerfacecolor or mfcany matplotlib color
      markerfacecoloralt or mfcaltany matplotlib color
      markersize or msfloat
      markeveryNone | integer | (startind, stride)
      pickerfloat distance in points or callable pick function fn(artist, event)
      pickradiusfloat distance in points
      rasterized[True | False | None]
      snapunknown
      solid_capstyle[‘butt’ | ‘round’ | ‘projecting’]
      solid_joinstyle[‘miter’ | ‘round’ | ‘bevel’]
      transforma matplotlib.transforms.Transform instance
      urla url string
      visible[True | False]
      xdata1D array
      ydata1D array
      zorderany number
      -
      -
      -

      See also

      -
      -
      loglog()
      -
      For example code and figure
      -
      -
      -
      - -
      -
      -semilogy(*args, **kwargs)
      -

      Make a plot with log scaling on the y axis.

      -

      call signature:

      -
      semilogy(*args, **kwargs)
      -
      -
      -

      semilogy() supports all the keyword arguments of -plot() and -matplotlib.axes.Axes.set_yscale().

      -

      Notable keyword arguments:

      -
      -
      -
      basey: scalar > 1
      -
      Base of the y logarithm
      -
      subsy: [ None | sequence ]
      -
      The location of the minor yticks; None defaults to -autosubs, which depend on the number of decades in the -plot; see set_yscale() for -details.
      -
      nonposy: [ ‘mask’ | ‘clip’ ]
      -
      Non-positive values in y can be masked as -invalid, or clipped to a very small positive number
      -
      -
      -

      The remaining valid kwargs are -Line2D properties:

      -
      -
      ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      PropertyDescription
      agg_filterunknown
      alphafloat (0.0 transparent through 1.0 opaque)
      animated[True | False]
      antialiased or aa[True | False]
      axesan Axes instance
      clip_boxa matplotlib.transforms.Bbox instance
      clip_on[True | False]
      clip_path[ (Path, Transform) | Patch | None ]
      color or cany matplotlib color
      containsa callable function
      dash_capstyle[‘butt’ | ‘round’ | ‘projecting’]
      dash_joinstyle[‘miter’ | ‘round’ | ‘bevel’]
      dashessequence of on/off ink in points
      data2D array (rows are x, y) or two 1D arrays
      drawstyle[‘default’ | ‘steps’ | ‘steps-pre’ | ‘steps-mid’ | ‘steps-post’]
      figurea matplotlib.figure.Figure instance
      fillstyle[‘full’ | ‘left’ | ‘right’ | ‘bottom’ | ‘top’ | ‘none’]
      gidan id string
      labelstring or anything printable with ‘%s’ conversion.
      linestyle or ls['-' | '--' | '-.' | ':' | 'None' | ' ' | ''] and any drawstyle in combination with a linestyle, e.g., 'steps--'.
      linewidth or lwfloat value in points
      lod[True | False]
      markerunknown
      markeredgecolor or mecany matplotlib color
      markeredgewidth or mewfloat value in points
      markerfacecolor or mfcany matplotlib color
      markerfacecoloralt or mfcaltany matplotlib color
      markersize or msfloat
      markeveryNone | integer | (startind, stride)
      pickerfloat distance in points or callable pick function fn(artist, event)
      pickradiusfloat distance in points
      rasterized[True | False | None]
      snapunknown
      solid_capstyle[‘butt’ | ‘round’ | ‘projecting’]
      solid_joinstyle[‘miter’ | ‘round’ | ‘bevel’]
      transforma matplotlib.transforms.Transform instance
      urla url string
      visible[True | False]
      xdata1D array
      ydata1D array
      zorderany number
      -
      -
      -

      See also

      -
      -
      loglog()
      -
      For example code and figure
      -
      -
      -
      - -
      -
      -set_adjustable(adjustable)
      -

      ACCEPTS: [ ‘box’ | ‘datalim’ | ‘box-forced’]

      -
      - -
      -
      -set_anchor(anchor)
      -

      anchor

      -
      -
      ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      valuedescription
      ‘C’Center
      ‘SW’bottom left
      ‘S’bottom
      ‘SE’bottom right
      ‘E’right
      ‘NE’top right
      ‘N’top
      ‘NW’top left
      ‘W’left
      -
      -
      - -
      -
      -set_aspect(aspect, adjustable=None, anchor=None)
      -

      aspect

      -
      -
      ---- - - - - - - - - - - - - - - - - - - - -
      valuedescription
      ‘auto’automatic; fill position rectangle with data
      ‘normal’same as ‘auto’; deprecated
      ‘equal’same scaling from data to plot units for x and y
      numa circle will be stretched such that the height -is num times the width. aspect=1 is the same as -aspect=’equal’.
      -
      -

      adjustable

      -
      -
      ---- - - - - - - - - - - - - - - - - -
      valuedescription
      ‘box’change physical size of axes
      ‘datalim’change xlim or ylim
      ‘box-forced’same as ‘box’, but axes can be shared
      -
      -

      ‘box’ does not allow axes sharing, as this can cause -unintended side effect. For cases when sharing axes is -fine, use ‘box-forced’.

      -

      anchor

      -
      -
      ---- - - - - - - - - - - - - - - - - - - - - - - -
      valuedescription
      ‘C’centered
      ‘SW’lower left corner
      ‘S’middle of bottom edge
      ‘SE’lower right corner
      etc. 
      -
      -
      -

      Deprecated since version 1.2: the option ‘normal’ for aspect is deprecated. Use ‘auto’ instead.

      -
      -
      - -
      -
      -set_autoscale_on(b)
      -

      Set whether autoscaling is applied on plot commands

      -

      accepts: [ True | False ]

      -
      - -
      -
      -set_autoscalex_on(b)
      -

      Set whether autoscaling for the x-axis is applied on plot commands

      -

      accepts: [ True | False ]

      -
      - -
      -
      -set_autoscaley_on(b)
      -

      Set whether autoscaling for the y-axis is applied on plot commands

      -

      accepts: [ True | False ]

      -
      - -
      -
      -set_axes_locator(locator)
      -

      set axes_locator

      -
      -
      ACCEPT: a callable object which takes an axes instance and renderer and
      -
      returns a bbox.
      -
      -
      - -
      -
      -set_axis_bgcolor(color)
      -

      set the axes background color

      -

      ACCEPTS: any matplotlib color - see -colors()

      -
      - -
      -
      -set_axis_off()
      -

      turn off the axis

      -
      - -
      -
      -set_axis_on()
      -

      turn on the axis

      -
      - -
      -
      -set_axisbelow(b)
      -

      Set whether the axis ticks and gridlines are above or below most -artists

      -

      ACCEPTS: [ True | False ]

      -
      - -
      -
      -set_color_cycle(clist)
      -

      Set the color cycle for any future plot commands on this Axes.

      -

      clist is a list of mpl color specifiers.

      -
      - -
      -
      -set_cursor_props(*args)
      -

      Set the cursor property as:

      -
      ax.set_cursor_props(linewidth, color)
      -
      -
      -

      or:

      -
      ax.set_cursor_props((linewidth, color))
      -
      -
      -

      ACCEPTS: a (float, color) tuple

      -
      - -
      -
      -set_figure(fig)
      -

      Set the class:Axes figure

      -

      accepts a class:Figure instance

      -
      - -
      -
      -set_frame_on(b)
      -

      Set whether the axes rectangle patch is drawn

      -

      ACCEPTS: [ True | False ]

      -
      - -
      -
      -set_navigate(b)
      -

      Set whether the axes responds to navigation toolbar commands

      -

      ACCEPTS: [ True | False ]

      -
      - -
      -
      -set_navigate_mode(b)
      -

      Set the navigation toolbar button status;

      -
      -

      Warning

      -

      this is not a user-API function.

      -
      -
      - -
      -
      -set_position(pos, which='both')
      -

      Set the axes position with:

      -
      pos = [left, bottom, width, height]
      -
      -
      -

      in relative 0,1 coords, or pos can be a -Bbox

      -

      There are two position variables: one which is ultimately -used, but which may be modified by apply_aspect(), and a -second which is the starting point for apply_aspect().

      -
      -
      Optional keyword arguments:
      -

      which

      -
      -
      ---- - - - - - - - - - - - - - - - - -
      valuedescription
      ‘active’to change the first
      ‘original’to change the second
      ‘both’to change both
      -
      -
      -
      -
      - -
      -
      -set_rasterization_zorder(z)
      -

      Set zorder value below which artists will be rasterized. Set -to None to disable rasterizing of artists below a particular -zorder.

      -
      - -
      -
      -set_title(label, fontdict=None, loc='center', **kwargs)
      -

      Set a title for the axes.

      -

      Set one of the three available axes titles. The available titles -are positioned above the axes in the center, flush with the left -edge, and flush with the right edge.

      - --- - - - - - - - - -
      Parameters :

      label : str

      -
      -

      Text to use for the title

      -
      -

      fontdict : dict

      -
      -

      A dictionary controlling the appearance of the title text, -the default fontdict is: -{‘fontsize’: rcParams[‘axes.titlesize’],

      -
      -

      ‘verticalalignment’: ‘baseline’, -‘horizontalalignment’: loc}

      -
      -
      -

      loc : {‘center’, ‘left’, ‘right’}, str, optional

      -
      -

      Which title to set, defaults to ‘center’

      -
      -
      Returns :

      text : Text

      -
      -

      The matplotlib text instance representing the title

      -
      -
      Other Parameters:
       

      Other keyword arguments are text properties, see :

      -

      :class:`~matplotlib.text.Text` for a list of valid text :

      -

      properties. :

      -
      -
      - -
      -
      -set_xbound(lower=None, upper=None)
      -

      Set the lower and upper numerical bounds of the x-axis. -This method will honor axes inversion regardless of parameter order. -It will not change the _autoscaleXon attribute.

      -
      - -
      -
      -set_xlabel(xlabel, fontdict=None, labelpad=None, **kwargs)
      -

      Set the label for the xaxis.

      - --- - - - - - - -
      Parameters :

      xlabel : string

      -
      -

      x label

      -
      -

      labelpad : scalar, optional, default: None

      -
      -

      spacing in points between the label and the x-axis

      -
      -
      Other Parameters:
       

      kwargs : Text properties

      -
      -
      -

      See also

      -
      -
      text
      -
      for information on how override and the optional args work
      -
      -
      -
      - -
      -
      -set_xlim(left=None, right=None, emit=True, auto=False, **kw)
      -

      Call signature:

      -
      set_xlim(self, *args, **kwargs):
      -
      -

      Set the data limits for the xaxis

      -

      Examples:

      -
      set_xlim((left, right))
      -set_xlim(left, right)
      -set_xlim(left=1) # right unchanged
      -set_xlim(right=1) # left unchanged
      -
      -
      -

      Keyword arguments:

      -
      -
      -
      left: scalar
      -
      The left xlim; xmin, the previous name, may still be used
      -
      right: scalar
      -
      The right xlim; xmax, the previous name, may still be used
      -
      emit: [ True | False ]
      -
      Notify observers of limit change
      -
      auto: [ True | False | None ]
      -
      Turn x autoscaling on (True), off (False; default), -or leave unchanged (None)
      -
      -
      -

      Note, the left (formerly xmin) value may be greater than -the right (formerly xmax). -For example, suppose x is years before present. -Then one might use:

      -
      set_ylim(5000, 0)
      -
      -
      -

      so 5000 years ago is on the left of the plot and the -present is on the right.

      -

      Returns the current xlimits as a length 2 tuple

      -

      ACCEPTS: length 2 sequence of floats

      -
      - -
      -
      -set_xmargin(m)
      -

      Set padding of X data limits prior to autoscaling.

      -

      m times the data interval will be added to each -end of that interval before it is used in autoscaling.

      -

      accepts: float in range 0 to 1

      -
      - -
      -
      -set_xscale(value, **kwargs)
      -

      Call signature:

      -
      set_xscale(value)
      -
      -
      -

      Set the scaling of the x-axis: ‘linear’ | ‘log’ | ‘symlog’

      -

      ACCEPTS: [‘linear’ | ‘log’ | ‘symlog’]

      -

      Different kwargs are accepted, depending on the scale: -‘linear’

      -
      -

      ‘log’

      -
      -
      -
      basex/basey:
      -
      The base of the logarithm
      -
      nonposx/nonposy: [‘mask’ | ‘clip’ ]
      -
      non-positive values in x or y can be masked as -invalid, or clipped to a very small positive number
      -
      subsx/subsy:
      -

      Where to place the subticks between each major tick. -Should be a sequence of integers. For example, in a log10 -scale: [2, 3, 4, 5, 6, 7, 8, 9]

      -

      will place 8 logarithmically spaced minor ticks between -each major tick.

      -
      -
      -
      -

      ‘symlog’

      -
      -
      -
      basex/basey:
      -
      The base of the logarithm
      -
      linthreshx/linthreshy:
      -
      The range (-x, x) within which the plot is linear (to -avoid having the plot go to infinity around zero).
      -
      subsx/subsy:
      -

      Where to place the subticks between each major tick. -Should be a sequence of integers. For example, in a log10 -scale: [2, 3, 4, 5, 6, 7, 8, 9]

      -

      will place 8 logarithmically spaced minor ticks between -each major tick.

      -
      -
      linscalex/linscaley:
      -
      This allows the linear range (-linthresh to linthresh) -to be stretched relative to the logarithmic range. Its -value is the number of decades to use for each half of the -linear range. For example, when linscale == 1.0 (the -default), the space used for the positive and negative -halves of the linear range will be equal to one decade in -the logarithmic range.
      -
      -
      -
      -
      - -
      -
      -set_xticklabels(labels, fontdict=None, minor=False, **kwargs)
      -

      Call signature:

      -
      set_xticklabels(labels, fontdict=None, minor=False, **kwargs)
      -
      -
      -

      Set the xtick labels with list of strings labels. Return a -list of axis text instances.

      -

      kwargs set the Text properties. -Valid properties are

      -
      -
      ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      PropertyDescription
      agg_filterunknown
      alphafloat (0.0 transparent through 1.0 opaque)
      animated[True | False]
      axesan Axes instance
      backgroundcolorany matplotlib color
      bboxrectangle prop dict
      clip_boxa matplotlib.transforms.Bbox instance
      clip_on[True | False]
      clip_path[ (Path, Transform) | Patch | None ]
      colorany matplotlib color
      containsa callable function
      family or fontfamily or fontname or name[FONTNAME | ‘serif’ | ‘sans-serif’ | ‘cursive’ | ‘fantasy’ | ‘monospace’ ]
      figurea matplotlib.figure.Figure instance
      fontproperties or font_propertiesa matplotlib.font_manager.FontProperties instance
      gidan id string
      horizontalalignment or ha[ ‘center’ | ‘right’ | ‘left’ ]
      labelstring or anything printable with ‘%s’ conversion.
      linespacingfloat (multiple of font size)
      lod[True | False]
      multialignment[‘left’ | ‘right’ | ‘center’ ]
      path_effectsunknown
      picker[None|float|boolean|callable]
      position(x,y)
      rasterized[True | False | None]
      rotation[ angle in degrees | ‘vertical’ | ‘horizontal’ ]
      rotation_modeunknown
      size or fontsize[size in points | ‘xx-small’ | ‘x-small’ | ‘small’ | ‘medium’ | ‘large’ | ‘x-large’ | ‘xx-large’ ]
      snapunknown
      stretch or fontstretch[a numeric value in range 0-1000 | ‘ultra-condensed’ | ‘extra-condensed’ | ‘condensed’ | ‘semi-condensed’ | ‘normal’ | ‘semi-expanded’ | ‘expanded’ | ‘extra-expanded’ | ‘ultra-expanded’ ]
      style or fontstyle[ ‘normal’ | ‘italic’ | ‘oblique’]
      textstring or anything printable with ‘%s’ conversion.
      transformTransform instance
      urla url string
      variant or fontvariant[ ‘normal’ | ‘small-caps’ ]
      verticalalignment or va or ma[ ‘center’ | ‘top’ | ‘bottom’ | ‘baseline’ ]
      visible[True | False]
      weight or fontweight[a numeric value in range 0-1000 | ‘ultralight’ | ‘light’ | ‘normal’ | ‘regular’ | ‘book’ | ‘medium’ | ‘roman’ | ‘semibold’ | ‘demibold’ | ‘demi’ | ‘bold’ | ‘heavy’ | ‘extra bold’ | ‘black’ ]
      xfloat
      yfloat
      zorderany number
      -
      -

      ACCEPTS: sequence of strings

      -
      - -
      -
      -set_xticks(ticks, minor=False)
      -

      Set the x ticks with list of ticks

      -

      ACCEPTS: sequence of floats

      -
      - -
      -
      -set_ybound(lower=None, upper=None)
      -

      Set the lower and upper numerical bounds of the y-axis. -This method will honor axes inversion regardless of parameter order. -It will not change the _autoscaleYon attribute.

      -
      - -
      -
      -set_ylabel(ylabel, fontdict=None, labelpad=None, **kwargs)
      -

      Set the label for the yaxis

      - --- - - - - - - -
      Parameters :

      ylabel : string

      -
      -

      y label

      -
      -

      labelpad : scalar, optional, default: None

      -
      -

      spacing in points between the label and the x-axis

      -
      -
      Other Parameters:
       

      kwargs : Text properties

      -
      -
      -

      See also

      -
      -
      text
      -
      for information on how override and the optional args work
      -
      -
      -
      - -
      -
      -set_ylim(bottom=None, top=None, emit=True, auto=False, **kw)
      -

      Call signature:

      -
      set_ylim(self, *args, **kwargs):
      -
      -

      Set the data limits for the yaxis

      -

      Examples:

      -
      set_ylim((bottom, top))
      -set_ylim(bottom, top)
      -set_ylim(bottom=1) # top unchanged
      -set_ylim(top=1) # bottom unchanged
      -
      -
      -

      Keyword arguments:

      -
      -
      -
      bottom: scalar
      -
      The bottom ylim; the previous name, ymin, may still be used
      -
      top: scalar
      -
      The top ylim; the previous name, ymax, may still be used
      -
      emit: [ True | False ]
      -
      Notify observers of limit change
      -
      auto: [ True | False | None ]
      -
      Turn y autoscaling on (True), off (False; default), -or leave unchanged (None)
      -
      -
      -

      Note, the bottom (formerly ymin) value may be greater than -the top (formerly ymax). -For example, suppose y is depth in the ocean. -Then one might use:

      -
      set_ylim(5000, 0)
      -
      -
      -

      so 5000 m depth is at the bottom of the plot and the -surface, 0 m, is at the top.

      -

      Returns the current ylimits as a length 2 tuple

      -

      ACCEPTS: length 2 sequence of floats

      -
      - -
      -
      -set_ymargin(m)
      -

      Set padding of Y data limits prior to autoscaling.

      -

      m times the data interval will be added to each -end of that interval before it is used in autoscaling.

      -

      accepts: float in range 0 to 1

      -
      - -
      -
      -set_yscale(value, **kwargs)
      -

      Call signature:

      -
      set_yscale(value)
      -
      -
      -

      Set the scaling of the y-axis: ‘linear’ | ‘log’ | ‘symlog’

      -

      ACCEPTS: [‘linear’ | ‘log’ | ‘symlog’]

      -

      Different kwargs are accepted, depending on the scale: -‘linear’

      -
      -

      ‘log’

      -
      -
      -
      basex/basey:
      -
      The base of the logarithm
      -
      nonposx/nonposy: [‘mask’ | ‘clip’ ]
      -
      non-positive values in x or y can be masked as -invalid, or clipped to a very small positive number
      -
      subsx/subsy:
      -

      Where to place the subticks between each major tick. -Should be a sequence of integers. For example, in a log10 -scale: [2, 3, 4, 5, 6, 7, 8, 9]

      -

      will place 8 logarithmically spaced minor ticks between -each major tick.

      -
      -
      -
      -

      ‘symlog’

      -
      -
      -
      basex/basey:
      -
      The base of the logarithm
      -
      linthreshx/linthreshy:
      -
      The range (-x, x) within which the plot is linear (to -avoid having the plot go to infinity around zero).
      -
      subsx/subsy:
      -

      Where to place the subticks between each major tick. -Should be a sequence of integers. For example, in a log10 -scale: [2, 3, 4, 5, 6, 7, 8, 9]

      -

      will place 8 logarithmically spaced minor ticks between -each major tick.

      -
      -
      linscalex/linscaley:
      -
      This allows the linear range (-linthresh to linthresh) -to be stretched relative to the logarithmic range. Its -value is the number of decades to use for each half of the -linear range. For example, when linscale == 1.0 (the -default), the space used for the positive and negative -halves of the linear range will be equal to one decade in -the logarithmic range.
      -
      -
      -
      -
      - -
      -
      -set_yticklabels(labels, fontdict=None, minor=False, **kwargs)
      -

      Call signature:

      -
      set_yticklabels(labels, fontdict=None, minor=False, **kwargs)
      -
      -
      -

      Set the y tick labels with list of strings labels. Return a list of -Text instances.

      -

      kwargs set Text properties for the labels. -Valid properties are

      -
      -
      ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      PropertyDescription
      agg_filterunknown
      alphafloat (0.0 transparent through 1.0 opaque)
      animated[True | False]
      axesan Axes instance
      backgroundcolorany matplotlib color
      bboxrectangle prop dict
      clip_boxa matplotlib.transforms.Bbox instance
      clip_on[True | False]
      clip_path[ (Path, Transform) | Patch | None ]
      colorany matplotlib color
      containsa callable function
      family or fontfamily or fontname or name[FONTNAME | ‘serif’ | ‘sans-serif’ | ‘cursive’ | ‘fantasy’ | ‘monospace’ ]
      figurea matplotlib.figure.Figure instance
      fontproperties or font_propertiesa matplotlib.font_manager.FontProperties instance
      gidan id string
      horizontalalignment or ha[ ‘center’ | ‘right’ | ‘left’ ]
      labelstring or anything printable with ‘%s’ conversion.
      linespacingfloat (multiple of font size)
      lod[True | False]
      multialignment[‘left’ | ‘right’ | ‘center’ ]
      path_effectsunknown
      picker[None|float|boolean|callable]
      position(x,y)
      rasterized[True | False | None]
      rotation[ angle in degrees | ‘vertical’ | ‘horizontal’ ]
      rotation_modeunknown
      size or fontsize[size in points | ‘xx-small’ | ‘x-small’ | ‘small’ | ‘medium’ | ‘large’ | ‘x-large’ | ‘xx-large’ ]
      snapunknown
      stretch or fontstretch[a numeric value in range 0-1000 | ‘ultra-condensed’ | ‘extra-condensed’ | ‘condensed’ | ‘semi-condensed’ | ‘normal’ | ‘semi-expanded’ | ‘expanded’ | ‘extra-expanded’ | ‘ultra-expanded’ ]
      style or fontstyle[ ‘normal’ | ‘italic’ | ‘oblique’]
      textstring or anything printable with ‘%s’ conversion.
      transformTransform instance
      urla url string
      variant or fontvariant[ ‘normal’ | ‘small-caps’ ]
      verticalalignment or va or ma[ ‘center’ | ‘top’ | ‘bottom’ | ‘baseline’ ]
      visible[True | False]
      weight or fontweight[a numeric value in range 0-1000 | ‘ultralight’ | ‘light’ | ‘normal’ | ‘regular’ | ‘book’ | ‘medium’ | ‘roman’ | ‘semibold’ | ‘demibold’ | ‘demi’ | ‘bold’ | ‘heavy’ | ‘extra bold’ | ‘black’ ]
      xfloat
      yfloat
      zorderany number
      -
      -

      ACCEPTS: sequence of strings

      -
      - -
      -
      -set_yticks(ticks, minor=False)
      -

      Set the y ticks with list of ticks

      -

      ACCEPTS: sequence of floats

      -

      Keyword arguments:

      -
      -
      -
      minor: [ False | True ]
      -
      Sets the minor ticks if True
      -
      -
      -
      - -
      -
      -specgram(x, NFFT=256, Fs=2, Fc=0, detrend=<function detrend_none at 0x34d25f0>, window=<function window_hanning at 0x34d2398>, noverlap=128, cmap=None, xextent=None, pad_to=None, sides='default', scale_by_freq=None, **kwargs)
      -

      Plot a spectrogram.

      -

      Call signature:

      -
      specgram(x, NFFT=256, Fs=2, Fc=0, detrend=mlab.detrend_none,
      -         window=mlab.window_hanning, noverlap=128,
      -         cmap=None, xextent=None, pad_to=None, sides='default',
      -         scale_by_freq=None, **kwargs)
      -
      -
      -

      Compute and plot a spectrogram of data in x. Data are split into -NFFT length segments and the PSD of each section is -computed. The windowing function window is applied to each -segment, and the amount of overlap of each segment is -specified with noverlap. The spectrogram is plotted in decibels -as a colormap (using imshow).

      -

      Keyword arguments:

      -
      -
      -
      NFFT: integer
      -
      The number of data points used in each block for the FFT. -Must be even; a power 2 is most efficient. The default value is 256. -This should NOT be used to get zero padding, or the scaling of the -result will be incorrect. Use pad_to for this instead.
      -
      Fs: scalar
      -
      The sampling frequency (samples per time unit). It is used -to calculate the Fourier frequencies, freqs, in cycles per time -unit. The default value is 2.
      -
      detrend: callable
      -
      The function applied to each segment before fft-ing, -designed to remove the mean or linear trend. Unlike in -MATLAB, where the detrend parameter is a vector, in -matplotlib is it a function. The pylab -module defines detrend_none(), -detrend_mean(), and -detrend_linear(), but you can use -a custom function as well.
      -
      window: callable or ndarray
      -
      A function or a vector of length NFFT. To create window -vectors see window_hanning(), window_none(), -numpy.blackman(), numpy.hamming(), -numpy.bartlett(), scipy.signal(), -scipy.signal.get_window(), etc. The default is -window_hanning(). If a function is passed as the -argument, it must take a data segment as an argument and -return the windowed version of the segment.
      -
      pad_to: integer
      -
      The number of points to which the data segment is padded when -performing the FFT. This can be different from NFFT, which -specifies the number of data points used. While not increasing -the actual resolution of the psd (the minimum distance between -resolvable peaks), this can give more points in the plot, -allowing for more detail. This corresponds to the n parameter -in the call to fft(). The default is None, which sets pad_to -equal to NFFT
      -
      sides: [ ‘default’ | ‘onesided’ | ‘twosided’ ]
      -
      Specifies which sides of the PSD to return. Default gives the -default behavior, which returns one-sided for real data and both -for complex data. ‘onesided’ forces the return of a one-sided PSD, -while ‘twosided’ forces two-sided.
      -
      scale_by_freq: boolean
      -
      Specifies whether the resulting density values should be scaled -by the scaling frequency, which gives density in units of Hz^-1. -This allows for integration over the returned frequency values. -The default is True for MATLAB compatibility.
      -
      noverlap: integer
      -
      The number of points of overlap between blocks. The -default value is 128.
      -
      Fc: integer
      -
      The center frequency of x (defaults to 0), which offsets -the y extents of the plot to reflect the frequency range used -when a signal is acquired and then filtered and downsampled to -baseband.
      -
      cmap:
      -
      A matplotlib.colors.Colormap instance; if None, use -default determined by rc
      -
      xextent:
      -
      The image extent along the x-axis. xextent = (xmin,xmax) -The default is (0,max(bins)), where bins is the return -value from specgram()
      -
      -

      kwargs:

      -
      -
      Additional kwargs are passed on to imshow which makes the -specgram image
      -

      Return value is (Pxx, freqs, bins, im):

      -
        -
      • bins are the time points the spectrogram is calculated over
      • -
      • freqs is an array of frequencies
      • -
      • Pxx is an array of shape (len(times), len(freqs)) of power
      • -
      • im is a AxesImage instance
      • -
      -
      -
      -

      Note

      -

      If x is real (i.e. non-complex), only the positive -spectrum is shown. If x is complex, both positive and -negative parts of the spectrum are shown. This can be -overridden using the sides keyword argument.

      -
      -

      Also note that while the plot is in dB, the Pxx array returned is -linear in power.

      -

      Example:

      -

      (Source code, png, hires.png, pdf)

      -
      -../_images/specgram_demo.png -
      -
      - -
      -
      -spy(Z, precision=0, marker=None, markersize=None, aspect='equal', **kwargs)
      -

      Plot the sparsity pattern on a 2-D array.

      -

      Call signature:

      -
      spy(Z, precision=0, marker=None, markersize=None,
      -    aspect='equal', **kwargs)
      -
      -
      -

      spy(Z) plots the sparsity pattern of the 2-D array Z.

      -

      If precision is 0, any non-zero value will be plotted; -else, values of will be plotted.

      -

      For scipy.sparse.spmatrix instances, there is a -special case: if precision is ‘present’, any value present in -the array will be plotted, even if it is identically zero.

      -

      The array will be plotted as it would be printed, with -the first index (row) increasing down and the second -index (column) increasing to the right.

      -

      By default aspect is ‘equal’, so that each array element -occupies a square space; set the aspect kwarg to ‘auto’ -to allow the plot to fill the plot box, or to any scalar -number to specify the aspect ratio of an array element -directly.

      -

      Two plotting styles are available: image or marker. Both -are available for full arrays, but only the marker style -works for scipy.sparse.spmatrix instances.

      -

      If marker and markersize are None, an image will be -returned and any remaining kwargs are passed to -imshow(); else, a -Line2D object will be returned with -the value of marker determining the marker type, and any -remaining kwargs passed to the -plot() method.

      -

      If marker and markersize are None, useful kwargs include:

      -
        -
      • cmap
      • -
      • alpha
      • -
      -
      -

      See also

      -
      -
      imshow()
      -
      For image options.
      -
      -
      -

      For controlling colors, e.g., cyan background and red marks, -use:

      -
      cmap = mcolors.ListedColormap(['c','r'])
      -
      -
      -

      If marker or markersize is not None, useful kwargs include:

      -
        -
      • marker
      • -
      • markersize
      • -
      • color
      • -
      -

      Useful values for marker include:

      -
        -
      • ‘s’ square (default)
      • -
      • ‘o’ circle
      • -
      • ‘.’ point
      • -
      • ‘,’ pixel
      • -
      -
      -

      See also

      -
      -
      plot()
      -
      For plotting options
      -
      -
      -
      - -
      -
      -stackplot(x, *args, **kwargs)
      -

      Draws a stacked area plot.

      -

      x : 1d array of dimension N

      -
      -
      y : 2d array of dimension MxN, OR any number 1d arrays each of dimension
      -

      1xN. The data is assumed to be unstacked. Each of the following -calls is legal:

      -
      stackplot(x, y)               # where y is MxN
      -stackplot(x, y1, y2, y3, y4)  # where y1, y2, y3, y4, are all 1xNm
      -
      -
      -
      -
      -

      Keyword arguments:

      -
      -
      baseline : [‘zero’, ‘sym’, ‘wiggle’, ‘weighted_wiggle’]
      -
      Method used to calculate the baseline. ‘zero’ is just a -simple stacked plot. ‘sym’ is symmetric around zero and -is sometimes called ThemeRiver. ‘wiggle’ minimizes the -sum of the squared slopes. ‘weighted_wiggle’ does the -same but weights to account for size of each layer. -It is also called Streamgraph-layout. More details -can be found at http://www.leebyron.com/else/streamgraph/.
      -
      colors : A list or tuple of colors. These will be cycled through and
      -
      used to colour the stacked areas. -All other keyword arguments are passed to -fill_between()
      -
      -

      Returns r : A list of -PolyCollection, one for each -element in the stacked area plot.

      -
      - -
      -
      -start_pan(x, y, button)
      -

      Called when a pan operation has started.

      -

      x, y are the mouse coordinates in display coords. -button is the mouse button number:

      -
        -
      • 1: LEFT
      • -
      • 2: MIDDLE
      • -
      • 3: RIGHT
      • -
      -
      -

      Note

      -

      Intended to be overridden by new projection types.

      -
      -
      - -
      -
      -stem(*args, **kwargs)
      -

      Create a stem plot.

      -

      Call signatures:

      -
      stem(y, linefmt='b-', markerfmt='bo', basefmt='r-')
      -stem(x, y, linefmt='b-', markerfmt='bo', basefmt='r-')
      -
      -
      -

      A stem plot plots vertical lines (using linefmt) at each x -location from the baseline to y, and places a marker there -using markerfmt. A horizontal line at 0 is is plotted using -basefmt.

      -

      If no x values are provided, the default is (0, 1, ..., len(y) - 1)

      -

      Return value is a tuple (markerline, stemlines, -baseline).

      -
      -

      See also

      -

      This -document -for details.

      -
      -

      Example:

      -

      (Source code, png, hires.png, pdf)

      -
      -../_images/stem_plot.png -
      -
      - -
      -
      -step(x, y, *args, **kwargs)
      -

      Make a step plot.

      -

      Call signature:

      -
      step(x, y, *args, **kwargs)
      -
      -
      -

      Additional keyword args to step() are the same as those -for plot().

      -

      x and y must be 1-D sequences, and it is assumed, but not checked, -that x is uniformly increasing.

      -

      Keyword arguments:

      -
      -
      where: [ ‘pre’ | ‘post’ | ‘mid’ ]
      -

      If ‘pre’, the interval from x[i] to x[i+1] has level y[i+1]

      -

      If ‘post’, that interval has level y[i]

      -

      If ‘mid’, the jumps in y occur half-way between the -x-values.

      -
      -
      -
      - -
      -
      -streamplot(x, y, u, v, density=1, linewidth=None, color=None, cmap=None, norm=None, arrowsize=1, arrowstyle='-|>', minlength=0.1, transform=None)
      -

      Draws streamlines of a vector flow.

      -
      -
      x, y : 1d arrays
      -
      an evenly spaced grid.
      -
      u, v : 2d arrays
      -
      x and y-velocities. Number of rows should match length of y, and -the number of columns should match x.
      -
      density : float or 2-tuple
      -
      Controls the closeness of streamlines. When density = 1, the domain -is divided into a 25x25 grid—density linearly scales this grid. -Each cell in the grid can have, at most, one traversing streamline. -For different densities in each direction, use [density_x, density_y].
      -
      linewidth : numeric or 2d array
      -
      vary linewidth when given a 2d array with the same shape as velocities.
      -
      color : matplotlib color code, or 2d array
      -
      Streamline color. When given an array with the same shape as -velocities, color values are converted to colors using cmap.
      -
      cmap : Colormap
      -
      Colormap used to plot streamlines and arrows. Only necessary when using -an array input for color.
      -
      norm : Normalize
      -
      Normalize object used to scale luminance data to 0, 1. If None, stretch -(min, max) to (0, 1). Only necessary when color is an array.
      -
      arrowsize : float
      -
      Factor scale arrow size.
      -
      arrowstyle : str
      -
      Arrow style specification. -See FancyArrowPatch.
      -
      minlength : float
      -
      Minimum length of streamline in axes coordinates.
      -
      -

      Returns:

      -
      -
      -
      stream_container : StreamplotSet
      -

      Container object with attributes

      -
      -
      -
      -

      This container will probably change in the future to allow changes -to the colormap, alpha, etc. for both lines and arrows, but these -changes should be backward compatible.

      -
      -
      -
      -
      - -
      -
      -table(**kwargs)
      -

      Add a table to the current axes.

      -

      Call signature:

      -
      table(cellText=None, cellColours=None,
      -      cellLoc='right', colWidths=None,
      -      rowLabels=None, rowColours=None, rowLoc='left',
      -      colLabels=None, colColours=None, colLoc='center',
      -      loc='bottom', bbox=None):
      -
      -

      Returns a matplotlib.table.Table instance. For finer -grained control over tables, use the -Table class and add it to the axes -with add_table().

      -

      Thanks to John Gill for providing the class and table.

      -

      kwargs control the Table -properties:

      -
      -
      ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      PropertyDescription
      agg_filterunknown
      alphafloat (0.0 transparent through 1.0 opaque)
      animated[True | False]
      axesan Axes instance
      clip_boxa matplotlib.transforms.Bbox instance
      clip_on[True | False]
      clip_path[ (Path, Transform) | Patch | None ]
      containsa callable function
      figurea matplotlib.figure.Figure instance
      fontsizea float in points
      gidan id string
      labelstring or anything printable with ‘%s’ conversion.
      lod[True | False]
      picker[None|float|boolean|callable]
      rasterized[True | False | None]
      snapunknown
      transformTransform instance
      urla url string
      visible[True | False]
      zorderany number
      -
      -
      - -
      -
      -text(x, y, s, fontdict=None, withdash=False, **kwargs)
      -

      Add text to the axes.

      -

      Add text in string s to axis at location x, y, data -coordinates.

      - --- - - - - - - -
      Parameters :

      s : string

      -
      -

      text

      -
      -

      x, y : scalars

      -
      -

      data coordinates

      -
      -

      fontdict : dictionary, optional, default: None

      -
      -

      A dictionary to override the default text properties. If fontdict -is None, the defaults are determined by your rc parameters.

      -
      -

      withdash : boolean, optional, default: False

      -
      -

      Creates a TextWithDash instance instead of a -Text instance.

      -
      -
      Other Parameters:
       

      kwargs : Text properties.

      -
      -

      Examples

      -

      Individual keyword arguments can be used to override any given -parameter:

      -
      >>> text(x, y, s, fontsize=12)
      -
      -
      -

      The default transform specifies that text is in data coords, -alternatively, you can specify text in axis coords (0,0 is -lower-left and 1,1 is upper-right). The example below places -text in the center of the axes:

      -
      >>> text(0.5, 0.5,'matplotlib', horizontalalignment='center',
      ->>>      verticalalignment='center',
      ->>>      transform = ax.transAxes)
      -
      -
      -

      You can put a rectangular box around the text instance (e.g., to -set a background color) by using the keyword bbox. bbox is -a dictionary of Rectangle -properties. For example:

      -
      >>> text(x, y, s, bbox=dict(facecolor='red', alpha=0.5))
      -
      -
      -
      - -
      -
      -tick_params(axis='both', **kwargs)
      -

      Change the appearance of ticks and tick labels.

      -

      Keyword arguments:

      -
      -
      axis : [‘x’ | ‘y’ | ‘both’]
      -
      Axis on which to operate; default is ‘both’.
      -
      reset : [True | False]
      -
      If True, set all parameters to defaults -before processing other keyword arguments. Default is -False.
      -
      which : [‘major’ | ‘minor’ | ‘both’]
      -
      Default is ‘major’; apply arguments to which ticks.
      -
      direction : [‘in’ | ‘out’ | ‘inout’]
      -
      Puts ticks inside the axes, outside the axes, or both.
      -
      length
      -
      Tick length in points.
      -
      width
      -
      Tick width in points.
      -
      color
      -
      Tick color; accepts any mpl color spec.
      -
      pad
      -
      Distance in points between tick and label.
      -
      labelsize
      -
      Tick label font size in points or as a string (e.g., ‘large’).
      -
      labelcolor
      -
      Tick label color; mpl color spec.
      -
      colors
      -
      Changes the tick color and the label color to the same value: -mpl color spec.
      -
      zorder
      -
      Tick and label zorder.
      -
      bottom, top, left, right : [bool | ‘on’ | ‘off’]
      -
      controls whether to draw the respective ticks.
      -
      labelbottom, labeltop, labelleft, labelright
      -
      Boolean or [‘on’ | ‘off’], controls whether to draw the -respective tick labels.
      -
      -

      Example:

      -
      ax.tick_params(direction='out', length=6, width=2, colors='r')
      -
      -
      -

      This will make all major ticks be red, pointing out of the box, -and with dimensions 6 points by 2 points. Tick labels will -also be red.

      -
      - -
      -
      -ticklabel_format(**kwargs)
      -

      Change the ScalarFormatter used by -default for linear axes.

      -

      Optional keyword arguments:

      -
      -
      ---- - - - - - - - - - - - - - - - - - - - - - - -
      KeywordDescription
      style[ ‘sci’ (or ‘scientific’) | ‘plain’ ] -plain turns off scientific notation
      scilimits(m, n), pair of integers; if style -is ‘sci’, scientific notation will -be used for numbers outside the range -10`m`:sup: to 10`n`:sup:. -Use (0,0) to include all numbers.
      useOffset[True | False | offset]; if True, -the offset will be calculated as needed; -if False, no offset will be used; if a -numeric offset is specified, it will be -used.
      axis[ ‘x’ | ‘y’ | ‘both’ ]
      useLocaleIf True, format the number according to -the current locale. This affects things -such as the character used for the -decimal separator. If False, use -C-style (English) formatting. The -default setting is controlled by the -axes.formatter.use_locale rcparam.
      -
      -

      Only the major ticks are affected. -If the method is called when the -ScalarFormatter is not the -Formatter being used, an -AttributeError will be raised.

      -
      - -
      -
      -tricontour(*args, **kwargs)
      -

      Draw contours on an unstructured triangular grid. -tricontour() and -tricontourf() draw contour lines and -filled contours, respectively. Except as noted, function -signatures and return values are the same for both versions.

      -

      The triangulation can be specified in one of two ways; either:

      -
      tricontour(triangulation, ...)
      -
      -
      -

      where triangulation is a matplotlib.tri.Triangulation -object, or

      -
      tricontour(x, y, ...)
      -tricontour(x, y, triangles, ...)
      -tricontour(x, y, triangles=triangles, ...)
      -tricontour(x, y, mask=mask, ...)
      -tricontour(x, y, triangles, mask=mask, ...)
      -
      -
      -

      in which case a Triangulation object will be created. See -Triangulation for a explanation of -these possibilities.

      -

      The remaining arguments may be:

      -
      tricontour(..., Z)
      -
      -
      -

      where Z is the array of values to contour, one per point -in the triangulation. The level values are chosen -automatically.

      -
      tricontour(..., Z, N)
      -
      -
      -

      contour N automatically-chosen levels.

      -
      tricontour(..., Z, V)
      -
      -
      -

      draw contour lines at the values specified in sequence V

      -
      tricontourf(..., Z, V)
      -
      -
      -

      fill the (len(V)-1) regions between the values in V

      -
      tricontour(Z, **kwargs)
      -
      -
      -

      Use keyword args to control colors, linewidth, origin, cmap ... see -below for more details.

      -

      C = tricontour(...) returns a -TriContourSet object.

      -

      Optional keyword arguments:

      -
      -
      -
      colors: [ None | string | (mpl_colors) ]
      -

      If None, the colormap specified by cmap will be used.

      -

      If a string, like ‘r’ or ‘red’, all levels will be plotted in this -color.

      -

      If a tuple of matplotlib color args (string, float, rgb, etc), -different levels will be plotted in different colors in the order -specified.

      -
      -
      alpha: float
      -
      The alpha blending value
      -
      cmap: [ None | Colormap ]
      -
      A cm Colormap instance or -None. If cmap is None and colors is None, a -default Colormap is used.
      -
      norm: [ None | Normalize ]
      -
      A matplotlib.colors.Normalize instance for -scaling data values to colors. If norm is None and -colors is None, the default linear scaling is used.
      -
      levels [level0, level1, ..., leveln]
      -
      A list of floating point numbers indicating the level -curves to draw; eg to draw just the zero contour pass -levels=[0]
      -
      origin: [ None | ‘upper’ | ‘lower’ | ‘image’ ]
      -

      If None, the first value of Z will correspond to the -lower left corner, location (0,0). If ‘image’, the rc -value for image.origin will be used.

      -

      This keyword is not active if X and Y are specified in -the call to contour.

      -
      -
      -

      extent: [ None | (x0,x1,y0,y1) ]

      -
      -

      If origin is not None, then extent is interpreted as -in matplotlib.pyplot.imshow(): it gives the outer -pixel boundaries. In this case, the position of Z[0,0] -is the center of the pixel, not a corner. If origin is -None, then (x0, y0) is the position of Z[0,0], and -(x1, y1) is the position of Z[-1,-1].

      -

      This keyword is not active if X and Y are specified in -the call to contour.

      -
      -
      -
      locator: [ None | ticker.Locator subclass ]
      -
      If locator is None, the default -MaxNLocator is used. The -locator is used to determine the contour levels if they -are not given explicitly via the V argument.
      -
      extend: [ ‘neither’ | ‘both’ | ‘min’ | ‘max’ ]
      -
      Unless this is ‘neither’, contour levels are automatically -added to one or both ends of the range so that all data -are included. These added ranges are then mapped to the -special colormap values which default to the ends of the -colormap range, but can be set via -matplotlib.colors.Colormap.set_under() and -matplotlib.colors.Colormap.set_over() methods.
      -
      xunits, yunits: [ None | registered units ]
      -
      Override axis units by specifying an instance of a -matplotlib.units.ConversionInterface.
      -
      -
      -

      tricontour-only keyword arguments:

      -
      -
      -
      linewidths: [ None | number | tuple of numbers ]
      -

      If linewidths is None, the default width in -lines.linewidth in matplotlibrc is used.

      -

      If a number, all levels will be plotted with this linewidth.

      -

      If a tuple, different levels will be plotted with different -linewidths in the order specified

      -
      -
      linestyles: [ None | ‘solid’ | ‘dashed’ | ‘dashdot’ | ‘dotted’ ]
      -

      If linestyles is None, the ‘solid’ is used.

      -

      linestyles can also be an iterable of the above strings -specifying a set of linestyles to be used. If this -iterable is shorter than the number of contour levels -it will be repeated as necessary.

      -

      If contour is using a monochrome colormap and the contour -level is less than 0, then the linestyle specified -in contour.negative_linestyle in matplotlibrc -will be used.

      -
      -
      -
      -

      tricontourf-only keyword arguments:

      -
      -
      -
      antialiased: [ True | False ]
      -
      enable antialiasing
      -
      nchunk: [ 0 | integer ]
      -
      If 0, no subdivision of the domain. Specify a positive integer to -divide the domain into subdomains of roughly nchunk by nchunk -points. This may never actually be advantageous, so this option may -be removed. Chunking introduces artifacts at the chunk boundaries -unless antialiased is False.
      -
      -
      -

      Note: tricontourf fills intervals that are closed at the top; that -is, for boundaries z1 and z2, the filled region is:

      -
      z1 < z <= z2
      -
      -
      -

      There is one exception: if the lowest boundary coincides with -the minimum value of the z array, then that minimum value -will be included in the lowest interval.

      -

      Examples:

      -

      (Source code)

      -
      -../_images/tricontour_demo_00.png -

      (png, hires.png, pdf)

      -
      -
      -../_images/tricontour_demo_01.png -

      (png, hires.png, pdf)

      -
      -
      - -
      -
      -tricontourf(*args, **kwargs)
      -

      Draw contours on an unstructured triangular grid. -tricontour() and -tricontourf() draw contour lines and -filled contours, respectively. Except as noted, function -signatures and return values are the same for both versions.

      -

      The triangulation can be specified in one of two ways; either:

      -
      tricontour(triangulation, ...)
      -
      -
      -

      where triangulation is a matplotlib.tri.Triangulation -object, or

      -
      tricontour(x, y, ...)
      -tricontour(x, y, triangles, ...)
      -tricontour(x, y, triangles=triangles, ...)
      -tricontour(x, y, mask=mask, ...)
      -tricontour(x, y, triangles, mask=mask, ...)
      -
      -
      -

      in which case a Triangulation object will be created. See -Triangulation for a explanation of -these possibilities.

      -

      The remaining arguments may be:

      -
      tricontour(..., Z)
      -
      -
      -

      where Z is the array of values to contour, one per point -in the triangulation. The level values are chosen -automatically.

      -
      tricontour(..., Z, N)
      -
      -
      -

      contour N automatically-chosen levels.

      -
      tricontour(..., Z, V)
      -
      -
      -

      draw contour lines at the values specified in sequence V

      -
      tricontourf(..., Z, V)
      -
      -
      -

      fill the (len(V)-1) regions between the values in V

      -
      tricontour(Z, **kwargs)
      -
      -
      -

      Use keyword args to control colors, linewidth, origin, cmap ... see -below for more details.

      -

      C = tricontour(...) returns a -TriContourSet object.

      -

      Optional keyword arguments:

      -
      -
      -
      colors: [ None | string | (mpl_colors) ]
      -

      If None, the colormap specified by cmap will be used.

      -

      If a string, like ‘r’ or ‘red’, all levels will be plotted in this -color.

      -

      If a tuple of matplotlib color args (string, float, rgb, etc), -different levels will be plotted in different colors in the order -specified.

      -
      -
      alpha: float
      -
      The alpha blending value
      -
      cmap: [ None | Colormap ]
      -
      A cm Colormap instance or -None. If cmap is None and colors is None, a -default Colormap is used.
      -
      norm: [ None | Normalize ]
      -
      A matplotlib.colors.Normalize instance for -scaling data values to colors. If norm is None and -colors is None, the default linear scaling is used.
      -
      levels [level0, level1, ..., leveln]
      -
      A list of floating point numbers indicating the level -curves to draw; eg to draw just the zero contour pass -levels=[0]
      -
      origin: [ None | ‘upper’ | ‘lower’ | ‘image’ ]
      -

      If None, the first value of Z will correspond to the -lower left corner, location (0,0). If ‘image’, the rc -value for image.origin will be used.

      -

      This keyword is not active if X and Y are specified in -the call to contour.

      -
      -
      -

      extent: [ None | (x0,x1,y0,y1) ]

      -
      -

      If origin is not None, then extent is interpreted as -in matplotlib.pyplot.imshow(): it gives the outer -pixel boundaries. In this case, the position of Z[0,0] -is the center of the pixel, not a corner. If origin is -None, then (x0, y0) is the position of Z[0,0], and -(x1, y1) is the position of Z[-1,-1].

      -

      This keyword is not active if X and Y are specified in -the call to contour.

      -
      -
      -
      locator: [ None | ticker.Locator subclass ]
      -
      If locator is None, the default -MaxNLocator is used. The -locator is used to determine the contour levels if they -are not given explicitly via the V argument.
      -
      extend: [ ‘neither’ | ‘both’ | ‘min’ | ‘max’ ]
      -
      Unless this is ‘neither’, contour levels are automatically -added to one or both ends of the range so that all data -are included. These added ranges are then mapped to the -special colormap values which default to the ends of the -colormap range, but can be set via -matplotlib.colors.Colormap.set_under() and -matplotlib.colors.Colormap.set_over() methods.
      -
      xunits, yunits: [ None | registered units ]
      -
      Override axis units by specifying an instance of a -matplotlib.units.ConversionInterface.
      -
      -
      -

      tricontour-only keyword arguments:

      -
      -
      -
      linewidths: [ None | number | tuple of numbers ]
      -

      If linewidths is None, the default width in -lines.linewidth in matplotlibrc is used.

      -

      If a number, all levels will be plotted with this linewidth.

      -

      If a tuple, different levels will be plotted with different -linewidths in the order specified

      -
      -
      linestyles: [ None | ‘solid’ | ‘dashed’ | ‘dashdot’ | ‘dotted’ ]
      -

      If linestyles is None, the ‘solid’ is used.

      -

      linestyles can also be an iterable of the above strings -specifying a set of linestyles to be used. If this -iterable is shorter than the number of contour levels -it will be repeated as necessary.

      -

      If contour is using a monochrome colormap and the contour -level is less than 0, then the linestyle specified -in contour.negative_linestyle in matplotlibrc -will be used.

      -
      -
      -
      -

      tricontourf-only keyword arguments:

      -
      -
      -
      antialiased: [ True | False ]
      -
      enable antialiasing
      -
      nchunk: [ 0 | integer ]
      -
      If 0, no subdivision of the domain. Specify a positive integer to -divide the domain into subdomains of roughly nchunk by nchunk -points. This may never actually be advantageous, so this option may -be removed. Chunking introduces artifacts at the chunk boundaries -unless antialiased is False.
      -
      -
      -

      Note: tricontourf fills intervals that are closed at the top; that -is, for boundaries z1 and z2, the filled region is:

      -
      z1 < z <= z2
      -
      -
      -

      There is one exception: if the lowest boundary coincides with -the minimum value of the z array, then that minimum value -will be included in the lowest interval.

      -

      Examples:

      -

      (Source code)

      -
      -../_images/tricontour_demo_00.png -

      (png, hires.png, pdf)

      -
      -
      -../_images/tricontour_demo_01.png -

      (png, hires.png, pdf)

      -
      -
      - -
      -
      -tripcolor(*args, **kwargs)
      -

      Create a pseudocolor plot of an unstructured triangular grid.

      -

      The triangulation can be specified in one of two ways; either:

      -
      tripcolor(triangulation, ...)
      -
      -
      -

      where triangulation is a matplotlib.tri.Triangulation -object, or

      -
      tripcolor(x, y, ...)
      -tripcolor(x, y, triangles, ...)
      -tripcolor(x, y, triangles=triangles, ...)
      -tripcolor(x, y, mask=mask, ...)
      -tripcolor(x, y, triangles, mask=mask, ...)
      -
      -
      -

      in which case a Triangulation object will be created. See -Triangulation for a explanation of these -possibilities.

      -

      The next argument must be C, the array of color values, either -one per point in the triangulation if color values are defined at -points, or one per triangle in the triangulation if color values -are defined at triangles. If there are the same number of points -and triangles in the triangulation it is assumed that color -values are defined at points; to force the use of color values at -triangles use the kwarg facecolors*=C instead of just *C.

      -

      shading may be ‘flat’ (the default) or ‘gouraud’. If shading -is ‘flat’ and C values are defined at points, the color values -used for each triangle are from the mean C of the triangle’s -three points. If shading is ‘gouraud’ then color values must be -defined at points. shading of ‘faceted’ is deprecated; -please use edgecolors instead.

      -

      The remaining kwargs are the same as for -pcolor().

      -

      Example:

      -
      -

      (Source code)

      -
      -../_images/tripcolor_demo_00.png -

      (png, hires.png, pdf)

      -
      -
      -../_images/tripcolor_demo_01.png -

      (png, hires.png, pdf)

      -
      -
      -../_images/tripcolor_demo_02.png -

      (png, hires.png, pdf)

      -
      -
      -
      - -
      -
      -triplot(*args, **kwargs)
      -

      Draw a unstructured triangular grid as lines and/or markers.

      -

      The triangulation to plot can be specified in one of two ways; -either:

      -
      triplot(triangulation, ...)
      -
      -
      -

      where triangulation is a matplotlib.tri.Triangulation -object, or

      -
      triplot(x, y, ...)
      -triplot(x, y, triangles, ...)
      -triplot(x, y, triangles=triangles, ...)
      -triplot(x, y, mask=mask, ...)
      -triplot(x, y, triangles, mask=mask, ...)
      -
      -
      -

      in which case a Triangulation object will be created. See -Triangulation for a explanation of these -possibilities.

      -

      The remaining args and kwargs are the same as for -plot().

      -

      Example:

      -
      -

      (Source code)

      -
      -../_images/triplot_demo_00.png -

      (png, hires.png, pdf)

      -
      -
      -../_images/triplot_demo_01.png -

      (png, hires.png, pdf)

      -
      -
      -
      - -
      -
      -twinx()
      -

      Call signature:

      -
      ax = twinx()
      -
      -
      -

      create a twin of Axes for generating a plot with a sharex -x-axis but independent y axis. The y-axis of self will have -ticks on left and the returned axes will have ticks on the -right.

      -
      -

      Note

      -

      For those who are ‘picking’ artists while using twinx, pick -events are only called for the artists in the top-most axes.

      -
      -
      - -
      -
      -twiny()
      -

      Call signature:

      -
      ax = twiny()
      -
      -
      -

      create a twin of Axes for generating a plot with a shared -y-axis but independent x axis. The x-axis of self will have -ticks on bottom and the returned axes will have ticks on the -top.

      -
      -

      Note

      -

      For those who are ‘picking’ artists while using twiny, pick -events are only called for the artists in the top-most axes.

      -
      -
      - -
      -
      -update_datalim(xys, updatex=True, updatey=True)
      -

      Update the data lim bbox with seq of xy tups or equiv. 2-D array

      -
      - -
      -
      -update_datalim_bounds(bounds)
      -

      Update the datalim to include the given -Bbox bounds

      -
      - -
      -
      -update_datalim_numerix(x, y)
      -

      Update the data lim bbox with seq of xy tups

      -
      - -
      -
      -vlines(x, ymin, ymax, colors='k', linestyles='solid', label='', **kwargs)
      -

      Plot vertical lines.

      -

      Plot vertical lines at each x from ymin to ymax.

      - --- - - - - - - - - -
      Parameters :

      x : scalar or 1D array_like

      -
      -

      x-indexes where to plot the lines.

      -
      -

      xmin, xmax : scalar or 1D array_like

      -
      -

      Respective beginning and end of each line. If scalars are -provided, all lines will have same length.

      -
      -

      colors : array_like of colors, optional, default: ‘k’

      -

      linestyles : [‘solid’ | ‘dashed’ | ‘dashdot’ | ‘dotted’], optional

      -

      label : string, optional, default: ‘’

      -
      Returns :

      lines : LineCollection

      -
      Other Parameters:
       

      kwargs : LineCollection properties.

      -
      -
      -

      See also

      -
      -
      hlines
      -
      horizontal lines
      -
      -
      -

      Examples

      -

      (Source code, png, hires.png, pdf)

      -
      -../_images/vline_hline_demo.png -
      -
      - -
      -
      -xaxis_date(tz=None)
      -

      Sets up x-axis ticks and labels that treat the x data as dates.

      -

      tz is a timezone string or tzinfo instance. -Defaults to rc value.

      -
      - -
      -
      -xaxis_inverted()
      -

      Returns True if the x-axis is inverted.

      -
      - -
      -
      -xcorr(x, y, normed=True, detrend=<function detrend_none at 0x34d25f0>, usevlines=True, maxlags=10, **kwargs)
      -

      Plot the cross correlation between x and y.

      -

      Call signature:

      -
      xcorr(self, x, y, normed=True, detrend=mlab.detrend_none,
      -  usevlines=True, maxlags=10, **kwargs)
      -
      -
      -

      If normed = True, normalize the data by the cross -correlation at 0-th lag. x and y are detrended by the -detrend callable (default no normalization). x and y -must be equal length.

      -

      Data are plotted as plot(lags, c, **kwargs)

      -

      Return value is a tuple (lags, c, line) where:

      -
      -
        -
      • lags are a length 2*maxlags+1 lag vector

        -
      • -
      • c is the 2*maxlags+1 auto correlation vector

        -
      • -
      • -
        line is a Line2D instance
        -

        returned by plot().

        -
        -
        -
      • -
      -
      -

      The default linestyle is None and the default marker is -‘o’, though these can be overridden with keyword args. The -cross correlation is performed with numpy.correlate() -with mode = 2.

      -

      If usevlines is True:

      -
      -

      vlines() -rather than plot() is used to draw -vertical lines from the origin to the xcorr. Otherwise the -plotstyle is determined by the kwargs, which are -Line2D properties.

      -

      The return value is a tuple (lags, c, linecol, b) -where linecol is the -matplotlib.collections.LineCollection instance and -b is the x-axis.

      -
      -

      maxlags is a positive integer detailing the number of lags to show. -The default value of None will return all (2*len(x)-1) lags.

      -

      Example:

      -

      xcorr() is top graph, and -acorr() is bottom graph.

      -

      (Source code, png, hires.png, pdf)

      -
      -../_images/xcorr_demo.png -
      -
      - -
      -
      -yaxis_date(tz=None)
      -

      Sets up y-axis ticks and labels that treat the y data as dates.

      -

      tz is a timezone string or tzinfo instance. -Defaults to rc value.

      -
      - -
      -
      -yaxis_inverted()
      -

      Returns True if the y-axis is inverted.

      -
      - -
      - -
      -
      -matplotlib.axes.Subplot
      -

      alias of AxesSubplot

      -
      - -
      -
      -class matplotlib.axes.SubplotBase(fig, *args, **kwargs)
      -

      Base class for subplots, which are Axes instances with -additional methods to facilitate generating and manipulating a set -of Axes within a figure.

      -

      fig is a matplotlib.figure.Figure instance.

      -

      args is the tuple (numRows, numCols, plotNum), where -the array of subplots in the figure has dimensions numRows, -numCols, and where plotNum is the number of the subplot -being created. plotNum starts at 1 in the upper left -corner and increases to the right.

      -

      If numRows <= numCols <= plotNum < 10, args can be the -decimal integer numRows * 100 + numCols * 10 + plotNum.

      -
      -
      -change_geometry(numrows, numcols, num)
      -

      change subplot geometry, e.g., from 1,1,1 to 2,2,3

      -
      - -
      -
      -get_geometry()
      -

      get the subplot geometry, eg 2,2,3

      -
      - -
      -
      -get_subplotspec()
      -

      get the SubplotSpec instance associated with the subplot

      -
      - -
      -
      -is_first_col()
      -
      - -
      -
      -is_first_row()
      -
      - -
      -
      -is_last_col()
      -
      - -
      -
      -is_last_row()
      -
      - -
      -
      -label_outer()
      -

      set the visible property on ticklabels so xticklabels are -visible only if the subplot is in the last row and yticklabels -are visible only if the subplot is in the first column

      -
      - -
      -
      -set_subplotspec(subplotspec)
      -

      set the SubplotSpec instance associated with the subplot

      -
      - -
      -
      -update_params()
      -

      update the subplot position from fig.subplotpars

      -
      - -
      - -
      -
      -matplotlib.axes.subplot_class_factory(axes_class=None)
      -
      - -
      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/api/axis_api.html b/dev/api/axis_api.html deleted file mode 100644 index 1574bbf2854..00000000000 --- a/dev/api/axis_api.html +++ /dev/null @@ -1,1008 +0,0 @@ - - - - - - - - axis — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      Table Of Contents

      - - -

      Previous topic

      -

      axes

      -

      Next topic

      -

      backends

      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      axis

      -
      -

      matplotlib.axis

      -

      Classes for the ticks and x and y axis

      -
      -
      -class matplotlib.axis.Axis(axes, pickradius=15)
      -

      Bases: matplotlib.artist.Artist

      -

      Public attributes

      -
        -
      • axes.transData - transform data coords to display coords
      • -
      • axes.transAxes - transform axis coords to display coords
      • -
      • labelpad - number of points between the axis and its label
      • -
      -

      Init the axis with the parent Axes instance

      -
      -
      -OFFSETTEXTPAD = 3
      -
      - -
      -
      -axis_date(tz=None)
      -

      Sets up x-axis ticks and labels that treat the x data as dates. -tz is a tzinfo instance or a timezone string. -This timezone is used to create date labels.

      -
      - -
      -
      -cla()
      -

      clear the current axis

      -
      - -
      -
      -convert_units(x)
      -
      - -
      -
      -draw(artist, renderer, *args, **kwargs)
      -

      Draw the axis lines, grid lines, tick lines and labels

      -
      - -
      -
      -get_children()
      -
      - -
      -
      -get_data_interval()
      -

      return the Interval instance for this axis data limits

      -
      - -
      -
      -get_gridlines()
      -

      Return the grid lines as a list of Line2D instance

      -
      - -
      -
      -get_label()
      -

      Return the axis label as a Text instance

      -
      - -
      -
      -get_label_text()
      -

      Get the text of the label

      -
      - -
      -
      -get_major_formatter()
      -

      Get the formatter of the major ticker

      -
      - -
      -
      -get_major_locator()
      -

      Get the locator of the major ticker

      -
      - -
      -
      -get_major_ticks(numticks=None)
      -

      get the tick instances; grow as necessary

      -
      - -
      -
      -get_majorticklabels()
      -

      Return a list of Text instances for the major ticklabels

      -
      - -
      -
      -get_majorticklines()
      -

      Return the major tick lines as a list of Line2D instances

      -
      - -
      -
      -get_majorticklocs()
      -

      Get the major tick locations in data coordinates as a numpy array

      -
      - -
      -
      -get_minor_formatter()
      -

      Get the formatter of the minor ticker

      -
      - -
      -
      -get_minor_locator()
      -

      Get the locator of the minor ticker

      -
      - -
      -
      -get_minor_ticks(numticks=None)
      -

      get the minor tick instances; grow as necessary

      -
      - -
      -
      -get_minorticklabels()
      -

      Return a list of Text instances for the minor ticklabels

      -
      - -
      -
      -get_minorticklines()
      -

      Return the minor tick lines as a list of Line2D instances

      -
      - -
      -
      -get_minorticklocs()
      -

      Get the minor tick locations in data coordinates as a numpy array

      -
      - -
      -
      -get_offset_text()
      -

      Return the axis offsetText as a Text instance

      -
      - -
      -
      -get_pickradius()
      -

      Return the depth of the axis used by the picker

      -
      - -
      -
      -get_scale()
      -
      - -
      -
      -get_smart_bounds()
      -

      get whether the axis has smart bounds

      -
      - -
      -
      -get_ticklabel_extents(renderer)
      -

      Get the extents of the tick labels on either side -of the axes.

      -
      - -
      -
      -get_ticklabels(minor=False)
      -

      Return a list of Text instances for ticklabels

      -
      - -
      -
      -get_ticklines(minor=False)
      -

      Return the tick lines as a list of Line2D instances

      -
      - -
      -
      -get_ticklocs(minor=False)
      -

      Get the tick locations in data coordinates as a numpy array

      -
      - -
      -
      -get_tightbbox(renderer)
      -

      Return a bounding box that encloses the axis. It only accounts -tick labels, axis label, and offsetText.

      -
      - -
      -
      -get_transform()
      -
      - -
      -
      -get_units()
      -

      return the units for axis

      -
      - -
      -
      -get_view_interval()
      -

      return the Interval instance for this axis view limits

      -
      - -
      -
      -grid(b=None, which='major', **kwargs)
      -

      Set the axis grid on or off; b is a boolean. Use which = -‘major’ | ‘minor’ | ‘both’ to set the grid for major or minor ticks.

      -

      If b is None and len(kwargs)==0, toggle the grid state. If -kwargs are supplied, it is assumed you want the grid on and b -will be set to True.

      -

      kwargs are used to set the line properties of the grids, eg,

      -
      -
      xax.grid(color=’r’, linestyle=’-‘, linewidth=2)
      -
      - -
      -
      -have_units()
      -
      - -
      -
      -iter_ticks()
      -

      Iterate through all of the major and minor ticks.

      -
      - -
      -
      -limit_range_for_scale(vmin, vmax)
      -
      - -
      -
      -pan(numsteps)
      -

      Pan numsteps (can be positive or negative)

      -
      - -
      -
      -reset_ticks()
      -
      - -
      -
      -set_clip_path(clippath, transform=None)
      -
      - -
      -
      -set_data_interval()
      -

      set the axis data limits

      -
      - -
      -
      -set_default_intervals()
      -

      set the default limits for the axis data and view interval if they -are not mutated

      -
      - -
      -
      -set_label_coords(x, y, transform=None)
      -

      Set the coordinates of the label. By default, the x -coordinate of the y label is determined by the tick label -bounding boxes, but this can lead to poor alignment of -multiple ylabels if there are multiple axes. Ditto for the y -coodinate of the x label.

      -

      You can also specify the coordinate system of the label with -the transform. If None, the default coordinate system will be -the axes coordinate system (0,0) is (left,bottom), (0.5, 0.5) -is middle, etc

      -
      - -
      -
      -set_label_text(label, fontdict=None, **kwargs)
      -

      Sets the text value of the axis label

      -

      ACCEPTS: A string value for the label

      -
      - -
      -
      -set_major_formatter(formatter)
      -

      Set the formatter of the major ticker

      -

      ACCEPTS: A Formatter instance

      -
      - -
      -
      -set_major_locator(locator)
      -

      Set the locator of the major ticker

      -

      ACCEPTS: a Locator instance

      -
      - -
      -
      -set_minor_formatter(formatter)
      -

      Set the formatter of the minor ticker

      -

      ACCEPTS: A Formatter instance

      -
      - -
      -
      -set_minor_locator(locator)
      -

      Set the locator of the minor ticker

      -

      ACCEPTS: a Locator instance

      -
      - -
      -
      -set_pickradius(pickradius)
      -

      Set the depth of the axis used by the picker

      -

      ACCEPTS: a distance in points

      -
      - -
      -
      -set_scale(value, **kwargs)
      -
      - -
      -
      -set_smart_bounds(value)
      -

      set the axis to have smart bounds

      -
      - -
      -
      -set_tick_params(which='major', reset=False, **kw)
      -

      Set appearance parameters for ticks and ticklabels.

      -

      For documentation of keyword arguments, see -matplotlib.axes.Axes.tick_params().

      -
      - -
      -
      -set_ticklabels(ticklabels, *args, **kwargs)
      -

      Set the text values of the tick labels. Return a list of Text -instances. Use kwarg minor=True to select minor ticks. -All other kwargs are used to update the text object properties. -As for get_ticklabels, label1 (left or bottom) is -affected for a given tick only if its label1On attribute -is True, and similarly for label2. The list of returned -label text objects consists of all such label1 objects followed -by all such label2 objects.

      -

      The input ticklabels is assumed to match the set of -tick locations, regardless of the state of label1On and -label2On.

      -

      ACCEPTS: sequence of strings

      -
      - -
      -
      -set_ticks(ticks, minor=False)
      -

      Set the locations of the tick marks from sequence ticks

      -

      ACCEPTS: sequence of floats

      -
      - -
      -
      -set_units(u)
      -

      set the units for axis

      -

      ACCEPTS: a units tag

      -
      - -
      -
      -set_view_interval(vmin, vmax, ignore=False)
      -
      - -
      -
      -update_units(data)
      -

      introspect data for units converter and update the -axis.converter instance if necessary. Return True -if data is registered for unit conversion.

      -
      - -
      -
      -zoom(direction)
      -

      Zoom in/out on axis; if direction is >0 zoom in, else zoom out

      -
      - -
      - -
      -
      -class matplotlib.axis.Tick(axes, loc, label, size=None, width=None, color=None, tickdir=None, pad=None, labelsize=None, labelcolor=None, zorder=None, gridOn=None, tick1On=True, tick2On=True, label1On=True, label2On=False, major=True)
      -

      Bases: matplotlib.artist.Artist

      -

      Abstract base class for the axis ticks, grid lines and labels

      -

      1 refers to the bottom of the plot for xticks and the left for yticks -2 refers to the top of the plot for xticks and the right for yticks

      -

      Publicly accessible attributes:

      -
      -
      -
      tick1line
      -
      a Line2D instance
      -
      tick2line
      -
      a Line2D instance
      -
      gridline
      -
      a Line2D instance
      -
      label1
      -
      a Text instance
      -
      label2
      -
      a Text instance
      -
      gridOn
      -
      a boolean which determines whether to draw the tickline
      -
      tick1On
      -
      a boolean which determines whether to draw the 1st tickline
      -
      tick2On
      -
      a boolean which determines whether to draw the 2nd tickline
      -
      label1On
      -
      a boolean which determines whether to draw tick label
      -
      label2On
      -
      a boolean which determines whether to draw tick label
      -
      -
      -

      bbox is the Bound2D bounding box in display coords of the Axes -loc is the tick location in data coords -size is the tick size in points

      -
      -
      -apply_tickdir(tickdir)
      -

      Calculate self._pad and self._tickmarkers

      -
      - -
      -
      -contains(mouseevent)
      -

      Test whether the mouse event occurred in the Tick marks.

      -

      This function always returns false. It is more useful to test if the -axis as a whole contains the mouse rather than the set of tick marks.

      -
      - -
      -
      -draw(artist, renderer, *args, **kwargs)
      -
      - -
      -
      -get_children()
      -
      - -
      -
      -get_loc()
      -

      Return the tick location (data coords) as a scalar

      -
      - -
      -
      -get_pad()
      -

      Get the value of the tick label pad in points

      -
      - -
      -
      -get_pad_pixels()
      -
      - -
      -
      -get_view_interval()
      -

      return the view Interval instance for the axis this tick is ticking

      -
      - -
      -
      -set_clip_path(clippath, transform=None)
      -

      Set the artist’s clip path, which may be:

      -
      -
        -
      • a Patch (or subclass) instance

        -
      • -
      • -
        a Path instance, in which case
        -

        an optional Transform -instance may be provided, which will be applied to the -path before using it for clipping.

        -
        -
        -
      • -
      • None, to remove the clipping path

        -
      • -
      -
      -

      For efficiency, if the path happens to be an axis-aligned -rectangle, this method will set the clipping box to the -corresponding rectangle and set the clipping path to None.

      -

      ACCEPTS: [ (Path, -Transform) | -Patch | None ]

      -
      - -
      -
      -set_label(s)
      -

      Set the text of ticklabel

      -

      ACCEPTS: str

      -
      - -
      -
      -set_label1(s)
      -

      Set the text of ticklabel

      -

      ACCEPTS: str

      -
      - -
      -
      -set_label2(s)
      -

      Set the text of ticklabel2

      -

      ACCEPTS: str

      -
      - -
      -
      -set_pad(val)
      -

      Set the tick label pad in points

      -

      ACCEPTS: float

      -
      - -
      - -
      -
      -class matplotlib.axis.Ticker
      -
      -
      -formatter = None
      -
      - -
      -
      -locator = None
      -
      - -
      - -
      -
      -class matplotlib.axis.XAxis(axes, pickradius=15)
      -

      Bases: matplotlib.axis.Axis

      -

      Init the axis with the parent Axes instance

      -
      -
      -axis_name = 'x'
      -
      - -
      -
      -contains(mouseevent)
      -

      Test whether the mouse event occured in the x axis.

      -
      - -
      -
      -get_data_interval()
      -

      return the Interval instance for this axis data limits

      -
      - -
      -
      -get_label_position()
      -

      Return the label position (top or bottom)

      -
      - -
      -
      -get_minpos()
      -
      - -
      -
      -get_text_heights(renderer)
      -

      Returns the amount of space one should reserve for text -above and below the axes. Returns a tuple (above, below)

      -
      - -
      -
      -get_ticks_position()
      -

      Return the ticks position (top, bottom, default or unknown)

      -
      - -
      -
      -get_view_interval()
      -

      return the Interval instance for this axis view limits

      -
      - -
      -
      -set_data_interval(vmin, vmax, ignore=False)
      -

      set the axis data limits

      -
      - -
      -
      -set_default_intervals()
      -

      set the default limits for the axis interval if they are not mutated

      -
      - -
      -
      -set_label_position(position)
      -

      Set the label position (top or bottom)

      -

      ACCEPTS: [ ‘top’ | ‘bottom’ ]

      -
      - -
      -
      -set_ticks_position(position)
      -

      Set the ticks position (top, bottom, both, default or none) -both sets the ticks to appear on both positions, but does not -change the tick labels. ‘default’ resets the tick positions to -the default: ticks on both positions, labels at bottom. ‘none’ -can be used if you don’t want any ticks. ‘none’ and ‘both’ -affect only the ticks, not the labels.

      -

      ACCEPTS: [ ‘top’ | ‘bottom’ | ‘both’ | ‘default’ | ‘none’ ]

      -
      - -
      -
      -set_view_interval(vmin, vmax, ignore=False)
      -

      If ignore is False, the order of vmin, vmax -does not matter; the original axis orientation will -be preserved. In addition, the view limits can be -expanded, but will not be reduced. This method is -for mpl internal use; for normal use, see -set_xlim().

      -
      - -
      -
      -tick_bottom()
      -

      use ticks only on bottom

      -
      - -
      -
      -tick_top()
      -

      use ticks only on top

      -
      - -
      - -
      -
      -class matplotlib.axis.XTick(axes, loc, label, size=None, width=None, color=None, tickdir=None, pad=None, labelsize=None, labelcolor=None, zorder=None, gridOn=None, tick1On=True, tick2On=True, label1On=True, label2On=False, major=True)
      -

      Bases: matplotlib.axis.Tick

      -

      Contains all the Artists needed to make an x tick - the tick line, -the label text and the grid line

      -

      bbox is the Bound2D bounding box in display coords of the Axes -loc is the tick location in data coords -size is the tick size in points

      -
      -
      -apply_tickdir(tickdir)
      -
      - -
      -
      -get_view_interval()
      -

      return the Interval instance for this axis view limits

      -
      - -
      -
      -update_position(loc)
      -

      Set the location of tick in data coords with scalar loc

      -
      - -
      - -
      -
      -class matplotlib.axis.YAxis(axes, pickradius=15)
      -

      Bases: matplotlib.axis.Axis

      -

      Init the axis with the parent Axes instance

      -
      -
      -axis_name = 'y'
      -
      - -
      -
      -contains(mouseevent)
      -

      Test whether the mouse event occurred in the y axis.

      -

      Returns True | False

      -
      - -
      -
      -get_data_interval()
      -

      return the Interval instance for this axis data limits

      -
      - -
      -
      -get_label_position()
      -

      Return the label position (left or right)

      -
      - -
      -
      -get_minpos()
      -
      - -
      -
      -get_text_widths(renderer)
      -
      - -
      -
      -get_ticks_position()
      -

      Return the ticks position (left, right, both or unknown)

      -
      - -
      -
      -get_view_interval()
      -

      return the Interval instance for this axis view limits

      -
      - -
      -
      -set_data_interval(vmin, vmax, ignore=False)
      -

      set the axis data limits

      -
      - -
      -
      -set_default_intervals()
      -

      set the default limits for the axis interval if they are not mutated

      -
      - -
      -
      -set_label_position(position)
      -

      Set the label position (left or right)

      -

      ACCEPTS: [ ‘left’ | ‘right’ ]

      -
      - -
      -
      -set_offset_position(position)
      -
      - -
      -
      -set_ticks_position(position)
      -

      Set the ticks position (left, right, both, default or none) -‘both’ sets the ticks to appear on both positions, but does not -change the tick labels. ‘default’ resets the tick positions to -the default: ticks on both positions, labels at left. ‘none’ -can be used if you don’t want any ticks. ‘none’ and ‘both’ -affect only the ticks, not the labels.

      -

      ACCEPTS: [ ‘left’ | ‘right’ | ‘both’ | ‘default’ | ‘none’ ]

      -
      - -
      -
      -set_view_interval(vmin, vmax, ignore=False)
      -

      If ignore is False, the order of vmin, vmax -does not matter; the original axis orientation will -be preserved. In addition, the view limits can be -expanded, but will not be reduced. This method is -for mpl internal use; for normal use, see -set_ylim().

      -
      - -
      -
      -tick_left()
      -

      use ticks only on left

      -
      - -
      -
      -tick_right()
      -

      use ticks only on right

      -
      - -
      - -
      -
      -class matplotlib.axis.YTick(axes, loc, label, size=None, width=None, color=None, tickdir=None, pad=None, labelsize=None, labelcolor=None, zorder=None, gridOn=None, tick1On=True, tick2On=True, label1On=True, label2On=False, major=True)
      -

      Bases: matplotlib.axis.Tick

      -

      Contains all the Artists needed to make a Y tick - the tick line, -the label text and the grid line

      -

      bbox is the Bound2D bounding box in display coords of the Axes -loc is the tick location in data coords -size is the tick size in points

      -
      -
      -apply_tickdir(tickdir)
      -
      - -
      -
      -get_view_interval()
      -

      return the Interval instance for this axis view limits

      -
      - -
      -
      -update_position(loc)
      -

      Set the location of tick in data coords with scalar loc

      -
      - -
      - -
      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/api/backend_bases_api.html b/dev/api/backend_bases_api.html deleted file mode 100644 index d2bb7055dee..00000000000 --- a/dev/api/backend_bases_api.html +++ /dev/null @@ -1,1936 +0,0 @@ - - - - - - - - matplotlib.backend_bases — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      Previous topic

      -

      backends

      -

      Next topic

      -

      matplotlib.backends.backend_gtkagg

      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      matplotlib.backend_bases

      -

      Abstract base classes define the primitives that renderers and -graphics contexts must implement to serve as a matplotlib backend

      -
      -
      RendererBase
      -
      An abstract base class to handle drawing/rendering operations.
      -
      FigureCanvasBase
      -
      The abstraction layer that separates the -matplotlib.figure.Figure from the backend specific -details like a user interface drawing area
      -
      GraphicsContextBase
      -
      An abstract base class that provides color, line styles, etc...
      -
      Event
      -
      The base class for all of the matplotlib event -handling. Derived classes suh as KeyEvent and -MouseEvent store the meta data like keys and buttons -pressed, x and y locations in pixel and -Axes coordinates.
      -
      ShowBase
      -
      The base class for the Show class of each interactive backend; -the ‘show’ callable is then set to Show.__call__, inherited from -ShowBase.
      -
      -
      -
      -class matplotlib.backend_bases.CloseEvent(name, canvas, guiEvent=None)
      -

      Bases: matplotlib.backend_bases.Event

      -

      An event triggered by a figure being closed

      -

      In addition to the Event attributes, the following event -attributes are defined:

      -
      - -
      -
      -class matplotlib.backend_bases.Cursors
      -
      -
      -HAND = 0
      -
      - -
      -
      -MOVE = 3
      -
      - -
      -
      -POINTER = 1
      -
      - -
      -
      -SELECT_REGION = 2
      -
      - -
      - -
      -
      -class matplotlib.backend_bases.DrawEvent(name, canvas, renderer)
      -

      Bases: matplotlib.backend_bases.Event

      -

      An event triggered by a draw operation on the canvas

      -

      In addition to the Event attributes, the following event -attributes are defined:

      -
      -
      renderer
      -
      the RendererBase instance for the draw event
      -
      -
      - -
      -
      -class matplotlib.backend_bases.Event(name, canvas, guiEvent=None)
      -

      A matplotlib event. Attach additional attributes as defined in -FigureCanvasBase.mpl_connect(). The following attributes -are defined and shown with their default values

      -
      -
      name
      -
      the event name
      -
      canvas
      -
      the FigureCanvas instance generating the event
      -
      guiEvent
      -
      the GUI event that triggered the matplotlib event
      -
      -
      - -
      -
      -class matplotlib.backend_bases.FigureCanvasBase(figure)
      -

      Bases: object

      -

      The canvas the figure renders into.

      -

      Public attributes

      -
      -
      -
      figure
      -
      A matplotlib.figure.Figure instance
      -
      -
      -
      -
      -blit(bbox=None)
      -

      blit the canvas in bbox (default entire canvas)

      -
      - -
      -
      -button_press_event(x, y, button, dblclick=False, guiEvent=None)
      -

      Backend derived classes should call this function on any mouse -button press. x,y are the canvas coords: 0,0 is lower, left. -button and key are as defined in MouseEvent.

      -

      This method will be call all functions connected to the -‘button_press_event’ with a MouseEvent instance.

      -
      - -
      -
      -button_release_event(x, y, button, guiEvent=None)
      -

      Backend derived classes should call this function on any mouse -button release.

      -
      -
      x
      -
      the canvas coordinates where 0=left
      -
      y
      -
      the canvas coordinates where 0=bottom
      -
      guiEvent
      -
      the native UI event that generated the mpl event
      -
      -

      This method will be call all functions connected to the -‘button_release_event’ with a MouseEvent instance.

      -
      - -
      -
      -close_event(guiEvent=None)
      -

      This method will be called by all functions connected to the -‘close_event’ with a CloseEvent

      -
      - -
      -
      -draw(*args, **kwargs)
      -

      Render the Figure

      -
      - -
      -
      -draw_cursor(event)
      -

      Draw a cursor in the event.axes if inaxes is not None. Use -native GUI drawing for efficiency if possible

      -
      - -
      -
      -draw_event(renderer)
      -

      This method will be call all functions connected to the -‘draw_event’ with a DrawEvent

      -
      - -
      -
      -draw_idle(*args, **kwargs)
      -

      draw() only if idle; defaults to draw but backends can overrride

      -
      - -
      -
      -enter_notify_event(guiEvent=None, xy=None)
      -

      Backend derived classes should call this function when entering -canvas

      -
      -
      guiEvent
      -
      the native UI event that generated the mpl event
      -
      xy
      -
      the coordinate location of the pointer when the canvas is -entered
      -
      -
      - -
      -
      -events = ['resize_event', 'draw_event', 'key_press_event', 'key_release_event', 'button_press_event', 'button_release_event', 'scroll_event', 'motion_notify_event', 'pick_event', 'idle_event', 'figure_enter_event', 'figure_leave_event', 'axes_enter_event', 'axes_leave_event', 'close_event']
      -
      - -
      -
      -filetypes = {'pgf': 'LaTeX PGF Figure', 'svgz': 'Scalable Vector Graphics', 'tiff': 'Tagged Image File Format', 'jpg': 'Joint Photographic Experts Group', 'raw': 'Raw RGBA bitmap', 'jpeg': 'Joint Photographic Experts Group', 'png': 'Portable Network Graphics', 'ps': 'Postscript', 'emf': 'Enhanced Metafile', 'svg': 'Scalable Vector Graphics', 'eps': 'Encapsulated Postscript', 'rgba': 'Raw RGBA bitmap', 'pdf': 'Portable Document Format', 'tif': 'Tagged Image File Format'}
      -
      - -
      -
      -flush_events()
      -

      Flush the GUI events for the figure. Implemented only for -backends with GUIs.

      -
      - -
      -
      -get_default_filename()
      -

      Return a string, which includes extension, suitable for use as -a default filename.

      -
      - -
      -
      -get_default_filetype()
      -

      Get the default savefig file format as specified in rcParam -savefig.format. Returned string excludes period. Overridden -in backends that only support a single file type.

      -
      - -
      -
      -get_supported_filetypes()
      -

      Return dict of savefig file formats supported by this backend

      -
      - -
      -
      -get_supported_filetypes_grouped()
      -

      Return a dict of savefig file formats supported by this backend, -where the keys are a file type name, such as ‘Joint Photographic -Experts Group’, and the values are a list of filename extensions used -for that filetype, such as [‘jpg’, ‘jpeg’].

      -
      - -
      -
      -get_width_height()
      -

      Return the figure width and height in points or pixels -(depending on the backend), truncated to integers

      -
      - -
      -
      -get_window_title()
      -

      Get the title text of the window containing the figure. -Return None if there is no window (eg, a PS backend).

      -
      - -
      -
      -grab_mouse(ax)
      -

      Set the child axes which are currently grabbing the mouse events. -Usually called by the widgets themselves. -It is an error to call this if the mouse is already grabbed by -another axes.

      -
      - -
      -
      -idle_event(guiEvent=None)
      -

      Called when GUI is idle.

      -
      - -
      -
      -key_press_event(key, guiEvent=None)
      -

      This method will be call all functions connected to the -‘key_press_event’ with a KeyEvent

      -
      - -
      -
      -key_release_event(key, guiEvent=None)
      -

      This method will be call all functions connected to the -‘key_release_event’ with a KeyEvent

      -
      - -
      -
      -leave_notify_event(guiEvent=None)
      -

      Backend derived classes should call this function when leaving -canvas

      -
      -
      guiEvent
      -
      the native UI event that generated the mpl event
      -
      -
      - -
      -
      -motion_notify_event(x, y, guiEvent=None)
      -

      Backend derived classes should call this function on any -motion-notify-event.

      -
      -
      x
      -
      the canvas coordinates where 0=left
      -
      y
      -
      the canvas coordinates where 0=bottom
      -
      guiEvent
      -
      the native UI event that generated the mpl event
      -
      -

      This method will be call all functions connected to the -‘motion_notify_event’ with a MouseEvent instance.

      -
      - -
      -
      -mpl_connect(s, func)
      -

      Connect event with string s to func. The signature of func is:

      -
      def func(event)
      -
      -

      where event is a matplotlib.backend_bases.Event. The -following events are recognized

      -
        -
      • ‘button_press_event’
      • -
      • ‘button_release_event’
      • -
      • ‘draw_event’
      • -
      • ‘key_press_event’
      • -
      • ‘key_release_event’
      • -
      • ‘motion_notify_event’
      • -
      • ‘pick_event’
      • -
      • ‘resize_event’
      • -
      • ‘scroll_event’
      • -
      • ‘figure_enter_event’,
      • -
      • ‘figure_leave_event’,
      • -
      • ‘axes_enter_event’,
      • -
      • ‘axes_leave_event’
      • -
      • ‘close_event’
      • -
      -

      For the location events (button and key press/release), if the -mouse is over the axes, the variable event.inaxes will be -set to the Axes the event occurs is -over, and additionally, the variables event.xdata and -event.ydata will be defined. This is the mouse location -in data coords. See -KeyEvent and -MouseEvent for more info.

      -

      Return value is a connection id that can be used with -mpl_disconnect().

      -

      Example usage:

      -
      def on_press(event):
      -    print('you pressed', event.button, event.xdata, event.ydata)
      -
      -cid = canvas.mpl_connect('button_press_event', on_press)
      -
      -
      -
      - -
      -
      -mpl_disconnect(cid)
      -

      Disconnect callback id cid

      -

      Example usage:

      -
      cid = canvas.mpl_connect('button_press_event', on_press)
      -#...later
      -canvas.mpl_disconnect(cid)
      -
      -
      -
      - -
      -
      -new_timer(*args, **kwargs)
      -

      Creates a new backend-specific subclass of -backend_bases.Timer. This is useful for getting periodic -events through the backend’s native event loop. Implemented only for -backends with GUIs.

      -

      optional arguments:

      -
      -
      interval
      -
      Timer interval in milliseconds
      -
      callbacks
      -
      Sequence of (func, args, kwargs) where func(args, **kwargs) will -be executed by the timer every *interval.
      -
      -
      - -
      -
      -onHilite(ev)
      -

      Mouse event processor which highlights the artists -under the cursor. Connect this to the ‘motion_notify_event’ -using:

      -
      canvas.mpl_connect('motion_notify_event',canvas.onHilite)
      -
      -
      -
      - -
      -
      -onRemove(ev)
      -

      Mouse event processor which removes the top artist -under the cursor. Connect this to the ‘mouse_press_event’ -using:

      -
      canvas.mpl_connect('mouse_press_event',canvas.onRemove)
      -
      -
      -
      - -
      -
      -pick(mouseevent)
      -
      - -
      -
      -pick_event(mouseevent, artist, **kwargs)
      -

      This method will be called by artists who are picked and will -fire off PickEvent callbacks registered listeners

      -
      - -
      -
      -print_bmp(*args, **kwargs)
      -
      - -
      -
      -print_emf(*args, **kwargs)
      -
      - -
      -
      -print_eps(*args, **kwargs)
      -
      - -
      -
      -print_figure(filename, dpi=None, facecolor='w', edgecolor='w', orientation='portrait', format=None, **kwargs)
      -

      Render the figure to hardcopy. Set the figure patch face and edge -colors. This is useful because some of the GUIs have a gray figure -face color background and you’ll probably want to override this on -hardcopy.

      -

      Arguments are:

      -
      -
      filename
      -
      can also be a file object on image backends
      -
      orientation
      -
      only currently applies to PostScript printing.
      -
      dpi
      -
      the dots per inch to save the figure in; if None, use savefig.dpi
      -
      facecolor
      -
      the facecolor of the figure
      -
      edgecolor
      -
      the edgecolor of the figure
      -
      orientation
      -
      landscape’ | ‘portrait’ (not supported on all backends)
      -
      format
      -
      when set, forcibly set the file format to save to
      -
      bbox_inches
      -
      Bbox in inches. Only the given portion of the figure is -saved. If ‘tight’, try to figure out the tight bbox of -the figure. If None, use savefig.bbox
      -
      pad_inches
      -
      Amount of padding around the figure when bbox_inches is -‘tight’. If None, use savefig.pad_inches
      -
      bbox_extra_artists
      -
      A list of extra artists that will be considered when the -tight bbox is calculated.
      -
      -
      - -
      -
      -print_jpeg(filename_or_obj, *args, **kwargs)
      -

      Supported kwargs:

      -
      -
      quality: The image quality, on a scale from 1 (worst) to
      -
      95 (best). The default is 95, if not given in the -matplotlibrc file in the savefig.jpeg_quality parameter. -Values above 95 should be avoided; 100 completely -disables the JPEG quantization stage.
      -
      optimize: If present, indicates that the encoder should
      -
      make an extra pass over the image in order to select -optimal encoder settings.
      -
      progressive: If present, indicates that this image
      -
      should be stored as a progressive JPEG file.
      -
      -
      - -
      -
      -print_jpg(filename_or_obj, *args, **kwargs)
      -

      Supported kwargs:

      -
      -
      quality: The image quality, on a scale from 1 (worst) to
      -
      95 (best). The default is 95, if not given in the -matplotlibrc file in the savefig.jpeg_quality parameter. -Values above 95 should be avoided; 100 completely -disables the JPEG quantization stage.
      -
      optimize: If present, indicates that the encoder should
      -
      make an extra pass over the image in order to select -optimal encoder settings.
      -
      progressive: If present, indicates that this image
      -
      should be stored as a progressive JPEG file.
      -
      -
      - -
      -
      -print_pdf(*args, **kwargs)
      -
      - -
      -
      -print_pgf(*args, **kwargs)
      -
      - -
      -
      -print_png(*args, **kwargs)
      -
      - -
      -
      -print_ps(*args, **kwargs)
      -
      - -
      -
      -print_raw(*args, **kwargs)
      -
      - -
      -
      -print_rgba(*args, **kwargs)
      -
      - -
      -
      -print_svg(*args, **kwargs)
      -
      - -
      -
      -print_svgz(*args, **kwargs)
      -
      - -
      -
      -print_tif(filename_or_obj, *args, **kwargs)
      -
      - -
      -
      -print_tiff(filename_or_obj, *args, **kwargs)
      -
      - -
      -
      -release_mouse(ax)
      -

      Release the mouse grab held by the axes, ax. -Usually called by the widgets. -It is ok to call this even if you ax doesn’t have the mouse -grab currently.

      -
      - -
      -
      -resize(w, h)
      -

      set the canvas size in pixels

      -
      - -
      -
      -resize_event()
      -

      This method will be call all functions connected to the -‘resize_event’ with a ResizeEvent

      -
      - -
      -
      -scroll_event(x, y, step, guiEvent=None)
      -

      Backend derived classes should call this function on any -scroll wheel event. x,y are the canvas coords: 0,0 is lower, -left. button and key are as defined in MouseEvent.

      -

      This method will be call all functions connected to the -‘scroll_event’ with a MouseEvent instance.

      -
      - -
      -
      -set_window_title(title)
      -

      Set the title text of the window containing the figure. Note that -this has no effect if there is no window (eg, a PS backend).

      -
      - -
      -
      -start_event_loop(timeout)
      -

      Start an event loop. This is used to start a blocking event -loop so that interactive functions, such as ginput and -waitforbuttonpress, can wait for events. This should not be -confused with the main GUI event loop, which is always running -and has nothing to do with this.

      -

      This is implemented only for backends with GUIs.

      -
      - -
      -
      -start_event_loop_default(timeout=0)
      -

      Start an event loop. This is used to start a blocking event -loop so that interactive functions, such as ginput and -waitforbuttonpress, can wait for events. This should not be -confused with the main GUI event loop, which is always running -and has nothing to do with this.

      -

      This function provides default event loop functionality based -on time.sleep that is meant to be used until event loop -functions for each of the GUI backends can be written. As -such, it throws a deprecated warning.

      -

      Call signature:

      -
      start_event_loop_default(self,timeout=0)
      -
      -
      -

      This call blocks until a callback function triggers -stop_event_loop() or timeout is reached. If timeout is -<=0, never timeout.

      -
      - -
      -
      -stop_event_loop()
      -

      Stop an event loop. This is used to stop a blocking event -loop so that interactive functions, such as ginput and -waitforbuttonpress, can wait for events.

      -

      This is implemented only for backends with GUIs.

      -
      - -
      -
      -stop_event_loop_default()
      -

      Stop an event loop. This is used to stop a blocking event -loop so that interactive functions, such as ginput and -waitforbuttonpress, can wait for events.

      -

      Call signature:

      -
      stop_event_loop_default(self)
      -
      -
      -
      - -
      -
      -supports_blit = True
      -
      - -
      -
      -switch_backends(FigureCanvasClass)
      -

      Instantiate an instance of FigureCanvasClass

      -

      This is used for backend switching, eg, to instantiate a -FigureCanvasPS from a FigureCanvasGTK. Note, deep copying is -not done, so any changes to one of the instances (eg, setting -figure size or line props), will be reflected in the other

      -
      - -
      - -
      -
      -class matplotlib.backend_bases.FigureManagerBase(canvas, num)
      -

      Helper class for pyplot mode, wraps everything up into a neat bundle

      -

      Public attibutes:

      -
      -
      canvas
      -
      A FigureCanvasBase instance
      -
      num
      -
      The figure number
      -
      -
      -
      -destroy()
      -
      - -
      -
      -full_screen_toggle()
      -
      - -
      -
      -get_window_title()
      -

      Get the title text of the window containing the figure. -Return None for non-GUI backends (eg, a PS backend).

      -
      - -
      -
      -key_press(event)
      -

      Implement the default mpl key bindings defined at -Navigation Keyboard Shortcuts

      -
      - -
      -
      -key_press_handler_id = None
      -

      The returned id from connecting the default key handler via -FigureCanvasBase.mpl_connnect().

      -

      To disable default key press handling:

      -
      manager, canvas = figure.canvas.manager, figure.canvas
      -canvas.mpl_disconnect(manager.key_press_handler_id)
      -
      -
      -
      - -
      -
      -resize(w, h)
      -

      “For gui backends, resize the window (in pixels).

      -
      - -
      -
      -set_window_title(title)
      -

      Set the title text of the window containing the figure. Note that -this has no effect for non-GUI backends (eg, a PS backend).

      -
      - -
      -
      -show()
      -

      For GUI backends, show the figure window and redraw. -For non-GUI backends, raise an exception to be caught -by show(), for an -optional warning.

      -
      - -
      -
      -show_popup(msg)
      -

      Display message in a popup – GUI only

      -
      - -
      - -
      -
      -class matplotlib.backend_bases.GraphicsContextBase
      -

      An abstract base class that provides color, line styles, etc...

      -
      -
      -copy_properties(gc)
      -

      Copy properties from gc to self

      -
      - -
      -
      -dashd = {'solid': (None, None), 'dashed': (0, (6.0, 6.0)), 'dotted': (0, (1.0, 3.0)), 'dashdot': (0, (3.0, 5.0, 1.0, 5.0))}
      -
      - -
      -
      -get_alpha()
      -

      Return the alpha value used for blending - not supported on -all backends

      -
      - -
      -
      -get_antialiased()
      -

      Return true if the object should try to do antialiased rendering

      -
      - -
      -
      -get_capstyle()
      -

      Return the capstyle as a string in (‘butt’, ‘round’, ‘projecting’)

      -
      - -
      -
      -get_clip_path()
      -

      Return the clip path in the form (path, transform), where path -is a Path instance, and transform is -an affine transform to apply to the path before clipping.

      -
      - -
      -
      -get_clip_rectangle()
      -

      Return the clip rectangle as a Bbox -instance

      -
      - -
      -
      -get_dashes()
      -

      Return the dash information as an offset dashlist tuple.

      -

      The dash list is a even size list that gives the ink on, ink -off in pixels.

      -

      See p107 of to PostScript BLUEBOOK -for more info.

      -

      Default value is None

      -
      - -
      -
      -get_gid()
      -

      Return the object identifier if one is set, None otherwise.

      -
      - -
      -
      -get_hatch()
      -

      Gets the current hatch style

      -
      - -
      -
      -get_hatch_path(density=6.0)
      -

      Returns a Path for the current hatch.

      -
      - -
      -
      -get_joinstyle()
      -

      Return the line join style as one of (‘miter’, ‘round’, ‘bevel’)

      -
      - -
      -
      -get_linestyle(style)
      -

      Return the linestyle: one of (‘solid’, ‘dashed’, ‘dashdot’, -‘dotted’).

      -
      - -
      -
      -get_linewidth()
      -

      Return the line width in points as a scalar

      -
      - -
      -
      -get_rgb()
      -

      returns a tuple of three or four floats from 0-1.

      -
      - -
      -
      -get_snap()
      -

      returns the snap setting which may be:

      -
      -
        -
      • True: snap vertices to the nearest pixel center
      • -
      • False: leave vertices as-is
      • -
      • None: (auto) If the path contains only rectilinear line -segments, round to the nearest pixel center
      • -
      -
      -
      - -
      -
      -get_url()
      -

      returns a url if one is set, None otherwise

      -
      - -
      -
      -restore()
      -

      Restore the graphics context from the stack - needed only -for backends that save graphics contexts on a stack

      -
      - -
      -
      -set_alpha(alpha)
      -

      Set the alpha value used for blending - not supported on -all backends

      -
      - -
      -
      -set_antialiased(b)
      -

      True if object should be drawn with antialiased rendering

      -
      - -
      -
      -set_capstyle(cs)
      -

      Set the capstyle as a string in (‘butt’, ‘round’, ‘projecting’)

      -
      - -
      -
      -set_clip_path(path)
      -

      Set the clip path and transformation. Path should be a -TransformedPath instance.

      -
      - -
      -
      -set_clip_rectangle(rectangle)
      -

      Set the clip rectangle with sequence (left, bottom, width, height)

      -
      - -
      -
      -set_dashes(dash_offset, dash_list)
      -

      Set the dash style for the gc.

      -
      -
      dash_offset
      -
      is the offset (usually 0).
      -
      dash_list
      -
      specifies the on-off sequence as points. -(None, None) specifies a solid line
      -
      -
      - -
      -
      -set_foreground(fg, isRGB=False)
      -

      Set the foreground color. fg can be a MATLAB format string, a -html hex color string, an rgb or rgba unit tuple, or a float between 0 -and 1. In the latter case, grayscale is used.

      -

      If you know fg is rgb or rgba, set isRGB=True for -efficiency.

      -
      - -
      -
      -set_gid(id)
      -

      Sets the id.

      -
      - -
      -
      -set_graylevel(frac)
      -

      Set the foreground color to be a gray level with frac

      -
      - -
      -
      -set_hatch(hatch)
      -

      Sets the hatch style for filling

      -
      - -
      -
      -set_joinstyle(js)
      -

      Set the join style to be one of (‘miter’, ‘round’, ‘bevel’)

      -
      - -
      -
      -set_linestyle(style)
      -

      Set the linestyle to be one of (‘solid’, ‘dashed’, ‘dashdot’, -‘dotted’). One may specify customized dash styles by providing -a tuple of (offset, dash pairs). For example, the predefiend -linestyles have following values.:

      -
      -
      ‘dashed’ : (0, (6.0, 6.0)), -‘dashdot’ : (0, (3.0, 5.0, 1.0, 5.0)), -‘dotted’ : (0, (1.0, 3.0)),
      -
      - -
      -
      -set_linewidth(w)
      -

      Set the linewidth in points

      -
      - -
      -
      -set_snap(snap)
      -

      Sets the snap setting which may be:

      -
      -
        -
      • True: snap vertices to the nearest pixel center
      • -
      • False: leave vertices as-is
      • -
      • None: (auto) If the path contains only rectilinear line -segments, round to the nearest pixel center
      • -
      -
      -
      - -
      -
      -set_url(url)
      -

      Sets the url for links in compatible backends

      -
      - -
      - -
      -
      -class matplotlib.backend_bases.IdleEvent(name, canvas, guiEvent=None)
      -

      Bases: matplotlib.backend_bases.Event

      -

      An event triggered by the GUI backend when it is idle – useful -for passive animation

      -
      - -
      -
      -class matplotlib.backend_bases.KeyEvent(name, canvas, key, x=0, y=0, guiEvent=None)
      -

      Bases: matplotlib.backend_bases.LocationEvent

      -

      A key event (key press, key release).

      -

      Attach additional attributes as defined in -FigureCanvasBase.mpl_connect().

      -

      In addition to the Event and LocationEvent -attributes, the following attributes are defined:

      -
      -
      key
      -
      the key(s) pressed. Could be None, a single case sensitive ascii -character (“g”, “G”, “#”, etc.), a special key -(“control”, “shift”, “f1”, “up”, etc.) or a -combination of the above (e.g., “ctrl+alt+g”, “ctrl+alt+G”).
      -
      -
      -

      Note

      -

      Modifier keys will be prefixed to the pressed key and will be in the -order “ctrl”, “alt”, “super”. The exception to this rule is when the -pressed key is itself a modifier key, therefore “ctrl+alt” and -“alt+control” can both be valid key values.

      -
      -

      Example usage:

      -
      def on_key(event):
      -    print('you pressed', event.key, event.xdata, event.ydata)
      -
      -cid = fig.canvas.mpl_connect('key_press_event', on_key)
      -
      -
      -
      - -
      -
      -class matplotlib.backend_bases.LocationEvent(name, canvas, x, y, guiEvent=None)
      -

      Bases: matplotlib.backend_bases.Event

      -

      An event that has a screen location

      -

      The following additional attributes are defined and shown with -their default values.

      -

      In addition to the Event attributes, the following -event attributes are defined:

      -
      -
      x
      -
      x position - pixels from left of canvas
      -
      y
      -
      y position - pixels from bottom of canvas
      -
      inaxes
      -
      the Axes instance if mouse is over axes
      -
      xdata
      -
      x coord of mouse in data coords
      -
      ydata
      -
      y coord of mouse in data coords
      -
      -

      x, y in figure coords, 0,0 = bottom, left

      -
      -
      -inaxes = None
      -
      - -
      -
      -lastevent = None
      -
      - -
      -
      -x = None
      -
      - -
      -
      -xdata = None
      -
      - -
      -
      -y = None
      -
      - -
      -
      -ydata = None
      -
      - -
      - -
      -
      -class matplotlib.backend_bases.MouseEvent(name, canvas, x, y, button=None, key=None, step=0, dblclick=False, guiEvent=None)
      -

      Bases: matplotlib.backend_bases.LocationEvent

      -
      -
      A mouse event (‘button_press_event’,
      -
      ‘button_release_event’, -‘scroll_event’, -‘motion_notify_event’).
      -
      -

      In addition to the Event and LocationEvent -attributes, the following attributes are defined:

      -
      -
      button
      -
      button pressed None, 1, 2, 3, ‘up’, ‘down’ (up and down are used -for scroll events)
      -
      key
      -
      the key depressed when the mouse event triggered (see -KeyEvent)
      -
      step
      -
      number of scroll steps (positive for ‘up’, negative for ‘down’)
      -
      -

      Example usage:

      -
      def on_press(event):
      -    print('you pressed', event.button, event.xdata, event.ydata)
      -
      -cid = fig.canvas.mpl_connect('button_press_event', on_press)
      -
      -
      -

      x, y in figure coords, 0,0 = bottom, left -button pressed None, 1, 2, 3, ‘up’, ‘down’

      -
      -
      -button = None
      -
      - -
      -
      -dblclick = None
      -
      - -
      -
      -inaxes = None
      -
      - -
      -
      -step = None
      -
      - -
      -
      -x = None
      -
      - -
      -
      -xdata = None
      -
      - -
      -
      -y = None
      -
      - -
      -
      -ydata = None
      -
      - -
      - -
      -
      -class matplotlib.backend_bases.NavigationToolbar2(canvas)
      -

      Bases: object

      -

      Base class for the navigation cursor, version 2

      -

      backends must implement a canvas that handles connections for -‘button_press_event’ and ‘button_release_event’. See -FigureCanvasBase.mpl_connect() for more information

      -

      They must also define

      -
      -
      -
      save_figure()
      -
      save the current figure
      -
      set_cursor()
      -
      if you want the pointer icon to change
      -
      _init_toolbar()
      -
      create your toolbar widget
      -
      draw_rubberband() (optional)
      -
      draw the zoom to rect “rubberband” rectangle
      -
      press() (optional)
      -
      whenever a mouse button is pressed, you’ll be notified with -the event
      -
      release() (optional)
      -
      whenever a mouse button is released, you’ll be notified with -the event
      -
      dynamic_update() (optional)
      -
      dynamically update the window while navigating
      -
      set_message() (optional)
      -
      display message
      -
      set_history_buttons() (optional)
      -
      you can change the history back / forward buttons to -indicate disabled / enabled state.
      -
      -
      -

      That’s it, we’ll do the rest!

      -
      -
      -back(*args)
      -

      move back up the view lim stack

      -
      - -
      -
      -drag_pan(event)
      -

      the drag callback in pan/zoom mode

      -
      - -
      -
      -drag_zoom(event)
      -

      the drag callback in zoom mode

      -
      - -
      -
      -draw()
      -

      Redraw the canvases, update the locators

      -
      - -
      -
      -draw_rubberband(event, x0, y0, x1, y1)
      -

      Draw a rectangle rubberband to indicate zoom limits

      -
      - -
      -
      -dynamic_update()
      -
      - -
      -
      -forward(*args)
      -

      Move forward in the view lim stack

      -
      - -
      -
      -home(*args)
      -

      Restore the original view

      -
      - -
      -
      -mouse_move(event)
      -
      - -
      -
      -pan(*args)
      -

      Activate the pan/zoom tool. pan with left button, zoom with right

      -
      - -
      -
      -press(event)
      -

      Called whenver a mouse button is pressed.

      -
      - -
      -
      -press_pan(event)
      -

      the press mouse button in pan/zoom mode callback

      -
      - -
      -
      -press_zoom(event)
      -

      the press mouse button in zoom to rect mode callback

      -
      - -
      -
      -push_current()
      -

      push the current view limits and position onto the stack

      -
      - -
      -
      -release(event)
      -

      this will be called whenever mouse button is released

      -
      - -
      -
      -release_pan(event)
      -

      the release mouse button callback in pan/zoom mode

      -
      - -
      -
      -release_zoom(event)
      -

      the release mouse button callback in zoom to rect mode

      -
      - -
      -
      -save_figure(*args)
      -

      Save the current figure

      -
      - -
      -
      -set_cursor(cursor)
      -

      Set the current cursor to one of the Cursors -enums values

      -
      - -
      -
      -set_history_buttons()
      -

      Enable or disable back/forward button

      -
      - -
      -
      -set_message(s)
      -

      Display a message on toolbar or in status bar

      -
      - -
      -
      -toolitems = (('Home', 'Reset original view', 'home', 'home'), ('Back', 'Back to previous view', 'back', 'back'), ('Forward', 'Forward to next view', 'forward', 'forward'), (None, None, None, None), ('Pan', 'Pan axes with left mouse, zoom with right', 'move', 'pan'), ('Zoom', 'Zoom to rectangle', 'zoom_to_rect', 'zoom'), (None, None, None, None), ('Subplots', 'Configure subplots', 'subplots', 'configure_subplots'), ('Save', 'Save the figure', 'filesave', 'save_figure'))
      -
      - -
      -
      -update()
      -

      Reset the axes stack

      -
      - -
      -
      -zoom(*args)
      -

      Activate zoom to rect mode

      -
      - -
      - -
      -
      -exception matplotlib.backend_bases.NonGuiException
      -

      Bases: exceptions.Exception

      -
      - -
      -
      -class matplotlib.backend_bases.PickEvent(name, canvas, mouseevent, artist, guiEvent=None, **kwargs)
      -

      Bases: matplotlib.backend_bases.Event

      -

      a pick event, fired when the user picks a location on the canvas -sufficiently close to an artist.

      -

      Attrs: all the Event attributes plus

      -
      -
      mouseevent
      -
      the MouseEvent that generated the pick
      -
      artist
      -
      the Artist picked
      -
      other
      -
      extra class dependent attrs – eg a -Line2D pick may define different -extra attributes than a -PatchCollection pick event
      -
      -

      Example usage:

      -
      line, = ax.plot(rand(100), 'o', picker=5)  # 5 points tolerance
      -
      -def on_pick(event):
      -    thisline = event.artist
      -    xdata, ydata = thisline.get_data()
      -    ind = event.ind
      -    print('on pick line:', zip(xdata[ind], ydata[ind]))
      -
      -cid = fig.canvas.mpl_connect('pick_event', on_pick)
      -
      -
      -
      - -
      -
      -class matplotlib.backend_bases.RendererBase
      -

      An abstract base class to handle drawing/rendering operations.

      -

      The following methods must be implemented in the backend:

      - -

      The following methods should be implemented in the backend for -optimization reasons:

      - -
      -
      -close_group(s)
      -

      Close a grouping element with label s -Is only currently used by backend_svg

      -
      - -
      -
      -draw_gouraud_triangle(gc, points, colors, transform)
      -

      Draw a Gouraud-shaded triangle.

      -

      points is a 3x2 array of (x, y) points for the triangle.

      -

      colors is a 3x4 array of RGBA colors for each point of the -triangle.

      -

      transform is an affine transform to apply to the points.

      -
      - -
      -
      -draw_gouraud_triangles(gc, triangles_array, colors_array, transform)
      -

      Draws a series of Gouraud triangles.

      -

      points is a Nx3x2 array of (x, y) points for the trianglex.

      -

      colors is a Nx3x4 array of RGBA colors for each point of the -triangles.

      -

      transform is an affine transform to apply to the points.

      -
      - -
      -
      -draw_image(gc, x, y, im)
      -

      Draw the image instance into the current axes;

      -
      -
      gc
      -
      a GraphicsContext containing clipping information
      -
      x
      -
      is the distance in pixels from the left hand side of the canvas.
      -
      y
      -
      the distance from the origin. That is, if origin is -upper, y is the distance from top. If origin is lower, y -is the distance from bottom
      -
      im
      -
      the matplotlib._image.Image instance
      -
      -
      - -
      -
      -draw_markers(gc, marker_path, marker_trans, path, trans, rgbFace=None)
      -

      Draws a marker at each of the vertices in path. This includes -all vertices, including control points on curves. To avoid -that behavior, those vertices should be removed before calling -this function.

      -
      -
      gc
      -
      the GraphicsContextBase instance
      -
      marker_trans
      -
      is an affine transform applied to the marker.
      -
      trans
      -
      is an affine transform applied to the path.
      -
      -

      This provides a fallback implementation of draw_markers that -makes multiple calls to draw_path(). Some backends may -want to override this method in order to draw the marker only -once and reuse it multiple times.

      -
      - -
      -
      -draw_path(gc, path, transform, rgbFace=None)
      -

      Draws a Path instance using the -given affine transform.

      -
      - -
      -
      -draw_path_collection(gc, master_transform, paths, all_transforms, offsets, offsetTrans, facecolors, edgecolors, linewidths, linestyles, antialiaseds, urls, offset_position)
      -

      Draws a collection of paths selecting drawing properties from -the lists facecolors, edgecolors, linewidths, -linestyles and antialiaseds. offsets is a list of -offsets to apply to each of the paths. The offsets in -offsets are first transformed by offsetTrans before being -applied. offset_position may be either “screen” or “data” -depending on the space that the offsets are in.

      -

      This provides a fallback implementation of -draw_path_collection() that makes multiple calls to -draw_path(). Some backends may want to override this in -order to render each set of path data only once, and then -reference that path multiple times with the different offsets, -colors, styles etc. The generator methods -_iter_collection_raw_paths() and -_iter_collection() are provided to help with (and -standardize) the implementation across backends. It is highly -recommended to use those generators, so that changes to the -behavior of draw_path_collection() can be made globally.

      -
      - -
      -
      -draw_quad_mesh(gc, master_transform, meshWidth, meshHeight, coordinates, offsets, offsetTrans, facecolors, antialiased, edgecolors)
      -

      This provides a fallback implementation of -draw_quad_mesh() that generates paths and then calls -draw_path_collection().

      -
      - -
      -
      -draw_tex(gc, x, y, s, prop, angle, ismath='TeX!', mtext=None)
      -
      - -
      -
      -draw_text(gc, x, y, s, prop, angle, ismath=False, mtext=None)
      -

      Draw the text instance

      -
      -
      gc
      -
      the GraphicsContextBase instance
      -
      x
      -
      the x location of the text in display coords
      -
      y
      -
      the y location of the text baseline in display coords
      -
      s
      -
      the text string
      -
      prop
      -
      a matplotlib.font_manager.FontProperties instance
      -
      angle
      -
      the rotation angle in degrees
      -
      mtext
      -
      a matplotlib.text.Text instance
      -
      -

      backend implementers note

      -

      When you are trying to determine if you have gotten your bounding box -right (which is what enables the text layout/alignment to work -properly), it helps to change the line in text.py:

      -
      if 0: bbox_artist(self, renderer)
      -
      -
      -

      to if 1, and then the actual bounding box will be plotted along with -your text.

      -
      - -
      -
      -flipy()
      -

      Return true if y small numbers are top for renderer Is used -for drawing text (matplotlib.text) and images -(matplotlib.image) only

      -
      - -
      -
      -get_canvas_width_height()
      -

      return the canvas width and height in display coords

      -
      - -
      -
      -get_image_magnification()
      -

      Get the factor by which to magnify images passed to draw_image(). -Allows a backend to have images at a different resolution to other -artists.

      -
      - -
      -
      -get_texmanager()
      -

      return the matplotlib.texmanager.TexManager instance

      -
      - -
      -
      -get_text_width_height_descent(s, prop, ismath)
      -

      get the width and height, and the offset from the bottom to the -baseline (descent), in display coords of the string s with -FontProperties prop

      -
      - -
      -
      -new_gc()
      -

      Return an instance of a GraphicsContextBase

      -
      - -
      -
      -open_group(s, gid=None)
      -

      Open a grouping element with label s. If gid is given, use -gid as the id of the group. Is only currently used by -backend_svg.

      -
      - -
      -
      -option_image_nocomposite()
      -

      override this method for renderers that do not necessarily -want to rescale and composite raster images. (like SVG)

      -
      - -
      -
      -option_scale_image()
      -

      override this method for renderers that support arbitrary -scaling of image (most of the vector backend).

      -
      - -
      -
      -points_to_pixels(points)
      -

      Convert points to display units

      -
      -
      points
      -
      a float or a numpy array of float
      -
      -

      return points converted to pixels

      -

      You need to override this function (unless your backend -doesn’t have a dpi, eg, postscript or svg). Some imaging -systems assume some value for pixels per inch:

      -
      points to pixels = points * pixels_per_inch/72.0 * dpi/72.0
      -
      -
      - -
      -
      -start_filter()
      -

      Used in AggRenderer. Switch to a temporary renderer for image -filtering effects.

      -
      - -
      -
      -start_rasterizing()
      -

      Used in MixedModeRenderer. Switch to the raster renderer.

      -
      - -
      -
      -stop_filter(filter_func)
      -

      Used in AggRenderer. Switch back to the original renderer. -The contents of the temporary renderer is processed with the -filter_func and is drawn on the original renderer as an -image.

      -
      - -
      -
      -stop_rasterizing()
      -

      Used in MixedModeRenderer. Switch back to the vector renderer -and draw the contents of the raster renderer as an image on -the vector renderer.

      -
      - -
      -
      -strip_math(s)
      -
      - -
      - -
      -
      -class matplotlib.backend_bases.ResizeEvent(name, canvas)
      -

      Bases: matplotlib.backend_bases.Event

      -

      An event triggered by a canvas resize

      -

      In addition to the Event attributes, the following event -attributes are defined:

      -
      -
      width
      -
      width of the canvas in pixels
      -
      height
      -
      height of the canvas in pixels
      -
      -
      - -
      -
      -class matplotlib.backend_bases.ShowBase
      -

      Bases: object

      -

      Simple base class to generate a show() callable in backends.

      -

      Subclass must override mainloop() method.

      -
      -
      -mainloop()
      -
      - -
      - -
      -
      -class matplotlib.backend_bases.TimerBase(interval=None, callbacks=None)
      -

      Bases: object

      -

      A base class for providing timer events, useful for things animations. -Backends need to implement a few specific methods in order to use their -own timing mechanisms so that the timer events are integrated into their -event loops.

      -

      Mandatory functions that must be implemented:

      -
      -
        -
      • _timer_start: Contains backend-specific code for starting -the timer
      • -
      • _timer_stop: Contains backend-specific code for stopping -the timer
      • -
      -
      -

      Optional overrides:

      -
      -
        -
      • _timer_set_single_shot: Code for setting the timer to -single shot operating mode, if supported by the timer -object. If not, the Timer class itself will store the flag -and the _on_timer method should be overridden to support -such behavior.
      • -
      • _timer_set_interval: Code for setting the interval on the -timer, if there is a method for doing so on the timer -object.
      • -
      • _on_timer: This is the internal function that any timer -object should call, which will handle the task of running -all callbacks that have been set.
      • -
      -
      -

      Attributes:

      -
      -
        -
      • interval: The time between timer events in -milliseconds. Default is 1000 ms.
      • -
      • single_shot: Boolean flag indicating whether this timer -should operate as single shot (run once and then -stop). Defaults to False.
      • -
      • callbacks: Stores list of (func, args) tuples that will be -called upon timer events. This list can be manipulated -directly, or the functions add_callback and -remove_callback can be used.
      • -
      -
      -
      -
      -add_callback(func, *args, **kwargs)
      -

      Register func to be called by timer when the event fires. Any -additional arguments provided will be passed to func.

      -
      - -
      -
      -interval
      -
      - -
      -
      -remove_callback(func, *args, **kwargs)
      -

      Remove func from list of callbacks. args and kwargs are optional -and used to distinguish between copies of the same function registered -to be called with different arguments.

      -
      - -
      -
      -single_shot
      -
      - -
      -
      -start(interval=None)
      -

      Start the timer object. interval is optional and will be used -to reset the timer interval first if provided.

      -
      - -
      -
      -stop()
      -

      Stop the timer.

      -
      - -
      - -
      -
      -matplotlib.backend_bases.key_press_handler(event, canvas, toolbar=None)
      -

      Implement the default mpl key bindings for the canvas and toolbar -described at Navigation Keyboard Shortcuts

      -
      -
      event
      -
      a KeyEvent instance
      -
      canvas
      -
      a FigureCanvasBase instance
      -
      toolbar
      -
      a NavigationToolbar2 instance
      -
      -
      - -
      -
      -matplotlib.backend_bases.register_backend(format, backend_class)
      -
      - -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/api/backend_gtkagg_api.html b/dev/api/backend_gtkagg_api.html deleted file mode 100644 index 80cb2fd3c53..00000000000 --- a/dev/api/backend_gtkagg_api.html +++ /dev/null @@ -1,170 +0,0 @@ - - - - - - - - matplotlib.backends.backend_gtkagg — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      Previous topic

      -

      matplotlib.backend_bases

      -

      Next topic

      -

      matplotlib.backends.backend_qt4agg

      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      matplotlib.backends.backend_gtkagg

      -

      TODO We’ll add this later, importing the gtk backends requires an active -X-session, which is not compatible with cron jobs.

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/api/backend_pdf_api.html b/dev/api/backend_pdf_api.html deleted file mode 100644 index 563eedf80bb..00000000000 --- a/dev/api/backend_pdf_api.html +++ /dev/null @@ -1,369 +0,0 @@ - - - - - - - - matplotlib.backends.backend_pdf — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      Previous topic

      -

      matplotlib.backends.backend_wxagg

      -

      Next topic

      -

      matplotlib.dviread

      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      matplotlib.backends.backend_pdf

      -

      A PDF matplotlib backend -Author: Jouni K Seppänen <jks@iki.fi>

      -
      -
      -class matplotlib.backends.backend_pdf.FigureCanvasPdf(figure)
      -

      Bases: matplotlib.backend_bases.FigureCanvasBase

      -

      The canvas the figure renders into. Calls the draw and print fig -methods, creates the renderers, etc...

      -

      Public attribute

      -
      -
      figure - A Figure instance
      -
      - -
      -
      -class matplotlib.backends.backend_pdf.Name(name)
      -

      Bases: object

      -

      PDF name object.

      -
      - -
      -
      -class matplotlib.backends.backend_pdf.Operator(op)
      -

      Bases: object

      -

      PDF operator object.

      -
      - -
      -
      -class matplotlib.backends.backend_pdf.PdfFile(filename)
      -

      Bases: object

      -

      PDF file object.

      -
      -
      -alphaState(alpha)
      -

      Return name of an ExtGState that sets alpha to the given value

      -
      - -
      -
      -embedTTF(filename, characters)
      -

      Embed the TTF font from the named file into the document.

      -
      - -
      -
      -fontName(fontprop)
      -

      Select a font based on fontprop and return a name suitable for -Op.selectfont. If fontprop is a string, it will be interpreted -as the filename (or dvi name) of the font.

      -
      - -
      -
      -imageObject(image)
      -

      Return name of an image XObject representing the given image.

      -
      - -
      -
      -markerObject(path, trans, fillp, strokep, lw, joinstyle, capstyle)
      -

      Return name of a marker XObject representing the given path.

      -
      - -
      -
      -reserveObject(name='')
      -

      Reserve an ID for an indirect object. -The name is used for debugging in case we forget to print out -the object with writeObject.

      -
      - -
      -
      -writeInfoDict()
      -

      Write out the info dictionary, checking it for good form

      -
      - -
      -
      -writeTrailer()
      -

      Write out the PDF trailer.

      -
      - -
      -
      -writeXref()
      -

      Write out the xref table.

      -
      - -
      - -
      -
      -class matplotlib.backends.backend_pdf.PdfPages(filename)
      -

      Bases: object

      -

      A multi-page PDF file.

      -

      Use like this:

      -
      # Initialize:
      -pp = PdfPages('foo.pdf')
      -
      -# As many times as you like, create a figure fig, then either:
      -fig.savefig(pp, format='pdf') # note the format argument!
      -# or:
      -pp.savefig(fig)
      -
      -# Once you are done, remember to close the object:
      -pp.close()
      -
      -
      -

      (In reality PdfPages is a thin wrapper around PdfFile, in order to -avoid confusion when using savefig and forgetting the format -argument.)

      -

      Create a new PdfPages object that will be written to the file -named filename. The file is opened at once and any older -file with the same name is overwritten.

      -
      -
      -close()
      -

      Finalize this object, making the underlying file a complete -PDF file.

      -
      - -
      -
      -infodict()
      -

      Return a modifiable information dictionary object -(see PDF reference section 10.2.1 ‘Document Information -Dictionary’).

      -
      - -
      -
      -savefig(figure=None, **kwargs)
      -

      Save the Figure instance figure to this file as a new page. -If figure is a number, the figure instance is looked up by -number, and if figure is None, the active figure is saved. -Any other keyword arguments are passed to Figure.savefig.

      -
      - -
      - -
      -
      -class matplotlib.backends.backend_pdf.Reference(id)
      -

      Bases: object

      -

      PDF reference object. -Use PdfFile.reserveObject() to create References.

      -
      - -
      -
      -class matplotlib.backends.backend_pdf.Stream(id, len, file, extra=None)
      -

      Bases: object

      -

      PDF stream object.

      -

      This has no pdfRepr method. Instead, call begin(), then output the -contents of the stream by calling write(), and finally call end().

      -

      id: object id of stream; len: an unused Reference object for the -length of the stream, or None (to use a memory buffer); file: -a PdfFile; extra: a dictionary of extra key-value pairs to -include in the stream header

      -
      -
      -end()
      -

      Finalize stream.

      -
      - -
      -
      -write(data)
      -

      Write some data on the stream.

      -
      - -
      - -
      -
      -matplotlib.backends.backend_pdf.fill(strings, linelen=75)
      -

      Make one string from sequence of strings, with whitespace -in between. The whitespace is chosen to form lines of at most -linelen characters, if possible.

      -
      - -
      -
      -matplotlib.backends.backend_pdf.new_figure_manager(num, *args, **kwargs)
      -

      Create a new figure manager instance

      -
      - -
      -
      -matplotlib.backends.backend_pdf.new_figure_manager_given_figure(num, figure)
      -

      Create a new figure manager instance for the given figure.

      -
      - -
      -
      -matplotlib.backends.backend_pdf.pdfRepr(obj)
      -

      Map Python objects to PDF syntax.

      -
      - -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/api/backend_qt4agg_api.html b/dev/api/backend_qt4agg_api.html deleted file mode 100644 index e0e9d835919..00000000000 --- a/dev/api/backend_qt4agg_api.html +++ /dev/null @@ -1,236 +0,0 @@ - - - - - - - - matplotlib.backends.backend_qt4agg — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      Previous topic

      -

      matplotlib.backends.backend_gtkagg

      -

      Next topic

      -

      matplotlib.backends.backend_wxagg

      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      matplotlib.backends.backend_qt4agg

      -

      Render to qt from agg

      -
      -
      -class matplotlib.backends.backend_qt4agg.FigureCanvasQTAgg(figure)
      -

      Bases: matplotlib.backends.backend_qt4.FigureCanvasQT, matplotlib.backends.backend_agg.FigureCanvasAgg

      -

      The canvas the figure renders into. Calls the draw and print fig -methods, creates the renderers, etc...

      -

      Public attribute

      -
      -
      figure - A Figure instance
      -
      -
      -blit(bbox=None)
      -

      Blit the region in bbox

      -
      - -
      -
      -draw()
      -

      Draw the figure with Agg, and queue a request -for a Qt draw.

      -
      - -
      -
      -drawRectangle(rect)
      -
      - -
      -
      -paintEvent(e)
      -

      Copy the image from the Agg canvas to the qt.drawable. -In Qt, all drawing should be done inside of here when a widget is -shown onscreen.

      -
      - -
      -
      -print_figure(*args, **kwargs)
      -
      - -
      - -
      -
      -class matplotlib.backends.backend_qt4agg.FigureManagerQTAgg(canvas, num)
      -

      Bases: matplotlib.backends.backend_qt4.FigureManagerQT

      -
      - -
      -
      -class matplotlib.backends.backend_qt4agg.NavigationToolbar2QTAgg(canvas, parent, coordinates=True)
      -

      Bases: matplotlib.backends.backend_qt4.NavigationToolbar2QT

      -

      coordinates: should we show the coordinates on the right?

      -
      - -
      -
      -matplotlib.backends.backend_qt4agg.new_figure_manager(num, *args, **kwargs)
      -

      Create a new figure manager instance

      -
      - -
      -
      -matplotlib.backends.backend_qt4agg.new_figure_manager_given_figure(num, figure)
      -

      Create a new figure manager instance for the given figure.

      -
      - -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/api/backend_wxagg_api.html b/dev/api/backend_wxagg_api.html deleted file mode 100644 index b358dbd6992..00000000000 --- a/dev/api/backend_wxagg_api.html +++ /dev/null @@ -1,252 +0,0 @@ - - - - - - - - matplotlib.backends.backend_wxagg — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      Previous topic

      -

      matplotlib.backends.backend_qt4agg

      -

      Next topic

      -

      matplotlib.backends.backend_pdf

      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      matplotlib.backends.backend_wxagg

      -

      backend_wxagg.py

      -

      A wxPython backend for Agg. This uses the GUI widgets written by -Jeremy O’Donoghue (jeremy@o-donoghue.com) and the Agg backend by John -Hunter (jdhunter@ace.bsd.uchicago.edu)

      -

      Copyright (C) 2003-5 Jeremy O’Donoghue, John Hunter, Illinois Institute of -Technology

      -

      License: This work is licensed under the matplotlib license( PSF -compatible). A copy should be included with this source code.

      -
      -
      -class matplotlib.backends.backend_wxagg.FigureCanvasWxAgg(parent, id, figure)
      -

      Bases: matplotlib.backends.backend_agg.FigureCanvasAgg, matplotlib.backends.backend_wx.FigureCanvasWx

      -

      The FigureCanvas contains the figure and does event handling.

      -

      In the wxPython backend, it is derived from wxPanel, and (usually) -lives inside a frame instantiated by a FigureManagerWx. The parent -window probably implements a wxSizer to control the displayed -control size - but we give a hint as to our preferred minimum -size.

      -

      Initialise a FigureWx instance.

      -
        -
      • Initialise the FigureCanvasBase and wxPanel parents.
      • -
      • Set event handlers for: -EVT_SIZE (Resize event) -EVT_PAINT (Paint event)
      • -
      -
      -
      -blit(bbox=None)
      -

      Transfer the region of the agg buffer defined by bbox to the display. -If bbox is None, the entire buffer is transferred.

      -
      - -
      -
      -draw(drawDC=None)
      -

      Render the figure using agg.

      -
      - -
      -
      -filetypes = {'pgf': 'LaTeX PGF Figure', 'svgz': 'Scalable Vector Graphics', 'tiff': 'Tagged Image File Format', 'jpg': 'Joint Photographic Experts Group', 'raw': 'Raw RGBA bitmap', 'jpeg': 'Joint Photographic Experts Group', 'png': 'Portable Network Graphics', 'ps': 'Postscript', 'emf': 'Enhanced Metafile', 'svg': 'Scalable Vector Graphics', 'eps': 'Encapsulated Postscript', 'rgba': 'Raw RGBA bitmap', 'pdf': 'Portable Document Format', 'tif': 'Tagged Image File Format'}
      -
      - -
      -
      -print_figure(filename, *args, **kwargs)
      -
      - -
      - -
      -
      -class matplotlib.backends.backend_wxagg.FigureFrameWxAgg(num, fig)
      -

      Bases: matplotlib.backends.backend_wx.FigureFrameWx

      -
      -
      -get_canvas(fig)
      -
      - -
      - -
      -
      -class matplotlib.backends.backend_wxagg.NavigationToolbar2WxAgg(canvas)
      -

      Bases: matplotlib.backends.backend_wx.NavigationToolbar2Wx

      -
      -
      -get_canvas(frame, fig)
      -
      - -
      - -
      -
      -matplotlib.backends.backend_wxagg.new_figure_manager(num, *args, **kwargs)
      -

      Create a new figure manager instance

      -
      - -
      -
      -matplotlib.backends.backend_wxagg.new_figure_manager_given_figure(num, figure)
      -

      Create a new figure manager instance for the given figure.

      -
      - -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/api/cbook_api.html b/dev/api/cbook_api.html deleted file mode 100644 index c51b8b2f699..00000000000 --- a/dev/api/cbook_api.html +++ /dev/null @@ -1,978 +0,0 @@ - - - - - - - - cbook — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      Table Of Contents

      - - -

      Previous topic

      -

      matplotlib.type1font

      -

      Next topic

      -

      cm (colormap)

      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      cbook

      -
      -

      matplotlib.cbook

      -

      A collection of utility functions and classes. Originally, many -(but not all) were from the Python Cookbook – hence the name cbook.

      -

      This module is safe to import from anywhere within matplotlib; -it imports matplotlib only at runtime.

      -
      -
      -class matplotlib.cbook.Bunch(**kwds)
      -

      Often we want to just collect a bunch of stuff together, naming each -item of the bunch; a dictionary’s OK for that, but a small do- nothing -class is even handier, and prettier to use. Whenever you want to -group a few variables:

      -
      >>> point = Bunch(datum=2, squared=4, coord=12)
      ->>> point.datum
      -
      -By: Alex Martelli
      -From: http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/52308
      -
      -
      -
      - -
      -
      -class matplotlib.cbook.CallbackRegistry(*args)
      -

      Handle registering and disconnecting for a set of signals and -callbacks:

      -
      >>> def oneat(x):
      -...    print 'eat', x
      ->>> def ondrink(x):
      -...    print 'drink', x
      -
      -
      -
      >>> from matplotlib.cbook import CallbackRegistry
      ->>> callbacks = CallbackRegistry()
      -
      -
      -
      >>> id_eat = callbacks.connect('eat', oneat)
      ->>> id_drink = callbacks.connect('drink', ondrink)
      -
      -
      -
      >>> callbacks.process('drink', 123)
      -drink 123
      ->>> callbacks.process('eat', 456)
      -eat 456
      ->>> callbacks.process('be merry', 456) # nothing will be called
      ->>> callbacks.disconnect(id_eat)
      ->>> callbacks.process('eat', 456)      # nothing will be called
      -
      -
      -

      In practice, one should always disconnect all callbacks when they -are no longer needed to avoid dangling references (and thus memory -leaks). However, real code in matplotlib rarely does so, and due -to its design, it is rather difficult to place this kind of code. -To get around this, and prevent this class of memory leaks, we -instead store weak references to bound methods only, so when the -destination object needs to die, the CallbackRegistry won’t keep -it alive. The Python stdlib weakref module can not create weak -references to bound methods directly, so we need to create a proxy -object to handle weak references to bound methods (or regular free -functions). This technique was shared by Peter Parente on his -“Mindtrove” blog.

      -
      -

      Deprecated since version 1.3.0.

      -
      -
      -
      -connect(s, func)
      -

      register func to be called when a signal s is generated -func will be called

      -
      - -
      -
      -disconnect(cid)
      -

      disconnect the callback registered with callback id cid

      -
      - -
      -
      -process(s, *args, **kwargs)
      -

      process signal s. All of the functions registered to receive -callbacks on s will be called with *args and **kwargs

      -
      - -
      - -
      -
      -class matplotlib.cbook.GetRealpathAndStat
      -
      - -
      -
      -class matplotlib.cbook.Grouper(init=[])
      -

      Bases: object

      -

      This class provides a lightweight way to group arbitrary objects -together into disjoint sets when a full-blown graph data structure -would be overkill.

      -

      Objects can be joined using join(), tested for connectedness -using joined(), and all disjoint sets can be retreived by -using the object as an iterator.

      -

      The objects being joined must be hashable and weak-referenceable.

      -

      For example:

      -
      >>> from matplotlib.cbook import Grouper
      ->>> class Foo(object):
      -...     def __init__(self, s):
      -...         self.s = s
      -...     def __repr__(self):
      -...         return self.s
      -...
      ->>> a, b, c, d, e, f = [Foo(x) for x in 'abcdef']
      ->>> grp = Grouper()
      ->>> grp.join(a, b)
      ->>> grp.join(b, c)
      ->>> grp.join(d, e)
      ->>> sorted(map(tuple, grp))
      -[(d, e), (a, b, c)]
      ->>> grp.joined(a, b)
      -True
      ->>> grp.joined(a, c)
      -True
      ->>> grp.joined(a, d)
      -False
      -
      -
      -
      -
      -clean()
      -

      Clean dead weak references from the dictionary

      -
      - -
      -
      -get_siblings(a)
      -

      Returns all of the items joined with a, including itself.

      -
      - -
      -
      -join(a, *args)
      -

      Join given arguments into the same set. Accepts one or more -arguments.

      -
      - -
      -
      -joined(a, b)
      -

      Returns True if a and b are members of the same set.

      -
      - -
      - -
      -
      -class matplotlib.cbook.Idle(func)
      -

      Bases: matplotlib.cbook.Scheduler

      -

      Schedule callbacks when scheduler is idle

      -
      -
      -run()
      -
      - -
      -
      -waittime = 0.05
      -
      - -
      - -
      -
      -exception matplotlib.cbook.MatplotlibDeprecationWarning
      -

      Bases: exceptions.UserWarning

      -

      A class for issuing deprecation warnings for Matplotlib users.

      -

      In light of the fact that Python builtin DeprecationWarnings are ignored -by default as of Python 2.7 (see link below), this class was put in to -allow for the signaling of deprecation, but via UserWarnings which are not -ignored by default.

      -

      http://docs.python.org/dev/whatsnew/2.7.html#the-future-for-python-2-x

      -
      - -
      -
      -class matplotlib.cbook.MemoryMonitor(nmax=20000)
      -
      -
      -clear()
      -
      - -
      -
      -plot(i0=0, isub=1, fig=None)
      -
      - -
      -
      -report(segments=4)
      -
      - -
      -
      -xy(i0=0, isub=1)
      -
      - -
      - -
      -
      -class matplotlib.cbook.Null(*args, **kwargs)
      -

      Null objects always and reliably “do nothing.”

      -
      - -
      -
      -class matplotlib.cbook.RingBuffer(size_max)
      -

      class that implements a not-yet-full buffer

      -
      -
      -append(x)
      -

      append an element at the end of the buffer

      -
      - -
      -
      -get()
      -

      Return a list of elements from the oldest to the newest.

      -
      - -
      - -
      -
      -class matplotlib.cbook.Scheduler
      -

      Bases: threading.Thread

      -

      Base class for timeout and idle scheduling

      -
      -
      -id = 0
      -
      - -
      -
      -idlelock = <thread.lock object at 0x200f730>
      -
      - -
      -
      -stop()
      -
      - -
      - -
      -
      -class matplotlib.cbook.Sorter
      -

      Sort by attribute or item

      -

      Example usage:

      -
      sort = Sorter()
      -
      -list = [(1, 2), (4, 8), (0, 3)]
      -dict = [{'a': 3, 'b': 4}, {'a': 5, 'b': 2}, {'a': 0, 'b': 0},
      -        {'a': 9, 'b': 9}]
      -
      -sort(list)       # default sort
      -sort(list, 1)    # sort by index 1
      -sort(dict, 'a')  # sort a list of dicts by key 'a'
      -
      -
      -
      -
      -byAttribute(data, attributename, inplace=1)
      -
      - -
      -
      -byItem(data, itemindex=None, inplace=1)
      -
      - -
      -
      -sort(data, itemindex=None, inplace=1)
      -
      - -
      - -
      -
      -class matplotlib.cbook.Stack(default=None)
      -

      Bases: object

      -

      Implement a stack where elements can be pushed on and you can move -back and forth. But no pop. Should mimic home / back / forward -in a browser

      -
      -
      -back()
      -

      move the position back and return the current element

      -
      - -
      -
      -bubble(o)
      -

      raise o to the top of the stack and return o. o must be -in the stack

      -
      - -
      -
      -clear()
      -

      empty the stack

      -
      - -
      -
      -empty()
      -
      - -
      -
      -forward()
      -

      move the position forward and return the current element

      -
      - -
      -
      -home()
      -

      push the first element onto the top of the stack

      -
      - -
      -
      -push(o)
      -

      push object onto stack at current position - all elements -occurring later than the current position are discarded

      -
      - -
      -
      -remove(o)
      -

      remove element o from the stack

      -
      - -
      - -
      -
      -class matplotlib.cbook.Timeout(wait, func)
      -

      Bases: matplotlib.cbook.Scheduler

      -

      Schedule recurring events with a wait time in seconds

      -
      -
      -run()
      -
      - -
      - -
      -
      -class matplotlib.cbook.Xlator
      -

      Bases: dict

      -

      All-in-one multiple-string-substitution class

      -

      Example usage:

      -
      text = "Larry Wall is the creator of Perl"
      -adict = {
      -"Larry Wall" : "Guido van Rossum",
      -"creator" : "Benevolent Dictator for Life",
      -"Perl" : "Python",
      -}
      -
      -print multiple_replace(adict, text)
      -
      -xlat = Xlator(adict)
      -print xlat.xlat(text)
      -
      -
      -
      -
      -xlat(text)
      -

      Translate text, returns the modified text.

      -
      - -
      - -
      -
      -matplotlib.cbook.align_iterators(func, *iterables)
      -

      This generator takes a bunch of iterables that are ordered by func -It sends out ordered tuples:

      -
      (func(row), [rows from all iterators matching func(row)])
      -
      -

      It is used by matplotlib.mlab.recs_join() to join record arrays

      -
      - -
      -
      -matplotlib.cbook.allequal(seq)
      -

      Return True if all elements of seq compare equal. If seq is -0 or 1 length, return True

      -
      - -
      -
      -matplotlib.cbook.allpairs(x)
      -

      return all possible pairs in sequence x

      -

      Condensed by Alex Martelli from this thread on c.l.python

      -
      - -
      -
      -matplotlib.cbook.alltrue(seq)
      -

      Return True if all elements of seq evaluate to True. If -seq is empty, return False.

      -
      - -
      -
      -class matplotlib.cbook.converter(missing='Null', missingval=None)
      -

      Bases: object

      -

      Base class for handling string -> python type with support for -missing values

      -
      -
      -is_missing(s)
      -
      - -
      - -
      -
      -matplotlib.cbook.dedent(s)
      -

      Remove excess indentation from docstring s.

      -

      Discards any leading blank lines, then removes up to n whitespace -characters from each line, where n is the number of leading -whitespace characters in the first line. It differs from -textwrap.dedent in its deletion of leading blank lines and its use -of the first non-blank line to determine the indentation.

      -

      It is also faster in most cases.

      -
      - -
      -
      -matplotlib.cbook.delete_masked_points(*args)
      -

      Find all masked and/or non-finite points in a set of arguments, -and return the arguments with only the unmasked points remaining.

      -

      Arguments can be in any of 5 categories:

      -
        -
      1. 1-D masked arrays
      2. -
      3. 1-D ndarrays
      4. -
      5. ndarrays with more than one dimension
      6. -
      7. other non-string iterables
      8. -
      9. anything else
      10. -
      -

      The first argument must be in one of the first four categories; -any argument with a length differing from that of the first -argument (and hence anything in category 5) then will be -passed through unchanged.

      -

      Masks are obtained from all arguments of the correct length -in categories 1, 2, and 4; a point is bad if masked in a masked -array or if it is a nan or inf. No attempt is made to -extract a mask from categories 2, 3, and 4 if np.isfinite() -does not yield a Boolean array.

      -

      All input arguments that are not passed unchanged are returned -as ndarrays after removing the points or rows corresponding to -masks in any of the arguments.

      -

      A vastly simpler version of this function was originally -written as a helper for Axes.scatter().

      -
      - -
      -
      -matplotlib.cbook.dict_delall(d, keys)
      -

      delete all of the keys from the dict d

      -
      - -
      -
      -matplotlib.cbook.exception_to_str(s=None)
      -
      - -
      -
      -matplotlib.cbook.finddir(o, match, case=False)
      -

      return all attributes of o which match string in match. if case -is True require an exact case match.

      -
      - -
      -
      -matplotlib.cbook.flatten(seq, scalarp=<function is_scalar_or_string at 0x2718f50>)
      -

      Returns a generator of flattened nested containers

      -

      For example:

      -
      >>> from matplotlib.cbook import flatten
      ->>> l = (('John', ['Hunter']), (1, 23), [[([42, (5, 23)], )]])
      ->>> print list(flatten(l))
      -['John', 'Hunter', 1, 23, 42, 5, 23]
      -
      -
      -

      By: Composite of Holger Krekel and Luther Blissett -From: http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/121294 -and Recipe 1.12 in cookbook

      -
      - -
      -
      -matplotlib.cbook.get_recursive_filelist(args)
      -

      Recurse all the files and dirs in args ignoring symbolic links -and return the files as a list of strings

      -
      - -
      -
      -matplotlib.cbook.get_sample_data(fname, asfileobj=True)
      -

      Return a sample data file. fname is a path relative to the -mpl-data/sample_data directory. If asfileobj is True -return a file object, otherwise just a file path.

      -

      Set the rc parameter examples.directory to the directory where we should -look, if sample_data files are stored in a location different than -default (which is ‘mpl-data/sample_data` at the same level of ‘matplotlib` -Python module files).

      -

      If the filename ends in .gz, the file is implicitly ungzipped.

      -
      - -
      -
      -matplotlib.cbook.get_split_ind(seq, N)
      -

      seq is a list of words. Return the index into seq such that:

      -
      len(' '.join(seq[:ind])<=N
      -
      -

      .

      -
      - -
      -
      -matplotlib.cbook.is_math_text(s)
      -
      - -
      -
      -matplotlib.cbook.is_numlike(obj)
      -

      return true if obj looks like a number

      -
      - -
      -
      -matplotlib.cbook.is_scalar(obj)
      -

      return true if obj is not string like and is not iterable

      -
      - -
      -
      -matplotlib.cbook.is_scalar_or_string(val)
      -

      Return whether the given object is a scalar or string like.

      -
      - -
      -
      -matplotlib.cbook.is_sequence_of_strings(obj)
      -

      Returns true if obj is iterable and contains strings

      -
      - -
      -
      -matplotlib.cbook.is_string_like(obj)
      -

      Return True if obj looks like a string

      -
      - -
      -
      -matplotlib.cbook.is_writable_file_like(obj)
      -

      return true if obj looks like a file object with a write method

      -
      - -
      -
      -matplotlib.cbook.issubclass_safe(x, klass)
      -

      return issubclass(x, klass) and return False on a TypeError

      -
      - -
      -
      -matplotlib.cbook.iterable(obj)
      -

      return true if obj is iterable

      -
      - -
      -
      -matplotlib.cbook.listFiles(root, patterns='*', recurse=1, return_folders=0)
      -

      Recursively list files

      -

      from Parmar and Martelli in the Python Cookbook

      -
      - -
      -
      -class matplotlib.cbook.maxdict(maxsize)
      -

      Bases: dict

      -

      A dictionary with a maximum size; this doesn’t override all the -relevant methods to contrain size, just setitem, so use with -caution

      -
      - -
      -
      -matplotlib.cbook.mkdirs(newdir, mode=511)
      -

      make directory newdir recursively, and set mode. Equivalent to

      -
      > mkdir -p NEWDIR
      -> chmod MODE NEWDIR
      -
      -
      - -
      -
      -matplotlib.cbook.mplDeprecation
      -

      alias of MatplotlibDeprecationWarning

      -
      - -
      -
      -matplotlib.cbook.onetrue(seq)
      -

      Return True if one element of seq is True. It seq is -empty, return False.

      -
      - -
      -
      -matplotlib.cbook.pieces(seq, num=2)
      -

      Break up the seq into num tuples

      -
      - -
      -
      -matplotlib.cbook.popall(seq)
      -

      empty a list

      -
      - -
      -
      -matplotlib.cbook.print_cycles(objects, outstream=<open file '<stdout>', mode 'w' at 0x7f9c6d8ae1e0>, show_progress=False)
      -
      -
      objects
      -
      A list of objects to find cycles in. It is often useful to -pass in gc.garbage to find the cycles that are preventing some -objects from being garbage collected.
      -
      outstream
      -
      The stream for output.
      -
      show_progress
      -
      If True, print the number of objects reached as they are found.
      -
      -
      - -
      -
      -matplotlib.cbook.recursive_remove(path)
      -
      - -
      -
      -matplotlib.cbook.report_memory(i=0)
      -

      return the memory consumed by process

      -
      - -
      -
      -matplotlib.cbook.restrict_dict(d, keys)
      -

      Return a dictionary that contains those keys that appear in both -d and keys, with values from d.

      -
      - -
      -
      -matplotlib.cbook.reverse_dict(d)
      -

      reverse the dictionary – may lose data if values are not unique!

      -
      - -
      -
      -matplotlib.cbook.safe_masked_invalid(x)
      -
      - -
      -
      -matplotlib.cbook.safezip(*args)
      -

      make sure args are equal len before zipping

      -
      - -
      -
      -class matplotlib.cbook.silent_list(type, seq=None)
      -

      Bases: list

      -

      override repr when returning a list of matplotlib artists to -prevent long, meaningless output. This is meant to be used for a -homogeneous list of a given type

      -
      - -
      -
      -matplotlib.cbook.simple_linear_interpolation(a, steps)
      -
      - -
      -
      -matplotlib.cbook.soundex(name, len=4)
      -

      soundex module conforming to Odell-Russell algorithm

      -
      - -
      -
      -matplotlib.cbook.strip_math(s)
      -

      remove latex formatting from mathtext

      -
      - -
      -
      -matplotlib.cbook.to_filehandle(fname, flag='rU', return_opened=False)
      -

      fname can be a filename or a file handle. Support for gzipped -files is automatic, if the filename ends in .gz. flag is a -read/write flag for file()

      -
      - -
      -
      -class matplotlib.cbook.todate(fmt='%Y-%m-%d', missing='Null', missingval=None)
      -

      Bases: matplotlib.cbook.converter

      -

      convert to a date or None

      -

      use a time.strptime() format string for conversion

      -
      - -
      -
      -class matplotlib.cbook.todatetime(fmt='%Y-%m-%d', missing='Null', missingval=None)
      -

      Bases: matplotlib.cbook.converter

      -

      convert to a datetime or None

      -

      use a time.strptime() format string for conversion

      -
      - -
      -
      -class matplotlib.cbook.tofloat(missing='Null', missingval=None)
      -

      Bases: matplotlib.cbook.converter

      -

      convert to a float or None

      -
      - -
      -
      -class matplotlib.cbook.toint(missing='Null', missingval=None)
      -

      Bases: matplotlib.cbook.converter

      -

      convert to an int or None

      -
      - -
      -
      -class matplotlib.cbook.tostr(missing='Null', missingval='')
      -

      Bases: matplotlib.cbook.converter

      -

      convert to string or None

      -
      - -
      -
      -matplotlib.cbook.unicode_safe(s)
      -
      - -
      -
      -matplotlib.cbook.unique(x)
      -

      Return a list of unique elements of x

      -
      - -
      -
      -matplotlib.cbook.unmasked_index_ranges(mask, compressed=True)
      -

      Find index ranges where mask is False.

      -

      mask will be flattened if it is not already 1-D.

      -

      Returns Nx2 numpy.ndarray with each row the start and stop -indices for slices of the compressed numpy.ndarray -corresponding to each of N uninterrupted runs of unmasked -values. If optional argument compressed is False, it returns -the start and stop indices into the original numpy.ndarray, -not the compressed numpy.ndarray. Returns None if there -are no unmasked values.

      -

      Example:

      -
      y = ma.array(np.arange(5), mask = [0,0,1,0,0])
      -ii = unmasked_index_ranges(ma.getmaskarray(y))
      -# returns array [[0,2,] [2,4,]]
      -
      -y.compressed()[ii[1,0]:ii[1,1]]
      -# returns array [3,4,]
      -
      -ii = unmasked_index_ranges(ma.getmaskarray(y), compressed=False)
      -# returns array [[0, 2], [3, 5]]
      -
      -y.filled()[ii[1,0]:ii[1,1]]
      -# returns array [3,4,]
      -
      -
      -

      Prior to the transforms refactoring, this was used to support -masked arrays in Line2D.

      -
      - -
      -
      -matplotlib.cbook.wrap(prefix, text, cols)
      -

      wrap text with prefix at length cols

      -
      - -
      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/api/cm_api.html b/dev/api/cm_api.html deleted file mode 100644 index 94a3e1b911e..00000000000 --- a/dev/api/cm_api.html +++ /dev/null @@ -1,356 +0,0 @@ - - - - - - - - cm (colormap) — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      Table Of Contents

      - - -

      Previous topic

      -

      cbook

      -

      Next topic

      -

      collections

      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      cm (colormap)

      -
      -

      matplotlib.cm

      -

      This module provides a large set of colormaps, functions for -registering new colormaps and for getting a colormap by name, -and a mixin class for adding color mapping functionality.

      -
      -
      -class matplotlib.cm.ScalarMappable(norm=None, cmap=None)
      -

      This is a mixin class to support scalar data to RGBA mapping. -The ScalarMappable makes use of data normalization before returning -RGBA colors from the given colormap.

      - --- - - - -
      Parameters :

      norm : matplotlib.colors.Normalize instance

      -
      -

      The normalizing object which scales data, typically into the -interval [0, 1].

      -
      -

      cmap : str or Colormap instance

      -
      -

      The colormap used to map normalized data values to RGBA colors.

      -
      -
      -
      -
      -add_checker(checker)
      -

      Add an entry to a dictionary of boolean flags -that are set to True when the mappable is changed.

      -
      - -
      -
      -autoscale()
      -

      Autoscale the scalar limits on the norm instance using the -current array

      -
      - -
      -
      -autoscale_None()
      -

      Autoscale the scalar limits on the norm instance using the -current array, changing only limits that are None

      -
      - -
      -
      -changed()
      -

      Call this whenever the mappable is changed to notify all the -callbackSM listeners to the ‘changed’ signal

      -
      - -
      -
      -check_update(checker)
      -

      If mappable has changed since the last check, -return True; else return False

      -
      - -
      -
      -get_array()
      -

      Return the array

      -
      - -
      -
      -get_clim()
      -

      return the min, max of the color limits for image scaling

      -
      - -
      -
      -get_cmap()
      -

      return the colormap

      -
      - -
      -
      -set_array(A)
      -

      Set the image array from numpy array A

      -
      - -
      -
      -set_clim(vmin=None, vmax=None)
      -

      set the norm limits for image scaling; if vmin is a length2 -sequence, interpret it as (vmin, vmax) which is used to -support setp

      -

      ACCEPTS: a length 2 sequence of floats

      -
      - -
      -
      -set_cmap(cmap)
      -

      set the colormap for luminance data

      -

      ACCEPTS: a colormap or registered colormap name

      -
      - -
      -
      -set_colorbar(im, ax)
      -

      set the colorbar image and axes associated with mappable

      -
      - -
      -
      -set_norm(norm)
      -

      set the normalization instance

      -
      - -
      -
      -to_rgba(x, alpha=None, bytes=False)
      -

      Return a normalized rgba array corresponding to x.

      -

      In the normal case, x is a 1-D or 2-D sequence of scalars, and -the corresponding ndarray of rgba values will be returned, -based on the norm and colormap set for this ScalarMappable.

      -

      There is one special case, for handling images that are already -rgb or rgba, such as might have been read from an image file. -If x is an ndarray with 3 dimensions, -and the last dimension is either 3 or 4, then it will be -treated as an rgb or rgba array, and no mapping will be done. -If the last dimension is 3, the alpha kwarg (defaulting to 1) -will be used to fill in the transparency. If the last dimension -is 4, the alpha kwarg is ignored; it does not -replace the pre-existing alpha. A ValueError will be raised -if the third dimension is other than 3 or 4.

      -

      In either case, if bytes is False (default), the rgba -array will be floats in the 0-1 range; if it is True, -the returned rgba array will be uint8 in the 0 to 255 range.

      -

      Note: this method assumes the input is well-behaved; it does -not check for anomalies such as x being a masked rgba -array, or being an integer type other than uint8, or being -a floating point rgba array with values outside the 0-1 range.

      -
      - -
      - -
      -
      -matplotlib.cm.get_cmap(name=None, lut=None)
      -

      Get a colormap instance, defaulting to rc values if name is None.

      -

      Colormaps added with register_cmap() take precedence over -built-in colormaps.

      -

      If name is a matplotlib.colors.Colormap instance, it will be -returned.

      -

      If lut is not None it must be an integer giving the number of -entries desired in the lookup table, and name must be a -standard mpl colormap name with a corresponding data dictionary -in datad.

      -
      - -
      -
      -matplotlib.cm.register_cmap(name=None, cmap=None, data=None, lut=None)
      -

      Add a colormap to the set recognized by get_cmap().

      -

      It can be used in two ways:

      -
      register_cmap(name='swirly', cmap=swirly_cmap)
      -
      -register_cmap(name='choppy', data=choppydata, lut=128)
      -
      -
      -

      In the first case, cmap must be a matplotlib.colors.Colormap -instance. The name is optional; if absent, the name will -be the name attribute of the cmap.

      -

      In the second case, the three arguments are passed to -the LinearSegmentedColormap initializer, -and the resulting colormap is registered.

      -
      - -
      -
      -matplotlib.cm.revcmap(data)
      -

      Can only handle specification data in dictionary format.

      -
      - -
      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/api/collections_api.html b/dev/api/collections_api.html deleted file mode 100644 index d8b6ba41ba6..00000000000 --- a/dev/api/collections_api.html +++ /dev/null @@ -1,1386 +0,0 @@ - - - - - - - - collections — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      Table Of Contents

      - - -

      Previous topic

      -

      cm (colormap)

      -

      Next topic

      -

      colorbar

      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      collections

      -

      -Inheritance diagram of matplotlib.collections - - - - - - - - - - - - - - - - - - -

      -
      -

      matplotlib.collections

      -

      Classes for the efficient drawing of large collections of objects that -share most properties, e.g., a large number of line segments or -polygons.

      -

      The classes are not meant to be as flexible as their single element -counterparts (e.g., you may not be able to select all line styles) but -they are meant to be fast for common use cases (e.g., a large set of solid -line segemnts)

      -
      -
      -class matplotlib.collections.AsteriskPolygonCollection(numsides, rotation=0, sizes=(1, ), **kwargs)
      -

      Bases: matplotlib.collections.RegularPolyCollection

      -

      Draw a collection of regular asterisks with numsides points.

      -
      -
      numsides
      -
      the number of sides of the polygon
      -
      rotation
      -
      the rotation of the polygon in radians
      -
      sizes
      -

      gives the area of the circle circumscribing the -regular polygon in points^2

      -

      Valid Collection keyword arguments:

      -
      -
      -
      -

      offsets and transOffset are used to translate the patch after -rendering (default no offsets)

      -

      If any of edgecolors, facecolors, linewidths, antialiaseds -are None, they default to their matplotlib.rcParams patch -setting, in sequence form.

      -
      -
      -

      Example: see examples/dynamic_collection.py for -complete example:

      -
      offsets = np.random.rand(20,2)
      -facecolors = [cm.jet(x) for x in np.random.rand(20)]
      -black = (0,0,0,1)
      -
      -collection = RegularPolyCollection(
      -    numsides=5, # a pentagon
      -    rotation=0, sizes=(50,),
      -    facecolors = facecolors,
      -    edgecolors = (black,),
      -    linewidths = (1,),
      -    offsets = offsets,
      -    transOffset = ax.transData,
      -    )
      -
      -
      -
      - -
      -
      -class matplotlib.collections.BrokenBarHCollection(xranges, yrange, **kwargs)
      -

      Bases: matplotlib.collections.PolyCollection

      -

      A collection of horizontal bars spanning yrange with a sequence of -xranges.

      -
      -
      xranges
      -
      sequence of (xmin, xwidth)
      -
      yrange
      -

      ymin, ywidth

      -

      Valid Collection keyword arguments:

      -
      -
      -
      -

      offsets and transOffset are used to translate the patch after -rendering (default no offsets)

      -

      If any of edgecolors, facecolors, linewidths, antialiaseds -are None, they default to their matplotlib.rcParams patch -setting, in sequence form.

      -
      -
      -
      -
      -static span_where(x, ymin, ymax, where, **kwargs)
      -

      Create a BrokenBarHCollection to plot horizontal bars from -over the regions in x where where is True. The bars range -on the y-axis from ymin to ymax

      -

      A BrokenBarHCollection is returned. kwargs are -passed on to the collection.

      -
      - -
      - -
      -
      -class matplotlib.collections.CircleCollection(sizes, **kwargs)
      -

      Bases: matplotlib.collections.Collection

      -

      A collection of circles, drawn using splines.

      -

      sizes -Gives the area of the circle in points^2

      -

      Valid Collection keyword arguments:

      -
      -
      -
      -

      offsets and transOffset are used to translate the patch after -rendering (default no offsets)

      -

      If any of edgecolors, facecolors, linewidths, antialiaseds -are None, they default to their matplotlib.rcParams patch -setting, in sequence form.

      -
      -
      -draw(artist, renderer, *args, **kwargs)
      -
      - -
      -
      -get_sizes()
      -

      return sizes of circles

      -
      - -
      - -
      -
      -class matplotlib.collections.Collection(edgecolors=None, facecolors=None, linewidths=None, linestyles='solid', antialiaseds=None, offsets=None, transOffset=None, norm=None, cmap=None, pickradius=5.0, hatch=None, urls=None, offset_position='screen', zorder=1, **kwargs)
      -

      Bases: matplotlib.artist.Artist, matplotlib.cm.ScalarMappable

      -

      Base class for Collections. Must be subclassed to be usable.

      -

      All properties in a collection must be sequences or scalars; -if scalars, they will be converted to sequences. The -property of the ith element of the collection is:

      -
      prop[i % len(props)]
      -
      -
      -

      Keyword arguments and default values:

      -
      -
        -
      • edgecolors: None
      • -
      • facecolors: None
      • -
      • linewidths: None
      • -
      • antialiaseds: None
      • -
      • offsets: None
      • -
      • transOffset: transforms.IdentityTransform()
      • -
      • offset_position: ‘screen’ (default) or ‘data’
      • -
      • norm: None (optional for -matplotlib.cm.ScalarMappable)
      • -
      • cmap: None (optional for -matplotlib.cm.ScalarMappable)
      • -
      • hatch: None
      • -
      • zorder: 1
      • -
      -
      -

      offsets and transOffset are used to translate the patch after -rendering (default no offsets). If offset_position is ‘screen’ -(default) the offset is applied after the master transform has -been applied, that is, the offsets are in screen coordinates. If -offset_position is ‘data’, the offset is applied before the master -transform, i.e., the offsets are in data coordinates.

      -

      If any of edgecolors, facecolors, linewidths, antialiaseds -are None, they default to their matplotlib.rcParams patch -setting, in sequence form.

      -

      The use of ScalarMappable is optional. If -the ScalarMappable matrix _A is not None -(ie a call to set_array has been made), at draw time a call to -scalar mappable will be made to set the face colors.

      -

      Create a Collection

      -

      %(Collection)s

      -
      -
      -contains(mouseevent)
      -

      Test whether the mouse event occurred in the collection.

      -

      Returns True | False, dict(ind=itemlist), where every -item in itemlist contains the event.

      -
      - -
      -
      -draw(artist, renderer, *args, **kwargs)
      -
      - -
      -
      -get_dashes()
      -
      - -
      -
      -get_datalim(transData)
      -
      - -
      -
      -get_edgecolor()
      -
      - -
      -
      -get_edgecolors()
      -
      - -
      -
      -get_facecolor()
      -
      - -
      -
      -get_facecolors()
      -
      - -
      -
      -get_hatch()
      -

      Return the current hatching pattern

      -
      - -
      -
      -get_linestyle()
      -
      - -
      -
      -get_linestyles()
      -
      - -
      -
      -get_linewidth()
      -
      - -
      -
      -get_linewidths()
      -
      - -
      -
      -get_offset_position()
      -

      Returns how offsets are applied for the collection. If -offset_position is ‘screen’, the offset is applied after the -master transform has been applied, that is, the offsets are in -screen coordinates. If offset_position is ‘data’, the offset -is applied before the master transform, i.e., the offsets are -in data coordinates.

      -
      - -
      -
      -get_offset_transform()
      -
      - -
      -
      -get_offsets()
      -

      Return the offsets for the collection.

      -
      - -
      -
      -get_paths()
      -
      - -
      -
      -get_pickradius()
      -
      - -
      -
      -get_transforms()
      -
      - -
      -
      -get_urls()
      -
      - -
      -
      -get_window_extent(renderer)
      -
      - -
      -
      -set_alpha(alpha)
      -

      Set the alpha tranparencies of the collection. alpha must be -a float or None.

      -

      ACCEPTS: float or None

      -
      - -
      -
      -set_antialiased(aa)
      -

      Set the antialiasing state for rendering.

      -

      ACCEPTS: Boolean or sequence of booleans

      -
      - -
      -
      -set_antialiaseds(aa)
      -

      alias for set_antialiased

      -
      - -
      -
      -set_color(c)
      -

      Set both the edgecolor and the facecolor.

      -

      ACCEPTS: matplotlib color arg or sequence of rgba tuples

      -
      -

      See also

      -
      -
      set_facecolor(), set_edgecolor()
      -
      For setting the edge or face color individually.
      -
      -
      -
      - -
      -
      -set_dashes(ls)
      -

      alias for set_linestyle

      -
      - -
      -
      -set_edgecolor(c)
      -

      Set the edgecolor(s) of the collection. c can be a -matplotlib color arg (all patches have same color), or a -sequence of rgba tuples; if it is a sequence the patches will -cycle through the sequence.

      -

      If c is ‘face’, the edge color will always be the same as -the face color. If it is ‘none’, the patch boundary will not -be drawn.

      -

      ACCEPTS: matplotlib color arg or sequence of rgba tuples

      -
      - -
      -
      -set_edgecolors(c)
      -

      alias for set_edgecolor

      -
      - -
      -
      -set_facecolor(c)
      -

      Set the facecolor(s) of the collection. c can be a -matplotlib color arg (all patches have same color), or a -sequence of rgba tuples; if it is a sequence the patches will -cycle through the sequence.

      -

      If c is ‘none’, the patch will not be filled.

      -

      ACCEPTS: matplotlib color arg or sequence of rgba tuples

      -
      - -
      -
      -set_facecolors(c)
      -

      alias for set_facecolor

      -
      - -
      -
      -set_hatch(hatch)
      -

      Set the hatching pattern

      -

      hatch can be one of:

      -
      /   - diagonal hatching
      -\   - back diagonal
      -|   - vertical
      --   - horizontal
      -+   - crossed
      -x   - crossed diagonal
      -o   - small circle
      -O   - large circle
      -.   - dots
      -*   - stars
      -
      -

      Letters can be combined, in which case all the specified -hatchings are done. If same letter repeats, it increases the -density of hatching of that pattern.

      -

      Hatching is supported in the PostScript, PDF, SVG and Agg -backends only.

      -

      Unlike other properties such as linewidth and colors, hatching -can only be specified for the collection as a whole, not separately -for each member.

      -

      ACCEPTS: [ ‘/’ | ‘\’ | ‘|’ | ‘-‘ | ‘+’ | ‘x’ | ‘o’ | ‘O’ | ‘.’ | ‘*’ ]

      -
      - -
      -
      -set_linestyle(ls)
      -

      Set the linestyle(s) for the collection.

      -

      ACCEPTS: [‘solid’ | ‘dashed’, ‘dashdot’, ‘dotted’ | -(offset, on-off-dash-seq) ]

      -
      - -
      -
      -set_linestyles(ls)
      -

      alias for set_linestyle

      -
      - -
      -
      -set_linewidth(lw)
      -

      Set the linewidth(s) for the collection. lw can be a scalar -or a sequence; if it is a sequence the patches will cycle -through the sequence

      -

      ACCEPTS: float or sequence of floats

      -
      - -
      -
      -set_linewidths(lw)
      -

      alias for set_linewidth

      -
      - -
      -
      -set_lw(lw)
      -

      alias for set_linewidth

      -
      - -
      -
      -set_offset_position(offset_position)
      -

      Set how offsets are applied. If offset_position is ‘screen’ -(default) the offset is applied after the master transform has -been applied, that is, the offsets are in screen coordinates. -If offset_position is ‘data’, the offset is applied before the -master transform, i.e., the offsets are in data coordinates.

      -
      - -
      -
      -set_offsets(offsets)
      -

      Set the offsets for the collection. offsets can be a scalar -or a sequence.

      -

      ACCEPTS: float or sequence of floats

      -
      - -
      -
      -set_paths()
      -
      - -
      -
      -set_pickradius(pr)
      -
      - -
      -
      -set_urls(urls)
      -
      - -
      -
      -update_from(other)
      -

      copy properties from other to self

      -
      - -
      -
      -update_scalarmappable()
      -

      If the scalar mappable array is not none, update colors -from scalar data

      -
      - -
      - -
      -
      -class matplotlib.collections.EllipseCollection(widths, heights, angles, units='points', **kwargs)
      -

      Bases: matplotlib.collections.Collection

      -

      A collection of ellipses, drawn using splines.

      -
      -
      widths: sequence
      -
      lengths of first axes (e.g., major axis lengths)
      -
      heights: sequence
      -
      lengths of second axes
      -
      angles: sequence
      -
      angles of first axes, degrees CCW from the X-axis
      -
      -

      units: [‘points’ | ‘inches’ | ‘dots’ | ‘width’ | ‘height’ -| ‘x’ | ‘y’ | ‘xy’]

      -
      -
      units in which majors and minors are given; ‘width’ and -‘height’ refer to the dimensions of the axes, while ‘x’ -and ‘y’ refer to the offsets data units. ‘xy’ differs -from all others in that the angle as plotted varies with -the aspect ratio, and equals the specified angle only when -the aspect ratio is unity. Hence it behaves the same as -the Ellipse with -axes.transData as its transform.
      -

      Additional kwargs inherited from the base Collection:

      -
      -

      Valid Collection keyword arguments:

      -
      -
      -
      -

      offsets and transOffset are used to translate the patch after -rendering (default no offsets)

      -

      If any of edgecolors, facecolors, linewidths, antialiaseds -are None, they default to their matplotlib.rcParams patch -setting, in sequence form.

      -
      -
      -
      -draw(artist, renderer, *args, **kwargs)
      -
      - -
      - -
      -
      -class matplotlib.collections.EventCollection(positions, orientation=None, lineoffset=0, linelength=1, linewidth=None, color=None, linestyle='solid', antialiased=None, **kwargs)
      -

      Bases: matplotlib.collections.LineCollection

      -

      A collection of discrete events.

      -

      An event is a 1-dimensional value, usually the position of something along -an axis, such as time or length. Events do not have an amplitude. They -are displayed as v

      -
      -
      positions
      -
      a sequence of numerical values or a 1D numpy array. Can be None
      -
      orientation [ ‘horizontal’ | ‘vertical’ | None ]
      -
      defaults to ‘horizontal’ if not specified or None
      -
      lineoffset
      -
      a single numerical value, corresponding to the offset of the center -of the markers from the origin
      -
      linelength
      -
      a single numerical value, corresponding to the total height of the -marker (i.e. the marker stretches from lineoffset+linelength/2 to -lineoffset-linelength/2). Defaults to 1
      -
      linewidth
      -
      a single numerical value
      -
      color
      -
      must be a sequence of RGBA tuples (eg arbitrary color -strings, etc, not allowed).
      -
      -

      linestyle [ ‘solid’ | ‘dashed’ | ‘dashdot’ | ‘dotted’ ]

      -
      -
      antialiased
      -
      1 or 2
      -
      -

      If linewidth, color, or antialiased is None, they -default to their rcParams setting, in sequence form.

      -
      -
      norm
      -
      None (optional for matplotlib.cm.ScalarMappable)
      -
      cmap
      -
      None (optional for matplotlib.cm.ScalarMappable)
      -
      -

      pickradius is the tolerance for mouse clicks picking a line. -The default is 5 pt.

      -

      The use of ScalarMappable is optional. -If the ScalarMappable array -_A is not None (ie a call to -set_array() has been made), at -draw time a call to scalar mappable will be made to set the colors.

      -

      Example:

      -

      (Source code, png, hires.png, pdf)

      -
      -../_images/eventcollection_demo.png -
      -
      -
      -add_positions(position)
      -

      add one or more events at the specified positions

      -
      - -
      -
      -append_positions(position)
      -

      add one or more events at the specified positions

      -
      - -
      -
      -extend_positions(position)
      -

      add one or more events at the specified positions

      -
      - -
      -
      -get_color()
      -

      get the color of the lines used to mark each event

      -
      - -
      -
      -get_linelength()
      -

      get the length of the lines used to mark each event

      -
      - -
      -
      -get_lineoffset()
      -

      get the offset of the lines used to mark each event

      -
      - -
      -
      -get_linestyle()
      -

      get the style of the lines used to mark each event -[ ‘solid’ | ‘dashed’ | ‘dashdot’ | ‘dotted’ ]

      -
      - -
      -
      -get_linewidth()
      -

      get the width of the lines used to mark each event

      -
      - -
      -
      -get_orientation()
      -

      get the orientation of the event line, may be: -[ ‘horizontal’ | ‘vertical’ ]

      -
      - -
      -
      -get_positions()
      -

      return an array containing the floating-point values of the positions

      -
      - -
      -
      -is_horizontal()
      -

      True if the eventcollection is horizontal, False if vertical

      -
      - -
      -
      -set_linelength(linelength)
      -

      set the length of the lines used to mark each event

      -
      - -
      -
      -set_lineoffset(lineoffset)
      -

      set the offset of the lines used to mark each event

      -
      - -
      -
      -set_orientation(orientation=None)
      -

      set the orientation of the event line -[ ‘horizontal’ | ‘vertical’ | None ] -defaults to ‘horizontal’ if not specified or None

      -
      - -
      -
      -set_positions(positions)
      -

      set the positions of the events to the specified value

      -
      - -
      -
      -switch_orientation()
      -

      switch the orientation of the event line, either from vertical to -horizontal or vice versus

      -
      - -
      - -
      -
      -class matplotlib.collections.LineCollection(segments, linewidths=None, colors=None, antialiaseds=None, linestyles='solid', offsets=None, transOffset=None, norm=None, cmap=None, pickradius=5, zorder=2, **kwargs)
      -

      Bases: matplotlib.collections.Collection

      -

      All parameters must be sequences or scalars; if scalars, they will -be converted to sequences. The property of the ith line -segment is:

      -
      prop[i % len(props)]
      -
      -
      -

      i.e., the properties cycle if the len of props is less than the -number of segments.

      -
      -
      segments
      -

      a sequence of (line0, line1, line2), where:

      -
      linen = (x0, y0), (x1, y1), ... (xm, ym)
      -
      -
      -

      or the equivalent numpy array with two columns. Each line -can be a different length.

      -
      -
      colors
      -
      must be a sequence of RGBA tuples (eg arbitrary color -strings, etc, not allowed).
      -
      antialiaseds
      -
      must be a sequence of ones or zeros
      -
      linestyles [ ‘solid’ | ‘dashed’ | ‘dashdot’ | ‘dotted’ ]
      -

      a string or dash tuple. The dash tuple is:

      -
      (offset, onoffseq),
      -
      -
      -

      where onoffseq is an even length tuple of on and off ink -in points.

      -
      -
      -

      If linewidths, colors, or antialiaseds is None, they -default to their rcParams setting, in sequence form.

      -

      If offsets and transOffset are not None, then -offsets are transformed by transOffset and applied after -the segments have been transformed to display coordinates.

      -

      If offsets is not None but transOffset is None, then the -offsets are added to the segments before any transformation. -In this case, a single offset can be specified as:

      -
      offsets=(xo,yo)
      -
      -
      -

      and this value will be added cumulatively to each successive -segment, so as to produce a set of successively offset curves.

      -
      -
      norm
      -
      None (optional for matplotlib.cm.ScalarMappable)
      -
      cmap
      -
      None (optional for matplotlib.cm.ScalarMappable)
      -
      -

      pickradius is the tolerance for mouse clicks picking a line. -The default is 5 pt.

      -
      -
      zorder
      -
      The zorder of the LineCollection. Default is 2
      -
      -

      The use of ScalarMappable is optional. -If the ScalarMappable array -_A is not None (ie a call to -set_array() has been made), at -draw time a call to scalar mappable will be made to set the colors.

      -
      -
      -color(c)
      -

      Set the color(s) of the line collection. c can be a -matplotlib color arg (all patches have same color), or a -sequence or rgba tuples; if it is a sequence the patches will -cycle through the sequence

      -

      ACCEPTS: matplotlib color arg or sequence of rgba tuples

      -
      - -
      -
      -get_color()
      -
      - -
      -
      -get_colors()
      -
      - -
      -
      -get_segments()
      -
      - -
      -
      -set_color(c)
      -

      Set the color(s) of the line collection. c can be a -matplotlib color arg (all patches have same color), or a -sequence or rgba tuples; if it is a sequence the patches will -cycle through the sequence.

      -

      ACCEPTS: matplotlib color arg or sequence of rgba tuples

      -
      - -
      -
      -set_paths(segments)
      -
      - -
      -
      -set_segments(segments)
      -
      - -
      -
      -set_verts(segments)
      -
      - -
      - -
      -
      -class matplotlib.collections.PatchCollection(patches, match_original=False, **kwargs)
      -

      Bases: matplotlib.collections.Collection

      -

      A generic collection of patches.

      -

      This makes it easier to assign a color map to a heterogeneous -collection of patches.

      -

      This also may improve plotting speed, since PatchCollection will -draw faster than a large number of patches.

      -
      -
      patches
      -
      a sequence of Patch objects. This list may include -a heterogeneous assortment of different patch types.
      -
      match_original
      -
      If True, use the colors and linewidths of the original -patches. If False, new colors may be assigned by -providing the standard collection arguments, facecolor, -edgecolor, linewidths, norm or cmap.
      -
      -

      If any of edgecolors, facecolors, linewidths, -antialiaseds are None, they default to their -matplotlib.rcParams patch setting, in sequence form.

      -

      The use of ScalarMappable is optional. -If the ScalarMappable matrix _A is not -None (ie a call to set_array has been made), at draw time a -call to scalar mappable will be made to set the face colors.

      -
      -
      -set_paths(patches)
      -
      - -
      - -
      -
      -class matplotlib.collections.PathCollection(paths, sizes=None, **kwargs)
      -

      Bases: matplotlib.collections.Collection

      -

      This is the most basic Collection subclass.

      -

      paths is a sequence of matplotlib.path.Path -instances.

      -
      -

      Valid Collection keyword arguments:

      -
      -
      -
      -

      offsets and transOffset are used to translate the patch after -rendering (default no offsets)

      -

      If any of edgecolors, facecolors, linewidths, antialiaseds -are None, they default to their matplotlib.rcParams patch -setting, in sequence form.

      -
      -
      -
      -draw(artist, renderer, *args, **kwargs)
      -
      - -
      -
      -get_paths()
      -
      - -
      -
      -get_sizes()
      -
      - -
      -
      -set_paths(paths)
      -
      - -
      - -
      -
      -class matplotlib.collections.PolyCollection(verts, sizes=None, closed=True, **kwargs)
      -

      Bases: matplotlib.collections.Collection

      -

      verts is a sequence of ( verts0, verts1, ...) where -verts_i is a sequence of xy tuples of vertices, or an -equivalent numpy array of shape (nv, 2).

      -

      sizes is None (default) or a sequence of floats that -scale the corresponding verts_i. The scaling is applied -before the Artist master transform; if the latter is an identity -transform, then the overall scaling is such that if -verts_i specify a unit square, then sizes_i is the area -of that square in points^2. -If len(sizes) < nv, the additional values will be -taken cyclically from the array.

      -

      closed, when True, will explicitly close the polygon.

      -
      -

      Valid Collection keyword arguments:

      -
      -
      -
      -

      offsets and transOffset are used to translate the patch after -rendering (default no offsets)

      -

      If any of edgecolors, facecolors, linewidths, antialiaseds -are None, they default to their matplotlib.rcParams patch -setting, in sequence form.

      -
      -
      -
      -draw(artist, renderer, *args, **kwargs)
      -
      - -
      -
      -set_paths(verts, closed=True)
      -

      This allows one to delay initialization of the vertices.

      -
      - -
      -
      -set_verts(verts, closed=True)
      -

      This allows one to delay initialization of the vertices.

      -
      - -
      - -
      -
      -class matplotlib.collections.QuadMesh(meshWidth, meshHeight, coordinates, antialiased=True, shading='flat', **kwargs)
      -

      Bases: matplotlib.collections.Collection

      -

      Class for the efficient drawing of a quadrilateral mesh.

      -

      A quadrilateral mesh consists of a grid of vertices. The -dimensions of this array are (meshWidth + 1, meshHeight + -1). Each vertex in the mesh has a different set of “mesh -coordinates” representing its position in the topology of the -mesh. For any values (m, n) such that 0 <= m <= meshWidth -and 0 <= n <= meshHeight, the vertices at mesh coordinates -(m, n), (m, n + 1), (m + 1, n + 1), and (m + 1, n) -form one of the quadrilaterals in the mesh. There are thus -(meshWidth * meshHeight) quadrilaterals in the mesh. The mesh -need not be regular and the polygons need not be convex.

      -

      A quadrilateral mesh is represented by a (2 x ((meshWidth + 1) * -(meshHeight + 1))) numpy array coordinates, where each row is -the x and y coordinates of one of the vertices. To define the -function that maps from a data point to its corresponding color, -use the set_cmap() method. Each of these arrays is indexed in -row-major order by the mesh coordinates of the vertex (or the mesh -coordinates of the lower left vertex, in the case of the -colors).

      -

      For example, the first entry in coordinates is the -coordinates of the vertex at mesh coordinates (0, 0), then the one -at (0, 1), then at (0, 2) .. (0, meshWidth), (1, 0), (1, 1), and -so on.

      -

      shading may be ‘flat’, or ‘gouraud’

      -
      -
      -static convert_mesh_to_paths(meshWidth, meshHeight, coordinates)
      -

      Converts a given mesh into a sequence of -matplotlib.path.Path objects for easier rendering by -backends that do not directly support quadmeshes.

      -

      This function is primarily of use to backend implementers.

      -
      - -
      -
      -convert_mesh_to_triangles(meshWidth, meshHeight, coordinates)
      -

      Converts a given mesh into a sequence of triangles, each point -with its own color. This is useful for experiments using -draw_qouraud_triangle.

      -
      - -
      -
      -draw(artist, renderer, *args, **kwargs)
      -
      - -
      -
      -get_datalim(transData)
      -
      - -
      -
      -get_paths()
      -
      - -
      -
      -set_paths()
      -
      - -
      - -
      -
      -class matplotlib.collections.RegularPolyCollection(numsides, rotation=0, sizes=(1, ), **kwargs)
      -

      Bases: matplotlib.collections.Collection

      -

      Draw a collection of regular polygons with numsides.

      -
      -
      numsides
      -
      the number of sides of the polygon
      -
      rotation
      -
      the rotation of the polygon in radians
      -
      sizes
      -

      gives the area of the circle circumscribing the -regular polygon in points^2

      -

      Valid Collection keyword arguments:

      -
      -
      -
      -

      offsets and transOffset are used to translate the patch after -rendering (default no offsets)

      -

      If any of edgecolors, facecolors, linewidths, antialiaseds -are None, they default to their matplotlib.rcParams patch -setting, in sequence form.

      -
      -
      -

      Example: see examples/dynamic_collection.py for -complete example:

      -
      offsets = np.random.rand(20,2)
      -facecolors = [cm.jet(x) for x in np.random.rand(20)]
      -black = (0,0,0,1)
      -
      -collection = RegularPolyCollection(
      -    numsides=5, # a pentagon
      -    rotation=0, sizes=(50,),
      -    facecolors = facecolors,
      -    edgecolors = (black,),
      -    linewidths = (1,),
      -    offsets = offsets,
      -    transOffset = ax.transData,
      -    )
      -
      -
      -
      -
      -draw(artist, renderer, *args, **kwargs)
      -
      - -
      -
      -get_numsides()
      -
      - -
      -
      -get_rotation()
      -
      - -
      -
      -get_sizes()
      -
      - -
      - -
      -
      -class matplotlib.collections.StarPolygonCollection(numsides, rotation=0, sizes=(1, ), **kwargs)
      -

      Bases: matplotlib.collections.RegularPolyCollection

      -

      Draw a collection of regular stars with numsides points.

      -
      -
      numsides
      -
      the number of sides of the polygon
      -
      rotation
      -
      the rotation of the polygon in radians
      -
      sizes
      -

      gives the area of the circle circumscribing the -regular polygon in points^2

      -

      Valid Collection keyword arguments:

      -
      -
      -
      -

      offsets and transOffset are used to translate the patch after -rendering (default no offsets)

      -

      If any of edgecolors, facecolors, linewidths, antialiaseds -are None, they default to their matplotlib.rcParams patch -setting, in sequence form.

      -
      -
      -

      Example: see examples/dynamic_collection.py for -complete example:

      -
      offsets = np.random.rand(20,2)
      -facecolors = [cm.jet(x) for x in np.random.rand(20)]
      -black = (0,0,0,1)
      -
      -collection = RegularPolyCollection(
      -    numsides=5, # a pentagon
      -    rotation=0, sizes=(50,),
      -    facecolors = facecolors,
      -    edgecolors = (black,),
      -    linewidths = (1,),
      -    offsets = offsets,
      -    transOffset = ax.transData,
      -    )
      -
      -
      -
      - -
      -
      -class matplotlib.collections.TriMesh(triangulation, **kwargs)
      -

      Bases: matplotlib.collections.Collection

      -

      Class for the efficient drawing of a triangular mesh using -Gouraud shading.

      -

      A triangular mesh is a Triangulation -object.

      -
      -
      -static convert_mesh_to_paths(tri)
      -

      Converts a given mesh into a sequence of -matplotlib.path.Path objects for easier rendering by -backends that do not directly support meshes.

      -

      This function is primarily of use to backend implementers.

      -
      - -
      -
      -draw(artist, renderer, *args, **kwargs)
      -
      - -
      -
      -get_paths()
      -
      - -
      -
      -set_paths()
      -
      - -
      - -
      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/api/colorbar_api.html b/dev/api/colorbar_api.html deleted file mode 100644 index d25a1e4bb43..00000000000 --- a/dev/api/colorbar_api.html +++ /dev/null @@ -1,487 +0,0 @@ - - - - - - - - colorbar — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      Table Of Contents

      - - -

      Previous topic

      -

      collections

      -

      Next topic

      -

      colors

      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      colorbar

      -
      -

      matplotlib.colorbar

      -

      Colorbar toolkit with two classes and a function:

      -
      -
      -
      ColorbarBase
      -
      the base class with full colorbar drawing functionality. -It can be used as-is to make a colorbar for a given colormap; -a mappable object (e.g., image) is not needed.
      -
      Colorbar
      -
      the derived class for use with images or contour plots.
      -
      make_axes()
      -
      a function for resizing an axes and adding a second axes -suitable for a colorbar
      -
      -
      -

      The colorbar() method uses make_axes() -and Colorbar; the colorbar() function -is a thin wrapper over colorbar().

      -
      -
      -class matplotlib.colorbar.Colorbar(ax, mappable, **kw)
      -

      Bases: matplotlib.colorbar.ColorbarBase

      -

      This class connects a ColorbarBase to a -ScalarMappable such as a -AxesImage generated via -imshow().

      -

      It is not intended to be instantiated directly; instead, -use colorbar() or -colorbar() to make your colorbar.

      -
      -
      -add_lines(CS, erase=True)
      -

      Add the lines from a non-filled -ContourSet to the colorbar.

      -

      Set erase to False if these lines should be added to -any pre-existing lines.

      -
      - -
      -
      -on_mappable_changed(mappable)
      -

      Updates this colorbar to match the mappable’s properties.

      -

      Typically this is automatically registered as an event handler -by colorbar_factory() and should not be called manually.

      -
      - -
      -
      -update_bruteforce(mappable)
      -

      Destroy and rebuild the colorbar. This is -intended to become obsolete, and will probably be -deprecated and then removed. It is not called when -the pyplot.colorbar function or the Figure.colorbar -method are used to create the colorbar.

      -
      - -
      -
      -update_normal(mappable)
      -

      update solid, lines, etc. Unlike update_bruteforce, it does -not clear the axes. This is meant to be called when the image -or contour plot to which this colorbar belongs is changed.

      -
      - -
      - -
      -
      -class matplotlib.colorbar.ColorbarBase(ax, cmap=None, norm=None, alpha=None, values=None, boundaries=None, orientation='vertical', extend='neither', spacing='uniform', ticks=None, format=None, drawedges=False, filled=True, extendfrac=None, extendrect=False)
      -

      Bases: matplotlib.cm.ScalarMappable

      -

      Draw a colorbar in an existing axes.

      -

      This is a base class for the Colorbar class, which is the -basis for the colorbar() function and the -colorbar() method, which are the -usual ways of creating a colorbar.

      -

      It is also useful by itself for showing a colormap. If the cmap -kwarg is given but boundaries and values are left as None, -then the colormap will be displayed on a 0-1 scale. To show the -under- and over-value colors, specify the norm as:

      -
      colors.Normalize(clip=False)
      -
      -
      -

      To show the colors versus index instead of on the 0-1 scale, -use:

      -
      norm=colors.NoNorm.
      -
      -

      Useful attributes:

      -
      -
      -
      ax
      -
      the Axes instance in which the colorbar is drawn
      -
      lines
      -
      a list of LineCollection if lines were drawn, otherwise -an empty list
      -
      dividers
      -
      a LineCollection if drawedges is True, otherwise None
      -
      -
      -

      Useful public methods are set_label() and add_lines().

      -
      -
      -add_lines(levels, colors, linewidths, erase=True)
      -

      Draw lines on the colorbar.

      -

      colors and linewidths must be scalars or -sequences the same length as levels.

      -

      Set erase to False to add lines without first -removing any previously added lines.

      -
      - -
      -
      -config_axis()
      -
      - -
      -
      -draw_all()
      -

      Calculate any free parameters based on the current cmap and norm, -and do all the drawing.

      -
      - -
      -
      -set_alpha(alpha)
      -
      - -
      -
      -set_label(label, **kw)
      -

      Label the long axis of the colorbar

      -
      - -
      -
      -set_ticklabels(ticklabels, update_ticks=True)
      -

      set tick labels. Tick labels are updated immediately unless -update_ticks is False. To manually update the ticks, call -update_ticks method explicitly.

      -
      - -
      -
      -set_ticks(ticks, update_ticks=True)
      -

      set tick locations. Tick locations are updated immediately unless -update_ticks is False. To manually update the ticks, call -update_ticks method explicitly.

      -
      - -
      -
      -update_ticks()
      -

      Force the update of the ticks and ticklabels. This must be -called whenever the tick locator and/or tick formatter changes.

      -
      - -
      - -
      -
      -class matplotlib.colorbar.ColorbarPatch(ax, mappable, **kw)
      -

      Bases: matplotlib.colorbar.Colorbar

      -

      A Colorbar which is created using Patch -rather than the default pcolor().

      -

      It uses a list of Patch instances instead of a -PatchCollection because the -latter does not allow the hatch pattern to vary among the -members of the collection.

      -
      - -
      -
      -matplotlib.colorbar.colorbar_factory(cax, mappable, **kwargs)
      -

      Creates a colorbar on the given axes for the given mappable.

      -

      Typically, for automatic colorbar placement given only a mappable use -colorbar().

      -
      - -
      -
      -matplotlib.colorbar.make_axes(parent, **kw)
      -

      Resize and reposition a parent axes, and return a child -axes suitable for a colorbar:

      -
      cax, kw = make_axes(parent, **kw)
      -
      -
      -

      Keyword arguments may include the following (with defaults):

      -
      -
      -
      orientation
      -
      ‘vertical’ or ‘horizontal’
      -
      -
      - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      PropertyDescription
      orientationvertical or horizontal
      fraction0.15; fraction of original axes to use for colorbar
      pad0.05 if vertical, 0.15 if horizontal; fraction -of original axes between colorbar and new image axes
      shrink1.0; fraction by which to shrink the colorbar
      aspect20; ratio of long to short dimensions
      anchor(0.0, 0.5) if vertical; (0.5, 1.0) if horizontal; -the anchor point of the colorbar axes
      panchor(1.0, 0.5) if vertical; (0.5, 0.0) if horizontal; -the anchor point of the colorbar parent axes
      -

      All but the first of these are stripped from the input kw set.

      -

      Returns (cax, kw), the child axes and the reduced kw dictionary.

      -
      - -
      -
      -matplotlib.colorbar.make_axes_gridspec(parent, **kw)
      -

      Resize and reposition a parent axes, and return a child axes -suitable for a colorbar. This function is similar to -make_axes. Prmary differences are

      -
      -
        -
      • make_axes_gridspec should only be used with a subplot parent.

        -
      • -
      • -
        make_axes creates an instance of Axes. make_axes_gridspec
        -

        creates an instance of Subplot.

        -
        -
        -
      • -
      • -
        make_axes updates the position of the
        -

        parent. make_axes_gridspec replaces the grid_spec attribute -of the parent with a new one.

        -
        -
        -
      • -
      -
      -

      While this function is meant to be compatible with make_axes, -there could be some minor differences.:

      -
      cax, kw = make_axes_gridspec(parent, **kw)
      -
      -
      -

      Keyword arguments may include the following (with defaults):

      -
      -
      -
      orientation
      -
      ‘vertical’ or ‘horizontal’
      -
      -
      - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      PropertyDescription
      orientationvertical or horizontal
      fraction0.15; fraction of original axes to use for colorbar
      pad0.05 if vertical, 0.15 if horizontal; fraction -of original axes between colorbar and new image axes
      shrink1.0; fraction by which to shrink the colorbar
      aspect20; ratio of long to short dimensions
      anchor(0.0, 0.5) if vertical; (0.5, 1.0) if horizontal; -the anchor point of the colorbar axes
      panchor(1.0, 0.5) if vertical; (0.5, 0.0) if horizontal; -the anchor point of the colorbar parent axes
      -

      All but the first of these are stripped from the input kw set.

      -

      Returns (cax, kw), the child axes and the reduced kw dictionary.

      -
      - -
      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/api/colors_api.html b/dev/api/colors_api.html deleted file mode 100644 index 6e18149e912..00000000000 --- a/dev/api/colors_api.html +++ /dev/null @@ -1,738 +0,0 @@ - - - - - - - - colors — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      Table Of Contents

      - - -

      Previous topic

      -

      colorbar

      -

      Next topic

      -

      dates

      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      colors

      -

      For a visual representation of the matplotlib colormaps, see the -“Color” section in the gallery.

      -
      -

      matplotlib.colors

      -

      A module for converting numbers or color arguments to RGB or RGBA

      -

      RGB and RGBA are sequences of, respectively, 3 or 4 floats in the -range 0-1.

      -

      This module includes functions and classes for color specification -conversions, and for mapping numbers to colors in a 1-D array of colors called -a colormap. Colormapping typically involves two steps: a data array is first -mapped onto the range 0-1 using an instance of Normalize or of a -subclass; then this number in the 0-1 range is mapped to a color using an -instance of a subclass of Colormap. Two are provided here: -LinearSegmentedColormap, which is used to generate all the built-in -colormap instances, but is also useful for making custom colormaps, and -ListedColormap, which is used for generating a custom colormap from a -list of color specifications.

      -

      The module also provides a single instance, colorConverter, of the -ColorConverter class providing methods for converting single color -specifications or sequences of them to RGB or RGBA.

      -

      Commands which take color arguments can use several formats to specify -the colors. For the basic built-in colors, you can use a single letter

      -
      -
        -
      • b: blue
      • -
      • g: green
      • -
      • r: red
      • -
      • c: cyan
      • -
      • m: magenta
      • -
      • y: yellow
      • -
      • k: black
      • -
      • w: white
      • -
      -
      -

      Gray shades can be given as a string encoding a float in the 0-1 range, e.g.:

      -
      color = '0.75'
      -
      -
      -

      For a greater range of colors, you have two options. You can specify the -color using an html hex string, as in:

      -
      color = '#eeefff'
      -
      -
      -

      or you can pass an R , G , B tuple, where each of R , G , B are in -the range [0,1].

      -

      Finally, legal html names for colors, like ‘red’, ‘burlywood’ and ‘chartreuse’ -are supported.

      -
      -
      -class matplotlib.colors.BoundaryNorm(boundaries, ncolors, clip=False)
      -

      Bases: matplotlib.colors.Normalize

      -

      Generate a colormap index based on discrete intervals.

      -

      Unlike Normalize or LogNorm, -BoundaryNorm maps values to integers instead of to the -interval 0-1.

      -

      Mapping to the 0-1 interval could have been done via -piece-wise linear interpolation, but using integers seems -simpler, and reduces the number of conversions back and forth -between integer and floating point.

      -
      -
      boundaries
      -
      a monotonically increasing sequence
      -
      ncolors
      -
      number of colors in the colormap to be used
      -
      -

      If:

      -
      b[i] <= v < b[i+1]
      -
      -
      -

      then v is mapped to color j; -as i varies from 0 to len(boundaries)-2, -j goes from 0 to ncolors-1.

      -

      Out-of-range values are mapped to -1 if low and ncolors -if high; these are converted to valid indices by -Colormap.__call__() .

      -
      -
      -inverse(value)
      -
      - -
      - -
      -
      -class matplotlib.colors.ColorConverter
      -

      Bases: object

      -

      Provides methods for converting color specifications to RGB or RGBA

      -

      Caching is used for more efficient conversion upon repeated calls -with the same argument.

      -

      Ordinarily only the single instance instantiated in this module, -colorConverter, is needed.

      -
      -
      -cache = {'0.8': (0.8, 0.8, 0.8), '0.5': (0.5, 0.5, 0.5), 'yellow': (1.0, 1.0, 0.0), '0.6': (0.6, 0.6, 0.6), 'magenta': (1.0, 0.0, 1.0), 'blue': (0.0, 0.0, 1.0), 'purple': (0.5019607843137255, 0.0, 0.5019607843137255), 'black': (0.0, 0.0, 0.0), 'red': (1.0, 0.0, 0.0), '#afeeee': (0.6862745098039216, 0.9333333333333333, 0.9333333333333333), '0.75': (0.75, 0.75, 0.75), 'cyan': (0.0, 1.0, 1.0), 'c': (0.0, 0.75, 0.75), 'b': (0.0, 0.0, 1.0), 'g': (0.0, 0.5, 0.0), 'k': (0.0, 0.0, 0.0), 'm': (0.75, 0, 0.75), 'r': (1.0, 0.0, 0.0), 'green': (0.0, 0.5019607843137255, 0.0), 'w': (1.0, 1.0, 1.0), 'y': (0.75, 0.75, 0), '0.90': (0.9, 0.9, 0.9)}
      -
      - -
      -
      -colors = {'c': (0.0, 0.75, 0.75), 'b': (0.0, 0.0, 1.0), 'w': (1.0, 1.0, 1.0), 'g': (0.0, 0.5, 0.0), 'y': (0.75, 0.75, 0), 'k': (0.0, 0.0, 0.0), 'r': (1.0, 0.0, 0.0), 'm': (0.75, 0, 0.75)}
      -
      - -
      -
      -to_rgb(arg)
      -

      Returns an RGB tuple of three floats from 0-1.

      -

      arg can be an RGB or RGBA sequence or a string in any of -several forms:

      -
      -
        -
      1. a letter from the set ‘rgbcmykw’
      2. -
      3. a hex color string, like ‘#00FFFF’
      4. -
      5. a standard name, like ‘aqua’
      6. -
      7. a float, like ‘0.4’, indicating gray on a 0-1 scale
      8. -
      -
      -

      if arg is RGBA, the A will simply be discarded.

      -
      - -
      -
      -to_rgba(arg, alpha=None)
      -

      Returns an RGBA tuple of four floats from 0-1.

      -

      For acceptable values of arg, see to_rgb(). -In addition, if arg is “none” (case-insensitive), -then (0,0,0,0) will be returned. -If arg is an RGBA sequence and alpha is not None, -alpha will replace the original A.

      -
      - -
      -
      -to_rgba_array(c, alpha=None)
      -

      Returns a numpy array of RGBA tuples.

      -

      Accepts a single mpl color spec or a sequence of specs.

      -

      Special case to handle “no color”: if c is “none” (case-insensitive), -then an empty array will be returned. Same for an empty list.

      -
      - -
      - -
      -
      -class matplotlib.colors.Colormap(name, N=256)
      -

      Bases: object

      -

      Baseclass for all scalar to RGBA mappings.

      -

      Typically Colormap instances are used to convert data values (floats) from -the interval [0, 1] to the RGBA color that the respective Colormap -represents. For scaling of data into the [0, 1] interval see -matplotlib.colors.Normalize. It is worth noting that -matplotlib.cm.ScalarMappable subclasses make heavy use of this -data->normalize->map-to-color processing chain.

      - --- - - - -
      Parameters :

      name : str

      -
      -

      The name of the colormap.

      -
      -

      N : int

      -
      -

      The number of rgb quantization levels.

      -
      -
      -
      -
      -is_gray()
      -
      - -
      -
      -set_bad(color='k', alpha=None)
      -

      Set color to be used for masked values.

      -
      - -
      -
      -set_over(color='k', alpha=None)
      -

      Set color to be used for high out-of-range values. -Requires norm.clip = False

      -
      - -
      -
      -set_under(color='k', alpha=None)
      -

      Set color to be used for low out-of-range values. -Requires norm.clip = False

      -
      - -
      - -
      -
      -class matplotlib.colors.LightSource(azdeg=315, altdeg=45, hsv_min_val=0, hsv_max_val=1, hsv_min_sat=1, hsv_max_sat=0)
      -

      Bases: object

      -

      Create a light source coming from the specified azimuth and elevation. -Angles are in degrees, with the azimuth measured -clockwise from north and elevation up from the zero plane of the surface. -The shade() is used to produce rgb values for a shaded relief image -given a data array.

      -

      Specify the azimuth (measured clockwise from south) and altitude -(measured up from the plane of the surface) of the light source -in degrees.

      -

      The color of the resulting image will be darkened -by moving the (s,v) values (in hsv colorspace) toward -(hsv_min_sat, hsv_min_val) in the shaded regions, or -lightened by sliding (s,v) toward -(hsv_max_sat hsv_max_val) in regions that are illuminated. -The default extremes are chose so that completely shaded points -are nearly black (s = 1, v = 0) and completely illuminated points -are nearly white (s = 0, v = 1).

      -
      -
      -shade(data, cmap)
      -

      Take the input data array, convert to HSV values in the -given colormap, then adjust those color values -to given the impression of a shaded relief map with a -specified light source. -RGBA values are returned, which can then be used to -plot the shaded image with imshow.

      -
      - -
      -
      -shade_rgb(rgb, elevation, fraction=1.0)
      -

      Take the input RGB array (ny*nx*3) adjust their color values -to given the impression of a shaded relief map with a -specified light source using the elevation (ny*nx). -A new RGB array ((ny*nx*3)) is returned.

      -
      - -
      - -
      -
      -class matplotlib.colors.LinearSegmentedColormap(name, segmentdata, N=256, gamma=1.0)
      -

      Bases: matplotlib.colors.Colormap

      -

      Colormap objects based on lookup tables using linear segments.

      -

      The lookup table is generated using linear interpolation for each -primary color, with the 0-1 domain divided into any number of -segments.

      -

      Create color map from linear mapping segments

      -

      segmentdata argument is a dictionary with a red, green and blue -entries. Each entry should be a list of x, y0, y1 tuples, -forming rows in a table. Entries for alpha are optional.

      -

      Example: suppose you want red to increase from 0 to 1 over -the bottom half, green to do the same over the middle half, -and blue over the top half. Then you would use:

      -
      cdict = {'red':   [(0.0,  0.0, 0.0),
      -                   (0.5,  1.0, 1.0),
      -                   (1.0,  1.0, 1.0)],
      -
      -         'green': [(0.0,  0.0, 0.0),
      -                   (0.25, 0.0, 0.0),
      -                   (0.75, 1.0, 1.0),
      -                   (1.0,  1.0, 1.0)],
      -
      -         'blue':  [(0.0,  0.0, 0.0),
      -                   (0.5,  0.0, 0.0),
      -                   (1.0,  1.0, 1.0)]}
      -
      -
      -

      Each row in the table for a given color is a sequence of -x, y0, y1 tuples. In each sequence, x must increase -monotonically from 0 to 1. For any input value z falling -between x[i] and x[i+1], the output value of a given color -will be linearly interpolated between y1[i] and y0[i+1]:

      -
      row i:   x  y0  y1
      -               /
      -              /
      -row i+1: x  y0  y1
      -
      -

      Hence y0 in the first row and y1 in the last row are never used.

      -
      -

      See also

      -

      LinearSegmentedColormap.from_list() -Static method; factory function for generating a -smoothly-varying LinearSegmentedColormap.

      -

      makeMappingArray() -For information about making a mapping array.

      -
      -
      -
      -static from_list(name, colors, N=256, gamma=1.0)
      -

      Make a linear segmented colormap with name from a sequence -of colors which evenly transitions from colors[0] at val=0 -to colors[-1] at val=1. N is the number of rgb quantization -levels. -Alternatively, a list of (value, color) tuples can be given -to divide the range unevenly.

      -
      - -
      -
      -set_gamma(gamma)
      -

      Set a new gamma value and regenerate color map.

      -
      - -
      - -
      -
      -class matplotlib.colors.ListedColormap(colors, name='from_list', N=None)
      -

      Bases: matplotlib.colors.Colormap

      -

      Colormap object generated from a list of colors.

      -

      This may be most useful when indexing directly into a colormap, -but it can also be used to generate special colormaps for ordinary -mapping.

      -

      Make a colormap from a list of colors.

      -
      -
      colors
      -
      a list of matplotlib color specifications, -or an equivalent Nx3 or Nx4 floating point array -(N rgb or rgba values)
      -
      name
      -
      a string to identify the colormap
      -
      N
      -

      the number of entries in the map. The default is None, -in which case there is one colormap entry for each -element in the list of colors. If:

      -
      N < len(colors)
      -
      -
      -

      the list will be truncated at N. If:

      -
      N > len(colors)
      -
      -
      -

      the list will be extended by repetition.

      -
      -
      -
      - -
      -
      -class matplotlib.colors.LogNorm(vmin=None, vmax=None, clip=False)
      -

      Bases: matplotlib.colors.Normalize

      -

      Normalize a given value to the 0-1 range on a log scale

      -

      If vmin or vmax is not given, they are taken from the input’s -minimum and maximum value respectively. If clip is True and -the given value falls outside the range, the returned value -will be 0 or 1, whichever is closer. Returns 0 if:

      -
      vmin==vmax
      -
      -
      -

      Works with scalars or arrays, including masked arrays. If -clip is True, masked values are set to 1; otherwise they -remain masked. Clipping silently defeats the purpose of setting -the over, under, and masked colors in the colormap, so it is -likely to lead to surprises; therefore the default is -clip = False.

      -
      -
      -autoscale(A)
      -

      Set vmin, vmax to min, max of A.

      -
      - -
      -
      -autoscale_None(A)
      -

      autoscale only None-valued vmin or vmax

      -
      - -
      -
      -inverse(value)
      -
      - -
      - -
      -
      -class matplotlib.colors.NoNorm(vmin=None, vmax=None, clip=False)
      -

      Bases: matplotlib.colors.Normalize

      -

      Dummy replacement for Normalize, for the case where we -want to use indices directly in a -ScalarMappable .

      -

      If vmin or vmax is not given, they are taken from the input’s -minimum and maximum value respectively. If clip is True and -the given value falls outside the range, the returned value -will be 0 or 1, whichever is closer. Returns 0 if:

      -
      vmin==vmax
      -
      -
      -

      Works with scalars or arrays, including masked arrays. If -clip is True, masked values are set to 1; otherwise they -remain masked. Clipping silently defeats the purpose of setting -the over, under, and masked colors in the colormap, so it is -likely to lead to surprises; therefore the default is -clip = False.

      -
      -
      -inverse(value)
      -
      - -
      - -
      -
      -class matplotlib.colors.Normalize(vmin=None, vmax=None, clip=False)
      -

      Bases: object

      -

      A class which, when called, can normalize data into -the [0, 1] interval.

      -

      If vmin or vmax is not given, they are taken from the input’s -minimum and maximum value respectively. If clip is True and -the given value falls outside the range, the returned value -will be 0 or 1, whichever is closer. Returns 0 if:

      -
      vmin==vmax
      -
      -
      -

      Works with scalars or arrays, including masked arrays. If -clip is True, masked values are set to 1; otherwise they -remain masked. Clipping silently defeats the purpose of setting -the over, under, and masked colors in the colormap, so it is -likely to lead to surprises; therefore the default is -clip = False.

      -
      -
      -autoscale(A)
      -

      Set vmin, vmax to min, max of A.

      -
      - -
      -
      -autoscale_None(A)
      -

      autoscale only None-valued vmin or vmax

      -
      - -
      -
      -inverse(value)
      -
      - -
      -
      -static process_value(value)
      -

      Homogenize the input value for easy and efficient normalization.

      -

      value can be a scalar or sequence.

      -

      Returns result, is_scalar, where result is a -masked array matching value. Float dtypes are preserved; -integer types with two bytes or smaller are converted to -np.float32, and larger types are converted to np.float. -Preserving float32 when possible, and using in-place operations, -can greatly improve speed for large arrays.

      -

      Experimental; we may want to add an option to force the -use of float32.

      -
      - -
      -
      -scaled()
      -

      return true if vmin and vmax set

      -
      - -
      - -
      -
      -class matplotlib.colors.SymLogNorm(linthresh, linscale=1.0, vmin=None, vmax=None, clip=False)
      -

      Bases: matplotlib.colors.Normalize

      -

      The symmetrical logarithmic scale is logarithmic in both the -positive and negative directions from the origin.

      -

      Since the values close to zero tend toward infinity, there is a -need to have a range around zero that is linear. The parameter -linthresh allows the user to specify the size of this range -(-linthresh, linthresh).

      -

      linthresh: -The range within which the plot is linear (to -avoid having the plot go to infinity around zero).

      -

      linscale: -This allows the linear range (-linthresh to linthresh) -to be stretched relative to the logarithmic range. Its -value is the number of decades to use for each half of the -linear range. For example, when linscale == 1.0 (the -default), the space used for the positive and negative -halves of the linear range will be equal to one decade in -the logarithmic range. Defaults to 1.

      -
      -
      -autoscale(A)
      -

      Set vmin, vmax to min, max of A.

      -
      - -
      -
      -autoscale_None(A)
      -

      autoscale only None-valued vmin or vmax

      -
      - -
      -
      -inverse(value)
      -
      - -
      - -
      -
      -matplotlib.colors.hex2color(s)
      -

      Take a hex string s and return the corresponding rgb 3-tuple -Example: #efefef -> (0.93725, 0.93725, 0.93725)

      -
      - -
      -
      -matplotlib.colors.hsv_to_rgb(hsv)
      -

      convert hsv values in a numpy array to rgb values -both input and output arrays have shape (M,N,3)

      -
      - -
      -
      -matplotlib.colors.is_color_like(c)
      -

      Return True if c can be converted to RGB

      -
      - -
      -
      -matplotlib.colors.makeMappingArray(N, data, gamma=1.0)
      -

      Create an N -element 1-d lookup table

      -

      data represented by a list of x,y0,y1 mapping correspondences. -Each element in this list represents how a value between 0 and 1 -(inclusive) represented by x is mapped to a corresponding value -between 0 and 1 (inclusive). The two values of y are to allow -for discontinuous mapping functions (say as might be found in a -sawtooth) where y0 represents the value of y for values of x -<= to that given, and y1 is the value to be used for x > than -that given). The list must start with x=0, end with x=1, and -all values of x must be in increasing order. Values between -the given mapping points are determined by simple linear interpolation.

      -

      Alternatively, data can be a function mapping values between 0 - 1 -to 0 - 1.

      -

      The function returns an array “result” where result[x*(N-1)] -gives the closest value for values of x between 0 and 1.

      -
      - -
      -
      -matplotlib.colors.no_norm
      -

      alias of NoNorm

      -
      - -
      -
      -matplotlib.colors.normalize
      -

      alias of Normalize

      -
      - -
      -
      -matplotlib.colors.rgb2hex(rgb)
      -

      Given an rgb or rgba sequence of 0-1 floats, return the hex string

      -
      - -
      -
      -matplotlib.colors.rgb_to_hsv(arr)
      -

      convert rgb values in a numpy array to hsv values -input and output arrays should have shape (M,N,3)

      -
      - -
      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/api/dates_api.html b/dev/api/dates_api.html deleted file mode 100644 index 67916e9089b..00000000000 --- a/dev/api/dates_api.html +++ /dev/null @@ -1,718 +0,0 @@ - - - - - - - - dates — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      Table Of Contents

      - - -

      Previous topic

      -

      colors

      -

      Next topic

      -

      figure

      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      dates

      -

      -Inheritance diagram of matplotlib.dates - - - - - - - - - - - - - - - - - - - - - -

      -
      -

      matplotlib.dates

      -

      Matplotlib provides sophisticated date plotting capabilities, standing on the -shoulders of python datetime, the add-on modules pytz and -dateutils. datetime objects are converted to floating point -numbers which represent time in days since 0001-01-01 UTC, plus 1. For -example, 0001-01-01, 06:00 is 1.25, not 0.25. The helper functions -date2num(), num2date() and drange() are used to facilitate -easy conversion to and from datetime and numeric ranges.

      -
      -

      Note

      -

      Like Python’s datetime, mpl uses the Gregorian calendar for all conversions -between dates and floating point numbers. This practice is not universal, -and calendar differences can cause confusing differences between what -Python and mpl give as the number of days since 0001-01-01 and what other -software and databases yield. For example, the US Naval Observatory -uses a calendar that switches from Julian to Gregorian in October, 1582. -Hence, using their calculator, the number of days between 0001-01-01 and -2006-04-01 is 732403, whereas using the Gregorian calendar via the datetime -module we find:

      -
      In [31]:date(2006,4,1).toordinal() - date(1,1,1).toordinal()
      -Out[31]:732401
      -
      -
      -

      A wide range of specific and general purpose date tick locators and -formatters are provided in this module. See -matplotlib.ticker for general information on tick locators -and formatters. These are described below.

      -

      All the matplotlib date converters, tickers and formatters are -timezone aware, and the default timezone is given by the timezone -parameter in your matplotlibrc file. If you leave out a -tz timezone instance, the default from your rc file will be -assumed. If you want to use a custom time zone, pass a -pytz.timezone instance with the tz keyword argument to -num2date(), plot_date(), and any custom date tickers or -locators you create. See pytz for -information on pytz and timezone handling.

      -

      The dateutil module provides -additional code to handle date ticking, making it easy to place ticks -on any kinds of dates. See examples below.

      -
      -

      Date tickers

      -

      Most of the date tickers can locate single or multiple values. For -example:

      -
      # tick on mondays every week
      -loc = WeekdayLocator(byweekday=MO, tz=tz)
      -
      -# tick on mondays and saturdays
      -loc = WeekdayLocator(byweekday=(MO, SA))
      -
      -
      -

      In addition, most of the constructors take an interval argument:

      -
      # tick on mondays every second week
      -loc = WeekdayLocator(byweekday=MO, interval=2)
      -
      -
      -

      The rrule locator allows completely general date ticking:

      -
      # tick every 5th easter
      -rule = rrulewrapper(YEARLY, byeaster=1, interval=5)
      -loc = RRuleLocator(rule)
      -
      -
      -

      Here are all the date tickers:

      -
      -
        -
      • MinuteLocator: locate minutes
      • -
      • HourLocator: locate hours
      • -
      • DayLocator: locate specifed days of the month
      • -
      • WeekdayLocator: Locate days of the week, eg MO, TU
      • -
      • MonthLocator: locate months, eg 7 for july
      • -
      • YearLocator: locate years that are multiples of base
      • -
      • RRuleLocator: locate using a -matplotlib.dates.rrulewrapper. The -rrulewrapper is a simple wrapper around a -dateutil.rrule (dateutil) which allow almost -arbitrary date tick specifications. See rrule example.
      • -
      • AutoDateLocator: On autoscale, this class picks the best -MultipleDateLocator to set the view limits and the tick -locations.
      • -
      -
      -
      -
      -

      Date formatters

      -

      Here all all the date formatters:

      -
      -
      -
      -
      -
      -matplotlib.dates.date2num(d)
      -

      d is either a datetime instance or a sequence of datetimes.

      -

      Return value is a floating point number (or sequence of floats) -which gives the number of days (fraction part represents hours, -minutes, seconds) since 0001-01-01 00:00:00 UTC, plus one. -The addition of one here is a historical artifact. Also, note -that the Gregorian calendar is assumed; this is not universal -practice. For details, see the module docstring.

      -
      - -
      -
      -matplotlib.dates.num2date(x, tz=None)
      -

      x is a float value which gives the number of days -(fraction part represents hours, minutes, seconds) since -0001-01-01 00:00:00 UTC plus one. -The addition of one here is a historical artifact. Also, note -that the Gregorian calendar is assumed; this is not universal -practice. For details, see the module docstring.

      -

      Return value is a datetime instance in timezone tz (default to -rcparams TZ value).

      -

      If x is a sequence, a sequence of datetime objects will -be returned.

      -
      - -
      -
      -matplotlib.dates.drange(dstart, dend, delta)
      -

      Return a date range as float Gregorian ordinals. dstart and -dend are datetime instances. delta is a -datetime.timedelta instance.

      -
      - -
      -
      -matplotlib.dates.epoch2num(e)
      -

      Convert an epoch or sequence of epochs to the new date format, -that is days since 0001.

      -
      - -
      -
      -matplotlib.dates.num2epoch(d)
      -

      Convert days since 0001 to epoch. d can be a number or sequence.

      -
      - -
      -
      -matplotlib.dates.mx2num(mxdates)
      -

      Convert mx datetime instance (or sequence of mx -instances) to the new date format.

      -
      - -
      -
      -class matplotlib.dates.DateFormatter(fmt, tz=None)
      -

      Bases: matplotlib.ticker.Formatter

      -

      Tick location is seconds since the epoch. Use a strftime() -format string.

      -

      Python only supports datetime strftime() formatting -for years greater than 1900. Thanks to Andrew Dalke, Dalke -Scientific Software who contributed the strftime() code -below to include dates earlier than this year.

      -
      -
      fmt is an strftime() format string; tz is the
      -
      tzinfo instance.
      -
      -
      -
      -illegal_s = <_sre.SRE_Pattern object at 0x38431a0>
      -
      - -
      -
      -set_tzinfo(tz)
      -
      - -
      -
      -strftime(dt, fmt)
      -
      - -
      - -
      -
      -class matplotlib.dates.IndexDateFormatter(t, fmt, tz=None)
      -

      Bases: matplotlib.ticker.Formatter

      -

      Use with IndexLocator to cycle format -strings by index.

      -

      t is a sequence of dates (floating point days). fmt is a -strftime() format string.

      -
      - -
      -
      -class matplotlib.dates.AutoDateFormatter(locator, tz=None, defaultfmt='%Y-%m-%d')
      -

      Bases: matplotlib.ticker.Formatter

      -

      This class attempts to figure out the best format to use. This is -most useful when used with the AutoDateLocator.

      -

      The AutoDateFormatter has a scale dictionary that maps the scale -of the tick (the distance in days between one major tick) and a -format string. The default looks like this:

      -
      self.scaled = {
      -   365.0  : '%Y',
      -   30.    : '%b %Y',
      -   1.0    : '%b %d %Y',
      -   1./24. : '%H:%M:%D',
      -   }
      -
      -
      -

      The algorithm picks the key in the dictionary that is >= the -current scale and uses that format string. You can customize this -dictionary by doing:

      -
      formatter = AutoDateFormatter()
      -formatter.scaled[1/(24.*60.)] = '%M:%S' # only show min and sec
      -
      -
      -

      Autofmt the date labels. The default format is the one to use -if none of the times in scaled match

      -
      - -
      -
      -class matplotlib.dates.DateLocator(tz=None)
      -

      Bases: matplotlib.ticker.Locator

      -

      tz is a tzinfo instance.

      -
      -
      -datalim_to_dt()
      -
      - -
      -
      -hms0d = {'byminute': 0, 'byhour': 0, 'bysecond': 0}
      -
      - -
      -
      -nonsingular(vmin, vmax)
      -
      - -
      -
      -set_tzinfo(tz)
      -
      - -
      -
      -viewlim_to_dt()
      -
      - -
      - -
      -
      -class matplotlib.dates.RRuleLocator(o, tz=None)
      -

      Bases: matplotlib.dates.DateLocator

      -
      -
      -autoscale()
      -

      Set the view limits to include the data range.

      -
      - -
      -
      -static get_unit_generic(freq)
      -
      - -
      - -
      -
      -class matplotlib.dates.AutoDateLocator(tz=None, minticks=5, maxticks=None, interval_multiples=False)
      -

      Bases: matplotlib.dates.DateLocator

      -

      On autoscale, this class picks the best -MultipleDateLocator to set the view limits and the tick -locations.

      -

      minticks is the minimum number of ticks desired, which is used to -select the type of ticking (yearly, monthly, etc.).

      -

      maxticks is the maximum number of ticks desired, which controls -any interval between ticks (ticking every other, every 3, etc.). -For really fine-grained control, this can be a dictionary mapping -individual rrule frequency constants (YEARLY, MONTHLY, etc.) -to their own maximum number of ticks. This can be used to keep -the number of ticks appropriate to the format chosen in -class:AutoDateFormatter. Any frequency not specified in this -dictionary is given a default value.

      -

      tz is a tzinfo instance.

      -

      interval_multiples is a boolean that indicates whether ticks -should be chosen to be multiple of the interval. This will lock -ticks to ‘nicer’ locations. For example, this will force the -ticks to be at hours 0,6,12,18 when hourly ticking is done at -6 hour intervals.

      -

      The AutoDateLocator has an interval dictionary that maps the -frequency of the tick (a constant from dateutil.rrule) and a -multiple allowed for that ticking. The default looks like this:

      -
      self.intervald = {
      -  YEARLY  : [1, 2, 4, 5, 10],
      -  MONTHLY : [1, 2, 3, 4, 6],
      -  DAILY   : [1, 2, 3, 7, 14],
      -  HOURLY  : [1, 2, 3, 4, 6, 12],
      -  MINUTELY: [1, 5, 10, 15, 30],
      -  SECONDLY: [1, 5, 10, 15, 30]
      -  }
      -
      -
      -

      The interval is used to specify multiples that are appropriate for -the frequency of ticking. For instance, every 7 days is sensible -for daily ticks, but for minutes/seconds, 15 or 30 make sense. -You can customize this dictionary by doing:

      -
      locator = AutoDateLocator()
      -locator.intervald[HOURLY] = [3] # only show every 3 hours
      -
      -
      -
      -
      -autoscale()
      -

      Try to choose the view limits intelligently.

      -
      - -
      -
      -get_locator(dmin, dmax)
      -

      Pick the best locator based on a distance.

      -
      - -
      -
      -refresh()
      -

      Refresh internal information based on current limits.

      -
      - -
      -
      -set_axis(axis)
      -
      - -
      - -
      -
      -class matplotlib.dates.YearLocator(base=1, month=1, day=1, tz=None)
      -

      Bases: matplotlib.dates.DateLocator

      -

      Make ticks on a given day of each year that is a multiple of base.

      -

      Examples:

      -
      # Tick every year on Jan 1st
      -locator = YearLocator()
      -
      -# Tick every 5 years on July 4th
      -locator = YearLocator(5, month=7, day=4)
      -
      -
      -

      Mark years that are multiple of base on a given month and day -(default jan 1).

      -
      -
      -autoscale()
      -

      Set the view limits to include the data range.

      -
      - -
      - -
      -
      -class matplotlib.dates.MonthLocator(bymonth=None, bymonthday=1, interval=1, tz=None)
      -

      Bases: matplotlib.dates.RRuleLocator

      -

      Make ticks on occurances of each month month, eg 1, 3, 12.

      -

      Mark every month in bymonth; bymonth can be an int or -sequence. Default is range(1,13), i.e. every month.

      -

      interval is the interval between each iteration. For -example, if interval=2, mark every second occurance.

      -
      - -
      -
      -class matplotlib.dates.WeekdayLocator(byweekday=1, interval=1, tz=None)
      -

      Bases: matplotlib.dates.RRuleLocator

      -

      Make ticks on occurances of each weekday.

      -

      Mark every weekday in byweekday; byweekday can be a number or -sequence.

      -

      Elements of byweekday must be one of MO, TU, WE, TH, FR, SA, -SU, the constants from dateutils.rrule.

      -

      interval specifies the number of weeks to skip. For example, -interval=2 plots every second week.

      -
      - -
      -
      -class matplotlib.dates.DayLocator(bymonthday=None, interval=1, tz=None)
      -

      Bases: matplotlib.dates.RRuleLocator

      -

      Make ticks on occurances of each day of the month. For example, -1, 15, 30.

      -

      Mark every day in bymonthday; bymonthday can be an int or -sequence.

      -

      Default is to tick every day of the month: bymonthday=range(1,32)

      -
      - -
      -
      -class matplotlib.dates.HourLocator(byhour=None, interval=1, tz=None)
      -

      Bases: matplotlib.dates.RRuleLocator

      -

      Make ticks on occurances of each hour.

      -

      Mark every hour in byhour; byhour can be an int or sequence. -Default is to tick every hour: byhour=range(24)

      -

      interval is the interval between each iteration. For -example, if interval=2, mark every second occurrence.

      -
      - -
      -
      -class matplotlib.dates.MinuteLocator(byminute=None, interval=1, tz=None)
      -

      Bases: matplotlib.dates.RRuleLocator

      -

      Make ticks on occurances of each minute.

      -

      Mark every minute in byminute; byminute can be an int or -sequence. Default is to tick every minute: byminute=range(60)

      -

      interval is the interval between each iteration. For -example, if interval=2, mark every second occurrence.

      -
      - -
      -
      -class matplotlib.dates.SecondLocator(bysecond=None, interval=1, tz=None)
      -

      Bases: matplotlib.dates.RRuleLocator

      -

      Make ticks on occurances of each second.

      -

      Mark every second in bysecond; bysecond can be an int or -sequence. Default is to tick every second: bysecond = range(60)

      -

      interval is the interval between each iteration. For -example, if interval=2, mark every second occurrence.

      -
      - -
      -
      -class matplotlib.dates.rrule(freq, dtstart=None, interval=1, wkst=None, count=None, until=None, bysetpos=None, bymonth=None, bymonthday=None, byyearday=None, byeaster=None, byweekno=None, byweekday=None, byhour=None, byminute=None, bysecond=None, cache=False)
      -

      Bases: dateutil.rrule.rrulebase

      -
      - -
      -
      -class matplotlib.dates.relativedelta(dt1=None, dt2=None, years=0, months=0, days=0, leapdays=0, weeks=0, hours=0, minutes=0, seconds=0, microseconds=0, year=None, month=None, day=None, weekday=None, yearday=None, nlyearday=None, hour=None, minute=None, second=None, microsecond=None)
      -

      Bases: object

      -

      The relativedelta type is based on the specification of the excelent -work done by M.-A. Lemburg in his mx.DateTime extension. However, -notice that this type does NOT implement the same algorithm as -his work. Do NOT expect it to behave like mx.DateTime’s counterpart.

      -

      There’s two different ways to build a relativedelta instance. The -first one is passing it two date/datetime classes:

      -
      -
      relativedelta(datetime1, datetime2)
      -

      And the other way is to use the following keyword arguments:

      -
      -
      -
      year, month, day, hour, minute, second, microsecond:
      -
      Absolute information.
      -
      years, months, weeks, days, hours, minutes, seconds, microseconds:
      -
      Relative information, may be negative.
      -
      weekday:
      -
      One of the weekday instances (MO, TU, etc). These instances may -receive a parameter N, specifying the Nth weekday, which could -be positive or negative (like MO(+1) or MO(-2). Not specifying -it is the same as specifying +1. You can also use an integer, -where 0=MO.
      -
      leapdays:
      -
      Will add given days to the date found, if year is a leap -year, and the date found is post 28 of february.
      -
      yearday, nlyearday:
      -
      Set the yearday or the non-leap year day (jump leap days). -These are converted to day/month/leapdays information.
      -
      -
      -

      Here is the behavior of operations with relativedelta:

      -
        -
      1. Calculate the absolute year, using the ‘year’ argument, or the -original datetime year, if the argument is not present.
      2. -
      3. Add the relative ‘years’ argument to the absolute year.
      4. -
      5. Do steps 1 and 2 for month/months.
      6. -
      7. Calculate the absolute day, using the ‘day’ argument, or the -original datetime day, if the argument is not present. Then, -subtract from the day until it fits in the year and month -found after their operations.
      8. -
      9. Add the relative ‘days’ argument to the absolute day. Notice -that the ‘weeks’ argument is multiplied by 7 and added to -‘days’.
      10. -
      11. Do steps 1 and 2 for hour/hours, minute/minutes, second/seconds, -microsecond/microseconds.
      12. -
      13. If the ‘weekday’ argument is present, calculate the weekday, -with the given (wday, nth) tuple. wday is the index of the -weekday (0-6, 0=Mon), and nth is the number of weeks to add -forward or backward, depending on its signal. Notice that if -the calculated date is already Monday, for example, using -(0, 1) or (0, -1) won’t change the day.
      14. -
      -
      - -
      -
      -matplotlib.dates.seconds(s)
      -

      Return seconds as days.

      -
      - -
      -
      -matplotlib.dates.minutes(m)
      -

      Return minutes as days.

      -
      - -
      -
      -matplotlib.dates.hours(h)
      -

      Return hours as days.

      -
      - -
      -
      -matplotlib.dates.weeks(w)
      -

      Return weeks as days.

      -
      - -
      -
      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/api/dviread.html b/dev/api/dviread.html deleted file mode 100644 index 860d2fc5233..00000000000 --- a/dev/api/dviread.html +++ /dev/null @@ -1,404 +0,0 @@ - - - - - - - - matplotlib.dviread — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      Previous topic

      -

      matplotlib.backends.backend_pdf

      -

      Next topic

      -

      matplotlib.type1font

      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      matplotlib.dviread

      -

      An experimental module for reading dvi files output by TeX. Several -limitations make this not (currently) useful as a general-purpose dvi -preprocessor, but it is currently used by the pdf backend for -processing usetex text.

      -

      Interface:

      -
      dvi = Dvi(filename, 72)
      -# iterate over pages (but only one page is supported for now):
      -for page in dvi:
      -    w, h, d = page.width, page.height, page.descent
      -    for x,y,font,glyph,width in page.text:
      -        fontname = font.texname
      -        pointsize = font.size
      -        ...
      -    for x,y,height,width in page.boxes:
      -        ...
      -
      -
      -
      -
      -class matplotlib.dviread.Dvi(filename, dpi)
      -

      Bases: object

      -

      A dvi (“device-independent”) file, as produced by TeX. -The current implementation only reads the first page and does not -even attempt to verify the postamble.

      -

      Initialize the object. This takes the filename as input and -opens the file; actually reading the file happens when -iterating through the pages of the file.

      -
      -
      -close()
      -

      Close the underlying file if it is open.

      -
      - -
      - -
      -
      -class matplotlib.dviread.DviFont(scale, tfm, texname, vf)
      -

      Bases: object

      -

      Object that holds a font’s texname and size, supports comparison, -and knows the widths of glyphs in the same units as the AFM file. -There are also internal attributes (for use by dviread.py) that -are not used for comparison.

      -

      The size is in Adobe points (converted from TeX points).

      -
      -
      -texname
      -

      Name of the font as used internally by TeX and friends. This -is usually very different from any external font names, and -dviread.PsfontsMap can be used to find the external -name of the font.

      -
      - -
      -
      -size
      -

      Size of the font in Adobe points, converted from the slightly -smaller TeX points.

      -
      - -
      -
      -widths
      -

      Widths of glyphs in glyph-space units, typically 1/1000ths of -the point size.

      -
      - -
      -
      -size
      -
      - -
      -
      -texname
      -
      - -
      -
      -widths
      -
      - -
      - -
      -
      -class matplotlib.dviread.Encoding(filename)
      -

      Bases: object

      -

      Parses a *.enc file referenced from a psfonts.map style file. -The format this class understands is a very limited subset of -PostScript.

      -

      Usage (subject to change):

      -
      for name in Encoding(filename):
      -    whatever(name)
      -
      -
      -
      -
      -encoding
      -
      - -
      - -
      -
      -class matplotlib.dviread.PsfontsMap(filename)
      -

      Bases: object

      -

      A psfonts.map formatted file, mapping TeX fonts to PS fonts. -Usage:

      -
      >>> map = PsfontsMap(find_tex_file('pdftex.map'))
      ->>> entry = map['ptmbo8r']
      ->>> entry.texname
      -'ptmbo8r'
      ->>> entry.psname
      -'Times-Bold'
      ->>> entry.encoding
      -'/usr/local/texlive/2008/texmf-dist/fonts/enc/dvips/base/8r.enc'
      ->>> entry.effects
      -{'slant': 0.16700000000000001}
      ->>> entry.filename
      -
      -
      -

      For historical reasons, TeX knows many Type-1 fonts by different -names than the outside world. (For one thing, the names have to -fit in eight characters.) Also, TeX’s native fonts are not Type-1 -but Metafont, which is nontrivial to convert to PostScript except -as a bitmap. While high-quality conversions to Type-1 format exist -and are shipped with modern TeX distributions, we need to know -which Type-1 fonts are the counterparts of which native fonts. For -these reasons a mapping is needed from internal font names to font -file names.

      -

      A texmf tree typically includes mapping files called e.g. -psfonts.map, pdftex.map, dvipdfm.map. psfonts.map is used by -dvips, pdftex.map by pdfTeX, and dvipdfm.map by dvipdfm. -psfonts.map might avoid embedding the 35 PostScript fonts (i.e., -have no filename for them, as in the Times-Bold example above), -while the pdf-related files perhaps only avoid the “Base 14” pdf -fonts. But the user may have configured these files differently.

      -
      - -
      -
      -class matplotlib.dviread.Tfm(filename)
      -

      Bases: object

      -

      A TeX Font Metric file. This implementation covers only the bare -minimum needed by the Dvi class.

      -
      -
      -checksum
      -

      Used for verifying against the dvi file.

      -
      - -
      -
      -design_size
      -

      Design size of the font (in what units?)

      -
      - -
      -
      -width
      -

      Width of each character, needs to be scaled by the factor -specified in the dvi file. This is a dict because indexing may -not start from 0.

      -
      - -
      -
      -height
      -

      Height of each character.

      -
      - -
      -
      -depth
      -

      Depth of each character.

      -
      - -
      -
      -checksum
      -
      - -
      -
      -depth
      -
      - -
      -
      -design_size
      -
      - -
      -
      -height
      -
      - -
      -
      -width
      -
      - -
      - -
      -
      -class matplotlib.dviread.Vf(filename)
      -

      Bases: matplotlib.dviread.Dvi

      -

      A virtual font (*.vf file) containing subroutines for dvi files.

      -

      Usage:

      -
      vf = Vf(filename)
      -glyph = vf[code]
      -glyph.text, glyph.boxes, glyph.width
      -
      -
      -
      - -
      -
      -matplotlib.dviread.find_tex_file(filename, format=None)
      -

      Call kpsewhich to find a file in the texmf tree. If -format is not None, it is used as the value for the ---format option.

      -

      Apparently most existing TeX distributions on Unix-like systems -use kpathsea. I hear MikTeX (a popular distribution on Windows) -doesn’t use kpathsea, so what do we do? (TODO)

      -
      -

      See also

      -
      -
      Kpathsea documentation
      -
      The library that kpsewhich is part of.
      -
      -
      -
      - -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/api/figure_api.html b/dev/api/figure_api.html deleted file mode 100644 index 69f7bcb2ac2..00000000000 --- a/dev/api/figure_api.html +++ /dev/null @@ -1,1913 +0,0 @@ - - - - - - - - figure — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      Table Of Contents

      - - -

      Previous topic

      -

      dates

      -

      Next topic

      -

      font_manager

      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      figure

      -
      -

      matplotlib.figure

      -

      The figure module provides the top-level -Artist, the Figure, which -contains all the plot elements. The following classes are defined

      -
      -
      SubplotParams
      -
      control the default spacing of the subplots
      -
      Figure
      -
      top level container for all plot elements
      -
      -
      -
      -class matplotlib.figure.AxesStack
      -

      Bases: matplotlib.cbook.Stack

      -

      Specialization of the Stack to handle all tracking of Axes in a Figure. -This stack stores key, (ind, axes) pairs, where:

      -
      -
        -
      • key should be a hash of the args and kwargs -used in generating the Axes.
      • -
      • ind is a serial number for tracking the order -in which axes were added.
      • -
      -
      -

      The AxesStack is a callable, where ax_stack() returns -the current axes. Alternatively the current_key_axes() will -return the current key and associated axes.

      -
      -
      -add(key, a)
      -

      Add Axes a, with key key, to the stack, and return the stack.

      -

      If a is already on the stack, don’t add it again, but -return None.

      -
      - -
      -
      -as_list()
      -

      Return a list of the Axes instances that have been added to the figure

      -
      - -
      -
      -bubble(a)
      -

      Move the given axes, which must already exist in the -stack, to the top.

      -
      - -
      -
      -current_key_axes()
      -

      Return a tuple of (key, axes) for the active axes.

      -

      If no axes exists on the stack, then returns (None, None).

      -
      - -
      -
      -get(key)
      -

      Return the Axes instance that was added with key. -If it is not present, return None.

      -
      - -
      -
      -remove(a)
      -

      Remove the axes from the stack.

      -
      - -
      - -
      -
      -class matplotlib.figure.Figure(figsize=None, dpi=None, facecolor=None, edgecolor=None, linewidth=0.0, frameon=None, subplotpars=None, tight_layout=None)
      -

      Bases: matplotlib.artist.Artist

      -

      The Figure instance supports callbacks through a callbacks -attribute which is a matplotlib.cbook.CallbackRegistry -instance. The events you can connect to are ‘dpi_changed’, and -the callback will be called with func(fig) where fig is the -Figure instance.

      -
      -
      patch
      -
      The figure patch is drawn by a -matplotlib.patches.Rectangle instance
      -
      suppressComposite
      -
      For multiple figure images, the figure will make composite -images depending on the renderer option_image_nocomposite -function. If suppressComposite is True|False, this will -override the renderer.
      -
      figsize
      -
      w,h tuple in inches
      -
      dpi
      -
      Dots per inch
      -
      facecolor
      -
      The figure patch facecolor; defaults to rc figure.facecolor
      -
      edgecolor
      -
      The figure patch edge color; defaults to rc figure.edgecolor
      -
      linewidth
      -
      The figure patch edge linewidth; the default linewidth of the frame
      -
      frameon
      -
      If False, suppress drawing the figure frame
      -
      subplotpars
      -
      A SubplotParams instance, defaults to rc
      -
      tight_layout
      -
      If False use subplotpars; if True adjust subplot -parameters using tight_layout(). Defaults to -rc figure.autolayout.
      -
      -
      -
      -add_axes(*args, **kwargs)
      -

      Add an axes at position rect [left, bottom, width, -height] where all quantities are in fractions of figure -width and height. kwargs are legal -Axes kwargs plus projection which -sets the projection type of the axes. (For backward -compatibility, polar=True may also be provided, which is -equivalent to projection='polar'). Valid values for -projection are: [‘aitoff’, ‘hammer’, ‘lambert’, ‘mollweide’, ‘polar’, ‘rectilinear’]. Some of these -projections support additional kwargs, which may be provided -to add_axes(). Typical usage:

      -
      rect = l,b,w,h
      -fig.add_axes(rect)
      -fig.add_axes(rect, frameon=False, axisbg='g')
      -fig.add_axes(rect, polar=True)
      -fig.add_axes(rect, projection='polar')
      -fig.add_axes(ax)
      -
      -
      -

      If the figure already has an axes with the same parameters, -then it will simply make that axes current and return it. If -you do not want this behavior, e.g., you want to force the -creation of a new Axes, you must use a unique set of args and -kwargs. The axes label -attribute has been exposed for this purpose. e.g., if you want -two axes that are otherwise identical to be added to the -figure, make sure you give them unique labels:

      -
      fig.add_axes(rect, label='axes1')
      -fig.add_axes(rect, label='axes2')
      -
      -
      -

      In rare circumstances, add_axes may be called with a single -argument, an Axes instance already created in the present -figure but not in the figure’s list of axes. For example, -if an axes has been removed with delaxes(), it can -be restored with:

      -
      fig.add_axes(ax)
      -
      -
      -

      In all cases, the Axes instance -will be returned.

      -

      In addition to projection, the following kwargs are supported:

      -
      -
      ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      PropertyDescription
      adjustable[ ‘box’ | ‘datalim’ | ‘box-forced’]
      agg_filterunknown
      alphafloat (0.0 transparent through 1.0 opaque)
      anchorunknown
      animated[True | False]
      aspectunknown
      autoscale_onunknown
      autoscalex_onunknown
      autoscaley_onunknown
      axesan Axes instance
      axes_locatorunknown
      axis_bgcolorany matplotlib color - see colors()
      axis_offunknown
      axis_onunknown
      axisbelow[ True | False ]
      clip_boxa matplotlib.transforms.Bbox instance
      clip_on[True | False]
      clip_path[ (Path, Transform) | Patch | None ]
      color_cycleunknown
      containsa callable function
      cursor_propsa (float, color) tuple
      figureunknown
      frame_on[ True | False ]
      gidan id string
      labelstring or anything printable with ‘%s’ conversion.
      lod[True | False]
      navigate[ True | False ]
      navigate_modeunknown
      picker[None|float|boolean|callable]
      positionunknown
      rasterization_zorderunknown
      rasterized[True | False | None]
      snapunknown
      titleunknown
      transformTransform instance
      urla url string
      visible[True | False]
      xboundunknown
      xlabelunknown
      xlimlength 2 sequence of floats
      xmarginunknown
      xscale[‘linear’ | ‘log’ | ‘symlog’]
      xticklabelssequence of strings
      xtickssequence of floats
      yboundunknown
      ylabelunknown
      ylimlength 2 sequence of floats
      ymarginunknown
      yscale[‘linear’ | ‘log’ | ‘symlog’]
      yticklabelssequence of strings
      ytickssequence of floats
      zorderany number
      -
      -
      - -
      -
      -add_axobserver(func)
      -

      whenever the axes state change, func(self) will be called

      -
      - -
      -
      -add_subplot(*args, **kwargs)
      -

      Add a subplot. Examples:

      -
      fig.add_subplot(111)
      -
      -# equivalent but more general
      -fig.add_subplot(1,1,1)
      -
      -# add subplot with red background
      -fig.add_subplot(212, axisbg='r')
      -
      -# add a polar subplot
      -fig.add_subplot(111, projection='polar')
      -
      -# add Subplot instance sub
      -fig.add_subplot(sub)
      -
      -
      -

      kwargs are legal Axes kwargs plus -projection, which chooses a projection type for the axes. -(For backward compatibility, polar=True may also be -provided, which is equivalent to projection=’polar’). Valid -values for projection are: [‘aitoff’, ‘hammer’, ‘lambert’, ‘mollweide’, ‘polar’, ‘rectilinear’]. Some of -these projections -support additional kwargs, which may be provided to -add_axes().

      -

      The Axes instance will be returned.

      -

      If the figure already has a subplot with key (args, -kwargs) then it will simply make that subplot current and -return it.

      -

      The following kwargs are supported:

      -
      -
      ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      PropertyDescription
      adjustable[ ‘box’ | ‘datalim’ | ‘box-forced’]
      agg_filterunknown
      alphafloat (0.0 transparent through 1.0 opaque)
      anchorunknown
      animated[True | False]
      aspectunknown
      autoscale_onunknown
      autoscalex_onunknown
      autoscaley_onunknown
      axesan Axes instance
      axes_locatorunknown
      axis_bgcolorany matplotlib color - see colors()
      axis_offunknown
      axis_onunknown
      axisbelow[ True | False ]
      clip_boxa matplotlib.transforms.Bbox instance
      clip_on[True | False]
      clip_path[ (Path, Transform) | Patch | None ]
      color_cycleunknown
      containsa callable function
      cursor_propsa (float, color) tuple
      figureunknown
      frame_on[ True | False ]
      gidan id string
      labelstring or anything printable with ‘%s’ conversion.
      lod[True | False]
      navigate[ True | False ]
      navigate_modeunknown
      picker[None|float|boolean|callable]
      positionunknown
      rasterization_zorderunknown
      rasterized[True | False | None]
      snapunknown
      titleunknown
      transformTransform instance
      urla url string
      visible[True | False]
      xboundunknown
      xlabelunknown
      xlimlength 2 sequence of floats
      xmarginunknown
      xscale[‘linear’ | ‘log’ | ‘symlog’]
      xticklabelssequence of strings
      xtickssequence of floats
      yboundunknown
      ylabelunknown
      ylimlength 2 sequence of floats
      ymarginunknown
      yscale[‘linear’ | ‘log’ | ‘symlog’]
      yticklabelssequence of strings
      ytickssequence of floats
      zorderany number
      -
      -
      - -
      -
      -autofmt_xdate(bottom=0.2, rotation=30, ha='right')
      -

      Date ticklabels often overlap, so it is useful to rotate them -and right align them. Also, a common use case is a number of -subplots with shared xaxes where the x-axis is date data. The -ticklabels are often long, and it helps to rotate them on the -bottom subplot and turn them off on other subplots, as well as -turn off xlabels.

      -
      -
      bottom
      -
      The bottom of the subplots for subplots_adjust()
      -
      rotation
      -
      The rotation of the xtick labels
      -
      ha
      -
      The horizontal alignment of the xticklabels
      -
      -
      - -
      -
      -axes
      -

      Read-only: list of axes in Figure

      -
      - -
      -
      -clear()
      -

      Clear the figure – synonym for clf().

      -
      - -
      -
      -clf(keep_observers=False)
      -

      Clear the figure.

      -

      Set keep_observers to True if, for example, -a gui widget is tracking the axes in the figure.

      -
      - -
      -
      -colorbar(mappable, cax=None, ax=None, **kw)
      -

      Create a colorbar for a ScalarMappable instance, mappable.

      -

      Documentation for the pylab thin wrapper:

      -

      Add a colorbar to a plot.

      -

      Function signatures for the pyplot interface; all -but the first are also method signatures for the -colorbar() method:

      -
      colorbar(**kwargs)
      -colorbar(mappable, **kwargs)
      -colorbar(mappable, cax=cax, **kwargs)
      -colorbar(mappable, ax=ax, **kwargs)
      -
      -
      -

      arguments:

      -
      -
      -
      mappable
      -
      the Image, -ContourSet, etc. to -which the colorbar applies; this argument is mandatory for the -colorbar() method but optional for the -colorbar() function, which sets the -default to the current image.
      -
      -
      -

      keyword arguments:

      -
      -
      -
      cax
      -
      None | axes object into which the colorbar will be drawn
      -
      ax
      -
      None | parent axes object from which space for a new -colorbar axes will be stolen
      -
      use_gridspec
      -
      False | If cax is None, a new cax is created as an instance of -Axes. If ax is an instance of Subplot and use_gridspec is True, -cax is created as an instance of Subplot using the -grid_spec module.
      -
      -
      -

      Additional keyword arguments are of two kinds:

      -
      -

      axes properties:

      -
      -
      ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      PropertyDescription
      orientationvertical or horizontal
      fraction0.15; fraction of original axes to use for colorbar
      pad0.05 if vertical, 0.15 if horizontal; fraction -of original axes between colorbar and new image axes
      shrink1.0; fraction by which to shrink the colorbar
      aspect20; ratio of long to short dimensions
      anchor(0.0, 0.5) if vertical; (0.5, 1.0) if horizontal; -the anchor point of the colorbar axes
      panchor(1.0, 0.5) if vertical; (0.5, 0.0) if horizontal; -the anchor point of the colorbar parent axes
      -
      -

      colorbar properties:

      -
      -
      ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      PropertyDescription
      extend[ ‘neither’ | ‘both’ | ‘min’ | ‘max’ ] -If not ‘neither’, make pointed end(s) for out-of- -range values. These are set for a given colormap -using the colormap set_under and set_over methods.
      extendfrac[ None | ‘auto’ | length | lengths ] -If set to None, both the minimum and maximum -triangular colorbar extensions with have a length of -5% of the interior colorbar length (this is the -default setting). If set to ‘auto’, makes the -triangular colorbar extensions the same lengths as -the interior boxes (when spacing is set to -‘uniform’) or the same lengths as the respective -adjacent interior boxes (when spacing is set to -‘proportional’). If a scalar, indicates the length -of both the minimum and maximum triangular colorbar -extensions as a fraction of the interior colorbar -length. A two-element sequence of fractions may also -be given, indicating the lengths of the minimum and -maximum colorbar extensions respectively as a -fraction of the interior colorbar length.
      extendrect[ False | True ] -If False the minimum and maximum colorbar extensions -will be triangular (the default). If True the -extensions will be rectangular.
      spacing[ ‘uniform’ | ‘proportional’ ] -Uniform spacing gives each discrete color the same -space; proportional makes the space proportional to -the data interval.
      ticks[ None | list of ticks | Locator object ] -If None, ticks are determined automatically from the -input.
      format[ None | format string | Formatter object ] -If None, the -ScalarFormatter is used. -If a format string is given, e.g., ‘%.3f’, that is -used. An alternative -Formatter object may be -given instead.
      drawedges[ False | True ] If true, draw lines at color -boundaries.
      -

      The following will probably be useful only in the context of -indexed colors (that is, when the mappable has norm=NoNorm()), -or other unusual circumstances.

      - ---- - - - - - - - - - - - - - -
      PropertyDescription
      boundariesNone or a sequence
      valuesNone or a sequence which must be of length 1 less -than the sequence of boundaries. For each region -delimited by adjacent entries in boundaries, the -color mapped to the corresponding value in values -will be used.
      -
      -
      -

      If mappable is a ContourSet, its extend -kwarg is included automatically.

      -

      Note that the shrink kwarg provides a simple way to keep a vertical -colorbar, for example, from being taller than the axes of the mappable -to which the colorbar is attached; but it is a manual method requiring -some trial and error. If the colorbar is too tall (or a horizontal -colorbar is too wide) use a smaller value of shrink.

      -

      For more precise control, you can manually specify the positions of -the axes objects in which the mappable and the colorbar are drawn. In -this case, do not use any of the axes properties kwargs.

      -

      It is known that some vector graphics viewer (svg and pdf) renders white gaps -between segments of the colorbar. This is due to bugs in the viewers not -matplotlib. As a workaround the colorbar can be rendered with overlapping -segments:

      -
      cbar = colorbar()
      -cbar.solids.set_edgecolor("face")
      -draw()
      -
      -
      -

      However this has negative consequences in other circumstances. Particularly -with semi transparent images (alpha < 1) and colorbar extensions and is not -enabled by default see (issue #1188).

      -
      -
      returns:
      -
      Colorbar instance; see also its base class, -ColorbarBase. Call the -set_label() method -to label the colorbar.
      -
      -
      - -
      -
      -contains(mouseevent)
      -

      Test whether the mouse event occurred on the figure.

      -

      Returns True,{}

      -
      - -
      -
      -delaxes(a)
      -

      remove a from the figure and update the current axes

      -
      - -
      -
      -dpi
      -
      - -
      -
      -draw(artist, renderer, *args, **kwargs)
      -

      Render the figure using matplotlib.backend_bases.RendererBase -instance renderer.

      -
      - -
      -
      -draw_artist(a)
      -

      draw matplotlib.artist.Artist instance a only – -this is available only after the figure is drawn

      -
      - -
      -
      -figimage(X, xo=0, yo=0, alpha=None, norm=None, cmap=None, vmin=None, vmax=None, origin=None, **kwargs)
      -

      Adds a non-resampled image to the figure.

      -

      call signatures:

      -
      figimage(X, **kwargs)
      -
      -
      -

      adds a non-resampled array X to the figure.

      -
      figimage(X, xo, yo)
      -
      -
      -

      with pixel offsets xo, yo,

      -

      X must be a float array:

      -
        -
      • If X is MxN, assume luminance (grayscale)
      • -
      • If X is MxNx3, assume RGB
      • -
      • If X is MxNx4, assume RGBA
      • -
      -

      Optional keyword arguments:

      -
      -
      ---- - - - - - - - - - - - - - - - - - - - - - - - - - -
      KeywordDescription
      xo or yoAn integer, the x and y image offset in pixels
      cmapa matplotlib.colors.Colormap instance, eg -cm.jet. If None, default to the rc image.cmap -value
      norma matplotlib.colors.Normalize instance. The -default is normalization(). This scales luminance -> 0-1
      vmin|vmaxare used to scale a luminance image to 0-1. If either -is None, the min and max of the luminance values will -be used. Note if you pass a norm instance, the settings -for vmin and vmax will be ignored.
      alphathe alpha blending value, default is None
      origin[ ‘upper’ | ‘lower’ ] Indicates where the [0,0] index of -the array is in the upper left or lower left corner of -the axes. Defaults to the rc image.origin value
      -
      -

      figimage complements the axes image -(imshow()) which will be resampled -to fit the current axes. If you want a resampled image to -fill the entire figure, you can define an -Axes with size [0,1,0,1].

      -

      An matplotlib.image.FigureImage instance is returned.

      -

      (Source code, png, hires.png, pdf)

      -
      -../_images/figimage_demo.png -
      -

      Additional kwargs are Artist kwargs passed on to -FigureImage

      -
      - -
      -
      -gca(**kwargs)
      -

      Return the current axes, creating one if necessary

      -

      The following kwargs are supported for ensuring the returned axes -adheres to the given projection etc., and for axes creation if -the active axes does not exist:

      -
      -
      ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      PropertyDescription
      adjustable[ ‘box’ | ‘datalim’ | ‘box-forced’]
      agg_filterunknown
      alphafloat (0.0 transparent through 1.0 opaque)
      anchorunknown
      animated[True | False]
      aspectunknown
      autoscale_onunknown
      autoscalex_onunknown
      autoscaley_onunknown
      axesan Axes instance
      axes_locatorunknown
      axis_bgcolorany matplotlib color - see colors()
      axis_offunknown
      axis_onunknown
      axisbelow[ True | False ]
      clip_boxa matplotlib.transforms.Bbox instance
      clip_on[True | False]
      clip_path[ (Path, Transform) | Patch | None ]
      color_cycleunknown
      containsa callable function
      cursor_propsa (float, color) tuple
      figureunknown
      frame_on[ True | False ]
      gidan id string
      labelstring or anything printable with ‘%s’ conversion.
      lod[True | False]
      navigate[ True | False ]
      navigate_modeunknown
      picker[None|float|boolean|callable]
      positionunknown
      rasterization_zorderunknown
      rasterized[True | False | None]
      snapunknown
      titleunknown
      transformTransform instance
      urla url string
      visible[True | False]
      xboundunknown
      xlabelunknown
      xlimlength 2 sequence of floats
      xmarginunknown
      xscale[‘linear’ | ‘log’ | ‘symlog’]
      xticklabelssequence of strings
      xtickssequence of floats
      yboundunknown
      ylabelunknown
      ylimlength 2 sequence of floats
      ymarginunknown
      yscale[‘linear’ | ‘log’ | ‘symlog’]
      yticklabelssequence of strings
      ytickssequence of floats
      zorderany number
      -
      -
      - -
      -
      -get_axes()
      -
      - -
      -
      -get_children()
      -

      get a list of artists contained in the figure

      -
      - -
      -
      -get_default_bbox_extra_artists()
      -
      - -
      -
      -get_dpi()
      -

      Return the dpi as a float

      -
      - -
      -
      -get_edgecolor()
      -

      Get the edge color of the Figure rectangle

      -
      - -
      -
      -get_facecolor()
      -

      Get the face color of the Figure rectangle

      -
      - -
      -
      -get_figheight()
      -

      Return the figheight as a float

      -
      - -
      -
      -get_figwidth()
      -

      Return the figwidth as a float

      -
      - -
      -
      -get_frameon()
      -

      get the boolean indicating frameon

      -
      - -
      -
      -get_size_inches()
      -
      - -
      -
      -get_tight_layout()
      -

      Return the Boolean flag, True to use :meth`tight_layout` when drawing.

      -
      - -
      -
      -get_tightbbox(renderer)
      -

      Return a (tight) bounding box of the figure in inches.

      -

      It only accounts axes title, axis labels, and axis -ticklabels. Needs improvement.

      -
      - -
      -
      -get_window_extent(*args, **kwargs)
      -

      get the figure bounding box in display space; kwargs are void

      -
      - -
      -
      -ginput(n=1, timeout=30, show_clicks=True, mouse_add=1, mouse_pop=3, mouse_stop=2)
      -

      Call signature:

      -
      ginput(self, n=1, timeout=30, show_clicks=True,
      -       mouse_add=1, mouse_pop=3, mouse_stop=2)
      -
      -
      -

      Blocking call to interact with the figure.

      -

      This will wait for n clicks from the user and return a list of the -coordinates of each click.

      -

      If timeout is zero or negative, does not timeout.

      -

      If n is zero or negative, accumulate clicks until a middle click -(or potentially both mouse buttons at once) terminates the input.

      -

      Right clicking cancels last input.

      -

      The buttons used for the various actions (adding points, removing -points, terminating the inputs) can be overriden via the -arguments mouse_add, mouse_pop and mouse_stop, that give -the associated mouse button: 1 for left, 2 for middle, 3 for -right.

      -

      The keyboard can also be used to select points in case your mouse -does not have one or more of the buttons. The delete and backspace -keys act like right clicking (i.e., remove last point), the enter key -terminates input and any other key (not already used by the window -manager) selects a point.

      -
      - -
      -
      -hold(b=None)
      -

      Set the hold state. If hold is None (default), toggle the -hold state. Else set the hold state to boolean value b.

      -

      e.g.:

      -
      hold()      # toggle hold
      -hold(True)  # hold is on
      -hold(False) # hold is off
      -
      -
      -
      - -
      -
      -legend(handles, labels, *args, **kwargs)
      -

      Place a legend in the figure. Labels are a sequence of -strings, handles is a sequence of -Line2D or -Patch instances, and loc can be a -string or an integer specifying the legend location

      -

      USAGE:

      -
      legend( (line1, line2, line3),
      -        ('label1', 'label2', 'label3'),
      -        'upper right')
      -
      -
      -

      The loc location codes are:

      -
      'best' : 0,          (currently not supported for figure legends)
      -'upper right'  : 1,
      -'upper left'   : 2,
      -'lower left'   : 3,
      -'lower right'  : 4,
      -'right'        : 5,
      -'center left'  : 6,
      -'center right' : 7,
      -'lower center' : 8,
      -'upper center' : 9,
      -'center'       : 10,
      -
      -

      loc can also be an (x,y) tuple in figure coords, which -specifies the lower left of the legend box. figure coords are -(0,0) is the left, bottom of the figure and 1,1 is the right, -top.

      -

      Keyword arguments:

      -
      -
      -
      prop: [ None | FontProperties | dict ]
      -
      A matplotlib.font_manager.FontProperties -instance. If prop is a dictionary, a new instance will be -created with prop. If None, use rc settings.
      -
      numpoints: integer
      -
      The number of points in the legend line, default is 4
      -
      scatterpoints: integer
      -
      The number of points in the legend line, default is 4
      -
      scatteroffsets: list of floats
      -
      a list of yoffsets for scatter symbols in legend
      -
      markerscale: [ None | scalar ]
      -
      The relative size of legend markers vs. original. If None, use rc -settings.
      -
      fancybox: [ None | False | True ]
      -
      if True, draw a frame with a round fancybox. If None, use rc
      -
      shadow: [ None | False | True ]
      -
      If True, draw a shadow behind legend. If None, use rc settings.
      -
      ncol : integer
      -
      number of columns. default is 1
      -
      mode : [ “expand” | None ]
      -
      if mode is “expand”, the legend will be horizontally expanded -to fill the axes area (or bbox_to_anchor)
      -
      title : string
      -
      the legend title
      -
      -
      -

      Padding and spacing between various elements use following keywords -parameters. The dimensions of these values are given as a fraction -of the fontsize. Values from rcParams will be used if None.

      - ---- - - - - - - - - - - - - - - - - - - - - - - - - - -
      KeywordDescription
      borderpadthe fractional whitespace inside the legend border
      labelspacingthe vertical space between the legend entries
      handlelengththe length of the legend handles
      handletextpadthe pad between the legend handle and text
      borderaxespadthe pad between the axes and legend border
      columnspacingthe spacing between columns
      -
      -

      Note

      -

      Not all kinds of artist are supported by the legend. -See LINK (FIXME) for details.

      -
      -

      Example:

      -

      (Source code, png, hires.png, pdf)

      -
      -../_images/figlegend_demo.png -
      -
      - -
      -
      -savefig(*args, **kwargs)
      -

      Save the current figure.

      -

      Call signature:

      -
      savefig(fname, dpi=None, facecolor='w', edgecolor='w',
      -        orientation='portrait', papertype=None, format=None,
      -        transparent=False, bbox_inches=None, pad_inches=0.1,
      -        frameon=None)
      -
      -
      -

      The output formats available depend on the backend being used.

      -

      Arguments:

      -
      -
      -
      fname:
      -

      A string containing a path to a filename, or a Python -file-like object, or possibly some backend-dependent object -such as PdfPages.

      -

      If format is None and fname is a string, the output -format is deduced from the extension of the filename. If -the filename has no extension, the value of the rc parameter -savefig.format is used.

      -

      If fname is not a string, remember to specify format to -ensure that the correct backend is used.

      -
      -
      -
      -

      Keyword arguments:

      -
      -
      -
      dpi: [ None | scalar > 0 ]
      -
      The resolution in dots per inch. If None it will default to -the value savefig.dpi in the matplotlibrc file.
      -
      facecolor, edgecolor:
      -
      the colors of the figure rectangle
      -
      orientation: [ ‘landscape’ | ‘portrait’ ]
      -
      not supported on all backends; currently only on postscript output
      -
      papertype:
      -
      One of ‘letter’, ‘legal’, ‘executive’, ‘ledger’, ‘a0’ through -‘a10’, ‘b0’ through ‘b10’. Only supported for postscript -output.
      -
      format:
      -
      One of the file extensions supported by the active -backend. Most backends support png, pdf, ps, eps and svg.
      -
      transparent:
      -
      If True, the axes patches will all be transparent; the -figure patch will also be transparent unless facecolor -and/or edgecolor are specified via kwargs. -This is useful, for example, for displaying -a plot on top of a colored background on a web page. The -transparency of these patches will be restored to their -original values upon exit of this function.
      -
      frameon:
      -
      If True, the figure patch will be colored, if False, the -figure background will be transparent. If not provided, the -rcParam ‘savefig.frameon’ will be used.
      -
      bbox_inches:
      -
      Bbox in inches. Only the given portion of the figure is -saved. If ‘tight’, try to figure out the tight bbox of -the figure.
      -
      pad_inches:
      -
      Amount of padding around the figure when bbox_inches is -‘tight’.
      -
      bbox_extra_artists:
      -
      A list of extra artists that will be considered when the -tight bbox is calculated.
      -
      -
      -
      - -
      -
      -sca(a)
      -

      Set the current axes to be a and return a

      -
      - -
      -
      -set_canvas(canvas)
      -

      Set the canvas the contains the figure

      -

      ACCEPTS: a FigureCanvas instance

      -
      - -
      -
      -set_dpi(val)
      -

      Set the dots-per-inch of the figure

      -

      ACCEPTS: float

      -
      - -
      -
      -set_edgecolor(color)
      -

      Set the edge color of the Figure rectangle

      -

      ACCEPTS: any matplotlib color - see help(colors)

      -
      - -
      -
      -set_facecolor(color)
      -

      Set the face color of the Figure rectangle

      -

      ACCEPTS: any matplotlib color - see help(colors)

      -
      - -
      -
      -set_figheight(val)
      -

      Set the height of the figure in inches

      -

      ACCEPTS: float

      -
      - -
      -
      -set_figwidth(val)
      -

      Set the width of the figure in inches

      -

      ACCEPTS: float

      -
      - -
      -
      -set_frameon(b)
      -

      Set whether the figure frame (background) is displayed or invisible

      -

      ACCEPTS: boolean

      -
      - -
      -
      -set_size_inches(w, h, forward=False)
      -

      Set the figure size in inches

      -

      Usage:

      -
      fig.set_size_inches(w,h)  # OR
      -fig.set_size_inches((w,h) )
      -
      -
      -

      optional kwarg forward=True will cause the canvas size to be -automatically updated; eg you can resize the figure window -from the shell

      -

      ACCEPTS: a w,h tuple with w,h in inches

      -
      - -
      -
      -set_tight_layout(tight)
      -

      Set whether tight_layout() is used upon drawing. -If None, the rcParams[‘figure.autolayout’] value will be set.

      -

      ACCEPTS: [True | False | None]

      -
      - -
      -
      -show(warn=True)
      -

      If using a GUI backend with pyplot, display the figure window.

      -

      If the figure was not created using -figure(), it will lack a -FigureManagerBase, and -will raise an AttributeError.

      -

      For non-GUI backends, this does nothing, in which case -a warning will be issued if warn is True (default).

      -
      - -
      -
      -subplots_adjust(*args, **kwargs)
      -

      Call signature:

      -
      subplots_adjust(left=None, bottom=None, right=None, top=None,
      -                    wspace=None, hspace=None)
      -
      -
      -

      Update the SubplotParams with kwargs (defaulting to rc when -None) and update the subplot locations

      -
      - -
      -
      -suptitle(t, **kwargs)
      -

      Add a centered title to the figure.

      -

      kwargs are matplotlib.text.Text properties. Using figure -coordinates, the defaults are:

      -
      -
      -
      x : 0.5
      -
      The x location of the text in figure coords
      -
      y : 0.98
      -
      The y location of the text in figure coords
      -
      horizontalalignment : ‘center’
      -
      The horizontal alignment of the text
      -
      verticalalignment : ‘top’
      -
      The vertical alignment of the text
      -
      -
      -

      A matplotlib.text.Text instance is returned.

      -

      Example:

      -
      fig.suptitle('this is the figure title', fontsize=12)
      -
      -
      -
      - -
      -
      -text(x, y, s, *args, **kwargs)
      -

      Add text to figure.

      -

      Call signature:

      -
      text(x, y, s, fontdict=None, **kwargs)
      -
      -
      -

      Add text to figure at location x, y (relative 0-1 -coords). See text() for the meaning -of the other arguments.

      -

      kwargs control the Text properties:

      -
      -
      ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      PropertyDescription
      agg_filterunknown
      alphafloat (0.0 transparent through 1.0 opaque)
      animated[True | False]
      axesan Axes instance
      backgroundcolorany matplotlib color
      bboxrectangle prop dict
      clip_boxa matplotlib.transforms.Bbox instance
      clip_on[True | False]
      clip_path[ (Path, Transform) | Patch | None ]
      colorany matplotlib color
      containsa callable function
      family or fontfamily or fontname or name[FONTNAME | ‘serif’ | ‘sans-serif’ | ‘cursive’ | ‘fantasy’ | ‘monospace’ ]
      figurea matplotlib.figure.Figure instance
      fontproperties or font_propertiesa matplotlib.font_manager.FontProperties instance
      gidan id string
      horizontalalignment or ha[ ‘center’ | ‘right’ | ‘left’ ]
      labelstring or anything printable with ‘%s’ conversion.
      linespacingfloat (multiple of font size)
      lod[True | False]
      multialignment[‘left’ | ‘right’ | ‘center’ ]
      path_effectsunknown
      picker[None|float|boolean|callable]
      position(x,y)
      rasterized[True | False | None]
      rotation[ angle in degrees | ‘vertical’ | ‘horizontal’ ]
      rotation_modeunknown
      size or fontsize[size in points | ‘xx-small’ | ‘x-small’ | ‘small’ | ‘medium’ | ‘large’ | ‘x-large’ | ‘xx-large’ ]
      snapunknown
      stretch or fontstretch[a numeric value in range 0-1000 | ‘ultra-condensed’ | ‘extra-condensed’ | ‘condensed’ | ‘semi-condensed’ | ‘normal’ | ‘semi-expanded’ | ‘expanded’ | ‘extra-expanded’ | ‘ultra-expanded’ ]
      style or fontstyle[ ‘normal’ | ‘italic’ | ‘oblique’]
      textstring or anything printable with ‘%s’ conversion.
      transformTransform instance
      urla url string
      variant or fontvariant[ ‘normal’ | ‘small-caps’ ]
      verticalalignment or va or ma[ ‘center’ | ‘top’ | ‘bottom’ | ‘baseline’ ]
      visible[True | False]
      weight or fontweight[a numeric value in range 0-1000 | ‘ultralight’ | ‘light’ | ‘normal’ | ‘regular’ | ‘book’ | ‘medium’ | ‘roman’ | ‘semibold’ | ‘demibold’ | ‘demi’ | ‘bold’ | ‘heavy’ | ‘extra bold’ | ‘black’ ]
      xfloat
      yfloat
      zorderany number
      -
      -
      - -
      -
      -tight_layout(renderer=None, pad=1.08, h_pad=None, w_pad=None, rect=None)
      -

      Adjust subplot parameters to give specified padding.

      -

      Parameters:

      -
      -
      -
      pad : float
      -
      padding between the figure edge and the edges of subplots, -as a fraction of the font-size.
      -
      h_pad, w_pad : float
      -
      padding (height/width) between edges of adjacent subplots. -Defaults to pad_inches.
      -
      rect : if rect is given, it is interpreted as a rectangle
      -
      (left, bottom, right, top) in the normalized figure -coordinate that the whole subplots area (including -labels) will fit into. Default is (0, 0, 1, 1).
      -
      -
      -
      - -
      -
      -waitforbuttonpress(timeout=-1)
      -

      Call signature:

      -
      waitforbuttonpress(self, timeout=-1)
      -
      -
      -

      Blocking call to interact with the figure.

      -

      This will return True is a key was pressed, False if a mouse -button was pressed and None if timeout was reached without -either being pressed.

      -

      If timeout is negative, does not timeout.

      -
      - -
      - -
      -
      -class matplotlib.figure.SubplotParams(left=None, bottom=None, right=None, top=None, wspace=None, hspace=None)
      -

      A class to hold the parameters for a subplot

      -

      All dimensions are fraction of the figure width or height. -All values default to their rc params

      -

      The following attributes are available

      -
      -
      left : 0.125
      -
      The left side of the subplots of the figure
      -
      right : 0.9
      -
      The right side of the subplots of the figure
      -
      bottom : 0.1
      -
      The bottom of the subplots of the figure
      -
      top : 0.9
      -
      The top of the subplots of the figure
      -
      wspace : 0.2
      -
      The amount of width reserved for blank space between subplots
      -
      hspace : 0.2
      -
      The amount of height reserved for white space between subplots
      -
      -
      -
      -update(left=None, bottom=None, right=None, top=None, wspace=None, hspace=None)
      -

      Update the current values. If any kwarg is None, default to -the current value, if set, otherwise to rc

      -
      - -
      - -
      -
      -matplotlib.figure.figaspect(arg)
      -

      Create a figure with specified aspect ratio. If arg is a number, -use that aspect ratio. If arg is an array, figaspect will -determine the width and height for a figure that would fit array -preserving aspect ratio. The figure width, height in inches are -returned. Be sure to create an axes with equal with and height, -eg

      -

      Example usage:

      -
      # make a figure twice as tall as it is wide
      -w, h = figaspect(2.)
      -fig = Figure(figsize=(w,h))
      -ax = fig.add_axes([0.1, 0.1, 0.8, 0.8])
      -ax.imshow(A, **kwargs)
      -
      -# make a figure with the proper aspect for an array
      -A = rand(5,3)
      -w, h = figaspect(A)
      -fig = Figure(figsize=(w,h))
      -ax = fig.add_axes([0.1, 0.1, 0.8, 0.8])
      -ax.imshow(A, **kwargs)
      -
      -
      -

      Thanks to Fernando Perez for this function

      -
      - -
      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/api/font_manager_api.html b/dev/api/font_manager_api.html deleted file mode 100644 index 9be9c9ee7a9..00000000000 --- a/dev/api/font_manager_api.html +++ /dev/null @@ -1,711 +0,0 @@ - - - - - - - - font_manager — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      Table Of Contents

      - - -

      Previous topic

      -

      figure

      -

      Next topic

      -

      gridspec

      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      font_manager

      -
      -

      matplotlib.font_manager

      -

      A module for finding, managing, and using fonts across platforms.

      -

      This module provides a single FontManager instance that can -be shared across backends and platforms. The findfont() -function returns the best TrueType (TTF) font file in the local or -system font path that matches the specified FontProperties -instance. The FontManager also handles Adobe Font Metrics -(AFM) font files for use by the PostScript backend.

      -

      The design is based on the W3C Cascading Style Sheet, Level 1 (CSS1) -font specification. -Future versions may implement the Level 2 or 2.1 specifications.

      -

      Experimental support is included for using fontconfig on Unix -variant platforms (Linux, OS X, Solaris). To enable it, set the -constant USE_FONTCONFIG in this file to True. Fontconfig has -the advantage that it is the standard way to look up fonts on X11 -platforms, so if a font is installed, it is much more likely to be -found.

      -
      -
      -class matplotlib.font_manager.FontEntry(fname='', name='', style='normal', variant='normal', weight='normal', stretch='normal', size='medium')
      -

      Bases: object

      -

      A class for storing Font properties. It is used when populating -the font lookup dictionary.

      -
      - -
      -
      -class matplotlib.font_manager.FontManager(size=None, weight='normal')
      -

      On import, the FontManager singleton instance creates a -list of TrueType fonts based on the font properties: name, style, -variant, weight, stretch, and size. The findfont() method -does a nearest neighbor search to find the font that most closely -matches the specification. If no good enough match is found, a -default font is returned.

      -
      -
      -findfont(prop, fontext='ttf', directory=None, fallback_to_default=True, rebuild_if_missing=True)
      -

      Search the font list for the font that most closely matches -the FontProperties prop.

      -

      findfont() performs a nearest neighbor search. Each -font is given a similarity score to the target font -properties. The first font with the highest score is -returned. If no matches below a certain threshold are found, -the default font (usually Vera Sans) is returned.

      -

      directory, is specified, will only return fonts from the -given directory (or subdirectory of that directory).

      -

      The result is cached, so subsequent lookups don’t have to -perform the O(n) nearest neighbor search.

      -

      If fallback_to_default is True, will fallback to the default -font family (usually “Bitstream Vera Sans” or “Helvetica”) if -the first lookup hard-fails.

      -

      See the W3C Cascading Style Sheet, Level 1 documentation -for a description of the font finding algorithm.

      -
      - -
      -
      -static get_default_size()
      -

      Return the default font size.

      -
      - -
      -
      -get_default_weight()
      -

      Return the default font weight.

      -
      - -
      -
      -score_family(families, family2)
      -

      Returns a match score between the list of font families in -families and the font family name family2.

      -

      An exact match anywhere in the list returns 0.0.

      -

      A match by generic font name will return 0.1.

      -

      No match will return 1.0.

      -
      - -
      -
      -score_size(size1, size2)
      -

      Returns a match score between size1 and size2.

      -

      If size2 (the size specified in the font file) is ‘scalable’, this -function always returns 0.0, since any font size can be generated.

      -

      Otherwise, the result is the absolute distance between size1 and -size2, normalized so that the usual range of font sizes (6pt - -72pt) will lie between 0.0 and 1.0.

      -
      - -
      -
      -score_stretch(stretch1, stretch2)
      -

      Returns a match score between stretch1 and stretch2.

      -

      The result is the absolute value of the difference between the -CSS numeric values of stretch1 and stretch2, normalized -between 0.0 and 1.0.

      -
      - -
      -
      -score_style(style1, style2)
      -

      Returns a match score between style1 and style2.

      -

      An exact match returns 0.0.

      -

      A match between ‘italic’ and ‘oblique’ returns 0.1.

      -

      No match returns 1.0.

      -
      - -
      -
      -score_variant(variant1, variant2)
      -

      Returns a match score between variant1 and variant2.

      -

      An exact match returns 0.0, otherwise 1.0.

      -
      - -
      -
      -score_weight(weight1, weight2)
      -

      Returns a match score between weight1 and weight2.

      -

      The result is the absolute value of the difference between the -CSS numeric values of weight1 and weight2, normalized -between 0.0 and 1.0.

      -
      - -
      -
      -set_default_weight(weight)
      -

      Set the default font weight. The initial value is ‘normal’.

      -
      - -
      -
      -update_fonts(filenames)
      -

      Update the font dictionary with new font files. -Currently not implemented.

      -
      - -
      - -
      -
      -class matplotlib.font_manager.FontProperties(family=None, style=None, variant=None, weight=None, stretch=None, size=None, fname=None, _init=None)
      -

      Bases: object

      -

      A class for storing and manipulating font properties.

      -

      The font properties are those described in the W3C Cascading -Style Sheet, Level 1 font -specification. The six properties are:

      -
      -
        -
      • family: A list of font names in decreasing order of priority. -The items may include a generic font family name, either -‘serif’, ‘sans-serif’, ‘cursive’, ‘fantasy’, or ‘monospace’. -In that case, the actual font to be used will be looked up -from the associated rcParam in matplotlibrc.
      • -
      • style: Either ‘normal’, ‘italic’ or ‘oblique’.
      • -
      • variant: Either ‘normal’ or ‘small-caps’.
      • -
      • stretch: A numeric value in the range 0-1000 or one of -‘ultra-condensed’, ‘extra-condensed’, ‘condensed’, -‘semi-condensed’, ‘normal’, ‘semi-expanded’, ‘expanded’, -‘extra-expanded’ or ‘ultra-expanded’
      • -
      • weight: A numeric value in the range 0-1000 or one of -‘ultralight’, ‘light’, ‘normal’, ‘regular’, ‘book’, ‘medium’, -‘roman’, ‘semibold’, ‘demibold’, ‘demi’, ‘bold’, ‘heavy’, -‘extra bold’, ‘black’
      • -
      • size: Either an relative value of ‘xx-small’, ‘x-small’, -‘small’, ‘medium’, ‘large’, ‘x-large’, ‘xx-large’ or an -absolute font size, e.g., 12
      • -
      -
      -

      The default font property for TrueType fonts (as specified in the -default matplotlibrc file) is:

      -
      sans-serif, normal, normal, normal, normal, scalable.
      -
      -

      Alternatively, a font may be specified using an absolute path to a -.ttf file, by using the fname kwarg.

      -

      The preferred usage of font sizes is to use the relative values, -e.g., ‘large’, instead of absolute font sizes, e.g., 12. This -approach allows all text sizes to be made larger or smaller based -on the font manager’s default font size.

      -

      This class will also accept a fontconfig pattern, if it is the only argument -provided. See the documentation on fontconfig patterns. This support -does not require fontconfig to be installed. We are merely -borrowing its pattern syntax for use here.

      -

      Note that matplotlib’s internal font manager and fontconfig use a -different algorithm to lookup fonts, so the results of the same pattern -may be different in matplotlib than in other applications that use -fontconfig.

      -
      -
      -copy()
      -

      Return a deep copy of self

      -
      - -
      -
      -get_family()
      -

      Return a list of font names that comprise the font family.

      -
      - -
      -
      -get_file()
      -

      Return the filename of the associated font.

      -
      - -
      -
      -get_fontconfig_pattern()
      -

      Get a fontconfig pattern suitable for looking up the font as -specified with fontconfig’s fc-match utility.

      -

      See the documentation on fontconfig patterns.

      -

      This support does not require fontconfig to be installed or -support for it to be enabled. We are merely borrowing its -pattern syntax for use here.

      -
      - -
      -
      -get_name()
      -

      Return the name of the font that best matches the font -properties.

      -
      - -
      -
      -get_size()
      -

      Return the font size.

      -
      - -
      -
      -get_size_in_points()
      -
      - -
      -
      -get_slant()
      -

      Return the font style. Values are: ‘normal’, ‘italic’ or -‘oblique’.

      -
      - -
      -
      -get_stretch()
      -

      Return the font stretch or width. Options are: ‘ultra-condensed’, -‘extra-condensed’, ‘condensed’, ‘semi-condensed’, ‘normal’, -‘semi-expanded’, ‘expanded’, ‘extra-expanded’, ‘ultra-expanded’.

      -
      - -
      -
      -get_style()
      -

      Return the font style. Values are: ‘normal’, ‘italic’ or -‘oblique’.

      -
      - -
      -
      -get_variant()
      -

      Return the font variant. Values are: ‘normal’ or -‘small-caps’.

      -
      - -
      -
      -get_weight()
      -

      Set the font weight. Options are: A numeric value in the -range 0-1000 or one of ‘light’, ‘normal’, ‘regular’, ‘book’, -‘medium’, ‘roman’, ‘semibold’, ‘demibold’, ‘demi’, ‘bold’, -‘heavy’, ‘extra bold’, ‘black’

      -
      - -
      -
      -set_family(family)
      -

      Change the font family. May be either an alias (generic name -is CSS parlance), such as: ‘serif’, ‘sans-serif’, ‘cursive’, -‘fantasy’, or ‘monospace’, or a real font name.

      -
      - -
      -
      -set_file(file)
      -

      Set the filename of the fontfile to use. In this case, all -other properties will be ignored.

      -
      - -
      -
      -set_fontconfig_pattern(pattern)
      -

      Set the properties by parsing a fontconfig pattern.

      -

      See the documentation on fontconfig patterns.

      -

      This support does not require fontconfig to be installed or -support for it to be enabled. We are merely borrowing its -pattern syntax for use here.

      -
      - -
      -
      -set_name(family)
      -

      Change the font family. May be either an alias (generic name -is CSS parlance), such as: ‘serif’, ‘sans-serif’, ‘cursive’, -‘fantasy’, or ‘monospace’, or a real font name.

      -
      - -
      -
      -set_size(size)
      -

      Set the font size. Either an relative value of ‘xx-small’, -‘x-small’, ‘small’, ‘medium’, ‘large’, ‘x-large’, ‘xx-large’ -or an absolute font size, e.g., 12.

      -
      - -
      -
      -set_slant(style)
      -

      Set the font style. Values are: ‘normal’, ‘italic’ or -‘oblique’.

      -
      - -
      -
      -set_stretch(stretch)
      -

      Set the font stretch or width. Options are: ‘ultra-condensed’, -‘extra-condensed’, ‘condensed’, ‘semi-condensed’, ‘normal’, -‘semi-expanded’, ‘expanded’, ‘extra-expanded’ or -‘ultra-expanded’, or a numeric value in the range 0-1000.

      -
      - -
      -
      -set_style(style)
      -

      Set the font style. Values are: ‘normal’, ‘italic’ or -‘oblique’.

      -
      - -
      -
      -set_variant(variant)
      -

      Set the font variant. Values are: ‘normal’ or ‘small-caps’.

      -
      - -
      -
      -set_weight(weight)
      -

      Set the font weight. May be either a numeric value in the -range 0-1000 or one of ‘ultralight’, ‘light’, ‘normal’, -‘regular’, ‘book’, ‘medium’, ‘roman’, ‘semibold’, ‘demibold’, -‘demi’, ‘bold’, ‘heavy’, ‘extra bold’, ‘black’

      -
      - -
      - -
      -
      -matplotlib.font_manager.OSXInstalledFonts(directories=None, fontext='ttf')
      -

      Get list of font files on OS X - ignores font suffix by default.

      -
      - -
      -
      -matplotlib.font_manager.afmFontProperty(fontpath, font)
      -

      A function for populating a FontKey instance by -extracting information from the AFM font file.

      -

      font is a class:AFM instance.

      -
      - -
      -
      -matplotlib.font_manager.createFontList(fontfiles, fontext='ttf')
      -

      A function to create a font lookup list. The default is to create -a list of TrueType fonts. An AFM font list can optionally be -created.

      -
      - -
      -
      -matplotlib.font_manager.findSystemFonts(fontpaths=None, fontext='ttf')
      -

      Search for fonts in the specified font paths. If no paths are -given, will use a standard set of system paths, as well as the -list of fonts tracked by fontconfig if fontconfig is installed and -available. A list of TrueType fonts are returned by default with -AFM fonts as an option.

      -
      - -
      -
      -matplotlib.font_manager.findfont(prop, **kw)
      -
      - -
      -
      -matplotlib.font_manager.get_fontconfig_fonts(fontext='ttf')
      -

      Grab a list of all the fonts that are being tracked by fontconfig -by making a system call to fc-list. This is an easy way to -grab all of the fonts the user wants to be made available to -applications, without needing knowing where all of them reside.

      -
      - -
      -
      -matplotlib.font_manager.get_fontext_synonyms(fontext)
      -

      Return a list of file extensions extensions that are synonyms for -the given file extension fileext.

      -
      - -
      -
      -matplotlib.font_manager.is_opentype_cff_font(filename)
      -

      Returns True if the given font is a Postscript Compact Font Format -Font embedded in an OpenType wrapper. Used by the PostScript and -PDF backends that can not subset these fonts.

      -
      - -
      -
      -matplotlib.font_manager.list_fonts(directory, extensions)
      -

      Return a list of all fonts matching any of the extensions, -possibly upper-cased, found recursively under the directory.

      -
      - -
      -
      -matplotlib.font_manager.pickle_dump(data, filename)
      -

      Equivalent to pickle.dump(data, open(filename, ‘w’)) -but closes the file to prevent filehandle leakage.

      -
      - -
      -
      -matplotlib.font_manager.pickle_load(filename)
      -

      Equivalent to pickle.load(open(filename, ‘r’)) -but closes the file to prevent filehandle leakage.

      -
      - -
      -
      -matplotlib.font_manager.ttfFontProperty(font)
      -

      A function for populating the FontKey by extracting -information from the TrueType font file.

      -

      font is a FT2Font instance.

      -
      - -
      -
      -matplotlib.font_manager.ttfdict_to_fnames(d)
      -

      flatten a ttfdict to all the filenames it contains

      -
      - -
      -
      -matplotlib.font_manager.weight_as_number(weight)
      -

      Return the weight property as a numeric value. String values -are converted to their corresponding numeric value.

      -
      - -
      -
      -matplotlib.font_manager.win32FontDirectory()
      -

      Return the user-specified font directory for Win32. This is -looked up from the registry key:

      -
      \HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders\Fonts
      -
      -

      If the key is not found, $WINDIR/Fonts will be returned.

      -
      - -
      -
      -matplotlib.font_manager.win32InstalledFonts(directory=None, fontext='ttf')
      -

      Search for fonts in the specified font directory, or use the -system directories if none given. A list of TrueType font -filenames are returned by default, or AFM fonts if fontext == -‘afm’.

      -
      - -
      -
      -

      matplotlib.fontconfig_pattern

      -

      A module for parsing and generating fontconfig patterns.

      -

      See the fontconfig pattern specification for more -information.

      -
      -
      -class matplotlib.fontconfig_pattern.FontconfigPatternParser
      -

      A simple pyparsing-based parser for fontconfig-style patterns.

      -

      See the fontconfig pattern specification for more -information.

      -
      -
      -parse(pattern)
      -

      Parse the given fontconfig pattern and return a dictionary -of key/value pairs useful for initializing a -font_manager.FontProperties object.

      -
      - -
      - -
      -
      -matplotlib.fontconfig_pattern.family_escape()
      -

      sub(repl, string[, count = 0]) –> newstring -Return the string obtained by replacing the leftmost non-overlapping -occurrences of pattern in string by the replacement repl.

      -
      - -
      -
      -matplotlib.fontconfig_pattern.family_unescape()
      -

      sub(repl, string[, count = 0]) –> newstring -Return the string obtained by replacing the leftmost non-overlapping -occurrences of pattern in string by the replacement repl.

      -
      - -
      -
      -matplotlib.fontconfig_pattern.generate_fontconfig_pattern(d)
      -

      Given a dictionary of key/value pairs, generates a fontconfig -pattern string.

      -
      - -
      -
      -matplotlib.fontconfig_pattern.value_escape()
      -

      sub(repl, string[, count = 0]) –> newstring -Return the string obtained by replacing the leftmost non-overlapping -occurrences of pattern in string by the replacement repl.

      -
      - -
      -
      -matplotlib.fontconfig_pattern.value_unescape()
      -

      sub(repl, string[, count = 0]) –> newstring -Return the string obtained by replacing the leftmost non-overlapping -occurrences of pattern in string by the replacement repl.

      -
      - -
      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/api/gridspec_api.html b/dev/api/gridspec_api.html deleted file mode 100644 index 1ebfbc3ee9b..00000000000 --- a/dev/api/gridspec_api.html +++ /dev/null @@ -1,354 +0,0 @@ - - - - - - - - gridspec — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      Table Of Contents

      - - -

      Previous topic

      -

      font_manager

      -

      Next topic

      -

      legend

      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      gridspec

      -
      -

      matplotlib.gridspec

      -

      gridspec is a module which specifies the location -of the subplot in the figure.

      -
      -
      -
      GridSpec
      -
      specifies the geometry of the grid that a subplot will be -placed. The number of rows and number of columns of the grid -need to be set. Optionally, the subplot layout parameters -(e.g., left, right, etc.) can be tuned.
      -
      SubplotSpec
      -
      specifies the location of the subplot in the given GridSpec.
      -
      -
      -
      -
      -class matplotlib.gridspec.GridSpec(nrows, ncols, left=None, bottom=None, right=None, top=None, wspace=None, hspace=None, width_ratios=None, height_ratios=None)
      -

      Bases: matplotlib.gridspec.GridSpecBase

      -

      A class that specifies the geometry of the grid that a subplot -will be placed. The location of grid is determined by similar way -as the SubplotParams.

      -

      The number of rows and number of columns of the -grid need to be set. Optionally, the subplot layout parameters -(e.g., left, right, etc.) can be tuned.

      -
      -
      -get_subplot_params(fig=None)
      -

      return a dictionary of subplot layout parameters. The default -parameters are from rcParams unless a figure attribute is set.

      -
      - -
      -
      -locally_modified_subplot_params()
      -
      - -
      -
      -tight_layout(fig, renderer=None, pad=1.08, h_pad=None, w_pad=None, rect=None)
      -

      Adjust subplot parameters to give specified padding.

      -

      Parameters:

      -
      -
      pad : float
      -
      padding between the figure edge and the edges of subplots, as a fraction of the font-size.
      -
      h_pad, w_pad : float
      -
      padding (height/width) between edges of adjacent subplots. -Defaults to pad_inches.
      -
      rect : if rect is given, it is interpreted as a rectangle
      -
      (left, bottom, right, top) in the normalized figure -coordinate that the whole subplots area (including -labels) will fit into. Default is (0, 0, 1, 1).
      -
      -
      - -
      -
      -update(**kwargs)
      -

      Update the current values. If any kwarg is None, default to -the current value, if set, otherwise to rc.

      -
      - -
      - -
      -
      -class matplotlib.gridspec.GridSpecBase(nrows, ncols, height_ratios=None, width_ratios=None)
      -

      Bases: object

      -

      A base class of GridSpec that specifies the geometry of the grid -that a subplot will be placed.

      -

      The number of rows and number of columns of the grid need to -be set. Optionally, the ratio of heights and widths of rows and -columns can be specified.

      -
      -
      -get_geometry()
      -

      get the geometry of the grid, eg 2,3

      -
      - -
      -
      -get_grid_positions(fig)
      -

      return lists of bottom and top position of rows, left and -right positions of columns.

      -
      - -
      -
      -get_height_ratios()
      -
      - -
      -
      -get_subplot_params(fig=None)
      -
      - -
      -
      -get_width_ratios()
      -
      - -
      -
      -new_subplotspec(loc, rowspan=1, colspan=1)
      -

      create and return a SuplotSpec instance.

      -
      - -
      -
      -set_height_ratios(height_ratios)
      -
      - -
      -
      -set_width_ratios(width_ratios)
      -
      - -
      - -
      -
      -class matplotlib.gridspec.GridSpecFromSubplotSpec(nrows, ncols, subplot_spec, wspace=None, hspace=None, height_ratios=None, width_ratios=None)
      -

      Bases: matplotlib.gridspec.GridSpecBase

      -

      GridSpec whose subplot layout parameters are inherited from the -location specified by a given SubplotSpec.

      -

      The number of rows and number of columns of the grid need to -be set. An instance of SubplotSpec is also needed to be set -from which the layout parameters will be inherited. The wspace -and hspace of the layout can be optionally specified or the -default values (from the figure or rcParams) will be used.

      -
      -
      -get_subplot_params(fig=None)
      -

      return a dictionary of subplot layout parameters.

      -
      - -
      -
      -get_topmost_subplotspec()
      -

      get the topmost SubplotSpec instance associated with the subplot

      -
      - -
      - -
      -
      -class matplotlib.gridspec.SubplotSpec(gridspec, num1, num2=None)
      -

      Bases: object

      -

      specifies the location of the subplot in the given GridSpec.

      -

      The subplot will occupy the num1-th cell of the given -gridspec. If num2 is provided, the subplot will span between -num1-th cell and num2-th cell.

      -

      The index stars from 0.

      -
      -
      -get_geometry()
      -

      get the subplot geometry, eg 2,2,3. Unlike SuplorParams, -index is 0-based

      -
      - -
      -
      -get_gridspec()
      -
      - -
      -
      -get_position(fig, return_all=False)
      -

      update the subplot position from fig.subplotpars

      -
      - -
      -
      -get_topmost_subplotspec()
      -

      get the topmost SubplotSpec instance associated with the subplot

      -
      - -
      - -
      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/api/index.html b/dev/api/index.html deleted file mode 100644 index 91c9a18d856..00000000000 --- a/dev/api/index.html +++ /dev/null @@ -1,207 +0,0 @@ - - - - - - - - The Matplotlib API — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      Previous topic

      -

      mplot3d FAQ

      -

      Next topic

      -

      Plotting commands summary

      -

      This Page

      - - - -
      -
      - - - - - - \ No newline at end of file diff --git a/dev/api/index_backend_api.html b/dev/api/index_backend_api.html deleted file mode 100644 index 60918f7fcab..00000000000 --- a/dev/api/index_backend_api.html +++ /dev/null @@ -1,177 +0,0 @@ - - - - - - - - backends — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      Previous topic

      -

      axis

      -

      Next topic

      -

      matplotlib.backend_bases

      -

      This Page

      - - - -
      -
      - - - - - - \ No newline at end of file diff --git a/dev/api/legend_api.html b/dev/api/legend_api.html deleted file mode 100644 index b63d42b81e8..00000000000 --- a/dev/api/legend_api.html +++ /dev/null @@ -1,498 +0,0 @@ - - - - - - - - legend — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      Table Of Contents

      - - -

      Previous topic

      -

      gridspec

      -

      Next topic

      -

      mathtext

      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      legend

      -
      -

      matplotlib.legend

      -

      The legend module defines the Legend class, which is responsible for -drawing legends associated with axes and/or figures.

      -

      The Legend class can be considered as a container of legend handles -and legend texts. Creation of corresponding legend handles from the -plot elements in the axes or figures (e.g., lines, patches, etc.) are -specified by the handler map, which defines the mapping between the -plot elements and the legend handlers to be used (the default legend -handlers are defined in the legend_handler module). Note -that not all kinds of artist are supported by the legend yet (See -Legend guide for more information).

      -
      -
      -class matplotlib.legend.DraggableLegend(legend, use_blit=False, update='loc')
      -

      Bases: matplotlib.offsetbox.DraggableOffsetBox

      -
      -
      update : If “loc”, update loc parameter of
      -
      legend upon finalizing. If “bbox”, update -bbox_to_anchor parameter.
      -
      -
      -
      -artist_picker(legend, evt)
      -
      - -
      -
      -finalize_offset()
      -
      - -
      - -
      -
      -class matplotlib.legend.Legend(parent, handles, labels, loc=None, numpoints=None, markerscale=None, scatterpoints=None, scatteryoffsets=None, prop=None, fontsize=None, pad=None, labelsep=None, handlelen=None, handletextsep=None, axespad=None, borderpad=None, labelspacing=None, handlelength=None, handleheight=None, handletextpad=None, borderaxespad=None, columnspacing=None, ncol=1, mode=None, fancybox=None, shadow=None, title=None, framealpha=None, bbox_to_anchor=None, bbox_transform=None, frameon=None, handler_map=None)
      -

      Bases: matplotlib.artist.Artist

      -

      Place a legend on the axes at location loc. Labels are a -sequence of strings and loc can be a string or an integer -specifying the legend location

      -

      The location codes are:

      -
      'best'         : 0, (only implemented for axis legends)
      -'upper right'  : 1,
      -'upper left'   : 2,
      -'lower left'   : 3,
      -'lower right'  : 4,
      -'right'        : 5,
      -'center left'  : 6,
      -'center right' : 7,
      -'lower center' : 8,
      -'upper center' : 9,
      -'center'       : 10,
      -
      -

      loc can be a tuple of the normalized coordinate values with -respect its parent.

      -
        -
      • parent: the artist that contains the legend

        -
      • -
      • -
        handles: a list of artists (lines, patches) to be added to the
        -

        legend

        -
        -
        -
      • -
      • labels: a list of strings to label the legend

        -
      • -
      -

      Optional keyword arguments:

      - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      KeywordDescription
      loca location code
      propthe font property
      fontsizethe font size (used only if prop is not specified)
      markerscalethe relative size of legend markers vs. original
      numpointsthe number of points in the legend for line
      scatterpointsthe number of points in the legend for scatter plot
      scatteryoffsetsa list of yoffsets for scatter symbols in legend
      frameonif True, draw a frame around the legend. -If None, use rc
      fancyboxif True, draw a frame with a round fancybox. -If None, use rc
      shadowif True, draw a shadow behind legend
      framealphaIf not None, alpha channel for the frame.
      ncolnumber of columns
      borderpadthe fractional whitespace inside the legend border
      labelspacingthe vertical space between the legend entries
      handlelengththe length of the legend handles
      handleheightthe length of the legend handles
      handletextpadthe pad between the legend handle and text
      borderaxespadthe pad between the axes and legend border
      columnspacingthe spacing between columns
      titlethe legend title
      bbox_to_anchorthe bbox that the legend will be anchored.
      bbox_transformthe transform for the bbox. transAxes if None.
      -

      The pad and spacing parameters are measured in font-size units. e.g., -a fontsize of 10 points and a handlelength=5 implies a handlelength of -50 points. Values from rcParams will be used if None.

      -

      Users can specify any arbitrary location for the legend using the -bbox_to_anchor keyword argument. bbox_to_anchor can be an instance -of BboxBase(or its derivatives) or a tuple of 2 or 4 floats. -See set_bbox_to_anchor() for more detail.

      -

      The legend location can be specified by setting loc with a tuple of -2 floats, which is interpreted as the lower-left corner of the legend -in the normalized axes coordinate.

      -
      -
      -codes = {'right': 5, 'center left': 6, 'upper right': 1, 'lower right': 4, 'best': 0, 'center': 10, 'lower left': 3, 'center right': 7, 'upper left': 2, 'upper center': 9, 'lower center': 8}
      -
      - -
      -
      -contains(event)
      -
      - -
      -
      -draggable(state=None, use_blit=False, update='loc')
      -

      Set the draggable state – if state is

      -
      -
        -
      • None : toggle the current state
      • -
      • True : turn draggable on
      • -
      • False : turn draggable off
      • -
      -
      -

      If draggable is on, you can drag the legend on the canvas with -the mouse. The DraggableLegend helper instance is returned if -draggable is on.

      -

      The update parameter control which parameter of the legend changes -when dragged. If update is “loc”, the loc paramter of the legend -is changed. If “bbox”, the bbox_to_anchor parameter is changed.

      -
      - -
      -
      -draw(artist, renderer, *args, **kwargs)
      -

      Draw everything that belongs to the legend

      -
      - -
      -
      -draw_frame(b)
      -

      b is a boolean. Set draw frame to b

      -
      - -
      -
      -get_bbox_to_anchor()
      -

      return the bbox that the legend will be anchored

      -
      - -
      -
      -get_children()
      -

      return a list of child artists

      -
      - -
      -
      -classmethod get_default_handler_map()
      -

      A class method that returns the default handler map.

      -
      - -
      -
      -get_frame()
      -

      return the Rectangle instance used to frame the legend

      -
      - -
      -
      -get_frame_on()
      -

      Get whether the legend box patch is drawn

      -
      - -
      -
      -static get_legend_handler(legend_handler_map, orig_handle)
      -

      return a legend handler from legend_handler_map that -corresponds to orig_handler.

      -

      legend_handler_map should be a dictionary object (that is -returned by the get_legend_handler_map method).

      -

      It first checks if the orig_handle itself is a key in the -legend_hanler_map and return the associated value. -Otherwise, it checks for each of the classes in its -method-resolution-order. If no matching key is found, it -returns None.

      -
      - -
      -
      -get_legend_handler_map()
      -

      return the handler map.

      -
      - -
      -
      -get_lines()
      -

      return a list of lines.Line2D instances in the legend

      -
      - -
      -
      -get_patches()
      -

      return a list of patch instances in the legend

      -
      - -
      -
      -get_texts()
      -

      return a list of text.Text instance in the legend

      -
      - -
      -
      -get_title()
      -

      return Text instance for the legend title

      -
      - -
      -
      -get_window_extent(*args, **kwargs)
      -

      return a extent of the the legend

      -
      - -
      -
      -set_bbox_to_anchor(bbox, transform=None)
      -

      set the bbox that the legend will be anchored.

      -

      bbox can be a BboxBase instance, a tuple of [left, bottom, -width, height] in the given transform (normalized axes -coordinate if None), or a tuple of [left, bottom] where the -width and height will be assumed to be zero.

      -
      - -
      -
      -classmethod set_default_handler_map(handler_map)
      -

      A class method to set the default handler map.

      -
      - -
      -
      -set_frame_on(b)
      -

      Set whether the legend box patch is drawn

      -

      ACCEPTS: [ True | False ]

      -
      - -
      -
      -set_title(title, prop=None)
      -

      set the legend title. Fontproperties can be optionally set -with prop parameter.

      -
      - -
      -
      -classmethod update_default_handler_map(handler_map)
      -

      A class method to update the default handler map.

      -
      - -
      -
      -zorder = 5
      -
      - -
      - -
      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/api/markers_api.html b/dev/api/markers_api.html deleted file mode 100644 index 78bcd123544..00000000000 --- a/dev/api/markers_api.html +++ /dev/null @@ -1,443 +0,0 @@ - - - - - - - - matplotlib.markers — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      matplotlib.markers

      -

      This module contains functions to handle markers. Used by both the -marker functionality of plot and -scatter.

      -

      All possible markers are defined here:

      - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      markerdescription
      ”.”point
      ”,”pixel
      “o”circle
      “v”triangle_down
      “^”triangle_up
      “<”triangle_left
      “>”triangle_right
      “1”tri_down
      “2”tri_up
      “3”tri_left
      “4”tri_right
      “8”octagon
      “s”square
      “p”pentagon
      “*”star
      “h”hexagon1
      “H”hexagon2
      “+”plus
      “x”x
      “D”diamond
      “d”thin_diamond
      “|”vline
      “_”hline
      TICKLEFTtickleft
      TICKRIGHTtickright
      TICKUPtickup
      TICKDOWNtickdown
      CARETLEFTcaretleft
      CARETRIGHTcaretright
      CARETUPcaretup
      CARETDOWNcaretdown
      “None”nothing
      Nonenothing
      ” “nothing
      “”nothing
      '$...$'render the string using mathtext.
      vertsa list of (x, y) pairs used for Path vertices.
      patha Path instance.
      (numsides, style, angle)see below
      -

      The marker can also be a tuple (numsides, style, angle), which -will create a custom, regular symbol.

      -
      -
      -
      numsides:
      -
      the number of sides
      -
      style:
      -

      the style of the regular symbol:

      - ---- - - - - - - - - - - - - - - - - - - - -
      ValueDescription
      0a regular polygon
      1a star-like symbol
      2an asterisk
      3a circle (numsides and angle is ignored)
      -
      -
      angle:
      -
      the angle of rotation of the symbol, in degrees
      -
      -
      -

      For backward compatibility, the form (verts, 0) is also accepted, -but it is equivalent to just verts for giving a raw set of vertices -that define the shape.

      -
      -
      -class matplotlib.markers.MarkerStyle(marker=None, fillstyle='full')
      -

      Bases: object

      -

      MarkerStyle

      - --- - - - -
      Parameters :

      marker : string or array_like, optional, default: None

      -
      -

      See the descriptions of possible markers in the module docstring.

      -
      -

      fillstyle : string, optional, default: ‘full’

      -
      -

      ‘full’, ‘left”, ‘right’, ‘bottom’, ‘top’, ‘none’

      -
      -
      -

      Attributes

      - ---- - - - - - - - - - - - -
      markers
      fillstylestuple() -> empty tuple
      filled_markerstuple() -> empty tuple
      -
      -
      -filled_markers = ('o', 'v', '^', '<', '>', '8', 's', 'p', '*', 'h', 'H', 'D', 'd')
      -
      - -
      -
      -fillstyles = ('full', 'left', 'right', 'bottom', 'top', 'none')
      -
      - -
      -
      -get_alt_path()
      -
      - -
      -
      -get_alt_transform()
      -
      - -
      -
      -get_capstyle()
      -
      - -
      -
      -get_fillstyle()
      -
      - -
      -
      -get_joinstyle()
      -
      - -
      -
      -get_marker()
      -
      - -
      -
      -get_path()
      -
      - -
      -
      -get_snap_threshold()
      -
      - -
      -
      -get_transform()
      -
      - -
      -
      -is_filled()
      -
      - -
      -
      -markers = {0: 'tickleft', 1: 'tickright', 2: 'tickup', 3: 'tickdown', 4: 'caretleft', 'D': 'diamond', 6: 'caretup', 7: 'caretdown', 's': 'square', '|': 'vline', '': 'nothing', 'None': 'nothing', 'x': 'x', None: 'nothing', 5: 'caretright', '_': 'hline', '^': 'triangle_up', ' ': 'nothing', 'd': 'thin_diamond', 'h': 'hexagon1', '+': 'plus', '*': 'star', ',': 'pixel', 'o': 'circle', '.': 'point', '1': 'tri_down', 'p': 'pentagon', '3': 'tri_left', '2': 'tri_up', '4': 'tri_right', 'H': 'hexagon2', 'v': 'triangle_down', '8': 'octagon', '<': 'triangle_left', '>': 'triangle_right'}
      -
      - -
      -
      -set_fillstyle(fillstyle)
      -

      Sets fillstyle

      - --- - - - -
      Parameters :fillstyle : string amongst known fillstyles
      -
      - -
      -
      -set_marker(marker)
      -
      - -
      - -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/api/mathtext_api.html b/dev/api/mathtext_api.html deleted file mode 100644 index aa750a8ecf7..00000000000 --- a/dev/api/mathtext_api.html +++ /dev/null @@ -1,1526 +0,0 @@ - - - - - - - - mathtext — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      Table Of Contents

      - - -

      Previous topic

      -

      legend

      -

      Next topic

      -

      mlab

      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      mathtext

      -

      -Inheritance diagram of matplotlib.mathtext - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

      -
      -

      matplotlib.mathtext

      -

      mathtext is a module for parsing a subset of the -TeX math syntax and drawing them to a matplotlib backend.

      -

      For a tutorial of its usage see Writing mathematical expressions. This -document is primarily concerned with implementation details.

      -

      The module uses pyparsing to parse the TeX expression.

      -

      The Bakoma distribution of the TeX Computer Modern fonts, and STIX -fonts are supported. There is experimental support for using -arbitrary fonts, but results may vary without proper tweaking and -metrics for those fonts.

      -

      If you find TeX expressions that don’t parse or render properly, -please email mdroe@stsci.edu, but please check KNOWN ISSUES below first.

      -
      -
      -class matplotlib.mathtext.Accent(c, state)
      -

      Bases: matplotlib.mathtext.Char

      -

      The font metrics need to be dealt with differently for accents, -since they are already offset correctly from the baseline in -TrueType fonts.

      -
      -
      -grow()
      -
      - -
      -
      -render(x, y)
      -

      Render the character to the canvas.

      -
      - -
      -
      -shrink()
      -
      - -
      - -
      -
      -class matplotlib.mathtext.AutoHeightChar(c, height, depth, state, always=False, factor=None)
      -

      Bases: matplotlib.mathtext.Hlist

      -

      AutoHeightChar will create a character as close to the -given height and depth as possible. When using a font with -multiple height versions of some characters (such as the BaKoMa -fonts), the correct glyph will be selected, otherwise this will -always just return a scaled version of the glyph.

      -
      - -
      -
      -class matplotlib.mathtext.AutoWidthChar(c, width, state, always=False, char_class=<class 'matplotlib.mathtext.Char'>)
      -

      Bases: matplotlib.mathtext.Hlist

      -

      AutoWidthChar will create a character as close to the -given width as possible. When using a font with multiple width -versions of some characters (such as the BaKoMa fonts), the -correct glyph will be selected, otherwise this will always just -return a scaled version of the glyph.

      -
      - -
      -
      -class matplotlib.mathtext.BakomaFonts(*args, **kwargs)
      -

      Bases: matplotlib.mathtext.TruetypeFonts

      -

      Use the Bakoma TrueType fonts for rendering.

      -

      Symbols are strewn about a number of font files, each of which has -its own proprietary 8-bit encoding.

      -
      -
      -alias = '\\]'
      -
      - -
      -
      -get_sized_alternatives_for_symbol(fontname, sym)
      -
      - -
      -
      -target = ']'
      -
      - -
      - -
      -
      -class matplotlib.mathtext.Box(width, height, depth)
      -

      Bases: matplotlib.mathtext.Node

      -

      Represents any node with a physical location.

      -
      -
      -grow()
      -
      - -
      -
      -render(x1, y1, x2, y2)
      -
      - -
      -
      -shrink()
      -
      - -
      - -
      -
      -class matplotlib.mathtext.Char(c, state)
      -

      Bases: matplotlib.mathtext.Node

      -

      Represents a single character. Unlike TeX, the font information -and metrics are stored with each Char to make it easier -to lookup the font metrics when needed. Note that TeX boxes have -a width, height, and depth, unlike Type1 and Truetype which use a -full bounding box and an advance in the x-direction. The metrics -must be converted to the TeX way, and the advance (if different -from width) must be converted into a Kern node when the -Char is added to its parent Hlist.

      -
      -
      -get_kerning(next)
      -

      Return the amount of kerning between this and the given -character. Called when characters are strung together into -Hlist to create Kern nodes.

      -
      - -
      -
      -grow()
      -
      - -
      -
      -is_slanted()
      -
      - -
      -
      -render(x, y)
      -

      Render the character to the canvas

      -
      - -
      -
      -shrink()
      -
      - -
      - -
      -
      -matplotlib.mathtext.Error(msg)
      -

      Helper class to raise parser errors.

      -
      - -
      -
      -class matplotlib.mathtext.Fil
      -

      Bases: matplotlib.mathtext.Glue

      -
      - -
      -
      -class matplotlib.mathtext.Fill
      -

      Bases: matplotlib.mathtext.Glue

      -
      - -
      -
      -class matplotlib.mathtext.Filll
      -

      Bases: matplotlib.mathtext.Glue

      -
      - -
      -
      -class matplotlib.mathtext.Fonts(default_font_prop, mathtext_backend)
      -

      Bases: object

      -

      An abstract base class for a system of fonts to use for mathtext.

      -

      The class must be able to take symbol keys and font file names and -return the character metrics. It also delegates to a backend class -to do the actual drawing.

      -

      default_font_prop: A -FontProperties object to use -for the default non-math font, or the base font for Unicode -(generic) font rendering.

      -

      mathtext_backend: A subclass of MathTextBackend -used to delegate the actual rendering.

      -
      -
      -destroy()
      -

      Fix any cyclical references before the object is about -to be destroyed.

      -
      - -
      -
      -get_kern(font1, fontclass1, sym1, fontsize1, font2, fontclass2, sym2, fontsize2, dpi)
      -

      Get the kerning distance for font between sym1 and sym2.

      -

      fontX: one of the TeX font names:

      -
      tt, it, rm, cal, sf, bf or default/regular (non-math)
      -
      -
      -

      fontclassX: TODO

      -

      symX: a symbol in raw TeX form. e.g., ‘1’, ‘x’ or ‘sigma’

      -

      fontsizeX: the fontsize in points

      -

      dpi: the current dots-per-inch

      -
      - -
      -
      -get_metrics(font, font_class, sym, fontsize, dpi)
      -

      font: one of the TeX font names:

      -
      tt, it, rm, cal, sf, bf or default/regular (non-math)
      -
      -
      -

      font_class: TODO

      -

      sym: a symbol in raw TeX form. e.g., ‘1’, ‘x’ or ‘sigma’

      -

      fontsize: font size in points

      -

      dpi: current dots-per-inch

      -

      Returns an object with the following attributes:

      -
      -
        -
      • advance: The advance distance (in points) of the glyph.
      • -
      • height: The height of the glyph in points.
      • -
      • width: The width of the glyph in points.
      • -
      • xmin, xmax, ymin, ymax - the ink rectangle of the glyph
      • -
      • iceberg - the distance from the baseline to the top of -the glyph. This corresponds to TeX’s definition of -“height”.
      • -
      -
      -
      - -
      -
      -get_results(box)
      -

      Get the data needed by the backend to render the math -expression. The return value is backend-specific.

      -
      - -
      -
      -get_sized_alternatives_for_symbol(fontname, sym)
      -

      Override if your font provides multiple sizes of the same -symbol. Should return a list of symbols matching sym in -various sizes. The expression renderer will select the most -appropriate size for a given situation from this list.

      -
      - -
      -
      -get_underline_thickness(font, fontsize, dpi)
      -

      Get the line thickness that matches the given font. Used as a -base unit for drawing lines such as in a fraction or radical.

      -
      - -
      -
      -get_used_characters()
      -

      Get the set of characters that were used in the math -expression. Used by backends that need to subset fonts so -they know which glyphs to include.

      -
      - -
      -
      -get_xheight(font, fontsize, dpi)
      -

      Get the xheight for the given font and fontsize.

      -
      - -
      -
      -render_glyph(ox, oy, facename, font_class, sym, fontsize, dpi)
      -

      Draw a glyph at

      -
      -
        -
      • ox, oy: position
      • -
      • facename: One of the TeX face names
      • -
      • font_class:
      • -
      • sym: TeX symbol name or single character
      • -
      • fontsize: fontsize in points
      • -
      • dpi: The dpi to draw at.
      • -
      -
      -
      - -
      -
      -render_rect_filled(x1, y1, x2, y2)
      -

      Draw a filled rectangle from (x1, y1) to (x2, y2).

      -
      - -
      -
      -set_canvas_size(w, h, d)
      -

      Set the size of the buffer used to render the math expression. -Only really necessary for the bitmap backends.

      -
      - -
      - -
      -
      -class matplotlib.mathtext.Glue(glue_type, copy=False)
      -

      Bases: matplotlib.mathtext.Node

      -

      Most of the information in this object is stored in the underlying -GlueSpec class, which is shared between multiple glue objects. (This -is a memory optimization which probably doesn’t matter anymore, but it’s -easier to stick to what TeX does.)

      -
      -
      -grow()
      -
      - -
      -
      -shrink()
      -
      - -
      - -
      -
      -class matplotlib.mathtext.GlueSpec(width=0.0, stretch=0.0, stretch_order=0, shrink=0.0, shrink_order=0)
      -

      Bases: object

      -

      See Glue.

      -
      -
      -copy()
      -
      - -
      -
      -classmethod factory(glue_type)
      -
      - -
      - -
      -
      -class matplotlib.mathtext.HCentered(elements)
      -

      Bases: matplotlib.mathtext.Hlist

      -

      A convenience class to create an Hlist whose contents are -centered within its enclosing box.

      -
      - -
      -
      -class matplotlib.mathtext.Hbox(width)
      -

      Bases: matplotlib.mathtext.Box

      -

      A box with only width (zero height and depth).

      -
      - -
      -
      -class matplotlib.mathtext.Hlist(elements, w=0.0, m='additional', do_kern=True)
      -

      Bases: matplotlib.mathtext.List

      -

      A horizontal list of boxes.

      -
      -
      -hpack(w=0.0, m='additional')
      -

      The main duty of hpack() is to compute the dimensions of -the resulting boxes, and to adjust the glue if one of those -dimensions is pre-specified. The computed sizes normally -enclose all of the material inside the new box; but some items -may stick out if negative glue is used, if the box is -overfull, or if a \vbox includes other boxes that have -been shifted left.

      -
      -
        -
      • w: specifies a width
      • -
      • m: is either ‘exactly’ or ‘additional’.
      • -
      -
      -

      Thus, hpack(w, 'exactly') produces a box whose width is -exactly w, while hpack(w, 'additional') yields a box -whose width is the natural width plus w. The default values -produce a box with the natural width.

      -
      - -
      -
      -kern()
      -

      Insert Kern nodes between Char nodes to set -kerning. The Char nodes themselves determine the -amount of kerning they need (in get_kerning()), -and this function just creates the linked list in the correct -way.

      -
      - -
      - -
      -
      -class matplotlib.mathtext.Hrule(state, thickness=None)
      -

      Bases: matplotlib.mathtext.Rule

      -

      Convenience class to create a horizontal rule.

      -
      - -
      -
      -class matplotlib.mathtext.Kern(width)
      -

      Bases: matplotlib.mathtext.Node

      -

      A Kern node has a width field to specify a (normally -negative) amount of spacing. This spacing correction appears in -horizontal lists between letters like A and V when the font -designer said that it looks better to move them closer together or -further apart. A kern node can also appear in a vertical list, -when its width denotes additional spacing in the vertical -direction.

      -
      -
      -depth = 0
      -
      - -
      -
      -grow()
      -
      - -
      -
      -height = 0
      -
      - -
      -
      -shrink()
      -
      - -
      - -
      -
      -class matplotlib.mathtext.List(elements)
      -

      Bases: matplotlib.mathtext.Box

      -

      A list of nodes (either horizontal or vertical).

      -
      -
      -grow()
      -
      - -
      -
      -shrink()
      -
      - -
      - -
      -
      -class matplotlib.mathtext.MathTextParser(output)
      -

      Bases: object

      -

      Create a MathTextParser for the given backend output.

      -
      -
      -get_depth(texstr, dpi=120, fontsize=14)
      -

      Returns the offset of the baseline from the bottom of the -image in pixels.

      -
      -
      texstr
      -
      A valid mathtext string, eg r’IQ: $sigma_i=15$’
      -
      dpi
      -
      The dots-per-inch to render the text
      -
      fontsize
      -
      The font size in points
      -
      -
      - -
      -
      -parse(s, dpi=72, prop=None)
      -

      Parse the given math expression s at the given dpi. If -prop is provided, it is a -FontProperties object -specifying the “default” font to use in the math expression, -used for all non-math text.

      -

      The results are cached, so multiple calls to parse() -with the same expression should be fast.

      -
      - -
      -
      -to_mask(texstr, dpi=120, fontsize=14)
      -
      -
      texstr
      -
      A valid mathtext string, eg r’IQ: $sigma_i=15$’
      -
      dpi
      -
      The dots-per-inch to render the text
      -
      fontsize
      -
      The font size in points
      -
      -

      Returns a tuple (array, depth)

      -
      -
        -
      • array is an NxM uint8 alpha ubyte mask array of -rasterized tex.
      • -
      • depth is the offset of the baseline from the bottom of the -image in pixels.
      • -
      -
      -
      - -
      -
      -to_png(filename, texstr, color='black', dpi=120, fontsize=14)
      -

      Writes a tex expression to a PNG file.

      -

      Returns the offset of the baseline from the bottom of the -image in pixels.

      -
      -
      filename
      -
      A writable filename or fileobject
      -
      texstr
      -
      A valid mathtext string, eg r’IQ: $sigma_i=15$’
      -
      color
      -
      A valid matplotlib color argument
      -
      dpi
      -
      The dots-per-inch to render the text
      -
      fontsize
      -
      The font size in points
      -
      -

      Returns the offset of the baseline from the bottom of the -image in pixels.

      -
      - -
      -
      -to_rgba(texstr, color='black', dpi=120, fontsize=14)
      -
      -
      texstr
      -
      A valid mathtext string, eg r’IQ: $sigma_i=15$’
      -
      color
      -
      Any matplotlib color argument
      -
      dpi
      -
      The dots-per-inch to render the text
      -
      fontsize
      -
      The font size in points
      -
      -

      Returns a tuple (array, depth)

      -
      -
        -
      • array is an NxM uint8 alpha ubyte mask array of -rasterized tex.
      • -
      • depth is the offset of the baseline from the bottom of the -image in pixels.
      • -
      -
      -
      - -
      - -
      -
      -exception matplotlib.mathtext.MathTextWarning
      -

      Bases: exceptions.Warning

      -
      - -
      -
      -class matplotlib.mathtext.MathtextBackend
      -

      Bases: object

      -

      The base class for the mathtext backend-specific code. The -purpose of MathtextBackend subclasses is to interface -between mathtext and a specific matplotlib graphics backend.

      -

      Subclasses need to override the following:

      -
      -
      -

      And optionally, if you need to use a Freetype hinting style:

      -
      -
      -
      -
      -get_hinting_type()
      -

      Get the Freetype hinting type to use with this particular -backend.

      -
      - -
      -
      -get_results(box)
      -

      Return a backend-specific tuple to return to the backend after -all processing is done.

      -
      - -
      -
      -render_filled_rect(x1, y1, x2, y2)
      -

      Draw a filled black rectangle from (x1, y1) to (x2, y2).

      -
      - -
      -
      -render_glyph(ox, oy, info)
      -

      Draw a glyph described by info to the reference point (ox, -oy).

      -
      - -
      -
      -set_canvas_size(w, h, d)
      -

      Dimension the drawing canvas

      -
      - -
      - -
      -
      -class matplotlib.mathtext.MathtextBackendAgg
      -

      Bases: matplotlib.mathtext.MathtextBackend

      -

      Render glyphs and rectangles to an FTImage buffer, which is later -transferred to the Agg image by the Agg backend.

      -
      -
      -get_hinting_type()
      -
      - -
      -
      -get_results(box, used_characters)
      -
      - -
      -
      -render_glyph(ox, oy, info)
      -
      - -
      -
      -render_rect_filled(x1, y1, x2, y2)
      -
      - -
      -
      -set_canvas_size(w, h, d)
      -
      - -
      - -
      -
      -class matplotlib.mathtext.MathtextBackendBitmap
      -

      Bases: matplotlib.mathtext.MathtextBackendAgg

      -
      -
      -get_results(box, used_characters)
      -
      - -
      - -
      -
      -class matplotlib.mathtext.MathtextBackendCairo
      -

      Bases: matplotlib.mathtext.MathtextBackend

      -

      Store information to write a mathtext rendering to the Cairo -backend.

      -
      -
      -get_results(box, used_characters)
      -
      - -
      -
      -render_glyph(ox, oy, info)
      -
      - -
      -
      -render_rect_filled(x1, y1, x2, y2)
      -
      - -
      - -
      -
      -class matplotlib.mathtext.MathtextBackendPath
      -

      Bases: matplotlib.mathtext.MathtextBackend

      -

      Store information to write a mathtext rendering to the text path -machinery.

      -
      -
      -get_results(box, used_characters)
      -
      - -
      -
      -render_glyph(ox, oy, info)
      -
      - -
      -
      -render_rect_filled(x1, y1, x2, y2)
      -
      - -
      - -
      -
      -class matplotlib.mathtext.MathtextBackendPdf
      -

      Bases: matplotlib.mathtext.MathtextBackend

      -

      Store information to write a mathtext rendering to the PDF -backend.

      -
      -
      -get_results(box, used_characters)
      -
      - -
      -
      -render_glyph(ox, oy, info)
      -
      - -
      -
      -render_rect_filled(x1, y1, x2, y2)
      -
      - -
      - -
      -
      -class matplotlib.mathtext.MathtextBackendPs
      -

      Bases: matplotlib.mathtext.MathtextBackend

      -

      Store information to write a mathtext rendering to the PostScript -backend.

      -
      -
      -get_results(box, used_characters)
      -
      - -
      -
      -render_glyph(ox, oy, info)
      -
      - -
      -
      -render_rect_filled(x1, y1, x2, y2)
      -
      - -
      - -
      -
      -class matplotlib.mathtext.MathtextBackendSvg
      -

      Bases: matplotlib.mathtext.MathtextBackend

      -

      Store information to write a mathtext rendering to the SVG -backend.

      -
      -
      -get_results(box, used_characters)
      -
      - -
      -
      -render_glyph(ox, oy, info)
      -
      - -
      -
      -render_rect_filled(x1, y1, x2, y2)
      -
      - -
      - -
      -
      -class matplotlib.mathtext.NegFil
      -

      Bases: matplotlib.mathtext.Glue

      -
      - -
      -
      -class matplotlib.mathtext.NegFill
      -

      Bases: matplotlib.mathtext.Glue

      -
      - -
      -
      -class matplotlib.mathtext.NegFilll
      -

      Bases: matplotlib.mathtext.Glue

      -
      - -
      -
      -class matplotlib.mathtext.Node
      -

      Bases: object

      -

      A node in the TeX box model

      -
      -
      -get_kerning(next)
      -
      - -
      -
      -grow()
      -

      Grows one level larger. There is no limit to how big -something can get.

      -
      - -
      -
      -render(x, y)
      -
      - -
      -
      -shrink()
      -

      Shrinks one level smaller. There are only three levels of -sizes, after which things will no longer get smaller.

      -
      - -
      - -
      -
      -class matplotlib.mathtext.Parser
      -

      Bases: object

      -

      This is the pyparsing-based parser for math expressions. It -actually parses full strings containing math expressions, in -that raw text may also appear outside of pairs of $.

      -

      The grammar is based directly on that in TeX, though it cuts a few -corners.

      -
      -
      -class State(font_output, font, font_class, fontsize, dpi)
      -

      Bases: object

      -

      Stores the state of the parser.

      -

      States are pushed and popped from a stack as necessary, and -the “current” state is always at the top of the stack.

      -
      -
      -copy()
      -
      - -
      -
      -font
      -
      - -
      - -
      -
      -Parser.accent(s, loc, toks)
      -
      - -
      -
      -Parser.auto_delim(s, loc, toks)
      -
      - -
      -
      -Parser.binom(s, loc, toks)
      -
      - -
      -
      -Parser.c_over_c(s, loc, toks)
      -
      - -
      -
      -Parser.customspace(s, loc, toks)
      -
      - -
      -
      -Parser.end_group(s, loc, toks)
      -
      - -
      -
      -Parser.font(s, loc, toks)
      -
      - -
      -
      -Parser.frac(s, loc, toks)
      -
      - -
      -
      -Parser.function(s, loc, toks)
      -
      - -
      -
      -Parser.genfrac(s, loc, toks)
      -
      - -
      -
      -Parser.get_state()
      -

      Get the current State of the parser.

      -
      - -
      -
      -Parser.group(s, loc, toks)
      -
      - -
      -
      -Parser.is_dropsub(nucleus)
      -
      - -
      -
      -Parser.is_overunder(nucleus)
      -
      - -
      -
      -Parser.is_slanted(nucleus)
      -
      - -
      -
      -Parser.main(s, loc, toks)
      -
      - -
      -
      -Parser.math(s, loc, toks)
      -
      - -
      -
      -Parser.math_string(s, loc, toks)
      -
      - -
      -
      -Parser.non_math(s, loc, toks)
      -
      - -
      -
      -Parser.operatorname(s, loc, toks)
      -
      - -
      -
      -Parser.overline(s, loc, toks)
      -
      - -
      -
      -Parser.parse(s, fonts_object, fontsize, dpi)
      -

      Parse expression s using the given fonts_object for -output, at the given fontsize and dpi.

      -

      Returns the parse tree of Node instances.

      -
      - -
      -
      -Parser.pop_state()
      -

      Pop a State off of the stack.

      -
      - -
      -
      -Parser.push_state()
      -

      Push a new State onto the stack which is just a copy -of the current state.

      -
      - -
      -
      -Parser.required_group(s, loc, toks)
      -
      - -
      -
      -Parser.simple_group(s, loc, toks)
      -
      - -
      -
      -Parser.space(s, loc, toks)
      -
      - -
      -
      -Parser.sqrt(s, loc, toks)
      -
      - -
      -
      -Parser.stackrel(s, loc, toks)
      -
      - -
      -
      -Parser.start_group(s, loc, toks)
      -
      - -
      -
      -Parser.subsuper(s, loc, toks)
      -
      - -
      -
      -Parser.symbol(s, loc, toks)
      -
      - -
      -
      -Parser.unknown_symbol(s, loc, toks)
      -
      - -
      - -
      -
      -class matplotlib.mathtext.Rule(width, height, depth, state)
      -

      Bases: matplotlib.mathtext.Box

      -

      A Rule node stands for a solid black rectangle; it has -width, depth, and height fields just as in an -Hlist. However, if any of these dimensions is inf, the -actual value will be determined by running the rule up to the -boundary of the innermost enclosing box. This is called a “running -dimension.” The width is never running in an Hlist; the -height and depth are never running in a Vlist.

      -
      -
      -render(x, y, w, h)
      -
      - -
      - -
      -
      -class matplotlib.mathtext.Ship
      -

      Bases: object

      -

      Once the boxes have been set up, this sends them to output. Since -boxes can be inside of boxes inside of boxes, the main work of -Ship is done by two mutually recursive routines, -hlist_out() and vlist_out(), which traverse the -Hlist nodes and Vlist nodes inside of horizontal -and vertical boxes. The global variables used in TeX to store -state as it processes have become member variables here.

      -
      -
      -static clamp(value)
      -
      - -
      -
      -hlist_out(box)
      -
      - -
      -
      -vlist_out(box)
      -
      - -
      - -
      -
      -class matplotlib.mathtext.SsGlue
      -

      Bases: matplotlib.mathtext.Glue

      -
      - -
      -
      -class matplotlib.mathtext.StandardPsFonts(default_font_prop)
      -

      Bases: matplotlib.mathtext.Fonts

      -

      Use the standard postscript fonts for rendering to backend_ps

      -

      Unlike the other font classes, BakomaFont and UnicodeFont, this -one requires the Ps backend.

      -
      -
      -basepath = '/home/mdboom/python/lib/python2.7/site-packages/matplotlib-1.3.x-py2.7-linux-x86_64.egg/matplotlib/mpl-data/fonts/afm'
      -
      - -
      -
      -fontmap = {'bf': 'pncb8a', None: 'psyr', 'tt': 'pcrr8a', 'it': 'pncri8a', 'cal': 'pzcmi8a', 'rm': 'pncr8a', 'sf': 'phvr8a'}
      -
      - -
      -
      -get_kern(font1, fontclass1, sym1, fontsize1, font2, fontclass2, sym2, fontsize2, dpi)
      -
      - -
      -
      -get_underline_thickness(font, fontsize, dpi)
      -
      - -
      -
      -get_xheight(font, fontsize, dpi)
      -
      - -
      - -
      -
      -class matplotlib.mathtext.StixFonts(*args, **kwargs)
      -

      Bases: matplotlib.mathtext.UnicodeFonts

      -

      A font handling class for the STIX fonts.

      -

      In addition to what UnicodeFonts provides, this class:

      -
        -
      • supports “virtual fonts” which are complete alpha numeric -character sets with different font styles at special Unicode -code points, such as “Blackboard”.
      • -
      • handles sized alternative characters for the STIXSizeX fonts.
      • -
      -
      -
      -cm_fallback = False
      -
      - -
      -
      -get_sized_alternatives_for_symbol(fontname, sym)
      -
      - -
      -
      -use_cmex = False
      -
      - -
      - -
      -
      -class matplotlib.mathtext.StixSansFonts(*args, **kwargs)
      -

      Bases: matplotlib.mathtext.StixFonts

      -

      A font handling class for the STIX fonts (that uses sans-serif -characters by default).

      -
      - -
      -
      -class matplotlib.mathtext.SubSuperCluster
      -

      Bases: matplotlib.mathtext.Hlist

      -

      SubSuperCluster is a sort of hack to get around that fact -that this code do a two-pass parse like TeX. This lets us store -enough information in the hlist itself, namely the nucleus, sub- -and super-script, such that if another script follows that needs -to be attached, it can be reconfigured on the fly.

      -
      - -
      -
      -class matplotlib.mathtext.TruetypeFonts(default_font_prop, mathtext_backend)
      -

      Bases: matplotlib.mathtext.Fonts

      -

      A generic base class for all font setups that use Truetype fonts -(through FT2Font).

      -
      -
      -class CachedFont(font)
      -
      - -
      -
      -TruetypeFonts.destroy()
      -
      - -
      -
      -TruetypeFonts.get_kern(font1, fontclass1, sym1, fontsize1, font2, fontclass2, sym2, fontsize2, dpi)
      -
      - -
      -
      -TruetypeFonts.get_underline_thickness(font, fontsize, dpi)
      -
      - -
      -
      -TruetypeFonts.get_xheight(font, fontsize, dpi)
      -
      - -
      - -
      -
      -class matplotlib.mathtext.UnicodeFonts(*args, **kwargs)
      -

      Bases: matplotlib.mathtext.TruetypeFonts

      -

      An abstract base class for handling Unicode fonts.

      -

      While some reasonably complete Unicode fonts (such as DejaVu) may -work in some situations, the only Unicode font I’m aware of with a -complete set of math symbols is STIX.

      -

      This class will “fallback” on the Bakoma fonts when a required -symbol can not be found in the font.

      -
      -
      -get_sized_alternatives_for_symbol(fontname, sym)
      -
      - -
      -
      -use_cmex = True
      -
      - -
      - -
      -
      -class matplotlib.mathtext.VCentered(elements)
      -

      Bases: matplotlib.mathtext.Hlist

      -

      A convenience class to create a Vlist whose contents are -centered within its enclosing box.

      -
      - -
      -
      -class matplotlib.mathtext.Vbox(height, depth)
      -

      Bases: matplotlib.mathtext.Box

      -

      A box with only height (zero width).

      -
      - -
      -
      -class matplotlib.mathtext.Vlist(elements, h=0.0, m='additional')
      -

      Bases: matplotlib.mathtext.List

      -

      A vertical list of boxes.

      -
      -
      -vpack(h=0.0, m='additional', l=inf)
      -

      The main duty of vpack() is to compute the dimensions of -the resulting boxes, and to adjust the glue if one of those -dimensions is pre-specified.

      -
      -
        -
      • h: specifies a height
      • -
      • m: is either ‘exactly’ or ‘additional’.
      • -
      • l: a maximum height
      • -
      -
      -

      Thus, vpack(h, 'exactly') produces a box whose height is -exactly h, while vpack(h, 'additional') yields a box -whose height is the natural height plus h. The default -values produce a box with the natural width.

      -
      - -
      - -
      -
      -class matplotlib.mathtext.Vrule(state)
      -

      Bases: matplotlib.mathtext.Rule

      -

      Convenience class to create a vertical rule.

      -
      - -
      -
      -matplotlib.mathtext.get_unicode_index(symbol) → integer
      -

      Return the integer index (from the Unicode table) of symbol. symbol -can be a single unicode character, a TeX command (i.e. r’pi’), or a -Type1 symbol name (i.e. ‘phi’).

      -
      - -
      -
      -matplotlib.mathtext.math_to_image(s, filename_or_obj, prop=None, dpi=None, format=None)
      -

      Given a math expression, renders it in a closely-clipped bounding -box to an image file.

      -
      -
      s
      -
      A math expression. The math portion should be enclosed in -dollar signs.
      -
      filename_or_obj
      -
      A filepath or writable file-like object to write the image data -to.
      -
      prop
      -
      If provided, a FontProperties() object describing the size and -style of the text.
      -
      dpi
      -
      Override the output dpi, otherwise use the default associated -with the output format.
      -
      format
      -
      The output format, e.g., ‘svg’, ‘pdf’, ‘ps’ or ‘png’. If not -provided, will be deduced from the filename.
      -
      -
      - -
      -
      -matplotlib.mathtext.unichr_safe(index)
      -

      Return the Unicode character corresponding to the index, -or the replacement character if this is a narrow build of Python -and the requested character is outside the BMP.

      -
      - -
      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/api/matplotlib_configuration_api.html b/dev/api/matplotlib_configuration_api.html deleted file mode 100644 index d52c83b832c..00000000000 --- a/dev/api/matplotlib_configuration_api.html +++ /dev/null @@ -1,353 +0,0 @@ - - - - - - - - The top level matplotlib module — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      Previous topic

      -

      API Changes

      -

      Next topic

      -

      afm (Adobe Font Metrics interface)

      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      The top level matplotlib module

      -

      This is an object-oriented plotting library.

      -

      A procedural interface is provided by the companion pyplot module, -which may be imported directly, e.g.:

      -
      from matplotlib.pyplot import *
      -
      -
      -

      To include numpy functions too, use:

      -
      from pylab import *
      -
      -
      -

      or using ipython:

      -
      ipython -pylab
      -
      -
      -

      For the most part, direct use of the object-oriented library is -encouraged when programming; pyplot is primarily for working -interactively. The -exceptions are the pyplot commands figure(), -subplot(), -subplots(), -show(), and -savefig(), which can greatly simplify scripting.

      -

      Modules include:

      -
      -
      -
      matplotlib.axes
      -
      defines the Axes class. Most pylab -commands are wrappers for Axes -methods. The axes module is the highest level of OO access to -the library.
      -
      matplotlib.figure
      -
      defines the Figure class.
      -
      matplotlib.artist
      -
      defines the Artist base class for -all classes that draw things.
      -
      matplotlib.lines
      -
      defines the Line2D class for -drawing lines and markers
      -
      matplotlib.patches
      -
      defines classes for drawing polygons
      -
      matplotlib.text
      -
      defines the Text, -TextWithDash, and -Annotate classes
      -
      matplotlib.image
      -
      defines the AxesImage and -FigureImage classes
      -
      matplotlib.collections
      -
      classes for efficient drawing of groups of lines or polygons
      -
      matplotlib.colors
      -
      classes for interpreting color specifications and for making -colormaps
      -
      matplotlib.cm
      -
      colormaps and the ScalarMappable -mixin class for providing color mapping functionality to other -classes
      -
      matplotlib.ticker
      -
      classes for calculating tick mark locations and for formatting -tick labels
      -
      matplotlib.backends
      -
      a subpackage with modules for various gui libraries and output -formats
      -
      -
      -

      The base matplotlib namespace includes:

      -
      -
      -
      rcParams
      -
      a global dictionary of default configuration settings. It is -initialized by code which may be overridded by a matplotlibrc -file.
      -
      rc()
      -
      a function for setting groups of rcParams values
      -
      use()
      -
      a function for setting the matplotlib backend. If used, this -function must be called immediately after importing matplotlib -for the first time. In particular, it must be called -before importing pylab (if pylab is imported).
      -
      -
      -

      matplotlib was initially written by John D. Hunter (1968-2012) and is now -developed and maintained by a host of others.

      -

      Occasionally the internal documentation (python docstrings) will refer -to MATLAB&reg;, a registered trademark of The MathWorks, Inc.

      -
      -
      -matplotlib.rc(group, **kwargs)
      -

      Set the current rc params. Group is the grouping for the rc, e.g., -for lines.linewidth the group is lines, for -axes.facecolor, the group is axes, and so on. Group may -also be a list or tuple of group names, e.g., (xtick, ytick). -kwargs is a dictionary attribute name/value pairs, eg:

      -
      rc('lines', linewidth=2, color='r')
      -
      -
      -

      sets the current rc params and is equivalent to:

      -
      rcParams['lines.linewidth'] = 2
      -rcParams['lines.color'] = 'r'
      -
      -
      -

      The following aliases are available to save typing for interactive -users:

      - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      AliasProperty
      ‘lw’‘linewidth’
      ‘ls’‘linestyle’
      ‘c’‘color’
      ‘fc’‘facecolor’
      ‘ec’‘edgecolor’
      ‘mew’‘markeredgewidth’
      ‘aa’‘antialiased’
      -

      Thus you could abbreviate the above rc command as:

      -
      rc('lines', lw=2, c='r')
      -
      -
      -

      Note you can use python’s kwargs dictionary facility to store -dictionaries of default parameters. e.g., you can customize the -font rc as follows:

      -
      font = {'family' : 'monospace',
      -        'weight' : 'bold',
      -        'size'   : 'larger'}
      -
      -rc('font', **font)  # pass in the font dict as kwargs
      -
      -
      -

      This enables you to easily switch between several configurations. -Use rcdefaults() to restore the default -rc params after changes.

      -
      - -
      -
      -matplotlib.rcdefaults()
      -

      Restore the default rc params. These are not the params loaded by -the rc file, but mpl’s internal params. See rc_file_defaults for -reloading the default params from the rc file

      -
      - -
      -
      -matplotlib.use(arg, warn=True, force=False)
      -

      Set the matplotlib backend to one of the known backends.

      -

      The argument is case-insensitive. warn specifies whether a -warning should be issued if a backend has already been set up. -force is an experimental flag that tells matplotlib to -attempt to initialize a new backend by reloading the backend -module.

      -
      -

      Note

      -

      This function must be called before importing pyplot for -the first time; or, if you are not using pyplot, it must be called -before importing matplotlib.backends. If warn is True, a warning -is issued if you try and call this after pylab or pyplot have been -loaded. In certain black magic use cases, e.g. -pyplot.switch_backend(), we are doing the reloading necessary to -make the backend switch work (in some cases, e.g., pure image -backends) so one can set warn=False to suppress the warnings.

      -
      -

      To find out which backend is currently set, see -matplotlib.get_backend().

      -
      - -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/api/mlab_api.html b/dev/api/mlab_api.html deleted file mode 100644 index 544850f1f7a..00000000000 --- a/dev/api/mlab_api.html +++ /dev/null @@ -1,1929 +0,0 @@ - - - - - - - - mlab — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      Table Of Contents

      - - -

      Previous topic

      -

      mathtext

      -

      Next topic

      -

      path

      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      mlab

      -
      -

      matplotlib.mlab

      -

      Numerical python functions written for compatability with MATLAB -commands with the same names.

      -
      -

      MATLAB compatible functions

      -
      -
      cohere()
      -
      Coherence (normalized cross spectral density)
      -
      csd()
      -
      Cross spectral density uing Welch’s average periodogram
      -
      detrend()
      -
      Remove the mean or best fit line from an array
      -
      find()
      -
      -
      Return the indices where some condition is true;
      -
      numpy.nonzero is similar but more general.
      -
      -
      -
      griddata()
      -
      -
      interpolate irregularly distributed data to a
      -
      regular grid.
      -
      -
      -
      prctile()
      -
      find the percentiles of a sequence
      -
      prepca()
      -
      Principal Component Analysis
      -
      psd()
      -
      Power spectral density uing Welch’s average periodogram
      -
      rk4()
      -
      A 4th order runge kutta integrator for 1D or ND systems
      -
      specgram()
      -
      Spectrogram (power spectral density over segments of time)
      -
      -
      -
      -

      Miscellaneous functions

      -

      Functions that don’t exist in MATLAB, but are useful anyway:

      -
      -
      cohere_pairs()
      -
      Coherence over all pairs. This is not a MATLAB function, but we -compute coherence a lot in my lab, and we compute it for a lot of -pairs. This function is optimized to do this efficiently by -caching the direct FFTs.
      -
      rk4()
      -
      A 4th order Runge-Kutta ODE integrator in case you ever find -yourself stranded without scipy (and the far superior -scipy.integrate tools)
      -
      contiguous_regions()
      -
      return the indices of the regions spanned by some logical mask
      -
      cross_from_below()
      -
      return the indices where a 1D array crosses a threshold from below
      -
      cross_from_above()
      -
      return the indices where a 1D array crosses a threshold from above
      -
      -
      -
      -

      record array helper functions

      -

      A collection of helper methods for numpyrecord arrays

      -
      -
      -
      -
      rec2txt()
      -
      pretty print a record array
      -
      rec2csv()
      -
      store record array in CSV file
      -
      csv2rec()
      -
      import record array from CSV file with type inspection
      -
      rec_append_fields()
      -
      adds field(s)/array(s) to record array
      -
      rec_drop_fields()
      -
      drop fields from record array
      -
      rec_join()
      -
      join two record arrays on sequence of fields
      -
      recs_join()
      -
      a simple join of multiple recarrays using a single column as a key
      -
      rec_groupby()
      -
      summarize data by groups (similar to SQL GROUP BY)
      -
      rec_summarize()
      -
      helper code to filter rec array fields into new fields
      -
      -

      For the rec viewer functions(e rec2csv), there are a bunch of Format -objects you can pass into the functions that will do things like color -negative values red, set percent formatting and scaling, etc.

      -

      Example usage:

      -
      r = csv2rec('somefile.csv', checkrows=0)
      -
      -formatd = dict(
      -    weight = FormatFloat(2),
      -    change = FormatPercent(2),
      -    cost   = FormatThousands(2),
      -    )
      -
      -
      -rec2excel(r, 'test.xls', formatd=formatd)
      -rec2csv(r, 'test.csv', formatd=formatd)
      -scroll = rec2gtk(r, formatd=formatd)
      -
      -win = gtk.Window()
      -win.set_size_request(600,800)
      -win.add(scroll)
      -win.show_all()
      -gtk.main()
      -
      -
      -
      -
      -

      Deprecated functions

      -

      The following are deprecated; please import directly from numpy (with -care–function signatures may differ):

      -
      -
      load()
      -
      load ASCII file - use numpy.loadtxt
      -
      save()
      -
      save ASCII file - use numpy.savetxt
      -
      -
      -
      -class matplotlib.mlab.FIFOBuffer(nmax)
      -

      A FIFO queue to hold incoming x, y data in a rotating buffer -using numpy arrays under the hood. It is assumed that you will -call asarrays much less frequently than you add data to the queue -– otherwise another data structure will be faster.

      -

      This can be used to support plots where data is added from a real -time feed and the plot object wants to grab data from the buffer -and plot it to screen less freqeuently than the incoming.

      -

      If you set the dataLim attr to -BBox (eg -matplotlib.Axes.dataLim), the dataLim will be updated as -new data come in.

      -

      TODO: add a grow method that will extend nmax

      -
      -

      Note

      -

      mlab seems like the wrong place for this class.

      -
      -

      Buffer up to nmax points.

      -
      -
      -add(x, y)
      -

      Add scalar x and y to the queue.

      -
      - -
      -
      -asarrays()
      -

      Return x and y as arrays; their length will be the len of -data added or nmax.

      -
      - -
      -
      -last()
      -

      Get the last x, y or None. None if no data set.

      -
      - -
      -
      -register(func, N)
      -

      Call func every time N events are passed; func signature -is func(fifo).

      -
      - -
      -
      -update_datalim_to_current()
      -

      Update the datalim in the current data in the fifo.

      -
      - -
      - -
      -
      -class matplotlib.mlab.FormatBool
      -

      Bases: matplotlib.mlab.FormatObj

      -
      -
      -fromstr(s)
      -
      - -
      -
      -toval(x)
      -
      - -
      - -
      -
      -class matplotlib.mlab.FormatDate(fmt)
      -

      Bases: matplotlib.mlab.FormatObj

      -
      -
      -fromstr(x)
      -
      - -
      -
      -toval(x)
      -
      - -
      - -
      -
      -class matplotlib.mlab.FormatDatetime(fmt='%Y-%m-%d %H:%M:%S')
      -

      Bases: matplotlib.mlab.FormatDate

      -
      -
      -fromstr(x)
      -
      - -
      - -
      -
      -class matplotlib.mlab.FormatFloat(precision=4, scale=1.0)
      -

      Bases: matplotlib.mlab.FormatFormatStr

      -
      -
      -fromstr(s)
      -
      - -
      -
      -toval(x)
      -
      - -
      - -
      -
      -class matplotlib.mlab.FormatFormatStr(fmt)
      -

      Bases: matplotlib.mlab.FormatObj

      -
      -
      -tostr(x)
      -
      - -
      - -
      -
      -class matplotlib.mlab.FormatInt
      -

      Bases: matplotlib.mlab.FormatObj

      -
      -
      -fromstr(s)
      -
      - -
      -
      -tostr(x)
      -
      - -
      -
      -toval(x)
      -
      - -
      - -
      -
      -class matplotlib.mlab.FormatMillions(precision=4)
      -

      Bases: matplotlib.mlab.FormatFloat

      -
      - -
      -
      -class matplotlib.mlab.FormatObj
      -
      -
      -fromstr(s)
      -
      - -
      -
      -tostr(x)
      -
      - -
      -
      -toval(x)
      -
      - -
      - -
      -
      -class matplotlib.mlab.FormatPercent(precision=4)
      -

      Bases: matplotlib.mlab.FormatFloat

      -
      - -
      -
      -class matplotlib.mlab.FormatString
      -

      Bases: matplotlib.mlab.FormatObj

      -
      -
      -tostr(x)
      -
      - -
      - -
      -
      -class matplotlib.mlab.FormatThousands(precision=4)
      -

      Bases: matplotlib.mlab.FormatFloat

      -
      - -
      -
      -class matplotlib.mlab.PCA(a)
      -

      compute the SVD of a and store data for PCA. Use project to -project the data onto a reduced set of dimensions

      -

      Inputs:

      -
      -
      a: a numobservations x numdims array
      -

      Attrs:

      -
      -

      a a centered unit sigma version of input a

      -

      numrows, numcols: the dimensions of a

      -

      mu : a numdims array of means of a

      -

      sigma : a numdims array of atandard deviation of a

      -

      fracs : the proportion of variance of each of the principal components

      -

      Wt : the weight vector for projecting a numdims point or array into PCA space

      -

      Y : a projected into PCA space

      -
      -

      The factor loadings are in the Wt factor, ie the factor -loadings for the 1st principal component are given by Wt[0]

      -
      -
      -center(x)
      -

      center the data using the mean and sigma from training set a

      -
      - -
      -
      -project(x, minfrac=0.0)
      -

      project x onto the principle axes, dropping any axes where fraction of variance<minfrac

      -
      - -
      - -
      -
      -matplotlib.mlab.amap(function, sequence[, sequence, ...]) → array.
      -

      Works like map(), but it returns an array. This is just a -convenient shorthand for numpy.array(map(...)).

      -
      - -
      -
      -matplotlib.mlab.base_repr(number, base=2, padding=0)
      -

      Return the representation of a number in any given base.

      -
      - -
      -
      -matplotlib.mlab.binary_repr(number, max_length=1025)
      -

      Return the binary representation of the input number as a -string.

      -

      This is more efficient than using base_repr() with base 2.

      -

      Increase the value of max_length for very large numbers. Note that -on 32-bit machines, 2**1023 is the largest integer power of 2 -which can be converted to a Python float.

      -
      - -
      -
      -matplotlib.mlab.bivariate_normal(X, Y, sigmax=1.0, sigmay=1.0, mux=0.0, muy=0.0, sigmaxy=0.0)
      -

      Bivariate Gaussian distribution for equal shape X, Y.

      -

      See bivariate normal -at mathworld.

      -
      - -
      -
      -matplotlib.mlab.center_matrix(M, dim=0)
      -

      Return the matrix M with each row having zero mean and unit std.

      -

      If dim = 1 operate on columns instead of rows. (dim is -opposite to the numpy axis kwarg.)

      -
      - -
      -
      -matplotlib.mlab.cohere(x, y, NFFT=256, Fs=2, detrend=<function detrend_none at 0x34d25f0>, window=<function window_hanning at 0x34d2398>, noverlap=0, pad_to=None, sides='default', scale_by_freq=None)
      -

      The coherence between x and y. Coherence is the normalized -cross spectral density:

      -
      -
      x, y
      -
      Array or sequence containing the data
      -
      -

      Keyword arguments:

      -
      -
      -
      NFFT: integer
      -
      The number of data points used in each block for the FFT. -Must be even; a power 2 is most efficient. The default value is 256. -This should NOT be used to get zero padding, or the scaling of the -result will be incorrect. Use pad_to for this instead.
      -
      Fs: scalar
      -
      The sampling frequency (samples per time unit). It is used -to calculate the Fourier frequencies, freqs, in cycles per time -unit. The default value is 2.
      -
      detrend: callable
      -
      The function applied to each segment before fft-ing, -designed to remove the mean or linear trend. Unlike in -MATLAB, where the detrend parameter is a vector, in -matplotlib is it a function. The pylab -module defines detrend_none(), -detrend_mean(), and -detrend_linear(), but you can use -a custom function as well.
      -
      window: callable or ndarray
      -
      A function or a vector of length NFFT. To create window -vectors see window_hanning(), window_none(), -numpy.blackman(), numpy.hamming(), -numpy.bartlett(), scipy.signal(), -scipy.signal.get_window(), etc. The default is -window_hanning(). If a function is passed as the -argument, it must take a data segment as an argument and -return the windowed version of the segment.
      -
      pad_to: integer
      -
      The number of points to which the data segment is padded when -performing the FFT. This can be different from NFFT, which -specifies the number of data points used. While not increasing -the actual resolution of the psd (the minimum distance between -resolvable peaks), this can give more points in the plot, -allowing for more detail. This corresponds to the n parameter -in the call to fft(). The default is None, which sets pad_to -equal to NFFT
      -
      sides: [ ‘default’ | ‘onesided’ | ‘twosided’ ]
      -
      Specifies which sides of the PSD to return. Default gives the -default behavior, which returns one-sided for real data and both -for complex data. ‘onesided’ forces the return of a one-sided PSD, -while ‘twosided’ forces two-sided.
      -
      scale_by_freq: boolean
      -
      Specifies whether the resulting density values should be scaled -by the scaling frequency, which gives density in units of Hz^-1. -This allows for integration over the returned frequency values. -The default is True for MATLAB compatibility.
      -
      noverlap: integer
      -
      The number of points of overlap between blocks. The default value -is 0 (no overlap).
      -
      -
      -

      The return value is the tuple (Cxy, f), where f are the -frequencies of the coherence vector. For cohere, scaling the -individual densities by the sampling frequency has no effect, -since the factors cancel out.

      -
      -

      See also

      -
      -
      psd() and csd()
      -
      For information about the methods used to compute -, and .
      -
      -
      -
      - -
      -
      -matplotlib.mlab.cohere_pairs(X, ij, NFFT=256, Fs=2, detrend=<function detrend_none at 0x34d25f0>, window=<function window_hanning at 0x34d2398>, noverlap=0, preferSpeedOverMemory=True, progressCallback=<function donothing_callback at 0x34d2b18>, returnPxx=False)
      -

      Call signature:

      -
      Cxy, Phase, freqs = cohere_pairs( X, ij, ...)
      -
      -
      -

      Compute the coherence and phase for all pairs ij, in X.

      -

      X is a numSamples * numCols array

      -

      ij is a list of tuples. Each tuple is a pair of indexes into -the columns of X for which you want to compute coherence. For -example, if X has 64 columns, and you want to compute all -nonredundant pairs, define ij as:

      -
      ij = []
      -for i in range(64):
      -    for j in range(i+1,64):
      -        ij.append( (i,j) )
      -
      -
      -

      preferSpeedOverMemory is an optional bool. Defaults to true. If -False, limits the caching by only making one, rather than two, -complex cache arrays. This is useful if memory becomes critical. -Even when preferSpeedOverMemory is False, cohere_pairs() -will still give significant performace gains over calling -cohere() for each pair, and will use subtantially less -memory than if preferSpeedOverMemory is True. In my tests with -a 43000,64 array over all nonredundant pairs, -preferSpeedOverMemory = True delivered a 33% performance boost -on a 1.7GHZ Athlon with 512MB RAM compared with -preferSpeedOverMemory = False. But both solutions were more -than 10x faster than naively crunching all possible pairs through -cohere().

      -

      Returns:

      -
      (Cxy, Phase, freqs)
      -
      -
      -

      where:

      -
      -
        -
      • Cxy: dictionary of (i, j) tuples -> coherence vector for -that pair. I.e., Cxy[(i,j) = cohere(X[:,i], X[:,j]). -Number of dictionary keys is len(ij).

        -
      • -
      • Phase: dictionary of phases of the cross spectral density at -each frequency for each pair. Keys are (i, j).

        -
      • -
      • -
        freqs: vector of frequencies, equal in length to either the
        -

        coherence or phase vectors for any (i, j) key.

        -
        -
        -
      • -
      -
      -

      e.g., to make a coherence Bode plot:

      -
      subplot(211)
      -plot( freqs, Cxy[(12,19)])
      -subplot(212)
      -plot( freqs, Phase[(12,19)])
      -
      -
      -

      For a large number of pairs, cohere_pairs() can be much more -efficient than just calling cohere() for each pair, because -it caches most of the intensive computations. If is the -number of pairs, this function is for most of the -heavy lifting, whereas calling cohere for each pair is -. However, because of the caching, it is also more -memory intensive, making 2 additional complex arrays with -approximately the same number of elements as X.

      -

      See test/cohere_pairs_test.py in the src tree for an -example script that shows that this cohere_pairs() and -cohere() give the same results for a given pair.

      -
      -

      See also

      -
      -
      psd()
      -
      For information about the methods used to compute -, and .
      -
      -
      -
      - -
      -
      -matplotlib.mlab.contiguous_regions(mask)
      -

      return a list of (ind0, ind1) such that mask[ind0:ind1].all() is -True and we cover all such regions

      -

      TODO: this is a pure python implementation which probably has a much faster numpy impl

      -
      - -
      -
      -matplotlib.mlab.cross_from_above(x, threshold)
      -

      return the indices into x where x crosses some threshold from -below, eg the i’s where:

      -
      x[i-1]>threshold and x[i]<=threshold
      -
      -
      - -
      - -
      -
      -matplotlib.mlab.cross_from_below(x, threshold)
      -

      return the indices into x where x crosses some threshold from -below, eg the i’s where:

      -
      x[i-1]<threshold and x[i]>=threshold
      -
      -
      -

      Example code:

      -
      import matplotlib.pyplot as plt
      -
      -t = np.arange(0.0, 2.0, 0.1)
      -s = np.sin(2*np.pi*t)
      -
      -fig = plt.figure()
      -ax = fig.add_subplot(111)
      -ax.plot(t, s, '-o')
      -ax.axhline(0.5)
      -ax.axhline(-0.5)
      -
      -ind = cross_from_below(s, 0.5)
      -ax.vlines(t[ind], -1, 1)
      -
      -ind = cross_from_above(s, -0.5)
      -ax.vlines(t[ind], -1, 1)
      -
      -plt.show()
      -
      -
      - -
      - -
      -
      -matplotlib.mlab.csd(x, y, NFFT=256, Fs=2, detrend=<function detrend_none at 0x34d25f0>, window=<function window_hanning at 0x34d2398>, noverlap=0, pad_to=None, sides='default', scale_by_freq=None)
      -

      The cross power spectral density by Welch’s average periodogram -method. The vectors x and y are divided into NFFT length -blocks. Each block is detrended by the function detrend and -windowed by the function window. noverlap gives the length -of the overlap between blocks. The product of the direct FFTs -of x and y are averaged over each segment to compute Pxy, -with a scaling to correct for power loss due to windowing.

      -

      If len(x) < NFFT or len(y) < NFFT, they will be zero -padded to NFFT.

      -
      -
      x, y
      -
      Array or sequence containing the data
      -
      -

      Keyword arguments:

      -
      -
      -
      NFFT: integer
      -
      The number of data points used in each block for the FFT. -Must be even; a power 2 is most efficient. The default value is 256. -This should NOT be used to get zero padding, or the scaling of the -result will be incorrect. Use pad_to for this instead.
      -
      Fs: scalar
      -
      The sampling frequency (samples per time unit). It is used -to calculate the Fourier frequencies, freqs, in cycles per time -unit. The default value is 2.
      -
      detrend: callable
      -
      The function applied to each segment before fft-ing, -designed to remove the mean or linear trend. Unlike in -MATLAB, where the detrend parameter is a vector, in -matplotlib is it a function. The pylab -module defines detrend_none(), -detrend_mean(), and -detrend_linear(), but you can use -a custom function as well.
      -
      window: callable or ndarray
      -
      A function or a vector of length NFFT. To create window -vectors see window_hanning(), window_none(), -numpy.blackman(), numpy.hamming(), -numpy.bartlett(), scipy.signal(), -scipy.signal.get_window(), etc. The default is -window_hanning(). If a function is passed as the -argument, it must take a data segment as an argument and -return the windowed version of the segment.
      -
      pad_to: integer
      -
      The number of points to which the data segment is padded when -performing the FFT. This can be different from NFFT, which -specifies the number of data points used. While not increasing -the actual resolution of the psd (the minimum distance between -resolvable peaks), this can give more points in the plot, -allowing for more detail. This corresponds to the n parameter -in the call to fft(). The default is None, which sets pad_to -equal to NFFT
      -
      sides: [ ‘default’ | ‘onesided’ | ‘twosided’ ]
      -
      Specifies which sides of the PSD to return. Default gives the -default behavior, which returns one-sided for real data and both -for complex data. ‘onesided’ forces the return of a one-sided PSD, -while ‘twosided’ forces two-sided.
      -
      scale_by_freq: boolean
      -
      Specifies whether the resulting density values should be scaled -by the scaling frequency, which gives density in units of Hz^-1. -This allows for integration over the returned frequency values. -The default is True for MATLAB compatibility.
      -
      noverlap: integer
      -
      The number of points of overlap between blocks. The default value -is 0 (no overlap).
      -
      -
      -

      Returns the tuple (Pxy, freqs).

      -
      -
      Refs:
      -
      Bendat & Piersol – Random Data: Analysis and Measurement -Procedures, John Wiley & Sons (1986)
      -
      -
      - -
      -
      -matplotlib.mlab.csv2rec(fname, comments='#', skiprows=0, checkrows=0, delimiter=', ', converterd=None, names=None, missing='', missingd=None, use_mrecords=False, dayfirst=False, yearfirst=False)
      -

      Load data from comma/space/tab delimited file in fname into a -numpy record array and return the record array.

      -

      If names is None, a header row is required to automatically -assign the recarray names. The headers will be lower cased, -spaces will be converted to underscores, and illegal attribute -name characters removed. If names is not None, it is a -sequence of names to use for the column names. In this case, it -is assumed there is no header row.

      -
        -
      • fname: can be a filename or a file handle. Support for gzipped -files is automatic, if the filename ends in ‘.gz’

        -
      • -
      • comments: the character used to indicate the start of a comment -in the file, or None to switch off the removal of comments

        -
      • -
      • skiprows: is the number of rows from the top to skip

        -
      • -
      • checkrows: is the number of rows to check to validate the column -data type. When set to zero all rows are validated.

        -
      • -
      • converterd: if not None, is a dictionary mapping column number or -munged column name to a converter function.

        -
      • -
      • names: if not None, is a list of header names. In this case, no -header will be read from the file

        -
      • -
      • missingd is a dictionary mapping munged column names to field values -which signify that the field does not contain actual data and should -be masked, e.g., ‘0000-00-00’ or ‘unused’

        -
      • -
      • missing: a string whose value signals a missing field regardless of -the column it appears in

        -
      • -
      • use_mrecords: if True, return an mrecords.fromrecords record array if any of the data are missing

        -
      • -
      • dayfirst: default is False so that MM-DD-YY has precedence over -DD-MM-YY. See http://labix.org/python-dateutil#head-b95ce2094d189a89f80f5ae52a05b4ab7b41af47 -for further information.

        -
      • -
      • yearfirst: default is False so that MM-DD-YY has precedence over -YY-MM-DD. See http://labix.org/python-dateutil#head-b95ce2094d189a89f80f5ae52a05b4ab7b41af47 -for further information.

        -

        If no rows are found, None is returned – see examples/loadrec.py

        -
      • -
      -
      - -
      -
      -matplotlib.mlab.csvformat_factory(format)
      -
      - -
      -
      -matplotlib.mlab.demean(x, axis=0)
      -

      Return x minus its mean along the specified axis

      -
      - -
      -
      -matplotlib.mlab.detrend(x, key=None)
      -
      - -
      -
      -matplotlib.mlab.detrend_linear(y)
      -

      Return y minus best fit line; ‘linear’ detrending

      -
      - -
      -
      -matplotlib.mlab.detrend_mean(x)
      -

      Return x minus the mean(x)

      -
      - -
      -
      -matplotlib.mlab.detrend_none(x)
      -

      Return x: no detrending

      -
      - -
      -
      -matplotlib.mlab.dist(x, y)
      -

      Return the distance between two points.

      -
      - -
      -
      -matplotlib.mlab.dist_point_to_segment(p, s0, s1)
      -

      Get the distance of a point to a segment.

      -
      -
      p, s0, s1 are xy sequences
      -

      This algorithm from -http://softsurfer.com/Archive/algorithm_0102/algorithm_0102.htm#Distance%20to%20Ray%20or%20Segment

      -
      - -
      -
      -matplotlib.mlab.distances_along_curve(X)
      -

      Computes the distance between a set of successive points in N dimensions.

      -

      Where X is an M x N array or matrix. The distances between -successive rows is computed. Distance is the standard Euclidean -distance.

      -
      - -
      -
      -matplotlib.mlab.donothing_callback(*args)
      -
      - -
      -
      -matplotlib.mlab.entropy(y, bins)
      -

      Return the entropy of the data in y.

      -

      where is the probability of observing y in the - bin of bins. bins can be a number of bins or a -range of bins; see numpy.histogram().

      -

      Compare S with analytic calculation for a Gaussian:

      -
      x = mu + sigma * randn(200000)
      -Sanalytic = 0.5 * ( 1.0 + log(2*pi*sigma**2.0) )
      -
      -
      -
      - -
      -
      -matplotlib.mlab.exp_safe(x)
      -

      Compute exponentials which safely underflow to zero.

      -

      Slow, but convenient to use. Note that numpy provides proper -floating point exception handling with access to the underlying -hardware.

      -
      - -
      -
      -matplotlib.mlab.fftsurr(x, detrend=<function detrend_none at 0x34d25f0>, window=<function window_none at 0x34d2410>)
      -

      Compute an FFT phase randomized surrogate of x.

      -
      - -
      -
      -matplotlib.mlab.find(condition)
      -

      Return the indices where ravel(condition) is true

      -
      - -
      -
      -matplotlib.mlab.frange([start], stop[, step, keywords]) → array of floats
      -

      Return a numpy ndarray containing a progression of floats. Similar to -numpy.arange(), but defaults to a closed interval.

      -

      frange(x0, x1) returns [x0, x0+1, x0+2, ..., x1]; start -defaults to 0, and the endpoint is included. This behavior is -different from that of range() and -numpy.arange(). This is deliberate, since frange() -will probably be more useful for generating lists of points for -function evaluation, and endpoints are often desired in this -use. The usual behavior of range() can be obtained by -setting the keyword closed = 0, in this case, frange() -basically becomes :func:numpy.arange`.

      -

      When step is given, it specifies the increment (or -decrement). All arguments can be floating point numbers.

      -

      frange(x0,x1,d) returns [x0,x0+d,x0+2d,...,xfin] where -xfin <= x1.

      -

      frange() can also be called with the keyword npts. This -sets the number of points the list should contain (and overrides -the value step might have been given). numpy.arange() -doesn’t offer this option.

      -

      Examples:

      -
      >>> frange(3)
      -array([ 0.,  1.,  2.,  3.])
      ->>> frange(3,closed=0)
      -array([ 0.,  1.,  2.])
      ->>> frange(1,6,2)
      -array([1, 3, 5])   or 1,3,5,7, depending on floating point vagueries
      ->>> frange(1,6.5,npts=5)
      -array([ 1.   ,  2.375,  3.75 ,  5.125,  6.5  ])
      -
      -
      -
      - -
      -
      -matplotlib.mlab.get_formatd(r, formatd=None)
      -

      build a formatd guaranteed to have a key for every dtype name

      -
      - -
      -
      -matplotlib.mlab.get_sparse_matrix(M, N, frac=0.1)
      -

      Return a M x N sparse matrix with frac elements randomly -filled.

      -
      - -
      -
      -matplotlib.mlab.get_xyz_where(Z, Cond)
      -

      Z and Cond are M x N matrices. Z are data and Cond is -a boolean matrix where some condition is satisfied. Return value -is (x, y, z) where x and y are the indices into Z and -z are the values of Z at those indices. x, y, and z are -1D arrays.

      -
      - -
      -
      -matplotlib.mlab.griddata(x, y, z, xi, yi, interp='nn')
      -

      zi = griddata(x,y,z,xi,yi) fits a surface of the form z = -f*(*x, y) to the data in the (usually) nonuniformly spaced -vectors (x, y, z). griddata() interpolates this -surface at the points specified by (xi, yi) to produce -zi. xi and yi must describe a regular grid, can be either 1D -or 2D, but must be monotonically increasing.

      -

      A masked array is returned if any grid points are outside convex -hull defined by input data (no extrapolation is done).

      -

      If interp keyword is set to ‘nn‘ (default), -uses natural neighbor interpolation based on Delaunay -triangulation. By default, this algorithm is provided by the -matplotlib.delaunay package, written by Robert Kern. The -triangulation algorithm in this package is known to fail on some -nearly pathological cases. For this reason, a separate toolkit -(mpl_tookits.natgrid) has been created that provides a more -robust algorithm fof triangulation and interpolation. This -toolkit is based on the NCAR natgrid library, which contains code -that is not redistributable under a BSD-compatible license. When -installed, this function will use the mpl_toolkits.natgrid -algorithm, otherwise it will use the built-in -matplotlib.delaunay package.

      -

      If the interp keyword is set to ‘linear‘, then linear interpolation -is used instead of natural neighbor. In this case, the output grid -is assumed to be regular with a constant grid spacing in both the x and -y directions. For regular grids with nonconstant grid spacing, you -must use natural neighbor interpolation. Linear interpolation is only valid if -matplotlib.delaunay package is used - mpl_tookits.natgrid -only provides natural neighbor interpolation.

      -

      The natgrid matplotlib toolkit can be downloaded from -http://sourceforge.net/project/showfiles.php?group_id=80706&package_id=142792

      -
      - -
      -
      -matplotlib.mlab.identity(n, rank=2, dtype='l', typecode=None)
      -

      Returns the identity matrix of shape (n, n, ..., n) (rank r).

      -

      For ranks higher than 2, this object is simply a multi-index Kronecker -delta:

      -
                          /  1  if i0=i1=...=iR,
      -id[i0,i1,...,iR] = -|
      -                    \  0  otherwise.
      -
      -

      Optionally a dtype (or typecode) may be given (it defaults to ‘l’).

      -

      Since rank defaults to 2, this function behaves in the default case (when -only n is given) like numpy.identity(n) – but surprisingly, it is -much faster.

      -
      - -
      -
      -matplotlib.mlab.inside_poly(points, verts)
      -

      points is a sequence of x, y points. -verts is a sequence of x, y vertices of a polygon.

      -

      Return value is a sequence of indices into points for the points -that are inside the polygon.

      -
      - -
      -
      -matplotlib.mlab.is_closed_polygon(X)
      -

      Tests whether first and last object in a sequence are the same. These are -presumably coordinates on a polygonal curve, in which case this function -tests if that curve is closed.

      -
      - -
      -
      -matplotlib.mlab.ispower2(n)
      -

      Returns the log base 2 of n if n is a power of 2, zero otherwise.

      -

      Note the potential ambiguity if n == 1: 2**0 == 1, interpret accordingly.

      -
      - -
      -
      -matplotlib.mlab.isvector(X)
      -

      Like the MATLAB function with the same name, returns True -if the supplied numpy array or matrix X looks like a vector, -meaning it has a one non-singleton axis (i.e., it can have -multiple axes, but all must have length 1, except for one of -them).

      -

      If you just want to see if the array has 1 axis, use X.ndim == 1.

      -
      - -
      -
      -matplotlib.mlab.l1norm(a)
      -

      Return the l1 norm of a, flattened out.

      -

      Implemented as a separate function (not a call to norm() for speed).

      -
      - -
      -
      -matplotlib.mlab.l2norm(a)
      -

      Return the l2 norm of a, flattened out.

      -

      Implemented as a separate function (not a call to norm() for speed).

      -
      - -
      -
      -matplotlib.mlab.less_simple_linear_interpolation(x, y, xi, extrap=False)
      -

      This function provides simple (but somewhat less so than -cbook.simple_linear_interpolation()) linear interpolation. -simple_linear_interpolation() will give a list of point -between a start and an end, while this does true linear -interpolation at an arbitrary set of points.

      -

      This is very inefficient linear interpolation meant to be used -only for a small number of points in relatively non-intensive use -cases. For real linear interpolation, use scipy.

      -
      - -
      -
      -matplotlib.mlab.levypdf(x, gamma, alpha)
      -

      Returm the levy pdf evaluated at x for params gamma, alpha

      -
      - -
      -
      -matplotlib.mlab.liaupunov(x, fprime)
      -

      x is a very long trajectory from a map, and fprime returns the -derivative of x.

      -

      This function will be removed from matplotlib.

      -

      Returns : -.. math:

      -
      \lambda = \frac{1}{n}\sum \ln|f^'(x_i)|
      -
      -
      -

      See also

      -
      -
      Lyapunov Exponent
      -
      Sec 10.5 Strogatz (1994) “Nonlinear Dynamics and Chaos”. -Wikipedia article on Lyapunov Exponent.
      -
      -
      -
      -

      Note

      -

      What the function here calculates may not be what you really want; -caveat emptor.

      -

      It also seems that this function’s name is badly misspelled.

      -
      -
      - -
      -
      -matplotlib.mlab.load(fname, comments='#', delimiter=None, converters=None, skiprows=0, usecols=None, unpack=False, dtype=<type 'numpy.float64'>)
      -

      Load ASCII data from fname into an array and return the array.

      -

      Deprecated: use numpy.loadtxt.

      -

      The data must be regular, same number of values in every row

      -

      fname can be a filename or a file handle. Support for gzipped -files is automatic, if the filename ends in ‘.gz’.

      -

      matfile data is not supported; for that, use scipy.io.mio -module.

      -

      Example usage:

      -
      X = load('test.dat')  # data in two columns
      -t = X[:,0]
      -y = X[:,1]
      -
      -
      -

      Alternatively, you can do the same with “unpack”; see below:

      -
      X = load('test.dat')    # a matrix of data
      -x = load('test.dat')    # a single column of data
      -
      -
      -
        -
      • comments: the character used to indicate the start of a comment -in the file

        -
      • -
      • delimiter is a string-like character used to seperate values -in the file. If delimiter is unspecified or None, any -whitespace string is a separator.

        -
      • -
      • converters, if not None, is a dictionary mapping column number to -a function that will convert that column to a float (or the optional -dtype if specified). e.g., if column 0 is a date string:

        -
        converters = {0:datestr2num}
        -
        -
        -
      • -
      • skiprows is the number of rows from the top to skip.

        -
      • -
      • usecols, if not None, is a sequence of integer column indexes to -extract where 0 is the first column, eg usecols=[1,4,5] to extract -just the 2nd, 5th and 6th columns

        -
      • -
      • unpack, if True, will transpose the matrix allowing you to unpack -into named arguments on the left hand side:

        -
        t,y = load('test.dat', unpack=True) # for  two column data
        -x,y,z = load('somefile.dat', usecols=[3,5,7], unpack=True)
        -
        -
        -
      • -
      • dtype: the array will have this dtype. default: numpy.float_

        -
      • -
      -
      -

      See also

      -
      -
      See examples/pylab_examples/load_converter.py in the source tree
      -
      Exercises many of these options.
      -
      -
      -
      - -
      -
      -matplotlib.mlab.log2(x, ln2=0.6931471805599453)
      -

      Return the log(x) in base 2.

      -

      This is a _slow_ function but which is guaranteed to return the correct -integer value if the input is an integer exact power of 2.

      -
      - -
      -
      -matplotlib.mlab.logspace(xmin, xmax, N)
      -
      - -
      -
      -matplotlib.mlab.longest_contiguous_ones(x)
      -

      Return the indices of the longest stretch of contiguous ones in x, -assuming x is a vector of zeros and ones. If there are two -equally long stretches, pick the first.

      -
      - -
      -
      -matplotlib.mlab.longest_ones(x)
      -

      alias for longest_contiguous_ones

      -
      - -
      -
      -matplotlib.mlab.movavg(x, n)
      -

      Compute the len(n) moving average of x.

      -
      - -
      -
      -matplotlib.mlab.norm_flat(a, p=2)
      -

      norm(a,p=2) -> l-p norm of a.flat

      -

      Return the l-p norm of a, considered as a flat array. This is NOT a true -matrix norm, since arrays of arbitrary rank are always flattened.

      -

      p can be a number or the string ‘Infinity’ to get the L-infinity norm.

      -
      - -
      -
      -matplotlib.mlab.normpdf(x, *args)
      -

      Return the normal pdf evaluated at x; args provides mu, sigma

      -
      - -
      -
      -matplotlib.mlab.offset_line(y, yerr)
      -

      Offsets an array y by +/- an error and returns a tuple (y - err, y + err).

      -

      The error term can be:

      -
        -
      • A scalar. In this case, the returned tuple is obvious.

        -
      • -
      • A vector of the same length as y. The quantities y +/- err are computed -component-wise.

        -
      • -
      • A tuple of length 2. In this case, yerr[0] is the error below y and -yerr[1] is error above y. For example:

        -
        from pylab import *
        -x = linspace(0, 2*pi, num=100, endpoint=True)
        -y = sin(x)
        -y_minus, y_plus = mlab.offset_line(y, 0.1)
        -plot(x, y)
        -fill_between(x, ym, y2=yp)
        -show()
        -
        -
        -
      • -
      -
      - -
      -
      -matplotlib.mlab.path_length(X)
      -

      Computes the distance travelled along a polygonal curve in N dimensions.

      -

      Where X is an M x N array or matrix. Returns an array of -length M consisting of the distance along the curve at each point -(i.e., the rows of X).

      -
      - -
      -
      -matplotlib.mlab.poly_below(xmin, xs, ys)
      -

      Given a sequence of xs and ys, return the vertices of a -polygon that has a horizontal base at xmin and an upper bound at -the ys. xmin is a scalar.

      -

      Intended for use with matplotlib.axes.Axes.fill(), eg:

      -
      xv, yv = poly_below(0, x, y)
      -ax.fill(xv, yv)
      -
      -
      -
      - -
      -
      -matplotlib.mlab.poly_between(x, ylower, yupper)
      -

      Given a sequence of x, ylower and yupper, return the polygon -that fills the regions between them. ylower or yupper can be -scalar or iterable. If they are iterable, they must be equal in -length to x.

      -

      Return value is x, y arrays for use with -matplotlib.axes.Axes.fill().

      -
      - -
      -
      -matplotlib.mlab.prctile(x, p=(0.0, 25.0, 50.0, 75.0, 100.0))
      -

      Return the percentiles of x. p can either be a sequence of -percentile values or a scalar. If p is a sequence, the ith -element of the return sequence is the p*(i)-th percentile of *x. -If p is a scalar, the largest value of x less than or equal to -the p percentage point in the sequence is returned.

      -
      - -
      -
      -matplotlib.mlab.prctile_rank(x, p)
      -

      Return the rank for each element in x, return the rank -0..len(p). e.g., if p = (25, 50, 75), the return value will be a -len(x) array with values in [0,1,2,3] where 0 indicates the -value is less than the 25th percentile, 1 indicates the value is ->= the 25th and < 50th percentile, ... and 3 indicates the value -is above the 75th percentile cutoff.

      -

      p is either an array of percentiles in [0..100] or a scalar which -indicates how many quantiles of data you want ranked.

      -
      - -
      -
      -matplotlib.mlab.prepca(P, frac=0)
      -

      WARNING: this function is deprecated – please see class PCA instead

      -

      Compute the principal components of P. P is a (numVars, -numObs) array. frac is the minimum fraction of variance that a -component must contain to be included.

      -

      Return value is a tuple of the form (Pcomponents, Trans, -fracVar) where:

      -
      -
        -
      • Pcomponents : a (numVars, numObs) array

        -
      • -
      • -
        Trans : the weights matrix, ie, Pcomponents = Trans *
        -

        P

        -
        -
        -
      • -
      • -
        fracVar : the fraction of the variance accounted for by each
        -

        component returned

        -
        -
        -
      • -
      -
      -

      A similar function of the same name was in the MATLAB -R13 Neural Network Toolbox but is not found in later versions; -its successor seems to be called “processpcs”.

      -
      - -
      -
      -matplotlib.mlab.psd(x, NFFT=256, Fs=2, detrend=<function detrend_none at 0x34d25f0>, window=<function window_hanning at 0x34d2398>, noverlap=0, pad_to=None, sides='default', scale_by_freq=None)
      -

      The power spectral density by Welch’s average periodogram method. -The vector x is divided into NFFT length blocks. Each block -is detrended by the function detrend and windowed by the function -window. noverlap gives the length of the overlap between blocks. -The absolute(fft(block))**2 of each segment are averaged to compute -Pxx, with a scaling to correct for power loss due to windowing.

      -

      If len(x) < NFFT, it will be zero padded to NFFT.

      -
      -
      x
      -
      Array or sequence containing the data
      -
      -

      Keyword arguments:

      -
      -
      -
      NFFT: integer
      -
      The number of data points used in each block for the FFT. -Must be even; a power 2 is most efficient. The default value is 256. -This should NOT be used to get zero padding, or the scaling of the -result will be incorrect. Use pad_to for this instead.
      -
      Fs: scalar
      -
      The sampling frequency (samples per time unit). It is used -to calculate the Fourier frequencies, freqs, in cycles per time -unit. The default value is 2.
      -
      detrend: callable
      -
      The function applied to each segment before fft-ing, -designed to remove the mean or linear trend. Unlike in -MATLAB, where the detrend parameter is a vector, in -matplotlib is it a function. The pylab -module defines detrend_none(), -detrend_mean(), and -detrend_linear(), but you can use -a custom function as well.
      -
      window: callable or ndarray
      -
      A function or a vector of length NFFT. To create window -vectors see window_hanning(), window_none(), -numpy.blackman(), numpy.hamming(), -numpy.bartlett(), scipy.signal(), -scipy.signal.get_window(), etc. The default is -window_hanning(). If a function is passed as the -argument, it must take a data segment as an argument and -return the windowed version of the segment.
      -
      pad_to: integer
      -
      The number of points to which the data segment is padded when -performing the FFT. This can be different from NFFT, which -specifies the number of data points used. While not increasing -the actual resolution of the psd (the minimum distance between -resolvable peaks), this can give more points in the plot, -allowing for more detail. This corresponds to the n parameter -in the call to fft(). The default is None, which sets pad_to -equal to NFFT
      -
      sides: [ ‘default’ | ‘onesided’ | ‘twosided’ ]
      -
      Specifies which sides of the PSD to return. Default gives the -default behavior, which returns one-sided for real data and both -for complex data. ‘onesided’ forces the return of a one-sided PSD, -while ‘twosided’ forces two-sided.
      -
      scale_by_freq: boolean
      -
      Specifies whether the resulting density values should be scaled -by the scaling frequency, which gives density in units of Hz^-1. -This allows for integration over the returned frequency values. -The default is True for MATLAB compatibility.
      -
      noverlap: integer
      -
      The number of points of overlap between blocks. The default value -is 0 (no overlap).
      -
      -
      -

      Returns the tuple (Pxx, freqs).

      -

      Refs:

      -
      -
      Bendat & Piersol – Random Data: Analysis and Measurement -Procedures, John Wiley & Sons (1986)
      -
      - -
      -
      -matplotlib.mlab.quad2cubic(q0x, q0y, q1x, q1y, q2x, q2y)
      -

      Converts a quadratic Bezier curve to a cubic approximation.

      -

      The inputs are the x and y coordinates of the three control -points of a quadratic curve, and the output is a tuple of x and -y coordinates of the four control points of the cubic curve.

      -
      - -
      -
      -matplotlib.mlab.rec2csv(r, fname, delimiter=', ', formatd=None, missing='', missingd=None, withheader=True)
      -

      Save the data from numpy recarray r into a -comma-/space-/tab-delimited file. The record array dtype names -will be used for column headers.

      -
      -
      fname: can be a filename or a file handle. Support for gzipped
      -
      files is automatic, if the filename ends in ‘.gz’
      -
      withheader: if withheader is False, do not write the attribute
      -
      names in the first row
      -
      -

      for formatd type FormatFloat, we override the precision to store -full precision floats in the CSV file

      -
      -

      See also

      -
      -
      csv2rec()
      -
      For information about missing and missingd, which can -be used to fill in masked values into your CSV file.
      -
      -
      -
      - -
      -
      -matplotlib.mlab.rec2txt(r, header=None, padding=3, precision=3, fields=None)
      -

      Returns a textual representation of a record array.

      -

      r: numpy recarray

      -

      header: list of column headers

      -

      padding: space between each column

      -
      -
      precision: number of decimal places to use for floats.
      -
      Set to an integer to apply to all floats. Set to a -list of integers to apply precision individually. -Precision for non-floats is simply ignored.
      -
      -

      fields : if not None, a list of field names to print. fields -can be a list of strings like [‘field1’, ‘field2’] or a single -comma separated string like ‘field1,field2’

      -

      Example:

      -
      precision=[0,2,3]
      -
      -
      -

      Output:

      -
      ID    Price   Return
      -ABC   12.54    0.234
      -XYZ    6.32   -0.076
      -
      -
      - -
      -
      -matplotlib.mlab.rec_append_fields(rec, names, arrs, dtypes=None)
      -

      Return a new record array with field names populated with data -from arrays in arrs. If appending a single field, then names, -arrs and dtypes do not have to be lists. They can just be the -values themselves.

      -
      - -
      -
      -matplotlib.mlab.rec_drop_fields(rec, names)
      -

      Return a new numpy record array with fields in names dropped.

      -
      - -
      -
      -matplotlib.mlab.rec_groupby(r, groupby, stats)
      -

      r is a numpy record array

      -

      groupby is a sequence of record array attribute names that -together form the grouping key. eg (‘date’, ‘productcode’)

      -

      stats is a sequence of (attr, func, outname) tuples which -will call x = func(attr) and assign x to the record array -output with attribute outname. For example:

      -
      stats = ( ('sales', len, 'numsales'), ('sales', np.mean, 'avgsale') )
      -
      -
      -

      Return record array has dtype names for each attribute name in -the the groupby argument, with the associated group values, and -for each outname name in the stats argument, with the associated -stat summary output.

      -
      - -
      -
      -matplotlib.mlab.rec_join(key, r1, r2, jointype='inner', defaults=None, r1postfix='1', r2postfix='2')
      -

      Join record arrays r1 and r2 on key; key is a tuple of -field names – if key is a string it is assumed to be a single -attribute name. If r1 and r2 have equal values on all the keys -in the key tuple, then their fields will be merged into a new -record array containing the intersection of the fields of r1 and -r2.

      -

      r1 (also r2) must not have any duplicate keys.

      -

      The jointype keyword can be ‘inner’, ‘outer’, ‘leftouter’. To -do a rightouter join just reverse r1 and r2.

      -

      The defaults keyword is a dictionary filled with -{column_name:default_value} pairs.

      -

      The keywords r1postfix and r2postfix are postfixed to column names -(other than keys) that are both in r1 and r2.

      -
      - -
      -
      -matplotlib.mlab.rec_keep_fields(rec, names)
      -

      Return a new numpy record array with only fields listed in names

      -
      - -
      -
      -matplotlib.mlab.rec_summarize(r, summaryfuncs)
      -

      r is a numpy record array

      -

      summaryfuncs is a list of (attr, func, outname) tuples -which will apply func to the the array r*[attr] and assign the -output to a new attribute name *outname. The returned record -array is identical to r, with extra arrays for each element in -summaryfuncs.

      -
      - -
      -
      -matplotlib.mlab.recs_join(key, name, recs, jointype='outer', missing=0.0, postfixes=None)
      -

      Join a sequence of record arrays on single column key.

      -

      This function only joins a single column of the multiple record arrays

      -
      -
      key
      -
      is the column name that acts as a key
      -
      name
      -
      is the name of the column that we want to join
      -
      recs
      -
      is a list of record arrays to join
      -
      jointype
      -
      is a string ‘inner’ or ‘outer’
      -
      missing
      -
      is what any missing field is replaced by
      -
      postfixes
      -
      if not None, a len recs sequence of postfixes
      -
      -

      returns a record array with columns [rowkey, name0, name1, ... namen-1]. -or if postfixes [PF0, PF1, ..., PFN-1] are supplied, -[rowkey, namePF0, namePF1, ... namePFN-1].

      -

      Example:

      -
      r = recs_join("date", "close", recs=[r0, r1], missing=0.)
      -
      -
      -
      - -
      -
      -matplotlib.mlab.rk4(derivs, y0, t)
      -

      Integrate 1D or ND system of ODEs using 4-th order Runge-Kutta. -This is a toy implementation which may be useful if you find -yourself stranded on a system w/o scipy. Otherwise use -scipy.integrate().

      -
      -
      y0
      -
      initial state vector
      -
      t
      -
      sample times
      -
      derivs
      -
      returns the derivative of the system and has the -signature dy = derivs(yi, ti)
      -
      -

      Example 1

      -
      ## 2D system
      -
      -def derivs6(x,t):
      -    d1 =  x[0] + 2*x[1]
      -    d2 =  -3*x[0] + 4*x[1]
      -    return (d1, d2)
      -dt = 0.0005
      -t = arange(0.0, 2.0, dt)
      -y0 = (1,2)
      -yout = rk4(derivs6, y0, t)
      -
      -
      -

      Example 2:

      -
      ## 1D system
      -alpha = 2
      -def derivs(x,t):
      -    return -alpha*x + exp(-t)
      -
      -y0 = 1
      -yout = rk4(derivs, y0, t)
      -
      -
      -

      If you have access to scipy, you should probably be using the -scipy.integrate tools rather than this function.

      -
      - -
      -
      -matplotlib.mlab.rms_flat(a)
      -

      Return the root mean square of all the elements of a, flattened out.

      -
      - -
      -
      -matplotlib.mlab.safe_isinf(x)
      -

      numpy.isinf() for arbitrary types

      -
      - -
      -
      -matplotlib.mlab.safe_isnan(x)
      -

      numpy.isnan() for arbitrary types

      -
      - -
      -
      -matplotlib.mlab.save(fname, X, fmt='%.18e', delimiter=' ')
      -

      Save the data in X to file fname using fmt string to convert the -data to strings.

      -

      Deprecated. Use numpy.savetxt.

      -

      fname can be a filename or a file handle. If the filename ends -in ‘.gz’, the file is automatically saved in compressed gzip -format. The load() function understands gzipped files -transparently.

      -

      Example usage:

      -
      save('test.out', X)         # X is an array
      -save('test1.out', (x,y,z))  # x,y,z equal sized 1D arrays
      -save('test2.out', x)        # x is 1D
      -save('test3.out', x, fmt='%1.4e')  # use exponential notation
      -
      -
      -

      delimiter is used to separate the fields, e.g., delimiter ‘,’ -for comma-separated values.

      -
      - -
      -
      -matplotlib.mlab.segments_intersect(s1, s2)
      -

      Return True if s1 and s2 intersect. -s1 and s2 are defined as:

      -
      s1: (x1, y1), (x2, y2)
      -s2: (x3, y3), (x4, y4)
      -
      -
      - -
      -
      -matplotlib.mlab.slopes(x, y)
      -

      slopes() calculates the slope y‘(x)

      -

      The slope is estimated using the slope obtained from that of a -parabola through any three consecutive points.

      -

      This method should be superior to that described in the appendix -of A CONSISTENTLY WELL BEHAVED METHOD OF INTERPOLATION by Russel -W. Stineman (Creative Computing July 1980) in at least one aspect:

      -
      -
      Circles for interpolation demand a known aspect ratio between -x- and y-values. For many functions, however, the abscissa -are given in different dimensions, so an aspect ratio is -completely arbitrary.
      -

      The parabola method gives very similar results to the circle -method for most regular cases but behaves much better in special -cases.

      -

      Norbert Nemec, Institute of Theoretical Physics, University or -Regensburg, April 2006 Norbert.Nemec at physik.uni-regensburg.de

      -

      (inspired by a original implementation by Halldor Bjornsson, -Icelandic Meteorological Office, March 2006 halldor at vedur.is)

      -
      - -
      -
      -matplotlib.mlab.specgram(x, NFFT=256, Fs=2, detrend=<function detrend_none at 0x34d25f0>, window=<function window_hanning at 0x34d2398>, noverlap=128, pad_to=None, sides='default', scale_by_freq=None)
      -

      Compute a spectrogram of data in x. Data are split into NFFT -length segments and the PSD of each section is computed. The -windowing function window is applied to each segment, and the -amount of overlap of each segment is specified with noverlap.

      -

      If x is real (i.e. non-complex) only the spectrum of the positive -frequencie is returned. If x is complex then the complete -spectrum is returned.

      -

      Keyword arguments:

      -
      -
      -
      NFFT: integer
      -
      The number of data points used in each block for the FFT. -Must be even; a power 2 is most efficient. The default value is 256. -This should NOT be used to get zero padding, or the scaling of the -result will be incorrect. Use pad_to for this instead.
      -
      Fs: scalar
      -
      The sampling frequency (samples per time unit). It is used -to calculate the Fourier frequencies, freqs, in cycles per time -unit. The default value is 2.
      -
      detrend: callable
      -
      The function applied to each segment before fft-ing, -designed to remove the mean or linear trend. Unlike in -MATLAB, where the detrend parameter is a vector, in -matplotlib is it a function. The pylab -module defines detrend_none(), -detrend_mean(), and -detrend_linear(), but you can use -a custom function as well.
      -
      window: callable or ndarray
      -
      A function or a vector of length NFFT. To create window -vectors see window_hanning(), window_none(), -numpy.blackman(), numpy.hamming(), -numpy.bartlett(), scipy.signal(), -scipy.signal.get_window(), etc. The default is -window_hanning(). If a function is passed as the -argument, it must take a data segment as an argument and -return the windowed version of the segment.
      -
      pad_to: integer
      -
      The number of points to which the data segment is padded when -performing the FFT. This can be different from NFFT, which -specifies the number of data points used. While not increasing -the actual resolution of the psd (the minimum distance between -resolvable peaks), this can give more points in the plot, -allowing for more detail. This corresponds to the n parameter -in the call to fft(). The default is None, which sets pad_to -equal to NFFT
      -
      sides: [ ‘default’ | ‘onesided’ | ‘twosided’ ]
      -
      Specifies which sides of the PSD to return. Default gives the -default behavior, which returns one-sided for real data and both -for complex data. ‘onesided’ forces the return of a one-sided PSD, -while ‘twosided’ forces two-sided.
      -
      scale_by_freq: boolean
      -
      Specifies whether the resulting density values should be scaled -by the scaling frequency, which gives density in units of Hz^-1. -This allows for integration over the returned frequency values. -The default is True for MATLAB compatibility.
      -
      noverlap: integer
      -
      The number of points of overlap between blocks. The default value -is 128.
      -
      -
      -

      Returns a tuple (Pxx, freqs, t):

      -
      -
        -
      • Pxx: 2-D array, columns are the periodograms of -successive segments
      • -
      • freqs: 1-D array of frequencies corresponding to the rows -in Pxx
      • -
      • t: 1-D array of times corresponding to midpoints of -segments.
      • -
      -
      -
      -

      See also

      -
      -
      psd()
      -
      psd() differs in the default overlap; in returning -the mean of the segment periodograms; and in not returning -times.
      -
      -
      -
      - -
      -
      -matplotlib.mlab.stineman_interp(xi, x, y, yp=None)
      -

      Given data vectors x and y, the slope vector yp and a new -abscissa vector xi, the function stineman_interp() uses -Stineman interpolation to calculate a vector yi corresponding to -xi.

      -

      Here’s an example that generates a coarse sine curve, then -interpolates over a finer abscissa:

      -
      x = linspace(0,2*pi,20);  y = sin(x); yp = cos(x)
      -xi = linspace(0,2*pi,40);
      -yi = stineman_interp(xi,x,y,yp);
      -plot(x,y,'o',xi,yi)
      -
      -
      -

      The interpolation method is described in the article A -CONSISTENTLY WELL BEHAVED METHOD OF INTERPOLATION by Russell -W. Stineman. The article appeared in the July 1980 issue of -Creative Computing with a note from the editor stating that while -they were:

      -
      -
      not an academic journal but once in a while something serious -and original comes in adding that this was -“apparently a real solution” to a well known problem.
      -

      For yp = None, the routine automatically determines the slopes -using the slopes() routine.

      -

      x is assumed to be sorted in increasing order.

      -

      For values xi[j] < x[0] or xi[j] > x[-1], the routine -tries an extrapolation. The relevance of the data obtained from -this, of course, is questionable...

      -

      Original implementation by Halldor Bjornsson, Icelandic -Meteorolocial Office, March 2006 halldor at vedur.is

      -

      Completely reworked and optimized for Python by Norbert Nemec, -Institute of Theoretical Physics, University or Regensburg, April -2006 Norbert.Nemec at physik.uni-regensburg.de

      -
      - -
      -
      -matplotlib.mlab.vector_lengths(X, P=2.0, axis=None)
      -

      Finds the length of a set of vectors in n dimensions. This is -like the numpy.norm() function for vectors, but has the ability to -work over a particular axis of the supplied array or matrix.

      -

      Computes (sum((x_i)^P))^(1/P) for each {x_i} being the -elements of X along the given axis. If axis is None, -compute over all elements of X.

      -
      - -
      -
      -matplotlib.mlab.window_hanning(x)
      -

      return x times the hanning window of len(x)

      -
      - -
      -
      -matplotlib.mlab.window_none(x)
      -

      No window function; simply return x

      -
      - -
      -
      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/api/nxutils_api.html b/dev/api/nxutils_api.html deleted file mode 100644 index d44e9db75da..00000000000 --- a/dev/api/nxutils_api.html +++ /dev/null @@ -1,213 +0,0 @@ - - - - - - - - - - nxutils — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      Table Of Contents

      - - -

      Previous topic

      -

      mlab

      -

      Next topic

      -

      path

      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      nxutils

      -
      -

      matplotlib.nxutils

      -
      -
      -matplotlib.nxutils.pnpoly(x, y, xyverts)
      -

      inside = pnpoly(x, y, xyverts)

      -

      Return 1 if x,y is inside the polygon, 0 otherwise.

      -
      -
      xyverts
      -
      a sequence of x,y vertices.
      -
      -

      A point on the boundary may be treated as inside or outside.

      -

      -Deprecated since version 1.2.0: Use contains_point() instead.

      -
      - -
      -
      -matplotlib.nxutils.points_inside_poly(xypoints, xyverts)
      -

      mask = points_inside_poly(xypoints, xyverts)

      -

      Returns a boolean ndarray, True for points inside the polygon.

      -
      -
      xypoints
      -
      a sequence of N x,y pairs.
      -
      xyverts
      -
      sequence of x,y vertices of the polygon.
      -
      -

      A point on the boundary may be treated as inside or outside.

      -

      -Deprecated since version 1.2.0: Use contains_points() instead.

      -
      - -
      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/api/path_api.html b/dev/api/path_api.html deleted file mode 100644 index 56c20b66c60..00000000000 --- a/dev/api/path_api.html +++ /dev/null @@ -1,632 +0,0 @@ - - - - - - - - path — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      Table Of Contents

      - - -

      Previous topic

      -

      mlab

      -

      Next topic

      -

      pyplot

      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      path

      -
      -

      matplotlib.path

      -

      Contains a class for managing paths (polylines).

      -
      -
      -class matplotlib.path.Path(vertices, codes=None, _interpolation_steps=1, closed=False)
      -

      Bases: object

      -

      Path represents a series of possibly disconnected, -possibly closed, line and curve segments.

      -
      -
      The underlying storage is made up of two parallel numpy arrays:
      -
        -
      • vertices: an Nx2 float array of vertices
      • -
      • codes: an N-length uint8 array of vertex types
      • -
      -
      -
      -

      These two arrays always have the same length in the first -dimension. For example, to represent a cubic curve, you must -provide three vertices as well as three codes CURVE3.

      -

      The code types are:

      -
      -
        -
      • -
        STOP : 1 vertex (ignored)
        -

        A marker for the end of the entire path (currently not -required and ignored)

        -
        -
        -
      • -
      • -
        MOVETO : 1 vertex
        -

        Pick up the pen and move to the given vertex.

        -
        -
        -
      • -
      • -
        LINETO : 1 vertex
        -

        Draw a line from the current position to the given vertex.

        -
        -
        -
      • -
      • -
        CURVE3 : 1 control point, 1 endpoint
        -

        Draw a quadratic Bezier curve from the current position, -with the given control point, to the given end point.

        -
        -
        -
      • -
      • -
        CURVE4 : 2 control points, 1 endpoint
        -

        Draw a cubic Bezier curve from the current position, with -the given control points, to the given end point.

        -
        -
        -
      • -
      • -
        CLOSEPOLY : 1 vertex (ignored)
        -

        Draw a line segment to the start point of the current -polyline.

        -
        -
        -
      • -
      -
      -

      Users of Path objects should not access the vertices and codes -arrays directly. Instead, they should use iter_segments() -to get the vertex/code pairs. This is important, since many -Path objects, as an optimization, do not store a codes -at all, but have a default one provided for them by -iter_segments().

      -
      -

      Note

      -

      The vertices and codes arrays should be treated as -immutable – there are a number of optimizations and assumptions -made up front in the constructor that will not change when the -data changes.

      -
      -

      Create a new path with the given vertices and codes.

      -

      vertices is an Nx2 numpy float array, masked array or Python -sequence.

      -

      codes is an N-length numpy array or Python sequence of type -matplotlib.path.Path.code_type.

      -

      These two arrays must have the same length in the first -dimension.

      -

      If codes is None, vertices will be treated as a series of -line segments.

      -

      If vertices contains masked values, they will be converted -to NaNs which are then handled correctly by the Agg -PathIterator and other consumers of path data, such as -iter_segments().

      -

      interpolation_steps is used as a hint to certain projections, -such as Polar, that this path should be linearly interpolated -immediately before drawing. This attribute is primarily an -implementation detail and is not intended for public use.

      -
      -
      -CLOSEPOLY = 79
      -
      - -
      -
      -CURVE3 = 3
      -
      - -
      -
      -CURVE4 = 4
      -
      - -
      -
      -LINETO = 2
      -
      - -
      -
      -MOVETO = 1
      -
      - -
      -
      -NUM_VERTICES = [1, 1, 1, 2, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]
      -
      - -
      -
      -STOP = 0
      -
      - -
      -
      -classmethod arc(theta1, theta2, n=None, is_wedge=False)
      -

      (staticmethod) Returns an arc on the unit circle from angle -theta1 to angle theta2 (in degrees).

      -

      If n is provided, it is the number of spline segments to make. -If n is not provided, the number of spline segments is -determined based on the delta between theta1 and theta2.

      -
      -
      -
      - -
      -
      -clip_to_bbox(bbox, inside=True)
      -

      Clip the path to the given bounding box.

      -

      The path must be made up of one or more closed polygons. This -algorithm will not behave correctly for unclosed paths.

      -

      If inside is True, clip to the inside of the box, otherwise -to the outside of the box.

      -
      - -
      -
      -code_type
      -

      alias of uint8

      -
      - -
      -
      -contains_path(path, transform=None)
      -

      Returns True if this path completely contains the given path.

      -

      If transform is not None, the path will be transformed -before performing the test.

      -
      - -
      -
      -contains_point(point, transform=None, radius=0.0)
      -

      Returns True if the path contains the given point.

      -

      If transform is not None, the path will be transformed -before performing the test.

      -

      radius allows the path to be made slightly larger or -smaller.

      -
      - -
      -
      -contains_points(points, transform=None, radius=0.0)
      -

      Returns a bool array which is True if the path contains the -corresponding point.

      -

      If transform is not None, the path will be transformed -before performing the test.

      -

      radius allows the path to be made slightly larger or -smaller.

      -
      - -
      -
      -get_extents(transform=None)
      -

      Returns the extents (xmin, ymin, xmax, ymax) of the -path.

      -

      Unlike computing the extents on the vertices alone, this -algorithm will take into account the curves and deal with -control points appropriately.

      -
      - -
      -
      -classmethod hatch(hatchpattern, density=6)
      -

      Given a hatch specifier, hatchpattern, generates a Path that -can be used in a repeated hatching pattern. density is the -number of lines per unit square.

      -
      - -
      -
      -interpolated(steps)
      -

      Returns a new path resampled to length N x steps. Does not -currently handle interpolating curves.

      -
      - -
      -
      -intersects_bbox(bbox, filled=True)
      -

      Returns True if this path intersects a given -Bbox.

      -

      filled, when True, treats the path as if it was filled. -That is, if one path completely encloses the other, -intersects_path() will return True.

      -
      - -
      -
      -intersects_path(other, filled=True)
      -

      Returns True if this path intersects another given path.

      -

      filled, when True, treats the paths as if they were filled. -That is, if one path completely encloses the other, -intersects_path() will return True.

      -
      - -
      -
      -iter_segments(transform=None, remove_nans=True, clip=None, snap=False, stroke_width=1.0, simplify=None, curves=True)
      -

      Iterates over all of the curve segments in the path. Each -iteration returns a 2-tuple (vertices, code), where -vertices is a sequence of 1 - 3 coordinate pairs, and code is -one of the Path codes.

      -

      Additionally, this method can provide a number of standard -cleanups and conversions to the path.

      -
      -
      transform: if not None, the given affine transformation will
      -
      be applied to the path.
      -
      remove_nans: if True, will remove all NaNs from the path and
      -
      insert MOVETO commands to skip over them.
      -
      clip: if not None, must be a four-tuple (x1, y1, x2, y2)
      -
      defining a rectangle in which to clip the path.
      -
      snap: if None, auto-snap to pixels, to reduce
      -
      fuzziness of rectilinear lines. If True, force snapping, and -if False, don’t snap.
      -
      stroke_width: the width of the stroke being drawn. Needed
      -
      as a hint for the snapping algorithm.
      -
      simplify: if True, perform simplification, to remove
      -
      vertices that do not affect the appearance of the path. If -False, perform no simplification. If None, use the -should_simplify member variable.
      -
      curves: If True, curve segments will be returned as curve
      -
      segments. If False, all curves will be converted to line -segments.
      -
      -
      - -
      -
      -classmethod make_compound_path(*args)
      -

      (staticmethod) Make a compound path from a list of Path -objects.

      -
      - -
      -
      -classmethod make_compound_path_from_polys(XY)
      -

      (static method) Make a compound path object to draw a number -of polygons with equal numbers of sides XY is a (numpolys x -numsides x 2) numpy array of vertices. Return object is a -Path

      -

      (Source code, png, hires.png, pdf)

      -
      -../_images/histogram_path_demo.png -
      -
      - -
      -
      -to_polygons(transform=None, width=0, height=0)
      -

      Convert this path to a list of polygons. Each polygon is an -Nx2 array of vertices. In other words, each polygon has no -MOVETO instructions or curves. This is useful for -displaying in backends that do not support compound paths or -Bezier curves, such as GDK.

      -

      If width and height are both non-zero then the lines will -be simplified so that vertices outside of (0, 0), (width, -height) will be clipped.

      -
      - -
      -
      -transformed(transform)
      -

      Return a transformed copy of the path.

      -
      -

      See also

      -
      -
      matplotlib.transforms.TransformedPath
      -
      A specialized path class that will cache the -transformed result and automatically update when the -transform changes.
      -
      -
      -
      - -
      -
      -classmethod unit_circle()
      -

      (staticmethod) Returns a Path of the unit circle. -The circle is approximated using cubic Bezier curves. This -uses 8 splines around the circle using the approach presented -here:

      -
      -
      -
      - -
      -
      -classmethod unit_circle_righthalf()
      -

      (staticmethod) Returns a Path of the right half -of a unit circle. The circle is approximated using cubic Bezier -curves. This uses 4 splines around the circle using the approach -presented here:

      -
      -
      -
      - -
      -
      -classmethod unit_rectangle()
      -

      (staticmethod) Returns a Path of the unit rectangle -from (0, 0) to (1, 1).

      -
      - -
      -
      -classmethod unit_regular_asterisk(numVertices)
      -

      (staticmethod) Returns a Path for a unit regular -asterisk with the given numVertices and radius of 1.0, -centered at (0, 0).

      -
      - -
      -
      -classmethod unit_regular_polygon(numVertices)
      -

      (staticmethod) Returns a Path for a unit regular -polygon with the given numVertices and radius of 1.0, -centered at (0, 0).

      -
      - -
      -
      -classmethod unit_regular_star(numVertices, innerCircle=0.5)
      -

      (staticmethod) Returns a Path for a unit regular star -with the given numVertices and radius of 1.0, centered at (0, -0).

      -
      - -
      -
      -classmethod wedge(theta1, theta2, n=None)
      -

      (staticmethod) Returns a wedge of the unit circle from angle -theta1 to angle theta2 (in degrees).

      -

      If n is provided, it is the number of spline segments to make. -If n is not provided, the number of spline segments is -determined based on the delta between theta1 and theta2.

      -
      - -
      - -
      -
      -matplotlib.path.cleanup_path(path, trans, remove_nans, clip, snap, simplify, curves)
      -
      - -
      -
      -matplotlib.path.clip_path_to_rect(path, bbox, inside)
      -
      - -
      -
      -matplotlib.path.convert_path_to_polygons(path, trans, width, height)
      -
      - -
      -
      -matplotlib.path.get_path_collection_extents(master_transform, paths, transforms, offsets, offset_transform)
      -

      Given a sequence of Path objects, -Transform objects and offsets, as -found in a PathCollection, -returns the bounding box that encapsulates all of them.

      -

      master_transform is a global transformation to apply to all paths

      -

      paths is a sequence of Path instances.

      -

      transforms is a sequence of -Affine2D instances.

      -

      offsets is a sequence of (x, y) offsets (or an Nx2 array)

      -

      offset_transform is a Affine2D -to apply to the offsets before applying the offset to the path.

      -

      The way that paths, transforms and offsets are combined -follows the same method as for collections. Each is iterated over -independently, so if you have 3 paths, 2 transforms and 1 offset, -their combinations are as follows:

      -
      -
      (A, A, A), (B, B, A), (C, A, A)
      -
      - -
      -
      -matplotlib.path.get_path_extents(path, trans)
      -
      - -
      -
      -matplotlib.path.get_paths_extents(paths, transforms=[])
      -

      Given a sequence of Path objects and optional -Transform objects, returns the -bounding box that encapsulates all of them.

      -

      paths is a sequence of Path instances.

      -

      transforms is an optional sequence of -Affine2D instances to apply to -each path.

      -
      - -
      -
      -matplotlib.path.path_in_path(a, atrans, b, btrans)
      -
      - -
      -
      -matplotlib.path.path_intersects_path(p1, p2)
      -
      - -
      -
      -matplotlib.path.point_in_path(x, y, path, trans)
      -
      - -
      -
      -matplotlib.path.point_in_path_collection(x, y, r, trans, paths, transforms, offsets, offsetTrans, filled)
      -
      - -
      -
      -matplotlib.path.points_in_path(points, path, trans)
      -
      - -
      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/api/pyplot_api.html b/dev/api/pyplot_api.html deleted file mode 100644 index 846cb1f96a8..00000000000 --- a/dev/api/pyplot_api.html +++ /dev/null @@ -1,10682 +0,0 @@ - - - - - - - - pyplot — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      Table Of Contents

      - - -

      Previous topic

      -

      path

      -

      Next topic

      -

      sankey

      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      pyplot

      -
      -

      matplotlib.pyplot

      -

      Provides a MATLAB-like plotting framework.

      -

      pylab combines pyplot with numpy into a single namespace. -This is convenient for interactive work, but for programming it -is recommended that the namespaces be kept separate, e.g.:

      -
      import numpy as np
      -import matplotlib.pyplot as plt
      -
      -x = np.arange(0, 5, 0.1);
      -y = np.sin(x)
      -plt.plot(x, y)
      -
      -
      -
      -
      -matplotlib.pyplot.acorr(x, hold=None, **kwargs)
      -

      Plot the autocorrelation of x.

      -

      Call signature:

      -
      acorr(x, normed=True, detrend=mlab.detrend_none, usevlines=True,
      -      maxlags=10, **kwargs)
      -
      -
      -

      If normed = True, normalize the data by the autocorrelation at -0-th lag. x is detrended by the detrend callable (default no -normalization).

      -

      Data are plotted as plot(lags, c, **kwargs)

      -

      Return value is a tuple (lags, c, line) where:

      -
      -
        -
      • lags are a length 2*maxlags+1 lag vector
      • -
      • c is the 2*maxlags+1 auto correlation vector
      • -
      • line is a Line2D instance -returned by plot()
      • -
      -
      -

      The default linestyle is None and the default marker is -'o', though these can be overridden with keyword args. -The cross correlation is performed with -numpy.correlate() with mode = 2.

      -

      If usevlines is True, vlines() -rather than plot() is used to draw -vertical lines from the origin to the acorr. Otherwise, the -plot style is determined by the kwargs, which are -Line2D properties.

      -

      maxlags is a positive integer detailing the number of lags -to show. The default value of None will return all -(2*len(x)-1) lags.

      -

      The return value is a tuple (lags, c, linecol, b) -where

      -
      -
      -
      -
      -

      See also

      -

      plot() or -vlines() -For documentation on valid kwargs.

      -
      -

      Example:

      -

      xcorr() is top graph, and -acorr() is bottom graph.

      -

      (Source code, png, hires.png, pdf)

      -
      -../_images/xcorr_demo.png -
      -

      Additional kwargs: hold = [True|False] overrides default hold state

      -
      - -
      -
      -matplotlib.pyplot.annotate(*args, **kwargs)
      -

      Create an annotation: a piece of text referring to a data -point.

      -

      Call signature:

      -
      annotate(s, xy, xytext=None, xycoords='data',
      -         textcoords='data', arrowprops=None, **kwargs)
      -
      -
      -

      Keyword arguments:

      -

      Annotate the x, y point xy with text s at x, y -location xytext. (If xytext = None, defaults to xy, -and if textcoords = None, defaults to xycoords).

      -

      arrowprops, if not None, is a dictionary of line properties -(see matplotlib.lines.Line2D) for the arrow that connects -annotation to the point.

      -

      If the dictionary has a key arrowstyle, a FancyArrowPatch -instance is created with the given dictionary and is -drawn. Otherwise, a YAArow patch instance is created and -drawn. Valid keys for YAArow are

      - ---- - - - - - - - - - - - - - - - - - - - - - - -
      KeyDescription
      widththe width of the arrow in points
      fracthe fraction of the arrow length occupied by the head
      headwidththe width of the base of the arrow head in points
      shrinkoftentimes it is convenient to have the arrowtip -and base a bit away from the text and point being -annotated. If d is the distance between the text and -annotated point, shrink will shorten the arrow so the tip -and base are shink percent of the distance d away from -the endpoints. ie, shrink=0.05 is 5%
      ?any key for matplotlib.patches.polygon
      -

      Valid keys for FancyArrowPatch are

      - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      KeyDescription
      arrowstylethe arrow style
      connectionstylethe connection style
      relposdefault is (0.5, 0.5)
      patchAdefault is bounding box of the text
      patchBdefault is None
      shrinkAdefault is 2 points
      shrinkBdefault is 2 points
      mutation_scaledefault is text size (in points)
      mutation_aspectdefault is 1.
      ?any key for matplotlib.patches.PathPatch
      -

      xycoords and textcoords are strings that indicate the -coordinates of xy and xytext.

      - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      PropertyDescription
      ‘figure points’points from the lower left corner of the figure
      ‘figure pixels’pixels from the lower left corner of the figure
      ‘figure fraction’0,0 is lower left of figure and 1,1 is upper right
      ‘axes points’points from lower left corner of axes
      ‘axes pixels’pixels from lower left corner of axes
      ‘axes fraction’0,0 is lower left of axes and 1,1 is upper right
      ‘data’use the coordinate system of the object being -annotated (default)
      ‘offset points’Specify an offset (in points) from the xy value
      ‘polar’you can specify theta, r for the annotation, -even in cartesian plots. Note that if you -are using a polar axes, you do not need -to specify polar for the coordinate -system since that is the native “data” coordinate -system.
      -

      If a ‘points’ or ‘pixels’ option is specified, values will be -added to the bottom-left and if negative, values will be -subtracted from the top-right. e.g.:

      -
      # 10 points to the right of the left border of the axes and
      -# 5 points below the top border
      -xy=(10,-5), xycoords='axes points'
      -
      -
      -

      You may use an instance of -Transform or -Artist. See -Annotating Axes for more details.

      -

      The annotation_clip attribute contols the visibility of the -annotation when it goes outside the axes area. If True, the -annotation will only be drawn when the xy is inside the -axes. If False, the annotation will always be drawn regardless -of its position. The default is None, which behave as True -only if xycoords is”data”.

      -

      Additional kwargs are Text properties:

      -
      -
      ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      PropertyDescription
      agg_filterunknown
      alphafloat (0.0 transparent through 1.0 opaque)
      animated[True | False]
      axesan Axes instance
      backgroundcolorany matplotlib color
      bboxrectangle prop dict
      clip_boxa matplotlib.transforms.Bbox instance
      clip_on[True | False]
      clip_path[ (Path, Transform) | Patch | None ]
      colorany matplotlib color
      containsa callable function
      family or fontfamily or fontname or name[FONTNAME | ‘serif’ | ‘sans-serif’ | ‘cursive’ | ‘fantasy’ | ‘monospace’ ]
      figurea matplotlib.figure.Figure instance
      fontproperties or font_propertiesa matplotlib.font_manager.FontProperties instance
      gidan id string
      horizontalalignment or ha[ ‘center’ | ‘right’ | ‘left’ ]
      labelstring or anything printable with ‘%s’ conversion.
      linespacingfloat (multiple of font size)
      lod[True | False]
      multialignment[‘left’ | ‘right’ | ‘center’ ]
      path_effectsunknown
      picker[None|float|boolean|callable]
      position(x,y)
      rasterized[True | False | None]
      rotation[ angle in degrees | ‘vertical’ | ‘horizontal’ ]
      rotation_modeunknown
      size or fontsize[size in points | ‘xx-small’ | ‘x-small’ | ‘small’ | ‘medium’ | ‘large’ | ‘x-large’ | ‘xx-large’ ]
      snapunknown
      stretch or fontstretch[a numeric value in range 0-1000 | ‘ultra-condensed’ | ‘extra-condensed’ | ‘condensed’ | ‘semi-condensed’ | ‘normal’ | ‘semi-expanded’ | ‘expanded’ | ‘extra-expanded’ | ‘ultra-expanded’ ]
      style or fontstyle[ ‘normal’ | ‘italic’ | ‘oblique’]
      textstring or anything printable with ‘%s’ conversion.
      transformTransform instance
      urla url string
      variant or fontvariant[ ‘normal’ | ‘small-caps’ ]
      verticalalignment or va or ma[ ‘center’ | ‘top’ | ‘bottom’ | ‘baseline’ ]
      visible[True | False]
      weight or fontweight[a numeric value in range 0-1000 | ‘ultralight’ | ‘light’ | ‘normal’ | ‘regular’ | ‘book’ | ‘medium’ | ‘roman’ | ‘semibold’ | ‘demibold’ | ‘demi’ | ‘bold’ | ‘heavy’ | ‘extra bold’ | ‘black’ ]
      xfloat
      yfloat
      zorderany number
      -
      -

      (Source code)

      -
      -../_images/annotation_demo2_00.png -

      (png, hires.png, pdf)

      -
      -
      -../_images/annotation_demo2_01.png -

      (png, hires.png, pdf)

      -
      -
      - -
      -
      -matplotlib.pyplot.arrow(x, y, dx, dy, hold=None, **kwargs)
      -

      Add an arrow to the axes.

      -

      Call signature:

      -
      arrow(x, y, dx, dy, **kwargs)
      -
      -
      -

      Draws arrow on specified axis from (x, y) to (x + dx, -y + dy). Uses FancyArrow patch to construct the arrow.

      -

      The resulting arrow is affected by the axes aspect ratio and limits. -This may produce an arrow whose head is not square with its stem. To -create an arrow whose head is square with its stem, use -annotate().

      -

      Optional kwargs control the arrow construction and properties:

      -
      -
      Constructor arguments
      -
      -
      width: float (default: 0.001)
      -
      width of full arrow tail
      -
      length_includes_head: [True | False] (default: False)
      -
      True if head is to be counted in calculating the length.
      -
      head_width: float or None (default: 3*width)
      -
      total width of the full arrow head
      -
      head_length: float or None (default: 1.5 * head_width)
      -
      length of arrow head
      -
      shape: [‘full’, ‘left’, ‘right’] (default: ‘full’)
      -
      draw the left-half, right-half, or full arrow
      -
      overhang: float (default: 0)
      -
      fraction that the arrow is swept back (0 overhang means -triangular shape). Can be negative or greater than one.
      -
      head_starts_at_zero: [True | False] (default: False)
      -
      if True, the head starts being drawn at coordinate 0 -instead of ending at coordinate 0.
      -
      -
      -
      -

      Other valid kwargs (inherited from Patch) are:

      -
      -
      ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      PropertyDescription
      agg_filterunknown
      alphafloat or None
      animated[True | False]
      antialiased or aa[True | False] or None for default
      axesan Axes instance
      clip_boxa matplotlib.transforms.Bbox instance
      clip_on[True | False]
      clip_path[ (Path, Transform) | Patch | None ]
      colormatplotlib color spec
      containsa callable function
      edgecolor or ecmpl color spec, or None for default, or ‘none’ for no color
      facecolor or fcmpl color spec, or None for default, or ‘none’ for no color
      figurea matplotlib.figure.Figure instance
      fill[True | False]
      gidan id string
      hatch[‘/’ | ‘\’ | ‘|’ | ‘-‘ | ‘+’ | ‘x’ | ‘o’ | ‘O’ | ‘.’ | ‘*’]
      labelstring or anything printable with ‘%s’ conversion.
      linestyle or ls[‘solid’ | ‘dashed’ | ‘dashdot’ | ‘dotted’]
      linewidth or lwfloat or None for default
      lod[True | False]
      path_effectsunknown
      picker[None|float|boolean|callable]
      rasterized[True | False | None]
      snapunknown
      transformTransform instance
      urla url string
      visible[True | False]
      zorderany number
      -
      -

      Example:

      -

      (Source code, png, hires.png, pdf)

      -
      -../_images/arrow_demo.png -
      -

      Additional kwargs: hold = [True|False] overrides default hold state

      -
      - -
      -
      -matplotlib.pyplot.autoscale(enable=True, axis='both', tight=None)
      -

      Autoscale the axis view to the data (toggle).

      -

      Convenience method for simple axis view autoscaling. -It turns autoscaling on or off, and then, -if autoscaling for either axis is on, it performs -the autoscaling on the specified axis or axes.

      -
      -
      enable: [True | False | None]
      -
      True (default) turns autoscaling on, False turns it off. -None leaves the autoscaling state unchanged.
      -
      axis: [‘x’ | ‘y’ | ‘both’]
      -
      which axis to operate on; default is ‘both’
      -
      tight: [True | False | None]
      -
      If True, set view limits to data limits; -if False, let the locator and margins expand the view limits; -if None, use tight scaling if the only artist is an image, -otherwise treat tight as False. -The tight setting is retained for future autoscaling -until it is explicitly changed.
      -
      -

      Returns None.

      -
      - -
      -
      -matplotlib.pyplot.autumn()
      -

      set the default colormap to autumn and apply to current image if any. -See help(colormaps) for more information

      -
      - -
      -
      -matplotlib.pyplot.axes(*args, **kwargs)
      -

      Add an axes to the figure.

      -

      The axes is added at position rect specified by:

      -
        -
      • axes() by itself creates a default full subplot(111) window axis.
      • -
      • axes(rect, axisbg='w') where rect = [left, bottom, width, -height] in normalized (0, 1) units. axisbg is the background -color for the axis, default white.
      • -
      • axes(h) where h is an axes instance makes h the current -axis. An Axes instance is returned.
      • -
      - ----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      kwargAcceptsDescription
      axisbgcolorthe axes background color
      frameon[True|False]display the frame?
      sharexotheraxcurrent axes shares xaxis attribute with otherax
      shareyotheraxcurrent axes shares yaxis attribute with otherax
      polar[True|False]use a polar axes?
      -

      Examples:

      -
        -
      • examples/pylab_examples/axes_demo.py places custom axes.
      • -
      • examples/pylab_examples/shared_axis_demo.py uses -sharex and sharey.
      • -
      -
      - -
      -
      -matplotlib.pyplot.axhline(y=0, xmin=0, xmax=1, hold=None, **kwargs)
      -

      Add a horizontal line across the axis.

      -

      Call signature:

      -
      axhline(y=0, xmin=0, xmax=1, **kwargs)
      -
      -
      -

      Draw a horizontal line at y from xmin to xmax. With the -default values of xmin = 0 and xmax = 1, this line will -always span the horizontal extent of the axes, regardless of -the xlim settings, even if you change them, e.g., with the -set_xlim() command. That is, the horizontal extent is -in axes coords: 0=left, 0.5=middle, 1.0=right but the y -location is in data coordinates.

      -

      Return value is the Line2D -instance. kwargs are the same as kwargs to plot, and can be -used to control the line properties. e.g.,

      -
        -
      • draw a thick red hline at y = 0 that spans the xrange:

        -
        >>> axhline(linewidth=4, color='r')
        -
        -
        -
      • -
      • draw a default hline at y = 1 that spans the xrange:

        -
        >>> axhline(y=1)
        -
        -
        -
      • -
      • draw a default hline at y = .5 that spans the the middle half of -the xrange:

        -
        >>> axhline(y=.5, xmin=0.25, xmax=0.75)
        -
        -
        -
      • -
      -

      Valid kwargs are Line2D properties, -with the exception of ‘transform’:

      -
      -
      ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      PropertyDescription
      agg_filterunknown
      alphafloat (0.0 transparent through 1.0 opaque)
      animated[True | False]
      antialiased or aa[True | False]
      axesan Axes instance
      clip_boxa matplotlib.transforms.Bbox instance
      clip_on[True | False]
      clip_path[ (Path, Transform) | Patch | None ]
      color or cany matplotlib color
      containsa callable function
      dash_capstyle[‘butt’ | ‘round’ | ‘projecting’]
      dash_joinstyle[‘miter’ | ‘round’ | ‘bevel’]
      dashessequence of on/off ink in points
      data2D array (rows are x, y) or two 1D arrays
      drawstyle[‘default’ | ‘steps’ | ‘steps-pre’ | ‘steps-mid’ | ‘steps-post’]
      figurea matplotlib.figure.Figure instance
      fillstyle[‘full’ | ‘left’ | ‘right’ | ‘bottom’ | ‘top’ | ‘none’]
      gidan id string
      labelstring or anything printable with ‘%s’ conversion.
      linestyle or ls['-' | '--' | '-.' | ':' | 'None' | ' ' | ''] and any drawstyle in combination with a linestyle, e.g., 'steps--'.
      linewidth or lwfloat value in points
      lod[True | False]
      markerunknown
      markeredgecolor or mecany matplotlib color
      markeredgewidth or mewfloat value in points
      markerfacecolor or mfcany matplotlib color
      markerfacecoloralt or mfcaltany matplotlib color
      markersize or msfloat
      markeveryNone | integer | (startind, stride)
      pickerfloat distance in points or callable pick function fn(artist, event)
      pickradiusfloat distance in points
      rasterized[True | False | None]
      snapunknown
      solid_capstyle[‘butt’ | ‘round’ | ‘projecting’]
      solid_joinstyle[‘miter’ | ‘round’ | ‘bevel’]
      transforma matplotlib.transforms.Transform instance
      urla url string
      visible[True | False]
      xdata1D array
      ydata1D array
      zorderany number
      -
      -
      -

      See also

      -
      -
      axhspan()
      -
      for example plot and source code
      -
      -
      -

      Additional kwargs: hold = [True|False] overrides default hold state

      -
      - -
      -
      -matplotlib.pyplot.axhspan(ymin, ymax, xmin=0, xmax=1, hold=None, **kwargs)
      -

      Add a horizontal span (rectangle) across the axis.

      -

      Call signature:

      -
      axhspan(ymin, ymax, xmin=0, xmax=1, **kwargs)
      -
      -
      -

      y coords are in data units and x coords are in axes (relative -0-1) units.

      -

      Draw a horizontal span (rectangle) from ymin to ymax. -With the default values of xmin = 0 and xmax = 1, this -always spans the xrange, regardless of the xlim settings, even -if you change them, e.g., with the set_xlim() command. -That is, the horizontal extent is in axes coords: 0=left, -0.5=middle, 1.0=right but the y location is in data -coordinates.

      -

      Return value is a matplotlib.patches.Polygon -instance.

      -

      Examples:

      -
        -
      • draw a gray rectangle from y = 0.25-0.75 that spans the -horizontal extent of the axes:

        -
        >>> axhspan(0.25, 0.75, facecolor='0.5', alpha=0.5)
        -
        -
        -
      • -
      -

      Valid kwargs are Polygon properties:

      -
      -
      ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      PropertyDescription
      agg_filterunknown
      alphafloat or None
      animated[True | False]
      antialiased or aa[True | False] or None for default
      axesan Axes instance
      clip_boxa matplotlib.transforms.Bbox instance
      clip_on[True | False]
      clip_path[ (Path, Transform) | Patch | None ]
      colormatplotlib color spec
      containsa callable function
      edgecolor or ecmpl color spec, or None for default, or ‘none’ for no color
      facecolor or fcmpl color spec, or None for default, or ‘none’ for no color
      figurea matplotlib.figure.Figure instance
      fill[True | False]
      gidan id string
      hatch[‘/’ | ‘\’ | ‘|’ | ‘-‘ | ‘+’ | ‘x’ | ‘o’ | ‘O’ | ‘.’ | ‘*’]
      labelstring or anything printable with ‘%s’ conversion.
      linestyle or ls[‘solid’ | ‘dashed’ | ‘dashdot’ | ‘dotted’]
      linewidth or lwfloat or None for default
      lod[True | False]
      path_effectsunknown
      picker[None|float|boolean|callable]
      rasterized[True | False | None]
      snapunknown
      transformTransform instance
      urla url string
      visible[True | False]
      zorderany number
      -
      -

      Example:

      -

      (Source code, png, hires.png, pdf)

      -
      -../_images/axhspan_demo.png -
      -

      Additional kwargs: hold = [True|False] overrides default hold state

      -
      - -
      -
      -matplotlib.pyplot.axis(*v, **kwargs)
      -

      Convenience method to get or set axis properties.

      -

      Calling with no arguments:

      -
      >>> axis()
      -
      -
      -

      returns the current axes limits [xmin, xmax, ymin, ymax].:

      -
      >>> axis(v)
      -
      -
      -

      sets the min and max of the x and y axes, with -v = [xmin, xmax, ymin, ymax].:

      -
      >>> axis('off')
      -
      -
      -

      turns off the axis lines and labels.:

      -
      >>> axis('equal')
      -
      -
      -

      changes limits of x or y axis so that equal increments of x -and y have the same length; a circle is circular.:

      -
      >>> axis('scaled')
      -
      -
      -

      achieves the same result by changing the dimensions of the plot box instead -of the axis data limits.:

      -
      >>> axis('tight')
      -
      -
      -

      changes x and y axis limits such that all data is shown. If -all data is already shown, it will move it to the center of the -figure without modifying (xmax - xmin) or (ymax - -ymin). Note this is slightly different than in MATLAB.:

      -
      >>> axis('image')
      -
      -
      -

      is ‘scaled’ with the axis limits equal to the data limits.:

      -
      >>> axis('auto')
      -
      -
      -

      and:

      -
      >>> axis('normal')
      -
      -
      -

      are deprecated. They restore default behavior; axis limits are automatically -scaled to make the data fit comfortably within the plot box.

      -

      if len(*v)==0, you can pass in xmin, xmax, ymin, ymax -as kwargs selectively to alter just those limits without changing -the others.

      -

      The xmin, xmax, ymin, ymax tuple is returned

      -
      -

      See also

      -
      -
      xlim(), ylim()
      -
      For setting the x- and y-limits individually.
      -
      -
      -
      - -
      -
      -matplotlib.pyplot.axvline(x=0, ymin=0, ymax=1, hold=None, **kwargs)
      -

      Add a vertical line across the axes.

      -

      Call signature:

      -
      axvline(x=0, ymin=0, ymax=1, **kwargs)
      -
      -
      -

      Draw a vertical line at x from ymin to ymax. With the -default values of ymin = 0 and ymax = 1, this line will -always span the vertical extent of the axes, regardless of the -ylim settings, even if you change them, e.g., with the -set_ylim() command. That is, the vertical extent is in -axes coords: 0=bottom, 0.5=middle, 1.0=top but the x location -is in data coordinates.

      -

      Return value is the Line2D -instance. kwargs are the same as kwargs to plot, and can be -used to control the line properties. e.g.,

      -
        -
      • draw a thick red vline at x = 0 that spans the yrange:

        -
        >>> axvline(linewidth=4, color='r')
        -
        -
        -
      • -
      • draw a default vline at x = 1 that spans the yrange:

        -
        >>> axvline(x=1)
        -
        -
        -
      • -
      • draw a default vline at x = .5 that spans the the middle half of -the yrange:

        -
        >>> axvline(x=.5, ymin=0.25, ymax=0.75)
        -
        -
        -
      • -
      -

      Valid kwargs are Line2D properties, -with the exception of ‘transform’:

      -
      -
      ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      PropertyDescription
      agg_filterunknown
      alphafloat (0.0 transparent through 1.0 opaque)
      animated[True | False]
      antialiased or aa[True | False]
      axesan Axes instance
      clip_boxa matplotlib.transforms.Bbox instance
      clip_on[True | False]
      clip_path[ (Path, Transform) | Patch | None ]
      color or cany matplotlib color
      containsa callable function
      dash_capstyle[‘butt’ | ‘round’ | ‘projecting’]
      dash_joinstyle[‘miter’ | ‘round’ | ‘bevel’]
      dashessequence of on/off ink in points
      data2D array (rows are x, y) or two 1D arrays
      drawstyle[‘default’ | ‘steps’ | ‘steps-pre’ | ‘steps-mid’ | ‘steps-post’]
      figurea matplotlib.figure.Figure instance
      fillstyle[‘full’ | ‘left’ | ‘right’ | ‘bottom’ | ‘top’ | ‘none’]
      gidan id string
      labelstring or anything printable with ‘%s’ conversion.
      linestyle or ls['-' | '--' | '-.' | ':' | 'None' | ' ' | ''] and any drawstyle in combination with a linestyle, e.g., 'steps--'.
      linewidth or lwfloat value in points
      lod[True | False]
      markerunknown
      markeredgecolor or mecany matplotlib color
      markeredgewidth or mewfloat value in points
      markerfacecolor or mfcany matplotlib color
      markerfacecoloralt or mfcaltany matplotlib color
      markersize or msfloat
      markeveryNone | integer | (startind, stride)
      pickerfloat distance in points or callable pick function fn(artist, event)
      pickradiusfloat distance in points
      rasterized[True | False | None]
      snapunknown
      solid_capstyle[‘butt’ | ‘round’ | ‘projecting’]
      solid_joinstyle[‘miter’ | ‘round’ | ‘bevel’]
      transforma matplotlib.transforms.Transform instance
      urla url string
      visible[True | False]
      xdata1D array
      ydata1D array
      zorderany number
      -
      -
      -

      See also

      -
      -
      axhspan()
      -
      for example plot and source code
      -
      -
      -

      Additional kwargs: hold = [True|False] overrides default hold state

      -
      - -
      -
      -matplotlib.pyplot.axvspan(xmin, xmax, ymin=0, ymax=1, hold=None, **kwargs)
      -

      Add a vertical span (rectangle) across the axes.

      -

      Call signature:

      -
      axvspan(xmin, xmax, ymin=0, ymax=1, **kwargs)
      -
      -
      -

      x coords are in data units and y coords are in axes (relative -0-1) units.

      -

      Draw a vertical span (rectangle) from xmin to xmax. With -the default values of ymin = 0 and ymax = 1, this always -spans the yrange, regardless of the ylim settings, even if you -change them, e.g., with the set_ylim() command. That is, -the vertical extent is in axes coords: 0=bottom, 0.5=middle, -1.0=top but the y location is in data coordinates.

      -

      Return value is the matplotlib.patches.Polygon -instance.

      -

      Examples:

      -
        -
      • draw a vertical green translucent rectangle from x=1.25 to 1.55 that -spans the yrange of the axes:

        -
        >>> axvspan(1.25, 1.55, facecolor='g', alpha=0.5)
        -
        -
        -
      • -
      -

      Valid kwargs are Polygon -properties:

      -
      -
      ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      PropertyDescription
      agg_filterunknown
      alphafloat or None
      animated[True | False]
      antialiased or aa[True | False] or None for default
      axesan Axes instance
      clip_boxa matplotlib.transforms.Bbox instance
      clip_on[True | False]
      clip_path[ (Path, Transform) | Patch | None ]
      colormatplotlib color spec
      containsa callable function
      edgecolor or ecmpl color spec, or None for default, or ‘none’ for no color
      facecolor or fcmpl color spec, or None for default, or ‘none’ for no color
      figurea matplotlib.figure.Figure instance
      fill[True | False]
      gidan id string
      hatch[‘/’ | ‘\’ | ‘|’ | ‘-‘ | ‘+’ | ‘x’ | ‘o’ | ‘O’ | ‘.’ | ‘*’]
      labelstring or anything printable with ‘%s’ conversion.
      linestyle or ls[‘solid’ | ‘dashed’ | ‘dashdot’ | ‘dotted’]
      linewidth or lwfloat or None for default
      lod[True | False]
      path_effectsunknown
      picker[None|float|boolean|callable]
      rasterized[True | False | None]
      snapunknown
      transformTransform instance
      urla url string
      visible[True | False]
      zorderany number
      -
      -
      -

      See also

      -
      -
      axhspan()
      -
      for example plot and source code
      -
      -
      -

      Additional kwargs: hold = [True|False] overrides default hold state

      -
      - -
      -
      -matplotlib.pyplot.bar(left, height, width=0.8, bottom=None, hold=None, **kwargs)
      -

      Make a bar plot.

      -

      Make a bar plot with rectangles bounded by:

      -
      -
      -
      left, left + width, bottom, bottom + height
      -
      (left, right, bottom and top edges)
      -
      -
      - --- - - - - - -
      Parameters :

      left : sequence of scalars

      -
      -

      the x coordinates of the left sides of the bars

      -
      -

      height : sequence of scalars

      -
      -

      the heights of the bars

      -
      -

      width : scalar or array-like, optional, default: 0.8

      -
      -

      the width(s) of the bars

      -
      -

      bottom : scalar or array-like, optional, default: None

      -
      -

      the y coordinate(s) of the bars

      -
      -

      color : scalar or array-like, optional

      -
      -

      the colors of the bars

      -
      -

      edgecolor : scalar or array-like, optional

      -
      -

      the colors of the bar edges

      -
      -

      linewidth : scalar or array-like, optional, default: None

      -
      -

      width of bar edge(s). If None, use default -linewidth; If 0, don’t draw edges.

      -
      -

      xerr : scalar or array-like, optional, default: None

      -
      -

      if not None, will be used to generate errorbar(s) on the bar chart

      -
      -

      yerr :scalar or array-like, optional, default: None :

      -
      -

      if not None, will be used to generate errorbar(s) on the bar chart

      -
      -

      ecolor : scalar or array-like, optional, default: None

      -
      -

      specifies the color of errorbar(s)

      -
      -

      capsize : integer, optional, default: 3

      -
      -

      determines the length in points of the error bar caps

      -
      -

      error_kw : :

      -
      -

      dictionary of kwargs to be passed to errorbar method. ecolor and -capsize may be specified here rather than as independent kwargs.

      -
      -

      align : [‘edge’ | ‘center’], optional, default: ‘edge’

      -
      -

      If edge, aligns bars by their left edges (for vertical bars) and -by their bottom edges (for horizontal bars). If center, interpret -the left argument as the coordinates of the centers of the bars.

      -
      -

      orientation : ‘vertical’ | ‘horizontal’, optional, default: ‘vertical’

      -
      -

      The orientation of the bars.

      -
      -

      log : boolean, optional, default: False

      -
      -

      If true, sets the axis to be log scale

      -
      -
      Returns :

      :class:`matplotlib.patches.Rectangle` instances. :

      -
      -
      - -
      -
      -matplotlib.pyplot.barbs(*args, **kw)
      -

      Plot a 2-D field of barbs.

      -

      Call signatures:

      -
      barb(U, V, **kw)
      -barb(U, V, C, **kw)
      -barb(X, Y, U, V, **kw)
      -barb(X, Y, U, V, C, **kw)
      -
      -
      -

      Arguments:

      -
      -
      -
      X, Y:
      -
      The x and y coordinates of the barb locations -(default is head of barb; see pivot kwarg)
      -
      U, V:
      -
      Give the x and y components of the barb shaft
      -
      C:
      -
      An optional array used to map colors to the barbs
      -
      -
      -

      All arguments may be 1-D or 2-D arrays or sequences. If X and Y -are absent, they will be generated as a uniform grid. If U and V -are 2-D arrays but X and Y are 1-D, and if len(X) and len(Y) -match the column and row dimensions of U, then X and Y will be -expanded with numpy.meshgrid().

      -

      U, V, C may be masked arrays, but masked X, Y are not -supported at present.

      -

      Keyword arguments:

      -
      -
      -
      length:
      -
      Length of the barb in points; the other parts of the barb -are scaled against this. -Default is 9
      -
      pivot: [ ‘tip’ | ‘middle’ ]
      -
      The part of the arrow that is at the grid point; the arrow rotates -about this point, hence the name pivot. Default is ‘tip’
      -
      barbcolor: [ color | color sequence ]
      -
      Specifies the color all parts of the barb except any flags. This -parameter is analagous to the edgecolor parameter for polygons, -which can be used instead. However this parameter will override -facecolor.
      -
      flagcolor: [ color | color sequence ]
      -
      Specifies the color of any flags on the barb. This parameter is -analagous to the facecolor parameter for polygons, which can be -used instead. However this parameter will override facecolor. If -this is not set (and C has not either) then flagcolor will be -set to match barbcolor so that the barb has a uniform color. If -C has been set, flagcolor has no effect.
      -
      sizes:
      -

      A dictionary of coefficients specifying the ratio of a given -feature to the length of the barb. Only those values one wishes to -override need to be included. These features include:

      -
      -
        -
      • ‘spacing’ - space between features (flags, full/half barbs)
      • -
      • ‘height’ - height (distance from shaft to top) of a flag or -full barb
      • -
      • ‘width’ - width of a flag, twice the width of a full barb
      • -
      • ‘emptybarb’ - radius of the circle used for low magnitudes
      • -
      -
      -
      -
      fill_empty:
      -
      A flag on whether the empty barbs (circles) that are drawn should -be filled with the flag color. If they are not filled, they will -be drawn such that no color is applied to the center. Default is -False
      -
      rounding:
      -
      A flag to indicate whether the vector magnitude should be rounded -when allocating barb components. If True, the magnitude is -rounded to the nearest multiple of the half-barb increment. If -False, the magnitude is simply truncated to the next lowest -multiple. Default is True
      -
      barb_increments:
      -

      A dictionary of increments specifying values to associate with -different parts of the barb. Only those values one wishes to -override need to be included.

      -
      -
        -
      • ‘half’ - half barbs (Default is 5)
      • -
      • ‘full’ - full barbs (Default is 10)
      • -
      • ‘flag’ - flags (default is 50)
      • -
      -
      -
      -
      flip_barb:
      -
      Either a single boolean flag or an array of booleans. Single -boolean indicates whether the lines and flags should point -opposite to normal for all barbs. An array (which should be the -same size as the other data arrays) indicates whether to flip for -each individual barb. Normal behavior is for the barbs and lines -to point right (comes from wind barbs having these features point -towards low pressure in the Northern Hemisphere.) Default is -False
      -
      -
      -

      Barbs are traditionally used in meteorology as a way to plot the speed -and direction of wind observations, but can technically be used to -plot any two dimensional vector quantity. As opposed to arrows, which -give vector magnitude by the length of the arrow, the barbs give more -quantitative information about the vector magnitude by putting slanted -lines or a triangle for various increments in magnitude, as show -schematically below:

      -
      :     /\    \
      -:    /  \    \
      -:   /    \    \    \
      -:  /      \    \    \
      -: ------------------------------
      -
      -

      The largest increment is given by a triangle (or “flag”). After those -come full lines (barbs). The smallest increment is a half line. There -is only, of course, ever at most 1 half line. If the magnitude is -small and only needs a single half-line and no full lines or -triangles, the half-line is offset from the end of the barb so that it -can be easily distinguished from barbs with a single full line. The -magnitude for the barb shown above would nominally be 65, using the -standard increments of 50, 10, and 5.

      -

      linewidths and edgecolors can be used to customize the barb. -Additional PolyCollection keyword -arguments:

      -
      -
      ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      PropertyDescription
      agg_filterunknown
      alphafloat or None
      animated[True | False]
      antialiased or antialiasedsBoolean or sequence of booleans
      arrayunknown
      axesan Axes instance
      clima length 2 sequence of floats
      clip_boxa matplotlib.transforms.Bbox instance
      clip_on[True | False]
      clip_path[ (Path, Transform) | Patch | None ]
      cmapa colormap or registered colormap name
      colormatplotlib color arg or sequence of rgba tuples
      colorbarunknown
      containsa callable function
      edgecolor or edgecolorsmatplotlib color arg or sequence of rgba tuples
      facecolor or facecolorsmatplotlib color arg or sequence of rgba tuples
      figurea matplotlib.figure.Figure instance
      gidan id string
      hatch[ ‘/’ | ‘\’ | ‘|’ | ‘-‘ | ‘+’ | ‘x’ | ‘o’ | ‘O’ | ‘.’ | ‘*’ ]
      labelstring or anything printable with ‘%s’ conversion.
      linestyle or linestyles or dashes[‘solid’ | ‘dashed’, ‘dashdot’, ‘dotted’ | (offset, on-off-dash-seq) ]
      linewidth or lw or linewidthsfloat or sequence of floats
      lod[True | False]
      normunknown
      offset_positionunknown
      offsetsfloat or sequence of floats
      pathsunknown
      picker[None|float|boolean|callable]
      pickradiusunknown
      rasterized[True | False | None]
      snapunknown
      transformTransform instance
      urla url string
      urlsunknown
      visible[True | False]
      zorderany number
      -
      -

      Example:

      -

      (Source code)

      -
      -../_images/barb_demo_00.png -

      (png, hires.png, pdf)

      -
      -
      -../_images/barb_demo_01.png -

      (png, hires.png, pdf)

      -
      -

      Additional kwargs: hold = [True|False] overrides default hold state

      -
      - -
      -
      -matplotlib.pyplot.barh(bottom, width, height=0.8, left=None, hold=None, **kwargs)
      -

      Make a horizontal bar plot.

      -

      Call signature:

      -
      barh(bottom, width, height=0.8, left=0, **kwargs)
      -
      -
      -

      Make a horizontal bar plot with rectangles bounded by:

      -
      -
      -
      left, left + width, bottom, bottom + height
      -
      (left, right, bottom and top edges)
      -
      -
      -

      bottom, width, height, and left can be either scalars -or sequences

      -

      Return value is a list of -matplotlib.patches.Rectangle instances.

      -

      Required arguments:

      -
      -
      ---- - - - - - - - - - - - - - -
      ArgumentDescription
      bottomthe vertical positions of the bottom edges of the bars
      widththe lengths of the bars
      -
      -

      Optional keyword arguments:

      -
      -
      ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      KeywordDescription
      heightthe heights (thicknesses) of the bars
      leftthe x coordinates of the left edges of the -bars
      colorthe colors of the bars
      edgecolorthe colors of the bar edges
      linewidthwidth of bar edges; None means use default -linewidth; 0 means don’t draw edges.
      xerrif not None, will be used to generate -errorbars on the bar chart
      yerrif not None, will be used to generate -errorbars on the bar chart
      ecolorspecifies the color of any errorbar
      capsize(default 3) determines the length in -points of the error bar caps
      align‘edge’ (default) | ‘center’
      log[False|True] False (default) leaves the -horizontal axis as-is; True sets it to log -scale
      -
      -

      Setting align = ‘edge’ aligns bars by their bottom edges in -bottom, while align = ‘center’ interprets these values as -the y coordinates of the bar centers.

      -

      The optional arguments color, edgecolor, linewidth, -xerr, and yerr can be either scalars or sequences of -length equal to the number of bars. This enables you to use -barh as the basis for stacked bar charts, or candlestick -plots.

      -

      other optional kwargs:

      -
      -
      ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      PropertyDescription
      agg_filterunknown
      alphafloat or None
      animated[True | False]
      antialiased or aa[True | False] or None for default
      axesan Axes instance
      clip_boxa matplotlib.transforms.Bbox instance
      clip_on[True | False]
      clip_path[ (Path, Transform) | Patch | None ]
      colormatplotlib color spec
      containsa callable function
      edgecolor or ecmpl color spec, or None for default, or ‘none’ for no color
      facecolor or fcmpl color spec, or None for default, or ‘none’ for no color
      figurea matplotlib.figure.Figure instance
      fill[True | False]
      gidan id string
      hatch[‘/’ | ‘\’ | ‘|’ | ‘-‘ | ‘+’ | ‘x’ | ‘o’ | ‘O’ | ‘.’ | ‘*’]
      labelstring or anything printable with ‘%s’ conversion.
      linestyle or ls[‘solid’ | ‘dashed’ | ‘dashdot’ | ‘dotted’]
      linewidth or lwfloat or None for default
      lod[True | False]
      path_effectsunknown
      picker[None|float|boolean|callable]
      rasterized[True | False | None]
      snapunknown
      transformTransform instance
      urla url string
      visible[True | False]
      zorderany number
      -
      -

      Additional kwargs: hold = [True|False] overrides default hold state

      -
      - -
      -
      -matplotlib.pyplot.bone()
      -

      set the default colormap to bone and apply to current image if any. -See help(colormaps) for more information

      -
      - -
      -
      -matplotlib.pyplot.box(on=None)
      -

      Turn the axes box on or off. on may be a boolean or a string, -‘on’ or ‘off’.

      -

      If on is None, toggle state.

      -
      - -
      -
      -matplotlib.pyplot.boxplot(x, notch=False, sym='b+', vert=True, whis=1.5, positions=None, widths=None, patch_artist=False, bootstrap=None, usermedians=None, conf_intervals=None, hold=None)
      -

      Make a box and whisker plot.

      -

      Call signature:

      -
      boxplot(x, notch=False, sym='+', vert=True, whis=1.5,
      -        positions=None, widths=None, patch_artist=False,
      -        bootstrap=None, usermedians=None, conf_intervals=None)
      -
      -
      -

      Make a box and whisker plot for each column of x or each -vector in sequence x. The box extends from the lower to -upper quartile values of the data, with a line at the median. -The whiskers extend from the box to show the range of the -data. Flier points are those past the end of the whiskers.

      -

      Function Arguments:

      -
      -
      -
      x :
      -
      Array or a sequence of vectors.
      -
      notch : [ False (default) | True ]
      -
      If False (default), produces a rectangular box plot. -If True, will produce a notched box plot
      -
      sym : [ default ‘b+’ ]
      -
      The default symbol for flier points. -Enter an empty string (‘’) if you don’t want to show fliers.
      -
      vert : [ False | True (default) ]
      -
      If True (default), makes the boxes vertical. -If False, makes horizontal boxes.
      -
      whis : [ default 1.5 ]
      -
      Defines the length of the whiskers as a function of the inner -quartile range. They extend to the most extreme data point -within ( whis*(75%-25%) ) data range.
      -
      bootstrap : [ None (default) | integer ]
      -
      Specifies whether to bootstrap the confidence intervals -around the median for notched boxplots. If bootstrap==None, -no bootstrapping is performed, and notches are calculated -using a Gaussian-based asymptotic approximation (see McGill, R., -Tukey, J.W., and Larsen, W.A., 1978, and Kendall and Stuart, -1967). Otherwise, bootstrap specifies the number of times to -bootstrap the median to determine it’s 95% confidence intervals. -Values between 1000 and 10000 are recommended.
      -
      usermedians : [ default None ]
      -
      An array or sequence whose first dimension (or length) is -compatible with x. This overrides the medians computed by -matplotlib for each element of usermedians that is not None. -When an element of usermedians == None, the median will be -computed directly as normal.
      -
      conf_intervals : [ default None ]
      -
      Array or sequence whose first dimension (or length) is compatible -with x and whose second dimension is 2. When the current element -of conf_intervals is not None, the notch locations computed by -matplotlib are overridden (assuming notch is True). When an -element of conf_intervals is None, boxplot compute notches the -method specified by the other kwargs (e.g., bootstrap).
      -
      positions : [ default 1,2,...,n ]
      -
      Sets the horizontal positions of the boxes. The ticks and limits -are automatically set to match the positions.
      -
      widths : [ default 0.5 ]
      -
      Either a scalar or a vector and sets the width of each box. The -default is 0.5, or 0.15*(distance between extreme positions) -if that is smaller.
      -
      patch_artist : [ False (default) | True ]
      -
      If False produces boxes with the Line2D artist -If True produces boxes with the Patch artist
      -
      -
      -

      Returns a dictionary mapping each component of the boxplot -to a list of the matplotlib.lines.Line2D -instances created. That dictionary has the following keys -(assuming vertical boxplots):

      -
      -
        -
      • boxes: the main body of the boxplot showing the quartiles -and the median’s confidence intervals if enabled.
      • -
      • medians: horizonal lines at the median of each box.
      • -
      • whiskers: the vertical lines extending to the most extreme, -n-outlier data points.
      • -
      • caps: the horizontal lines at the ends of the whiskers.
      • -
      • fliers: points representing data that extend beyone the -whiskers (outliers).
      • -
      -
      -

      Example:

      -

      (Source code)

      -
      -../_images/boxplot_demo_00.png -

      (png, hires.png, pdf)

      -
      -
      -../_images/boxplot_demo_01.png -

      (png, hires.png, pdf)

      -
      -
      -../_images/boxplot_demo_02.png -

      (png, hires.png, pdf)

      -
      -
      -../_images/boxplot_demo_03.png -

      (png, hires.png, pdf)

      -
      -
      -../_images/boxplot_demo_04.png -

      (png, hires.png, pdf)

      -
      -
      -../_images/boxplot_demo_05.png -

      (png, hires.png, pdf)

      -
      -
      -../_images/boxplot_demo_06.png -

      (png, hires.png, pdf)

      -
      -

      Additional kwargs: hold = [True|False] overrides default hold state

      -
      - -
      -
      -matplotlib.pyplot.broken_barh(xranges, yrange, hold=None, **kwargs)
      -

      Plot horizontal bars.

      -

      Call signature:

      -
      broken_barh(self, xranges, yrange, **kwargs)
      -
      -
      -

      A collection of horizontal bars spanning yrange with a sequence of -xranges.

      -

      Required arguments:

      -
      -
      ---- - - - - - - - - - - - - - -
      ArgumentDescription
      xrangessequence of (xmin, xwidth)
      yrangesequence of (ymin, ywidth)
      -
      -

      kwargs are -matplotlib.collections.BrokenBarHCollection -properties:

      -
      -
      ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      PropertyDescription
      agg_filterunknown
      alphafloat or None
      animated[True | False]
      antialiased or antialiasedsBoolean or sequence of booleans
      arrayunknown
      axesan Axes instance
      clima length 2 sequence of floats
      clip_boxa matplotlib.transforms.Bbox instance
      clip_on[True | False]
      clip_path[ (Path, Transform) | Patch | None ]
      cmapa colormap or registered colormap name
      colormatplotlib color arg or sequence of rgba tuples
      colorbarunknown
      containsa callable function
      edgecolor or edgecolorsmatplotlib color arg or sequence of rgba tuples
      facecolor or facecolorsmatplotlib color arg or sequence of rgba tuples
      figurea matplotlib.figure.Figure instance
      gidan id string
      hatch[ ‘/’ | ‘\’ | ‘|’ | ‘-‘ | ‘+’ | ‘x’ | ‘o’ | ‘O’ | ‘.’ | ‘*’ ]
      labelstring or anything printable with ‘%s’ conversion.
      linestyle or linestyles or dashes[‘solid’ | ‘dashed’, ‘dashdot’, ‘dotted’ | (offset, on-off-dash-seq) ]
      linewidth or lw or linewidthsfloat or sequence of floats
      lod[True | False]
      normunknown
      offset_positionunknown
      offsetsfloat or sequence of floats
      pathsunknown
      picker[None|float|boolean|callable]
      pickradiusunknown
      rasterized[True | False | None]
      snapunknown
      transformTransform instance
      urla url string
      urlsunknown
      visible[True | False]
      zorderany number
      -
      -

      these can either be a single argument, ie:

      -
      facecolors = 'black'
      -
      -
      -

      or a sequence of arguments for the various bars, ie:

      -
      facecolors = ('black', 'red', 'green')
      -
      -
      -

      Example:

      -

      (Source code, png, hires.png, pdf)

      -
      -../_images/broken_barh.png -
      -

      Additional kwargs: hold = [True|False] overrides default hold state

      -
      - -
      -
      -matplotlib.pyplot.cla()
      -

      Clear the current axes.

      -
      - -
      -
      -matplotlib.pyplot.clabel(CS, *args, **kwargs)
      -

      Label a contour plot.

      -

      Call signature:

      -
      clabel(cs, **kwargs)
      -
      -
      -

      Adds labels to line contours in cs, where cs is a -ContourSet object returned by -contour.

      -
      clabel(cs, v, **kwargs)
      -
      -
      -

      only labels contours listed in v.

      -

      Optional keyword arguments:

      -
      -
      -
      fontsize:
      -
      size in points or relative size eg ‘smaller’, ‘x-large’
      -
      colors:
      -
        -
      • if None, the color of each label matches the color of -the corresponding contour
      • -
      • if one string color, e.g., colors = ‘r’ or colors = -‘red’, all labels will be plotted in this color
      • -
      • if a tuple of matplotlib color args (string, float, rgb, etc), -different labels will be plotted in different colors in the order -specified
      • -
      -
      -
      inline:
      -
      controls whether the underlying contour is removed or -not. Default is True.
      -
      inline_spacing:
      -
      space in pixels to leave on each side of label when -placing inline. Defaults to 5. This spacing will be -exact for labels at locations where the contour is -straight, less so for labels on curved contours.
      -
      fmt:
      -
      a format string for the label. Default is ‘%1.3f’ -Alternatively, this can be a dictionary matching contour -levels with arbitrary strings to use for each contour level -(i.e., fmt[level]=string), or it can be any callable, such -as a Formatter instance, that -returns a string when called with a numeric contour level.
      -
      manual:
      -

      if True, contour labels will be placed manually using -mouse clicks. Click the first button near a contour to -add a label, click the second button (or potentially both -mouse buttons at once) to finish adding labels. The third -button can be used to remove the last label added, but -only if labels are not inline. Alternatively, the keyboard -can be used to select label locations (enter to end label -placement, delete or backspace act like the third mouse button, -and any other key will select a label location).

      -

      manual can be an iterable object of x,y tuples. Contour labels -will be created as if mouse is clicked at each x,y positions.

      -
      -
      rightside_up:
      -
      if True (default), label rotations will always be plus -or minus 90 degrees from level.
      -
      use_clabeltext:
      -
      if True (default is False), ClabelText class (instead of -matplotlib.Text) is used to create labels. ClabelText -recalculates rotation angles of texts during the drawing time, -therefore this can be used if aspect of the axes changes.
      -
      -
      -

      (Source code)

      -
      -../_images/contour_demo_00.png -

      (png, hires.png, pdf)

      -
      -
      -../_images/contour_demo_01.png -

      (png, hires.png, pdf)

      -
      -
      -../_images/contour_demo_02.png -

      (png, hires.png, pdf)

      -
      -
      -../_images/contour_demo_03.png -

      (png, hires.png, pdf)

      -
      -
      -../_images/contour_demo_04.png -

      (png, hires.png, pdf)

      -
      -
      -../_images/contour_demo_05.png -

      (png, hires.png, pdf)

      -
      -

      Additional kwargs: hold = [True|False] overrides default hold state

      -
      - -
      -
      -matplotlib.pyplot.clf()
      -

      Clear the current figure.

      -
      - -
      -
      -matplotlib.pyplot.clim(vmin=None, vmax=None)
      -

      Set the color limits of the current image.

      -

      To apply clim to all axes images do:

      -
      clim(0, 0.5)
      -
      -
      -

      If either vmin or vmax is None, the image min/max respectively -will be used for color scaling.

      -

      If you want to set the clim of multiple images, -use, for example:

      -
      for im in gca().get_images():
      -    im.set_clim(0, 0.05)
      -
      -
      -
      - -
      -
      -matplotlib.pyplot.close(*args)
      -

      Close a figure window.

      -

      close() by itself closes the current figure

      -

      close(h) where h is a Figure instance, closes that figure

      -

      close(num) closes figure number num

      -

      close(name) where name is a string, closes figure with that label

      -

      close('all') closes all the figure windows

      -
      - -
      -
      -matplotlib.pyplot.cohere(x, y, NFFT=256, Fs=2, Fc=0, detrend=<function detrend_none at 0x34d25f0>, window=<function window_hanning at 0x34d2398>, noverlap=0, pad_to=None, sides='default', scale_by_freq=None, hold=None, **kwargs)
      -

      Plot the coherence between x and y.

      -

      Call signature:

      -
      cohere(x, y, NFFT=256, Fs=2, Fc=0, detrend = mlab.detrend_none,
      -       window = mlab.window_hanning, noverlap=0, pad_to=None,
      -       sides='default', scale_by_freq=None, **kwargs)
      -
      -
      -

      Plot the coherence between x and y. Coherence is the -normalized cross spectral density:

      -

      Keyword arguments:

      -
      -
      -
      NFFT: integer
      -
      The number of data points used in each block for the FFT. -Must be even; a power 2 is most efficient. The default value is 256. -This should NOT be used to get zero padding, or the scaling of the -result will be incorrect. Use pad_to for this instead.
      -
      Fs: scalar
      -
      The sampling frequency (samples per time unit). It is used -to calculate the Fourier frequencies, freqs, in cycles per time -unit. The default value is 2.
      -
      detrend: callable
      -
      The function applied to each segment before fft-ing, -designed to remove the mean or linear trend. Unlike in -MATLAB, where the detrend parameter is a vector, in -matplotlib is it a function. The pylab -module defines detrend_none(), -detrend_mean(), and -detrend_linear(), but you can use -a custom function as well.
      -
      window: callable or ndarray
      -
      A function or a vector of length NFFT. To create window -vectors see window_hanning(), window_none(), -numpy.blackman(), numpy.hamming(), -numpy.bartlett(), scipy.signal(), -scipy.signal.get_window(), etc. The default is -window_hanning(). If a function is passed as the -argument, it must take a data segment as an argument and -return the windowed version of the segment.
      -
      pad_to: integer
      -
      The number of points to which the data segment is padded when -performing the FFT. This can be different from NFFT, which -specifies the number of data points used. While not increasing -the actual resolution of the psd (the minimum distance between -resolvable peaks), this can give more points in the plot, -allowing for more detail. This corresponds to the n parameter -in the call to fft(). The default is None, which sets pad_to -equal to NFFT
      -
      sides: [ ‘default’ | ‘onesided’ | ‘twosided’ ]
      -
      Specifies which sides of the PSD to return. Default gives the -default behavior, which returns one-sided for real data and both -for complex data. ‘onesided’ forces the return of a one-sided PSD, -while ‘twosided’ forces two-sided.
      -
      scale_by_freq: boolean
      -
      Specifies whether the resulting density values should be scaled -by the scaling frequency, which gives density in units of Hz^-1. -This allows for integration over the returned frequency values. -The default is True for MATLAB compatibility.
      -
      noverlap: integer
      -
      The number of points of overlap between blocks. The -default value is 0 (no overlap).
      -
      Fc: integer
      -
      The center frequency of x (defaults to 0), which offsets -the x extents of the plot to reflect the frequency range used -when a signal is acquired and then filtered and downsampled to -baseband.
      -
      -
      -

      The return value is a tuple (Cxy, f), where f are the -frequencies of the coherence vector.

      -

      kwargs are applied to the lines.

      -

      References:

      -
      -
        -
      • Bendat & Piersol – Random Data: Analysis and Measurement -Procedures, John Wiley & Sons (1986)
      • -
      -
      -

      kwargs control the Line2D -properties of the coherence plot:

      -
      -
      ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      PropertyDescription
      agg_filterunknown
      alphafloat (0.0 transparent through 1.0 opaque)
      animated[True | False]
      antialiased or aa[True | False]
      axesan Axes instance
      clip_boxa matplotlib.transforms.Bbox instance
      clip_on[True | False]
      clip_path[ (Path, Transform) | Patch | None ]
      color or cany matplotlib color
      containsa callable function
      dash_capstyle[‘butt’ | ‘round’ | ‘projecting’]
      dash_joinstyle[‘miter’ | ‘round’ | ‘bevel’]
      dashessequence of on/off ink in points
      data2D array (rows are x, y) or two 1D arrays
      drawstyle[‘default’ | ‘steps’ | ‘steps-pre’ | ‘steps-mid’ | ‘steps-post’]
      figurea matplotlib.figure.Figure instance
      fillstyle[‘full’ | ‘left’ | ‘right’ | ‘bottom’ | ‘top’ | ‘none’]
      gidan id string
      labelstring or anything printable with ‘%s’ conversion.
      linestyle or ls['-' | '--' | '-.' | ':' | 'None' | ' ' | ''] and any drawstyle in combination with a linestyle, e.g., 'steps--'.
      linewidth or lwfloat value in points
      lod[True | False]
      markerunknown
      markeredgecolor or mecany matplotlib color
      markeredgewidth or mewfloat value in points
      markerfacecolor or mfcany matplotlib color
      markerfacecoloralt or mfcaltany matplotlib color
      markersize or msfloat
      markeveryNone | integer | (startind, stride)
      pickerfloat distance in points or callable pick function fn(artist, event)
      pickradiusfloat distance in points
      rasterized[True | False | None]
      snapunknown
      solid_capstyle[‘butt’ | ‘round’ | ‘projecting’]
      solid_joinstyle[‘miter’ | ‘round’ | ‘bevel’]
      transforma matplotlib.transforms.Transform instance
      urla url string
      visible[True | False]
      xdata1D array
      ydata1D array
      zorderany number
      -
      -

      Example:

      -

      (Source code, png, hires.png, pdf)

      -
      -../_images/cohere_demo.png -
      -

      Additional kwargs: hold = [True|False] overrides default hold state

      -
      - -
      -
      -matplotlib.pyplot.colorbar(mappable=None, cax=None, ax=None, **kw)
      -

      Add a colorbar to a plot.

      -

      Function signatures for the pyplot interface; all -but the first are also method signatures for the -colorbar() method:

      -
      colorbar(**kwargs)
      -colorbar(mappable, **kwargs)
      -colorbar(mappable, cax=cax, **kwargs)
      -colorbar(mappable, ax=ax, **kwargs)
      -
      -
      -

      arguments:

      -
      -
      -
      mappable
      -
      the Image, -ContourSet, etc. to -which the colorbar applies; this argument is mandatory for the -colorbar() method but optional for the -colorbar() function, which sets the -default to the current image.
      -
      -
      -

      keyword arguments:

      -
      -
      -
      cax
      -
      None | axes object into which the colorbar will be drawn
      -
      ax
      -
      None | parent axes object from which space for a new -colorbar axes will be stolen
      -
      use_gridspec
      -
      False | If cax is None, a new cax is created as an instance of -Axes. If ax is an instance of Subplot and use_gridspec is True, -cax is created as an instance of Subplot using the -grid_spec module.
      -
      -
      -

      Additional keyword arguments are of two kinds:

      -
      -

      axes properties:

      -
      -
      ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      PropertyDescription
      orientationvertical or horizontal
      fraction0.15; fraction of original axes to use for colorbar
      pad0.05 if vertical, 0.15 if horizontal; fraction -of original axes between colorbar and new image axes
      shrink1.0; fraction by which to shrink the colorbar
      aspect20; ratio of long to short dimensions
      anchor(0.0, 0.5) if vertical; (0.5, 1.0) if horizontal; -the anchor point of the colorbar axes
      panchor(1.0, 0.5) if vertical; (0.5, 0.0) if horizontal; -the anchor point of the colorbar parent axes
      -
      -

      colorbar properties:

      -
      -
      ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      PropertyDescription
      extend[ ‘neither’ | ‘both’ | ‘min’ | ‘max’ ] -If not ‘neither’, make pointed end(s) for out-of- -range values. These are set for a given colormap -using the colormap set_under and set_over methods.
      extendfrac[ None | ‘auto’ | length | lengths ] -If set to None, both the minimum and maximum -triangular colorbar extensions with have a length of -5% of the interior colorbar length (this is the -default setting). If set to ‘auto’, makes the -triangular colorbar extensions the same lengths as -the interior boxes (when spacing is set to -‘uniform’) or the same lengths as the respective -adjacent interior boxes (when spacing is set to -‘proportional’). If a scalar, indicates the length -of both the minimum and maximum triangular colorbar -extensions as a fraction of the interior colorbar -length. A two-element sequence of fractions may also -be given, indicating the lengths of the minimum and -maximum colorbar extensions respectively as a -fraction of the interior colorbar length.
      extendrect[ False | True ] -If False the minimum and maximum colorbar extensions -will be triangular (the default). If True the -extensions will be rectangular.
      spacing[ ‘uniform’ | ‘proportional’ ] -Uniform spacing gives each discrete color the same -space; proportional makes the space proportional to -the data interval.
      ticks[ None | list of ticks | Locator object ] -If None, ticks are determined automatically from the -input.
      format[ None | format string | Formatter object ] -If None, the -ScalarFormatter is used. -If a format string is given, e.g., ‘%.3f’, that is -used. An alternative -Formatter object may be -given instead.
      drawedges[ False | True ] If true, draw lines at color -boundaries.
      -

      The following will probably be useful only in the context of -indexed colors (that is, when the mappable has norm=NoNorm()), -or other unusual circumstances.

      - ---- - - - - - - - - - - - - - -
      PropertyDescription
      boundariesNone or a sequence
      valuesNone or a sequence which must be of length 1 less -than the sequence of boundaries. For each region -delimited by adjacent entries in boundaries, the -color mapped to the corresponding value in values -will be used.
      -
      -
      -

      If mappable is a ContourSet, its extend -kwarg is included automatically.

      -

      Note that the shrink kwarg provides a simple way to keep a vertical -colorbar, for example, from being taller than the axes of the mappable -to which the colorbar is attached; but it is a manual method requiring -some trial and error. If the colorbar is too tall (or a horizontal -colorbar is too wide) use a smaller value of shrink.

      -

      For more precise control, you can manually specify the positions of -the axes objects in which the mappable and the colorbar are drawn. In -this case, do not use any of the axes properties kwargs.

      -

      It is known that some vector graphics viewer (svg and pdf) renders white gaps -between segments of the colorbar. This is due to bugs in the viewers not -matplotlib. As a workaround the colorbar can be rendered with overlapping -segments:

      -
      cbar = colorbar()
      -cbar.solids.set_edgecolor("face")
      -draw()
      -
      -
      -

      However this has negative consequences in other circumstances. Particularly -with semi transparent images (alpha < 1) and colorbar extensions and is not -enabled by default see (issue #1188).

      -
      -
      returns:
      -
      Colorbar instance; see also its base class, -ColorbarBase. Call the -set_label() method -to label the colorbar.
      -
      -
      - -
      -
      -matplotlib.pyplot.colors()
      -

      This is a do-nothing function to provide you with help on how -matplotlib handles colors.

      -

      Commands which take color arguments can use several formats to -specify the colors. For the basic built-in colors, you can use a -single letter

      -
      -
      ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      AliasColor
      ‘b’blue
      ‘g’green
      ‘r’red
      ‘c’cyan
      ‘m’magenta
      ‘y’yellow
      ‘k’black
      ‘w’white
      -
      -

      For a greater range of colors, you have two options. You can -specify the color using an html hex string, as in:

      -
      color = '#eeefff'
      -
      -
      -

      or you can pass an R,G,B tuple, where each of R,G,B are in the -range [0,1].

      -

      You can also use any legal html name for a color, for example:

      -
      color = 'red'
      -color = 'burlywood'
      -color = 'chartreuse'
      -
      -
      -

      The example below creates a subplot with a dark -slate gray background:

      -
      subplot(111, axisbg=(0.1843, 0.3098, 0.3098))
      -
      -
      -

      Here is an example that creates a pale turquoise title:

      -
      title('Is this the best color?', color='#afeeee')
      -
      -
      -
      - -
      -
      -matplotlib.pyplot.connect(s, func)
      -

      Connect event with string s to func. The signature of func is:

      -
      def func(event)
      -
      -

      where event is a matplotlib.backend_bases.Event. The -following events are recognized

      -
        -
      • ‘button_press_event’
      • -
      • ‘button_release_event’
      • -
      • ‘draw_event’
      • -
      • ‘key_press_event’
      • -
      • ‘key_release_event’
      • -
      • ‘motion_notify_event’
      • -
      • ‘pick_event’
      • -
      • ‘resize_event’
      • -
      • ‘scroll_event’
      • -
      • ‘figure_enter_event’,
      • -
      • ‘figure_leave_event’,
      • -
      • ‘axes_enter_event’,
      • -
      • ‘axes_leave_event’
      • -
      • ‘close_event’
      • -
      -

      For the location events (button and key press/release), if the -mouse is over the axes, the variable event.inaxes will be -set to the Axes the event occurs is -over, and additionally, the variables event.xdata and -event.ydata will be defined. This is the mouse location -in data coords. See -KeyEvent and -MouseEvent for more info.

      -

      Return value is a connection id that can be used with -mpl_disconnect().

      -

      Example usage:

      -
      def on_press(event):
      -    print('you pressed', event.button, event.xdata, event.ydata)
      -
      -cid = canvas.mpl_connect('button_press_event', on_press)
      -
      -
      -
      - -
      -
      -matplotlib.pyplot.contour(*args, **kwargs)
      -

      Plot contours.

      -

      contour() and -contourf() draw contour lines and -filled contours, respectively. Except as noted, function -signatures and return values are the same for both versions.

      -

      contourf() differs from the MATLAB -version in that it does not draw the polygon edges. -To draw edges, add line contours with -calls to contour().

      -

      Call signatures:

      -
      contour(Z)
      -
      -
      -

      make a contour plot of an array Z. The level values are chosen -automatically.

      -
      contour(X,Y,Z)
      -
      -
      -

      X, Y specify the (x, y) coordinates of the surface

      -
      contour(Z,N)
      -contour(X,Y,Z,N)
      -
      -
      -

      contour N automatically-chosen levels.

      -
      contour(Z,V)
      -contour(X,Y,Z,V)
      -
      -
      -

      draw contour lines at the values specified in sequence V

      -
      contourf(..., V)
      -
      -
      -

      fill the len(V)-1 regions between the values in V

      -
      contour(Z, **kwargs)
      -
      -
      -

      Use keyword args to control colors, linewidth, origin, cmap ... see -below for more details.

      -

      X and Y must both be 2-D with the same shape as Z, or they -must both be 1-D such that len(X) is the number of columns in -Z and len(Y) is the number of rows in Z.

      -

      C = contour(...) returns a -QuadContourSet object.

      -

      Optional keyword arguments:

      -
      -
      -
      colors: [ None | string | (mpl_colors) ]
      -

      If None, the colormap specified by cmap will be used.

      -

      If a string, like ‘r’ or ‘red’, all levels will be plotted in this -color.

      -

      If a tuple of matplotlib color args (string, float, rgb, etc), -different levels will be plotted in different colors in the order -specified.

      -
      -
      alpha: float
      -
      The alpha blending value
      -
      cmap: [ None | Colormap ]
      -
      A cm Colormap instance or -None. If cmap is None and colors is None, a -default Colormap is used.
      -
      norm: [ None | Normalize ]
      -
      A matplotlib.colors.Normalize instance for -scaling data values to colors. If norm is None and -colors is None, the default linear scaling is used.
      -
      vmin, vmax: [ None | scalar ]
      -
      If not None, either or both of these values will be -supplied to the matplotlib.colors.Normalize -instance, overriding the default color scaling based on -levels.
      -
      levels: [level0, level1, ..., leveln]
      -
      A list of floating point numbers indicating the level -curves to draw; eg to draw just the zero contour pass -levels=[0]
      -
      origin: [ None | ‘upper’ | ‘lower’ | ‘image’ ]
      -

      If None, the first value of Z will correspond to the -lower left corner, location (0,0). If ‘image’, the rc -value for image.origin will be used.

      -

      This keyword is not active if X and Y are specified in -the call to contour.

      -
      -
      -

      extent: [ None | (x0,x1,y0,y1) ]

      -
      -

      If origin is not None, then extent is interpreted as -in matplotlib.pyplot.imshow(): it gives the outer -pixel boundaries. In this case, the position of Z[0,0] -is the center of the pixel, not a corner. If origin is -None, then (x0, y0) is the position of Z[0,0], and -(x1, y1) is the position of Z[-1,-1].

      -

      This keyword is not active if X and Y are specified in -the call to contour.

      -
      -
      -
      locator: [ None | ticker.Locator subclass ]
      -
      If locator is None, the default -MaxNLocator is used. The -locator is used to determine the contour levels if they -are not given explicitly via the V argument.
      -
      extend: [ ‘neither’ | ‘both’ | ‘min’ | ‘max’ ]
      -
      Unless this is ‘neither’, contour levels are automatically -added to one or both ends of the range so that all data -are included. These added ranges are then mapped to the -special colormap values which default to the ends of the -colormap range, but can be set via -matplotlib.colors.Colormap.set_under() and -matplotlib.colors.Colormap.set_over() methods.
      -
      xunits, yunits: [ None | registered units ]
      -
      Override axis units by specifying an instance of a -matplotlib.units.ConversionInterface.
      -
      antialiased: [ True | False ]
      -
      enable antialiasing, overriding the defaults. For -filled contours, the default is True. For line contours, -it is taken from rcParams[‘lines.antialiased’].
      -
      -
      -

      contour-only keyword arguments:

      -
      -
      -
      linewidths: [ None | number | tuple of numbers ]
      -

      If linewidths is None, the default width in -lines.linewidth in matplotlibrc is used.

      -

      If a number, all levels will be plotted with this linewidth.

      -

      If a tuple, different levels will be plotted with different -linewidths in the order specified

      -
      -
      linestyles: [ None | ‘solid’ | ‘dashed’ | ‘dashdot’ | ‘dotted’ ]
      -

      If linestyles is None, the default is ‘solid’ unless -the lines are monochrome. In that case, negative -contours will take their linestyle from the matplotlibrc -contour.negative_linestyle setting.

      -

      linestyles can also be an iterable of the above strings -specifying a set of linestyles to be used. If this -iterable is shorter than the number of contour levels -it will be repeated as necessary.

      -
      -
      -
      -

      contourf-only keyword arguments:

      -
      -
      -
      nchunk: [ 0 | integer ]
      -
      If 0, no subdivision of the domain. Specify a positive integer to -divide the domain into subdomains of roughly nchunk by nchunk -points. This may never actually be advantageous, so this option may -be removed. Chunking introduces artifacts at the chunk boundaries -unless antialiased is False.
      -
      hatches:
      -
      A list of cross hatch patterns to use on the filled areas. -If None, no hatching will be added to the contour. -Hatching is supported in the PostScript, PDF, SVG and Agg -backends only.
      -
      -
      -

      Note: contourf fills intervals that are closed at the top; that -is, for boundaries z1 and z2, the filled region is:

      -
      z1 < z <= z2
      -
      -
      -

      There is one exception: if the lowest boundary coincides with -the minimum value of the z array, then that minimum value -will be included in the lowest interval.

      -

      Examples:

      -

      (Source code)

      -
      -../_images/contour_demo_00.png -

      (png, hires.png, pdf)

      -
      -
      -../_images/contour_demo_01.png -

      (png, hires.png, pdf)

      -
      -
      -../_images/contour_demo_02.png -

      (png, hires.png, pdf)

      -
      -
      -../_images/contour_demo_03.png -

      (png, hires.png, pdf)

      -
      -
      -../_images/contour_demo_04.png -

      (png, hires.png, pdf)

      -
      -
      -../_images/contour_demo_05.png -

      (png, hires.png, pdf)

      -
      -

      (Source code)

      -
      -../_images/contourf_demo_00.png -

      (png, hires.png, pdf)

      -
      -
      -../_images/contourf_demo_01.png -

      (png, hires.png, pdf)

      -
      -
      -../_images/contourf_demo_02.png -

      (png, hires.png, pdf)

      -
      -

      Additional kwargs: hold = [True|False] overrides default hold state

      -
      - -
      -
      -matplotlib.pyplot.contourf(*args, **kwargs)
      -

      Plot contours.

      -

      contour() and -contourf() draw contour lines and -filled contours, respectively. Except as noted, function -signatures and return values are the same for both versions.

      -

      contourf() differs from the MATLAB -version in that it does not draw the polygon edges. -To draw edges, add line contours with -calls to contour().

      -

      Call signatures:

      -
      contour(Z)
      -
      -
      -

      make a contour plot of an array Z. The level values are chosen -automatically.

      -
      contour(X,Y,Z)
      -
      -
      -

      X, Y specify the (x, y) coordinates of the surface

      -
      contour(Z,N)
      -contour(X,Y,Z,N)
      -
      -
      -

      contour N automatically-chosen levels.

      -
      contour(Z,V)
      -contour(X,Y,Z,V)
      -
      -
      -

      draw contour lines at the values specified in sequence V

      -
      contourf(..., V)
      -
      -
      -

      fill the len(V)-1 regions between the values in V

      -
      contour(Z, **kwargs)
      -
      -
      -

      Use keyword args to control colors, linewidth, origin, cmap ... see -below for more details.

      -

      X and Y must both be 2-D with the same shape as Z, or they -must both be 1-D such that len(X) is the number of columns in -Z and len(Y) is the number of rows in Z.

      -

      C = contour(...) returns a -QuadContourSet object.

      -

      Optional keyword arguments:

      -
      -
      -
      colors: [ None | string | (mpl_colors) ]
      -

      If None, the colormap specified by cmap will be used.

      -

      If a string, like ‘r’ or ‘red’, all levels will be plotted in this -color.

      -

      If a tuple of matplotlib color args (string, float, rgb, etc), -different levels will be plotted in different colors in the order -specified.

      -
      -
      alpha: float
      -
      The alpha blending value
      -
      cmap: [ None | Colormap ]
      -
      A cm Colormap instance or -None. If cmap is None and colors is None, a -default Colormap is used.
      -
      norm: [ None | Normalize ]
      -
      A matplotlib.colors.Normalize instance for -scaling data values to colors. If norm is None and -colors is None, the default linear scaling is used.
      -
      vmin, vmax: [ None | scalar ]
      -
      If not None, either or both of these values will be -supplied to the matplotlib.colors.Normalize -instance, overriding the default color scaling based on -levels.
      -
      levels: [level0, level1, ..., leveln]
      -
      A list of floating point numbers indicating the level -curves to draw; eg to draw just the zero contour pass -levels=[0]
      -
      origin: [ None | ‘upper’ | ‘lower’ | ‘image’ ]
      -

      If None, the first value of Z will correspond to the -lower left corner, location (0,0). If ‘image’, the rc -value for image.origin will be used.

      -

      This keyword is not active if X and Y are specified in -the call to contour.

      -
      -
      -

      extent: [ None | (x0,x1,y0,y1) ]

      -
      -

      If origin is not None, then extent is interpreted as -in matplotlib.pyplot.imshow(): it gives the outer -pixel boundaries. In this case, the position of Z[0,0] -is the center of the pixel, not a corner. If origin is -None, then (x0, y0) is the position of Z[0,0], and -(x1, y1) is the position of Z[-1,-1].

      -

      This keyword is not active if X and Y are specified in -the call to contour.

      -
      -
      -
      locator: [ None | ticker.Locator subclass ]
      -
      If locator is None, the default -MaxNLocator is used. The -locator is used to determine the contour levels if they -are not given explicitly via the V argument.
      -
      extend: [ ‘neither’ | ‘both’ | ‘min’ | ‘max’ ]
      -
      Unless this is ‘neither’, contour levels are automatically -added to one or both ends of the range so that all data -are included. These added ranges are then mapped to the -special colormap values which default to the ends of the -colormap range, but can be set via -matplotlib.colors.Colormap.set_under() and -matplotlib.colors.Colormap.set_over() methods.
      -
      xunits, yunits: [ None | registered units ]
      -
      Override axis units by specifying an instance of a -matplotlib.units.ConversionInterface.
      -
      antialiased: [ True | False ]
      -
      enable antialiasing, overriding the defaults. For -filled contours, the default is True. For line contours, -it is taken from rcParams[‘lines.antialiased’].
      -
      -
      -

      contour-only keyword arguments:

      -
      -
      -
      linewidths: [ None | number | tuple of numbers ]
      -

      If linewidths is None, the default width in -lines.linewidth in matplotlibrc is used.

      -

      If a number, all levels will be plotted with this linewidth.

      -

      If a tuple, different levels will be plotted with different -linewidths in the order specified

      -
      -
      linestyles: [ None | ‘solid’ | ‘dashed’ | ‘dashdot’ | ‘dotted’ ]
      -

      If linestyles is None, the default is ‘solid’ unless -the lines are monochrome. In that case, negative -contours will take their linestyle from the matplotlibrc -contour.negative_linestyle setting.

      -

      linestyles can also be an iterable of the above strings -specifying a set of linestyles to be used. If this -iterable is shorter than the number of contour levels -it will be repeated as necessary.

      -
      -
      -
      -

      contourf-only keyword arguments:

      -
      -
      -
      nchunk: [ 0 | integer ]
      -
      If 0, no subdivision of the domain. Specify a positive integer to -divide the domain into subdomains of roughly nchunk by nchunk -points. This may never actually be advantageous, so this option may -be removed. Chunking introduces artifacts at the chunk boundaries -unless antialiased is False.
      -
      hatches:
      -
      A list of cross hatch patterns to use on the filled areas. -If None, no hatching will be added to the contour. -Hatching is supported in the PostScript, PDF, SVG and Agg -backends only.
      -
      -
      -

      Note: contourf fills intervals that are closed at the top; that -is, for boundaries z1 and z2, the filled region is:

      -
      z1 < z <= z2
      -
      -
      -

      There is one exception: if the lowest boundary coincides with -the minimum value of the z array, then that minimum value -will be included in the lowest interval.

      -

      Examples:

      -

      (Source code)

      -
      -../_images/contour_demo_00.png -

      (png, hires.png, pdf)

      -
      -
      -../_images/contour_demo_01.png -

      (png, hires.png, pdf)

      -
      -
      -../_images/contour_demo_02.png -

      (png, hires.png, pdf)

      -
      -
      -../_images/contour_demo_03.png -

      (png, hires.png, pdf)

      -
      -
      -../_images/contour_demo_04.png -

      (png, hires.png, pdf)

      -
      -
      -../_images/contour_demo_05.png -

      (png, hires.png, pdf)

      -
      -

      (Source code)

      -
      -../_images/contourf_demo_00.png -

      (png, hires.png, pdf)

      -
      -
      -../_images/contourf_demo_01.png -

      (png, hires.png, pdf)

      -
      -
      -../_images/contourf_demo_02.png -

      (png, hires.png, pdf)

      -
      -

      Additional kwargs: hold = [True|False] overrides default hold state

      -
      - -
      -
      -matplotlib.pyplot.cool()
      -

      set the default colormap to cool and apply to current image if any. -See help(colormaps) for more information

      -
      - -
      -
      -matplotlib.pyplot.copper()
      -

      set the default colormap to copper and apply to current image if any. -See help(colormaps) for more information

      -
      - -
      -
      -matplotlib.pyplot.csd(x, y, NFFT=256, Fs=2, Fc=0, detrend=<function detrend_none at 0x34d25f0>, window=<function window_hanning at 0x34d2398>, noverlap=0, pad_to=None, sides='default', scale_by_freq=None, hold=None, **kwargs)
      -

      Plot cross-spectral density.

      -

      Call signature:

      -
      csd(x, y, NFFT=256, Fs=2, Fc=0, detrend=mlab.detrend_none,
      -    window=mlab.window_hanning, noverlap=0, pad_to=None,
      -    sides='default', scale_by_freq=None, **kwargs)
      -
      -
      -

      The cross spectral density by Welch’s average -periodogram method. The vectors x and y are divided into -NFFT length segments. Each segment is detrended by function -detrend and windowed by function window. The product of -the direct FFTs of x and y are averaged over each segment -to compute , with a scaling to correct for power -loss due to windowing.

      -

      Returns the tuple (Pxy, freqs). P is the cross spectrum -(complex valued), and is -plotted.

      -

      Keyword arguments:

      -
      -
      -
      NFFT: integer
      -
      The number of data points used in each block for the FFT. -Must be even; a power 2 is most efficient. The default value is 256. -This should NOT be used to get zero padding, or the scaling of the -result will be incorrect. Use pad_to for this instead.
      -
      Fs: scalar
      -
      The sampling frequency (samples per time unit). It is used -to calculate the Fourier frequencies, freqs, in cycles per time -unit. The default value is 2.
      -
      detrend: callable
      -
      The function applied to each segment before fft-ing, -designed to remove the mean or linear trend. Unlike in -MATLAB, where the detrend parameter is a vector, in -matplotlib is it a function. The pylab -module defines detrend_none(), -detrend_mean(), and -detrend_linear(), but you can use -a custom function as well.
      -
      window: callable or ndarray
      -
      A function or a vector of length NFFT. To create window -vectors see window_hanning(), window_none(), -numpy.blackman(), numpy.hamming(), -numpy.bartlett(), scipy.signal(), -scipy.signal.get_window(), etc. The default is -window_hanning(). If a function is passed as the -argument, it must take a data segment as an argument and -return the windowed version of the segment.
      -
      pad_to: integer
      -
      The number of points to which the data segment is padded when -performing the FFT. This can be different from NFFT, which -specifies the number of data points used. While not increasing -the actual resolution of the psd (the minimum distance between -resolvable peaks), this can give more points in the plot, -allowing for more detail. This corresponds to the n parameter -in the call to fft(). The default is None, which sets pad_to -equal to NFFT
      -
      sides: [ ‘default’ | ‘onesided’ | ‘twosided’ ]
      -
      Specifies which sides of the PSD to return. Default gives the -default behavior, which returns one-sided for real data and both -for complex data. ‘onesided’ forces the return of a one-sided PSD, -while ‘twosided’ forces two-sided.
      -
      scale_by_freq: boolean
      -
      Specifies whether the resulting density values should be scaled -by the scaling frequency, which gives density in units of Hz^-1. -This allows for integration over the returned frequency values. -The default is True for MATLAB compatibility.
      -
      noverlap: integer
      -
      The number of points of overlap between blocks. The -default value is 0 (no overlap).
      -
      Fc: integer
      -
      The center frequency of x (defaults to 0), which offsets -the x extents of the plot to reflect the frequency range used -when a signal is acquired and then filtered and downsampled to -baseband.
      -
      -
      -
      -
      References:
      -
      Bendat & Piersol – Random Data: Analysis and Measurement -Procedures, John Wiley & Sons (1986)
      -
      -

      kwargs control the Line2D properties:

      -
      -
      ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      PropertyDescription
      agg_filterunknown
      alphafloat (0.0 transparent through 1.0 opaque)
      animated[True | False]
      antialiased or aa[True | False]
      axesan Axes instance
      clip_boxa matplotlib.transforms.Bbox instance
      clip_on[True | False]
      clip_path[ (Path, Transform) | Patch | None ]
      color or cany matplotlib color
      containsa callable function
      dash_capstyle[‘butt’ | ‘round’ | ‘projecting’]
      dash_joinstyle[‘miter’ | ‘round’ | ‘bevel’]
      dashessequence of on/off ink in points
      data2D array (rows are x, y) or two 1D arrays
      drawstyle[‘default’ | ‘steps’ | ‘steps-pre’ | ‘steps-mid’ | ‘steps-post’]
      figurea matplotlib.figure.Figure instance
      fillstyle[‘full’ | ‘left’ | ‘right’ | ‘bottom’ | ‘top’ | ‘none’]
      gidan id string
      labelstring or anything printable with ‘%s’ conversion.
      linestyle or ls['-' | '--' | '-.' | ':' | 'None' | ' ' | ''] and any drawstyle in combination with a linestyle, e.g., 'steps--'.
      linewidth or lwfloat value in points
      lod[True | False]
      markerunknown
      markeredgecolor or mecany matplotlib color
      markeredgewidth or mewfloat value in points
      markerfacecolor or mfcany matplotlib color
      markerfacecoloralt or mfcaltany matplotlib color
      markersize or msfloat
      markeveryNone | integer | (startind, stride)
      pickerfloat distance in points or callable pick function fn(artist, event)
      pickradiusfloat distance in points
      rasterized[True | False | None]
      snapunknown
      solid_capstyle[‘butt’ | ‘round’ | ‘projecting’]
      solid_joinstyle[‘miter’ | ‘round’ | ‘bevel’]
      transforma matplotlib.transforms.Transform instance
      urla url string
      visible[True | False]
      xdata1D array
      ydata1D array
      zorderany number
      -
      -

      Example:

      -

      (Source code, png, hires.png, pdf)

      -
      -../_images/csd_demo.png -
      -

      Additional kwargs: hold = [True|False] overrides default hold state

      -
      - -
      -
      -matplotlib.pyplot.delaxes(*args)
      -

      Remove an axes from the current figure. If ax -doesn’t exist, an error will be raised.

      -

      delaxes(): delete the current axes

      -
      - -
      -
      -matplotlib.pyplot.disconnect(cid)
      -

      Disconnect callback id cid

      -

      Example usage:

      -
      cid = canvas.mpl_connect('button_press_event', on_press)
      -#...later
      -canvas.mpl_disconnect(cid)
      -
      -
      -
      - -
      -
      -matplotlib.pyplot.draw()
      -

      Redraw the current figure.

      -

      This is used in interactive mode to update a figure that -has been altered using one or more plot object method calls; -it is not needed if figure modification is done entirely -with pyplot functions, if a sequence of modifications ends -with a pyplot function, or if matplotlib is in non-interactive -mode and the sequence of modifications ends with show() or -savefig().

      -

      A more object-oriented alternative, given any -Figure instance, fig, that -was created using a pyplot function, is:

      -
      fig.canvas.draw()
      -
      -
      -
      - -
      -
      -matplotlib.pyplot.errorbar(x, y, yerr=None, xerr=None, fmt='-', ecolor=None, elinewidth=None, capsize=3, barsabove=False, lolims=False, uplims=False, xlolims=False, xuplims=False, errorevery=1, capthick=None, hold=None, **kwargs)
      -

      Plot an errorbar graph.

      -

      Call signature:

      -
      errorbar(x, y, yerr=None, xerr=None,
      -         fmt='-', ecolor=None, elinewidth=None, capsize=3,
      -         barsabove=False, lolims=False, uplims=False,
      -         xlolims=False, xuplims=False, errorevery=1,
      -         capthick=None)
      -
      -
      -

      Plot x versus y with error deltas in yerr and xerr. -Vertical errorbars are plotted if yerr is not None. -Horizontal errorbars are plotted if xerr is not None.

      -

      x, y, xerr, and yerr can all be scalars, which plots a -single error bar at x, y.

      -

      Optional keyword arguments:

      -
      -
      -
      xerr/yerr: [ scalar | N, Nx1, or 2xN array-like ]
      -

      If a scalar number, len(N) array-like object, or an Nx1 -array-like object, errorbars are drawn at +/-value relative -to the data.

      -

      If a sequence of shape 2xN, errorbars are drawn at -row1 -and +row2 relative to the data.

      -
      -
      fmt: ‘-‘
      -
      The plot format symbol. If fmt is None, only the -errorbars are plotted. This is used for adding -errorbars to a bar plot, for example.
      -
      ecolor: [ None | mpl color ]
      -
      A matplotlib color arg which gives the color the errorbar lines; -if None, use the marker color.
      -
      elinewidth: scalar
      -
      The linewidth of the errorbar lines. If None, use the linewidth.
      -
      capsize: scalar
      -
      The length of the error bar caps in points
      -
      capthick: scalar
      -
      An alias kwarg to markeredgewidth (a.k.a. - mew). This -setting is a more sensible name for the property that -controls the thickness of the error bar cap in points. For -backwards compatibility, if mew or markeredgewidth are given, -then they will over-ride capthick. This may change in future -releases.
      -
      barsabove: [ True | False ]
      -
      if True, will plot the errorbars above the plot -symbols. Default is below.
      -
      lolims / uplims / xlolims / xuplims: [ False | True ]
      -
      These arguments can be used to indicate that a value gives -only upper/lower limits. In that case a caret symbol is -used to indicate this. lims-arguments may be of the same -type as xerr and yerr.
      -
      errorevery: positive integer
      -
      subsamples the errorbars. e.g., if everyerror=5, errorbars for -every 5-th datapoint will be plotted. The data plot itself still -shows all data points.
      -
      -
      -

      All other keyword arguments are passed on to the plot command for the -markers. For example, this code makes big red squares with -thick green edges:

      -
      x,y,yerr = rand(3,10)
      -errorbar(x, y, yerr, marker='s',
      -         mfc='red', mec='green', ms=20, mew=4)
      -
      -
      -

      where mfc, mec, ms and mew are aliases for the longer -property names, markerfacecolor, markeredgecolor, markersize -and markeredgewith.

      -

      valid kwargs for the marker properties are

      -
      -
      ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      PropertyDescription
      agg_filterunknown
      alphafloat (0.0 transparent through 1.0 opaque)
      animated[True | False]
      antialiased or aa[True | False]
      axesan Axes instance
      clip_boxa matplotlib.transforms.Bbox instance
      clip_on[True | False]
      clip_path[ (Path, Transform) | Patch | None ]
      color or cany matplotlib color
      containsa callable function
      dash_capstyle[‘butt’ | ‘round’ | ‘projecting’]
      dash_joinstyle[‘miter’ | ‘round’ | ‘bevel’]
      dashessequence of on/off ink in points
      data2D array (rows are x, y) or two 1D arrays
      drawstyle[‘default’ | ‘steps’ | ‘steps-pre’ | ‘steps-mid’ | ‘steps-post’]
      figurea matplotlib.figure.Figure instance
      fillstyle[‘full’ | ‘left’ | ‘right’ | ‘bottom’ | ‘top’ | ‘none’]
      gidan id string
      labelstring or anything printable with ‘%s’ conversion.
      linestyle or ls['-' | '--' | '-.' | ':' | 'None' | ' ' | ''] and any drawstyle in combination with a linestyle, e.g., 'steps--'.
      linewidth or lwfloat value in points
      lod[True | False]
      markerunknown
      markeredgecolor or mecany matplotlib color
      markeredgewidth or mewfloat value in points
      markerfacecolor or mfcany matplotlib color
      markerfacecoloralt or mfcaltany matplotlib color
      markersize or msfloat
      markeveryNone | integer | (startind, stride)
      pickerfloat distance in points or callable pick function fn(artist, event)
      pickradiusfloat distance in points
      rasterized[True | False | None]
      snapunknown
      solid_capstyle[‘butt’ | ‘round’ | ‘projecting’]
      solid_joinstyle[‘miter’ | ‘round’ | ‘bevel’]
      transforma matplotlib.transforms.Transform instance
      urla url string
      visible[True | False]
      xdata1D array
      ydata1D array
      zorderany number
      -
      -

      Returns (plotline, caplines, barlinecols):

      -
      -
      -
      plotline: Line2D instance
      -
      x, y plot markers and/or line
      -
      caplines: list of error bar cap
      -
      Line2D instances
      -
      barlinecols: list of
      -
      LineCollection instances for -the horizontal and vertical error ranges.
      -
      -
      -

      Example:

      -

      (Source code, png, hires.png, pdf)

      -
      -../_images/errorbar_demo.png -
      -

      Additional kwargs: hold = [True|False] overrides default hold state

      -
      - -
      -
      -matplotlib.pyplot.eventplot(positions, orientation='horizontal', lineoffsets=1, linelengths=1, linewidths=None, colors=None, linestyles='solid', hold=None, **kwargs)
      -

      Plot identical parallel lines at specific positions.

      -

      Call signature:

      -
      eventplot(positions, orientation='horizontal', lineoffsets=0,
      -          linelengths=1, linewidths=None, color =None,
      -          linestyles='solid'
      -
      -

      Plot parallel lines at the given positions. positions should be a 1D -or 2D array-like object, with each row corresponding to a row or column -of lines.

      -

      This type of plot is commonly used in neuroscience for representing -neural events, where it is commonly called a spike raster, dot raster, -or raster plot.

      -

      However, it is useful in any situation where you wish to show the -timing or position of multiple sets of discrete events, such as the -arrival times of people to a business on each day of the month or the -date of hurricanes each year of the last century.

      -
      -
      orientation : [ ‘horizonal’ | ‘vertical’ ]
      -
      ‘horizonal’ : the lines will be vertical and arranged in rows -“vertical’ : lines will be horizontal and arranged in columns
      -
      lineoffsets :
      -
      A float or array-like containing floats.
      -
      linelengths :
      -
      A float or array-like containing floats.
      -
      linewidths :
      -
      A float or array-like containing floats.
      -
      colors
      -
      must be a sequence of RGBA tuples (eg arbitrary color -strings, etc, not allowed) or a list of such sequences
      -
      linestyles :
      -
      [ ‘solid’ | ‘dashed’ | ‘dashdot’ | ‘dotted’ ] or an array of these -values
      -
      -

      For linelengths, linewidths, colors, and linestyles, if only a single -value is given, that value is applied to all lines. If an array-like -is given, it must have the same length as positions, and each value -will be applied to the corresponding row or column in positions.

      -

      Returns a list of matplotlib.collections.EventCollection -objects that were added.

      -

      kwargs are LineCollection properties:

      -
      -
      ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      PropertyDescription
      agg_filterunknown
      alphafloat or None
      animated[True | False]
      antialiased or antialiasedsBoolean or sequence of booleans
      arrayunknown
      axesan Axes instance
      clima length 2 sequence of floats
      clip_boxa matplotlib.transforms.Bbox instance
      clip_on[True | False]
      clip_path[ (Path, Transform) | Patch | None ]
      cmapa colormap or registered colormap name
      colormatplotlib color arg or sequence of rgba tuples
      colorbarunknown
      containsa callable function
      edgecolor or edgecolorsmatplotlib color arg or sequence of rgba tuples
      facecolor or facecolorsmatplotlib color arg or sequence of rgba tuples
      figurea matplotlib.figure.Figure instance
      gidan id string
      hatch[ ‘/’ | ‘\’ | ‘|’ | ‘-‘ | ‘+’ | ‘x’ | ‘o’ | ‘O’ | ‘.’ | ‘*’ ]
      labelstring or anything printable with ‘%s’ conversion.
      linestyle or linestyles or dashes[‘solid’ | ‘dashed’, ‘dashdot’, ‘dotted’ | (offset, on-off-dash-seq) ]
      linewidth or lw or linewidthsfloat or sequence of floats
      lod[True | False]
      normunknown
      offset_positionunknown
      offsetsfloat or sequence of floats
      pathsunknown
      picker[None|float|boolean|callable]
      pickradiusunknown
      rasterized[True | False | None]
      segmentsunknown
      snapunknown
      transformTransform instance
      urla url string
      urlsunknown
      vertsunknown
      visible[True | False]
      zorderany number
      -
      -

      Example:

      -

      (Source code, png, hires.png, pdf)

      -
      -../_images/eventplot_demo.png -
      -

      Additional kwargs: hold = [True|False] overrides default hold state

      -
      - -
      -
      -matplotlib.pyplot.figimage(*args, **kwargs)
      -

      Adds a non-resampled image to the figure.

      -

      call signatures:

      -
      figimage(X, **kwargs)
      -
      -
      -

      adds a non-resampled array X to the figure.

      -
      figimage(X, xo, yo)
      -
      -
      -

      with pixel offsets xo, yo,

      -

      X must be a float array:

      -
        -
      • If X is MxN, assume luminance (grayscale)
      • -
      • If X is MxNx3, assume RGB
      • -
      • If X is MxNx4, assume RGBA
      • -
      -

      Optional keyword arguments:

      -
      -
      ---- - - - - - - - - - - - - - - - - - - - - - - - - - -
      KeywordDescription
      xo or yoAn integer, the x and y image offset in pixels
      cmapa matplotlib.colors.Colormap instance, eg -cm.jet. If None, default to the rc image.cmap -value
      norma matplotlib.colors.Normalize instance. The -default is normalization(). This scales luminance -> 0-1
      vmin|vmaxare used to scale a luminance image to 0-1. If either -is None, the min and max of the luminance values will -be used. Note if you pass a norm instance, the settings -for vmin and vmax will be ignored.
      alphathe alpha blending value, default is None
      origin[ ‘upper’ | ‘lower’ ] Indicates where the [0,0] index of -the array is in the upper left or lower left corner of -the axes. Defaults to the rc image.origin value
      -
      -

      figimage complements the axes image -(imshow()) which will be resampled -to fit the current axes. If you want a resampled image to -fill the entire figure, you can define an -Axes with size [0,1,0,1].

      -

      An matplotlib.image.FigureImage instance is returned.

      -

      (Source code, png, hires.png, pdf)

      -
      -../_images/figimage_demo.png -
      -

      Additional kwargs are Artist kwargs passed on to -:class:`~matplotlib.image.FigureImage`Addition kwargs: hold = [True|False] overrides default hold state

      -
      - -
      -
      -matplotlib.pyplot.figlegend(handles, labels, loc, **kwargs)
      -

      Place a legend in the figure.

      -
      -
      labels
      -
      a sequence of strings
      -
      handles
      -
      a sequence of Line2D or -Patch instances
      -
      loc
      -
      can be a string or an integer specifying the legend -location
      -
      -

      A matplotlib.legend.Legend instance is returned.

      -

      Example:

      -
      figlegend( (line1, line2, line3),
      -           ('label1', 'label2', 'label3'),
      -           'upper right' )
      -
      -
      -
      -

      See also

      -

      legend()

      -
      -
      - -
      -
      -matplotlib.pyplot.figtext(*args, **kwargs)
      -

      Add text to figure.

      -

      Call signature:

      -
      text(x, y, s, fontdict=None, **kwargs)
      -
      -
      -

      Add text to figure at location x, y (relative 0-1 -coords). See text() for the meaning -of the other arguments.

      -

      kwargs control the Text properties:

      -
      -
      ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      PropertyDescription
      agg_filterunknown
      alphafloat (0.0 transparent through 1.0 opaque)
      animated[True | False]
      axesan Axes instance
      backgroundcolorany matplotlib color
      bboxrectangle prop dict
      clip_boxa matplotlib.transforms.Bbox instance
      clip_on[True | False]
      clip_path[ (Path, Transform) | Patch | None ]
      colorany matplotlib color
      containsa callable function
      family or fontfamily or fontname or name[FONTNAME | ‘serif’ | ‘sans-serif’ | ‘cursive’ | ‘fantasy’ | ‘monospace’ ]
      figurea matplotlib.figure.Figure instance
      fontproperties or font_propertiesa matplotlib.font_manager.FontProperties instance
      gidan id string
      horizontalalignment or ha[ ‘center’ | ‘right’ | ‘left’ ]
      labelstring or anything printable with ‘%s’ conversion.
      linespacingfloat (multiple of font size)
      lod[True | False]
      multialignment[‘left’ | ‘right’ | ‘center’ ]
      path_effectsunknown
      picker[None|float|boolean|callable]
      position(x,y)
      rasterized[True | False | None]
      rotation[ angle in degrees | ‘vertical’ | ‘horizontal’ ]
      rotation_modeunknown
      size or fontsize[size in points | ‘xx-small’ | ‘x-small’ | ‘small’ | ‘medium’ | ‘large’ | ‘x-large’ | ‘xx-large’ ]
      snapunknown
      stretch or fontstretch[a numeric value in range 0-1000 | ‘ultra-condensed’ | ‘extra-condensed’ | ‘condensed’ | ‘semi-condensed’ | ‘normal’ | ‘semi-expanded’ | ‘expanded’ | ‘extra-expanded’ | ‘ultra-expanded’ ]
      style or fontstyle[ ‘normal’ | ‘italic’ | ‘oblique’]
      textstring or anything printable with ‘%s’ conversion.
      transformTransform instance
      urla url string
      variant or fontvariant[ ‘normal’ | ‘small-caps’ ]
      verticalalignment or va or ma[ ‘center’ | ‘top’ | ‘bottom’ | ‘baseline’ ]
      visible[True | False]
      weight or fontweight[a numeric value in range 0-1000 | ‘ultralight’ | ‘light’ | ‘normal’ | ‘regular’ | ‘book’ | ‘medium’ | ‘roman’ | ‘semibold’ | ‘demibold’ | ‘demi’ | ‘bold’ | ‘heavy’ | ‘extra bold’ | ‘black’ ]
      xfloat
      yfloat
      zorderany number
      -
      -
      - -
      -
      -matplotlib.pyplot.figure(num=None, figsize=None, dpi=None, facecolor=None, edgecolor=None, frameon=True, FigureClass=<class 'matplotlib.figure.Figure'>, **kwargs)
      -

      Creates a new figure.

      - --- - - - - - -
      Parameters :

      num : integer or string, optional, default: none

      -
      -

      If not provided, a new figure will be created, and a the figure number -will be increamted. The figure objects holds this number in a number -attribute. -If num is provided, and a figure with this id already exists, make -it active, and returns a reference to it. If this figure does not -exists, create it and returns it. -If num is a string, the window title will be set to this figure’s -num.

      -
      -

      figsize : tuple of integers, optional, default

      -
      -

      width, height in inches. If not provided, defaults to rc -figure.figsize.

      -
      -

      dpi : integer, optional, default ; None

      -
      -

      resolution of the figure. If not provided, defaults to rc figure.dpi.

      -
      -

      facecolor : :

      -
      -

      the background color; If not provided, defaults to rc figure.facecolor

      -
      -

      edgecolor : :

      -
      -

      the border color. If not provided, defaults to rc figure.edgecolor

      -
      -
      Returns :

      figure : Figure

      -
      -

      The Figure instance returned will also be passed to new_figure_manager -in the backends, which allows to hook custom Figure classes into the -pylab interface. Additional kwargs will be passed to the figure init -function.

      -
      -
      -
      - -
      -
      -matplotlib.pyplot.fill(*args, **kwargs)
      -

      Plot filled polygons.

      -

      Call signature:

      -
      fill(*args, **kwargs)
      -
      -
      -

      args is a variable length argument, allowing for multiple -x, y pairs with an optional color format string; see -plot() for details on the argument -parsing. For example, to plot a polygon with vertices at x, -y in blue.:

      -
      ax.fill(x,y, 'b' )
      -
      -
      -

      An arbitrary number of x, y, color groups can be specified:

      -
      ax.fill(x1, y1, 'g', x2, y2, 'r')
      -
      -
      -

      Return value is a list of Patch -instances that were added.

      -

      The same color strings that plot() -supports are supported by the fill format string.

      -

      If you would like to fill below a curve, e.g., shade a region -between 0 and y along x, use fill_between()

      -

      The closed kwarg will close the polygon when True (default).

      -

      kwargs control the Polygon properties:

      -
      -
      ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      PropertyDescription
      agg_filterunknown
      alphafloat or None
      animated[True | False]
      antialiased or aa[True | False] or None for default
      axesan Axes instance
      clip_boxa matplotlib.transforms.Bbox instance
      clip_on[True | False]
      clip_path[ (Path, Transform) | Patch | None ]
      colormatplotlib color spec
      containsa callable function
      edgecolor or ecmpl color spec, or None for default, or ‘none’ for no color
      facecolor or fcmpl color spec, or None for default, or ‘none’ for no color
      figurea matplotlib.figure.Figure instance
      fill[True | False]
      gidan id string
      hatch[‘/’ | ‘\’ | ‘|’ | ‘-‘ | ‘+’ | ‘x’ | ‘o’ | ‘O’ | ‘.’ | ‘*’]
      labelstring or anything printable with ‘%s’ conversion.
      linestyle or ls[‘solid’ | ‘dashed’ | ‘dashdot’ | ‘dotted’]
      linewidth or lwfloat or None for default
      lod[True | False]
      path_effectsunknown
      picker[None|float|boolean|callable]
      rasterized[True | False | None]
      snapunknown
      transformTransform instance
      urla url string
      visible[True | False]
      zorderany number
      -
      -

      Example:

      -

      (Source code, png, hires.png, pdf)

      -
      -../_images/fill_demo.png -
      -

      Additional kwargs: hold = [True|False] overrides default hold state

      -
      - -
      -
      -matplotlib.pyplot.fill_between(x, y1, y2=0, where=None, interpolate=False, hold=None, **kwargs)
      -

      Make filled polygons between two curves.

      -

      Call signature:

      -
      fill_between(x, y1, y2=0, where=None, **kwargs)
      -
      -
      -

      Create a PolyCollection -filling the regions between y1 and y2 where -where==True

      -
      -
      -
      x :
      -
      An N-length array of the x data
      -
      y1 :
      -
      An N-length array (or scalar) of the y data
      -
      y2 :
      -
      An N-length array (or scalar) of the y data
      -
      where :
      -
      If None, default to fill between everywhere. If not None, -it is an N-length numpy boolean array and the fill will -only happen over the regions where where==True.
      -
      interpolate :
      -
      If True, interpolate between the two lines to find the -precise point of intersection. Otherwise, the start and -end points of the filled region will only occur on explicit -values in the x array.
      -
      kwargs :
      -
      Keyword args passed on to the -PolyCollection.
      -
      -
      -

      kwargs control the Polygon properties:

      -
      -
      ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      PropertyDescription
      agg_filterunknown
      alphafloat or None
      animated[True | False]
      antialiased or antialiasedsBoolean or sequence of booleans
      arrayunknown
      axesan Axes instance
      clima length 2 sequence of floats
      clip_boxa matplotlib.transforms.Bbox instance
      clip_on[True | False]
      clip_path[ (Path, Transform) | Patch | None ]
      cmapa colormap or registered colormap name
      colormatplotlib color arg or sequence of rgba tuples
      colorbarunknown
      containsa callable function
      edgecolor or edgecolorsmatplotlib color arg or sequence of rgba tuples
      facecolor or facecolorsmatplotlib color arg or sequence of rgba tuples
      figurea matplotlib.figure.Figure instance
      gidan id string
      hatch[ ‘/’ | ‘\’ | ‘|’ | ‘-‘ | ‘+’ | ‘x’ | ‘o’ | ‘O’ | ‘.’ | ‘*’ ]
      labelstring or anything printable with ‘%s’ conversion.
      linestyle or linestyles or dashes[‘solid’ | ‘dashed’, ‘dashdot’, ‘dotted’ | (offset, on-off-dash-seq) ]
      linewidth or lw or linewidthsfloat or sequence of floats
      lod[True | False]
      normunknown
      offset_positionunknown
      offsetsfloat or sequence of floats
      pathsunknown
      picker[None|float|boolean|callable]
      pickradiusunknown
      rasterized[True | False | None]
      snapunknown
      transformTransform instance
      urla url string
      urlsunknown
      visible[True | False]
      zorderany number
      -
      -

      (Source code)

      -
      -../_images/fill_between_demo_00.png -

      (png, hires.png, pdf)

      -
      -
      -../_images/fill_between_demo_01.png -

      (png, hires.png, pdf)

      -
      -
      -../_images/fill_between_demo_02.png -

      (png, hires.png, pdf)

      -
      -
      -

      See also

      -
      -
      fill_betweenx()
      -
      for filling between two sets of x-values
      -
      -
      -

      Additional kwargs: hold = [True|False] overrides default hold state

      -
      - -
      -
      -matplotlib.pyplot.fill_betweenx(y, x1, x2=0, where=None, hold=None, **kwargs)
      -

      Make filled polygons between two horizontal curves.

      -

      Call signature:

      -
      fill_betweenx(y, x1, x2=0, where=None, **kwargs)
      -
      -
      -

      Create a PolyCollection -filling the regions between x1 and x2 where -where==True

      -
      -
      -
      y :
      -
      An N-length array of the y data
      -
      x1 :
      -
      An N-length array (or scalar) of the x data
      -
      x2 :
      -
      An N-length array (or scalar) of the x data
      -
      where :
      -
      If None, default to fill between everywhere. If not None, -it is a N length numpy boolean array and the fill will -only happen over the regions where where==True
      -
      kwargs :
      -
      keyword args passed on to the -PolyCollection
      -
      -
      -

      kwargs control the Polygon properties:

      -
      -
      ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      PropertyDescription
      agg_filterunknown
      alphafloat or None
      animated[True | False]
      antialiased or antialiasedsBoolean or sequence of booleans
      arrayunknown
      axesan Axes instance
      clima length 2 sequence of floats
      clip_boxa matplotlib.transforms.Bbox instance
      clip_on[True | False]
      clip_path[ (Path, Transform) | Patch | None ]
      cmapa colormap or registered colormap name
      colormatplotlib color arg or sequence of rgba tuples
      colorbarunknown
      containsa callable function
      edgecolor or edgecolorsmatplotlib color arg or sequence of rgba tuples
      facecolor or facecolorsmatplotlib color arg or sequence of rgba tuples
      figurea matplotlib.figure.Figure instance
      gidan id string
      hatch[ ‘/’ | ‘\’ | ‘|’ | ‘-‘ | ‘+’ | ‘x’ | ‘o’ | ‘O’ | ‘.’ | ‘*’ ]
      labelstring or anything printable with ‘%s’ conversion.
      linestyle or linestyles or dashes[‘solid’ | ‘dashed’, ‘dashdot’, ‘dotted’ | (offset, on-off-dash-seq) ]
      linewidth or lw or linewidthsfloat or sequence of floats
      lod[True | False]
      normunknown
      offset_positionunknown
      offsetsfloat or sequence of floats
      pathsunknown
      picker[None|float|boolean|callable]
      pickradiusunknown
      rasterized[True | False | None]
      snapunknown
      transformTransform instance
      urla url string
      urlsunknown
      visible[True | False]
      zorderany number
      -
      -

      (Source code)

      -
      -../_images/fill_betweenx_demo_00.png -

      (png, hires.png, pdf)

      -
      -
      -../_images/fill_betweenx_demo_01.png -

      (png, hires.png, pdf)

      -
      -
      -

      See also

      -
      -
      fill_between()
      -
      for filling between two sets of y-values
      -
      -
      -

      Additional kwargs: hold = [True|False] overrides default hold state

      -
      - -
      -
      -matplotlib.pyplot.findobj(o=None, match=None, include_self=True)
      -

      Find artist objects.

      -

      Recursively find all Artist instances -contained in self.

      -

      match can be

      -
      -
        -
      • None: return all objects contained in artist.
      • -
      • function with signature boolean = match(artist) -used to filter matches
      • -
      • class instance: e.g., Line2D. Only return artists of class type.
      • -
      -
      -

      If include_self is True (default), include self in the list to be -checked for a match.

      -
      - -
      -
      -matplotlib.pyplot.flag()
      -

      set the default colormap to flag and apply to current image if any. -See help(colormaps) for more information

      -
      - -
      -
      -matplotlib.pyplot.gca(**kwargs)
      -

      Return the current axis instance. This can be used to control -axis properties either using set or the -Axes methods, for example, setting the -xaxis range:

      -
      plot(t,s)
      -set(gca(), 'xlim', [0,10])
      -
      -
      -

      or:

      -
      plot(t,s)
      -a = gca()
      -a.set_xlim([0,10])
      -
      -
      -
      - -
      -
      -matplotlib.pyplot.gcf()
      -

      Return a reference to the current figure.

      -
      - -
      -
      -matplotlib.pyplot.gci()
      -

      Get the current colorable artist. Specifically, returns the -current ScalarMappable instance (image or -patch collection), or None if no images or patch collections -have been defined. The commands imshow() -and figimage() create -Image instances, and the commands -pcolor() and -scatter() create -Collection instances. The -current image is an attribute of the current axes, or the nearest -earlier axes in the current figure that contains an image.

      -
      - -
      -
      -matplotlib.pyplot.get_current_fig_manager()
      -
      - -
      -
      -matplotlib.pyplot.get_figlabels()
      -

      Return a list of existing figure labels.

      -
      - -
      -
      -matplotlib.pyplot.get_fignums()
      -

      Return a list of existing figure numbers.

      -
      - -
      -
      -matplotlib.pyplot.get_plot_commands()
      -

      Get a sorted list of all of the plotting commands.

      -
      - -
      -
      -matplotlib.pyplot.ginput(*args, **kwargs)
      -

      Call signature:

      -
      ginput(self, n=1, timeout=30, show_clicks=True,
      -       mouse_add=1, mouse_pop=3, mouse_stop=2)
      -
      -
      -

      Blocking call to interact with the figure.

      -

      This will wait for n clicks from the user and return a list of the -coordinates of each click.

      -

      If timeout is zero or negative, does not timeout.

      -

      If n is zero or negative, accumulate clicks until a middle click -(or potentially both mouse buttons at once) terminates the input.

      -

      Right clicking cancels last input.

      -

      The buttons used for the various actions (adding points, removing -points, terminating the inputs) can be overriden via the -arguments mouse_add, mouse_pop and mouse_stop, that give -the associated mouse button: 1 for left, 2 for middle, 3 for -right.

      -

      The keyboard can also be used to select points in case your mouse -does not have one or more of the buttons. The delete and backspace -keys act like right clicking (i.e., remove last point), the enter key -terminates input and any other key (not already used by the window -manager) selects a point.

      -
      - -
      -
      -matplotlib.pyplot.gray()
      -

      set the default colormap to gray and apply to current image if any. -See help(colormaps) for more information

      -
      - -
      -
      -matplotlib.pyplot.grid(b=None, which='major', axis='both', **kwargs)
      -

      Turn the axes grids on or off.

      -

      Call signature:

      -
      grid(self, b=None, which='major', axis='both', **kwargs)
      -
      -
      -

      Set the axes grids on or off; b is a boolean. (For MATLAB -compatibility, b may also be a string, ‘on’ or ‘off’.)

      -

      If b is None and len(kwargs)==0, toggle the grid state. If -kwargs are supplied, it is assumed that you want a grid and b -is thus set to True.

      -

      which can be ‘major’ (default), ‘minor’, or ‘both’ to control -whether major tick grids, minor tick grids, or both are affected.

      -

      axis can be ‘both’ (default), ‘x’, or ‘y’ to control which -set of gridlines are drawn.

      -

      kwargs are used to set the grid line properties, eg:

      -
      ax.grid(color='r', linestyle='-', linewidth=2)
      -
      -
      -

      Valid Line2D kwargs are

      -
      -
      ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      PropertyDescription
      agg_filterunknown
      alphafloat (0.0 transparent through 1.0 opaque)
      animated[True | False]
      antialiased or aa[True | False]
      axesan Axes instance
      clip_boxa matplotlib.transforms.Bbox instance
      clip_on[True | False]
      clip_path[ (Path, Transform) | Patch | None ]
      color or cany matplotlib color
      containsa callable function
      dash_capstyle[‘butt’ | ‘round’ | ‘projecting’]
      dash_joinstyle[‘miter’ | ‘round’ | ‘bevel’]
      dashessequence of on/off ink in points
      data2D array (rows are x, y) or two 1D arrays
      drawstyle[‘default’ | ‘steps’ | ‘steps-pre’ | ‘steps-mid’ | ‘steps-post’]
      figurea matplotlib.figure.Figure instance
      fillstyle[‘full’ | ‘left’ | ‘right’ | ‘bottom’ | ‘top’ | ‘none’]
      gidan id string
      labelstring or anything printable with ‘%s’ conversion.
      linestyle or ls['-' | '--' | '-.' | ':' | 'None' | ' ' | ''] and any drawstyle in combination with a linestyle, e.g., 'steps--'.
      linewidth or lwfloat value in points
      lod[True | False]
      markerunknown
      markeredgecolor or mecany matplotlib color
      markeredgewidth or mewfloat value in points
      markerfacecolor or mfcany matplotlib color
      markerfacecoloralt or mfcaltany matplotlib color
      markersize or msfloat
      markeveryNone | integer | (startind, stride)
      pickerfloat distance in points or callable pick function fn(artist, event)
      pickradiusfloat distance in points
      rasterized[True | False | None]
      snapunknown
      solid_capstyle[‘butt’ | ‘round’ | ‘projecting’]
      solid_joinstyle[‘miter’ | ‘round’ | ‘bevel’]
      transforma matplotlib.transforms.Transform instance
      urla url string
      visible[True | False]
      xdata1D array
      ydata1D array
      zorderany number
      -
      -
      - -
      -
      -matplotlib.pyplot.hexbin(x, y, C=None, gridsize=100, bins=None, xscale='linear', yscale='linear', extent=None, cmap=None, norm=None, vmin=None, vmax=None, alpha=None, linewidths=None, edgecolors='none', reduce_C_function=<function mean at 0x22f5488>, mincnt=None, marginals=False, hold=None, **kwargs)
      -

      Make a hexagonal binning plot.

      -

      Call signature:

      -
      hexbin(x, y, C = None, gridsize = 100, bins = None,
      -       xscale = 'linear', yscale = 'linear',
      -       cmap=None, norm=None, vmin=None, vmax=None,
      -       alpha=None, linewidths=None, edgecolors='none'
      -       reduce_C_function = np.mean, mincnt=None, marginals=True
      -       **kwargs)
      -
      -

      Make a hexagonal binning plot of x versus y, where x, -y are 1-D sequences of the same length, N. If C is None -(the default), this is a histogram of the number of occurences -of the observations at (x[i],y[i]).

      -

      If C is specified, it specifies values at the coordinate -(x[i],y[i]). These values are accumulated for each hexagonal -bin and then reduced according to reduce_C_function, which -defaults to numpy’s mean function (np.mean). (If C is -specified, it must also be a 1-D sequence of the same length -as x and y.)

      -

      x, y and/or C may be masked arrays, in which case only -unmasked points will be plotted.

      -

      Optional keyword arguments:

      -
      -
      gridsize: [ 100 | integer ]
      -
      The number of hexagons in the x-direction, default is -100. The corresponding number of hexagons in the -y-direction is chosen such that the hexagons are -approximately regular. Alternatively, gridsize can be a -tuple with two elements specifying the number of hexagons -in the x-direction and the y-direction.
      -
      bins: [ None | ‘log’ | integer | sequence ]
      -

      If None, no binning is applied; the color of each hexagon -directly corresponds to its count value.

      -

      If ‘log’, use a logarithmic scale for the color -map. Internally, is used to -determine the hexagon color.

      -

      If an integer, divide the counts in the specified number -of bins, and color the hexagons accordingly.

      -

      If a sequence of values, the values of the lower bound of -the bins to be used.

      -
      -
      xscale: [ ‘linear’ | ‘log’ ]
      -
      Use a linear or log10 scale on the horizontal axis.
      -
      scale: [ ‘linear’ | ‘log’ ]
      -
      Use a linear or log10 scale on the vertical axis.
      -
      mincnt: [ None | a positive integer ]
      -
      If not None, only display cells with more than mincnt -number of points in the cell
      -
      marginals: [ True | False ]
      -
      if marginals is True, plot the marginal density as -colormapped rectagles along the bottom of the x-axis and -left of the y-axis
      -
      extent: [ None | scalars (left, right, bottom, top) ]
      -
      The limits of the bins. The default assigns the limits -based on gridsize, x, y, xscale and yscale.
      -
      -

      Other keyword arguments controlling color mapping and normalization -arguments:

      -
      -
      cmap: [ None | Colormap ]
      -
      a matplotlib.colors.Colormap instance. If None, -defaults to rc image.cmap.
      -
      norm: [ None | Normalize ]
      -
      matplotlib.colors.Normalize instance is used to -scale luminance data to 0,1.
      -
      vmin / vmax: scalar
      -
      vmin and vmax are used in conjunction with norm to normalize -luminance data. If either are None, the min and max of the color -array C is used. Note if you pass a norm instance, your settings -for vmin and vmax will be ignored.
      -
      alpha: scalar between 0 and 1, or None
      -
      the alpha value for the patches
      -
      linewidths: [ None | scalar ]
      -
      If None, defaults to rc lines.linewidth. Note that this -is a tuple, and if you set the linewidths argument you -must set it as a sequence of floats, as required by -RegularPolyCollection.
      -
      -

      Other keyword arguments controlling the Collection properties:

      -
      -
      edgecolors: [ None | 'none' | mpl color | color sequence ]
      -

      If 'none', draws the edges in the same color as the fill color. -This is the default, as it avoids unsightly unpainted pixels -between the hexagons.

      -

      If None, draws the outlines in the default color.

      -

      If a matplotlib color arg or sequence of rgba tuples, draws the -outlines in the specified color.

      -
      -
      -

      Here are the standard descriptions of all the -Collection kwargs:

      -
      -
      ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      PropertyDescription
      agg_filterunknown
      alphafloat or None
      animated[True | False]
      antialiased or antialiasedsBoolean or sequence of booleans
      arrayunknown
      axesan Axes instance
      clima length 2 sequence of floats
      clip_boxa matplotlib.transforms.Bbox instance
      clip_on[True | False]
      clip_path[ (Path, Transform) | Patch | None ]
      cmapa colormap or registered colormap name
      colormatplotlib color arg or sequence of rgba tuples
      colorbarunknown
      containsa callable function
      edgecolor or edgecolorsmatplotlib color arg or sequence of rgba tuples
      facecolor or facecolorsmatplotlib color arg or sequence of rgba tuples
      figurea matplotlib.figure.Figure instance
      gidan id string
      hatch[ ‘/’ | ‘\’ | ‘|’ | ‘-‘ | ‘+’ | ‘x’ | ‘o’ | ‘O’ | ‘.’ | ‘*’ ]
      labelstring or anything printable with ‘%s’ conversion.
      linestyle or linestyles or dashes[‘solid’ | ‘dashed’, ‘dashdot’, ‘dotted’ | (offset, on-off-dash-seq) ]
      linewidth or lw or linewidthsfloat or sequence of floats
      lod[True | False]
      normunknown
      offset_positionunknown
      offsetsfloat or sequence of floats
      pathsunknown
      picker[None|float|boolean|callable]
      pickradiusunknown
      rasterized[True | False | None]
      snapunknown
      transformTransform instance
      urla url string
      urlsunknown
      visible[True | False]
      zorderany number
      -
      -

      The return value is a -PolyCollection instance; use -get_array() on -this PolyCollection to get -the counts in each hexagon. If marginals is True, horizontal -bar and vertical bar (both PolyCollections) will be attached -to the return collection as attributes hbar and vbar.

      -

      Example:

      -

      (Source code, png, hires.png, pdf)

      -
      -../_images/hexbin_demo.png -
      -

      Additional kwargs: hold = [True|False] overrides default hold state

      -
      - -
      -
      -matplotlib.pyplot.hist(x, bins=10, range=None, normed=False, weights=None, cumulative=False, bottom=None, histtype='bar', align='mid', orientation='vertical', rwidth=None, log=False, color=None, label=None, stacked=False, hold=None, **kwargs)
      -

      Plot a histogram.

      -

      Compute and draw the histogram of x. The return value is a -tuple (n, bins, patches) or ([n0, n1, ...], bins, -[patches0, patches1,...]) if the input contains multiple -data.

      -

      Multiple data can be provided via x as a list of datasets -of potentially different length ([x0, x1, ...]), or as -a 2-D ndarray in which each column is a dataset. Note that -the ndarray form is transposed relative to the list form.

      -

      Masked arrays are not supported at present.

      - --- - - - - - - - - -
      Parameters :

      x : array_like, shape (n, )

      -
      -

      Input values.

      -
      -

      bins : integer or array_like, optional, default: 10

      -
      -

      If an integer is given, bins + 1 bin edges are returned, -consistently with numpy.histogram() for numpy version >= -1.3. -Unequally spaced bins are supported if bins is a sequence.

      -
      -

      range : tuple, optional, default: None

      -
      -

      The lower and upper range of the bins. Lower and upper outliers -are ignored. If not provided, range is (x.min(), x.max()). Range -has no effect if bins is a sequence.

      -

      If bins is a sequence or range is specified, autoscaling -is based on the specified bin range instead of the -range of x.

      -
      -

      normed : boolean, optional, default: False

      -
      -

      If True, the first element of the return tuple will -be the counts normalized to form a probability density, i.e., -n/(len(x)`dbin), ie the integral of the histogram will sum to -1.

      -
      -

      weights : array_like, shape (n, ), optional, default: None

      -
      -

      An array of weights, of the same shape as x. Each value in x -only contributes its associated weight towards the bin count -(instead of 1). If normed is True, the weights are normalized, -so that the integral of the density over the range remains 1.

      -
      -

      cumulative : boolean, optional, default

      -
      -

      If True, then a histogram is computed where each bin gives the -counts in that bin plus all bins for smaller values. The last bin -gives the total number of datapoints. If normed is also True -then the histogram is normalized such that the last bin equals 1. -If cumulative evaluates to less than 0 (e.g., -1), the direction -of accumulation is reversed. In this case, if normed is also -True, then the histogram is normalized such that the first bin -equals 1.

      -
      -

      histtype : [‘bar’ | ‘barstacked’ | ‘step’ | ‘stepfilled’], optional

      -
      -

      The type of histogram to draw.

      -
        -
      • ‘bar’ is a traditional bar-type histogram. If multiple data -are given the bars are aranged side by side.
      • -
      • ‘barstacked’ is a bar-type histogram where multiple -data are stacked on top of each other.
      • -
      • ‘step’ generates a lineplot that is by default -unfilled.
      • -
      • ‘stepfilled’ generates a lineplot that is by default -filled.
      • -
      -
      -

      align : [‘left’ | ‘mid’ | ‘right’], optional, default: ‘mid’

      -
      -

      Controls how the histogram is plotted.

      -
      -
        -
      • ‘left’: bars are centered on the left bin edges.
      • -
      • ‘mid’: bars are centered between the bin edges.
      • -
      • ‘right’: bars are centered on the right bin edges.
      • -
      -
      -
      -

      orientation : [‘horizontal’ | ‘vertical’], optional

      -
      -

      If ‘horizontal’, barh will be used for -bar-type histograms and the bottom kwarg will be the left edges.

      -
      -

      rwidth : scalar, optional, default: None

      -
      -

      The relative width of the bars as a fraction of the bin width. If -None, automatically compute the width. Ignored if histtype = -‘step’ or ‘stepfilled’.

      -
      -

      log : boolean, optional, default

      -
      -

      If True, the histogram axis will be set to a log scale. If log -is True and x is a 1D array, empty bins will be filtered out -and only the non-empty (n, bins, patches) will be returned.

      -
      -

      color : color or array_like of colors, optional, default: None

      -
      -

      Color spec or sequence of color specs, one per dataset. Default -(None) uses the standard line color sequence.

      -
      -

      label : string, optional, default: ‘’

      -
      -

      String, or sequence of strings to match multiple datasets. Bar -charts yield multiple patches per dataset, but only the first gets -the label, so that the legend command will work as expected.

      -
      -

      stacked : boolean, optional, default

      -
      -

      If True, multiple data are stacked on top of each other If -False multiple data are aranged side by side if histtype is -‘bar’ or on top of each other if histtype is ‘step’

      -
      -
      Returns :

      (n, bins, patches) or ([n0, n1, ...], bins, [patches0, patches1,...]) :

      -
      Other Parameters:
       

      kwargs : Patch properties

      -
      -
      -

      See also

      -
      -
      hist2d
      -
      2D histograms
      -
      -
      -

      Notes

      -

      Until numpy release 1.5, the underlying numpy histogram function was -incorrect with normed`=`True if bin sizes were unequal. MPL -inherited that error. It is now corrected within MPL when using -earlier numpy versions

      -

      Examples

      -

      (Source code, png, hires.png, pdf)

      -
      -../_images/histogram_demo_features.png -
      -

      Additional kwargs: hold = [True|False] overrides default hold state

      -
      - -
      -
      -matplotlib.pyplot.hist2d(x, y, bins=10, range=None, normed=False, weights=None, cmin=None, cmax=None, hold=None, **kwargs)
      -

      Make a 2D histogram plot.

      - --- - - - - - - - - -
      Parameters :

      x, y: array_like, shape (n, ) :

      -
      -

      Input values

      -
      -

      bins: [None | int | [int, int] | array_like | [array, array]] :

      -
      -

      The bin specification:

      -
      -
        -
      • If int, the number of bins for the two dimensions -(nx=ny=bins).
      • -
      • If [int, int], the number of bins in each dimension -(nx, ny = bins).
      • -
      • If array_like, the bin edges for the two dimensions -(x_edges=y_edges=bins).
      • -
      • If [array, array], the bin edges in each dimension -(x_edges, y_edges = bins).
      • -
      -
      -

      The default value is 10.

      -
      -

      range : array_like shape(2, 2), optional, default: None

      -
      -

      The leftmost and rightmost edges of the bins along each dimension -(if not specified explicitly in the bins parameters): [[xmin, -xmax], [ymin, ymax]]. All values outside of this range will be -considered outliers and not tallied in the histogram.

      -
      -

      normed : boolean, optional, default: False

      -
      -

      Normalize histogram.

      -
      -

      weights : array_like, shape (n, ), optional, default: None

      -
      -

      An array of values w_i weighing each sample (x_i, y_i).

      -
      -

      cmin : scalar, optional, default: None

      -
      -

      All bins that has count less than cmin will not be displayed and -these count values in the return value count histogram will also -be set to nan upon return

      -
      -

      cmax : scalar, optional, default: None

      -
      -

      All bins that has count more than cmax will not be displayed (set -to none before passing to imshow) and these count values in the -return value count histogram will also be set to nan upon return

      -
      -
      Returns :

      The return value is ``(counts, xedges, yedges, Image)``. :

      -
      Other Parameters:
       

      kwargs : pcolorfast() properties.

      -
      -
      -

      See also

      -
      -
      hist
      -
      1D histogram
      -
      -
      -

      Notes

      -

      Rendering the histogram with a logarithmic color scale is -accomplished by passing a colors.LogNorm instance to -the norm keyword argument.

      -

      Examples

      -

      (Source code, png, hires.png, pdf)

      -
      -../_images/hist2d_demo.png -
      -

      Additional kwargs: hold = [True|False] overrides default hold state

      -
      - -
      -
      -matplotlib.pyplot.hlines(y, xmin, xmax, colors='k', linestyles='solid', label='', hold=None, **kwargs)
      -

      Plot horizontal lines.

      -

      Plot horizontal lines at each y from xmin to xmax.

      - --- - - - - - - - - -
      Parameters :

      y : scalar or 1D array_like

      -
      -

      y-indexes where to plot the lines.

      -
      -

      xmin, xmax : scalar or 1D array_like

      -
      -

      Respective beginning and end of each line. If scalars are -provided, all lines will have same length.

      -
      -

      colors : array_like of colors, optional, default: ‘k’

      -

      linestyles : [‘solid’ | ‘dashed’ | ‘dashdot’ | ‘dotted’], optional

      -

      label : string, optional, default: ‘’

      -
      Returns :

      lines : LineCollection

      -
      Other Parameters:
       

      kwargs : LineCollection properties.

      -
      -
      -

      See also

      -
      -
      vlines
      -
      vertical lines
      -
      -
      -

      Examples

      -

      (Source code, png, hires.png, pdf)

      -
      -../_images/vline_hline_demo.png -
      -

      Additional kwargs: hold = [True|False] overrides default hold state

      -
      - -
      -
      -matplotlib.pyplot.hold(b=None)
      -

      Set the hold state. If b is None (default), toggle the -hold state, else set the hold state to boolean value b:

      -
      hold()      # toggle hold
      -hold(True)  # hold is on
      -hold(False) # hold is off
      -
      -
      -

      When hold is True, subsequent plot commands will be added to -the current axes. When hold is False, the current axes and -figure will be cleared on the next plot command.

      -
      - -
      -
      -matplotlib.pyplot.hot()
      -

      set the default colormap to hot and apply to current image if any. -See help(colormaps) for more information

      -
      - -
      -
      -matplotlib.pyplot.hsv()
      -

      set the default colormap to hsv and apply to current image if any. -See help(colormaps) for more information

      -
      - -
      -
      -matplotlib.pyplot.imread(*args, **kwargs)
      -

      Read an image from a file into an array.

      -

      fname may be a string path or a Python file-like object. If -using a file object, it must be opened in binary mode.

      -

      If format is provided, will try to read file of that type, -otherwise the format is deduced from the filename. If nothing can -be deduced, PNG is tried.

      -

      Return value is a numpy.array. For grayscale images, the -return array is MxN. For RGB images, the return value is MxNx3. -For RGBA images the return value is MxNx4.

      -

      matplotlib can only read PNGs natively, but if PIL is installed, it will -use it to load the image and return an array (if possible) which -can be used with imshow().

      -
      - -
      -
      -matplotlib.pyplot.imsave(*args, **kwargs)
      -

      Save an array as in image file.

      -

      The output formats available depend on the backend being used.

      -
      -
      Arguments:
      -
      -
      fname:
      -
      A string containing a path to a filename, or a Python file-like object. -If format is None and fname is a string, the output -format is deduced from the extension of the filename.
      -
      arr:
      -
      An MxN (luminance), MxNx3 (RGB) or MxNx4 (RGBA) array.
      -
      -
      -
      Keyword arguments:
      -
      -
      vmin/vmax: [ None | scalar ]
      -
      vmin and vmax set the color scaling for the image by fixing the -values that map to the colormap color limits. If either vmin or vmax -is None, that limit is determined from the arr min/max value.
      -
      cmap:
      -
      cmap is a colors.Colormap instance, eg cm.jet. -If None, default to the rc image.cmap value.
      -
      format:
      -
      One of the file extensions supported by the active -backend. Most backends support png, pdf, ps, eps and svg.
      -
      origin
      -
      [ ‘upper’ | ‘lower’ ] Indicates where the [0,0] index of -the array is in the upper left or lower left corner of -the axes. Defaults to the rc image.origin value.
      -
      dpi
      -
      The DPI to store in the metadata of the file. This does not affect the -resolution of the output image.
      -
      -
      -
      -
      - -
      -
      -matplotlib.pyplot.imshow(X, cmap=None, norm=None, aspect=None, interpolation=None, alpha=None, vmin=None, vmax=None, origin=None, extent=None, shape=None, filternorm=1, filterrad=4.0, imlim=None, resample=None, url=None, hold=None, **kwargs)
      -

      Display an image on the axes.

      - --- - - - - - - - - -
      Parameters :

      X : array_like, shape (n, m) or (n, m, 3) or (n, m, 4)

      -
      -

      Display the image in X to current axes. X may be a float -array, a uint8 array or a PIL image. If X is an array, it -can have the following shapes:

      -
        -
      • MxN – luminance (grayscale, float array only)
      • -
      • MxNx3 – RGB (float or uint8 array)
      • -
      • MxNx4 – RGBA (float or uint8 array)
      • -
      -

      The value for each component of MxNx3 and MxNx4 float arrays -should be in the range 0.0 to 1.0; MxN float arrays may be -normalised.

      -
      -

      cmap : Colormap, optional, default: None

      -
      -

      If None, default to rc image.cmap value. cmap is ignored when -X has RGB(A) information

      -
      -

      aspect : [‘auto’ | ‘equal’ | scalar], optional, default: None

      -
      -

      If ‘auto’, changes the image aspect ratio to match that of the -axes.

      -

      If ‘equal’, and extent is None, changes the axes aspect ratio to -match that of the image. If extent is not None, the axes -aspect ratio is changed to match that of the extent.

      -

      If None, default to rc image.aspect value.

      -
      -

      interpolation : string, optional, default: None

      -
      -

      Acceptable values are ‘none’, ‘nearest’, ‘bilinear’, ‘bicubic’, -‘spline16’, ‘spline36’, ‘hanning’, ‘hamming’, ‘hermite’, ‘kaiser’, -‘quadric’, ‘catrom’, ‘gaussian’, ‘bessel’, ‘mitchell’, ‘sinc’, -‘lanczos’

      -

      If interpolation is None, default to rc image.interpolation. -See also the filternorm and filterrad parameters. -If interpolation is ‘none’, then no interpolation is performed -on the Agg, ps and pdf backends. Other backends will fall back to -‘nearest’.

      -
      -

      norm : Normalize, optional, default: None

      -
      -

      A Normalize instance is used to scale -luminance data to 0, 1. If None, use the default -func:normalize. norm is only used if X is an array of -floats.

      -
      -

      vmin, vmax : scalar, optional, default: None

      -
      -

      vmin and vmax are used in conjunction with norm to normalize -luminance data. Note if you pass a norm instance, your -settings for vmin and vmax will be ignored.

      -
      -

      alpha : scalar, optional, default: None

      -
      -

      The alpha blending value, between 0 (transparent) and 1 (opaque)

      -
      -

      origin : [‘upper’ | ‘lower’], optional, default: None

      -
      -

      Place the [0,0] index of the array in the upper left or lower left -corner of the axes. If None, default to rc image.origin.

      -
      -

      extent : scalars (left, right, bottom, top), optional, default: None

      -
      -

      Data limits for the axes. The default assigns zero-based row, -column indices to the x, y centers of the pixels.

      -
      -

      shape : scalars (columns, rows), optional, default: None

      -
      -

      For raw buffer images

      -
      -

      filternorm : scalar, optional, default: 1

      -
      -

      A parameter for the antigrain image resize filter. From the -antigrain documentation, if filternorm = 1, the filter -normalizes integer values and corrects the rounding errors. It -doesn’t do anything with the source floating point values, it -corrects only integers according to the rule of 1.0 which means -that any sum of pixel weights must be equal to 1.0. So, the -filter function must produce a graph of the proper shape.

      -
      -

      filterrad : scalar, optional, default: 4.0

      -
      -

      The filter radius for filters that have a radius parameter, i.e. -when interpolation is one of: ‘sinc’, ‘lanczos’ or ‘blackman’

      -
      -
      Returns :

      image : AxesImage

      -
      Other Parameters:
       

      kwargs : Artist properties.

      -
      -
      -

      See also

      -
      -
      matshow
      -
      Plot a matrix or an array as an image.
      -
      -
      -

      Examples

      -

      (Source code, png, hires.png, pdf)

      -
      -../_images/image_demo.png -
      -

      Additional kwargs: hold = [True|False] overrides default hold state

      -
      - -
      -
      -matplotlib.pyplot.ioff()
      -

      Turn interactive mode off.

      -
      - -
      -
      -matplotlib.pyplot.ion()
      -

      Turn interactive mode on.

      -
      - -
      -
      -matplotlib.pyplot.ishold()
      -

      Return the hold status of the current axes.

      -
      - -
      -
      -matplotlib.pyplot.isinteractive()
      -

      Return status of interactive mode.

      -
      - -
      -
      -matplotlib.pyplot.jet()
      -

      set the default colormap to jet and apply to current image if any. -See help(colormaps) for more information

      -
      - -
      -
      -matplotlib.pyplot.legend(*args, **kwargs)
      -

      Place a legend on the current axes.

      -

      Call signature:

      -
      legend(*args, **kwargs)
      -
      -
      -

      Places legend at location loc. Labels are a sequence of -strings and loc can be a string or an integer specifying the -legend location.

      -

      To make a legend with existing lines:

      -
      legend()
      -
      -
      -

      legend() by itself will try and build a legend using the label -property of the lines/patches/collections. You can set the label of -a line by doing:

      -
      plot(x, y, label='my data')
      -
      -
      -

      or:

      -
      line.set_label('my data').
      -
      -

      If label is set to ‘_nolegend_’, the item will not be shown in -legend.

      -

      To automatically generate the legend from labels:

      -
      legend( ('label1', 'label2', 'label3') )
      -
      -
      -

      To make a legend for a list of lines and labels:

      -
      legend( (line1, line2, line3), ('label1', 'label2', 'label3') )
      -
      -
      -

      To make a legend at a given location, using a location argument:

      -
      legend( ('label1', 'label2', 'label3'), loc='upper left')
      -
      -
      -

      or:

      -
      legend((line1, line2, line3), ('label1', 'label2', 'label3'), loc=2)
      -
      -
      -

      The location codes are

      -
      -
      ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      Location StringLocation Code
      ‘best’0
      ‘upper right’1
      ‘upper left’2
      ‘lower left’3
      ‘lower right’4
      ‘right’5
      ‘center left’6
      ‘center right’7
      ‘lower center’8
      ‘upper center’9
      ‘center’10
      -
      -

      Users can specify any arbitrary location for the legend using the -bbox_to_anchor keyword argument. bbox_to_anchor can be an instance -of BboxBase(or its derivatives) or a tuple of 2 or 4 floats. -For example,

      -
      -
      loc = ‘upper right’, bbox_to_anchor = (0.5, 0.5)
      -

      will place the legend so that the upper right corner of the legend at -the center of the axes.

      -

      The legend location can be specified in other coordinate, by using the -bbox_transform keyword.

      -

      The loc itslef can be a 2-tuple giving x,y of the lower-left corner of -the legend in axes coords (bbox_to_anchor is ignored).

      -

      Keyword arguments:

      -
      -
      -
      prop: [ None | FontProperties | dict ]
      -
      A matplotlib.font_manager.FontProperties -instance. If prop is a dictionary, a new instance will be -created with prop. If None, use rc settings.
      -
      fontsize: [size in points | ‘xx-small’ | ‘x-small’ | ‘small’ |
      -
      -
      ‘medium’ | ‘large’ | ‘x-large’ | ‘xx-large’]
      -

      Set the font size. May be either a size string, relative to -the default font size, or an absolute font size in points. This -argument is only used if prop is not specified.

      -
      -
      numpoints: integer
      -
      The number of points in the legend for line
      -
      scatterpoints: integer
      -
      The number of points in the legend for scatter plot
      -
      scatteroffsets: list of floats
      -
      a list of yoffsets for scatter symbols in legend
      -
      markerscale: [ None | scalar ]
      -
      The relative size of legend markers vs. original. If None, -use rc settings.
      -
      frameon: [ True | False ]
      -
      if True, draw a frame around the legend. -The default is set by the rcParam ‘legend.frameon’
      -
      fancybox: [ None | False | True ]
      -
      if True, draw a frame with a round fancybox. If None, -use rc settings
      -
      shadow: [ None | False | True ]
      -
      If True, draw a shadow behind legend. If None, -use rc settings.
      -
      framealpha: [None | float]
      -
      If not None, alpha channel for legend frame. Default None.
      -
      ncol : integer
      -
      number of columns. default is 1
      -
      mode : [ “expand” | None ]
      -
      if mode is “expand”, the legend will be horizontally expanded -to fill the axes area (or bbox_to_anchor)
      -
      bbox_to_anchor: an instance of BboxBase or a tuple of 2 or 4 floats
      -
      the bbox that the legend will be anchored.
      -
      bbox_transform : [ an instance of Transform | None ]
      -
      the transform for the bbox. transAxes if None.
      -
      title : string
      -
      the legend title
      -
      -
      -

      Padding and spacing between various elements use following -keywords parameters. These values are measure in font-size -units. e.g., a fontsize of 10 points and a handlelength=5 -implies a handlelength of 50 points. Values from rcParams -will be used if None.

      - ---- - - - - - - - - - - - - - - - - - - - - - - - - - -
      KeywordDescription
      borderpadthe fractional whitespace inside the legend border
      labelspacingthe vertical space between the legend entries
      handlelengththe length of the legend handles
      handletextpadthe pad between the legend handle and text
      borderaxespadthe pad between the axes and legend border
      columnspacingthe spacing between columns
      -
      -

      Note

      -

      Not all kinds of artist are supported by the legend command. -See Legend guide for details.

      -
      -

      Example:

      -

      (Source code, png, hires.png, pdf)

      -
      -../_images/legend_demo.png -
      -
      -

      See also

      -

      Legend guide.

      -
      -
      - -
      -
      -matplotlib.pyplot.locator_params(axis='both', tight=None, **kwargs)
      -

      Control behavior of tick locators.

      -

      Keyword arguments:

      -
      -
      axis
      -
      [‘x’ | ‘y’ | ‘both’] Axis on which to operate; -default is ‘both’.
      -
      tight
      -
      [True | False | None] Parameter passed to autoscale_view(). -Default is None, for no change.
      -
      -

      Remaining keyword arguments are passed to directly to the -set_params() method.

      -

      Typically one might want to reduce the maximum number -of ticks and use tight bounds when plotting small -subplots, for example:

      -
      ax.locator_params(tight=True, nbins=4)
      -
      -
      -

      Because the locator is involved in autoscaling, -autoscale_view() is called automatically after -the parameters are changed.

      -

      This presently works only for the -MaxNLocator used -by default on linear axes, but it may be generalized.

      -
      - -
      -
      -matplotlib.pyplot.loglog(*args, **kwargs)
      -

      Make a plot with log scaling on both the x and y axis.

      -

      Call signature:

      -
      loglog(*args, **kwargs)
      -
      -
      -

      loglog() supports all the keyword -arguments of plot() and -matplotlib.axes.Axes.set_xscale() / -matplotlib.axes.Axes.set_yscale().

      -

      Notable keyword arguments:

      -
      -
      -
      basex/basey: scalar > 1
      -
      Base of the x/y logarithm
      -
      subsx/subsy: [ None | sequence ]
      -
      The location of the minor x/y ticks; None defaults -to autosubs, which depend on the number of decades in the -plot; see matplotlib.axes.Axes.set_xscale() / -matplotlib.axes.Axes.set_yscale() for details
      -
      nonposx/nonposy: [‘mask’ | ‘clip’ ]
      -
      Non-positive values in x or y can be masked as -invalid, or clipped to a very small positive number
      -
      -
      -

      The remaining valid kwargs are -Line2D properties:

      -
      -
      ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      PropertyDescription
      agg_filterunknown
      alphafloat (0.0 transparent through 1.0 opaque)
      animated[True | False]
      antialiased or aa[True | False]
      axesan Axes instance
      clip_boxa matplotlib.transforms.Bbox instance
      clip_on[True | False]
      clip_path[ (Path, Transform) | Patch | None ]
      color or cany matplotlib color
      containsa callable function
      dash_capstyle[‘butt’ | ‘round’ | ‘projecting’]
      dash_joinstyle[‘miter’ | ‘round’ | ‘bevel’]
      dashessequence of on/off ink in points
      data2D array (rows are x, y) or two 1D arrays
      drawstyle[‘default’ | ‘steps’ | ‘steps-pre’ | ‘steps-mid’ | ‘steps-post’]
      figurea matplotlib.figure.Figure instance
      fillstyle[‘full’ | ‘left’ | ‘right’ | ‘bottom’ | ‘top’ | ‘none’]
      gidan id string
      labelstring or anything printable with ‘%s’ conversion.
      linestyle or ls['-' | '--' | '-.' | ':' | 'None' | ' ' | ''] and any drawstyle in combination with a linestyle, e.g., 'steps--'.
      linewidth or lwfloat value in points
      lod[True | False]
      markerunknown
      markeredgecolor or mecany matplotlib color
      markeredgewidth or mewfloat value in points
      markerfacecolor or mfcany matplotlib color
      markerfacecoloralt or mfcaltany matplotlib color
      markersize or msfloat
      markeveryNone | integer | (startind, stride)
      pickerfloat distance in points or callable pick function fn(artist, event)
      pickradiusfloat distance in points
      rasterized[True | False | None]
      snapunknown
      solid_capstyle[‘butt’ | ‘round’ | ‘projecting’]
      solid_joinstyle[‘miter’ | ‘round’ | ‘bevel’]
      transforma matplotlib.transforms.Transform instance
      urla url string
      visible[True | False]
      xdata1D array
      ydata1D array
      zorderany number
      -
      -

      Example:

      -

      (Source code, png, hires.png, pdf)

      -
      -../_images/log_demo.png -
      -

      Additional kwargs: hold = [True|False] overrides default hold state

      -
      - -
      -
      -matplotlib.pyplot.margins(*args, **kw)
      -

      Set or retrieve autoscaling margins.

      -

      signatures:

      -
      margins()
      -
      -
      -

      returns xmargin, ymargin

      -
      margins(margin)
      -
      -margins(xmargin, ymargin)
      -
      -margins(x=xmargin, y=ymargin)
      -
      -margins(..., tight=False)
      -
      -
      -

      All three forms above set the xmargin and ymargin parameters. -All keyword parameters are optional. A single argument -specifies both xmargin and ymargin. The tight parameter -is passed to autoscale_view(), which is executed after -a margin is changed; the default here is True, on the -assumption that when margins are specified, no additional -padding to match tick marks is usually desired. Setting -tight to None will preserve the previous setting.

      -

      Specifying any margin changes only the autoscaling; for example, -if xmargin is not None, then xmargin times the X data -interval will be added to each end of that interval before -it is used in autoscaling.

      -
      - -
      -
      -matplotlib.pyplot.matshow(A, fignum=None, **kw)
      -

      Display an array as a matrix in a new figure window.

      -

      The origin is set at the upper left hand corner and rows (first -dimension of the array) are displayed horizontally. The aspect -ratio of the figure window is that of the array, unless this would -make an excessively short or narrow figure.

      -

      Tick labels for the xaxis are placed on top.

      -

      With the exception of fignum, keyword arguments are passed to -imshow(). You may set the origin -kwarg to “lower” if you want the first row in the array to be -at the bottom instead of the top.

      -
      -
      fignum: [ None | integer | False ]
      -

      By default, matshow() creates a new figure window with -automatic numbering. If fignum is given as an integer, the -created figure will use this figure number. Because of how -matshow() tries to set the figure aspect ratio to be the -one of the array, if you provide the number of an already -existing figure, strange things may happen.

      -

      If fignum is False or 0, a new figure window will NOT be created.

      -
      -
      -
      - -
      -
      -matplotlib.pyplot.minorticks_off()
      -

      Remove minor ticks from the current plot.

      -
      - -
      -
      -matplotlib.pyplot.minorticks_on()
      -

      Display minor ticks on the current plot.

      -

      Displaying minor ticks reduces performance; turn them off using -minorticks_off() if drawing speed is a problem.

      -
      - -
      -
      -matplotlib.pyplot.over(func, *args, **kwargs)
      -

      Call a function with hold(True).

      -

      Calls:

      -
      func(*args, **kwargs)
      -
      -
      -

      with hold(True) and then restores the hold state.

      -
      - -
      -
      -matplotlib.pyplot.pause(interval)
      -

      Pause for interval seconds.

      -

      If there is an active figure it will be updated and displayed, -and the GUI event loop will run during the pause.

      -

      If there is no active figure, or if a non-interactive backend -is in use, this executes time.sleep(interval).

      -

      This can be used for crude animation. For more complex -animation, see matplotlib.animation.

      -

      This function is experimental; its behavior may be changed -or extended in a future release.

      -
      - -
      -
      -matplotlib.pyplot.pcolor(*args, **kwargs)
      -

      Create a pseudocolor plot of a 2-D array.

      -
      -

      Note

      -

      pcolor can be very slow for large arrays; consider -using the similar but much faster -pcolormesh() instead.

      -
      -

      Call signatures:

      -
      pcolor(C, **kwargs)
      -pcolor(X, Y, C, **kwargs)
      -
      -
      -

      C is the array of color values.

      -

      X and Y, if given, specify the (x, y) coordinates of -the colored quadrilaterals; the quadrilateral for C[i,j] has -corners at:

      -
      (X[i,   j],   Y[i,   j]),
      -(X[i,   j+1], Y[i,   j+1]),
      -(X[i+1, j],   Y[i+1, j]),
      -(X[i+1, j+1], Y[i+1, j+1]).
      -
      -

      Ideally the dimensions of X and Y should be one greater -than those of C; if the dimensions are the same, then the -last row and column of C will be ignored.

      -

      Note that the the column index corresponds to the -x-coordinate, and the row index corresponds to y; for -details, see the Grid Orientation section below.

      -

      If either or both of X and Y are 1-D arrays or column vectors, -they will be expanded as needed into the appropriate 2-D arrays, -making a rectangular grid.

      -

      X, Y and C may be masked arrays. If either C[i, j], or one -of the vertices surrounding C[i,j] (X or Y at [i, j], [i+1, j], -[i, j+1],[i+1, j+1]) is masked, nothing is plotted.

      -

      Keyword arguments:

      -
      -
      -
      cmap: [ None | Colormap ]
      -
      A matplotlib.colors.Colormap instance. If None, use -rc settings.
      -
      norm: [ None | Normalize ]
      -
      An matplotlib.colors.Normalize instance is used -to scale luminance data to 0,1. If None, defaults to -normalize().
      -
      vmin/vmax: [ None | scalar ]
      -
      vmin and vmax are used in conjunction with norm to -normalize luminance data. If either is None, it -is autoscaled to the respective min or max -of the color array C. If not None, vmin or -vmax passed in here override any pre-existing values -supplied in the norm instance.
      -
      shading: [ ‘flat’ | ‘faceted’ ]
      -

      If ‘faceted’, a black grid is drawn around each rectangle; if -‘flat’, edges are not drawn. Default is ‘flat’, contrary to -MATLAB.

      -
      -
      This kwarg is deprecated; please use ‘edgecolors’ instead:
      -
        -
      • shading=’flat’ – edgecolors=’none’
      • -
      • shading=’faceted – edgecolors=’k’
      • -
      -
      -
      -
      -
      edgecolors: [ None | 'none' | color | color sequence]
      -

      If None, the rc setting is used by default.

      -

      If 'none', edges will not be visible.

      -

      An mpl color or sequence of colors will set the edge color

      -
      -
      alpha: 0 <= scalar <= 1 or None
      -
      the alpha blending value
      -
      -
      -

      Return value is a matplotlib.collections.Collection -instance.

      -

      The grid orientation follows the MATLAB convention: an -array C with shape (nrows, ncolumns) is plotted with -the column number as X and the row number as Y, increasing -up; hence it is plotted the way the array would be printed, -except that the Y axis is reversed. That is, C is taken -as C*(*y, x).

      -

      Similarly for meshgrid():

      -
      x = np.arange(5)
      -y = np.arange(3)
      -X, Y = meshgrid(x,y)
      -
      -
      -

      is equivalent to:

      -
      X = array([[0, 1, 2, 3, 4],
      -           [0, 1, 2, 3, 4],
      -           [0, 1, 2, 3, 4]])
      -
      -Y = array([[0, 0, 0, 0, 0],
      -           [1, 1, 1, 1, 1],
      -           [2, 2, 2, 2, 2]])
      -
      -
      -

      so if you have:

      -
      C = rand( len(x), len(y))
      -
      -
      -

      then you need:

      -
      pcolor(X, Y, C.T)
      -
      -
      -

      or:

      -
      pcolor(C.T)
      -
      -
      -

      MATLAB pcolor() always discards the last row and column -of C, but matplotlib displays the last row and column if X and -Y are not specified, or if X and Y have one more row and -column than C.

      -

      kwargs can be used to control the -PolyCollection properties:

      -
      -
      ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      PropertyDescription
      agg_filterunknown
      alphafloat or None
      animated[True | False]
      antialiased or antialiasedsBoolean or sequence of booleans
      arrayunknown
      axesan Axes instance
      clima length 2 sequence of floats
      clip_boxa matplotlib.transforms.Bbox instance
      clip_on[True | False]
      clip_path[ (Path, Transform) | Patch | None ]
      cmapa colormap or registered colormap name
      colormatplotlib color arg or sequence of rgba tuples
      colorbarunknown
      containsa callable function
      edgecolor or edgecolorsmatplotlib color arg or sequence of rgba tuples
      facecolor or facecolorsmatplotlib color arg or sequence of rgba tuples
      figurea matplotlib.figure.Figure instance
      gidan id string
      hatch[ ‘/’ | ‘\’ | ‘|’ | ‘-‘ | ‘+’ | ‘x’ | ‘o’ | ‘O’ | ‘.’ | ‘*’ ]
      labelstring or anything printable with ‘%s’ conversion.
      linestyle or linestyles or dashes[‘solid’ | ‘dashed’, ‘dashdot’, ‘dotted’ | (offset, on-off-dash-seq) ]
      linewidth or lw or linewidthsfloat or sequence of floats
      lod[True | False]
      normunknown
      offset_positionunknown
      offsetsfloat or sequence of floats
      pathsunknown
      picker[None|float|boolean|callable]
      pickradiusunknown
      rasterized[True | False | None]
      snapunknown
      transformTransform instance
      urla url string
      urlsunknown
      visible[True | False]
      zorderany number
      -
      -
      -

      Note

      -

      The default antialiaseds is False if the default -edgecolors*=”none” is used. This eliminates artificial lines -at patch boundaries, and works regardless of the value of -alpha. If *edgecolors is not “none”, then the default -antialiaseds is taken from -rcParams[‘patch.antialiased’], which defaults to True. -Stroking the edges may be preferred if alpha is 1, but -will cause artifacts otherwise.

      -
      -
      -

      See also

      -
      -
      pcolormesh()
      -
      For an explanation of the differences between -pcolor and pcolormesh.
      -
      -
      -

      Additional kwargs: hold = [True|False] overrides default hold state

      -
      - -
      -
      -matplotlib.pyplot.pcolormesh(*args, **kwargs)
      -

      Plot a quadrilateral mesh.

      -

      Call signatures:

      -
      pcolormesh(C)
      -pcolormesh(X, Y, C)
      -pcolormesh(C, **kwargs)
      -
      -
      -

      Create a pseudocolor plot of a 2-D array.

      -

      pcolormesh is similar to pcolor(), -but uses a different mechanism and returns a different -object; pcolor returns a -PolyCollection but pcolormesh -returns a -QuadMesh. It is much faster, -so it is almost always preferred for large arrays.

      -

      C may be a masked array, but X and Y may not. Masked -array support is implemented via cmap and norm; in -contrast, pcolor() simply does not -draw quadrilaterals with masked colors or vertices.

      -

      Keyword arguments:

      -
      -
      -
      cmap: [ None | Colormap ]
      -
      A matplotlib.colors.Colormap instance. If None, use -rc settings.
      -
      norm: [ None | Normalize ]
      -
      A matplotlib.colors.Normalize instance is used to -scale luminance data to 0,1. If None, defaults to -normalize().
      -
      vmin/vmax: [ None | scalar ]
      -
      vmin and vmax are used in conjunction with norm to -normalize luminance data. If either is None, it -is autoscaled to the respective min or max -of the color array C. If not None, vmin or -vmax passed in here override any pre-existing values -supplied in the norm instance.
      -
      shading: [ ‘flat’ | ‘gouraud’ ]
      -
      ‘flat’ indicates a solid color for each quad. When -‘gouraud’, each quad will be Gouraud shaded. When gouraud -shading, edgecolors is ignored.
      -
      edgecolors: [None | 'None' | 'face' | color |
      -
      -
      color sequence]
      -

      If None, the rc setting is used by default.

      -

      If 'None', edges will not be visible.

      -

      If 'face', edges will have the same color as the faces.

      -

      An mpl color or sequence of colors will set the edge color

      -
      -
      alpha: 0 <= scalar <= 1 or None
      -
      the alpha blending value
      -
      -
      -

      Return value is a matplotlib.collections.QuadMesh -object.

      -

      kwargs can be used to control the -matplotlib.collections.QuadMesh properties:

      -
      -
      ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      PropertyDescription
      agg_filterunknown
      alphafloat or None
      animated[True | False]
      antialiased or antialiasedsBoolean or sequence of booleans
      arrayunknown
      axesan Axes instance
      clima length 2 sequence of floats
      clip_boxa matplotlib.transforms.Bbox instance
      clip_on[True | False]
      clip_path[ (Path, Transform) | Patch | None ]
      cmapa colormap or registered colormap name
      colormatplotlib color arg or sequence of rgba tuples
      colorbarunknown
      containsa callable function
      edgecolor or edgecolorsmatplotlib color arg or sequence of rgba tuples
      facecolor or facecolorsmatplotlib color arg or sequence of rgba tuples
      figurea matplotlib.figure.Figure instance
      gidan id string
      hatch[ ‘/’ | ‘\’ | ‘|’ | ‘-‘ | ‘+’ | ‘x’ | ‘o’ | ‘O’ | ‘.’ | ‘*’ ]
      labelstring or anything printable with ‘%s’ conversion.
      linestyle or linestyles or dashes[‘solid’ | ‘dashed’, ‘dashdot’, ‘dotted’ | (offset, on-off-dash-seq) ]
      linewidth or lw or linewidthsfloat or sequence of floats
      lod[True | False]
      normunknown
      offset_positionunknown
      offsetsfloat or sequence of floats
      pathsunknown
      picker[None|float|boolean|callable]
      pickradiusunknown
      rasterized[True | False | None]
      snapunknown
      transformTransform instance
      urla url string
      urlsunknown
      visible[True | False]
      zorderany number
      -
      -
      -

      See also

      -
      -
      pcolor()
      -
      For an explanation of the grid orientation and the -expansion of 1-D X and/or Y to 2-D arrays.
      -
      -
      -

      Additional kwargs: hold = [True|False] overrides default hold state

      -
      - -
      -
      -matplotlib.pyplot.pie(x, explode=None, labels=None, colors=None, autopct=None, pctdistance=0.6, shadow=False, labeldistance=1.1, startangle=None, radius=None, hold=None)
      -

      Plot a pie chart.

      -

      Call signature:

      -
      pie(x, explode=None, labels=None,
      -    colors=('b', 'g', 'r', 'c', 'm', 'y', 'k', 'w'),
      -    autopct=None, pctdistance=0.6, shadow=False,
      -    labeldistance=1.1, startangle=None, radius=None)
      -
      -
      -

      Make a pie chart of array x. The fractional area of each -wedge is given by x/sum(x). If sum(x) <= 1, then the values -of x give the fractional area directly and the array will not -be normalized. The wedges are plotted counterclockwise, -by default starting from the x-axis.

      -

      Keyword arguments:

      -
      -
      -
      explode: [ None | len(x) sequence ]
      -
      If not None, is a len(x) array which specifies the -fraction of the radius with which to offset each wedge.
      -
      colors: [ None | color sequence ]
      -
      A sequence of matplotlib color args through which the pie chart -will cycle.
      -
      labels: [ None | len(x) sequence of strings ]
      -
      A sequence of strings providing the labels for each wedge
      -
      autopct: [ None | format string | format function ]
      -
      If not None, is a string or function used to label the wedges -with their numeric value. The label will be placed inside the -wedge. If it is a format string, the label will be fmt%pct. -If it is a function, it will be called.
      -
      pctdistance: scalar
      -
      The ratio between the center of each pie slice and the -start of the text generated by autopct. Ignored if -autopct is None; default is 0.6.
      -
      labeldistance: scalar
      -
      The radial distance at which the pie labels are drawn
      -
      shadow: [ False | True ]
      -
      Draw a shadow beneath the pie.
      -
      startangle: [ None | Offset angle ]
      -
      If not None, rotates the start of the pie chart by angle -degrees counterclockwise from the x-axis.
      -
      -

      radius: [ None | scalar ] -The radius of the pie, if radius is None it will be set to 1.

      -
      -

      The pie chart will probably look best if the figure and axes are -square, or the Axes aspect is equal. e.g.:

      -
      figure(figsize=(8,8))
      -ax = axes([0.1, 0.1, 0.8, 0.8])
      -
      -
      -

      or:

      -
      axes(aspect=1)
      -
      -
      -
      -
      Return value:
      -

      If autopct is None, return the tuple (patches, texts):

      -
      -
      -
      -

      If autopct is not None, return the tuple (patches, -texts, autotexts), where patches and texts are as -above, and autotexts is a list of -Text instances for the numeric -labels.

      -
      -
      -

      Additional kwargs: hold = [True|False] overrides default hold state

      -
      - -
      -
      -matplotlib.pyplot.pink()
      -

      set the default colormap to pink and apply to current image if any. -See help(colormaps) for more information

      -
      - -
      -
      -matplotlib.pyplot.plot(*args, **kwargs)
      -

      Plot lines and/or markers to the -Axes. args is a variable length -argument, allowing for multiple x, y pairs with an -optional format string. For example, each of the following is -legal:

      -
      plot(x, y)        # plot x and y using default line style and color
      -plot(x, y, 'bo')  # plot x and y using blue circle markers
      -plot(y)           # plot y using x as index array 0..N-1
      -plot(y, 'r+')     # ditto, but with red plusses
      -
      -
      -

      If x and/or y is 2-dimensional, then the corresponding columns -will be plotted.

      -

      An arbitrary number of x, y, fmt groups can be -specified, as in:

      -
      a.plot(x1, y1, 'g^', x2, y2, 'g-')
      -
      -
      -

      Return value is a list of lines that were added.

      -

      By default, each line is assigned a different color specified by a -‘color cycle’. To change this behavior, you can edit the -axes.color_cycle rcParam. Alternatively, you can use -set_default_color_cycle().

      -

      The following format string characters are accepted to control -the line style or marker:

      - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      characterdescription
      '-'solid line style
      '--'dashed line style
      '-.'dash-dot line style
      ':'dotted line style
      '.'point marker
      ','pixel marker
      'o'circle marker
      'v'triangle_down marker
      '^'triangle_up marker
      '<'triangle_left marker
      '>'triangle_right marker
      '1'tri_down marker
      '2'tri_up marker
      '3'tri_left marker
      '4'tri_right marker
      's'square marker
      'p'pentagon marker
      '*'star marker
      'h'hexagon1 marker
      'H'hexagon2 marker
      '+'plus marker
      'x'x marker
      'D'diamond marker
      'd'thin_diamond marker
      '|'vline marker
      '_'hline marker
      -

      The following color abbreviations are supported:

      - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      charactercolor
      ‘b’blue
      ‘g’green
      ‘r’red
      ‘c’cyan
      ‘m’magenta
      ‘y’yellow
      ‘k’black
      ‘w’white
      -

      In addition, you can specify colors in many weird and -wonderful ways, including full names ('green'), hex -strings ('#008000'), RGB or RGBA tuples ((0,1,0,1)) or -grayscale intensities as a string ('0.8'). Of these, the -string specifications can be used in place of a fmt group, -but the tuple forms can be used only as kwargs.

      -

      Line styles and colors are combined in a single format string, as in -'bo' for blue circles.

      -

      The kwargs can be used to set line properties (any property that has -a set_* method). You can use this to set a line label (for auto -legends), linewidth, anitialising, marker face color, etc. Here is an -example:

      -
      plot([1,2,3], [1,2,3], 'go-', label='line 1', linewidth=2)
      -plot([1,2,3], [1,4,9], 'rs',  label='line 2')
      -axis([0, 4, 0, 10])
      -legend()
      -
      -
      -

      If you make multiple lines with one plot command, the kwargs -apply to all those lines, e.g.:

      -
      plot(x1, y1, x2, y2, antialised=False)
      -
      -
      -

      Neither line will be antialiased.

      -

      You do not need to use format strings, which are just -abbreviations. All of the line properties can be controlled -by keyword arguments. For example, you can set the color, -marker, linestyle, and markercolor with:

      -
      plot(x, y, color='green', linestyle='dashed', marker='o',
      -     markerfacecolor='blue', markersize=12).
      -
      -

      See Line2D for details.

      -

      The kwargs are Line2D properties:

      -
      -
      ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      PropertyDescription
      agg_filterunknown
      alphafloat (0.0 transparent through 1.0 opaque)
      animated[True | False]
      antialiased or aa[True | False]
      axesan Axes instance
      clip_boxa matplotlib.transforms.Bbox instance
      clip_on[True | False]
      clip_path[ (Path, Transform) | Patch | None ]
      color or cany matplotlib color
      containsa callable function
      dash_capstyle[‘butt’ | ‘round’ | ‘projecting’]
      dash_joinstyle[‘miter’ | ‘round’ | ‘bevel’]
      dashessequence of on/off ink in points
      data2D array (rows are x, y) or two 1D arrays
      drawstyle[‘default’ | ‘steps’ | ‘steps-pre’ | ‘steps-mid’ | ‘steps-post’]
      figurea matplotlib.figure.Figure instance
      fillstyle[‘full’ | ‘left’ | ‘right’ | ‘bottom’ | ‘top’ | ‘none’]
      gidan id string
      labelstring or anything printable with ‘%s’ conversion.
      linestyle or ls['-' | '--' | '-.' | ':' | 'None' | ' ' | ''] and any drawstyle in combination with a linestyle, e.g., 'steps--'.
      linewidth or lwfloat value in points
      lod[True | False]
      markerunknown
      markeredgecolor or mecany matplotlib color
      markeredgewidth or mewfloat value in points
      markerfacecolor or mfcany matplotlib color
      markerfacecoloralt or mfcaltany matplotlib color
      markersize or msfloat
      markeveryNone | integer | (startind, stride)
      pickerfloat distance in points or callable pick function fn(artist, event)
      pickradiusfloat distance in points
      rasterized[True | False | None]
      snapunknown
      solid_capstyle[‘butt’ | ‘round’ | ‘projecting’]
      solid_joinstyle[‘miter’ | ‘round’ | ‘bevel’]
      transforma matplotlib.transforms.Transform instance
      urla url string
      visible[True | False]
      xdata1D array
      ydata1D array
      zorderany number
      -
      -

      kwargs scalex and scaley, if defined, are passed on to -autoscale_view() to determine -whether the x and y axes are autoscaled; the default is -True.

      -

      Additional kwargs: hold = [True|False] overrides default hold state

      -
      - -
      -
      -matplotlib.pyplot.plot_date(x, y, fmt='bo', tz=None, xdate=True, ydate=False, hold=None, **kwargs)
      -

      Plot with data with dates.

      -

      Call signature:

      -
      plot_date(x, y, fmt='bo', tz=None, xdate=True,
      -          ydate=False, **kwargs)
      -
      -
      -

      Similar to the plot() command, except -the x or y (or both) data is considered to be dates, and the -axis is labeled accordingly.

      -

      x and/or y can be a sequence of dates represented as float -days since 0001-01-01 UTC.

      -

      Keyword arguments:

      -
      -
      -
      fmt: string
      -
      The plot format string.
      -
      tz: [ None | timezone string | tzinfo instance]
      -
      The time zone to use in labeling dates. If None, defaults to rc -value.
      -
      xdate: [ True | False ]
      -
      If True, the x-axis will be labeled with dates.
      -
      ydate: [ False | True ]
      -
      If True, the y-axis will be labeled with dates.
      -
      -
      -

      Note if you are using custom date tickers and formatters, it -may be necessary to set the formatters/locators after the call -to plot_date() since plot_date() will set the -default tick locator to -matplotlib.dates.AutoDateLocator (if the tick -locator is not already set to a -matplotlib.dates.DateLocator instance) and the -default tick formatter to -matplotlib.dates.AutoDateFormatter (if the tick -formatter is not already set to a -matplotlib.dates.DateFormatter instance).

      -

      Valid kwargs are Line2D properties:

      -
      -
      ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      PropertyDescription
      agg_filterunknown
      alphafloat (0.0 transparent through 1.0 opaque)
      animated[True | False]
      antialiased or aa[True | False]
      axesan Axes instance
      clip_boxa matplotlib.transforms.Bbox instance
      clip_on[True | False]
      clip_path[ (Path, Transform) | Patch | None ]
      color or cany matplotlib color
      containsa callable function
      dash_capstyle[‘butt’ | ‘round’ | ‘projecting’]
      dash_joinstyle[‘miter’ | ‘round’ | ‘bevel’]
      dashessequence of on/off ink in points
      data2D array (rows are x, y) or two 1D arrays
      drawstyle[‘default’ | ‘steps’ | ‘steps-pre’ | ‘steps-mid’ | ‘steps-post’]
      figurea matplotlib.figure.Figure instance
      fillstyle[‘full’ | ‘left’ | ‘right’ | ‘bottom’ | ‘top’ | ‘none’]
      gidan id string
      labelstring or anything printable with ‘%s’ conversion.
      linestyle or ls['-' | '--' | '-.' | ':' | 'None' | ' ' | ''] and any drawstyle in combination with a linestyle, e.g., 'steps--'.
      linewidth or lwfloat value in points
      lod[True | False]
      markerunknown
      markeredgecolor or mecany matplotlib color
      markeredgewidth or mewfloat value in points
      markerfacecolor or mfcany matplotlib color
      markerfacecoloralt or mfcaltany matplotlib color
      markersize or msfloat
      markeveryNone | integer | (startind, stride)
      pickerfloat distance in points or callable pick function fn(artist, event)
      pickradiusfloat distance in points
      rasterized[True | False | None]
      snapunknown
      solid_capstyle[‘butt’ | ‘round’ | ‘projecting’]
      solid_joinstyle[‘miter’ | ‘round’ | ‘bevel’]
      transforma matplotlib.transforms.Transform instance
      urla url string
      visible[True | False]
      xdata1D array
      ydata1D array
      zorderany number
      -
      -
      -

      See also

      -

      dates for helper functions

      -

      date2num(), -num2date() and -drange() for help on creating the required -floating point dates.

      -
      -

      Additional kwargs: hold = [True|False] overrides default hold state

      -
      - -
      -
      -matplotlib.pyplot.plotfile(fname, cols=(0, ), plotfuncs=None, comments='#', skiprows=0, checkrows=5, delimiter=', ', names=None, subplots=True, newfig=True, **kwargs)
      -

      Plot the data in in a file.

      -

      cols is a sequence of column identifiers to plot. An identifier -is either an int or a string. If it is an int, it indicates the -column number. If it is a string, it indicates the column header. -matplotlib will make column headers lower case, replace spaces with -underscores, and remove all illegal characters; so 'Adj Close*' -will have name 'adj_close'.

      -
        -
      • If len(cols) == 1, only that column will be plotted on the y axis.
      • -
      • If len(cols) > 1, the first element will be an identifier for -data for the x axis and the remaining elements will be the -column indexes for multiple subplots if subplots is True -(the default), or for lines in a single subplot if subplots -is False.
      • -
      -

      plotfuncs, if not None, is a dictionary mapping identifier to -an Axes plotting function as a string. -Default is ‘plot’, other choices are ‘semilogy’, ‘fill’, ‘bar’, -etc. You must use the same type of identifier in the cols -vector as you use in the plotfuncs dictionary, e.g., integer -column numbers in both or column names in both. If subplots -is False, then including any function such as ‘semilogy’ -that changes the axis scaling will set the scaling for all -columns.

      -

      comments, skiprows, checkrows, delimiter, and names -are all passed on to matplotlib.pylab.csv2rec() to -load the data into a record array.

      -

      If newfig is True, the plot always will be made in a new figure; -if False, it will be made in the current figure if one exists, -else in a new figure.

      -

      kwargs are passed on to plotting functions.

      -

      Example usage:

      -
      # plot the 2nd and 4th column against the 1st in two subplots
      -plotfile(fname, (0,1,3))
      -
      -# plot using column names; specify an alternate plot type for volume
      -plotfile(fname, ('date', 'volume', 'adj_close'),
      -                              plotfuncs={'volume': 'semilogy'})
      -
      -
      -

      Note: plotfile is intended as a convenience for quickly plotting -data from flat files; it is not intended as an alternative -interface to general plotting with pyplot or matplotlib.

      -
      - -
      -
      -matplotlib.pyplot.polar(*args, **kwargs)
      -

      Make a polar plot.

      -

      call signature:

      -
      polar(theta, r, **kwargs)
      -
      -
      -

      Multiple theta, r arguments are supported, with format -strings, as in plot().

      -
      - -
      -
      -matplotlib.pyplot.prism()
      -

      set the default colormap to prism and apply to current image if any. -See help(colormaps) for more information

      -
      - -
      -
      -matplotlib.pyplot.psd(x, NFFT=256, Fs=2, Fc=0, detrend=<function detrend_none at 0x34d25f0>, window=<function window_hanning at 0x34d2398>, noverlap=0, pad_to=None, sides='default', scale_by_freq=None, hold=None, **kwargs)
      -

      Plot the power spectral density.

      -

      Call signature:

      -
      psd(x, NFFT=256, Fs=2, Fc=0, detrend=mlab.detrend_none,
      -    window=mlab.window_hanning, noverlap=0, pad_to=None,
      -    sides='default', scale_by_freq=None, **kwargs)
      -
      -
      -

      The power spectral density by Welch’s average periodogram -method. The vector x is divided into NFFT length -segments. Each segment is detrended by function detrend and -windowed by function window. noverlap gives the length of -the overlap between segments. The -of each segment are averaged to compute Pxx, with a -scaling to correct for power loss due to windowing. Fs is the -sampling frequency.

      -

      Keyword arguments:

      -
      -
      -
      NFFT: integer
      -
      The number of data points used in each block for the FFT. -Must be even; a power 2 is most efficient. The default value is 256. -This should NOT be used to get zero padding, or the scaling of the -result will be incorrect. Use pad_to for this instead.
      -
      Fs: scalar
      -
      The sampling frequency (samples per time unit). It is used -to calculate the Fourier frequencies, freqs, in cycles per time -unit. The default value is 2.
      -
      detrend: callable
      -
      The function applied to each segment before fft-ing, -designed to remove the mean or linear trend. Unlike in -MATLAB, where the detrend parameter is a vector, in -matplotlib is it a function. The pylab -module defines detrend_none(), -detrend_mean(), and -detrend_linear(), but you can use -a custom function as well.
      -
      window: callable or ndarray
      -
      A function or a vector of length NFFT. To create window -vectors see window_hanning(), window_none(), -numpy.blackman(), numpy.hamming(), -numpy.bartlett(), scipy.signal(), -scipy.signal.get_window(), etc. The default is -window_hanning(). If a function is passed as the -argument, it must take a data segment as an argument and -return the windowed version of the segment.
      -
      pad_to: integer
      -
      The number of points to which the data segment is padded when -performing the FFT. This can be different from NFFT, which -specifies the number of data points used. While not increasing -the actual resolution of the psd (the minimum distance between -resolvable peaks), this can give more points in the plot, -allowing for more detail. This corresponds to the n parameter -in the call to fft(). The default is None, which sets pad_to -equal to NFFT
      -
      sides: [ ‘default’ | ‘onesided’ | ‘twosided’ ]
      -
      Specifies which sides of the PSD to return. Default gives the -default behavior, which returns one-sided for real data and both -for complex data. ‘onesided’ forces the return of a one-sided PSD, -while ‘twosided’ forces two-sided.
      -
      scale_by_freq: boolean
      -
      Specifies whether the resulting density values should be scaled -by the scaling frequency, which gives density in units of Hz^-1. -This allows for integration over the returned frequency values. -The default is True for MATLAB compatibility.
      -
      noverlap: integer
      -
      The number of points of overlap between blocks. The default value -is 0 (no overlap).
      -
      Fc: integer
      -
      The center frequency of x (defaults to 0), which offsets -the x extents of the plot to reflect the frequency range used -when a signal is acquired and then filtered and downsampled to -baseband.
      -
      -
      -

      Returns the tuple (Pxx, freqs).

      -

      For plotting, the power is plotted as - for decibels, though Pxx itself -is returned.

      -
      -
      References:
      -
      Bendat & Piersol – Random Data: Analysis and Measurement -Procedures, John Wiley & Sons (1986)
      -
      -

      kwargs control the Line2D properties:

      -
      -
      ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      PropertyDescription
      agg_filterunknown
      alphafloat (0.0 transparent through 1.0 opaque)
      animated[True | False]
      antialiased or aa[True | False]
      axesan Axes instance
      clip_boxa matplotlib.transforms.Bbox instance
      clip_on[True | False]
      clip_path[ (Path, Transform) | Patch | None ]
      color or cany matplotlib color
      containsa callable function
      dash_capstyle[‘butt’ | ‘round’ | ‘projecting’]
      dash_joinstyle[‘miter’ | ‘round’ | ‘bevel’]
      dashessequence of on/off ink in points
      data2D array (rows are x, y) or two 1D arrays
      drawstyle[‘default’ | ‘steps’ | ‘steps-pre’ | ‘steps-mid’ | ‘steps-post’]
      figurea matplotlib.figure.Figure instance
      fillstyle[‘full’ | ‘left’ | ‘right’ | ‘bottom’ | ‘top’ | ‘none’]
      gidan id string
      labelstring or anything printable with ‘%s’ conversion.
      linestyle or ls['-' | '--' | '-.' | ':' | 'None' | ' ' | ''] and any drawstyle in combination with a linestyle, e.g., 'steps--'.
      linewidth or lwfloat value in points
      lod[True | False]
      markerunknown
      markeredgecolor or mecany matplotlib color
      markeredgewidth or mewfloat value in points
      markerfacecolor or mfcany matplotlib color
      markerfacecoloralt or mfcaltany matplotlib color
      markersize or msfloat
      markeveryNone | integer | (startind, stride)
      pickerfloat distance in points or callable pick function fn(artist, event)
      pickradiusfloat distance in points
      rasterized[True | False | None]
      snapunknown
      solid_capstyle[‘butt’ | ‘round’ | ‘projecting’]
      solid_joinstyle[‘miter’ | ‘round’ | ‘bevel’]
      transforma matplotlib.transforms.Transform instance
      urla url string
      visible[True | False]
      xdata1D array
      ydata1D array
      zorderany number
      -
      -

      Example:

      -

      (Source code, png, hires.png, pdf)

      -
      -../_images/psd_demo.png -
      -

      Additional kwargs: hold = [True|False] overrides default hold state

      -
      - -
      -
      -matplotlib.pyplot.quiver(*args, **kw)
      -

      Plot a 2-D field of arrows.

      -

      call signatures:

      -
      quiver(U, V, **kw)
      -quiver(U, V, C, **kw)
      -quiver(X, Y, U, V, **kw)
      -quiver(X, Y, U, V, C, **kw)
      -
      -
      -

      Arguments:

      -
      -
      -
      X, Y:
      -
      The x and y coordinates of the arrow locations (default is tail of -arrow; see pivot kwarg)
      -
      U, V:
      -
      Give the x and y components of the arrow vectors
      -
      C:
      -
      An optional array used to map colors to the arrows
      -
      -
      -

      All arguments may be 1-D or 2-D arrays or sequences. If X and Y -are absent, they will be generated as a uniform grid. If U and V -are 2-D arrays but X and Y are 1-D, and if len(X) and len(Y) -match the column and row dimensions of U, then X and Y will be -expanded with numpy.meshgrid().

      -

      U, V, C may be masked arrays, but masked X, Y are not -supported at present.

      -

      Keyword arguments:

      -
      -
      -
      units: [ ‘width’ | ‘height’ | ‘dots’ | ‘inches’ | ‘x’ | ‘y’ | ‘xy’ ]
      -

      Arrow units; the arrow dimensions except for length are in -multiples of this unit.

      -
        -
      • ‘width’ or ‘height’: the width or height of the axes
      • -
      • ‘dots’ or ‘inches’: pixels or inches, based on the figure dpi
      • -
      • ‘x’, ‘y’, or ‘xy’: X, Y, or sqrt(X^2+Y^2) data units
      • -
      -

      The arrows scale differently depending on the units. For -‘x’ or ‘y’, the arrows get larger as one zooms in; for other -units, the arrow size is independent of the zoom state. For -‘width or ‘height’, the arrow size increases with the width and -height of the axes, respectively, when the the window is resized; -for ‘dots’ or ‘inches’, resizing does not change the arrows.

      -
      -
      angles: [ ‘uv’ | ‘xy’ | array ]
      -
      With the default ‘uv’, the arrow aspect ratio is 1, so that -if U*==*V the angle of the arrow on the plot is 45 degrees -CCW from the x-axis. -With ‘xy’, the arrow points from (x,y) to (x+u, y+v). -Alternatively, arbitrary angles may be specified as an array -of values in degrees, CCW from the x-axis.
      -
      scale: [ None | float ]
      -
      Data units per arrow length unit, e.g., m/s per plot width; a smaller -scale parameter makes the arrow longer. If None, a simple -autoscaling algorithm is used, based on the average vector length -and the number of vectors. The arrow length unit is given by -the scale_units parameter
      -
      scale_units: None, or any of the units options.
      -

      For example, if scale_units is ‘inches’, scale is 2.0, and -(u,v) = (1,0), then the vector will be 0.5 inches long. -If scale_units is ‘width’, then the vector will be half the width -of the axes.

      -

      If scale_units is ‘x’ then the vector will be 0.5 x-axis -units. To plot vectors in the x-y plane, with u and v having -the same units as x and y, use -“angles=’xy’, scale_units=’xy’, scale=1”.

      -
      -
      width:
      -
      Shaft width in arrow units; default depends on choice of units, -above, and number of vectors; a typical starting value is about -0.005 times the width of the plot.
      -
      headwidth: scalar
      -
      Head width as multiple of shaft width, default is 3
      -
      headlength: scalar
      -
      Head length as multiple of shaft width, default is 5
      -
      headaxislength: scalar
      -
      Head length at shaft intersection, default is 4.5
      -
      minshaft: scalar
      -
      Length below which arrow scales, in units of head length. Do not -set this to less than 1, or small arrows will look terrible! -Default is 1
      -
      minlength: scalar
      -
      Minimum length as a multiple of shaft width; if an arrow length -is less than this, plot a dot (hexagon) of this diameter instead. -Default is 1.
      -
      pivot: [ ‘tail’ | ‘middle’ | ‘tip’ ]
      -
      The part of the arrow that is at the grid point; the arrow rotates -about this point, hence the name pivot.
      -
      color: [ color | color sequence ]
      -
      This is a synonym for the -PolyCollection facecolor kwarg. -If C has been set, color has no effect.
      -
      -
      -

      The defaults give a slightly swept-back arrow; to make the head a -triangle, make headaxislength the same as headlength. To make the -arrow more pointed, reduce headwidth or increase headlength and -headaxislength. To make the head smaller relative to the shaft, -scale down all the head parameters. You will probably do best to leave -minshaft alone.

      -

      linewidths and edgecolors can be used to customize the arrow -outlines. Additional PolyCollection -keyword arguments:

      -
      -
      ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      PropertyDescription
      agg_filterunknown
      alphafloat or None
      animated[True | False]
      antialiased or antialiasedsBoolean or sequence of booleans
      arrayunknown
      axesan Axes instance
      clima length 2 sequence of floats
      clip_boxa matplotlib.transforms.Bbox instance
      clip_on[True | False]
      clip_path[ (Path, Transform) | Patch | None ]
      cmapa colormap or registered colormap name
      colormatplotlib color arg or sequence of rgba tuples
      colorbarunknown
      containsa callable function
      edgecolor or edgecolorsmatplotlib color arg or sequence of rgba tuples
      facecolor or facecolorsmatplotlib color arg or sequence of rgba tuples
      figurea matplotlib.figure.Figure instance
      gidan id string
      hatch[ ‘/’ | ‘\’ | ‘|’ | ‘-‘ | ‘+’ | ‘x’ | ‘o’ | ‘O’ | ‘.’ | ‘*’ ]
      labelstring or anything printable with ‘%s’ conversion.
      linestyle or linestyles or dashes[‘solid’ | ‘dashed’, ‘dashdot’, ‘dotted’ | (offset, on-off-dash-seq) ]
      linewidth or lw or linewidthsfloat or sequence of floats
      lod[True | False]
      normunknown
      offset_positionunknown
      offsetsfloat or sequence of floats
      pathsunknown
      picker[None|float|boolean|callable]
      pickradiusunknown
      rasterized[True | False | None]
      snapunknown
      transformTransform instance
      urla url string
      urlsunknown
      visible[True | False]
      zorderany number
      -
      -

      Additional kwargs: hold = [True|False] overrides default hold state

      -
      - -
      -
      -matplotlib.pyplot.quiverkey(*args, **kw)
      -

      Add a key to a quiver plot.

      -

      Call signature:

      -
      quiverkey(Q, X, Y, U, label, **kw)
      -
      -
      -

      Arguments:

      -
      -
      -
      Q:
      -
      The Quiver instance returned by a call to quiver.
      -
      X, Y:
      -
      The location of the key; additional explanation follows.
      -
      U:
      -
      The length of the key
      -
      label:
      -
      A string with the length and units of the key
      -
      -
      -

      Keyword arguments:

      -
      -
      -
      coordinates = [ ‘axes’ | ‘figure’ | ‘data’ | ‘inches’ ]
      -
      Coordinate system and units for X, Y: ‘axes’ and ‘figure’ are -normalized coordinate systems with 0,0 in the lower left and 1,1 -in the upper right; ‘data’ are the axes data coordinates (used for -the locations of the vectors in the quiver plot itself); ‘inches’ -is position in the figure in inches, with 0,0 at the lower left -corner.
      -
      color:
      -
      overrides face and edge colors from Q.
      -
      labelpos = [ ‘N’ | ‘S’ | ‘E’ | ‘W’ ]
      -
      Position the label above, below, to the right, to the left of the -arrow, respectively.
      -
      labelsep:
      -
      Distance in inches between the arrow and the label. Default is -0.1
      -
      labelcolor:
      -
      defaults to default Text color.
      -
      fontproperties:
      -
      A dictionary with keyword arguments accepted by the -FontProperties initializer: -family, style, variant, size, weight
      -
      -
      -

      Any additional keyword arguments are used to override vector -properties taken from Q.

      -

      The positioning of the key depends on X, Y, coordinates, and -labelpos. If labelpos is ‘N’ or ‘S’, X, Y give the position -of the middle of the key arrow. If labelpos is ‘E’, X, Y -positions the head, and if labelpos is ‘W’, X, Y positions the -tail; in either of these two cases, X, Y is somewhere in the -middle of the arrow+label key object.

      -

      Additional kwargs: hold = [True|False] overrides default hold state

      -
      - -
      -
      -matplotlib.pyplot.rc(*args, **kwargs)
      -

      Set the current rc params. Group is the grouping for the rc, e.g., -for lines.linewidth the group is lines, for -axes.facecolor, the group is axes, and so on. Group may -also be a list or tuple of group names, e.g., (xtick, ytick). -kwargs is a dictionary attribute name/value pairs, eg:

      -
      rc('lines', linewidth=2, color='r')
      -
      -
      -

      sets the current rc params and is equivalent to:

      -
      rcParams['lines.linewidth'] = 2
      -rcParams['lines.color'] = 'r'
      -
      -
      -

      The following aliases are available to save typing for interactive -users:

      - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      AliasProperty
      ‘lw’‘linewidth’
      ‘ls’‘linestyle’
      ‘c’‘color’
      ‘fc’‘facecolor’
      ‘ec’‘edgecolor’
      ‘mew’‘markeredgewidth’
      ‘aa’‘antialiased’
      -

      Thus you could abbreviate the above rc command as:

      -
      rc('lines', lw=2, c='r')
      -
      -
      -

      Note you can use python’s kwargs dictionary facility to store -dictionaries of default parameters. e.g., you can customize the -font rc as follows:

      -
      font = {'family' : 'monospace',
      -        'weight' : 'bold',
      -        'size'   : 'larger'}
      -
      -rc('font', **font)  # pass in the font dict as kwargs
      -
      -
      -

      This enables you to easily switch between several configurations. -Use rcdefaults() to restore the default -rc params after changes.

      -
      - -
      -
      -matplotlib.pyplot.rc_context(rc=None, fname=None)
      -

      Return a context manager for managing rc settings.

      -

      This allows one to do:

      -
      >>> with mpl.rc_context(fname='screen.rc'):
      -
      -
      -

      ... plt.plot(x, a) -... with mpl.rc_context(fname=’print.rc’): -... plt.plot(x, b) -... plt.plot(x, c)

      -

      The ‘a’ vs ‘x’ and ‘c’ vs ‘x’ plots would have settings from -‘screen.rc’, while the ‘b’ vs ‘x’ plot would have settings from -‘print.rc’.

      -

      A dictionary can also be passed to the context manager:

      -
      >>> with mpl.rc_context(rc={'text.usetex': True}, fname='screen.rc'):
      -
      -
      -

      ... plt.plot(x, a)

      -

      The ‘rc’ dictionary takes precedence over the settings loaded from -‘fname’. Passing a dictionary only is also valid.

      -
      - -
      -
      -matplotlib.pyplot.rcdefaults()
      -

      Restore the default rc params. These are not the params loaded by -the rc file, but mpl’s internal params. See rc_file_defaults for -reloading the default params from the rc file

      -
      - -
      -
      -matplotlib.pyplot.rgrids(*args, **kwargs)
      -

      Get or set the radial gridlines on a polar plot.

      -

      call signatures:

      -
      lines, labels = rgrids()
      -lines, labels = rgrids(radii, labels=None, angle=22.5, **kwargs)
      -
      -
      -

      When called with no arguments, rgrid() simply returns the -tuple (lines, labels), where lines is an array of radial -gridlines (Line2D instances) and -labels is an array of tick labels -(Text instances). When called with -arguments, the labels will appear at the specified radial -distances and angles.

      -

      labels, if not None, is a len(radii) list of strings of the -labels to use at each angle.

      -

      If labels is None, the rformatter will be used

      -

      Examples:

      -
      # set the locations of the radial gridlines and labels
      -lines, labels = rgrids( (0.25, 0.5, 1.0) )
      -
      -# set the locations and labels of the radial gridlines and labels
      -lines, labels = rgrids( (0.25, 0.5, 1.0), ('Tom', 'Dick', 'Harry' )
      -
      -
      - -
      -
      -matplotlib.pyplot.savefig(*args, **kwargs)
      -

      Save the current figure.

      -

      Call signature:

      -
      savefig(fname, dpi=None, facecolor='w', edgecolor='w',
      -        orientation='portrait', papertype=None, format=None,
      -        transparent=False, bbox_inches=None, pad_inches=0.1,
      -        frameon=None)
      -
      -
      -

      The output formats available depend on the backend being used.

      -

      Arguments:

      -
      -
      -
      fname:
      -

      A string containing a path to a filename, or a Python -file-like object, or possibly some backend-dependent object -such as PdfPages.

      -

      If format is None and fname is a string, the output -format is deduced from the extension of the filename. If -the filename has no extension, the value of the rc parameter -savefig.format is used.

      -

      If fname is not a string, remember to specify format to -ensure that the correct backend is used.

      -
      -
      -
      -

      Keyword arguments:

      -
      -
      -
      dpi: [ None | scalar > 0 ]
      -
      The resolution in dots per inch. If None it will default to -the value savefig.dpi in the matplotlibrc file.
      -
      facecolor, edgecolor:
      -
      the colors of the figure rectangle
      -
      orientation: [ ‘landscape’ | ‘portrait’ ]
      -
      not supported on all backends; currently only on postscript output
      -
      papertype:
      -
      One of ‘letter’, ‘legal’, ‘executive’, ‘ledger’, ‘a0’ through -‘a10’, ‘b0’ through ‘b10’. Only supported for postscript -output.
      -
      format:
      -
      One of the file extensions supported by the active -backend. Most backends support png, pdf, ps, eps and svg.
      -
      transparent:
      -
      If True, the axes patches will all be transparent; the -figure patch will also be transparent unless facecolor -and/or edgecolor are specified via kwargs. -This is useful, for example, for displaying -a plot on top of a colored background on a web page. The -transparency of these patches will be restored to their -original values upon exit of this function.
      -
      frameon:
      -
      If True, the figure patch will be colored, if False, the -figure background will be transparent. If not provided, the -rcParam ‘savefig.frameon’ will be used.
      -
      bbox_inches:
      -
      Bbox in inches. Only the given portion of the figure is -saved. If ‘tight’, try to figure out the tight bbox of -the figure.
      -
      pad_inches:
      -
      Amount of padding around the figure when bbox_inches is -‘tight’.
      -
      bbox_extra_artists:
      -
      A list of extra artists that will be considered when the -tight bbox is calculated.
      -
      -
      -
      - -
      -
      -matplotlib.pyplot.sca(ax)
      -

      Set the current Axes instance to ax.

      -

      The current Figure is updated to the parent of ax.

      -
      - -
      -
      -matplotlib.pyplot.scatter(x, y, s=20, c='b', marker='o', cmap=None, norm=None, vmin=None, vmax=None, alpha=None, linewidths=None, verts=None, hold=None, **kwargs)
      -

      Make a scatter plot of x vs y, where x and y are sequence like objects -of the same lengths.

      - --- - - - - - - - - -
      Parameters :

      x, y : array_like, shape (n, )

      -
      -

      Input data

      -
      -

      s : scalar or array_like, shape (n, ), optional, default: 20

      -
      -

      size in points^2.

      -
      -

      c : color or sequence of color, optional, default

      -
      -

      c can be a single color format string, or a sequence of color -specifications of length N, or a sequence of N numbers to be -mapped to colors using the cmap and norm specified via kwargs -(see below). Note that c should not be a single numeric RGB or -RGBA sequence because that is indistinguishable from an array of -values to be colormapped. c can be a 2-D array in which the -rows are RGB or RGBA, however.

      -
      -

      marker : MarkerStyle, optional, default: ‘o’

      -
      -

      See markers for more information on the different -styles of markers scatter supports.

      -
      -

      cmap : Colormap, optional, default: None

      -
      -

      A Colormap instance or registered name. -cmap is only used if c is an array of floats. If None, -defaults to rc image.cmap.

      -
      -

      norm : Normalize, optional, default: None

      -
      -

      A Normalize instance is used to scale -luminance data to 0, 1. norm is only used if c is an array of -floats. If None, use the default normalize().

      -
      -

      vmin, vmax : scalar, optional, default: None

      -
      -

      vmin and vmax are used in conjunction with norm to normalize -luminance data. If either are None, the min and max of the -color array is used. Note if you pass a norm instance, your -settings for vmin and vmax will be ignored.

      -
      -

      alpha : scalar, optional, default: None

      -
      -

      The alpha blending value, between 0 (transparent) and 1 (opaque)

      -
      -

      linewidths : scalar or array_like, optional, default: None

      -
      -

      If None, defaults to (lines.linewidth,). Note that this is a -tuple, and if you set the linewidths argument you must set it as a -sequence of floats, as required by -RegularPolyCollection.

      -
      -
      Returns :

      paths : PathCollection

      -
      Other Parameters:
       

      kwargs : Collection properties

      -
      -

      Notes

      -

      Any or all of x, y, s, and c may be masked arrays, in -which case all masks will be combined and only unmasked points -will be plotted.

      -

      Examples

      -

      (Source code, png, hires.png, pdf)

      -
      -../_images/scatter_demo.png -
      -

      Additional kwargs: hold = [True|False] overrides default hold state

      -
      - -
      -
      -matplotlib.pyplot.sci(im)
      -

      Set the current image. This image will be the target of colormap -commands like jet(), -hot() or -clim()). The current image is an -attribute of the current axes.

      -
      - -
      -
      -matplotlib.pyplot.semilogx(*args, **kwargs)
      -

      Make a plot with log scaling on the x axis.

      -

      Call signature:

      -
      semilogx(*args, **kwargs)
      -
      -
      -

      semilogx() supports all the keyword arguments of -plot() and -matplotlib.axes.Axes.set_xscale().

      -

      Notable keyword arguments:

      -
      -
      -
      basex: scalar > 1
      -
      Base of the x logarithm
      -
      subsx: [ None | sequence ]
      -
      The location of the minor xticks; None defaults to -autosubs, which depend on the number of decades in the -plot; see set_xscale() for -details.
      -
      nonposx: [ ‘mask’ | ‘clip’ ]
      -
      Non-positive values in x can be masked as -invalid, or clipped to a very small positive number
      -
      -
      -

      The remaining valid kwargs are -Line2D properties:

      -
      -
      ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      PropertyDescription
      agg_filterunknown
      alphafloat (0.0 transparent through 1.0 opaque)
      animated[True | False]
      antialiased or aa[True | False]
      axesan Axes instance
      clip_boxa matplotlib.transforms.Bbox instance
      clip_on[True | False]
      clip_path[ (Path, Transform) | Patch | None ]
      color or cany matplotlib color
      containsa callable function
      dash_capstyle[‘butt’ | ‘round’ | ‘projecting’]
      dash_joinstyle[‘miter’ | ‘round’ | ‘bevel’]
      dashessequence of on/off ink in points
      data2D array (rows are x, y) or two 1D arrays
      drawstyle[‘default’ | ‘steps’ | ‘steps-pre’ | ‘steps-mid’ | ‘steps-post’]
      figurea matplotlib.figure.Figure instance
      fillstyle[‘full’ | ‘left’ | ‘right’ | ‘bottom’ | ‘top’ | ‘none’]
      gidan id string
      labelstring or anything printable with ‘%s’ conversion.
      linestyle or ls['-' | '--' | '-.' | ':' | 'None' | ' ' | ''] and any drawstyle in combination with a linestyle, e.g., 'steps--'.
      linewidth or lwfloat value in points
      lod[True | False]
      markerunknown
      markeredgecolor or mecany matplotlib color
      markeredgewidth or mewfloat value in points
      markerfacecolor or mfcany matplotlib color
      markerfacecoloralt or mfcaltany matplotlib color
      markersize or msfloat
      markeveryNone | integer | (startind, stride)
      pickerfloat distance in points or callable pick function fn(artist, event)
      pickradiusfloat distance in points
      rasterized[True | False | None]
      snapunknown
      solid_capstyle[‘butt’ | ‘round’ | ‘projecting’]
      solid_joinstyle[‘miter’ | ‘round’ | ‘bevel’]
      transforma matplotlib.transforms.Transform instance
      urla url string
      visible[True | False]
      xdata1D array
      ydata1D array
      zorderany number
      -
      -
      -

      See also

      -
      -
      loglog()
      -
      For example code and figure
      -
      -
      -

      Additional kwargs: hold = [True|False] overrides default hold state

      -
      - -
      -
      -matplotlib.pyplot.semilogy(*args, **kwargs)
      -

      Make a plot with log scaling on the y axis.

      -

      call signature:

      -
      semilogy(*args, **kwargs)
      -
      -
      -

      semilogy() supports all the keyword arguments of -plot() and -matplotlib.axes.Axes.set_yscale().

      -

      Notable keyword arguments:

      -
      -
      -
      basey: scalar > 1
      -
      Base of the y logarithm
      -
      subsy: [ None | sequence ]
      -
      The location of the minor yticks; None defaults to -autosubs, which depend on the number of decades in the -plot; see set_yscale() for -details.
      -
      nonposy: [ ‘mask’ | ‘clip’ ]
      -
      Non-positive values in y can be masked as -invalid, or clipped to a very small positive number
      -
      -
      -

      The remaining valid kwargs are -Line2D properties:

      -
      -
      ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      PropertyDescription
      agg_filterunknown
      alphafloat (0.0 transparent through 1.0 opaque)
      animated[True | False]
      antialiased or aa[True | False]
      axesan Axes instance
      clip_boxa matplotlib.transforms.Bbox instance
      clip_on[True | False]
      clip_path[ (Path, Transform) | Patch | None ]
      color or cany matplotlib color
      containsa callable function
      dash_capstyle[‘butt’ | ‘round’ | ‘projecting’]
      dash_joinstyle[‘miter’ | ‘round’ | ‘bevel’]
      dashessequence of on/off ink in points
      data2D array (rows are x, y) or two 1D arrays
      drawstyle[‘default’ | ‘steps’ | ‘steps-pre’ | ‘steps-mid’ | ‘steps-post’]
      figurea matplotlib.figure.Figure instance
      fillstyle[‘full’ | ‘left’ | ‘right’ | ‘bottom’ | ‘top’ | ‘none’]
      gidan id string
      labelstring or anything printable with ‘%s’ conversion.
      linestyle or ls['-' | '--' | '-.' | ':' | 'None' | ' ' | ''] and any drawstyle in combination with a linestyle, e.g., 'steps--'.
      linewidth or lwfloat value in points
      lod[True | False]
      markerunknown
      markeredgecolor or mecany matplotlib color
      markeredgewidth or mewfloat value in points
      markerfacecolor or mfcany matplotlib color
      markerfacecoloralt or mfcaltany matplotlib color
      markersize or msfloat
      markeveryNone | integer | (startind, stride)
      pickerfloat distance in points or callable pick function fn(artist, event)
      pickradiusfloat distance in points
      rasterized[True | False | None]
      snapunknown
      solid_capstyle[‘butt’ | ‘round’ | ‘projecting’]
      solid_joinstyle[‘miter’ | ‘round’ | ‘bevel’]
      transforma matplotlib.transforms.Transform instance
      urla url string
      visible[True | False]
      xdata1D array
      ydata1D array
      zorderany number
      -
      -
      -

      See also

      -
      -
      loglog()
      -
      For example code and figure
      -
      -
      -

      Additional kwargs: hold = [True|False] overrides default hold state

      -
      - -
      -
      -matplotlib.pyplot.set_cmap(cmap)
      -

      Set the default colormap. Applies to the current image if any. -See help(colormaps) for more information.

      -

      cmap must be a Colormap instance, or -the name of a registered colormap.

      -

      See matplotlib.cm.register_cmap() and -matplotlib.cm.get_cmap().

      -
      - -
      -
      -matplotlib.pyplot.setp(*args, **kwargs)
      -

      Set a property on an artist object.

      -

      matplotlib supports the use of setp() (“set property”) and -getp() to set and get object properties, as well as to do -introspection on the object. For example, to set the linestyle of a -line to be dashed, you can do:

      -
      >>> line, = plot([1,2,3])
      ->>> setp(line, linestyle='--')
      -
      -
      -

      If you want to know the valid types of arguments, you can provide the -name of the property you want to set without a value:

      -
      >>> setp(line, 'linestyle')
      -    linestyle: [ '-' | '--' | '-.' | ':' | 'steps' | 'None' ]
      -
      -
      -

      If you want to see all the properties that can be set, and their -possible values, you can do:

      -
      >>> setp(line)
      -    ... long output listing omitted
      -
      -
      -

      setp() operates on a single instance or a list of instances. -If you are in query mode introspecting the possible values, only -the first instance in the sequence is used. When actually setting -values, all the instances will be set. e.g., suppose you have a -list of two lines, the following will make both lines thicker and -red:

      -
      >>> x = arange(0,1.0,0.01)
      ->>> y1 = sin(2*pi*x)
      ->>> y2 = sin(4*pi*x)
      ->>> lines = plot(x, y1, x, y2)
      ->>> setp(lines, linewidth=2, color='r')
      -
      -
      -

      setp() works with the MATLAB style string/value pairs or -with python kwargs. For example, the following are equivalent:

      -
      >>> setp(lines, 'linewidth', 2, 'color', r')  # MATLAB style
      -    ...
      ->>> setp(lines, linewidth=2, color='r')       # python style
      -
      -
      -
      - -
      -
      -matplotlib.pyplot.show(*args, **kw)
      -

      Display a figure.

      -

      When running in ipython with its pylab mode, display all -figures and return to the ipython prompt.

      -

      In non-interactive mode, display all figures and block until -the figures have been closed; in interactive mode it has no -effect unless figures were created prior to a change from -non-interactive to interactive mode (not recommended). In -that case it displays the figures but does not block.

      -

      A single experimental keyword argument, block, may be -set to True or False to override the blocking behavior -described above.

      -
      - -
      -
      -matplotlib.pyplot.specgram(x, NFFT=256, Fs=2, Fc=0, detrend=<function detrend_none at 0x34d25f0>, window=<function window_hanning at 0x34d2398>, noverlap=128, cmap=None, xextent=None, pad_to=None, sides='default', scale_by_freq=None, hold=None, **kwargs)
      -

      Plot a spectrogram.

      -

      Call signature:

      -
      specgram(x, NFFT=256, Fs=2, Fc=0, detrend=mlab.detrend_none,
      -         window=mlab.window_hanning, noverlap=128,
      -         cmap=None, xextent=None, pad_to=None, sides='default',
      -         scale_by_freq=None, **kwargs)
      -
      -
      -

      Compute and plot a spectrogram of data in x. Data are split into -NFFT length segments and the PSD of each section is -computed. The windowing function window is applied to each -segment, and the amount of overlap of each segment is -specified with noverlap. The spectrogram is plotted in decibels -as a colormap (using imshow).

      -

      Keyword arguments:

      -
      -
      -
      NFFT: integer
      -
      The number of data points used in each block for the FFT. -Must be even; a power 2 is most efficient. The default value is 256. -This should NOT be used to get zero padding, or the scaling of the -result will be incorrect. Use pad_to for this instead.
      -
      Fs: scalar
      -
      The sampling frequency (samples per time unit). It is used -to calculate the Fourier frequencies, freqs, in cycles per time -unit. The default value is 2.
      -
      detrend: callable
      -
      The function applied to each segment before fft-ing, -designed to remove the mean or linear trend. Unlike in -MATLAB, where the detrend parameter is a vector, in -matplotlib is it a function. The pylab -module defines detrend_none(), -detrend_mean(), and -detrend_linear(), but you can use -a custom function as well.
      -
      window: callable or ndarray
      -
      A function or a vector of length NFFT. To create window -vectors see window_hanning(), window_none(), -numpy.blackman(), numpy.hamming(), -numpy.bartlett(), scipy.signal(), -scipy.signal.get_window(), etc. The default is -window_hanning(). If a function is passed as the -argument, it must take a data segment as an argument and -return the windowed version of the segment.
      -
      pad_to: integer
      -
      The number of points to which the data segment is padded when -performing the FFT. This can be different from NFFT, which -specifies the number of data points used. While not increasing -the actual resolution of the psd (the minimum distance between -resolvable peaks), this can give more points in the plot, -allowing for more detail. This corresponds to the n parameter -in the call to fft(). The default is None, which sets pad_to -equal to NFFT
      -
      sides: [ ‘default’ | ‘onesided’ | ‘twosided’ ]
      -
      Specifies which sides of the PSD to return. Default gives the -default behavior, which returns one-sided for real data and both -for complex data. ‘onesided’ forces the return of a one-sided PSD, -while ‘twosided’ forces two-sided.
      -
      scale_by_freq: boolean
      -
      Specifies whether the resulting density values should be scaled -by the scaling frequency, which gives density in units of Hz^-1. -This allows for integration over the returned frequency values. -The default is True for MATLAB compatibility.
      -
      noverlap: integer
      -
      The number of points of overlap between blocks. The -default value is 128.
      -
      Fc: integer
      -
      The center frequency of x (defaults to 0), which offsets -the y extents of the plot to reflect the frequency range used -when a signal is acquired and then filtered and downsampled to -baseband.
      -
      cmap:
      -
      A matplotlib.colors.Colormap instance; if None, use -default determined by rc
      -
      xextent:
      -
      The image extent along the x-axis. xextent = (xmin,xmax) -The default is (0,max(bins)), where bins is the return -value from specgram()
      -
      -

      kwargs:

      -
      -
      Additional kwargs are passed on to imshow which makes the -specgram image
      -

      Return value is (Pxx, freqs, bins, im):

      -
        -
      • bins are the time points the spectrogram is calculated over
      • -
      • freqs is an array of frequencies
      • -
      • Pxx is an array of shape (len(times), len(freqs)) of power
      • -
      • im is a AxesImage instance
      • -
      -
      -
      -

      Note

      -

      If x is real (i.e. non-complex), only the positive -spectrum is shown. If x is complex, both positive and -negative parts of the spectrum are shown. This can be -overridden using the sides keyword argument.

      -
      -

      Also note that while the plot is in dB, the Pxx array returned is -linear in power.

      -

      Example:

      -

      (Source code, png, hires.png, pdf)

      -
      -../_images/specgram_demo.png -
      -

      Additional kwargs: hold = [True|False] overrides default hold state

      -
      - -
      -
      -matplotlib.pyplot.spectral()
      -

      set the default colormap to spectral and apply to current image if any. -See help(colormaps) for more information

      -
      - -
      -
      -matplotlib.pyplot.spring()
      -

      set the default colormap to spring and apply to current image if any. -See help(colormaps) for more information

      -
      - -
      -
      -matplotlib.pyplot.spy(Z, precision=0, marker=None, markersize=None, aspect='equal', hold=None, **kwargs)
      -

      Plot the sparsity pattern on a 2-D array.

      -

      Call signature:

      -
      spy(Z, precision=0, marker=None, markersize=None,
      -    aspect='equal', **kwargs)
      -
      -
      -

      spy(Z) plots the sparsity pattern of the 2-D array Z.

      -

      If precision is 0, any non-zero value will be plotted; -else, values of will be plotted.

      -

      For scipy.sparse.spmatrix instances, there is a -special case: if precision is ‘present’, any value present in -the array will be plotted, even if it is identically zero.

      -

      The array will be plotted as it would be printed, with -the first index (row) increasing down and the second -index (column) increasing to the right.

      -

      By default aspect is ‘equal’, so that each array element -occupies a square space; set the aspect kwarg to ‘auto’ -to allow the plot to fill the plot box, or to any scalar -number to specify the aspect ratio of an array element -directly.

      -

      Two plotting styles are available: image or marker. Both -are available for full arrays, but only the marker style -works for scipy.sparse.spmatrix instances.

      -

      If marker and markersize are None, an image will be -returned and any remaining kwargs are passed to -imshow(); else, a -Line2D object will be returned with -the value of marker determining the marker type, and any -remaining kwargs passed to the -plot() method.

      -

      If marker and markersize are None, useful kwargs include:

      -
        -
      • cmap
      • -
      • alpha
      • -
      -
      -

      See also

      -
      -
      imshow()
      -
      For image options.
      -
      -
      -

      For controlling colors, e.g., cyan background and red marks, -use:

      -
      cmap = mcolors.ListedColormap(['c','r'])
      -
      -
      -

      If marker or markersize is not None, useful kwargs include:

      -
        -
      • marker
      • -
      • markersize
      • -
      • color
      • -
      -

      Useful values for marker include:

      -
        -
      • ‘s’ square (default)
      • -
      • ‘o’ circle
      • -
      • ‘.’ point
      • -
      • ‘,’ pixel
      • -
      -
      -

      See also

      -
      -
      plot()
      -
      For plotting options
      -
      -
      -

      Additional kwargs: hold = [True|False] overrides default hold state

      -
      - -
      -
      -matplotlib.pyplot.stackplot(x, *args, **kwargs)
      -

      Draws a stacked area plot.

      -
      -

      x : 1d array of dimension N

      -
      -
      y : 2d array of dimension MxN, OR any number 1d arrays each of dimension
      -

      1xN. The data is assumed to be unstacked. Each of the following -calls is legal:

      -
      stackplot(x, y)               # where y is MxN
      -stackplot(x, y1, y2, y3, y4)  # where y1, y2, y3, y4, are all 1xNm
      -
      -
      -
      -
      -

      Keyword arguments:

      -
      -
      baseline : [‘zero’, ‘sym’, ‘wiggle’, ‘weighted_wiggle’]
      -
      Method used to calculate the baseline. ‘zero’ is just a -simple stacked plot. ‘sym’ is symmetric around zero and -is sometimes called ThemeRiver. ‘wiggle’ minimizes the -sum of the squared slopes. ‘weighted_wiggle’ does the -same but weights to account for size of each layer. -It is also called Streamgraph-layout. More details -can be found at http://www.leebyron.com/else/streamgraph/.
      -
      colors : A list or tuple of colors. These will be cycled through and
      -
      used to colour the stacked areas. -All other keyword arguments are passed to -fill_between()
      -
      -

      Returns r : A list of -PolyCollection, one for each -element in the stacked area plot.

      -
      -

      Additional kwargs: hold = [True|False] overrides default hold state

      -
      - -
      -
      -matplotlib.pyplot.stem(*args, **kwargs)
      -

      Create a stem plot.

      -

      Call signatures:

      -
      stem(y, linefmt='b-', markerfmt='bo', basefmt='r-')
      -stem(x, y, linefmt='b-', markerfmt='bo', basefmt='r-')
      -
      -
      -

      A stem plot plots vertical lines (using linefmt) at each x -location from the baseline to y, and places a marker there -using markerfmt. A horizontal line at 0 is is plotted using -basefmt.

      -

      If no x values are provided, the default is (0, 1, ..., len(y) - 1)

      -

      Return value is a tuple (markerline, stemlines, -baseline).

      -
      -

      See also

      -

      This -document -for details.

      -
      -

      Example:

      -

      (Source code, png, hires.png, pdf)

      -
      -../_images/stem_plot.png -
      -

      Additional kwargs: hold = [True|False] overrides default hold state

      -
      - -
      -
      -matplotlib.pyplot.step(x, y, *args, **kwargs)
      -

      Make a step plot.

      -

      Call signature:

      -
      step(x, y, *args, **kwargs)
      -
      -
      -

      Additional keyword args to step() are the same as those -for plot().

      -

      x and y must be 1-D sequences, and it is assumed, but not checked, -that x is uniformly increasing.

      -

      Keyword arguments:

      -
      -
      where: [ ‘pre’ | ‘post’ | ‘mid’ ]
      -

      If ‘pre’, the interval from x[i] to x[i+1] has level y[i+1]

      -

      If ‘post’, that interval has level y[i]

      -

      If ‘mid’, the jumps in y occur half-way between the -x-values.

      -
      -
      -

      Additional kwargs: hold = [True|False] overrides default hold state

      -
      - -
      -
      -matplotlib.pyplot.streamplot(x, y, u, v, density=1, linewidth=None, color=None, cmap=None, norm=None, arrowsize=1, arrowstyle='-|>', minlength=0.1, transform=None, hold=None)
      -

      Draws streamlines of a vector flow.

      -
      -
      -
      x, y : 1d arrays
      -
      an evenly spaced grid.
      -
      u, v : 2d arrays
      -
      x and y-velocities. Number of rows should match length of y, and -the number of columns should match x.
      -
      density : float or 2-tuple
      -
      Controls the closeness of streamlines. When density = 1, the domain -is divided into a 25x25 grid—density linearly scales this grid. -Each cell in the grid can have, at most, one traversing streamline. -For different densities in each direction, use [density_x, density_y].
      -
      linewidth : numeric or 2d array
      -
      vary linewidth when given a 2d array with the same shape as velocities.
      -
      color : matplotlib color code, or 2d array
      -
      Streamline color. When given an array with the same shape as -velocities, color values are converted to colors using cmap.
      -
      cmap : Colormap
      -
      Colormap used to plot streamlines and arrows. Only necessary when using -an array input for color.
      -
      norm : Normalize
      -
      Normalize object used to scale luminance data to 0, 1. If None, stretch -(min, max) to (0, 1). Only necessary when color is an array.
      -
      arrowsize : float
      -
      Factor scale arrow size.
      -
      arrowstyle : str
      -
      Arrow style specification. -See FancyArrowPatch.
      -
      minlength : float
      -
      Minimum length of streamline in axes coordinates.
      -
      -

      Returns:

      -
      -
      -
      stream_container : StreamplotSet
      -

      Container object with attributes

      -
      -
      -
      -

      This container will probably change in the future to allow changes -to the colormap, alpha, etc. for both lines and arrows, but these -changes should be backward compatible.

      -
      -
      -
      -
      -

      Additional kwargs: hold = [True|False] overrides default hold state

      -
      - -
      -
      -matplotlib.pyplot.subplot(*args, **kwargs)
      -

      Return a subplot axes positioned by the given grid definition.

      -

      Typical call signature:

      -
      subplot(nrows, ncols, plot_number)
      -
      -
      -

      Where nrows and ncols are used to notionally split the figure -into nrows * ncols sub-axes, and plot_number is used to identify -the particular subplot that this function is to create within the notional -grid. plot_number starts at 1, increments across rows first and has a -maximum of nrows * ncols.

      -

      In the case when nrows, ncols and plot_number are all less than 10, -a convenience exists, such that the a 3 digit number can be given instead, -where the hundreds represent nrows, the tens represent ncols and the -units represent plot_number. For instance:

      -
      subplot(211)
      -
      -
      -

      produces a subaxes in a figure which represents the top plot (i.e. the -first) in a 2 row by 1 column notional grid (no grid actually exists, -but conceptually this is how the returned subplot has been positioned).

      -
      -

      Note

      -

      Creating a new subplot with a position which is entirely inside a -pre-existing axes will trigger the larger axes to be deleted:

      -
      import matplotlib.pyplot as plt
      -# plot a line, implicitly creating a subplot(111)
      -plt.plot([1,2,3])
      -# now create a subplot which represents the top plot of a grid
      -# with 2 rows and 1 column. Since this subplot will overlap the
      -# first, the plot (and its axes) previously created, will be removed
      -plt.subplot(211)
      -plt.plot(range(12))
      -plt.subplot(212, axisbg='y') # creates 2nd subplot with yellow background
      -
      -
      -

      If you do not want this behavior, use the -add_subplot() method or the -axes() function instead.

      -
      -

      Keyword arguments:

      -
      -
      -
      axisbg:
      -
      The background color of the subplot, which can be any valid -color specifier. See matplotlib.colors for more -information.
      -
      polar:
      -
      A boolean flag indicating whether the subplot plot should be -a polar projection. Defaults to False.
      -
      projection:
      -
      A string giving the name of a custom projection to be used -for the subplot. This projection must have been previously -registered. See matplotlib.projections.
      -
      -
      -
      -

      See also

      -
      -
      axes()
      -
      For additional information on axes() and -subplot() keyword arguments.
      -
      examples/pie_and_polar_charts/polar_scatter_demo.py
      -
      For an example
      -
      -
      -

      Example:

      -

      (Source code, png, hires.png, pdf)

      -
      -../_images/subplot_demo.png -
      -
      - -
      -
      -matplotlib.pyplot.subplot2grid(shape, loc, rowspan=1, colspan=1, **kwargs)
      -

      Create a subplot in a grid. The grid is specified by shape, at -location of loc, spanning rowspan, colspan cells in each -direction. The index for loc is 0-based.

      -
      subplot2grid(shape, loc, rowspan=1, colspan=1)
      -
      -
      -

      is identical to

      -
      gridspec=GridSpec(shape[0], shape[2])
      -subplotspec=gridspec.new_subplotspec(loc, rowspan, colspan)
      -subplot(subplotspec)
      -
      -
      -
      - -
      -
      -matplotlib.pyplot.subplot_tool(targetfig=None)
      -

      Launch a subplot tool window for a figure.

      -

      A matplotlib.widgets.SubplotTool instance is returned.

      -
      - -
      -
      -matplotlib.pyplot.subplots(nrows=1, ncols=1, sharex=False, sharey=False, squeeze=True, subplot_kw=None, **fig_kw)
      -

      Create a figure with a set of subplots already made.

      -

      This utility wrapper makes it convenient to create common layouts of -subplots, including the enclosing figure object, in a single call.

      -

      Keyword arguments:

      -
      -
      -
      nrows : int
      -
      Number of rows of the subplot grid. Defaults to 1.
      -
      ncols : int
      -
      Number of columns of the subplot grid. Defaults to 1.
      -
      sharex : string or bool
      -
      If True, the X axis will be shared amongst all subplots. If -True and you have multiple rows, the x tick labels on all but -the last row of plots will have visible set to False -If a string must be one of “row”, “col”, “all”, or “none”. -“all” has the same effect as True, “none” has the same effect -as False. -If “row”, each subplot row will share a X axis. -If “col”, each subplot column will share a X axis and the x tick -labels on all but the last row will have visible set to False.
      -
      sharey : string or bool
      -
      If True, the Y axis will be shared amongst all subplots. If -True and you have multiple columns, the y tick labels on all but -the first column of plots will have visible set to False -If a string must be one of “row”, “col”, “all”, or “none”. -“all” has the same effect as True, “none” has the same effect -as False. -If “row”, each subplot row will share a Y axis. -If “col”, each subplot column will share a Y axis and the y tick -labels on all but the last row will have visible set to False.
      -
      squeeze : bool
      -

      If True, extra dimensions are squeezed out from the -returned axis object:

      -
        -
      • if only one subplot is constructed (nrows=ncols=1), the -resulting single Axis object is returned as a scalar.
      • -
      • for Nx1 or 1xN subplots, the returned object is a 1-d numpy -object array of Axis objects are returned as numpy 1-d -arrays.
      • -
      • for NxM subplots with N>1 and M>1 are returned as a 2d -array.
      • -
      -

      If False, no squeezing at all is done: the returned axis -object is always a 2-d array containing Axis instances, even if it -ends up being 1x1.

      -
      -
      subplot_kw : dict
      -
      Dict with keywords passed to the -add_subplot() call used to -create each subplots.
      -
      fig_kw : dict
      -
      Dict with keywords passed to the figure() call. Note that all -keywords not recognized above will be automatically included here.
      -
      -
      -

      Returns:

      -

      fig, ax : tuple

      -
      -
        -
      • fig is the matplotlib.figure.Figure object
      • -
      • ax can be either a single axis object or an array of axis -objects if more than one subplot was created. The dimensions -of the resulting array can be controlled with the squeeze -keyword, see above.
      • -
      -
      -

      Examples:

      -
      x = np.linspace(0, 2*np.pi, 400)
      -y = np.sin(x**2)
      -
      -# Just a figure and one subplot
      -f, ax = plt.subplots()
      -ax.plot(x, y)
      -ax.set_title('Simple plot')
      -
      -# Two subplots, unpack the output array immediately
      -f, (ax1, ax2) = plt.subplots(1, 2, sharey=True)
      -ax1.plot(x, y)
      -ax1.set_title('Sharing Y axis')
      -ax2.scatter(x, y)
      -
      -# Four polar axes
      -plt.subplots(2, 2, subplot_kw=dict(polar=True))
      -
      -# Share a X axis with each column of subplots
      -plt.subplots(2, 2, sharex='col')
      -
      -# Share a Y axis with each row of subplots
      -plt.subplots(2, 2, sharey='row')
      -
      -# Share a X and Y axis with all subplots
      -plt.subplots(2, 2, sharex='all', sharey='all')
      -# same as
      -plt.subplots(2, 2, sharex=True, sharey=True)
      -
      -
      -
      - -
      -
      -matplotlib.pyplot.subplots_adjust(*args, **kwargs)
      -

      Tune the subplot layout.

      -

      call signature:

      -
      subplots_adjust(left=None, bottom=None, right=None, top=None,
      -                wspace=None, hspace=None)
      -
      -
      -

      The parameter meanings (and suggested defaults) are:

      -
      left  = 0.125  # the left side of the subplots of the figure
      -right = 0.9    # the right side of the subplots of the figure
      -bottom = 0.1   # the bottom of the subplots of the figure
      -top = 0.9      # the top of the subplots of the figure
      -wspace = 0.2   # the amount of width reserved for blank space between subplots
      -hspace = 0.2   # the amount of height reserved for white space between subplots
      -
      -
      -

      The actual defaults are controlled by the rc file

      -
      - -
      -
      -matplotlib.pyplot.summer()
      -

      set the default colormap to summer and apply to current image if any. -See help(colormaps) for more information

      -
      - -
      -
      -matplotlib.pyplot.suptitle(*args, **kwargs)
      -

      Add a centered title to the figure.

      -

      kwargs are matplotlib.text.Text properties. Using figure -coordinates, the defaults are:

      -
      -
      -
      x : 0.5
      -
      The x location of the text in figure coords
      -
      y : 0.98
      -
      The y location of the text in figure coords
      -
      horizontalalignment : ‘center’
      -
      The horizontal alignment of the text
      -
      verticalalignment : ‘top’
      -
      The vertical alignment of the text
      -
      -
      -

      A matplotlib.text.Text instance is returned.

      -

      Example:

      -
      fig.suptitle('this is the figure title', fontsize=12)
      -
      -
      -
      - -
      -
      -matplotlib.pyplot.switch_backend(newbackend)
      -

      Switch the default backend. This feature is experimental, and -is only expected to work switching to an image backend. e.g., if -you have a bunch of PostScript scripts that you want to run from -an interactive ipython session, you may want to switch to the PS -backend before running them to avoid having a bunch of GUI windows -popup. If you try to interactively switch from one GUI backend to -another, you will explode.

      -

      Calling this command will close all open windows.

      -
      - -
      -
      -matplotlib.pyplot.table(**kwargs)
      -

      Add a table to the current axes.

      -

      Call signature:

      -
      table(cellText=None, cellColours=None,
      -      cellLoc='right', colWidths=None,
      -      rowLabels=None, rowColours=None, rowLoc='left',
      -      colLabels=None, colColours=None, colLoc='center',
      -      loc='bottom', bbox=None):
      -
      -

      Returns a matplotlib.table.Table instance. For finer -grained control over tables, use the -Table class and add it to the axes -with add_table().

      -

      Thanks to John Gill for providing the class and table.

      -

      kwargs control the Table -properties:

      -
      -
      ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      PropertyDescription
      agg_filterunknown
      alphafloat (0.0 transparent through 1.0 opaque)
      animated[True | False]
      axesan Axes instance
      clip_boxa matplotlib.transforms.Bbox instance
      clip_on[True | False]
      clip_path[ (Path, Transform) | Patch | None ]
      containsa callable function
      figurea matplotlib.figure.Figure instance
      fontsizea float in points
      gidan id string
      labelstring or anything printable with ‘%s’ conversion.
      lod[True | False]
      picker[None|float|boolean|callable]
      rasterized[True | False | None]
      snapunknown
      transformTransform instance
      urla url string
      visible[True | False]
      zorderany number
      -
      -
      - -
      -
      -matplotlib.pyplot.text(x, y, s, fontdict=None, withdash=False, **kwargs)
      -

      Add text to the axes.

      -

      Add text in string s to axis at location x, y, data -coordinates.

      - --- - - - - - - -
      Parameters :

      s : string

      -
      -

      text

      -
      -

      x, y : scalars

      -
      -

      data coordinates

      -
      -

      fontdict : dictionary, optional, default: None

      -
      -

      A dictionary to override the default text properties. If fontdict -is None, the defaults are determined by your rc parameters.

      -
      -

      withdash : boolean, optional, default: False

      -
      -

      Creates a TextWithDash instance instead of a -Text instance.

      -
      -
      Other Parameters:
       

      kwargs : Text properties.

      -
      -

      Examples

      -

      Individual keyword arguments can be used to override any given -parameter:

      -
      >>> text(x, y, s, fontsize=12)
      -
      -
      -

      The default transform specifies that text is in data coords, -alternatively, you can specify text in axis coords (0,0 is -lower-left and 1,1 is upper-right). The example below places -text in the center of the axes:

      -
      >>> text(0.5, 0.5,'matplotlib', horizontalalignment='center',
      ->>>      verticalalignment='center',
      ->>>      transform = ax.transAxes)
      -
      -
      -

      You can put a rectangular box around the text instance (e.g., to -set a background color) by using the keyword bbox. bbox is -a dictionary of Rectangle -properties. For example:

      -
      >>> text(x, y, s, bbox=dict(facecolor='red', alpha=0.5))
      -
      -
      -
      - -
      -
      -matplotlib.pyplot.thetagrids(*args, **kwargs)
      -

      Get or set the theta locations of the gridlines in a polar plot.

      -

      If no arguments are passed, return a tuple (lines, labels) -where lines is an array of radial gridlines -(Line2D instances) and labels is an -array of tick labels (Text instances):

      -
      lines, labels = thetagrids()
      -
      -
      -

      Otherwise the syntax is:

      -
      lines, labels = thetagrids(angles, labels=None, fmt='%d', frac = 1.1)
      -
      -
      -

      set the angles at which to place the theta grids (these gridlines -are equal along the theta dimension).

      -

      angles is in degrees.

      -

      labels, if not None, is a len(angles) list of strings of the -labels to use at each angle.

      -

      If labels is None, the labels will be fmt%angle.

      -

      frac is the fraction of the polar axes radius at which to place -the label (1 is the edge). e.g., 1.05 is outside the axes and 0.95 -is inside the axes.

      -

      Return value is a list of tuples (lines, labels):

      -
      -
        -
      • lines are Line2D instances
      • -
      • labels are Text instances.
      • -
      -
      -

      Note that on input, the labels argument is a list of strings, -and on output it is a list of Text -instances.

      -

      Examples:

      -
      # set the locations of the radial gridlines and labels
      -lines, labels = thetagrids( range(45,360,90) )
      -
      -# set the locations and labels of the radial gridlines and labels
      -lines, labels = thetagrids( range(45,360,90), ('NE', 'NW', 'SW','SE') )
      -
      -
      -
      - -
      -
      -matplotlib.pyplot.tick_params(axis='both', **kwargs)
      -

      Change the appearance of ticks and tick labels.

      -

      Keyword arguments:

      -
      -
      axis : [‘x’ | ‘y’ | ‘both’]
      -
      Axis on which to operate; default is ‘both’.
      -
      reset : [True | False]
      -
      If True, set all parameters to defaults -before processing other keyword arguments. Default is -False.
      -
      which : [‘major’ | ‘minor’ | ‘both’]
      -
      Default is ‘major’; apply arguments to which ticks.
      -
      direction : [‘in’ | ‘out’ | ‘inout’]
      -
      Puts ticks inside the axes, outside the axes, or both.
      -
      length
      -
      Tick length in points.
      -
      width
      -
      Tick width in points.
      -
      color
      -
      Tick color; accepts any mpl color spec.
      -
      pad
      -
      Distance in points between tick and label.
      -
      labelsize
      -
      Tick label font size in points or as a string (e.g., ‘large’).
      -
      labelcolor
      -
      Tick label color; mpl color spec.
      -
      colors
      -
      Changes the tick color and the label color to the same value: -mpl color spec.
      -
      zorder
      -
      Tick and label zorder.
      -
      bottom, top, left, right : [bool | ‘on’ | ‘off’]
      -
      controls whether to draw the respective ticks.
      -
      labelbottom, labeltop, labelleft, labelright
      -
      Boolean or [‘on’ | ‘off’], controls whether to draw the -respective tick labels.
      -
      -

      Example:

      -
      ax.tick_params(direction='out', length=6, width=2, colors='r')
      -
      -
      -

      This will make all major ticks be red, pointing out of the box, -and with dimensions 6 points by 2 points. Tick labels will -also be red.

      -
      - -
      -
      -matplotlib.pyplot.ticklabel_format(**kwargs)
      -

      Change the ScalarFormatter used by -default for linear axes.

      -

      Optional keyword arguments:

      -
      -
      ---- - - - - - - - - - - - - - - - - - - - - - - -
      KeywordDescription
      style[ ‘sci’ (or ‘scientific’) | ‘plain’ ] -plain turns off scientific notation
      scilimits(m, n), pair of integers; if style -is ‘sci’, scientific notation will -be used for numbers outside the range -10`m`:sup: to 10`n`:sup:. -Use (0,0) to include all numbers.
      useOffset[True | False | offset]; if True, -the offset will be calculated as needed; -if False, no offset will be used; if a -numeric offset is specified, it will be -used.
      axis[ ‘x’ | ‘y’ | ‘both’ ]
      useLocaleIf True, format the number according to -the current locale. This affects things -such as the character used for the -decimal separator. If False, use -C-style (English) formatting. The -default setting is controlled by the -axes.formatter.use_locale rcparam.
      -
      -

      Only the major ticks are affected. -If the method is called when the -ScalarFormatter is not the -Formatter being used, an -AttributeError will be raised.

      -
      - -
      -
      -matplotlib.pyplot.tight_layout(pad=1.08, h_pad=None, w_pad=None, rect=None)
      -

      Automatically adjust subplot parameters to give specified padding.

      -

      Parameters:

      -
      -
      pad : float
      -
      padding between the figure edge and the edges of subplots, as a fraction of the font-size.
      -
      h_pad, w_pad : float
      -
      padding (height/width) between edges of adjacent subplots. -Defaults to pad_inches.
      -
      rect : if rect is given, it is interpreted as a rectangle
      -
      (left, bottom, right, top) in the normalized figure -coordinate that the whole subplots area (including -labels) will fit into. Default is (0, 0, 1, 1).
      -
      -
      - -
      -
      -matplotlib.pyplot.title(label, fontdict=None, loc='center', **kwargs)
      -

      Set a title of the current axes.

      -

      Set one of the three available axes titles. The available titles are -positioned above the axes in the center, flush with the left edge, -and flush with the right edge.

      - --- - - - - - - - - -
      Parameters :

      label : str

      -
      -

      Text to use for the title

      -
      -

      fontdict : dict

      -
      -

      A dictionary controlling the appearance of the title text, -the default fontdict is: -{‘fontsize’: rcParams[‘axes.titlesize’],

      -
      -

      ‘verticalalignment’: ‘baseline’, -‘horizontalalignment’: loc}

      -
      -
      -

      loc : {‘center’, ‘left’, ‘right’}, str, optional

      -
      -

      Which title to set, defaults to ‘center’

      -
      -
      Returns :

      text : Text

      -
      -

      The matplotlib text instance representing the title

      -
      -
      Other Parameters:
       

      Other keyword arguments are text properties, see :

      -

      :class:`~matplotlib.text.Text` for a list of valid text :

      -

      properties. :

      -
      -
      -

      See also

      -
      -
      See
      -
      func:text for adding text to the current axes
      -
      -
      -
      - -
      -
      -matplotlib.pyplot.tricontour(*args, **kwargs)
      -

      Draw contours on an unstructured triangular grid. -tricontour() and -tricontourf() draw contour lines and -filled contours, respectively. Except as noted, function -signatures and return values are the same for both versions.

      -

      The triangulation can be specified in one of two ways; either:

      -
      tricontour(triangulation, ...)
      -
      -
      -

      where triangulation is a matplotlib.tri.Triangulation -object, or

      -
      tricontour(x, y, ...)
      -tricontour(x, y, triangles, ...)
      -tricontour(x, y, triangles=triangles, ...)
      -tricontour(x, y, mask=mask, ...)
      -tricontour(x, y, triangles, mask=mask, ...)
      -
      -
      -

      in which case a Triangulation object will be created. See -Triangulation for a explanation of -these possibilities.

      -

      The remaining arguments may be:

      -
      tricontour(..., Z)
      -
      -
      -

      where Z is the array of values to contour, one per point -in the triangulation. The level values are chosen -automatically.

      -
      tricontour(..., Z, N)
      -
      -
      -

      contour N automatically-chosen levels.

      -
      tricontour(..., Z, V)
      -
      -
      -

      draw contour lines at the values specified in sequence V

      -
      tricontourf(..., Z, V)
      -
      -
      -

      fill the (len(V)-1) regions between the values in V

      -
      tricontour(Z, **kwargs)
      -
      -
      -

      Use keyword args to control colors, linewidth, origin, cmap ... see -below for more details.

      -

      C = tricontour(...) returns a -TriContourSet object.

      -

      Optional keyword arguments:

      -
      -
      -
      colors: [ None | string | (mpl_colors) ]
      -

      If None, the colormap specified by cmap will be used.

      -

      If a string, like ‘r’ or ‘red’, all levels will be plotted in this -color.

      -

      If a tuple of matplotlib color args (string, float, rgb, etc), -different levels will be plotted in different colors in the order -specified.

      -
      -
      alpha: float
      -
      The alpha blending value
      -
      cmap: [ None | Colormap ]
      -
      A cm Colormap instance or -None. If cmap is None and colors is None, a -default Colormap is used.
      -
      norm: [ None | Normalize ]
      -
      A matplotlib.colors.Normalize instance for -scaling data values to colors. If norm is None and -colors is None, the default linear scaling is used.
      -
      levels [level0, level1, ..., leveln]
      -
      A list of floating point numbers indicating the level -curves to draw; eg to draw just the zero contour pass -levels=[0]
      -
      origin: [ None | ‘upper’ | ‘lower’ | ‘image’ ]
      -

      If None, the first value of Z will correspond to the -lower left corner, location (0,0). If ‘image’, the rc -value for image.origin will be used.

      -

      This keyword is not active if X and Y are specified in -the call to contour.

      -
      -
      -

      extent: [ None | (x0,x1,y0,y1) ]

      -
      -

      If origin is not None, then extent is interpreted as -in matplotlib.pyplot.imshow(): it gives the outer -pixel boundaries. In this case, the position of Z[0,0] -is the center of the pixel, not a corner. If origin is -None, then (x0, y0) is the position of Z[0,0], and -(x1, y1) is the position of Z[-1,-1].

      -

      This keyword is not active if X and Y are specified in -the call to contour.

      -
      -
      -
      locator: [ None | ticker.Locator subclass ]
      -
      If locator is None, the default -MaxNLocator is used. The -locator is used to determine the contour levels if they -are not given explicitly via the V argument.
      -
      extend: [ ‘neither’ | ‘both’ | ‘min’ | ‘max’ ]
      -
      Unless this is ‘neither’, contour levels are automatically -added to one or both ends of the range so that all data -are included. These added ranges are then mapped to the -special colormap values which default to the ends of the -colormap range, but can be set via -matplotlib.colors.Colormap.set_under() and -matplotlib.colors.Colormap.set_over() methods.
      -
      xunits, yunits: [ None | registered units ]
      -
      Override axis units by specifying an instance of a -matplotlib.units.ConversionInterface.
      -
      -
      -

      tricontour-only keyword arguments:

      -
      -
      -
      linewidths: [ None | number | tuple of numbers ]
      -

      If linewidths is None, the default width in -lines.linewidth in matplotlibrc is used.

      -

      If a number, all levels will be plotted with this linewidth.

      -

      If a tuple, different levels will be plotted with different -linewidths in the order specified

      -
      -
      linestyles: [ None | ‘solid’ | ‘dashed’ | ‘dashdot’ | ‘dotted’ ]
      -

      If linestyles is None, the ‘solid’ is used.

      -

      linestyles can also be an iterable of the above strings -specifying a set of linestyles to be used. If this -iterable is shorter than the number of contour levels -it will be repeated as necessary.

      -

      If contour is using a monochrome colormap and the contour -level is less than 0, then the linestyle specified -in contour.negative_linestyle in matplotlibrc -will be used.

      -
      -
      -
      -

      tricontourf-only keyword arguments:

      -
      -
      -
      antialiased: [ True | False ]
      -
      enable antialiasing
      -
      nchunk: [ 0 | integer ]
      -
      If 0, no subdivision of the domain. Specify a positive integer to -divide the domain into subdomains of roughly nchunk by nchunk -points. This may never actually be advantageous, so this option may -be removed. Chunking introduces artifacts at the chunk boundaries -unless antialiased is False.
      -
      -
      -

      Note: tricontourf fills intervals that are closed at the top; that -is, for boundaries z1 and z2, the filled region is:

      -
      z1 < z <= z2
      -
      -
      -

      There is one exception: if the lowest boundary coincides with -the minimum value of the z array, then that minimum value -will be included in the lowest interval.

      -

      Examples:

      -

      (Source code)

      -
      -../_images/tricontour_demo_00.png -

      (png, hires.png, pdf)

      -
      -
      -../_images/tricontour_demo_01.png -

      (png, hires.png, pdf)

      -
      -

      Additional kwargs: hold = [True|False] overrides default hold state

      -
      - -
      -
      -matplotlib.pyplot.tricontourf(*args, **kwargs)
      -

      Draw contours on an unstructured triangular grid. -tricontour() and -tricontourf() draw contour lines and -filled contours, respectively. Except as noted, function -signatures and return values are the same for both versions.

      -

      The triangulation can be specified in one of two ways; either:

      -
      tricontour(triangulation, ...)
      -
      -
      -

      where triangulation is a matplotlib.tri.Triangulation -object, or

      -
      tricontour(x, y, ...)
      -tricontour(x, y, triangles, ...)
      -tricontour(x, y, triangles=triangles, ...)
      -tricontour(x, y, mask=mask, ...)
      -tricontour(x, y, triangles, mask=mask, ...)
      -
      -
      -

      in which case a Triangulation object will be created. See -Triangulation for a explanation of -these possibilities.

      -

      The remaining arguments may be:

      -
      tricontour(..., Z)
      -
      -
      -

      where Z is the array of values to contour, one per point -in the triangulation. The level values are chosen -automatically.

      -
      tricontour(..., Z, N)
      -
      -
      -

      contour N automatically-chosen levels.

      -
      tricontour(..., Z, V)
      -
      -
      -

      draw contour lines at the values specified in sequence V

      -
      tricontourf(..., Z, V)
      -
      -
      -

      fill the (len(V)-1) regions between the values in V

      -
      tricontour(Z, **kwargs)
      -
      -
      -

      Use keyword args to control colors, linewidth, origin, cmap ... see -below for more details.

      -

      C = tricontour(...) returns a -TriContourSet object.

      -

      Optional keyword arguments:

      -
      -
      -
      colors: [ None | string | (mpl_colors) ]
      -

      If None, the colormap specified by cmap will be used.

      -

      If a string, like ‘r’ or ‘red’, all levels will be plotted in this -color.

      -

      If a tuple of matplotlib color args (string, float, rgb, etc), -different levels will be plotted in different colors in the order -specified.

      -
      -
      alpha: float
      -
      The alpha blending value
      -
      cmap: [ None | Colormap ]
      -
      A cm Colormap instance or -None. If cmap is None and colors is None, a -default Colormap is used.
      -
      norm: [ None | Normalize ]
      -
      A matplotlib.colors.Normalize instance for -scaling data values to colors. If norm is None and -colors is None, the default linear scaling is used.
      -
      levels [level0, level1, ..., leveln]
      -
      A list of floating point numbers indicating the level -curves to draw; eg to draw just the zero contour pass -levels=[0]
      -
      origin: [ None | ‘upper’ | ‘lower’ | ‘image’ ]
      -

      If None, the first value of Z will correspond to the -lower left corner, location (0,0). If ‘image’, the rc -value for image.origin will be used.

      -

      This keyword is not active if X and Y are specified in -the call to contour.

      -
      -
      -

      extent: [ None | (x0,x1,y0,y1) ]

      -
      -

      If origin is not None, then extent is interpreted as -in matplotlib.pyplot.imshow(): it gives the outer -pixel boundaries. In this case, the position of Z[0,0] -is the center of the pixel, not a corner. If origin is -None, then (x0, y0) is the position of Z[0,0], and -(x1, y1) is the position of Z[-1,-1].

      -

      This keyword is not active if X and Y are specified in -the call to contour.

      -
      -
      -
      locator: [ None | ticker.Locator subclass ]
      -
      If locator is None, the default -MaxNLocator is used. The -locator is used to determine the contour levels if they -are not given explicitly via the V argument.
      -
      extend: [ ‘neither’ | ‘both’ | ‘min’ | ‘max’ ]
      -
      Unless this is ‘neither’, contour levels are automatically -added to one or both ends of the range so that all data -are included. These added ranges are then mapped to the -special colormap values which default to the ends of the -colormap range, but can be set via -matplotlib.colors.Colormap.set_under() and -matplotlib.colors.Colormap.set_over() methods.
      -
      xunits, yunits: [ None | registered units ]
      -
      Override axis units by specifying an instance of a -matplotlib.units.ConversionInterface.
      -
      -
      -

      tricontour-only keyword arguments:

      -
      -
      -
      linewidths: [ None | number | tuple of numbers ]
      -

      If linewidths is None, the default width in -lines.linewidth in matplotlibrc is used.

      -

      If a number, all levels will be plotted with this linewidth.

      -

      If a tuple, different levels will be plotted with different -linewidths in the order specified

      -
      -
      linestyles: [ None | ‘solid’ | ‘dashed’ | ‘dashdot’ | ‘dotted’ ]
      -

      If linestyles is None, the ‘solid’ is used.

      -

      linestyles can also be an iterable of the above strings -specifying a set of linestyles to be used. If this -iterable is shorter than the number of contour levels -it will be repeated as necessary.

      -

      If contour is using a monochrome colormap and the contour -level is less than 0, then the linestyle specified -in contour.negative_linestyle in matplotlibrc -will be used.

      -
      -
      -
      -

      tricontourf-only keyword arguments:

      -
      -
      -
      antialiased: [ True | False ]
      -
      enable antialiasing
      -
      nchunk: [ 0 | integer ]
      -
      If 0, no subdivision of the domain. Specify a positive integer to -divide the domain into subdomains of roughly nchunk by nchunk -points. This may never actually be advantageous, so this option may -be removed. Chunking introduces artifacts at the chunk boundaries -unless antialiased is False.
      -
      -
      -

      Note: tricontourf fills intervals that are closed at the top; that -is, for boundaries z1 and z2, the filled region is:

      -
      z1 < z <= z2
      -
      -
      -

      There is one exception: if the lowest boundary coincides with -the minimum value of the z array, then that minimum value -will be included in the lowest interval.

      -

      Examples:

      -

      (Source code)

      -
      -../_images/tricontour_demo_00.png -

      (png, hires.png, pdf)

      -
      -
      -../_images/tricontour_demo_01.png -

      (png, hires.png, pdf)

      -
      -

      Additional kwargs: hold = [True|False] overrides default hold state

      -
      - -
      -
      -matplotlib.pyplot.tripcolor(*args, **kwargs)
      -

      Create a pseudocolor plot of an unstructured triangular grid.

      -

      The triangulation can be specified in one of two ways; either:

      -
      tripcolor(triangulation, ...)
      -
      -
      -

      where triangulation is a matplotlib.tri.Triangulation -object, or

      -
      tripcolor(x, y, ...)
      -tripcolor(x, y, triangles, ...)
      -tripcolor(x, y, triangles=triangles, ...)
      -tripcolor(x, y, mask=mask, ...)
      -tripcolor(x, y, triangles, mask=mask, ...)
      -
      -
      -

      in which case a Triangulation object will be created. See -Triangulation for a explanation of these -possibilities.

      -

      The next argument must be C, the array of color values, either -one per point in the triangulation if color values are defined at -points, or one per triangle in the triangulation if color values -are defined at triangles. If there are the same number of points -and triangles in the triangulation it is assumed that color -values are defined at points; to force the use of color values at -triangles use the kwarg facecolors*=C instead of just *C.

      -

      shading may be ‘flat’ (the default) or ‘gouraud’. If shading -is ‘flat’ and C values are defined at points, the color values -used for each triangle are from the mean C of the triangle’s -three points. If shading is ‘gouraud’ then color values must be -defined at points. shading of ‘faceted’ is deprecated; -please use edgecolors instead.

      -

      The remaining kwargs are the same as for -pcolor().

      -

      Example:

      -
      -

      (Source code)

      -
      -../_images/tripcolor_demo_00.png -

      (png, hires.png, pdf)

      -
      -
      -../_images/tripcolor_demo_01.png -

      (png, hires.png, pdf)

      -
      -
      -../_images/tripcolor_demo_02.png -

      (png, hires.png, pdf)

      -
      -
      -

      Additional kwargs: hold = [True|False] overrides default hold state

      -
      - -
      -
      -matplotlib.pyplot.triplot(*args, **kwargs)
      -

      Draw a unstructured triangular grid as lines and/or markers.

      -

      The triangulation to plot can be specified in one of two ways; -either:

      -
      triplot(triangulation, ...)
      -
      -
      -

      where triangulation is a matplotlib.tri.Triangulation -object, or

      -
      triplot(x, y, ...)
      -triplot(x, y, triangles, ...)
      -triplot(x, y, triangles=triangles, ...)
      -triplot(x, y, mask=mask, ...)
      -triplot(x, y, triangles, mask=mask, ...)
      -
      -
      -

      in which case a Triangulation object will be created. See -Triangulation for a explanation of these -possibilities.

      -

      The remaining args and kwargs are the same as for -plot().

      -

      Example:

      -
      -

      (Source code)

      -
      -../_images/triplot_demo_00.png -

      (png, hires.png, pdf)

      -
      -
      -../_images/triplot_demo_01.png -

      (png, hires.png, pdf)

      -
      -
      -

      Additional kwargs: hold = [True|False] overrides default hold state

      -
      - -
      -
      -matplotlib.pyplot.twinx(ax=None)
      -

      Make a second axes that shares the x-axis. The new axes will -overlay ax (or the current axes if ax is None). The ticks -for ax2 will be placed on the right, and the ax2 instance is -returned.

      -
      -

      See also

      -
      -
      examples/api_examples/two_scales.py
      -
      For an example
      -
      -
      -
      - -
      -
      -matplotlib.pyplot.twiny(ax=None)
      -

      Make a second axes that shares the y-axis. The new axis will -overlay ax (or the current axes if ax is None). The ticks -for ax2 will be placed on the top, and the ax2 instance is -returned.

      -
      - -
      -
      -matplotlib.pyplot.vlines(x, ymin, ymax, colors='k', linestyles='solid', label='', hold=None, **kwargs)
      -

      Plot vertical lines.

      -

      Plot vertical lines at each x from ymin to ymax.

      - --- - - - - - - - - -
      Parameters :

      x : scalar or 1D array_like

      -
      -

      x-indexes where to plot the lines.

      -
      -

      xmin, xmax : scalar or 1D array_like

      -
      -

      Respective beginning and end of each line. If scalars are -provided, all lines will have same length.

      -
      -

      colors : array_like of colors, optional, default: ‘k’

      -

      linestyles : [‘solid’ | ‘dashed’ | ‘dashdot’ | ‘dotted’], optional

      -

      label : string, optional, default: ‘’

      -
      Returns :

      lines : LineCollection

      -
      Other Parameters:
       

      kwargs : LineCollection properties.

      -
      -
      -

      See also

      -
      -
      hlines
      -
      horizontal lines
      -
      -
      -

      Examples

      -

      (Source code, png, hires.png, pdf)

      -
      -../_images/vline_hline_demo.png -
      -

      Additional kwargs: hold = [True|False] overrides default hold state

      -
      - -
      -
      -matplotlib.pyplot.waitforbuttonpress(*args, **kwargs)
      -

      Call signature:

      -
      waitforbuttonpress(self, timeout=-1)
      -
      -
      -

      Blocking call to interact with the figure.

      -

      This will return True is a key was pressed, False if a mouse -button was pressed and None if timeout was reached without -either being pressed.

      -

      If timeout is negative, does not timeout.

      -
      - -
      -
      -matplotlib.pyplot.winter()
      -

      set the default colormap to winter and apply to current image if any. -See help(colormaps) for more information

      -
      - -
      -
      -matplotlib.pyplot.xcorr(x, y, normed=True, detrend=<function detrend_none at 0x34d25f0>, usevlines=True, maxlags=10, hold=None, **kwargs)
      -

      Plot the cross correlation between x and y.

      -

      Call signature:

      -
      xcorr(self, x, y, normed=True, detrend=mlab.detrend_none,
      -  usevlines=True, maxlags=10, **kwargs)
      -
      -
      -

      If normed = True, normalize the data by the cross -correlation at 0-th lag. x and y are detrended by the -detrend callable (default no normalization). x and y -must be equal length.

      -

      Data are plotted as plot(lags, c, **kwargs)

      -

      Return value is a tuple (lags, c, line) where:

      -
      -
        -
      • lags are a length 2*maxlags+1 lag vector

        -
      • -
      • c is the 2*maxlags+1 auto correlation vector

        -
      • -
      • -
        line is a Line2D instance
        -

        returned by plot().

        -
        -
        -
      • -
      -
      -

      The default linestyle is None and the default marker is -‘o’, though these can be overridden with keyword args. The -cross correlation is performed with numpy.correlate() -with mode = 2.

      -

      If usevlines is True:

      -
      -

      vlines() -rather than plot() is used to draw -vertical lines from the origin to the xcorr. Otherwise the -plotstyle is determined by the kwargs, which are -Line2D properties.

      -

      The return value is a tuple (lags, c, linecol, b) -where linecol is the -matplotlib.collections.LineCollection instance and -b is the x-axis.

      -
      -

      maxlags is a positive integer detailing the number of lags to show. -The default value of None will return all (2*len(x)-1) lags.

      -

      Example:

      -

      xcorr() is top graph, and -acorr() is bottom graph.

      -

      (Source code, png, hires.png, pdf)

      -
      -../_images/xcorr_demo.png -
      -

      Additional kwargs: hold = [True|False] overrides default hold state

      -
      - -
      -
      -matplotlib.pyplot.xlabel(s, *args, **kwargs)
      -

      Set the x axis label of the current axis.

      -

      Default override is:

      -
      override = {
      -    'fontsize'            : 'small',
      -    'verticalalignment'   : 'top',
      -    'horizontalalignment' : 'center'
      -    }
      -
      -
      -
      -

      See also

      -
      -
      text()
      -
      For information on how override and the optional args work
      -
      -
      -
      - -
      -
      -matplotlib.pyplot.xlim(*args, **kwargs)
      -

      Get or set the x limits of the current axes.

      -
      xmin, xmax = xlim()   # return the current xlim
      -xlim( (xmin, xmax) )  # set the xlim to xmin, xmax
      -xlim( xmin, xmax )    # set the xlim to xmin, xmax
      -
      -
      -

      If you do not specify args, you can pass the xmin and xmax as -kwargs, e.g.:

      -
      xlim(xmax=3) # adjust the max leaving min unchanged
      -xlim(xmin=1) # adjust the min leaving max unchanged
      -
      -
      -

      Setting limits turns autoscaling off for the x-axis.

      -

      The new axis limits are returned as a length 2 tuple.

      -
      - -
      -
      -matplotlib.pyplot.xscale(*args, **kwargs)
      -

      Set the scaling of the x-axis.

      -

      call signature:

      -
      xscale(scale, **kwargs)
      -
      -
      -

      The available scales are: ‘linear’ | ‘log’ | ‘symlog’

      -

      Different keywords may be accepted, depending on the scale:

      -

      ‘linear’

      -
      -

      ‘log’

      -
      -
      -
      basex/basey:
      -
      The base of the logarithm
      -
      nonposx/nonposy: [‘mask’ | ‘clip’ ]
      -
      non-positive values in x or y can be masked as -invalid, or clipped to a very small positive number
      -
      subsx/subsy:
      -

      Where to place the subticks between each major tick. -Should be a sequence of integers. For example, in a log10 -scale: [2, 3, 4, 5, 6, 7, 8, 9]

      -

      will place 8 logarithmically spaced minor ticks between -each major tick.

      -
      -
      -
      -

      ‘symlog’

      -
      -
      -
      basex/basey:
      -
      The base of the logarithm
      -
      linthreshx/linthreshy:
      -
      The range (-x, x) within which the plot is linear (to -avoid having the plot go to infinity around zero).
      -
      subsx/subsy:
      -

      Where to place the subticks between each major tick. -Should be a sequence of integers. For example, in a log10 -scale: [2, 3, 4, 5, 6, 7, 8, 9]

      -

      will place 8 logarithmically spaced minor ticks between -each major tick.

      -
      -
      linscalex/linscaley:
      -
      This allows the linear range (-linthresh to linthresh) -to be stretched relative to the logarithmic range. Its -value is the number of decades to use for each half of the -linear range. For example, when linscale == 1.0 (the -default), the space used for the positive and negative -halves of the linear range will be equal to one decade in -the logarithmic range.
      -
      -
      -
      -
      - -
      -
      -matplotlib.pyplot.xticks(*args, **kwargs)
      -

      Get or set the x-limits of the current tick locations and labels.

      -
      # return locs, labels where locs is an array of tick locations and
      -# labels is an array of tick labels.
      -locs, labels = xticks()
      -
      -# set the locations of the xticks
      -xticks( arange(6) )
      -
      -# set the locations and labels of the xticks
      -xticks( arange(5), ('Tom', 'Dick', 'Harry', 'Sally', 'Sue') )
      -
      -
      -

      The keyword args, if any, are Text -properties. For example, to rotate long labels:

      -
      xticks( arange(12), calendar.month_name[1:13], rotation=17 )
      -
      -
      -
      - -
      -
      -matplotlib.pyplot.ylabel(s, *args, **kwargs)
      -

      Set the y axis label of the current axis.

      -

      Defaults override is:

      -
      override = {
      -   'fontsize'            : 'small',
      -   'verticalalignment'   : 'center',
      -   'horizontalalignment' : 'right',
      -   'rotation'='vertical' : }
      -
      -
      -

      See also

      -
      -
      text()
      -
      For information on how override and the optional args -work.
      -
      -
      -
      - -
      -
      -matplotlib.pyplot.ylim(*args, **kwargs)
      -

      Get or set the y-limits of the current axes.

      -
      ymin, ymax = ylim()   # return the current ylim
      -ylim( (ymin, ymax) )  # set the ylim to ymin, ymax
      -ylim( ymin, ymax )    # set the ylim to ymin, ymax
      -
      -
      -

      If you do not specify args, you can pass the ymin and ymax as -kwargs, e.g.:

      -
      ylim(ymax=3) # adjust the max leaving min unchanged
      -ylim(ymin=1) # adjust the min leaving max unchanged
      -
      -
      -

      Setting limits turns autoscaling off for the y-axis.

      -

      The new axis limits are returned as a length 2 tuple.

      -
      - -
      -
      -matplotlib.pyplot.yscale(*args, **kwargs)
      -

      Set the scaling of the y-axis.

      -

      call signature:

      -
      yscale(scale, **kwargs)
      -
      -
      -

      The available scales are: ‘linear’ | ‘log’ | ‘symlog’

      -

      Different keywords may be accepted, depending on the scale:

      -

      ‘linear’

      -
      -

      ‘log’

      -
      -
      -
      basex/basey:
      -
      The base of the logarithm
      -
      nonposx/nonposy: [‘mask’ | ‘clip’ ]
      -
      non-positive values in x or y can be masked as -invalid, or clipped to a very small positive number
      -
      subsx/subsy:
      -

      Where to place the subticks between each major tick. -Should be a sequence of integers. For example, in a log10 -scale: [2, 3, 4, 5, 6, 7, 8, 9]

      -

      will place 8 logarithmically spaced minor ticks between -each major tick.

      -
      -
      -
      -

      ‘symlog’

      -
      -
      -
      basex/basey:
      -
      The base of the logarithm
      -
      linthreshx/linthreshy:
      -
      The range (-x, x) within which the plot is linear (to -avoid having the plot go to infinity around zero).
      -
      subsx/subsy:
      -

      Where to place the subticks between each major tick. -Should be a sequence of integers. For example, in a log10 -scale: [2, 3, 4, 5, 6, 7, 8, 9]

      -

      will place 8 logarithmically spaced minor ticks between -each major tick.

      -
      -
      linscalex/linscaley:
      -
      This allows the linear range (-linthresh to linthresh) -to be stretched relative to the logarithmic range. Its -value is the number of decades to use for each half of the -linear range. For example, when linscale == 1.0 (the -default), the space used for the positive and negative -halves of the linear range will be equal to one decade in -the logarithmic range.
      -
      -
      -
      -
      - -
      -
      -matplotlib.pyplot.yticks(*args, **kwargs)
      -

      Get or set the y-limits of the current tick locations and labels.

      -
      # return locs, labels where locs is an array of tick locations and
      -# labels is an array of tick labels.
      -locs, labels = yticks()
      -
      -# set the locations of the yticks
      -yticks( arange(6) )
      -
      -# set the locations and labels of the yticks
      -yticks( arange(5), ('Tom', 'Dick', 'Harry', 'Sally', 'Sue') )
      -
      -
      -

      The keyword args, if any, are Text -properties. For example, to rotate long labels:

      -
      yticks( arange(12), calendar.month_name[1:13], rotation=45 )
      -
      -
      -
      - -
      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/api/pyplot_summary.html b/dev/api/pyplot_summary.html deleted file mode 100644 index 2dde00c6fac..00000000000 --- a/dev/api/pyplot_summary.html +++ /dev/null @@ -1,980 +0,0 @@ - - - - - - - - Plotting commands summary — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      Previous topic

      -

      The Matplotlib API

      -

      Next topic

      -

      API Changes

      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      Plotting commands summary

      -
      -
      -matplotlib.pyplot.plotting()
      -
      ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      FunctionDescription
      acorrPlot the autocorrelation of x.
      annotateCreate an annotation: a piece of text referring to a data point.
      arrowAdd an arrow to the axes.
      autoscaleAutoscale the axis view to the data (toggle).
      axesAdd an axes to the figure.
      axhlineAdd a horizontal line across the axis.
      axhspanAdd a horizontal span (rectangle) across the axis.
      axisConvenience method to get or set axis properties.
      axvlineAdd a vertical line across the axes.
      axvspanAdd a vertical span (rectangle) across the axes.
      barMake a bar plot.
      barbsPlot a 2-D field of barbs.
      barhMake a horizontal bar plot.
      boxTurn the axes box on or off.
      boxplotMake a box and whisker plot.
      broken_barhPlot horizontal bars.
      claClear the current axes.
      clabelLabel a contour plot.
      clfClear the current figure.
      climSet the color limits of the current image.
      closeClose a figure window.
      coherePlot the coherence between x and y.
      colorbarAdd a colorbar to a plot.
      contourPlot contours.
      contourfPlot contours.
      csdPlot cross-spectral density.
      delaxesRemove an axes from the current figure.
      drawRedraw the current figure.
      errorbarPlot an errorbar graph.
      eventplotPlot identical parallel lines at specific positions.
      figimageAdds a non-resampled image to the figure.
      figlegendPlace a legend in the figure.
      figtextAdd text to figure.
      figureCreates a new figure.
      fillPlot filled polygons.
      fill_betweenMake filled polygons between two curves.
      fill_betweenxMake filled polygons between two horizontal curves.
      findobjFind artist objects.
      gcaReturn the current axis instance.
      gcfReturn a reference to the current figure.
      gciGet the current colorable artist.
      get_figlabelsReturn a list of existing figure labels.
      get_fignumsReturn a list of existing figure numbers.
      gridTurn the axes grids on or off.
      hexbinMake a hexagonal binning plot.
      histPlot a histogram.
      hist2dMake a 2D histogram plot.
      hlinesPlot horizontal lines.
      holdSet the hold state.
      imreadRead an image from a file into an array.
      imsaveSave an array as in image file.
      imshowDisplay an image on the axes.
      ioffTurn interactive mode off.
      ionTurn interactive mode on.
      isholdReturn the hold status of the current axes.
      isinteractiveReturn status of interactive mode.
      legendPlace a legend on the current axes.
      locator_paramsControl behavior of tick locators.
      loglogMake a plot with log scaling on both the x and y axis.
      marginsSet or retrieve autoscaling margins.
      matshowDisplay an array as a matrix in a new figure window.
      minorticks_offRemove minor ticks from the current plot.
      minorticks_onDisplay minor ticks on the current plot.
      overCall a function with hold(True).
      pausePause for interval seconds.
      pcolorCreate a pseudocolor plot of a 2-D array.
      pcolormeshPlot a quadrilateral mesh.
      piePlot a pie chart.
      plotPlot lines and/or markers to the Axes.
      plot_datePlot with data with dates.
      plotfilePlot the data in in a file.
      polarMake a polar plot.
      psdPlot the power spectral density.
      quiverPlot a 2-D field of arrows.
      quiverkeyAdd a key to a quiver plot.
      rcSet the current rc params.
      rc_contextReturn a context manager for managing rc settings.
      rcdefaultsRestore the default rc params.
      rgridsGet or set the radial gridlines on a polar plot.
      savefigSave the current figure.
      scaSet the current Axes instance to ax.
      scatterMake a scatter plot of x vs y, where x and y are sequence like objects of the same lengths.
      sciSet the current image.
      semilogxMake a plot with log scaling on the x axis.
      semilogyMake a plot with log scaling on the y axis.
      set_cmapSet the default colormap.
      setpSet a property on an artist object.
      showDisplay a figure.
      specgramPlot a spectrogram.
      spyPlot the sparsity pattern on a 2-D array.
      stackplotDraws a stacked area plot.
      stemCreate a stem plot.
      stepMake a step plot.
      streamplotDraws streamlines of a vector flow.
      subplotReturn a subplot axes positioned by the given grid definition.
      subplot2gridCreate a subplot in a grid.
      subplot_toolLaunch a subplot tool window for a figure.
      subplotsCreate a figure with a set of subplots already made.
      subplots_adjustTune the subplot layout.
      suptitleAdd a centered title to the figure.
      switch_backendSwitch the default backend.
      tableAdd a table to the current axes.
      textAdd text to the axes.
      thetagridsGet or set the theta locations of the gridlines in a polar plot.
      tick_paramsChange the appearance of ticks and tick labels.
      ticklabel_formatChange the ScalarFormatter used by default for linear axes.
      tight_layoutAutomatically adjust subplot parameters to give specified padding.
      titletitle(label, fontdict=None, loc=’center’, **kwargs) Set a title of the current axes.
      tricontourDraw contours on an unstructured triangular grid.
      tricontourfDraw contours on an unstructured triangular grid.
      tripcolorCreate a pseudocolor plot of an unstructured triangular grid.
      triplotDraw a unstructured triangular grid as lines and/or markers.
      twinxMake a second axes that shares the x-axis.
      twinyMake a second axes that shares the y-axis.
      vlinesPlot vertical lines.
      xcorrPlot the cross correlation between x and y.
      xlabelSet the x axis label of the current axis.
      xlimGet or set the x limits of the current axes.
      xscaleSet the scaling of the x-axis.
      xticksGet or set the x-limits of the current tick locations and labels.
      ylabelSet the y axis label of the current axis.
      ylimGet or set the y-limits of the current axes.
      yscaleSet the scaling of the y-axis.
      yticksGet or set the y-limits of the current tick locations and labels.
      -
      - -
      -
      -matplotlib.pyplot.colormaps()
      -

      Matplotlib provides a number of colormaps, and others can be added using -register_cmap(). This function documents the built-in -colormaps, and will also return a list of all registered colormaps if called.

      -

      You can set the colormap for an image, pcolor, scatter, etc, -using a keyword argument:

      -
      imshow(X, cmap=cm.hot)
      -
      -
      -

      or using the set_cmap() function:

      -
      imshow(X)
      -pyplot.set_cmap('hot')
      -pyplot.set_cmap('jet')
      -
      -
      -

      In interactive mode, set_cmap() will update the colormap post-hoc, -allowing you to see which one works best for your data.

      -

      All built-in colormaps can be reversed by appending _r: For instance, -gray_r is the reverse of gray.

      -

      There are several common color schemes used in visualization:

      -
      -
      Sequential schemes
      -
      for unipolar data that progresses from low to high
      -
      Diverging schemes
      -
      for bipolar data that emphasizes positive or negative deviations from a -central value
      -
      Cyclic schemes
      -
      meant for plotting values that wrap around at the -endpoints, such as phase angle, wind direction, or time of day
      -
      Qualitative schemes
      -
      for nominal data that has no inherent ordering, where color is used -only to distinguish categories
      -
      -

      The base colormaps are derived from those of the same name provided -with Matlab:

      -
      -
      ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      ColormapDescription
      autumnsequential linearly-increasing shades of red-orange-yellow
      bonesequential increasing black-white color map with -a tinge of blue, to emulate X-ray film
      coollinearly-decreasing shades of cyan-magenta
      coppersequential increasing shades of black-copper
      flagrepetitive red-white-blue-black pattern (not cyclic at -endpoints)
      graysequential linearly-increasing black-to-white -grayscale
      hotsequential black-red-yellow-white, to emulate blackbody -radiation from an object at increasing temperatures
      hsvcyclic red-yellow-green-cyan-blue-magenta-red, formed -by changing the hue component in the HSV color space
      jeta spectral map with dark endpoints, blue-cyan-yellow-red; -based on a fluid-jet simulation by NCSA [1]
      pinksequential increasing pastel black-pink-white, meant -for sepia tone colorization of photographs
      prismrepetitive red-yellow-green-blue-purple-...-green pattern -(not cyclic at endpoints)
      springlinearly-increasing shades of magenta-yellow
      summersequential linearly-increasing shades of green-yellow
      winterlinearly-increasing shades of blue-green
      -
      -

      For the above list only, you can also set the colormap using the -corresponding pylab shortcut interface function, similar to Matlab:

      -
      imshow(X)
      -hot()
      -jet()
      -
      -
      -

      The next set of palettes are from the Yorick scientific visualisation -package, an evolution of -the GIST package, both by David H. Munro:

      -
      -
      ---- - - - - - - - - - - - - - - - - - - - - - - -
      ColormapDescription
      gist_earthmapmaker’s colors from dark blue deep ocean to green -lowlands to brown highlands to white mountains
      gist_heatsequential increasing black-red-orange-white, to emulate -blackbody radiation from an iron bar as it grows hotter
      gist_ncarpseudo-spectral black-blue-green-yellow-red-purple-white -colormap from National Center for Atmospheric -Research [2]
      gist_rainbowruns through the colors in spectral order from red to -violet at full saturation (like hsv but not cyclic)
      gist_stern“Stern special” color table from Interactive Data -Language software
      -
      -

      The following colormaps are based on the ColorBrewer color specifications and designs developed by -Cynthia Brewer:

      -

      ColorBrewer Diverging (luminance is highest at the midpoint, and -decreases towards differently-colored endpoints):

      -
      -
      ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      ColormapDescription
      BrBGbrown, white, blue-green
      PiYGpink, white, yellow-green
      PRGnpurple, white, green
      PuOrorange, white, purple
      RdBured, white, blue
      RdGyred, white, gray
      RdYlBured, yellow, blue
      RdYlGnred, yellow, green
      Spectralred, orange, yellow, green, blue
      -
      -

      ColorBrewer Sequential (luminance decreases monotonically):

      -
      -
      ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      ColormapDescription
      Blueswhite to dark blue
      BuGnwhite, light blue, dark green
      BuPuwhite, light blue, dark purple
      GnBuwhite, light green, dark blue
      Greenswhite to dark green
      Greyswhite to black (not linear)
      Orangeswhite, orange, dark brown
      OrRdwhite, orange, dark red
      PuBuwhite, light purple, dark blue
      PuBuGnwhite, light purple, dark green
      PuRdwhite, light purple, dark red
      Purpleswhite to dark purple
      RdPuwhite, pink, dark purple
      Redswhite to dark red
      YlGnlight yellow, dark green
      YlGnBulight yellow, light green, dark blue
      YlOrBrlight yellow, orange, dark brown
      YlOrRdlight yellow, orange, dark red
      -
      -

      ColorBrewer Qualitative:

      -

      (For plotting nominal data, ListedColormap should be used, -not LinearSegmentedColormap. Different sets of colors are -recommended for different numbers of categories. These continuous -versions of the qualitative schemes may be removed or converted in the -future.)

      -
        -
      • Accent
      • -
      • Dark2
      • -
      • Paired
      • -
      • Pastel1
      • -
      • Pastel2
      • -
      • Set1
      • -
      • Set2
      • -
      • Set3
      • -
      -

      Other miscellaneous schemes:

      -
      -
      ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      ColormapDescription
      afmhotsequential black-orange-yellow-white blackbody -spectrum, commonly used in atomic force microscopy
      brgblue-red-green
      bwrdiverging blue-white-red
      coolwarmdiverging blue-gray-red, meant to avoid issues with 3D -shading, color blindness, and ordering of colors [3]
      CMRmap“Default colormaps on color images often reproduce to -confusing grayscale images. The proposed colormap -maintains an aesthetically pleasing color image that -automatically reproduces to a monotonic grayscale with -discrete, quantifiable saturation levels.” [4]
      cubehelixUnlike most other color schemes cubehelix was designed -by D.A. Green to be monotonically increasing in terms -of perceived brightness. Also, when printed on a black -and white postscript printer, the scheme results in a -greyscale with monotonically increasing brightness. -This color scheme is named cubehelix because the r,g,b -values produced can be visualised as a squashed helix -around the diagonal in the r,g,b color cube.
      gnuplotgnuplot’s traditional pm3d scheme -(black-blue-red-yellow)
      gnuplot2sequential color printable as gray -(black-blue-violet-yellow-white)
      oceangreen-blue-white
      rainbowspectral purple-blue-green-yellow-orange-red colormap -with diverging luminance
      seismicdiverging blue-white-red
      nipy_spectralblack-purple-blue-green-yellow-red-white spectrum, -originally from the Neuroimaging in Python project
      terrainmapmaker’s colors, blue-green-yellow-brown-white, -originally from IGOR Pro
      -
      -

      The following colormaps are redundant and may be removed in future -versions. It’s recommended to use the names in the descriptions -instead, which produce identical output:

      -
      -
      ---- - - - - - - - - - - - - - - - - - - - -
      ColormapDescription
      gist_grayidentical to gray
      gist_yargidentical to gray_r
      binaryidentical to gray_r
      spectralidentical to nipy_spectral [5]
      -
      -

      Footnotes

      - - - - - -
      [1]Rainbow colormaps, jet in particular, are considered a poor -choice for scientific visualization by many researchers: Rainbow Color -Map (Still) Considered Harmful
      - - - - - -
      [2]Resembles “BkBlAqGrYeOrReViWh200” from NCAR Command -Language. See Color Table Gallery
      - - - - - -
      [3]See Diverging Color Maps for Scientific Visualization by Kenneth -Moreland.
      - - - - - -
      [4]See A Color Map for Effective Black-and-White Rendering of -Color-Scale Images -by Carey Rappaport
      - - - - - -
      [5]Changed to distinguish from ColorBrewer’s Spectral map. -spectral() still works, but -set_cmap('nipy_spectral') is recommended for clarity.
      -
      - -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/api/sankey_api.html b/dev/api/sankey_api.html deleted file mode 100644 index afb4f37d193..00000000000 --- a/dev/api/sankey_api.html +++ /dev/null @@ -1,567 +0,0 @@ - - - - - - - - sankey — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      Table Of Contents

      - - -

      Previous topic

      -

      pyplot

      -

      Next topic

      -

      spines

      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      sankey

      -
      -

      matplotlib.sankey

      -

      Module for creating Sankey diagrams using matplotlib

      -
      -
      -class matplotlib.sankey.Sankey(ax=None, scale=1.0, unit='', format='%G', gap=0.25, radius=0.1, shoulder=0.03, offset=0.15, head_angle=100, margin=0.4, tolerance=1e-06, **kwargs)
      -

      Sankey diagram in matplotlib

      -
      -
      Sankey diagrams are a specific type of flow diagram, in which -the width of the arrows is shown proportionally to the flow -quantity. They are typically used to visualize energy or -material or cost transfers between processes. -Wikipedia (6/1/2011)
      -

      Create a new Sankey instance.

      -

      Optional keyword arguments:

      -
      -
      ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      FieldDescription
      axaxes onto which the data should be plotted -If ax isn’t provided, new axes will be created.
      scalescaling factor for the flows -scale sizes the width of the paths in order to -maintain proper layout. The same scale is applied -to all subdiagrams. The value should be chosen -such that the product of the scale and the sum of -the inputs is approximately 1.0 (and the product of -the scale and the sum of the outputs is -approximately -1.0).
      unitstring representing the physical unit associated -with the flow quantities -If unit is None, then none of the quantities are -labeled.
      formata Python number formatting string to be used in -labeling the flow as a quantity (i.e., a number -times a unit, where the unit is given)
      gapspace between paths that break in/break away -to/from the top or bottom
      radiusinner radius of the vertical paths
      shouldersize of the shoulders of output arrowS
      offsettext offset (from the dip or tip of the arrow)
      head_angleangle of the arrow heads (and negative of the angle -of the tails) [deg]
      marginminimum space between Sankey outlines and the edge -of the plot area
      toleranceacceptable maximum of the magnitude of the sum of -flows -The magnitude of the sum of connected flows cannot -be greater than tolerance.
      -
      -

      The optional arguments listed above are applied to all subdiagrams so -that there is consistent alignment and formatting.

      -

      If Sankey is instantiated with any keyword arguments other -than those explicitly listed above (**kwargs), they will be passed -to add(), which will create the first subdiagram.

      -

      In order to draw a complex Sankey diagram, create an instance of -Sankey by calling it without any kwargs:

      -
      sankey = Sankey()
      -
      -
      -

      Then add simple Sankey sub-diagrams:

      -
      sankey.add() # 1
      -sankey.add() # 2
      -#...
      -sankey.add() # n
      -
      -
      -

      Finally, create the full diagram:

      -
      sankey.finish()
      -
      -
      -

      Or, instead, simply daisy-chain those calls:

      -
      Sankey().add().add...  .add().finish()
      -
      -
      -
      -

      See also

      -

      add() -finish()

      -
      -

      Examples:

      -
      -

      (Source code)

      -
      -../_images/sankey_demo_basics_00.png -

      (png, hires.png, pdf)

      -
      -
      -../_images/sankey_demo_basics_01.png -

      (png, hires.png, pdf)

      -
      -
      -../_images/sankey_demo_basics_02.png -

      (png, hires.png, pdf)

      -
      -
      -
      -
      -add(patchlabel='', flows=None, orientations=None, labels='', trunklength=1.0, pathlengths=0.25, prior=None, connect=(0, 0), rotation=0, **kwargs)
      -

      Add a simple Sankey diagram with flows at the same hierarchical level.

      -

      Return value is the instance of Sankey.

      -

      Optional keyword arguments:

      -
      -
      ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      KeywordDescription
      patchlabellabel to be placed at the center of the diagram -Note: label (not patchlabel) will be passed to -the patch through **kwargs and can be used to -create an entry in the legend.
      flowsarray of flow values -By convention, inputs are positive and outputs are -negative.
      orientationslist of orientations of the paths -Valid values are 1 (from/to the top), 0 (from/to -the left or right), or -1 (from/to the bottom). If -orientations == 0, inputs will break in from the -left and outputs will break away to the right.
      labelslist of specifications of the labels for the flows -Each value may be None (no labels), ‘’ (just -label the quantities), or a labeling string. If a -single value is provided, it will be applied to all -flows. If an entry is a non-empty string, then the -quantity for the corresponding flow will be shown -below the string. However, if the unit of the -main diagram is None, then quantities are never -shown, regardless of the value of this argument.
      trunklengthlength between the bases of the input and output -groups
      pathlengthslist of lengths of the arrows before break-in or -after break-away -If a single value is given, then it will be applied -to the first (inside) paths on the top and bottom, -and the length of all other arrows will be -justified accordingly. The pathlengths are not -applied to the horizontal inputs and outputs.
      priorindex of the prior diagram to which this diagram -should be connected
      connecta (prior, this) tuple indexing the flow of the -prior diagram and the flow of this diagram which -should be connected -If this is the first diagram or prior is None, -connect will be ignored.
      rotationangle of rotation of the diagram [deg] -rotation is ignored if this diagram is connected -to an existing one (using prior and connect). -The interpretation of the orientations argument -will be rotated accordingly (e.g., if rotation -== 90, an orientations entry of 1 means to/from -the left).
      -
      -

      Valid kwargs are matplotlib.patches.PathPatch() arguments:

      -
      -
      ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      PropertyDescription
      agg_filterunknown
      alphafloat or None
      animated[True | False]
      antialiased or aa[True | False] or None for default
      axesan Axes instance
      clip_boxa matplotlib.transforms.Bbox instance
      clip_on[True | False]
      clip_path[ (Path, Transform) | Patch | None ]
      colormatplotlib color spec
      containsa callable function
      edgecolor or ecmpl color spec, or None for default, or ‘none’ for no color
      facecolor or fcmpl color spec, or None for default, or ‘none’ for no color
      figurea matplotlib.figure.Figure instance
      fill[True | False]
      gidan id string
      hatch[‘/’ | ‘\’ | ‘|’ | ‘-‘ | ‘+’ | ‘x’ | ‘o’ | ‘O’ | ‘.’ | ‘*’]
      labelstring or anything printable with ‘%s’ conversion.
      linestyle or ls[‘solid’ | ‘dashed’ | ‘dashdot’ | ‘dotted’]
      linewidth or lwfloat or None for default
      lod[True | False]
      path_effectsunknown
      picker[None|float|boolean|callable]
      rasterized[True | False | None]
      snapunknown
      transformTransform instance
      urla url string
      visible[True | False]
      zorderany number
      -
      -

      As examples, fill=False and label='A legend entry'. -By default, facecolor='#bfd1d4' (light blue) and -linewidth=0.5.

      -

      The indexing parameters (prior and connect) are zero-based.

      -

      The flows are placed along the top of the diagram from the inside out -in order of their index within the flows list or array. They are -placed along the sides of the diagram from the top down and along the -bottom from the outside in.

      -

      If the the sum of the inputs and outputs is nonzero, the discrepancy -will appear as a cubic Bezier curve along the top and bottom edges of -the trunk.

      -
      -

      See also

      -

      finish()

      -
      -
      - -
      -
      -finish()
      -

      Adjust the axes and return a list of information about the Sankey -subdiagram(s).

      -

      Return value is a list of subdiagrams represented with the following -fields:

      -
      -
      ---- - - - - - - - - - - - - - - - - - - - - - - - - - -
      FieldDescription
      patchSankey outline (an instance of -PathPatch)
      flowsvalues of the flows (positive for input, negative -for output)
      angleslist of angles of the arrows [deg/90] -For example, if the diagram has not been rotated, -an input to the top side will have an angle of 3 -(DOWN), and an output from the top side will have -an angle of 1 (UP). If a flow has been skipped -(because its magnitude is less than tolerance), -then its angle will be None.
      tipsarray in which each row is an [x, y] pair -indicating the positions of the tips (or “dips”) of -the flow paths -If the magnitude of a flow is less the tolerance -for the instance of Sankey, the flow is -skipped and its tip will be at the center of the -diagram.
      textText instance for the -label of the diagram
      textslist of Text instances -for the labels of flows
      -
      -
      -

      See also

      -

      add()

      -
      -
      - -
      - -
      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/api/spines_api.html b/dev/api/spines_api.html deleted file mode 100644 index e7989b83b1b..00000000000 --- a/dev/api/spines_api.html +++ /dev/null @@ -1,433 +0,0 @@ - - - - - - - - spines — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      Table Of Contents

      - - -

      Previous topic

      -

      sankey

      -

      Next topic

      -

      ticker

      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      spines

      -
      -

      matplotlib.spines

      -
      -
      -class matplotlib.spines.Spine(axes, spine_type, path, **kwargs)
      -

      Bases: matplotlib.patches.Patch

      -

      an axis spine – the line noting the data area boundaries

      -

      Spines are the lines connecting the axis tick marks and noting the -boundaries of the data area. They can be placed at arbitrary -positions. See function:set_position -for more information.

      -

      The default position is ('outward',0).

      -

      Spines are subclasses of class:Patch, and -inherit much of their behavior.

      -

      Spines draw a line or a circle, depending if -function:set_patch_line or -function:set_patch_circle has been -called. Line-like is the default.

      -
        -
      • axes : the Axes instance containing the spine
      • -
      • spine_type : a string specifying the spine type
      • -
      • path : the path instance used to draw the spine
      • -
      -

      Valid kwargs are:

      -
      -
      ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      PropertyDescription
      agg_filterunknown
      alphafloat or None
      animated[True | False]
      antialiased or aa[True | False] or None for default
      axesan Axes instance
      clip_boxa matplotlib.transforms.Bbox instance
      clip_on[True | False]
      clip_path[ (Path, Transform) | Patch | None ]
      colormatplotlib color spec
      containsa callable function
      edgecolor or ecmpl color spec, or None for default, or ‘none’ for no color
      facecolor or fcmpl color spec, or None for default, or ‘none’ for no color
      figurea matplotlib.figure.Figure instance
      fill[True | False]
      gidan id string
      hatch[‘/’ | ‘\’ | ‘|’ | ‘-‘ | ‘+’ | ‘x’ | ‘o’ | ‘O’ | ‘.’ | ‘*’]
      labelstring or anything printable with ‘%s’ conversion.
      linestyle or ls[‘solid’ | ‘dashed’ | ‘dashdot’ | ‘dotted’]
      linewidth or lwfloat or None for default
      lod[True | False]
      path_effectsunknown
      picker[None|float|boolean|callable]
      rasterized[True | False | None]
      snapunknown
      transformTransform instance
      urla url string
      visible[True | False]
      zorderany number
      -
      -
      -
      -classmethod circular_spine(axes, center, radius, **kwargs)
      -

      (staticmethod) Returns a circular Spine.

      -
      - -
      -
      -cla()
      -

      Clear the current spine

      -
      - -
      -
      -draw(artist, renderer, *args, **kwargs)
      -
      - -
      -
      -get_bounds()
      -

      Get the bounds of the spine.

      -
      - -
      -
      -get_patch_transform()
      -
      - -
      -
      -get_path()
      -
      - -
      -
      -get_position()
      -

      get the spine position

      -
      - -
      -
      -get_smart_bounds()
      -

      get whether the spine has smart bounds

      -
      - -
      -
      -get_spine_transform()
      -

      get the spine transform

      -
      - -
      -
      -is_frame_like()
      -

      return True if directly on axes frame

      -

      This is useful for determining if a spine is the edge of an -old style MPL plot. If so, this function will return True.

      -
      - -
      -
      -classmethod linear_spine(axes, spine_type, **kwargs)
      -

      (staticmethod) Returns a linear Spine.

      -
      - -
      -
      -register_axis(axis)
      -

      register an axis

      -

      An axis should be registered with its corresponding spine from -the Axes instance. This allows the spine to clear any axis -properties when needed.

      -
      - -
      -
      -set_bounds(low, high)
      -

      Set the bounds of the spine.

      -
      - -
      -
      -set_color(c)
      -

      Set the edgecolor.

      -

      ACCEPTS: matplotlib color arg or sequence of rgba tuples

      -
      -

      See also

      -
      -
      set_facecolor(), set_edgecolor()
      -
      For setting the edge or face color individually.
      -
      -
      -
      - -
      -
      -set_patch_circle(center, radius)
      -

      set the spine to be circular

      -
      - -
      -
      -set_patch_line()
      -

      set the spine to be linear

      -
      - -
      -
      -set_position(position)
      -

      set the position of the spine

      -

      Spine position is specified by a 2 tuple of (position type, -amount). The position types are:

      -
        -
      • ‘outward’ : place the spine out from the data area by the -specified number of points. (Negative values specify placing the -spine inward.)
      • -
      • ‘axes’ : place the spine at the specified Axes coordinate (from -0.0-1.0).
      • -
      • ‘data’ : place the spine at the specified data coordinate.
      • -
      -

      Additionally, shorthand notations define a special positions:

      -
        -
      • ‘center’ -> (‘axes’,0.5)
      • -
      • ‘zero’ -> (‘data’, 0.0)
      • -
      -
      - -
      -
      -set_smart_bounds(value)
      -

      set the spine and associated axis to have smart bounds

      -
      - -
      - -
      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/api/ticker_api.html b/dev/api/ticker_api.html deleted file mode 100644 index 35d1e122812..00000000000 --- a/dev/api/ticker_api.html +++ /dev/null @@ -1,846 +0,0 @@ - - - - - - - - ticker — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      Table Of Contents

      - - -

      Previous topic

      -

      spines

      -

      Next topic

      -

      tight_layout

      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      ticker

      -
      -

      matplotlib.ticker

      -
      -

      Tick locating and formatting

      -

      This module contains classes to support completely configurable tick locating -and formatting. Although the locators know nothing about major or minor -ticks, they are used by the Axis class to support major and minor tick -locating and formatting. Generic tick locators and formatters are provided, -as well as domain specific custom ones..

      -
      -

      Tick locating

      -

      The Locator class is the base class for all tick locators. The locators -handle autoscaling of the view limits based on the data limits, and the -choosing of tick locations. A useful semi-automatic tick locator is -MultipleLocator. You initialize this with a base, eg 10, and it picks axis -limits and ticks that are multiples of your base.

      -

      The Locator subclasses defined here are

      -
      -
      NullLocator
      -
      No ticks
      -
      FixedLocator
      -
      Tick locations are fixed
      -
      IndexLocator
      -
      locator for index plots (e.g., where x = range(len(y)))
      -
      LinearLocator
      -
      evenly spaced ticks from min to max
      -
      LogLocator
      -
      logarithmically ticks from min to max
      -
      MultipleLocator
      -
      -
      ticks and range are a multiple of base;
      -
      either integer or float
      -
      -
      -
      OldAutoLocator
      -
      choose a MultipleLocator and dyamically reassign it for -intelligent ticking during navigation
      -
      MaxNLocator
      -
      finds up to a max number of ticks at nice locations
      -
      AutoLocator
      -
      MaxNLocator with simple defaults. This is the default -tick locator for most plotting.
      -
      AutoMinorLocator
      -
      locator for minor ticks when the axis is linear and the -major ticks are uniformly spaced. It subdivides the major -tick interval into a specified number of minor intervals, -defaulting to 4 or 5 depending on the major interval.
      -
      -

      There are a number of locators specialized for date locations - see -the dates module

      -

      You can define your own locator by deriving from Locator. You must -override the __call__ method, which returns a sequence of locations, -and you will probably want to override the autoscale method to set the -view limits from the data limits.

      -

      If you want to override the default locator, use one of the above or a -custom locator and pass it to the x or y axis instance. The relevant -methods are:

      -
      ax.xaxis.set_major_locator( xmajorLocator )
      -ax.xaxis.set_minor_locator( xminorLocator )
      -ax.yaxis.set_major_locator( ymajorLocator )
      -ax.yaxis.set_minor_locator( yminorLocator )
      -
      -
      -

      The default minor locator is the NullLocator, eg no minor ticks on by -default.

      -
      -
      -

      Tick formatting

      -

      Tick formatting is controlled by classes derived from Formatter. The -formatter operates on a single tick value and returns a string to the -axis.

      -
      -
      NullFormatter
      -
      no labels on the ticks
      -
      IndexFormatter
      -
      set the strings from a list of labels
      -
      FixedFormatter
      -
      set the strings manually for the labels
      -
      FuncFormatter
      -
      user defined function sets the labels
      -
      FormatStrFormatter
      -
      use a sprintf format string
      -
      ScalarFormatter
      -
      default formatter for scalars; autopick the fmt string
      -
      LogFormatter
      -
      formatter for log axes
      -
      -

      You can derive your own formatter from the Formatter base class by -simply overriding the __call__ method. The formatter class has access -to the axis view and data limits.

      -

      To control the major and minor tick label formats, use one of the -following methods:

      -
      ax.xaxis.set_major_formatter( xmajorFormatter )
      -ax.xaxis.set_minor_formatter( xminorFormatter )
      -ax.yaxis.set_major_formatter( ymajorFormatter )
      -ax.yaxis.set_minor_formatter( yminorFormatter )
      -
      -
      -

      See pylab_examples example code: major_minor_demo1.py for an example of setting -major an minor ticks. See the matplotlib.dates module for -more information and examples of using date locators and formatters.

      -
      -
      -class matplotlib.ticker.TickHelper
      -

      Bases: object

      -
      -
      -axis = None
      -
      - -
      -
      -create_dummy_axis(**kwargs)
      -
      - -
      -
      -set_axis(axis)
      -
      - -
      -
      -set_bounds(vmin, vmax)
      -
      - -
      -
      -set_data_interval(vmin, vmax)
      -
      - -
      -
      -set_view_interval(vmin, vmax)
      -
      - -
      - -
      -
      -class matplotlib.ticker.Formatter
      -

      Bases: matplotlib.ticker.TickHelper

      -

      Convert the tick location to a string

      -
      -
      -fix_minus(s)
      -

      some classes may want to replace a hyphen for minus with the -proper unicode symbol as described here. -The default is to do nothing

      -

      Note, if you use this method, eg in :meth`format_data` or -call, you probably don’t want to use it for -format_data_short() since the toolbar uses this for -interactive coord reporting and I doubt we can expect GUIs -across platforms will handle the unicode correctly. So for -now the classes that override fix_minus() should have an -explicit format_data_short() method

      -
      - -
      -
      -format_data(value)
      -
      - -
      -
      -format_data_short(value)
      -

      return a short string version

      -
      - -
      -
      -get_offset()
      -
      - -
      -
      -locs = []
      -
      - -
      -
      -set_locs(locs)
      -
      - -
      - -
      -
      -class matplotlib.ticker.FixedFormatter(seq)
      -

      Bases: matplotlib.ticker.Formatter

      -

      Return fixed strings for tick labels

      -

      seq is a sequence of strings. For positions i < len(seq) return -seq[i] regardless of x. Otherwise return ‘’

      -
      -
      -get_offset()
      -
      - -
      -
      -set_offset_string(ofs)
      -
      - -
      - -
      -
      -class matplotlib.ticker.NullFormatter
      -

      Bases: matplotlib.ticker.Formatter

      -

      Always return the empty string

      -
      - -
      -
      -class matplotlib.ticker.FuncFormatter(func)
      -

      Bases: matplotlib.ticker.Formatter

      -

      User defined function for formatting

      -
      - -
      -
      -class matplotlib.ticker.FormatStrFormatter(fmt)
      -

      Bases: matplotlib.ticker.Formatter

      -

      Use a format string to format the tick

      -
      - -
      -
      -class matplotlib.ticker.ScalarFormatter(useOffset=True, useMathText=None, useLocale=None)
      -

      Bases: matplotlib.ticker.Formatter

      -

      Tick location is a plain old number. If useOffset==True and the data range -is much smaller than the data average, then an offset will be determined -such that the tick labels are meaningful. Scientific notation is used for -data < 10^-n or data >= 10^m, where n and m are the power limits set using -set_powerlimits((n,m)). The defaults for these are controlled by the -axes.formatter.limits rc parameter.

      -
      -
      -fix_minus(s)
      -

      use a unicode minus rather than hyphen

      -
      - -
      -
      -format_data(value)
      -

      return a formatted string representation of a number

      -
      - -
      -
      -format_data_short(value)
      -

      return a short formatted string representation of a number

      -
      - -
      -
      -get_offset()
      -

      Return scientific notation, plus offset

      -
      - -
      -
      -get_useLocale()
      -
      - -
      -
      -get_useOffset()
      -
      - -
      -
      -pprint_val(x)
      -
      - -
      -
      -set_locs(locs)
      -

      set the locations of the ticks

      -
      - -
      -
      -set_powerlimits(lims)
      -

      Sets size thresholds for scientific notation.

      -

      e.g., formatter.set_powerlimits((-3, 4)) sets the pre-2007 default -in which scientific notation is used for numbers less than 1e-3 or -greater than 1e4. -See also set_scientific().

      -
      - -
      -
      -set_scientific(b)
      -

      True or False to turn scientific notation on or off -see also set_powerlimits()

      -
      - -
      -
      -set_useLocale(val)
      -
      - -
      -
      -set_useOffset(val)
      -
      - -
      -
      -useLocale
      -
      - -
      -
      -useOffset
      -
      - -
      - -
      -
      -class matplotlib.ticker.LogFormatter(base=10.0, labelOnlyBase=True)
      -

      Bases: matplotlib.ticker.Formatter

      -

      Format values for log axis;

      -

      base is used to locate the decade tick, -which will be the only one to be labeled if labelOnlyBase -is False

      -
      -
      -base(base)
      -

      change the base for labeling - warning: should always match the -base used for LogLocator

      -
      - -
      -
      -format_data(value)
      -
      - -
      -
      -format_data_short(value)
      -

      return a short formatted string representation of a number

      -
      - -
      -
      -label_minor(labelOnlyBase)
      -

      switch on/off minor ticks labeling

      -
      - -
      -
      -pprint_val(x, d)
      -
      - -
      - -
      -
      -class matplotlib.ticker.LogFormatterExponent(base=10.0, labelOnlyBase=True)
      -

      Bases: matplotlib.ticker.LogFormatter

      -

      Format values for log axis; using exponent = log_base(value)

      -

      base is used to locate the decade tick, -which will be the only one to be labeled if labelOnlyBase -is False

      -
      - -
      -
      -class matplotlib.ticker.LogFormatterMathtext(base=10.0, labelOnlyBase=True)
      -

      Bases: matplotlib.ticker.LogFormatter

      -

      Format values for log axis; using exponent = log_base(value)

      -

      base is used to locate the decade tick, -which will be the only one to be labeled if labelOnlyBase -is False

      -
      - -
      -
      -class matplotlib.ticker.Locator
      -

      Bases: matplotlib.ticker.TickHelper

      -

      Determine the tick locations;

      -

      Note, you should not use the same locator between different -Axis because the locator stores references to -the Axis data and view limits

      -
      -
      -MAXTICKS = 1000
      -
      - -
      -
      -autoscale()
      -

      autoscale the view limits

      -
      - -
      -
      -pan(numsteps)
      -

      Pan numticks (can be positive or negative)

      -
      - -
      -
      -raise_if_exceeds(locs)
      -

      raise a RuntimeError if Locator attempts to create more than -MAXTICKS locs

      -
      - -
      -
      -refresh()
      -

      refresh internal information based on current lim

      -
      - -
      -
      -tick_values(vmin, vmax)
      -

      Return the values of the located ticks given vmin and vmax.

      -
      -

      Note

      -

      To get tick locations with the vmin and vmax values defined -automatically for the associated axis simply call -the Locator instance:

      -
      >>> print(type(loc))
      -<type 'Locator'>
      ->>> print(loc())
      -[1, 2, 3, 4]
      -
      -
      -
      -
      - -
      -
      -view_limits(vmin, vmax)
      -

      select a scale for the range from vmin to vmax

      -

      Normally this method is overridden by subclasses to -change locator behaviour.

      -
      - -
      -
      -zoom(direction)
      -

      Zoom in/out on axis; if direction is >0 zoom in, else zoom out

      -
      - -
      - -
      -
      -class matplotlib.ticker.IndexLocator(base, offset)
      -

      Bases: matplotlib.ticker.Locator

      -

      Place a tick on every multiple of some base number of points -plotted, eg on every 5th point. It is assumed that you are doing -index plotting; ie the axis is 0, len(data). This is mainly -useful for x ticks.

      -

      place ticks on the i-th data points where (i-offset)%base==0

      -
      -
      -tick_values(vmin, vmax)
      -
      - -
      - -
      -
      -class matplotlib.ticker.FixedLocator(locs, nbins=None)
      -

      Bases: matplotlib.ticker.Locator

      -

      Tick locations are fixed. If nbins is not None, -the array of possible positions will be subsampled to -keep the number of ticks <= nbins +1. -The subsampling will be done so as to include the smallest -absolute value; for example, if zero is included in the -array of possibilities, then it is guaranteed to be one of -the chosen ticks.

      -
      -
      -tick_values(vmin, vmax)
      -

      ” -Return the locations of the ticks.

      -
      -

      Note

      -

      Because the values are fixed, vmin and vmax are not used in this -method.

      -
      -
      - -
      - -
      -
      -class matplotlib.ticker.NullLocator
      -

      Bases: matplotlib.ticker.Locator

      -

      No ticks

      -
      -
      -tick_values(vmin, vmax)
      -

      ” -Return the locations of the ticks.

      -
      -

      Note

      -

      Because the values are Null, vmin and vmax are not used in this -method.

      -
      -
      - -
      - -
      -
      -class matplotlib.ticker.LinearLocator(numticks=None, presets=None)
      -

      Bases: matplotlib.ticker.Locator

      -

      Determine the tick locations

      -

      The first time this function is called it will try to set the -number of ticks to make a nice tick partitioning. Thereafter the -number of ticks will be fixed so that interactive navigation will -be nice

      -

      Use presets to set locs based on lom. A dict mapping vmin, vmax->locs

      -
      -
      -tick_values(vmin, vmax)
      -
      - -
      -
      -view_limits(vmin, vmax)
      -

      Try to choose the view limits intelligently

      -
      - -
      - -
      -
      -class matplotlib.ticker.LogLocator(base=10.0, subs=[1.0], numdecs=4, numticks=15)
      -

      Bases: matplotlib.ticker.Locator

      -

      Determine the tick locations for log axes

      -

      place ticks on the location= base**i*subs[j]

      -
      -
      -base(base)
      -

      set the base of the log scaling (major tick every base**i, i integer)

      -
      - -
      -
      -subs(subs)
      -

      set the minor ticks the log scaling every base**i*subs[j]

      -
      - -
      -
      -tick_values(vmin, vmax)
      -
      - -
      -
      -view_limits(vmin, vmax)
      -

      Try to choose the view limits intelligently

      -
      - -
      - -
      -
      -class matplotlib.ticker.AutoLocator
      -

      Bases: matplotlib.ticker.MaxNLocator

      -
      - -
      -
      -class matplotlib.ticker.MultipleLocator(base=1.0)
      -

      Bases: matplotlib.ticker.Locator

      -

      Set a tick on every integer that is multiple of base in the -view interval

      -
      -
      -tick_values(vmin, vmax)
      -
      - -
      -
      -view_limits(dmin, dmax)
      -

      Set the view limits to the nearest multiples of base that -contain the data

      -
      - -
      - -
      -
      -class matplotlib.ticker.MaxNLocator(*args, **kwargs)
      -

      Bases: matplotlib.ticker.Locator

      -

      Select no more than N intervals at nice locations.

      -

      Keyword args:

      -
      -
      nbins
      -
      Maximum number of intervals; one less than max number of ticks.
      -
      steps
      -
      Sequence of nice numbers starting with 1 and ending with 10; -e.g., [1, 2, 4, 5, 10]
      -
      integer
      -
      If True, ticks will take only integer values.
      -
      symmetric
      -
      If True, autoscaling will result in a range symmetric -about zero.
      -
      prune
      -
      [‘lower’ | ‘upper’ | ‘both’ | None] -Remove edge ticks – useful for stacked or ganged plots -where the upper tick of one axes overlaps with the lower -tick of the axes above it. -If prune==’lower’, the smallest tick will -be removed. If prune==’upper’, the largest tick will be -removed. If prune==’both’, the largest and smallest ticks -will be removed. If prune==None, no ticks will be removed.
      -
      -
      -
      -bin_boundaries(vmin, vmax)
      -
      - -
      -
      -default_params = {'trim': True, 'nbins': 10, 'steps': None, 'prune': None, 'integer': False, 'symmetric': False}
      -
      - -
      -
      -set_params(**kwargs)
      -
      - -
      -
      -tick_values(vmin, vmax)
      -
      - -
      -
      -view_limits(dmin, dmax)
      -
      - -
      - -
      -
      -class matplotlib.ticker.AutoMinorLocator(n=None)
      -

      Bases: matplotlib.ticker.Locator

      -

      Dynamically find minor tick positions based on the positions of -major ticks. Assumes the scale is linear and major ticks are -evenly spaced.

      -

      n is the number of subdivisions of the interval between -major ticks; e.g., n=2 will place a single minor tick midway -between major ticks.

      -

      If n is omitted or None, it will be set to 5 or 4.

      -
      -
      -tick_values(vmin, vmax)
      -
      - -
      - -
      -
      -
      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/api/tight_layout_api.html b/dev/api/tight_layout_api.html deleted file mode 100644 index 83c3d2b2464..00000000000 --- a/dev/api/tight_layout_api.html +++ /dev/null @@ -1,258 +0,0 @@ - - - - - - - - tight_layout — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      Table Of Contents

      - - -

      Previous topic

      -

      ticker

      -

      Next topic

      -

      triangular grids

      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      tight_layout

      -
      -

      matplotlib.tight_layout

      -

      This module provides routines to adjust subplot params so that subplots are -nicely fit in the figure. In doing so, only axis labels, tick labels and axes -titles are currently considered.

      -

      Internally, it assumes that the margins (left_margin, etc.) which are -differences between ax.get_tightbbox and ax.bbox are independent of axes -position. This may fail if Axes.adjustable is datalim. Also, This will fail -for some cases (for example, left or right margin is affected by xlabel).

      -
      -
      -matplotlib.tight_layout.auto_adjust_subplotpars(fig, renderer, nrows_ncols, num1num2_list, subplot_list, ax_bbox_list=None, pad=1.08, h_pad=None, w_pad=None, rect=None)
      -

      Return a dictionary of subplot parameters so that spacing between -subplots are adjusted. Note that this function ignore geometry -information of subplot itself, but uses what is given by -nrows_ncols and num1num2_list parameteres. Also, the results could be -incorrect if some subplots have adjustable=datalim.

      -

      Parameters:

      -
      -
      nrows_ncols
      -
      number of rows and number of columns of the grid.
      -
      num1num2_list
      -
      list of numbers specifying the area occupied by the subplot
      -
      subplot_list
      -
      list of subplots that will be used to calcuate optimal subplot_params.
      -
      pad : float
      -
      padding between the figure edge and the edges of subplots, as a fraction -of the font-size.
      -
      h_pad, w_pad : float
      -
      -
      padding (height/width) between edges of adjacent subplots.
      -
      Defaults to pad_inches.
      -
      -
      -
      rect
      -
      [left, bottom, right, top] in normalized (0, 1) figure coordinates.
      -
      -
      - -
      -
      -matplotlib.tight_layout.get_renderer(fig)
      -
      - -
      -
      -matplotlib.tight_layout.get_subplotspec_list(axes_list, grid_spec=None)
      -

      Return a list of subplotspec from the given list of axes. For an -instance of axes that does not support subplotspec, None is -inserted in the list.

      -

      If grid_spec is given, None is inserted for those not from -the given grid_spec.

      -
      - -
      -
      -matplotlib.tight_layout.get_tight_layout_figure(fig, axes_list, subplotspec_list, renderer, pad=1.08, h_pad=None, w_pad=None, rect=None)
      -

      Return subplot parameters for tight-layouted-figure with specified -padding.

      -

      Parameters:

      -
      -

      fig : figure instance

      -

      axes_list : a list of axes

      -
      -
      subplotspec_list : a list of subplotspec associated with each
      -
      axes in axes_list
      -
      -

      renderer : renderer instance

      -
      -
      pad : float
      -
      padding between the figure edge and the edges of subplots, -as a fraction of the font-size.
      -
      h_pad, w_pad : float
      -
      padding (height/width) between edges of adjacent subplots. -Defaults to pad_inches.
      -
      rect : if rect is given, it is interpreted as a rectangle
      -
      (left, bottom, right, top) in the normalized figure -coordinate that the whole subplots area (including -labels) will fit into. Default is (0, 0, 1, 1).
      -
      -
      -
      - -
      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/api/tri_api.html b/dev/api/tri_api.html deleted file mode 100644 index 0cff6968b1e..00000000000 --- a/dev/api/tri_api.html +++ /dev/null @@ -1,908 +0,0 @@ - - - - - - - - triangular grids — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      Table Of Contents

      - - -

      Previous topic

      -

      tight_layout

      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      triangular grids

      -
      -

      matplotlib.tri

      -

      Unstructured triangular grid functions.

      -
      -
      -class matplotlib.tri.Triangulation(x, y, triangles=None, mask=None)
      -

      An unstructured triangular grid consisting of npoints points and -ntri triangles. The triangles can either be specified by the user -or automatically generated using a Delaunay triangulation.

      -

      Read-only attributes:

      -
      -
      -
      x: array of shape (npoints).
      -
      x-coordinates of grid points.
      -
      y: array of shape (npoints).
      -
      y-coordinates of grid points.
      -
      triangles: integer array of shape (ntri,3).
      -
      For each triangle, the indices of the three points that make -up the triangle, ordered in an anticlockwise manner.
      -
      mask: optional boolean array of shape (ntri).
      -
      Which triangles are masked out.
      -
      edges: integer array of shape (?,2).
      -
      All edges of non-masked triangles. Each edge is the start -point index and end point index. Each edge (start,end and -end,start) appears only once.
      -
      neighbors: integer array of shape (ntri,3).
      -
      For each triangle, the indices of the three triangles that -share the same edges, or -1 if there is no such neighboring -triangle. neighbors[i,j] is the triangle that is the neighbor -to the edge from point index triangles[i,j] to point index -triangles[i,(j+1)%3].
      -
      -
      -

      For a Triangulation to be valid it must not have duplicate points, -triangles formed from colinear points, or overlapping triangles.

      -
      -
      -calculate_plane_coefficients(z)
      -

      Calculate plane equation coefficients for all unmasked triangles from -the point (x,y) coordinates and specified z-array of shape (npoints). -Returned array has shape (npoints,3) and allows z-value at (x,y) -position in triangle tri to be calculated using -z = array[tri,0]*x + array[tri,1]*y + array[tri,2].

      -
      - -
      -
      -static get_from_args_and_kwargs(*args, **kwargs)
      -

      Return a Triangulation object from the args and kwargs, and -the remaining args and kwargs with the consumed values removed.

      -

      There are two alternatives: either the first argument is a -Triangulation object, in which case it is returned, or the args -and kwargs are sufficient to create a new Triangulation to -return. In the latter case, see Triangulation.__init__ for -the possible args and kwargs.

      -
      - -
      -
      -get_masked_triangles()
      -

      Return an array of triangles that are not masked.

      -
      - -
      -
      -get_trifinder()
      -

      Return the default matplotlib.tri.TriFinder of this -triangulation, creating it if necessary. This allows the same -TriFinder object to be easily shared.

      -
      - -
      -
      -set_mask(mask)
      -

      Set or clear the mask array. This is either None, or a boolean -array of shape (ntri).

      -
      - -
      - -
      -
      -class matplotlib.tri.TriFinder(triangulation)
      -

      Abstract base class for classes used to find the triangles of a -Triangulation in which (x,y) points lie.

      -

      Rather than instantiate an object of a class derived from TriFinder, it is -usually better to use the function -matplotlib.tri.Triangulation.get_trifinder().

      -

      Derived classes implement __call__(x,y) where x,y are array_like point -coordinates of the same shape.

      -
      - -
      -
      -class matplotlib.tri.TrapezoidMapTriFinder(triangulation)
      -

      Bases: matplotlib.tri.trifinder.TriFinder

      -

      TriFinder class implemented using the trapezoid -map algorithm from the book “Computational Geometry, Algorithms and -Applications”, second edition, by M. de Berg, M. van Kreveld, M. Overmars -and O. Schwarzkopf.

      -

      The triangulation must be valid, i.e. it must not have duplicate points, -triangles formed from colinear points, or overlapping triangles. The -algorithm has some tolerance to triangles formed from colinear points, but -this should not be relied upon.

      -
      -
      -__call__(x, y)
      -

      Return an array containing the indices of the triangles in which the -specified x,y points lie, or -1 for points that do not lie within a -triangle.

      -

      x, y are array_like x and y coordinates of the same shape and any -number of dimensions.

      -

      Returns integer array with the same shape and x and y.

      -
      - -
      - -
      -
      -class matplotlib.tri.TriInterpolator(triangulation, z, trifinder=None)
      -

      Abstract base class for classes used to perform interpolation on -triangular grids.

      -

      Derived classes implement the following methods:

      -
      -
        -
      • __call__(x, y) , -where x, y are array_like point coordinates of the same shape, and -that returns a masked array of the same shape containing the -interpolated z-values.
      • -
      • gradient(x, y) , -where x, y are array_like point coordinates of the same -shape, and that returns a list of 2 masked arrays of the same shape -containing the 2 derivatives of the interpolator (derivatives of -interpolated z values with respect to x and y).
      • -
      -
      -
      - -
      -
      -class matplotlib.tri.LinearTriInterpolator(triangulation, z, trifinder=None)
      -

      Bases: matplotlib.tri.triinterpolate.TriInterpolator

      -

      A LinearTriInterpolator performs linear interpolation on a triangular grid.

      -

      Each triangle is represented by a plane so that an interpolated value at -point (x,y) lies on the plane of the triangle containing (x,y). -Interpolated values are therefore continuous across the triangulation, but -their first derivatives are discontinuous at edges between triangles.

      - --- - - - -
      Parameters :

      triangulation : Triangulation object

      -
      -

      The triangulation to interpolate over.

      -
      -

      z : array_like of shape (npoints,)

      -
      -

      Array of values, defined at grid points, to interpolate between.

      -
      -

      trifinder : TriFinder object, optional

      -
      -

      If this is not specified, the Triangulation’s default TriFinder will -be used by calling -matplotlib.tri.Triangulation.get_trifinder().

      -
      -
      -

      Methods

      - ----- - - - - - - - - - - -
      __call__ (x, y)Returns interpolated values at x,y points 
      gradient (x, y)Returns interpolated derivatives at x,y points 
      -
      -
      -__call__(x, y)
      -

      Returns a masked array containing interpolated values at the specified -x,y points.

      - --- - - - - - -
      Parameters :

      x, y : array-like

      -
      -

      x and y coordinates of the same shape and any number of -dimensions.

      -
      -
      Returns :

      z : np.ma.array

      -
      -

      Masked array of the same shape as x and y ; values -corresponding to (x, y) points outside of the triangulation -are masked out.

      -
      -
      -
      - -
      -
      -gradient(x, y)
      -

      Returns a list of 2 masked arrays containing interpolated derivatives -at the specified x,y points.

      - --- - - - - - -
      Parameters :

      x, y : array-like

      -
      -

      x and y coordinates of the same shape and any number of -dimensions.

      -
      -
      Returns :

      dzdx, dzdy : np.ma.array

      -
      -

      2 masked arrays of the same shape as x and y ; values -corresponding to (x,y) points outside of the triangulation -are masked out. -The first returned array contains the values of - and the second those of -.

      -
      -
      -
      - -
      - -
      -
      -class matplotlib.tri.CubicTriInterpolator(triangulation, z, kind='min_E', trifinder=None, dz=None)
      -

      Bases: matplotlib.tri.triinterpolate.TriInterpolator

      -

      A CubicTriInterpolator performs cubic interpolation on triangular grids.

      -

      In one-dimension - on a segment - a cubic interpolating function is -defined by the values of the function and its derivative at both ends. -This is almost the same in 2-d inside a triangle, except that the values -of the function and its 2 derivatives have to be defined at each triangle -node.

      -

      The CubicTriInterpolator takes the value of the function at each node - -provided by the user - and internally computes the value of the -derivatives, resulting in a smooth interpolation. -(As a special feature, the user can also impose the value of the -derivatives at each node, but this is not supposed to be the common -usage.)

      - --- - - - -
      Parameters :

      triangulation : Triangulation object

      -
      -

      The triangulation to interpolate over.

      -
      -

      z : array_like of shape (npoints,)

      -
      -

      Array of values, defined at grid points, to interpolate between.

      -
      -

      kind : {‘min_E’, ‘geom’, ‘user’}, optional

      -
      -

      Choice of the smoothing algorithm, in order to compute -the interpolant derivatives (defaults to ‘min_E’):

      -
      -
        -
      • if ‘min_E’: (default) The derivatives at each node is computed -to minimize a bending energy.
      • -
      • if ‘geom’: The derivatives at each node is computed as a -weighted average of relevant triangle normals. To be used for -speed optimization (large grids).
      • -
      • if ‘user’: The user provides the argument dz, no computation -is hence needed.
      • -
      -
      -
      -

      trifinder : TriFinder object, optional

      -
      -

      If not specified, the Triangulation’s default TriFinder will -be used by calling -matplotlib.tri.Triangulation.get_trifinder().

      -
      -

      dz : tuple of array_likes (dzdx, dzdy), optional

      -
      -

      Used only if kind =’user’. In this case dz must be provided as -(dzdx, dzdy) where dzdx, dzdy are arrays of the same shape as z and -are the interpolant first derivatives at the triangulation points.

      -
      -
      -

      Notes

      -

      This note is a bit technical and details the way a -CubicTriInterpolator computes a cubic -interpolation.

      -

      The interpolation is based on a Clough-Tocher subdivision scheme of -the triangulation mesh (to make it clearer, each triangle of the -grid will be divided in 3 child-triangles, and on each child triangle -the interpolated function is a cubic polynomial of the 2 coordinates). -This technique originates from FEM (Finite Element Method) analysis; -the element used is a reduced Hsieh-Clough-Tocher (HCT) -element. Its shape functions are described in [R1]. -The assembled function is guaranteed to be C1-smooth, i.e. it is -continuous and its first derivatives are also continuous (this -is easy to show inside the triangles but is also true when crossing the -edges).

      -

      In the default case (kind =’min_E’), the interpolant minimizes a -curvature energy on the functional space generated by the HCT element -shape functions - with imposed values but arbitrary derivatives at each -node. The minimized functional is the integral of the so-called total -curvature (implementation based on an algorithm from [R2] - PCG sparse -solver):

      -
      -
      -

      If the case kind =’geom’ is chosen by the user, a simple geometric -approximation is used (weighted average of the triangle normal -vectors), which could improve speed on very large grids.

      -

      References

      - - - - - -
      [R1](1, 2) Michel Bernadou, Kamal Hassan, “Basis functions for general -Hsieh-Clough-Tocher triangles, complete or reduced.”, -International Journal for Numerical Methods in Engineering, -17(5):784 - 789. 2.01.
      - - - - - -
      [R2](1, 2) C.T. Kelley, “Iterative Methods for Optimization”.
      -

      Methods

      - ----- - - - - - - - - - - -
      __call__ (x, y)Returns interpolated values at x,y points 
      gradient (x, y)Returns interpolated derivatives at x,y points 
      -
      -
      -__call__(x, y)
      -

      Returns a masked array containing interpolated values at the specified -x,y points.

      - --- - - - - - -
      Parameters :

      x, y : array-like

      -
      -

      x and y coordinates of the same shape and any number of -dimensions.

      -
      -
      Returns :

      z : np.ma.array

      -
      -

      Masked array of the same shape as x and y ; values -corresponding to (x, y) points outside of the triangulation -are masked out.

      -
      -
      -
      - -
      -
      -gradient(x, y)
      -

      Returns a list of 2 masked arrays containing interpolated derivatives -at the specified x,y points.

      - --- - - - - - -
      Parameters :

      x, y : array-like

      -
      -

      x and y coordinates of the same shape and any number of -dimensions.

      -
      -
      Returns :

      dzdx, dzdy : np.ma.array

      -
      -

      2 masked arrays of the same shape as x and y ; values -corresponding to (x,y) points outside of the triangulation -are masked out. -The first returned array contains the values of - and the second those of -.

      -
      -
      -

      Examples

      -

      An example of effective application is shown below (plot of the -direction of the vector field derivated from a known potential field):

      -

      (Source code, png, hires.png, pdf)

      -
      -../_images/trigradient_demo.png -
      -
      - -
      - -
      -
      -class matplotlib.tri.TriRefiner(triangulation)
      -

      Abstract base class for classes implementing mesh refinement.

      -

      A TriRefiner encapsulates a Triangulation object and provides tools for -mesh refinement and interpolation.

      -

      Derived classes must implements:

      -
      -
        -
      • refine_triangulation(return_tri_index=False, **kwargs) , where -the optional keyword arguments kwargs are defined in each -TriRefiner concrete implementation, and which returns :

        -
        -
          -
        • a refined triangulation
        • -
        • optionally (depending on return_tri_index), for each -point of the refined triangulation: the index of -the initial triangulation triangle to which it belongs.
        • -
        -
        -
      • -
      • refine_field(z, triinterpolator=None, **kwargs) , where:

        -
        -
          -
        • z array of field values (to refine) defined at the base -triangulation nodes
        • -
        • triinterpolator is a -TriInterpolator (optional)
        • -
        • the other optional keyword arguments kwargs are defined in -each TriRefiner concrete implementation
        • -
        -
        -

        and which returns (as a tuple) a refined triangular mesh and the -interpolated values of the field at the refined triangulation nodes.

        -
      • -
      -
      -
      - -
      -
      -class matplotlib.tri.UniformTriRefiner(triangulation)
      -

      Bases: matplotlib.tri.trirefine.TriRefiner

      -

      Uniform mesh refinement by recursive subdivisions.

      - --- - - - -
      Parameters :

      triangulation : Triangulation

      -
      -

      The encapsulated triangulation (to be refined)

      -
      -
      -
      -
      -refine_field(z, triinterpolator=None, subdiv=3)
      -

      Refines a field defined on the encapsulated triangulation.

      -

      Returns refi_tri (refined triangulation), refi_z (interpolated -values of the field at the node of the refined triangulation).

      - --- - - - - - -
      Parameters :

      z : 1d-array-like of length n_points

      -
      -

      Values of the field to refine, defined at the nodes of the -encapsulated triangulation. (n_points is the number of points -in the initial triangulation)

      -
      -

      triinterpolator : TriInterpolator, optional

      -
      -

      Interpolator used for field interpolation. If not specified, -a CubicTriInterpolator will -be used.

      -
      -

      subdiv : integer, optional

      -
      -

      Recursion level for the subdivision. Defaults to 3. -Each triangle will be divided into 4**subdiv child triangles.

      -
      -
      Returns :

      refi_tri : Triangulation object

      -
      -

      The returned refined triangulation

      -
      -

      refi_z : 1d array of length: refi_tri node count.

      -
      -

      The returned interpolated field (at refi_tri nodes)

      -
      -
      -

      Examples

      -

      The main application of this method is to plot high-quality -iso-contours on a coarse triangular grid (e.g., triangulation built -from relatively sparse test data):

      -

      (Source code, png, hires.png, pdf)

      -
      -../_images/tricontour_smooth_user.png -
      -
      - -
      -
      -refine_triangulation(return_tri_index=False, subdiv=3)
      -

      Computes an uniformly refined triangulation refi_triangulation of -the encapsulated triangulation.

      -

      This function refines the encapsulated triangulation by splitting each -father triangle into 4 child sub-triangles built on the edges midside -nodes, recursively (level of recursion subdiv). -In the end, each triangle is hence divided into 4**subdiv -child triangles. -The default value for subdiv is 3 resulting in 64 refined -subtriangles for each triangle of the initial triangulation.

      - --- - - - - - -
      Parameters :

      return_tri_index : boolean, optional

      -
      -

      Boolean indicating whether an index table indicating the father -triangle index of each point will be returned. Default value -False.

      -
      -

      subdiv : integer, optional

      -
      -

      Recursion level for the subdivision. Defaults value 3. -Each triangle will be divided into 4**subdiv child triangles.

      -
      -
      Returns :

      refi_triangulation : Triangulation

      -
      -

      The returned refined triangulation

      -
      -

      found_index : array-like of integers

      -
      -

      Index of the initial triangulation containing triangle, for each -point of refi_triangulation. -Returned only if return_tri_index is set to True.

      -
      -
      -
      - -
      - -
      -
      -class matplotlib.tri.TriAnalyzer(triangulation)
      -

      Define basic tools for triangular mesh analysis and improvement.

      -

      A TriAnalizer encapsulates a Triangulation -object and provides basic tools for mesh analysis and mesh improvement.

      - --- - - - -
      Parameters :

      triangulation : Triangulation object

      -
      -

      The encapsulated triangulation to analyze.

      -
      -
      -

      Attributes

      - ---- - - - - - -
      scale_factorsFactors to rescale the triangulation into a unit square.
      -
      -
      -circle_ratios(rescale=True)
      -

      Returns a measure of the triangulation triangles flatness.

      -

      The ratio of the incircle radius over the circumcircle radius is a -widely used indicator of a triangle flatness. -It is always <= 0.5 and == 0.5 only for equilateral -triangles. Circle ratios below 0.01 denote very flat triangles.

      -

      To avoid unduly low values due to a difference of scale between the 2 -axis, the triangular mesh can first be rescaled to fit inside a unit -square with scale_factors (Only if rescale is True, which is -its default value).

      - --- - - - - - -
      Parameters :

      rescale : boolean, optional

      -
      -

      If True, a rescaling will be internally performed (based on -scale_factors, so that the (unmasked) triangles fit -exactly inside a unit square mesh. Default is True.

      -
      -
      Returns :

      circle_ratios : masked array

      -
      -

      Ratio of the incircle radius over the -circumcircle radius, for each ‘rescaled’ triangle of the -encapsulated triangulation. -Values corresponding to masked triangles are masked out.

      -
      -
      -
      - -
      -
      -get_flat_tri_mask(min_circle_ratio=0.01, rescale=True)
      -

      Eliminates excessively flat border triangles from the triangulation.

      -

      Returns a mask new_mask which allows to clean the encapsulated -triangulation from its border-located flat triangles -(according to their circle_ratios()). -This mask is meant to be subsequently applied to the triangulation -using matplotlib.tri.Triangulation.set_mask() . -new_mask is an extension of the initial triangulation mask -in the sense that an initially masked triangle will remain masked.

      -

      The new_mask array is computed recursively ; at each step flat -triangles are removed only if they share a side with the current -mesh border. Thus no new holes in the triangulated domain will be -created.

      - --- - - - - - -
      Parameters :

      min_circle_ratio : float, optional

      -
      -

      Border triangles with incircle/circumcircle radii ratio r/R will -be removed if r/R < min_circle_ratio. Default value: 0.01

      -
      -

      rescale : boolean, optional

      -
      -

      If True, a rescaling will first be internally performed (based on -scale_factors ), so that the (unmasked) triangles fit -exactly inside a unit square mesh. This rescaling accounts for the -difference of scale which might exist between the 2 axis. Default -(and recommended) value is True.

      -
      -
      Returns :

      new_mask : array-like of booleans

      -
      -

      Mask to apply to encapsulated triangulation. -All the initially masked triangles remain masked in the -new_mask.

      -
      -
      -

      Notes

      -

      The rationale behind this function is that a Delaunay -triangulation - of an unstructured set of points - sometimes contains -almost flat triangles at its border, leading to artifacts in plots -(especially for high-resolution contouring). -Masked with computed new_mask, the encapsulated -triangulation would contain no more unmasked border triangles -with a circle ratio below min_circle_ratio, thus improving the -mesh quality for subsequent plots or interpolation.

      -

      Examples

      -

      Please refer to the following illustrating example:

      -

      (Source code, png, hires.png, pdf)

      -
      -../_images/tricontour_smooth_delaunay.png -
      -
      - -
      -
      -scale_factors
      -

      Factors to rescale the triangulation into a unit square.

      -

      Returns k, tuple of 2 scale factors.

      - --- - - - -
      Returns :

      k : tuple of 2 floats (kx, ky)

      -
      -

      Tuple of floats that would rescale the triangulation : -[triangulation.x * kx, triangulation.y * ky] -fits exactly inside a unit square.

      -
      -
      -
      - -
      - -
      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/api/type1font.html b/dev/api/type1font.html deleted file mode 100644 index dd69063d00e..00000000000 --- a/dev/api/type1font.html +++ /dev/null @@ -1,230 +0,0 @@ - - - - - - - - matplotlib.type1font — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      Previous topic

      -

      matplotlib.dviread

      -

      Next topic

      -

      cbook

      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      matplotlib.type1font

      -

      This module contains a class representing a Type 1 font.

      -

      This version reads pfa and pfb files and splits them for embedding in -pdf files. It also supports SlantFont and ExtendFont transformations, -similarly to pdfTeX and friends. There is no support yet for -subsetting.

      -

      Usage:

      -
      >>> font = Type1Font(filename)
      ->>> clear_part, encrypted_part, finale = font.parts
      ->>> slanted_font = font.transform({'slant': 0.167})
      ->>> extended_font = font.transform({'extend': 1.2})
      -
      -
      -

      Sources:

      -
        -
      • Adobe Technical Note #5040, Supporting Downloadable PostScript -Language Fonts.
      • -
      • Adobe Type 1 Font Format, Adobe Systems Incorporated, third printing, -v1.1, 1993. ISBN 0-201-57044-0.
      • -
      -
      -
      -class matplotlib.type1font.Type1Font(input)
      -

      Bases: object

      -

      A class representing a Type-1 font, for use by backends.

      -
      -
      -parts
      -

      A 3-tuple of the cleartext part, the encrypted part, and the -finale of zeros.

      -
      - -
      -
      -prop
      -

      A dictionary of font properties.

      -
      - -

      Initialize a Type-1 font. input can be either the file name of -a pfb file or a 3-tuple of already-decoded Type-1 font parts.

      -
      -
      -parts
      -
      - -
      -
      -prop
      -
      - -
      -
      -transform(effects)
      -

      Transform the font by slanting or extending. effects should -be a dict where effects['slant'] is the tangent of the -angle that the font is to be slanted to the right (so negative -values slant to the left) and effects['extend'] is the -multiplier by which the font is to be extended (so values less -than 1.0 condense). Returns a new Type1Font object.

      -
      - -
      - -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/api/units_api.html b/dev/api/units_api.html deleted file mode 100644 index 924738c11fe..00000000000 --- a/dev/api/units_api.html +++ /dev/null @@ -1,272 +0,0 @@ - - - - - - - - units — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      Table Of Contents

      - - -

      Next topic

      -

      widgets

      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      units

      -
      -

      matplotlib.units

      -

      The classes here provide support for using custom classes with -matplotlib, eg those that do not expose the array interface but know -how to converter themselves to arrays. It also supoprts classes with -units and units conversion. Use cases include converters for custom -objects, eg a list of datetime objects, as well as for objects that -are unit aware. We don’t assume any particular units implementation, -rather a units implementation must provide a ConversionInterface, and -the register with the Registry converter dictionary. For example, -here is a complete implementation which supports plotting with native -datetime objects:

      -
      import matplotlib.units as units
      -import matplotlib.dates as dates
      -import matplotlib.ticker as ticker
      -import datetime
      -
      -class DateConverter(units.ConversionInterface):
      -
      -    @staticmethod
      -    def convert(value, unit, axis):
      -        'convert value to a scalar or array'
      -        return dates.date2num(value)
      -
      -    @staticmethod
      -    def axisinfo(unit, axis):
      -        'return major and minor tick locators and formatters'
      -        if unit!='date': return None
      -        majloc = dates.AutoDateLocator()
      -        majfmt = dates.AutoDateFormatter(majloc)
      -        return AxisInfo(majloc=majloc,
      -                        majfmt=majfmt,
      -                        label='date')
      -
      -    @staticmethod
      -    def default_units(x, axis):
      -        'return the default unit for x or None'
      -        return 'date'
      -
      -# finally we register our object type with a converter
      -units.registry[datetime.date] = DateConverter()
      -
      -
      -
      -
      -class matplotlib.units.AxisInfo(majloc=None, minloc=None, majfmt=None, minfmt=None, label=None, default_limits=None)
      -

      information to support default axis labeling and tick labeling, and -default limits

      -

      majloc and minloc: TickLocators for the major and minor ticks -majfmt and minfmt: TickFormatters for the major and minor ticks -label: the default axis label -default_limits: the default min, max of the axis if no data is present -If any of the above are None, the axis will simply use the default

      -
      - -
      -
      -class matplotlib.units.ConversionInterface
      -

      The minimal interface for a converter to take custom instances (or -sequences) and convert them to values mpl can use

      -
      -
      -static axisinfo(unit, axis)
      -

      return an units.AxisInfo instance for axis with the specified units

      -
      - -
      -
      -static convert(obj, unit, axis)
      -

      convert obj using unit for the specified axis. If obj is a sequence, -return the converted sequence. The ouput must be a sequence of scalars -that can be used by the numpy array layer

      -
      - -
      -
      -static default_units(x, axis)
      -

      return the default unit for x or None for the given axis

      -
      - -
      -
      -static is_numlike(x)
      -

      The matplotlib datalim, autoscaling, locators etc work with -scalars which are the units converted to floats given the -current unit. The converter may be passed these floats, or -arrays of them, even when units are set. Derived conversion -interfaces may opt to pass plain-ol unitless numbers through -the conversion interface and this is a helper function for -them.

      -
      - -
      - -
      -
      -class matplotlib.units.Registry
      -

      Bases: dict

      -

      register types with conversion interface

      -
      -
      -get_converter(x)
      -

      get the converter interface instance for x, or None

      -
      - -
      - -
      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/api/widgets_api.html b/dev/api/widgets_api.html deleted file mode 100644 index 241d5ca23ba..00000000000 --- a/dev/api/widgets_api.html +++ /dev/null @@ -1,905 +0,0 @@ - - - - - - - - widgets — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      Table Of Contents

      - - -

      Previous topic

      -

      units

      -

      Next topic

      -

      Glossary

      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      widgets

      -
      -

      matplotlib.widgets

      -
      -

      GUI Neutral widgets

      -

      Widgets that are designed to work for any of the GUI backends. -All of these widgets require you to predefine an matplotlib.axes.Axes -instance and pass that as the first arg. matplotlib doesn’t try to -be too smart with respect to layout – you will have to figure out how -wide and tall you want your Axes to be to accommodate your widget.

      -
      -
      -class matplotlib.widgets.AxesWidget(ax)
      -

      Bases: matplotlib.widgets.Widget

      -

      Widget that is connected to a single Axes.

      -

      Attributes:

      -
      -
      ax : Axes
      -
      The parent axes for the widget
      -
      canvas : FigureCanvasBase subclass
      -
      The parent figure canvas for the widget.
      -
      active : bool
      -
      If False, the widget does not respond to events.
      -
      -
      -
      -connect_event(event, callback)
      -

      Connect callback with an event.

      -

      This should be used in lieu of figure.canvas.mpl_connect since this -function stores call back ids for later clean up.

      -
      - -
      -
      -disconnect_events()
      -

      Disconnect all events created by this widget.

      -
      - -
      -
      -ignore(event)
      -

      Return True if event should be ignored.

      -

      This method (or a version of it) should be called at the beginning -of any event callback.

      -
      - -
      - -
      -
      -class matplotlib.widgets.Button(ax, label, image=None, color='0.85', hovercolor='0.95')
      -

      Bases: matplotlib.widgets.AxesWidget

      -

      A GUI neutral button

      -

      The following attributes are accessible

      -
      -
      -
      ax
      -
      The matplotlib.axes.Axes the button renders into.
      -
      label
      -
      A matplotlib.text.Text instance.
      -
      color
      -
      The color of the button when not hovering.
      -
      hovercolor
      -
      The color of the button when hovering.
      -
      -
      -

      Call on_clicked() to connect to the button

      -
      -
      ax
      -
      The matplotlib.axes.Axes instance the button -will be placed into.
      -
      label
      -
      The button text. Accepts string.
      -
      image
      -
      The image to place in the button, if not None. -Can be any legal arg to imshow (numpy array, -matplotlib Image instance, or PIL image).
      -
      color
      -
      The color of the button when not activated
      -
      hovercolor
      -
      The color of the button when the mouse is over it
      -
      -
      -
      -disconnect(cid)
      -

      remove the observer with connection id cid

      -
      - -
      -
      -on_clicked(func)
      -

      When the button is clicked, call this func with event

      -

      A connection id is returned which can be used to disconnect

      -
      - -
      - -
      -
      -class matplotlib.widgets.CheckButtons(ax, labels, actives)
      -

      Bases: matplotlib.widgets.AxesWidget

      -

      A GUI neutral radio button

      -

      The following attributes are exposed

      -
      -
      -
      ax
      -
      The matplotlib.axes.Axes instance the buttons are -located in
      -
      labels
      -
      List of matplotlib.text.Text instances
      -
      lines
      -
      List of (line1, line2) tuples for the x’s in the check boxes. -These lines exist for each box, but have set_visible(False) -when its box is not checked.
      -
      rectangles
      -
      List of matplotlib.patches.Rectangle instances
      -
      -
      -

      Connect to the CheckButtons with the on_clicked() method

      -

      Add check buttons to matplotlib.axes.Axes instance ax

      -
      -
      labels
      -
      A len(buttons) list of labels as strings
      -
      actives
      -
      -
      A len(buttons) list of booleans indicating whether
      -
      the button is active
      -
      -
      -
      -
      -
      -disconnect(cid)
      -

      remove the observer with connection id cid

      -
      - -
      -
      -on_clicked(func)
      -

      When the button is clicked, call func with button label

      -

      A connection id is returned which can be used to disconnect

      -
      - -
      - -
      -
      -class matplotlib.widgets.Cursor(ax, horizOn=True, vertOn=True, useblit=False, **lineprops)
      -

      Bases: matplotlib.widgets.AxesWidget

      -

      A horizontal and vertical line span the axes that and move with -the pointer. You can turn off the hline or vline spectively with -the attributes

      -
      -
      -
      horizOn
      -
      Controls the visibility of the horizontal line
      -
      vertOn
      -
      Controls the visibility of the horizontal line
      -
      -
      -

      and the visibility of the cursor itself with the visible attribute

      -

      Add a cursor to ax. If useblit=True, use the backend- -dependent blitting features for faster updates (GTKAgg -only for now). lineprops is a dictionary of line properties.

      -

      (Source code, png, hires.png, pdf)

      -
      -../_images/cursor.png -
      -
      -
      -clear(event)
      -

      clear the cursor

      -
      - -
      -
      -onmove(event)
      -

      on mouse motion draw the cursor if visible

      -
      - -
      - -
      -
      -class matplotlib.widgets.HorizontalSpanSelector(ax, onselect, **kwargs)
      -

      Bases: matplotlib.widgets.SpanSelector

      -
      - -
      -
      -class matplotlib.widgets.Lasso(ax, xy, callback=None, useblit=True)
      -

      Bases: matplotlib.widgets.AxesWidget

      -

      Selection curve of an arbitrary shape.

      -

      The selected path can be used in conjunction with -contains_point() to select data points -from an image.

      -

      Unlike LassoSelector, this must be initialized with a starting -point xy, and the Lasso events are destroyed upon release.

      -

      Parameters:

      -
      -
      ax : Axes
      -
      The parent axes for the widget.
      -
      xy : array
      -
      Coordinates of the start of the lasso.
      -
      callback : function
      -
      Whenever the lasso is released, the callback function is called and -passed the vertices of the selected path.
      -
      -
      -
      -onmove(event)
      -
      - -
      -
      -onrelease(event)
      -
      - -
      - -
      -
      -class matplotlib.widgets.LassoSelector(ax, onselect=None, useblit=True, lineprops=None)
      -

      Bases: matplotlib.widgets.AxesWidget

      -

      Selection curve of an arbitrary shape.

      -

      The selected path can be used in conjunction with -contains_point() to select -data points from an image.

      -

      In contrast to Lasso, LassoSelector is written with an interface -similar to RectangleSelector and SpanSelector and will -continue to interact with the axes until disconnected.

      -

      Parameters:

      -
      -
      ax : Axes
      -
      The parent axes for the widget.
      -
      onselect : function
      -
      Whenever the lasso is released, the onselect function is called and -passed the vertices of the selected path.
      -
      -

      Example usage:

      -
      ax = subplot(111)
      -ax.plot(x,y)
      -
      -def onselect(verts):
      -    print verts
      -lasso = LassoSelector(ax, onselect)
      -
      -
      -
      -
      -ignore(event)
      -
      - -
      -
      -onmove(event)
      -
      - -
      -
      -onpress(event)
      -
      - -
      -
      -onrelease(event)
      -
      - -
      -
      -update_background(event)
      -
      - -
      - -
      -
      -class matplotlib.widgets.LockDraw
      -

      Some widgets, like the cursor, draw onto the canvas, and this is not -desirable under all circumstances, like when the toolbar is in -zoom-to-rect mode and drawing a rectangle. The module level “lock” -allows someone to grab the lock and prevent other widgets from -drawing. Use matplotlib.widgets.lock(someobj) to pr

      -
      -
      -available(o)
      -

      drawing is available to o

      -
      - -
      -
      -isowner(o)
      -

      Return True if o owns this lock

      -
      - -
      -
      -locked()
      -

      Return True if the lock is currently held by an owner

      -
      - -
      -
      -release(o)
      -

      release the lock

      -
      - -
      - -
      -
      -class matplotlib.widgets.MultiCursor(canvas, axes, useblit=True, horizOn=False, vertOn=True, **lineprops)
      -

      Bases: matplotlib.widgets.Widget

      -

      Provide a vertical (default) and/or horizontal line cursor shared between -multiple axes

      -

      Example usage:

      -
      from matplotlib.widgets import MultiCursor
      -from pylab import figure, show, np
      -
      -t = np.arange(0.0, 2.0, 0.01)
      -s1 = np.sin(2*np.pi*t)
      -s2 = np.sin(4*np.pi*t)
      -fig = figure()
      -ax1 = fig.add_subplot(211)
      -ax1.plot(t, s1)
      -
      -ax2 = fig.add_subplot(212, sharex=ax1)
      -ax2.plot(t, s2)
      -
      -multi = MultiCursor(fig.canvas, (ax1, ax2), color='r', lw=1,
      -                    horizOn=False, vertOn=True)
      -show()
      -
      -
      -
      -
      -clear(event)
      -

      clear the cursor

      -
      - -
      -
      -onmove(event)
      -
      - -
      - -
      -
      -class matplotlib.widgets.RadioButtons(ax, labels, active=0, activecolor='blue')
      -

      Bases: matplotlib.widgets.AxesWidget

      -

      A GUI neutral radio button

      -

      The following attributes are exposed

      -
      -
      -
      ax
      -
      The matplotlib.axes.Axes instance the buttons are in
      -
      activecolor
      -
      The color of the button when clicked
      -
      labels
      -
      A list of matplotlib.text.Text instances
      -
      circles
      -
      A list of matplotlib.patches.Circle instances
      -
      -
      -

      Connect to the RadioButtons with the on_clicked() method

      -

      Add radio buttons to matplotlib.axes.Axes instance ax

      -
      -
      labels
      -
      A len(buttons) list of labels as strings
      -
      active
      -
      The index into labels for the button that is active
      -
      activecolor
      -
      The color of the button when clicked
      -
      -
      -
      -disconnect(cid)
      -

      remove the observer with connection id cid

      -
      - -
      -
      -on_clicked(func)
      -

      When the button is clicked, call func with button label

      -

      A connection id is returned which can be used to disconnect

      -
      - -
      - -
      -
      -class matplotlib.widgets.RectangleSelector(ax, onselect, drawtype='box', minspanx=None, minspany=None, useblit=False, lineprops=None, rectprops=None, spancoords='data', button=None)
      -

      Bases: matplotlib.widgets.AxesWidget

      -

      Select a min/max range of the x axes for a matplotlib Axes

      -

      Example usage:

      -
      from matplotlib.widgets import  RectangleSelector
      -from pylab import *
      -
      -def onselect(eclick, erelease):
      -  'eclick and erelease are matplotlib events at press and release'
      -  print ' startposition : (%f, %f)' % (eclick.xdata, eclick.ydata)
      -  print ' endposition   : (%f, %f)' % (erelease.xdata, erelease.ydata)
      -  print ' used button   : ', eclick.button
      -
      -def toggle_selector(event):
      -    print ' Key pressed.'
      -    if event.key in ['Q', 'q'] and toggle_selector.RS.active:
      -        print ' RectangleSelector deactivated.'
      -        toggle_selector.RS.set_active(False)
      -    if event.key in ['A', 'a'] and not toggle_selector.RS.active:
      -        print ' RectangleSelector activated.'
      -        toggle_selector.RS.set_active(True)
      -
      -x = arange(100)/(99.0)
      -y = sin(x)
      -fig = figure
      -ax = subplot(111)
      -ax.plot(x,y)
      -
      -toggle_selector.RS = RectangleSelector(ax, onselect, drawtype='line')
      -connect('key_press_event', toggle_selector)
      -show()
      -
      -
      -

      Create a selector in ax. When a selection is made, clear -the span and call onselect with:

      -
      onselect(pos_1, pos_2)
      -
      -
      -

      and clear the drawn box/line. The pos_1 and pos_2 are -arrays of length 2 containing the x- and y-coordinate.

      -

      If minspanx is not None then events smaller than minspanx -in x direction are ignored (it’s the same for y).

      -

      The rectangle is drawn with rectprops; default:

      -
      rectprops = dict(facecolor='red', edgecolor = 'black',
      -                 alpha=0.5, fill=False)
      -
      -
      -

      The line is drawn with lineprops; default:

      -
      lineprops = dict(color='black', linestyle='-',
      -                 linewidth = 2, alpha=0.5)
      -
      -
      -

      Use drawtype if you want the mouse to draw a line, -a box or nothing between click and actual position by setting

      -

      drawtype = 'line', drawtype='box' or drawtype = 'none'.

      -

      spancoords is one of ‘data’ or ‘pixels’. If ‘data’, minspanx -and minspanx will be interpreted in the same coordinates as -the x and y axis. If ‘pixels’, they are in pixels.

      -

      button is a list of integers indicating which mouse buttons should -be used for rectangle selection. You can also specify a single -integer if only a single button is desired. Default is None, -which does not limit which button can be used.

      -
      -
      Note, typically:
      -
      1 = left mouse button -2 = center mouse button (scroll wheel) -3 = right mouse button
      -
      -
      -
      -get_active()
      -

      Get status of active mode (boolean variable)

      -
      - -
      -
      -ignore(event)
      -

      return True if event should be ignored

      -
      - -
      -
      -onmove(event)
      -

      on motion notify event if box/line is wanted

      -
      - -
      -
      -press(event)
      -

      on button press event

      -
      - -
      -
      -release(event)
      -

      on button release event

      -
      - -
      -
      -set_active(active)
      -

      Use this to activate / deactivate the RectangleSelector -from your program with an boolean parameter active.

      -
      - -
      -
      -update()
      -

      draw using newfangled blit or oldfangled draw depending on -useblit

      -
      - -
      -
      -update_background(event)
      -

      force an update of the background

      -
      - -
      - -
      -
      -class matplotlib.widgets.Slider(ax, label, valmin, valmax, valinit=0.5, valfmt='%1.2f', closedmin=True, closedmax=True, slidermin=None, slidermax=None, dragging=True, **kwargs)
      -

      Bases: matplotlib.widgets.AxesWidget

      -

      A slider representing a floating point range

      -
      -
      The following attributes are defined
      -

      ax : the slider matplotlib.axes.Axes instance

      -

      val : the current slider value

      -
      -
      vline : a matplotlib.lines.Line2D instance
      -
      representing the initial value of the slider
      -
      poly : A matplotlib.patches.Polygon instance
      -
      which is the slider knob
      -
      -

      valfmt : the format string for formatting the slider text

      -
      -
      label : a matplotlib.text.Text instance
      -
      for the slider label
      -
      -

      closedmin : whether the slider is closed on the minimum

      -

      closedmax : whether the slider is closed on the maximum

      -
      -
      slidermin : another slider - if not None, this slider must be
      -
      greater than slidermin
      -
      slidermax : another slider - if not None, this slider must be
      -
      less than slidermax
      -
      -

      dragging : allow for mouse dragging on slider

      -
      -
      -

      Call on_changed() to connect to the slider event

      -

      Create a slider from valmin to valmax in axes ax

      -
      -
      valinit
      -
      The slider initial position
      -
      label
      -
      The slider label
      -
      valfmt
      -
      Used to format the slider value
      -
      closedmin and closedmax
      -
      Indicate whether the slider interval is closed
      -
      slidermin and slidermax
      -
      Used to constrain the value of this slider to the values -of other sliders.
      -
      -

      additional kwargs are passed on to self.poly which is the -matplotlib.patches.Rectangle which draws the slider -knob. See the matplotlib.patches.Rectangle documentation -valid property names (e.g., facecolor, edgecolor, alpha, ...)

      -
      -
      -disconnect(cid)
      -

      remove the observer with connection id cid

      -
      - -
      -
      -on_changed(func)
      -

      When the slider value is changed, call func with the new -slider position

      -

      A connection id is returned which can be used to disconnect

      -
      - -
      -
      -reset()
      -

      reset the slider to the initial value if needed

      -
      - -
      -
      -set_val(val)
      -
      - -
      - -
      -
      -class matplotlib.widgets.SpanSelector(ax, onselect, direction, minspan=None, useblit=False, rectprops=None, onmove_callback=None)
      -

      Bases: matplotlib.widgets.AxesWidget

      -

      Select a min/max range of the x or y axes for a matplotlib Axes

      -

      Example usage:

      -
      ax = subplot(111)
      -ax.plot(x,y)
      -
      -def onselect(vmin, vmax):
      -    print vmin, vmax
      -span = SpanSelector(ax, onselect, 'horizontal')
      -
      -
      -
      -
      onmove_callback is an optional callback that is called on mouse
      -
      move within the span range
      -
      -

      Create a span selector in ax. When a selection is made, clear -the span and call onselect with:

      -
      onselect(vmin, vmax)
      -
      -
      -

      and clear the span.

      -

      direction must be ‘horizontal’ or ‘vertical’

      -

      If minspan is not None, ignore events smaller than minspan

      -
      -
      The span rectangle is drawn with rectprops; default::
      -
      rectprops = dict(facecolor=’red’, alpha=0.5)
      -
      -

      Set the visible attribute to False if you want to turn off -the functionality of the span selector

      -
      -
      -ignore(event)
      -

      return True if event should be ignored

      -
      - -
      -
      -new_axes(ax)
      -
      - -
      -
      -onmove(event)
      -

      on motion notify event

      -
      - -
      -
      -press(event)
      -

      on button press event

      -
      - -
      -
      -release(event)
      -

      on button release event

      -
      - -
      -
      -update()
      -

      Draw using newfangled blit or oldfangled draw depending -on useblit

      -
      - -
      -
      -update_background(event)
      -

      force an update of the background

      -
      - -
      - -
      -
      -class matplotlib.widgets.SubplotTool(targetfig, toolfig)
      -

      Bases: matplotlib.widgets.Widget

      -

      A tool to adjust to subplot params of a matplotlib.figure.Figure

      -
      -
      targetfig
      -
      The figure instance to adjust
      -
      toolfig
      -
      The figure instance to embed the subplot tool into. If -None, a default figure will be created. If you are using -this from the GUI
      -
      -
      -
      -funcbottom(val)
      -
      - -
      -
      -funchspace(val)
      -
      - -
      -
      -funcleft(val)
      -
      - -
      -
      -funcright(val)
      -
      - -
      -
      -functop(val)
      -
      - -
      -
      -funcwspace(val)
      -
      - -
      - -
      -
      -class matplotlib.widgets.Widget
      -

      Bases: object

      -

      Abstract base class for GUI neutral widgets

      -
      -
      -drawon = True
      -
      - -
      -
      -eventson = True
      -
      - -
      - -
      -
      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/citing.html b/dev/citing.html deleted file mode 100644 index 67e6c8954e2..00000000000 --- a/dev/citing.html +++ /dev/null @@ -1,157 +0,0 @@ - - - - - - - - Citing matplotlib — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      - - -
      -
      - -
      -
      -
      -
      - - -

      Citing matplotlib

      -

      -If matplotlib contributes to a project that leads to a scientific publication, -please acknowledge this fact by citing the project. You can use this -BibTeX entry: -

      -
      -@Article{Hunter:2007,
      -  Author    = {Hunter, J. D.},
      -  Title     = {Matplotlib: A 2D graphics environment},
      -  Journal   = {Computing In Science \& Engineering},
      -  Volume    = {9},
      -  Number    = {3},
      -  Pages     = {90--95},
      -  abstract  = {Matplotlib is a 2D graphics package used for Python
      -  for application development, interactive scripting, and
      -  publication-quality image generation across user
      -  interfaces and operating systems.},
      -  publisher = {IEEE COMPUTER SOC},
      -  year      = 2007
      -}
      -
      - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/contents.html b/dev/contents.html deleted file mode 100644 index ff2d5e1f84c..00000000000 --- a/dev/contents.html +++ /dev/null @@ -1,266 +0,0 @@ - - - - - - - - Overview — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      Next topic

      -

      User’s Guide

      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      Overview

      - --- - - - - - -
      Release:1.3.x
      Date:May 21, 2013
      -

      Download PDF

      - -
      -
      -
      - -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/devel/add_new_projection.html b/dev/devel/add_new_projection.html deleted file mode 100644 index 1dac7c2cc09..00000000000 --- a/dev/devel/add_new_projection.html +++ /dev/null @@ -1,1172 +0,0 @@ - - - - - - - - Adding new scales and projections to matplotlib — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      Table Of Contents

      - - -

      Previous topic

      -

      Working with transformations

      -

      Next topic

      -

      Toolkits

      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      Adding new scales and projections to matplotlib

      -

      Matplotlib supports the addition of custom procedures that transform -the data before it is displayed.

      -

      There is an important distinction between two kinds of -transformations. Separable transformations, working on a single -dimension, are called “scales”, and non-separable transformations, -that handle data in two or more dimensions at a time, are called -“projections”.

      -

      From the user’s perspective, the scale of a plot can be set with -set_xscale() and -set_xscale(). Projections can be chosen -using the projection keyword argument to the -plot() or subplot() -functions, e.g.:

      -
      plot(x, y, projection="custom")
      -
      -
      -

      This document is intended for developers and advanced users who need -to create new scales and projections for matplotlib. The necessary -code for scales and projections can be included anywhere: directly -within a plot script, in third-party code, or in the matplotlib source -tree itself.

      -
      -

      Creating a new scale

      -

      Adding a new scale consists of defining a subclass of -matplotlib.scale.ScaleBase, that includes the following -elements:

      -
      -
        -
      • A transformation from data coordinates into display coordinates.
      • -
      • An inverse of that transformation. This is used, for example, to -convert mouse positions from screen space back into data space.
      • -
      • A function to limit the range of the axis to acceptable values -(limit_range_for_scale()). A log scale, for instance, would -prevent the range from including values less than or equal to -zero.
      • -
      • Locators (major and minor) that determine where to place ticks in -the plot, and optionally, how to adjust the limits of the plot to -some “good” values. Unlike limit_range_for_scale(), which is -always enforced, the range setting here is only used when -automatically setting the range of the plot.
      • -
      • Formatters (major and minor) that specify how the tick labels -should be drawn.
      • -
      -
      -

      Once the class is defined, it must be registered with matplotlib so -that the user can select it.

      -

      A full-fledged and heavily annotated example is in -examples/api/custom_scale_example.py. There are also some classes -in matplotlib.scale that may be used as starting points.

      -
      -
      -

      Creating a new projection

      -

      Adding a new projection consists of defining a projection axes which -subclasses matplotlib.axes.Axes and includes the following -elements:

      -
      -
        -
      • A transformation from data coordinates into display coordinates.
      • -
      • An inverse of that transformation. This is used, for example, to -convert mouse positions from screen space back into data space.
      • -
      • Transformations for the gridlines, ticks and ticklabels. Custom -projections will often need to place these elements in special -locations, and matplotlib has a facility to help with doing so.
      • -
      • Setting up default values (overriding -cla()), since the defaults for a -rectilinear axes may not be appropriate.
      • -
      • Defining the shape of the axes, for example, an elliptical axes, -that will be used to draw the background of the plot and for -clipping any data elements.
      • -
      • Defining custom locators and formatters for the projection. For -example, in a geographic projection, it may be more convenient to -display the grid in degrees, even if the data is in radians.
      • -
      • Set up interactive panning and zooming. This is left as an -“advanced” feature left to the reader, but there is an example of -this for polar plots in matplotlib.projections.polar.
      • -
      • Any additional methods for additional convenience or features.
      • -
      -
      -

      Once the projection axes is defined, it can be used in one of two ways:

      -
      -
        -
      • By defining the class attribute name, the projection axes can be -registered with matplotlib.projections.register_projection() -and subsequently simply invoked by name:

        -
        plt.axes(projection='my_proj_name')
        -
        -
        -
      • -
      • For more complex, parameterisable projections, a generic “projection” -object may be defined which includes the method _as_mpl_axes. -_as_mpl_axes should take no arguments and return the projection’s -axes subclass and a dictionary of additional arguments to pass to the -subclass’ __init__ method. Subsequently a parameterised projection -can be initialised with:

        -
        plt.axes(projection=MyProjection(param1=param1_value))
        -
        -
        -

        where MyProjection is an object which implements a _as_mpl_axes method.

        -
      • -
      -
      -

      A full-fledged and heavily annotated example is in -examples/api/custom_projection_example.py. The polar plot -functionality in matplotlib.projections.polar may also be of -interest.

      -
      -
      -

      API documentation

      -
      -

      matplotlib.scale

      -
      -
      -class matplotlib.scale.LinearScale(axis, **kwargs)
      -

      Bases: matplotlib.scale.ScaleBase

      -

      The default linear scale.

      -
      -
      -get_transform()
      -

      The transform for linear scaling is just the -IdentityTransform.

      -
      - -
      -
      -set_default_locators_and_formatters(axis)
      -

      Set the locators and formatters to reasonable defaults for -linear scaling.

      -
      - -
      - -
      -
      -class matplotlib.scale.LogScale(axis, **kwargs)
      -

      Bases: matplotlib.scale.ScaleBase

      -

      A standard logarithmic scale. Care is taken so non-positive -values are not plotted.

      -

      For computational efficiency (to push as much as possible to Numpy -C code in the common cases), this scale provides different -transforms depending on the base of the logarithm:

      -
      -
        -
      • base 10 (Log10Transform)
      • -
      • base 2 (Log2Transform)
      • -
      • base e (NaturalLogTransform)
      • -
      • arbitrary base (LogTransform)
      • -
      -
      -
      -
      basex/basey:
      -
      The base of the logarithm
      -
      nonposx/nonposy: [‘mask’ | ‘clip’ ]
      -
      non-positive values in x or y can be masked as -invalid, or clipped to a very small positive number
      -
      subsx/subsy:
      -

      Where to place the subticks between each major tick. -Should be a sequence of integers. For example, in a log10 -scale: [2, 3, 4, 5, 6, 7, 8, 9]

      -

      will place 8 logarithmically spaced minor ticks between -each major tick.

      -
      -
      -
      -
      -get_transform()
      -

      Return a Transform instance -appropriate for the given logarithm base.

      -
      - -
      -
      -limit_range_for_scale(vmin, vmax, minpos)
      -

      Limit the domain to positive values.

      -
      - -
      -
      -set_default_locators_and_formatters(axis)
      -

      Set the locators and formatters to specialized versions for -log scaling.

      -
      - -
      - -
      -
      -class matplotlib.scale.ScaleBase
      -

      Bases: object

      -

      The base class for all scales.

      -

      Scales are separable transformations, working on a single dimension.

      -

      Any subclasses will want to override:

      -
      -
      -
      -
      -
      And optionally:
      -
      -
      -
      -
      -
      -get_transform()
      -

      Return the Transform object -associated with this scale.

      -
      - -
      -
      -limit_range_for_scale(vmin, vmax, minpos)
      -

      Returns the range vmin, vmax, possibly limited to the -domain supported by this scale.

      -
      -
      minpos should be the minimum positive value in the data.
      -
      This is used by log scales to determine a minimum value.
      -
      -
      - -
      -
      -set_default_locators_and_formatters(axis)
      -

      Set the Locator and -Formatter objects on the given -axis to match this scale.

      -
      - -
      - -
      -
      -class matplotlib.scale.SymmetricalLogScale(axis, **kwargs)
      -

      Bases: matplotlib.scale.ScaleBase

      -

      The symmetrical logarithmic scale is logarithmic in both the -positive and negative directions from the origin.

      -

      Since the values close to zero tend toward infinity, there is a -need to have a range around zero that is linear. The parameter -linthresh allows the user to specify the size of this range -(-linthresh, linthresh).

      -
      -
      basex/basey:
      -
      The base of the logarithm
      -
      linthreshx/linthreshy:
      -
      The range (-x, x) within which the plot is linear (to -avoid having the plot go to infinity around zero).
      -
      subsx/subsy:
      -

      Where to place the subticks between each major tick. -Should be a sequence of integers. For example, in a log10 -scale: [2, 3, 4, 5, 6, 7, 8, 9]

      -

      will place 8 logarithmically spaced minor ticks between -each major tick.

      -
      -
      linscalex/linscaley:
      -
      This allows the linear range (-linthresh to linthresh) -to be stretched relative to the logarithmic range. Its -value is the number of decades to use for each half of the -linear range. For example, when linscale == 1.0 (the -default), the space used for the positive and negative -halves of the linear range will be equal to one decade in -the logarithmic range.
      -
      -
      -
      -get_transform()
      -

      Return a SymmetricalLogTransform instance.

      -
      - -
      -
      -set_default_locators_and_formatters(axis)
      -

      Set the locators and formatters to specialized versions for -symmetrical log scaling.

      -
      - -
      - -
      -
      -matplotlib.scale.get_scale_docs()
      -

      Helper function for generating docstrings related to scales.

      -
      - -
      -
      -matplotlib.scale.register_scale(scale_class)
      -

      Register a new kind of scale.

      -

      scale_class must be a subclass of ScaleBase.

      -
      - -
      -
      -matplotlib.scale.scale_factory(scale, axis, **kwargs)
      -

      Return a scale class by name.

      -

      ACCEPTS: [ linear | log | symlog ]

      -
      - -
      -
      -

      matplotlib.projections

      -
      -
      -class matplotlib.projections.ProjectionRegistry
      -

      Bases: object

      -

      Manages the set of projections available to the system.

      -
      -
      -get_projection_class(name)
      -

      Get a projection class from its name.

      -
      - -
      -
      -get_projection_names()
      -

      Get a list of the names of all projections currently -registered.

      -
      - -
      -
      -register(*projections)
      -

      Register a new set of projection(s).

      -
      - -
      - -
      -
      -matplotlib.projections.get_projection_class(projection=None)
      -

      Get a projection class from its name.

      -

      If projection is None, a standard rectilinear projection is -returned.

      -
      - -
      -
      -matplotlib.projections.get_projection_names()
      -

      Get a list of acceptable projection names.

      -
      - -
      -
      -matplotlib.projections.process_projection_requirements(figure, *args, **kwargs)
      -

      Handle the args/kwargs to for add_axes/add_subplot/gca, -returning:

      -
      (axes_proj_class, proj_class_kwargs, proj_stack_key)
      -
      -
      -

      Which can be used for new axes initialization/identification.

      -
      -

      Note

      -

      kwargs is modified in place.

      -
      -
      - -
      -
      -matplotlib.projections.projection_factory(projection, figure, rect, **kwargs)
      -

      Get a new projection instance.

      -

      projection is a projection name.

      -

      figure is a figure to add the axes to.

      -

      rect is a Bbox object specifying -the location of the axes within the figure.

      -

      Any other kwargs are passed along to the specific projection -constructor being used.

      -
      -

      Deprecated since version 1.3: This routine is deprecated in favour of getting the projection -class directly with get_projection_class() and initialising it -directly. Will be removed in version 1.3.

      -
      -
      - -
      -

      matplotlib.projections.polar

      -
      -
      -class matplotlib.projections.polar.InvertedPolarTransform(axis=None, use_rmin=True)
      -

      Bases: matplotlib.transforms.Transform

      -

      The inverse of the polar transform, mapping Cartesian -coordinate space x and y back to theta and r.

      -
      -
      -inverted()
      -

      Return the corresponding inverse transformation.

      -

      The return value of this method should be treated as -temporary. An update to self does not cause a corresponding -update to its inverted copy.

      -

      x === self.inverted().transform(self.transform(x))

      -
      - -
      -
      -transform_non_affine(xy)
      -

      Performs only the non-affine part of the transformation.

      -

      transform(values) is always equivalent to -transform_affine(transform_non_affine(values)).

      -

      In non-affine transformations, this is generally equivalent to -transform(values). In affine transformations, this is -always a no-op.

      -

      Accepts a numpy array of shape (N x input_dims) and -returns a numpy array of shape (N x output_dims).

      -
      - -
      - -
      -
      -class matplotlib.projections.polar.PolarAffine(scale_transform, limits)
      -

      Bases: matplotlib.transforms.Affine2DBase

      -

      The affine part of the polar projection. Scales the output so -that maximum radius rests on the edge of the axes circle.

      -

      limits is the view limit of the data. The only part of -its bounds that is used is ymax (for the radius maximum). -The theta range is always fixed to (0, 2pi).

      -
      -
      -get_matrix()
      -

      Get the Affine transformation array for the affine part -of this transform.

      -
      - -
      - -
      -
      -class matplotlib.projections.polar.PolarAxes(*args, **kwargs)
      -

      Bases: matplotlib.axes.Axes

      -

      A polar graph projection, where the input dimensions are theta, r.

      -

      Theta starts pointing east and goes anti-clockwise.

      -
      -
      -class InvertedPolarTransform(axis=None, use_rmin=True)
      -

      Bases: matplotlib.transforms.Transform

      -

      The inverse of the polar transform, mapping Cartesian -coordinate space x and y back to theta and r.

      -
      -
      -inverted()
      -

      Return the corresponding inverse transformation.

      -

      The return value of this method should be treated as -temporary. An update to self does not cause a corresponding -update to its inverted copy.

      -

      x === self.inverted().transform(self.transform(x))

      -
      - -
      -
      -transform_non_affine(xy)
      -

      Performs only the non-affine part of the transformation.

      -

      transform(values) is always equivalent to -transform_affine(transform_non_affine(values)).

      -

      In non-affine transformations, this is generally equivalent to -transform(values). In affine transformations, this is -always a no-op.

      -

      Accepts a numpy array of shape (N x input_dims) and -returns a numpy array of shape (N x output_dims).

      -
      - -
      - -
      -
      -class PolarAxes.PolarAffine(scale_transform, limits)
      -

      Bases: matplotlib.transforms.Affine2DBase

      -

      The affine part of the polar projection. Scales the output so -that maximum radius rests on the edge of the axes circle.

      -

      limits is the view limit of the data. The only part of -its bounds that is used is ymax (for the radius maximum). -The theta range is always fixed to (0, 2pi).

      -
      -
      -get_matrix()
      -

      Get the Affine transformation array for the affine part -of this transform.

      -
      - -
      - -
      -
      -class PolarAxes.PolarTransform(axis=None, use_rmin=True)
      -

      Bases: matplotlib.transforms.Transform

      -

      The base polar transform. This handles projection theta and -r into Cartesian coordinate space x and y, but does not -perform the ultimate affine transformation into the correct -position.

      -
      -
      -inverted()
      -

      Return the corresponding inverse transformation.

      -

      The return value of this method should be treated as -temporary. An update to self does not cause a corresponding -update to its inverted copy.

      -

      x === self.inverted().transform(self.transform(x))

      -
      - -
      -
      -transform_non_affine(tr)
      -

      Performs only the non-affine part of the transformation.

      -

      transform(values) is always equivalent to -transform_affine(transform_non_affine(values)).

      -

      In non-affine transformations, this is generally equivalent to -transform(values). In affine transformations, this is -always a no-op.

      -

      Accepts a numpy array of shape (N x input_dims) and -returns a numpy array of shape (N x output_dims).

      -
      - -
      -
      -transform_path_non_affine(path)
      -

      Returns a path, transformed only by the non-affine -part of this transform.

      -

      path: a Path instance.

      -

      transform_path(path) is equivalent to -transform_path_affine(transform_path_non_affine(values)).

      -
      - -
      - -
      -
      -class PolarAxes.RadialLocator(base)
      -

      Bases: matplotlib.ticker.Locator

      -

      Used to locate radius ticks.

      -

      Ensures that all ticks are strictly positive. For all other -tasks, it delegates to the base -Locator (which may be different -depending on the scale of the r-axis.

      -
      - -
      -
      -class PolarAxes.ThetaFormatter
      -

      Bases: matplotlib.ticker.Formatter

      -

      Used to format the theta tick labels. Converts the native -unit of radians into degrees and adds a degree symbol.

      -
      - -
      -
      -PolarAxes.can_pan()
      -

      Return True if this axes supports the pan/zoom button functionality.

      -

      For polar axes, this is slightly misleading. Both panning and -zooming are performed by the same button. Panning is performed -in azimuth while zooming is done along the radial.

      -
      - -
      -
      -PolarAxes.can_zoom()
      -

      Return True if this axes supports the zoom box button functionality.

      -

      Polar axes do not support zoom boxes.

      -
      - -
      -
      -PolarAxes.format_coord(theta, r)
      -

      Return a format string formatting the coordinate using Unicode -characters.

      -
      - -
      -
      -PolarAxes.get_data_ratio()
      -

      Return the aspect ratio of the data itself. For a polar plot, -this should always be 1.0

      -
      - -
      -
      -PolarAxes.get_theta_direction()
      -

      Get the direction in which theta increases.

      -
      -
      -1:
      -
      Theta increases in the clockwise direction
      -
      1:
      -
      Theta increases in the counterclockwise direction
      -
      -
      - -
      -
      -PolarAxes.get_theta_offset()
      -

      Get the offset for the location of 0 in radians.

      -
      - -
      -
      -PolarAxes.set_rgrids(radii, labels=None, angle=None, fmt=None, **kwargs)
      -

      Set the radial locations and labels of the r grids.

      -

      The labels will appear at radial distances radii at the -given angle in degrees.

      -

      labels, if not None, is a len(radii) list of strings of the -labels to use at each radius.

      -

      If labels is None, the built-in formatter will be used.

      -

      Return value is a list of tuples (line, label), where -line is Line2D instances and the -label is Text instances.

      -

      kwargs are optional text properties for the labels:

      -
      -
      ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      PropertyDescription
      agg_filterunknown
      alphafloat (0.0 transparent through 1.0 opaque)
      animated[True | False]
      axesan Axes instance
      backgroundcolorany matplotlib color
      bboxrectangle prop dict
      clip_boxa matplotlib.transforms.Bbox instance
      clip_on[True | False]
      clip_path[ (Path, Transform) | Patch | None ]
      colorany matplotlib color
      containsa callable function
      family or fontfamily or fontname or name[FONTNAME | ‘serif’ | ‘sans-serif’ | ‘cursive’ | ‘fantasy’ | ‘monospace’ ]
      figurea matplotlib.figure.Figure instance
      fontproperties or font_propertiesa matplotlib.font_manager.FontProperties instance
      gidan id string
      horizontalalignment or ha[ ‘center’ | ‘right’ | ‘left’ ]
      labelstring or anything printable with ‘%s’ conversion.
      linespacingfloat (multiple of font size)
      lod[True | False]
      multialignment[‘left’ | ‘right’ | ‘center’ ]
      path_effectsunknown
      picker[None|float|boolean|callable]
      position(x,y)
      rasterized[True | False | None]
      rotation[ angle in degrees | ‘vertical’ | ‘horizontal’ ]
      rotation_modeunknown
      size or fontsize[size in points | ‘xx-small’ | ‘x-small’ | ‘small’ | ‘medium’ | ‘large’ | ‘x-large’ | ‘xx-large’ ]
      snapunknown
      stretch or fontstretch[a numeric value in range 0-1000 | ‘ultra-condensed’ | ‘extra-condensed’ | ‘condensed’ | ‘semi-condensed’ | ‘normal’ | ‘semi-expanded’ | ‘expanded’ | ‘extra-expanded’ | ‘ultra-expanded’ ]
      style or fontstyle[ ‘normal’ | ‘italic’ | ‘oblique’]
      textstring or anything printable with ‘%s’ conversion.
      transformTransform instance
      urla url string
      variant or fontvariant[ ‘normal’ | ‘small-caps’ ]
      verticalalignment or va or ma[ ‘center’ | ‘top’ | ‘bottom’ | ‘baseline’ ]
      visible[True | False]
      weight or fontweight[a numeric value in range 0-1000 | ‘ultralight’ | ‘light’ | ‘normal’ | ‘regular’ | ‘book’ | ‘medium’ | ‘roman’ | ‘semibold’ | ‘demibold’ | ‘demi’ | ‘bold’ | ‘heavy’ | ‘extra bold’ | ‘black’ ]
      xfloat
      yfloat
      zorderany number
      -
      -

      ACCEPTS: sequence of floats

      -
      - -
      -
      -PolarAxes.set_theta_direction(direction)
      -

      Set the direction in which theta increases.

      -
      -
      clockwise, -1:
      -
      Theta increases in the clockwise direction
      -
      counterclockwise, anticlockwise, 1:
      -
      Theta increases in the counterclockwise direction
      -
      -
      - -
      -
      -PolarAxes.set_theta_offset(offset)
      -

      Set the offset for the location of 0 in radians.

      -
      - -
      -
      -PolarAxes.set_theta_zero_location(loc)
      -

      Sets the location of theta’s zero. (Calls set_theta_offset -with the correct value in radians under the hood.)

      -

      May be one of “N”, “NW”, “W”, “SW”, “S”, “SE”, “E”, or “NE”.

      -
      - -
      -
      -PolarAxes.set_thetagrids(angles, labels=None, frac=None, fmt=None, **kwargs)
      -

      Set the angles at which to place the theta grids (these -gridlines are equal along the theta dimension). angles is in -degrees.

      -

      labels, if not None, is a len(angles) list of strings of -the labels to use at each angle.

      -

      If labels is None, the labels will be fmt % angle

      -

      frac is the fraction of the polar axes radius at which to -place the label (1 is the edge). e.g., 1.05 is outside the axes -and 0.95 is inside the axes.

      -

      Return value is a list of tuples (line, label), where -line is Line2D instances and the -label is Text instances.

      -

      kwargs are optional text properties for the labels:

      -
      -
      ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      PropertyDescription
      agg_filterunknown
      alphafloat (0.0 transparent through 1.0 opaque)
      animated[True | False]
      axesan Axes instance
      backgroundcolorany matplotlib color
      bboxrectangle prop dict
      clip_boxa matplotlib.transforms.Bbox instance
      clip_on[True | False]
      clip_path[ (Path, Transform) | Patch | None ]
      colorany matplotlib color
      containsa callable function
      family or fontfamily or fontname or name[FONTNAME | ‘serif’ | ‘sans-serif’ | ‘cursive’ | ‘fantasy’ | ‘monospace’ ]
      figurea matplotlib.figure.Figure instance
      fontproperties or font_propertiesa matplotlib.font_manager.FontProperties instance
      gidan id string
      horizontalalignment or ha[ ‘center’ | ‘right’ | ‘left’ ]
      labelstring or anything printable with ‘%s’ conversion.
      linespacingfloat (multiple of font size)
      lod[True | False]
      multialignment[‘left’ | ‘right’ | ‘center’ ]
      path_effectsunknown
      picker[None|float|boolean|callable]
      position(x,y)
      rasterized[True | False | None]
      rotation[ angle in degrees | ‘vertical’ | ‘horizontal’ ]
      rotation_modeunknown
      size or fontsize[size in points | ‘xx-small’ | ‘x-small’ | ‘small’ | ‘medium’ | ‘large’ | ‘x-large’ | ‘xx-large’ ]
      snapunknown
      stretch or fontstretch[a numeric value in range 0-1000 | ‘ultra-condensed’ | ‘extra-condensed’ | ‘condensed’ | ‘semi-condensed’ | ‘normal’ | ‘semi-expanded’ | ‘expanded’ | ‘extra-expanded’ | ‘ultra-expanded’ ]
      style or fontstyle[ ‘normal’ | ‘italic’ | ‘oblique’]
      textstring or anything printable with ‘%s’ conversion.
      transformTransform instance
      urla url string
      variant or fontvariant[ ‘normal’ | ‘small-caps’ ]
      verticalalignment or va or ma[ ‘center’ | ‘top’ | ‘bottom’ | ‘baseline’ ]
      visible[True | False]
      weight or fontweight[a numeric value in range 0-1000 | ‘ultralight’ | ‘light’ | ‘normal’ | ‘regular’ | ‘book’ | ‘medium’ | ‘roman’ | ‘semibold’ | ‘demibold’ | ‘demi’ | ‘bold’ | ‘heavy’ | ‘extra bold’ | ‘black’ ]
      xfloat
      yfloat
      zorderany number
      -
      -

      ACCEPTS: sequence of floats

      -
      - -
      - -
      -
      -class matplotlib.projections.polar.PolarTransform(axis=None, use_rmin=True)
      -

      Bases: matplotlib.transforms.Transform

      -

      The base polar transform. This handles projection theta and -r into Cartesian coordinate space x and y, but does not -perform the ultimate affine transformation into the correct -position.

      -
      -
      -inverted()
      -

      Return the corresponding inverse transformation.

      -

      The return value of this method should be treated as -temporary. An update to self does not cause a corresponding -update to its inverted copy.

      -

      x === self.inverted().transform(self.transform(x))

      -
      - -
      -
      -transform_non_affine(tr)
      -

      Performs only the non-affine part of the transformation.

      -

      transform(values) is always equivalent to -transform_affine(transform_non_affine(values)).

      -

      In non-affine transformations, this is generally equivalent to -transform(values). In affine transformations, this is -always a no-op.

      -

      Accepts a numpy array of shape (N x input_dims) and -returns a numpy array of shape (N x output_dims).

      -
      - -
      -
      -transform_path_non_affine(path)
      -

      Returns a path, transformed only by the non-affine -part of this transform.

      -

      path: a Path instance.

      -

      transform_path(path) is equivalent to -transform_path_affine(transform_path_non_affine(values)).

      -
      - -
      - -
      -
      -class matplotlib.projections.polar.RadialLocator(base)
      -

      Bases: matplotlib.ticker.Locator

      -

      Used to locate radius ticks.

      -

      Ensures that all ticks are strictly positive. For all other -tasks, it delegates to the base -Locator (which may be different -depending on the scale of the r-axis.

      -
      - -
      -
      -class matplotlib.projections.polar.ThetaFormatter
      -

      Bases: matplotlib.ticker.Formatter

      -

      Used to format the theta tick labels. Converts the native -unit of radians into degrees and adds a degree symbol.

      -
      - -
      -
      -
      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/devel/coding_guide.html b/dev/devel/coding_guide.html deleted file mode 100644 index 04976312776..00000000000 --- a/dev/devel/coding_guide.html +++ /dev/null @@ -1,442 +0,0 @@ - - - - - - - - Coding guide — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      Table Of Contents

      - - -

      Previous topic

      -

      The Matplotlib Developers’ Guide

      -

      Next topic

      -

      Licenses

      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      Coding guide

      -
      -

      Pull request checklist

      -

      This checklist should be consulted when creating pull requests to make -sure they are complete before merging. These are not intended to be -rigidly followed—it’s just an attempt to list in one place all of -the items that are necessary for a good pull request. Of course, some -items will not always apply.

      -
      -

      Branch selection

      -
        -
      • In general, simple bugfixes that are unlikely to introduce new bugs -of their own should be merged onto the maintenance branch. New -features, or anything that changes the API, should be made against -master. The rules are fuzzy here – when in doubt, try to get some -consensus.
          -
        • Once changes are merged into the maintenance branch, they should -be merged into master.
        • -
        -
      • -
      -
      -
      -

      Style

      -
        -
      • Formatting should follow PEP8. Exceptions to these -rules are acceptable if it makes the code objectively more readable.

        -
          -
        • You may want to consider installing automatic PEP8 checking in -your editor.
        • -
        -
      • -
      • No tabs (only spaces). No trailing whitespace.

        -
          -
        • Configuring your editor to remove these things upon saving will -save a lot of trouble.
        • -
        -
      • -
      • Import the following modules using the standard scipy conventions:

        -
        import numpy as np
        -import numpy.ma as ma
        -import matplotlib as mpl
        -from matplotlib import pyplot as plt
        -import matplotlib.cbook as cbook
        -import matplotlib.collections as mcol
        -import matplotlib.patches as mpatches
        -
        -
        -
      • -
      • See below for additional points about -Keyword argument processing, if code in your pull request -does that.

        -
      • -
      • Adding a new pyplot function involves generating code. See -Writing a new pyplot function for more information.

        -
      • -
      -
      -
      -

      Documentation

      -
        -
      • Every new feature should be documented. If it’s a new module, don’t -forget to add it to the API docs.
      • -
      • Build the docs and make sure all formatting warnings are addressed.
      • -
      • See Documenting matplotlib for our documentation style guide.
      • -
      • If your changes are non-trivial, please make an entry in the -CHANGELOG.
      • -
      • If your change is a major new feature, add an entry to -doc/users/whats_new.rst.
      • -
      • If you change the API in a backward-incompatible way, please -document it in doc/api/api_changes.rst.
      • -
      -
      -
      -

      Testing

      -

      Using the test framework is discussed in detail in the section -Testing.

      -
        -
      • If the PR is a bugfix, add a test that fails prior to the change and -passes with the change. Include any relevant issue numbers in the -docstring of the test.
      • -
      • If this is a new feature, add a test that exercises as much of the -new feature as possible. (The --with-coverage option may be -useful here).
      • -
      • Make sure the Travis tests are passing before merging.
          -
        • The Travis tests automatically test on all of the Python versions -matplotlib supports whenever a pull request is created or updated. -The tox support in matplotlib may be useful for testing locally.
        • -
        -
      • -
      -
      -
      -

      Installation

      -
        -
      • If you have added new files or directories, or reorganized existing -ones, make sure the new files included in the match patterns in -MANIFEST.in, and/or in package_data in setup.py.
      • -
      -
      -
      -

      C/C++ extensions

      -
        -
      • Extensions may be written in C or C++.
      • -
      • Code style should conform to PEP7 (understanding that PEP7 doesn’t -address C++, but most of its admonitions still apply).
      • -
      • Interfacing with Python may be done either with the raw Python/C API -or Cython. Use of PyCXX is discouraged for new code.
      • -
      • Python/C interface code should be kept separate from the core C/C++ -code. The interface code should be named FOO_wrap.cpp.
      • -
      • Header file documentation (aka docstrings) should be in Numpydoc -format. We don’t plan on using automated tools for these -docstrings, and the Numpydoc format is well understood in the -scientific Python community.
      • -
      -
      -
      -
      -

      Style guide

      -
      -

      Keyword argument processing

      -

      Matplotlib makes extensive use of **kwargs for pass-through -customizations from one function to another. A typical example is in -matplotlib.pylab.text(). The definition of the pylab text -function is a simple pass-through to -matplotlib.axes.Axes.text():

      -
      # in pylab.py
      -def text(*args, **kwargs):
      -    ret =  gca().text(*args, **kwargs)
      -    draw_if_interactive()
      -    return ret
      -
      -
      -

      text() in simplified form looks like this, -i.e., it just passes all args and kwargs on to -matplotlib.text.Text.__init__():

      -
      # in axes.py
      -def text(self, x, y, s, fontdict=None, withdash=False, **kwargs):
      -    t = Text(x=x, y=y, text=s, **kwargs)
      -
      -
      -

      and __init__() (again with liberties for -illustration) just passes them on to the -matplotlib.artist.Artist.update() method:

      -
      # in text.py
      -def __init__(self, x=0, y=0, text='', **kwargs):
      -    Artist.__init__(self)
      -    self.update(kwargs)
      -
      -
      -

      update does the work looking for methods named like -set_property if property is a keyword argument. I.e., no one -looks at the keywords, they just get passed through the API to the -artist constructor which looks for suitably named methods and calls -them with the value.

      -

      As a general rule, the use of **kwargs should be reserved for -pass-through keyword arguments, as in the example above. If all the -keyword args are to be used in the function, and not passed -on, use the key/value keyword args in the function definition rather -than the **kwargs idiom.

      -

      In some cases, you may want to consume some keys in the local -function, and let others pass through. You can pop the ones to be -used locally and pass on the rest. For example, in -plot(), scalex and scaley are -local arguments and the rest are passed on as -Line2D() keyword arguments:

      -
      # in axes.py
      -def plot(self, *args, **kwargs):
      -    scalex = kwargs.pop('scalex', True)
      -    scaley = kwargs.pop('scaley', True)
      -    if not self._hold: self.cla()
      -    lines = []
      -    for line in self._get_lines(*args, **kwargs):
      -        self.add_line(line)
      -        lines.append(line)
      -
      -
      -

      Note: there is a use case when kwargs are meant to be used locally -in the function (not passed on), but you still need the **kwargs -idiom. That is when you want to use *args to allow variable -numbers of non-keyword args. In this case, python will not allow you -to use named keyword args after the *args usage, so you will be -forced to use **kwargs. An example is -matplotlib.contour.ContourLabeler.clabel():

      -
      # in contour.py
      -def clabel(self, *args, **kwargs):
      -    fontsize = kwargs.get('fontsize', None)
      -    inline = kwargs.get('inline', 1)
      -    self.fmt = kwargs.get('fmt', '%1.3f')
      -    colors = kwargs.get('colors', None)
      -    if len(args) == 0:
      -        levels = self.levels
      -        indices = range(len(self.levels))
      -    elif len(args) == 1:
      -       ...etc...
      -
      -
      -
      -
      -
      -

      Hints

      -

      This section describes how to add certain kinds of new features to -matplotlib.

      -
      -

      Developing a new backend

      -

      If you are working on a custom backend, the backend setting in -matplotlibrc (Customizing matplotlib) supports an -external backend via the module directive. if -my_backend.py is a matplotlib backend in your -PYTHONPATH, you can set use it on one of several ways

      -
        -
      • in matplotlibrc:

        -
        backend : module://my_backend
        -
        -
      • -
      • with the use directive is your script:

        -
        import matplotlib
        -matplotlib.use('module://my_backend')
        -
        -
        -
      • -
      • from the command shell with the -d flag:

        -
        > python simple_plot.py -d module://my_backend
        -
        -
      • -
      -
      -
      -

      Writing examples

      -

      We have hundreds of examples in subdirectories of -matplotlib/examples, and these are automatically generated -when the website is built to show up both in the examples and gallery sections of the website.

      -

      Any sample data that the example uses should be kept small and -distributed with matplotlib in the -lib/matplotlib/mpl-data/sample_data/ directory. Then in your -example code you can load it into a file handle with:

      -
      import matplotlib.cbook as cbook
      -fh = cbook.get_sample_data('mydata.dat')
      -
      -
      -
      -
      -

      Writing a new pyplot function

      -

      A large portion of the pyplot interface is automatically generated by the -boilerplate.py script (in the root of the source tree). To add or remove -a plotting method from pyplot, edit the appropriate list in boilerplate.py -and then run the script which will update the content in -lib/matplotlib/pyplot.py. Both the changes in boilerplate.py and -lib/matplotlib/pyplot.py should be checked into the repository.

      -
      -
      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/devel/documenting_mpl.html b/dev/devel/documenting_mpl.html deleted file mode 100644 index b931029d97f..00000000000 --- a/dev/devel/documenting_mpl.html +++ /dev/null @@ -1,771 +0,0 @@ - - - - - - - - Documenting matplotlib — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - - - -
      -
      -
      -
      - -
      -

      Documenting matplotlib

      -
      -

      Getting started

      -

      The documentation for matplotlib is generated from ReStructured Text using the -Sphinx documentation generation tool. Sphinx-1.0 or later and numpydoc 0.4 or -later is required.

      -

      The documentation sources are found in the doc/ directory in -the trunk. To build the users guide in html format, cd into -doc/ and do:

      -
      python make.py html
      -
      -

      or:

      -
      ./make.py html
      -
      -

      you can also pass a latex flag to make.py to build a pdf, or pass no -arguments to build everything.

      -

      The output produced by Sphinx can be configured by editing the conf.py -file located in the doc/.

      -
      -
      -

      Organization of matplotlib’s documentation

      -

      The actual ReStructured Text files are kept in doc/users, -doc/devel, doc/api and doc/faq. The main entry point is -doc/index.rst, which pulls in the index.rst file for the users -guide, developers guide, api reference, and faqs. The documentation suite is -built as a single document in order to make the most effective use of cross -referencing, we want to make navigating the Matplotlib documentation as easy as -possible.

      -

      Additional files can be added to the various guides by including their base -file name (the .rst extension is not necessary) in the table of contents. -It is also possible to include other documents through the use of an include -statement, such as:

      -
      .. include:: ../../TODO
      -
      -
      -

      docstrings

      -

      In addition to the “narrative” documentation described above, -matplotlib also defines its API reference documentation in docstrings. -For the most part, these are standard Python docstrings, but -matplotlib also includes some features to better support documenting -getters and setters.

      -

      Matplotlib uses artist introspection of docstrings to support -properties. All properties that you want to support through setp -and getp should have a set_property and get_property -method in the Artist class. Yes, this is -not ideal given python properties or enthought traits, but it is a -historical legacy for now. The setter methods use the docstring with -the ACCEPTS token to indicate the type of argument the method accepts. -e.g., in matplotlib.lines.Line2D:

      -
      # in lines.py
      -def set_linestyle(self, linestyle):
      -    """
      -    Set the linestyle of the line
      -
      -    ACCEPTS: [ '-' | '--' | '-.' | ':' | 'steps' | 'None' | ' ' | '' ]
      -    """
      -
      -
      -

      Since matplotlib uses a lot of pass-through kwargs, e.g., in every -function that creates a line (plot(), -semilogx(), -semilogy(), etc...), it can be difficult for -the new user to know which kwargs are supported. Matplotlib uses -a docstring interpolation scheme to support documentation of every -function that takes a **kwargs. The requirements are:

      -
        -
      1. single point of configuration so changes to the properties don’t -require multiple docstring edits.
      2. -
      3. as automated as possible so that as properties change, the docs -are updated automagically.
      4. -
      -

      The functions matplotlib.artist.kwdocd and -matplotlib.artist.kwdoc() to facilitate this. They combine -python string interpolation in the docstring with the matplotlib -artist introspection facility that underlies setp and getp. -The kwdocd is a single dictionary that maps class name to a -docstring of kwargs. Here is an example from -matplotlib.lines:

      -
      # in lines.py
      -artist.kwdocd['Line2D'] = artist.kwdoc(Line2D)
      -
      -
      -

      Then in any function accepting Line2D -pass-through kwargs, e.g., matplotlib.axes.Axes.plot():

      -
      # in axes.py
      -def plot(self, *args, **kwargs):
      -    """
      -    Some stuff omitted
      -
      -    The kwargs are Line2D properties:
      -    %(Line2D)s
      -
      -    kwargs scalex and scaley, if defined, are passed on
      -    to autoscale_view to determine whether the x and y axes are
      -    autoscaled; default True.  See Axes.autoscale_view for more
      -    information
      -    """
      -    pass
      -plot.__doc__ = cbook.dedent(plot.__doc__) % artist.kwdocd
      -
      -
      -

      Note there is a problem for Artist -__init__ methods, e.g., matplotlib.patches.Patch.__init__(), -which supports Patch kwargs, since the artist inspector cannot -work until the class is fully defined and we can’t modify the -Patch.__init__.__doc__ docstring outside the class definition. -There are some some manual hacks in this case, violating the -“single entry point” requirement above – see the -artist.kwdocd['Patch'] setting in matplotlib.patches.

      -
      -
      -
      -

      Formatting

      -

      The Sphinx website contains plenty of documentation concerning ReST markup and -working with Sphinx in general. Here are a few additional things to keep in mind:

      -
        -
      • Please familiarize yourself with the Sphinx directives for inline -markup. Matplotlib’s documentation makes heavy use of cross-referencing and -other semantic markup. For example, when referring to external files, use the -:file: directive.

        -
      • -
      • Function arguments and keywords should be referred to using the emphasis -role. This will keep matplotlib’s documentation consistent with Python’s -documentation:

        -
        Here is a description of *argument*
        -
        -

        Please do not use the default role:

        -
        Please do not describe `argument` like this.
        -
        -

        nor the literal role:

        -
        Please do not describe ``argument`` like this.
        -
        -
      • -
      • Sphinx does not support tables with column- or row-spanning cells for -latex output. Such tables can not be used when documenting matplotlib.

        -
      • -
      • Mathematical expressions can be rendered as png images in html, and in the -usual way by latex. For example:

        -

        :math:`\sin(x_n^2)` yields: , and:

        -
        .. math::
        -
        -  \int_{-\infty}^{\infty}\frac{e^{i\phi}}{1+x^2\frac{e^{i\phi}}{1+x^2}}
        -
        -

        yields:

        -
      • -
      • Interactive IPython sessions can be illustrated in the documentation using -the following directive:

        -
        .. sourcecode:: ipython
        -
        -  In [69]: lines = plot([1,2,3])
        -
        -

        which would yield:

        -
        In [69]: lines = plot([1,2,3])
        -
        -
        -
      • -
      • Footnotes [1] can be added using [#]_, followed later by:

        -
        .. rubric:: Footnotes
        -
        -.. [#]
        -
        -

        Footnotes

        - - - - - -
        [1]

        For example.

        -
        -
      • -
      • Use the note and warning directives, sparingly, to draw attention to -important comments:

        -
        .. note::
        -   Here is a note
        -
        -

        yields:

        -
        -

        Note

        -

        here is a note

        -
        -

        also:

        -
        -

        Warning

        -

        here is a warning

        -
        -
      • -
      • Use the deprecated directive when appropriate:

        -
        .. deprecated:: 0.98
        -   This feature is obsolete, use something else.
        -
        -

        yields:

        -
        -

        Deprecated since version 0.98: This feature is obsolete, use something else.

        -
        -
      • -
      • Use the versionadded and versionchanged directives, which have similar -syntax to the deprecated role:

        -
        .. versionadded:: 0.98
        -   The transforms have been completely revamped.
        -
        -
        -

        New in version 0.98: The transforms have been completely revamped.

        -
        -
      • -
      • Use the seealso directive, for example:

        -
        .. seealso::
        -
        -   Using ReST :ref:`emacs-helpers`:
        -      One example
        -
        -   A bit about :ref:`referring-to-mpl-docs`:
        -      One more
        -
        -

        yields:

        -
        -

        See also

        -
        -
        Using ResT Emacs helpers:
        -

        One example

        -
        -
        A bit about Referring to mpl documents:
        -

        One more

        -
        -
        -
        -
      • -
      • Please keep the Glossary in mind when writing documentation. You can -create a references to a term in the glossary with the :term: role.

        -
      • -
      • The autodoc extension will handle index entries for the API, but additional -entries in the index need to be explicitly added.

        -
      • -
      -
        -
      • Please limit the text width of docstrings to 70 characters.

        -
      • -
      • Keyword arguments should be described using a definition list.

        -
        -

        Note

        -

        matplotlib makes extensive use of keyword arguments as pass-through -arguments, there are a many cases where a table is used in place of a -definition list for autogenerated sections of docstrings.

        -
        -
      • -
      -
      -
      -

      Figures

      -
      -

      Dynamically generated figures

      -

      Figures can be automatically generated from scripts and included in -the docs. It is not necessary to explicitly save the figure in the -script, this will be done automatically at build time to ensure that -the code that is included runs and produces the advertised figure.

      -

      The path should be relative to the doc directory. Any plots -specific to the documentation should be added to the doc/pyplots -directory and committed to git. Plots from the examples directory -may be referenced through the symlink mpl_examples in the doc -directory. e.g.:

      -
      .. plot:: mpl_examples/pylab_examples/simple_plot.py
      -
      -

      The :scale: directive rescales the image to some percentage of the -original size, though we don’t recommend using this in most cases -since it is probably better to choose the correct figure size and dpi -in mpl and let it handle the scaling.

      -
      -

      Plot directive documentation

      -

      A directive for including a matplotlib plot in a Sphinx document.

      -

      By default, in HTML output, plot will include a .png file with a -link to a high-res .png and .pdf. In LaTeX output, it will include a -.pdf.

      -

      The source code for the plot may be included in one of three ways:

      -
      -
        -
      1. A path to a source file as the argument to the directive:

        -
        .. plot:: path/to/plot.py
        -
        -

        When a path to a source file is given, the content of the -directive may optionally contain a caption for the plot:

        -
        .. plot:: path/to/plot.py
        -
        -   This is the caption for the plot
        -
        -

        Additionally, one my specify the name of a function to call (with -no arguments) immediately after importing the module:

        -
        .. plot:: path/to/plot.py plot_function1
        -
        -
      2. -
      3. Included as inline content to the directive:

        -
        .. plot::
        -
        -   import matplotlib.pyplot as plt
        -   import matplotlib.image as mpimg
        -   import numpy as np
        -   img = mpimg.imread('_static/stinkbug.png')
        -   imgplot = plt.imshow(img)
        -
        -
      4. -
      5. Using doctest syntax:

        -
        .. plot::
        -   A plotting example:
        -   >>> import matplotlib.pyplot as plt
        -   >>> plt.plot([1,2,3], [4,5,6])
        -
        -
      6. -
      -
      -
      -
      Options
      -

      The plot directive supports the following options:

      -
      -
      -
      format : {‘python’, ‘doctest’}
      -
      Specify the format of the input
      -
      include-source : bool
      -
      Whether to display the source code. The default can be changed -using the plot_include_source variable in conf.py
      -
      encoding : str
      -
      If this source file is in a non-UTF8 or non-ASCII encoding, -the encoding must be specified using the :encoding: option. -The encoding will not be inferred using the -*- coding -*- -metacomment.
      -
      context : bool
      -
      If provided, the code will be run in the context of all -previous plot directives for which the :context: option was -specified. This only applies to inline code plot directives, -not those run from files.
      -
      nofigs : bool
      -
      If specified, the code block will be run, but no figures will -be inserted. This is usually useful with the :context: -option.
      -
      -
      -

      Additionally, this directive supports all of the options of the -image directive, except for target (since plot will add its own -target). These include alt, height, width, scale, align and -class.

      -
      -
      -
      Configuration options
      -

      The plot directive has the following configuration options:

      -
      -
      -
      plot_include_source
      -
      Default value for the include-source option
      -
      plot_pre_code
      -
      Code that should be executed before each plot.
      -
      plot_basedir
      -
      Base directory, to which plot:: file names are relative -to. (If None or empty, file names are relative to the -directoly where the file containing the directive is.)
      -
      plot_formats
      -

      File formats to generate. List of tuples or strings:

      -
      [(suffix, dpi), suffix, ...]
      -
      -
      -

      that determine the file format and the DPI. For entries whose -DPI was omitted, sensible defaults are chosen.

      -
      -
      plot_html_show_formats
      -
      Whether to show links to the files in HTML.
      -
      plot_rcparams
      -
      A dictionary containing any non-standard rcParams that should -be applied before each plot.
      -
      plot_apply_rcparams
      -
      By default, rcParams are applied when context option is not used in -a plot directive. This configuration option overrides this behaviour -and applies rcParams before each plot.
      -
      plot_working_directory
      -
      By default, the working directory will be changed to the directory of -the example, so the code can get at its data files, if any. Also its -path will be added to sys.path so it can import any helper modules -sitting beside it. This configuration option can be used to specify -a central directory (also added to sys.path) where data files and -helper modules for all code are located.
      -
      plot_template
      -
      Provide a customized template for preparing resturctured text.
      -
      -
      -
      -
      -
      -
      -

      Static figures

      -

      Any figures that rely on optional system configurations need to be handled a -little differently. These figures are not to be generated during the -documentation build, in order to keep the prerequisites to the documentation -effort as low as possible. Please run the doc/pyplots/make.py script -when adding such figures, and commit the script and the images to -git. Please also add a line to the README in doc/pyplots for any additional -requirements necessary to generate a new figure. Once these steps have been -taken, these figures can be included in the usual way:

      -
      .. plot:: pyplots/tex_unicode_demo.py
      -   :include-source:
      -
      -
      -
      -

      Examples

      -

      The source of the files in the examples directory are -automatically included in the HTML docs. An image is generated and -included for all examples in the api and pylab_examples -directories. To exclude the example from having an image rendered, -insert the following special comment anywhere in the script:

      -
      # -*- noplot -*-
      -
      -
      -
      -
      -

      Animations

      -

      We have a matplotlib google/gmail account with username mplgithub -which we used to setup the github account but can be used for other -purposes, like hosting google docs or youtube videos. You can embed a -matplotlib animation in the docs by first saving the animation as a -movie using matplotlib.animation.Animation.save(), and then -uploading to matplotlib’s youtube -channel and inserting the -embedding string youtube provides like:

      -
      .. raw:: html
      -
      -   <iframe width="420" height="315"
      -     src="http://www.youtube.com/embed/32cjc6V0OZY"
      -     frameborder="0" allowfullscreen>
      -   </iframe>
      -
      -

      An example save command to generate a movie looks like this

      -
      ani = animation.FuncAnimation(fig, animate, np.arange(1, len(y)),
      -    interval=25, blit=True, init_func=init)
      -
      -ani.save('double_pendulum.mp4', fps=15)
      -
      -
      -

      Contact John Hunter for the login password to upload youtube videos of -google docs to the mplgithub account.

      -
      -
      -
      -

      Referring to mpl documents

      -

      In the documentation, you may want to include to a document in the -matplotlib src, e.g., a license file or an image file from mpl-data, -refer to it via a relative path from the document where the rst file -resides, eg, in users/navigation_toolbar.rst, we refer to the -image icons with:

      -
      .. image:: ../../lib/matplotlib/mpl-data/images/subplots.png
      -
      -

      In the users subdirectory, if I want to refer to a file in the mpl-data -directory, I use the symlink directory. For example, from -customizing.rst:

      -
      .. literalinclude:: ../../lib/matplotlib/mpl-data/matplotlibrc
      -
      -

      One exception to this is when referring to the examples dir. Relative -paths are extremely confusing in the sphinx plot extensions, so -without getting into the dirty details, it is easier to simply include -a symlink to the files at the top doc level directory. This way, API -documents like matplotlib.pyplot.plot() can refer to the -examples in a known location.

      -

      In the top level doc directory we have symlinks pointing to -the mpl examples:

      -
      home:~/mpl/doc> ls -l mpl_*
      -mpl_examples -> ../examples
      -
      -

      So we can include plots from the examples dir using the symlink:

      -
      .. plot:: mpl_examples/pylab_examples/simple_plot.py
      -
      -

      We used to use a symlink for mpl-data too, but the distro -becomes very large on platforms that do not support links (eg the font -files are duplicated and large)

      -
      -
      -

      Internal section references

      -

      To maximize internal consistency in section labeling and references, -use hyphen separated, descriptive labels for section references, eg:

      -
      .. _howto-webapp:
      -
      -

      and refer to it using the standard reference syntax:

      -
      See :ref:`howto-webapp`
      -
      -

      Keep in mind that we may want to reorganize the contents later, so -let’s avoid top level names in references like user or devel -or faq unless necessary, because for example the FAQ “what is a -backend?” could later become part of the users guide, so the label:

      -
      .. _what-is-a-backend
      -
      -

      is better than:

      -
      .. _faq-backend
      -
      -

      In addition, since underscores are widely used by Sphinx itself, let’s prefer -hyphens to separate words.

      -
      -
      -

      Section names, etc

      -

      For everything but top level chapters, please use Upper lower for -section titles, eg Possible hangups rather than Possible -Hangups

      -
      -
      -

      Inheritance diagrams

      -

      Class inheritance diagrams can be generated with the -inheritance-diagram directive. To use it, you provide the -directive with a number of class or module names (separated by -whitespace). If a module name is provided, all classes in that module -will be used. All of the ancestors of these classes will be included -in the inheritance diagram.

      -

      A single option is available: parts controls how many of parts in -the path to the class are shown. For example, if parts == 1, the -class matplotlib.patches.Patch is shown as Patch. If parts -== 2, it is shown as patches.Patch. If parts == 0, the full -path is shown.

      -

      Example:

      -
      .. inheritance-diagram:: matplotlib.patches matplotlib.lines matplotlib.text
      -   :parts: 2
      -
      -

      -Inheritance diagram of matplotlib.patches, matplotlib.lines, matplotlib.text - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

      -
      -
      -

      Emacs helpers

      -

      There is an emacs mode rst.el which -automates many important ReST tasks like building and updating -table-of-contents, and promoting or demoting section headings. Here -is the basic .emacs configuration:

      -
      (require 'rst)
      -(setq auto-mode-alist
      -      (append '(("\\.txt$" . rst-mode)
      -                ("\\.rst$" . rst-mode)
      -                ("\\.rest$" . rst-mode)) auto-mode-alist))
      -
      -

      Some helpful functions:

      -
      C-c TAB - rst-toc-insert
      -
      -  Insert table of contents at point
      -
      -C-c C-u - rst-toc-update
      -
      -    Update the table of contents at point
      -
      -C-c C-l rst-shift-region-left
      -
      -    Shift region to the left
      -
      -C-c C-r rst-shift-region-right
      -
      -    Shift region to the right
      -
      -
      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/devel/gitwash/configure_git.html b/dev/devel/gitwash/configure_git.html deleted file mode 100644 index 5ff67feab6b..00000000000 --- a/dev/devel/gitwash/configure_git.html +++ /dev/null @@ -1,291 +0,0 @@ - - - - - - - - Configure git — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      Table Of Contents

      - - -

      Previous topic

      -

      Set up your fork

      -

      Next topic

      -

      Development workflow

      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      Configure git

      -
      -

      Overview

      -

      Your personal git configurations are saved in the .gitconfig file in -your home directory. -Here is an example .gitconfig file:

      -
      [user]
      -        name = Your Name
      -        email = you@yourdomain.example.com
      -
      -[alias]
      -        ci = commit -a
      -        co = checkout
      -        st = status -a
      -        stat = status -a
      -        br = branch
      -        wdiff = diff --color-words
      -
      -[core]
      -        editor = vim
      -
      -[merge]
      -        summary = true
      -
      -[apply]
      -        whitespace = fix
      -
      -[core]
      -        autocrlf = input
      -
      -

      You can edit this file directly or you can use the git config --global -command:

      -
      git config --global user.name "Your Name"
      -git config --global user.email you@yourdomain.example.com
      -git config --global alias.ci "commit -a"
      -git config --global alias.co checkout
      -git config --global alias.st "status -a"
      -git config --global alias.stat "status -a"
      -git config --global alias.br branch
      -git config --global alias.wdiff "diff --color-words"
      -git config --global core.editor vim
      -git config --global merge.summary true
      -
      -

      To set up on another computer, you can copy your ~/.gitconfig file, -or run the commands above.

      -
      -
      -

      In detail

      -
      -

      user.name and user.email

      -

      It is good practice to tell git who you are, for labeling any changes -you make to the code. The simplest way to do this is from the command -line:

      -
      git config --global user.name "Your Name"
      -git config --global user.email you@yourdomain.example.com
      -
      -

      This will write the settings into your git configuration file, which -should now contain a user section with your name and email:

      -
      [user]
      -      name = Your Name
      -      email = you@yourdomain.example.com
      -
      -

      Of course you’ll need to replace Your Name and you@yourdomain.example.com -with your actual name and email address.

      -
      -
      -

      Aliases

      -

      You might well benefit from some aliases to common commands.

      -

      For example, you might well want to be able to shorten git checkout -to git co. Or you may want to alias git diff --color-words -(which gives a nicely formatted output of the diff) to git wdiff

      -

      The following git config --global commands:

      -
      git config --global alias.ci "commit -a"
      -git config --global alias.co checkout
      -git config --global alias.st "status -a"
      -git config --global alias.stat "status -a"
      -git config --global alias.br branch
      -git config --global alias.wdiff "diff --color-words"
      -
      -

      will create an alias section in your .gitconfig file with contents -like this:

      -
      [alias]
      -        ci = commit -a
      -        co = checkout
      -        st = status -a
      -        stat = status -a
      -        br = branch
      -        wdiff = diff --color-words
      -
      -
      -
      -

      Editor

      -

      You may also want to make sure that your editor of choice is used

      -
      git config --global core.editor vim
      -
      -
      -
      -

      Merging

      -

      To enforce summaries when doing merges (~/.gitconfig file again):

      -
      [merge]
      -   log = true
      -
      -

      Or from the command line:

      -
      git config --global merge.log true
      -
      -
      -
      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/devel/gitwash/development_workflow.html b/dev/devel/gitwash/development_workflow.html deleted file mode 100644 index 33e93d2795a..00000000000 --- a/dev/devel/gitwash/development_workflow.html +++ /dev/null @@ -1,478 +0,0 @@ - - - - - - - - Development workflow — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - - - -
      -
      -
      -
      - -
      -

      Development workflow

      -

      You already have your own forked copy of the matplotlib repository, by -following Making your own copy (fork) of matplotlib, Set up your fork, and you have configured -git by following Configure git.

      -
      -

      Workflow summary

      -
        -
      • Keep your master branch clean of edits that have not been merged -to the main matplotlib development repo. Your master then will follow -the main matplotlib repository.
      • -
      • Start a new feature branch for each set of edits that you do.
      • -
      • If you can avoid it, try not to merge other branches into your feature -branch while you are working.
      • -
      • Ask for review!
      • -
      -

      This way of working really helps to keep work well organized, and in -keeping history as clear as possible.

      -

      See — for example — linux git workflow.

      -
      -
      -

      Making a new feature branch

      -
      git checkout -b my-new-feature master
      -
      -

      This will create and immediately check out a feature branch based on -master. To create a feature branch based on a maintenance branch, -use:

      -
      git fetch origin
      -git checkout -b my-new-feature origin/v1.0.x
      -
      -

      Generally, you will want to keep this also on your public github fork -of matplotlib. To do this, you git push this new branch up to your github -repo. Generally (if you followed the instructions in these pages, and -by default), git will have a link to your github repo, called -origin. You push up to your own repo on github with:

      -
      git push origin my-new-feature
      -
      -

      You will need to use this exact command, rather than simply git -push every time you want to push changes on your feature branch to -your github repo. However, in git >1.7 you can set up a link by -using the --set-upstream option:

      -
      git push --set-upstream origin my-new-feature
      -
      -

      and then next time you need to push changes to your branch a simple -git push will suffice. Note that git push pushes out all -branches that are linked to a remote branch.

      -
      -
      -

      The editing workflow

      -
      -

      Overview

      -
      # hack hack
      -git add my_new_file
      -git commit -am 'NF - some message'
      -git push
      -
      -
      -
      -

      In more detail

      -
        -
      1. Make some changes

        -
      2. -
      3. See which files have changed with git status (see git status). -You’ll see a listing like this one:

        -
        # On branch ny-new-feature
        -# Changed but not updated:
        -#   (use "git add <file>..." to update what will be committed)
        -#   (use "git checkout -- <file>..." to discard changes in working directory)
        -#
        -#  modified:   README
        -#
        -# Untracked files:
        -#   (use "git add <file>..." to include in what will be committed)
        -#
        -#  INSTALL
        -no changes added to commit (use "git add" and/or "git commit -a")
        -
        -
      4. -
      5. Check what the actual changes are with git diff (git diff).

        -
      6. -
      7. Add any new files to version control git add new_file_name (see -git add).

        -
      8. -
      9. To commit all modified files into the local copy of your repo,, do -git commit -am 'A commit message'. Note the -am options to -commit. The m flag just signals that you’re going to type a -message on the command line. The a flag — you can just take on -faith — or see why the -a flag? — and the helpful use-case -description in the tangled working copy problem. The git commit manual -page might also be useful.

        -
      10. -
      11. To push the changes up to your forked repo on github, do a git -push (see git push).

        -
      12. -
      -
      -
      -
      -

      Asking for code review

      -
        -
      1. Go to your repo URL — e.g., -http://github.com/your-user-name/matplotlib.

        -
      2. -
      3. Click on the Branch list button:

        -../../_images/branch_list.png -
      4. -
      5. Click on the Compare button for your feature branch — here my-new-feature:

        -../../_images/branch_list_compare.png -
      6. -
      7. If asked, select the base and comparison branch names you want to -compare. Usually these will be master and my-new-feature -(where that is your feature branch name).

        -
      8. -
      9. At this point you should get a nice summary of the changes. Copy the -URL for this, and post it to the matplotlib mailing list, asking for -review. The URL will look something like: -http://github.com/your-user-name/matplotlib/compare/master...my-new-feature. -There’s an example at -http://github.com/matthew-brett/nipy/compare/master...find-install-data -See: http://github.com/blog/612-introducing-github-compare-view for -more detail.

        -
      10. -
      -

      The generated comparison, is between your feature branch -my-new-feature, and the place in master from which you branched -my-new-feature. In other words, you can keep updating master -without interfering with the output from the comparison. More detail? -Note the three dots in the URL above (master...my-new-feature) and -see Two and three dots in difference specs.

      -

      It’s a good idea to consult the Pull request checklist to make -sure your pull request is ready for merging.

      -
      -
      -

      Asking for your changes to be merged into the main repo

      -

      When you are ready to ask for the merge of your code:

      -
        -
      1. Go to the URL of your forked repo, say -http://github.com/your-user-name/matplotlib.git.

        -
      2. -
      3. Click on the ‘Pull request’ button:

        -../../_images/pull_button.png -

        Enter a message; we suggest you select only matplotlib as the -recipient. The message will go to the matplotlib mailing list. Please -feel free to add others from the list as you like.

        -
      4. -
      5. If the branch is to be merged into a maintenance branch on the main -repo, make sure the “base branch” indicates the maintenance branch -and not master. Github can not automatically determine the branch -to merge into.

        -
      6. -
      -
      -
      -

      Staying up to date with changes in the central repository

      -

      This updates your working copy from the upstream matplotlib github -repo.

      -
      -

      Overview

      -
      # go to your master branch
      -git checkout master
      -# pull changes from github
      -git fetch upstream
      -# merge from upstream
      -git merge --ff-only upstream/master
      -
      -
      -
      -

      In detail

      -

      We suggest that you do this only for your master branch, and leave -your ‘feature’ branches unmerged, to keep their history as clean as -possible. This makes code review easier:

      -
      git checkout master
      -
      -

      Make sure you have done Linking your repository to the upstream repo.

      -

      Merge the upstream code into your current development by first pulling -the upstream repo to a copy on your local machine:

      -
      git fetch upstream
      -
      -

      then merging into your current branch:

      -
      git merge --ff-only upstream/master
      -
      -

      The --ff-only option guarantees that if you have mistakenly -committed code on your master branch, the merge fails at this point. -If you were to merge upstream/master to your master, you -would start to diverge from the upstream. If this command fails, see -the section on accidents.

      -

      The letters ‘ff’ in --ff-only mean ‘fast forward’, which is a -special case of merge where git can simply update your branch to point -to the other branch and not do any actual merging of files. For -master and other integration branches this is exactly what you -want.

      -
      -
      -

      Other integration branches

      -

      Some people like to keep separate local branches corresponding to the -maintenance branches on github. At the time of this writing, v1.0.x -is the active maintenance branch. If you have such a local branch, -treat is just as master: don’t commit on it, and before starting -new branches off of it, update it from upstream:

      -
      git checkout v1.0.x
      -git fetch upstream
      -git merge --ff-only upstream/v1.0.x
      -
      -

      But you don’t necessarily have to have such a branch. Instead, if you -are preparing a bugfix that applies to the maintenance branch, fetch -from upstream and base your bugfix on the remote branch:

      -
      git fetch upstream
      -git checkout -b my-bug-fix upstream/v1.0.x
      -
      -
      -
      -

      Recovering from accidental commits on master

      -

      If you have accidentally committed changes on master and -git merge --ff-only fails, don’t panic! First find out how much -you have diverged:

      -
      git diff upstream/master...master
      -
      -

      If you find that you want simply to get rid of the changes, reset -your master branch to the upstream version:

      -
      git reset --hard upstream/master
      -
      -

      As you might surmise from the words ‘reset’ and ‘hard’, this command -actually causes your changes to the current branch to be lost, so -think twice.

      -

      If, on the other hand, you find that you want to preserve the changes, -create a feature branch for them:

      -
      git checkout -b my-important-changes
      -
      -

      Now my-important-changes points to the branch that has your -changes, and you can safely reset master as above — but -make sure to reset the correct branch:

      -
      git checkout master
      -git reset --hard upstream/master
      -
      -
      -
      -
      -

      Deleting a branch on github

      -
      git checkout master
      -# delete branch locally
      -git branch -D my-unwanted-branch
      -# delete branch on github
      -git push origin :my-unwanted-branch
      -
      -

      (Note the colon : before test-branch. See also: -http://github.com/guides/remove-a-remote-branch

      -
      -
      -

      Several people sharing a single repository

      -

      If you want to work on some stuff with other people, where you are all -committing into the same repository, or even the same branch, then just -share it via github.

      -

      First fork matplotlib into your account, as from Making your own copy (fork) of matplotlib.

      -

      Then, go to your forked repository github page, say -http://github.com/your-user-name/matplotlib

      -

      Click on the ‘Admin’ button, and add anyone else to the repo as a -collaborator:

      -
      -
      ../../_images/pull_button.png -
      -

      Now all those people can do:

      -
      git clone git@githhub.com:your-user-name/matplotlib.git
      -
      -

      Remember that links starting with git@ use the ssh protocol and are -read-write; links starting with git:// are read-only.

      -

      Your collaborators can then commit directly into that repo with the -usual:

      -
      git commit -am 'ENH - much better code'
      -git push origin master # pushes directly into your repo
      -
      -
      -
      -

      Exploring your repository

      -

      To see a graphical representation of the repository branches and -commits:

      -
      gitk --all
      -
      -
      -

      To see a linear list of commits for this branch:

      -
      git log
      -
      -

      You can also look at the network graph visualizer for your github -repo.

      -
      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/devel/gitwash/dot2_dot3.html b/dev/devel/gitwash/dot2_dot3.html deleted file mode 100644 index edabf3cdbcd..00000000000 --- a/dev/devel/gitwash/dot2_dot3.html +++ /dev/null @@ -1,160 +0,0 @@ - - - - - - - - Two and three dots in difference specs — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      Two and three dots in difference specs

      -

      Thanks to Yarik Halchenko for this explanation.

      -

      Imagine a series of commits A, B, C, D... Imagine that there are two -branches, topic and master. You branched topic off master when -master was at commit ‘E’. The graph of the commits looks like this:

      -
           A---B---C topic
      -     /
      -D---E---F---G master
      -
      -

      Then:

      -
      git diff master..topic
      -
      -

      will output the difference from G to C (i.e. with effects of F and G), -while:

      -
      git diff master...topic
      -
      -

      would output just differences in the topic branch (i.e. only A, B, and -C).

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/devel/gitwash/following_latest.html b/dev/devel/gitwash/following_latest.html deleted file mode 100644 index 3a9a8e9d652..00000000000 --- a/dev/devel/gitwash/following_latest.html +++ /dev/null @@ -1,201 +0,0 @@ - - - - - - - - Following the latest source — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      Table Of Contents

      - - -

      Previous topic

      -

      Install git

      -

      Next topic

      -

      Making a patch

      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      Following the latest source

      -

      These are the instructions if you just want to follow the latest -matplotlib source, but you don’t need to do any development for now.

      -

      The steps are:

      -
        -
      • Install git
      • -
      • get local copy of the git repository from github
      • -
      • update local copy from time to time
      • -
      -
      -

      Get the local copy of the code

      -

      From the command line:

      -
      git clone git://github.com/matplotlib/matplotlib.git
      -
      -

      You now have a copy of the code tree in the new matplotlib directory.

      -
      -
      -

      Updating the code

      -

      From time to time you may want to pull down the latest code. Do this with:

      -
      cd matplotlib
      -git pull
      -
      -

      The tree in matplotlib will now have the latest changes from the initial -repository.

      -
      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/devel/gitwash/forking_hell.html b/dev/devel/gitwash/forking_hell.html deleted file mode 100644 index 886205176ff..00000000000 --- a/dev/devel/gitwash/forking_hell.html +++ /dev/null @@ -1,203 +0,0 @@ - - - - - - - - Making your own copy (fork) of matplotlib — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      Table Of Contents

      - - -

      Previous topic

      -

      Git for development

      -

      Next topic

      -

      Set up your fork

      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      Making your own copy (fork) of matplotlib

      -

      You need to do this only once. The instructions here are very similar -to the instructions at http://help.github.com/forking/ — please see -that page for more detail. We’re repeating some of it here just to give the -specifics for the matplotlib project, and to suggest some default names.

      -
      -

      Set up and configure a github account

      -

      If you don’t have a github account, go to the github page, and make one.

      -

      You then need to configure your account to allow write access — see -the Generating SSH keys help on github help.

      -
      -
      -

      Create your own forked copy of matplotlib

      -
        -
      1. Log into your github account.

        -
      2. -
      3. Go to the matplotlib github home at matplotlib github.

        -
      4. -
      5. Click on the fork button:

        -../../_images/forking_button.png -

        Now, after a short pause and some ‘Hardcore forking action’, you -should find yourself at the home page for your own forked copy of matplotlib.

        -
      6. -
      -
      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/devel/gitwash/git_development.html b/dev/devel/gitwash/git_development.html deleted file mode 100644 index ca4b1c453b4..00000000000 --- a/dev/devel/gitwash/git_development.html +++ /dev/null @@ -1,200 +0,0 @@ - - - - - - - - Git for development — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      Previous topic

      -

      Making a patch

      -

      Next topic

      -

      Making your own copy (fork) of matplotlib

      -

      This Page

      - - - -
      -
      - - - - - - \ No newline at end of file diff --git a/dev/devel/gitwash/git_install.html b/dev/devel/gitwash/git_install.html deleted file mode 100644 index 3c762f9bdfc..00000000000 --- a/dev/devel/gitwash/git_install.html +++ /dev/null @@ -1,206 +0,0 @@ - - - - - - - - Install git — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      Table Of Contents

      - - -

      Previous topic

      -

      Introduction

      -

      Next topic

      -

      Following the latest source

      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      Install git

      -
      -

      Overview

      - ---- - - - - - - - - - - - - - - -
      Debian / Ubuntusudo apt-get install git-core
      Fedorasudo yum install git-core
      WindowsDownload and install msysGit
      OS XUse the git-osx-installer
      -
      -
      -

      In detail

      -

      See the git page for the most recent information.

      -

      Have a look at the github install help pages available from github help

      -

      There are good instructions here: http://book.git-scm.com/2_installing_git.html

      -
      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/devel/gitwash/git_intro.html b/dev/devel/gitwash/git_intro.html deleted file mode 100644 index d324f2fc8b4..00000000000 --- a/dev/devel/gitwash/git_intro.html +++ /dev/null @@ -1,177 +0,0 @@ - - - - - - - - Introduction — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      Previous topic

      -

      Working with matplotlib source code

      -

      Next topic

      -

      Install git

      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      Introduction

      -

      These pages describe a git and github workflow for the matplotlib -project.

      -

      There are several different workflows here, for different ways of -working with matplotlib.

      -

      This is not a comprehensive git reference, it’s just a workflow for our -own project. It’s tailored to the github hosting service. You may well -find better or quicker ways of getting stuff done with git, but these -should get you started.

      -

      For general resources for learning git see git resources.

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/devel/gitwash/git_resources.html b/dev/devel/gitwash/git_resources.html deleted file mode 100644 index 655e9bb4d75..00000000000 --- a/dev/devel/gitwash/git_resources.html +++ /dev/null @@ -1,231 +0,0 @@ - - - - - - - - git resources — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      Table Of Contents

      - - -

      Previous topic

      -

      Development workflow

      -

      Next topic

      -

      Testing

      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      git resources

      -
      -

      Tutorials and summaries

      - -
      -
      -

      Advanced git workflow

      -

      There are many ways of working with git; here are some posts on the -rules of thumb that other projects have come up with:

      -
        -
      • Linus Torvalds on git management
      • -
      • Linus Torvalds on linux git workflow . Summary; use the git tools -to make the history of your edits as clean as possible; merge from -upstream edits as little as possible in branches where you are doing -active development.
      • -
      -
      -
      -

      Manual pages online

      -

      You can get these on your own machine with (e.g) git help push or -(same thing) git push --help, but, for convenience, here are the -online manual pages for some common commands:

      - -
      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/devel/gitwash/index.html b/dev/devel/gitwash/index.html deleted file mode 100644 index c7a49d8ee14..00000000000 --- a/dev/devel/gitwash/index.html +++ /dev/null @@ -1,200 +0,0 @@ - - - - - - - - Working with matplotlib source code — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      Previous topic

      -

      Licenses

      -

      Next topic

      -

      Introduction

      -

      This Page

      - - - -
      -
      - - - - - - \ No newline at end of file diff --git a/dev/devel/gitwash/patching.html b/dev/devel/gitwash/patching.html deleted file mode 100644 index 64349304f3d..00000000000 --- a/dev/devel/gitwash/patching.html +++ /dev/null @@ -1,296 +0,0 @@ - - - - - - - - Making a patch — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      Table Of Contents

      - - -

      Previous topic

      -

      Following the latest source

      -

      Next topic

      -

      Git for development

      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      Making a patch

      -

      You’ve discovered a bug or something else you want to change -in matplotlib .. — excellent!

      -

      You’ve worked out a way to fix it — even better!

      -

      You want to tell us about it — best of all!

      -

      The easiest way is to make a patch or set of patches. Here -we explain how. Making a patch is the simplest and quickest, -but if you’re going to be doing anything more than simple -quick things, please consider following the -Git for development model instead.

      -
      -

      Making patches

      -
      -

      Overview

      -
      # tell git who you are
      -git config --global user.email you@yourdomain.example.com
      -git config --global user.name "Your Name Comes Here"
      -# get the repository if you don't have it
      -git clone git://github.com/matplotlib/matplotlib.git
      -# make a branch for your patching
      -cd matplotlib
      -git branch the-fix-im-thinking-of
      -git checkout the-fix-im-thinking-of
      -# hack, hack, hack
      -# Tell git about any new files you've made
      -git add somewhere/tests/test_my_bug.py
      -# commit work in progress as you go
      -git commit -am 'BF - added tests for Funny bug'
      -# hack hack, hack
      -git commit -am 'BF - added fix for Funny bug'
      -# make the patch files
      -git format-patch -M -C master
      -
      -

      Then, send the generated patch files to the matplotlib -mailing list — where we will thank you warmly.

      -
      -
      -

      In detail

      -
        -
      1. Tell git who you are so it can label the commits you’ve -made:

        -
        git config --global user.email you@yourdomain.example.com
        -git config --global user.name "Your Name Comes Here"
        -
        -
      2. -
      3. If you don’t already have one, clone a copy of the -matplotlib repository:

        -
        git clone git://github.com/matplotlib/matplotlib.git
        -cd matplotlib
        -
        -
      4. -
      5. Make a ‘feature branch’. This will be where you work on -your bug fix. It’s nice and safe and leaves you with -access to an unmodified copy of the code in the main -branch:

        -
        git branch the-fix-im-thinking-of
        -git checkout the-fix-im-thinking-of
        -
        -
      6. -
      7. Do some edits, and commit them as you go:

        -
        # hack, hack, hack
        -# Tell git about any new files you've made
        -git add somewhere/tests/test_my_bug.py
        -# commit work in progress as you go
        -git commit -am 'BF - added tests for Funny bug'
        -# hack hack, hack
        -git commit -am 'BF - added fix for Funny bug'
        -
        -

        Note the -am options to commit. The m flag just -signals that you’re going to type a message on the command -line. The a flag — you can just take on faith — -or see why the -a flag?.

        -
      8. -
      9. When you have finished, check you have committed all your -changes:

        -
        git status
        -
        -
      10. -
      11. Finally, make your commits into patches. You want all the -commits since you branched from the master branch:

        -
        git format-patch -M -C master
        -
        -

        You will now have several files named for the commits:

        -
        0001-BF-added-tests-for-Funny-bug.patch
        -0002-BF-added-fix-for-Funny-bug.patch
        -
        -

        Send these files to the matplotlib mailing list.

        -
      12. -
      -

      When you are done, to switch back to the main copy of the -code, just return to the master branch:

      -
      git checkout master
      -
      -
      -
      -
      -

      Moving from patching to development

      -

      If you find you have done some patches, and you have one or -more feature branches, you will probably want to switch to -development mode. You can do this with the repository you -have.

      -

      Fork the matplotlib repository on githubMaking your own copy (fork) of matplotlib. -Then:

      -
      # checkout and refresh master branch from main repo
      -git checkout master
      -git pull origin master
      -# rename pointer to main repository to 'upstream'
      -git remote rename origin upstream
      -# point your repo to default read / write to your fork on github
      -git remote add origin git@github.com:your-user-name/matplotlib.git
      -# push up any branches you've made and want to keep
      -git push origin the-fix-im-thinking-of
      -
      -

      Then you can, if you want, follow the -Development workflow.

      -
      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/devel/gitwash/set_up_fork.html b/dev/devel/gitwash/set_up_fork.html deleted file mode 100644 index e96e7d878a2..00000000000 --- a/dev/devel/gitwash/set_up_fork.html +++ /dev/null @@ -1,237 +0,0 @@ - - - - - - - - Set up your fork — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      Table Of Contents

      - - -

      Previous topic

      -

      Making your own copy (fork) of matplotlib

      -

      Next topic

      -

      Configure git

      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      Set up your fork

      -

      First you follow the instructions for Making your own copy (fork) of matplotlib.

      -
      -

      Overview

      -
      git clone git@github.com:your-user-name/matplotlib.git
      -cd matplotlib
      -git remote add upstream git://github.com/matplotlib/matplotlib.git
      -
      -
      -
      -

      In detail

      -
      -

      Clone your fork

      -
        -
      1. Clone your fork to the local computer with git clone -git@github.com:your-user-name/matplotlib.git

        -
      2. -
      3. Investigate. Change directory to your new repo: cd matplotlib. Then -git branch -a to show you all branches. You’ll get something -like:

        -
        * master
        -remotes/origin/master
        -
        -

        This tells you that you are currently on the master branch, and -that you also have a remote connection to origin/master. -What remote repository is remote/origin? Try git remote -v to -see the URLs for the remote. They will point to your github fork.

        -

        Now you want to connect to the upstream matplotlib github repository, so -you can merge in changes from trunk.

        -
      4. -
      -
      -
      -

      Linking your repository to the upstream repo

      -
      cd matplotlib
      -git remote add upstream git://github.com/matplotlib/matplotlib.git
      -
      -

      upstream here is just the arbitrary name we’re using to refer to the -main matplotlib repository at matplotlib github.

      -

      Note that we’ve used git:// for the URL rather than git@. The -git:// URL is read only. This means we that we can’t accidentally -(or deliberately) write to the upstream repo, and we are only going to -use it to merge into our own code.

      -

      Note this command needs to be run on every clone of the repository -that you make. It is not tracked in your personal repository on -github.

      -

      Just for your own satisfaction, show yourself that you now have a new -‘remote’, with git remote -v show, giving you something like:

      -
      upstream     git://github.com/matplotlib/matplotlib.git (fetch)
      -upstream     git://github.com/matplotlib/matplotlib.git (push)
      -origin       git@github.com:your-user-name/matplotlib.git (fetch)
      -origin       git@github.com:your-user-name/matplotlib.git (push)
      -
      -
      -
      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/devel/index.html b/dev/devel/index.html deleted file mode 100644 index c42a566b035..00000000000 --- a/dev/devel/index.html +++ /dev/null @@ -1,239 +0,0 @@ - - - - - - - - The Matplotlib Developers’ Guide — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      Previous topic

      -

      Environment Variables

      -

      Next topic

      -

      Coding guide

      -

      This Page

      - - - -
      -
      - - - - - - \ No newline at end of file diff --git a/dev/devel/license.html b/dev/devel/license.html deleted file mode 100644 index d9fb0df7a3f..00000000000 --- a/dev/devel/license.html +++ /dev/null @@ -1,232 +0,0 @@ - - - - - - - - Licenses — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      Table Of Contents

      - - -

      Previous topic

      -

      Coding guide

      -

      Next topic

      -

      Working with matplotlib source code

      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      Licenses

      -

      Matplotlib only uses BSD compatible code. If you bring in code from -another project make sure it has a PSF, BSD, MIT or compatible license -(see the Open Source Initiative licenses page for details on individual -licenses). If it doesn’t, you may consider contacting the author and -asking them to relicense it. GPL and LGPL code are not acceptable in -the main code base, though we are considering an alternative way of -distributing L/GPL code through an separate channel, possibly a -toolkit. If you include code, make sure you include a copy of that -code’s license in the license directory if the code’s license requires -you to distribute the license with it. Non-BSD compatible licenses -are acceptable in matplotlib toolkits (eg basemap), but make sure you -clearly state the licenses you are using.

      -
      -

      Why BSD compatible?

      -

      The two dominant license variants in the wild are GPL-style and -BSD-style. There are countless other licenses that place specific -restrictions on code reuse, but there is an important difference to be -considered in the GPL and BSD variants. The best known and perhaps -most widely used license is the GPL, which in addition to granting you -full rights to the source code including redistribution, carries with -it an extra obligation. If you use GPL code in your own code, or link -with it, your product must be released under a GPL compatible -license. I.e., you are required to give the source code to other -people and give them the right to redistribute it as well. Many of the -most famous and widely used open source projects are released under -the GPL, including linux, gcc, emacs and sage.

      -

      The second major class are the BSD-style licenses (which includes MIT -and the python PSF license). These basically allow you to do whatever -you want with the code: ignore it, include it in your own open source -project, include it in your proprietary product, sell it, -whatever. python itself is released under a BSD compatible license, in -the sense that, quoting from the PSF license page:

      -
      There is no GPL-like "copyleft" restriction. Distributing
      -binary-only versions of Python, modified or not, is allowed. There
      -is no requirement to release any of your source code. You can also
      -write extension modules for Python and provide them only in binary
      -form.
      -
      -

      Famous projects released under a BSD-style license in the permissive -sense of the last paragraph are the BSD operating system, python and -TeX.

      -

      There are several reasons why early matplotlib developers selected a -BSD compatible license. matplotlib is a python extension, and we -choose a license that was based on the python license (BSD -compatible). Also, we wanted to attract as many users and developers -as possible, and many software companies will not use GPL code in -software they plan to distribute, even those that are highly committed -to open source development, such as enthought, out of legitimate concern that use of the -GPL will “infect” their code base by its viral nature. In effect, they -want to retain the right to release some proprietary code. Companies -and institutions who use matplotlib often make significant -contributions, because they have the resources to get a job done, even -a boring one. Two of the matplotlib backends (FLTK and WX) were -contributed by private companies. The final reason behind the -licensing choice is compatibility with the other python extensions for -scientific computing: ipython, numpy, scipy, the enthought tool suite -and python itself are all distributed under BSD compatible licenses.

      -
      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/devel/release_guide.html b/dev/devel/release_guide.html deleted file mode 100644 index fefedd086da..00000000000 --- a/dev/devel/release_guide.html +++ /dev/null @@ -1,370 +0,0 @@ - - - - - - - - Doing a matplotlib release — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      Table Of Contents

      - - -

      Previous topic

      -

      Documenting matplotlib

      -

      Next topic

      -

      Working with transformations

      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      Doing a matplotlib release

      -

      A guide for developers who are doing a matplotlib release.

      -
        -
      • Edit __init__.py and bump the version number
      • -
      -
      -

      Testing

      -
        -
      • Run all of the regression tests by running the tests.py script at -the root of the source tree.
      • -
      • Run unit/memleak_hawaii3.py and make sure there are no -memory leaks
      • -
      • try some GUI examples, eg simple_plot.py with GTKAgg, TkAgg, etc...
      • -
      • remove font cache and tex cache from .matplotlib and test -with and without cache on some example script
      • -
      • Optionally, make sure examples/tests/backend_driver.py runs -without errors and check the output of the PNG, PDF, PS and SVG -backends
      • -
      -
      -
      -

      Branching

      -

      Once all the tests are passing and you are ready to do a release, you -need to create a release branch. These only need to be created when -the second part of the version number changes:

      -
      git checkout -b v1.1.x
      -git push git@github.com:matplotlib/matplotlib.git v1.1.x
      -
      -

      On the branch, do any additional testing you want to do, and then build -binaries and source distributions for testing as release candidates.

      -

      For each release candidate as well as for the final release version, -please git tag the commit you will use for packaging like so:

      -
      git tag -a v1.1.0rc1
      -
      -

      The -a flag will allow you to write a message about the tag, and -affiliate your name with it. A reasonable tag message would be something -like v1.1.0 Release Candidate 1 (September 24, 2011). To tag a -release after the fact, just track down the commit hash, and:

      -
      git tag -a v1.0.1rc1 a9f3f3a50745
      -
      -

      Tags allow developers to quickly checkout different releases by name, -and also provides source download via zip and tarball on github.

      -

      Then push the tags to the main repository:

      -
      git push upstream v1.0.1rc1
      -
      -
      -
      -

      Packaging

      -
        -
      • Make sure the MANIFEST.in is up to date and remove -MANIFEST so it will be rebuilt by MANIFEST.in
      • -
      • run git clean in the mpl git directory before building the sdist
      • -
      • unpack the sdist and make sure you can build from that directory
      • -
      • Use setup.cfg to set the default backends. For windows and -OSX, the default backend should be TkAgg. You should also turn on -or off any platform specific build options you need. Importantly, -you also need to make sure that you delete the build dir -after any changes to setup.cfg before rebuilding since cruft -in the build dir can get carried along.
      • -
      • On windows, unix2dos the rc file.
      • -
      • We have a Makefile for the OS X builds in the mpl source dir -release/osx, so use this to prepare the OS X releases.
      • -
      • We have a Makefile for the win32 mingw builds in the mpl source dir -release/win32 which you can use this to prepare the windows -releases.
      • -
      -
      -
      -

      Posting files

      -

      Our current method is for the release manager to collect all of the -binaries from the platform builders and post the files online on -Sourceforge. It is also possible that those building the binaries -could upload to directly to Sourceforge.

      -

      There are many ways to upload files to Sourceforge (scp, rsync, -sftp, and a web interface) described in Sourceforge Release File -System documentation. -Below, we will use sftp.

      -
        -
      1. Create a directory containing all of the release files and cd to it.

        -
      2. -
      3. sftp to Sourceforge:

        -
        sftp USERNAME@frs.sourceforge.net:/home/frs/project/matplotlib/matplotlib
        -
        -
      4. -
      5. Make a new directory for the release and move to it:

        -
        mkdir matplotlib-1.1.0rc1
        -cd matplotlib-1.1.0rc1
        -
        -
      6. -
      7. Upload all of the files in the current directory on your local machine:

        -
        put *
        -
        -
      8. -
      -

      If this release is a final release, the default download for the -matplotlib project should also be updated. Login to Sourceforge and -visit the matplotlib files page. -Navigate to the tarball of the release you just updated, click on -“Details” icon (it looks like a lower case i), and make it the -default download for all platforms.

      -

      There is a list of direct links to downloads on matplotlib’s main -website. This needs to be manually generated and updated every time -new files are posted.

      -
        -
      1. Clone the matplotlib documentation repository and cd into it:

        -
        git clone git@github.com:matplotlib/matplotlib.github.com.git
        -cd matplotlib.github.com
        -
        -
      2. -
      3. Update the list of downloads that you want to display by editing -the downloads.txt file. Generally, this should contain the last two -final releases and any active release candidates.

        -
      4. -
      5. Update the downloads webpage by running the update_downloads.py -script. This script requires paramiko (for sftp support) and -jinja2 for templating. Both of these dependencies can be -installed using pip:

        -
        pip install paramiko
        -pip install jinja2
        -
        -

        Then update the download page:

        -
        ./update_downloads.py
        -
        -

        You will be prompted for your Sourceforge username and password.

        -
      6. -
      7. Commit the changes and push them up to github:

        -
        git commit -m "Updating download list"
        -git push
        -
        -
      8. -
      -
      -
      -

      Update PyPI

      -

      Once the tarball has been posted on Sourceforge, you can register a -link to the new release on PyPI. This should only be done with final -(non-release-candidate) releases, since doing so will hide any -available stable releases.

      -

      You may need to set up your pypirc file as described in the -distutils register command documentation.

      -

      Then updating the record on PyPI is as simple as:

      -
      python setup.py register
      -
      -

      This will hide any previous releases automatically.

      -
      -
      -

      Documentation updates

      -

      The built documentation exists in the matplotlib.github.com repository. -Pushing changes to master automatically updates the website.

      -

      The documentation is organized by version. At the root of the tree is -always the documentation for the latest stable release. Under that, -there are directories containing the documentation for older versions -as well as the bleeding edge release version called dev (usually -based on what’s on master in the github repository, but it may also -temporarily be a staging area for proposed changes). There is also a -symlink directory with the name of the most recently released version -that points to the root. With each new release, these directories may -need to be reorganized accordingly. Any time these version -directories are added or removed, the versions.html file (which -contains a list of the available documentation versions for the user) -must also be updated.

      -

      To make sure everyone’s hard work gets credited, regenerate the github -stats. cd into the tools directory and run:

      -
      python github_stats.py $TAG > ../doc/users/github_stats.rst
      -
      -

      where $TAG is the tag of the last major release. This will generate -stats for all work done since that release.

      -

      In the matplotlib source repository, build the documentation:

      -
      cd doc
      -python make.py html
      -python make.py latex
      -
      -

      Then copy the build products into your local checkout of the -matplotlib.github.com repository (assuming here to be checked out in -com:

      -
      cp -r build/html/* ~/matplotlib.github.com
      -cp build/latex/Matplotlib.pdf ~/matplotlib.github.com
      -
      -

      Then, from the matplotlib.github.com directory, commit and push the -changes upstream:

      -
      git commit -m "Updating for v1.0.1"
      -git push upstream master
      -
      -
      -
      -

      Announcing

      -

      Announce the release on matplotlib-announce, matplotlib-users, and -matplotlib-devel. Final (non-release-candidate) versions should also -be announced on python-announce. Include a summary of highlights from -the CHANGELOG and/or post the whole CHANGELOG since the last release.

      -
      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/devel/testing.html b/dev/devel/testing.html deleted file mode 100644 index 3e414152926..00000000000 --- a/dev/devel/testing.html +++ /dev/null @@ -1,407 +0,0 @@ - - - - - - - - Testing — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      Table Of Contents

      - - -

      Previous topic

      -

      git resources

      -

      Next topic

      -

      Documenting matplotlib

      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      Testing

      -

      Matplotlib has a testing infrastructure based on nose, making it easy -to write new tests. The tests are in matplotlib.tests, and -customizations to the nose testing infrastructure are in -matplotlib.testing. (There is other old testing cruft around, -please ignore it while we consolidate our testing to these locations.)

      -
      -

      Requirements

      -

      The following software is required to run the tests:

      -
      -
      -
      -
      -
      -

      Running the tests

      -

      Running the tests is simple. Make sure you have nose installed and run -the script tests.py in the root directory of the distribution. -The script can take any of the usual nosetest arguments, such as

      - ---- - - - - - - - - - - - -
      -vincrease verbosity
      -ddetailed error messages
      --with-coverageenable collecting coverage information
      -

      To run a single test from the command line, you can provide a -dot-separated path to the module followed by the function separated by -a colon, e.g., (this is assuming the test is installed):

      -
      python tests.py matplotlib.tests.test_simplification:test_clipping
      -
      -

      An alternative implementation that does not look at command line -arguments works from within Python:

      -
      import matplotlib
      -matplotlib.test()
      -
      -
      -

      Running tests by any means other than matplotlib.test() -does not load the nose “knownfailureif” (Known failing tests) plugin, -causing known-failing tests to fail for real.

      -
      -
      -

      Writing a simple test

      -

      Many elements of Matplotlib can be tested using standard tests. For -example, here is a test from matplotlib.tests.test_basic:

      -
      from nose.tools import assert_equal
      -
      -def test_simple():
      -    """
      -    very simple example test
      -    """
      -    assert_equal(1+1,2)
      -
      -
      -

      Nose determines which functions are tests by searching for functions -beginning with “test” in their name.

      -

      If the test has side effects that need to be cleaned up, such as -creating figures using the pyplot interface, use the @cleanup -decorator:

      -
      from matplotlib.testing.decorators import cleanup
      -
      -@cleanup
      -def test_create_figure():
      -    """
      -    very simple example test that creates a figure using pyplot.
      -    """
      -    fig = figure()
      -    ...
      -
      -
      -
      -
      -

      Writing an image comparison test

      -

      Writing an image based test is only slightly more difficult than a -simple test. The main consideration is that you must specify the -“baseline”, or expected, images in the -image_comparison() decorator. For -example, this test generates a single image and automatically tests -it:

      -
      import numpy as np
      -import matplotlib
      -from matplotlib.testing.decorators import image_comparison
      -import matplotlib.pyplot as plt
      -
      -@image_comparison(baseline_images=['spines_axes_positions'])
      -def test_spines_axes_positions():
      -    # SF bug 2852168
      -    fig = plt.figure()
      -    x = np.linspace(0,2*np.pi,100)
      -    y = 2*np.sin(x)
      -    ax = fig.add_subplot(1,1,1)
      -    ax.set_title('centered spines')
      -    ax.plot(x,y)
      -    ax.spines['right'].set_position(('axes',0.1))
      -    ax.yaxis.set_ticks_position('right')
      -    ax.spines['top'].set_position(('axes',0.25))
      -    ax.xaxis.set_ticks_position('top')
      -    ax.spines['left'].set_color('none')
      -    ax.spines['bottom'].set_color('none')
      -
      -
      -

      The first time this test is run, there will be no baseline image to -compare against, so the test will fail. Copy the output images (in -this case result_images/test_category/spines_axes_positions.*) to -the correct subdirectory of baseline_images tree in the source -directory (in this case -lib/matplotlib/tests/baseline_images/test_category). Note carefully -the * at the end: this will copy only the images we need to include -in the git repository. The files ending in _pdf.png and -_svg.png are converted from the pdf and svg originals on the fly -and do not need to be in the respository. Put these new files under -source code revision control (with git add). When rerunning the -tests, they should now pass.

      -

      There are two optional keyword arguments to the image_comparison -decorator:

      -
      -
        -
      • extensions: If you only wish to test some of the image formats -(rather than the default png, svg and pdf formats), pass a -list of the extensions to test.
      • -
      • tol: This is the image matching tolerance, the default 1e-3. -If some variation is expected in the image between runs, this -value may be adjusted.
      • -
      -
      -
      -
      -

      Known failing tests

      -

      If you’re writing a test, you may mark it as a known failing test with -the knownfailureif() -decorator. This allows the test to be added to the test suite and run -on the buildbots without causing undue alarm. For example, although -the following test will fail, it is an expected failure:

      -
      from nose.tools import assert_equal
      -from matplotlib.testing.decorators import knownfailureif
      -
      -@knownfailureif(True)
      -def test_simple_fail():
      -    '''very simple example test that should fail'''
      -    assert_equal(1+1,3)
      -
      -
      -

      Note that the first argument to the -knownfailureif() decorator is a -fail condition, which can be a value such as True, False, or -‘indeterminate’, or may be a dynamically evaluated expression.

      -
      -
      -

      Creating a new module in matplotlib.tests

      -

      We try to keep the tests categorized by the primary module they are -testing. For example, the tests related to the mathtext.py module -are in test_mathtext.py.

      -

      Let’s say you’ve added a new module named whizbang.py and you want -to add tests for it in matplotlib.tests.test_whizbang. To add -this module to the list of default tests, append its name to -default_test_modules in lib/matplotlib/__init__.py.

      -
      -
      -

      Using tox

      -

      Tox is a tool for running tests against -multiple Python environments, including multiple versions of Python -(e.g., 2.6, 2.7, 3.2, etc.) and even different Python implementations -altogether (e.g., CPython, PyPy, Jython, etc.)

      -

      Testing all 4 versions of Python (2.6, 2.7, 3.1, and 3.2) requires -having four versions of Python installed on your system and on the -PATH. Depending on your operating system, you may want to use your -package manager (such as apt-get, yum or MacPorts) to do this, or use -pythonbrew.

      -

      tox makes it easy to determine if your working copy introduced any -regressions before submitting a pull request. Here’s how to use it:

      -
      $ pip install tox
      -$ tox
      -
      -
      -

      You can also run tox on a subset of environments:

      -
      $ tox -e py26,py27
      -
      -
      -

      Tox processes everything serially so it can take a long time to test -several environments. To speed it up, you might try using a new, -parallelized version of tox called detox. Give this a try:

      -
      $ pip install -U -i http://pypi.testrun.org detox
      -$ detox
      -
      -
      -

      Tox is configured using a file called tox.ini. You may need to -edit this file if you want to add new environments to test (e.g., -py33) or if you want to tweak the dependencies or the way the -tests are run. For more info on the tox.ini file, see the Tox -Configuration Specification.

      -
      -
      -

      Using Travis CI

      -

      Travis CI is a hosted CI system “in the -cloud”.

      -

      Travis is configured to receive notifications of new commits to GitHub -repos (via GitHub “service hooks”) and to run builds or tests when it -sees these new commits. It looks for a YAML file called -.travis.yml in the root of the repository to see how to test the -project.

      -

      Travis CI is already enabled for the main matplotlib GitHub -repository – for -example, see its Travis page.

      -

      If you want to enable Travis CI for your personal matplotlib GitHub -repo, simply enable the repo to use Travis CI in either the Travis CI -UI or the GitHub UI (Admin | Service Hooks). For details, see the -Travis CI Getting Started page. This -generally isn’t necessary, since any pull request submitted against -the main matplotlib repository will be tested.

      -

      Once this is configured, you can see the Travis CI results at -http://travis-ci.org/#!/your_GitHub_user_name/matplotlib – here’s an -example.

      -
      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/devel/transformations.html b/dev/devel/transformations.html deleted file mode 100644 index 77a48d49661..00000000000 --- a/dev/devel/transformations.html +++ /dev/null @@ -1,1799 +0,0 @@ - - - - - - - - Working with transformations — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      Table Of Contents

      - - -

      Previous topic

      -

      Doing a matplotlib release

      -

      Next topic

      -

      Adding new scales and projections to matplotlib

      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      Working with transformations

      -

      -Inheritance diagram of matplotlib.transforms, matplotlib.path - - - - - - - - - - - - - - - - - - - - - - - -

      -
      -

      matplotlib.transforms

      -

      matplotlib includes a framework for arbitrary geometric -transformations that is used determine the final position of all -elements drawn on the canvas.

      -

      Transforms are composed into trees of TransformNode objects -whose actual value depends on their children. When the contents of -children change, their parents are automatically invalidated. The -next time an invalidated transform is accessed, it is recomputed to -reflect those changes. This invalidation/caching approach prevents -unnecessary recomputations of transforms, and contributes to better -interactive performance.

      -

      For example, here is a graph of the transform tree used to plot data -to the graph:

      -../_images/transforms.png -

      The framework can be used for both affine and non-affine -transformations. However, for speed, we want use the backend -renderers to perform affine transformations whenever possible. -Therefore, it is possible to perform just the affine or non-affine -part of a transformation on a set of data. The affine is always -assumed to occur after the non-affine. For any transform:

      -
      full transform == non-affine part + affine part
      -
      -

      The backends are not expected to handle non-affine transformations -themselves.

      -
      -
      -class matplotlib.transforms.TransformNode(shorthand_name=None)
      -

      Bases: object

      -

      TransformNode is the base class for anything that -participates in the transform tree and needs to invalidate its -parents or be invalidated. This includes classes that are not -really transforms, such as bounding boxes, since some transforms -depend on bounding boxes to compute their values.

      -

      Creates a new TransformNode.

      -
      -
      shorthand_name - a string representing the “name” of this
      -
      transform. The name carries no significance -other than to improve the readability of -str(transform) when DEBUG=True.
      -
      -
      -
      -frozen()
      -

      Returns a frozen copy of this transform node. The frozen copy -will not update when its children change. Useful for storing -a previously known state of a transform where -copy.deepcopy() might normally be used.

      -
      - -
      -
      -invalidate()
      -

      Invalidate this TransformNode and triggers an -invalidation of its ancestors. Should be called any -time the transform changes.

      -
      - -
      -
      -pass_through = False
      -

      If pass_through is True, all ancestors will always be -invalidated, even if ‘self’ is already invalid.

      -
      - -
      -
      -set_children(*children)
      -

      Set the children of the transform, to let the invalidation -system know which transforms can invalidate this transform. -Should be called from the constructor of any transforms that -depend on other transforms.

      -
      - -
      - -
      -
      -class matplotlib.transforms.BboxBase(shorthand_name=None)
      -

      Bases: matplotlib.transforms.TransformNode

      -

      This is the base class of all bounding boxes, and provides -read-only access to its data. A mutable bounding box is provided -by the Bbox class.

      -

      The canonical representation is as two points, with no -restrictions on their ordering. Convenience properties are -provided to get the left, bottom, right and top edges and width -and height, but these are not stored explicitly.

      -

      Creates a new TransformNode.

      -
      -
      shorthand_name - a string representing the “name” of this
      -
      transform. The name carries no significance -other than to improve the readability of -str(transform) when DEBUG=True.
      -
      -
      -
      -anchored(c, container=None)
      -

      Return a copy of the Bbox, shifted to position c -within a container.

      -

      c: may be either:

      -
      -
        -
      • a sequence (cx, cy) where cx and cy range from 0 -to 1, where 0 is left or bottom and 1 is right or top
      • -
      • a string: -- ‘C’ for centered -- ‘S’ for bottom-center -- ‘SE’ for bottom-left -- ‘E’ for left -- etc.
      • -
      -
      -

      Optional argument container is the box within which the -Bbox is positioned; it defaults to the initial -Bbox.

      -
      - -
      -
      -bounds
      -

      (property) Returns (x0, y0, width, -height).

      -
      - -
      -
      -contains(x, y)
      -

      Returns True if (x, y) is a coordinate inside the -bounding box or on its edge.

      -
      - -
      -
      -containsx(x)
      -

      Returns True if x is between or equal to x0 and -x1.

      -
      - -
      -
      -containsy(y)
      -

      Returns True if y is between or equal to y0 and -y1.

      -
      - -
      -
      -corners()
      -

      Return an array of points which are the four corners of this -rectangle. For example, if this Bbox is defined by -the points (a, b) and (c, d), corners() returns -(a, b), (a, d), (c, b) and (c, d).

      -
      - -
      -
      -count_contains(vertices)
      -

      Count the number of vertices contained in the Bbox.

      -

      vertices is a Nx2 Numpy array.

      -
      - -
      -
      -count_overlaps(bboxes)
      -

      Count the number of bounding boxes that overlap this one.

      -

      bboxes is a sequence of BboxBase objects

      -
      - -
      -
      -expanded(sw, sh)
      -

      Return a new Bbox which is this Bbox -expanded around its center by the given factors sw and -sh.

      -
      - -
      -
      -extents
      -

      (property) Returns (x0, y0, x1, -y1).

      -
      - -
      -
      -frozen()
      -

      TransformNode is the base class for anything that -participates in the transform tree and needs to invalidate its -parents or be invalidated. This includes classes that are not -really transforms, such as bounding boxes, since some transforms -depend on bounding boxes to compute their values.

      -
      - -
      -
      -fully_contains(x, y)
      -

      Returns True if (x, y) is a coordinate inside the bounding -box, but not on its edge.

      -
      - -
      -
      -fully_containsx(x)
      -

      Returns True if x is between but not equal to x0 and -x1.

      -
      - -
      -
      -fully_containsy(y)
      -

      Returns True if y is between but not equal to y0 and -y1.

      -
      - -
      -
      -fully_overlaps(other)
      -

      Returns True if this bounding box overlaps with the given -bounding box other, but not on its edge alone.

      -
      - -
      -
      -height
      -

      (property) The height of the bounding box. It may be negative if -y1 < y0.

      -
      - -
      -
      -static intersection(bbox1, bbox2)
      -

      Return the intersection of the two bboxes or None -if they do not intersect.

      -

      Implements the algorithm described at:

      -
      -
      -
      - -
      -
      -intervalx
      -

      (property) intervalx is the pair of x coordinates that define -the bounding box. It is not guaranteed to be sorted from left to -right.

      -
      - -
      -
      -intervaly
      -

      (property) intervaly is the pair of y coordinates that define -the bounding box. It is not guaranteed to be sorted from bottom to -top.

      -
      - -
      -
      -inverse_transformed(transform)
      -

      Return a new Bbox object, statically transformed by -the inverse of the given transform.

      -
      - -
      -
      -is_unit()
      -

      Returns True if the Bbox is the unit bounding box -from (0, 0) to (1, 1).

      -
      - -
      -
      -max
      -

      (property) max is the top-right corner of the bounding box.

      -
      - -
      -
      -min
      -

      (property) min is the bottom-left corner of the bounding -box.

      -
      - -
      -
      -overlaps(other)
      -

      Returns True if this bounding box overlaps with the given -bounding box other.

      -
      - -
      -
      -p0
      -

      (property) p0 is the first pair of (x, y) coordinates -that define the bounding box. It is not guaranteed to be the -bottom-left corner. For that, use min.

      -
      - -
      -
      -p1
      -

      (property) p1 is the second pair of (x, y) coordinates -that define the bounding box. It is not guaranteed to be the -top-right corner. For that, use max.

      -
      - -
      -
      -padded(p)
      -

      Return a new Bbox that is padded on all four sides by -the given value.

      -
      - -
      -
      -rotated(radians)
      -

      Return a new bounding box that bounds a rotated version of -this bounding box by the given radians. The new bounding box -is still aligned with the axes, of course.

      -
      - -
      -
      -shrunk(mx, my)
      -

      Return a copy of the Bbox, shrunk by the factor mx -in the x direction and the factor my in the y direction. -The lower left corner of the box remains unchanged. Normally -mx and my will be less than 1, but this is not enforced.

      -
      - -
      -
      -shrunk_to_aspect(box_aspect, container=None, fig_aspect=1.0)
      -

      Return a copy of the Bbox, shrunk so that it is as -large as it can be while having the desired aspect ratio, -box_aspect. If the box coordinates are relative—that -is, fractions of a larger box such as a figure—then the -physical aspect ratio of that figure is specified with -fig_aspect, so that box_aspect can also be given as a -ratio of the absolute dimensions, not the relative dimensions.

      -
      - -
      -
      -size
      -

      (property) The width and height of the bounding box. May be negative, -in the same way as width and height.

      -
      - -
      -
      -splitx(*args)
      -

      e.g., bbox.splitx(f1, f2, ...)

      -

      Returns a list of new Bbox objects formed by -splitting the original one with vertical lines at fractional -positions f1, f2, ...

      -
      - -
      -
      -splity(*args)
      -

      e.g., bbox.splitx(f1, f2, ...)

      -

      Returns a list of new Bbox objects formed by -splitting the original one with horizontal lines at fractional -positions f1, f2, ...

      -
      - -
      -
      -transformed(transform)
      -

      Return a new Bbox object, statically transformed by -the given transform.

      -
      - -
      -
      -translated(tx, ty)
      -

      Return a copy of the Bbox, statically translated by -tx and ty.

      -
      - -
      -
      -static union(bboxes)
      -

      Return a Bbox that contains all of the given bboxes.

      -
      - -
      -
      -width
      -

      (property) The width of the bounding box. It may be negative if -x1 < x0.

      -
      - -
      -
      -x0
      -

      (property) x0 is the first of the pair of x coordinates that -define the bounding box. x0 is not guaranteed to be -less than x1. If you require that, use xmin.

      -
      - -
      -
      -x1
      -

      (property) x1 is the second of the pair of x coordinates -that define the bounding box. x1 is not guaranteed to be -greater than x0. If you require that, use xmax.

      -
      - -
      -
      -xmax
      -

      (property) xmax is the right edge of the bounding box.

      -
      - -
      -
      -xmin
      -

      (property) xmin is the left edge of the bounding box.

      -
      - -
      -
      -y0
      -

      (property) y0 is the first of the pair of y coordinates that -define the bounding box. y0 is not guaranteed to be -less than y1. If you require that, use ymin.

      -
      - -
      -
      -y1
      -

      (property) y1 is the second of the pair of y coordinates -that define the bounding box. y1 is not guaranteed to be -greater than y0. If you require that, use ymax.

      -
      - -
      -
      -ymax
      -

      (property) ymax is the top edge of the bounding box.

      -
      - -
      -
      -ymin
      -

      (property) ymin is the bottom edge of the bounding box.

      -
      - -
      - -
      -
      -class matplotlib.transforms.Bbox(points, **kwargs)
      -

      Bases: matplotlib.transforms.BboxBase

      -

      A mutable bounding box.

      -

      points: a 2x2 numpy array of the form [[x0, y0], [x1, y1]]

      -

      If you need to create a Bbox object from another form -of data, consider the static methods unit(), -from_bounds() and from_extents().

      -
      -
      -static from_bounds(x0, y0, width, height)
      -

      (staticmethod) Create a new Bbox from x0, y0, -width and height.

      -

      width and height may be negative.

      -
      - -
      -
      -static from_extents(*args)
      -

      (staticmethod) Create a new Bbox from left, bottom, -right and top.

      -

      The y-axis increases upwards.

      -
      - -
      -
      -get_points()
      -

      Get the points of the bounding box directly as a numpy array -of the form: [[x0, y0], [x1, y1]].

      -
      - -
      -
      -ignore(value)
      -

      Set whether the existing bounds of the box should be ignored -by subsequent calls to update_from_data() or -update_from_data_xy().

      -

      value:

      -
      -
      -
      -
      - -
      -
      -mutated()
      -

      return whether the bbox has changed since init

      -
      - -
      -
      -mutatedx()
      -

      return whether the x-limits have changed since init

      -
      - -
      -
      -mutatedy()
      -

      return whether the y-limits have changed since init

      -
      - -
      -
      -set(other)
      -

      Set this bounding box from the “frozen” bounds of another -Bbox.

      -
      - -
      -
      -set_points(points)
      -

      Set the points of the bounding box directly from a numpy array -of the form: [[x0, y0], [x1, y1]]. No error checking is -performed, as this method is mainly for internal use.

      -
      - -
      -
      -static unit()
      -

      (staticmethod) Create a new unit Bbox from (0, 0) to -(1, 1).

      -
      - -
      -
      -update_from_data(x, y, ignore=None)
      -

      Update the bounds of the Bbox based on the passed in -data. After updating, the bounds will have positive width -and height; x0 and y0 will be the minimal values.

      -

      x: a numpy array of x-values

      -

      y: a numpy array of y-values

      -
      -
      ignore:
      -
        -
      • when True, ignore the existing bounds of the Bbox.
      • -
      • when False, include the existing bounds of the Bbox.
      • -
      • when None, use the last value passed to ignore().
      • -
      -
      -
      -
      - -
      -
      -update_from_data_xy(xy, ignore=None, updatex=True, updatey=True)
      -

      Update the bounds of the Bbox based on the passed in -data. After updating, the bounds will have positive width -and height; x0 and y0 will be the minimal values.

      -

      xy: a numpy array of 2D points

      -
      -
      ignore:
      -
        -
      • when True, ignore the existing bounds of the Bbox.
      • -
      • when False, include the existing bounds of the Bbox.
      • -
      • when None, use the last value passed to ignore().
      • -
      -
      -
      -

      updatex: when True, update the x values

      -

      updatey: when True, update the y values

      -
      - -
      -
      -update_from_path(path, ignore=None, updatex=True, updatey=True)
      -

      Update the bounds of the Bbox based on the passed in -data. After updating, the bounds will have positive width -and height; x0 and y0 will be the minimal values.

      -

      path: a Path instance

      -
      -
      ignore:
      -
        -
      • when True, ignore the existing bounds of the Bbox.
      • -
      • when False, include the existing bounds of the Bbox.
      • -
      • when None, use the last value passed to ignore().
      • -
      -
      -
      -

      updatex: when True, update the x values

      -

      updatey: when True, update the y values

      -
      - -
      - -
      -
      -class matplotlib.transforms.TransformedBbox(bbox, transform, **kwargs)
      -

      Bases: matplotlib.transforms.BboxBase

      -

      A Bbox that is automatically transformed by a given -transform. When either the child bounding box or transform -changes, the bounds of this bbox will update accordingly.

      -

      bbox: a child Bbox

      -

      transform: a 2D Transform

      -
      -
      -get_points()
      -

      Get the points of the bounding box directly as a numpy array -of the form: [[x0, y0], [x1, y1]].

      -
      - -
      - -
      -
      -class matplotlib.transforms.Transform(shorthand_name=None)
      -

      Bases: matplotlib.transforms.TransformNode

      -

      The base class of all TransformNode instances that -actually perform a transformation.

      -

      All non-affine transformations should be subclasses of this class. -New affine transformations should be subclasses of -Affine2D.

      -

      Subclasses of this class should override the following members (at -minimum):

      -
      -
      -

      If the transform needs to do something non-standard with -matplotlib.path.Path objects, such as adding curves -where there were once line segments, it should override:

      -
      -
      -

      Creates a new TransformNode.

      -
      -
      shorthand_name - a string representing the “name” of this
      -
      transform. The name carries no significance -other than to improve the readability of -str(transform) when DEBUG=True.
      -
      -
      -
      -contains_branch(other)
      -

      Return whether the given transform is a sub-tree of this transform.

      -

      This routine uses transform equality to identify sub-trees, therefore -in many situations it is object id which will be used.

      -

      For the case where the given transform represents the whole -of this transform, returns True.

      -
      - -
      -
      -contains_branch_seperately(other_transform)
      -

      Returns whether the given branch is a sub-tree of this transform on -each seperate dimension.

      -

      A common use for this method is to identify if a transform is a blended -transform containing an axes’ data transform. e.g.:

      -
      x_isdata, y_isdata = trans.contains_branch_seperately(ax.transData)
      -
      -
      -
      - -
      -
      -depth
      -

      Returns the number of transforms which have been chained -together to form this Transform instance.

      -
      -

      Note

      -

      For the special case of a Composite transform, the maximum depth -of the two is returned.

      -
      -
      - -
      -
      -get_affine()
      -

      Get the affine part of this transform.

      -
      - -
      -
      -get_matrix()
      -

      Get the Affine transformation array for the affine part -of this transform.

      -
      - -
      -
      -has_inverse = False
      -

      True if this transform has a corresponding inverse transform.

      -
      - -
      -
      -input_dims = None
      -

      The number of input dimensions of this transform. -Must be overridden (with integers) in the subclass.

      -
      - -
      -
      -inverted()
      -

      Return the corresponding inverse transformation.

      -

      The return value of this method should be treated as -temporary. An update to self does not cause a corresponding -update to its inverted copy.

      -

      x === self.inverted().transform(self.transform(x))

      -
      - -
      -
      -is_separable = False
      -

      True if this transform is separable in the x- and y- dimensions.

      -
      - -
      -
      -output_dims = None
      -

      The number of output dimensions of this transform. -Must be overridden (with integers) in the subclass.

      -
      - -
      -
      -transform(values)
      -

      Performs the transformation on the given array of values.

      -

      Accepts a numpy array of shape (N x input_dims) and -returns a numpy array of shape (N x output_dims).

      -
      - -
      -
      -transform_affine(values)
      -

      Performs only the affine part of this transformation on the -given array of values.

      -

      transform(values) is always equivalent to -transform_affine(transform_non_affine(values)).

      -

      In non-affine transformations, this is generally a no-op. In -affine transformations, this is equivalent to -transform(values).

      -

      Accepts a numpy array of shape (N x input_dims) and -returns a numpy array of shape (N x output_dims).

      -
      - -
      -
      -transform_angles(angles, pts, radians=False, pushoff=1e-05)
      -

      Performs transformation on a set of angles anchored at -specific locations.

      -

      The angles must be a column vector (i.e., numpy array).

      -

      The pts must be a two-column numpy array of x,y positions -(angle transforms currently only work in 2D). This array must -have the same number of rows as angles.

      -
      -
      radians indicates whether or not input angles are given in
      -
      radians (True) or degrees (False; the default).
      -
      pushoff is the distance to move away from pts for
      -
      determining transformed angles (see discussion of method -below).
      -
      -

      The transformed angles are returned in an array with the same -size as angles.

      -

      The generic version of this method uses a very generic -algorithm that transforms pts, as well as locations very -close to pts, to find the angle in the transformed system.

      -
      - -
      -
      -transform_non_affine(values)
      -

      Performs only the non-affine part of the transformation.

      -

      transform(values) is always equivalent to -transform_affine(transform_non_affine(values)).

      -

      In non-affine transformations, this is generally equivalent to -transform(values). In affine transformations, this is -always a no-op.

      -

      Accepts a numpy array of shape (N x input_dims) and -returns a numpy array of shape (N x output_dims).

      -
      - -
      -
      -transform_path(path)
      -

      Returns a transformed path.

      -

      path: a Path instance.

      -

      In some cases, this transform may insert curves into the path -that began as line segments.

      -
      - -
      -
      -transform_path_affine(path)
      -

      Returns a path, transformed only by the affine part of -this transform.

      -

      path: a Path instance.

      -

      transform_path(path) is equivalent to -transform_path_affine(transform_path_non_affine(values)).

      -
      - -
      -
      -transform_path_non_affine(path)
      -

      Returns a path, transformed only by the non-affine -part of this transform.

      -

      path: a Path instance.

      -

      transform_path(path) is equivalent to -transform_path_affine(transform_path_non_affine(values)).

      -
      - -
      -
      -transform_point(point)
      -

      A convenience function that returns the transformed copy of a -single point.

      -

      The point is given as a sequence of length input_dims. -The transformed point is returned as a sequence of length -output_dims.

      -
      - -
      - -
      -
      -class matplotlib.transforms.TransformWrapper(child)
      -

      Bases: matplotlib.transforms.Transform

      -

      A helper class that holds a single child transform and acts -equivalently to it.

      -

      This is useful if a node of the transform tree must be replaced at -run time with a transform of a different type. This class allows -that replacement to correctly trigger invalidation.

      -

      Note that TransformWrapper instances must have the same -input and output dimensions during their entire lifetime, so the -child transform may only be replaced with another child transform -of the same dimensions.

      -

      child: A class:Transform instance. This child may later -be replaced with set().

      -
      -
      -frozen()
      -

      Returns a frozen copy of this transform node. The frozen copy -will not update when its children change. Useful for storing -a previously known state of a transform where -copy.deepcopy() might normally be used.

      -
      - -
      -
      -set(child)
      -

      Replace the current child of this transform with another one.

      -

      The new child must have the same number of input and output -dimensions as the current child.

      -
      - -
      - -
      -
      -class matplotlib.transforms.AffineBase(*args, **kwargs)
      -

      Bases: matplotlib.transforms.Transform

      -

      The base class of all affine transformations of any number of -dimensions.

      -
      -
      -get_affine()
      -

      Get the affine part of this transform.

      -
      - -
      -
      -transform(values)
      -

      Performs the transformation on the given array of values.

      -

      Accepts a numpy array of shape (N x input_dims) and -returns a numpy array of shape (N x output_dims).

      -
      - -
      -
      -transform_affine(values)
      -

      Performs only the affine part of this transformation on the -given array of values.

      -

      transform(values) is always equivalent to -transform_affine(transform_non_affine(values)).

      -

      In non-affine transformations, this is generally a no-op. In -affine transformations, this is equivalent to -transform(values).

      -

      Accepts a numpy array of shape (N x input_dims) and -returns a numpy array of shape (N x output_dims).

      -
      - -
      -
      -transform_non_affine(points)
      -

      Performs only the non-affine part of the transformation.

      -

      transform(values) is always equivalent to -transform_affine(transform_non_affine(values)).

      -

      In non-affine transformations, this is generally equivalent to -transform(values). In affine transformations, this is -always a no-op.

      -

      Accepts a numpy array of shape (N x input_dims) and -returns a numpy array of shape (N x output_dims).

      -
      - -
      -
      -transform_path(path)
      -

      Returns a transformed path.

      -

      path: a Path instance.

      -

      In some cases, this transform may insert curves into the path -that began as line segments.

      -
      - -
      -
      -transform_path_affine(path)
      -

      Returns a path, transformed only by the affine part of -this transform.

      -

      path: a Path instance.

      -

      transform_path(path) is equivalent to -transform_path_affine(transform_path_non_affine(values)).

      -
      - -
      -
      -transform_path_non_affine(path)
      -

      Returns a path, transformed only by the non-affine -part of this transform.

      -

      path: a Path instance.

      -

      transform_path(path) is equivalent to -transform_path_affine(transform_path_non_affine(values)).

      -
      - -
      - -
      -
      -class matplotlib.transforms.Affine2DBase(*args, **kwargs)
      -

      Bases: matplotlib.transforms.AffineBase

      -

      The base class of all 2D affine transformations.

      -

      2D affine transformations are performed using a 3x3 numpy array:

      -
      a c e
      -b d f
      -0 0 1
      -
      -

      This class provides the read-only interface. For a mutable 2D -affine transformation, use Affine2D.

      -

      Subclasses of this class will generally only need to override a -constructor and get_matrix() that generates a custom 3x3 matrix.

      -
      -
      -frozen()
      -

      Returns a frozen copy of this transform node. The frozen copy -will not update when its children change. Useful for storing -a previously known state of a transform where -copy.deepcopy() might normally be used.

      -
      - -
      -
      -inverted()
      -

      Return the corresponding inverse transformation.

      -

      The return value of this method should be treated as -temporary. An update to self does not cause a corresponding -update to its inverted copy.

      -

      x === self.inverted().transform(self.transform(x))

      -
      - -
      -
      -static matrix_from_values(a, b, c, d, e, f)
      -

      (staticmethod) Create a new transformation matrix as a 3x3 -numpy array of the form:

      -
      a c e
      -b d f
      -0 0 1
      -
      -
      - -
      -
      -to_values()
      -

      Return the values of the matrix as a sequence (a,b,c,d,e,f)

      -
      - -
      -
      -transform_affine(points)
      -

      Performs only the affine part of this transformation on the -given array of values.

      -

      transform(values) is always equivalent to -transform_affine(transform_non_affine(values)).

      -

      In non-affine transformations, this is generally a no-op. In -affine transformations, this is equivalent to -transform(values).

      -

      Accepts a numpy array of shape (N x input_dims) and -returns a numpy array of shape (N x output_dims).

      -
      - -
      -
      -transform_point(point)
      -

      A convenience function that returns the transformed copy of a -single point.

      -

      The point is given as a sequence of length input_dims. -The transformed point is returned as a sequence of length -output_dims.

      -
      - -
      - -
      -
      -class matplotlib.transforms.Affine2D(matrix=None, **kwargs)
      -

      Bases: matplotlib.transforms.Affine2DBase

      -

      A mutable 2D affine transformation.

      -

      Initialize an Affine transform from a 3x3 numpy float array:

      -
      a c e
      -b d f
      -0 0 1
      -
      -

      If matrix is None, initialize with the identity transform.

      -
      -
      -clear()
      -

      Reset the underlying matrix to the identity transform.

      -
      - -
      -
      -static from_values(a, b, c, d, e, f)
      -

      (staticmethod) Create a new Affine2D instance from the given -values:

      -
      a c e
      -b d f
      -0 0 1
      -
      -

      .

      -
      - -
      -
      -get_matrix()
      -

      Get the underlying transformation matrix as a 3x3 numpy array:

      -
      a c e
      -b d f
      -0 0 1
      -
      -

      .

      -
      - -
      -
      -static identity()
      -

      (staticmethod) Return a new Affine2D object that is -the identity transform.

      -

      Unless this transform will be mutated later on, consider using -the faster IdentityTransform class instead.

      -
      - -
      -
      -rotate(theta)
      -

      Add a rotation (in radians) to this transform in place.

      -

      Returns self, so this method can easily be chained with more -calls to rotate(), rotate_deg(), translate() -and scale().

      -
      - -
      -
      -rotate_around(x, y, theta)
      -

      Add a rotation (in radians) around the point (x, y) in place.

      -

      Returns self, so this method can easily be chained with more -calls to rotate(), rotate_deg(), translate() -and scale().

      -
      - -
      -
      -rotate_deg(degrees)
      -

      Add a rotation (in degrees) to this transform in place.

      -

      Returns self, so this method can easily be chained with more -calls to rotate(), rotate_deg(), translate() -and scale().

      -
      - -
      -
      -rotate_deg_around(x, y, degrees)
      -

      Add a rotation (in degrees) around the point (x, y) in place.

      -

      Returns self, so this method can easily be chained with more -calls to rotate(), rotate_deg(), translate() -and scale().

      -
      - -
      -
      -scale(sx, sy=None)
      -

      Adds a scale in place.

      -

      If sy is None, the same scale is applied in both the x- and -y-directions.

      -

      Returns self, so this method can easily be chained with more -calls to rotate(), rotate_deg(), translate() -and scale().

      -
      - -
      -
      -set(other)
      -

      Set this transformation from the frozen copy of another -Affine2DBase object.

      -
      - -
      -
      -set_matrix(mtx)
      -

      Set the underlying transformation matrix from a 3x3 numpy array:

      -
      a c e
      -b d f
      -0 0 1
      -
      -

      .

      -
      - -
      -
      -translate(tx, ty)
      -

      Adds a translation in place.

      -

      Returns self, so this method can easily be chained with more -calls to rotate(), rotate_deg(), translate() -and scale().

      -
      - -
      - -
      -
      -class matplotlib.transforms.IdentityTransform(*args, **kwargs)
      -

      Bases: matplotlib.transforms.Affine2DBase

      -

      A special class that does on thing, the identity transform, in a -fast way.

      -
      -
      -frozen()
      -

      Returns a frozen copy of this transform node. The frozen copy -will not update when its children change. Useful for storing -a previously known state of a transform where -copy.deepcopy() might normally be used.

      -
      - -
      -
      -get_affine()
      -

      Return the corresponding inverse transformation.

      -

      The return value of this method should be treated as -temporary. An update to self does not cause a corresponding -update to its inverted copy.

      -

      x === self.inverted().transform(self.transform(x))

      -
      - -
      -
      -get_matrix()
      -

      Get the Affine transformation array for the affine part -of this transform.

      -
      - -
      -
      -inverted()
      -

      Return the corresponding inverse transformation.

      -

      The return value of this method should be treated as -temporary. An update to self does not cause a corresponding -update to its inverted copy.

      -

      x === self.inverted().transform(self.transform(x))

      -
      - -
      -
      -transform(points)
      -

      Performs only the non-affine part of the transformation.

      -

      transform(values) is always equivalent to -transform_affine(transform_non_affine(values)).

      -

      In non-affine transformations, this is generally equivalent to -transform(values). In affine transformations, this is -always a no-op.

      -

      Accepts a numpy array of shape (N x input_dims) and -returns a numpy array of shape (N x output_dims).

      -
      - -
      -
      -transform_affine(points)
      -

      Performs only the non-affine part of the transformation.

      -

      transform(values) is always equivalent to -transform_affine(transform_non_affine(values)).

      -

      In non-affine transformations, this is generally equivalent to -transform(values). In affine transformations, this is -always a no-op.

      -

      Accepts a numpy array of shape (N x input_dims) and -returns a numpy array of shape (N x output_dims).

      -
      - -
      -
      -transform_non_affine(points)
      -

      Performs only the non-affine part of the transformation.

      -

      transform(values) is always equivalent to -transform_affine(transform_non_affine(values)).

      -

      In non-affine transformations, this is generally equivalent to -transform(values). In affine transformations, this is -always a no-op.

      -

      Accepts a numpy array of shape (N x input_dims) and -returns a numpy array of shape (N x output_dims).

      -
      - -
      -
      -transform_path(path)
      -

      Returns a path, transformed only by the non-affine -part of this transform.

      -

      path: a Path instance.

      -

      transform_path(path) is equivalent to -transform_path_affine(transform_path_non_affine(values)).

      -
      - -
      -
      -transform_path_affine(path)
      -

      Returns a path, transformed only by the non-affine -part of this transform.

      -

      path: a Path instance.

      -

      transform_path(path) is equivalent to -transform_path_affine(transform_path_non_affine(values)).

      -
      - -
      -
      -transform_path_non_affine(path)
      -

      Returns a path, transformed only by the non-affine -part of this transform.

      -

      path: a Path instance.

      -

      transform_path(path) is equivalent to -transform_path_affine(transform_path_non_affine(values)).

      -
      - -
      - -
      -
      -class matplotlib.transforms.BlendedGenericTransform(x_transform, y_transform, **kwargs)
      -

      Bases: matplotlib.transforms.Transform

      -

      A “blended” transform uses one transform for the x-direction, and -another transform for the y-direction.

      -

      This “generic” version can handle any given child transform in the -x- and y-directions.

      -

      Create a new “blended” transform using x_transform to -transform the x-axis and y_transform to transform the -y-axis.

      -

      You will generally not call this constructor directly but use -the blended_transform_factory() function instead, which -can determine automatically which kind of blended transform to -create.

      -
      -
      -frozen()
      -

      Returns a frozen copy of this transform node. The frozen copy -will not update when its children change. Useful for storing -a previously known state of a transform where -copy.deepcopy() might normally be used.

      -
      - -
      -
      -get_affine()
      -

      Get the affine part of this transform.

      -
      - -
      -
      -inverted()
      -

      Return the corresponding inverse transformation.

      -

      The return value of this method should be treated as -temporary. An update to self does not cause a corresponding -update to its inverted copy.

      -

      x === self.inverted().transform(self.transform(x))

      -
      - -
      -
      -transform_non_affine(points)
      -

      Performs only the non-affine part of the transformation.

      -

      transform(values) is always equivalent to -transform_affine(transform_non_affine(values)).

      -

      In non-affine transformations, this is generally equivalent to -transform(values). In affine transformations, this is -always a no-op.

      -

      Accepts a numpy array of shape (N x input_dims) and -returns a numpy array of shape (N x output_dims).

      -
      - -
      - -
      -
      -class matplotlib.transforms.BlendedAffine2D(x_transform, y_transform, **kwargs)
      -

      Bases: matplotlib.transforms.Affine2DBase

      -

      A “blended” transform uses one transform for the x-direction, and -another transform for the y-direction.

      -

      This version is an optimization for the case where both child -transforms are of type Affine2DBase.

      -

      Create a new “blended” transform using x_transform to -transform the x-axis and y_transform to transform the -y-axis.

      -

      Both x_transform and y_transform must be 2D affine -transforms.

      -

      You will generally not call this constructor directly but use -the blended_transform_factory() function instead, which -can determine automatically which kind of blended transform to -create.

      -
      -
      -get_matrix()
      -

      Get the Affine transformation array for the affine part -of this transform.

      -
      - -
      - -
      -
      -matplotlib.transforms.blended_transform_factory(x_transform, y_transform)
      -

      Create a new “blended” transform using x_transform to transform -the x-axis and y_transform to transform the y-axis.

      -

      A faster version of the blended transform is returned for the case -where both child transforms are affine.

      -
      - -
      -
      -class matplotlib.transforms.CompositeGenericTransform(a, b, **kwargs)
      -

      Bases: matplotlib.transforms.Transform

      -

      A composite transform formed by applying transform a then -transform b.

      -

      This “generic” version can handle any two arbitrary -transformations.

      -

      Create a new composite transform that is the result of -applying transform a then transform b.

      -

      You will generally not call this constructor directly but use -the composite_transform_factory() function instead, -which can automatically choose the best kind of composite -transform instance to create.

      -
      -
      -frozen()
      -

      Returns a frozen copy of this transform node. The frozen copy -will not update when its children change. Useful for storing -a previously known state of a transform where -copy.deepcopy() might normally be used.

      -
      - -
      -
      -get_affine()
      -

      Get the affine part of this transform.

      -
      - -
      -
      -inverted()
      -

      Return the corresponding inverse transformation.

      -

      The return value of this method should be treated as -temporary. An update to self does not cause a corresponding -update to its inverted copy.

      -

      x === self.inverted().transform(self.transform(x))

      -
      - -
      -
      -transform_affine(points)
      -

      Performs only the affine part of this transformation on the -given array of values.

      -

      transform(values) is always equivalent to -transform_affine(transform_non_affine(values)).

      -

      In non-affine transformations, this is generally a no-op. In -affine transformations, this is equivalent to -transform(values).

      -

      Accepts a numpy array of shape (N x input_dims) and -returns a numpy array of shape (N x output_dims).

      -
      - -
      -
      -transform_non_affine(points)
      -

      Performs only the non-affine part of the transformation.

      -

      transform(values) is always equivalent to -transform_affine(transform_non_affine(values)).

      -

      In non-affine transformations, this is generally equivalent to -transform(values). In affine transformations, this is -always a no-op.

      -

      Accepts a numpy array of shape (N x input_dims) and -returns a numpy array of shape (N x output_dims).

      -
      - -
      -
      -transform_path_non_affine(path)
      -

      Returns a path, transformed only by the non-affine -part of this transform.

      -

      path: a Path instance.

      -

      transform_path(path) is equivalent to -transform_path_affine(transform_path_non_affine(values)).

      -
      - -
      - -
      -
      -class matplotlib.transforms.CompositeAffine2D(a, b, **kwargs)
      -

      Bases: matplotlib.transforms.Affine2DBase

      -

      A composite transform formed by applying transform a then transform b.

      -

      This version is an optimization that handles the case where both a -and b are 2D affines.

      -

      Create a new composite transform that is the result of -applying transform a then transform b.

      -

      Both a and b must be instances of Affine2DBase.

      -

      You will generally not call this constructor directly but use -the composite_transform_factory() function instead, -which can automatically choose the best kind of composite -transform instance to create.

      -
      -
      -get_matrix()
      -

      Get the Affine transformation array for the affine part -of this transform.

      -
      - -
      - -
      -
      -matplotlib.transforms.composite_transform_factory(a, b)
      -

      Create a new composite transform that is the result of applying -transform a then transform b.

      -

      Shortcut versions of the blended transform are provided for the -case where both child transforms are affine, or one or the other -is the identity transform.

      -

      Composite transforms may also be created using the ‘+’ operator, -e.g.:

      -
      c = a + b
      -
      -
      -
      - -
      -
      -class matplotlib.transforms.BboxTransform(boxin, boxout, **kwargs)
      -

      Bases: matplotlib.transforms.Affine2DBase

      -

      BboxTransform linearly transforms points from one -Bbox to another Bbox.

      -

      Create a new BboxTransform that linearly transforms -points from boxin to boxout.

      -
      -
      -get_matrix()
      -

      Get the Affine transformation array for the affine part -of this transform.

      -
      - -
      - -
      -
      -class matplotlib.transforms.BboxTransformTo(boxout, **kwargs)
      -

      Bases: matplotlib.transforms.Affine2DBase

      -

      BboxTransformTo is a transformation that linearly -transforms points from the unit bounding box to a given -Bbox.

      -

      Create a new BboxTransformTo that linearly transforms -points from the unit bounding box to boxout.

      -
      -
      -get_matrix()
      -

      Get the Affine transformation array for the affine part -of this transform.

      -
      - -
      - -
      -
      -class matplotlib.transforms.BboxTransformFrom(boxin, **kwargs)
      -

      Bases: matplotlib.transforms.Affine2DBase

      -

      BboxTransformFrom linearly transforms points from a given -Bbox to the unit bounding box.

      -
      -
      -get_matrix()
      -

      Get the Affine transformation array for the affine part -of this transform.

      -
      - -
      - -
      -
      -class matplotlib.transforms.ScaledTranslation(xt, yt, scale_trans, **kwargs)
      -

      Bases: matplotlib.transforms.Affine2DBase

      -

      A transformation that translates by xt and yt, after xt and yt -have been transformad by the given transform scale_trans.

      -
      -
      -get_matrix()
      -

      Get the Affine transformation array for the affine part -of this transform.

      -
      - -
      - -
      -
      -class matplotlib.transforms.TransformedPath(path, transform)
      -

      Bases: matplotlib.transforms.TransformNode

      -

      A TransformedPath caches a non-affine transformed copy of -the Path. This cached copy is -automatically updated when the non-affine part of the transform -changes.

      -
      -

      Note

      -

      Paths are considered immutable by this class. Any update to the -path’s vertices/codes will not trigger a transform recomputation.

      -
      -

      Create a new TransformedPath from the given -Path and Transform.

      -
      -
      -get_fully_transformed_path()
      -

      Return a fully-transformed copy of the child path.

      -
      - -
      -
      -get_transformed_path_and_affine()
      -

      Return a copy of the child path, with the non-affine part of -the transform already applied, along with the affine part of -the path necessary to complete the transformation.

      -
      - -
      -
      -get_transformed_points_and_affine()
      -

      Return a copy of the child path, with the non-affine part of -the transform already applied, along with the affine part of -the path necessary to complete the transformation. Unlike -get_transformed_path_and_affine(), no interpolation will -be performed.

      -
      - -
      - -
      -
      -matplotlib.transforms.nonsingular(vmin, vmax, expander=0.001, tiny=1e-15, increasing=True)
      -

      Modify the endpoints of a range as needed to avoid singularities.

      -
      -
      vmin, vmax
      -
      the initial endpoints.
      -
      tiny
      -
      threshold for the ratio of the interval to the maximum absolute -value of its endpoints. If the interval is smaller than -this, it will be expanded. This value should be around -1e-15 or larger; otherwise the interval will be approaching -the double precision resolution limit.
      -
      expander
      -
      fractional amount by which vmin and vmax are expanded if -the original interval is too small, based on tiny.
      -
      increasing: [True | False]
      -
      If True (default), swap vmin, vmax if vmin > vmax
      -
      -

      Returns vmin, vmax, expanded and/or swapped if necessary.

      -

      If either input is inf or NaN, or if both inputs are 0, -returns -expander, expander.

      -
      - -
      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/animation/animate_decay.html b/dev/examples/animation/animate_decay.html deleted file mode 100644 index 027697358e9..00000000000 --- a/dev/examples/animation/animate_decay.html +++ /dev/null @@ -1,184 +0,0 @@ - - - - - - - - animation example code: animate_decay.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      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 = data_gen.t
      -    cnt = 0
      -    while cnt < 1000:
      -        cnt+=1
      -        t += 0.05
      -        yield t, 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([], [], lw=2)
      -ax.set_ylim(-1.1, 1.1)
      -ax.set_xlim(0, 5)
      -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=True, interval=10,
      -    repeat=False)
      -plt.show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/animation/animate_decay.py b/dev/examples/animation/animate_decay.py deleted file mode 100644 index 90267c60503..00000000000 --- a/dev/examples/animation/animate_decay.py +++ /dev/null @@ -1,37 +0,0 @@ -import numpy as np -import matplotlib.pyplot as plt -import matplotlib.animation as animation - -def data_gen(): - t = data_gen.t - cnt = 0 - while cnt < 1000: - cnt+=1 - t += 0.05 - yield t, 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([], [], lw=2) -ax.set_ylim(-1.1, 1.1) -ax.set_xlim(0, 5) -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=True, interval=10, - repeat=False) -plt.show() diff --git a/dev/examples/animation/basic_example.html b/dev/examples/animation/basic_example.html deleted file mode 100644 index a5a8938a22a..00000000000 --- a/dev/examples/animation/basic_example.html +++ /dev/null @@ -1,181 +0,0 @@ - - - - - - - - animation example code: basic_example.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      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 Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/animation/basic_example.py b/dev/examples/animation/basic_example.py deleted file mode 100644 index 82cfdc3e40f..00000000000 --- a/dev/examples/animation/basic_example.py +++ /dev/null @@ -1,34 +0,0 @@ -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() diff --git a/dev/examples/animation/basic_example_writer.html b/dev/examples/animation/basic_example_writer.html deleted file mode 100644 index 74c8127ecd3..00000000000 --- a/dev/examples/animation/basic_example_writer.html +++ /dev/null @@ -1,189 +0,0 @@ - - - - - - - - animation example code: basic_example_writer.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      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 Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/animation/basic_example_writer.py b/dev/examples/animation/basic_example_writer.py deleted file mode 100644 index fef95894262..00000000000 --- a/dev/examples/animation/basic_example_writer.py +++ /dev/null @@ -1,42 +0,0 @@ -# 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) diff --git a/dev/examples/animation/bayes_update.html b/dev/examples/animation/bayes_update.html deleted file mode 100644 index 24a862a59d7..00000000000 --- a/dev/examples/animation/bayes_update.html +++ /dev/null @@ -1,194 +0,0 @@ - - - - - - - - animation example code: bayes_update.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      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 = plt.figure()
      -ax = fig.add_subplot(1, 1, 1)
      -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 Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/animation/bayes_update.py b/dev/examples/animation/bayes_update.py deleted file mode 100644 index e3ba5a356a2..00000000000 --- a/dev/examples/animation/bayes_update.py +++ /dev/null @@ -1,47 +0,0 @@ -# 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 = plt.figure() -ax = fig.add_subplot(1, 1, 1) -ud = UpdateDist(ax, prob=0.7) -anim = FuncAnimation(fig, ud, frames=np.arange(100), init_func=ud.init, - interval=100, blit=True) -plt.show() diff --git a/dev/examples/animation/double_pendulum_animated.html b/dev/examples/animation/double_pendulum_animated.html deleted file mode 100644 index 25e57a73038..00000000000 --- a/dev/examples/animation/double_pendulum_animated.html +++ /dev/null @@ -1,235 +0,0 @@ - - - - - - - - animation example code: double_pendulum_animated.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      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, pi, array
      -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.1 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
      -
      -rad = pi/180
      -
      -# initial state
      -state = np.array([th1, w1, th2, w2])*pi/180.
      -
      -# 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, clear_temp=True)
      -plt.show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/animation/double_pendulum_animated.py b/dev/examples/animation/double_pendulum_animated.py deleted file mode 100644 index da90eb2cca9..00000000000 --- a/dev/examples/animation/double_pendulum_animated.py +++ /dev/null @@ -1,88 +0,0 @@ -# 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, pi, array -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.1 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 - -rad = pi/180 - -# initial state -state = np.array([th1, w1, th2, w2])*pi/180. - -# 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, clear_temp=True) -plt.show() diff --git a/dev/examples/animation/dynamic_image.html b/dev/examples/animation/dynamic_image.html deleted file mode 100644 index d14d3e5a74d..00000000000 --- a/dev/examples/animation/dynamic_image.html +++ /dev/null @@ -1,174 +0,0 @@ - - - - - - - - animation example code: dynamic_image.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      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('jet'))
      -
      -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 Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/animation/dynamic_image.py b/dev/examples/animation/dynamic_image.py deleted file mode 100644 index e25e66b0eb3..00000000000 --- a/dev/examples/animation/dynamic_image.py +++ /dev/null @@ -1,27 +0,0 @@ -#!/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('jet')) - -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() diff --git a/dev/examples/animation/dynamic_image2.html b/dev/examples/animation/dynamic_image2.html deleted file mode 100644 index 85e895b9f7b..00000000000 --- a/dev/examples/animation/dynamic_image2.html +++ /dev/null @@ -1,179 +0,0 @@ - - - - - - - - animation example code: dynamic_image2.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      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))
      -    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 Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/animation/dynamic_image2.py b/dev/examples/animation/dynamic_image2.py deleted file mode 100644 index 832b688bda6..00000000000 --- a/dev/examples/animation/dynamic_image2.py +++ /dev/null @@ -1,32 +0,0 @@ -#!/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)) - ims.append([im]) - -ani = animation.ArtistAnimation(fig, ims, interval=50, blit=True, - repeat_delay=1000) - -#ani.save('dynamic_images.mp4') - - -plt.show() diff --git a/dev/examples/animation/histogram.html b/dev/examples/animation/histogram.html deleted file mode 100644 index fca31ed95b1..00000000000 --- a/dev/examples/animation/histogram.html +++ /dev/null @@ -1,209 +0,0 @@ - - - - - - - - animation example code: histogram.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      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 = 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(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
      -
      -ani = animation.FuncAnimation(fig, animate, 100, repeat=False)
      -plt.show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/animation/histogram.py b/dev/examples/animation/histogram.py deleted file mode 100644 index b1aa9249dff..00000000000 --- a/dev/examples/animation/histogram.py +++ /dev/null @@ -1,62 +0,0 @@ -""" -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 = 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(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 - -ani = animation.FuncAnimation(fig, animate, 100, repeat=False) -plt.show() diff --git a/dev/examples/animation/index.html b/dev/examples/animation/index.html deleted file mode 100644 index efd9d1956fb..00000000000 --- a/dev/examples/animation/index.html +++ /dev/null @@ -1,171 +0,0 @@ - - - - - - - - animation Examples — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      - -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/animation/moviewriter.html b/dev/examples/animation/moviewriter.html deleted file mode 100644 index dc0943b19ad..00000000000 --- a/dev/examples/animation/moviewriter.html +++ /dev/null @@ -1,178 +0,0 @@ - - - - - - - - animation example code: moviewriter.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      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 Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/animation/moviewriter.py b/dev/examples/animation/moviewriter.py deleted file mode 100644 index 090de236813..00000000000 --- a/dev/examples/animation/moviewriter.py +++ /dev/null @@ -1,32 +0,0 @@ -# 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() - diff --git a/dev/examples/animation/random_data.html b/dev/examples/animation/random_data.html deleted file mode 100644 index 48ea974dbbc..00000000000 --- a/dev/examples/animation/random_data.html +++ /dev/null @@ -1,165 +0,0 @@ - - - - - - - - animation example code: random_data.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      animation example code: random_data.py

      -

      [source code]

      -
      import numpy as np
      -import matplotlib.pyplot as plt
      -import matplotlib.animation as animation
      -
      -fig = plt.figure()
      -ax = fig.add_subplot(111)
      -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 Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/animation/random_data.py b/dev/examples/animation/random_data.py deleted file mode 100644 index 1a31e963a24..00000000000 --- a/dev/examples/animation/random_data.py +++ /dev/null @@ -1,18 +0,0 @@ -import numpy as np -import matplotlib.pyplot as plt -import matplotlib.animation as animation - -fig = plt.figure() -ax = fig.add_subplot(111) -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() diff --git a/dev/examples/animation/simple_3danim.html b/dev/examples/animation/simple_3danim.html deleted file mode 100644 index 1fe843583c0..00000000000 --- a/dev/examples/animation/simple_3danim.html +++ /dev/null @@ -1,209 +0,0 @@ - - - - - - - - animation example code: simple_3danim.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      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 Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/animation/simple_3danim.py b/dev/examples/animation/simple_3danim.py deleted file mode 100644 index 74e918fdb9d..00000000000 --- a/dev/examples/animation/simple_3danim.py +++ /dev/null @@ -1,62 +0,0 @@ -""" -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() diff --git a/dev/examples/animation/simple_anim.html b/dev/examples/animation/simple_anim.html deleted file mode 100644 index 1730e675f53..00000000000 --- a/dev/examples/animation/simple_anim.html +++ /dev/null @@ -1,172 +0,0 @@ - - - - - - - - animation example code: simple_anim.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      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 = plt.figure()
      -ax = fig.add_subplot(111)
      -
      -x = np.arange(0, 2*np.pi, 0.01)        # x-array
      -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 Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/animation/simple_anim.py b/dev/examples/animation/simple_anim.py deleted file mode 100644 index 78c9cdfc3ae..00000000000 --- a/dev/examples/animation/simple_anim.py +++ /dev/null @@ -1,25 +0,0 @@ -""" -A simple example of an animated plot -""" -import numpy as np -import matplotlib.pyplot as plt -import matplotlib.animation as animation - -fig = plt.figure() -ax = fig.add_subplot(111) - -x = np.arange(0, 2*np.pi, 0.01) # x-array -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() diff --git a/dev/examples/animation/strip_chart_demo.html b/dev/examples/animation/strip_chart_demo.html deleted file mode 100644 index ab40a7ecaaa..00000000000 --- a/dev/examples/animation/strip_chart_demo.html +++ /dev/null @@ -1,203 +0,0 @@ - - - - - - - - animation example code: strip_chart_demo.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      animation example code: strip_chart_demo.py

      -

      [source code]

      -
      """
      -Emulate an oscilloscope.  Requires the animation API introduced in
      -matplotlib 1.0 SVN.
      -"""
      -import matplotlib
      -import numpy as np
      -from matplotlib.lines import Line2D
      -import matplotlib.pyplot as plt
      -import matplotlib.animation as animation
      -
      -class Scope:
      -    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 = plt.figure()
      -ax = fig.add_subplot(111)
      -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 Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/animation/strip_chart_demo.py b/dev/examples/animation/strip_chart_demo.py deleted file mode 100644 index 119fac9f671..00000000000 --- a/dev/examples/animation/strip_chart_demo.py +++ /dev/null @@ -1,56 +0,0 @@ -""" -Emulate an oscilloscope. Requires the animation API introduced in -matplotlib 1.0 SVN. -""" -import matplotlib -import numpy as np -from matplotlib.lines import Line2D -import matplotlib.pyplot as plt -import matplotlib.animation as animation - -class Scope: - 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 = plt.figure() -ax = fig.add_subplot(111) -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() diff --git a/dev/examples/animation/subplots.html b/dev/examples/animation/subplots.html deleted file mode 100644 index cb59863c543..00000000000 --- a/dev/examples/animation/subplots.html +++ /dev/null @@ -1,240 +0,0 @@ - - - - - - - - animation example code: subplots.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      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 Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/animation/subplots.py b/dev/examples/animation/subplots.py deleted file mode 100644 index 462549e658f..00000000000 --- a/dev/examples/animation/subplots.py +++ /dev/null @@ -1,93 +0,0 @@ -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() diff --git a/dev/examples/api/agg_oo.html b/dev/examples/api/agg_oo.html deleted file mode 100644 index 3bb40b34d76..00000000000 --- a/dev/examples/api/agg_oo.html +++ /dev/null @@ -1,164 +0,0 @@ - - - - - - - - api example code: agg_oo.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      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 Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/api/agg_oo.py b/dev/examples/api/agg_oo.py deleted file mode 100644 index 94acbc119a3..00000000000 --- a/dev/examples/api/agg_oo.py +++ /dev/null @@ -1,17 +0,0 @@ -#!/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') diff --git a/dev/examples/api/artist_demo.html b/dev/examples/api/artist_demo.html deleted file mode 100644 index 665166d6ed9..00000000000 --- a/dev/examples/api/artist_demo.html +++ /dev/null @@ -1,275 +0,0 @@ - - - - - - - - - - api example code: artist_demo.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      api example code: artist_demo.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/artist_demo.png -
      -
      """
      -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 Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/api/barchart_demo.html b/dev/examples/api/barchart_demo.html deleted file mode 100644 index 0182a8b8080..00000000000 --- a/dev/examples/api/barchart_demo.html +++ /dev/null @@ -1,189 +0,0 @@ - - - - - - - - api example code: barchart_demo.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      api example code: barchart_demo.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/barchart_demo.png -
      -
      #!/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 = plt.figure()
      -ax = fig.add_subplot(111)
      -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
      -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 Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/api/bbox_intersect.html b/dev/examples/api/bbox_intersect.html deleted file mode 100644 index 171254f68fc..00000000000 --- a/dev/examples/api/bbox_intersect.html +++ /dev/null @@ -1,169 +0,0 @@ - - - - - - - - api example code: bbox_intersect.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      api example code: bbox_intersect.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/bbox_intersect.png -
      -
      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 Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/api/clippath_demo.html b/dev/examples/api/clippath_demo.html deleted file mode 100644 index 3bb17329625..00000000000 --- a/dev/examples/api/clippath_demo.html +++ /dev/null @@ -1,173 +0,0 @@ - - - - - - - - - - api example code: clippath_demo.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      api example code: clippath_demo.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/clippath_demo.png -
      -
      """
      -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 Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/api/collections_demo.html b/dev/examples/api/collections_demo.html deleted file mode 100644 index e6ee2d4fc15..00000000000 --- a/dev/examples/api/collections_demo.html +++ /dev/null @@ -1,281 +0,0 @@ - - - - - - - - api example code: collections_demo.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      api example code: collections_demo.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/collections_demo.png -
      -
      #!/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.array(range(nverts))
      -theta = np.array(range(nverts)) * (2*np.pi)/(nverts-1)
      -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 = plt.figure()
      -
      -a = fig.add_subplot(2,2,1)
      -col = collections.LineCollection([spiral], offsets=xyo,
      -                                transOffset=a.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.
      -a.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 'a.autoscale_view()' call below.
      -
      -# Make a transform for the line segments such that their size is
      -# given in points:
      -col.set_color(colors)
      -
      -a.autoscale_view()  # See comment above, after a.add_collection.
      -a.set_title('LineCollection using offsets')
      -
      -
      -# The same data as above, but fill the curves.
      -
      -a = fig.add_subplot(2,2,2)
      -
      -col = collections.PolyCollection([spiral], offsets=xyo,
      -                                transOffset=a.transData)
      -trans = transforms.Affine2D().scale(fig.dpi/72.0)
      -col.set_transform(trans)  # the points to pixels transform
      -a.add_collection(col, autolim=True)
      -col.set_color(colors)
      -
      -
      -a.autoscale_view()
      -a.set_title('PolyCollection using offsets')
      -
      -# 7-sided regular polygons
      -
      -a = fig.add_subplot(2,2,3)
      -
      -col = collections.RegularPolyCollection(7,
      -                                        sizes = np.fabs(xx)*10.0, offsets=xyo,
      -                                        transOffset=a.transData)
      -trans = transforms.Affine2D().scale(fig.dpi/72.0)
      -col.set_transform(trans)  # the points to pixels transform
      -a.add_collection(col, autolim=True)
      -col.set_color(colors)
      -a.autoscale_view()
      -a.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.
      -
      -a = fig.add_subplot(2,2,4)
      -
      -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)
      -a.add_collection(col, autolim=True)
      -col.set_color(colors)
      -a.autoscale_view()
      -a.set_title('Successive data offsets')
      -a.set_xlabel('Zonal velocity component (m/s)')
      -a.set_ylabel('Depth (m)')
      -# Reverse the y-axis so depth increases downward
      -a.set_ylim(a.get_ylim()[::-1])
      -
      -
      -plt.show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/api/color_cycle.html b/dev/examples/api/color_cycle.html deleted file mode 100644 index e26b6e7eac7..00000000000 --- a/dev/examples/api/color_cycle.html +++ /dev/null @@ -1,182 +0,0 @@ - - - - - - - - - - api example code: color_cycle.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      api example code: color_cycle.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/color_cycle.png -
      -
      """
      -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 Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/api/colorbar_only.html b/dev/examples/api/colorbar_only.html deleted file mode 100644 index 4a7e8ffbe6d..00000000000 --- a/dev/examples/api/colorbar_only.html +++ /dev/null @@ -1,220 +0,0 @@ - - - - - - - - api example code: colorbar_only.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      api example code: colorbar_only.py

      -

      (Source code)

      -
      '''
      -Make a colorbar as a separate figure.
      -'''
      -
      -from matplotlib import pyplot
      -
      -# 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 Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/api/compound_path.html b/dev/examples/api/compound_path.html deleted file mode 100644 index 08b855ab40b..00000000000 --- a/dev/examples/api/compound_path.html +++ /dev/null @@ -1,185 +0,0 @@ - - - - - - - - api example code: compound_path.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      api example code: compound_path.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/compound_path.png -
      -
      """
      -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 = plt.figure()
      -ax = fig.add_subplot(111)
      -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 Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/api/custom_projection_example.html b/dev/examples/api/custom_projection_example.html deleted file mode 100644 index 0c547d29b70..00000000000 --- a/dev/examples/api/custom_projection_example.html +++ /dev/null @@ -1,628 +0,0 @@ - - - - - - - - api example code: custom_projection_example.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      api example code: custom_projection_example.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/custom_projection_example.png -
      -
      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(np.pi * 2.0, 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 = 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'
      -        # \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 = (x / np.pi) * 180.0
      -            degrees = round(degrees / 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 = degrees * (np.pi / 180.0)
      -        # 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 Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/api/custom_scale_example.html b/dev/examples/api/custom_scale_example.html deleted file mode 100644 index b164b2193d3..00000000000 --- a/dev/examples/api/custom_scale_example.html +++ /dev/null @@ -1,322 +0,0 @@ - - - - - - - - api example code: custom_scale_example.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      api example code: custom_scale_example.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/custom_scale_example.png -
      -
      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", (85 / 180.0) * np.pi)
      -        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" % ((x / np.pi) * 180.0)
      -
      -        deg2rad = np.pi / 180.0
      -        axis.set_major_locator(FixedLocator(
      -                np.arange(-90, 90, 10) * deg2rad))
      -        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 = t / 360.0 * np.pi
      -
      -    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 Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/api/date_demo.html b/dev/examples/api/date_demo.html deleted file mode 100644 index cb19c3509d2..00000000000 --- a/dev/examples/api/date_demo.html +++ /dev/null @@ -1,205 +0,0 @@ - - - - - - - - api example code: date_demo.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      api example code: date_demo.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/date_demo.png -
      -
      #!/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')
      -r = np.load(datafile).view(np.recarray)
      -
      -fig = plt.figure()
      -ax = fig.add_subplot(111)
      -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 Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/api/date_index_formatter.html b/dev/examples/api/date_index_formatter.html deleted file mode 100644 index bd2d7882f3d..00000000000 --- a/dev/examples/api/date_index_formatter.html +++ /dev/null @@ -1,196 +0,0 @@ - - - - - - - - api example code: date_index_formatter.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      api example code: date_index_formatter.py

      -

      (Source code)

      -
      -../../_images/date_index_formatter_00.png -

      (png, hires.png, pdf)

      -
      -
      -../../_images/date_index_formatter_01.png -

      (png, hires.png, pdf)

      -
      -
      """
      -When plotting time series, eg 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 = plt.figure()
      -ax = fig.add_subplot(111)
      -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 = plt.figure()
      -ax = fig.add_subplot(111)
      -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 Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/api/demo_affine_image.html b/dev/examples/api/demo_affine_image.html deleted file mode 100644 index ead3f1bb142..00000000000 --- a/dev/examples/api/demo_affine_image.html +++ /dev/null @@ -1,217 +0,0 @@ - - - - - - - - api example code: demo_affine_image.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      api example code: demo_affine_image.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/demo_affine_image_00_00.png -
      -

      ()

      -
      #!/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
      -
      -    ax1 = plt.subplot(121)
      -    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
      -
      -    ax2 = plt.subplot(122)
      -    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 Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/api/donut_demo.html b/dev/examples/api/donut_demo.html deleted file mode 100644 index addaa4eb6e5..00000000000 --- a/dev/examples/api/donut_demo.html +++ /dev/null @@ -1,202 +0,0 @@ - - - - - - - - api example code: donut_demo.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      api example code: donut_demo.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/donut_demo.png -
      -
      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 = plt.figure()
      -ax = fig.add_subplot(111)
      -
      -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 Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/api/engineering_formatter.html b/dev/examples/api/engineering_formatter.html deleted file mode 100644 index 39305619ea6..00000000000 --- a/dev/examples/api/engineering_formatter.html +++ /dev/null @@ -1,169 +0,0 @@ - - - - - - - - api example code: engineering_formatter.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      api example code: engineering_formatter.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/engineering_formatter.png -
      -
      '''
      -Demo to show use of the engineering Formatter.
      -'''
      -
      -import matplotlib.pyplot as plt
      -import numpy as np
      -
      -from matplotlib.ticker import EngFormatter
      -
      -ax = plt.subplot(111)
      -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 Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/api/fahrenheit_celsius_scales.html b/dev/examples/api/fahrenheit_celsius_scales.html deleted file mode 100644 index a30e2765b4f..00000000000 --- a/dev/examples/api/fahrenheit_celsius_scales.html +++ /dev/null @@ -1,178 +0,0 @@ - - - - - - - - api example code: fahrenheit_celsius_scales.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      api example code: fahrenheit_celsius_scales.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/fahrenheit_celsius_scales.png -
      -
      """
      -Show how to display two scales on the left and right y axis -- Fahrenheit and Celsius
      -"""
      -
      -import matplotlib.pyplot as plt
      -
      -fig = plt.figure()
      -ax1 = fig.add_subplot(111)     # the Fahrenheit scale
      -ax2 = ax1.twinx()              # 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 Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/api/font_family_rc.html b/dev/examples/api/font_family_rc.html deleted file mode 100644 index 12082dc9c63..00000000000 --- a/dev/examples/api/font_family_rc.html +++ /dev/null @@ -1,177 +0,0 @@ - - - - - - - - api example code: font_family_rc.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      api example code: font_family_rc.py

      -

      [source code]

      -
      """
      -You can explicitly set which font family is picked up for a given font
      -style (eg '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, eg::
      -
      -  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 = plt.figure()
      -ax = fig.add_subplot(111)
      -ax.plot([1,2,3], label='test')
      -
      -ax.legend()
      -plt.show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/api/font_family_rc.py b/dev/examples/api/font_family_rc.py deleted file mode 100644 index d379e316347..00000000000 --- a/dev/examples/api/font_family_rc.py +++ /dev/null @@ -1,31 +0,0 @@ -""" -You can explicitly set which font family is picked up for a given font -style (eg '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, eg:: - - 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 = plt.figure() -ax = fig.add_subplot(111) -ax.plot([1,2,3], label='test') - -ax.legend() -plt.show() - diff --git a/dev/examples/api/font_file.html b/dev/examples/api/font_file.html deleted file mode 100644 index 11a8c0a37f5..00000000000 --- a/dev/examples/api/font_file.html +++ /dev/null @@ -1,186 +0,0 @@ - - - - - - - - api example code: font_file.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      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 = plt.figure()
      -ax = fig.add_subplot(111)
      -ax.plot([1,2,3])
      -
      -if sys.platform == 'win32':
      -    fpath = 'C:\\Windows\\Fonts\\Tahoma.ttf'
      -elif sys.platform.startswith('linux'):
      -    fonts = ['/usr/share/fonts/truetype/freefont/FreeSansBoldOblique.ttf',
      -      '/usr/share/fonts/truetype/ttf-liberation/LiberationSans-BoldItalic.ttf',
      -      '/usr/share/fonts/truetype/msttcorefonts/Comic_Sans_MS.ttf',
      -      ]
      -    for fpath in fonts:
      -        if os.path.exists(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 Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/api/font_file.py b/dev/examples/api/font_file.py deleted file mode 100644 index 495b1905f67..00000000000 --- a/dev/examples/api/font_file.py +++ /dev/null @@ -1,40 +0,0 @@ -# -*- 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 = plt.figure() -ax = fig.add_subplot(111) -ax.plot([1,2,3]) - -if sys.platform == 'win32': - fpath = 'C:\\Windows\\Fonts\\Tahoma.ttf' -elif sys.platform.startswith('linux'): - fonts = ['/usr/share/fonts/truetype/freefont/FreeSansBoldOblique.ttf', - '/usr/share/fonts/truetype/ttf-liberation/LiberationSans-BoldItalic.ttf', - '/usr/share/fonts/truetype/msttcorefonts/Comic_Sans_MS.ttf', - ] - for fpath in fonts: - if os.path.exists(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() - diff --git a/dev/examples/api/hinton_demo.html b/dev/examples/api/hinton_demo.html deleted file mode 100644 index b603c9eef97..00000000000 --- a/dev/examples/api/hinton_demo.html +++ /dev/null @@ -1,215 +0,0 @@ - - - - - - - - - - api example code: hinton_demo.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      api example code: hinton_demo.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/hinton_demo.png -
      -
      #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 Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/api/histogram_demo.html b/dev/examples/api/histogram_demo.html deleted file mode 100644 index caf7c88bac8..00000000000 --- a/dev/examples/api/histogram_demo.html +++ /dev/null @@ -1,190 +0,0 @@ - - - - - - - - - - api example code: histogram_demo.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      api example code: histogram_demo.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/histogram_demo1.png -
      -
      """
      -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 Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/api/histogram_path_demo.html b/dev/examples/api/histogram_path_demo.html deleted file mode 100644 index fc46d4e87e1..00000000000 --- a/dev/examples/api/histogram_path_demo.html +++ /dev/null @@ -1,197 +0,0 @@ - - - - - - - - api example code: histogram_path_demo.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      api example code: histogram_path_demo.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/histogram_path_demo1.png -
      -
      """
      -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 = plt.figure()
      -ax = fig.add_subplot(111)
      -
      -# 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 Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/api/image_zcoord.html b/dev/examples/api/image_zcoord.html deleted file mode 100644 index 19075bc6292..00000000000 --- a/dev/examples/api/image_zcoord.html +++ /dev/null @@ -1,176 +0,0 @@ - - - - - - - - api example code: image_zcoord.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      api example code: image_zcoord.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/image_zcoord.png -
      -
      """
      -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 = plt.figure()
      -ax = fig.add_subplot(111)
      -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 Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/api/index.html b/dev/examples/api/index.html deleted file mode 100644 index 80ca83f8761..00000000000 --- a/dev/examples/api/index.html +++ /dev/null @@ -1,193 +0,0 @@ - - - - - - - - api Examples — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - - - - - - \ No newline at end of file diff --git a/dev/examples/api/joinstyle.html b/dev/examples/api/joinstyle.html deleted file mode 100644 index ebbdce1da70..00000000000 --- a/dev/examples/api/joinstyle.html +++ /dev/null @@ -1,181 +0,0 @@ - - - - - - - - api example code: joinstyle.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      api example code: joinstyle.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/joinstyle.png -
      -
      #!/usr/bin/env python
      -"""
      -Illustrate the three different join styles
      -"""
      -
      -import numpy as np
      -import matplotlib
      -import matplotlib.pyplot as plt
      -
      -def plot_angle(ax, x, y, angle, style):
      -    phi = angle/180*np.pi
      -    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 = plt.figure()
      -ax = fig.add_subplot(111)
      -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 Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/api/legend_demo.html b/dev/examples/api/legend_demo.html deleted file mode 100644 index 3b6c984098d..00000000000 --- a/dev/examples/api/legend_demo.html +++ /dev/null @@ -1,192 +0,0 @@ - - - - - - - - api example code: legend_demo.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      api example code: legend_demo.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/legend_demo1.png -
      -
      """
      -Demo of the legend function with a few features.
      -
      -In addition to the basic legend, this demo shows a few optional features:
      -
      -    * Custom legend placement.
      -    * A keyword argument to a drop-shadow.
      -    * Setting the background color.
      -    * Setting the font size.
      -    * Setting the line width.
      -"""
      -import numpy as np
      -import matplotlib.pyplot as plt
      -
      -
      -# Example data
      -a = np.arange(0,3, .02)
      -b = np.arange(0,3, .02)
      -c = np.exp(a)
      -d = c[::-1]
      -
      -# Create plots with pre-defined labels.
      -# Alternatively, you can pass labels explicitly when calling `legend`.
      -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')
      -
      -# Now add the legend with some customizations.
      -legend = ax.legend(loc='upper center', shadow=True)
      -
      -# The frame is matplotlib.patches.Rectangle instance surrounding the legend.
      -frame  = legend.get_frame()
      -frame.set_facecolor('0.90')
      -
      -# Set the fontsize
      -for label in legend.get_texts():
      -    label.set_fontsize('large')
      -
      -for label in legend.get_lines():
      -    label.set_linewidth(1.5)  # the legend line width
      -plt.show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/api/line_with_text.html b/dev/examples/api/line_with_text.html deleted file mode 100644 index 5c88b52abd6..00000000000 --- a/dev/examples/api/line_with_text.html +++ /dev/null @@ -1,215 +0,0 @@ - - - - - - - - api example code: line_with_text.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      api example code: line_with_text.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/line_with_text.png -
      -
      """
      -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 = plt.figure()
      -ax = fig.add_subplot(111)
      -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 Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/api/logo2.html b/dev/examples/api/logo2.html deleted file mode 100644 index 8143a8e672b..00000000000 --- a/dev/examples/api/logo2.html +++ /dev/null @@ -1,229 +0,0 @@ - - - - - - - - api example code: logo2.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      api example code: logo2.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/logo2.png -
      -
      """
      -Thanks to Tony Yu <tsyu80@gmail.com> 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} = U^{3\beta}_{\delta_1 \rho_1} + \frac{1}{8 \pi 2} \int^{\alpha_2}_{\alpha_2} d \alpha^\prime_2 \left[\frac{ U^{2\beta}_{\delta_1 \rho_1} - \alpha^\prime_2U^{1\beta}_{\rho_1 \sigma_2} }{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} = -\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], polar=True)
      -
      -
      -    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 Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/api/mathtext_asarray.html b/dev/examples/api/mathtext_asarray.html deleted file mode 100644 index a5911eab363..00000000000 --- a/dev/examples/api/mathtext_asarray.html +++ /dev/null @@ -1,174 +0,0 @@ - - - - - - - - api example code: mathtext_asarray.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      api example code: mathtext_asarray.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/mathtext_asarray.png -
      -
      """
      -Load a mathtext image as numpy array
      -"""
      -
      -import numpy as np
      -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}} 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 Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/api/patch_collection.html b/dev/examples/api/patch_collection.html deleted file mode 100644 index ea42b8be228..00000000000 --- a/dev/examples/api/patch_collection.html +++ /dev/null @@ -1,198 +0,0 @@ - - - - - - - - api example code: patch_collection.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      api example code: patch_collection.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/patch_collection.png -
      -
      import numpy as np
      -import matplotlib
      -from matplotlib.patches import Circle, Wedge, Polygon
      -from matplotlib.collections import PatchCollection
      -import matplotlib.pyplot as plt
      -
      -
      -fig=plt.figure()
      -ax=fig.add_subplot(111)
      -
      -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 Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/api/path_patch_demo.html b/dev/examples/api/path_patch_demo.html deleted file mode 100644 index ee606527a91..00000000000 --- a/dev/examples/api/path_patch_demo.html +++ /dev/null @@ -1,190 +0,0 @@ - - - - - - - - - - api example code: path_patch_demo.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      api example code: path_patch_demo.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/path_patch_demo.png -
      -
      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 Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/api/quad_bezier.html b/dev/examples/api/quad_bezier.html deleted file mode 100644 index cca6838d69b..00000000000 --- a/dev/examples/api/quad_bezier.html +++ /dev/null @@ -1,169 +0,0 @@ - - - - - - - - api example code: quad_bezier.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      api example code: quad_bezier.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/quad_bezier.png -
      -
      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)
      -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 Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/api/radar_chart.html b/dev/examples/api/radar_chart.html deleted file mode 100644 index 9171633fd25..00000000000 --- a/dev/examples/api/radar_chart.html +++ /dev/null @@ -1,345 +0,0 @@ - - - - - - - - api example code: radar_chart.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      api example code: radar_chart.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/radar_chart.png -
      -
      """
      -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 = 2*np.pi * np.linspace(0, 1-1./num_vars, num_vars)
      -    # 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(theta * 180/np.pi, 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 = {
      -        'column names':
      -            ['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('column names')
      -
      -    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 in enumerate(data.keys()):
      -        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(data[title], 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 Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/api/sankey_demo_basics.html b/dev/examples/api/sankey_demo_basics.html deleted file mode 100644 index 65404aa4316..00000000000 --- a/dev/examples/api/sankey_demo_basics.html +++ /dev/null @@ -1,237 +0,0 @@ - - - - - - - - api example code: sankey_demo_basics.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      api example code: sankey_demo_basics.py

      -

      (Source code)

      -
      -../../_images/sankey_demo_basics_001.png -

      (png, hires.png, pdf)

      -
      -
      -../../_images/sankey_demo_basics_011.png -

      (png, hires.png, pdf)

      -
      -
      -../../_images/sankey_demo_basics_021.png -

      (png, hires.png, pdf)

      -
      -
      """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 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 Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/api/sankey_demo_links.html b/dev/examples/api/sankey_demo_links.html deleted file mode 100644 index 16e48001fab..00000000000 --- a/dev/examples/api/sankey_demo_links.html +++ /dev/null @@ -1,204 +0,0 @@ - - - - - - - - api example code: sankey_demo_links.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - - - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/api/sankey_demo_old.html b/dev/examples/api/sankey_demo_old.html deleted file mode 100644 index 5daae030e62..00000000000 --- a/dev/examples/api/sankey_demo_old.html +++ /dev/null @@ -1,339 +0,0 @@ - - - - - - - - api example code: sankey_demo_old.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      api example code: sankey_demo_old.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/sankey_demo_old.png -
      -
      #!/usr/bin/env python
      -
      -from __future__ import print_function
      -
      -__author__ = "Yannick Copin <ycopin@ipnl.in2p3.fr>"
      -__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):
      -        h = (loss/2 + w)*np.tan(outangle/180. * np.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)*np.tan(inangle/180. * np.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 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 Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/api/sankey_demo_rankine.html b/dev/examples/api/sankey_demo_rankine.html deleted file mode 100644 index 85d794277d3..00000000000 --- a/dev/examples/api/sankey_demo_rankine.html +++ /dev/null @@ -1,227 +0,0 @@ - - - - - - - - api example code: sankey_demo_rankine.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      api example code: sankey_demo_rankine.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/sankey_demo_rankine.png -
      -
      """Demonstrate the Sankey class with a practicle example of a Rankine power cycle.
      -"""
      -import numpy as np
      -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 Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/api/scatter_piecharts.html b/dev/examples/api/scatter_piecharts.html deleted file mode 100644 index 254a5137102..00000000000 --- a/dev/examples/api/scatter_piecharts.html +++ /dev/null @@ -1,190 +0,0 @@ - - - - - - - - api example code: scatter_piecharts.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      api example code: scatter_piecharts.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/scatter_piecharts.png -
      -
      """
      -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))
      -
      -# ...
      -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))
      -
      -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))
      -
      -
      -fig = plt.figure()
      -ax = fig.add_subplot(111)
      -ax.scatter( np.arange(3), np.arange(3), marker=(xy1,0), s=sizes, facecolor='blue' )
      -ax.scatter( np.arange(3), np.arange(3), marker=(xy2,0), s=sizes, facecolor='green' )
      -ax.scatter( np.arange(3), np.arange(3), marker=(xy3,0), s=sizes, facecolor='red' )
      -plt.show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/api/span_regions.html b/dev/examples/api/span_regions.html deleted file mode 100644 index c5ad8baf7c5..00000000000 --- a/dev/examples/api/span_regions.html +++ /dev/null @@ -1,183 +0,0 @@ - - - - - - - - api example code: span_regions.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      api example code: span_regions.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/span_regions.png -
      -
      """
      -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 = plt.figure()
      -ax = fig.add_subplot(111)
      -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 Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/api/two_scales.html b/dev/examples/api/two_scales.html deleted file mode 100644 index 6ed3b85bc40..00000000000 --- a/dev/examples/api/two_scales.html +++ /dev/null @@ -1,195 +0,0 @@ - - - - - - - - api example code: two_scales.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      api example code: two_scales.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/two_scales.png -
      -
      #!/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 = plt.figure()
      -ax1 = fig.add_subplot(111)
      -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 Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/api/unicode_minus.html b/dev/examples/api/unicode_minus.html deleted file mode 100644 index 668d92266bf..00000000000 --- a/dev/examples/api/unicode_minus.html +++ /dev/null @@ -1,168 +0,0 @@ - - - - - - - - api example code: unicode_minus.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      api example code: unicode_minus.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/unicode_minus.png -
      -
      """
      -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 = plt.figure()
      -ax = fig.add_subplot(111)
      -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 Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/api/watermark_image.html b/dev/examples/api/watermark_image.html deleted file mode 100644 index d7752d569c4..00000000000 --- a/dev/examples/api/watermark_image.html +++ /dev/null @@ -1,173 +0,0 @@ - - - - - - - - api example code: watermark_image.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      api example code: watermark_image.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/watermark_image.png -
      -
      """
      -Use a PNG file as a watermark
      -"""
      -from __future__ import print_function
      -import numpy as np
      -import matplotlib
      -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 = plt.figure()
      -ax = fig.add_subplot(111)
      -
      -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 Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/api/watermark_text.html b/dev/examples/api/watermark_text.html deleted file mode 100644 index 23525b63a43..00000000000 --- a/dev/examples/api/watermark_text.html +++ /dev/null @@ -1,171 +0,0 @@ - - - - - - - - api example code: watermark_text.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      api example code: watermark_text.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/watermark_text.png -
      -
      """
      -Use a Text as a watermark
      -"""
      -import numpy as np
      -#import matplotlib
      -#matplotlib.use('Agg')
      -
      -import matplotlib.pyplot as plt
      -
      -fig = plt.figure()
      -
      -ax = fig.add_subplot(111)
      -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 Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/axes_grid/demo_axes_divider.html b/dev/examples/axes_grid/demo_axes_divider.html deleted file mode 100644 index 4159a7ab3da..00000000000 --- a/dev/examples/axes_grid/demo_axes_divider.html +++ /dev/null @@ -1,280 +0,0 @@ - - - - - - - - axes_grid example code: demo_axes_divider.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      axes_grid example code: demo_axes_divider.py

      -

      (Source code)

      -

      (png, hires.png, pdf)

      -
      -../../_images/demo_axes_divider_01_00.png -
      -
      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_sied(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_sied(ax)
      -
      -    plt.draw()
      -    plt.show()
      -
      -
      -demo()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/axes_grid/demo_axes_grid.html b/dev/examples/axes_grid/demo_axes_grid.html deleted file mode 100644 index f493be6e345..00000000000 --- a/dev/examples/axes_grid/demo_axes_grid.html +++ /dev/null @@ -1,248 +0,0 @@ - - - - - - - - axes_grid example code: demo_axes_grid.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      axes_grid example code: demo_axes_grid.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/demo_axes_grid.png -
      -
      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, 131, # similar to subplot(131)
      -                    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, 132, # similar to subplot(132)
      -                    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(F, 133, # similar to subplot(122)
      -                    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])
      -
      -
      -
      -if 1:
      -    F = plt.figure(1, (5.5, 2.5))
      -
      -    F.subplots_adjust(left=0.05, right=0.98)
      -
      -    demo_simple_grid(F)
      -    demo_grid_with_single_cbar(F)
      -    demo_grid_with_each_cbar(F)
      -
      -    plt.draw()
      -    plt.show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/axes_grid/demo_axes_grid2.html b/dev/examples/axes_grid/demo_axes_grid2.html deleted file mode 100644 index 68807ab197a..00000000000 --- a/dev/examples/axes_grid/demo_axes_grid2.html +++ /dev/null @@ -1,263 +0,0 @@ - - - - - - - - axes_grid example code: demo_axes_grid2.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      axes_grid example code: demo_axes_grid2.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/demo_axes_grid2.png -
      -
      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 Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/axes_grid/demo_axes_hbox_divider.html b/dev/examples/axes_grid/demo_axes_hbox_divider.html deleted file mode 100644 index 118605d96d6..00000000000 --- a/dev/examples/axes_grid/demo_axes_hbox_divider.html +++ /dev/null @@ -1,201 +0,0 @@ - - - - - - - - axes_grid example code: demo_axes_hbox_divider.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      axes_grid example code: demo_axes_hbox_divider.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/demo_axes_hbox_divider.png -
      -
      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__":
      -
      -    fig1 = plt.figure()
      -
      -    arr1 = np.arange(20).reshape((4,5))
      -    arr2 = np.arange(20).reshape((5,4))
      -
      -    ax1 = plt.subplot(121)
      -    ax2 = plt.subplot(122)
      -
      -    ax1.imshow(arr1, interpolation="nearest")
      -    ax2.imshow(arr2, interpolation="nearest")
      -
      -    rect = 111 # subplot param for combined axes
      -    make_heights_equal(fig1, 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 Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/axes_grid/demo_axes_rgb.html b/dev/examples/axes_grid/demo_axes_rgb.html deleted file mode 100644 index 4cfc37506aa..00000000000 --- a/dev/examples/axes_grid/demo_axes_rgb.html +++ /dev/null @@ -1,245 +0,0 @@ - - - - - - - - axes_grid example code: demo_axes_rgb.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      axes_grid example code: demo_axes_rgb.py

      -

      (Source code)

      -
      -../../_images/demo_axes_rgb_00.png -

      (png, hires.png, pdf)

      -
      -
      -../../_images/demo_axes_rgb_01.png -

      (png, hires.png, pdf)

      -
      -
      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 = plt.figure(1)
      -    fig.clf()
      -
      -    ax = fig.add_subplot(111)
      -    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 Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/axes_grid/demo_axisline_style.html b/dev/examples/axes_grid/demo_axisline_style.html deleted file mode 100644 index 6de2d0e3df1..00000000000 --- a/dev/examples/axes_grid/demo_axisline_style.html +++ /dev/null @@ -1,170 +0,0 @@ - - - - - - - - axes_grid example code: demo_axisline_style.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      axes_grid example code: demo_axisline_style.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/demo_axisline_style.png -
      -
      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 Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/axes_grid/demo_colorbar_with_inset_locator.html b/dev/examples/axes_grid/demo_colorbar_with_inset_locator.html deleted file mode 100644 index 0e0174fc99e..00000000000 --- a/dev/examples/axes_grid/demo_colorbar_with_inset_locator.html +++ /dev/null @@ -1,189 +0,0 @@ - - - - - - - - axes_grid example code: demo_colorbar_with_inset_locator.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      axes_grid example code: demo_colorbar_with_inset_locator.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/demo_colorbar_with_inset_locator.png -
      -
      import matplotlib.pyplot as plt
      -
      -from mpl_toolkits.axes_grid1.inset_locator import inset_axes
      -
      -fig = plt.figure(1, [6, 3])
      -
      -# first subplot
      -ax1 = fig.add_subplot(121)
      -
      -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")
      -
      -# first subplot
      -ax = fig.add_subplot(122)
      -
      -axins = inset_axes(ax,
      -                   width="5%", # width = 10% of parent_bbox width
      -                   height="50%", # height : 50%
      -                   loc=3,
      -                   bbox_to_anchor=(1.05, 0., 1, 1),
      -                   bbox_transform=ax.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=ax.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 Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/axes_grid/demo_curvelinear_grid.html b/dev/examples/axes_grid/demo_curvelinear_grid.html deleted file mode 100644 index df62691fef3..00000000000 --- a/dev/examples/axes_grid/demo_curvelinear_grid.html +++ /dev/null @@ -1,280 +0,0 @@ - - - - - - - - axes_grid example code: demo_curvelinear_grid.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      axes_grid example code: demo_curvelinear_grid.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/demo_curvelinear_grid.png -
      -
      import numpy as np
      -#from matplotlib.path import Path
      -
      -import matplotlib.pyplot as plt
      -import matplotlib.cbook as cbook
      -
      -from  mpl_toolkits.axisartist.grid_helper_curvelinear import GridHelperCurveLinear
      -from mpl_toolkits.axisartist import Subplot
      -
      -from mpl_toolkits.axisartist import SubplotHost, \
      -     ParasiteAxesAuxTrans
      -
      -
      -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 Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/axes_grid/demo_curvelinear_grid2.html b/dev/examples/axes_grid/demo_curvelinear_grid2.html deleted file mode 100644 index c2bf90c5f5a..00000000000 --- a/dev/examples/axes_grid/demo_curvelinear_grid2.html +++ /dev/null @@ -1,210 +0,0 @@ - - - - - - - - axes_grid example code: demo_curvelinear_grid2.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      axes_grid example code: demo_curvelinear_grid2.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/demo_curvelinear_grid2.png -
      -
      import numpy as np
      -#from matplotlib.path import Path
      -
      -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,
      -                                                     lon_minmax = None, #(0, np.inf),
      -                                                     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 Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/axes_grid/demo_edge_colorbar.html b/dev/examples/axes_grid/demo_edge_colorbar.html deleted file mode 100644 index 9366ffe7253..00000000000 --- a/dev/examples/axes_grid/demo_edge_colorbar.html +++ /dev/null @@ -1,238 +0,0 @@ - - - - - - - - axes_grid example code: demo_edge_colorbar.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      axes_grid example code: demo_edge_colorbar.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/demo_edge_colorbar.png -
      -
      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 Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/axes_grid/demo_floating_axes.html b/dev/examples/axes_grid/demo_floating_axes.html deleted file mode 100644 index 8c29c3abcc7..00000000000 --- a/dev/examples/axes_grid/demo_floating_axes.html +++ /dev/null @@ -1,306 +0,0 @@ - - - - - - - - axes_grid example code: demo_floating_axes.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      axes_grid example code: demo_floating_axes.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/demo_floating_axes.png -
      -
      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
      -
      -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_scale = Affine2D().scale(np.pi/180., 1.)
      -
      -    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
      -
      -
      -
      -if 1:
      -    import matplotlib.pyplot as plt
      -    fig = plt.figure(1, figsize=(8, 4))
      -    fig.subplots_adjust(wspace=0.3, left=0.05, right=0.95)
      -
      -    ax1, aux_ax2 = setup_axes1(fig, 131)
      -    aux_ax2.bar([0, 1, 2, 3], [3, 2, 1, 3])
      -
      -    #theta = np.random.rand(10) #*.5*np.pi
      -    #radius = np.random.rand(10) #+1.
      -    #aux_ax1.scatter(theta, radius)
      -
      -
      -    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 Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/axes_grid/demo_floating_axis.html b/dev/examples/axes_grid/demo_floating_axis.html deleted file mode 100644 index 5531948c996..00000000000 --- a/dev/examples/axes_grid/demo_floating_axis.html +++ /dev/null @@ -1,219 +0,0 @@ - - - - - - - - axes_grid example code: demo_floating_axis.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      axes_grid example code: demo_floating_axis.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/demo_floating_axis.png -
      -
      """
      -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 Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/axes_grid/demo_parasite_axes2.html b/dev/examples/axes_grid/demo_parasite_axes2.html deleted file mode 100644 index 707f57c77cd..00000000000 --- a/dev/examples/axes_grid/demo_parasite_axes2.html +++ /dev/null @@ -1,198 +0,0 @@ - - - - - - - - axes_grid example code: demo_parasite_axes2.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      axes_grid example code: demo_parasite_axes2.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/demo_parasite_axes2_00_00.png -
      -

      ()

      -
      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 Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/axes_grid/index.html b/dev/examples/axes_grid/index.html deleted file mode 100644 index 440727f0e61..00000000000 --- a/dev/examples/axes_grid/index.html +++ /dev/null @@ -1,179 +0,0 @@ - - - - - - - - axes_grid Examples — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - - - - - - \ No newline at end of file diff --git a/dev/examples/axes_grid/inset_locator_demo.html b/dev/examples/axes_grid/inset_locator_demo.html deleted file mode 100644 index e5b29429d10..00000000000 --- a/dev/examples/axes_grid/inset_locator_demo.html +++ /dev/null @@ -1,195 +0,0 @@ - - - - - - - - axes_grid example code: inset_locator_demo.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      axes_grid example code: inset_locator_demo.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/inset_locator_demo.png -
      -
      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 = plt.figure(1, [5.5, 3])
      -
      -# first subplot
      -ax = fig.add_subplot(1,2,1)
      -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
      -ax = fig.add_subplot(1,2,2)
      -ax.set_aspect(1.)
      -
      -axins = zoomed_inset_axes(ax, 0.5, loc=1) # zoom = 0.5
      -
      -plt.xticks(visible=False)
      -plt.yticks(visible=False)
      -
      -add_sizebar(ax, 0.5)
      -add_sizebar(axins, 0.5)
      -
      -plt.draw()
      -plt.show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/axes_grid/inset_locator_demo2.html b/dev/examples/axes_grid/inset_locator_demo2.html deleted file mode 100644 index 919359f6136..00000000000 --- a/dev/examples/axes_grid/inset_locator_demo2.html +++ /dev/null @@ -1,197 +0,0 @@ - - - - - - - - axes_grid example code: inset_locator_demo2.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      axes_grid example code: inset_locator_demo2.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/inset_locator_demo2.png -
      -
      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 = plt.figure(1, [5,4])
      -ax = fig.add_subplot(111)
      -
      -# 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 Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/axes_grid/make_room_for_ylabel_using_axesgrid.html b/dev/examples/axes_grid/make_room_for_ylabel_using_axesgrid.html deleted file mode 100644 index 9842d2f05cd..00000000000 --- a/dev/examples/axes_grid/make_room_for_ylabel_using_axesgrid.html +++ /dev/null @@ -1,221 +0,0 @@ - - - - - - - - axes_grid example code: make_room_for_ylabel_using_axesgrid.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      axes_grid example code: make_room_for_ylabel_using_axesgrid.py

      -

      (Source code)

      -
      -../../_images/make_room_for_ylabel_using_axesgrid_00.png -

      (png, hires.png, pdf)

      -
      -
      -../../_images/make_room_for_ylabel_using_axesgrid_01.png -

      (png, hires.png, pdf)

      -
      -
      -../../_images/make_room_for_ylabel_using_axesgrid_02.png -

      (png, hires.png, pdf)

      -
      -
      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 Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/axes_grid/parasite_simple2.html b/dev/examples/axes_grid/parasite_simple2.html deleted file mode 100644 index 3b4061e6fd2..00000000000 --- a/dev/examples/axes_grid/parasite_simple2.html +++ /dev/null @@ -1,192 +0,0 @@ - - - - - - - - axes_grid example code: parasite_simple2.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      axes_grid example code: parasite_simple2.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/parasite_simple2.png -
      -
      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("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 Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/axes_grid/scatter_hist.html b/dev/examples/axes_grid/scatter_hist.html deleted file mode 100644 index a2dd87de634..00000000000 --- a/dev/examples/axes_grid/scatter_hist.html +++ /dev/null @@ -1,200 +0,0 @@ - - - - - - - - axes_grid example code: scatter_hist.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      axes_grid example code: scatter_hist.py

      -

      (Source code)

      -
      import numpy as np
      -import matplotlib.pyplot as plt
      -
      -# the random data
      -x = np.random.randn(1000)
      -y = np.random.randn(1000)
      -
      -
      -fig = plt.figure(1, figsize=(5.5,5.5))
      -
      -from mpl_toolkits.axes_grid1 import make_axes_locatable
      -
      -# the scatter plot:
      -axScatter = plt.subplot(111)
      -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 Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/axes_grid/simple_anchored_artists.html b/dev/examples/axes_grid/simple_anchored_artists.html deleted file mode 100644 index e4e28ba4d14..00000000000 --- a/dev/examples/axes_grid/simple_anchored_artists.html +++ /dev/null @@ -1,209 +0,0 @@ - - - - - - - - axes_grid example code: simple_anchored_artists.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      axes_grid example code: simple_anchored_artists.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/simple_anchored_artists.png -
      -
      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 Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/axes_grid/simple_axesgrid.html b/dev/examples/axes_grid/simple_axesgrid.html deleted file mode 100644 index bf2ec094f37..00000000000 --- a/dev/examples/axes_grid/simple_axesgrid.html +++ /dev/null @@ -1,167 +0,0 @@ - - - - - - - - axes_grid example code: simple_axesgrid.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      axes_grid example code: simple_axesgrid.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/simple_axesgrid.png -
      -
      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 Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/axes_grid/simple_axesgrid2.html b/dev/examples/axes_grid/simple_axesgrid2.html deleted file mode 100644 index 0da0a051884..00000000000 --- a/dev/examples/axes_grid/simple_axesgrid2.html +++ /dev/null @@ -1,181 +0,0 @@ - - - - - - - - axes_grid example code: simple_axesgrid2.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      axes_grid example code: simple_axesgrid2.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/simple_axesgrid2.png -
      -
      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 Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/axes_grid/simple_axisline4.html b/dev/examples/axes_grid/simple_axisline4.html deleted file mode 100644 index 604b7e95a34..00000000000 --- a/dev/examples/axes_grid/simple_axisline4.html +++ /dev/null @@ -1,168 +0,0 @@ - - - - - - - - axes_grid example code: simple_axisline4.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      axes_grid example code: simple_axisline4.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/simple_axisline4.png -
      -
      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 Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/color/color_cycle_demo.html b/dev/examples/color/color_cycle_demo.html deleted file mode 100644 index ea21a60a839..00000000000 --- a/dev/examples/color/color_cycle_demo.html +++ /dev/null @@ -1,182 +0,0 @@ - - - - - - - - color example code: color_cycle_demo.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      color example code: color_cycle_demo.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/color_cycle_demo.png -
      -
      """
      -Demo of custom color-cycle settings to control colors for multi-line plots.
      -
      -This example demonstrates two different APIs:
      -
      -    1. Setting the default rc-parameter specifying the color cycle.
      -       This affects all subsequent plots.
      -    2. Setting the color cycle for a specific axes. This only affects a single
      -       axes.
      -"""
      -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)
      -fig, (ax0, ax1)  = plt.subplots(nrows=2)
      -
      -plt.rc('axes', color_cycle=['r', 'g', 'b', 'y'])
      -ax0.plot(yy)
      -ax0.set_title('Set default color cycle to rgby')
      -
      -ax1.set_color_cycle(['c', 'm', 'y', 'k'])
      -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 Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/color/colormaps_reference.html b/dev/examples/color/colormaps_reference.html deleted file mode 100644 index 3d4dfb2205d..00000000000 --- a/dev/examples/color/colormaps_reference.html +++ /dev/null @@ -1,246 +0,0 @@ - - - - - - - - color example code: colormaps_reference.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      color example code: colormaps_reference.py

      -

      (Source code)

      -
      -../../_images/colormaps_reference_00.png -

      (png, hires.png, pdf)

      -
      -
      -../../_images/colormaps_reference_01.png -

      (png, hires.png, pdf)

      -
      -
      -../../_images/colormaps_reference_02.png -

      (png, hires.png, pdf)

      -
      -
      -../../_images/colormaps_reference_03.png -

      (png, hires.png, pdf)

      -
      -
      -../../_images/colormaps_reference_04.png -

      (png, hires.png, pdf)

      -
      -
      """
      -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
      -
      -
      -cmaps = [('Sequential',     ['binary', 'Blues', 'BuGn', 'BuPu', 'gist_yarg',
      -                             'GnBu', 'Greens', 'Greys', 'Oranges', 'OrRd',
      -                             'PuBu', 'PuBuGn', 'PuRd', 'Purples', 'RdPu',
      -                             'Reds', 'YlGn', 'YlGnBu', 'YlOrBr', 'YlOrRd']),
      -         ('Sequential (2)', ['afmhot', 'autumn', 'bone', 'cool', 'copper',
      -                             'gist_gray', 'gist_heat', 'gray', 'hot', 'pink',
      -                             'spring', 'summer', 'winter']),
      -         ('Diverging',      ['BrBG', 'bwr', 'coolwarm', 'PiYG', 'PRGn', 'PuOr',
      -                             'RdBu', 'RdGy', 'RdYlBu', 'RdYlGn', 'seismic']),
      -         ('Qualitative',    ['Accent', 'Dark2', 'hsv', 'Paired', 'Pastel1',
      -                             'Pastel2', 'Set1', 'Set2', 'Set3', 'spectral']),
      -         ('Miscellaneous',  ['gist_earth', 'gist_ncar', 'gist_rainbow',
      -                             'gist_stern', 'jet', 'brg', 'CMRmap', 'cubehelix',
      -                             'gnuplot', 'gnuplot2', 'ocean', 'rainbow',
      -                             'terrain', '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 Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/color/index.html b/dev/examples/color/index.html deleted file mode 100644 index eef145578e8..00000000000 --- a/dev/examples/color/index.html +++ /dev/null @@ -1,159 +0,0 @@ - - - - - - - - color Examples — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      color Examples

      - --- - - - - - -
      Release:1.3.x
      Date:May 21, 2013
      - -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/event_handling/close_event.html b/dev/examples/event_handling/close_event.html deleted file mode 100644 index 2e20e8a8960..00000000000 --- a/dev/examples/event_handling/close_event.html +++ /dev/null @@ -1,158 +0,0 @@ - - - - - - - - event_handling example code: close_event.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      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 Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/event_handling/close_event.py b/dev/examples/event_handling/close_event.py deleted file mode 100644 index 0bec9668d52..00000000000 --- a/dev/examples/event_handling/close_event.py +++ /dev/null @@ -1,11 +0,0 @@ -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() diff --git a/dev/examples/event_handling/data_browser.html b/dev/examples/event_handling/data_browser.html deleted file mode 100644 index 235fdf89035..00000000000 --- a/dev/examples/event_handling/data_browser.html +++ /dev/null @@ -1,231 +0,0 @@ - - - - - - - - event_handling example code: data_browser.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      event_handling example code: data_browser.py

      -

      [source code]

      -
      import numpy as np
      -
      -
      -class PointBrowser:
      -    """
      -    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 = plt.figure()
      -    ax = fig.add_subplot(211)
      -    ax.set_title('click on point to plot time series')
      -    line, = ax.plot(xs, ys, 'o', picker=5)  # 5 points tolerance
      -    ax2 = fig.add_subplot(212)
      -
      -    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 Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/event_handling/data_browser.py b/dev/examples/event_handling/data_browser.py deleted file mode 100644 index 7e11c3fade4..00000000000 --- a/dev/examples/event_handling/data_browser.py +++ /dev/null @@ -1,85 +0,0 @@ -import numpy as np - - -class PointBrowser: - """ - 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 = plt.figure() - ax = fig.add_subplot(211) - ax.set_title('click on point to plot time series') - line, = ax.plot(xs, ys, 'o', picker=5) # 5 points tolerance - ax2 = fig.add_subplot(212) - - browser = PointBrowser() - - fig.canvas.mpl_connect('pick_event', browser.onpick) - fig.canvas.mpl_connect('key_press_event', browser.onpress) - - plt.show() - diff --git a/dev/examples/event_handling/figure_axes_enter_leave.html b/dev/examples/event_handling/figure_axes_enter_leave.html deleted file mode 100644 index 1fd72eb1fb8..00000000000 --- a/dev/examples/event_handling/figure_axes_enter_leave.html +++ /dev/null @@ -1,195 +0,0 @@ - - - - - - - - event_handling example code: figure_axes_enter_leave.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      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 = plt.figure()
      -fig1.suptitle('mouse hover over figure or axes to trigger events')
      -ax1 = fig1.add_subplot(211)
      -ax2 = fig1.add_subplot(212)
      -
      -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 = plt.figure()
      -fig2.suptitle('mouse hover over figure or axes to trigger events')
      -ax1 = fig2.add_subplot(211)
      -ax2 = fig2.add_subplot(212)
      -
      -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 Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/event_handling/figure_axes_enter_leave.py b/dev/examples/event_handling/figure_axes_enter_leave.py deleted file mode 100644 index 7b9175ff386..00000000000 --- a/dev/examples/event_handling/figure_axes_enter_leave.py +++ /dev/null @@ -1,50 +0,0 @@ -""" -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 = plt.figure() -fig1.suptitle('mouse hover over figure or axes to trigger events') -ax1 = fig1.add_subplot(211) -ax2 = fig1.add_subplot(212) - -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 = plt.figure() -fig2.suptitle('mouse hover over figure or axes to trigger events') -ax1 = fig2.add_subplot(211) -ax2 = fig2.add_subplot(212) - -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() - - diff --git a/dev/examples/event_handling/idle_and_timeout.html b/dev/examples/event_handling/idle_and_timeout.html deleted file mode 100644 index 2b9b0dd7ab9..00000000000 --- a/dev/examples/event_handling/idle_and_timeout.html +++ /dev/null @@ -1,181 +0,0 @@ - - - - - - - - event_handling example code: idle_and_timeout.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      event_handling example code: idle_and_timeout.py

      -

      [source code]

      -
      from __future__ import print_function
      -"""
      -Demonstrate/test the idle and timeout API
      -
      -This is only tested on gtk so far and is a prototype implementation
      -"""
      -import numpy as np
      -import matplotlib.pyplot as plt
      -
      -fig = plt.figure()
      -ax = fig.add_subplot(111)
      -
      -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 Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/event_handling/idle_and_timeout.py b/dev/examples/event_handling/idle_and_timeout.py deleted file mode 100644 index 6dbff324a39..00000000000 --- a/dev/examples/event_handling/idle_and_timeout.py +++ /dev/null @@ -1,36 +0,0 @@ -from __future__ import print_function -""" -Demonstrate/test the idle and timeout API - -This is only tested on gtk so far and is a prototype implementation -""" -import numpy as np -import matplotlib.pyplot as plt - -fig = plt.figure() -ax = fig.add_subplot(111) - -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() - - diff --git a/dev/examples/event_handling/index.html b/dev/examples/event_handling/index.html deleted file mode 100644 index b67553fc343..00000000000 --- a/dev/examples/event_handling/index.html +++ /dev/null @@ -1,178 +0,0 @@ - - - - - - - - event_handling Examples — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - - - - - - \ No newline at end of file diff --git a/dev/examples/event_handling/keypress_demo.html b/dev/examples/event_handling/keypress_demo.html deleted file mode 100644 index 41b5229c875..00000000000 --- a/dev/examples/event_handling/keypress_demo.html +++ /dev/null @@ -1,175 +0,0 @@ - - - - - - - - event_handling example code: keypress_demo.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      event_handling example code: keypress_demo.py

      -

      [source code]

      -
      #!/usr/bin/env python
      -
      -"""
      -Show how to connect to keypress events
      -"""
      -from __future__ import print_function
      -import sys
      -import numpy as np
      -import matplotlib.pyplot as plt
      -
      -
      -def press(event):
      -    print('press', event.key)
      -    sys.stdout.flush()
      -    if event.key=='x':
      -        visible = xl.get_visible()
      -        xl.set_visible(not visible)
      -        fig.canvas.draw()
      -
      -fig = plt.figure()
      -ax = fig.add_subplot(111)
      -
      -fig.canvas.mpl_connect('key_press_event', press)
      -
      -ax.plot(np.random.rand(12), np.random.rand(12), 'go')
      -xl = ax.set_xlabel('easy come, easy go')
      -
      -plt.show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/event_handling/keypress_demo.py b/dev/examples/event_handling/keypress_demo.py deleted file mode 100644 index 68c36c655ea..00000000000 --- a/dev/examples/event_handling/keypress_demo.py +++ /dev/null @@ -1,28 +0,0 @@ -#!/usr/bin/env python - -""" -Show how to connect to keypress events -""" -from __future__ import print_function -import sys -import numpy as np -import matplotlib.pyplot as plt - - -def press(event): - print('press', event.key) - sys.stdout.flush() - if event.key=='x': - visible = xl.get_visible() - xl.set_visible(not visible) - fig.canvas.draw() - -fig = plt.figure() -ax = fig.add_subplot(111) - -fig.canvas.mpl_connect('key_press_event', press) - -ax.plot(np.random.rand(12), np.random.rand(12), 'go') -xl = ax.set_xlabel('easy come, easy go') - -plt.show() diff --git a/dev/examples/event_handling/lasso_demo.html b/dev/examples/event_handling/lasso_demo.html deleted file mode 100644 index 971ee705018..00000000000 --- a/dev/examples/event_handling/lasso_demo.html +++ /dev/null @@ -1,224 +0,0 @@ - - - - - - - - event_handling example code: lasso_demo.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      event_handling example code: lasso_demo.py

      -

      [source code]

      -
      """
      -Show how to use a lasso to select a set of points and get the indices
      -of the selected points.  A callback is used to change the color of the
      -selected points
      -
      -This is currently a proof-of-concept implementation (though it is
      -usable as is).  There will be some refinement of the API.
      -"""
      -from matplotlib.widgets import Lasso
      -from matplotlib.colors import colorConverter
      -from matplotlib.collections import RegularPolyCollection
      -from matplotlib import path
      -
      -import matplotlib.pyplot as plt
      -from numpy import nonzero
      -from numpy.random import rand
      -
      -class Datum(object):
      -    colorin = colorConverter.to_rgba('red')
      -    colorout = colorConverter.to_rgba('blue')
      -    def __init__(self, x, y, include=False):
      -        self.x = x
      -        self.y = y
      -        if include: self.color = self.colorin
      -        else: self.color = self.colorout
      -
      -
      -class LassoManager(object):
      -    def __init__(self, ax, data):
      -        self.axes = ax
      -        self.canvas = ax.figure.canvas
      -        self.data = data
      -
      -        self.Nxy = len(data)
      -
      -        facecolors = [d.color for d in data]
      -        self.xys = [(d.x, d.y) for d in data]
      -        fig = ax.figure
      -        self.collection = RegularPolyCollection(
      -            fig.dpi, 6, sizes=(100,),
      -            facecolors=facecolors,
      -            offsets = self.xys,
      -            transOffset = ax.transData)
      -
      -        ax.add_collection(self.collection)
      -
      -        self.cid = self.canvas.mpl_connect('button_press_event', self.onpress)
      -
      -    def callback(self, verts):
      -        facecolors = self.collection.get_facecolors()
      -        p = path.Path(verts)
      -        ind = p.contains_points(self.xys)
      -        for i in range(len(self.xys)):
      -            if ind[i]:
      -                facecolors[i] = Datum.colorin
      -            else:
      -                facecolors[i] = Datum.colorout
      -
      -        self.canvas.draw_idle()
      -        self.canvas.widgetlock.release(self.lasso)
      -        del self.lasso
      -
      -    def onpress(self, event):
      -        if self.canvas.widgetlock.locked(): return
      -        if event.inaxes is None: return
      -        self.lasso = Lasso(event.inaxes, (event.xdata, event.ydata), self.callback)
      -        # acquire a lock on the widget drawing
      -        self.canvas.widgetlock(self.lasso)
      -
      -if __name__ == '__main__':
      -
      -    data = [Datum(*xy) for xy in rand(100, 2)]
      -
      -    ax = plt.axes(xlim=(0,1), ylim=(0,1), autoscale_on=False)
      -    lman = LassoManager(ax, data)
      -
      -    plt.show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/event_handling/lasso_demo.py b/dev/examples/event_handling/lasso_demo.py deleted file mode 100644 index c56d7c1c8e7..00000000000 --- a/dev/examples/event_handling/lasso_demo.py +++ /dev/null @@ -1,77 +0,0 @@ -""" -Show how to use a lasso to select a set of points and get the indices -of the selected points. A callback is used to change the color of the -selected points - -This is currently a proof-of-concept implementation (though it is -usable as is). There will be some refinement of the API. -""" -from matplotlib.widgets import Lasso -from matplotlib.colors import colorConverter -from matplotlib.collections import RegularPolyCollection -from matplotlib import path - -import matplotlib.pyplot as plt -from numpy import nonzero -from numpy.random import rand - -class Datum(object): - colorin = colorConverter.to_rgba('red') - colorout = colorConverter.to_rgba('blue') - def __init__(self, x, y, include=False): - self.x = x - self.y = y - if include: self.color = self.colorin - else: self.color = self.colorout - - -class LassoManager(object): - def __init__(self, ax, data): - self.axes = ax - self.canvas = ax.figure.canvas - self.data = data - - self.Nxy = len(data) - - facecolors = [d.color for d in data] - self.xys = [(d.x, d.y) for d in data] - fig = ax.figure - self.collection = RegularPolyCollection( - fig.dpi, 6, sizes=(100,), - facecolors=facecolors, - offsets = self.xys, - transOffset = ax.transData) - - ax.add_collection(self.collection) - - self.cid = self.canvas.mpl_connect('button_press_event', self.onpress) - - def callback(self, verts): - facecolors = self.collection.get_facecolors() - p = path.Path(verts) - ind = p.contains_points(self.xys) - for i in range(len(self.xys)): - if ind[i]: - facecolors[i] = Datum.colorin - else: - facecolors[i] = Datum.colorout - - self.canvas.draw_idle() - self.canvas.widgetlock.release(self.lasso) - del self.lasso - - def onpress(self, event): - if self.canvas.widgetlock.locked(): return - if event.inaxes is None: return - self.lasso = Lasso(event.inaxes, (event.xdata, event.ydata), self.callback) - # acquire a lock on the widget drawing - self.canvas.widgetlock(self.lasso) - -if __name__ == '__main__': - - data = [Datum(*xy) for xy in rand(100, 2)] - - ax = plt.axes(xlim=(0,1), ylim=(0,1), autoscale_on=False) - lman = LassoManager(ax, data) - - plt.show() diff --git a/dev/examples/event_handling/legend_picking.html b/dev/examples/event_handling/legend_picking.html deleted file mode 100644 index bb34fa5e960..00000000000 --- a/dev/examples/event_handling/legend_picking.html +++ /dev/null @@ -1,193 +0,0 @@ - - - - - - - - event_handling example code: legend_picking.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      event_handling example code: legend_picking.py

      -

      [source code]

      -
      """
      -Enable picking on the legend to toggle the legended line on and off
      -"""
      -import numpy as np
      -import matplotlib.pyplot as plt
      -
      -t = np.arange(0.0, 0.2, 0.1)
      -y1 = 2*np.sin(2*np.pi*t)
      -y2 = 4*np.sin(2*np.pi*2*t)
      -
      -fig = plt.figure()
      -ax = fig.add_subplot(111)
      -ax.set_title('Click on legend line to toggle line on/off')
      -line1, = ax.plot(t, y1, lw=2, color='red', label='1 HZ')
      -line2, = ax.plot(t, y2, lw=2, color='blue', label='2 HZ')
      -leg = ax.legend(loc='upper left', fancybox=True, shadow=True)
      -leg.get_frame().set_alpha(0.4)
      -
      -
      -# we will set up a dict mapping legend line to orig line, and enable
      -# picking on the legend line
      -lines = [line1, line2]
      -lined = dict()
      -for legline, origline in zip(leg.get_lines(), lines):
      -    legline.set_picker(5)  # 5 pts tolerance
      -    lined[legline] = origline
      -
      -
      -def onpick(event):
      -    # on the pick event, find the orig line corresponding to the
      -    # legend proxy line, and toggle the visibility
      -    legline = event.artist
      -    origline = lined[legline]
      -    vis = not origline.get_visible()
      -    origline.set_visible(vis)
      -    # Change the alpha on the line in the legend so we can see what lines
      -    # have been toggled
      -    if vis:
      -        legline.set_alpha(1.0)
      -    else:
      -        legline.set_alpha(0.2)
      -    fig.canvas.draw()
      -
      -fig.canvas.mpl_connect('pick_event', onpick)
      -
      -plt.show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/event_handling/legend_picking.py b/dev/examples/event_handling/legend_picking.py deleted file mode 100644 index 4505b09bd97..00000000000 --- a/dev/examples/event_handling/legend_picking.py +++ /dev/null @@ -1,46 +0,0 @@ -""" -Enable picking on the legend to toggle the legended line on and off -""" -import numpy as np -import matplotlib.pyplot as plt - -t = np.arange(0.0, 0.2, 0.1) -y1 = 2*np.sin(2*np.pi*t) -y2 = 4*np.sin(2*np.pi*2*t) - -fig = plt.figure() -ax = fig.add_subplot(111) -ax.set_title('Click on legend line to toggle line on/off') -line1, = ax.plot(t, y1, lw=2, color='red', label='1 HZ') -line2, = ax.plot(t, y2, lw=2, color='blue', label='2 HZ') -leg = ax.legend(loc='upper left', fancybox=True, shadow=True) -leg.get_frame().set_alpha(0.4) - - -# we will set up a dict mapping legend line to orig line, and enable -# picking on the legend line -lines = [line1, line2] -lined = dict() -for legline, origline in zip(leg.get_lines(), lines): - legline.set_picker(5) # 5 pts tolerance - lined[legline] = origline - - -def onpick(event): - # on the pick event, find the orig line corresponding to the - # legend proxy line, and toggle the visibility - legline = event.artist - origline = lined[legline] - vis = not origline.get_visible() - origline.set_visible(vis) - # Change the alpha on the line in the legend so we can see what lines - # have been toggled - if vis: - legline.set_alpha(1.0) - else: - legline.set_alpha(0.2) - fig.canvas.draw() - -fig.canvas.mpl_connect('pick_event', onpick) - -plt.show() diff --git a/dev/examples/event_handling/looking_glass.html b/dev/examples/event_handling/looking_glass.html deleted file mode 100644 index 969eff9594d..00000000000 --- a/dev/examples/event_handling/looking_glass.html +++ /dev/null @@ -1,194 +0,0 @@ - - - - - - - - event_handling example code: looking_glass.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      event_handling example code: looking_glass.py

      -

      [source code]

      -
      import numpy as np
      -import matplotlib.pyplot as plt
      -import matplotlib.patches as patches
      -x, y = np.random.rand(2, 200)
      -
      -fig = plt.figure()
      -ax = fig.add_subplot(111)
      -circ = patches.Circle( (0.5, 0.5), 0.25, alpha=0.8, fc='yellow')
      -ax.add_patch(circ)
      -
      -
      -ax.plot(x, y, alpha=0.2)
      -line, = ax.plot(x, y, alpha=1.0, clip_path=circ)
      -
      -class EventHandler:
      -   def __init__(self):
      -       fig.canvas.mpl_connect('button_press_event', self.onpress)
      -       fig.canvas.mpl_connect('button_release_event', self.onrelease)
      -       fig.canvas.mpl_connect('motion_notify_event', self.onmove)
      -       self.x0, self.y0 = circ.center
      -       self.pressevent = None
      -
      -   def onpress(self, event):
      -      if event.inaxes!=ax:
      -         return
      -
      -      if not circ.contains(event)[0]:
      -         return
      -
      -      self.pressevent = event
      -
      -   def onrelease(self, event):
      -      self.pressevent = None
      -      self.x0, self.y0 = circ.center
      -
      -   def onmove(self, event):
      -      if self.pressevent is None or event.inaxes!=self.pressevent.inaxes:
      -         return
      -
      -      dx = event.xdata - self.pressevent.xdata
      -      dy = event.ydata - self.pressevent.ydata
      -      circ.center = self.x0 + dx, self.y0 + dy
      -      line.set_clip_path(circ)
      -      fig.canvas.draw()
      -
      -handler = EventHandler()
      -plt.show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/event_handling/looking_glass.py b/dev/examples/event_handling/looking_glass.py deleted file mode 100644 index 3ceeb68f823..00000000000 --- a/dev/examples/event_handling/looking_glass.py +++ /dev/null @@ -1,47 +0,0 @@ -import numpy as np -import matplotlib.pyplot as plt -import matplotlib.patches as patches -x, y = np.random.rand(2, 200) - -fig = plt.figure() -ax = fig.add_subplot(111) -circ = patches.Circle( (0.5, 0.5), 0.25, alpha=0.8, fc='yellow') -ax.add_patch(circ) - - -ax.plot(x, y, alpha=0.2) -line, = ax.plot(x, y, alpha=1.0, clip_path=circ) - -class EventHandler: - def __init__(self): - fig.canvas.mpl_connect('button_press_event', self.onpress) - fig.canvas.mpl_connect('button_release_event', self.onrelease) - fig.canvas.mpl_connect('motion_notify_event', self.onmove) - self.x0, self.y0 = circ.center - self.pressevent = None - - def onpress(self, event): - if event.inaxes!=ax: - return - - if not circ.contains(event)[0]: - return - - self.pressevent = event - - def onrelease(self, event): - self.pressevent = None - self.x0, self.y0 = circ.center - - def onmove(self, event): - if self.pressevent is None or event.inaxes!=self.pressevent.inaxes: - return - - dx = event.xdata - self.pressevent.xdata - dy = event.ydata - self.pressevent.ydata - circ.center = self.x0 + dx, self.y0 + dy - line.set_clip_path(circ) - fig.canvas.draw() - -handler = EventHandler() -plt.show() diff --git a/dev/examples/event_handling/path_editor.html b/dev/examples/event_handling/path_editor.html deleted file mode 100644 index 94d77c9dff4..00000000000 --- a/dev/examples/event_handling/path_editor.html +++ /dev/null @@ -1,288 +0,0 @@ - - - - - - - - event_handling example code: path_editor.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      event_handling example code: path_editor.py

      -

      [source code]

      -
      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='green', edgecolor='yellow', alpha=0.5)
      -ax.add_patch(patch)
      -
      -
      -class PathInteractor:
      -    """
      -    An path editor.
      -
      -    Key-bindings
      -
      -      't' toggle vertex markers on and off.  When vertex markers are on,
      -          you can move them, delete them
      -
      -
      -    """
      -
      -    showverts = True
      -    epsilon = 5  # max pixel distance to count as a vertex hit
      -
      -    def __init__(self, pathpatch):
      -
      -        self.ax = pathpatch.axes
      -        canvas = self.ax.figure.canvas
      -        self.pathpatch = pathpatch
      -        self.pathpatch.set_animated(True)
      -
      -        x, y = zip(*self.pathpatch.get_path().vertices)
      -
      -        self.line, = ax.plot(x,y,marker='o', markerfacecolor='r', animated=True)
      -
      -        self._ind = None # the active vert
      -
      -        canvas.mpl_connect('draw_event', self.draw_callback)
      -        canvas.mpl_connect('button_press_event', self.button_press_callback)
      -        canvas.mpl_connect('key_press_event', self.key_press_callback)
      -        canvas.mpl_connect('button_release_event', self.button_release_callback)
      -        canvas.mpl_connect('motion_notify_event', self.motion_notify_callback)
      -        self.canvas = canvas
      -
      -
      -    def draw_callback(self, event):
      -        self.background = self.canvas.copy_from_bbox(self.ax.bbox)
      -        self.ax.draw_artist(self.pathpatch)
      -        self.ax.draw_artist(self.line)
      -        self.canvas.blit(self.ax.bbox)
      -
      -    def pathpatch_changed(self, pathpatch):
      -        'this method is called whenever the pathpatchgon object is called'
      -        # only copy the artist props to the line (except visibility)
      -        vis = self.line.get_visible()
      -        Artist.update_from(self.line, pathpatch)
      -        self.line.set_visible(vis)  # don't use the pathpatch visibility state
      -
      -
      -    def get_ind_under_point(self, event):
      -        'get the index of the vertex under point if within epsilon tolerance'
      -
      -        # display coords
      -        xy = np.asarray(self.pathpatch.get_path().vertices)
      -        xyt = self.pathpatch.get_transform().transform(xy)
      -        xt, yt = xyt[:, 0], xyt[:, 1]
      -        d = np.sqrt((xt-event.x)**2 + (yt-event.y)**2)
      -        ind = d.argmin()
      -
      -        if d[ind]>=self.epsilon:
      -            ind = None
      -
      -        return ind
      -
      -    def button_press_callback(self, event):
      -        'whenever a mouse button is pressed'
      -        if not self.showverts: return
      -        if event.inaxes==None: return
      -        if event.button != 1: return
      -        self._ind = self.get_ind_under_point(event)
      -
      -    def button_release_callback(self, event):
      -        'whenever a mouse button is released'
      -        if not self.showverts: return
      -        if event.button != 1: return
      -        self._ind = None
      -
      -    def key_press_callback(self, event):
      -        'whenever a key is pressed'
      -        if not event.inaxes: return
      -        if event.key=='t':
      -            self.showverts = not self.showverts
      -            self.line.set_visible(self.showverts)
      -            if not self.showverts: self._ind = None
      -
      -        self.canvas.draw()
      -
      -    def motion_notify_callback(self, event):
      -        'on mouse movement'
      -        if not self.showverts: return
      -        if self._ind is None: return
      -        if event.inaxes is None: return
      -        if event.button != 1: return
      -        x,y = event.xdata, event.ydata
      -
      -        vertices = self.pathpatch.get_path().vertices
      -
      -        vertices[self._ind] = x,y
      -        self.line.set_data(zip(*vertices))
      -
      -        self.canvas.restore_region(self.background)
      -        self.ax.draw_artist(self.pathpatch)
      -        self.ax.draw_artist(self.line)
      -        self.canvas.blit(self.ax.bbox)
      -
      -
      -interactor = PathInteractor(patch)
      -ax.set_title('drag vertices to update path')
      -ax.set_xlim(-3,4)
      -ax.set_ylim(-3,4)
      -
      -plt.show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/event_handling/path_editor.py b/dev/examples/event_handling/path_editor.py deleted file mode 100644 index 38148c78dff..00000000000 --- a/dev/examples/event_handling/path_editor.py +++ /dev/null @@ -1,143 +0,0 @@ -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='green', edgecolor='yellow', alpha=0.5) -ax.add_patch(patch) - - -class PathInteractor: - """ - An path editor. - - Key-bindings - - 't' toggle vertex markers on and off. When vertex markers are on, - you can move them, delete them - - - """ - - showverts = True - epsilon = 5 # max pixel distance to count as a vertex hit - - def __init__(self, pathpatch): - - self.ax = pathpatch.axes - canvas = self.ax.figure.canvas - self.pathpatch = pathpatch - self.pathpatch.set_animated(True) - - x, y = zip(*self.pathpatch.get_path().vertices) - - self.line, = ax.plot(x,y,marker='o', markerfacecolor='r', animated=True) - - self._ind = None # the active vert - - canvas.mpl_connect('draw_event', self.draw_callback) - canvas.mpl_connect('button_press_event', self.button_press_callback) - canvas.mpl_connect('key_press_event', self.key_press_callback) - canvas.mpl_connect('button_release_event', self.button_release_callback) - canvas.mpl_connect('motion_notify_event', self.motion_notify_callback) - self.canvas = canvas - - - def draw_callback(self, event): - self.background = self.canvas.copy_from_bbox(self.ax.bbox) - self.ax.draw_artist(self.pathpatch) - self.ax.draw_artist(self.line) - self.canvas.blit(self.ax.bbox) - - def pathpatch_changed(self, pathpatch): - 'this method is called whenever the pathpatchgon object is called' - # only copy the artist props to the line (except visibility) - vis = self.line.get_visible() - Artist.update_from(self.line, pathpatch) - self.line.set_visible(vis) # don't use the pathpatch visibility state - - - def get_ind_under_point(self, event): - 'get the index of the vertex under point if within epsilon tolerance' - - # display coords - xy = np.asarray(self.pathpatch.get_path().vertices) - xyt = self.pathpatch.get_transform().transform(xy) - xt, yt = xyt[:, 0], xyt[:, 1] - d = np.sqrt((xt-event.x)**2 + (yt-event.y)**2) - ind = d.argmin() - - if d[ind]>=self.epsilon: - ind = None - - return ind - - def button_press_callback(self, event): - 'whenever a mouse button is pressed' - if not self.showverts: return - if event.inaxes==None: return - if event.button != 1: return - self._ind = self.get_ind_under_point(event) - - def button_release_callback(self, event): - 'whenever a mouse button is released' - if not self.showverts: return - if event.button != 1: return - self._ind = None - - def key_press_callback(self, event): - 'whenever a key is pressed' - if not event.inaxes: return - if event.key=='t': - self.showverts = not self.showverts - self.line.set_visible(self.showverts) - if not self.showverts: self._ind = None - - self.canvas.draw() - - def motion_notify_callback(self, event): - 'on mouse movement' - if not self.showverts: return - if self._ind is None: return - if event.inaxes is None: return - if event.button != 1: return - x,y = event.xdata, event.ydata - - vertices = self.pathpatch.get_path().vertices - - vertices[self._ind] = x,y - self.line.set_data(zip(*vertices)) - - self.canvas.restore_region(self.background) - self.ax.draw_artist(self.pathpatch) - self.ax.draw_artist(self.line) - self.canvas.blit(self.ax.bbox) - - -interactor = PathInteractor(patch) -ax.set_title('drag vertices to update path') -ax.set_xlim(-3,4) -ax.set_ylim(-3,4) - -plt.show() - - diff --git a/dev/examples/event_handling/pick_event_demo.html b/dev/examples/event_handling/pick_event_demo.html deleted file mode 100644 index f016215b2cf..00000000000 --- a/dev/examples/event_handling/pick_event_demo.html +++ /dev/null @@ -1,329 +0,0 @@ - - - - - - - - event_handling example code: pick_event_demo.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      event_handling example code: pick_event_demo.py

      -

      [source code]

      -
      #!/usr/bin/env python
      -
      -"""
      -
      -You can enable picking by setting the "picker" property of an artist
      -(for example, a matplotlib Line2D, Text, Patch, Polygon, AxesImage,
      -etc...)
      -
      -There are a variety of meanings of the picker property
      -
      -    None -  picking is disabled for this artist (default)
      -
      -    boolean - if True then picking will be enabled and the
      -      artist will fire a pick event if the mouse event is over
      -      the artist
      -
      -    float - if picker is a number it is interpreted as an
      -      epsilon tolerance in points and the artist will fire
      -      off an event if it's data is within epsilon of the mouse
      -      event.  For some artists like lines and patch collections,
      -      the artist may provide additional data to the pick event
      -      that is generated, for example, the indices of the data within
      -      epsilon of the pick event
      -
      -    function - if picker is callable, it is a user supplied
      -      function which determines whether the artist is hit by the
      -      mouse event.
      -
      -         hit, props = picker(artist, mouseevent)
      -
      -      to determine the hit test.  If the mouse event is over the
      -      artist, return hit=True and props is a dictionary of properties
      -      you want added to the PickEvent attributes
      -
      -
      -After you have enabled an artist for picking by setting the "picker"
      -property, you need to connect to the figure canvas pick_event to get
      -pick callbacks on mouse press events.  For example,
      -
      -  def pick_handler(event):
      -      mouseevent = event.mouseevent
      -      artist = event.artist
      -      # now do something with this...
      -
      -
      -The pick event (matplotlib.backend_bases.PickEvent) which is passed to
      -your callback is always fired with two attributes:
      -
      -  mouseevent - the mouse event that generate the pick event.  The
      -    mouse event in turn has attributes like x and y (the coordinates in
      -    display space, such as pixels from left, bottom) and xdata, ydata (the
      -    coords in data space).  Additionally, you can get information about
      -    which buttons were pressed, which keys were pressed, which Axes
      -    the mouse is over, etc.  See matplotlib.backend_bases.MouseEvent
      -    for details.
      -
      -  artist - the matplotlib.artist that generated the pick event.
      -
      -Additionally, certain artists like Line2D and PatchCollection may
      -attach additional meta data like the indices into the data that meet
      -the picker criteria (for example, all the points in the line that are within
      -the specified epsilon tolerance)
      -
      -The examples below illustrate each of these methods.
      -"""
      -
      -from __future__ import print_function
      -from matplotlib.pyplot import figure, show
      -from matplotlib.lines import Line2D
      -from matplotlib.patches import Rectangle
      -from matplotlib.text import Text
      -from matplotlib.image import AxesImage
      -import numpy as np
      -from numpy.random import rand
      -
      -if 1: # simple picking, lines, rectangles and text
      -    fig = figure()
      -    ax1 = fig.add_subplot(211)
      -    ax1.set_title('click on points, rectangles or text', picker=True)
      -    ax1.set_ylabel('ylabel', picker=True, bbox=dict(facecolor='red'))
      -    line, = ax1.plot(rand(100), 'o', picker=5)  # 5 points tolerance
      -
      -    # pick the rectangle
      -    ax2 = fig.add_subplot(212)
      -
      -    bars = ax2.bar(range(10), rand(10), picker=True)
      -    for label in ax2.get_xticklabels():  # make the xtick labels pickable
      -        label.set_picker(True)
      -
      -
      -    def onpick1(event):
      -        if isinstance(event.artist, Line2D):
      -            thisline = event.artist
      -            xdata = thisline.get_xdata()
      -            ydata = thisline.get_ydata()
      -            ind = event.ind
      -            print('onpick1 line:', zip(np.take(xdata, ind), np.take(ydata, ind)))
      -        elif isinstance(event.artist, Rectangle):
      -            patch = event.artist
      -            print('onpick1 patch:', patch.get_path())
      -        elif isinstance(event.artist, Text):
      -            text = event.artist
      -            print('onpick1 text:', text.get_text())
      -
      -
      -
      -    fig.canvas.mpl_connect('pick_event', onpick1)
      -
      -if 1: # picking with a custom hit test function
      -    # you can define custom pickers by setting picker to a callable
      -    # function.  The function has the signature
      -    #
      -    #  hit, props = func(artist, mouseevent)
      -    #
      -    # to determine the hit test.  if the mouse event is over the artist,
      -    # return hit=True and props is a dictionary of
      -    # properties you want added to the PickEvent attributes
      -
      -    def line_picker(line, mouseevent):
      -        """
      -        find the points within a certain distance from the mouseclick in
      -        data coords and attach some extra attributes, pickx and picky
      -        which are the data points that were picked
      -        """
      -        if mouseevent.xdata is None: return False, dict()
      -        xdata = line.get_xdata()
      -        ydata = line.get_ydata()
      -        maxd = 0.05
      -        d = np.sqrt((xdata-mouseevent.xdata)**2. + (ydata-mouseevent.ydata)**2.)
      -
      -        ind = np.nonzero(np.less_equal(d, maxd))
      -        if len(ind):
      -            pickx = np.take(xdata, ind)
      -            picky = np.take(ydata, ind)
      -            props = dict(ind=ind, pickx=pickx, picky=picky)
      -            return True, props
      -        else:
      -            return False, dict()
      -
      -    def onpick2(event):
      -        print('onpick2 line:', event.pickx, event.picky)
      -
      -    fig = figure()
      -    ax1 = fig.add_subplot(111)
      -    ax1.set_title('custom picker for line data')
      -    line, = ax1.plot(rand(100), rand(100), 'o', picker=line_picker)
      -    fig.canvas.mpl_connect('pick_event', onpick2)
      -
      -
      -if 1: # picking on a scatter plot (matplotlib.collections.RegularPolyCollection)
      -
      -    x, y, c, s = rand(4, 100)
      -    def onpick3(event):
      -        ind = event.ind
      -        print('onpick3 scatter:', ind, np.take(x, ind), np.take(y, ind))
      -
      -    fig = figure()
      -    ax1 = fig.add_subplot(111)
      -    col = ax1.scatter(x, y, 100*s, c, picker=True)
      -    #fig.savefig('pscoll.eps')
      -    fig.canvas.mpl_connect('pick_event', onpick3)
      -
      -if 1: # picking images (matplotlib.image.AxesImage)
      -    fig = figure()
      -    ax1 = fig.add_subplot(111)
      -    im1 = ax1.imshow(rand(10,5), extent=(1,2,1,2), picker=True)
      -    im2 = ax1.imshow(rand(5,10), extent=(3,4,1,2), picker=True)
      -    im3 = ax1.imshow(rand(20,25), extent=(1,2,3,4), picker=True)
      -    im4 = ax1.imshow(rand(30,12), extent=(3,4,3,4), picker=True)
      -    ax1.axis([0,5,0,5])
      -
      -    def onpick4(event):
      -        artist = event.artist
      -        if isinstance(artist, AxesImage):
      -            im = artist
      -            A = im.get_array()
      -            print('onpick4 image', A.shape)
      -
      -    fig.canvas.mpl_connect('pick_event', onpick4)
      -
      -
      -show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/event_handling/pick_event_demo.py b/dev/examples/event_handling/pick_event_demo.py deleted file mode 100644 index 68a27e4c221..00000000000 --- a/dev/examples/event_handling/pick_event_demo.py +++ /dev/null @@ -1,183 +0,0 @@ -#!/usr/bin/env python - -""" - -You can enable picking by setting the "picker" property of an artist -(for example, a matplotlib Line2D, Text, Patch, Polygon, AxesImage, -etc...) - -There are a variety of meanings of the picker property - - None - picking is disabled for this artist (default) - - boolean - if True then picking will be enabled and the - artist will fire a pick event if the mouse event is over - the artist - - float - if picker is a number it is interpreted as an - epsilon tolerance in points and the artist will fire - off an event if it's data is within epsilon of the mouse - event. For some artists like lines and patch collections, - the artist may provide additional data to the pick event - that is generated, for example, the indices of the data within - epsilon of the pick event - - function - if picker is callable, it is a user supplied - function which determines whether the artist is hit by the - mouse event. - - hit, props = picker(artist, mouseevent) - - to determine the hit test. If the mouse event is over the - artist, return hit=True and props is a dictionary of properties - you want added to the PickEvent attributes - - -After you have enabled an artist for picking by setting the "picker" -property, you need to connect to the figure canvas pick_event to get -pick callbacks on mouse press events. For example, - - def pick_handler(event): - mouseevent = event.mouseevent - artist = event.artist - # now do something with this... - - -The pick event (matplotlib.backend_bases.PickEvent) which is passed to -your callback is always fired with two attributes: - - mouseevent - the mouse event that generate the pick event. The - mouse event in turn has attributes like x and y (the coordinates in - display space, such as pixels from left, bottom) and xdata, ydata (the - coords in data space). Additionally, you can get information about - which buttons were pressed, which keys were pressed, which Axes - the mouse is over, etc. See matplotlib.backend_bases.MouseEvent - for details. - - artist - the matplotlib.artist that generated the pick event. - -Additionally, certain artists like Line2D and PatchCollection may -attach additional meta data like the indices into the data that meet -the picker criteria (for example, all the points in the line that are within -the specified epsilon tolerance) - -The examples below illustrate each of these methods. -""" - -from __future__ import print_function -from matplotlib.pyplot import figure, show -from matplotlib.lines import Line2D -from matplotlib.patches import Rectangle -from matplotlib.text import Text -from matplotlib.image import AxesImage -import numpy as np -from numpy.random import rand - -if 1: # simple picking, lines, rectangles and text - fig = figure() - ax1 = fig.add_subplot(211) - ax1.set_title('click on points, rectangles or text', picker=True) - ax1.set_ylabel('ylabel', picker=True, bbox=dict(facecolor='red')) - line, = ax1.plot(rand(100), 'o', picker=5) # 5 points tolerance - - # pick the rectangle - ax2 = fig.add_subplot(212) - - bars = ax2.bar(range(10), rand(10), picker=True) - for label in ax2.get_xticklabels(): # make the xtick labels pickable - label.set_picker(True) - - - def onpick1(event): - if isinstance(event.artist, Line2D): - thisline = event.artist - xdata = thisline.get_xdata() - ydata = thisline.get_ydata() - ind = event.ind - print('onpick1 line:', zip(np.take(xdata, ind), np.take(ydata, ind))) - elif isinstance(event.artist, Rectangle): - patch = event.artist - print('onpick1 patch:', patch.get_path()) - elif isinstance(event.artist, Text): - text = event.artist - print('onpick1 text:', text.get_text()) - - - - fig.canvas.mpl_connect('pick_event', onpick1) - -if 1: # picking with a custom hit test function - # you can define custom pickers by setting picker to a callable - # function. The function has the signature - # - # hit, props = func(artist, mouseevent) - # - # to determine the hit test. if the mouse event is over the artist, - # return hit=True and props is a dictionary of - # properties you want added to the PickEvent attributes - - def line_picker(line, mouseevent): - """ - find the points within a certain distance from the mouseclick in - data coords and attach some extra attributes, pickx and picky - which are the data points that were picked - """ - if mouseevent.xdata is None: return False, dict() - xdata = line.get_xdata() - ydata = line.get_ydata() - maxd = 0.05 - d = np.sqrt((xdata-mouseevent.xdata)**2. + (ydata-mouseevent.ydata)**2.) - - ind = np.nonzero(np.less_equal(d, maxd)) - if len(ind): - pickx = np.take(xdata, ind) - picky = np.take(ydata, ind) - props = dict(ind=ind, pickx=pickx, picky=picky) - return True, props - else: - return False, dict() - - def onpick2(event): - print('onpick2 line:', event.pickx, event.picky) - - fig = figure() - ax1 = fig.add_subplot(111) - ax1.set_title('custom picker for line data') - line, = ax1.plot(rand(100), rand(100), 'o', picker=line_picker) - fig.canvas.mpl_connect('pick_event', onpick2) - - -if 1: # picking on a scatter plot (matplotlib.collections.RegularPolyCollection) - - x, y, c, s = rand(4, 100) - def onpick3(event): - ind = event.ind - print('onpick3 scatter:', ind, np.take(x, ind), np.take(y, ind)) - - fig = figure() - ax1 = fig.add_subplot(111) - col = ax1.scatter(x, y, 100*s, c, picker=True) - #fig.savefig('pscoll.eps') - fig.canvas.mpl_connect('pick_event', onpick3) - -if 1: # picking images (matplotlib.image.AxesImage) - fig = figure() - ax1 = fig.add_subplot(111) - im1 = ax1.imshow(rand(10,5), extent=(1,2,1,2), picker=True) - im2 = ax1.imshow(rand(5,10), extent=(3,4,1,2), picker=True) - im3 = ax1.imshow(rand(20,25), extent=(1,2,3,4), picker=True) - im4 = ax1.imshow(rand(30,12), extent=(3,4,3,4), picker=True) - ax1.axis([0,5,0,5]) - - def onpick4(event): - artist = event.artist - if isinstance(artist, AxesImage): - im = artist - A = im.get_array() - print('onpick4 image', A.shape) - - fig.canvas.mpl_connect('pick_event', onpick4) - - -show() - diff --git a/dev/examples/event_handling/pick_event_demo2.html b/dev/examples/event_handling/pick_event_demo2.html deleted file mode 100644 index 97db7c57abf..00000000000 --- a/dev/examples/event_handling/pick_event_demo2.html +++ /dev/null @@ -1,187 +0,0 @@ - - - - - - - - event_handling example code: pick_event_demo2.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      event_handling example code: pick_event_demo2.py

      -

      [source code]

      -
      """
      -compute the mean and standard deviation (stddev) of 100 data sets and plot
      -mean vs stddev.  When you click on one of the mu, sigma points, plot the raw
      -data from the dataset that generated the mean and stddev.
      -"""
      -import numpy
      -import matplotlib.pyplot as plt
      -
      -
      -X = numpy.random.rand(100, 1000)
      -xs = numpy.mean(X, axis=1)
      -ys = numpy.std(X, axis=1)
      -
      -fig = plt.figure()
      -ax = fig.add_subplot(111)
      -ax.set_title('click on point to plot time series')
      -line, = ax.plot(xs, ys, 'o', picker=5)  # 5 points tolerance
      -
      -
      -def onpick(event):
      -
      -    if event.artist!=line: return True
      -
      -    N = len(event.ind)
      -    if not N: return True
      -
      -
      -    figi = plt.figure()
      -    for subplotnum, dataind in enumerate(event.ind):
      -        ax = figi.add_subplot(N,1,subplotnum+1)
      -        ax.plot(X[dataind])
      -        ax.text(0.05, 0.9, 'mu=%1.3f\nsigma=%1.3f'%(xs[dataind], ys[dataind]),
      -                transform=ax.transAxes, va='top')
      -        ax.set_ylim(-0.5, 1.5)
      -    figi.show()
      -    return True
      -
      -fig.canvas.mpl_connect('pick_event', onpick)
      -
      -plt.show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/event_handling/pick_event_demo2.py b/dev/examples/event_handling/pick_event_demo2.py deleted file mode 100644 index 0f4513309be..00000000000 --- a/dev/examples/event_handling/pick_event_demo2.py +++ /dev/null @@ -1,45 +0,0 @@ -""" -compute the mean and standard deviation (stddev) of 100 data sets and plot -mean vs stddev. When you click on one of the mu, sigma points, plot the raw -data from the dataset that generated the mean and stddev. -""" -import numpy -import matplotlib.pyplot as plt - - -X = numpy.random.rand(100, 1000) -xs = numpy.mean(X, axis=1) -ys = numpy.std(X, axis=1) - -fig = plt.figure() -ax = fig.add_subplot(111) -ax.set_title('click on point to plot time series') -line, = ax.plot(xs, ys, 'o', picker=5) # 5 points tolerance - - -def onpick(event): - - if event.artist!=line: return True - - N = len(event.ind) - if not N: return True - - - figi = plt.figure() - for subplotnum, dataind in enumerate(event.ind): - ax = figi.add_subplot(N,1,subplotnum+1) - ax.plot(X[dataind]) - ax.text(0.05, 0.9, 'mu=%1.3f\nsigma=%1.3f'%(xs[dataind], ys[dataind]), - transform=ax.transAxes, va='top') - ax.set_ylim(-0.5, 1.5) - figi.show() - return True - -fig.canvas.mpl_connect('pick_event', onpick) - -plt.show() - - - - - diff --git a/dev/examples/event_handling/pipong.html b/dev/examples/event_handling/pipong.html deleted file mode 100644 index 83d4e6a16f5..00000000000 --- a/dev/examples/event_handling/pipong.html +++ /dev/null @@ -1,406 +0,0 @@ - - - - - - - - event_handling example code: pipong.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      event_handling example code: pipong.py

      -

      [source code]

      -
      #!/usr/bin/env python
      -# A matplotlib based game of Pong illustrating one way to write interactive
      -# animation which are easily ported to multiple backends
      -# pipong.py was written by Paul Ivanov <http://pirsquared.org>
      -
      -from __future__ import print_function
      -
      -import numpy as np
      -import matplotlib.pyplot as plt
      -from numpy.random import randn, randint
      -
      -instructions = """
      -Player A:       Player B:
      -  'e'      up     'i'
      -  'd'     down    'k'
      -
      -press 't' -- close these instructions
      -            (animation will be much faster)
      -press 'a' -- add a puck
      -press 'A' -- remove a puck
      -press '1' -- slow down all pucks
      -press '2' -- speed up all pucks
      -press '3' -- slow down distractors
      -press '4' -- speed up distractors
      -press ' ' -- reset the first puck
      -press 'n' -- toggle distractors on/off
      -press 'g' -- toggle the game on/off
      -
      -  """
      -
      -class Pad(object):
      -    def __init__(self, disp,x,y,type='l'):
      -        self.disp = disp
      -        self.x = x
      -        self.y = y
      -        self.w = .3
      -        self.score = 0
      -        self.xoffset = 0.3
      -        self.yoffset = 0.1
      -        if type=='r':
      -            self.xoffset *= -1.0
      -
      -        if type=='l' or type=='r':
      -            self.signx = -1.0
      -            self.signy = 1.0
      -        else:
      -            self.signx = 1.0
      -            self.signy = -1.0
      -    def contains(self, loc):
      -        return self.disp.get_bbox().contains(loc.x,loc.y)
      -
      -class Puck(object):
      -    def __init__(self, disp, pad, field):
      -        self.vmax= .2
      -        self.disp = disp
      -        self.field = field
      -        self._reset(pad)
      -    def _reset(self,pad):
      -        self.x = pad.x + pad.xoffset
      -        if pad.y < 0:
      -            self.y = pad.y +  pad.yoffset
      -        else:
      -            self.y = pad.y - pad.yoffset
      -        self.vx = pad.x - self.x
      -        self.vy = pad.y + pad.w/2 - self.y
      -        self._speedlimit()
      -        self._slower()
      -        self._slower()
      -    def update(self,pads):
      -        self.x += self.vx
      -        self.y += self.vy
      -        for pad in pads:
      -            if pad.contains(self):
      -                self.vx *= 1.2 *pad.signx
      -                self.vy *= 1.2 *pad.signy
      -        fudge = .001
      -        #probably cleaner with something like...if not self.field.contains(self.x, self.y):
      -        if self.x < 0+fudge:
      -            #print "player A loses"
      -            pads[1].score += 1;
      -            self._reset(pads[0])
      -            return True
      -        if self.x > 7-fudge:
      -            #print "player B loses"
      -            pads[0].score += 1;
      -            self._reset(pads[1])
      -            return True
      -        if self.y < -1+fudge or self.y > 1-fudge:
      -            self.vy *= -1.0
      -            # add some randomness, just to make it interesting
      -            self.vy -= (randn()/300.0 + 1/300.0) * np.sign(self.vy)
      -        self._speedlimit()
      -        return False
      -    def _slower(self):
      -        self.vx /= 5.0
      -        self.vy /= 5.0
      -    def _faster(self):
      -        self.vx *= 5.0
      -        self.vy *= 5.0
      -    def _speedlimit(self):
      -        if self.vx > self.vmax:
      -            self.vx = self.vmax
      -        if self.vx < -self.vmax:
      -            self.vx = -self.vmax
      -
      -        if self.vy > self.vmax:
      -            self.vy = self.vmax
      -        if self.vy < -self.vmax:
      -            self.vy = -self.vmax
      -
      -class Game(object):
      -
      -    def __init__(self, ax):
      -        # create the initial line
      -        self.ax = ax
      -        padAx = padBx= .50
      -        padAy = padBy= .30
      -        padBx+=6.3
      -        pA, = self.ax.barh(padAy,.2, height=.3,color='k', alpha=.5, edgecolor='b',lw=2,label="Player B", animated=True)
      -        pB, = self.ax.barh(padBy,.2, height=.3, left=padBx, color='k',alpha=.5, edgecolor='r',lw=2,label="Player A",animated=True)
      -
      -        # distractors
      -        self.x = np.arange(0,2.22*np.pi,0.01)
      -        self.line, = self.ax.plot(self.x, np.sin(self.x),"r", animated=True, lw=4)
      -        self.line2, = self.ax.plot(self.x, np.cos(self.x),"g", animated=True, lw=4)
      -        self.line3, = self.ax.plot(self.x, np.cos(self.x),"g", animated=True, lw=4)
      -        self.line4, = self.ax.plot(self.x, np.cos(self.x),"r", animated=True, lw=4)
      -        self.centerline,= self.ax.plot([3.5,3.5], [1,-1],'k',alpha=.5, animated=True,  lw=8)
      -        self.puckdisp = self.ax.scatter([1],[1],label='_nolegend_', s=200,c='g',alpha=.9,animated=True)
      -
      -        self.canvas = self.ax.figure.canvas
      -        self.background = None
      -        self.cnt = 0
      -        self.distract = True
      -        self.res = 100.0
      -        self.on = False
      -        self.inst = True    # show instructions from the beginning
      -        self.background = None
      -        self.pads = []
      -        self.pads.append( Pad(pA,0,padAy))
      -        self.pads.append( Pad(pB,padBx,padBy,'r'))
      -        self.pucks =[]
      -        self.i = self.ax.annotate(instructions,(.5,0.5),
      -                     name='monospace',
      -                     verticalalignment='center',
      -                     horizontalalignment='center',
      -                     multialignment='left',
      -                     textcoords='axes fraction',animated=True )
      -        self.canvas.mpl_connect('key_press_event', self.key_press)
      -
      -    def draw(self, evt):
      -        draw_artist = self.ax.draw_artist
      -        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)
      -
      -        # show the distractors
      -        if self.distract:
      -            self.line.set_ydata(np.sin(self.x+self.cnt/self.res))
      -            self.line2.set_ydata(np.cos(self.x-self.cnt/self.res))
      -            self.line3.set_ydata(np.tan(self.x+self.cnt/self.res))
      -            self.line4.set_ydata(np.tan(self.x-self.cnt/self.res))
      -            draw_artist(self.line)
      -            draw_artist(self.line2)
      -            draw_artist(self.line3)
      -            draw_artist(self.line4)
      -
      -        # show the instructions - this is very slow
      -        if self.inst:
      -            self.ax.draw_artist(self.i)
      -
      -        # pucks and pads
      -        if self.on:
      -            self.ax.draw_artist(self.centerline)
      -            for pad in self.pads:
      -                pad.disp.set_y(pad.y)
      -                pad.disp.set_x(pad.x)
      -                self.ax.draw_artist(pad.disp)
      -
      -            for puck in self.pucks:
      -                if puck.update(self.pads):
      -                    # we only get here if someone scored
      -                    self.pads[0].disp.set_label("   "+ str(self.pads[0].score))
      -                    self.pads[1].disp.set_label("   "+ str(self.pads[1].score))
      -                    self.ax.legend(loc='center')
      -                    self.leg = self.ax.get_legend()
      -                    #self.leg.draw_frame(False) #don't draw the legend border
      -                    self.leg.get_frame().set_alpha(.2)
      -                    plt.setp(self.leg.get_texts(),fontweight='bold',fontsize='xx-large')
      -                    self.leg.get_frame().set_facecolor('0.2')
      -                    self.background = None
      -                    self.ax.figure.canvas.draw()
      -                    return True
      -                puck.disp.set_offsets([puck.x,puck.y])
      -                self.ax.draw_artist(puck.disp)
      -
      -
      -        # just redraw the axes rectangle
      -        self.canvas.blit(self.ax.bbox)
      -
      -        if self.cnt==50000:
      -            # just so we don't get carried away
      -            print("...and you've been playing for too long!!!")
      -            plt.close()
      -
      -        self.cnt += 1
      -        return True
      -
      -    def key_press(self,event):
      -        if event.key == '3':
      -            self.res *= 5.0
      -        if event.key == '4':
      -            self.res /= 5.0
      -
      -        if event.key == 'e':
      -            self.pads[0].y += .1
      -            if self.pads[0].y > 1 - .3:
      -                self.pads[0].y = 1-.3
      -        if event.key == 'd':
      -            self.pads[0].y -= .1
      -            if self.pads[0].y < -1:
      -                self.pads[0].y = -1
      -
      -        if event.key == 'i':
      -            self.pads[1].y += .1
      -            if self.pads[1].y > 1 - .3:
      -                self.pads[1].y = 1-.3
      -        if event.key == 'k':
      -            self.pads[1].y -= .1
      -            if self.pads[1].y < -1:
      -                self.pads[1].y = -1
      -
      -        if event.key == 'a':
      -            self.pucks.append(Puck(self.puckdisp,self.pads[randint(2)],self.ax.bbox))
      -        if event.key == 'A' and len(self.pucks):
      -            self.pucks.pop()
      -        if event.key == ' ' and len(self.pucks):
      -            self.pucks[0]._reset(self.pads[randint(2)])
      -        if event.key == '1':
      -            for p in self.pucks:
      -                p._slower()
      -        if event.key == '2':
      -            for p in self.pucks:
      -                p._faster()
      -
      -        if event.key == 'n':
      -            self.distract = not self.distract
      -
      -        if event.key == 'g':
      -            #self.ax.clear()
      -            #self.ax.grid() # seems to be necessary for qt backend
      -            self.on = not self.on
      -        if event.key == 't':
      -            self.inst = not self.inst
      -            self.i.set_visible(self.i.get_visible())
      -        if event.key == 'q':
      -            plt.close()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/event_handling/pipong.py b/dev/examples/event_handling/pipong.py deleted file mode 100644 index 7433aaf2c46..00000000000 --- a/dev/examples/event_handling/pipong.py +++ /dev/null @@ -1,259 +0,0 @@ -#!/usr/bin/env python -# A matplotlib based game of Pong illustrating one way to write interactive -# animation which are easily ported to multiple backends -# pipong.py was written by Paul Ivanov - -from __future__ import print_function - -import numpy as np -import matplotlib.pyplot as plt -from numpy.random import randn, randint - -instructions = """ -Player A: Player B: - 'e' up 'i' - 'd' down 'k' - -press 't' -- close these instructions - (animation will be much faster) -press 'a' -- add a puck -press 'A' -- remove a puck -press '1' -- slow down all pucks -press '2' -- speed up all pucks -press '3' -- slow down distractors -press '4' -- speed up distractors -press ' ' -- reset the first puck -press 'n' -- toggle distractors on/off -press 'g' -- toggle the game on/off - - """ - -class Pad(object): - def __init__(self, disp,x,y,type='l'): - self.disp = disp - self.x = x - self.y = y - self.w = .3 - self.score = 0 - self.xoffset = 0.3 - self.yoffset = 0.1 - if type=='r': - self.xoffset *= -1.0 - - if type=='l' or type=='r': - self.signx = -1.0 - self.signy = 1.0 - else: - self.signx = 1.0 - self.signy = -1.0 - def contains(self, loc): - return self.disp.get_bbox().contains(loc.x,loc.y) - -class Puck(object): - def __init__(self, disp, pad, field): - self.vmax= .2 - self.disp = disp - self.field = field - self._reset(pad) - def _reset(self,pad): - self.x = pad.x + pad.xoffset - if pad.y < 0: - self.y = pad.y + pad.yoffset - else: - self.y = pad.y - pad.yoffset - self.vx = pad.x - self.x - self.vy = pad.y + pad.w/2 - self.y - self._speedlimit() - self._slower() - self._slower() - def update(self,pads): - self.x += self.vx - self.y += self.vy - for pad in pads: - if pad.contains(self): - self.vx *= 1.2 *pad.signx - self.vy *= 1.2 *pad.signy - fudge = .001 - #probably cleaner with something like...if not self.field.contains(self.x, self.y): - if self.x < 0+fudge: - #print "player A loses" - pads[1].score += 1; - self._reset(pads[0]) - return True - if self.x > 7-fudge: - #print "player B loses" - pads[0].score += 1; - self._reset(pads[1]) - return True - if self.y < -1+fudge or self.y > 1-fudge: - self.vy *= -1.0 - # add some randomness, just to make it interesting - self.vy -= (randn()/300.0 + 1/300.0) * np.sign(self.vy) - self._speedlimit() - return False - def _slower(self): - self.vx /= 5.0 - self.vy /= 5.0 - def _faster(self): - self.vx *= 5.0 - self.vy *= 5.0 - def _speedlimit(self): - if self.vx > self.vmax: - self.vx = self.vmax - if self.vx < -self.vmax: - self.vx = -self.vmax - - if self.vy > self.vmax: - self.vy = self.vmax - if self.vy < -self.vmax: - self.vy = -self.vmax - -class Game(object): - - def __init__(self, ax): - # create the initial line - self.ax = ax - padAx = padBx= .50 - padAy = padBy= .30 - padBx+=6.3 - pA, = self.ax.barh(padAy,.2, height=.3,color='k', alpha=.5, edgecolor='b',lw=2,label="Player B", animated=True) - pB, = self.ax.barh(padBy,.2, height=.3, left=padBx, color='k',alpha=.5, edgecolor='r',lw=2,label="Player A",animated=True) - - # distractors - self.x = np.arange(0,2.22*np.pi,0.01) - self.line, = self.ax.plot(self.x, np.sin(self.x),"r", animated=True, lw=4) - self.line2, = self.ax.plot(self.x, np.cos(self.x),"g", animated=True, lw=4) - self.line3, = self.ax.plot(self.x, np.cos(self.x),"g", animated=True, lw=4) - self.line4, = self.ax.plot(self.x, np.cos(self.x),"r", animated=True, lw=4) - self.centerline,= self.ax.plot([3.5,3.5], [1,-1],'k',alpha=.5, animated=True, lw=8) - self.puckdisp = self.ax.scatter([1],[1],label='_nolegend_', s=200,c='g',alpha=.9,animated=True) - - self.canvas = self.ax.figure.canvas - self.background = None - self.cnt = 0 - self.distract = True - self.res = 100.0 - self.on = False - self.inst = True # show instructions from the beginning - self.background = None - self.pads = [] - self.pads.append( Pad(pA,0,padAy)) - self.pads.append( Pad(pB,padBx,padBy,'r')) - self.pucks =[] - self.i = self.ax.annotate(instructions,(.5,0.5), - name='monospace', - verticalalignment='center', - horizontalalignment='center', - multialignment='left', - textcoords='axes fraction',animated=True ) - self.canvas.mpl_connect('key_press_event', self.key_press) - - def draw(self, evt): - draw_artist = self.ax.draw_artist - 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) - - # show the distractors - if self.distract: - self.line.set_ydata(np.sin(self.x+self.cnt/self.res)) - self.line2.set_ydata(np.cos(self.x-self.cnt/self.res)) - self.line3.set_ydata(np.tan(self.x+self.cnt/self.res)) - self.line4.set_ydata(np.tan(self.x-self.cnt/self.res)) - draw_artist(self.line) - draw_artist(self.line2) - draw_artist(self.line3) - draw_artist(self.line4) - - # show the instructions - this is very slow - if self.inst: - self.ax.draw_artist(self.i) - - # pucks and pads - if self.on: - self.ax.draw_artist(self.centerline) - for pad in self.pads: - pad.disp.set_y(pad.y) - pad.disp.set_x(pad.x) - self.ax.draw_artist(pad.disp) - - for puck in self.pucks: - if puck.update(self.pads): - # we only get here if someone scored - self.pads[0].disp.set_label(" "+ str(self.pads[0].score)) - self.pads[1].disp.set_label(" "+ str(self.pads[1].score)) - self.ax.legend(loc='center') - self.leg = self.ax.get_legend() - #self.leg.draw_frame(False) #don't draw the legend border - self.leg.get_frame().set_alpha(.2) - plt.setp(self.leg.get_texts(),fontweight='bold',fontsize='xx-large') - self.leg.get_frame().set_facecolor('0.2') - self.background = None - self.ax.figure.canvas.draw() - return True - puck.disp.set_offsets([puck.x,puck.y]) - self.ax.draw_artist(puck.disp) - - - # just redraw the axes rectangle - self.canvas.blit(self.ax.bbox) - - if self.cnt==50000: - # just so we don't get carried away - print("...and you've been playing for too long!!!") - plt.close() - - self.cnt += 1 - return True - - def key_press(self,event): - if event.key == '3': - self.res *= 5.0 - if event.key == '4': - self.res /= 5.0 - - if event.key == 'e': - self.pads[0].y += .1 - if self.pads[0].y > 1 - .3: - self.pads[0].y = 1-.3 - if event.key == 'd': - self.pads[0].y -= .1 - if self.pads[0].y < -1: - self.pads[0].y = -1 - - if event.key == 'i': - self.pads[1].y += .1 - if self.pads[1].y > 1 - .3: - self.pads[1].y = 1-.3 - if event.key == 'k': - self.pads[1].y -= .1 - if self.pads[1].y < -1: - self.pads[1].y = -1 - - if event.key == 'a': - self.pucks.append(Puck(self.puckdisp,self.pads[randint(2)],self.ax.bbox)) - if event.key == 'A' and len(self.pucks): - self.pucks.pop() - if event.key == ' ' and len(self.pucks): - self.pucks[0]._reset(self.pads[randint(2)]) - if event.key == '1': - for p in self.pucks: - p._slower() - if event.key == '2': - for p in self.pucks: - p._faster() - - if event.key == 'n': - self.distract = not self.distract - - if event.key == 'g': - #self.ax.clear() - #self.ax.grid() # seems to be necessary for qt backend - self.on = not self.on - if event.key == 't': - self.inst = not self.inst - self.i.set_visible(self.i.get_visible()) - if event.key == 'q': - plt.close() diff --git a/dev/examples/event_handling/poly_editor.html b/dev/examples/event_handling/poly_editor.html deleted file mode 100644 index 1c8ae7ea434..00000000000 --- a/dev/examples/event_handling/poly_editor.html +++ /dev/null @@ -1,312 +0,0 @@ - - - - - - - - event_handling example code: poly_editor.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      event_handling example code: poly_editor.py

      -

      [source code]

      -
      """
      -This is an example to show how to build cross-GUI applications using
      -matplotlib event handling to interact with objects on the canvas
      -
      -"""
      -import numpy as np
      -from matplotlib.lines import Line2D
      -from matplotlib.artist import Artist
      -from matplotlib.mlab import dist_point_to_segment
      -
      -
      -class PolygonInteractor:
      -    """
      -    An polygon editor.
      -
      -    Key-bindings
      -
      -      't' toggle vertex markers on and off.  When vertex markers are on,
      -          you can move them, delete them
      -
      -      'd' delete the vertex under point
      -
      -      'i' insert a vertex at point.  You must be within epsilon of the
      -          line connecting two existing vertices
      -
      -    """
      -
      -    showverts = True
      -    epsilon = 5  # max pixel distance to count as a vertex hit
      -
      -    def __init__(self, ax, poly):
      -        if poly.figure is None:
      -            raise RuntimeError('You must first add the polygon to a figure or canvas before defining the interactor')
      -        self.ax = ax
      -        canvas = poly.figure.canvas
      -        self.poly = poly
      -
      -        x, y = zip(*self.poly.xy)
      -        self.line = Line2D(x, y, marker='o', markerfacecolor='r', animated=True)
      -        self.ax.add_line(self.line)
      -        #self._update_line(poly)
      -
      -        cid = self.poly.add_callback(self.poly_changed)
      -        self._ind = None # the active vert
      -
      -        canvas.mpl_connect('draw_event', self.draw_callback)
      -        canvas.mpl_connect('button_press_event', self.button_press_callback)
      -        canvas.mpl_connect('key_press_event', self.key_press_callback)
      -        canvas.mpl_connect('button_release_event', self.button_release_callback)
      -        canvas.mpl_connect('motion_notify_event', self.motion_notify_callback)
      -        self.canvas = canvas
      -
      -
      -    def draw_callback(self, event):
      -        self.background = self.canvas.copy_from_bbox(self.ax.bbox)
      -        self.ax.draw_artist(self.poly)
      -        self.ax.draw_artist(self.line)
      -        self.canvas.blit(self.ax.bbox)
      -
      -    def poly_changed(self, poly):
      -        'this method is called whenever the polygon object is called'
      -        # only copy the artist props to the line (except visibility)
      -        vis = self.line.get_visible()
      -        Artist.update_from(self.line, poly)
      -        self.line.set_visible(vis)  # don't use the poly visibility state
      -
      -
      -    def get_ind_under_point(self, event):
      -        'get the index of the vertex under point if within epsilon tolerance'
      -
      -        # display coords
      -        xy = np.asarray(self.poly.xy)
      -        xyt = self.poly.get_transform().transform(xy)
      -        xt, yt = xyt[:, 0], xyt[:, 1]
      -        d = np.sqrt((xt-event.x)**2 + (yt-event.y)**2)
      -        indseq = np.nonzero(np.equal(d, np.amin(d)))[0]
      -        ind = indseq[0]
      -
      -        if d[ind]>=self.epsilon:
      -            ind = None
      -
      -        return ind
      -
      -    def button_press_callback(self, event):
      -        'whenever a mouse button is pressed'
      -        if not self.showverts: return
      -        if event.inaxes==None: return
      -        if event.button != 1: return
      -        self._ind = self.get_ind_under_point(event)
      -
      -    def button_release_callback(self, event):
      -        'whenever a mouse button is released'
      -        if not self.showverts: return
      -        if event.button != 1: return
      -        self._ind = None
      -
      -    def key_press_callback(self, event):
      -        'whenever a key is pressed'
      -        if not event.inaxes: return
      -        if event.key=='t':
      -            self.showverts = not self.showverts
      -            self.line.set_visible(self.showverts)
      -            if not self.showverts: self._ind = None
      -        elif event.key=='d':
      -            ind = self.get_ind_under_point(event)
      -            if ind is not None:
      -                self.poly.xy = [tup for i,tup in enumerate(self.poly.xy) if i!=ind]
      -                self.line.set_data(zip(*self.poly.xy))
      -        elif event.key=='i':
      -            xys = self.poly.get_transform().transform(self.poly.xy)
      -            p = event.x, event.y # display coords
      -            for i in range(len(xys)-1):
      -                s0 = xys[i]
      -                s1 = xys[i+1]
      -                d = dist_point_to_segment(p, s0, s1)
      -                if d<=self.epsilon:
      -                    self.poly.xy = np.array(
      -                        list(self.poly.xy[:i]) +
      -                        [(event.xdata, event.ydata)] +
      -                        list(self.poly.xy[i:]))
      -                    self.line.set_data(zip(*self.poly.xy))
      -                    break
      -
      -
      -        self.canvas.draw()
      -
      -    def motion_notify_callback(self, event):
      -        'on mouse movement'
      -        if not self.showverts: return
      -        if self._ind is None: return
      -        if event.inaxes is None: return
      -        if event.button != 1: return
      -        x,y = event.xdata, event.ydata
      -
      -        self.poly.xy[self._ind] = x,y
      -        self.line.set_data(zip(*self.poly.xy))
      -
      -        self.canvas.restore_region(self.background)
      -        self.ax.draw_artist(self.poly)
      -        self.ax.draw_artist(self.line)
      -        self.canvas.blit(self.ax.bbox)
      -
      -
      -if __name__ == '__main__':
      -    import matplotlib.pyplot as plt
      -    from matplotlib.patches import Polygon
      -
      -    fig = plt.figure()
      -    theta = np.arange(0, 2*np.pi, 0.1)
      -    r = 1.5
      -
      -    xs = r*np.cos(theta)
      -    ys = r*np.sin(theta)
      -
      -    poly = Polygon(list(zip(xs, ys)), animated=True)
      -
      -    ax = plt.subplot(111)
      -    ax.add_patch(poly)
      -    p = PolygonInteractor(ax, poly)
      -
      -    #ax.add_line(p.line)
      -    ax.set_title('Click and drag a point to move it')
      -    ax.set_xlim((-2,2))
      -    ax.set_ylim((-2,2))
      -    plt.show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/event_handling/poly_editor.py b/dev/examples/event_handling/poly_editor.py deleted file mode 100644 index c7d96df66d5..00000000000 --- a/dev/examples/event_handling/poly_editor.py +++ /dev/null @@ -1,166 +0,0 @@ -""" -This is an example to show how to build cross-GUI applications using -matplotlib event handling to interact with objects on the canvas - -""" -import numpy as np -from matplotlib.lines import Line2D -from matplotlib.artist import Artist -from matplotlib.mlab import dist_point_to_segment - - -class PolygonInteractor: - """ - An polygon editor. - - Key-bindings - - 't' toggle vertex markers on and off. When vertex markers are on, - you can move them, delete them - - 'd' delete the vertex under point - - 'i' insert a vertex at point. You must be within epsilon of the - line connecting two existing vertices - - """ - - showverts = True - epsilon = 5 # max pixel distance to count as a vertex hit - - def __init__(self, ax, poly): - if poly.figure is None: - raise RuntimeError('You must first add the polygon to a figure or canvas before defining the interactor') - self.ax = ax - canvas = poly.figure.canvas - self.poly = poly - - x, y = zip(*self.poly.xy) - self.line = Line2D(x, y, marker='o', markerfacecolor='r', animated=True) - self.ax.add_line(self.line) - #self._update_line(poly) - - cid = self.poly.add_callback(self.poly_changed) - self._ind = None # the active vert - - canvas.mpl_connect('draw_event', self.draw_callback) - canvas.mpl_connect('button_press_event', self.button_press_callback) - canvas.mpl_connect('key_press_event', self.key_press_callback) - canvas.mpl_connect('button_release_event', self.button_release_callback) - canvas.mpl_connect('motion_notify_event', self.motion_notify_callback) - self.canvas = canvas - - - def draw_callback(self, event): - self.background = self.canvas.copy_from_bbox(self.ax.bbox) - self.ax.draw_artist(self.poly) - self.ax.draw_artist(self.line) - self.canvas.blit(self.ax.bbox) - - def poly_changed(self, poly): - 'this method is called whenever the polygon object is called' - # only copy the artist props to the line (except visibility) - vis = self.line.get_visible() - Artist.update_from(self.line, poly) - self.line.set_visible(vis) # don't use the poly visibility state - - - def get_ind_under_point(self, event): - 'get the index of the vertex under point if within epsilon tolerance' - - # display coords - xy = np.asarray(self.poly.xy) - xyt = self.poly.get_transform().transform(xy) - xt, yt = xyt[:, 0], xyt[:, 1] - d = np.sqrt((xt-event.x)**2 + (yt-event.y)**2) - indseq = np.nonzero(np.equal(d, np.amin(d)))[0] - ind = indseq[0] - - if d[ind]>=self.epsilon: - ind = None - - return ind - - def button_press_callback(self, event): - 'whenever a mouse button is pressed' - if not self.showverts: return - if event.inaxes==None: return - if event.button != 1: return - self._ind = self.get_ind_under_point(event) - - def button_release_callback(self, event): - 'whenever a mouse button is released' - if not self.showverts: return - if event.button != 1: return - self._ind = None - - def key_press_callback(self, event): - 'whenever a key is pressed' - if not event.inaxes: return - if event.key=='t': - self.showverts = not self.showverts - self.line.set_visible(self.showverts) - if not self.showverts: self._ind = None - elif event.key=='d': - ind = self.get_ind_under_point(event) - if ind is not None: - self.poly.xy = [tup for i,tup in enumerate(self.poly.xy) if i!=ind] - self.line.set_data(zip(*self.poly.xy)) - elif event.key=='i': - xys = self.poly.get_transform().transform(self.poly.xy) - p = event.x, event.y # display coords - for i in range(len(xys)-1): - s0 = xys[i] - s1 = xys[i+1] - d = dist_point_to_segment(p, s0, s1) - if d<=self.epsilon: - self.poly.xy = np.array( - list(self.poly.xy[:i]) + - [(event.xdata, event.ydata)] + - list(self.poly.xy[i:])) - self.line.set_data(zip(*self.poly.xy)) - break - - - self.canvas.draw() - - def motion_notify_callback(self, event): - 'on mouse movement' - if not self.showverts: return - if self._ind is None: return - if event.inaxes is None: return - if event.button != 1: return - x,y = event.xdata, event.ydata - - self.poly.xy[self._ind] = x,y - self.line.set_data(zip(*self.poly.xy)) - - self.canvas.restore_region(self.background) - self.ax.draw_artist(self.poly) - self.ax.draw_artist(self.line) - self.canvas.blit(self.ax.bbox) - - -if __name__ == '__main__': - import matplotlib.pyplot as plt - from matplotlib.patches import Polygon - - fig = plt.figure() - theta = np.arange(0, 2*np.pi, 0.1) - r = 1.5 - - xs = r*np.cos(theta) - ys = r*np.sin(theta) - - poly = Polygon(list(zip(xs, ys)), animated=True) - - ax = plt.subplot(111) - ax.add_patch(poly) - p = PolygonInteractor(ax, poly) - - #ax.add_line(p.line) - ax.set_title('Click and drag a point to move it') - ax.set_xlim((-2,2)) - ax.set_ylim((-2,2)) - plt.show() - diff --git a/dev/examples/event_handling/pong_gtk.html b/dev/examples/event_handling/pong_gtk.html deleted file mode 100644 index 1971070ffb6..00000000000 --- a/dev/examples/event_handling/pong_gtk.html +++ /dev/null @@ -1,183 +0,0 @@ - - - - - - - - event_handling example code: pong_gtk.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      event_handling example code: pong_gtk.py

      -

      [source code]

      -
      #!/usr/bin/env python
      -
      -from __future__ import print_function
      -
      -# 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 matplotlib.pyplot as plt
      -import pipong
      -
      -
      -fig = plt.figure()
      -ax = fig.add_subplot(111)
      -canvas = ax.figure.canvas
      -
      -
      -def start_anim(event):
      -#    gobject.idle_add(animation.draw,animation)
      -    gobject.timeout_add(10,animation.draw,animation)
      -    canvas.mpl_disconnect(start_anim.cid)
      -
      -animation = pipong.Game(ax)
      -start_anim.cid = canvas.mpl_connect('draw_event', start_anim)
      -
      -
      -tstart = time.time()
      -plt.grid() # to ensure proper background restore
      -plt.show()
      -print('FPS:' , animation.cnt/(time.time()-tstart))
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/event_handling/pong_gtk.py b/dev/examples/event_handling/pong_gtk.py deleted file mode 100644 index fb8479f6301..00000000000 --- a/dev/examples/event_handling/pong_gtk.py +++ /dev/null @@ -1,36 +0,0 @@ -#!/usr/bin/env python - -from __future__ import print_function - -# 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 matplotlib.pyplot as plt -import pipong - - -fig = plt.figure() -ax = fig.add_subplot(111) -canvas = ax.figure.canvas - - -def start_anim(event): -# gobject.idle_add(animation.draw,animation) - gobject.timeout_add(10,animation.draw,animation) - canvas.mpl_disconnect(start_anim.cid) - -animation = pipong.Game(ax) -start_anim.cid = canvas.mpl_connect('draw_event', start_anim) - - -tstart = time.time() -plt.grid() # to ensure proper background restore -plt.show() -print('FPS:' , animation.cnt/(time.time()-tstart)) diff --git a/dev/examples/event_handling/pong_qt.html b/dev/examples/event_handling/pong_qt.html deleted file mode 100644 index 04772eabf84..00000000000 --- a/dev/examples/event_handling/pong_qt.html +++ /dev/null @@ -1,187 +0,0 @@ - - - - - - - - event_handling example code: pong_qt.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      event_handling example code: pong_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
      -
      -from __future__ import print_function
      -
      -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 matplotlib.pyplot as plt
      -import time
      -import pipong
      -
      -class BlitQT(QObject):
      -    def __init__(self):
      -        QObject.__init__(self, None, "app")
      -
      -        self.ax = plt.subplot(111)
      -        self.animation = pipong.Game(self.ax)
      -
      -    def timerEvent(self, evt):
      -       self.animation.draw(evt)
      -
      -plt.grid() # to ensure proper background restore
      -
      -app = BlitQT()
      -# for profiling
      -app.tstart = time.time()
      -app.startTimer(10)
      -
      -plt.show()
      -print('FPS:' , app.animation.cnt/(time.time()-app.tstart))
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/event_handling/pong_qt.py b/dev/examples/event_handling/pong_qt.py deleted file mode 100644 index d27b6c1101e..00000000000 --- a/dev/examples/event_handling/pong_qt.py +++ /dev/null @@ -1,40 +0,0 @@ -# For detailed comments on animation and the techniqes used here, see -# the wiki entry http://www.scipy.org/Cookbook/Matplotlib/Animations - -from __future__ import print_function - -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 matplotlib.pyplot as plt -import time -import pipong - -class BlitQT(QObject): - def __init__(self): - QObject.__init__(self, None, "app") - - self.ax = plt.subplot(111) - self.animation = pipong.Game(self.ax) - - def timerEvent(self, evt): - self.animation.draw(evt) - -plt.grid() # to ensure proper background restore - -app = BlitQT() -# for profiling -app.tstart = time.time() -app.startTimer(10) - -plt.show() -print('FPS:' , app.animation.cnt/(time.time()-app.tstart)) diff --git a/dev/examples/event_handling/resample.html b/dev/examples/event_handling/resample.html deleted file mode 100644 index 3b47ee59f39..00000000000 --- a/dev/examples/event_handling/resample.html +++ /dev/null @@ -1,200 +0,0 @@ - - - - - - - - event_handling example code: resample.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      event_handling example code: resample.py

      -

      [source code]

      -
      import numpy as np
      -import matplotlib.pyplot as plt
      -from scikits.audiolab import wavread
      -
      -# A class that will downsample the data and recompute when zoomed.
      -class DataDisplayDownsampler(object):
      -    def __init__(self, xdata, ydata):
      -        self.origYData = ydata
      -        self.origXData = xdata
      -        self.numpts = 3000
      -        self.delta = xdata[-1] - xdata[0]
      -
      -    def resample(self, xstart, xend):
      -        # Very simple downsampling that takes the points within the range
      -        # and picks every Nth point
      -        mask = (self.origXData > xstart) & (self.origXData < xend)
      -        xdata = self.origXData[mask]
      -        ratio = int(xdata.size / self.numpts) + 1
      -        xdata = xdata[::ratio]
      -
      -        ydata = self.origYData[mask]
      -        ydata = ydata[::ratio]
      -
      -        return xdata, ydata
      -
      -    def update(self, ax):
      -        # Update the line
      -        lims = ax.viewLim
      -        if np.abs(lims.width - self.delta) > 1e-8:
      -            self.delta = lims.width
      -            xstart, xend = lims.intervalx
      -            self.line.set_data(*self.downsample(xstart, xend))
      -            ax.figure.canvas.draw_idle()
      -
      -# Read data
      -data = wavread('/usr/share/sounds/purple/receive.wav')[0]
      -ydata = np.tile(data[:, 0], 100)
      -xdata = np.arange(ydata.size)
      -
      -d = DataDisplayDownsampler(xdata, ydata)
      -
      -fig = plt.figure()
      -ax = fig.add_subplot(1, 1, 1)
      -
      -#Hook up the line
      -xdata, ydata = d.downsample(xdata[0], xdata[-1])
      -d.line, = ax.plot(xdata, ydata)
      -ax.set_autoscale_on(False) # Otherwise, infinite loop
      -
      -# Connect for changing the view limits
      -ax.callbacks.connect('xlim_changed', d.update)
      -
      -plt.show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/event_handling/resample.py b/dev/examples/event_handling/resample.py deleted file mode 100644 index a9df778cd3e..00000000000 --- a/dev/examples/event_handling/resample.py +++ /dev/null @@ -1,53 +0,0 @@ -import numpy as np -import matplotlib.pyplot as plt -from scikits.audiolab import wavread - -# A class that will downsample the data and recompute when zoomed. -class DataDisplayDownsampler(object): - def __init__(self, xdata, ydata): - self.origYData = ydata - self.origXData = xdata - self.numpts = 3000 - self.delta = xdata[-1] - xdata[0] - - def resample(self, xstart, xend): - # Very simple downsampling that takes the points within the range - # and picks every Nth point - mask = (self.origXData > xstart) & (self.origXData < xend) - xdata = self.origXData[mask] - ratio = int(xdata.size / self.numpts) + 1 - xdata = xdata[::ratio] - - ydata = self.origYData[mask] - ydata = ydata[::ratio] - - return xdata, ydata - - def update(self, ax): - # Update the line - lims = ax.viewLim - if np.abs(lims.width - self.delta) > 1e-8: - self.delta = lims.width - xstart, xend = lims.intervalx - self.line.set_data(*self.downsample(xstart, xend)) - ax.figure.canvas.draw_idle() - -# Read data -data = wavread('/usr/share/sounds/purple/receive.wav')[0] -ydata = np.tile(data[:, 0], 100) -xdata = np.arange(ydata.size) - -d = DataDisplayDownsampler(xdata, ydata) - -fig = plt.figure() -ax = fig.add_subplot(1, 1, 1) - -#Hook up the line -xdata, ydata = d.downsample(xdata[0], xdata[-1]) -d.line, = ax.plot(xdata, ydata) -ax.set_autoscale_on(False) # Otherwise, infinite loop - -# Connect for changing the view limits -ax.callbacks.connect('xlim_changed', d.update) - -plt.show() diff --git a/dev/examples/event_handling/test_mouseclicks.html b/dev/examples/event_handling/test_mouseclicks.html deleted file mode 100644 index 9fe2596c674..00000000000 --- a/dev/examples/event_handling/test_mouseclicks.html +++ /dev/null @@ -1,182 +0,0 @@ - - - - - - - - event_handling example code: test_mouseclicks.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      event_handling example code: test_mouseclicks.py

      -

      [source code]

      -
      #!/usr/bin/env python
      -from __future__ import print_function
      -
      -import matplotlib
      -#matplotlib.use("WxAgg")
      -#matplotlib.use("TkAgg")
      -#matplotlib.use("GTKAgg")
      -#matplotlib.use("QtAgg")
      -#matplotlib.use("Qt4Agg")
      -#matplotlib.use("CocoaAgg")
      -#matplotlib.use("MacOSX")
      -import matplotlib.pyplot as plt
      -
      -#print("***** TESTING WITH BACKEND: %s"%matplotlib.get_backend() + " *****")
      -
      -
      -def OnClick(event):
      -    if event.dblclick:
      -        print("DBLCLICK", event)
      -    else:
      -        print("DOWN    ", event)
      -
      -
      -def OnRelease(event):
      -    print("UP      ", event)
      -
      -
      -fig = plt.gcf()
      -cid_up = fig.canvas.mpl_connect('button_press_event', OnClick)
      -cid_down = fig.canvas.mpl_connect('button_release_event', OnRelease)
      -
      -plt.gca().text(0.5, 0.5, "Click on the canvas to test mouse events.",
      -               ha="center", va="center")
      -
      -plt.show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/event_handling/test_mouseclicks.py b/dev/examples/event_handling/test_mouseclicks.py deleted file mode 100644 index 450d2c63d62..00000000000 --- a/dev/examples/event_handling/test_mouseclicks.py +++ /dev/null @@ -1,35 +0,0 @@ -#!/usr/bin/env python -from __future__ import print_function - -import matplotlib -#matplotlib.use("WxAgg") -#matplotlib.use("TkAgg") -#matplotlib.use("GTKAgg") -#matplotlib.use("QtAgg") -#matplotlib.use("Qt4Agg") -#matplotlib.use("CocoaAgg") -#matplotlib.use("MacOSX") -import matplotlib.pyplot as plt - -#print("***** TESTING WITH BACKEND: %s"%matplotlib.get_backend() + " *****") - - -def OnClick(event): - if event.dblclick: - print("DBLCLICK", event) - else: - print("DOWN ", event) - - -def OnRelease(event): - print("UP ", event) - - -fig = plt.gcf() -cid_up = fig.canvas.mpl_connect('button_press_event', OnClick) -cid_down = fig.canvas.mpl_connect('button_release_event', OnRelease) - -plt.gca().text(0.5, 0.5, "Click on the canvas to test mouse events.", - ha="center", va="center") - -plt.show() diff --git a/dev/examples/event_handling/timers.html b/dev/examples/event_handling/timers.html deleted file mode 100644 index 4dff4b4de75..00000000000 --- a/dev/examples/event_handling/timers.html +++ /dev/null @@ -1,176 +0,0 @@ - - - - - - - - event_handling example code: timers.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      event_handling example code: timers.py

      -

      [source code]

      -
      # Simple example of using general timer objects. This is used to update
      -# the time placed in the title of the figure.
      -import matplotlib.pyplot as plt
      -import numpy as np
      -from datetime import datetime
      -
      -def update_title(axes):
      -    axes.set_title(datetime.now())
      -    axes.figure.canvas.draw()
      -
      -fig = plt.figure()
      -ax = fig.add_subplot(1, 1, 1)
      -
      -x = np.linspace(-3, 3)
      -ax.plot(x, x*x)
      -
      -# Create a new timer object. Set the interval 500 milliseconds (1000 is default)
      -# and tell the timer what function should be called.
      -timer = fig.canvas.new_timer(interval=100)
      -timer.add_callback(update_title, ax)
      -timer.start()
      -
      -#Or could start the timer on first figure draw
      -#def start_timer(evt):
      -#    timer.start()
      -#    fig.canvas.mpl_disconnect(drawid)
      -#drawid = fig.canvas.mpl_connect('draw_event', start_timer)
      -
      -plt.show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/event_handling/timers.py b/dev/examples/event_handling/timers.py deleted file mode 100644 index 2541f11aae3..00000000000 --- a/dev/examples/event_handling/timers.py +++ /dev/null @@ -1,29 +0,0 @@ -# Simple example of using general timer objects. This is used to update -# the time placed in the title of the figure. -import matplotlib.pyplot as plt -import numpy as np -from datetime import datetime - -def update_title(axes): - axes.set_title(datetime.now()) - axes.figure.canvas.draw() - -fig = plt.figure() -ax = fig.add_subplot(1, 1, 1) - -x = np.linspace(-3, 3) -ax.plot(x, x*x) - -# Create a new timer object. Set the interval 500 milliseconds (1000 is default) -# and tell the timer what function should be called. -timer = fig.canvas.new_timer(interval=100) -timer.add_callback(update_title, ax) -timer.start() - -#Or could start the timer on first figure draw -#def start_timer(evt): -# timer.start() -# fig.canvas.mpl_disconnect(drawid) -#drawid = fig.canvas.mpl_connect('draw_event', start_timer) - -plt.show() diff --git a/dev/examples/event_handling/trifinder_event_demo.html b/dev/examples/event_handling/trifinder_event_demo.html deleted file mode 100644 index 24cfb2d412c..00000000000 --- a/dev/examples/event_handling/trifinder_event_demo.html +++ /dev/null @@ -1,206 +0,0 @@ - - - - - - - - event_handling example code: trifinder_event_demo.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      event_handling example code: trifinder_event_demo.py

      -

      [source code]

      -
      """
      -Example showing the use of a TriFinder object.  As the mouse is moved over the
      -triangulation, the triangle under the cursor is highlighted and the index of
      -the triangle is displayed in the plot title.
      -"""
      -import matplotlib.pyplot as plt
      -from matplotlib.tri import Triangulation
      -from matplotlib.patches import Polygon
      -import numpy as np
      -import math
      -
      -
      -def update_polygon(tri):
      -    if tri == -1:
      -        points = [0, 0, 0]
      -    else:
      -        points = triangulation.triangles[tri]
      -    xs = triangulation.x[points]
      -    ys = triangulation.y[points]
      -    polygon.set_xy(zip(xs, ys))
      -
      -
      -def motion_notify(event):
      -    if event.inaxes is None:
      -        tri = -1
      -    else:
      -        tri = trifinder(event.xdata, event.ydata)
      -    update_polygon(tri)
      -    plt.title('In triangle %i' % tri)
      -    event.canvas.draw()
      -
      -
      -# Create a Triangulation.
      -n_angles = 16
      -n_radii = 5
      -min_radius = 0.25
      -radii = np.linspace(min_radius, 0.95, n_radii)
      -angles = np.linspace(0, 2*math.pi, n_angles, endpoint=False)
      -angles = np.repeat(angles[..., np.newaxis], n_radii, axis=1)
      -angles[:, 1::2] += math.pi / n_angles
      -x = (radii*np.cos(angles)).flatten()
      -y = (radii*np.sin(angles)).flatten()
      -triangulation = Triangulation(x, y)
      -xmid = x[triangulation.triangles].mean(axis=1)
      -ymid = y[triangulation.triangles].mean(axis=1)
      -mask = np.where(xmid*xmid + ymid*ymid < min_radius*min_radius, 1, 0)
      -triangulation.set_mask(mask)
      -
      -# Use the triangulation's default TriFinder object.
      -trifinder = triangulation.get_trifinder()
      -
      -# Setup plot and callbacks.
      -plt.subplot(111, aspect='equal')
      -plt.triplot(triangulation, 'bo-')
      -polygon = Polygon([[0, 0], [0, 0]], facecolor='y')  # dummy data for xs,ys
      -update_polygon(-1)
      -plt.gca().add_patch(polygon)
      -plt.gcf().canvas.mpl_connect('motion_notify_event', motion_notify)
      -plt.show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/event_handling/trifinder_event_demo.py b/dev/examples/event_handling/trifinder_event_demo.py deleted file mode 100644 index fd7ccc77d40..00000000000 --- a/dev/examples/event_handling/trifinder_event_demo.py +++ /dev/null @@ -1,59 +0,0 @@ -""" -Example showing the use of a TriFinder object. As the mouse is moved over the -triangulation, the triangle under the cursor is highlighted and the index of -the triangle is displayed in the plot title. -""" -import matplotlib.pyplot as plt -from matplotlib.tri import Triangulation -from matplotlib.patches import Polygon -import numpy as np -import math - - -def update_polygon(tri): - if tri == -1: - points = [0, 0, 0] - else: - points = triangulation.triangles[tri] - xs = triangulation.x[points] - ys = triangulation.y[points] - polygon.set_xy(zip(xs, ys)) - - -def motion_notify(event): - if event.inaxes is None: - tri = -1 - else: - tri = trifinder(event.xdata, event.ydata) - update_polygon(tri) - plt.title('In triangle %i' % tri) - event.canvas.draw() - - -# Create a Triangulation. -n_angles = 16 -n_radii = 5 -min_radius = 0.25 -radii = np.linspace(min_radius, 0.95, n_radii) -angles = np.linspace(0, 2*math.pi, n_angles, endpoint=False) -angles = np.repeat(angles[..., np.newaxis], n_radii, axis=1) -angles[:, 1::2] += math.pi / n_angles -x = (radii*np.cos(angles)).flatten() -y = (radii*np.sin(angles)).flatten() -triangulation = Triangulation(x, y) -xmid = x[triangulation.triangles].mean(axis=1) -ymid = y[triangulation.triangles].mean(axis=1) -mask = np.where(xmid*xmid + ymid*ymid < min_radius*min_radius, 1, 0) -triangulation.set_mask(mask) - -# Use the triangulation's default TriFinder object. -trifinder = triangulation.get_trifinder() - -# Setup plot and callbacks. -plt.subplot(111, aspect='equal') -plt.triplot(triangulation, 'bo-') -polygon = Polygon([[0, 0], [0, 0]], facecolor='y') # dummy data for xs,ys -update_polygon(-1) -plt.gca().add_patch(polygon) -plt.gcf().canvas.mpl_connect('motion_notify_event', motion_notify) -plt.show() diff --git a/dev/examples/event_handling/viewlims.html b/dev/examples/event_handling/viewlims.html deleted file mode 100644 index a48b725259d..00000000000 --- a/dev/examples/event_handling/viewlims.html +++ /dev/null @@ -1,226 +0,0 @@ - - - - - - - - event_handling example code: viewlims.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      event_handling example code: viewlims.py

      -

      [source code]

      -
      # Creates two identical panels.  Zooming in on the right panel will show
      -# a rectangle in the first panel, denoting the zoomed region.
      -import numpy as np
      -import matplotlib.pyplot as plt
      -from matplotlib.patches import Rectangle
      -
      -# We just subclass Rectangle so that it can be called with an Axes
      -# instance, causing the rectangle to update its shape to match the
      -# bounds of the Axes
      -class UpdatingRect(Rectangle):
      -    def __call__(self, ax):
      -        self.set_bounds(*ax.viewLim.bounds)
      -        ax.figure.canvas.draw_idle()
      -
      -# A class that will regenerate a fractal set as we zoom in, so that you
      -# can actually see the increasing detail.  A box in the left panel will show
      -# the area to which we are zoomed.
      -class MandlebrotDisplay(object):
      -    def __init__(self, h=500, w=500, niter=50, radius=2., power=2):
      -        self.height = h
      -        self.width = w
      -        self.niter = niter
      -        self.radius = radius
      -        self.power = power
      -
      -    def __call__(self, xstart, xend, ystart, yend):
      -        self.x = np.linspace(xstart, xend, self.width)
      -        self.y = np.linspace(ystart, yend, self.height).reshape(-1,1)
      -        c = self.x + 1.0j * self.y
      -        threshold_time = np.zeros((self.height, self.width))
      -        z = np.zeros(threshold_time.shape, dtype=np.complex)
      -        mask = np.ones(threshold_time.shape, dtype=np.bool)
      -        for i in range(self.niter):
      -            z[mask] = z[mask]**self.power + c[mask]
      -            mask = (np.abs(z) < self.radius)
      -            threshold_time += mask
      -        return threshold_time
      -
      -    def ax_update(self, ax):
      -        ax.set_autoscale_on(False) # Otherwise, infinite loop
      -
      -        #Get the number of points from the number of pixels in the window
      -        dims = ax.axesPatch.get_window_extent().bounds
      -        self.width = int(dims[2] + 0.5)
      -        self.height = int(dims[2] + 0.5)
      -
      -        #Get the range for the new area
      -        xstart,ystart,xdelta,ydelta = ax.viewLim.bounds
      -        xend = xstart + xdelta
      -        yend = ystart + ydelta
      -
      -        # Update the image object with our new data and extent
      -        im = ax.images[-1]
      -        im.set_data(self.__call__(xstart, xend, ystart, yend))
      -        im.set_extent((xstart, xend, ystart, yend))
      -        ax.figure.canvas.draw_idle()
      -
      -md = MandlebrotDisplay()
      -Z = md(-2., 0.5, -1.25, 1.25)
      -
      -fig = plt.figure()
      -ax1 = fig.add_subplot(1, 2, 1)
      -ax1.imshow(Z, origin='lower', extent=(md.x.min(), md.x.max(), md.y.min(), md.y.max()))
      -
      -ax2 = fig.add_subplot(1, 2, 2)
      -ax2.imshow(Z, origin='lower', extent=(md.x.min(), md.x.max(), md.y.min(), md.y.max()))
      -
      -rect = UpdatingRect([0, 0], 0, 0, facecolor='None', edgecolor='black')
      -rect.set_bounds(*ax2.viewLim.bounds)
      -ax1.add_patch(rect)
      -
      -# Connect for changing the view limits
      -ax2.callbacks.connect('xlim_changed', rect)
      -ax2.callbacks.connect('ylim_changed', rect)
      -
      -ax2.callbacks.connect('xlim_changed', md.ax_update)
      -ax2.callbacks.connect('ylim_changed', md.ax_update)
      -
      -plt.show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/event_handling/viewlims.py b/dev/examples/event_handling/viewlims.py deleted file mode 100644 index fe5838cbc6c..00000000000 --- a/dev/examples/event_handling/viewlims.py +++ /dev/null @@ -1,79 +0,0 @@ -# Creates two identical panels. Zooming in on the right panel will show -# a rectangle in the first panel, denoting the zoomed region. -import numpy as np -import matplotlib.pyplot as plt -from matplotlib.patches import Rectangle - -# We just subclass Rectangle so that it can be called with an Axes -# instance, causing the rectangle to update its shape to match the -# bounds of the Axes -class UpdatingRect(Rectangle): - def __call__(self, ax): - self.set_bounds(*ax.viewLim.bounds) - ax.figure.canvas.draw_idle() - -# A class that will regenerate a fractal set as we zoom in, so that you -# can actually see the increasing detail. A box in the left panel will show -# the area to which we are zoomed. -class MandlebrotDisplay(object): - def __init__(self, h=500, w=500, niter=50, radius=2., power=2): - self.height = h - self.width = w - self.niter = niter - self.radius = radius - self.power = power - - def __call__(self, xstart, xend, ystart, yend): - self.x = np.linspace(xstart, xend, self.width) - self.y = np.linspace(ystart, yend, self.height).reshape(-1,1) - c = self.x + 1.0j * self.y - threshold_time = np.zeros((self.height, self.width)) - z = np.zeros(threshold_time.shape, dtype=np.complex) - mask = np.ones(threshold_time.shape, dtype=np.bool) - for i in range(self.niter): - z[mask] = z[mask]**self.power + c[mask] - mask = (np.abs(z) < self.radius) - threshold_time += mask - return threshold_time - - def ax_update(self, ax): - ax.set_autoscale_on(False) # Otherwise, infinite loop - - #Get the number of points from the number of pixels in the window - dims = ax.axesPatch.get_window_extent().bounds - self.width = int(dims[2] + 0.5) - self.height = int(dims[2] + 0.5) - - #Get the range for the new area - xstart,ystart,xdelta,ydelta = ax.viewLim.bounds - xend = xstart + xdelta - yend = ystart + ydelta - - # Update the image object with our new data and extent - im = ax.images[-1] - im.set_data(self.__call__(xstart, xend, ystart, yend)) - im.set_extent((xstart, xend, ystart, yend)) - ax.figure.canvas.draw_idle() - -md = MandlebrotDisplay() -Z = md(-2., 0.5, -1.25, 1.25) - -fig = plt.figure() -ax1 = fig.add_subplot(1, 2, 1) -ax1.imshow(Z, origin='lower', extent=(md.x.min(), md.x.max(), md.y.min(), md.y.max())) - -ax2 = fig.add_subplot(1, 2, 2) -ax2.imshow(Z, origin='lower', extent=(md.x.min(), md.x.max(), md.y.min(), md.y.max())) - -rect = UpdatingRect([0, 0], 0, 0, facecolor='None', edgecolor='black') -rect.set_bounds(*ax2.viewLim.bounds) -ax1.add_patch(rect) - -# Connect for changing the view limits -ax2.callbacks.connect('xlim_changed', rect) -ax2.callbacks.connect('ylim_changed', rect) - -ax2.callbacks.connect('xlim_changed', md.ax_update) -ax2.callbacks.connect('ylim_changed', md.ax_update) - -plt.show() diff --git a/dev/examples/event_handling/zoom_window.html b/dev/examples/event_handling/zoom_window.html deleted file mode 100644 index bd7127a8f13..00000000000 --- a/dev/examples/event_handling/zoom_window.html +++ /dev/null @@ -1,184 +0,0 @@ - - - - - - - - event_handling example code: zoom_window.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      event_handling example code: zoom_window.py

      -

      [source code]

      -
      """
      -This example shows how to connect events in one window, for example, a mouse
      -press, to another figure window.
      -
      -If you click on a point in the first window, the z and y limits of the
      -second will be adjusted so that the center of the zoom in the second
      -window will be the x,y coordinates of the clicked point.
      -
      -Note the diameter of the circles in the scatter are defined in
      -points**2, so their size is independent of the zoom
      -"""
      -from matplotlib.pyplot import figure, show
      -import numpy
      -figsrc = figure()
      -figzoom = figure()
      -
      -axsrc = figsrc.add_subplot(111, xlim=(0,1), ylim=(0,1), autoscale_on=False)
      -axzoom = figzoom.add_subplot(111, xlim=(0.45,0.55), ylim=(0.4,.6),
      -                                                    autoscale_on=False)
      -axsrc.set_title('Click to zoom')
      -axzoom.set_title('zoom window')
      -x,y,s,c = numpy.random.rand(4,200)
      -s *= 200
      -
      -
      -axsrc.scatter(x,y,s,c)
      -axzoom.scatter(x,y,s,c)
      -
      -def onpress(event):
      -    if event.button!=1: return
      -    x,y = event.xdata, event.ydata
      -    axzoom.set_xlim(x-0.1, x+0.1)
      -    axzoom.set_ylim(y-0.1, y+0.1)
      -    figzoom.canvas.draw()
      -
      -figsrc.canvas.mpl_connect('button_press_event', onpress)
      -show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/event_handling/zoom_window.py b/dev/examples/event_handling/zoom_window.py deleted file mode 100644 index c82cf2f5ff3..00000000000 --- a/dev/examples/event_handling/zoom_window.py +++ /dev/null @@ -1,38 +0,0 @@ -""" -This example shows how to connect events in one window, for example, a mouse -press, to another figure window. - -If you click on a point in the first window, the z and y limits of the -second will be adjusted so that the center of the zoom in the second -window will be the x,y coordinates of the clicked point. - -Note the diameter of the circles in the scatter are defined in -points**2, so their size is independent of the zoom -""" -from matplotlib.pyplot import figure, show -import numpy -figsrc = figure() -figzoom = figure() - -axsrc = figsrc.add_subplot(111, xlim=(0,1), ylim=(0,1), autoscale_on=False) -axzoom = figzoom.add_subplot(111, xlim=(0.45,0.55), ylim=(0.4,.6), - autoscale_on=False) -axsrc.set_title('Click to zoom') -axzoom.set_title('zoom window') -x,y,s,c = numpy.random.rand(4,200) -s *= 200 - - -axsrc.scatter(x,y,s,c) -axzoom.scatter(x,y,s,c) - -def onpress(event): - if event.button!=1: return - x,y = event.xdata, event.ydata - axzoom.set_xlim(x-0.1, x+0.1) - axzoom.set_ylim(y-0.1, y+0.1) - figzoom.canvas.draw() - -figsrc.canvas.mpl_connect('button_press_event', onpress) -show() - diff --git a/dev/examples/images_contours_and_fields/image_demo.html b/dev/examples/images_contours_and_fields/image_demo.html deleted file mode 100644 index 134c018adbb..00000000000 --- a/dev/examples/images_contours_and_fields/image_demo.html +++ /dev/null @@ -1,162 +0,0 @@ - - - - - - - - images_contours_and_fields example code: image_demo.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      images_contours_and_fields example code: image_demo.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/image_demo1.png -
      -
      """
      -Simple demo of the imshow function.
      -"""
      -import matplotlib.pyplot as plt
      -import matplotlib.cbook as cbook
      -
      -image_file = cbook.get_sample_data('ada.png')
      -image = plt.imread(image_file)
      -
      -plt.imshow(image)
      -plt.axis('off') # clear x- and y-axes
      -plt.show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/images_contours_and_fields/image_demo_clip_path.html b/dev/examples/images_contours_and_fields/image_demo_clip_path.html deleted file mode 100644 index 8b1c8a47414..00000000000 --- a/dev/examples/images_contours_and_fields/image_demo_clip_path.html +++ /dev/null @@ -1,168 +0,0 @@ - - - - - - - - images_contours_and_fields example code: image_demo_clip_path.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      images_contours_and_fields example code: image_demo_clip_path.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/image_demo_clip_path.png -
      -
      """
      -Demo of image that's been clipped by a circular patch.
      -"""
      -import matplotlib.pyplot as plt
      -import matplotlib.patches as patches
      -import matplotlib.cbook as cbook
      -
      -
      -image_file = cbook.get_sample_data('grace_hopper.png')
      -image = plt.imread(image_file)
      -
      -fig, ax = plt.subplots()
      -im = ax.imshow(image)
      -patch = patches.Circle((260, 200), radius=200, transform=ax.transData)
      -im.set_clip_path(patch)
      -
      -plt.axis('off')
      -plt.show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/images_contours_and_fields/index.html b/dev/examples/images_contours_and_fields/index.html deleted file mode 100644 index bfdc495689d..00000000000 --- a/dev/examples/images_contours_and_fields/index.html +++ /dev/null @@ -1,162 +0,0 @@ - - - - - - - - images_contours_and_fields Examples — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      images_contours_and_fields Examples

      - --- - - - - - -
      Release:1.3.x
      Date:May 21, 2013
      - -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/images_contours_and_fields/pcolormesh_levels.html b/dev/examples/images_contours_and_fields/pcolormesh_levels.html deleted file mode 100644 index d93c1b20dc1..00000000000 --- a/dev/examples/images_contours_and_fields/pcolormesh_levels.html +++ /dev/null @@ -1,203 +0,0 @@ - - - - - - - - images_contours_and_fields example code: pcolormesh_levels.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      images_contours_and_fields example code: pcolormesh_levels.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/pcolormesh_levels.png -
      -
      """
      -Shows how to combine Normalization and Colormap instances to draw
      -"levels" in pcolor, pcolormesh and imshow type plots in a similar
      -way to the levels keyword argument to contour/contourf.
      -
      -"""
      -
      -import matplotlib.pyplot as plt
      -from matplotlib.colors import BoundaryNorm
      -from matplotlib.ticker import MaxNLocator
      -import numpy as np
      -
      -
      -# make these smaller to increase the resolution
      -dx, dy = 0.05, 0.05
      -
      -# generate 2 2d grids for the x & y bounds
      -y, x = np.mgrid[slice(1, 5 + dy, dy),
      -                slice(1, 5 + dx, dx)]
      -
      -z = np.sin(x) ** 10 + np.cos(10 + y * x) * np.cos(x)
      -
      -# x and y are bounds, so z should be the value *inside* those bounds.
      -# Therefore, remove the last value from the z array.
      -z = z[:-1, :-1]
      -levels = MaxNLocator(nbins=15).tick_values(z.min(), z.max())
      -
      -
      -# pick the desired colormap, sensible levels, and define a normalization
      -# instance which takes data values and translates those into levels.
      -cmap = plt.get_cmap('PiYG')
      -norm = BoundaryNorm(levels, ncolors=cmap.N, clip=True)
      -
      -plt.subplot(2, 1, 1)
      -im = plt.pcolormesh(x, y, z, cmap=cmap, norm=norm)
      -plt.colorbar()
      -# set the limits of the plot to the limits of the data
      -plt.axis([x.min(), x.max(), y.min(), y.max()])
      -plt.title('pcolormesh with levels')
      -
      -
      -
      -plt.subplot(2, 1, 2)
      -# contours are *point* based plots, so convert our bound into point
      -# centers
      -plt.contourf(x[:-1, :-1] + dx / 2.,
      -             y[:-1, :-1] + dy / 2., z, levels=levels,
      -             cmap=cmap)
      -plt.colorbar()
      -plt.title('contourf with levels')
      -
      -
      -plt.show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/images_contours_and_fields/streamplot_demo_features.html b/dev/examples/images_contours_and_fields/streamplot_demo_features.html deleted file mode 100644 index 09f10e1f2e5..00000000000 --- a/dev/examples/images_contours_and_fields/streamplot_demo_features.html +++ /dev/null @@ -1,183 +0,0 @@ - - - - - - - - images_contours_and_fields example code: streamplot_demo_features.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      images_contours_and_fields example code: streamplot_demo_features.py

      -

      (Source code)

      -
      -../../_images/streamplot_demo_features_00.png -

      (png, hires.png, pdf)

      -
      -
      -../../_images/streamplot_demo_features_01.png -

      (png, hires.png, pdf)

      -
      -
      """
      -Demo of the `streamplot` function.
      -
      -A streamplot, or streamline plot, is used to display 2D vector fields. This
      -example shows a few features of the stream plot function:
      -
      -    * Varying the color along a streamline.
      -    * Varying the density of streamlines.
      -    * Varying the line width along a stream line.
      -"""
      -import numpy as np
      -import matplotlib.pyplot as plt
      -
      -Y, X = np.mgrid[-3:3:100j, -3:3:100j]
      -U = -1 - X**2 + Y
      -V = 1 + X - Y**2
      -speed = np.sqrt(U*U + V*V)
      -
      -plt.streamplot(X, Y, U, V, color=U, linewidth=2, cmap=plt.cm.autumn)
      -plt.colorbar()
      -
      -f, (ax1, ax2) = plt.subplots(ncols=2)
      -ax1.streamplot(X, Y, U, V, density=[0.5, 1])
      -
      -lw = 5*speed/speed.max()
      -ax2.streamplot(X, Y, U, V, density=0.6, color='k', linewidth=lw)
      -
      -plt.show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/images_contours_and_fields/streamplot_demo_masking.html b/dev/examples/images_contours_and_fields/streamplot_demo_masking.html deleted file mode 100644 index 5d352f044a8..00000000000 --- a/dev/examples/images_contours_and_fields/streamplot_demo_masking.html +++ /dev/null @@ -1,176 +0,0 @@ - - - - - - - - images_contours_and_fields example code: streamplot_demo_masking.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      images_contours_and_fields example code: streamplot_demo_masking.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/streamplot_demo_masking.png -
      -
      """
      -Demo of the streamplot function with masking.
      -
      -This example shows how streamlines created by the streamplot function skips
      -masked regions and NaN values.
      -"""
      -import numpy as np
      -import matplotlib.pyplot as plt
      -
      -w = 3
      -Y, X = np.mgrid[-w:w:100j, -w:w:100j]
      -U = -1 - X**2 + Y
      -V = 1 + X - Y**2
      -speed = np.sqrt(U*U + V*V)
      -
      -mask = np.zeros(U.shape, dtype=bool)
      -mask[40:60, 40:60] = 1
      -U = np.ma.array(U, mask=mask)
      -U[:20, :20] = np.nan
      -
      -plt.streamplot(X, Y, U, V, color='r')
      -
      -plt.imshow(~mask, extent=(-w, w, -w, w), alpha=0.5,
      -           interpolation='nearest', cmap=plt.cm.gray)
      -
      -plt.show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/index.html b/dev/examples/index.html deleted file mode 100644 index c3fcdb8254c..00000000000 --- a/dev/examples/index.html +++ /dev/null @@ -1,681 +0,0 @@ - - - - - - - - Matplotlib Examples — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      Matplotlib Examples

      - --- - - - - - -
      Release:1.3.x
      Date:May 21, 2013
      -
      - -
      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/lines_bars_and_markers/barh_demo.html b/dev/examples/lines_bars_and_markers/barh_demo.html deleted file mode 100644 index 168e5541891..00000000000 --- a/dev/examples/lines_bars_and_markers/barh_demo.html +++ /dev/null @@ -1,168 +0,0 @@ - - - - - - - - lines_bars_and_markers example code: barh_demo.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      lines_bars_and_markers example code: barh_demo.py

      -

      (Source code)

      -
      """
      -Simple demo of a horizontal bar chart.
      -"""
      -import matplotlib.pyplot as plt; plt.rcdefaults()
      -from mpltools import style; style.use('gallery')
      -import numpy as np
      -import matplotlib.pyplot as plt
      -
      -
      -# Example data
      -people = ('Tom', 'Dick', 'Harry', 'Slim', 'Jim')
      -y_pos = np.arange(len(people))
      -performance = 3 + 10 * np.random.rand(len(people))
      -error = np.random.rand(len(people))
      -
      -plt.barh(y_pos, performance, xerr=error, align='center', alpha=0.4)
      -plt.yticks(y_pos, people)
      -plt.xlabel('Performance')
      -plt.title('How fast do you want to go today?')
      -
      -plt.show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/lines_bars_and_markers/fill_demo.html b/dev/examples/lines_bars_and_markers/fill_demo.html deleted file mode 100644 index 4e82caa680e..00000000000 --- a/dev/examples/lines_bars_and_markers/fill_demo.html +++ /dev/null @@ -1,163 +0,0 @@ - - - - - - - - lines_bars_and_markers example code: fill_demo.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      lines_bars_and_markers example code: fill_demo.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/fill_demo1.png -
      -
      """
      -Simple demo of the fill function.
      -"""
      -import numpy as np
      -import matplotlib.pyplot as plt
      -
      -
      -x = np.linspace(0, 1)
      -y = np.sin(4 * np.pi * x) * np.exp(-5 * x)
      -
      -plt.fill(x, y, 'r')
      -plt.grid(True)
      -plt.show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/lines_bars_and_markers/fill_demo_features.html b/dev/examples/lines_bars_and_markers/fill_demo_features.html deleted file mode 100644 index b7c00e54690..00000000000 --- a/dev/examples/lines_bars_and_markers/fill_demo_features.html +++ /dev/null @@ -1,167 +0,0 @@ - - - - - - - - lines_bars_and_markers example code: fill_demo_features.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      lines_bars_and_markers example code: fill_demo_features.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/fill_demo_features.png -
      -
      """
      -Demo of the fill function with a few features.
      -
      -In addition to the basic fill plot, this demo shows a few optional features:
      -
      -    * Multiple curves with a single command.
      -    * Setting the fill color.
      -    * Setting the opacity (alpha value).
      -"""
      -import numpy as np
      -import matplotlib.pyplot as plt
      -
      -x = np.linspace(0, 2 * np.pi, 100)
      -y1 = np.sin(x)
      -y2 = np.sin(3 * x)
      -plt.fill(x, y1, 'b', x, y2, 'r', alpha=0.3)
      -plt.show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/lines_bars_and_markers/index.html b/dev/examples/lines_bars_and_markers/index.html deleted file mode 100644 index 4707529a34d..00000000000 --- a/dev/examples/lines_bars_and_markers/index.html +++ /dev/null @@ -1,161 +0,0 @@ - - - - - - - - lines_bars_and_markers Examples — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      lines_bars_and_markers Examples

      - --- - - - - - -
      Release:1.3.x
      Date:May 21, 2013
      - -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/lines_bars_and_markers/line_demo_dash_control.html b/dev/examples/lines_bars_and_markers/line_demo_dash_control.html deleted file mode 100644 index 8647f6d4617..00000000000 --- a/dev/examples/lines_bars_and_markers/line_demo_dash_control.html +++ /dev/null @@ -1,167 +0,0 @@ - - - - - - - - lines_bars_and_markers example code: line_demo_dash_control.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      lines_bars_and_markers example code: line_demo_dash_control.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/line_demo_dash_control.png -
      -
      """
      -Demo of a simple plot with a custom dashed line.
      -
      -A Line object's ``set_dashes`` method allows you to specify dashes with
      -a series of on/off lengths (in points).
      -"""
      -import numpy as np
      -import matplotlib.pyplot as plt
      -
      -
      -x = np.linspace(0, 10)
      -line, = plt.plot(x, np.sin(x), '--', linewidth=2)
      -
      -dashes = [10, 5, 100, 5] # 10 points on, 5 off, 100 on, 5 off
      -line.set_dashes(dashes)
      -
      -plt.show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/misc/contour_manual.html b/dev/examples/misc/contour_manual.html deleted file mode 100644 index 2cbbfa71931..00000000000 --- a/dev/examples/misc/contour_manual.html +++ /dev/null @@ -1,197 +0,0 @@ - - - - - - - - misc example code: contour_manual.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      misc example code: contour_manual.py

      -

      [source code]

      -
      """
      -Example of displaying your own contour lines and polygons using ContourSet.
      -"""
      -import matplotlib.pyplot as plt
      -from matplotlib.contour import ContourSet
      -import matplotlib.cm as cm
      -
      -# Contour lines for each level are a list/tuple of polygons.
      -lines0 = [ [[0,0],[0,4]] ]
      -lines1 = [ [[2,0],[1,2],[1,3]] ]
      -lines2 = [ [[3,0],[3,2]], [[3,3],[3,4]] ]  # Note two lines.
      -
      -# Filled contours between two levels are also a list/tuple of polygons.
      -# Points can be ordered clockwise or anticlockwise.
      -filled01 = [ [[0,0],[0,4],[1,3],[1,2],[2,0]] ]
      -filled12 = [ [[2,0],[3,0],[3,2],[1,3],[1,2]],   # Note two polygons.
      -             [[1,4],[3,4],[3,3]] ]
      -
      -
      -plt.figure()
      -
      -# Filled contours using filled=True.
      -cs = ContourSet(plt.gca(), [0,1,2], [filled01, filled12], filled=True, cmap=cm.bone)
      -cbar = plt.colorbar(cs)
      -
      -# Contour lines (non-filled).
      -lines = ContourSet(plt.gca(), [0,1,2], [lines0, lines1, lines2], cmap=cm.cool,
      -                   linewidths=3)
      -cbar.add_lines(lines)
      -
      -plt.axis([-0.5, 3.5, -0.5, 4.5])
      -plt.title('User-specified contours')
      -
      -
      -
      -# Multiple filled contour lines can be specified in a single list of polygon
      -# vertices along with a list of vertex kinds (code types) as described in the
      -# Path class.  This is particularly useful for polygons with holes.
      -# Here a code type of 1 is a MOVETO, and 2 is a LINETO.
      -
      -plt.figure()
      -filled01 = [ [[0,0],[3,0],[3,3],[0,3],[1,1],[1,2],[2,2],[2,1]] ]
      -kinds01  = [ [1,2,2,2,1,2,2,2] ]
      -cs = ContourSet(plt.gca(), [0,1], [filled01], [kinds01], filled=True)
      -cbar = plt.colorbar(cs)
      -
      -plt.axis([-0.5, 3.5, -0.5, 3.5])
      -plt.title('User specified filled contours with holes')
      -
      -plt.show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/misc/contour_manual.py b/dev/examples/misc/contour_manual.py deleted file mode 100644 index 480b8d1602f..00000000000 --- a/dev/examples/misc/contour_manual.py +++ /dev/null @@ -1,50 +0,0 @@ -""" -Example of displaying your own contour lines and polygons using ContourSet. -""" -import matplotlib.pyplot as plt -from matplotlib.contour import ContourSet -import matplotlib.cm as cm - -# Contour lines for each level are a list/tuple of polygons. -lines0 = [ [[0,0],[0,4]] ] -lines1 = [ [[2,0],[1,2],[1,3]] ] -lines2 = [ [[3,0],[3,2]], [[3,3],[3,4]] ] # Note two lines. - -# Filled contours between two levels are also a list/tuple of polygons. -# Points can be ordered clockwise or anticlockwise. -filled01 = [ [[0,0],[0,4],[1,3],[1,2],[2,0]] ] -filled12 = [ [[2,0],[3,0],[3,2],[1,3],[1,2]], # Note two polygons. - [[1,4],[3,4],[3,3]] ] - - -plt.figure() - -# Filled contours using filled=True. -cs = ContourSet(plt.gca(), [0,1,2], [filled01, filled12], filled=True, cmap=cm.bone) -cbar = plt.colorbar(cs) - -# Contour lines (non-filled). -lines = ContourSet(plt.gca(), [0,1,2], [lines0, lines1, lines2], cmap=cm.cool, - linewidths=3) -cbar.add_lines(lines) - -plt.axis([-0.5, 3.5, -0.5, 4.5]) -plt.title('User-specified contours') - - - -# Multiple filled contour lines can be specified in a single list of polygon -# vertices along with a list of vertex kinds (code types) as described in the -# Path class. This is particularly useful for polygons with holes. -# Here a code type of 1 is a MOVETO, and 2 is a LINETO. - -plt.figure() -filled01 = [ [[0,0],[3,0],[3,3],[0,3],[1,1],[1,2],[2,2],[2,1]] ] -kinds01 = [ [1,2,2,2,1,2,2,2] ] -cs = ContourSet(plt.gca(), [0,1], [filled01], [kinds01], filled=True) -cbar = plt.colorbar(cs) - -plt.axis([-0.5, 3.5, -0.5, 3.5]) -plt.title('User specified filled contours with holes') - -plt.show() \ No newline at end of file diff --git a/dev/examples/misc/developer_commit_history.html b/dev/examples/misc/developer_commit_history.html deleted file mode 100644 index 7f215d161e8..00000000000 --- a/dev/examples/misc/developer_commit_history.html +++ /dev/null @@ -1,192 +0,0 @@ - - - - - - - - misc example code: developer_commit_history.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      misc example code: developer_commit_history.py

      -

      [source code]

      -
      from __future__ import print_function
      -"""
      -report how many days it has been since each developer committed.  You
      -must do an
      -
      -svn log > log.txt
      -
      -and place the output next to this file before running
      -
      -"""
      -import os, datetime
      -
      -import matplotlib.cbook as cbook
      -
      -todate = cbook.todate('%Y-%m-%d')
      -today = datetime.date.today()
      -if not os.path.exists('log.txt'):
      -    print('You must place the "svn log" output into a file "log.txt"')
      -    raise SystemExit
      -
      -parse = False
      -
      -lastd = dict()
      -for line in file('log.txt'):
      -    if line.startswith('--------'):
      -        parse = True
      -        continue
      -
      -    if parse:
      -        parts = [part.strip() for part in line.split('|')]
      -        developer = parts[1]
      -        dateparts = parts[2].split(' ')
      -        ymd = todate(dateparts[0])
      -
      -
      -    if developer not in lastd:
      -        lastd[developer] = ymd
      -
      -    parse = False
      -
      -dsu = [((today - lastdate).days, developer) for developer, lastdate in lastd.items()]
      -
      -dsu.sort()
      -for timedelta, developer in dsu:
      -    print('%s : %d'%(developer, timedelta))
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/misc/developer_commit_history.py b/dev/examples/misc/developer_commit_history.py deleted file mode 100644 index e4577c73e73..00000000000 --- a/dev/examples/misc/developer_commit_history.py +++ /dev/null @@ -1,45 +0,0 @@ -from __future__ import print_function -""" -report how many days it has been since each developer committed. You -must do an - -svn log > log.txt - -and place the output next to this file before running - -""" -import os, datetime - -import matplotlib.cbook as cbook - -todate = cbook.todate('%Y-%m-%d') -today = datetime.date.today() -if not os.path.exists('log.txt'): - print('You must place the "svn log" output into a file "log.txt"') - raise SystemExit - -parse = False - -lastd = dict() -for line in file('log.txt'): - if line.startswith('--------'): - parse = True - continue - - if parse: - parts = [part.strip() for part in line.split('|')] - developer = parts[1] - dateparts = parts[2].split(' ') - ymd = todate(dateparts[0]) - - - if developer not in lastd: - lastd[developer] = ymd - - parse = False - -dsu = [((today - lastdate).days, developer) for developer, lastdate in lastd.items()] - -dsu.sort() -for timedelta, developer in dsu: - print('%s : %d'%(developer, timedelta)) diff --git a/dev/examples/misc/font_indexing.html b/dev/examples/misc/font_indexing.html deleted file mode 100644 index 15e54f5e51a..00000000000 --- a/dev/examples/misc/font_indexing.html +++ /dev/null @@ -1,189 +0,0 @@ - - - - - - - - misc example code: font_indexing.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      misc example code: font_indexing.py

      -

      [source code]

      -
      """
      -A little example that shows how the various indexing into the font
      -tables relate to one another.  Mainly for mpl developers....
      -
      -"""
      -from __future__ import print_function
      -import matplotlib
      -from matplotlib.ft2font import FT2Font, KERNING_DEFAULT, KERNING_UNFITTED, KERNING_UNSCALED
      -
      -
      -
      -#fname = '/usr/share/fonts/sfd/FreeSans.ttf'
      -fname = matplotlib.get_data_path() + '/fonts/ttf/Vera.ttf'
      -font = FT2Font(fname)
      -font.set_charmap(0)
      -
      -codes = font.get_charmap().items()
      -#dsu = [(ccode, glyphind) for ccode, glyphind in codes]
      -#dsu.sort()
      -#for ccode, glyphind in dsu:
      -#    try: name = font.get_glyph_name(glyphind)
      -#    except RuntimeError: pass
      -#    else: print '% 4d % 4d %s %s'%(glyphind, ccode, hex(int(ccode)), name)
      -
      -
      -
      -# make a charname to charcode and glyphind dictionary
      -coded = {}
      -glyphd = {}
      -for ccode, glyphind in codes:
      -    name = font.get_glyph_name(glyphind)
      -    coded[name] = ccode
      -    glyphd[name] = glyphind
      -
      -code =  coded['A']
      -glyph = font.load_char(code)
      -#print glyph.bbox
      -print(glyphd['A'], glyphd['V'], coded['A'], coded['V'])
      -print('AV', font.get_kerning(glyphd['A'], glyphd['V'], KERNING_DEFAULT))
      -print('AV', font.get_kerning(glyphd['A'], glyphd['V'], KERNING_UNFITTED))
      -print('AV', font.get_kerning(glyphd['A'], glyphd['V'], KERNING_UNSCALED))
      -print('AV', font.get_kerning(glyphd['A'], glyphd['T'], KERNING_UNSCALED))
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/misc/font_indexing.py b/dev/examples/misc/font_indexing.py deleted file mode 100644 index a856978c778..00000000000 --- a/dev/examples/misc/font_indexing.py +++ /dev/null @@ -1,42 +0,0 @@ -""" -A little example that shows how the various indexing into the font -tables relate to one another. Mainly for mpl developers.... - -""" -from __future__ import print_function -import matplotlib -from matplotlib.ft2font import FT2Font, KERNING_DEFAULT, KERNING_UNFITTED, KERNING_UNSCALED - - - -#fname = '/usr/share/fonts/sfd/FreeSans.ttf' -fname = matplotlib.get_data_path() + '/fonts/ttf/Vera.ttf' -font = FT2Font(fname) -font.set_charmap(0) - -codes = font.get_charmap().items() -#dsu = [(ccode, glyphind) for ccode, glyphind in codes] -#dsu.sort() -#for ccode, glyphind in dsu: -# try: name = font.get_glyph_name(glyphind) -# except RuntimeError: pass -# else: print '% 4d % 4d %s %s'%(glyphind, ccode, hex(int(ccode)), name) - - - -# make a charname to charcode and glyphind dictionary -coded = {} -glyphd = {} -for ccode, glyphind in codes: - name = font.get_glyph_name(glyphind) - coded[name] = ccode - glyphd[name] = glyphind - -code = coded['A'] -glyph = font.load_char(code) -#print glyph.bbox -print(glyphd['A'], glyphd['V'], coded['A'], coded['V']) -print('AV', font.get_kerning(glyphd['A'], glyphd['V'], KERNING_DEFAULT)) -print('AV', font.get_kerning(glyphd['A'], glyphd['V'], KERNING_UNFITTED)) -print('AV', font.get_kerning(glyphd['A'], glyphd['V'], KERNING_UNSCALED)) -print('AV', font.get_kerning(glyphd['A'], glyphd['T'], KERNING_UNSCALED)) diff --git a/dev/examples/misc/ftface_props.html b/dev/examples/misc/ftface_props.html deleted file mode 100644 index bc8cb12d0b1..00000000000 --- a/dev/examples/misc/ftface_props.html +++ /dev/null @@ -1,225 +0,0 @@ - - - - - - - - misc example code: ftface_props.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      misc example code: ftface_props.py

      -

      [source code]

      -
      #!/usr/bin/env python
      -
      -from __future__ import print_function
      -"""
      -This is a demo script to show you how to use all the properties of an
      -FT2Font object.  These describe global font properties.  For
      -individual character metrices, use the Glyp object, as returned by
      -load_char
      -"""
      -import matplotlib
      -from matplotlib.ft2font import FT2Font
      -
      -#fname = '/usr/local/share/matplotlib/VeraIt.ttf'
      -fname = matplotlib.get_data_path() + '/fonts/ttf/VeraIt.ttf'
      -#fname = '/usr/local/share/matplotlib/cmr10.ttf'
      -
      -font = FT2Font(fname)
      -
      -# these constants are used to access the style_flags and face_flags
      -FT_FACE_FLAG_SCALABLE          = 1 << 0
      -FT_FACE_FLAG_FIXED_SIZES       = 1 << 1
      -FT_FACE_FLAG_FIXED_WIDTH       = 1 << 2
      -FT_FACE_FLAG_SFNT              = 1 << 3
      -FT_FACE_FLAG_HORIZONTAL        = 1 << 4
      -FT_FACE_FLAG_VERTICAL          = 1 << 5
      -FT_FACE_FLAG_KERNING           = 1 << 6
      -FT_FACE_FLAG_FAST_GLYPHS       = 1 << 7
      -FT_FACE_FLAG_MULTIPLE_MASTERS  = 1 << 8
      -FT_FACE_FLAG_GLYPH_NAMES       = 1 << 9
      -FT_FACE_FLAG_EXTERNAL_STREAM   = 1 << 10
      -FT_STYLE_FLAG_ITALIC           = 1 << 0
      -FT_STYLE_FLAG_BOLD             = 1 << 1
      -
      -print('Num faces   :', font.num_faces)       # number of faces in file
      -print('Num glyphs  :', font.num_glyphs)      # number of glyphs in the face
      -print('Family name :', font.family_name)     # face family name
      -print('Syle name   :', font.style_name)      # face syle name
      -print('PS name     :', font.postscript_name) # the postscript name
      -print('Num fixed   :', font.num_fixed_sizes) # number of embedded bitmap in face
      -
      -# the following are only available if face.scalable
      -if font.scalable:
      -    # the face global bounding box (xmin, ymin, xmax, ymax)
      -    print('Bbox                :', font.bbox)
      -    # number of font units covered by the EM
      -    print('EM                  :', font.units_per_EM)
      -    # the ascender in 26.6 units
      -    print('Ascender            :', font.ascender)
      -    # the descender in 26.6 units
      -    print('Descender           :', font.descender)
      -    # the height in 26.6 units
      -    print('Height              :', font.height)
      -    # maximum horizontal cursor advance
      -    print('Max adv width       :', font.max_advance_width)
      -    # same for vertical layout
      -    print('Max adv height      :', font.max_advance_height)
      -    # vertical position of the underline bar
      -    print('Underline pos       :', font.underline_position)
      -    # vertical thickness of the underline
      -    print('Underline thickness :', font.underline_thickness)
      -
      -print('Italics       :', font.style_flags & FT_STYLE_FLAG_ITALIC          != 0)
      -print('Bold          :', font.style_flags & FT_STYLE_FLAG_BOLD            != 0)
      -print('Scalable      :', font.style_flags & FT_FACE_FLAG_SCALABLE         != 0)
      -print('Fixed sizes   :', font.style_flags & FT_FACE_FLAG_FIXED_SIZES      != 0)
      -print('Fixed width   :', font.style_flags & FT_FACE_FLAG_FIXED_WIDTH      != 0)
      -print('SFNT          :', font.style_flags & FT_FACE_FLAG_SFNT             != 0)
      -print('Horizontal    :', font.style_flags & FT_FACE_FLAG_HORIZONTAL       != 0)
      -print('Vertical      :', font.style_flags & FT_FACE_FLAG_VERTICAL         != 0)
      -print('Kerning       :', font.style_flags & FT_FACE_FLAG_KERNING          != 0)
      -print('Fast glyphs   :', font.style_flags & FT_FACE_FLAG_FAST_GLYPHS      != 0)
      -print('Mult. masters :', font.style_flags & FT_FACE_FLAG_MULTIPLE_MASTERS != 0)
      -print('Glyph names   :', font.style_flags & FT_FACE_FLAG_GLYPH_NAMES      != 0)
      -
      -print(dir(font))
      -
      -cmap = font.get_charmap()
      -print(font.get_kerning)
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/misc/ftface_props.py b/dev/examples/misc/ftface_props.py deleted file mode 100644 index e64f2ecba57..00000000000 --- a/dev/examples/misc/ftface_props.py +++ /dev/null @@ -1,78 +0,0 @@ -#!/usr/bin/env python - -from __future__ import print_function -""" -This is a demo script to show you how to use all the properties of an -FT2Font object. These describe global font properties. For -individual character metrices, use the Glyp object, as returned by -load_char -""" -import matplotlib -from matplotlib.ft2font import FT2Font - -#fname = '/usr/local/share/matplotlib/VeraIt.ttf' -fname = matplotlib.get_data_path() + '/fonts/ttf/VeraIt.ttf' -#fname = '/usr/local/share/matplotlib/cmr10.ttf' - -font = FT2Font(fname) - -# these constants are used to access the style_flags and face_flags -FT_FACE_FLAG_SCALABLE = 1 << 0 -FT_FACE_FLAG_FIXED_SIZES = 1 << 1 -FT_FACE_FLAG_FIXED_WIDTH = 1 << 2 -FT_FACE_FLAG_SFNT = 1 << 3 -FT_FACE_FLAG_HORIZONTAL = 1 << 4 -FT_FACE_FLAG_VERTICAL = 1 << 5 -FT_FACE_FLAG_KERNING = 1 << 6 -FT_FACE_FLAG_FAST_GLYPHS = 1 << 7 -FT_FACE_FLAG_MULTIPLE_MASTERS = 1 << 8 -FT_FACE_FLAG_GLYPH_NAMES = 1 << 9 -FT_FACE_FLAG_EXTERNAL_STREAM = 1 << 10 -FT_STYLE_FLAG_ITALIC = 1 << 0 -FT_STYLE_FLAG_BOLD = 1 << 1 - -print('Num faces :', font.num_faces) # number of faces in file -print('Num glyphs :', font.num_glyphs) # number of glyphs in the face -print('Family name :', font.family_name) # face family name -print('Syle name :', font.style_name) # face syle name -print('PS name :', font.postscript_name) # the postscript name -print('Num fixed :', font.num_fixed_sizes) # number of embedded bitmap in face - -# the following are only available if face.scalable -if font.scalable: - # the face global bounding box (xmin, ymin, xmax, ymax) - print('Bbox :', font.bbox) - # number of font units covered by the EM - print('EM :', font.units_per_EM) - # the ascender in 26.6 units - print('Ascender :', font.ascender) - # the descender in 26.6 units - print('Descender :', font.descender) - # the height in 26.6 units - print('Height :', font.height) - # maximum horizontal cursor advance - print('Max adv width :', font.max_advance_width) - # same for vertical layout - print('Max adv height :', font.max_advance_height) - # vertical position of the underline bar - print('Underline pos :', font.underline_position) - # vertical thickness of the underline - print('Underline thickness :', font.underline_thickness) - -print('Italics :', font.style_flags & FT_STYLE_FLAG_ITALIC != 0) -print('Bold :', font.style_flags & FT_STYLE_FLAG_BOLD != 0) -print('Scalable :', font.style_flags & FT_FACE_FLAG_SCALABLE != 0) -print('Fixed sizes :', font.style_flags & FT_FACE_FLAG_FIXED_SIZES != 0) -print('Fixed width :', font.style_flags & FT_FACE_FLAG_FIXED_WIDTH != 0) -print('SFNT :', font.style_flags & FT_FACE_FLAG_SFNT != 0) -print('Horizontal :', font.style_flags & FT_FACE_FLAG_HORIZONTAL != 0) -print('Vertical :', font.style_flags & FT_FACE_FLAG_VERTICAL != 0) -print('Kerning :', font.style_flags & FT_FACE_FLAG_KERNING != 0) -print('Fast glyphs :', font.style_flags & FT_FACE_FLAG_FAST_GLYPHS != 0) -print('Mult. masters :', font.style_flags & FT_FACE_FLAG_MULTIPLE_MASTERS != 0) -print('Glyph names :', font.style_flags & FT_FACE_FLAG_GLYPH_NAMES != 0) - -print(dir(font)) - -cmap = font.get_charmap() -print(font.get_kerning) diff --git a/dev/examples/misc/image_thumbnail.html b/dev/examples/misc/image_thumbnail.html deleted file mode 100644 index 72f9e59895c..00000000000 --- a/dev/examples/misc/image_thumbnail.html +++ /dev/null @@ -1,176 +0,0 @@ - - - - - - - - misc example code: image_thumbnail.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      misc example code: image_thumbnail.py

      -

      [source code]

      -
      """
      -You can use matplotlib to generate thumbnails from existing images.
      -matplotlib natively supports PNG files on the input side, and other
      -image types transparently if your have PIL installed
      -"""
      -
      -from __future__ import print_function
      -# build thumbnails of all images in a directory
      -import sys, os, glob
      -import matplotlib.image as image
      -
      -
      -if len(sys.argv)!=2:
      -    print('Usage: python %s IMAGEDIR'%__file__)
      -    raise SystemExit
      -indir = sys.argv[1]
      -if not os.path.isdir(indir):
      -    print('Could not find input directory "%s"'%indir)
      -    raise SystemExit
      -
      -outdir = 'thumbs'
      -if not os.path.exists(outdir):
      -    os.makedirs(outdir)
      -
      -for fname in glob.glob(os.path.join(indir, '*.png')):
      -    basedir, basename = os.path.split(fname)
      -    outfile = os.path.join(outdir, basename)
      -    fig = image.thumbnail(fname, outfile, scale=0.15)
      -    print('saved thumbnail of %s to %s'%(fname, outfile))
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/misc/image_thumbnail.py b/dev/examples/misc/image_thumbnail.py deleted file mode 100644 index c3fb57231e9..00000000000 --- a/dev/examples/misc/image_thumbnail.py +++ /dev/null @@ -1,30 +0,0 @@ -""" -You can use matplotlib to generate thumbnails from existing images. -matplotlib natively supports PNG files on the input side, and other -image types transparently if your have PIL installed -""" - -from __future__ import print_function -# build thumbnails of all images in a directory -import sys, os, glob -import matplotlib.image as image - - -if len(sys.argv)!=2: - print('Usage: python %s IMAGEDIR'%__file__) - raise SystemExit -indir = sys.argv[1] -if not os.path.isdir(indir): - print('Could not find input directory "%s"'%indir) - raise SystemExit - -outdir = 'thumbs' -if not os.path.exists(outdir): - os.makedirs(outdir) - -for fname in glob.glob(os.path.join(indir, '*.png')): - basedir, basename = os.path.split(fname) - outfile = os.path.join(outdir, basename) - fig = image.thumbnail(fname, outfile, scale=0.15) - print('saved thumbnail of %s to %s'%(fname, outfile)) - diff --git a/dev/examples/misc/index.html b/dev/examples/misc/index.html deleted file mode 100644 index 2f73359e21c..00000000000 --- a/dev/examples/misc/index.html +++ /dev/null @@ -1,172 +0,0 @@ - - - - - - - - misc Examples — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - - - - - - \ No newline at end of file diff --git a/dev/examples/misc/longshort.html b/dev/examples/misc/longshort.html deleted file mode 100644 index c3da1261d99..00000000000 --- a/dev/examples/misc/longshort.html +++ /dev/null @@ -1,194 +0,0 @@ - - - - - - - - misc example code: longshort.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      misc example code: longshort.py

      -

      [source code]

      -
      """
      -Illustrate the rec array utility funcitons by loading prices from a
      -csv file, computing the daily returns, appending the results to the
      -record arrays, joining on date
      -"""
      -import urllib
      -import numpy as np
      -import matplotlib.pyplot as plt
      -import matplotlib.mlab as mlab
      -
      -# grab the price data off yahoo
      -u1 = urllib.urlretrieve('http://ichart.finance.yahoo.com/table.csv?s=AAPL&d=9&e=14&f=2008&g=d&a=8&b=7&c=1984&ignore=.csv')
      -u2 = urllib.urlretrieve('http://ichart.finance.yahoo.com/table.csv?s=GOOG&d=9&e=14&f=2008&g=d&a=8&b=7&c=1984&ignore=.csv')
      -
      -# load the CSV files into record arrays
      -r1 = mlab.csv2rec(file(u1[0]))
      -r2 = mlab.csv2rec(file(u2[0]))
      -
      -# compute the daily returns and add these columns to the arrays
      -gains1 = np.zeros_like(r1.adj_close)
      -gains2 = np.zeros_like(r2.adj_close)
      -gains1[1:] = np.diff(r1.adj_close)/r1.adj_close[:-1]
      -gains2[1:] = np.diff(r2.adj_close)/r2.adj_close[:-1]
      -r1 = mlab.rec_append_fields(r1, 'gains', gains1)
      -r2 = mlab.rec_append_fields(r2, 'gains', gains2)
      -
      -# now join them by date; the default postfixes are 1 and 2.  The
      -# default jointype is inner so it will do an intersection of dates and
      -# drop the dates in AAPL which occurred before GOOG started trading in
      -# 2004.  r1 and r2 are reverse ordered by date since Yahoo returns
      -# most recent first in the CSV files, but rec_join will sort by key so
      -# r below will be properly sorted
      -r = mlab.rec_join('date', r1, r2)
      -
      -
      -# long appl, short goog
      -g = r.gains1-r.gains2
      -tr = (1+g).cumprod()  # the total return
      -
      -# plot the return
      -fig = plt.figure()
      -ax = fig.add_subplot(111)
      -ax.plot(r.date, tr)
      -ax.set_title('total return: long APPL, short GOOG')
      -ax.grid()
      -fig.autofmt_xdate()
      -plt.show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/misc/longshort.py b/dev/examples/misc/longshort.py deleted file mode 100644 index 06b0302b80d..00000000000 --- a/dev/examples/misc/longshort.py +++ /dev/null @@ -1,47 +0,0 @@ -""" -Illustrate the rec array utility funcitons by loading prices from a -csv file, computing the daily returns, appending the results to the -record arrays, joining on date -""" -import urllib -import numpy as np -import matplotlib.pyplot as plt -import matplotlib.mlab as mlab - -# grab the price data off yahoo -u1 = urllib.urlretrieve('http://ichart.finance.yahoo.com/table.csv?s=AAPL&d=9&e=14&f=2008&g=d&a=8&b=7&c=1984&ignore=.csv') -u2 = urllib.urlretrieve('http://ichart.finance.yahoo.com/table.csv?s=GOOG&d=9&e=14&f=2008&g=d&a=8&b=7&c=1984&ignore=.csv') - -# load the CSV files into record arrays -r1 = mlab.csv2rec(file(u1[0])) -r2 = mlab.csv2rec(file(u2[0])) - -# compute the daily returns and add these columns to the arrays -gains1 = np.zeros_like(r1.adj_close) -gains2 = np.zeros_like(r2.adj_close) -gains1[1:] = np.diff(r1.adj_close)/r1.adj_close[:-1] -gains2[1:] = np.diff(r2.adj_close)/r2.adj_close[:-1] -r1 = mlab.rec_append_fields(r1, 'gains', gains1) -r2 = mlab.rec_append_fields(r2, 'gains', gains2) - -# now join them by date; the default postfixes are 1 and 2. The -# default jointype is inner so it will do an intersection of dates and -# drop the dates in AAPL which occurred before GOOG started trading in -# 2004. r1 and r2 are reverse ordered by date since Yahoo returns -# most recent first in the CSV files, but rec_join will sort by key so -# r below will be properly sorted -r = mlab.rec_join('date', r1, r2) - - -# long appl, short goog -g = r.gains1-r.gains2 -tr = (1+g).cumprod() # the total return - -# plot the return -fig = plt.figure() -ax = fig.add_subplot(111) -ax.plot(r.date, tr) -ax.set_title('total return: long APPL, short GOOG') -ax.grid() -fig.autofmt_xdate() -plt.show() diff --git a/dev/examples/misc/multiprocess.html b/dev/examples/misc/multiprocess.html deleted file mode 100644 index 65aef5d678f..00000000000 --- a/dev/examples/misc/multiprocess.html +++ /dev/null @@ -1,238 +0,0 @@ - - - - - - - - misc example code: multiprocess.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      misc example code: multiprocess.py

      -

      [source code]

      -
      #Demo of using multiprocessing for generating data in one process and plotting
      -#in another.
      -#Written by Robert Cimrman
      -#Requires >= Python 2.6 for the multiprocessing module or having the
      -#standalone processing module installed
      -
      -from __future__ import print_function
      -import time
      -try:
      -    from multiprocessing import Process, Pipe
      -except ImportError:
      -    from processing import Process, Pipe
      -import numpy as np
      -
      -import matplotlib
      -matplotlib.use('GtkAgg')
      -import matplotlib.pyplot as plt
      -import gobject
      -
      -class ProcessPlotter(object):
      -
      -    def __init__(self):
      -        self.x = []
      -        self.y = []
      -
      -    def terminate(self):
      -        plt.close('all')
      -
      -    def poll_draw(self):
      -
      -        def call_back():
      -            while 1:
      -                if not self.pipe.poll():
      -                    break
      -
      -                command = self.pipe.recv()
      -
      -                if command is None:
      -                    self.terminate()
      -                    return False
      -
      -                else:
      -                    self.x.append(command[0])
      -                    self.y.append(command[1])
      -                    self.ax.plot(self.x, self.y, 'ro')
      -
      -            self.fig.canvas.draw()
      -            return True
      -
      -        return call_back
      -
      -    def __call__(self, pipe):
      -        print('starting plotter...')
      -
      -        self.pipe = pipe
      -        self.fig = plt.figure()
      -
      -        self.ax = self.fig.add_subplot(111)
      -        self.gid = gobject.timeout_add(1000, self.poll_draw())
      -
      -        print('...done')
      -        plt.show()
      -
      -
      -class NBPlot(object):
      -    def __init__(self):
      -        self.plot_pipe, plotter_pipe = Pipe()
      -        self.plotter = ProcessPlotter()
      -        self.plot_process = Process(target = self.plotter,
      -                                    args = (plotter_pipe,))
      -        self.plot_process.daemon = True
      -        self.plot_process.start()
      -
      -    def plot(self, finished=False):
      -        send = self.plot_pipe.send
      -        if finished:
      -            send(None)
      -        else:
      -            data = np.random.random(2)
      -            send(data)
      -
      -def main():
      -    pl = NBPlot()
      -    for ii in range(10):
      -        pl.plot()
      -        time.sleep(0.5)
      -    raw_input('press Enter...')
      -    pl.plot(finished=True)
      -
      -if __name__ == '__main__':
      -    main()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/misc/multiprocess.py b/dev/examples/misc/multiprocess.py deleted file mode 100644 index 09aa4ed9446..00000000000 --- a/dev/examples/misc/multiprocess.py +++ /dev/null @@ -1,91 +0,0 @@ -#Demo of using multiprocessing for generating data in one process and plotting -#in another. -#Written by Robert Cimrman -#Requires >= Python 2.6 for the multiprocessing module or having the -#standalone processing module installed - -from __future__ import print_function -import time -try: - from multiprocessing import Process, Pipe -except ImportError: - from processing import Process, Pipe -import numpy as np - -import matplotlib -matplotlib.use('GtkAgg') -import matplotlib.pyplot as plt -import gobject - -class ProcessPlotter(object): - - def __init__(self): - self.x = [] - self.y = [] - - def terminate(self): - plt.close('all') - - def poll_draw(self): - - def call_back(): - while 1: - if not self.pipe.poll(): - break - - command = self.pipe.recv() - - if command is None: - self.terminate() - return False - - else: - self.x.append(command[0]) - self.y.append(command[1]) - self.ax.plot(self.x, self.y, 'ro') - - self.fig.canvas.draw() - return True - - return call_back - - def __call__(self, pipe): - print('starting plotter...') - - self.pipe = pipe - self.fig = plt.figure() - - self.ax = self.fig.add_subplot(111) - self.gid = gobject.timeout_add(1000, self.poll_draw()) - - print('...done') - plt.show() - - -class NBPlot(object): - def __init__(self): - self.plot_pipe, plotter_pipe = Pipe() - self.plotter = ProcessPlotter() - self.plot_process = Process(target = self.plotter, - args = (plotter_pipe,)) - self.plot_process.daemon = True - self.plot_process.start() - - def plot(self, finished=False): - send = self.plot_pipe.send - if finished: - send(None) - else: - data = np.random.random(2) - send(data) - -def main(): - pl = NBPlot() - for ii in range(10): - pl.plot() - time.sleep(0.5) - raw_input('press Enter...') - pl.plot(finished=True) - -if __name__ == '__main__': - main() diff --git a/dev/examples/misc/rasterization_demo.html b/dev/examples/misc/rasterization_demo.html deleted file mode 100644 index f4931e60569..00000000000 --- a/dev/examples/misc/rasterization_demo.html +++ /dev/null @@ -1,200 +0,0 @@ - - - - - - - - misc example code: rasterization_demo.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      misc example code: rasterization_demo.py

      -

      [source code]

      -
      import numpy as np
      -import matplotlib.pyplot as plt
      -
      -d = np.arange(100).reshape(10, 10)
      -x, y = np.meshgrid(np.arange(11), np.arange(11))
      -
      -theta = 0.25*np.pi
      -xx = x*np.cos(theta) - y*np.sin(theta)
      -yy = x*np.sin(theta) + y*np.cos(theta)
      -
      -ax1 = plt.subplot(221)
      -ax1.set_aspect(1)
      -ax1.pcolormesh(xx, yy, d)
      -ax1.set_title("No Rasterization")
      -
      -ax2 = plt.subplot(222)
      -ax2.set_aspect(1)
      -ax2.set_title("Rasterization")
      -
      -m = ax2.pcolormesh(xx, yy, d)
      -m.set_rasterized(True)
      -
      -ax3 = plt.subplot(223)
      -ax3.set_aspect(1)
      -ax3.pcolormesh(xx, yy, d)
      -ax3.text(0.5, 0.5, "Text", alpha=0.2,
      -         va="center", ha="center", size=50, transform=ax3.transAxes)
      -
      -ax3.set_title("No Rasterization")
      -
      -
      -ax4 = plt.subplot(224)
      -ax4.set_aspect(1)
      -m = ax4.pcolormesh(xx, yy, d)
      -m.set_zorder(-20)
      -
      -ax4.text(0.5, 0.5, "Text", alpha=0.2,
      -         zorder=-15,
      -         va="center", ha="center", size=50, transform=ax4.transAxes)
      -
      -ax4.set_rasterization_zorder(-10)
      -
      -ax4.set_title("Rasterization z$<-10$")
      -
      -
      -# ax2.title.set_rasterized(True) # should display a warning
      -
      -plt.savefig("test_rasterization.pdf", dpi=150)
      -plt.savefig("test_rasterization.eps", dpi=150)
      -
      -if not plt.rcParams["text.usetex"]:
      -    plt.savefig("test_rasterization.svg", dpi=150)
      -    # svg backend currently ignores the dpi
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/misc/rasterization_demo.py b/dev/examples/misc/rasterization_demo.py deleted file mode 100644 index a03daaac927..00000000000 --- a/dev/examples/misc/rasterization_demo.py +++ /dev/null @@ -1,53 +0,0 @@ -import numpy as np -import matplotlib.pyplot as plt - -d = np.arange(100).reshape(10, 10) -x, y = np.meshgrid(np.arange(11), np.arange(11)) - -theta = 0.25*np.pi -xx = x*np.cos(theta) - y*np.sin(theta) -yy = x*np.sin(theta) + y*np.cos(theta) - -ax1 = plt.subplot(221) -ax1.set_aspect(1) -ax1.pcolormesh(xx, yy, d) -ax1.set_title("No Rasterization") - -ax2 = plt.subplot(222) -ax2.set_aspect(1) -ax2.set_title("Rasterization") - -m = ax2.pcolormesh(xx, yy, d) -m.set_rasterized(True) - -ax3 = plt.subplot(223) -ax3.set_aspect(1) -ax3.pcolormesh(xx, yy, d) -ax3.text(0.5, 0.5, "Text", alpha=0.2, - va="center", ha="center", size=50, transform=ax3.transAxes) - -ax3.set_title("No Rasterization") - - -ax4 = plt.subplot(224) -ax4.set_aspect(1) -m = ax4.pcolormesh(xx, yy, d) -m.set_zorder(-20) - -ax4.text(0.5, 0.5, "Text", alpha=0.2, - zorder=-15, - va="center", ha="center", size=50, transform=ax4.transAxes) - -ax4.set_rasterization_zorder(-10) - -ax4.set_title("Rasterization z$<-10$") - - -# ax2.title.set_rasterized(True) # should display a warning - -plt.savefig("test_rasterization.pdf", dpi=150) -plt.savefig("test_rasterization.eps", dpi=150) - -if not plt.rcParams["text.usetex"]: - plt.savefig("test_rasterization.svg", dpi=150) - # svg backend currently ignores the dpi diff --git a/dev/examples/misc/rc_traits.html b/dev/examples/misc/rc_traits.html deleted file mode 100644 index a1246881134..00000000000 --- a/dev/examples/misc/rc_traits.html +++ /dev/null @@ -1,341 +0,0 @@ - - - - - - - - misc example code: rc_traits.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      misc example code: rc_traits.py

      -

      [source code]

      -
      # Here is some example code showing how to define some representative
      -# rc properties and construct a matplotlib artist using traits.
      -# matplotlib does not ship with enthought.traits, so you will need to
      -# install it separately.
      -
      -from __future__ import print_function
      -
      -import sys, os, re
      -import traits.api as traits
      -from matplotlib.cbook import is_string_like
      -from matplotlib.artist import Artist
      -
      -doprint = True
      -flexible_true_trait = traits.Trait(
      -   True,
      -   { 'true':  True, 't': True, 'yes': True, 'y': True, 'on':  True, True: True,
      -     'false': False, 'f': False, 'no':  False, 'n': False, 'off': False, False: False
      -                              } )
      -flexible_false_trait = traits.Trait( False, flexible_true_trait )
      -
      -colors = {
      -   'c' : '#00bfbf',
      -   'b' : '#0000ff',
      -   'g' : '#008000',
      -   'k' : '#000000',
      -   'm' : '#bf00bf',
      -   'r' : '#ff0000',
      -   'w' : '#ffffff',
      -   'y' : '#bfbf00',
      -   'gold'                 : '#FFD700',
      -   'peachpuff'            : '#FFDAB9',
      -   'navajowhite'          : '#FFDEAD',
      -   }
      -
      -def hex2color(s):
      -   "Convert hex string (like html uses, eg, #efefef) to a r,g,b tuple"
      -   return tuple([int(n, 16)/255.0 for n in (s[1:3], s[3:5], s[5:7])])
      -
      -class RGBA(traits.HasTraits):
      -   # r,g,b,a in the range 0-1 with default color 0,0,0,1 (black)
      -   r = traits.Range(0., 1., 0.)
      -   g = traits.Range(0., 1., 0.)
      -   b = traits.Range(0., 1., 0.)
      -   a = traits.Range(0., 1., 1.)
      -   def __init__(self, r=0., g=0., b=0., a=1.):
      -       self.r = r
      -       self.g = g
      -       self.b = b
      -       self.a = a
      -   def __repr__(self):
      -       return 'r,g,b,a = (%1.2f, %1.2f, %1.2f, %1.2f)'%\
      -              (self.r, self.g, self.b, self.a)
      -
      -def tuple_to_rgba(ob, name, val):
      -   tup = [float(x) for x in val]
      -   if len(tup)==3:
      -       r,g,b = tup
      -       return RGBA(r,g,b)
      -   elif len(tup)==4:
      -       r,g,b,a = tup
      -       return RGBA(r,g,b,a)
      -   else:
      -       raise ValueError
      -tuple_to_rgba.info = 'a RGB or RGBA tuple of floats'
      -
      -def hex_to_rgba(ob, name, val):
      -   rgx = re.compile('^#[0-9A-Fa-f]{6}$')
      -
      -   if not is_string_like(val):
      -       raise TypeError
      -   if rgx.match(val) is None:
      -       raise ValueError
      -   r,g,b = hex2color(val)
      -   return RGBA(r,g,b,1.0)
      -hex_to_rgba.info = 'a hex color string'
      -
      -def colorname_to_rgba(ob, name, val):
      -   hex = colors[val.lower()]
      -   r,g,b =  hex2color(hex)
      -   return RGBA(r,g,b,1.0)
      -colorname_to_rgba.info = 'a named color'
      -
      -def float_to_rgba(ob, name, val):
      -   val = float(val)
      -   return RGBA(val, val, val, 1.)
      -float_to_rgba.info = 'a grayscale intensity'
      -
      -
      -
      -Color = traits.Trait(RGBA(), float_to_rgba, colorname_to_rgba, RGBA,
      -             hex_to_rgba, tuple_to_rgba)
      -
      -def file_exists(ob, name, val):
      -   fh = file(val, 'r')
      -   return val
      -
      -def path_exists(ob, name, val):
      -   os.path.exists(val)
      -linestyles  = ('-', '--', '-.', ':', 'steps', 'None')
      -TICKLEFT, TICKRIGHT, TICKUP, TICKDOWN = range(4)
      -linemarkers = (None, '.', ',', 'o', '^', 'v', '<', '>', 's',
      -                 '+', 'x', 'd', 'D', '|', '_', 'h', 'H',
      -                 'p', '1', '2', '3', '4',
      -                 TICKLEFT,
      -                 TICKRIGHT,
      -                 TICKUP,
      -                 TICKDOWN,
      -                 'None'
      -              )
      -
      -class LineRC(traits.HasTraits):
      -   linewidth       = traits.Float(0.5)
      -   linestyle       = traits.Trait(*linestyles)
      -   color           = Color
      -   marker          = traits.Trait(*linemarkers)
      -   markerfacecolor = Color
      -   markeredgecolor = Color
      -   markeredgewidth = traits.Float(0.5)
      -   markersize      = traits.Float(6)
      -   antialiased     = flexible_true_trait
      -   data_clipping   = flexible_false_trait
      -
      -class PatchRC(traits.HasTraits):
      -   linewidth       = traits.Float(1.0)
      -   facecolor = Color
      -   edgecolor = Color
      -   antialiased     = flexible_true_trait
      -
      -timezones = 'UTC', 'US/Central', 'ES/Eastern' # fixme: and many more
      -backends = ('GTKAgg', 'Cairo', 'FltkAgg', 'GDK', 'GTK', 'Agg',
      -           'GTKCairo', 'PS', 'SVG', 'Template', 'TkAgg',
      -           'WX')
      -
      -class RC(traits.HasTraits):
      -   backend = traits.Trait(*backends)
      -   interactive  = flexible_false_trait
      -   toolbar      = traits.Trait('toolbar2', 'classic', None)
      -   timezone     = traits.Trait(*timezones)
      -   lines        = traits.Trait(LineRC())
      -   patch        = traits.Trait(PatchRC())
      -
      -rc = RC()
      -rc.lines.color = 'r'
      -if doprint:
      -   print('RC')
      -   rc.print_traits()
      -   print('RC lines')
      -   rc.lines.print_traits()
      -   print('RC patches')
      -   rc.patch.print_traits()
      -
      -
      -class Patch(Artist, traits.HasTraits):
      -   linewidth = traits.Float(0.5)
      -   facecolor = Color
      -   fc = facecolor
      -   edgecolor = Color
      -   fill = flexible_true_trait
      -   def __init__(self,
      -                edgecolor=None,
      -                facecolor=None,
      -                linewidth=None,
      -                antialiased = None,
      -                fill=1,
      -                **kwargs
      -                ):
      -       Artist.__init__(self)
      -
      -       if edgecolor is None: edgecolor = rc.patch.edgecolor
      -       if facecolor is None: facecolor = rc.patch.facecolor
      -       if linewidth is None: linewidth = rc.patch.linewidth
      -       if antialiased is None: antialiased = rc.patch.antialiased
      -
      -       self.edgecolor = edgecolor
      -       self.facecolor = facecolor
      -       self.linewidth = linewidth
      -       self.antialiased = antialiased
      -       self.fill = fill
      -
      -
      -p = Patch()
      -p.facecolor = '#bfbf00'
      -p.edgecolor = 'gold'
      -p.facecolor = (1,.5,.5,.25)
      -p.facecolor = 0.25
      -p.fill = 'f'
      -print('p.facecolor', type(p.facecolor), p.facecolor)
      -print('p.fill', type(p.fill), p.fill)
      -if p.fill_: print('fill')
      -else: print('no fill')
      -if doprint:
      -   print()
      -   print('Patch')
      -   p.print_traits()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/misc/rc_traits.py b/dev/examples/misc/rc_traits.py deleted file mode 100644 index ffad4701a28..00000000000 --- a/dev/examples/misc/rc_traits.py +++ /dev/null @@ -1,197 +0,0 @@ -# Here is some example code showing how to define some representative -# rc properties and construct a matplotlib artist using traits. -# matplotlib does not ship with enthought.traits, so you will need to -# install it separately. - -from __future__ import print_function - -import sys, os, re -import traits.api as traits -from matplotlib.cbook import is_string_like -from matplotlib.artist import Artist - -doprint = True -flexible_true_trait = traits.Trait( - True, - { 'true': True, 't': True, 'yes': True, 'y': True, 'on': True, True: True, - 'false': False, 'f': False, 'no': False, 'n': False, 'off': False, False: False - } ) -flexible_false_trait = traits.Trait( False, flexible_true_trait ) - -colors = { - 'c' : '#00bfbf', - 'b' : '#0000ff', - 'g' : '#008000', - 'k' : '#000000', - 'm' : '#bf00bf', - 'r' : '#ff0000', - 'w' : '#ffffff', - 'y' : '#bfbf00', - 'gold' : '#FFD700', - 'peachpuff' : '#FFDAB9', - 'navajowhite' : '#FFDEAD', - } - -def hex2color(s): - "Convert hex string (like html uses, eg, #efefef) to a r,g,b tuple" - return tuple([int(n, 16)/255.0 for n in (s[1:3], s[3:5], s[5:7])]) - -class RGBA(traits.HasTraits): - # r,g,b,a in the range 0-1 with default color 0,0,0,1 (black) - r = traits.Range(0., 1., 0.) - g = traits.Range(0., 1., 0.) - b = traits.Range(0., 1., 0.) - a = traits.Range(0., 1., 1.) - def __init__(self, r=0., g=0., b=0., a=1.): - self.r = r - self.g = g - self.b = b - self.a = a - def __repr__(self): - return 'r,g,b,a = (%1.2f, %1.2f, %1.2f, %1.2f)'%\ - (self.r, self.g, self.b, self.a) - -def tuple_to_rgba(ob, name, val): - tup = [float(x) for x in val] - if len(tup)==3: - r,g,b = tup - return RGBA(r,g,b) - elif len(tup)==4: - r,g,b,a = tup - return RGBA(r,g,b,a) - else: - raise ValueError -tuple_to_rgba.info = 'a RGB or RGBA tuple of floats' - -def hex_to_rgba(ob, name, val): - rgx = re.compile('^#[0-9A-Fa-f]{6}$') - - if not is_string_like(val): - raise TypeError - if rgx.match(val) is None: - raise ValueError - r,g,b = hex2color(val) - return RGBA(r,g,b,1.0) -hex_to_rgba.info = 'a hex color string' - -def colorname_to_rgba(ob, name, val): - hex = colors[val.lower()] - r,g,b = hex2color(hex) - return RGBA(r,g,b,1.0) -colorname_to_rgba.info = 'a named color' - -def float_to_rgba(ob, name, val): - val = float(val) - return RGBA(val, val, val, 1.) -float_to_rgba.info = 'a grayscale intensity' - - - -Color = traits.Trait(RGBA(), float_to_rgba, colorname_to_rgba, RGBA, - hex_to_rgba, tuple_to_rgba) - -def file_exists(ob, name, val): - fh = file(val, 'r') - return val - -def path_exists(ob, name, val): - os.path.exists(val) -linestyles = ('-', '--', '-.', ':', 'steps', 'None') -TICKLEFT, TICKRIGHT, TICKUP, TICKDOWN = range(4) -linemarkers = (None, '.', ',', 'o', '^', 'v', '<', '>', 's', - '+', 'x', 'd', 'D', '|', '_', 'h', 'H', - 'p', '1', '2', '3', '4', - TICKLEFT, - TICKRIGHT, - TICKUP, - TICKDOWN, - 'None' - ) - -class LineRC(traits.HasTraits): - linewidth = traits.Float(0.5) - linestyle = traits.Trait(*linestyles) - color = Color - marker = traits.Trait(*linemarkers) - markerfacecolor = Color - markeredgecolor = Color - markeredgewidth = traits.Float(0.5) - markersize = traits.Float(6) - antialiased = flexible_true_trait - data_clipping = flexible_false_trait - -class PatchRC(traits.HasTraits): - linewidth = traits.Float(1.0) - facecolor = Color - edgecolor = Color - antialiased = flexible_true_trait - -timezones = 'UTC', 'US/Central', 'ES/Eastern' # fixme: and many more -backends = ('GTKAgg', 'Cairo', 'FltkAgg', 'GDK', 'GTK', 'Agg', - 'GTKCairo', 'PS', 'SVG', 'Template', 'TkAgg', - 'WX') - -class RC(traits.HasTraits): - backend = traits.Trait(*backends) - interactive = flexible_false_trait - toolbar = traits.Trait('toolbar2', 'classic', None) - timezone = traits.Trait(*timezones) - lines = traits.Trait(LineRC()) - patch = traits.Trait(PatchRC()) - -rc = RC() -rc.lines.color = 'r' -if doprint: - print('RC') - rc.print_traits() - print('RC lines') - rc.lines.print_traits() - print('RC patches') - rc.patch.print_traits() - - -class Patch(Artist, traits.HasTraits): - linewidth = traits.Float(0.5) - facecolor = Color - fc = facecolor - edgecolor = Color - fill = flexible_true_trait - def __init__(self, - edgecolor=None, - facecolor=None, - linewidth=None, - antialiased = None, - fill=1, - **kwargs - ): - Artist.__init__(self) - - if edgecolor is None: edgecolor = rc.patch.edgecolor - if facecolor is None: facecolor = rc.patch.facecolor - if linewidth is None: linewidth = rc.patch.linewidth - if antialiased is None: antialiased = rc.patch.antialiased - - self.edgecolor = edgecolor - self.facecolor = facecolor - self.linewidth = linewidth - self.antialiased = antialiased - self.fill = fill - - -p = Patch() -p.facecolor = '#bfbf00' -p.edgecolor = 'gold' -p.facecolor = (1,.5,.5,.25) -p.facecolor = 0.25 -p.fill = 'f' -print('p.facecolor', type(p.facecolor), p.facecolor) -print('p.fill', type(p.fill), p.fill) -if p.fill_: print('fill') -else: print('no fill') -if doprint: - print() - print('Patch') - p.print_traits() - - - diff --git a/dev/examples/misc/rec_groupby_demo.html b/dev/examples/misc/rec_groupby_demo.html deleted file mode 100644 index 5258b7bdb28..00000000000 --- a/dev/examples/misc/rec_groupby_demo.html +++ /dev/null @@ -1,210 +0,0 @@ - - - - - - - - misc example code: rec_groupby_demo.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      misc example code: rec_groupby_demo.py

      -

      [source code]

      -
      from __future__ import print_function
      -import numpy as np
      -import matplotlib.mlab as mlab
      -import matplotlib.cbook as cbook
      -
      -datafile = cbook.get_sample_data('aapl.csv', asfileobj=False)
      -print('loading', datafile)
      -r = mlab.csv2rec(datafile)
      -r.sort()
      -
      -def daily_return(prices):
      -    'an array of daily returns from price array'
      -    g = np.zeros_like(prices)
      -    g[1:] = (prices[1:]-prices[:-1])/prices[:-1]
      -    return g
      -
      -def volume_code(volume):
      -    'code the continuous volume data categorically'
      -    ind = np.searchsorted([1e5,1e6, 5e6,10e6, 1e7], volume)
      -    return ind
      -
      -# a list of (dtype_name, summary_function, output_dtype_name).
      -# rec_summarize will call on each function on the indicated recarray
      -# attribute, and the result assigned to output name in the return
      -# record array.
      -summaryfuncs = (
      -    ('date', lambda x: [thisdate.year for thisdate in x], 'years'),
      -    ('date', lambda x: [thisdate.month for thisdate in x], 'months'),
      -    ('date', lambda x: [thisdate.weekday() for thisdate in x], 'weekday'),
      -    ('adj_close', daily_return, 'dreturn'),
      -    ('volume', volume_code, 'volcode'),
      -    )
      -
      -rsum = mlab.rec_summarize(r, summaryfuncs)
      -
      -# stats is a list of (dtype_name, function, output_dtype_name).
      -# rec_groupby will summarize the attribute identified by the
      -# dtype_name over the groups in the groupby list, and assign the
      -# result to the output_dtype_name
      -stats = (
      -    ('dreturn', len, 'rcnt'),
      -    ('dreturn', np.mean, 'rmean'),
      -    ('dreturn', np.median, 'rmedian'),
      -    ('dreturn', np.std, 'rsigma'),
      -    )
      -
      -# you can summarize over a single variable, like years or months
      -print('summary by years')
      -ry = mlab.rec_groupby(rsum, ('years',), stats)
      -print(mlab. rec2txt(ry))
      -
      -print('summary by months')
      -rm = mlab.rec_groupby(rsum, ('months',), stats)
      -print(mlab.rec2txt(rm))
      -
      -# or over multiple variables like years and months
      -print('summary by year and month')
      -rym = mlab.rec_groupby(rsum, ('years','months'), stats)
      -print(mlab.rec2txt(rym))
      -
      -print('summary by volume')
      -rv = mlab.rec_groupby(rsum, ('volcode',), stats)
      -print(mlab.rec2txt(rv))
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/misc/rec_groupby_demo.py b/dev/examples/misc/rec_groupby_demo.py deleted file mode 100644 index cdda0a011ef..00000000000 --- a/dev/examples/misc/rec_groupby_demo.py +++ /dev/null @@ -1,63 +0,0 @@ -from __future__ import print_function -import numpy as np -import matplotlib.mlab as mlab -import matplotlib.cbook as cbook - -datafile = cbook.get_sample_data('aapl.csv', asfileobj=False) -print('loading', datafile) -r = mlab.csv2rec(datafile) -r.sort() - -def daily_return(prices): - 'an array of daily returns from price array' - g = np.zeros_like(prices) - g[1:] = (prices[1:]-prices[:-1])/prices[:-1] - return g - -def volume_code(volume): - 'code the continuous volume data categorically' - ind = np.searchsorted([1e5,1e6, 5e6,10e6, 1e7], volume) - return ind - -# a list of (dtype_name, summary_function, output_dtype_name). -# rec_summarize will call on each function on the indicated recarray -# attribute, and the result assigned to output name in the return -# record array. -summaryfuncs = ( - ('date', lambda x: [thisdate.year for thisdate in x], 'years'), - ('date', lambda x: [thisdate.month for thisdate in x], 'months'), - ('date', lambda x: [thisdate.weekday() for thisdate in x], 'weekday'), - ('adj_close', daily_return, 'dreturn'), - ('volume', volume_code, 'volcode'), - ) - -rsum = mlab.rec_summarize(r, summaryfuncs) - -# stats is a list of (dtype_name, function, output_dtype_name). -# rec_groupby will summarize the attribute identified by the -# dtype_name over the groups in the groupby list, and assign the -# result to the output_dtype_name -stats = ( - ('dreturn', len, 'rcnt'), - ('dreturn', np.mean, 'rmean'), - ('dreturn', np.median, 'rmedian'), - ('dreturn', np.std, 'rsigma'), - ) - -# you can summarize over a single variable, like years or months -print('summary by years') -ry = mlab.rec_groupby(rsum, ('years',), stats) -print(mlab. rec2txt(ry)) - -print('summary by months') -rm = mlab.rec_groupby(rsum, ('months',), stats) -print(mlab.rec2txt(rm)) - -# or over multiple variables like years and months -print('summary by year and month') -rym = mlab.rec_groupby(rsum, ('years','months'), stats) -print(mlab.rec2txt(rym)) - -print('summary by volume') -rv = mlab.rec_groupby(rsum, ('volcode',), stats) -print(mlab.rec2txt(rv)) diff --git a/dev/examples/misc/rec_join_demo.html b/dev/examples/misc/rec_join_demo.html deleted file mode 100644 index 155c77d9ae8..00000000000 --- a/dev/examples/misc/rec_join_demo.html +++ /dev/null @@ -1,178 +0,0 @@ - - - - - - - - misc example code: rec_join_demo.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      misc example code: rec_join_demo.py

      -

      [source code]

      -
      from __future__ import print_function
      -import numpy as np
      -import matplotlib.mlab as mlab
      -import matplotlib.cbook as cbook
      -
      -datafile = cbook.get_sample_data('aapl.csv', asfileobj=False)
      -print('loading', datafile)
      -r = mlab.csv2rec(datafile)
      -
      -r.sort()
      -r1 = r[-10:]
      -
      -# Create a new array
      -r2 = np.empty(12, dtype=[('date', '|O4'), ('high', np.float),
      -                            ('marker', np.float)])
      -r2 = r2.view(np.recarray)
      -r2.date = r.date[-17:-5]
      -r2.high = r.high[-17:-5]
      -r2.marker = np.arange(12)
      -
      -print("r1:")
      -print(mlab.rec2txt(r1))
      -print("r2:")
      -print(mlab.rec2txt(r2))
      -
      -defaults = {'marker':-1, 'close':np.NaN, 'low':-4444.}
      -
      -for s in ('inner', 'outer', 'leftouter'):
      -    rec = mlab.rec_join(['date', 'high'], r1, r2,
      -            jointype=s, defaults=defaults)
      -    print("\n%sjoin :\n%s" % (s, mlab.rec2txt(rec)))
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/misc/rec_join_demo.py b/dev/examples/misc/rec_join_demo.py deleted file mode 100644 index 75289170a98..00000000000 --- a/dev/examples/misc/rec_join_demo.py +++ /dev/null @@ -1,31 +0,0 @@ -from __future__ import print_function -import numpy as np -import matplotlib.mlab as mlab -import matplotlib.cbook as cbook - -datafile = cbook.get_sample_data('aapl.csv', asfileobj=False) -print('loading', datafile) -r = mlab.csv2rec(datafile) - -r.sort() -r1 = r[-10:] - -# Create a new array -r2 = np.empty(12, dtype=[('date', '|O4'), ('high', np.float), - ('marker', np.float)]) -r2 = r2.view(np.recarray) -r2.date = r.date[-17:-5] -r2.high = r.high[-17:-5] -r2.marker = np.arange(12) - -print("r1:") -print(mlab.rec2txt(r1)) -print("r2:") -print(mlab.rec2txt(r2)) - -defaults = {'marker':-1, 'close':np.NaN, 'low':-4444.} - -for s in ('inner', 'outer', 'leftouter'): - rec = mlab.rec_join(['date', 'high'], r1, r2, - jointype=s, defaults=defaults) - print("\n%sjoin :\n%s" % (s, mlab.rec2txt(rec))) diff --git a/dev/examples/misc/sample_data_demo.html b/dev/examples/misc/sample_data_demo.html deleted file mode 100644 index c903c9c83ac..00000000000 --- a/dev/examples/misc/sample_data_demo.html +++ /dev/null @@ -1,160 +0,0 @@ - - - - - - - - misc example code: sample_data_demo.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      misc example code: sample_data_demo.py

      -

      [source code]

      -
      """
      -Grab mpl data from the ~/.matplotlib/sample_data cache if it exists, else
      -fetch it from github and cache it
      -"""
      -from __future__ import print_function
      -import matplotlib.cbook as cbook
      -import matplotlib.pyplot as plt
      -fname = cbook.get_sample_data('ada.png', asfileobj=False)
      -
      -print('fname', fname)
      -im = plt.imread(fname)
      -plt.imshow(im)
      -plt.show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/misc/sample_data_demo.py b/dev/examples/misc/sample_data_demo.py deleted file mode 100644 index 1e60b1e9085..00000000000 --- a/dev/examples/misc/sample_data_demo.py +++ /dev/null @@ -1,13 +0,0 @@ -""" -Grab mpl data from the ~/.matplotlib/sample_data cache if it exists, else -fetch it from github and cache it -""" -from __future__ import print_function -import matplotlib.cbook as cbook -import matplotlib.pyplot as plt -fname = cbook.get_sample_data('ada.png', asfileobj=False) - -print('fname', fname) -im = plt.imread(fname) -plt.imshow(im) -plt.show() diff --git a/dev/examples/misc/svg_filter_line.html b/dev/examples/misc/svg_filter_line.html deleted file mode 100644 index 331712c778b..00000000000 --- a/dev/examples/misc/svg_filter_line.html +++ /dev/null @@ -1,233 +0,0 @@ - - - - - - - - misc example code: svg_filter_line.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      misc example code: svg_filter_line.py

      -

      [source code]

      -
      """
      -Demonstrate SVG filtering effects which might be used with mpl.
      -
      -Note that the filtering effects are only effective if your svg rederer
      -support it.
      -"""
      -
      -from __future__ import print_function
      -import matplotlib
      -
      -matplotlib.use("Svg")
      -
      -import matplotlib.pyplot as plt
      -import matplotlib.transforms as mtransforms
      -
      -fig1 = plt.figure()
      -ax = fig1.add_axes([0.1, 0.1, 0.8, 0.8])
      -
      -# draw lines
      -l1, = ax.plot([0.1, 0.5, 0.9], [0.1, 0.9, 0.5], "bo-",
      -              mec="b", lw=5, ms=10, label="Line 1")
      -l2, = ax.plot([0.1, 0.5, 0.9], [0.5, 0.2, 0.7], "rs-",
      -              mec="r", lw=5, ms=10, color="r", label="Line 2")
      -
      -
      -for l in [l1, l2]:
      -
      -    # draw shadows with same lines with slight offset and gray colors.
      -
      -    xx = l.get_xdata()
      -    yy = l.get_ydata()
      -    shadow, = ax.plot(xx, yy)
      -    shadow.update_from(l)
      -
      -    # adjust color
      -    shadow.set_color("0.2")
      -    # adjust zorder of the shadow lines so that it is drawn below the
      -    # original lines
      -    shadow.set_zorder(l.get_zorder()-0.5)
      -
      -    # offset transform
      -    ot = mtransforms.offset_copy(l.get_transform(), fig1,
      -                                 x=4.0, y=-6.0, units='points')
      -
      -    shadow.set_transform(ot)
      -
      -    # set the id for a later use
      -    shadow.set_gid(l.get_label()+"_shadow")
      -
      -
      -ax.set_xlim(0., 1.)
      -ax.set_ylim(0., 1.)
      -
      -# save the figure as a string in the svg format.
      -from StringIO import StringIO
      -f = StringIO()
      -plt.savefig(f, format="svg")
      -
      -
      -import xml.etree.cElementTree as ET
      -
      -# filter definition for a gaussian blur
      -filter_def = """
      -  <defs  xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'>
      -    <filter id='dropshadow' height='1.2' width='1.2'>
      -      <feGaussianBlur result='blur' stdDeviation='3'/>
      -    </filter>
      -  </defs>
      -"""
      -
      -
      -# read in the saved svg
      -tree, xmlid = ET.XMLID(f.getvalue())
      -
      -# insert the filter definition in the svg dom tree.
      -tree.insert(0, ET.XML(filter_def))
      -
      -for l in [l1, l2]:
      -    # pick up the svg element with given id
      -    shadow = xmlid[l.get_label()+"_shadow"]
      -    # apply shdow filter
      -    shadow.set("filter",'url(#dropshadow)')
      -
      -fn = "svg_filter_line.svg"
      -print("Saving '%s'" % fn)
      -ET.ElementTree(tree).write(fn)
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/misc/svg_filter_line.py b/dev/examples/misc/svg_filter_line.py deleted file mode 100644 index 83acfa7994e..00000000000 --- a/dev/examples/misc/svg_filter_line.py +++ /dev/null @@ -1,86 +0,0 @@ -""" -Demonstrate SVG filtering effects which might be used with mpl. - -Note that the filtering effects are only effective if your svg rederer -support it. -""" - -from __future__ import print_function -import matplotlib - -matplotlib.use("Svg") - -import matplotlib.pyplot as plt -import matplotlib.transforms as mtransforms - -fig1 = plt.figure() -ax = fig1.add_axes([0.1, 0.1, 0.8, 0.8]) - -# draw lines -l1, = ax.plot([0.1, 0.5, 0.9], [0.1, 0.9, 0.5], "bo-", - mec="b", lw=5, ms=10, label="Line 1") -l2, = ax.plot([0.1, 0.5, 0.9], [0.5, 0.2, 0.7], "rs-", - mec="r", lw=5, ms=10, color="r", label="Line 2") - - -for l in [l1, l2]: - - # draw shadows with same lines with slight offset and gray colors. - - xx = l.get_xdata() - yy = l.get_ydata() - shadow, = ax.plot(xx, yy) - shadow.update_from(l) - - # adjust color - shadow.set_color("0.2") - # adjust zorder of the shadow lines so that it is drawn below the - # original lines - shadow.set_zorder(l.get_zorder()-0.5) - - # offset transform - ot = mtransforms.offset_copy(l.get_transform(), fig1, - x=4.0, y=-6.0, units='points') - - shadow.set_transform(ot) - - # set the id for a later use - shadow.set_gid(l.get_label()+"_shadow") - - -ax.set_xlim(0., 1.) -ax.set_ylim(0., 1.) - -# save the figure as a string in the svg format. -from StringIO import StringIO -f = StringIO() -plt.savefig(f, format="svg") - - -import xml.etree.cElementTree as ET - -# filter definition for a gaussian blur -filter_def = """ - - - - - -""" - - -# read in the saved svg -tree, xmlid = ET.XMLID(f.getvalue()) - -# insert the filter definition in the svg dom tree. -tree.insert(0, ET.XML(filter_def)) - -for l in [l1, l2]: - # pick up the svg element with given id - shadow = xmlid[l.get_label()+"_shadow"] - # apply shdow filter - shadow.set("filter",'url(#dropshadow)') - -fn = "svg_filter_line.svg" -print("Saving '%s'" % fn) -ET.ElementTree(tree).write(fn) diff --git a/dev/examples/misc/svg_filter_pie.html b/dev/examples/misc/svg_filter_pie.html deleted file mode 100644 index dd122d92796..00000000000 --- a/dev/examples/misc/svg_filter_pie.html +++ /dev/null @@ -1,242 +0,0 @@ - - - - - - - - misc example code: svg_filter_pie.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      misc example code: svg_filter_pie.py

      -

      [source code]

      -
      """
      -Demonstrate SVG filtering effects which might be used with mpl.
      -The pie chart drawing code is borrowed from pie_demo.py
      -
      -Note that the filtering effects are only effective if your svg rederer
      -support it.
      -"""
      -
      -
      -import matplotlib
      -matplotlib.use("Svg")
      -
      -import matplotlib.pyplot as plt
      -from matplotlib.patches import Shadow
      -
      -# make a square figure and axes
      -fig1 = plt.figure(1, figsize=(6,6))
      -ax = fig1.add_axes([0.1, 0.1, 0.8, 0.8])
      -
      -labels = 'Frogs', 'Hogs', 'Dogs', 'Logs'
      -fracs = [15,30,45, 10]
      -
      -explode=(0, 0.05, 0, 0)
      -
      -# We want to draw the shadow for each pie but we will not use "shadow"
      -# option as it does'n save the references to the shadow patches.
      -pies = ax.pie(fracs, explode=explode, labels=labels, autopct='%1.1f%%')
      -
      -for w in pies[0]:
      -    # set the id with the label.
      -    w.set_gid(w.get_label())
      -
      -    # we don't want to draw the edge of the pie
      -    w.set_ec("none")
      -
      -for w in pies[0]:
      -    # create shadow patch
      -    s = Shadow(w, -0.01, -0.01)
      -    s.set_gid(w.get_gid()+"_shadow")
      -    s.set_zorder(w.get_zorder() - 0.1)
      -    ax.add_patch(s)
      -
      -
      -# save
      -from StringIO import StringIO
      -f = StringIO()
      -plt.savefig(f, format="svg")
      -
      -import xml.etree.cElementTree as ET
      -
      -
      -# filter definition for shadow using a gaussian blur
      -# and lighteneing effect.
      -# The lightnening filter is copied from http://www.w3.org/TR/SVG/filters.html
      -
      -# I tested it with Inkscape and Firefox3. "Gaussian blur" is supported
      -# in both, but the lightnening effect only in the inkscape. Also note
      -# that, inkscape's exporting also may not support it.
      -
      -filter_def = """
      -  <defs  xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'>
      -    <filter id='dropshadow' height='1.2' width='1.2'>
      -      <feGaussianBlur result='blur' stdDeviation='2'/>
      -    </filter>
      -
      -    <filter id='MyFilter' filterUnits='objectBoundingBox' x='0' y='0' width='1' height='1'>
      -      <feGaussianBlur in='SourceAlpha' stdDeviation='4%' result='blur'/>
      -      <feOffset in='blur' dx='4%' dy='4%' result='offsetBlur'/>
      -      <feSpecularLighting in='blur' surfaceScale='5' specularConstant='.75'
      -           specularExponent='20' lighting-color='#bbbbbb' result='specOut'>
      -        <fePointLight x='-5000%' y='-10000%' z='20000%'/>
      -      </feSpecularLighting>
      -      <feComposite in='specOut' in2='SourceAlpha' operator='in' result='specOut'/>
      -      <feComposite in='SourceGraphic' in2='specOut' operator='arithmetic'
      -    k1='0' k2='1' k3='1' k4='0'/>
      -    </filter>
      -  </defs>
      -"""
      -
      -
      -tree, xmlid = ET.XMLID(f.getvalue())
      -
      -# insert the filter definition in the svg dom tree.
      -tree.insert(0, ET.XML(filter_def))
      -
      -for i, pie_name in enumerate(labels):
      -    pie = xmlid[pie_name]
      -    pie.set("filter", 'url(#MyFilter)')
      -
      -    shadow = xmlid[pie_name + "_shadow"]
      -    shadow.set("filter",'url(#dropshadow)')
      -
      -fn = "svg_filter_pie.svg"
      -print "Saving '%s'" % fn
      -ET.ElementTree(tree).write(fn)
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/misc/svg_filter_pie.py b/dev/examples/misc/svg_filter_pie.py deleted file mode 100644 index 088a8b1fd35..00000000000 --- a/dev/examples/misc/svg_filter_pie.py +++ /dev/null @@ -1,95 +0,0 @@ -""" -Demonstrate SVG filtering effects which might be used with mpl. -The pie chart drawing code is borrowed from pie_demo.py - -Note that the filtering effects are only effective if your svg rederer -support it. -""" - - -import matplotlib -matplotlib.use("Svg") - -import matplotlib.pyplot as plt -from matplotlib.patches import Shadow - -# make a square figure and axes -fig1 = plt.figure(1, figsize=(6,6)) -ax = fig1.add_axes([0.1, 0.1, 0.8, 0.8]) - -labels = 'Frogs', 'Hogs', 'Dogs', 'Logs' -fracs = [15,30,45, 10] - -explode=(0, 0.05, 0, 0) - -# We want to draw the shadow for each pie but we will not use "shadow" -# option as it does'n save the references to the shadow patches. -pies = ax.pie(fracs, explode=explode, labels=labels, autopct='%1.1f%%') - -for w in pies[0]: - # set the id with the label. - w.set_gid(w.get_label()) - - # we don't want to draw the edge of the pie - w.set_ec("none") - -for w in pies[0]: - # create shadow patch - s = Shadow(w, -0.01, -0.01) - s.set_gid(w.get_gid()+"_shadow") - s.set_zorder(w.get_zorder() - 0.1) - ax.add_patch(s) - - -# save -from StringIO import StringIO -f = StringIO() -plt.savefig(f, format="svg") - -import xml.etree.cElementTree as ET - - -# filter definition for shadow using a gaussian blur -# and lighteneing effect. -# The lightnening filter is copied from http://www.w3.org/TR/SVG/filters.html - -# I tested it with Inkscape and Firefox3. "Gaussian blur" is supported -# in both, but the lightnening effect only in the inkscape. Also note -# that, inkscape's exporting also may not support it. - -filter_def = """ - - - - - - - - - - - - - - - -""" - - -tree, xmlid = ET.XMLID(f.getvalue()) - -# insert the filter definition in the svg dom tree. -tree.insert(0, ET.XML(filter_def)) - -for i, pie_name in enumerate(labels): - pie = xmlid[pie_name] - pie.set("filter", 'url(#MyFilter)') - - shadow = xmlid[pie_name + "_shadow"] - shadow.set("filter",'url(#dropshadow)') - -fn = "svg_filter_pie.svg" -print "Saving '%s'" % fn -ET.ElementTree(tree).write(fn) diff --git a/dev/examples/misc/tight_bbox_test.html b/dev/examples/misc/tight_bbox_test.html deleted file mode 100644 index dd1b163eece..00000000000 --- a/dev/examples/misc/tight_bbox_test.html +++ /dev/null @@ -1,162 +0,0 @@ - - - - - - - - misc example code: tight_bbox_test.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      misc example code: tight_bbox_test.py

      -

      [source code]

      -
      from __future__ import print_function
      -import matplotlib.pyplot as plt
      -import numpy as np
      -
      -ax = plt.axes([0.1, 0.3, 0.5, 0.5])
      -
      -ax.pcolormesh(np.array([[1,2],[3,4]]))
      -plt.yticks([0.5, 1.5], ["long long tick label",
      -                        "tick label"])
      -plt.ylabel("My y-label")
      -plt.title("Check saved figures for their bboxes")
      -for ext in ["png", "pdf", "svg", "svgz", "eps"]:
      -    print("saving tight_bbox_test.%s" % (ext,))
      -    plt.savefig("tight_bbox_test.%s" % (ext,), bbox_inches="tight")
      -plt.show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/misc/tight_bbox_test.py b/dev/examples/misc/tight_bbox_test.py deleted file mode 100644 index 30127d611b5..00000000000 --- a/dev/examples/misc/tight_bbox_test.py +++ /dev/null @@ -1,15 +0,0 @@ -from __future__ import print_function -import matplotlib.pyplot as plt -import numpy as np - -ax = plt.axes([0.1, 0.3, 0.5, 0.5]) - -ax.pcolormesh(np.array([[1,2],[3,4]])) -plt.yticks([0.5, 1.5], ["long long tick label", - "tick label"]) -plt.ylabel("My y-label") -plt.title("Check saved figures for their bboxes") -for ext in ["png", "pdf", "svg", "svgz", "eps"]: - print("saving tight_bbox_test.%s" % (ext,)) - plt.savefig("tight_bbox_test.%s" % (ext,), bbox_inches="tight") -plt.show() diff --git a/dev/examples/mplot3d/2dcollections3d_demo.html b/dev/examples/mplot3d/2dcollections3d_demo.html deleted file mode 100644 index c7edfcb5d81..00000000000 --- a/dev/examples/mplot3d/2dcollections3d_demo.html +++ /dev/null @@ -1,173 +0,0 @@ - - - - - - - - mplot3d example code: 2dcollections3d_demo.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      mplot3d example code: 2dcollections3d_demo.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/2dcollections3d_demo.png -
      -
      from mpl_toolkits.mplot3d import Axes3D
      -import numpy as np
      -import matplotlib.pyplot as plt
      -
      -fig = plt.figure()
      -ax = fig.gca(projection='3d')
      -
      -x = np.linspace(0, 1, 100)
      -y = np.sin(x * 2 * np.pi) / 2 + 0.5
      -ax.plot(x, y, zs=0, zdir='z', label='zs=0, zdir=z')
      -
      -colors = ('r', 'g', 'b', 'k')
      -for c in colors:
      -    x = np.random.sample(20)
      -    y = np.random.sample(20)
      -    ax.scatter(x, y, 0, zdir='y', c=c)
      -
      -ax.legend()
      -ax.set_xlim3d(0, 1)
      -ax.set_ylim3d(0, 1)
      -ax.set_zlim3d(0, 1)
      -
      -plt.show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/mplot3d/bars3d_demo.html b/dev/examples/mplot3d/bars3d_demo.html deleted file mode 100644 index 66ca0725cf7..00000000000 --- a/dev/examples/mplot3d/bars3d_demo.html +++ /dev/null @@ -1,171 +0,0 @@ - - - - - - - - mplot3d example code: bars3d_demo.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      mplot3d example code: bars3d_demo.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/bars3d_demo.png -
      -
      from mpl_toolkits.mplot3d import Axes3D
      -import matplotlib.pyplot as plt
      -import numpy as np
      -
      -fig = plt.figure()
      -ax = fig.add_subplot(111, projection='3d')
      -for c, z in zip(['r', 'g', 'b', 'y'], [30, 20, 10, 0]):
      -    xs = np.arange(20)
      -    ys = np.random.rand(20)
      -
      -    # You can provide either a single color or an array. To demonstrate this,
      -    # the first bar of each set will be colored cyan.
      -    cs = [c] * len(xs)
      -    cs[0] = 'c'
      -    ax.bar(xs, ys, zs=z, zdir='y', color=cs, alpha=0.8)
      -
      -ax.set_xlabel('X')
      -ax.set_ylabel('Y')
      -ax.set_zlabel('Z')
      -
      -plt.show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/mplot3d/contour3d_demo.html b/dev/examples/mplot3d/contour3d_demo.html deleted file mode 100644 index bddc36fd0c5..00000000000 --- a/dev/examples/mplot3d/contour3d_demo.html +++ /dev/null @@ -1,161 +0,0 @@ - - - - - - - - mplot3d example code: contour3d_demo.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      mplot3d example code: contour3d_demo.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/contour3d_demo.png -
      -
      from mpl_toolkits.mplot3d import axes3d
      -import matplotlib.pyplot as plt
      -from matplotlib import cm
      -
      -fig = plt.figure()
      -ax = fig.add_subplot(111, projection='3d')
      -X, Y, Z = axes3d.get_test_data(0.05)
      -cset = ax.contour(X, Y, Z, cmap=cm.coolwarm)
      -ax.clabel(cset, fontsize=9, inline=1)
      -
      -plt.show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/mplot3d/contour3d_demo2.html b/dev/examples/mplot3d/contour3d_demo2.html deleted file mode 100644 index d823978cecd..00000000000 --- a/dev/examples/mplot3d/contour3d_demo2.html +++ /dev/null @@ -1,158 +0,0 @@ - - - - - - - - mplot3d example code: contour3d_demo2.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      mplot3d example code: contour3d_demo2.py

      -

      (Source code)

      -
      from mpl_toolkits.mplot3d import axes3d
      -import matplotlib.pyplot as plt
      -from matplotlib import cm
      -
      -fig = plt.figure()
      -ax = fig.gca(projection='3d')
      -X, Y, Z = axes3d.get_test_data(0.05)
      -cset = ax.contour(X, Y, Z, extend3d=True, cmap=cm.coolwarm)
      -ax.clabel(cset, fontsize=9, inline=1)
      -
      -plt.show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/mplot3d/contour3d_demo3.html b/dev/examples/mplot3d/contour3d_demo3.html deleted file mode 100644 index 37f76ff2e13..00000000000 --- a/dev/examples/mplot3d/contour3d_demo3.html +++ /dev/null @@ -1,170 +0,0 @@ - - - - - - - - mplot3d example code: contour3d_demo3.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      mplot3d example code: contour3d_demo3.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/contour3d_demo3.png -
      -
      from mpl_toolkits.mplot3d import axes3d
      -import matplotlib.pyplot as plt
      -from matplotlib import cm
      -
      -fig = plt.figure()
      -ax = fig.gca(projection='3d')
      -X, Y, Z = axes3d.get_test_data(0.05)
      -ax.plot_surface(X, Y, Z, rstride=8, cstride=8, alpha=0.3)
      -cset = ax.contour(X, Y, Z, zdir='z', offset=-100, cmap=cm.coolwarm)
      -cset = ax.contour(X, Y, Z, zdir='x', offset=-40, cmap=cm.coolwarm)
      -cset = ax.contour(X, Y, Z, zdir='y', offset=40, cmap=cm.coolwarm)
      -
      -ax.set_xlabel('X')
      -ax.set_xlim(-40, 40)
      -ax.set_ylabel('Y')
      -ax.set_ylim(-40, 40)
      -ax.set_zlabel('Z')
      -ax.set_zlim(-100, 100)
      -
      -plt.show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/mplot3d/contourf3d_demo.html b/dev/examples/mplot3d/contourf3d_demo.html deleted file mode 100644 index a1dad3d0467..00000000000 --- a/dev/examples/mplot3d/contourf3d_demo.html +++ /dev/null @@ -1,161 +0,0 @@ - - - - - - - - mplot3d example code: contourf3d_demo.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      mplot3d example code: contourf3d_demo.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/contourf3d_demo.png -
      -
      from mpl_toolkits.mplot3d import axes3d
      -import matplotlib.pyplot as plt
      -from matplotlib import cm
      -
      -fig = plt.figure()
      -ax = fig.gca(projection='3d')
      -X, Y, Z = axes3d.get_test_data(0.05)
      -cset = ax.contourf(X, Y, Z, cmap=cm.coolwarm)
      -ax.clabel(cset, fontsize=9, inline=1)
      -
      -plt.show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/mplot3d/contourf3d_demo2.html b/dev/examples/mplot3d/contourf3d_demo2.html deleted file mode 100644 index 060da89b07c..00000000000 --- a/dev/examples/mplot3d/contourf3d_demo2.html +++ /dev/null @@ -1,175 +0,0 @@ - - - - - - - - mplot3d example code: contourf3d_demo2.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      mplot3d example code: contourf3d_demo2.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/contourf3d_demo2.png -
      -
      """
      -.. versionadded:: 1.1.0
      -   This demo depends on new features added to contourf3d.
      -"""
      -
      -from mpl_toolkits.mplot3d import axes3d
      -import matplotlib.pyplot as plt
      -from matplotlib import cm
      -
      -fig = plt.figure()
      -ax = fig.gca(projection='3d')
      -X, Y, Z = axes3d.get_test_data(0.05)
      -ax.plot_surface(X, Y, Z, rstride=8, cstride=8, alpha=0.3)
      -cset = ax.contourf(X, Y, Z, zdir='z', offset=-100, cmap=cm.coolwarm)
      -cset = ax.contourf(X, Y, Z, zdir='x', offset=-40, cmap=cm.coolwarm)
      -cset = ax.contourf(X, Y, Z, zdir='y', offset=40, cmap=cm.coolwarm)
      -
      -ax.set_xlabel('X')
      -ax.set_xlim(-40, 40)
      -ax.set_ylabel('Y')
      -ax.set_ylim(-40, 40)
      -ax.set_zlabel('Z')
      -ax.set_zlim(-100, 100)
      -
      -plt.show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/mplot3d/hist3d_demo.html b/dev/examples/mplot3d/hist3d_demo.html deleted file mode 100644 index 2b7ee85718e..00000000000 --- a/dev/examples/mplot3d/hist3d_demo.html +++ /dev/null @@ -1,172 +0,0 @@ - - - - - - - - mplot3d example code: hist3d_demo.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      mplot3d example code: hist3d_demo.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/hist3d_demo.png -
      -
      from mpl_toolkits.mplot3d import Axes3D
      -import matplotlib.pyplot as plt
      -import numpy as np
      -
      -fig = plt.figure()
      -ax = fig.add_subplot(111, projection='3d')
      -x, y = np.random.rand(2, 100) * 4
      -hist, xedges, yedges = np.histogram2d(x, y, bins=4)
      -
      -elements = (len(xedges) - 1) * (len(yedges) - 1)
      -xpos, ypos = np.meshgrid(xedges[:-1]+0.25, yedges[:-1]+0.25)
      -
      -xpos = xpos.flatten()
      -ypos = ypos.flatten()
      -zpos = np.zeros(elements)
      -dx = 0.5 * np.ones_like(zpos)
      -dy = dx.copy()
      -dz = hist.flatten()
      -
      -ax.bar3d(xpos, ypos, zpos, dx, dy, dz, color='b', zsort='average')
      -
      -plt.show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/mplot3d/index.html b/dev/examples/mplot3d/index.html deleted file mode 100644 index 943a0196766..00000000000 --- a/dev/examples/mplot3d/index.html +++ /dev/null @@ -1,183 +0,0 @@ - - - - - - - - mplot3d Examples — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - - - - - - \ No newline at end of file diff --git a/dev/examples/mplot3d/lines3d_demo.html b/dev/examples/mplot3d/lines3d_demo.html deleted file mode 100644 index 6926a7ff7a6..00000000000 --- a/dev/examples/mplot3d/lines3d_demo.html +++ /dev/null @@ -1,168 +0,0 @@ - - - - - - - - mplot3d example code: lines3d_demo.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      mplot3d example code: lines3d_demo.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/lines3d_demo.png -
      -
      import matplotlib as mpl
      -from mpl_toolkits.mplot3d import Axes3D
      -import numpy as np
      -import matplotlib.pyplot as plt
      -
      -mpl.rcParams['legend.fontsize'] = 10
      -
      -fig = plt.figure()
      -ax = fig.gca(projection='3d')
      -theta = np.linspace(-4 * np.pi, 4 * np.pi, 100)
      -z = np.linspace(-2, 2, 100)
      -r = z**2 + 1
      -x = r * np.sin(theta)
      -y = r * np.cos(theta)
      -ax.plot(x, y, z, label='parametric curve')
      -ax.legend()
      -
      -plt.show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/mplot3d/lorenz_attractor.html b/dev/examples/mplot3d/lorenz_attractor.html deleted file mode 100644 index 1cdfe63b9ba..00000000000 --- a/dev/examples/mplot3d/lorenz_attractor.html +++ /dev/null @@ -1,199 +0,0 @@ - - - - - - - - mplot3d example code: lorenz_attractor.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      mplot3d example code: lorenz_attractor.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/lorenz_attractor.png -
      -
      # Plot of the Lorenz Attractor based on Edward Lorenz's 1963 "Deterministic
      -# Nonperiodic Flow" publication.
      -# http://journals.ametsoc.org/doi/abs/10.1175/1520-0469%281963%29020%3C0130%3ADNF%3E2.0.CO%3B2
      -#
      -# Note: Because this is a simple non-linear ODE, it would be more easily
      -#       done using SciPy's ode solver, but this approach depends only
      -#       upon NumPy.
      -
      -import numpy as np
      -import matplotlib.pyplot as plt
      -from mpl_toolkits.mplot3d import Axes3D
      -
      -
      -def lorenz(x, y, z, s=10, r=28, b=2.667) :
      -    x_dot = s*(y - x)
      -    y_dot = r*x - y - x*z
      -    z_dot = x*y - b*z
      -    return x_dot, y_dot, z_dot
      -
      -
      -dt = 0.01
      -stepCnt = 10000
      -
      -# Need one more for the initial values
      -xs = np.empty((stepCnt + 1,))
      -ys = np.empty((stepCnt + 1,))
      -zs = np.empty((stepCnt + 1,))
      -
      -# Setting initial values
      -xs[0], ys[0], zs[0] = (0., 1., 1.05)
      -
      -# Stepping through "time".
      -for i in range(stepCnt) :
      -    # Derivatives of the X, Y, Z state
      -    x_dot, y_dot, z_dot = lorenz(xs[i], ys[i], zs[i])
      -    xs[i + 1] = xs[i] + (x_dot * dt)
      -    ys[i + 1] = ys[i] + (y_dot * dt)
      -    zs[i + 1] = zs[i] + (z_dot * dt)
      -
      -fig = plt.figure()
      -ax = fig.gca(projection='3d')
      -
      -ax.plot(xs, ys, zs)
      -ax.set_xlabel("X Axis")
      -ax.set_ylabel("Y Axis")
      -ax.set_zlabel("Z Axis")
      -ax.set_title("Lorenz Attractor")
      -
      -plt.show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/mplot3d/mixed_subplots_demo.html b/dev/examples/mplot3d/mixed_subplots_demo.html deleted file mode 100644 index f58bacd5db9..00000000000 --- a/dev/examples/mplot3d/mixed_subplots_demo.html +++ /dev/null @@ -1,198 +0,0 @@ - - - - - - - - mplot3d example code: mixed_subplots_demo.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      mplot3d example code: mixed_subplots_demo.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/mixed_subplots_demo.png -
      -
      """
      -Demonstrate the mixing of 2d and 3d subplots
      -"""
      -from mpl_toolkits.mplot3d import Axes3D
      -import matplotlib.pyplot as plt
      -import numpy as np
      -
      -def f(t):
      -    s1 = np.cos(2*np.pi*t)
      -    e1 = np.exp(-t)
      -    return np.multiply(s1,e1)
      -
      -
      -################
      -# First subplot
      -################
      -t1 = np.arange(0.0, 5.0, 0.1)
      -t2 = np.arange(0.0, 5.0, 0.02)
      -t3 = np.arange(0.0, 2.0, 0.01)
      -
      -# Twice as tall as it is wide.
      -fig = plt.figure(figsize=plt.figaspect(2.))
      -fig.suptitle('A tale of 2 subplots')
      -ax = fig.add_subplot(2, 1, 1)
      -l = ax.plot(t1, f(t1), 'bo',
      -            t2, f(t2), 'k--', markerfacecolor='green')
      -ax.grid(True)
      -ax.set_ylabel('Damped oscillation')
      -
      -
      -#################
      -# Second subplot
      -#################
      -ax = fig.add_subplot(2, 1, 2, projection='3d')
      -X = np.arange(-5, 5, 0.25)
      -xlen = len(X)
      -Y = np.arange(-5, 5, 0.25)
      -ylen = len(Y)
      -X, Y = np.meshgrid(X, Y)
      -R = np.sqrt(X**2 + Y**2)
      -Z = np.sin(R)
      -
      -surf = ax.plot_surface(X, Y, Z, rstride=1, cstride=1,
      -        linewidth=0, antialiased=False)
      -
      -ax.set_zlim3d(-1, 1)
      -
      -plt.show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/mplot3d/offset_demo.html b/dev/examples/mplot3d/offset_demo.html deleted file mode 100644 index b9bcbd08c9d..00000000000 --- a/dev/examples/mplot3d/offset_demo.html +++ /dev/null @@ -1,175 +0,0 @@ - - - - - - - - mplot3d example code: offset_demo.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      mplot3d example code: offset_demo.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/offset_demo.png -
      -
      from mpl_toolkits.mplot3d import Axes3D
      -import matplotlib.pyplot as plt
      -import numpy as np
      -
      -# This example demonstrates mplot3d's offset text display.
      -# As one rotates the 3D figure, the offsets should remain oriented
      -# same way as the axis label, and should also be located "away"
      -# from the center of the plot.
      -#
      -# This demo triggers the display of the offset text for the x and
      -# y axis by adding 1e5 to X and Y. Anything less would not
      -# automatically trigger it.
      -
      -fig = plt.figure()
      -ax = fig.gca(projection='3d')
      -X, Y = np.mgrid[0:6*np.pi:0.25, 0:4*np.pi:0.25]
      -Z = np.sqrt(np.abs(np.cos(X) + np.cos(Y)))
      -
      -surf = ax.plot_surface(X + 1e5, Y + 1e5, Z, cmap='autumn', cstride=2, rstride=2)
      -ax.set_xlabel("X-Label")
      -ax.set_ylabel("Y-Label")
      -ax.set_zlabel("Z-Label")
      -ax.set_zlim(0, 2)
      -
      -plt.show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/mplot3d/pathpatch3d_demo.html b/dev/examples/mplot3d/pathpatch3d_demo.html deleted file mode 100644 index 34e14174bd0..00000000000 --- a/dev/examples/mplot3d/pathpatch3d_demo.html +++ /dev/null @@ -1,203 +0,0 @@ - - - - - - - - mplot3d example code: pathpatch3d_demo.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      mplot3d example code: pathpatch3d_demo.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/pathpatch3d_demo.png -
      -
      import matplotlib.pyplot as plt
      -from matplotlib.patches import Circle, PathPatch
      -# register Axes3D class with matplotlib by importing Axes3D
      -from mpl_toolkits.mplot3d import Axes3D
      -import mpl_toolkits.mplot3d.art3d as art3d
      -from matplotlib.text import TextPath
      -from matplotlib.transforms import Affine2D
      -
      -
      -def text3d(ax, xyz, s, zdir="z", size=None, angle=0, usetex=False, **kwargs):
      -
      -    x, y, z = xyz
      -    if zdir == "y":
      -        xy1, z1 = (x, z), y
      -    elif zdir == "y":
      -        xy1, z1 = (y, z), x
      -    else:
      -        xy1, z1 = (x, y), z
      -
      -    text_path = TextPath((0, 0), s, size=size, usetex=usetex)
      -    trans = Affine2D().rotate(angle).translate(xy1[0], xy1[1])
      -
      -    p1 = PathPatch(trans.transform_path(text_path), **kwargs)
      -    ax.add_patch(p1)
      -    art3d.pathpatch_2d_to_3d(p1, z=z1, zdir=zdir)
      -
      -
      -fig = plt.figure()
      -ax = fig.add_subplot(111, projection='3d')
      -
      -p = Circle((5, 5), 3)
      -ax.add_patch(p)
      -art3d.pathpatch_2d_to_3d(p, z=0, zdir="x")
      -
      -
      -text3d(ax, (4, -2, 0), "X-axis", zdir="z", size=.5, usetex=False,
      -       ec="none", fc="k")
      -text3d(ax, (12, 4, 0), "Y-axis", zdir="z", size=.5, usetex=False,
      -       angle=.5*3.14159, ec="none", fc="k")
      -text3d(ax, (12, 10, 4), "Z-axis", zdir="y", size=.5, usetex=False,
      -       angle=.5*3.14159, ec="none", fc="k")
      -
      -text3d(ax, (1, 5, 0),
      -       r"$\displaystyle G_{\mu\nu} + \Lambda g_{\mu\nu} = "
      -       r"\frac{8\pi G}{c^4} T_{\mu\nu}  $",
      -       zdir="z", size=1, usetex=True,
      -       ec="none", fc="k")
      -
      -ax.set_xlim3d(0, 10)
      -ax.set_ylim3d(0, 10)
      -ax.set_zlim3d(0, 10)
      -
      -plt.show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/mplot3d/polys3d_demo.html b/dev/examples/mplot3d/polys3d_demo.html deleted file mode 100644 index 3917dc3f69a..00000000000 --- a/dev/examples/mplot3d/polys3d_demo.html +++ /dev/null @@ -1,182 +0,0 @@ - - - - - - - - mplot3d example code: polys3d_demo.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      mplot3d example code: polys3d_demo.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/polys3d_demo.png -
      -
      from mpl_toolkits.mplot3d import Axes3D
      -from matplotlib.collections import PolyCollection
      -from matplotlib.colors import colorConverter
      -import matplotlib.pyplot as plt
      -import numpy as np
      -
      -fig = plt.figure()
      -ax = fig.gca(projection='3d')
      -
      -cc = lambda arg: colorConverter.to_rgba(arg, alpha=0.6)
      -
      -xs = np.arange(0, 10, 0.4)
      -verts = []
      -zs = [0.0, 1.0, 2.0, 3.0]
      -for z in zs:
      -    ys = np.random.rand(len(xs))
      -    ys[0], ys[-1] = 0, 0
      -    verts.append(list(zip(xs, ys)))
      -
      -poly = PolyCollection(verts, facecolors = [cc('r'), cc('g'), cc('b'),
      -                                           cc('y')])
      -poly.set_alpha(0.7)
      -ax.add_collection3d(poly, zs=zs, zdir='y')
      -
      -ax.set_xlabel('X')
      -ax.set_xlim3d(0, 10)
      -ax.set_ylabel('Y')
      -ax.set_ylim3d(-1, 4)
      -ax.set_zlabel('Z')
      -ax.set_zlim3d(0, 1)
      -
      -plt.show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/mplot3d/rotate_axes3d_demo.html b/dev/examples/mplot3d/rotate_axes3d_demo.html deleted file mode 100644 index a8467bcd89b..00000000000 --- a/dev/examples/mplot3d/rotate_axes3d_demo.html +++ /dev/null @@ -1,164 +0,0 @@ - - - - - - - - mplot3d example code: rotate_axes3d_demo.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      mplot3d example code: rotate_axes3d_demo.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/rotate_axes3d_demo.png -
      -
      from mpl_toolkits.mplot3d import axes3d
      -import matplotlib.pyplot as plt
      -import numpy as np
      -
      -plt.ion()
      -
      -fig = plt.figure()
      -ax = fig.add_subplot(111, projection='3d')
      -X, Y, Z = axes3d.get_test_data(0.1)
      -ax.plot_wireframe(X, Y, Z, rstride=5, cstride=5)
      -
      -for angle in range(0, 360):
      -    ax.view_init(30, angle)
      -    plt.draw()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/mplot3d/scatter3d_demo.html b/dev/examples/mplot3d/scatter3d_demo.html deleted file mode 100644 index b78d027b0e1..00000000000 --- a/dev/examples/mplot3d/scatter3d_demo.html +++ /dev/null @@ -1,171 +0,0 @@ - - - - - - - - mplot3d example code: scatter3d_demo.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      mplot3d example code: scatter3d_demo.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/scatter3d_demo.png -
      -
      import numpy as np
      -from mpl_toolkits.mplot3d import Axes3D
      -import matplotlib.pyplot as plt
      -
      -def randrange(n, vmin, vmax):
      -    return (vmax-vmin)*np.random.rand(n) + vmin
      -
      -fig = plt.figure()
      -ax = fig.add_subplot(111, projection='3d')
      -n = 100
      -for c, m, zl, zh in [('r', 'o', -50, -25), ('b', '^', -30, -5)]:
      -    xs = randrange(n, 23, 32)
      -    ys = randrange(n, 0, 100)
      -    zs = randrange(n, zl, zh)
      -    ax.scatter(xs, ys, zs, c=c, marker=m)
      -
      -ax.set_xlabel('X Label')
      -ax.set_ylabel('Y Label')
      -ax.set_zlabel('Z Label')
      -
      -plt.show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/mplot3d/subplot3d_demo.html b/dev/examples/mplot3d/subplot3d_demo.html deleted file mode 100644 index 76dae643526..00000000000 --- a/dev/examples/mplot3d/subplot3d_demo.html +++ /dev/null @@ -1,181 +0,0 @@ - - - - - - - - mplot3d example code: subplot3d_demo.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      mplot3d example code: subplot3d_demo.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/subplot3d_demo.png -
      -
      from mpl_toolkits.mplot3d.axes3d import Axes3D
      -import matplotlib.pyplot as plt
      -
      -
      -# imports specific to the plots in this example
      -import numpy as np
      -from matplotlib import cm
      -from mpl_toolkits.mplot3d.axes3d import get_test_data
      -
      -# Twice as wide as it is tall.
      -fig = plt.figure(figsize=plt.figaspect(0.5))
      -
      -#---- First subplot
      -ax = fig.add_subplot(1, 2, 1, projection='3d')
      -X = np.arange(-5, 5, 0.25)
      -Y = np.arange(-5, 5, 0.25)
      -X, Y = np.meshgrid(X, Y)
      -R = np.sqrt(X**2 + Y**2)
      -Z = np.sin(R)
      -surf = ax.plot_surface(X, Y, Z, rstride=1, cstride=1, cmap=cm.coolwarm,
      -        linewidth=0, antialiased=False)
      -ax.set_zlim3d(-1.01, 1.01)
      -
      -fig.colorbar(surf, shrink=0.5, aspect=10)
      -
      -#---- Second subplot
      -ax = fig.add_subplot(1, 2, 2, projection='3d')
      -X, Y, Z = get_test_data(0.05)
      -ax.plot_wireframe(X, Y, Z, rstride=10, cstride=10)
      -
      -plt.show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/mplot3d/surface3d_demo.html b/dev/examples/mplot3d/surface3d_demo.html deleted file mode 100644 index a0475c4d477..00000000000 --- a/dev/examples/mplot3d/surface3d_demo.html +++ /dev/null @@ -1,173 +0,0 @@ - - - - - - - - mplot3d example code: surface3d_demo.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      mplot3d example code: surface3d_demo.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/surface3d_demo.png -
      -
      from mpl_toolkits.mplot3d import Axes3D
      -from matplotlib import cm
      -from matplotlib.ticker import LinearLocator, FormatStrFormatter
      -import matplotlib.pyplot as plt
      -import numpy as np
      -
      -fig = plt.figure()
      -ax = fig.gca(projection='3d')
      -X = np.arange(-5, 5, 0.25)
      -Y = np.arange(-5, 5, 0.25)
      -X, Y = np.meshgrid(X, Y)
      -R = np.sqrt(X**2 + Y**2)
      -Z = np.sin(R)
      -surf = ax.plot_surface(X, Y, Z, rstride=1, cstride=1, cmap=cm.coolwarm,
      -        linewidth=0, antialiased=False)
      -ax.set_zlim(-1.01, 1.01)
      -
      -ax.zaxis.set_major_locator(LinearLocator(10))
      -ax.zaxis.set_major_formatter(FormatStrFormatter('%.02f'))
      -
      -fig.colorbar(surf, shrink=0.5, aspect=5)
      -
      -plt.show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/mplot3d/surface3d_demo2.html b/dev/examples/mplot3d/surface3d_demo2.html deleted file mode 100644 index 8cf066a18fc..00000000000 --- a/dev/examples/mplot3d/surface3d_demo2.html +++ /dev/null @@ -1,166 +0,0 @@ - - - - - - - - mplot3d example code: surface3d_demo2.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      mplot3d example code: surface3d_demo2.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/surface3d_demo2.png -
      -
      from mpl_toolkits.mplot3d import Axes3D
      -import matplotlib.pyplot as plt
      -import numpy as np
      -
      -fig = plt.figure()
      -ax = fig.add_subplot(111, projection='3d')
      -
      -u = np.linspace(0, 2 * np.pi, 100)
      -v = np.linspace(0, np.pi, 100)
      -
      -x = 10 * np.outer(np.cos(u), np.sin(v))
      -y = 10 * np.outer(np.sin(u), np.sin(v))
      -z = 10 * np.outer(np.ones(np.size(u)), np.cos(v))
      -ax.plot_surface(x, y, z,  rstride=4, cstride=4, color='b')
      -
      -plt.show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/mplot3d/surface3d_demo3.html b/dev/examples/mplot3d/surface3d_demo3.html deleted file mode 100644 index 17c5b1d15b3..00000000000 --- a/dev/examples/mplot3d/surface3d_demo3.html +++ /dev/null @@ -1,176 +0,0 @@ - - - - - - - - mplot3d example code: surface3d_demo3.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      mplot3d example code: surface3d_demo3.py

      -

      (Source code)

      -
      from mpl_toolkits.mplot3d import Axes3D
      -from matplotlib import cm
      -from matplotlib.ticker import LinearLocator
      -import matplotlib.pyplot as plt
      -import numpy as np
      -
      -fig = plt.figure()
      -ax = fig.gca(projection='3d')
      -X = np.arange(-5, 5, 0.25)
      -xlen = len(X)
      -Y = np.arange(-5, 5, 0.25)
      -ylen = len(Y)
      -X, Y = np.meshgrid(X, Y)
      -R = np.sqrt(X**2 + Y**2)
      -Z = np.sin(R)
      -
      -colortuple = ('y', 'b')
      -colors = np.empty(X.shape, dtype=str)
      -for y in range(ylen):
      -    for x in range(xlen):
      -        colors[x, y] = colortuple[(x + y) % len(colortuple)]
      -
      -surf = ax.plot_surface(X, Y, Z, rstride=1, cstride=1, facecolors=colors,
      -        linewidth=0, antialiased=False)
      -
      -ax.set_zlim3d(-1, 1)
      -ax.w_zaxis.set_major_locator(LinearLocator(6))
      -
      -plt.show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/mplot3d/surface3d_radial_demo.html b/dev/examples/mplot3d/surface3d_radial_demo.html deleted file mode 100644 index 2f6da94b215..00000000000 --- a/dev/examples/mplot3d/surface3d_radial_demo.html +++ /dev/null @@ -1,176 +0,0 @@ - - - - - - - - mplot3d example code: surface3d_radial_demo.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      mplot3d example code: surface3d_radial_demo.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/surface3d_radial_demo.png -
      -
      # By Armin Moser
      -
      -from mpl_toolkits.mplot3d import Axes3D
      -import matplotlib
      -import numpy as np
      -from matplotlib import cm
      -from matplotlib import pyplot as plt
      -step = 0.04
      -maxval = 1.0
      -fig = plt.figure()
      -ax = fig.add_subplot(111, projection='3d')
      -
      -# create supporting points in polar coordinates
      -r = np.linspace(0,1.25,50)
      -p = np.linspace(0,2*np.pi,50)
      -R,P = np.meshgrid(r,p)
      -# transform them to cartesian system
      -X,Y = R*np.cos(P),R*np.sin(P)
      -
      -Z = ((R**2 - 1)**2)
      -ax.plot_surface(X, Y, Z, rstride=1, cstride=1, cmap=cm.YlGnBu_r)
      -ax.set_zlim3d(0, 1)
      -ax.set_xlabel(r'$\phi_\mathrm{real}$')
      -ax.set_ylabel(r'$\phi_\mathrm{im}$')
      -ax.set_zlabel(r'$V(\phi)$')
      -plt.show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/mplot3d/text3d_demo.html b/dev/examples/mplot3d/text3d_demo.html deleted file mode 100644 index 57c9af0a004..00000000000 --- a/dev/examples/mplot3d/text3d_demo.html +++ /dev/null @@ -1,177 +0,0 @@ - - - - - - - - mplot3d example code: text3d_demo.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      mplot3d example code: text3d_demo.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/text3d_demo.png -
      -
      from mpl_toolkits.mplot3d import Axes3D
      -import matplotlib.pyplot as plt
      -
      -fig = plt.figure()
      -ax = fig.gca(projection='3d')
      -
      -zdirs = (None, 'x', 'y', 'z', (1, 1, 0), (1, 1, 1))
      -xs = (2, 6, 4, 9, 7, 2)
      -ys = (6, 4, 8, 7, 2, 2)
      -zs = (4, 2, 5, 6, 1, 7)
      -
      -for zdir, x, y, z in zip(zdirs, xs, ys, zs):
      -    label = '(%d, %d, %d), dir=%s' % (x, y, z, zdir)
      -    ax.text(x, y, z, label, zdir)
      -
      -ax.text(1, 1, 1, "red", color='red')
      -ax.text2D(0.05, 0.95, "2D Text", transform=ax.transAxes)
      -
      -ax.set_xlim3d(0, 10)
      -ax.set_ylim3d(0, 10)
      -ax.set_zlim3d(0, 10)
      -
      -ax.set_xlabel('X axis')
      -ax.set_ylabel('Y axis')
      -ax.set_zlabel('Z axis')
      -
      -plt.show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/mplot3d/trisurf3d_demo.html b/dev/examples/mplot3d/trisurf3d_demo.html deleted file mode 100644 index e441e81130f..00000000000 --- a/dev/examples/mplot3d/trisurf3d_demo.html +++ /dev/null @@ -1,182 +0,0 @@ - - - - - - - - mplot3d example code: trisurf3d_demo.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      mplot3d example code: trisurf3d_demo.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/trisurf3d_demo.png -
      -
      from mpl_toolkits.mplot3d import Axes3D
      -from matplotlib import cm
      -import matplotlib.pyplot as plt
      -import numpy as np
      -
      -n_angles = 36
      -n_radii = 8
      -
      -# An array of radii
      -# Does not include radius r=0, this is to eliminate duplicate points
      -radii = np.linspace(0.125, 1.0, n_radii)
      -
      -# An array of angles
      -angles = np.linspace(0, 2*np.pi, n_angles, endpoint=False)
      -
      -# Repeat all angles for each radius
      -angles = np.repeat(angles[...,np.newaxis], n_radii, axis=1)
      -
      -# Convert polar (radii, angles) coords to cartesian (x, y) coords
      -# (0, 0) is added here. There are no duplicate points in the (x, y) plane
      -x = np.append(0, (radii*np.cos(angles)).flatten())
      -y = np.append(0, (radii*np.sin(angles)).flatten())
      -
      -# Pringle surface
      -z = np.sin(-x*y)
      -
      -fig = plt.figure()
      -ax = fig.gca(projection='3d')
      -
      -ax.plot_trisurf(x, y, z, cmap=cm.jet, linewidth=0.2)
      -
      -plt.show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/mplot3d/trisurf3d_demo2.html b/dev/examples/mplot3d/trisurf3d_demo2.html deleted file mode 100644 index cf931c31b6c..00000000000 --- a/dev/examples/mplot3d/trisurf3d_demo2.html +++ /dev/null @@ -1,210 +0,0 @@ - - - - - - - - mplot3d example code: trisurf3d_demo2.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      mplot3d example code: trisurf3d_demo2.py

      -

      (Source code)

      -
      -../../_images/trisurf3d_demo2_00.png -

      (png, hires.png, pdf)

      -
      -
      -../../_images/trisurf3d_demo2_01.png -

      (png, hires.png, pdf)

      -
      -
      import numpy as np
      -import matplotlib.pyplot as plt
      -from mpl_toolkits.mplot3d import Axes3D
      -import matplotlib.tri as mtri
      -
      -# u, v are parameterisation variables
      -u = (np.linspace(0, 2.0 * np.pi, endpoint=True, num=50) * np.ones((10, 1))).flatten()
      -v = np.repeat(np.linspace(-0.5, 0.5, endpoint=True, num=10), repeats=50).flatten()
      -
      -# This is the Mobius mapping, taking a u, v pair and returning an x, y, z
      -# triple
      -x = (1 + 0.5 * v * np.cos(u / 2.0)) * np.cos(u)
      -y = (1 + 0.5 * v * np.cos(u / 2.0)) * np.sin(u)
      -z = 0.5 * v * np.sin(u / 2.0)
      -
      -# Triangulate parameter space to determine the triangles
      -tri = mtri.Triangulation(u, v)
      -
      -fig = plt.figure()
      -ax = fig.add_subplot(1, 1, 1, projection='3d')
      -
      -# The triangles in parameter space determine which x, y, z points are
      -# connected by an edge
      -ax.plot_trisurf(x, y, z, triangles=tri.triangles, cmap=plt.cm.Spectral)
      -
      -ax.set_zlim(-1, 1)
      -
      -# First create the x and y coordinates of the points.
      -n_angles = 36
      -n_radii = 8
      -min_radius = 0.25
      -radii = np.linspace(min_radius, 0.95, n_radii)
      -
      -angles = np.linspace(0, 2*np.pi, n_angles, endpoint=False)
      -angles = np.repeat(angles[...,np.newaxis], n_radii, axis=1)
      -angles[:,1::2] += np.pi/n_angles
      -
      -x = (radii*np.cos(angles)).flatten()
      -y = (radii*np.sin(angles)).flatten()
      -z = (np.cos(radii)*np.cos(angles*3.0)).flatten()
      -
      -# Create the Triangulation; no triangles so Delaunay triangulation created.
      -triang = mtri.Triangulation(x, y)
      -
      -# Mask off unwanted triangles.
      -xmid = x[triang.triangles].mean(axis=1)
      -ymid = y[triang.triangles].mean(axis=1)
      -mask = np.where(xmid*xmid + ymid*ymid < min_radius*min_radius, 1, 0)
      -triang.set_mask(mask)
      -
      -# tripcolor plot.
      -fig = plt.figure()
      -ax = fig.add_subplot(1, 1, 1, projection='3d')
      -ax.plot_trisurf(triang, z, cmap=plt.cm.CMRmap)
      -plt.show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/mplot3d/wire3d_animation_demo.html b/dev/examples/mplot3d/wire3d_animation_demo.html deleted file mode 100644 index 7be4a990fa8..00000000000 --- a/dev/examples/mplot3d/wire3d_animation_demo.html +++ /dev/null @@ -1,188 +0,0 @@ - - - - - - - - mplot3d example code: wire3d_animation_demo.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      mplot3d example code: wire3d_animation_demo.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/wire3d_animation_demo.png -
      -
      from __future__ import print_function
      -"""
      -A very simple 'animation' of a 3D plot
      -"""
      -from mpl_toolkits.mplot3d import axes3d
      -import matplotlib.pyplot as plt
      -import numpy as np
      -import time
      -
      -def generate(X, Y, phi):
      -    R = 1 - np.sqrt(X**2 + Y**2)
      -    return np.cos(2 * np.pi * X + phi) * R
      -
      -plt.ion()
      -fig = plt.figure()
      -ax = fig.add_subplot(111, projection='3d')
      -
      -xs = np.linspace(-1, 1, 50)
      -ys = np.linspace(-1, 1, 50)
      -X, Y = np.meshgrid(xs, ys)
      -Z = generate(X, Y, 0.0)
      -
      -wframe = None
      -tstart = time.time()
      -for phi in np.linspace(0, 360 / 2 / np.pi, 100):
      -
      -    oldcol = wframe
      -
      -    Z = generate(X, Y, phi)
      -    wframe = ax.plot_wireframe(X, Y, Z, rstride=2, cstride=2)
      -
      -    # Remove old line collection before drawing
      -    if oldcol is not None:
      -        ax.collections.remove(oldcol)
      -
      -    plt.draw()
      -
      -print ('FPS: %f' % (100 / (time.time() - tstart)))
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/mplot3d/wire3d_demo.html b/dev/examples/mplot3d/wire3d_demo.html deleted file mode 100644 index 8f50160d6d5..00000000000 --- a/dev/examples/mplot3d/wire3d_demo.html +++ /dev/null @@ -1,160 +0,0 @@ - - - - - - - - mplot3d example code: wire3d_demo.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      mplot3d example code: wire3d_demo.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/wire3d_demo.png -
      -
      from mpl_toolkits.mplot3d import axes3d
      -import matplotlib.pyplot as plt
      -import numpy as np
      -
      -fig = plt.figure()
      -ax = fig.add_subplot(111, projection='3d')
      -X, Y, Z = axes3d.get_test_data(0.05)
      -ax.plot_wireframe(X, Y, Z, rstride=10, cstride=10)
      -
      -plt.show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/old_animation/animate_decay_tk_blit.html b/dev/examples/old_animation/animate_decay_tk_blit.html deleted file mode 100644 index 18b315a01cc..00000000000 --- a/dev/examples/old_animation/animate_decay_tk_blit.html +++ /dev/null @@ -1,206 +0,0 @@ - - - - - - - - old_animation example code: animate_decay_tk_blit.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      old_animation example code: animate_decay_tk_blit.py

      -

      [source code]

      -
      from __future__ import print_function
      -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 Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/old_animation/animate_decay_tk_blit.py b/dev/examples/old_animation/animate_decay_tk_blit.py deleted file mode 100644 index cae4c4a2b97..00000000000 --- a/dev/examples/old_animation/animate_decay_tk_blit.py +++ /dev/null @@ -1,59 +0,0 @@ -from __future__ import print_function -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() diff --git a/dev/examples/old_animation/animation_blit_fltk.html b/dev/examples/old_animation/animation_blit_fltk.html deleted file mode 100644 index 63be0571fd7..00000000000 --- a/dev/examples/old_animation/animation_blit_fltk.html +++ /dev/null @@ -1,202 +0,0 @@ - - - - - - - - old_animation example code: animation_blit_fltk.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      old_animation example code: animation_blit_fltk.py

      -

      [source code]

      -
      from __future__ import print_function
      -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 Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/old_animation/animation_blit_fltk.py b/dev/examples/old_animation/animation_blit_fltk.py deleted file mode 100644 index 9a178bc540f..00000000000 --- a/dev/examples/old_animation/animation_blit_fltk.py +++ /dev/null @@ -1,55 +0,0 @@ -from __future__ import print_function -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() diff --git a/dev/examples/old_animation/animation_blit_gtk.html b/dev/examples/old_animation/animation_blit_gtk.html deleted file mode 100644 index fcc3c88e1ee..00000000000 --- a/dev/examples/old_animation/animation_blit_gtk.html +++ /dev/null @@ -1,217 +0,0 @@ - - - - - - - - old_animation example code: animation_blit_gtk.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      old_animation example code: animation_blit_gtk.py

      -

      [source code]

      -
      #!/usr/bin/env python
      -
      -from __future__ import print_function
      -
      -# 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 update_line(*args):
      -    print('you are here', update_line.cnt)
      -    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(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
      -update_line.background = None
      -
      -
      -def start_anim(event):
      -    gobject.idle_add(update_line)
      -    canvas.mpl_disconnect(start_anim.cid)
      -
      -start_anim.cid = canvas.mpl_connect('draw_event', start_anim)
      -
      -
      -
      -plt.show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/old_animation/animation_blit_gtk.py b/dev/examples/old_animation/animation_blit_gtk.py deleted file mode 100644 index a13fed6d3ff..00000000000 --- a/dev/examples/old_animation/animation_blit_gtk.py +++ /dev/null @@ -1,70 +0,0 @@ -#!/usr/bin/env python - -from __future__ import print_function - -# 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 update_line(*args): - print('you are here', update_line.cnt) - 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(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 -update_line.background = None - - -def start_anim(event): - gobject.idle_add(update_line) - canvas.mpl_disconnect(start_anim.cid) - -start_anim.cid = canvas.mpl_connect('draw_event', start_anim) - - - -plt.show() diff --git a/dev/examples/old_animation/animation_blit_gtk2.html b/dev/examples/old_animation/animation_blit_gtk2.html deleted file mode 100644 index d10283fea7c..00000000000 --- a/dev/examples/old_animation/animation_blit_gtk2.html +++ /dev/null @@ -1,316 +0,0 @@ - - - - - - - - old_animation example code: animation_blit_gtk2.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      old_animation example code: animation_blit_gtk2.py

      -

      [source code]

      -
      #!/usr/bin/env python
      -
      -from __future__ import print_function
      -
      -"""
      -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 Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/old_animation/animation_blit_gtk2.py b/dev/examples/old_animation/animation_blit_gtk2.py deleted file mode 100644 index b15b1ab177a..00000000000 --- a/dev/examples/old_animation/animation_blit_gtk2.py +++ /dev/null @@ -1,169 +0,0 @@ -#!/usr/bin/env python - -from __future__ import print_function - -""" -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() diff --git a/dev/examples/old_animation/animation_blit_qt.html b/dev/examples/old_animation/animation_blit_qt.html deleted file mode 100644 index 6269eadae97..00000000000 --- a/dev/examples/old_animation/animation_blit_qt.html +++ /dev/null @@ -1,213 +0,0 @@ - - - - - - - - old_animation example code: animation_blit_qt.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      old_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
      -
      -from __future__ import print_function
      -
      -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 Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/old_animation/animation_blit_qt.py b/dev/examples/old_animation/animation_blit_qt.py deleted file mode 100644 index 272997315e9..00000000000 --- a/dev/examples/old_animation/animation_blit_qt.py +++ /dev/null @@ -1,66 +0,0 @@ -# For detailed comments on animation and the techniqes used here, see -# the wiki entry http://www.scipy.org/Cookbook/Matplotlib/Animations - -from __future__ import print_function - -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() diff --git a/dev/examples/old_animation/animation_blit_qt4.html b/dev/examples/old_animation/animation_blit_qt4.html deleted file mode 100644 index 65a147e0075..00000000000 --- a/dev/examples/old_animation/animation_blit_qt4.html +++ /dev/null @@ -1,224 +0,0 @@ - - - - - - - - old_animation example code: animation_blit_qt4.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      old_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
      -
      -from __future__ import print_function
      -
      -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 Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/old_animation/animation_blit_qt4.py b/dev/examples/old_animation/animation_blit_qt4.py deleted file mode 100644 index ae2b8450d00..00000000000 --- a/dev/examples/old_animation/animation_blit_qt4.py +++ /dev/null @@ -1,77 +0,0 @@ -# For detailed comments on animation and the techniqes used here, see -# the wiki entry http://www.scipy.org/Cookbook/Matplotlib/Animations - -from __future__ import print_function - -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_()) diff --git a/dev/examples/old_animation/animation_blit_tk.html b/dev/examples/old_animation/animation_blit_tk.html deleted file mode 100644 index e57dea40ca3..00000000000 --- a/dev/examples/old_animation/animation_blit_tk.html +++ /dev/null @@ -1,198 +0,0 @@ - - - - - - - - old_animation example code: animation_blit_tk.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      old_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
      -
      -from __future__ import print_function
      -
      -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 Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/old_animation/animation_blit_tk.py b/dev/examples/old_animation/animation_blit_tk.py deleted file mode 100644 index 54e288efd62..00000000000 --- a/dev/examples/old_animation/animation_blit_tk.py +++ /dev/null @@ -1,54 +0,0 @@ -# For detailed comments on animation and the techniqes used here, see -# the wiki entry http://www.scipy.org/Cookbook/Matplotlib/Animations - -from __future__ import print_function - -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() - - - diff --git a/dev/examples/old_animation/animation_blit_wx.html b/dev/examples/old_animation/animation_blit_wx.html deleted file mode 100644 index 183a7c7fc35..00000000000 --- a/dev/examples/old_animation/animation_blit_wx.html +++ /dev/null @@ -1,225 +0,0 @@ - - - - - - - - old_animation example code: animation_blit_wx.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      old_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
      -
      -from __future__ import print_function
      -
      -# 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 Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/old_animation/animation_blit_wx.py b/dev/examples/old_animation/animation_blit_wx.py deleted file mode 100644 index f2ad18be03d..00000000000 --- a/dev/examples/old_animation/animation_blit_wx.py +++ /dev/null @@ -1,78 +0,0 @@ -# For detailed comments on animation and the techniqes used here, see -# the wiki entry -# http://www.scipy.org/wikis/topical_software/MatplotlibAnimation - -from __future__ import print_function - -# 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() diff --git a/dev/examples/old_animation/draggable_legend.html b/dev/examples/old_animation/draggable_legend.html deleted file mode 100644 index 8882ba1df95..00000000000 --- a/dev/examples/old_animation/draggable_legend.html +++ /dev/null @@ -1,190 +0,0 @@ - - - - - - - - old_animation example code: draggable_legend.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      old_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("ada.png", asfileobj=False)
      -arr_ada = read_png(fn)
      -
      -imagebox = OffsetImage(arr_ada, 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 Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/old_animation/draggable_legend.py b/dev/examples/old_animation/draggable_legend.py deleted file mode 100644 index 93895a78d04..00000000000 --- a/dev/examples/old_animation/draggable_legend.py +++ /dev/null @@ -1,43 +0,0 @@ -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("ada.png", asfileobj=False) -arr_ada = read_png(fn) - -imagebox = OffsetImage(arr_ada, 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() diff --git a/dev/examples/old_animation/dynamic_collection.html b/dev/examples/old_animation/dynamic_collection.html deleted file mode 100644 index 73e99443f88..00000000000 --- a/dev/examples/old_animation/dynamic_collection.html +++ /dev/null @@ -1,199 +0,0 @@ - - - - - - - - old_animation example code: dynamic_collection.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      old_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 Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/old_animation/dynamic_collection.py b/dev/examples/old_animation/dynamic_collection.py deleted file mode 100644 index 3b3fde57259..00000000000 --- a/dev/examples/old_animation/dynamic_collection.py +++ /dev/null @@ -1,52 +0,0 @@ -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() diff --git a/dev/examples/old_animation/dynamic_image_gtkagg.html b/dev/examples/old_animation/dynamic_image_gtkagg.html deleted file mode 100644 index 7972903cb08..00000000000 --- a/dev/examples/old_animation/dynamic_image_gtkagg.html +++ /dev/null @@ -1,193 +0,0 @@ - - - - - - - - old_animation example code: dynamic_image_gtkagg.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      old_animation example code: dynamic_image_gtkagg.py

      -

      [source code]

      -
      #!/usr/bin/env python
      -
      -from __future__ import print_function
      -"""
      -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 Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/old_animation/dynamic_image_gtkagg.py b/dev/examples/old_animation/dynamic_image_gtkagg.py deleted file mode 100644 index 9e454897d7b..00000000000 --- a/dev/examples/old_animation/dynamic_image_gtkagg.py +++ /dev/null @@ -1,46 +0,0 @@ -#!/usr/bin/env python - -from __future__ import print_function -""" -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() diff --git a/dev/examples/old_animation/dynamic_image_wxagg2.html b/dev/examples/old_animation/dynamic_image_wxagg2.html deleted file mode 100644 index a06e99bdcb7..00000000000 --- a/dev/examples/old_animation/dynamic_image_wxagg2.html +++ /dev/null @@ -1,246 +0,0 @@ - - - - - - - - old_animation example code: dynamic_image_wxagg2.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      old_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 Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/old_animation/dynamic_image_wxagg2.py b/dev/examples/old_animation/dynamic_image_wxagg2.py deleted file mode 100644 index 81de26d79ca..00000000000 --- a/dev/examples/old_animation/dynamic_image_wxagg2.py +++ /dev/null @@ -1,100 +0,0 @@ -#!/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() - diff --git a/dev/examples/old_animation/gtk_timeout.html b/dev/examples/old_animation/gtk_timeout.html deleted file mode 100644 index c6804bde68b..00000000000 --- a/dev/examples/old_animation/gtk_timeout.html +++ /dev/null @@ -1,166 +0,0 @@ - - - - - - - - old_animation example code: gtk_timeout.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      old_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 Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/old_animation/gtk_timeout.py b/dev/examples/old_animation/gtk_timeout.py deleted file mode 100644 index b35e2b659dd..00000000000 --- a/dev/examples/old_animation/gtk_timeout.py +++ /dev/null @@ -1,19 +0,0 @@ -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() diff --git a/dev/examples/old_animation/histogram_tkagg.html b/dev/examples/old_animation/histogram_tkagg.html deleted file mode 100644 index 8511164ca58..00000000000 --- a/dev/examples/old_animation/histogram_tkagg.html +++ /dev/null @@ -1,217 +0,0 @@ - - - - - - - - old_animation example code: histogram_tkagg.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      old_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 Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/old_animation/histogram_tkagg.py b/dev/examples/old_animation/histogram_tkagg.py deleted file mode 100644 index 5536e4477d3..00000000000 --- a/dev/examples/old_animation/histogram_tkagg.py +++ /dev/null @@ -1,70 +0,0 @@ -""" -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() diff --git a/dev/examples/old_animation/index.html b/dev/examples/old_animation/index.html deleted file mode 100644 index 5407553969b..00000000000 --- a/dev/examples/old_animation/index.html +++ /dev/null @@ -1,177 +0,0 @@ - - - - - - - - old_animation Examples — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - - - - - - \ No newline at end of file diff --git a/dev/examples/old_animation/movie_demo.html b/dev/examples/old_animation/movie_demo.html deleted file mode 100644 index 41f0f0cc503..00000000000 --- a/dev/examples/old_animation/movie_demo.html +++ /dev/null @@ -1,304 +0,0 @@ - - - - - - - - old_animation example code: movie_demo.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      old_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.
      -#
      -
      -from __future__ import print_function
      -
      -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 Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/old_animation/movie_demo.py b/dev/examples/old_animation/movie_demo.py deleted file mode 100644 index 0abf4a9e422..00000000000 --- a/dev/examples/old_animation/movie_demo.py +++ /dev/null @@ -1,158 +0,0 @@ -#!/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. -# - -from __future__ import print_function - -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") - diff --git a/dev/examples/old_animation/simple_anim_gtk.html b/dev/examples/old_animation/simple_anim_gtk.html deleted file mode 100644 index 5b4e61b1d6e..00000000000 --- a/dev/examples/old_animation/simple_anim_gtk.html +++ /dev/null @@ -1,178 +0,0 @@ - - - - - - - - old_animation example code: simple_anim_gtk.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      old_animation example code: simple_anim_gtk.py

      -

      [source code]

      -
      """
      -A simple example of an animated plot using a gtk backend
      -"""
      -from __future__ import print_function
      -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 Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/old_animation/simple_anim_gtk.py b/dev/examples/old_animation/simple_anim_gtk.py deleted file mode 100644 index 6a851edd18d..00000000000 --- a/dev/examples/old_animation/simple_anim_gtk.py +++ /dev/null @@ -1,31 +0,0 @@ -""" -A simple example of an animated plot using a gtk backend -""" -from __future__ import print_function -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() diff --git a/dev/examples/old_animation/simple_anim_tkagg.html b/dev/examples/old_animation/simple_anim_tkagg.html deleted file mode 100644 index ec5e8fdf25b..00000000000 --- a/dev/examples/old_animation/simple_anim_tkagg.html +++ /dev/null @@ -1,175 +0,0 @@ - - - - - - - - old_animation example code: simple_anim_tkagg.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      old_animation example code: simple_anim_tkagg.py

      -

      [source code]

      -
      #!/usr/bin/env python
      -
      -"""
      -A simple example of an animated plot in tkagg
      -"""
      -from __future__ import print_function
      -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 Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/old_animation/simple_anim_tkagg.py b/dev/examples/old_animation/simple_anim_tkagg.py deleted file mode 100644 index 427323ff14b..00000000000 --- a/dev/examples/old_animation/simple_anim_tkagg.py +++ /dev/null @@ -1,28 +0,0 @@ -#!/usr/bin/env python - -""" -A simple example of an animated plot in tkagg -""" -from __future__ import print_function -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() diff --git a/dev/examples/old_animation/simple_idle_wx.html b/dev/examples/old_animation/simple_idle_wx.html deleted file mode 100644 index 937b4f5d2d3..00000000000 --- a/dev/examples/old_animation/simple_idle_wx.html +++ /dev/null @@ -1,177 +0,0 @@ - - - - - - - - old_animation example code: simple_idle_wx.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      old_animation example code: simple_idle_wx.py

      -

      [source code]

      -
      """
      -A simple example of an animated plot using a wx backend
      -"""
      -from __future__ import print_function
      -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 Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/old_animation/simple_idle_wx.py b/dev/examples/old_animation/simple_idle_wx.py deleted file mode 100644 index bcc77df9137..00000000000 --- a/dev/examples/old_animation/simple_idle_wx.py +++ /dev/null @@ -1,30 +0,0 @@ -""" -A simple example of an animated plot using a wx backend -""" -from __future__ import print_function -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() diff --git a/dev/examples/old_animation/simple_timer_wx.html b/dev/examples/old_animation/simple_timer_wx.html deleted file mode 100644 index fdb045168bd..00000000000 --- a/dev/examples/old_animation/simple_timer_wx.html +++ /dev/null @@ -1,184 +0,0 @@ - - - - - - - - old_animation example code: simple_timer_wx.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      old_animation example code: simple_timer_wx.py

      -

      [source code]

      -
      from __future__ import print_function
      -"""
      -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 Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/old_animation/simple_timer_wx.py b/dev/examples/old_animation/simple_timer_wx.py deleted file mode 100644 index 6e7b1607c59..00000000000 --- a/dev/examples/old_animation/simple_timer_wx.py +++ /dev/null @@ -1,37 +0,0 @@ -from __future__ import print_function -""" -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() diff --git a/dev/examples/old_animation/strip_chart_demo.html b/dev/examples/old_animation/strip_chart_demo.html deleted file mode 100644 index caa08906945..00000000000 --- a/dev/examples/old_animation/strip_chart_demo.html +++ /dev/null @@ -1,219 +0,0 @@ - - - - - - - - old_animation example code: strip_chart_demo.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      old_animation example code: strip_chart_demo.py

      -

      [source code]

      -
      """
      -Emulate an oscilloscope.  Requires the animation API introduced in
      -matplotlib 0.84.  See
      -http://www.scipy.org/wikis/topical_software/Animations for an
      -explanation.
      -
      -This example uses gtk but does not depend on it intimately.  It just
      -uses the idle handler to trigger events.  You can plug this into a
      -different GUI that supports animation (GTKAgg, TkAgg, WXAgg) and use
      -your toolkits idle/timer functions.
      -"""
      -import gobject
      -import matplotlib
      -matplotlib.use('GTKAgg')
      -import numpy as np
      -from matplotlib.lines import Line2D
      -
      -
      -class Scope:
      -    def __init__(self, ax, maxt=10, dt=0.01):
      -        self.ax = ax
      -        self.canvas = ax.figure.canvas
      -        self.dt = dt
      -        self.maxt = maxt
      -        self.tdata = [0]
      -        self.ydata = [0]
      -        self.line = Line2D(self.tdata, self.ydata, animated=True)
      -        self.ax.add_line(self.line)
      -        self.background = None
      -        self.canvas.mpl_connect('draw_event', self.update_background)
      -        self.ax.set_ylim(-.1, 1.1)
      -        self.ax.set_xlim(0, self.maxt)
      -
      -    def update_background(self, event):
      -        self.background = self.canvas.copy_from_bbox(self.ax.bbox)
      -
      -    def emitter(self, p=0.01):
      -        'return a random value with probability p, else 0'
      -        v = np.random.rand(1)
      -        if v>p: return 0.
      -        else: return np.random.rand(1)
      -
      -    def update(self, *args):
      -        if self.background is None: return True
      -        y = self.emitter()
      -        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()
      -
      -        self.canvas.restore_region(self.background)
      -
      -        t = self.tdata[-1] + self.dt
      -        self.tdata.append(t)
      -        self.ydata.append(y)
      -        self.line.set_data(self.tdata, self.ydata)
      -        self.ax.draw_artist(self.line)
      -
      -        self.canvas.blit(self.ax.bbox)
      -        return True
      -
      -
      -from pylab import figure, show
      -
      -fig = figure()
      -ax = fig.add_subplot(111)
      -scope = Scope(ax)
      -gobject.idle_add(scope.update)
      -
      -show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/old_animation/strip_chart_demo.py b/dev/examples/old_animation/strip_chart_demo.py deleted file mode 100644 index ac7587a261d..00000000000 --- a/dev/examples/old_animation/strip_chart_demo.py +++ /dev/null @@ -1,72 +0,0 @@ -""" -Emulate an oscilloscope. Requires the animation API introduced in -matplotlib 0.84. See -http://www.scipy.org/wikis/topical_software/Animations for an -explanation. - -This example uses gtk but does not depend on it intimately. It just -uses the idle handler to trigger events. You can plug this into a -different GUI that supports animation (GTKAgg, TkAgg, WXAgg) and use -your toolkits idle/timer functions. -""" -import gobject -import matplotlib -matplotlib.use('GTKAgg') -import numpy as np -from matplotlib.lines import Line2D - - -class Scope: - def __init__(self, ax, maxt=10, dt=0.01): - self.ax = ax - self.canvas = ax.figure.canvas - self.dt = dt - self.maxt = maxt - self.tdata = [0] - self.ydata = [0] - self.line = Line2D(self.tdata, self.ydata, animated=True) - self.ax.add_line(self.line) - self.background = None - self.canvas.mpl_connect('draw_event', self.update_background) - self.ax.set_ylim(-.1, 1.1) - self.ax.set_xlim(0, self.maxt) - - def update_background(self, event): - self.background = self.canvas.copy_from_bbox(self.ax.bbox) - - def emitter(self, p=0.01): - 'return a random value with probability p, else 0' - v = np.random.rand(1) - if v>p: return 0. - else: return np.random.rand(1) - - def update(self, *args): - if self.background is None: return True - y = self.emitter() - 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() - - self.canvas.restore_region(self.background) - - t = self.tdata[-1] + self.dt - self.tdata.append(t) - self.ydata.append(y) - self.line.set_data(self.tdata, self.ydata) - self.ax.draw_artist(self.line) - - self.canvas.blit(self.ax.bbox) - return True - - -from pylab import figure, show - -fig = figure() -ax = fig.add_subplot(111) -scope = Scope(ax) -gobject.idle_add(scope.update) - -show() diff --git a/dev/examples/pie_and_polar_charts/index.html b/dev/examples/pie_and_polar_charts/index.html deleted file mode 100644 index eb8ab1cb943..00000000000 --- a/dev/examples/pie_and_polar_charts/index.html +++ /dev/null @@ -1,160 +0,0 @@ - - - - - - - - pie_and_polar_charts Examples — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      pie_and_polar_charts Examples

      - --- - - - - - -
      Release:1.3.x
      Date:May 21, 2013
      - -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/pie_and_polar_charts/pie_demo_features.html b/dev/examples/pie_and_polar_charts/pie_demo_features.html deleted file mode 100644 index 4ae066b3f61..00000000000 --- a/dev/examples/pie_and_polar_charts/pie_demo_features.html +++ /dev/null @@ -1,182 +0,0 @@ - - - - - - - - pie_and_polar_charts example code: pie_demo_features.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      pie_and_polar_charts example code: pie_demo_features.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/pie_demo_features.png -
      -
      """
      -Demo of a basic pie chart plus a few additional features.
      -
      -In addition to the basic pie chart, this demo shows a few optional features:
      -
      -    * slice labels
      -    * auto-labeling the percentage
      -    * offsetting a slice with "explode"
      -    * drop-shadow
      -    * custom start angle
      -
      -Note about the custom start angle:
      -
      -The default ``startangle`` is 0, which would start the "Frogs" slice on the
      -positive x-axis. This example sets ``startangle = 90`` such that everything is
      -rotated counter-clockwise by 90 degrees, and the frog slice starts on the
      -positive y-axis.
      -"""
      -import matplotlib.pyplot as plt
      -
      -
      -# The slices will be ordered and plotted counter-clockwise.
      -labels = 'Frogs', 'Hogs', 'Dogs', 'Logs'
      -sizes = [15, 30, 45, 10]
      -colors = ['yellowgreen', 'gold', 'lightskyblue', 'lightcoral']
      -explode = (0, 0.1, 0, 0) # only "explode" the 2nd slice (i.e. 'Hogs')
      -
      -plt.pie(sizes, explode=explode, labels=labels, colors=colors,
      -        autopct='%1.1f%%', shadow=True, startangle=90)
      -# Set aspect ratio to be equal so that pie is drawn as a circle.
      -plt.axis('equal')
      -plt.show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/pie_and_polar_charts/polar_bar_demo.html b/dev/examples/pie_and_polar_charts/polar_bar_demo.html deleted file mode 100644 index 9890b22c3c6..00000000000 --- a/dev/examples/pie_and_polar_charts/polar_bar_demo.html +++ /dev/null @@ -1,171 +0,0 @@ - - - - - - - - pie_and_polar_charts example code: polar_bar_demo.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      pie_and_polar_charts example code: polar_bar_demo.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/polar_bar_demo.png -
      -
      """
      -Demo of bar plot on a polar axis.
      -"""
      -import numpy as np
      -import matplotlib.pyplot as plt
      -
      -
      -N = 20
      -theta = np.linspace(0.0, 2 * np.pi, N, endpoint=False)
      -radii = 10 * np.random.rand(N)
      -width = np.pi / 4 * np.random.rand(N)
      -
      -ax = plt.subplot(111, polar=True)
      -bars = ax.bar(theta, radii, width=width, bottom=0.0)
      -
      -# Use custom colors and opacity
      -for r, bar in zip(radii, bars):
      -    bar.set_facecolor(plt.cm.jet(r / 10.))
      -    bar.set_alpha(0.5)
      -
      -plt.show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/pie_and_polar_charts/polar_scatter_demo.html b/dev/examples/pie_and_polar_charts/polar_scatter_demo.html deleted file mode 100644 index 47a43a28355..00000000000 --- a/dev/examples/pie_and_polar_charts/polar_scatter_demo.html +++ /dev/null @@ -1,171 +0,0 @@ - - - - - - - - pie_and_polar_charts example code: polar_scatter_demo.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      pie_and_polar_charts example code: polar_scatter_demo.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/polar_scatter_demo.png -
      -
      """
      -Demo of scatter plot on a polar axis.
      -
      -Size increases radially in this example and color increases with angle (just to
      -verify the symbols are being scattered correctly).
      -"""
      -import numpy as np
      -import matplotlib.pyplot as plt
      -
      -
      -N = 150
      -r = 2 * np.random.rand(N)
      -theta = 2 * np.pi * np.random.rand(N)
      -area = 200 * r**2 * np.random.rand(N)
      -colors = theta
      -
      -ax = plt.subplot(111, polar=True)
      -c = plt.scatter(theta, r, c=colors, s=area, cmap=plt.cm.hsv)
      -c.set_alpha(0.75)
      -
      -plt.show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/pylab_examples/accented_text.html b/dev/examples/pylab_examples/accented_text.html deleted file mode 100644 index 957d6faed36..00000000000 --- a/dev/examples/pylab_examples/accented_text.html +++ /dev/null @@ -1,172 +0,0 @@ - - - - - - - - pylab_examples example code: accented_text.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      pylab_examples example code: accented_text.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/accented_text.png -
      -
      #!/usr/bin/env python
      -"""
      -matplotlib supports accented characters via TeX mathtext
      -
      -The following accents are provided: \hat, \breve, \grave, \bar,
      -\acute, \tilde, \vec, \dot, \ddot.  All of them have the same syntax,
      -eg to make an overbar you do \bar{o} or to make an o umlaut you do
      -\ddot{o}.  The shortcuts are also provided, eg: \"o \'e \`e \~n \.x
      -\^y
      -
      -"""
      -from pylab import *
      -
      -axes([0.1, 0.15, 0.8, 0.75])
      -plot(range(10))
      -
      -title(r'$\ddot{o}\acute{e}\grave{e}\hat{O}\breve{i}\bar{A}\tilde{n}\vec{q}$', fontsize=20)
      -# shorthand is also supported and curly's are optional
      -xlabel(r"""$\"o\ddot o \'e\`e\~n\.x\^y$""", fontsize=20)
      -
      -
      -show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/pylab_examples/agg_buffer_to_array.html b/dev/examples/pylab_examples/agg_buffer_to_array.html deleted file mode 100644 index 16cfdc44944..00000000000 --- a/dev/examples/pylab_examples/agg_buffer_to_array.html +++ /dev/null @@ -1,179 +0,0 @@ - - - - - - - - pylab_examples example code: agg_buffer_to_array.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      pylab_examples example code: agg_buffer_to_array.py

      -

      (Source code)

      -
      -../../_images/agg_buffer_to_array_00.png -

      (png, hires.png, pdf)

      -
      -
      -../../_images/agg_buffer_to_array_01.png -

      (png, hires.png, pdf)

      -
      -
      import matplotlib
      -from pylab import figure, show
      -import numpy as np
      -
      -# make an agg figure
      -fig = figure()
      -ax = fig.add_subplot(111)
      -ax.plot([1,2,3])
      -ax.set_title('a simple figure')
      -fig.canvas.draw()
      -
      -# grab the pixel buffer and dump it into a numpy array
      -buf = fig.canvas.buffer_rgba()
      -l, b, w, h = fig.bbox.bounds
      -# The array needs to be copied, because the underlying buffer
      -# may be reallocated when the window is resized.
      -X = np.frombuffer(buf, np.uint8).copy()
      -X.shape = h,w,4
      -
      -# now display the array X as an Axes in a new figure
      -fig2 = figure()
      -ax2 = fig2.add_subplot(111, frameon=False)
      -ax2.imshow(X)
      -show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/pylab_examples/alignment_test.html b/dev/examples/pylab_examples/alignment_test.html deleted file mode 100644 index 5867e1e63d9..00000000000 --- a/dev/examples/pylab_examples/alignment_test.html +++ /dev/null @@ -1,232 +0,0 @@ - - - - - - - - pylab_examples example code: alignment_test.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      pylab_examples example code: alignment_test.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/alignment_test.png -
      -
      #!/usr/bin/env python
      -"""
      -You can precisely layout text in data or axes (0,1) coordinates.  This
      -example shows you some of the alignment and rotation specifications to
      -layout text
      -"""
      -
      -from pylab import *
      -from matplotlib.lines import Line2D
      -from matplotlib.patches import Rectangle
      -
      -# build a rectangle in axes coords
      -left, width = .25, .5
      -bottom, height = .25, .5
      -right = left + width
      -top = bottom + height
      -ax = gca()
      -p = Rectangle((left, bottom), width, height,
      -              fill=False,
      -              )
      -p.set_transform(ax.transAxes)
      -p.set_clip_on(False)
      -ax.add_patch(p)
      -
      -
      -ax.text(left, bottom, 'left top',
      -        horizontalalignment='left',
      -        verticalalignment='top',
      -        transform=ax.transAxes)
      -
      -ax.text(left, bottom, 'left bottom',
      -        horizontalalignment='left',
      -        verticalalignment='bottom',
      -        transform=ax.transAxes)
      -
      -ax.text(right, top, 'right bottom',
      -        horizontalalignment='right',
      -        verticalalignment='bottom',
      -        transform=ax.transAxes)
      -
      -ax.text(right, top, 'right top',
      -        horizontalalignment='right',
      -        verticalalignment='top',
      -        transform=ax.transAxes)
      -
      -ax.text(right, bottom, 'center top',
      -        horizontalalignment='center',
      -        verticalalignment='top',
      -        transform=ax.transAxes)
      -
      -ax.text(left, 0.5*(bottom+top), 'right center',
      -        horizontalalignment='right',
      -        verticalalignment='center',
      -        rotation='vertical',
      -        transform=ax.transAxes)
      -
      -ax.text(left, 0.5*(bottom+top), 'left center',
      -        horizontalalignment='left',
      -        verticalalignment='center',
      -        rotation='vertical',
      -        transform=ax.transAxes)
      -
      -ax.text(0.5*(left+right), 0.5*(bottom+top), 'middle',
      -        horizontalalignment='center',
      -        verticalalignment='center',
      -        transform=ax.transAxes)
      -
      -ax.text(right, 0.5*(bottom+top), 'centered',
      -        horizontalalignment='center',
      -        verticalalignment='center',
      -        rotation='vertical',
      -        transform=ax.transAxes)
      -
      -ax.text(left, top, 'rotated\nwith newlines',
      -        horizontalalignment='center',
      -        verticalalignment='center',
      -        rotation=45,
      -        transform=ax.transAxes)
      -
      -axis('off')
      -
      -show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/pylab_examples/anchored_artists.html b/dev/examples/pylab_examples/anchored_artists.html deleted file mode 100644 index e470a5272df..00000000000 --- a/dev/examples/pylab_examples/anchored_artists.html +++ /dev/null @@ -1,263 +0,0 @@ - - - - - - - - pylab_examples example code: anchored_artists.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      pylab_examples example code: anchored_artists.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/anchored_artists.png -
      -
      from matplotlib.patches import Rectangle, Ellipse
      -
      -from matplotlib.offsetbox import AnchoredOffsetbox, AuxTransformBox, VPacker,\
      -     TextArea, DrawingArea
      -
      -
      -class AnchoredText(AnchoredOffsetbox):
      -    def __init__(self, s, loc, pad=0.4, borderpad=0.5, prop=None, frameon=True):
      -
      -        self.txt = TextArea(s,
      -                            minimumdescent=False)
      -
      -
      -        super(AnchoredText, self).__init__(loc, pad=pad, borderpad=borderpad,
      -                                           child=self.txt,
      -                                           prop=prop,
      -                                           frameon=frameon)
      -
      -
      -class AnchoredSizeBar(AnchoredOffsetbox):
      -    def __init__(self, transform, size, label, loc,
      -                 pad=0.1, borderpad=0.1, sep=2, prop=None, frameon=True):
      -        """
      -        Draw a horizontal bar with the size in data coordinate of the give axes.
      -        A label will be drawn underneath (center-aligned).
      -
      -        pad, borderpad in fraction of the legend font size (or prop)
      -        sep in points.
      -        """
      -        self.size_bar = AuxTransformBox(transform)
      -        self.size_bar.add_artist(Rectangle((0,0), size, 0, fc="none"))
      -
      -        self.txt_label = TextArea(label, minimumdescent=False)
      -
      -        self._box = VPacker(children=[self.size_bar, self.txt_label],
      -                            align="center",
      -                            pad=0, sep=sep)
      -
      -        AnchoredOffsetbox.__init__(self, loc, pad=pad, borderpad=borderpad,
      -                                   child=self._box,
      -                                   prop=prop,
      -                                   frameon=frameon)
      -
      -
      -class AnchoredEllipse(AnchoredOffsetbox):
      -    def __init__(self, transform, width, height, angle, loc,
      -                 pad=0.1, borderpad=0.1, prop=None, frameon=True):
      -        """
      -        Draw an ellipse the size in data coordinate of the give axes.
      -
      -        pad, borderpad in fraction of the legend font size (or prop)
      -        """
      -        self._box = AuxTransformBox(transform)
      -        self.ellipse = Ellipse((0,0), width, height, angle)
      -        self._box.add_artist(self.ellipse)
      -
      -        AnchoredOffsetbox.__init__(self, loc, pad=pad, borderpad=borderpad,
      -                                   child=self._box,
      -                                   prop=prop,
      -                                   frameon=frameon)
      -
      -
      -
      -class AnchoredDrawingArea(AnchoredOffsetbox):
      -    def __init__(self, width, height, xdescent, ydescent,
      -                 loc, pad=0.4, borderpad=0.5, prop=None, frameon=True):
      -
      -        self.da = DrawingArea(width, height, xdescent, ydescent, clip=True)
      -
      -        super(AnchoredDrawingArea, self).__init__(loc, pad=pad, borderpad=borderpad,
      -                                                  child=self.da,
      -                                                  prop=None,
      -                                                  frameon=frameon)
      -
      -
      -
      -if __name__ == "__main__":
      -
      -    import matplotlib.pyplot as plt
      -
      -    ax = plt.gca()
      -    ax.set_aspect(1.)
      -
      -    at = AnchoredText("Figure 1a",
      -                      loc=2, frameon=True)
      -    at.patch.set_boxstyle("round,pad=0.,rounding_size=0.2")
      -    ax.add_artist(at)
      -
      -    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)
      -
      -    # 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)
      -
      -    # 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)
      -
      -    plt.draw()
      -    plt.show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/pylab_examples/animation_demo.html b/dev/examples/pylab_examples/animation_demo.html deleted file mode 100644 index 27584bbd0de..00000000000 --- a/dev/examples/pylab_examples/animation_demo.html +++ /dev/null @@ -1,177 +0,0 @@ - - - - - - - - pylab_examples example code: animation_demo.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      pylab_examples example code: animation_demo.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/animation_demo.png -
      -
      """
      -Pyplot animation example.
      -
      -The method shown here is only for very simple, low-performance
      -use.  For more demanding applications, look at the animation
      -module and the examples that use it.
      -"""
      -
      -import matplotlib.pyplot as plt
      -import numpy as np
      -
      -x = np.arange(6)
      -y = np.arange(5)
      -z = x * y[:,np.newaxis]
      -
      -for i in xrange(5):
      -    if i==0:
      -        p = plt.imshow(z)
      -        fig = plt.gcf()
      -        plt.clim()   # clamp the color limits
      -        plt.title("Boring slide show")
      -    else:
      -        z = z + 2
      -        p.set_data(z)
      -
      -    print("step", i)
      -    plt.pause(0.5)
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/pylab_examples/annotation_demo.html b/dev/examples/pylab_examples/annotation_demo.html deleted file mode 100644 index 4f9f641322c..00000000000 --- a/dev/examples/pylab_examples/annotation_demo.html +++ /dev/null @@ -1,300 +0,0 @@ - - - - - - - - pylab_examples example code: annotation_demo.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      pylab_examples example code: annotation_demo.py

      -

      (Source code)

      -
      -../../_images/annotation_demo_00.png -

      (png, hires.png, pdf)

      -
      -
      -../../_images/annotation_demo_01.png -

      (png, hires.png, pdf)

      -
      -
      -../../_images/annotation_demo_02.png -

      (png, hires.png, pdf)

      -
      -
      """
      -Some examples of how to annotate points in figures.  You specify an
      -annotation point xy=(x,y) and a text point xytext=(x,y) for the
      -annotated points and text location, respectively.  Optionally, you can
      -specify the coordinate system of xy and xytext with one of the
      -following strings for xycoords and textcoords (default is 'data')
      -
      -
      -  'figure points'   : points from the lower left corner of the figure
      -  'figure pixels'   : pixels from the lower left corner of the figure
      -  'figure fraction' : 0,0 is lower left of figure and 1,1 is upper, right
      -  'axes points'     : points from lower left corner of axes
      -  'axes pixels'     : pixels from lower left corner of axes
      -  'axes fraction'   : 0,1 is lower left of axes and 1,1 is upper right
      -  'offset points'   : Specify an offset (in points) from the xy value
      -  'data'            : use the axes data coordinate system
      -
      -Optionally, you can specify arrow properties which draws and arrow
      -from the text to the annotated point by giving a dictionary of arrow
      -properties
      -
      -Valid keys are
      -
      -          width : the width of the arrow in points
      -          frac  : the fraction of the arrow length occupied by the head
      -          headwidth : the width of the base of the arrow head in points
      -          shrink : move the tip and base some percent away from the
      -                   annotated point and text
      -          any key for matplotlib.patches.polygon  (eg facecolor)
      -
      -For physical coordinate systems (points or pixels) the origin is the
      -(bottom, left) of the figure or axes.  If the value is negative,
      -however, the origin is from the (right, top) of the figure or axes,
      -analogous to negative indexing of sequences.
      -"""
      -
      -
      -from matplotlib.pyplot import figure, show
      -from matplotlib.patches import Ellipse
      -import numpy as np
      -
      -
      -if 1:
      -    # if only one location is given, the text and xypoint being
      -    # annotated are assumed to be the same
      -    fig = figure()
      -    ax = fig.add_subplot(111, autoscale_on=False, xlim=(-1,5), ylim=(-3,5))
      -
      -    t = np.arange(0.0, 5.0, 0.01)
      -    s = np.cos(2*np.pi*t)
      -    line, = ax.plot(t, s, lw=3, color='purple')
      -
      -    ax.annotate('axes center', xy=(.5, .5),  xycoords='axes fraction',
      -                horizontalalignment='center', verticalalignment='center')
      -
      -    ax.annotate('pixels', xy=(20, 20),  xycoords='figure pixels')
      -
      -    ax.annotate('points', xy=(100, 300),  xycoords='figure points')
      -
      -    ax.annotate('offset', xy=(1, 1),  xycoords='data',
      -                xytext=(-15, 10), textcoords='offset points',
      -                arrowprops=dict(facecolor='black', shrink=0.05),
      -                horizontalalignment='right', verticalalignment='bottom',
      -                )
      -
      -    ax.annotate('local max', xy=(3, 1),  xycoords='data',
      -                xytext=(0.8, 0.95), textcoords='axes fraction',
      -                arrowprops=dict(facecolor='black', shrink=0.05),
      -                horizontalalignment='right', verticalalignment='top',
      -                )
      -
      -    ax.annotate('a fractional title', xy=(.025, .975),
      -                xycoords='figure fraction',
      -                horizontalalignment='left', verticalalignment='top',
      -                fontsize=20)
      -
      -    # use negative points or pixels to specify from right, top -10, 10
      -    # is 10 points to the left of the right side of the axes and 10
      -    # points above the bottom
      -    ax.annotate('bottom right (points)', xy=(-10, 10),
      -                xycoords='axes points',
      -                horizontalalignment='right', verticalalignment='bottom',
      -                fontsize=20)
      -
      -
      -if 1:
      -    # you can specify the xypoint and the xytext in different
      -    # positions and coordinate systems, and optionally turn on a
      -    # connecting line and mark the point with a marker.  Annotations
      -    # work on polar axes too.  In the example below, the xy point is
      -    # in native coordinates (xycoords defaults to 'data').  For a
      -    # polar axes, this is in (theta, radius) space.  The text in this
      -    # example is placed in the fractional figure coordinate system.
      -    # Text keyword args like horizontal and vertical alignment are
      -    # respected
      -    fig = figure()
      -    ax = fig.add_subplot(111, polar=True)
      -    r = np.arange(0,1,0.001)
      -    theta = 2*2*np.pi*r
      -    line, = ax.plot(theta, r, color='#ee8d18', lw=3)
      -
      -    ind = 800
      -    thisr, thistheta = r[ind], theta[ind]
      -    ax.plot([thistheta], [thisr], 'o')
      -    ax.annotate('a polar annotation',
      -                xy=(thistheta, thisr),  # theta, radius
      -                xytext=(0.05, 0.05),    # fraction, fraction
      -                textcoords='figure fraction',
      -                arrowprops=dict(facecolor='black', shrink=0.05),
      -                horizontalalignment='left',
      -                verticalalignment='bottom',
      -                )
      -
      -
      -if 1:
      -    # You can also use polar notation on a cartesian axes.  Here the
      -    # native coordinate system ('data') is cartesian, so you need to
      -    # specify the xycoords and textcoords as 'polar' if you want to
      -    # use (theta, radius)
      -
      -    el = Ellipse((0,0), 10, 20, facecolor='r', alpha=0.5)
      -
      -    fig = figure()
      -    ax = fig.add_subplot(111, aspect='equal')
      -    ax.add_artist(el)
      -    el.set_clip_box(ax.bbox)
      -    ax.annotate('the top',
      -                xy=(np.pi/2., 10.),      # theta, radius
      -                xytext=(np.pi/3, 20.),   # theta, radius
      -                xycoords='polar',
      -                textcoords='polar',
      -                arrowprops=dict(facecolor='black', shrink=0.05),
      -                horizontalalignment='left',
      -                verticalalignment='bottom',
      -                clip_on=True, # clip to the axes bounding box
      -     )
      -
      -    ax.set_xlim(-20, 20)
      -    ax.set_ylim(-20, 20)
      -
      -show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/pylab_examples/annotation_demo2.html b/dev/examples/pylab_examples/annotation_demo2.html deleted file mode 100644 index 8dd8c443b43..00000000000 --- a/dev/examples/pylab_examples/annotation_demo2.html +++ /dev/null @@ -1,310 +0,0 @@ - - - - - - - - pylab_examples example code: annotation_demo2.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      pylab_examples example code: annotation_demo2.py

      -

      (Source code)

      -
      -../../_images/annotation_demo2_001.png -

      (png, hires.png, pdf)

      -
      -
      -../../_images/annotation_demo2_011.png -

      (png, hires.png, pdf)

      -
      -
      from matplotlib.pyplot import figure, show
      -from matplotlib.patches import Ellipse
      -import numpy as np
      -
      -if 1:
      -    fig = figure(1,figsize=(8,5))
      -    ax = fig.add_subplot(111, autoscale_on=False, xlim=(-1,5), ylim=(-4,3))
      -
      -    t = np.arange(0.0, 5.0, 0.01)
      -    s = np.cos(2*np.pi*t)
      -    line, = ax.plot(t, s, lw=3, color='purple')
      -
      -    ax.annotate('arrowstyle', xy=(0, 1),  xycoords='data',
      -                xytext=(-50, 30), textcoords='offset points',
      -                arrowprops=dict(arrowstyle="->")
      -                )
      -
      -    ax.annotate('arc3', xy=(0.5, -1),  xycoords='data',
      -                xytext=(-30, -30), textcoords='offset points',
      -                arrowprops=dict(arrowstyle="->",
      -                                connectionstyle="arc3,rad=.2")
      -                )
      -
      -    ax.annotate('arc', xy=(1., 1),  xycoords='data',
      -                xytext=(-40, 30), textcoords='offset points',
      -                arrowprops=dict(arrowstyle="->",
      -                                connectionstyle="arc,angleA=0,armA=30,rad=10"),
      -                )
      -
      -    ax.annotate('arc', xy=(1.5, -1),  xycoords='data',
      -                xytext=(-40, -30), textcoords='offset points',
      -                arrowprops=dict(arrowstyle="->",
      -                                connectionstyle="arc,angleA=0,armA=20,angleB=-90,armB=15,rad=7"),
      -                )
      -
      -    ax.annotate('angle', xy=(2., 1),  xycoords='data',
      -                xytext=(-50, 30), textcoords='offset points',
      -                arrowprops=dict(arrowstyle="->",
      -                                connectionstyle="angle,angleA=0,angleB=90,rad=10"),
      -                )
      -
      -    ax.annotate('angle3', xy=(2.5, -1),  xycoords='data',
      -                xytext=(-50, -30), textcoords='offset points',
      -                arrowprops=dict(arrowstyle="->",
      -                                connectionstyle="angle3,angleA=0,angleB=-90"),
      -                )
      -
      -
      -    ax.annotate('angle', xy=(3., 1),  xycoords='data',
      -                xytext=(-50, 30), textcoords='offset points',
      -                bbox=dict(boxstyle="round", fc="0.8"),
      -                arrowprops=dict(arrowstyle="->",
      -                                connectionstyle="angle,angleA=0,angleB=90,rad=10"),
      -                )
      -
      -    ax.annotate('angle', xy=(3.5, -1),  xycoords='data',
      -                xytext=(-70, -60), textcoords='offset points',
      -                size=20,
      -                bbox=dict(boxstyle="round4,pad=.5", fc="0.8"),
      -                arrowprops=dict(arrowstyle="->",
      -                                connectionstyle="angle,angleA=0,angleB=-90,rad=10"),
      -                )
      -
      -    ax.annotate('angle', xy=(4., 1),  xycoords='data',
      -                xytext=(-50, 30), textcoords='offset points',
      -                bbox=dict(boxstyle="round", fc="0.8"),
      -                arrowprops=dict(arrowstyle="->",
      -                                shrinkA=0, shrinkB=10,
      -                                connectionstyle="angle,angleA=0,angleB=90,rad=10"),
      -                )
      -
      -
      -    ann = ax.annotate('', xy=(4., 1.),  xycoords='data',
      -                xytext=(4.5, -1), textcoords='data',
      -                arrowprops=dict(arrowstyle="<->",
      -                                connectionstyle="bar",
      -                                ec="k",
      -                                shrinkA=5, shrinkB=5,
      -                                )
      -                )
      -
      -
      -if 1:
      -    fig = figure(2)
      -    fig.clf()
      -    ax = fig.add_subplot(111, autoscale_on=False, xlim=(-1,5), ylim=(-5,3))
      -
      -    el = Ellipse((2, -1), 0.5, 0.5)
      -    ax.add_patch(el)
      -
      -    ax.annotate('$->$', xy=(2., -1),  xycoords='data',
      -                xytext=(-150, -140), textcoords='offset points',
      -                bbox=dict(boxstyle="round", fc="0.8"),
      -                arrowprops=dict(arrowstyle="->",
      -                                patchB=el,
      -                                connectionstyle="angle,angleA=90,angleB=0,rad=10"),
      -                )
      -
      -    ax.annotate('fancy', xy=(2., -1),  xycoords='data',
      -                xytext=(-100, 60), textcoords='offset points',
      -                size=20,
      -                #bbox=dict(boxstyle="round", fc="0.8"),
      -                arrowprops=dict(arrowstyle="fancy",
      -                                fc="0.6", ec="none",
      -                                patchB=el,
      -                                connectionstyle="angle3,angleA=0,angleB=-90"),
      -                )
      -
      -    ax.annotate('simple', xy=(2., -1),  xycoords='data',
      -                xytext=(100, 60), textcoords='offset points',
      -                size=20,
      -                #bbox=dict(boxstyle="round", fc="0.8"),
      -                arrowprops=dict(arrowstyle="simple",
      -                                fc="0.6", ec="none",
      -                                patchB=el,
      -                                connectionstyle="arc3,rad=0.3"),
      -                )
      -
      -    ax.annotate('wedge', xy=(2., -1),  xycoords='data',
      -                xytext=(-100, -100), textcoords='offset points',
      -                size=20,
      -                #bbox=dict(boxstyle="round", fc="0.8"),
      -                arrowprops=dict(arrowstyle="wedge,tail_width=0.7",
      -                                fc="0.6", ec="none",
      -                                patchB=el,
      -                                connectionstyle="arc3,rad=-0.3"),
      -                )
      -
      -
      -    ann = ax.annotate('wedge', xy=(2., -1),  xycoords='data',
      -                xytext=(0, -45), textcoords='offset points',
      -                size=20,
      -                bbox=dict(boxstyle="round", fc=(1.0, 0.7, 0.7), ec=(1., .5, .5)),
      -                arrowprops=dict(arrowstyle="wedge,tail_width=1.",
      -                                fc=(1.0, 0.7, 0.7), ec=(1., .5, .5),
      -                                patchA=None,
      -                                patchB=el,
      -                                relpos=(0.2, 0.8),
      -                                connectionstyle="arc3,rad=-0.1"),
      -                )
      -
      -    ann = ax.annotate('wedge', xy=(2., -1),  xycoords='data',
      -                xytext=(35, 0), textcoords='offset points',
      -                size=20, va="center",
      -                bbox=dict(boxstyle="round", fc=(1.0, 0.7, 0.7), ec="none"),
      -                arrowprops=dict(arrowstyle="wedge,tail_width=1.",
      -                                fc=(1.0, 0.7, 0.7), ec="none",
      -                                patchA=None,
      -                                patchB=el,
      -                                relpos=(0.2, 0.5),
      -                                )
      -                )
      -
      -
      -show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/pylab_examples/annotation_demo3.html b/dev/examples/pylab_examples/annotation_demo3.html deleted file mode 100644 index 781fa412ce6..00000000000 --- a/dev/examples/pylab_examples/annotation_demo3.html +++ /dev/null @@ -1,251 +0,0 @@ - - - - - - - - pylab_examples example code: annotation_demo3.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      pylab_examples example code: annotation_demo3.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/annotation_demo3.png -
      -
      import matplotlib.pyplot as plt
      -
      -fig = plt.figure(1)
      -fig.clf()
      -
      -ax1 = plt.subplot(121)
      -ax2 = plt.subplot(122)
      -
      -bbox_args = dict(boxstyle="round", fc="0.8")
      -arrow_args = dict(arrowstyle="->")
      -
      -ax1.annotate('figure fraction : 0, 0', xy=(0, 0),  xycoords='figure fraction',
      -             xytext=(20, 20), textcoords='offset points',
      -             ha="left", va="bottom",
      -             bbox=bbox_args,
      -             arrowprops=arrow_args
      -             )
      -
      -ax1.annotate('figure fraction : 1, 1', xy=(1, 1),  xycoords='figure fraction',
      -             xytext=(-20, -20), textcoords='offset points',
      -             ha="right", va="top",
      -             bbox=bbox_args,
      -             arrowprops=arrow_args
      -             )
      -
      -ax1.annotate('axes fraction : 0, 0', xy=(0, 0),  xycoords='axes fraction',
      -             xytext=(20, 20), textcoords='offset points',
      -             ha="left", va="bottom",
      -             bbox=bbox_args,
      -             arrowprops=arrow_args
      -             )
      -
      -ax1.annotate('axes fraction : 1, 1', xy=(1, 1),  xycoords='axes fraction',
      -             xytext=(-20, -20), textcoords='offset points',
      -             ha="right", va="top",
      -             bbox=bbox_args,
      -             arrowprops=arrow_args
      -             )
      -
      -
      -an1 = ax1.annotate('Drag me 1', xy=(.5, .7),  xycoords='data',
      -                   #xytext=(.5, .7), textcoords='data',
      -                   ha="center", va="center",
      -                   bbox=bbox_args,
      -                   #arrowprops=arrow_args
      -                   )
      -
      -an2 = ax1.annotate('Drag me 2', xy=(.5, .5),  xycoords=an1,
      -                   xytext=(.5, .3), textcoords='axes fraction',
      -                   ha="center", va="center",
      -                   bbox=bbox_args,
      -                   arrowprops=dict(patchB=an1.get_bbox_patch(),
      -                                   connectionstyle="arc3,rad=0.2",
      -                                   **arrow_args)
      -                   )
      -
      -an3 = ax1.annotate('', xy=(.5, .5),  xycoords=an2,
      -                   xytext=(.5, .5),  textcoords=an1,
      -                   ha="center", va="center",
      -                   bbox=bbox_args,
      -                   arrowprops=dict(patchA=an1.get_bbox_patch(),
      -                                   patchB=an2.get_bbox_patch(),
      -                                   connectionstyle="arc3,rad=0.2",
      -                                   **arrow_args)
      -                   )
      -
      -
      -
      -t = ax2.annotate('xy=(0, 1)\nxycoords=("data", "axes fraction")',
      -                 xy=(0, 1),  xycoords=("data", 'axes fraction'),
      -                 xytext=(0, -20), textcoords='offset points',
      -                 ha="center", va="top",
      -                 bbox=bbox_args,
      -                 arrowprops=arrow_args
      -                 )
      -
      -from matplotlib.text import OffsetFrom
      -
      -ax2.annotate('xy=(0.5, 0)\nxycoords=artist',
      -             xy=(0.5, 0.),  xycoords=t,
      -             xytext=(0, -20), textcoords='offset points',
      -             ha="center", va="top",
      -             bbox=bbox_args,
      -             arrowprops=arrow_args
      -             )
      -
      -ax2.annotate('xy=(0.8, 0.5)\nxycoords=ax1.transData',
      -             xy=(0.8, 0.5),  xycoords=ax1.transData,
      -             xytext=(10, 10), textcoords=OffsetFrom(ax2.bbox, (0, 0), "points"),
      -             ha="left", va="bottom",
      -             bbox=bbox_args,
      -             arrowprops=arrow_args
      -             )
      -
      -ax2.set_xlim(-2, 2)
      -ax2.set_ylim(-2, 2)
      -
      -an1.draggable()
      -an2.draggable()
      -
      -plt.show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/pylab_examples/anscombe.html b/dev/examples/pylab_examples/anscombe.html deleted file mode 100644 index bbaa13b0777..00000000000 --- a/dev/examples/pylab_examples/anscombe.html +++ /dev/null @@ -1,209 +0,0 @@ - - - - - - - - pylab_examples example code: anscombe.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      pylab_examples example code: anscombe.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/anscombe.png -
      -
      #!/usr/bin/env python
      -
      -from __future__ import print_function
      -"""
      -Edward Tufte uses this example from Anscombe to show 4 datasets of x
      -and y that have the same mean, standard deviation, and regression
      -line, but which are qualitatively different.
      -
      -matplotlib fun for a rainy day
      -"""
      -
      -from pylab import *
      -
      -x =  array([10, 8, 13, 9, 11, 14, 6, 4, 12, 7, 5])
      -y1 = array([8.04, 6.95, 7.58, 8.81, 8.33, 9.96, 7.24, 4.26, 10.84, 4.82, 5.68])
      -y2 = array([9.14, 8.14, 8.74, 8.77, 9.26, 8.10, 6.13, 3.10, 9.13, 7.26, 4.74])
      -y3 = array([7.46, 6.77, 12.74, 7.11, 7.81, 8.84, 6.08, 5.39, 8.15, 6.42, 5.73])
      -x4 = array([8,8,8,8,8,8,8,19,8,8,8])
      -y4 = array([6.58,5.76,7.71,8.84,8.47,7.04,5.25,12.50,5.56,7.91,6.89])
      -
      -def fit(x):
      -    return 3+0.5*x
      -
      -
      -
      -xfit = array( [amin(x), amax(x) ] )
      -
      -subplot(221)
      -plot(x,y1,'ks', xfit, fit(xfit), 'r-', lw=2)
      -axis([2,20,2,14])
      -setp(gca(), xticklabels=[], yticks=(4,8,12), xticks=(0,10,20))
      -text(3,12, 'I', fontsize=20)
      -
      -subplot(222)
      -plot(x,y2,'ks', xfit, fit(xfit), 'r-', lw=2)
      -axis([2,20,2,14])
      -setp(gca(), xticklabels=[], yticks=(4,8,12), yticklabels=[], xticks=(0,10,20))
      -text(3,12, 'II', fontsize=20)
      -
      -subplot(223)
      -plot(x,y3,'ks', xfit, fit(xfit), 'r-', lw=2)
      -axis([2,20,2,14])
      -text(3,12, 'III', fontsize=20)
      -setp(gca(), yticks=(4,8,12), xticks=(0,10,20))
      -
      -subplot(224)
      -
      -xfit = array([amin(x4),amax(x4)])
      -plot(x4,y4,'ks', xfit, fit(xfit), 'r-', lw=2)
      -axis([2,20,2,14])
      -setp(gca(), yticklabels=[], yticks=(4,8,12), xticks=(0,10,20))
      -text(3,12, 'IV', fontsize=20)
      -
      -#verify the stats
      -pairs = (x,y1), (x,y2), (x,y3), (x4,y4)
      -for x,y in pairs:
      -    print ('mean=%1.2f, std=%1.2f, r=%1.2f'%(mean(y), std(y), corrcoef(x,y)[0][1]))
      -
      -show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/pylab_examples/arctest.html b/dev/examples/pylab_examples/arctest.html deleted file mode 100644 index 6d36341944d..00000000000 --- a/dev/examples/pylab_examples/arctest.html +++ /dev/null @@ -1,167 +0,0 @@ - - - - - - - - pylab_examples example code: arctest.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      pylab_examples example code: arctest.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/arctest.png -
      -
      #!/usr/bin/env python
      -from pylab import *
      -
      -def f(t):
      -    'a damped exponential'
      -    s1 = cos(2*pi*t)
      -    e1 = exp(-t)
      -    return multiply(s1,e1)
      -
      -t1 = arange(0.0, 5.0, .2)
      -
      -
      -l = plot(t1, f(t1), 'ro')
      -setp(l, 'markersize', 30)
      -setp(l, 'markerfacecolor', 'b')
      -
      -show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/pylab_examples/arrow_demo.html b/dev/examples/pylab_examples/arrow_demo.html deleted file mode 100644 index c350701302f..00000000000 --- a/dev/examples/pylab_examples/arrow_demo.html +++ /dev/null @@ -1,462 +0,0 @@ - - - - - - - - pylab_examples example code: arrow_demo.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      pylab_examples example code: arrow_demo.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/arrow_demo1.png -
      -
      #!/usr/bin/env python
      -"""Arrow drawing example for the new fancy_arrow facilities.
      -
      -Code contributed by: Rob Knight <rob@spot.colorado.edu>
      -
      -usage:
      -
      -  python arrow_demo.py realistic|full|sample|extreme
      -
      -
      -"""
      -from pylab import *
      -
      -rates_to_bases={'r1':'AT', 'r2':'TA', 'r3':'GA','r4':'AG','r5':'CA','r6':'AC', \
      -            'r7':'GT', 'r8':'TG', 'r9':'CT','r10':'TC','r11':'GC','r12':'CG'}
      -numbered_bases_to_rates = dict([(v,k) for k, v in rates_to_bases.items()])
      -lettered_bases_to_rates = dict([(v, 'r'+v) for k, v in rates_to_bases.items()])
      -def add_dicts(d1, d2):
      -    """Adds two dicts and returns the result."""
      -    result = d1.copy()
      -    result.update(d2)
      -    return result
      -
      -def make_arrow_plot(data, size=4, display='length', shape='right', \
      -        max_arrow_width=0.03, arrow_sep = 0.02, alpha=0.5, \
      -        normalize_data=False, ec=None, labelcolor=None, \
      -        head_starts_at_zero=True, rate_labels=lettered_bases_to_rates,\
      -        **kwargs):
      -    """Makes an arrow plot.
      -
      -    Parameters:
      -
      -    data: dict with probabilities for the bases and pair transitions.
      -    size: size of the graph in inches.
      -    display: 'length', 'width', or 'alpha' for arrow property to change.
      -    shape: 'full', 'left', or 'right' for full or half arrows.
      -    max_arrow_width: maximum width of an arrow, data coordinates.
      -    arrow_sep: separation between arrows in a pair, data coordinates.
      -    alpha: maximum opacity of arrows, default 0.8.
      -
      -    **kwargs can be anything allowed by a Arrow object, e.g.
      -    linewidth and edgecolor.
      -    """
      -
      -    xlim(-0.5,1.5)
      -    ylim(-0.5,1.5)
      -    gcf().set_size_inches(size,size)
      -    xticks([])
      -    yticks([])
      -    max_text_size = size*12
      -    min_text_size = size
      -    label_text_size = size*2.5
      -    text_params={'ha':'center', 'va':'center', 'family':'sans-serif',\
      -        'fontweight':'bold'}
      -    r2 = sqrt(2)
      -
      -    deltas = {\
      -        'AT':(1,0),
      -        'TA':(-1,0),
      -        'GA':(0,1),
      -        'AG':(0,-1),
      -        'CA':(-1/r2, 1/r2),
      -        'AC':(1/r2, -1/r2),
      -        'GT':(1/r2, 1/r2),
      -        'TG':(-1/r2,-1/r2),
      -        'CT':(0,1),
      -        'TC':(0,-1),
      -        'GC':(1,0),
      -        'CG':(-1,0)
      -        }
      -
      -    colors = {\
      -        'AT':'r',
      -        'TA':'k',
      -        'GA':'g',
      -        'AG':'r',
      -        'CA':'b',
      -        'AC':'r',
      -        'GT':'g',
      -        'TG':'k',
      -        'CT':'b',
      -        'TC':'k',
      -        'GC':'g',
      -        'CG':'b'
      -        }
      -
      -    label_positions = {\
      -        'AT':'center',
      -        'TA':'center',
      -        'GA':'center',
      -        'AG':'center',
      -        'CA':'left',
      -        'AC':'left',
      -        'GT':'left',
      -        'TG':'left',
      -        'CT':'center',
      -        'TC':'center',
      -        'GC':'center',
      -        'CG':'center'
      -        }
      -
      -
      -    def do_fontsize(k):
      -        return float(clip(max_text_size*sqrt(data[k]),\
      -            min_text_size,max_text_size))
      -
      -    A = text(0,1, '$A_3$', color='r', size=do_fontsize('A'), **text_params)
      -    T = text(1,1, '$T_3$', color='k', size=do_fontsize('T'), **text_params)
      -    G = text(0,0, '$G_3$', color='g', size=do_fontsize('G'), **text_params)
      -    C = text(1,0, '$C_3$', color='b', size=do_fontsize('C'), **text_params)
      -
      -    arrow_h_offset = 0.25  #data coordinates, empirically determined
      -    max_arrow_length = 1 - 2*arrow_h_offset
      -
      -    max_arrow_width = max_arrow_width
      -    max_head_width = 2.5*max_arrow_width
      -    max_head_length = 2*max_arrow_width
      -    arrow_params={'length_includes_head':True, 'shape':shape, \
      -        'head_starts_at_zero':head_starts_at_zero}
      -    ax = gca()
      -    sf = 0.6   #max arrow size represents this in data coords
      -
      -    d = (r2/2 + arrow_h_offset - 0.5)/r2    #distance for diags
      -    r2v = arrow_sep/r2                      #offset for diags
      -
      -    #tuple of x, y for start position
      -    positions = {\
      -        'AT': (arrow_h_offset, 1+arrow_sep),
      -        'TA': (1-arrow_h_offset, 1-arrow_sep),
      -        'GA': (-arrow_sep, arrow_h_offset),
      -        'AG': (arrow_sep, 1-arrow_h_offset),
      -        'CA': (1-d-r2v, d-r2v),
      -        'AC': (d+r2v, 1-d+r2v),
      -        'GT': (d-r2v, d+r2v),
      -        'TG': (1-d+r2v, 1-d-r2v),
      -        'CT': (1-arrow_sep, arrow_h_offset),
      -        'TC': (1+arrow_sep, 1-arrow_h_offset),
      -        'GC': (arrow_h_offset, arrow_sep),
      -        'CG': (1-arrow_h_offset, -arrow_sep),
      -        }
      -
      -    if normalize_data:
      -        #find maximum value for rates, i.e. where keys are 2 chars long
      -        max_val = 0
      -        for k, v in data.items():
      -            if len(k) == 2:
      -                max_val = max(max_val, v)
      -        #divide rates by max val, multiply by arrow scale factor
      -        for k, v in data.items():
      -            data[k] = v/max_val*sf
      -
      -    def draw_arrow(pair, alpha=alpha, ec=ec, labelcolor=labelcolor):
      -        #set the length of the arrow
      -        if display == 'length':
      -            length = max_head_length+(max_arrow_length-max_head_length)*\
      -                data[pair]/sf
      -        else:
      -            length = max_arrow_length
      -        #set the transparency of the arrow
      -        if display == 'alph':
      -            alpha = min(data[pair]/sf, alpha)
      -        else:
      -            alpha=alpha
      -        #set the width of the arrow
      -        if display == 'width':
      -            scale = data[pair]/sf
      -            width = max_arrow_width*scale
      -            head_width = max_head_width*scale
      -            head_length = max_head_length*scale
      -        else:
      -            width = max_arrow_width
      -            head_width = max_head_width
      -            head_length = max_head_length
      -
      -        fc = colors[pair]
      -        ec = ec or fc
      -
      -        x_scale, y_scale = deltas[pair]
      -        x_pos, y_pos = positions[pair]
      -        arrow(x_pos, y_pos, x_scale*length, y_scale*length, \
      -            fc=fc, ec=ec, alpha=alpha, width=width, head_width=head_width, \
      -            head_length=head_length, **arrow_params)
      -
      -        #figure out coordinates for text
      -        #if drawing relative to base: x and y are same as for arrow
      -        #dx and dy are one arrow width left and up
      -        #need to rotate based on direction of arrow, use x_scale and y_scale
      -        #as sin x and cos x?
      -        sx, cx = y_scale, x_scale
      -
      -        where = label_positions[pair]
      -        if where == 'left':
      -            orig_position = 3*array([[max_arrow_width, max_arrow_width]])
      -        elif where == 'absolute':
      -            orig_position = array([[max_arrow_length/2.0, 3*max_arrow_width]])
      -        elif where == 'right':
      -            orig_position = array([[length-3*max_arrow_width,\
      -                3*max_arrow_width]])
      -        elif where == 'center':
      -            orig_position = array([[length/2.0, 3*max_arrow_width]])
      -        else:
      -            raise ValueError("Got unknown position parameter %s" % where)
      -
      -
      -
      -        M = array([[cx, sx],[-sx,cx]])
      -        coords = dot(orig_position, M) + [[x_pos, y_pos]]
      -        x, y = ravel(coords)
      -        orig_label = rate_labels[pair]
      -        label = '$%s_{_{\mathrm{%s}}}$' % (orig_label[0], orig_label[1:])
      -
      -        text(x, y, label, size=label_text_size, ha='center', va='center', \
      -            color=labelcolor or fc)
      -
      -    for p in positions.keys():
      -        draw_arrow(p)
      -
      -    #test data
      -all_on_max = dict([(i, 1) for i in 'TCAG'] + \
      -        [(i+j, 0.6) for i in 'TCAG' for j in 'TCAG'])
      -
      -realistic_data = {
      -        'A':0.4,
      -        'T':0.3,
      -        'G':0.5,
      -        'C':0.2,
      -        'AT':0.4,
      -        'AC':0.3,
      -        'AG':0.2,
      -        'TA':0.2,
      -        'TC':0.3,
      -        'TG':0.4,
      -        'CT':0.2,
      -        'CG':0.3,
      -        'CA':0.2,
      -        'GA':0.1,
      -        'GT':0.4,
      -        'GC':0.1,
      -    }
      -
      -extreme_data = {
      -        'A':0.75,
      -        'T':0.10,
      -        'G':0.10,
      -        'C':0.05,
      -        'AT':0.6,
      -        'AC':0.3,
      -        'AG':0.1,
      -        'TA':0.02,
      -        'TC':0.3,
      -        'TG':0.01,
      -        'CT':0.2,
      -        'CG':0.5,
      -        'CA':0.2,
      -        'GA':0.1,
      -        'GT':0.4,
      -        'GC':0.2,
      -    }
      -
      -sample_data = {
      -        'A':0.2137,
      -        'T':0.3541,
      -        'G':0.1946,
      -        'C':0.2376,
      -        'AT':0.0228,
      -        'AC':0.0684,
      -        'AG':0.2056,
      -        'TA':0.0315,
      -        'TC':0.0629,
      -        'TG':0.0315,
      -        'CT':0.1355,
      -        'CG':0.0401,
      -        'CA':0.0703,
      -        'GA':0.1824,
      -        'GT':0.0387,
      -        'GC':0.1106,
      -    }
      -
      -
      -if __name__ == '__main__':
      -    from sys import argv
      -    d = None
      -    if len(argv) > 1:
      -        if argv[1] == 'full':
      -            d = all_on_max
      -            scaled = False
      -        elif argv[1] == 'extreme':
      -            d = extreme_data
      -            scaled = False
      -        elif argv[1] == 'realistic':
      -            d = realistic_data
      -            scaled = False
      -        elif argv[1] == 'sample':
      -            d = sample_data
      -            scaled = True
      -    if d is None:
      -        d = all_on_max
      -        scaled=False
      -    if len(argv) > 2:
      -        display = argv[2]
      -    else:
      -        display = 'length'
      -
      -    size = 4
      -    figure(figsize=(size,size))
      -
      -    make_arrow_plot(d, display=display, linewidth=0.001, edgecolor=None,
      -        normalize_data=scaled, head_starts_at_zero=True, size=size)
      -
      -    draw()
      -
      -    show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/pylab_examples/arrow_simple_demo.html b/dev/examples/pylab_examples/arrow_simple_demo.html deleted file mode 100644 index d0561bfd782..00000000000 --- a/dev/examples/pylab_examples/arrow_simple_demo.html +++ /dev/null @@ -1,155 +0,0 @@ - - - - - - - - pylab_examples example code: arrow_simple_demo.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      pylab_examples example code: arrow_simple_demo.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/arrow_simple_demo.png -
      -
      import matplotlib.pyplot as plt
      -
      -ax = plt.axes()
      -ax.arrow(0, 0, 0.5, 0.5, head_width=0.05, head_length=0.1, fc='k', ec='k')
      -plt.show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/pylab_examples/aspect_loglog.html b/dev/examples/pylab_examples/aspect_loglog.html deleted file mode 100644 index d80e0730bd4..00000000000 --- a/dev/examples/pylab_examples/aspect_loglog.html +++ /dev/null @@ -1,172 +0,0 @@ - - - - - - - - pylab_examples example code: aspect_loglog.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      pylab_examples example code: aspect_loglog.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/aspect_loglog.png -
      -
      import matplotlib.pyplot as plt
      -
      -ax1 = plt.subplot(121)
      -ax1.set_xscale("log")
      -ax1.set_yscale("log")
      -ax1.set_xlim(1e1, 1e3)
      -ax1.set_ylim(1e2, 1e3)
      -ax1.set_aspect(1)
      -ax1.set_title("adjustable = box")
      -
      -ax2 = plt.subplot(122)
      -ax2.set_xscale("log")
      -ax2.set_yscale("log")
      -ax2.set_adjustable("datalim")
      -ax2.plot([1,3, 10], [1, 9, 100], "o-")
      -ax2.set_xlim(1e-1, 1e2)
      -ax2.set_ylim(1e-1, 1e3)
      -ax2.set_aspect(1)
      -ax2.set_title("adjustable = datalim")
      -
      -plt.draw()
      -plt.show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/pylab_examples/axes_demo.html b/dev/examples/pylab_examples/axes_demo.html deleted file mode 100644 index ce8709c1e2f..00000000000 --- a/dev/examples/pylab_examples/axes_demo.html +++ /dev/null @@ -1,182 +0,0 @@ - - - - - - - - pylab_examples example code: axes_demo.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      pylab_examples example code: axes_demo.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/axes_demo.png -
      -
      #!/usr/bin/env python
      -
      -from pylab import *
      -
      -# create some data to use for the plot
      -dt = 0.001
      -t = arange(0.0, 10.0, dt)
      -r = exp(-t[:1000]/0.05)               # impulse response
      -x = randn(len(t))
      -s = convolve(x,r)[:len(x)]*dt  # colored noise
      -
      -# the main axes is subplot(111) by default
      -plot(t, s)
      -axis([0, 1, 1.1*amin(s), 2*amax(s) ])
      -xlabel('time (s)')
      -ylabel('current (nA)')
      -title('Gaussian colored noise')
      -
      -# this is an inset axes over the main axes
      -a = axes([.65, .6, .2, .2], axisbg='y')
      -n, bins, patches = hist(s, 400, normed=1)
      -title('Probability')
      -setp(a, xticks=[], yticks=[])
      -
      -# this is another inset axes over the main axes
      -a = axes([0.2, 0.6, .2, .2], axisbg='y')
      -plot(t[:len(r)], r)
      -title('Impulse response')
      -setp(a, xlim=(0,.2), xticks=[], yticks=[])
      -
      -
      -show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/pylab_examples/axes_props.html b/dev/examples/pylab_examples/axes_props.html deleted file mode 100644 index 2c5e5ca27ba..00000000000 --- a/dev/examples/pylab_examples/axes_props.html +++ /dev/null @@ -1,212 +0,0 @@ - - - - - - - - pylab_examples example code: axes_props.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      pylab_examples example code: axes_props.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/axes_props.png -
      -
      #!/usr/bin/env python
      -"""
      -You can control the axis tick and grid properties
      -"""
      -
      -from pylab import *
      -
      -t = arange(0.0, 2.0, 0.01)
      -s = sin(2*pi*t)
      -plot(t, s)
      -grid(True)
      -
      -# MATLAB style
      -xticklines = getp(gca(), 'xticklines')
      -yticklines = getp(gca(), 'yticklines')
      -xgridlines = getp(gca(), 'xgridlines')
      -ygridlines = getp(gca(), 'ygridlines')
      -xticklabels = getp(gca(), 'xticklabels')
      -yticklabels = getp(gca(), 'yticklabels')
      -
      -setp(xticklines, 'linewidth', 3)
      -setp(yticklines, 'linewidth', 3)
      -setp(xgridlines, 'linestyle', '-')
      -setp(ygridlines, 'linestyle', '-')
      -setp(yticklabels, 'color', 'r', fontsize='medium')
      -setp(xticklabels, 'color', 'r', fontsize='medium')
      -
      -
      -
      -show()
      -
      -
      -"""
      -# the same script, python style
      -from pylab import *
      -
      -t = arange(0.0, 2.0, 0.01)
      -s = sin(2*pi*t)
      -ax = subplot(111)
      -ax.plot(t, s)
      -ax.grid(True)
      -
      -ticklines = ax.get_xticklines()
      -ticklines.extend( ax.get_yticklines() )
      -gridlines = ax.get_xgridlines()
      -gridlines.extend( ax.get_ygridlines() )
      -ticklabels = ax.get_xticklabels()
      -ticklabels.extend( ax.get_yticklabels() )
      -
      -for line in ticklines:
      -    line.set_linewidth(3)
      -
      -for line in gridlines:
      -    line.set_linestyle('-')
      -
      -for label in ticklabels:
      -    label.set_color('r')
      -    label.set_fontsize('medium')
      -
      -show()
      -
      -"""
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/pylab_examples/axes_zoom_effect.html b/dev/examples/pylab_examples/axes_zoom_effect.html deleted file mode 100644 index d6856b80f77..00000000000 --- a/dev/examples/pylab_examples/axes_zoom_effect.html +++ /dev/null @@ -1,268 +0,0 @@ - - - - - - - - pylab_examples example code: axes_zoom_effect.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      pylab_examples example code: axes_zoom_effect.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/axes_zoom_effect.png -
      -
      from matplotlib.transforms import Bbox, TransformedBbox, \
      -     blended_transform_factory
      -
      -from mpl_toolkits.axes_grid1.inset_locator import BboxPatch, BboxConnector,\
      -     BboxConnectorPatch
      -
      -
      -def connect_bbox(bbox1, bbox2,
      -                 loc1a, loc2a, loc1b, loc2b,
      -                 prop_lines, prop_patches=None):
      -    if prop_patches is None:
      -        prop_patches = prop_lines.copy()
      -        prop_patches["alpha"] = prop_patches.get("alpha", 1)*0.2
      -
      -    c1 = BboxConnector(bbox1, bbox2, loc1=loc1a, loc2=loc2a, **prop_lines)
      -    c1.set_clip_on(False)
      -    c2 = BboxConnector(bbox1, bbox2, loc1=loc1b, loc2=loc2b, **prop_lines)
      -    c2.set_clip_on(False)
      -
      -    bbox_patch1 = BboxPatch(bbox1, **prop_patches)
      -    bbox_patch2 = BboxPatch(bbox2, **prop_patches)
      -
      -    p = BboxConnectorPatch(bbox1, bbox2,
      -                           #loc1a=3, loc2a=2, loc1b=4, loc2b=1,
      -                           loc1a=loc1a, loc2a=loc2a, loc1b=loc1b, loc2b=loc2b,
      -                           **prop_patches)
      -    p.set_clip_on(False)
      -
      -    return c1, c2, bbox_patch1, bbox_patch2, p
      -
      -
      -def zoom_effect01(ax1, ax2, xmin, xmax, **kwargs):
      -    """
      -    ax1 : the main axes
      -    ax1 : the zoomed axes
      -    (xmin,xmax) : the limits of the colored area in both plot axes.
      -
      -    connect ax1 & ax2. The x-range of (xmin, xmax) in both axes will
      -    be marked.  The keywords parameters will be used ti create
      -    patches.
      -
      -    """
      -
      -    trans1 = blended_transform_factory(ax1.transData, ax1.transAxes)
      -    trans2 = blended_transform_factory(ax2.transData, ax2.transAxes)
      -
      -    bbox = Bbox.from_extents(xmin, 0, xmax, 1)
      -
      -    mybbox1 = TransformedBbox(bbox, trans1)
      -    mybbox2 = TransformedBbox(bbox, trans2)
      -
      -    prop_patches=kwargs.copy()
      -    prop_patches["ec"]="none"
      -    prop_patches["alpha"]=0.2
      -
      -    c1, c2, bbox_patch1, bbox_patch2, p = \
      -        connect_bbox(mybbox1, mybbox2,
      -                     loc1a=3, loc2a=2, loc1b=4, loc2b=1,
      -                     prop_lines=kwargs, prop_patches=prop_patches)
      -
      -    ax1.add_patch(bbox_patch1)
      -    ax2.add_patch(bbox_patch2)
      -    ax2.add_patch(c1)
      -    ax2.add_patch(c2)
      -    ax2.add_patch(p)
      -
      -    return c1, c2, bbox_patch1, bbox_patch2, p
      -
      -
      -def zoom_effect02(ax1, ax2, **kwargs):
      -    """
      -    ax1 : the main axes
      -    ax1 : the zoomed axes
      -
      -    Similar to zoom_effect01.  The xmin & xmax will be taken from the
      -    ax1.viewLim.
      -    """
      -
      -    tt = ax1.transScale + (ax1.transLimits + ax2.transAxes)
      -    trans = blended_transform_factory(ax2.transData, tt)
      -
      -    mybbox1 = ax1.bbox
      -    mybbox2 = TransformedBbox(ax1.viewLim, trans)
      -
      -    prop_patches=kwargs.copy()
      -    prop_patches["ec"]="none"
      -    prop_patches["alpha"]=0.2
      -
      -    c1, c2, bbox_patch1, bbox_patch2, p = \
      -        connect_bbox(mybbox1, mybbox2,
      -                     loc1a=3, loc2a=2, loc1b=4, loc2b=1,
      -                     prop_lines=kwargs, prop_patches=prop_patches)
      -
      -    ax1.add_patch(bbox_patch1)
      -    ax2.add_patch(bbox_patch2)
      -    ax2.add_patch(c1)
      -    ax2.add_patch(c2)
      -    ax2.add_patch(p)
      -
      -    return c1, c2, bbox_patch1, bbox_patch2, p
      -
      -
      -import matplotlib.pyplot as plt
      -
      -plt.figure(1, figsize=(5,5))
      -ax1 = plt.subplot(221)
      -ax2 = plt.subplot(212)
      -ax2.set_xlim(0, 1)
      -ax2.set_xlim(0, 5)
      -zoom_effect01(ax1, ax2, 0.2, 0.8)
      -
      -
      -ax1 = plt.subplot(222)
      -ax1.set_xlim(2, 3)
      -ax2.set_xlim(0, 5)
      -zoom_effect02(ax1, ax2)
      -
      -plt.show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/pylab_examples/axhspan_demo.html b/dev/examples/pylab_examples/axhspan_demo.html deleted file mode 100644 index 6a48a8432e0..00000000000 --- a/dev/examples/pylab_examples/axhspan_demo.html +++ /dev/null @@ -1,182 +0,0 @@ - - - - - - - - pylab_examples example code: axhspan_demo.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      pylab_examples example code: axhspan_demo.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/axhspan_demo1.png -
      -
      import numpy as np
      -import matplotlib.pyplot as plt
      -
      -t = np.arange(-1,2, .01)
      -s = np.sin(2*np.pi*t)
      -
      -plt.plot(t,s)
      -# draw a thick red hline at y=0 that spans the xrange
      -l = plt.axhline(linewidth=4, color='r')
      -
      -# draw a default hline at y=1 that spans the xrange
      -l = plt.axhline(y=1)
      -
      -# draw a default vline at x=1 that spans the yrange
      -l = plt.axvline(x=1)
      -
      -# draw a thick blue vline at x=0 that spans the upper quadrant of
      -# the yrange
      -l = plt.axvline(x=0, ymin=0.75, linewidth=4, color='b')
      -
      -# draw a default hline at y=.5 that spans the the middle half of
      -# the axes
      -l = plt.axhline(y=.5, xmin=0.25, xmax=0.75)
      -
      -p = plt.axhspan(0.25, 0.75, facecolor='0.5', alpha=0.5)
      -
      -p = plt.axvspan(1.25, 1.55, facecolor='g', alpha=0.5)
      -
      -plt.axis([-1,2,-1,2])
      -
      -
      -plt.show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/pylab_examples/axis_equal_demo.html b/dev/examples/pylab_examples/axis_equal_demo.html deleted file mode 100644 index 91d1902fcb3..00000000000 --- a/dev/examples/pylab_examples/axis_equal_demo.html +++ /dev/null @@ -1,181 +0,0 @@ - - - - - - - - pylab_examples example code: axis_equal_demo.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      pylab_examples example code: axis_equal_demo.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/axis_equal_demo.png -
      -
      '''This example is only interesting when ran in interactive mode'''
      -
      -from pylab import *
      -
      -# Plot circle or radius 3
      -
      -an = linspace(0,2*pi,100)
      -
      -subplot(221)
      -plot( 3*cos(an), 3*sin(an) )
      -title('not equal, looks like ellipse',fontsize=10)
      -
      -subplot(222)
      -plot( 3*cos(an), 3*sin(an) )
      -axis('equal')
      -title('equal, looks like circle',fontsize=10)
      -
      -subplot(223)
      -plot( 3*cos(an), 3*sin(an) )
      -axis('equal')
      -axis([-3,3,-3,3])
      -title('looks like circle, even after changing limits',fontsize=10)
      -
      -subplot(224)
      -plot( 3*cos(an), 3*sin(an) )
      -axis('equal')
      -axis([-3,3,-3,3])
      -plot([0,4],[0,4])
      -title('still equal after adding line',fontsize=10)
      -
      -show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/pylab_examples/bar_stacked.html b/dev/examples/pylab_examples/bar_stacked.html deleted file mode 100644 index 5f63ba75882..00000000000 --- a/dev/examples/pylab_examples/bar_stacked.html +++ /dev/null @@ -1,175 +0,0 @@ - - - - - - - - pylab_examples example code: bar_stacked.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      pylab_examples example code: bar_stacked.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/bar_stacked.png -
      -
      #!/usr/bin/env python
      -# a stacked bar plot with errorbars
      -import numpy as np
      -import matplotlib.pyplot as plt
      -
      -
      -N = 5
      -menMeans   = (20, 35, 30, 35, 27)
      -womenMeans = (25, 32, 34, 20, 25)
      -menStd     = (2, 3, 4, 1, 2)
      -womenStd   = (3, 5, 2, 3, 3)
      -ind = np.arange(N)    # the x locations for the groups
      -width = 0.35       # the width of the bars: can also be len(x) sequence
      -
      -p1 = plt.bar(ind, menMeans,   width, color='r', yerr=womenStd)
      -p2 = plt.bar(ind, womenMeans, width, color='y',
      -             bottom=menMeans, yerr=menStd)
      -
      -plt.ylabel('Scores')
      -plt.title('Scores by group and gender')
      -plt.xticks(ind+width/2., ('G1', 'G2', 'G3', 'G4', 'G5') )
      -plt.yticks(np.arange(0,81,10))
      -plt.legend( (p1[0], p2[0]), ('Men', 'Women') )
      -
      -plt.show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/pylab_examples/barb_demo.html b/dev/examples/pylab_examples/barb_demo.html deleted file mode 100644 index cc73ff3c094..00000000000 --- a/dev/examples/pylab_examples/barb_demo.html +++ /dev/null @@ -1,208 +0,0 @@ - - - - - - - - pylab_examples example code: barb_demo.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      pylab_examples example code: barb_demo.py

      -

      (Source code)

      -
      -../../_images/barb_demo_001.png -

      (png, hires.png, pdf)

      -
      -
      -../../_images/barb_demo_011.png -

      (png, hires.png, pdf)

      -
      -
      '''
      -Demonstration of wind barb plots
      -'''
      -import matplotlib.pyplot as plt
      -import numpy as np
      -
      -x = np.linspace(-5, 5, 5)
      -X,Y = np.meshgrid(x, x)
      -U, V = 12*X, 12*Y
      -
      -data = [(-1.5, .5, -6, -6),
      -        (1, -1, -46, 46),
      -        (-3, -1, 11, -11),
      -        (1, 1.5, 80, 80),
      -        (0.5, 0.25, 25, 15),
      -        (-1.5, -0.5, -5, 40)]
      -
      -data = np.array(data, dtype=[('x', np.float32), ('y', np.float32),
      -    ('u', np.float32), ('v', np.float32)])
      -
      -#Default parameters, uniform grid
      -ax = plt.subplot(2,2,1)
      -ax.barbs(X, Y, U, V)
      -
      -#Arbitrary set of vectors, make them longer and change the pivot point
      -#(point around which they're rotated) to be the middle
      -ax = plt.subplot(2,2,2)
      -ax.barbs(data['x'], data['y'], data['u'], data['v'], length=8, pivot='middle')
      -
      -#Showing colormapping with uniform grid.  Fill the circle for an empty barb,
      -#don't round the values, and change some of the size parameters
      -ax = plt.subplot(2,2,3)
      -ax.barbs(X, Y, U, V, np.sqrt(U*U + V*V), fill_empty=True, rounding=False,
      -    sizes=dict(emptybarb=0.25, spacing=0.2, height=0.3))
      -
      -#Change colors as well as the increments for parts of the barbs
      -ax = plt.subplot(2,2,4)
      -ax.barbs(data['x'], data['y'], data['u'], data['v'], flagcolor='r',
      -    barbcolor=['b','g'], barb_increments=dict(half=10, full=20, flag=100),
      -    flip_barb=True)
      -
      -#Masked arrays are also supported
      -masked_u = np.ma.masked_array(data['u'])
      -masked_u[4] = 1000 #Bad value that should not be plotted when masked
      -masked_u[4] = np.ma.masked
      -
      -#Identical plot to panel 2 in the first figure, but with the point at
      -#(0.5, 0.25) missing (masked)
      -fig2 = plt.figure()
      -ax = fig2.add_subplot(1, 1, 1)
      -ax.barbs(data['x'], data['y'], masked_u, data['v'], length=8, pivot='middle')
      -
      -plt.show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/pylab_examples/barchart_demo.html b/dev/examples/pylab_examples/barchart_demo.html deleted file mode 100644 index f90d7f4f371..00000000000 --- a/dev/examples/pylab_examples/barchart_demo.html +++ /dev/null @@ -1,193 +0,0 @@ - - - - - - - - pylab_examples example code: barchart_demo.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      pylab_examples example code: barchart_demo.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/barchart_demo1.png -
      -
      """
      -Bar chart demo with pairs of bars grouped for easy comparison.
      -"""
      -import numpy as np
      -import matplotlib.pyplot as plt
      -
      -
      -n_groups = 5
      -
      -means_men = (20, 35, 30, 35, 27)
      -std_men = (2, 3, 4, 1, 2)
      -
      -means_women = (25, 32, 34, 20, 25)
      -std_women = (3, 5, 2, 3, 3)
      -
      -index = np.arange(n_groups)
      -bar_width = 0.35
      -
      -opacity = 0.4
      -error_config = {'ecolor': '0.3'}
      -
      -rects1 = plt.bar(index, means_men, bar_width,
      -                 alpha=opacity,
      -                 color='b',
      -                 yerr=std_men,
      -                 error_kw=error_config,
      -                 label='Men')
      -
      -rects2 = plt.bar(index + bar_width, means_women, bar_width,
      -                 alpha=opacity,
      -                 color='r',
      -                 yerr=std_women,
      -                 error_kw=error_config,
      -                 label='Women')
      -
      -plt.xlabel('Group')
      -plt.ylabel('Scores')
      -plt.title('Scores by group and gender')
      -plt.xticks(index + bar_width, ('A', 'B', 'C', 'D', 'E'))
      -plt.legend()
      -
      -plt.tight_layout()
      -plt.show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/pylab_examples/barchart_demo2.html b/dev/examples/pylab_examples/barchart_demo2.html deleted file mode 100644 index 296199cc738..00000000000 --- a/dev/examples/pylab_examples/barchart_demo2.html +++ /dev/null @@ -1,256 +0,0 @@ - - - - - - - - pylab_examples example code: barchart_demo2.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      pylab_examples example code: barchart_demo2.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/barchart_demo2.png -
      -
      """
      -Thanks Josh Hemann for the example
      -
      -This examples comes from an application in which grade school gym
      -teachers wanted to be able to show parents how their child did across
      -a handful of fitness tests, and importantly, relative to how other
      -children did. To extract the plotting code for demo purposes, we'll
      -just make up some data for little Johnny Doe...
      -
      -"""
      -import numpy as np
      -import matplotlib.pyplot as plt
      -import pylab
      -from matplotlib.patches import Polygon
      -from matplotlib.ticker import MaxNLocator
      -
      -
      -
      -student = 'Johnny Doe'
      -grade = 2
      -gender = 'boy'
      -cohortSize = 62 #The number of other 2nd grade boys
      -
      -numTests = 5
      -testNames = ['Pacer Test', 'Flexed Arm\n Hang', 'Mile Run', 'Agility',
      -            'Push Ups']
      -testMeta = ['laps', 'sec', 'min:sec', 'sec', '']
      -scores = ['7', '48', '12:52', '17', '14']
      -rankings = np.round(np.random.uniform(0, 1, numTests)*100, 0)
      -
      -fig = plt.figure(figsize=(9,7))
      -ax1 = fig.add_subplot(111)
      -plt.subplots_adjust(left=0.115, right=0.88)
      -fig.canvas.set_window_title('Eldorado K-8 Fitness Chart')
      -pos = np.arange(numTests)+0.5    #Center bars on the Y-axis ticks
      -rects = ax1.barh(pos, rankings, align='center', height=0.5, color='m')
      -
      -ax1.axis([0,100,0,5])
      -pylab.yticks(pos, testNames)
      -ax1.set_title('Johnny Doe')
      -plt.text(50, -0.5, 'Cohort Size: ' + str(cohortSize),
      -        horizontalalignment='center', size='small')
      -
      -# Set the right-hand Y-axis ticks and labels and set X-axis tick marks at the
      -# deciles
      -ax2 = ax1.twinx()
      -ax2.plot([100,100], [0, 5], 'white', alpha=0.1)
      -ax2.xaxis.set_major_locator(MaxNLocator(11))
      -xticks = pylab.setp(ax2, xticklabels=['0','10','20','30','40','50','60',
      -'70',
      -                                     '80','90','100'])
      -ax2.xaxis.grid(True, linestyle='--', which='major', color='grey',
      -alpha=0.25)
      -#Plot a solid vertical gridline to highlight the median position
      -plt.plot([50,50], [0, 5], 'grey', alpha=0.25)
      -
      -# Build up the score labels for the right Y-axis by first appending a carriage
      -# return to each string and then tacking on the appropriate meta information
      -# (i.e., 'laps' vs 'seconds'). We want the labels centered on the ticks, so if
      -# there is no meta info (like for pushups) then don't add the carriage return to
      -# the string
      -
      -def withnew(i, scr):
      -    if testMeta[i] != '' : return '%s\n'%scr
      -    else: return scr
      -scoreLabels = [withnew(i, scr) for i,scr in enumerate(scores)]
      -scoreLabels = [i+j for i,j in zip(scoreLabels, testMeta)]
      -pylab.yticks(pos, scoreLabels)
      -ax2.set_ylabel('Test Scores')
      -#Make list of numerical suffixes corresponding to position in a list
      -#           0     1     2     3     4     5     6     7     8     9
      -suffixes =['th', 'st', 'nd', 'rd', 'th', 'th', 'th', 'th', 'th', 'th']
      -ax2.set_xlabel('Percentile Ranking Across ' + str(grade) + suffixes[grade] \
      -              + ' Grade ' + gender.title() + 's')
      -
      -# Lastly, write in the ranking inside each bar to aid in interpretation
      -for rect in rects:
      -   # Rectangle widths are already integer-valued but are floating
      -   # type, so it helps to remove the trailing decimal point and 0 by
      -   # converting width to int type
      -   width = int(rect.get_width())
      -
      -   # Figure out what the last digit (width modulo 10) so we can add
      -   # the appropriate numerical suffix (e.g., 1st, 2nd, 3rd, etc)
      -   lastDigit = width % 10
      -   # Note that 11, 12, and 13 are special cases
      -   if (width == 11) or (width == 12) or (width == 13):
      -       suffix = 'th'
      -   else:
      -       suffix = suffixes[lastDigit]
      -
      -   rankStr = str(width) + suffix
      -   if (width < 5): # The bars aren't wide enough to print the ranking inside
      -       xloc = width + 1 # Shift the text to the right side of the right edge
      -       clr = 'black' # Black against white background
      -       align = 'left'
      -   else:
      -       xloc = 0.98*width # Shift the text to the left side of the right edge
      -       clr = 'white' # White on magenta
      -       align = 'right'
      -
      -   yloc = rect.get_y()+rect.get_height()/2.0 #Center the text vertically in the bar
      -   ax1.text(xloc, yloc, rankStr, horizontalalignment=align,
      -            verticalalignment='center', color=clr, weight='bold')
      -
      -plt.show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/pylab_examples/barcode_demo.html b/dev/examples/pylab_examples/barcode_demo.html deleted file mode 100644 index 45607a4918e..00000000000 --- a/dev/examples/pylab_examples/barcode_demo.html +++ /dev/null @@ -1,175 +0,0 @@ - - - - - - - - pylab_examples example code: barcode_demo.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      pylab_examples example code: barcode_demo.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/barcode_demo.png -
      -
      from matplotlib.pyplot import figure, show, cm
      -from numpy import where
      -from numpy.random import rand
      -
      -# the bar
      -x = where(rand(500)>0.7, 1.0, 0.0)
      -
      -axprops = dict(xticks=[], yticks=[])
      -barprops = dict(aspect='auto', cmap=cm.binary, interpolation='nearest')
      -
      -fig = figure()
      -
      -# a vertical barcode -- this is broken at present
      -x.shape = len(x), 1
      -ax = fig.add_axes([0.1, 0.3, 0.1, 0.6], **axprops)
      -ax.imshow(x, **barprops)
      -
      -x = x.copy()
      -# a horizontal barcode
      -x.shape = 1, len(x)
      -ax = fig.add_axes([0.3, 0.1, 0.6, 0.1], **axprops)
      -ax.imshow(x, **barprops)
      -
      -
      -show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/pylab_examples/barh_demo.html b/dev/examples/pylab_examples/barh_demo.html deleted file mode 100644 index d6bde350090..00000000000 --- a/dev/examples/pylab_examples/barh_demo.html +++ /dev/null @@ -1,181 +0,0 @@ - - - - - - - - - - pylab_examples example code: barh_demo.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      pylab_examples example code: barh_demo.py

      -

      (Source code)

      -
      -../../_images/barh_demo_00.png -

      (png, hires.png, pdf)

      -
      -
      -../../_images/barh_demo_01.png -

      (png, hires.png, pdf)

      -
      -
      #!/usr/bin/env python
      -# make a horizontal bar chart
      -
      -from pylab import *
      -val = 3+10*rand(5)    # the bar lengths
      -pos = arange(5)+.5    # the bar centers on the y axis
      -
      -figure(1)
      -barh(pos,val, align='center')
      -yticks(pos, ('Tom', 'Dick', 'Harry', 'Slim', 'Jim'))
      -xlabel('Performance')
      -title('How fast do you want to go today?')
      -grid(True)
      -
      -figure(2)
      -barh(pos,val, xerr=rand(5), ecolor='r', align='center')
      -yticks(pos, ('Tom', 'Dick', 'Harry', 'Slim', 'Jim'))
      -xlabel('Performance')
      -
      -show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/pylab_examples/boxplot_demo.html b/dev/examples/pylab_examples/boxplot_demo.html deleted file mode 100644 index 4bf9034886e..00000000000 --- a/dev/examples/pylab_examples/boxplot_demo.html +++ /dev/null @@ -1,232 +0,0 @@ - - - - - - - - pylab_examples example code: boxplot_demo.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      pylab_examples example code: boxplot_demo.py

      -

      (Source code)

      -
      -../../_images/boxplot_demo_001.png -

      (png, hires.png, pdf)

      -
      -
      -../../_images/boxplot_demo_011.png -

      (png, hires.png, pdf)

      -
      -
      -../../_images/boxplot_demo_021.png -

      (png, hires.png, pdf)

      -
      -
      -../../_images/boxplot_demo_031.png -

      (png, hires.png, pdf)

      -
      -
      -../../_images/boxplot_demo_041.png -

      (png, hires.png, pdf)

      -
      -
      -../../_images/boxplot_demo_051.png -

      (png, hires.png, pdf)

      -
      -
      -../../_images/boxplot_demo_061.png -

      (png, hires.png, pdf)

      -
      -
      #!/usr/bin/python
      -
      -#
      -# Example boxplot code
      -#
      -
      -from pylab import *
      -
      -# fake up some data
      -spread= rand(50) * 100
      -center = ones(25) * 50
      -flier_high = rand(10) * 100 + 100
      -flier_low = rand(10) * -100
      -data =concatenate((spread, center, flier_high, flier_low), 0)
      -
      -# basic plot
      -boxplot(data)
      -
      -# notched plot
      -figure()
      -boxplot(data,1)
      -
      -# change outlier point symbols
      -figure()
      -boxplot(data,0,'gD')
      -
      -# don't show outlier points
      -figure()
      -boxplot(data,0,'')
      -
      -# horizontal boxes
      -figure()
      -boxplot(data,0,'rs',0)
      -
      -# change whisker length
      -figure()
      -boxplot(data,0,'rs',0,0.75)
      -
      -# fake up some more data
      -spread= rand(50) * 100
      -center = ones(25) * 40
      -flier_high = rand(10) * 100 + 100
      -flier_low = rand(10) * -100
      -d2 = concatenate( (spread, center, flier_high, flier_low), 0 )
      -data.shape = (-1, 1)
      -d2.shape = (-1, 1)
      -#data = concatenate( (data, d2), 1 )
      -# Making a 2-D array only works if all the columns are the
      -# same length.  If they are not, then use a list instead.
      -# This is actually more efficient because boxplot converts
      -# a 2-D array into a list of vectors internally anyway.
      -data = [data, d2, d2[::2,0]]
      -# multiple box plots on one figure
      -figure()
      -boxplot(data)
      -
      -show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/pylab_examples/boxplot_demo2.html b/dev/examples/pylab_examples/boxplot_demo2.html deleted file mode 100644 index 23bddf02e20..00000000000 --- a/dev/examples/pylab_examples/boxplot_demo2.html +++ /dev/null @@ -1,271 +0,0 @@ - - - - - - - - pylab_examples example code: boxplot_demo2.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      pylab_examples example code: boxplot_demo2.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/boxplot_demo2.png -
      -
      """
      -Thanks Josh Hemann for the example
      -"""
      -
      -import numpy as np
      -import matplotlib.pyplot as plt
      -from matplotlib.patches import Polygon
      -
      -
      -# Generate some data from five different probability distributions,
      -# each with different characteristics. We want to play with how an IID
      -# bootstrap resample of the data preserves the distributional
      -# properties of the original sample, and a boxplot is one visual tool
      -# to make this assessment
      -numDists = 5
      -randomDists = ['Normal(1,1)',' Lognormal(1,1)', 'Exp(1)', 'Gumbel(6,4)',
      -              'Triangular(2,9,11)']
      -N = 500
      -norm = np.random.normal(1,1, N)
      -logn = np.random.lognormal(1,1, N)
      -expo = np.random.exponential(1, N)
      -gumb = np.random.gumbel(6, 4, N)
      -tria = np.random.triangular(2, 9, 11, N)
      -
      -# Generate some random indices that we'll use to resample the original data
      -# arrays. For code brevity, just use the same random indices for each array
      -bootstrapIndices = np.random.random_integers(0, N-1, N)
      -normBoot = norm[bootstrapIndices]
      -expoBoot = expo[bootstrapIndices]
      -gumbBoot = gumb[bootstrapIndices]
      -lognBoot = logn[bootstrapIndices]
      -triaBoot = tria[bootstrapIndices]
      -
      -data = [norm, normBoot,  logn, lognBoot, expo, expoBoot, gumb, gumbBoot,
      -       tria, triaBoot]
      -
      -fig = plt.figure(figsize=(10,6))
      -fig.canvas.set_window_title('A Boxplot Example')
      -ax1 = fig.add_subplot(111)
      -plt.subplots_adjust(left=0.075, right=0.95, top=0.9, bottom=0.25)
      -
      -bp = plt.boxplot(data, notch=0, sym='+', vert=1, whis=1.5)
      -plt.setp(bp['boxes'], color='black')
      -plt.setp(bp['whiskers'], color='black')
      -plt.setp(bp['fliers'], color='red', marker='+')
      -
      -# Add a horizontal grid to the plot, but make it very light in color
      -# so we can use it for reading data values but not be distracting
      -ax1.yaxis.grid(True, linestyle='-', which='major', color='lightgrey',
      -              alpha=0.5)
      -
      -# Hide these grid behind plot objects
      -ax1.set_axisbelow(True)
      -ax1.set_title('Comparison of IID Bootstrap Resampling Across Five Distributions')
      -ax1.set_xlabel('Distribution')
      -ax1.set_ylabel('Value')
      -
      -# Now fill the boxes with desired colors
      -boxColors = ['darkkhaki','royalblue']
      -numBoxes = numDists*2
      -medians = range(numBoxes)
      -for i in range(numBoxes):
      -  box = bp['boxes'][i]
      -  boxX = []
      -  boxY = []
      -  for j in range(5):
      -      boxX.append(box.get_xdata()[j])
      -      boxY.append(box.get_ydata()[j])
      -  boxCoords = zip(boxX,boxY)
      -  # Alternate between Dark Khaki and Royal Blue
      -  k = i % 2
      -  boxPolygon = Polygon(boxCoords, facecolor=boxColors[k])
      -  ax1.add_patch(boxPolygon)
      -  # Now draw the median lines back over what we just filled in
      -  med = bp['medians'][i]
      -  medianX = []
      -  medianY = []
      -  for j in range(2):
      -      medianX.append(med.get_xdata()[j])
      -      medianY.append(med.get_ydata()[j])
      -      plt.plot(medianX, medianY, 'k')
      -      medians[i] = medianY[0]
      -  # Finally, overplot the sample averages, with horizontal alignment
      -  # in the center of each box
      -  plt.plot([np.average(med.get_xdata())], [np.average(data[i])],
      -           color='w', marker='*', markeredgecolor='k')
      -
      -# Set the axes ranges and axes labels
      -ax1.set_xlim(0.5, numBoxes+0.5)
      -top = 40
      -bottom = -5
      -ax1.set_ylim(bottom, top)
      -xtickNames = plt.setp(ax1, xticklabels=np.repeat(randomDists, 2))
      -plt.setp(xtickNames, rotation=45, fontsize=8)
      -
      -# Due to the Y-axis scale being different across samples, it can be
      -# hard to compare differences in medians across the samples. Add upper
      -# X-axis tick labels with the sample medians to aid in comparison
      -# (just use two decimal places of precision)
      -pos = np.arange(numBoxes)+1
      -upperLabels = [str(np.round(s, 2)) for s in medians]
      -weights = ['bold', 'semibold']
      -for tick,label in zip(range(numBoxes),ax1.get_xticklabels()):
      -   k = tick % 2
      -   ax1.text(pos[tick], top-(top*0.05), upperLabels[tick],
      -        horizontalalignment='center', size='x-small', weight=weights[k],
      -        color=boxColors[k])
      -
      -# Finally, add a basic legend
      -plt.figtext(0.80, 0.08,  str(N) + ' Random Numbers' ,
      -           backgroundcolor=boxColors[0], color='black', weight='roman',
      -           size='x-small')
      -plt.figtext(0.80, 0.045, 'IID Bootstrap Resample',
      -backgroundcolor=boxColors[1],
      -           color='white', weight='roman', size='x-small')
      -plt.figtext(0.80, 0.015, '*', color='white', backgroundcolor='silver',
      -           weight='roman', size='medium')
      -plt.figtext(0.815, 0.013, ' Average Value', color='black', weight='roman',
      -           size='x-small')
      -
      -plt.show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/pylab_examples/boxplot_demo3.html b/dev/examples/pylab_examples/boxplot_demo3.html deleted file mode 100644 index 208cf65eeb5..00000000000 --- a/dev/examples/pylab_examples/boxplot_demo3.html +++ /dev/null @@ -1,199 +0,0 @@ - - - - - - - - pylab_examples example code: boxplot_demo3.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      pylab_examples example code: boxplot_demo3.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/boxplot_demo3.png -
      -
      import matplotlib.pyplot as plt
      -import matplotlib.transforms as mtransforms
      -import numpy as np
      -
      -def fakeBootStrapper(n):
      -    '''
      -    This is just a placeholder for the user's method of
      -    bootstrapping the median and its confidence intervals.
      -
      -    Returns an arbitrary median and confidence intervals
      -    packed into a tuple
      -    '''
      -    if n == 1:
      -        med = 0.1
      -        CI = (-0.25, 0.25)
      -    else:
      -        med = 0.2
      -        CI = (-0.35, 0.50)
      -
      -    return med, CI
      -
      -
      -
      -np.random.seed(2)
      -inc = 0.1
      -e1 = np.random.normal(0, 1, size=(500,))
      -e2 = np.random.normal(0, 1, size=(500,))
      -e3 = np.random.normal(0, 1 + inc, size=(500,))
      -e4 = np.random.normal(0, 1 + 2*inc, size=(500,))
      -
      -treatments = [e1,e2,e3,e4]
      -med1, CI1 = fakeBootStrapper(1)
      -med2, CI2 = fakeBootStrapper(2)
      -medians = [None, None, med1, med2]
      -conf_intervals = [None, None, CI1, CI2]
      -
      -fig = plt.figure()
      -ax = fig.add_subplot(111)
      -pos = np.array(range(len(treatments)))+1
      -bp = ax.boxplot(treatments, sym='k+', positions=pos,
      -                notch=1, bootstrap=5000,
      -                usermedians=medians,
      -                conf_intervals=conf_intervals)
      -
      -ax.set_xlabel('treatment')
      -ax.set_ylabel('response')
      -plt.setp(bp['whiskers'], color='k',  linestyle='-' )
      -plt.setp(bp['fliers'], markersize=3.0)
      -plt.show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/pylab_examples/break.html b/dev/examples/pylab_examples/break.html deleted file mode 100644 index 22801f7169f..00000000000 --- a/dev/examples/pylab_examples/break.html +++ /dev/null @@ -1,158 +0,0 @@ - - - - - - - - pylab_examples example code: break.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      pylab_examples example code: break.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/break.png -
      -
      #!/usr/bin/env python
      -from pylab import *
      -
      -
      -gcf().text(0.5, 0.95,
      -           'Distance Histograms by Category is a really long title')
      -
      -show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/pylab_examples/broken_axis.html b/dev/examples/pylab_examples/broken_axis.html deleted file mode 100644 index 958548c9019..00000000000 --- a/dev/examples/pylab_examples/broken_axis.html +++ /dev/null @@ -1,211 +0,0 @@ - - - - - - - - pylab_examples example code: broken_axis.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      pylab_examples example code: broken_axis.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/broken_axis.png -
      -
      """
      -Broken axis example, where the y-axis will have a portion cut out.
      -"""
      -import matplotlib.pylab as plt
      -import numpy as np
      -
      -
      -# 30 points between 0 0.2] originally made using np.random.rand(30)*.2
      -pts = np.array([ 0.015,  0.166,  0.133,  0.159,  0.041,  0.024,  0.195,
      -    0.039, 0.161,  0.018,  0.143,  0.056,  0.125,  0.096,  0.094, 0.051,
      -    0.043,  0.021,  0.138,  0.075,  0.109,  0.195,  0.05 , 0.074, 0.079,
      -    0.155,  0.02 ,  0.01 ,  0.061,  0.008])
      -
      -# Now let's make two outlier points which are far away from everything.
      -pts[[3,14]] += .8
      -
      -# If we were to simply plot pts, we'd lose most of the interesting
      -# details due to the outliers. So let's 'break' or 'cut-out' the y-axis
      -# into two portions - use the top (ax) for the outliers, and the bottom
      -# (ax2) for the details of the majority of our data
      -f,(ax,ax2) = plt.subplots(2,1,sharex=True)
      -
      -# plot the same data on both axes
      -ax.plot(pts)
      -ax2.plot(pts)
      -
      -# zoom-in / limit the view to different portions of the data
      -ax.set_ylim(.78,1.) # outliers only
      -ax2.set_ylim(0,.22) # most of the data
      -
      -# hide the spines between ax and ax2
      -ax.spines['bottom'].set_visible(False)
      -ax2.spines['top'].set_visible(False)
      -ax.xaxis.tick_top()
      -ax.tick_params(labeltop='off') # don't put tick labels at the top
      -ax2.xaxis.tick_bottom()
      -
      -# This looks pretty good, and was fairly painless, but you can get that
      -# cut-out diagonal lines look with just a bit more work. The important
      -# thing to know here is that in axes coordinates, which are always
      -# between 0-1, spine endpoints are at these locations (0,0), (0,1),
      -# (1,0), and (1,1).  Thus, we just need to put the diagonals in the
      -# appropriate corners of each of our axes, and so long as we use the
      -# right transform and disable clipping.
      -
      -d = .015 # how big to make the diagonal lines in axes coordinates
      -# arguments to pass plot, just so we don't keep repeating them
      -kwargs = dict(transform=ax.transAxes, color='k', clip_on=False)
      -ax.plot((-d,+d),(-d,+d), **kwargs)      # top-left diagonal
      -ax.plot((1-d,1+d),(-d,+d), **kwargs)    # top-right diagonal
      -
      -kwargs.update(transform=ax2.transAxes)  # switch to the bottom axes
      -ax2.plot((-d,+d),(1-d,1+d), **kwargs)   # bottom-left diagonal
      -ax2.plot((1-d,1+d),(1-d,1+d), **kwargs) # bottom-right diagonal
      -
      -# What's cool about this is that now if we vary the distance between
      -# ax and ax2 via f.subplots_adjust(hspace=...) or plt.subplot_tool(),
      -# the diagonal lines will move accordingly, and stay right at the tips
      -# of the spines they are 'breaking'
      -
      -plt.show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/pylab_examples/broken_barh.html b/dev/examples/pylab_examples/broken_barh.html deleted file mode 100644 index 3e17991b892..00000000000 --- a/dev/examples/pylab_examples/broken_barh.html +++ /dev/null @@ -1,173 +0,0 @@ - - - - - - - - pylab_examples example code: broken_barh.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      pylab_examples example code: broken_barh.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/broken_barh1.png -
      -
      """
      -Make a "broken" horizontal bar plot, ie one with gaps
      -"""
      -import matplotlib.pyplot as plt
      -
      -fig = plt.figure()
      -ax = fig.add_subplot(111)
      -ax.broken_barh([ (110, 30), (150, 10) ] , (10, 9), facecolors='blue')
      -ax.broken_barh([ (10, 50), (100, 20),  (130, 10)] , (20, 9),
      -                facecolors=('red', 'yellow', 'green'))
      -ax.set_ylim(5,35)
      -ax.set_xlim(0,200)
      -ax.set_xlabel('seconds since start')
      -ax.set_yticks([15,25])
      -ax.set_yticklabels(['Bill', 'Jim'])
      -ax.grid(True)
      -ax.annotate('race interrupted', (61, 25),
      -            xytext=(0.8, 0.9), textcoords='axes fraction',
      -            arrowprops=dict(facecolor='black', shrink=0.05),
      -            fontsize=16,
      -            horizontalalignment='right', verticalalignment='top')
      -
      -plt.show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/pylab_examples/centered_ticklabels.html b/dev/examples/pylab_examples/centered_ticklabels.html deleted file mode 100644 index 28748319c89..00000000000 --- a/dev/examples/pylab_examples/centered_ticklabels.html +++ /dev/null @@ -1,195 +0,0 @@ - - - - - - - - pylab_examples example code: centered_ticklabels.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      pylab_examples example code: centered_ticklabels.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/centered_ticklabels.png -
      -
      # sometimes it is nice to have ticklabels centered.  mpl currently
      -# associates a label with a tick, and the label can be aligned
      -# 'center', 'left', or 'right' using the horizontal alignment property:
      -#
      -#
      -#   for label in ax.xaxis.get_xticklabels():
      -#       label.set_horizontalalignment('right')
      -#
      -#
      -# but this doesn't help center the label between ticks.  One solution
      -# is to "face it".  Use the minor ticks to place a tick centered
      -# between the major ticks.  Here is an example that labels the months,
      -# centered between the ticks
      -
      -import datetime
      -import numpy as np
      -import matplotlib
      -import matplotlib.cbook as cbook
      -import matplotlib.dates as dates
      -import matplotlib.ticker as ticker
      -import matplotlib.pyplot as plt
      -
      -# load some financial data; apple's stock price
      -fh = cbook.get_sample_data('aapl.npy.gz')
      -r = np.load(fh); fh.close()
      -r = r[-250:]  # get the last 250 days
      -
      -fig = plt.figure()
      -ax = fig.add_subplot(111)
      -ax.plot(r.date, r.adj_close)
      -
      -ax.xaxis.set_major_locator(dates.MonthLocator())
      -ax.xaxis.set_minor_locator(dates.MonthLocator(bymonthday=15))
      -
      -ax.xaxis.set_major_formatter(ticker.NullFormatter())
      -ax.xaxis.set_minor_formatter(dates.DateFormatter('%b'))
      -
      -for tick in ax.xaxis.get_minor_ticks():
      -    tick.tick1line.set_markersize(0)
      -    tick.tick2line.set_markersize(0)
      -    tick.label1.set_horizontalalignment('center')
      -
      -imid = len(r)/2
      -ax.set_xlabel(str(r.date[imid].year))
      -plt.show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/pylab_examples/clippedline.html b/dev/examples/pylab_examples/clippedline.html deleted file mode 100644 index ea715996d14..00000000000 --- a/dev/examples/pylab_examples/clippedline.html +++ /dev/null @@ -1,208 +0,0 @@ - - - - - - - - pylab_examples example code: clippedline.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      pylab_examples example code: clippedline.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/clippedline.png -
      -
      """
      -Clip a line according to the current xlimits, and change the marker
      -style when zoomed in.
      -
      -It is not clear this example is still needed or valid; clipping
      -is now automatic for Line2D objects when x is sorted in
      -ascending order.
      -
      -"""
      -
      -from matplotlib.lines import Line2D
      -import numpy as np
      -from pylab import figure, show
      -
      -class ClippedLine(Line2D):
      -    """
      -    Clip the xlimits to the axes view limits -- this example assumes x is sorted
      -    """
      -
      -    def __init__(self, ax, *args, **kwargs):
      -        Line2D.__init__(self, *args, **kwargs)
      -        self.ax = ax
      -
      -
      -    def set_data(self, *args, **kwargs):
      -        Line2D.set_data(self, *args, **kwargs)
      -        self.recache()
      -        self.xorig = np.array(self._x)
      -        self.yorig = np.array(self._y)
      -
      -    def draw(self, renderer):
      -        xlim = self.ax.get_xlim()
      -
      -        ind0, ind1 = np.searchsorted(self.xorig, xlim)
      -        self._x = self.xorig[ind0:ind1]
      -        self._y = self.yorig[ind0:ind1]
      -        N = len(self._x)
      -        if N<1000:
      -            self._marker = 's'
      -            self._linestyle = '-'
      -        else:
      -            self._marker = None
      -            self._linestyle = '-'
      -
      -
      -        Line2D.draw(self, renderer)
      -
      -
      -fig = figure()
      -ax = fig.add_subplot(111, autoscale_on=False)
      -
      -t = np.arange(0.0, 100.0, 0.01)
      -s = np.sin(2*np.pi*t)
      -line = ClippedLine(ax, t, s, color='g', ls='-', lw=2)
      -ax.add_line(line)
      -ax.set_xlim(10,30)
      -ax.set_ylim(-1.1,1.1)
      -show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/pylab_examples/cohere_demo.html b/dev/examples/pylab_examples/cohere_demo.html deleted file mode 100644 index a05860f219c..00000000000 --- a/dev/examples/pylab_examples/cohere_demo.html +++ /dev/null @@ -1,184 +0,0 @@ - - - - - - - - pylab_examples example code: cohere_demo.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      pylab_examples example code: cohere_demo.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/cohere_demo1.png -
      -
      #!/usr/bin/env python
      -"""
      -Compute the coherence of two signals
      -"""
      -import numpy as np
      -import matplotlib.pyplot as plt
      -
      -# make a little extra space between the subplots
      -plt.subplots_adjust(wspace=0.5)
      -
      -dt = 0.01
      -t = np.arange(0, 30, dt)
      -nse1 = np.random.randn(len(t))                 # white noise 1
      -nse2 = np.random.randn(len(t))                 # white noise 2
      -r = np.exp(-t/0.05)
      -
      -cnse1 = np.convolve(nse1, r, mode='same')*dt   # colored noise 1
      -cnse2 = np.convolve(nse2, r, mode='same')*dt   # colored noise 2
      -
      -# two signals with a coherent part and a random part
      -s1 = 0.01*np.sin(2*np.pi*10*t) + cnse1
      -s2 = 0.01*np.sin(2*np.pi*10*t) + cnse2
      -
      -plt.subplot(211)
      -plt.plot(t, s1, 'b-', t, s2, 'g-')
      -plt.xlim(0,5)
      -plt.xlabel('time')
      -plt.ylabel('s1 and s2')
      -plt.grid(True)
      -
      -plt.subplot(212)
      -cxy, f = plt.cohere(s1, s2, 256, 1./dt)
      -plt.ylabel('coherence')
      -plt.show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/pylab_examples/color_by_yvalue.html b/dev/examples/pylab_examples/color_by_yvalue.html deleted file mode 100644 index 28c606bedec..00000000000 --- a/dev/examples/pylab_examples/color_by_yvalue.html +++ /dev/null @@ -1,168 +0,0 @@ - - - - - - - - pylab_examples example code: color_by_yvalue.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      pylab_examples example code: color_by_yvalue.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/color_by_yvalue.png -
      -
      # use masked arrays to plot a line with different colors by y-value
      -from numpy import logical_or, arange, sin, pi
      -from numpy import ma
      -from matplotlib.pyplot import  plot, show
      -
      -t = arange(0.0, 2.0, 0.01)
      -s = sin(2*pi*t)
      -
      -upper = 0.77
      -lower = -0.77
      -
      -
      -supper = ma.masked_where(s < upper, s)
      -slower = ma.masked_where(s > lower, s)
      -smiddle = ma.masked_where(logical_or(s<lower, s>upper), s)
      -
      -plot(t, slower, 'r', t, smiddle, 'b', t, supper, 'g')
      -show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/pylab_examples/color_demo.html b/dev/examples/pylab_examples/color_demo.html deleted file mode 100644 index ff7a5bce270..00000000000 --- a/dev/examples/pylab_examples/color_demo.html +++ /dev/null @@ -1,176 +0,0 @@ - - - - - - - - pylab_examples example code: color_demo.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      pylab_examples example code: color_demo.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/color_demo.png -
      -
      #!/usr/bin/env python
      -"""
      -matplotlib gives you 4 ways to specify colors,
      -
      -    1) as a single letter string, ala MATLAB
      -
      -    2) as an html style hex string or html color name
      -
      -    3) as an R,G,B tuple, where R,G,B, range from 0-1
      -
      -    4) as a string representing a floating point number
      -       from 0 to 1, corresponding to shades of gray.
      -
      -See help(colors) for more info.
      -"""
      -from pylab import *
      -
      -subplot(111, axisbg='darkslategray')
      -#subplot(111, axisbg='#ababab')
      -t = arange(0.0, 2.0, 0.01)
      -s = sin(2*pi*t)
      -plot(t, s, 'y')
      -xlabel('time (s)', color='r')
      -ylabel('voltage (mV)', color='0.5') # grayscale color
      -title('About as silly as it gets, folks', color='#afeeee')
      -show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/pylab_examples/colorbar_tick_labelling_demo.html b/dev/examples/pylab_examples/colorbar_tick_labelling_demo.html deleted file mode 100644 index 04aa614bdd1..00000000000 --- a/dev/examples/pylab_examples/colorbar_tick_labelling_demo.html +++ /dev/null @@ -1,191 +0,0 @@ - - - - - - - - pylab_examples example code: colorbar_tick_labelling_demo.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      pylab_examples example code: colorbar_tick_labelling_demo.py

      -

      (Source code)

      -
      -../../_images/colorbar_tick_labelling_demo_00.png -

      (png, hires.png, pdf)

      -
      -
      -../../_images/colorbar_tick_labelling_demo_01.png -

      (png, hires.png, pdf)

      -
      -
      """Produce custom labelling for a colorbar.
      -
      -Contributed by Scott Sinclair
      -"""
      -
      -import matplotlib.pyplot as plt
      -import numpy as np
      -from matplotlib import cm
      -from numpy.random import randn
      -
      -# Make plot with vertical (default) colorbar
      -fig = plt.figure()
      -ax = fig.add_subplot(111)
      -
      -data = np.clip(randn(250, 250), -1, 1)
      -
      -cax = ax.imshow(data, interpolation='nearest', cmap=cm.coolwarm)
      -ax.set_title('Gaussian noise with vertical colorbar')
      -
      -# Add colorbar, make sure to specify tick locations to match desired ticklabels
      -cbar = fig.colorbar(cax, ticks=[-1, 0, 1])
      -cbar.ax.set_yticklabels(['< -1', '0', '> 1'])# vertically oriented colorbar
      -
      -# Make plot with horizontal colorbar
      -fig = plt.figure()
      -ax = fig.add_subplot(111)
      -
      -data = np.clip(randn(250, 250), -1, 1)
      -
      -cax = ax.imshow(data, interpolation='nearest', cmap=cm.afmhot)
      -ax.set_title('Gaussian noise with horizontal colorbar')
      -
      -cbar = fig.colorbar(cax, ticks=[-1, 0, 1], orientation='horizontal')
      -cbar.ax.set_xticklabels(['Low', 'Medium', 'High'])# horizontal colorbar
      -
      -plt.show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/pylab_examples/colours.html b/dev/examples/pylab_examples/colours.html deleted file mode 100644 index 004b438545a..00000000000 --- a/dev/examples/pylab_examples/colours.html +++ /dev/null @@ -1,197 +0,0 @@ - - - - - - - - pylab_examples example code: colours.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      pylab_examples example code: colours.py

      -

      [source code]

      -
      #!/usr/bin/env python
      -# -*- noplot -*-
      -"""
      -Some simple functions to generate colours.
      -"""
      -import numpy as np
      -from matplotlib.colors import colorConverter
      -
      -def pastel(colour, weight=2.4):
      -    """ Convert colour into a nice pastel shade"""
      -    rgb = np.asarray(colorConverter.to_rgb(colour))
      -    # scale colour
      -    maxc = max(rgb)
      -    if maxc < 1.0 and maxc > 0:
      -        # scale colour
      -        scale = 1.0 / maxc
      -        rgb = rgb * scale
      -    # now decrease saturation
      -    total = rgb.sum()
      -    slack = 0
      -    for x in rgb:
      -        slack += 1.0 - x
      -
      -    # want to increase weight from total to weight
      -    # pick x s.t.  slack * x == weight - total
      -    # x = (weight - total) / slack
      -    x = (weight - total) / slack
      -
      -    rgb = [c + (x * (1.0-c)) for c in rgb]
      -
      -    return rgb
      -
      -def get_colours(n):
      -    """ Return n pastel colours. """
      -    base = np.asarray([[1,0,0], [0,1,0], [0,0,1]])
      -
      -    if n <= 3:
      -        return base[0:n]
      -
      -    # how many new colours to we need to insert between
      -    # red and green and between green and blue?
      -    needed = (((n - 3) + 1) / 2, (n - 3) / 2)
      -
      -    colours = []
      -    for start in (0, 1):
      -        for x in np.linspace(0, 1, needed[start]+2):
      -            colours.append((base[start] * (1.0 - x)) +
      -                           (base[start+1] * x))
      -
      -    return [pastel(c) for c in colours[0:n]]
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/pylab_examples/colours.py b/dev/examples/pylab_examples/colours.py deleted file mode 100644 index 3505380c4ba..00000000000 --- a/dev/examples/pylab_examples/colours.py +++ /dev/null @@ -1,51 +0,0 @@ -#!/usr/bin/env python -# -*- noplot -*- -""" -Some simple functions to generate colours. -""" -import numpy as np -from matplotlib.colors import colorConverter - -def pastel(colour, weight=2.4): - """ Convert colour into a nice pastel shade""" - rgb = np.asarray(colorConverter.to_rgb(colour)) - # scale colour - maxc = max(rgb) - if maxc < 1.0 and maxc > 0: - # scale colour - scale = 1.0 / maxc - rgb = rgb * scale - # now decrease saturation - total = rgb.sum() - slack = 0 - for x in rgb: - slack += 1.0 - x - - # want to increase weight from total to weight - # pick x s.t. slack * x == weight - total - # x = (weight - total) / slack - x = (weight - total) / slack - - rgb = [c + (x * (1.0-c)) for c in rgb] - - return rgb - -def get_colours(n): - """ Return n pastel colours. """ - base = np.asarray([[1,0,0], [0,1,0], [0,0,1]]) - - if n <= 3: - return base[0:n] - - # how many new colours to we need to insert between - # red and green and between green and blue? - needed = (((n - 3) + 1) / 2, (n - 3) / 2) - - colours = [] - for start in (0, 1): - for x in np.linspace(0, 1, needed[start]+2): - colours.append((base[start] * (1.0 - x)) + - (base[start+1] * x)) - - return [pastel(c) for c in colours[0:n]] - diff --git a/dev/examples/pylab_examples/contour_demo.html b/dev/examples/pylab_examples/contour_demo.html deleted file mode 100644 index 103dc692d20..00000000000 --- a/dev/examples/pylab_examples/contour_demo.html +++ /dev/null @@ -1,285 +0,0 @@ - - - - - - - - pylab_examples example code: contour_demo.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      pylab_examples example code: contour_demo.py

      -

      (Source code)

      -
      -../../_images/contour_demo_001.png -

      (png, hires.png, pdf)

      -
      -
      -../../_images/contour_demo_011.png -

      (png, hires.png, pdf)

      -
      -
      -../../_images/contour_demo_021.png -

      (png, hires.png, pdf)

      -
      -
      -../../_images/contour_demo_031.png -

      (png, hires.png, pdf)

      -
      -
      -../../_images/contour_demo_041.png -

      (png, hires.png, pdf)

      -
      -
      -../../_images/contour_demo_051.png -

      (png, hires.png, pdf)

      -
      -
      #!/usr/bin/env python
      -"""
      -Illustrate simple contour plotting, contours on an image with
      -a colorbar for the contours, and labelled contours.
      -
      -See also contour_image.py.
      -"""
      -import matplotlib
      -import numpy as np
      -import matplotlib.cm as cm
      -import matplotlib.mlab as mlab
      -import matplotlib.pyplot as plt
      -
      -matplotlib.rcParams['xtick.direction'] = 'out'
      -matplotlib.rcParams['ytick.direction'] = 'out'
      -
      -delta = 0.025
      -x = np.arange(-3.0, 3.0, delta)
      -y = np.arange(-2.0, 2.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)
      -# difference of Gaussians
      -Z = 10.0 * (Z2 - Z1)
      -
      -
      -
      -# Create a simple contour plot with labels using default colors.  The
      -# inline argument to clabel will control whether the labels are draw
      -# over the line segments of the contour, removing the lines beneath
      -# the label
      -plt.figure()
      -CS = plt.contour(X, Y, Z)
      -plt.clabel(CS, inline=1, fontsize=10)
      -plt.title('Simplest default with labels')
      -
      -
      -# contour labels can be placed manually by providing list of positions
      -# (in data coordinate). See ginput_manual_clabel.py for interactive
      -# placement.
      -plt.figure()
      -CS = plt.contour(X, Y, Z)
      -manual_locations = [(-1, -1.4), (-0.62, -0.7), (-2, 0.5), (1.7, 1.2), (2.0, 1.4), (2.4, 1.7)]
      -plt.clabel(CS, inline=1, fontsize=10, manual=manual_locations)
      -plt.title('labels at selected locations')
      -
      -
      -# You can force all the contours to be the same color.
      -plt.figure()
      -CS = plt.contour(X, Y, Z, 6,
      -                 colors='k', # negative contours will be dashed by default
      -                 )
      -plt.clabel(CS, fontsize=9, inline=1)
      -plt.title('Single color - negative contours dashed')
      -
      -# You can set negative contours to be solid instead of dashed:
      -matplotlib.rcParams['contour.negative_linestyle'] = 'solid'
      -plt.figure()
      -CS = plt.contour(X, Y, Z, 6,
      -                 colors='k', # negative contours will be dashed by default
      -                 )
      -plt.clabel(CS, fontsize=9, inline=1)
      -plt.title('Single color - negative contours solid')
      -
      -
      -# And you can manually specify the colors of the contour
      -plt.figure()
      -CS = plt.contour(X, Y, Z, 6,
      -                 linewidths=np.arange(.5, 4, .5),
      -                 colors=('r', 'green', 'blue', (1,1,0), '#afeeee', '0.5')
      -                 )
      -plt.clabel(CS, fontsize=9, inline=1)
      -plt.title('Crazy lines')
      -
      -
      -# Or you can use a colormap to specify the colors; the default
      -# colormap will be used for the contour lines
      -plt.figure()
      -im = plt.imshow(Z, interpolation='bilinear', origin='lower',
      -                cmap=cm.gray, extent=(-3,3,-2,2))
      -levels = np.arange(-1.2, 1.6, 0.2)
      -CS = plt.contour(Z, levels,
      -                 origin='lower',
      -                 linewidths=2,
      -                 extent=(-3,3,-2,2))
      -
      -#Thicken the zero contour.
      -zc = CS.collections[6]
      -plt.setp(zc, linewidth=4)
      -
      -plt.clabel(CS, levels[1::2],  # label every second level
      -           inline=1,
      -           fmt='%1.1f',
      -           fontsize=14)
      -
      -# make a colorbar for the contour lines
      -CB = plt.colorbar(CS, shrink=0.8, extend='both')
      -
      -plt.title('Lines with colorbar')
      -#plt.hot()  # Now change the colormap for the contour lines and colorbar
      -plt.flag()
      -
      -# We can still add a colorbar for the image, too.
      -CBI = plt.colorbar(im, orientation='horizontal', shrink=0.8)
      -
      -# This makes the original colorbar look a bit out of place,
      -# so let's improve its position.
      -
      -l,b,w,h = plt.gca().get_position().bounds
      -ll,bb,ww,hh = CB.ax.get_position().bounds
      -CB.ax.set_position([ll, b+0.1*h, ww, h*0.8])
      -
      -
      -plt.show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/pylab_examples/contour_image.html b/dev/examples/pylab_examples/contour_image.html deleted file mode 100644 index e5873645b8c..00000000000 --- a/dev/examples/pylab_examples/contour_image.html +++ /dev/null @@ -1,256 +0,0 @@ - - - - - - - - pylab_examples example code: contour_image.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      pylab_examples example code: contour_image.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/contour_image.png -
      -
      #!/usr/bin/env python
      -'''
      -Test combinations of contouring, filled contouring, and image plotting.
      -For contour labelling, see contour_demo.py.
      -
      -The emphasis in this demo is on showing how to make contours register
      -correctly on images, and on how to get both of them oriented as
      -desired.  In particular, note the usage of the "origin" and "extent"
      -keyword arguments to imshow and contour.
      -'''
      -from pylab import *
      -
      -#Default delta is large because that makes it fast, and it illustrates
      -# the correct registration between image and contours.
      -delta = 0.5
      -
      -extent = (-3,4,-4,3)
      -
      -x = arange(-3.0, 4.001, delta)
      -y = arange(-4.0, 3.001, delta)
      -X, Y = meshgrid(x, y)
      -Z1 = bivariate_normal(X, Y, 1.0, 1.0, 0.0, 0.0)
      -Z2 = bivariate_normal(X, Y, 1.5, 0.5, 1, 1)
      -Z = (Z1 - Z2) * 10
      -
      -levels = arange(-2.0, 1.601, 0.4) # Boost the upper limit to avoid truncation
      -                                  # errors.
      -
      -norm = cm.colors.Normalize(vmax=abs(Z).max(), vmin=-abs(Z).max())
      -cmap = cm.PRGn
      -
      -figure()
      -
      -
      -subplot(2,2,1)
      -
      -cset1 = contourf(X, Y, Z, levels,
      -                        cmap=cm.get_cmap(cmap, len(levels)-1),
      -                        norm=norm,
      -                        )
      -# It is not necessary, but for the colormap, we need only the
      -# number of levels minus 1.  To avoid discretization error, use
      -# either this number or a large number such as the default (256).
      -
      -#If we want lines as well as filled regions, we need to call
      -# contour separately; don't try to change the edgecolor or edgewidth
      -# of the polygons in the collections returned by contourf.
      -# Use levels output from previous call to guarantee they are the same.
      -cset2 = contour(X, Y, Z, cset1.levels,
      -                        colors = 'k',
      -                        hold='on')
      -# We don't really need dashed contour lines to indicate negative
      -# regions, so let's turn them off.
      -for c in cset2.collections:
      -    c.set_linestyle('solid')
      -
      -# It is easier here to make a separate call to contour than
      -# to set up an array of colors and linewidths.
      -# We are making a thick green line as a zero contour.
      -# Specify the zero level as a tuple with only 0 in it.
      -cset3 = contour(X, Y, Z, (0,),
      -                colors = 'g',
      -                linewidths = 2,
      -                hold='on')
      -title('Filled contours')
      -colorbar(cset1)
      -#hot()
      -
      -
      -subplot(2,2,2)
      -
      -imshow(Z, extent=extent, cmap=cmap, norm=norm)
      -v = axis()
      -contour(Z, levels, hold='on', colors = 'k',
      -        origin='upper', extent=extent)
      -axis(v)
      -title("Image, origin 'upper'")
      -
      -subplot(2,2,3)
      -
      -imshow(Z, origin='lower', extent=extent, cmap=cmap, norm=norm)
      -v = axis()
      -contour(Z, levels, hold='on', colors = 'k',
      -        origin='lower', extent=extent)
      -axis(v)
      -title("Image, origin 'lower'")
      -
      -subplot(2,2,4)
      -
      -# We will use the interpolation "nearest" here to show the actual
      -# image pixels.
      -# Note that the contour lines don't extend to the edge of the box.
      -# This is intentional. The Z values are defined at the center of each
      -# image pixel (each color block on the following subplot), so the
      -# domain that is contoured does not extend beyond these pixel centers.
      -im = imshow(Z, interpolation='nearest', extent=extent, cmap=cmap, norm=norm)
      -v = axis()
      -contour(Z, levels, hold='on', colors = 'k',
      -        origin='image', extent=extent)
      -axis(v)
      -ylim = get(gca(), 'ylim')
      -setp(gca(), ylim=ylim[::-1])
      -title("Image, origin from rc, reversed y-axis")
      -colorbar(im)
      -
      -show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/pylab_examples/contour_label_demo.html b/dev/examples/pylab_examples/contour_label_demo.html deleted file mode 100644 index 433a1b4e0e1..00000000000 --- a/dev/examples/pylab_examples/contour_label_demo.html +++ /dev/null @@ -1,245 +0,0 @@ - - - - - - - - pylab_examples example code: contour_label_demo.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      pylab_examples example code: contour_label_demo.py

      -

      (Source code)

      -
      -../../_images/contour_label_demo_00.png -

      (png, hires.png, pdf)

      -
      -
      -../../_images/contour_label_demo_01.png -

      (png, hires.png, pdf)

      -
      -
      -../../_images/contour_label_demo_02.png -

      (png, hires.png, pdf)

      -
      -
      #!/usr/bin/env python
      -"""
      -Illustrate some of the more advanced things that one can do with
      -contour labels.
      -
      -See also contour_demo.py.
      -"""
      -import matplotlib
      -import numpy as np
      -import matplotlib.cm as cm
      -import matplotlib.mlab as mlab
      -import matplotlib.ticker as ticker
      -import matplotlib.pyplot as plt
      -
      -matplotlib.rcParams['xtick.direction'] = 'out'
      -matplotlib.rcParams['ytick.direction'] = 'out'
      -
      -##################################################
      -# Define our surface
      -##################################################
      -delta = 0.025
      -x = np.arange(-3.0, 3.0, delta)
      -y = np.arange(-2.0, 2.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)
      -# difference of Gaussians
      -Z = 10.0 * (Z2 - Z1)
      -
      -##################################################
      -# Make contour labels using creative float classes
      -# Follows suggestion of Manuel Metz
      -##################################################
      -plt.figure()
      -
      -# Basic contour plot
      -CS = plt.contour(X, Y, Z)
      -
      -# Define a class that forces representation of float to look a certain way
      -# This remove trailing zero so '1.0' becomes '1'
      -class nf(float):
      -     def __repr__(self):
      -         str = '%.1f' % (self.__float__(),)
      -         if str[-1]=='0':
      -             return '%.0f' % self.__float__()
      -         else:
      -             return '%.1f' % self.__float__()
      -
      -# Recast levels to new class
      -CS.levels = [nf(val) for val in CS.levels ]
      -
      -# Label levels with specially formatted floats
      -if plt.rcParams["text.usetex"]:
      -     fmt = r'%r \%%'
      -else:
      -     fmt = '%r %%'
      -plt.clabel(CS, CS.levels, inline=True, fmt=fmt, fontsize=10)
      -
      -##################################################
      -# Label contours with arbitrary strings using a
      -# dictionary
      -##################################################
      -plt.figure()
      -
      -# Basic contour plot
      -CS = plt.contour(X, Y, Z)
      -
      -fmt = {}
      -strs = [ 'first', 'second', 'third', 'fourth', 'fifth', 'sixth', 'seventh' ]
      -for l,s in zip( CS.levels, strs ):
      -    fmt[l] = s
      -
      -# Label every other level using strings
      -plt.clabel(CS,CS.levels[::2],inline=True,fmt=fmt,fontsize=10)
      -
      -# Use a Formatter
      -
      -plt.figure()
      -
      -CS = plt.contour(X, Y, 100**Z, locator=plt.LogLocator())
      -fmt = ticker.LogFormatterMathtext()
      -fmt.create_dummy_axis()
      -plt.clabel(CS, CS.levels, fmt=fmt)
      -plt.title("$100^Z$")
      -
      -plt.show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/pylab_examples/contourf_demo.html b/dev/examples/pylab_examples/contourf_demo.html deleted file mode 100644 index 44ce132de12..00000000000 --- a/dev/examples/pylab_examples/contourf_demo.html +++ /dev/null @@ -1,265 +0,0 @@ - - - - - - - - pylab_examples example code: contourf_demo.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      pylab_examples example code: contourf_demo.py

      -

      (Source code)

      -
      -../../_images/contourf_demo_001.png -

      (png, hires.png, pdf)

      -
      -
      -../../_images/contourf_demo_011.png -

      (png, hires.png, pdf)

      -
      -
      -../../_images/contourf_demo_021.png -

      (png, hires.png, pdf)

      -
      -
      #!/usr/bin/env python
      -import numpy as np
      -import matplotlib.pyplot as plt
      -
      -origin = 'lower'
      -#origin = 'upper'
      -
      -delta = 0.025
      -
      -x = y = np.arange(-3.0, 3.01, delta)
      -X, Y = np.meshgrid(x, y)
      -Z1 = plt.mlab.bivariate_normal(X, Y, 1.0, 1.0, 0.0, 0.0)
      -Z2 = plt.mlab.bivariate_normal(X, Y, 1.5, 0.5, 1, 1)
      -Z = 10 * (Z1 - Z2)
      -
      -nr, nc = Z.shape
      -
      -# put NaNs in one corner:
      -Z[-nr//6:, -nc//6:] = np.nan
      -# contourf will convert these to masked
      -
      -
      -Z = np.ma.array(Z)
      -# mask another corner:
      -Z[:nr//6, :nc//6] = np.ma.masked
      -
      -# mask a circle in the middle:
      -interior = np.sqrt((X**2) + (Y**2)) < 0.5
      -Z[interior] = np.ma.masked
      -
      -
      -# We are using automatic selection of contour levels;
      -# this is usually not such a good idea, because they don't
      -# occur on nice boundaries, but we do it here for purposes
      -# of illustration.
      -CS = plt.contourf(X, Y, Z, 10, # [-1, -0.1, 0, 0.1],
      -                        #alpha=0.5,
      -                        cmap=plt.cm.bone,
      -                        origin=origin)
      -
      -# Note that in the following, we explicitly pass in a subset of
      -# the contour levels used for the filled contours.  Alternatively,
      -# We could pass in additional levels to provide extra resolution,
      -# or leave out the levels kwarg to use all of the original levels.
      -
      -CS2 = plt.contour(CS, levels=CS.levels[::2],
      -                        colors = 'r',
      -                        origin=origin,
      -                        hold='on')
      -
      -plt.title('Nonsense (3 masked regions)')
      -plt.xlabel('word length anomaly')
      -plt.ylabel('sentence length anomaly')
      -
      -# Make a colorbar for the ContourSet returned by the contourf call.
      -cbar = plt.colorbar(CS)
      -cbar.ax.set_ylabel('verbosity coefficient')
      -# Add the contour line levels to the colorbar
      -cbar.add_lines(CS2)
      -
      -plt.figure()
      -
      -# Now make a contour plot with the levels specified,
      -# and with the colormap generated automatically from a list
      -# of colors.
      -levels = [-1.5, -1, -0.5, 0, 0.5, 1]
      -CS3 = plt.contourf(X, Y, Z, levels,
      -                        colors = ('r', 'g', 'b'),
      -                        origin=origin,
      -                        extend='both')
      -# Our data range extends outside the range of levels; make
      -# data below the lowest contour level yellow, and above the
      -# highest level cyan:
      -CS3.cmap.set_under('yellow')
      -CS3.cmap.set_over('cyan')
      -
      -CS4 = plt.contour(X, Y, Z, levels,
      -                       colors = ('k',),
      -                       linewidths = (3,),
      -                       origin = origin)
      -plt.title('Listed colors (3 masked regions)')
      -plt.clabel(CS4, fmt = '%2.1f', colors = 'w', fontsize=14)
      -
      -# Notice that the colorbar command gets all the information it
      -# needs from the ContourSet object, CS3.
      -plt.colorbar(CS3)
      -
      -# Illustrate all 4 possible "extend" settings:
      -extends = ["neither", "both", "min", "max"]
      -cmap = plt.cm.get_cmap("winter")
      -cmap.set_under("magenta")
      -cmap.set_over("yellow")
      -# Note: contouring simply excludes masked or nan regions, so
      -# instead of using the "bad" colormap value for them, it draws
      -# nothing at all in them.  Therefore the following would have
      -# no effect:
      -#cmap.set_bad("red")
      -
      -fig, axs = plt.subplots(2,2)
      -for ax, extend in zip(axs.ravel(), extends):
      -    cs = ax.contourf(X, Y, Z, levels, cmap=cmap, extend=extend, origin=origin)
      -    fig.colorbar(cs, ax=ax, shrink=0.9)
      -    ax.set_title("extend = %s" % extend)
      -    ax.locator_params(nbins=4)
      -
      -plt.show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/pylab_examples/contourf_hatching.html b/dev/examples/pylab_examples/contourf_hatching.html deleted file mode 100644 index 376079e0146..00000000000 --- a/dev/examples/pylab_examples/contourf_hatching.html +++ /dev/null @@ -1,200 +0,0 @@ - - - - - - - - pylab_examples example code: contourf_hatching.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      pylab_examples example code: contourf_hatching.py

      -

      (Source code)

      -
      -../../_images/contourf_hatching_00.png -

      (png, hires.png, pdf)

      -
      -
      -../../_images/contourf_hatching_01.png -

      (png, hires.png, pdf)

      -
      -
      import matplotlib.pyplot as plt
      -import numpy as np
      -
      -
      -# invent some numbers, turning the x and y arrays into simple
      -# 2d arrays, which make combining them together easier.
      -x = np.linspace(-3, 5, 150).reshape(1, -1)
      -y = np.linspace(-3, 5, 120).reshape(-1, 1)
      -z = np.cos(x) + np.sin(y)
      -
      -# we no longer need x and y to be 2 dimensional, so flatten them.
      -x, y = x.flatten(), y.flatten()
      -
      -
      -# ---------------------------------------------
      -# |                 Plot #1                   |
      -# ---------------------------------------------
      -# the simplest hatched plot with a colorbar
      -fig = plt.figure()
      -cs = plt.contourf(x, y, z, hatches=['-', '/', '\\', '//'],
      -                  cmap=plt.get_cmap('gray'),
      -                  extend='both', alpha=0.5
      -                  )
      -plt.colorbar()
      -
      -
      -# ---------------------------------------------
      -# |                 Plot #2                   |
      -# ---------------------------------------------
      -# a plot of hatches without color with a legend
      -plt.figure()
      -n_levels = 6
      -plt.contour(x, y, z, n_levels, colors='black', linestyles='-')
      -cs = plt.contourf(x, y, z, n_levels, colors='none',
      -                  hatches=['.', '/', '\\', None, '\\\\', '*'],
      -                  extend='lower'
      -                  )
      -
      -# create a legend for the contour set
      -artists, labels = cs.legend_elements()
      -plt.legend(artists, labels, handleheight=2)
      -
      -
      -
      -plt.show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/pylab_examples/contourf_log.html b/dev/examples/pylab_examples/contourf_log.html deleted file mode 100644 index 36c1056ed74..00000000000 --- a/dev/examples/pylab_examples/contourf_log.html +++ /dev/null @@ -1,196 +0,0 @@ - - - - - - - - pylab_examples example code: contourf_log.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      pylab_examples example code: contourf_log.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/contourf_log.png -
      -
      '''
      -Demonstrate use of a log color scale in contourf
      -'''
      -
      -from matplotlib import pyplot as P
      -import numpy as np
      -from numpy import ma
      -from matplotlib import colors, ticker, cm
      -from matplotlib.mlab import bivariate_normal
      -
      -N = 100
      -x = np.linspace(-3.0, 3.0, N)
      -y = np.linspace(-2.0, 2.0, N)
      -
      -X, Y = np.meshgrid(x, y)
      -
      -# A low hump with a spike coming out of the top right.
      -# Needs to have z/colour axis on a log scale so we see both hump and spike.
      -# linear scale only shows the spike.
      -z = (bivariate_normal(X, Y, 0.1, 0.2, 1.0, 1.0)
      -        + 0.1 * bivariate_normal(X, Y, 1.0, 1.0, 0.0, 0.0))
      -
      -# Put in some negative values (lower left corner) to cause trouble with logs:
      -z[:5, :5] = -1
      -
      -# The following is not strictly essential, but it will eliminate
      -# a warning.  Comment it out to see the warning.
      -z = ma.masked_where(z<= 0, z)
      -
      -
      -# Automatic selection of levels works; setting the
      -# log locator tells contourf to use a log scale:
      -cs = P.contourf(X, Y, z, locator=ticker.LogLocator(), cmap=cm.PuBu_r)
      -
      -# Alternatively, you can manually set the levels
      -# and the norm:
      -#lev_exp = np.arange(np.floor(np.log10(z.min())-1),
      -#                       np.ceil(np.log10(z.max())+1))
      -#levs = np.power(10, lev_exp)
      -#cs = P.contourf(X, Y, z, levs, norm=colors.LogNorm())
      -
      -#The 'extend' kwarg does not work yet with a log scale.
      -
      -cbar = P.colorbar()
      -
      -P.show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/pylab_examples/coords_demo.html b/dev/examples/pylab_examples/coords_demo.html deleted file mode 100644 index 77ae3b5010e..00000000000 --- a/dev/examples/pylab_examples/coords_demo.html +++ /dev/null @@ -1,189 +0,0 @@ - - - - - - - - pylab_examples example code: coords_demo.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      pylab_examples example code: coords_demo.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/coords_demo.png -
      -
      #!/usr/bin/env python
      -
      -"""
      -An example of how to interact with the plotting canvas by connecting
      -to move and click events
      -"""
      -from __future__ import print_function
      -import sys
      -from pylab import *
      -
      -t = arange(0.0, 1.0, 0.01)
      -s = sin(2*pi*t)
      -ax = subplot(111)
      -ax.plot(t,s)
      -
      -
      -def on_move(event):
      -    # get the x and y pixel coords
      -    x, y = event.x, event.y
      -
      -    if event.inaxes:
      -        ax = event.inaxes  # the axes instance
      -        print ('data coords %f %f' % (event.xdata, event.ydata))
      -
      -def on_click(event):
      -    # get the x and y coords, flip y from top to bottom
      -    x, y = event.x, event.y
      -    if event.button==1:
      -        if event.inaxes is not None:
      -            print ('data coords %f %f' % (event.xdata, event.ydata))
      -
      -binding_id = connect('motion_notify_event', on_move)
      -connect('button_press_event', on_click)
      -
      -if "test_disconnect" in sys.argv:
      -    print ("disconnecting console coordinate printout...")
      -    disconnect(binding_id)
      -
      -show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/pylab_examples/coords_report.html b/dev/examples/pylab_examples/coords_report.html deleted file mode 100644 index c80e7524607..00000000000 --- a/dev/examples/pylab_examples/coords_report.html +++ /dev/null @@ -1,167 +0,0 @@ - - - - - - - - pylab_examples example code: coords_report.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      pylab_examples example code: coords_report.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/coords_report.png -
      -
      #!/usr/bin/env python
      -
      -# override the default reporting of coords
      -
      -from pylab import *
      -
      -def millions(x):
      -    return '$%1.1fM' % (x*1e-6)
      -
      -x =     rand(20)
      -y =     1e7*rand(20)
      -
      -ax = subplot(111)
      -ax.fmt_ydata = millions
      -plot(x, y, 'o')
      -
      -show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/pylab_examples/csd_demo.html b/dev/examples/pylab_examples/csd_demo.html deleted file mode 100644 index c44d0bcfa57..00000000000 --- a/dev/examples/pylab_examples/csd_demo.html +++ /dev/null @@ -1,184 +0,0 @@ - - - - - - - - pylab_examples example code: csd_demo.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      pylab_examples example code: csd_demo.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/csd_demo1.png -
      -
      #!/usr/bin/env python
      -"""
      -Compute the cross spectral density of two signals
      -"""
      -import numpy as np
      -import matplotlib.pyplot as plt
      -
      -# make a little extra space between the subplots
      -plt.subplots_adjust(wspace=0.5)
      -
      -dt = 0.01
      -t = np.arange(0, 30, dt)
      -nse1 = np.random.randn(len(t))                 # white noise 1
      -nse2 = np.random.randn(len(t))                 # white noise 2
      -r = np.exp(-t/0.05)
      -
      -cnse1 = np.convolve(nse1, r, mode='same')*dt   # colored noise 1
      -cnse2 = np.convolve(nse2, r, mode='same')*dt   # colored noise 2
      -
      -# two signals with a coherent part and a random part
      -s1 = 0.01*np.sin(2*np.pi*10*t) + cnse1
      -s2 = 0.01*np.sin(2*np.pi*10*t) + cnse2
      -
      -plt.subplot(211)
      -plt.plot(t, s1, 'b-', t, s2, 'g-')
      -plt.xlim(0,5)
      -plt.xlabel('time')
      -plt.ylabel('s1 and s2')
      -plt.grid(True)
      -
      -plt.subplot(212)
      -cxy, f = plt.csd(s1, s2, 256, 1./dt)
      -plt.ylabel('CSD (db)')
      -plt.show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/pylab_examples/cursor_demo.html b/dev/examples/pylab_examples/cursor_demo.html deleted file mode 100644 index 2ebc0287852..00000000000 --- a/dev/examples/pylab_examples/cursor_demo.html +++ /dev/null @@ -1,226 +0,0 @@ - - - - - - - - pylab_examples example code: cursor_demo.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      pylab_examples example code: cursor_demo.py

      -

      [source code]

      -
      #!/usr/bin/env python
      -# -*- noplot -*-
      -
      -"""
      -
      -This example shows how to use matplotlib to provide a data cursor.  It
      -uses matplotlib to draw the cursor and may be a slow since this
      -requires redrawing the figure with every mouse move.
      -
      -Faster cursoring is possible using native GUI drawing, as in
      -wxcursor_demo.py
      -"""
      -from __future__ import print_function
      -from pylab import *
      -
      -
      -class Cursor:
      -    def __init__(self, ax):
      -        self.ax = ax
      -        self.lx = ax.axhline(color='k')  # the horiz line
      -        self.ly = ax.axvline(color='k')  # the vert line
      -
      -        # text location in axes coords
      -        self.txt = ax.text( 0.7, 0.9, '', transform=ax.transAxes)
      -
      -    def mouse_move(self, event):
      -        if not event.inaxes: return
      -
      -        x, y = event.xdata, event.ydata
      -        # update the line positions
      -        self.lx.set_ydata(y )
      -        self.ly.set_xdata(x )
      -
      -        self.txt.set_text( 'x=%1.2f, y=%1.2f'%(x,y) )
      -        draw()
      -
      -
      -class SnaptoCursor:
      -    """
      -    Like Cursor but the crosshair snaps to the nearest x,y point
      -    For simplicity, I'm assuming x is sorted
      -    """
      -    def __init__(self, ax, x, y):
      -        self.ax = ax
      -        self.lx = ax.axhline(color='k')  # the horiz line
      -        self.ly = ax.axvline(color='k')  # the vert line
      -        self.x = x
      -        self.y = y
      -        # text location in axes coords
      -        self.txt = ax.text( 0.7, 0.9, '', transform=ax.transAxes)
      -
      -    def mouse_move(self, event):
      -
      -        if not event.inaxes: return
      -
      -        x, y = event.xdata, event.ydata
      -
      -        indx = searchsorted(self.x, [x])[0]
      -        x = self.x[indx]
      -        y = self.y[indx]
      -        # update the line positions
      -        self.lx.set_ydata(y )
      -        self.ly.set_xdata(x )
      -
      -        self.txt.set_text( 'x=%1.2f, y=%1.2f'%(x,y) )
      -        print ('x=%1.2f, y=%1.2f'%(x,y))
      -        draw()
      -
      -t = arange(0.0, 1.0, 0.01)
      -s = sin(2*2*pi*t)
      -ax = subplot(111)
      -
      -cursor = Cursor(ax)
      -#cursor = SnaptoCursor(ax, t, s)
      -connect('motion_notify_event', cursor.mouse_move)
      -
      -ax.plot(t, s, 'o')
      -axis([0,1,-1,1])
      -show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/pylab_examples/cursor_demo.py b/dev/examples/pylab_examples/cursor_demo.py deleted file mode 100644 index e98854f02c3..00000000000 --- a/dev/examples/pylab_examples/cursor_demo.py +++ /dev/null @@ -1,80 +0,0 @@ -#!/usr/bin/env python -# -*- noplot -*- - -""" - -This example shows how to use matplotlib to provide a data cursor. It -uses matplotlib to draw the cursor and may be a slow since this -requires redrawing the figure with every mouse move. - -Faster cursoring is possible using native GUI drawing, as in -wxcursor_demo.py -""" -from __future__ import print_function -from pylab import * - - -class Cursor: - def __init__(self, ax): - self.ax = ax - self.lx = ax.axhline(color='k') # the horiz line - self.ly = ax.axvline(color='k') # the vert line - - # text location in axes coords - self.txt = ax.text( 0.7, 0.9, '', transform=ax.transAxes) - - def mouse_move(self, event): - if not event.inaxes: return - - x, y = event.xdata, event.ydata - # update the line positions - self.lx.set_ydata(y ) - self.ly.set_xdata(x ) - - self.txt.set_text( 'x=%1.2f, y=%1.2f'%(x,y) ) - draw() - - -class SnaptoCursor: - """ - Like Cursor but the crosshair snaps to the nearest x,y point - For simplicity, I'm assuming x is sorted - """ - def __init__(self, ax, x, y): - self.ax = ax - self.lx = ax.axhline(color='k') # the horiz line - self.ly = ax.axvline(color='k') # the vert line - self.x = x - self.y = y - # text location in axes coords - self.txt = ax.text( 0.7, 0.9, '', transform=ax.transAxes) - - def mouse_move(self, event): - - if not event.inaxes: return - - x, y = event.xdata, event.ydata - - indx = searchsorted(self.x, [x])[0] - x = self.x[indx] - y = self.y[indx] - # update the line positions - self.lx.set_ydata(y ) - self.ly.set_xdata(x ) - - self.txt.set_text( 'x=%1.2f, y=%1.2f'%(x,y) ) - print ('x=%1.2f, y=%1.2f'%(x,y)) - draw() - -t = arange(0.0, 1.0, 0.01) -s = sin(2*2*pi*t) -ax = subplot(111) - -cursor = Cursor(ax) -#cursor = SnaptoCursor(ax, t, s) -connect('motion_notify_event', cursor.mouse_move) - -ax.plot(t, s, 'o') -axis([0,1,-1,1]) -show() - diff --git a/dev/examples/pylab_examples/custom_cmap.html b/dev/examples/pylab_examples/custom_cmap.html deleted file mode 100644 index eaa5f914edd..00000000000 --- a/dev/examples/pylab_examples/custom_cmap.html +++ /dev/null @@ -1,342 +0,0 @@ - - - - - - - - pylab_examples example code: custom_cmap.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      pylab_examples example code: custom_cmap.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/custom_cmap.png -
      -
      #!/usr/bin/env python
      -
      -import numpy as np
      -import matplotlib.pyplot as plt
      -from matplotlib.colors import LinearSegmentedColormap
      -
      -"""
      -
      -Example: suppose you want red to increase from 0 to 1 over the bottom
      -half, green to do the same over the middle half, and blue over the top
      -half.  Then you would use:
      -
      -cdict = {'red':   ((0.0,  0.0, 0.0),
      -                   (0.5,  1.0, 1.0),
      -                   (1.0,  1.0, 1.0)),
      -
      -         'green': ((0.0,  0.0, 0.0),
      -                   (0.25, 0.0, 0.0),
      -                   (0.75, 1.0, 1.0),
      -                   (1.0,  1.0, 1.0)),
      -
      -         'blue':  ((0.0,  0.0, 0.0),
      -                   (0.5,  0.0, 0.0),
      -                   (1.0,  1.0, 1.0))}
      -
      -If, as in this example, there are no discontinuities in the r, g, and b
      -components, then it is quite simple: the second and third element of
      -each tuple, above, is the same--call it "y".  The first element ("x")
      -defines interpolation intervals over the full range of 0 to 1, and it
      -must span that whole range.  In other words, the values of x divide the
      -0-to-1 range into a set of segments, and y gives the end-point color
      -values for each segment.
      -
      -Now consider the green. cdict['green'] is saying that for
      -0 <= x <= 0.25, y is zero; no green.
      -0.25 < x <= 0.75, y varies linearly from 0 to 1.
      -x > 0.75, y remains at 1, full green.
      -
      -If there are discontinuities, then it is a little more complicated.
      -Label the 3 elements in each row in the cdict entry for a given color as
      -(x, y0, y1).  Then for values of x between x[i] and x[i+1] the color
      -value is interpolated between y1[i] and y0[i+1].
      -
      -Going back to the cookbook example, look at cdict['red']; because y0 !=
      -y1, it is saying that for x from 0 to 0.5, red increases from 0 to 1,
      -but then it jumps down, so that for x from 0.5 to 1, red increases from
      -0.7 to 1.  Green ramps from 0 to 1 as x goes from 0 to 0.5, then jumps
      -back to 0, and ramps back to 1 as x goes from 0.5 to 1.
      -
      -row i:   x  y0  y1
      -                /
      -               /
      -row i+1: x  y0  y1
      -
      -Above is an attempt to show that for x in the range x[i] to x[i+1], the
      -interpolation is between y1[i] and y0[i+1].  So, y0[0] and y1[-1] are
      -never used.
      -
      -"""
      -
      -
      -
      -cdict1 = {'red':   ((0.0, 0.0, 0.0),
      -                   (0.5, 0.0, 0.1),
      -                   (1.0, 1.0, 1.0)),
      -
      -         'green': ((0.0, 0.0, 0.0),
      -                   (1.0, 0.0, 0.0)),
      -
      -         'blue':  ((0.0, 0.0, 1.0),
      -                   (0.5, 0.1, 0.0),
      -                   (1.0, 0.0, 0.0))
      -        }
      -
      -cdict2 = {'red':   ((0.0, 0.0, 0.0),
      -                   (0.5, 0.0, 1.0),
      -                   (1.0, 0.1, 1.0)),
      -
      -         'green': ((0.0, 0.0, 0.0),
      -                   (1.0, 0.0, 0.0)),
      -
      -         'blue':  ((0.0, 0.0, 0.1),
      -                   (0.5, 1.0, 0.0),
      -                   (1.0, 0.0, 0.0))
      -        }
      -
      -cdict3 = {'red':  ((0.0, 0.0, 0.0),
      -                   (0.25,0.0, 0.0),
      -                   (0.5, 0.8, 1.0),
      -                   (0.75,1.0, 1.0),
      -                   (1.0, 0.4, 1.0)),
      -
      -         'green': ((0.0, 0.0, 0.0),
      -                   (0.25,0.0, 0.0),
      -                   (0.5, 0.9, 0.9),
      -                   (0.75,0.0, 0.0),
      -                   (1.0, 0.0, 0.0)),
      -
      -         'blue':  ((0.0, 0.0, 0.4),
      -                   (0.25,1.0, 1.0),
      -                   (0.5, 1.0, 0.8),
      -                   (0.75,0.0, 0.0),
      -                   (1.0, 0.0, 0.0))
      -        }
      -
      -# Make a modified version of cdict3 with some transparency
      -# in the middle of the range.
      -cdict4 = cdict3.copy()
      -cdict4['alpha'] = ((0.0, 1.0, 1.0),
      -                #   (0.25,1.0, 1.0),
      -                   (0.5, 0.3, 0.3),
      -                #   (0.75,1.0, 1.0),
      -                   (1.0, 1.0, 1.0))
      -
      -
      -# Now we will use this example to illustrate 3 ways of
      -# handling custom colormaps.
      -# First, the most direct and explicit:
      -
      -blue_red1 = LinearSegmentedColormap('BlueRed1', cdict1)
      -
      -# Second, create the map explicitly and register it.
      -# Like the first method, this method works with any kind
      -# of Colormap, not just
      -# a LinearSegmentedColormap:
      -
      -blue_red2 = LinearSegmentedColormap('BlueRed2', cdict2)
      -plt.register_cmap(cmap=blue_red2)
      -
      -# Third, for LinearSegmentedColormap only,
      -# leave everything to register_cmap:
      -
      -plt.register_cmap(name='BlueRed3', data=cdict3) # optional lut kwarg
      -plt.register_cmap(name='BlueRedAlpha', data=cdict4)
      -
      -# Make some illustrative fake data:
      -
      -x = np.arange(0, np.pi, 0.1)
      -y = np.arange(0, 2*np.pi, 0.1)
      -X, Y = np.meshgrid(x,y)
      -Z = np.cos(X) * np.sin(Y) * 10
      -
      -# Make the figure:
      -
      -plt.figure(figsize=(6,9))
      -plt.subplots_adjust(left=0.02, bottom=0.06, right=0.95, top=0.94, wspace=0.05)
      -
      -# Make 4 subplots:
      -
      -plt.subplot(2,2,1)
      -plt.imshow(Z, interpolation='nearest', cmap=blue_red1)
      -plt.colorbar()
      -
      -plt.subplot(2,2,2)
      -cmap = plt.get_cmap('BlueRed2')
      -plt.imshow(Z, interpolation='nearest', cmap=cmap)
      -plt.colorbar()
      -
      -# Now we will set the third cmap as the default.  One would
      -# not normally do this in the middle of a script like this;
      -# it is done here just to illustrate the method.
      -
      -plt.rcParams['image.cmap'] = 'BlueRed3'
      -
      -plt.subplot(2,2,3)
      -plt.imshow(Z, interpolation='nearest')
      -plt.colorbar()
      -plt.title("Alpha = 1")
      -
      -# Or as yet another variation, we can replace the rcParams
      -# specification *before* the imshow with the following *after*
      -# imshow.
      -# This sets the new default *and* sets the colormap of the last
      -# image-like item plotted via pyplot, if any.
      -#
      -
      -plt.subplot(2,2,4)
      -# Draw a line with low zorder so it will be behind the image.
      -plt.plot([0, 10*np.pi], [0, 20*np.pi], color='c', lw=20, zorder=-1)
      -
      -plt.imshow(Z, interpolation='nearest')
      -plt.colorbar()
      -
      -# Here it is: changing the colormap for the current image and its
      -# colorbar after they have been plotted.
      -plt.set_cmap('BlueRedAlpha')
      -plt.title("Varying alpha")
      -#
      -
      -plt.suptitle('Custom Blue-Red colormaps', fontsize=16)
      -
      -plt.show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/pylab_examples/custom_figure_class.html b/dev/examples/pylab_examples/custom_figure_class.html deleted file mode 100644 index ba7d3fc7cf2..00000000000 --- a/dev/examples/pylab_examples/custom_figure_class.html +++ /dev/null @@ -1,170 +0,0 @@ - - - - - - - - pylab_examples example code: custom_figure_class.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      pylab_examples example code: custom_figure_class.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/custom_figure_class.png -
      -
      """
      -You can pass a custom Figure constructor to figure if you want to derive from the default Figure.  This simple example creates a figure with a figure title
      -"""
      -from matplotlib.pyplot import figure, show
      -from matplotlib.figure import Figure
      -
      -class MyFigure(Figure):
      -    def __init__(self, *args, **kwargs):
      -        """
      -        custom kwarg figtitle is a figure title
      -        """
      -        figtitle = kwargs.pop('figtitle', 'hi mom')
      -        Figure.__init__(self, *args, **kwargs)
      -        self.text(0.5, 0.95, figtitle, ha='center')
      -
      -fig = figure(FigureClass=MyFigure, figtitle='my title')
      -ax = fig.add_subplot(111)
      -ax.plot([1,2,3])
      -
      -show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/pylab_examples/custom_ticker1.html b/dev/examples/pylab_examples/custom_ticker1.html deleted file mode 100644 index 6d23b696854..00000000000 --- a/dev/examples/pylab_examples/custom_ticker1.html +++ /dev/null @@ -1,179 +0,0 @@ - - - - - - - - pylab_examples example code: custom_ticker1.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      pylab_examples example code: custom_ticker1.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/custom_ticker1.png -
      -
      #!/usr/bin/env python
      -
      -"""
      -The new ticker code was designed to explicitly support user customized
      -ticking.  The documentation
      -http://matplotlib.org/matplotlib.ticker.html details this
      -process.  That code defines a lot of preset tickers but was primarily
      -designed to be user extensible.
      -
      -In this example a user defined function is used to format the ticks in
      -millions of dollars on the y axis
      -"""
      -from matplotlib.ticker import FuncFormatter
      -from pylab import *
      -
      -x =     arange(4)
      -money = [1.5e5, 2.5e6, 5.5e6, 2.0e7]
      -
      -def millions(x, pos):
      -    'The two args are the value and tick position'
      -    return '$%1.1fM' % (x*1e-6)
      -
      -formatter = FuncFormatter(millions)
      -
      -ax = subplot(111)
      -ax.yaxis.set_major_formatter(formatter)
      -bar(x, money)
      -xticks( x + 0.5,  ('Bill', 'Fred', 'Mary', 'Sue') )
      -show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/pylab_examples/customize_rc.html b/dev/examples/pylab_examples/customize_rc.html deleted file mode 100644 index 6564a8a0223..00000000000 --- a/dev/examples/pylab_examples/customize_rc.html +++ /dev/null @@ -1,200 +0,0 @@ - - - - - - - - pylab_examples example code: customize_rc.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      pylab_examples example code: customize_rc.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/customize_rc.png -
      -
      """
      -I'm not trying to make a good looking figure here, but just to show
      -some examples of customizing rc params on the fly
      -
      -If you like to work interactively, and need to create different sets
      -of defaults for figures (eg one set of defaults for publication, one
      -set for interactive exploration), you may want to define some
      -functions in a custom module that set the defaults, eg
      -
      -def set_pub():
      -    rc('font', weight='bold')    # bold fonts are easier to see
      -    rc('tick', labelsize=15)     # tick labels bigger
      -    rc('lines', lw=1, color='k') # thicker black lines (no budget for color!)
      -    rc('grid', c='0.5', ls='-', lw=0.5)  # solid gray grid lines
      -    rc('savefig', dpi=300)       # higher res outputs
      -
      -
      -
      -Then as you are working interactively, you just need to do
      -
      ->>> set_pub()
      ->>> subplot(111)
      ->>> plot([1,2,3])
      ->>> savefig('myfig')
      ->>> rcdefaults()  # restore the defaults
      -
      -"""
      -from pylab import *
      -
      -subplot(311)
      -plot([1,2,3])
      -
      -# the axes attributes need to be set before the call to subplot
      -rc('font', weight='bold')
      -rc('xtick.major', size=5, pad=7)
      -rc('xtick', labelsize=15)
      -
      -# using aliases for color, linestyle and linewidth; gray, solid, thick
      -rc('grid', c='0.5', ls='-', lw=5)
      -rc('lines', lw=2, color='g')
      -subplot(312)
      -
      -plot([1,2,3])
      -grid(True)
      -
      -rcdefaults()
      -subplot(313)
      -plot([1,2,3])
      -grid(True)
      -show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/pylab_examples/dannys_example.html b/dev/examples/pylab_examples/dannys_example.html deleted file mode 100644 index 925bca304de..00000000000 --- a/dev/examples/pylab_examples/dannys_example.html +++ /dev/null @@ -1,209 +0,0 @@ - - - - - - - - pylab_examples example code: dannys_example.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      pylab_examples example code: dannys_example.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/dannys_example.png -
      -
      import matplotlib
      -matplotlib.rc('text', usetex = True)
      -import pylab
      -import numpy as np
      -
      -## interface tracking profiles
      -N = 500
      -delta = 0.6
      -X = -1 + 2. * np.arange(N) / (N - 1)
      -pylab.plot(X, (1 - np.tanh(4. * X / delta)) / 2,     ## phase field tanh profiles
      -           X, (X + 1) / 2,                           ## level set distance function
      -           X, (1.4 + np.tanh(4. * X / delta)) / 4,   ## composition profile
      -           X, X < 0, 'k--',                               ## sharp interface
      -           linewidth = 5)
      -
      -## legend
      -pylab.legend((r'phase field', r'level set', r'composition', r'sharp interface'), shadow = True, loc = (0.01, 0.55))
      -ltext = pylab.gca().get_legend().get_texts()
      -pylab.setp(ltext[0], fontsize = 20, color = 'b')
      -pylab.setp(ltext[1], fontsize = 20, color = 'g')
      -pylab.setp(ltext[2], fontsize = 20, color = 'r')
      -pylab.setp(ltext[3], fontsize = 20, color = 'k')
      -
      -## the arrow
      -height = 0.1
      -offset = 0.02
      -pylab.plot((-delta / 2., delta / 2), (height, height), 'k', linewidth = 2)
      -pylab.plot((-delta / 2, -delta / 2 + offset * 2), (height, height - offset), 'k', linewidth = 2)
      -pylab.plot((-delta / 2, -delta / 2 + offset * 2), (height, height + offset), 'k', linewidth = 2)
      -pylab.plot((delta / 2, delta / 2 - offset * 2), (height, height - offset), 'k', linewidth = 2)
      -pylab.plot((delta / 2, delta / 2 - offset * 2), (height, height + offset), 'k', linewidth = 2)
      -pylab.text(-0.06, height - 0.06, r'$\delta$', {'color' : 'k', 'fontsize' : 24})
      -
      -## X-axis label
      -pylab.xticks((-1, 0,  1), ('-1', '0',  '1'), color = 'k', size = 20)
      -
      -## Left Y-axis labels
      -pylab.ylabel(r'\bf{phase field} $\phi$', {'color'    : 'b',
      -                                          'fontsize'   : 20 })
      -pylab.yticks((0, 0.5, 1), ('0', '.5', '1'), color = 'k', size = 20)
      -
      -## Right Y-axis labels
      -pylab.text(1.05, 0.5, r"\bf{level set} $\phi$", {'color' : 'g', 'fontsize' : 20},
      -           horizontalalignment = 'left',
      -           verticalalignment = 'center',
      -           rotation = 90,
      -           clip_on = False)
      -pylab.text(1.01, -0.02, "-1", {'color' : 'k', 'fontsize' : 20})
      -pylab.text(1.01, 0.98, "1", {'color' : 'k', 'fontsize' : 20})
      -pylab.text(1.01, 0.48, "0", {'color' : 'k', 'fontsize' : 20})
      -
      -## level set equations
      -pylab.text(0.1, 0.85, r'$|\nabla\phi| = 1,$ \newline $ \frac{\partial \phi}{\partial t} + U|\nabla \phi| = 0$', {'color' : 'g', 'fontsize' : 20})
      -
      -## phase field equations
      -pylab.text(0.2, 0.15, r'$\mathcal{F} = \int f\left( \phi, c \right) dV,$ \newline $ \frac{ \partial \phi } { \partial t } = -M_{ \phi } \frac{ \delta \mathcal{F} } { \delta \phi }$',
      -           {'color' : 'b', 'fontsize' : 20})
      -
      -pylab.show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/pylab_examples/dash_control.html b/dev/examples/pylab_examples/dash_control.html deleted file mode 100644 index b9f2bb6bba5..00000000000 --- a/dev/examples/pylab_examples/dash_control.html +++ /dev/null @@ -1,170 +0,0 @@ - - - - - - - - - - pylab_examples example code: dash_control.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      pylab_examples example code: dash_control.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/dash_control.png -
      -
      #!/usr/bin/env python
      -
      -"""
      -You can precisely specify dashes with an on/off ink rect sequence in
      -points.
      -"""
      -from pylab import *
      -
      -dashes = [5,2,10,5] # 5 points on, 2 off, 3 on, 1 off
      -
      -l, = plot(arange(20), '--')
      -l.set_dashes(dashes)
      -
      -show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/pylab_examples/dashpointlabel.html b/dev/examples/pylab_examples/dashpointlabel.html deleted file mode 100644 index fa40fb23fd2..00000000000 --- a/dev/examples/pylab_examples/dashpointlabel.html +++ /dev/null @@ -1,189 +0,0 @@ - - - - - - - - pylab_examples example code: dashpointlabel.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      pylab_examples example code: dashpointlabel.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/dashpointlabel.png -
      -
      import pylab
      -
      -DATA = ((1, 3),
      -        (2, 4),
      -        (3, 1),
      -        (4, 2))
      -# dash_style =
      -#     direction, length, (text)rotation, dashrotation, push
      -# (The parameters are varied to show their effects,
      -# not for visual appeal).
      -dash_style = (
      -    (0, 20, -15, 30, 10),
      -    (1, 30, 0, 15, 10),
      -    (0, 40, 15, 15, 10),
      -    (1, 20, 30, 60, 10),
      -    )
      -
      -fig = pylab.figure()
      -ax = fig.add_subplot(111)
      -
      -
      -(x,y) = zip(*DATA)
      -ax.plot(x, y, marker='o')
      -for i in range(len(DATA)):
      -    (x,y) = DATA[i]
      -    (dd, dl, r, dr, dp) = dash_style[i]
      -    #print 'dashlen call', dl
      -    t = ax.text(x, y, str((x,y)), withdash=True,
      -               dashdirection=dd,
      -               dashlength=dl,
      -               rotation=r,
      -               dashrotation=dr,
      -               dashpush=dp,
      -               )
      -
      -ax.set_xlim((0.0, 5.0))
      -ax.set_ylim((0.0, 5.0))
      -
      -pylab.show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/pylab_examples/data_helper.html b/dev/examples/pylab_examples/data_helper.html deleted file mode 100644 index cd429faf8f7..00000000000 --- a/dev/examples/pylab_examples/data_helper.html +++ /dev/null @@ -1,205 +0,0 @@ - - - - - - - - pylab_examples example code: data_helper.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      pylab_examples example code: data_helper.py

      -

      (Source code)

      -
      #!/usr/bin/env python
      -# Some functions to load a return data for the plot demos
      -
      -from numpy import fromstring, argsort, take, array, resize
      -import matplotlib.cbook as cbook
      -def get_two_stock_data():
      -    """
      -    load stock time and price data for two stocks The return values
      -    (d1,p1,d2,p2) are the trade time (in days) and prices for stocks 1
      -    and 2 (intc and aapl)
      -    """
      -    ticker1, ticker2 = 'INTC', 'AAPL'
      -
      -    file1 = cbook.get_sample_data('INTC.dat.gz')
      -    file2 = cbook.get_sample_data('AAPL.dat.gz')
      -    M1 = fromstring( file1.read(), '<d')
      -
      -    M1 = resize(M1, (M1.shape[0]/2,2) )
      -
      -    M2 = fromstring( file2.read(), '<d')
      -    M2 = resize(M2, (M2.shape[0]/2,2) )
      -
      -    d1, p1 = M1[:,0], M1[:,1]
      -    d2, p2 = M2[:,0], M2[:,1]
      -    return (d1,p1,d2,p2)
      -
      -
      -def get_daily_data():
      -    """
      -    return stock1 and stock2 instances, each of which have attributes
      -
      -      open, high, low, close, volume
      -
      -    as numeric arrays
      -
      -    """
      -    class C: pass
      -
      -    def get_ticker(ticker):
      -        vals = []
      -
      -        datafile = cbook.get_sample_data('%s.csv'%ticker, asfileobj=False)
      -
      -        lines = open(datafile).readlines()
      -        for line in lines[1:]:
      -            vals.append([float(val) for val in line.split(',')[1:]])
      -
      -        M = array(vals)
      -        c = C()
      -        c.open = M[:,0]
      -        c.high = M[:,1]
      -        c.low = M[:,2]
      -        c.close = M[:,3]
      -        c.volume = M[:,4]
      -        return c
      -    c1 = get_ticker('intc')
      -    c2 = get_ticker('msft')
      -    return c1, c2
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/pylab_examples/date_demo1.html b/dev/examples/pylab_examples/date_demo1.html deleted file mode 100644 index 91b0205cd74..00000000000 --- a/dev/examples/pylab_examples/date_demo1.html +++ /dev/null @@ -1,203 +0,0 @@ - - - - - - - - pylab_examples example code: date_demo1.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      pylab_examples example code: date_demo1.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/date_demo1.png -
      -
      #!/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
      -
      -This example requires an active internet connection since it uses
      -yahoo finance to get the data for plotting
      -"""
      -
      -from pylab import figure, show
      -from matplotlib.finance import quotes_historical_yahoo
      -from matplotlib.dates import YearLocator, MonthLocator, DateFormatter
      -import datetime
      -date1 = datetime.date( 1995, 1, 1 )
      -date2 = datetime.date( 2004, 4, 12 )
      -
      -years    = YearLocator()   # every year
      -months   = MonthLocator()  # every month
      -yearsFmt = DateFormatter('%Y')
      -
      -quotes = quotes_historical_yahoo(
      -    'INTC', date1, date2)
      -if len(quotes) == 0:
      -    raise SystemExit
      -
      -dates = [q[0] for q in quotes]
      -opens = [q[1] for q in quotes]
      -
      -fig = figure()
      -ax = fig.add_subplot(111)
      -ax.plot_date(dates, opens, '-')
      -
      -# format the ticks
      -ax.xaxis.set_major_locator(years)
      -ax.xaxis.set_major_formatter(yearsFmt)
      -ax.xaxis.set_minor_locator(months)
      -ax.autoscale_view()
      -
      -# format the coords message box
      -def price(x): return '$%1.2f'%x
      -ax.fmt_xdata = DateFormatter('%Y-%m-%d')
      -ax.fmt_ydata = price
      -ax.grid(True)
      -
      -fig.autofmt_xdate()
      -show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/pylab_examples/date_demo2.html b/dev/examples/pylab_examples/date_demo2.html deleted file mode 100644 index 2f8ee6b8f33..00000000000 --- a/dev/examples/pylab_examples/date_demo2.html +++ /dev/null @@ -1,198 +0,0 @@ - - - - - - - - pylab_examples example code: date_demo2.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      pylab_examples example code: date_demo2.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/date_demo2.png -
      -
      #!/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
      -"""
      -from __future__ import print_function
      -import datetime
      -from pylab import figure, show
      -from matplotlib.dates import MONDAY
      -from matplotlib.finance import quotes_historical_yahoo
      -from matplotlib.dates import MonthLocator, WeekdayLocator, DateFormatter
      -
      -
      -date1 = datetime.date( 2002, 1, 5 )
      -date2 = datetime.date( 2003, 12, 1 )
      -
      -# every monday
      -mondays   = WeekdayLocator(MONDAY)
      -
      -# every 3rd month
      -months    = MonthLocator(range(1,13), bymonthday=1, interval=3)
      -monthsFmt = DateFormatter("%b '%y")
      -
      -
      -quotes = quotes_historical_yahoo('INTC', date1, date2)
      -if len(quotes) == 0:
      -    print ('Found no quotes')
      -    raise SystemExit
      -
      -dates = [q[0] for q in quotes]
      -opens = [q[1] for q in quotes]
      -
      -fig = figure()
      -ax = fig.add_subplot(111)
      -ax.plot_date(dates, opens, '-')
      -ax.xaxis.set_major_locator(months)
      -ax.xaxis.set_major_formatter(monthsFmt)
      -ax.xaxis.set_minor_locator(mondays)
      -ax.autoscale_view()
      -#ax.xaxis.grid(False, 'major')
      -#ax.xaxis.grid(True, 'minor')
      -ax.grid(True)
      -
      -fig.autofmt_xdate()
      -
      -show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/pylab_examples/date_demo_convert.html b/dev/examples/pylab_examples/date_demo_convert.html deleted file mode 100644 index 0f5d6ab218d..00000000000 --- a/dev/examples/pylab_examples/date_demo_convert.html +++ /dev/null @@ -1,184 +0,0 @@ - - - - - - - - pylab_examples example code: date_demo_convert.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      pylab_examples example code: date_demo_convert.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/date_demo_convert.png -
      -
      #!/usr/bin/env python
      -
      -import datetime
      -from matplotlib.pyplot import figure, show
      -from matplotlib.dates import DayLocator, HourLocator, DateFormatter, drange
      -from numpy import arange
      -
      -date1 = datetime.datetime( 2000, 3, 2)
      -date2 = datetime.datetime( 2000, 3, 6)
      -delta = datetime.timedelta(hours=6)
      -dates = drange(date1, date2, delta)
      -
      -y = arange( len(dates)*1.0)
      -
      -fig = figure()
      -ax = fig.add_subplot(111)
      -ax.plot_date(dates, y*y)
      -
      -# this is superfluous, since the autoscaler should get it right, but
      -# use date2num and num2date to convert between dates and floats if
      -# you want; both date2num and num2date convert an instance or sequence
      -ax.set_xlim( dates[0], dates[-1] )
      -
      -# The hour locator takes the hour or sequence of hours you want to
      -# tick, not the base multiple
      -
      -ax.xaxis.set_major_locator( DayLocator() )
      -ax.xaxis.set_minor_locator( HourLocator(arange(0,25,6)) )
      -ax.xaxis.set_major_formatter( DateFormatter('%Y-%m-%d') )
      -
      -ax.fmt_xdata = DateFormatter('%Y-%m-%d %H:%M:%S')
      -fig.autofmt_xdate()
      -
      -show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/pylab_examples/date_demo_rrule.html b/dev/examples/pylab_examples/date_demo_rrule.html deleted file mode 100644 index 63ca0df3aa8..00000000000 --- a/dev/examples/pylab_examples/date_demo_rrule.html +++ /dev/null @@ -1,181 +0,0 @@ - - - - - - - - pylab_examples example code: date_demo_rrule.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      pylab_examples example code: date_demo_rrule.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/date_demo_rrule.png -
      -
      #!/usr/bin/env python
      -"""
      -Show how to use an rrule instance to make a custom date ticker - here
      -we put a tick mark on every 5th easter
      -
      -See https://moin.conectiva.com.br/DateUtil for help with rrules
      -"""
      -from pylab import *
      -from matplotlib.dates import YEARLY, DateFormatter, rrulewrapper, RRuleLocator, drange
      -import datetime
      -
      -# tick every 5th easter
      -rule = rrulewrapper(YEARLY, byeaster=1, interval=5)
      -loc = RRuleLocator(rule)
      -formatter = DateFormatter('%m/%d/%y')
      -date1 = datetime.date( 1952, 1, 1 )
      -date2 = datetime.date( 2004, 4, 12 )
      -delta = datetime.timedelta(days=100)
      -
      -dates = drange(date1, date2, delta)
      -s = rand(len(dates)) # make up some random y values
      -
      -
      -ax = subplot(111)
      -plot_date(dates, s)
      -ax.xaxis.set_major_locator(loc)
      -ax.xaxis.set_major_formatter(formatter)
      -labels = ax.get_xticklabels()
      -setp(labels, rotation=30, fontsize=10)
      -
      -show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/pylab_examples/date_index_formatter.html b/dev/examples/pylab_examples/date_index_formatter.html deleted file mode 100644 index 0e9fe2379d8..00000000000 --- a/dev/examples/pylab_examples/date_index_formatter.html +++ /dev/null @@ -1,190 +0,0 @@ - - - - - - - - pylab_examples example code: date_index_formatter.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      pylab_examples example code: date_index_formatter.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/date_index_formatter.png -
      -
      """
      -When plotting daily data, a frequent request is to plot the data
      -ignoring skips, eg no extra spaces for weekends.  This is particularly
      -common in financial time series, when you may have data for M-F and
      -not Sat, Sun and you don't want gaps in the x axis.  The approach is
      -to simply use the integer index for the xdata and a custom tick
      -Formatter to get the appropriate date string for a given index.
      -"""
      -
      -from __future__ import print_function
      -import numpy
      -from matplotlib.mlab import csv2rec
      -from pylab import figure, show
      -import matplotlib.cbook as cbook
      -from matplotlib.ticker import Formatter
      -
      -datafile = cbook.get_sample_data('msft.csv', asfileobj=False)
      -print ('loading %s' % datafile)
      -r = csv2rec(datafile)[-40:]
      -
      -class MyFormatter(Formatter):
      -    def __init__(self, dates, fmt='%Y-%m-%d'):
      -        self.dates = dates
      -        self.fmt = fmt
      -
      -    def __call__(self, x, pos=0):
      -        'Return the label for time x at position pos'
      -        ind = int(round(x))
      -        if ind>=len(self.dates) or ind<0: return ''
      -
      -        return self.dates[ind].strftime(self.fmt)
      -
      -formatter = MyFormatter(r.date)
      -
      -fig = figure()
      -ax = fig.add_subplot(111)
      -ax.xaxis.set_major_formatter(formatter)
      -ax.plot(numpy.arange(len(r)), r.close, 'o-')
      -fig.autofmt_xdate()
      -show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/pylab_examples/demo_agg_filter.html b/dev/examples/pylab_examples/demo_agg_filter.html deleted file mode 100644 index b533f73f465..00000000000 --- a/dev/examples/pylab_examples/demo_agg_filter.html +++ /dev/null @@ -1,482 +0,0 @@ - - - - - - - - pylab_examples example code: demo_agg_filter.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      pylab_examples example code: demo_agg_filter.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/demo_agg_filter.png -
      -
      import matplotlib.pyplot as plt
      -
      -import numpy as np
      -import matplotlib.cm as cm
      -import matplotlib.mlab as mlab
      -
      -def smooth1d(x, window_len):
      -    # copied from http://www.scipy.org/Cookbook/SignalSmooth
      -
      -    s=np.r_[2*x[0]-x[window_len:1:-1],x,2*x[-1]-x[-1:-window_len:-1]]
      -    w = np.hanning(window_len)
      -    y=np.convolve(w/w.sum(),s,mode='same')
      -    return y[window_len-1:-window_len+1]
      -
      -def smooth2d(A, sigma=3):
      -
      -    window_len = max(int(sigma), 3)*2+1
      -    A1 = np.array([smooth1d(x, window_len) for x in np.asarray(A)])
      -    A2 = np.transpose(A1)
      -    A3 = np.array([smooth1d(x, window_len) for x in A2])
      -    A4 = np.transpose(A3)
      -
      -    return A4
      -
      -
      -
      -
      -class BaseFilter(object):
      -    def prepare_image(self, src_image, dpi, pad):
      -        ny, nx, depth = src_image.shape
      -        #tgt_image = np.zeros([pad*2+ny, pad*2+nx, depth], dtype="d")
      -        padded_src = np.zeros([pad*2+ny, pad*2+nx, depth], dtype="d")
      -        padded_src[pad:-pad, pad:-pad,:] = src_image[:,:,:]
      -
      -        return padded_src#, tgt_image
      -
      -    def get_pad(self, dpi):
      -        return 0
      -
      -    def __call__(self, im, dpi):
      -        pad = self.get_pad(dpi)
      -        padded_src = self.prepare_image(im, dpi, pad)
      -        tgt_image = self.process_image(padded_src, dpi)
      -        return tgt_image, -pad, -pad
      -
      -
      -class OffsetFilter(BaseFilter):
      -    def __init__(self, offsets=None):
      -        if offsets is None:
      -            self.offsets = (0, 0)
      -        else:
      -            self.offsets = offsets
      -
      -    def get_pad(self, dpi):
      -        return int(max(*self.offsets)/72.*dpi)
      -
      -    def process_image(self, padded_src, dpi):
      -        ox, oy = self.offsets
      -        a1 = np.roll(padded_src, int(ox/72.*dpi), axis=1)
      -        a2 = np.roll(a1, -int(oy/72.*dpi), axis=0)
      -        return a2
      -
      -class GaussianFilter(BaseFilter):
      -    "simple gauss filter"
      -    def __init__(self, sigma, alpha=0.5, color=None):
      -        self.sigma = sigma
      -        self.alpha = alpha
      -        if color is None:
      -            self.color=(0, 0, 0)
      -        else:
      -            self.color=color
      -
      -    def get_pad(self, dpi):
      -        return int(self.sigma*3/72.*dpi)
      -
      -
      -    def process_image(self, padded_src, dpi):
      -        #offsetx, offsety = int(self.offsets[0]), int(self.offsets[1])
      -        tgt_image = np.zeros_like(padded_src)
      -        aa = smooth2d(padded_src[:,:,-1]*self.alpha,
      -                      self.sigma/72.*dpi)
      -        tgt_image[:,:,-1] = aa
      -        tgt_image[:,:,:-1] = self.color
      -        return tgt_image
      -
      -class DropShadowFilter(BaseFilter):
      -    def __init__(self, sigma, alpha=0.3, color=None, offsets=None):
      -        self.gauss_filter = GaussianFilter(sigma, alpha, color)
      -        self.offset_filter = OffsetFilter(offsets)
      -
      -    def get_pad(self, dpi):
      -        return max(self.gauss_filter.get_pad(dpi),
      -                   self.offset_filter.get_pad(dpi))
      -
      -    def process_image(self, padded_src, dpi):
      -        t1 = self.gauss_filter.process_image(padded_src, dpi)
      -        t2 = self.offset_filter.process_image(t1, dpi)
      -        return t2
      -
      -
      -from matplotlib.colors import LightSource
      -
      -class LightFilter(BaseFilter):
      -    "simple gauss filter"
      -    def __init__(self, sigma, fraction=0.5):
      -        self.gauss_filter = GaussianFilter(sigma, alpha=1)
      -        self.light_source = LightSource()
      -        self.fraction = fraction
      -        #hsv_min_val=0.5,hsv_max_val=0.9,
      -        #                                hsv_min_sat=0.1,hsv_max_sat=0.1)
      -    def get_pad(self, dpi):
      -        return self.gauss_filter.get_pad(dpi)
      -
      -    def process_image(self, padded_src, dpi):
      -        t1 = self.gauss_filter.process_image(padded_src, dpi)
      -        elevation = t1[:,:,3]
      -        rgb = padded_src[:,:,:3]
      -
      -        rgb2 = self.light_source.shade_rgb(rgb, elevation,
      -                                           fraction=self.fraction)
      -
      -        tgt = np.empty_like(padded_src)
      -        tgt[:,:,:3] = rgb2
      -        tgt[:,:,3] = padded_src[:,:,3]
      -
      -        return tgt
      -
      -
      -
      -class GrowFilter(BaseFilter):
      -    "enlarge the area"
      -    def __init__(self, pixels, color=None):
      -        self.pixels = pixels
      -        if color is None:
      -            self.color=(1, 1, 1)
      -        else:
      -            self.color=color
      -
      -    def __call__(self, im, dpi):
      -        pad = self.pixels
      -        ny, nx, depth = im.shape
      -        new_im = np.empty([pad*2+ny, pad*2+nx, depth], dtype="d")
      -        alpha = new_im[:,:,3]
      -        alpha.fill(0)
      -        alpha[pad:-pad, pad:-pad] = im[:,:,-1]
      -        alpha2 = np.clip(smooth2d(alpha, self.pixels/72.*dpi) * 5, 0, 1)
      -        new_im[:,:,-1] = alpha2
      -        new_im[:,:,:-1] = self.color
      -        offsetx, offsety = -pad, -pad
      -
      -        return new_im, offsetx, offsety
      -
      -
      -from matplotlib.artist import Artist
      -
      -class FilteredArtistList(Artist):
      -    """
      -    A simple container to draw filtered artist.
      -    """
      -    def __init__(self, artist_list, filter):
      -        self._artist_list = artist_list
      -        self._filter = filter
      -        Artist.__init__(self)
      -
      -    def draw(self, renderer):
      -        renderer.start_rasterizing()
      -        renderer.start_filter()
      -        for a in self._artist_list:
      -            a.draw(renderer)
      -        renderer.stop_filter(self._filter)
      -        renderer.stop_rasterizing()
      -
      -
      -
      -import matplotlib.transforms as mtransforms
      -
      -def filtered_text(ax):
      -    # mostly copied from contour_demo.py
      -
      -    # prepare image
      -    delta = 0.025
      -    x = np.arange(-3.0, 3.0, delta)
      -    y = np.arange(-2.0, 2.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)
      -    # difference of Gaussians
      -    Z = 10.0 * (Z2 - Z1)
      -
      -
      -    # draw
      -    im = ax.imshow(Z, interpolation='bilinear', origin='lower',
      -                   cmap=cm.gray, extent=(-3,3,-2,2))
      -    levels = np.arange(-1.2, 1.6, 0.2)
      -    CS = ax.contour(Z, levels,
      -                    origin='lower',
      -                    linewidths=2,
      -                    extent=(-3,3,-2,2))
      -
      -    ax.set_aspect("auto")
      -
      -    # contour label
      -    cl = ax.clabel(CS, levels[1::2],  # label every second level
      -                   inline=1,
      -                   fmt='%1.1f',
      -                   fontsize=11)
      -
      -    # change clable color to black
      -    from matplotlib.patheffects import Normal
      -    for t in cl:
      -        t.set_color("k")
      -        t.set_path_effects([Normal()]) # to force TextPath (i.e., same font in all backends)
      -
      -    # Add white glows to improve visibility of labels.
      -    white_glows = FilteredArtistList(cl, GrowFilter(3))
      -    ax.add_artist(white_glows)
      -    white_glows.set_zorder(cl[0].get_zorder()-0.1)
      -
      -    ax.xaxis.set_visible(False)
      -    ax.yaxis.set_visible(False)
      -
      -
      -def drop_shadow_line(ax):
      -    # copied from examples/misc/svg_filter_line.py
      -
      -    # draw lines
      -    l1, = ax.plot([0.1, 0.5, 0.9], [0.1, 0.9, 0.5], "bo-",
      -                  mec="b", mfc="w", lw=5, mew=3, ms=10, label="Line 1")
      -    l2, = ax.plot([0.1, 0.5, 0.9], [0.5, 0.2, 0.7], "ro-",
      -                  mec="r", mfc="w", lw=5, mew=3, ms=10, label="Line 1")
      -
      -
      -    gauss = DropShadowFilter(4)
      -
      -    for l in [l1, l2]:
      -
      -        # draw shadows with same lines with slight offset.
      -
      -        xx = l.get_xdata()
      -        yy = l.get_ydata()
      -        shadow, = ax.plot(xx, yy)
      -        shadow.update_from(l)
      -
      -        # offset transform
      -        ot = mtransforms.offset_copy(l.get_transform(), ax.figure,
      -                                     x=4.0, y=-6.0, units='points')
      -
      -        shadow.set_transform(ot)
      -
      -
      -        # adjust zorder of the shadow lines so that it is drawn below the
      -        # original lines
      -        shadow.set_zorder(l.get_zorder()-0.5)
      -        shadow.set_agg_filter(gauss)
      -        shadow.set_rasterized(True) # to support mixed-mode renderers
      -
      -
      -
      -    ax.set_xlim(0., 1.)
      -    ax.set_ylim(0., 1.)
      -
      -    ax.xaxis.set_visible(False)
      -    ax.yaxis.set_visible(False)
      -
      -
      -
      -
      -def drop_shadow_patches(ax):
      -    # copyed from barchart_demo.py
      -    N = 5
      -    menMeans = (20, 35, 30, 35, 27)
      -
      -    ind = np.arange(N)  # the x locations for the groups
      -    width = 0.35       # the width of the bars
      -
      -    rects1 = ax.bar(ind, menMeans, width, color='r', ec="w", lw=2)
      -
      -    womenMeans = (25, 32, 34, 20, 25)
      -    rects2 = ax.bar(ind+width+0.1, womenMeans, width, color='y', ec="w", lw=2)
      -
      -    #gauss = GaussianFilter(1.5, offsets=(1,1), )
      -    gauss = DropShadowFilter(5, offsets=(1,1), )
      -    shadow = FilteredArtistList(rects1+rects2, gauss)
      -    ax.add_artist(shadow)
      -    shadow.set_zorder(rects1[0].get_zorder()-0.1)
      -
      -    ax.set_xlim(ind[0]-0.5, ind[-1]+1.5)
      -    ax.set_ylim(0, 40)
      -
      -    ax.xaxis.set_visible(False)
      -    ax.yaxis.set_visible(False)
      -
      -
      -def light_filter_pie(ax):
      -    fracs = [15,30,45, 10]
      -    explode=(0, 0.05, 0, 0)
      -    pies = ax.pie(fracs, explode=explode)
      -    ax.patch.set_visible(True)
      -
      -    light_filter = LightFilter(9)
      -    for p in pies[0]:
      -        p.set_agg_filter(light_filter)
      -        p.set_rasterized(True) # to support mixed-mode renderers
      -        p.set(ec="none",
      -              lw=2)
      -
      -    gauss = DropShadowFilter(9, offsets=(3,4), alpha=0.7)
      -    shadow = FilteredArtistList(pies[0], gauss)
      -    ax.add_artist(shadow)
      -    shadow.set_zorder(pies[0][0].get_zorder()-0.1)
      -
      -
      -if 1:
      -
      -    plt.figure(1, figsize=(6, 6))
      -    plt.subplots_adjust(left=0.05, right=0.95)
      -
      -    ax = plt.subplot(221)
      -    filtered_text(ax)
      -
      -    ax = plt.subplot(222)
      -    drop_shadow_line(ax)
      -
      -    ax = plt.subplot(223)
      -    drop_shadow_patches(ax)
      -
      -    ax = plt.subplot(224)
      -    ax.set_aspect(1)
      -    light_filter_pie(ax)
      -    ax.set_frame_on(True)
      -
      -    plt.show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/pylab_examples/demo_annotation_box.html b/dev/examples/pylab_examples/demo_annotation_box.html deleted file mode 100644 index 6fb8e4374e3..00000000000 --- a/dev/examples/pylab_examples/demo_annotation_box.html +++ /dev/null @@ -1,244 +0,0 @@ - - - - - - - - pylab_examples example code: demo_annotation_box.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      pylab_examples example code: demo_annotation_box.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/demo_annotation_box.png -
      -
      import matplotlib.pyplot as plt
      -from matplotlib.offsetbox import TextArea, DrawingArea, OffsetImage, \
      -     AnnotationBbox
      -from matplotlib.cbook import get_sample_data
      -
      -import numpy as np
      -
      -if 1:
      -    fig = plt.gcf()
      -    fig.clf()
      -    ax = plt.subplot(111)
      -
      -    offsetbox = TextArea("Test 1", minimumdescent=False)
      -
      -    xy = (0.5, 0.7)
      -
      -    ax.plot(xy[0], xy[1], ".r")
      -
      -    ab = AnnotationBbox(offsetbox, xy,
      -                        xybox=(-20, 40),
      -                        xycoords='data',
      -                        boxcoords="offset points",
      -                        arrowprops=dict(arrowstyle="->"))
      -    ax.add_artist(ab)
      -
      -    offsetbox = TextArea("Test", minimumdescent=False)
      -
      -    ab = AnnotationBbox(offsetbox, xy,
      -                        xybox=(1.02, xy[1]),
      -                        xycoords='data',
      -                        boxcoords=("axes fraction", "data"),
      -                        box_alignment=(0.,0.5),
      -                        arrowprops=dict(arrowstyle="->"))
      -    ax.add_artist(ab)
      -
      -
      -    from matplotlib.patches import Circle
      -    da = DrawingArea(20, 20, 0, 0)
      -    p = Circle((10, 10), 10)
      -    da.add_artist(p)
      -
      -    xy = [0.3, 0.55]
      -    ab = AnnotationBbox(da, xy,
      -                        xybox=(1.02, xy[1]),
      -                        xycoords='data',
      -                        boxcoords=("axes fraction", "data"),
      -                        box_alignment=(0.,0.5),
      -                        arrowprops=dict(arrowstyle="->"))
      -                        #arrowprops=None)
      -
      -    ax.add_artist(ab)
      -
      -
      -    arr = np.arange(100).reshape((10,10))
      -    im = OffsetImage(arr, zoom=2)
      -
      -    ab = AnnotationBbox(im, xy,
      -                        xybox=(-50., 50.),
      -                        xycoords='data',
      -                        boxcoords="offset points",
      -                        pad=0.3,
      -                        arrowprops=dict(arrowstyle="->"))
      -                        #arrowprops=None)
      -
      -    ax.add_artist(ab)
      -
      -
      -    # another image
      -
      -
      -    from matplotlib._png import read_png
      -    fn = get_sample_data("grace_hopper.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)
      -
      -    ax.set_xlim(0, 1)
      -    ax.set_ylim(0, 1)
      -
      -
      -    plt.draw()
      -    plt.show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/pylab_examples/demo_bboximage.html b/dev/examples/pylab_examples/demo_bboximage.html deleted file mode 100644 index 7c0ac6b691d..00000000000 --- a/dev/examples/pylab_examples/demo_bboximage.html +++ /dev/null @@ -1,212 +0,0 @@ - - - - - - - - pylab_examples example code: demo_bboximage.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      pylab_examples example code: demo_bboximage.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/demo_bboximage.png -
      -
      import matplotlib.pyplot as plt
      -import numpy as np
      -from matplotlib.image import BboxImage
      -from matplotlib.transforms import Bbox, TransformedBbox
      -
      -if __name__ == "__main__":
      -
      -    fig = plt.figure(1)
      -    ax = plt.subplot(121)
      -
      -    txt = ax.text(0.5, 0.5, "test", size=30, ha="center", color="w")
      -    kwargs = dict()
      -
      -    bbox_image = BboxImage(txt.get_window_extent,
      -                           norm = None,
      -                           origin=None,
      -                           clip_on=False,
      -                           **kwargs
      -                           )
      -    a = np.arange(256).reshape(1,256)/256.
      -    bbox_image.set_data(a)
      -    ax.add_artist(bbox_image)
      -
      -
      -    ax = plt.subplot(122)
      -    a = np.linspace(0, 1, 256).reshape(1,-1)
      -    a = np.vstack((a,a))
      -
      -    maps = sorted(m for m in plt.cm.datad if not m.endswith("_r"))
      -    #nmaps = len(maps) + 1
      -
      -    #fig.subplots_adjust(top=0.99, bottom=0.01, left=0.2, right=0.99)
      -
      -    ncol = 2
      -    nrow = len(maps)//ncol + 1
      -
      -    xpad_fraction = 0.3
      -    dx = 1./(ncol + xpad_fraction*(ncol-1))
      -
      -    ypad_fraction = 0.3
      -    dy = 1./(nrow + ypad_fraction*(nrow-1))
      -
      -    for i,m in enumerate(maps):
      -        ix, iy = divmod(i, nrow)
      -        #plt.figimage(a, 10, i*10, cmap=plt.get_cmap(m), origin='lower')
      -        bbox0 = Bbox.from_bounds(ix*dx*(1+xpad_fraction),
      -                                 1.-iy*dy*(1+ypad_fraction)-dy,
      -                                 dx, dy)
      -        bbox = TransformedBbox(bbox0, ax.transAxes)
      -
      -        bbox_image = BboxImage(bbox,
      -                               cmap = plt.get_cmap(m),
      -                               norm = None,
      -                               origin=None,
      -                               **kwargs
      -                               )
      -
      -        bbox_image.set_data(a)
      -        ax.add_artist(bbox_image)
      -
      -    plt.draw()
      -    plt.show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/pylab_examples/demo_ribbon_box.html b/dev/examples/pylab_examples/demo_ribbon_box.html deleted file mode 100644 index 13f7693dca7..00000000000 --- a/dev/examples/pylab_examples/demo_ribbon_box.html +++ /dev/null @@ -1,290 +0,0 @@ - - - - - - - - pylab_examples example code: demo_ribbon_box.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      pylab_examples example code: demo_ribbon_box.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/demo_ribbon_box.png -
      -
      import matplotlib.pyplot as plt
      -import numpy as np
      -from matplotlib.image import BboxImage
      -
      -from matplotlib._png import read_png
      -import matplotlib.colors
      -from matplotlib.cbook import get_sample_data
      -
      -class RibbonBox(object):
      -
      -    original_image = read_png(get_sample_data("Minduka_Present_Blue_Pack.png",
      -                                              asfileobj=False))
      -    cut_location = 70
      -    b_and_h = original_image[:,:,2]
      -    color = original_image[:,:,2] - original_image[:,:,0]
      -    alpha = original_image[:,:,3]
      -    nx = original_image.shape[1]
      -
      -    def __init__(self, color):
      -        rgb = matplotlib.colors.colorConverter.to_rgb(color)
      -
      -        im = np.empty(self.original_image.shape,
      -                      self.original_image.dtype)
      -
      -
      -        im[:,:,:3] = self.b_and_h[:,:,np.newaxis]
      -        im[:,:,:3] -= self.color[:,:,np.newaxis]*(1.-np.array(rgb))
      -        im[:,:,3] = self.alpha
      -
      -        self.im = im
      -
      -
      -    def get_stretched_image(self, stretch_factor):
      -        stretch_factor = max(stretch_factor, 1)
      -        ny, nx, nch = self.im.shape
      -        ny2 = int(ny*stretch_factor)
      -
      -        stretched_image = np.empty((ny2, nx, nch),
      -                                   self.im.dtype)
      -        cut = self.im[self.cut_location,:,:]
      -        stretched_image[:,:,:] = cut
      -        stretched_image[:self.cut_location,:,:] = \
      -                self.im[:self.cut_location,:,:]
      -        stretched_image[-(ny-self.cut_location):,:,:] = \
      -                self.im[-(ny-self.cut_location):,:,:]
      -
      -        self._cached_im = stretched_image
      -        return stretched_image
      -
      -
      -
      -class RibbonBoxImage(BboxImage):
      -    zorder = 1
      -
      -    def __init__(self, bbox, color,
      -                 cmap = None,
      -                 norm = None,
      -                 interpolation=None,
      -                 origin=None,
      -                 filternorm=1,
      -                 filterrad=4.0,
      -                 resample = False,
      -                 **kwargs
      -                 ):
      -
      -        BboxImage.__init__(self, bbox,
      -                           cmap = cmap,
      -                           norm = norm,
      -                           interpolation=interpolation,
      -                           origin=origin,
      -                           filternorm=filternorm,
      -                           filterrad=filterrad,
      -                           resample = resample,
      -                           **kwargs
      -                           )
      -
      -        self._ribbonbox = RibbonBox(color)
      -        self._cached_ny = None
      -
      -
      -    def draw(self, renderer, *args, **kwargs):
      -
      -        bbox = self.get_window_extent(renderer)
      -        stretch_factor = bbox.height / bbox.width
      -
      -        ny = int(stretch_factor*self._ribbonbox.nx)
      -        if self._cached_ny != ny:
      -            arr = self._ribbonbox.get_stretched_image(stretch_factor)
      -            self.set_array(arr)
      -            self._cached_ny = ny
      -
      -        BboxImage.draw(self, renderer, *args, **kwargs)
      -
      -
      -if 1:
      -    from matplotlib.transforms import Bbox, TransformedBbox
      -    from matplotlib.ticker import ScalarFormatter
      -
      -    fig = plt.gcf()
      -    fig.clf()
      -    ax = plt.subplot(111)
      -
      -    years = np.arange(2004, 2009)
      -    box_colors = [(0.8, 0.2, 0.2),
      -                  (0.2, 0.8, 0.2),
      -                  (0.2, 0.2, 0.8),
      -                  (0.7, 0.5, 0.8),
      -                  (0.3, 0.8, 0.7),
      -                  ]
      -    heights = np.random.random(years.shape) * 7000 + 3000
      -
      -    fmt = ScalarFormatter(useOffset=False)
      -    ax.xaxis.set_major_formatter(fmt)
      -
      -    for year, h, bc in zip(years, heights, box_colors):
      -        bbox0 = Bbox.from_extents(year-0.4, 0., year+0.4, h)
      -        bbox = TransformedBbox(bbox0, ax.transData)
      -        rb_patch = RibbonBoxImage(bbox, bc, interpolation="bicubic")
      -
      -        ax.add_artist(rb_patch)
      -
      -        ax.annotate(r"%d" % (int(h/100.)*100),
      -                    (year, h), va="bottom", ha="center")
      -
      -    patch_gradient = BboxImage(ax.bbox,
      -                               interpolation="bicubic",
      -                               zorder=0.1,
      -                               )
      -    gradient = np.zeros((2, 2, 4), dtype=np.float)
      -    gradient[:,:,:3] = [1, 1, 0.]
      -    gradient[:,:,3] = [[0.1, 0.3],[0.3, 0.5]] # alpha channel
      -    patch_gradient.set_array(gradient)
      -    ax.add_artist(patch_gradient)
      -
      -
      -    ax.set_xlim(years[0]-0.5, years[-1]+0.5)
      -    ax.set_ylim(0, 10000)
      -
      -    fig.savefig('ribbon_box.png')
      -    plt.show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/pylab_examples/demo_text_path.html b/dev/examples/pylab_examples/demo_text_path.html deleted file mode 100644 index 264dd0590c0..00000000000 --- a/dev/examples/pylab_examples/demo_text_path.html +++ /dev/null @@ -1,304 +0,0 @@ - - - - - - - - pylab_examples example code: demo_text_path.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      pylab_examples example code: demo_text_path.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/demo_text_path.png -
      -
      # -*- coding: utf-8 -*-
      -
      -import matplotlib.pyplot as plt
      -from matplotlib.image import BboxImage
      -import numpy as np
      -from matplotlib.transforms import IdentityTransform
      -
      -import matplotlib.patches as mpatches
      -
      -from matplotlib.offsetbox import AnnotationBbox,\
      -     AnchoredOffsetbox, AuxTransformBox
      -
      -from matplotlib.cbook import get_sample_data
      -
      -from matplotlib.text import TextPath
      -
      -
      -class PathClippedImagePatch(mpatches.PathPatch):
      -    """
      -    The given image is used to draw the face of the patch. Internally,
      -    it uses BboxImage whose clippath set to the path of the patch.
      -
      -    FIXME : The result is currently dpi dependent.
      -    """
      -    def __init__(self, path, bbox_image, **kwargs):
      -        mpatches.PathPatch.__init__(self, path, **kwargs)
      -        self._init_bbox_image(bbox_image)
      -
      -    def set_facecolor(self, color):
      -        """simply ignore facecolor"""
      -        mpatches.PathPatch.set_facecolor(self, "none")
      -
      -    def _init_bbox_image(self, im):
      -
      -        bbox_image = BboxImage(self.get_window_extent,
      -                               norm = None,
      -                               origin=None,
      -                               )
      -        bbox_image.set_transform(IdentityTransform())
      -
      -        bbox_image.set_data(im)
      -        self.bbox_image = bbox_image
      -
      -    def draw(self, renderer=None):
      -
      -
      -        # the clip path must be updated every draw. any solution? -JJ
      -        self.bbox_image.set_clip_path(self._path, self.get_transform())
      -        self.bbox_image.draw(renderer)
      -
      -        mpatches.PathPatch.draw(self, renderer)
      -
      -
      -if 1:
      -
      -    usetex = plt.rcParams["text.usetex"]
      -
      -    fig = plt.figure(1)
      -
      -    # EXAMPLE 1
      -
      -    ax = plt.subplot(211)
      -
      -    from matplotlib._png import read_png
      -    fn = get_sample_data("grace_hopper.png", asfileobj=False)
      -    arr = read_png(fn)
      -
      -    text_path = TextPath((0, 0), "!?", size=150)
      -    p = PathClippedImagePatch(text_path, arr, ec="k",
      -                              transform=IdentityTransform())
      -
      -    #p.set_clip_on(False)
      -
      -    # make offset box
      -    offsetbox = AuxTransformBox(IdentityTransform())
      -    offsetbox.add_artist(p)
      -
      -    # make anchored offset box
      -    ao = AnchoredOffsetbox(loc=2, child=offsetbox, frameon=True, borderpad=0.2)
      -    ax.add_artist(ao)
      -
      -    # another text
      -    from matplotlib.patches import PathPatch
      -    if usetex:
      -        r = r"\mbox{textpath supports mathtext \& \TeX}"
      -    else:
      -        r = r"textpath supports mathtext & TeX"
      -
      -    text_path = TextPath((0, 0), r,
      -                         size=20, usetex=usetex)
      -
      -    p1 = PathPatch(text_path, ec="w", lw=3, fc="w", alpha=0.9,
      -                   transform=IdentityTransform())
      -    p2 = PathPatch(text_path, ec="none", fc="k",
      -                   transform=IdentityTransform())
      -
      -    offsetbox2 = AuxTransformBox(IdentityTransform())
      -    offsetbox2.add_artist(p1)
      -    offsetbox2.add_artist(p2)
      -
      -    ab = AnnotationBbox(offsetbox2, (0.95, 0.05),
      -                        xycoords='axes fraction',
      -                        boxcoords="offset points",
      -                        box_alignment=(1.,0.),
      -                        frameon=False
      -                        )
      -    ax.add_artist(ab)
      -
      -    ax.imshow([[0,1,2],[1,2,3]], cmap=plt.cm.gist_gray_r,
      -              interpolation="bilinear",
      -              aspect="auto")
      -
      -
      -
      -    # EXAMPLE 2
      -
      -    ax = plt.subplot(212)
      -
      -    arr = np.arange(256).reshape(1,256)/256.
      -
      -    if usetex:
      -        s = r"$\displaystyle\left[\sum_{n=1}^\infty\frac{-e^{i\pi}}{2^n}\right]$!"
      -    else:
      -        s = r"$\left[\sum_{n=1}^\infty\frac{-e^{i\pi}}{2^n}\right]$!"
      -    text_path = TextPath((0, 0), s, size=40, usetex=usetex)
      -    text_patch = PathClippedImagePatch(text_path, arr, ec="none",
      -                                       transform=IdentityTransform())
      -
      -    shadow1 = mpatches.Shadow(text_patch, 1, -1, props=dict(fc="none", ec="0.6", lw=3))
      -    shadow2 = mpatches.Shadow(text_patch, 1, -1, props=dict(fc="0.3", ec="none"))
      -
      -
      -    # make offset box
      -    offsetbox = AuxTransformBox(IdentityTransform())
      -    offsetbox.add_artist(shadow1)
      -    offsetbox.add_artist(shadow2)
      -    offsetbox.add_artist(text_patch)
      -
      -    # place the anchored offset box using AnnotationBbox
      -    ab = AnnotationBbox(offsetbox, (0.5, 0.5),
      -                        xycoords='data',
      -                        boxcoords="offset points",
      -                        box_alignment=(0.5,0.5),
      -                        )
      -    #text_path.set_size(10)
      -
      -    ax.add_artist(ab)
      -
      -    ax.set_xlim(0, 1)
      -    ax.set_ylim(0, 1)
      -
      -
      -    plt.draw()
      -    plt.show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/pylab_examples/demo_text_rotation_mode.html b/dev/examples/pylab_examples/demo_text_rotation_mode.html deleted file mode 100644 index 7f46203c3ea..00000000000 --- a/dev/examples/pylab_examples/demo_text_rotation_mode.html +++ /dev/null @@ -1,194 +0,0 @@ - - - - - - - - pylab_examples example code: demo_text_rotation_mode.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      pylab_examples example code: demo_text_rotation_mode.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/demo_text_rotation_mode.png -
      -
      #clf()
      -from mpl_toolkits.axes_grid1.axes_grid import ImageGrid
      -
      -def test_rotation_mode(fig, mode, subplot_location):
      -    ha_list = "left center right".split()
      -    va_list = "top center baseline bottom".split()
      -    grid = ImageGrid(fig, subplot_location,
      -                    nrows_ncols=(len(va_list), len(ha_list)),
      -                    share_all=True, aspect=True, #label_mode='1',
      -                    cbar_mode=None)
      -
      -    for ha, ax in zip(ha_list, grid.axes_row[-1]):
      -        ax.axis["bottom"].label.set_text(ha)
      -
      -    grid.axes_row[0][1].set_title(mode, size="large")
      -
      -    for va, ax in zip(va_list, grid.axes_column[0]):
      -        ax.axis["left"].label.set_text(va)
      -
      -    i = 0
      -    for va in va_list:
      -        for ha in ha_list:
      -            ax = grid[i]
      -            for axis in ax.axis.values():
      -                axis.toggle(ticks=False, ticklabels=False)
      -
      -            ax.text(0.5, 0.5, "Tpg",
      -                    size="large", rotation=40,
      -                    bbox=dict(boxstyle="square,pad=0.",
      -                              ec="none", fc="0.5", alpha=0.5),
      -                    ha=ha, va=va,
      -                    rotation_mode=mode)
      -            ax.axvline(0.5)
      -            ax.axhline(0.5)
      -            i += 1
      -
      -if 1:
      -    import matplotlib.pyplot as plt
      -    fig = plt.figure(1, figsize=(5.5,4 ))
      -    fig.clf()
      -
      -    test_rotation_mode(fig, "default", 121)
      -    test_rotation_mode(fig, "anchor", 122)
      -    plt.show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/pylab_examples/demo_tight_layout.html b/dev/examples/pylab_examples/demo_tight_layout.html deleted file mode 100644 index c156b810ed8..00000000000 --- a/dev/examples/pylab_examples/demo_tight_layout.html +++ /dev/null @@ -1,280 +0,0 @@ - - - - - - - - pylab_examples example code: demo_tight_layout.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      pylab_examples example code: demo_tight_layout.py

      -

      (Source code)

      -
      -../../_images/demo_tight_layout_00_00.png -

      (png, hires.png, pdf)

      -
      -
      -../../_images/demo_tight_layout_00_01.png -

      (png, hires.png, pdf)

      -
      -
      -../../_images/demo_tight_layout_00_02.png -

      (png, hires.png, pdf)

      -
      -
      -../../_images/demo_tight_layout_00_03.png -

      (png, hires.png, pdf)

      -
      -
      -../../_images/demo_tight_layout_00_04.png -

      (png, hires.png, pdf)

      -
      -
      -../../_images/demo_tight_layout_00_05.png -

      (png, hires.png, pdf)

      -
      -
      -../../_images/demo_tight_layout_00_06.png -

      (png, hires.png, pdf)

      -
      -

      (png, hires.png, pdf)

      -
      -../../_images/demo_tight_layout_01_00.png -
      -
      import matplotlib.pyplot as plt
      -
      -
      -import random
      -fontsizes = [8, 16, 24, 32]
      -def example_plot(ax):
      -    ax.plot([1, 2])
      -    ax.set_xlabel('x-label', fontsize=random.choice(fontsizes))
      -    ax.set_ylabel('y-label', fontsize=random.choice(fontsizes))
      -    ax.set_title('Title', fontsize=random.choice(fontsizes))
      -
      -fig, ax = plt.subplots()
      -example_plot(ax)
      -plt.tight_layout()
      -
      -fig, ((ax1, ax2), (ax3, ax4)) = plt.subplots(nrows=2, ncols=2)
      -example_plot(ax1)
      -example_plot(ax2)
      -example_plot(ax3)
      -example_plot(ax4)
      -plt.tight_layout()
      -
      -fig, (ax1, ax2) = plt.subplots(nrows=2, ncols=1)
      -example_plot(ax1)
      -example_plot(ax2)
      -plt.tight_layout()
      -
      -fig, (ax1, ax2) = plt.subplots(nrows=1, ncols=2)
      -example_plot(ax1)
      -example_plot(ax2)
      -plt.tight_layout()
      -
      -fig, axes = plt.subplots(nrows=3, ncols=3)
      -for row in axes:
      -    for ax in row:
      -        example_plot(ax)
      -plt.tight_layout()
      -
      -
      -fig = plt.figure()
      -
      -ax1 = plt.subplot(221)
      -ax2 = plt.subplot(223)
      -ax3 = plt.subplot(122)
      -
      -example_plot(ax1)
      -example_plot(ax2)
      -example_plot(ax3)
      -
      -plt.tight_layout()
      -
      -
      -fig = plt.figure()
      -
      -ax1 = plt.subplot2grid((3, 3), (0, 0))
      -ax2 = plt.subplot2grid((3, 3), (0, 1), colspan=2)
      -ax3 = plt.subplot2grid((3, 3), (1, 0), colspan=2, rowspan=2)
      -ax4 = plt.subplot2grid((3, 3), (1, 2), rowspan=2)
      -
      -example_plot(ax1)
      -example_plot(ax2)
      -example_plot(ax3)
      -example_plot(ax4)
      -
      -plt.tight_layout()
      -
      -plt.show()
      -
      -
      -fig = plt.figure()
      -
      -import matplotlib.gridspec as gridspec
      -
      -gs1 = gridspec.GridSpec(3, 1)
      -ax1 = fig.add_subplot(gs1[0])
      -ax2 = fig.add_subplot(gs1[1])
      -ax3 = fig.add_subplot(gs1[2])
      -
      -example_plot(ax1)
      -example_plot(ax2)
      -example_plot(ax3)
      -
      -gs1.tight_layout(fig, rect=[None, None, 0.45, None])
      -
      -gs2 = gridspec.GridSpec(2, 1)
      -ax4 = fig.add_subplot(gs2[0])
      -ax5 = fig.add_subplot(gs2[1])
      -
      -#example_plot(ax4)
      -#example_plot(ax5)
      -
      -gs2.tight_layout(fig, rect=[0.45, None, None, None])
      -
      -# now match the top and bottom of two gridspecs.
      -top = min(gs1.top, gs2.top)
      -bottom = max(gs1.bottom, gs2.bottom)
      -
      -gs1.update(top=top, bottom=bottom)
      -gs2.update(top=top, bottom=bottom)
      -
      -plt.show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/pylab_examples/dolphin.html b/dev/examples/pylab_examples/dolphin.html deleted file mode 100644 index 81bb0e6d882..00000000000 --- a/dev/examples/pylab_examples/dolphin.html +++ /dev/null @@ -1,241 +0,0 @@ - - - - - - - - pylab_examples example code: dolphin.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      pylab_examples example code: dolphin.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/dolphin.png -
      -
      import matplotlib.cm as cm
      -import matplotlib.pyplot as plt
      -from matplotlib.patches import Circle, PathPatch
      -from matplotlib.path import Path
      -from matplotlib.transforms import Affine2D
      -import numpy as np
      -
      -
      -r = np.random.rand(50)
      -t = np.random.rand(50) * np.pi * 2.0
      -x = r * np.cos(t)
      -y = r * np.sin(t)
      -
      -fig = plt.figure(figsize=(6,6))
      -ax = plt.subplot(111)
      -circle = Circle((0, 0), 1, facecolor='none',
      -                edgecolor=(0,0.8,0.8), linewidth=3, alpha=0.5)
      -ax.add_patch(circle)
      -
      -im = plt.imshow(np.random.random((100, 100)),
      -                origin='lower', cmap=cm.winter,
      -                interpolation='spline36',
      -                extent=([-1, 1, -1, 1]))
      -im.set_clip_path(circle)
      -
      -plt.plot(x, y, 'o', color=(0.9, 0.9, 1.0), alpha=0.8)
      -
      -# Dolphin from OpenClipart library by Andy Fitzsimon
      -#       <cc:License rdf:about="http://web.resource.org/cc/PublicDomain">
      -#         <cc:permits rdf:resource="http://web.resource.org/cc/Reproduction"/>
      -#         <cc:permits rdf:resource="http://web.resource.org/cc/Distribution"/>
      -#         <cc:permits rdf:resource="http://web.resource.org/cc/DerivativeWorks"/>
      -#       </cc:License>
      -
      -dolphin = """
      -M -0.59739425,160.18173 C -0.62740401,160.18885 -0.57867129,160.11183
      --0.57867129,160.11183 C -0.57867129,160.11183 -0.5438361,159.89315
      --0.39514638,159.81496 C -0.24645668,159.73678 -0.18316813,159.71981
      --0.18316813,159.71981 C -0.18316813,159.71981 -0.10322971,159.58124
      --0.057804323,159.58725 C -0.029723983,159.58913 -0.061841603,159.60356
      --0.071265813,159.62815 C -0.080250183,159.65325 -0.082918513,159.70554
      --0.061841203,159.71248 C -0.040763903,159.7194 -0.0066711426,159.71091
      -0.077336307,159.73612 C 0.16879567,159.76377 0.28380306,159.86448
      -0.31516668,159.91533 C 0.3465303,159.96618 0.5011127,160.1771
      -0.5011127,160.1771 C 0.63668998,160.19238 0.67763022,160.31259
      -0.66556395,160.32668 C 0.65339985,160.34212 0.66350443,160.33642
      -0.64907098,160.33088 C 0.63463742,160.32533 0.61309688,160.297
      -0.5789627,160.29339 C 0.54348657,160.28968 0.52329693,160.27674
      -0.50728856,160.27737 C 0.49060916,160.27795 0.48965803,160.31565
      -0.46114204,160.33673 C 0.43329696,160.35786 0.4570711,160.39871
      -0.43309565,160.40685 C 0.4105108,160.41442 0.39416631,160.33027
      -0.3954995,160.2935 C 0.39683269,160.25672 0.43807996,160.21522
      -0.44567915,160.19734 C 0.45327833,160.17946 0.27946869,159.9424
      --0.061852613,159.99845 C -0.083965233,160.0427 -0.26176109,160.06683
      --0.26176109,160.06683 C -0.30127962,160.07028 -0.21167141,160.09731
      --0.24649368,160.1011 C -0.32642366,160.11569 -0.34521187,160.06895
      --0.40622293,160.0819 C -0.467234,160.09485 -0.56738444,160.17461
      --0.59739425,160.18173
      -"""
      -
      -vertices = []
      -codes = []
      -parts = dolphin.split()
      -i = 0
      -code_map = {
      -    'M': (Path.MOVETO, 1),
      -    'C': (Path.CURVE4, 3),
      -    'L': (Path.LINETO, 1)
      -    }
      -
      -while i < len(parts):
      -    code = parts[i]
      -    path_code, npoints = code_map[code]
      -    codes.extend([path_code] * npoints)
      -    vertices.extend([[float(x) for x in y.split(',')] for y in parts[i+1:i+npoints+1]])
      -    i += npoints + 1
      -vertices = np.array(vertices, np.float)
      -vertices[:,1] -= 160
      -
      -dolphin_path = Path(vertices, codes)
      -dolphin_patch = PathPatch(dolphin_path, facecolor=(0.6, 0.6, 0.6),
      -                          edgecolor=(0.0, 0.0, 0.0))
      -ax.add_patch(dolphin_patch)
      -
      -vertices = Affine2D().rotate_deg(60).transform(vertices)
      -dolphin_path2 = Path(vertices, codes)
      -dolphin_patch2 = PathPatch(dolphin_path2, facecolor=(0.5, 0.5, 0.5),
      -                           edgecolor=(0.0, 0.0, 0.0))
      -ax.add_patch(dolphin_patch2)
      -
      -plt.show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/pylab_examples/ellipse_collection.html b/dev/examples/pylab_examples/ellipse_collection.html deleted file mode 100644 index 02114244d98..00000000000 --- a/dev/examples/pylab_examples/ellipse_collection.html +++ /dev/null @@ -1,182 +0,0 @@ - - - - - - - - pylab_examples example code: ellipse_collection.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      pylab_examples example code: ellipse_collection.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/ellipse_collection.png -
      -
      import matplotlib.pyplot as plt
      -import numpy as np
      -from matplotlib.collections import EllipseCollection
      -
      -x = np.arange(10)
      -y = np.arange(15)
      -X, Y = np.meshgrid(x, y)
      -
      -XY = np.hstack((X.ravel()[:,np.newaxis], Y.ravel()[:,np.newaxis]))
      -
      -ww = X/10.0
      -hh = Y/15.0
      -aa = X*9
      -
      -
      -ax = plt.subplot(1,1,1)
      -
      -ec = EllipseCollection(
      -                        ww,
      -                        hh,
      -                        aa,
      -                        units='x',
      -                        offsets=XY,
      -                        transOffset=ax.transData)
      -ec.set_array((X+Y).ravel())
      -ax.add_collection(ec)
      -ax.autoscale_view()
      -ax.set_xlabel('X')
      -ax.set_ylabel('y')
      -cbar = plt.colorbar(ec)
      -cbar.set_label('X+Y')
      -plt.show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/pylab_examples/ellipse_demo.html b/dev/examples/pylab_examples/ellipse_demo.html deleted file mode 100644 index d7def27ed5d..00000000000 --- a/dev/examples/pylab_examples/ellipse_demo.html +++ /dev/null @@ -1,170 +0,0 @@ - - - - - - - - pylab_examples example code: ellipse_demo.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      pylab_examples example code: ellipse_demo.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/ellipse_demo.png -
      -
      from pylab import figure, show, rand
      -from matplotlib.patches import Ellipse
      -
      -NUM = 250
      -
      -ells = [Ellipse(xy=rand(2)*10, width=rand(), height=rand(), angle=rand()*360)
      -        for i in range(NUM)]
      -
      -fig = figure()
      -ax = fig.add_subplot(111, aspect='equal')
      -for e in ells:
      -    ax.add_artist(e)
      -    e.set_clip_box(ax.bbox)
      -    e.set_alpha(rand())
      -    e.set_facecolor(rand(3))
      -
      -ax.set_xlim(0, 10)
      -ax.set_ylim(0, 10)
      -
      -show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/pylab_examples/ellipse_rotated.html b/dev/examples/pylab_examples/ellipse_rotated.html deleted file mode 100644 index e706f3a6d00..00000000000 --- a/dev/examples/pylab_examples/ellipse_rotated.html +++ /dev/null @@ -1,169 +0,0 @@ - - - - - - - - pylab_examples example code: ellipse_rotated.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      pylab_examples example code: ellipse_rotated.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/ellipse_rotated.png -
      -
      from pylab import *
      -from matplotlib.patches import Ellipse
      -
      -delta = 45.0 # degrees
      -
      -angles = arange(0, 360+delta, delta)
      -ells = [Ellipse((1, 1), 4, 2, a) for a in angles]
      -
      -a = subplot(111, aspect='equal')
      -
      -for e in ells:
      -    e.set_clip_box(a.bbox)
      -    e.set_alpha(0.1)
      -    a.add_artist(e)
      -
      -xlim(-2, 4)
      -ylim(-1, 3)
      -
      -show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/pylab_examples/equal_aspect_ratio.html b/dev/examples/pylab_examples/equal_aspect_ratio.html deleted file mode 100644 index 5441da28633..00000000000 --- a/dev/examples/pylab_examples/equal_aspect_ratio.html +++ /dev/null @@ -1,170 +0,0 @@ - - - - - - - - pylab_examples example code: equal_aspect_ratio.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      pylab_examples example code: equal_aspect_ratio.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/equal_aspect_ratio.png -
      -
      #!/usr/bin/env python
      -"""
      -Example: simple line plot.
      -Show how to make a plot that has equal aspect ratio
      -"""
      -from pylab import *
      -
      -t = arange(0.0, 1.0+0.01, 0.01)
      -s = cos(2*2*pi*t)
      -plot(t, s, '-', lw=2)
      -
      -xlabel('time (s)')
      -ylabel('voltage (mV)')
      -title('About as simple as it gets, folks')
      -grid(True)
      -
      -axes().set_aspect('equal', 'datalim')
      -
      -
      -show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/pylab_examples/errorbar_demo.html b/dev/examples/pylab_examples/errorbar_demo.html deleted file mode 100644 index adaa75ad49b..00000000000 --- a/dev/examples/pylab_examples/errorbar_demo.html +++ /dev/null @@ -1,208 +0,0 @@ - - - - - - - - - - pylab_examples example code: errorbar_demo.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      pylab_examples example code: errorbar_demo.py

      -

      (Source code)

      -
      -../../_images/errorbar_demo_001.png -

      (png, hires.png, pdf)

      -
      -
      -../../_images/errorbar_demo_011.png -

      (png, hires.png, pdf)

      -
      -
      #!/usr/bin/env python
      -import numpy as np
      -import matplotlib.pyplot as plt
      -
      -# example data
      -x = np.arange(0.1, 4, 0.5)
      -y = np.exp(-x)
      -
      -# example variable error bar values
      -yerr = 0.1 + 0.2*np.sqrt(x)
      -xerr = 0.1 + yerr
      -
      -# First illustrate basic pyplot interface, using defaults where possible.
      -plt.figure()
      -plt.errorbar(x, y, xerr=0.2, yerr=0.4)
      -plt.title("Simplest errorbars, 0.2 in x, 0.4 in y")
      -
      -# Now switch to a more OO interface to exercise more features.
      -fig, axs = plt.subplots(nrows=2, ncols=2, sharex=True)
      -ax = axs[0,0]
      -ax.errorbar(x, y, yerr=yerr, fmt='o')
      -ax.set_title('Vert. symmetric')
      -
      -# With 4 subplots, reduce the number of axis ticks to avoid crowding.
      -ax.locator_params(nbins=4)
      -
      -ax = axs[0,1]
      -ax.errorbar(x, y, xerr=xerr, fmt='o')
      -ax.set_title('Hor. symmetric')
      -
      -ax = axs[1,0]
      -ax.errorbar(x, y, yerr=[yerr, 2*yerr], xerr=[xerr, 2*xerr], fmt='--o')
      -ax.set_title('H, V asymmetric')
      -
      -ax = axs[1,1]
      -ax.set_yscale('log')
      -# Here we have to be careful to keep all y values positive:
      -ylower = np.maximum(1e-2, y - yerr)
      -yerr_lower = y - ylower
      -
      -ax.errorbar(x, y, yerr=[yerr_lower, 2*yerr], xerr=xerr,
      -            fmt='o', ecolor='g', capthick=2)
      -ax.set_title('Mixed sym., log y')
      -
      -fig.suptitle('Variable errorbars')
      -
      -plt.show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/pylab_examples/errorbar_limits.html b/dev/examples/pylab_examples/errorbar_limits.html deleted file mode 100644 index e7c5f866895..00000000000 --- a/dev/examples/pylab_examples/errorbar_limits.html +++ /dev/null @@ -1,195 +0,0 @@ - - - - - - - - pylab_examples example code: errorbar_limits.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      pylab_examples example code: errorbar_limits.py

      -

      (Source code)

      -
      -../../_images/errorbar_limits_00.png -

      (png, hires.png, pdf)

      -
      -
      -../../_images/errorbar_limits_01.png -

      (png, hires.png, pdf)

      -
      -
      '''
      -Illustration of upper and lower limit symbols on errorbars
      -'''
      -
      -from math import pi
      -from numpy import array, arange, sin
      -import pylab as P
      -
      -fig = P.figure()
      -x = arange(10.0)
      -y = sin(arange(10.0)/20.0*pi)
      -
      -P.errorbar(x,y,yerr=0.1,capsize=3)
      -
      -y = sin(arange(10.0)/20.0*pi) + 1
      -P.errorbar(x,y,yerr=0.1, uplims=True)
      -
      -y = sin(arange(10.0)/20.0*pi) + 2
      -upperlimits = array([1,0]*5)
      -lowerlimits = array([0,1]*5)
      -P.errorbar(x, y, yerr=0.1, uplims=upperlimits, lolims=lowerlimits)
      -
      -P.xlim(-1,10)
      -
      -fig = P.figure()
      -x = arange(10.0)/10.0
      -y = (x+0.1)**2
      -
      -P.errorbar(x, y, xerr=0.1, xlolims=True)
      -y = (x+0.1)**3
      -
      -P.errorbar(x+0.6, y, xerr=0.1, xuplims=upperlimits, xlolims=lowerlimits)
      -
      -y = (x+0.1)**4
      -P.errorbar(x+1.2, y, xerr=0.1, xuplims=True)
      -
      -P.xlim(-0.2,2.4)
      -P.ylim(-0.1,1.3)
      -
      -P.show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/pylab_examples/errorbar_subsample.html b/dev/examples/pylab_examples/errorbar_subsample.html deleted file mode 100644 index f2fda47d9e3..00000000000 --- a/dev/examples/pylab_examples/errorbar_subsample.html +++ /dev/null @@ -1,180 +0,0 @@ - - - - - - - - pylab_examples example code: errorbar_subsample.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      pylab_examples example code: errorbar_subsample.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/errorbar_subsample.png -
      -
      '''
      -Demo for the errorevery keyword to show data full accuracy data plots with
      -few errorbars.
      -'''
      -
      -import numpy as np
      -import matplotlib.pyplot as plt
      -
      -# example data
      -x = np.arange(0.1, 4, 0.1)
      -y = np.exp(-x)
      -
      -# example variable error bar values
      -yerr = 0.1 + 0.1*np.sqrt(x)
      -
      -
      -# Now switch to a more OO interface to exercise more features.
      -fig, axs = plt.subplots(nrows=1, ncols=2, sharex=True)
      -ax = axs[0]
      -ax.errorbar(x, y, yerr=yerr)
      -ax.set_title('all errorbars')
      -
      -ax = axs[1]
      -ax.errorbar(x, y, yerr=yerr, errorevery=5)
      -ax.set_title('only every 5th errorbar')
      -
      -
      -fig.suptitle('Errorbar subsampling for better visualibility')
      -
      -plt.show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/pylab_examples/eventcollection_demo.html b/dev/examples/pylab_examples/eventcollection_demo.html deleted file mode 100644 index 7b25369e67c..00000000000 --- a/dev/examples/pylab_examples/eventcollection_demo.html +++ /dev/null @@ -1,204 +0,0 @@ - - - - - - - - pylab_examples example code: eventcollection_demo.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      pylab_examples example code: eventcollection_demo.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/eventcollection_demo1.png -
      -
      #!/usr/bin/env python
      -# -*- Coding:utf-8 -*-
      -'''Plot two curves, then use EventCollections to mark the locations of the x
      -and y data points on the respective axes for each curve'''
      -
      -import matplotlib.pyplot as plt
      -from matplotlib.collections import EventCollection
      -import numpy as np
      -
      -# create random data
      -np.random.seed(50)
      -xdata = np.random.random([2, 10])
      -
      -# split the data into two parts
      -xdata1 = xdata[0, :]
      -xdata2 = xdata[1, :]
      -
      -# sort the data so it makes clean curves
      -xdata1.sort()
      -xdata2.sort()
      -
      -# create some y data points
      -ydata1 = xdata1 ** 2
      -ydata2 = 1 - xdata2 ** 3
      -
      -# plot the data
      -fig = plt.figure()
      -ax = fig.add_subplot(1, 1, 1)
      -ax.plot(xdata1, ydata1, 'r', xdata2, ydata2, 'b')
      -
      -# create the events marking the x data points
      -xevents1 = EventCollection(xdata1, color=[1, 0, 0], linelength=0.05)
      -xevents2 = EventCollection(xdata2, color=[0, 0, 1], linelength=0.05)
      -
      -# create the events marking the y data points
      -yevents1 = EventCollection(ydata1, color=[1, 0, 0], linelength=0.05,
      -                           orientation='vertical')
      -yevents2 = EventCollection(ydata2, color=[0, 0, 1], linelength=0.05,
      -                           orientation='vertical')
      -
      -# add the events to the axis
      -ax.add_collection(xevents1)
      -ax.add_collection(xevents2)
      -ax.add_collection(yevents1)
      -ax.add_collection(yevents2)
      -
      -# set the limits
      -ax.set_xlim([0, 1])
      -ax.set_ylim([0, 1])
      -
      -ax.set_title('line plot with data points')
      -
      -# display the plot
      -plt.show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/pylab_examples/eventplot_demo.html b/dev/examples/pylab_examples/eventplot_demo.html deleted file mode 100644 index 49ce586b39a..00000000000 --- a/dev/examples/pylab_examples/eventplot_demo.html +++ /dev/null @@ -1,217 +0,0 @@ - - - - - - - - pylab_examples example code: eventplot_demo.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      pylab_examples example code: eventplot_demo.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/eventplot_demo1.png -
      -
      #!/usr/bin/env python
      -# -*- Coding:utf-8 -*-
      -'''an eventplot showing sequences of events with various line properties
      -the plot is shown in both horizontal and vertical orientations'''
      -
      -import matplotlib.pyplot as plt
      -import numpy as np
      -
      -# set the random seed
      -np.random.seed(0)
      -
      -# create random data
      -data1 = np.random.random([6, 50])
      -
      -# set different colors for each set of positions
      -colors1 = np.array([[1, 0, 0],
      -                    [0, 1, 0],
      -                    [0, 0, 1],
      -                    [1, 1, 0],
      -                    [1, 0, 1],
      -                    [0, 1, 1]])
      -
      -# set different line properties for each set of positions
      -# note that some overlap
      -lineoffsets1 = np.array([-15, -3, 1, 1.5, 6, 10])
      -linelengths1 = [5, 2, 1, 1, 3, 1.5]
      -
      -fig = plt.figure()
      -
      -# create a horizontal plot
      -ax1 = fig.add_subplot(221)
      -ax1.eventplot(data1, colors=colors1, lineoffsets=lineoffsets1,
      -              linelengths=linelengths1)
      -ax1.set_title('horizontal eventplot 1')
      -
      -
      -# create a vertical plot
      -ax2 = fig.add_subplot(223)
      -ax2.eventplot(data1, colors=colors1, lineoffsets=lineoffsets1,
      -              linelengths=linelengths1, orientation='vertical')
      -ax2.set_title('vertical eventplot 1')
      -
      -# create another set of random data.
      -# the gamma distribution is only used fo aesthetic purposes
      -data2 = np.random.gamma(4, size=[60, 50])
      -
      -# use individual values for the parameters this time
      -# these values will be used for all data sets (except lineoffsets2, which
      -# sets the increment between each data set in this usage)
      -colors2 = [[0, 0, 0]]
      -lineoffsets2 = 1
      -linelengths2 = 1
      -
      -# create a horizontal plot
      -ax1 = fig.add_subplot(222)
      -ax1.eventplot(data2, colors=colors2, lineoffsets=lineoffsets2,
      -              linelengths=linelengths2)
      -ax1.set_title('horizontal eventplot 2')
      -
      -
      -# create a vertical plot
      -ax2 = fig.add_subplot(224)
      -ax2.eventplot(data2, colors=colors2, lineoffsets=lineoffsets2,
      -              linelengths=linelengths2, orientation='vertical')
      -ax2.set_title('vertical eventplot 2')
      -
      -plt.show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/pylab_examples/fancyarrow_demo.html b/dev/examples/pylab_examples/fancyarrow_demo.html deleted file mode 100644 index fc89fe67cfc..00000000000 --- a/dev/examples/pylab_examples/fancyarrow_demo.html +++ /dev/null @@ -1,200 +0,0 @@ - - - - - - - - pylab_examples example code: fancyarrow_demo.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      pylab_examples example code: fancyarrow_demo.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/fancyarrow_demo1.png -
      -
      import matplotlib.patches as mpatches
      -import matplotlib.pyplot as plt
      -
      -styles = mpatches.ArrowStyle.get_styles()
      -
      -ncol=2
      -nrow = (len(styles)+1) // ncol
      -figheight = (nrow+0.5)
      -fig1 = plt.figure(1, (4.*ncol/1.5, figheight/1.5))
      -fontsize = 0.2 * 70
      -
      -
      -ax = fig1.add_axes([0, 0, 1, 1], frameon=False, aspect=1.)
      -
      -ax.set_xlim(0, 4*ncol)
      -ax.set_ylim(0, figheight)
      -
      -def to_texstring(s):
      -    s = s.replace("<", r"$<$")
      -    s = s.replace(">", r"$>$")
      -    s = s.replace("|", r"$|$")
      -    return s
      -
      -for i, (stylename, styleclass) in enumerate(sorted(styles.items())):
      -    x = 3.2 + (i//nrow)*4
      -    y = (figheight - 0.7 - i%nrow) # /figheight
      -    p = mpatches.Circle((x, y), 0.2, fc="w")
      -    ax.add_patch(p)
      -
      -    ax.annotate(to_texstring(stylename), (x, y),
      -                (x-1.2, y),
      -                #xycoords="figure fraction", textcoords="figure fraction",
      -                ha="right", va="center",
      -                size=fontsize,
      -                arrowprops=dict(arrowstyle=stylename,
      -                                patchB=p,
      -                                shrinkA=5,
      -                                shrinkB=5,
      -                                fc="w", ec="k",
      -                                connectionstyle="arc3,rad=-0.05",
      -                                ),
      -                bbox=dict(boxstyle="square", fc="w"))
      -
      -ax.xaxis.set_visible(False)
      -ax.yaxis.set_visible(False)
      -
      -
      -
      -plt.draw()
      -plt.show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/pylab_examples/fancybox_demo.html b/dev/examples/pylab_examples/fancybox_demo.html deleted file mode 100644 index f61f122e917..00000000000 --- a/dev/examples/pylab_examples/fancybox_demo.html +++ /dev/null @@ -1,322 +0,0 @@ - - - - - - - - pylab_examples example code: fancybox_demo.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      pylab_examples example code: fancybox_demo.py

      -

      (Source code)

      -

      (png, hires.png, pdf)

      -
      -../../_images/fancybox_demo_01_00.png -
      -
      import matplotlib.pyplot as plt
      -import matplotlib.transforms as mtransforms
      -from matplotlib.patches import FancyBboxPatch
      -
      -
      -# Bbox object around which the fancy box will be drawn.
      -bb = mtransforms.Bbox([[0.3, 0.4], [0.7, 0.6]])
      -
      -def draw_bbox(ax, bb):
      -    # boxstyle=square with pad=0, i.e. bbox itself.
      -    p_bbox = FancyBboxPatch((bb.xmin, bb.ymin),
      -                            abs(bb.width), abs(bb.height),
      -                            boxstyle="square,pad=0.",
      -                            ec="k", fc="none", zorder=10.,
      -                            )
      -    ax.add_patch(p_bbox)
      -
      -def test1(ax):
      -
      -    # a fancy box with round corners. pad=0.1
      -    p_fancy = FancyBboxPatch((bb.xmin, bb.ymin),
      -                             abs(bb.width), abs(bb.height),
      -                             boxstyle="round,pad=0.1",
      -                             fc=(1., .8, 1.),
      -                             ec=(1., 0.5, 1.))
      -
      -
      -    ax.add_patch(p_fancy)
      -
      -    ax.text(0.1, 0.8,
      -            r' boxstyle="round,pad=0.1"',
      -            size=10, transform=ax.transAxes)
      -
      -    # draws control points for the fancy box.
      -    #l = p_fancy.get_path().vertices
      -    #ax.plot(l[:,0], l[:,1], ".")
      -
      -    # draw the original bbox in black
      -    draw_bbox(ax, bb)
      -
      -
      -def test2(ax):
      -
      -    # bbox=round has two optional argument. pad and rounding_size.
      -    # They can be set during the initialization.
      -    p_fancy = FancyBboxPatch((bb.xmin, bb.ymin),
      -                             abs(bb.width), abs(bb.height),
      -                             boxstyle="round,pad=0.1",
      -                             fc=(1., .8, 1.),
      -                             ec=(1., 0.5, 1.))
      -
      -
      -    ax.add_patch(p_fancy)
      -
      -    # boxstyle and its argument can be later modified with
      -    # set_boxstyle method. Note that the old attributes are simply
      -    # forgotten even if the boxstyle name is same.
      -
      -    p_fancy.set_boxstyle("round,pad=0.1, rounding_size=0.2")
      -    #or
      -    #p_fancy.set_boxstyle("round", pad=0.1, rounding_size=0.2)
      -
      -    ax.text(0.1, 0.8,
      -            ' boxstyle="round,pad=0.1\n rounding\\_size=0.2"',
      -            size=10, transform=ax.transAxes)
      -
      -    # draws control points for the fancy box.
      -    #l = p_fancy.get_path().vertices
      -    #ax.plot(l[:,0], l[:,1], ".")
      -
      -    draw_bbox(ax, bb)
      -
      -
      -
      -def test3(ax):
      -
      -    # mutation_scale determine overall scale of the mutation,
      -    # i.e. both pad and rounding_size is scaled according to this
      -    # value.
      -    p_fancy = FancyBboxPatch((bb.xmin, bb.ymin),
      -                             abs(bb.width), abs(bb.height),
      -                             boxstyle="round,pad=0.1",
      -                             mutation_scale=2.,
      -                             fc=(1., .8, 1.),
      -                             ec=(1., 0.5, 1.))
      -
      -
      -    ax.add_patch(p_fancy)
      -
      -    ax.text(0.1, 0.8,
      -            ' boxstyle="round,pad=0.1"\n mutation\\_scale=2',
      -            size=10, transform=ax.transAxes)
      -
      -    # draws control points for the fancy box.
      -    #l = p_fancy.get_path().vertices
      -    #ax.plot(l[:,0], l[:,1], ".")
      -
      -    draw_bbox(ax, bb)
      -
      -
      -
      -def test4(ax):
      -
      -    # When the aspect ratio of the axes is not 1, the fancy box may
      -    # not be what you expected (green)
      -
      -    p_fancy = FancyBboxPatch((bb.xmin, bb.ymin),
      -                             abs(bb.width), abs(bb.height),
      -                             boxstyle="round,pad=0.2",
      -                             fc="none",
      -                             ec=(0., .5, 0.), zorder=4)
      -
      -
      -    ax.add_patch(p_fancy)
      -
      -
      -    # You can compensate this by setting the mutation_aspect (pink).
      -    p_fancy = FancyBboxPatch((bb.xmin, bb.ymin),
      -                             abs(bb.width), abs(bb.height),
      -                             boxstyle="round,pad=0.3",
      -                             mutation_aspect=.5,
      -                             fc=(1., 0.8, 1.),
      -                             ec=(1., 0.5, 1.))
      -
      -
      -    ax.add_patch(p_fancy)
      -
      -    ax.text(0.1, 0.8,
      -            ' boxstyle="round,pad=0.3"\n mutation\\_aspect=.5',
      -            size=10, transform=ax.transAxes)
      -
      -    draw_bbox(ax, bb)
      -
      -
      -
      -def test_all():
      -    plt.clf()
      -
      -    ax = plt.subplot(2, 2, 1)
      -    test1(ax)
      -    ax.set_xlim(0., 1.)
      -    ax.set_ylim(0., 1.)
      -    ax.set_title("test1")
      -    ax.set_aspect(1.)
      -
      -
      -    ax = plt.subplot(2, 2, 2)
      -    ax.set_title("test2")
      -    test2(ax)
      -    ax.set_xlim(0., 1.)
      -    ax.set_ylim(0., 1.)
      -    ax.set_aspect(1.)
      -
      -    ax = plt.subplot(2, 2, 3)
      -    ax.set_title("test3")
      -    test3(ax)
      -    ax.set_xlim(0., 1.)
      -    ax.set_ylim(0., 1.)
      -    ax.set_aspect(1)
      -
      -    ax = plt.subplot(2, 2, 4)
      -    ax.set_title("test4")
      -    test4(ax)
      -    ax.set_xlim(-0.5, 1.5)
      -    ax.set_ylim(0., 1.)
      -    ax.set_aspect(2.)
      -
      -    plt.draw()
      -    plt.show()
      -
      -test_all()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/pylab_examples/fancybox_demo2.html b/dev/examples/pylab_examples/fancybox_demo2.html deleted file mode 100644 index 99d766af2c4..00000000000 --- a/dev/examples/pylab_examples/fancybox_demo2.html +++ /dev/null @@ -1,167 +0,0 @@ - - - - - - - - pylab_examples example code: fancybox_demo2.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      pylab_examples example code: fancybox_demo2.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/fancybox_demo21.png -
      -
      import matplotlib.patches as mpatch
      -import matplotlib.pyplot as plt
      -
      -styles = mpatch.BoxStyle.get_styles()
      -
      -figheight = (len(styles)+.5)
      -fig1 = plt.figure(1, (4/1.5, figheight/1.5))
      -fontsize = 0.3 * 72
      -
      -for i, (stylename, styleclass) in enumerate(styles.items()):
      -    fig1.text(0.5, (float(len(styles)) - 0.5 - i)/figheight, stylename,
      -              ha="center",
      -              size=fontsize,
      -              transform=fig1.transFigure,
      -              bbox=dict(boxstyle=stylename, fc="w", ec="k"))
      -plt.draw()
      -plt.show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/pylab_examples/fancytextbox_demo.html b/dev/examples/pylab_examples/fancytextbox_demo.html deleted file mode 100644 index a49eaf97654..00000000000 --- a/dev/examples/pylab_examples/fancytextbox_demo.html +++ /dev/null @@ -1,171 +0,0 @@ - - - - - - - - pylab_examples example code: fancytextbox_demo.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      pylab_examples example code: fancytextbox_demo.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/fancytextbox_demo.png -
      -
      import matplotlib.pyplot as plt
      -
      -plt.text(0.6, 0.5, "test", size=50, rotation=30.,
      -         ha="center", va="center",
      -         bbox = dict(boxstyle="round",
      -                     ec=(1., 0.5, 0.5),
      -                     fc=(1., 0.8, 0.8),
      -                     )
      -         )
      -
      -plt.text(0.5, 0.4, "test", size=50, rotation=-30.,
      -         ha="right", va="top",
      -         bbox = dict(boxstyle="square",
      -                     ec=(1., 0.5, 0.5),
      -                     fc=(1., 0.8, 0.8),
      -                     )
      -         )
      -
      -
      -plt.draw()
      -plt.show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/pylab_examples/figimage_demo.html b/dev/examples/pylab_examples/figimage_demo.html deleted file mode 100644 index b86cbc5c091..00000000000 --- a/dev/examples/pylab_examples/figimage_demo.html +++ /dev/null @@ -1,169 +0,0 @@ - - - - - - - - pylab_examples example code: figimage_demo.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      pylab_examples example code: figimage_demo.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/figimage_demo1.png -
      -
      """
      -This illustrates placing images directly in the figure, with no axes.
      -
      -"""
      -import numpy as np
      -import matplotlib
      -import matplotlib.cm as cm
      -import matplotlib.pyplot as plt
      -
      -
      -fig = plt.figure()
      -Z = np.arange(10000.0)
      -Z.shape = 100,100
      -Z[:,50:] = 1.
      -
      -im1 = plt.figimage(Z, xo=50, yo=0, cmap=cm.jet, origin='lower')
      -im2 = plt.figimage(Z, xo=100, yo=100, alpha=.8, cmap=cm.jet, origin='lower')
      -
      -plt.show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/pylab_examples/figlegend_demo.html b/dev/examples/pylab_examples/figlegend_demo.html deleted file mode 100644 index cae2e8b6861..00000000000 --- a/dev/examples/pylab_examples/figlegend_demo.html +++ /dev/null @@ -1,169 +0,0 @@ - - - - - - - - pylab_examples example code: figlegend_demo.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      pylab_examples example code: figlegend_demo.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/figlegend_demo1.png -
      -
      import numpy as np
      -import matplotlib.pyplot as plt
      -
      -fig = plt.figure()
      -ax1 = fig.add_axes([0.1, 0.1, 0.4, 0.7])
      -ax2 = fig.add_axes([0.55, 0.1, 0.4, 0.7])
      -
      -x = np.arange(0.0, 2.0, 0.02)
      -y1 = np.sin(2*np.pi*x)
      -y2 = np.exp(-x)
      -l1, l2 = ax1.plot(x, y1, 'rs-', x, y2, 'go')
      -
      -y3 = np.sin(4*np.pi*x)
      -y4 = np.exp(-2*x)
      -l3, l4 = ax2.plot(x, y3, 'yd-', x, y3, 'k^')
      -
      -fig.legend((l1, l2), ('Line 1', 'Line 2'), 'upper left')
      -fig.legend((l3, l4), ('Line 3', 'Line 4'), 'upper right')
      -plt.show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/pylab_examples/figure_title.html b/dev/examples/pylab_examples/figure_title.html deleted file mode 100644 index 248b8659158..00000000000 --- a/dev/examples/pylab_examples/figure_title.html +++ /dev/null @@ -1,178 +0,0 @@ - - - - - - - - pylab_examples example code: figure_title.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      pylab_examples example code: figure_title.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/figure_title.png -
      -
      #!/usr/bin/env python
      -from matplotlib.font_manager import FontProperties
      -from pylab import *
      -
      -def f(t):
      -    s1 = cos(2*pi*t)
      -    e1 = exp(-t)
      -    return multiply(s1,e1)
      -
      -t1 = arange(0.0, 5.0, 0.1)
      -t2 = arange(0.0, 5.0, 0.02)
      -t3 = arange(0.0, 2.0, 0.01)
      -
      -
      -subplot(121)
      -plot(t1, f(t1), 'bo', t2, f(t2), 'k')
      -title('subplot 1')
      -ylabel('Damped oscillation')
      -suptitle('This is a somewhat long figure title', fontsize=16)
      -
      -
      -subplot(122)
      -plot(t3, cos(2*pi*t3), 'r--')
      -xlabel('time (s)')
      -title('subplot 2')
      -ylabel('Undamped')
      -
      -show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/pylab_examples/fill_between_demo.html b/dev/examples/pylab_examples/fill_between_demo.html deleted file mode 100644 index 179bce970aa..00000000000 --- a/dev/examples/pylab_examples/fill_between_demo.html +++ /dev/null @@ -1,225 +0,0 @@ - - - - - - - - pylab_examples example code: fill_between_demo.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      pylab_examples example code: fill_between_demo.py

      -

      (Source code)

      -
      -../../_images/fill_between_demo_001.png -

      (png, hires.png, pdf)

      -
      -
      -../../_images/fill_between_demo_011.png -

      (png, hires.png, pdf)

      -
      -
      -../../_images/fill_between_demo_021.png -

      (png, hires.png, pdf)

      -
      -
      #!/usr/bin/env python
      -import matplotlib.mlab as mlab
      -from matplotlib.pyplot import figure, show
      -import numpy as np
      -
      -x = np.arange(0.0, 2, 0.01)
      -y1 = np.sin(2*np.pi*x)
      -y2 = 1.2*np.sin(4*np.pi*x)
      -
      -fig = figure()
      -ax1 = fig.add_subplot(311)
      -ax2 = fig.add_subplot(312, sharex=ax1)
      -ax3 = fig.add_subplot(313, sharex=ax1)
      -
      -ax1.fill_between(x, 0, y1)
      -ax1.set_ylabel('between y1 and 0')
      -
      -ax2.fill_between(x, y1, 1)
      -ax2.set_ylabel('between y1 and 1')
      -
      -ax3.fill_between(x, y1, y2)
      -ax3.set_ylabel('between y1 and y2')
      -ax3.set_xlabel('x')
      -
      -# now fill between y1 and y2 where a logical condition is met.  Note
      -# this is different than calling
      -#   fill_between(x[where], y1[where],y2[where]
      -# because of edge effects over multiple contiguous regions.
      -fig = figure()
      -ax = fig.add_subplot(211)
      -ax.plot(x, y1, x, y2, color='black')
      -ax.fill_between(x, y1, y2, where=y2>=y1, facecolor='green', interpolate=True)
      -ax.fill_between(x, y1, y2, where=y2<=y1, facecolor='red', interpolate=True)
      -ax.set_title('fill between where')
      -
      -# Test support for masked arrays.
      -y2 = np.ma.masked_greater(y2, 1.0)
      -ax1 = fig.add_subplot(212, sharex=ax)
      -ax1.plot(x, y1, x, y2, color='black')
      -ax1.fill_between(x, y1, y2, where=y2>=y1, facecolor='green', interpolate=True)
      -ax1.fill_between(x, y1, y2, where=y2<=y1, facecolor='red', interpolate=True)
      -ax1.set_title('Now regions with y2>1 are masked')
      -
      -# This example illustrates a problem; because of the data
      -# gridding, there are undesired unfilled triangles at the crossover
      -# points.  A brute-force solution would be to interpolate all
      -# arrays to a very fine grid before plotting.
      -
      -# show how to use transforms to create axes spans where a certain condition is satisfied
      -fig = figure()
      -ax = fig.add_subplot(111)
      -y = np.sin(4*np.pi*x)
      -ax.plot(x, y, color='black')
      -
      -# use the data coordinates for the x-axis and the axes coordinates for the y-axis
      -import matplotlib.transforms as mtransforms
      -trans = mtransforms.blended_transform_factory(ax.transData, ax.transAxes)
      -theta = 0.9
      -ax.axhline(theta, color='green', lw=2, alpha=0.5)
      -ax.axhline(-theta, color='red', lw=2, alpha=0.5)
      -ax.fill_between(x, 0, 1, where=y>theta, facecolor='green', alpha=0.5, transform=trans)
      -ax.fill_between(x, 0, 1, where=y<-theta, facecolor='red', alpha=0.5, transform=trans)
      -
      -
      -
      -show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/pylab_examples/fill_betweenx_demo.html b/dev/examples/pylab_examples/fill_betweenx_demo.html deleted file mode 100644 index f2229d0cb7b..00000000000 --- a/dev/examples/pylab_examples/fill_betweenx_demo.html +++ /dev/null @@ -1,205 +0,0 @@ - - - - - - - - pylab_examples example code: fill_betweenx_demo.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      pylab_examples example code: fill_betweenx_demo.py

      -

      (Source code)

      -
      -../../_images/fill_betweenx_demo_001.png -

      (png, hires.png, pdf)

      -
      -
      -../../_images/fill_betweenx_demo_011.png -

      (png, hires.png, pdf)

      -
      -
      import matplotlib.mlab as mlab
      -from matplotlib.pyplot import figure, show
      -import numpy as np
      -
      -## Copy of fill_between.py but using fill_betweenx() instead.
      -
      -x = np.arange(0.0, 2, 0.01)
      -y1 = np.sin(2*np.pi*x)
      -y2 = 1.2*np.sin(4*np.pi*x)
      -
      -fig = figure()
      -ax1 = fig.add_subplot(311)
      -ax2 = fig.add_subplot(312, sharex=ax1)
      -ax3 = fig.add_subplot(313, sharex=ax1)
      -
      -ax1.fill_betweenx(x, 0, y1)
      -ax1.set_ylabel('between y1 and 0')
      -
      -ax2.fill_betweenx(x, y1, 1)
      -ax2.set_ylabel('between y1 and 1')
      -
      -ax3.fill_betweenx(x, y1, y2)
      -ax3.set_ylabel('between y1 and y2')
      -ax3.set_xlabel('x')
      -
      -# now fill between y1 and y2 where a logical condition is met.  Note
      -# this is different than calling
      -#   fill_between(x[where], y1[where],y2[where]
      -# because of edge effects over multiple contiguous regions.
      -fig = figure()
      -ax = fig.add_subplot(211)
      -ax.plot(y1, x, y2, x, color='black')
      -ax.fill_betweenx(x, y1, y2, where=y2>=y1, facecolor='green')
      -ax.fill_betweenx(x, y1, y2, where=y2<=y1, facecolor='red')
      -ax.set_title('fill between where')
      -
      -# Test support for masked arrays.
      -y2 = np.ma.masked_greater(y2, 1.0)
      -ax1 = fig.add_subplot(212, sharex=ax)
      -ax1.plot(y1, x, y2, x, color='black')
      -ax1.fill_betweenx(x, y1, y2, where=y2>=y1, facecolor='green')
      -ax1.fill_betweenx(x, y1, y2, where=y2<=y1, facecolor='red')
      -ax1.set_title('Now regions with y2 > 1 are masked')
      -
      -# This example illustrates a problem; because of the data
      -# gridding, there are undesired unfilled triangles at the crossover
      -# points.  A brute-force solution would be to interpolate all
      -# arrays to a very fine grid before plotting.
      -
      -show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/pylab_examples/fill_demo.html b/dev/examples/pylab_examples/fill_demo.html deleted file mode 100644 index de00cdec4cb..00000000000 --- a/dev/examples/pylab_examples/fill_demo.html +++ /dev/null @@ -1,166 +0,0 @@ - - - - - - - - - - pylab_examples example code: fill_demo.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      pylab_examples example code: fill_demo.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/fill_demo1.png -
      -
      #!/usr/bin/env python
      -import numpy as np
      -import matplotlib.pyplot as plt
      -
      -t = np.arange(0.0, 1.01, 0.01)
      -s = np.sin(2*2*np.pi*t)
      -
      -plt.fill(t, s*np.exp(-5*t), 'r')
      -plt.grid(True)
      -plt.show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/pylab_examples/fill_demo2.html b/dev/examples/pylab_examples/fill_demo2.html deleted file mode 100644 index 561ba38a2b3..00000000000 --- a/dev/examples/pylab_examples/fill_demo2.html +++ /dev/null @@ -1,166 +0,0 @@ - - - - - - - - - - pylab_examples example code: fill_demo2.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      pylab_examples example code: fill_demo2.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/fill_demo2.png -
      -
      from matplotlib.pyplot import figure, show
      -from numpy import arange, sin, pi
      -
      -fig = figure()
      -ax = fig.add_subplot(111)
      -t = arange(0.0,3.01,0.01)
      -s = sin(2*pi*t)
      -c = sin(4*pi*t)
      -ax.fill(t, s, 'b', t, c, 'g', alpha=0.2)
      -show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/pylab_examples/fill_spiral.html b/dev/examples/pylab_examples/fill_spiral.html deleted file mode 100644 index a5e9acf2a65..00000000000 --- a/dev/examples/pylab_examples/fill_spiral.html +++ /dev/null @@ -1,174 +0,0 @@ - - - - - - - - pylab_examples example code: fill_spiral.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      pylab_examples example code: fill_spiral.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/fill_spiral.png -
      -
      #!/usr/bin/env python
      -
      -from pylab import *
      -
      -theta = arange(0,8*pi,0.1)
      -a=1
      -b=.2
      -
      -for dt in arange(0,2*pi,pi/2.0):
      -
      -     x = a*cos( theta+dt )*exp(b*theta)
      -     y = a*sin( theta+dt )*exp(b*theta)
      -
      -     dt = dt+pi/4.0
      -
      -     x2 = a*cos( theta+dt )*exp(b*theta)
      -     y2 = a*sin( theta+dt )*exp(b*theta)
      -
      -     xf = concatenate( (x,x2[::-1]) )
      -     yf = concatenate( (y,y2[::-1]) )
      -
      -     p1=fill(xf,yf)
      -
      -show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/pylab_examples/filledmarker_demo.html b/dev/examples/pylab_examples/filledmarker_demo.html deleted file mode 100644 index ff6d5b58c9e..00000000000 --- a/dev/examples/pylab_examples/filledmarker_demo.html +++ /dev/null @@ -1,237 +0,0 @@ - - - - - - - - pylab_examples example code: filledmarker_demo.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      pylab_examples example code: filledmarker_demo.py

      -

      (Source code)

      -
      -../../_images/filledmarker_demo_00.png -

      (png, hires.png, pdf)

      -
      -
      -../../_images/filledmarker_demo_01.png -

      (png, hires.png, pdf)

      -
      -
      -../../_images/filledmarker_demo_02.png -

      (png, hires.png, pdf)

      -
      -
      -../../_images/filledmarker_demo_03.png -

      (png, hires.png, pdf)

      -
      -
      -../../_images/filledmarker_demo_04.png -

      (png, hires.png, pdf)

      -
      -
      -../../_images/filledmarker_demo_05.png -

      (png, hires.png, pdf)

      -
      -
      -../../_images/filledmarker_demo_06.png -

      (png, hires.png, pdf)

      -
      -
      -../../_images/filledmarker_demo_07.png -

      (png, hires.png, pdf)

      -
      -
      -../../_images/filledmarker_demo_08.png -

      (png, hires.png, pdf)

      -
      -
      -../../_images/filledmarker_demo_09.png -

      (png, hires.png, pdf)

      -
      -
      -../../_images/filledmarker_demo_10.png -

      (png, hires.png, pdf)

      -
      -
      -../../_images/filledmarker_demo_11.png -

      (png, hires.png, pdf)

      -
      -
      -../../_images/filledmarker_demo_12.png -

      (png, hires.png, pdf)

      -
      -
      import itertools
      -
      -import numpy as np
      -import matplotlib.lines as mlines
      -import matplotlib.pyplot as plt
      -
      -colors = itertools.cycle(['b', 'g', 'r', 'c', 'm', 'y', 'k'])
      -altcolor = 'lightgreen'
      -
      -plt.rcParams['text.usetex'] = False # otherwise, '^' will cause trouble
      -
      -y = np.arange(10)
      -for marker in mlines.Line2D.filled_markers:
      -    f = plt.figure()
      -    f.text(.5,.95, "marker = %r" % marker, ha='center')
      -    for i,fs in enumerate(mlines.Line2D.fillStyles):
      -        color = colors.next()
      -
      -        ax = f.add_subplot(121)
      -        ax.plot(2*(4-i)+y, c=color,
      -                       marker=marker,
      -                       markersize=20,
      -                       fillstyle=fs,
      -                       label=fs)
      -        ax.legend(loc=2)
      -        ax.set_title('fillstyle')
      -
      -        ax = f.add_subplot(122)
      -        ax.plot(2*(4-i)+y, c=color,
      -                       marker=marker,
      -                       markersize=20,
      -                       markerfacecoloralt=altcolor,
      -                       fillstyle=fs,
      -                       label=fs)
      -        ax.legend(loc=2)
      -        ax.set_title('fillstyle')
      -
      -plt.show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/pylab_examples/finance_demo.html b/dev/examples/pylab_examples/finance_demo.html deleted file mode 100644 index c2dab9563da..00000000000 --- a/dev/examples/pylab_examples/finance_demo.html +++ /dev/null @@ -1,187 +0,0 @@ - - - - - - - - pylab_examples example code: finance_demo.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      pylab_examples example code: finance_demo.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/finance_demo.png -
      -
      #!/usr/bin/env python
      -from pylab import *
      -from matplotlib.dates import  DateFormatter, WeekdayLocator, HourLocator, \
      -     DayLocator, MONDAY
      -from matplotlib.finance import quotes_historical_yahoo, candlestick,\
      -     plot_day_summary, candlestick2
      -
      -# (Year, month, day) tuples suffice as args for quotes_historical_yahoo
      -date1 = ( 2004, 2, 1)
      -date2 = ( 2004, 4, 12 )
      -
      -
      -mondays = WeekdayLocator(MONDAY)        # major ticks on the mondays
      -alldays    = DayLocator()              # minor ticks on the days
      -weekFormatter = DateFormatter('%b %d')  # e.g., Jan 12
      -dayFormatter = DateFormatter('%d')      # e.g., 12
      -
      -quotes = quotes_historical_yahoo('INTC', date1, date2)
      -if len(quotes) == 0:
      -    raise SystemExit
      -
      -fig = figure()
      -fig.subplots_adjust(bottom=0.2)
      -ax = fig.add_subplot(111)
      -ax.xaxis.set_major_locator(mondays)
      -ax.xaxis.set_minor_locator(alldays)
      -ax.xaxis.set_major_formatter(weekFormatter)
      -#ax.xaxis.set_minor_formatter(dayFormatter)
      -
      -#plot_day_summary(ax, quotes, ticksize=3)
      -candlestick(ax, quotes, width=0.6)
      -
      -ax.xaxis_date()
      -ax.autoscale_view()
      -setp( gca().get_xticklabels(), rotation=45, horizontalalignment='right')
      -
      -show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/pylab_examples/finance_work2.html b/dev/examples/pylab_examples/finance_work2.html deleted file mode 100644 index ced1c73492b..00000000000 --- a/dev/examples/pylab_examples/finance_work2.html +++ /dev/null @@ -1,357 +0,0 @@ - - - - - - - - pylab_examples example code: finance_work2.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      pylab_examples example code: finance_work2.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/finance_work2.png -
      -
      import datetime
      -import numpy as np
      -import matplotlib.colors as colors
      -import matplotlib.finance as finance
      -import matplotlib.dates as mdates
      -import matplotlib.ticker as mticker
      -import matplotlib.mlab as mlab
      -import matplotlib.pyplot as plt
      -import matplotlib.font_manager as font_manager
      -
      -
      -startdate = datetime.date(2006,1,1)
      -today = enddate = datetime.date.today()
      -ticker = 'SPY'
      -
      -
      -fh = finance.fetch_historical_yahoo(ticker, startdate, enddate)
      -# a numpy record array with fields: date, open, high, low, close, volume, adj_close)
      -
      -r = mlab.csv2rec(fh); fh.close()
      -r.sort()
      -
      -
      -def moving_average(x, n, type='simple'):
      -    """
      -    compute an n period moving average.
      -
      -    type is 'simple' | 'exponential'
      -
      -    """
      -    x = np.asarray(x)
      -    if type=='simple':
      -        weights = np.ones(n)
      -    else:
      -        weights = np.exp(np.linspace(-1., 0., n))
      -
      -    weights /= weights.sum()
      -
      -
      -    a =  np.convolve(x, weights, mode='full')[:len(x)]
      -    a[:n] = a[n]
      -    return a
      -
      -def relative_strength(prices, n=14):
      -    """
      -    compute the n period relative strength indicator
      -    http://stockcharts.com/school/doku.php?id=chart_school:glossary_r#relativestrengthindex
      -    http://www.investopedia.com/terms/r/rsi.asp
      -    """
      -
      -    deltas = np.diff(prices)
      -    seed = deltas[:n+1]
      -    up = seed[seed>=0].sum()/n
      -    down = -seed[seed<0].sum()/n
      -    rs = up/down
      -    rsi = np.zeros_like(prices)
      -    rsi[:n] = 100. - 100./(1.+rs)
      -
      -    for i in range(n, len(prices)):
      -        delta = deltas[i-1] # cause the diff is 1 shorter
      -
      -        if delta>0:
      -            upval = delta
      -            downval = 0.
      -        else:
      -            upval = 0.
      -            downval = -delta
      -
      -        up = (up*(n-1) + upval)/n
      -        down = (down*(n-1) + downval)/n
      -
      -        rs = up/down
      -        rsi[i] = 100. - 100./(1.+rs)
      -
      -    return rsi
      -
      -def moving_average_convergence(x, nslow=26, nfast=12):
      -    """
      -    compute the MACD (Moving Average Convergence/Divergence) using a fast and slow exponential moving avg'
      -    return value is emaslow, emafast, macd which are len(x) arrays
      -    """
      -    emaslow = moving_average(x, nslow, type='exponential')
      -    emafast = moving_average(x, nfast, type='exponential')
      -    return emaslow, emafast, emafast - emaslow
      -
      -
      -plt.rc('axes', grid=True)
      -plt.rc('grid', color='0.75', linestyle='-', linewidth=0.5)
      -
      -textsize = 9
      -left, width = 0.1, 0.8
      -rect1 = [left, 0.7, width, 0.2]
      -rect2 = [left, 0.3, width, 0.4]
      -rect3 = [left, 0.1, width, 0.2]
      -
      -
      -fig = plt.figure(facecolor='white')
      -axescolor  = '#f6f6f6'  # the axes background color
      -
      -ax1 = fig.add_axes(rect1, axisbg=axescolor)  #left, bottom, width, height
      -ax2 = fig.add_axes(rect2, axisbg=axescolor, sharex=ax1)
      -ax2t = ax2.twinx()
      -ax3  = fig.add_axes(rect3, axisbg=axescolor, sharex=ax1)
      -
      -
      -
      -### plot the relative strength indicator
      -prices = r.adj_close
      -rsi = relative_strength(prices)
      -fillcolor = 'darkgoldenrod'
      -
      -ax1.plot(r.date, rsi, color=fillcolor)
      -ax1.axhline(70, color=fillcolor)
      -ax1.axhline(30, color=fillcolor)
      -ax1.fill_between(r.date, rsi, 70, where=(rsi>=70), facecolor=fillcolor, edgecolor=fillcolor)
      -ax1.fill_between(r.date, rsi, 30, where=(rsi<=30), facecolor=fillcolor, edgecolor=fillcolor)
      -ax1.text(0.6, 0.9, '>70 = overbought', va='top', transform=ax1.transAxes, fontsize=textsize)
      -ax1.text(0.6, 0.1, '<30 = oversold', transform=ax1.transAxes, fontsize=textsize)
      -ax1.set_ylim(0, 100)
      -ax1.set_yticks([30,70])
      -ax1.text(0.025, 0.95, 'RSI (14)', va='top', transform=ax1.transAxes, fontsize=textsize)
      -ax1.set_title('%s daily'%ticker)
      -
      -### plot the price and volume data
      -dx = r.adj_close - r.close
      -low = r.low + dx
      -high = r.high + dx
      -
      -deltas = np.zeros_like(prices)
      -deltas[1:] = np.diff(prices)
      -up = deltas>0
      -ax2.vlines(r.date[up], low[up], high[up], color='black', label='_nolegend_')
      -ax2.vlines(r.date[~up], low[~up], high[~up], color='black', label='_nolegend_')
      -ma20 = moving_average(prices, 20, type='simple')
      -ma200 = moving_average(prices, 200, type='simple')
      -
      -linema20, = ax2.plot(r.date, ma20, color='blue', lw=2, label='MA (20)')
      -linema200, = ax2.plot(r.date, ma200, color='red', lw=2, label='MA (200)')
      -
      -
      -last = r[-1]
      -s = '%s O:%1.2f H:%1.2f L:%1.2f C:%1.2f, V:%1.1fM Chg:%+1.2f' % (
      -    today.strftime('%d-%b-%Y'),
      -    last.open, last.high,
      -    last.low, last.close,
      -    last.volume*1e-6,
      -    last.close-last.open )
      -t4 = ax2.text(0.3, 0.9, s, transform=ax2.transAxes, fontsize=textsize)
      -
      -props = font_manager.FontProperties(size=10)
      -leg = ax2.legend(loc='center left', shadow=True, fancybox=True, prop=props)
      -leg.get_frame().set_alpha(0.5)
      -
      -
      -volume = (r.close*r.volume)/1e6  # dollar volume in millions
      -vmax = volume.max()
      -poly = ax2t.fill_between(r.date, volume, 0, label='Volume', facecolor=fillcolor, edgecolor=fillcolor)
      -ax2t.set_ylim(0, 5*vmax)
      -ax2t.set_yticks([])
      -
      -
      -### compute the MACD indicator
      -fillcolor = 'darkslategrey'
      -nslow = 26
      -nfast = 12
      -nema = 9
      -emaslow, emafast, macd = moving_average_convergence(prices, nslow=nslow, nfast=nfast)
      -ema9 = moving_average(macd, nema, type='exponential')
      -ax3.plot(r.date, macd, color='black', lw=2)
      -ax3.plot(r.date, ema9, color='blue', lw=1)
      -ax3.fill_between(r.date, macd-ema9, 0, alpha=0.5, facecolor=fillcolor, edgecolor=fillcolor)
      -
      -
      -ax3.text(0.025, 0.95, 'MACD (%d, %d, %d)'%(nfast, nslow, nema), va='top',
      -         transform=ax3.transAxes, fontsize=textsize)
      -
      -#ax3.set_yticks([])
      -# turn off upper axis tick labels, rotate the lower ones, etc
      -for ax in ax1, ax2, ax2t, ax3:
      -    if ax!=ax3:
      -        for label in ax.get_xticklabels():
      -            label.set_visible(False)
      -    else:
      -        for label in ax.get_xticklabels():
      -            label.set_rotation(30)
      -            label.set_horizontalalignment('right')
      -
      -    ax.fmt_xdata = mdates.DateFormatter('%Y-%m-%d')
      -
      -
      -
      -class MyLocator(mticker.MaxNLocator):
      -    def __init__(self, *args, **kwargs):
      -        mticker.MaxNLocator.__init__(self, *args, **kwargs)
      -
      -    def __call__(self, *args, **kwargs):
      -        return mticker.MaxNLocator.__call__(self, *args, **kwargs)
      -
      -# at most 5 ticks, pruning the upper and lower so they don't overlap
      -# with other ticks
      -#ax2.yaxis.set_major_locator(mticker.MaxNLocator(5, prune='both'))
      -#ax3.yaxis.set_major_locator(mticker.MaxNLocator(5, prune='both'))
      -
      -ax2.yaxis.set_major_locator(MyLocator(5, prune='both'))
      -ax3.yaxis.set_major_locator(MyLocator(5, prune='both'))
      -
      -plt.show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/pylab_examples/findobj_demo.html b/dev/examples/pylab_examples/findobj_demo.html deleted file mode 100644 index 9ae66207f9f..00000000000 --- a/dev/examples/pylab_examples/findobj_demo.html +++ /dev/null @@ -1,187 +0,0 @@ - - - - - - - - pylab_examples example code: findobj_demo.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      pylab_examples example code: findobj_demo.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/findobj_demo.png -
      -
      """
      -Recursively find all objects that match some criteria
      -"""
      -import numpy as np
      -import matplotlib.pyplot as plt
      -import matplotlib.text as text
      -
      -a = np.arange(0,3,.02)
      -b = np.arange(0,3,.02)
      -c = np.exp(a)
      -d = c[::-1]
      -
      -fig = plt.figure()
      -ax = fig.add_subplot(111)
      -plt.plot(a,c,'k--',a,d,'k:',a,c+d,'k')
      -plt.legend(('Model length', 'Data length', 'Total message length'),
      -           'upper center', shadow=True)
      -plt.ylim([-1,20])
      -plt.grid(False)
      -plt.xlabel('Model complexity --->')
      -plt.ylabel('Message length --->')
      -plt.title('Minimum Message Length')
      -
      -# match on arbitrary function
      -def myfunc(x):
      -    return hasattr(x, 'set_color') and not hasattr(x, 'set_facecolor')
      -
      -for o in fig.findobj(myfunc):
      -    o.set_color('blue')
      -
      -# match on class instances
      -for o in fig.findobj(text.Text):
      -    o.set_fontstyle('italic')
      -
      -
      -
      -plt.show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/pylab_examples/font_table_ttf.html b/dev/examples/pylab_examples/font_table_ttf.html deleted file mode 100644 index 61b26ccab1e..00000000000 --- a/dev/examples/pylab_examples/font_table_ttf.html +++ /dev/null @@ -1,217 +0,0 @@ - - - - - - - - pylab_examples example code: font_table_ttf.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      pylab_examples example code: font_table_ttf.py

      -

      [source code]

      -
      #!/usr/bin/env python
      -# -*- noplot -*-
      -"""
      -matplotlib has support for freetype fonts.  Here's a little example
      -using the 'table' command to build a font table that shows the glyphs
      -by character code.
      -
      -Usage python font_table_ttf.py somefile.ttf
      -"""
      -
      -import sys
      -import os
      -
      -import matplotlib
      -from matplotlib.ft2font import FT2Font
      -from matplotlib.font_manager import FontProperties
      -from pylab import figure, table, show, axis, title
      -
      -try:
      -    unichr
      -except NameError:
      -    # Python 3
      -    unichr = chr
      -
      -# the font table grid
      -
      -labelc = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9',
      -          'A', 'B', 'C', 'D', 'E', 'F']
      -labelr = ['00', '10', '20', '30', '40', '50', '60', '70', '80', '90',
      -          'A0', 'B0', 'C0', 'D0', 'E0', 'F0']
      -
      -if len(sys.argv) > 1:
      -    fontname = sys.argv[1]
      -else:
      -    fontname = os.path.join(matplotlib.get_data_path(),
      -                            'fonts', 'ttf', 'Vera.ttf')
      -
      -font = FT2Font(fontname)
      -codes = list(font.get_charmap().items())
      -codes.sort()
      -
      -# a 16,16 array of character strings
      -chars = [['' for c in range(16)] for r in range(16)]
      -colors = [[(0.95, 0.95, 0.95) for c in range(16)] for r in range(16)]
      -
      -figure(figsize=(8, 4), dpi=120)
      -for ccode, glyphind in codes:
      -    if ccode >= 256:
      -        continue
      -    r, c = divmod(ccode, 16)
      -    s = unichr(ccode)
      -    chars[r][c] = s
      -
      -lightgrn = (0.5, 0.8, 0.5)
      -title(fontname)
      -tab = table(cellText=chars,
      -            rowLabels=labelr,
      -            colLabels=labelc,
      -            rowColours=[lightgrn]*16,
      -            colColours=[lightgrn]*16,
      -            cellColours=colors,
      -            cellLoc='center',
      -            loc='upper left')
      -
      -for key, cell in tab.get_celld().items():
      -    row, col = key
      -    if row > 0 and col > 0:
      -        cell.set_text_props(fontproperties=FontProperties(fname=fontname))
      -axis('off')
      -show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/pylab_examples/font_table_ttf.py b/dev/examples/pylab_examples/font_table_ttf.py deleted file mode 100644 index e475d332bb2..00000000000 --- a/dev/examples/pylab_examples/font_table_ttf.py +++ /dev/null @@ -1,70 +0,0 @@ -#!/usr/bin/env python -# -*- noplot -*- -""" -matplotlib has support for freetype fonts. Here's a little example -using the 'table' command to build a font table that shows the glyphs -by character code. - -Usage python font_table_ttf.py somefile.ttf -""" - -import sys -import os - -import matplotlib -from matplotlib.ft2font import FT2Font -from matplotlib.font_manager import FontProperties -from pylab import figure, table, show, axis, title - -try: - unichr -except NameError: - # Python 3 - unichr = chr - -# the font table grid - -labelc = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', - 'A', 'B', 'C', 'D', 'E', 'F'] -labelr = ['00', '10', '20', '30', '40', '50', '60', '70', '80', '90', - 'A0', 'B0', 'C0', 'D0', 'E0', 'F0'] - -if len(sys.argv) > 1: - fontname = sys.argv[1] -else: - fontname = os.path.join(matplotlib.get_data_path(), - 'fonts', 'ttf', 'Vera.ttf') - -font = FT2Font(fontname) -codes = list(font.get_charmap().items()) -codes.sort() - -# a 16,16 array of character strings -chars = [['' for c in range(16)] for r in range(16)] -colors = [[(0.95, 0.95, 0.95) for c in range(16)] for r in range(16)] - -figure(figsize=(8, 4), dpi=120) -for ccode, glyphind in codes: - if ccode >= 256: - continue - r, c = divmod(ccode, 16) - s = unichr(ccode) - chars[r][c] = s - -lightgrn = (0.5, 0.8, 0.5) -title(fontname) -tab = table(cellText=chars, - rowLabels=labelr, - colLabels=labelc, - rowColours=[lightgrn]*16, - colColours=[lightgrn]*16, - cellColours=colors, - cellLoc='center', - loc='upper left') - -for key, cell in tab.get_celld().items(): - row, col = key - if row > 0 and col > 0: - cell.set_text_props(fontproperties=FontProperties(fname=fontname)) -axis('off') -show() diff --git a/dev/examples/pylab_examples/fonts_demo.html b/dev/examples/pylab_examples/fonts_demo.html deleted file mode 100644 index ede1f23c244..00000000000 --- a/dev/examples/pylab_examples/fonts_demo.html +++ /dev/null @@ -1,265 +0,0 @@ - - - - - - - - pylab_examples example code: fonts_demo.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      pylab_examples example code: fonts_demo.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/fonts_demo.png -
      -
      #!/usr/bin/env python
      -"""
      -Show how to set custom font properties.
      -
      -For interactive users, you can also use kwargs to the text command,
      -which requires less typing.  See examples/fonts_demo_kw.py
      -"""
      -from matplotlib.font_manager import FontProperties
      -from pylab import *
      -
      -subplot(111, axisbg='w')
      -
      -font0 = FontProperties()
      -alignment = {'horizontalalignment':'center', 'verticalalignment':'baseline'}
      -###  Show family options
      -
      -family = ['serif', 'sans-serif', 'cursive', 'fantasy', 'monospace']
      -
      -font1 = font0.copy()
      -font1.set_size('large')
      -
      -t = text(-0.8, 0.9, 'family', fontproperties=font1,
      -         **alignment)
      -
      -yp = [0.7, 0.5, 0.3, 0.1, -0.1, -0.3, -0.5]
      -
      -for k in range(5):
      -    font = font0.copy()
      -    font.set_family(family[k])
      -    if k == 2:
      -        font.set_name('Script MT')
      -    t = text(-0.8, yp[k], family[k], fontproperties=font,
      -             **alignment)
      -
      -###  Show style options
      -
      -style  = ['normal', 'italic', 'oblique']
      -
      -t = text(-0.4, 0.9, 'style', fontproperties=font1,
      -         **alignment)
      -
      -for k in range(3):
      -    font = font0.copy()
      -    font.set_family('sans-serif')
      -    font.set_style(style[k])
      -    t = text(-0.4, yp[k], style[k], fontproperties=font,
      -             **alignment)
      -
      -###  Show variant options
      -
      -variant= ['normal', 'small-caps']
      -
      -t = text(0.0, 0.9, 'variant', fontproperties=font1,
      -         **alignment)
      -
      -for k in range(2):
      -    font = font0.copy()
      -    font.set_family('serif')
      -    font.set_variant(variant[k])
      -    t = text( 0.0, yp[k], variant[k], fontproperties=font,
      -             **alignment)
      -
      -###  Show weight options
      -
      -weight = ['light', 'normal', 'medium', 'semibold', 'bold', 'heavy', 'black']
      -
      -t = text( 0.4, 0.9, 'weight', fontproperties=font1,
      -         **alignment)
      -
      -for k in range(7):
      -    font = font0.copy()
      -    font.set_weight(weight[k])
      -    t = text( 0.4, yp[k], weight[k], fontproperties=font,
      -             **alignment)
      -
      -###  Show size options
      -
      -size  = ['xx-small', 'x-small', 'small', 'medium', 'large',
      -         'x-large', 'xx-large']
      -
      -t = text( 0.8, 0.9, 'size', fontproperties=font1,
      -         **alignment)
      -
      -for k in range(7):
      -    font = font0.copy()
      -    font.set_size(size[k])
      -    t = text( 0.8, yp[k], size[k], fontproperties=font,
      -             **alignment)
      -
      -###  Show bold italic
      -
      -font = font0.copy()
      -font.set_style('italic')
      -font.set_weight('bold')
      -font.set_size('x-small')
      -t = text(0, 0.1, 'bold italic', fontproperties=font,
      -         **alignment)
      -
      -font = font0.copy()
      -font.set_style('italic')
      -font.set_weight('bold')
      -font.set_size('medium')
      -t = text(0, 0.2, 'bold italic', fontproperties=font,
      -         **alignment)
      -
      -font = font0.copy()
      -font.set_style('italic')
      -font.set_weight('bold')
      -font.set_size('x-large')
      -t = text(0, 0.3, 'bold italic', fontproperties=font,
      -         **alignment)
      -
      -axis([-1,1,0,1])
      -
      -show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/pylab_examples/fonts_demo_kw.html b/dev/examples/pylab_examples/fonts_demo_kw.html deleted file mode 100644 index 68de63d2378..00000000000 --- a/dev/examples/pylab_examples/fonts_demo_kw.html +++ /dev/null @@ -1,234 +0,0 @@ - - - - - - - - pylab_examples example code: fonts_demo_kw.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      pylab_examples example code: fonts_demo_kw.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/fonts_demo_kw.png -
      -
      #!/usr/bin/env python
      -"""
      -Same as fonts_demo using kwargs.  If you prefer a more pythonic, OO
      -style of coding, see examples/fonts_demo.py.
      -
      -"""
      -from matplotlib.font_manager import FontProperties
      -from pylab import *
      -
      -subplot(111, axisbg='w')
      -alignment = {'horizontalalignment':'center', 'verticalalignment':'baseline'}
      -###  Show family options
      -
      -family = ['serif', 'sans-serif', 'cursive', 'fantasy', 'monospace']
      -
      -t = text(-0.8, 0.9, 'family', size='large', **alignment)
      -
      -yp = [0.7, 0.5, 0.3, 0.1, -0.1, -0.3, -0.5]
      -
      -for k in range(5):
      -    if k == 2:
      -        t = text(-0.8, yp[k], family[k], family=family[k],
      -                 name='Script MT', **alignment)
      -    else:
      -        t = text(-0.8, yp[k], family[k], family=family[k], **alignment)
      -
      -###  Show style options
      -
      -style  = ['normal', 'italic', 'oblique']
      -
      -t = text(-0.4, 0.9, 'style', **alignment)
      -
      -for k in range(3):
      -    t = text(-0.4, yp[k], style[k], family='sans-serif', style=style[k],
      -             **alignment)
      -
      -###  Show variant options
      -
      -variant= ['normal', 'small-caps']
      -
      -t = text(0.0, 0.9, 'variant', **alignment)
      -
      -for k in range(2):
      -    t = text( 0.0, yp[k], variant[k], family='serif', variant=variant[k],
      -              **alignment)
      -
      -###  Show weight options
      -
      -weight = ['light', 'normal', 'medium', 'semibold', 'bold', 'heavy', 'black']
      -
      -t = text( 0.4, 0.9, 'weight',  **alignment)
      -
      -for k in range(7):
      -    t = text( 0.4, yp[k], weight[k], weight=weight[k],
      -              **alignment)
      -
      -###  Show size options
      -
      -size  = ['xx-small', 'x-small', 'small', 'medium', 'large',
      -         'x-large', 'xx-large']
      -
      -t = text( 0.8, 0.9, 'size', **alignment)
      -
      -for k in range(7):
      -    t = text( 0.8, yp[k], size[k], size=size[k],
      -             **alignment)
      -
      -x = 0
      -###  Show bold italic
      -t = text(x, 0.1, 'bold italic', style='italic',
      -         weight='bold', size='x-small',
      -         **alignment)
      -
      -t = text(x, 0.2, 'bold italic',
      -         style = 'italic', weight='bold', size='medium',
      -         **alignment)
      -
      -t = text(x, 0.3, 'bold italic',
      -         style='italic', weight='bold', size='x-large',
      -         **alignment)
      -
      -axis([-1, 1, 0, 1])
      -
      -show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/pylab_examples/ganged_plots.html b/dev/examples/pylab_examples/ganged_plots.html deleted file mode 100644 index 99c048d4df6..00000000000 --- a/dev/examples/pylab_examples/ganged_plots.html +++ /dev/null @@ -1,195 +0,0 @@ - - - - - - - - pylab_examples example code: ganged_plots.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      pylab_examples example code: ganged_plots.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/ganged_plots.png -
      -
      #!/usr/bin/env python
      -"""
      -To create plots that share a common axes (visually) you can set the
      -hspace between the subplots close to zero (do not use zero itself).
      -Normally you'll want to turn off the tick labels on all but one of the
      -axes.
      -
      -In this example the plots share a common xaxis but you can follow the
      -same logic to supply a common y axis.
      -"""
      -from pylab import *
      -
      -t = arange(0.0, 2.0, 0.01)
      -
      -s1 = sin(2*pi*t)
      -s2 = exp(-t)
      -s3 = s1*s2
      -
      -# axes rect in relative 0,1 coords left, bottom, width, height.  Turn
      -# off xtick labels on all but the lower plot
      -
      -
      -f = figure()
      -subplots_adjust(hspace=0.001)
      -
      -
      -ax1 = subplot(311)
      -ax1.plot(t,s1)
      -yticks(arange(-0.9, 1.0, 0.4))
      -ylim(-1,1)
      -
      -ax2 = subplot(312, sharex=ax1)
      -ax2.plot(t,s2)
      -yticks(arange(0.1, 1.0,  0.2))
      -ylim(0,1)
      -
      -ax3 = subplot(313, sharex=ax1)
      -ax3.plot(t,s3)
      -yticks(arange(-0.9, 1.0, 0.4))
      -ylim(-1,1)
      -
      -xticklabels = ax1.get_xticklabels()+ax2.get_xticklabels()
      -setp(xticklabels, visible=False)
      -
      -show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/pylab_examples/geo_demo.html b/dev/examples/pylab_examples/geo_demo.html deleted file mode 100644 index 8126ea744f3..00000000000 --- a/dev/examples/pylab_examples/geo_demo.html +++ /dev/null @@ -1,172 +0,0 @@ - - - - - - - - pylab_examples example code: geo_demo.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      pylab_examples example code: geo_demo.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/geo_demo.png -
      -
      import numpy as np
      -#np.seterr("raise")
      -
      -from pylab import *
      -
      -subplot(221, projection="aitoff")
      -title("Aitoff")
      -grid(True)
      -
      -subplot(222, projection="hammer")
      -title("Hammer")
      -grid(True)
      -
      -subplot(223, projection="lambert")
      -title("Lambert")
      -grid(True)
      -
      -subplot(224, projection="mollweide")
      -title("Mollweide")
      -grid(True)
      -
      -show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/pylab_examples/ginput_demo.html b/dev/examples/pylab_examples/ginput_demo.html deleted file mode 100644 index f0b59a58ba1..00000000000 --- a/dev/examples/pylab_examples/ginput_demo.html +++ /dev/null @@ -1,158 +0,0 @@ - - - - - - - - pylab_examples example code: ginput_demo.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      pylab_examples example code: ginput_demo.py

      -

      [source code]

      -
      # -*- noplot -*-
      -
      -from __future__ import print_function
      -
      -from pylab import arange, plot, sin, ginput, show
      -t = arange(10)
      -plot(t, sin(t))
      -print("Please click")
      -x = ginput(3)
      -print("clicked",x)
      -show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/pylab_examples/ginput_demo.py b/dev/examples/pylab_examples/ginput_demo.py deleted file mode 100644 index 3a3a5b408f9..00000000000 --- a/dev/examples/pylab_examples/ginput_demo.py +++ /dev/null @@ -1,11 +0,0 @@ -# -*- noplot -*- - -from __future__ import print_function - -from pylab import arange, plot, sin, ginput, show -t = arange(10) -plot(t, sin(t)) -print("Please click") -x = ginput(3) -print("clicked",x) -show() diff --git a/dev/examples/pylab_examples/ginput_manual_clabel.html b/dev/examples/pylab_examples/ginput_manual_clabel.html deleted file mode 100644 index f0d1be64631..00000000000 --- a/dev/examples/pylab_examples/ginput_manual_clabel.html +++ /dev/null @@ -1,243 +0,0 @@ - - - - - - - - pylab_examples example code: ginput_manual_clabel.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      pylab_examples example code: ginput_manual_clabel.py

      -

      [source code]

      -
      #!/usr/bin/env python
      -# -*- noplot -*-
      -
      -from __future__ import print_function
      -"""
      -This provides examples of uses of interactive functions, such as ginput,
      -waitforbuttonpress and manual clabel placement.
      -
      -This script must be run interactively using a backend that has a
      -graphical user interface (for example, using GTKAgg backend, but not
      -PS backend).
      -
      -See also ginput_demo.py
      -"""
      -import time
      -import matplotlib
      -import numpy as np
      -import matplotlib.cm as cm
      -import matplotlib.mlab as mlab
      -import matplotlib.pyplot as plt
      -
      -def tellme(s):
      -    print(s)
      -    plt.title(s,fontsize=16)
      -    plt.draw()
      -
      -##################################################
      -# Define a triangle by clicking three points
      -##################################################
      -plt.clf()
      -plt.axis([-1.,1.,-1.,1.])
      -plt.setp(plt.gca(),autoscale_on=False)
      -
      -tellme('You will define a triangle, click to begin')
      -
      -plt.waitforbuttonpress()
      -
      -happy = False
      -while not happy:
      -    pts = []
      -    while len(pts) < 3:
      -        tellme('Select 3 corners with mouse')
      -        pts = np.asarray( plt.ginput(3,timeout=-1) )
      -        if len(pts) < 3:
      -            tellme('Too few points, starting over')
      -            time.sleep(1) # Wait a second
      -
      -    ph = plt.fill( pts[:,0], pts[:,1], 'r', lw=2 )
      -
      -    tellme('Happy? Key click for yes, mouse click for no')
      -
      -    happy = plt.waitforbuttonpress()
      -
      -    # Get rid of fill
      -    if not happy:
      -        for p in ph: p.remove()
      -
      -##################################################
      -# Now contour according to distance from triangle
      -# corners - just an example
      -##################################################
      -
      -# Define a nice function of distance from individual pts
      -def f(x,y,pts):
      -    z = np.zeros_like(x)
      -    for p in pts:
      -        z = z + 1/(np.sqrt((x-p[0])**2+(y-p[1])**2))
      -    return 1/z
      -
      -X,Y = np.meshgrid( np.linspace(-1,1,51), np.linspace(-1,1,51) )
      -Z = f(X,Y,pts)
      -
      -CS = plt.contour( X, Y, Z, 20 )
      -
      -tellme( 'Use mouse to select contour label locations, middle button to finish' )
      -CL = plt.clabel( CS, manual=True )
      -
      -##################################################
      -# Now do a zoom
      -##################################################
      -tellme( 'Now do a nested zoom, click to begin' )
      -plt.waitforbuttonpress()
      -
      -happy = False
      -while not happy:
      -    tellme( 'Select two corners of zoom, middle mouse button to finish' )
      -    pts = np.asarray( plt.ginput(2,timeout=-1) )
      -
      -    happy = len(pts) < 2
      -    if happy: break
      -
      -    pts = np.sort(pts,axis=0)
      -    plt.axis( pts.T.ravel() )
      -
      -tellme('All Done!')
      -plt.show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/pylab_examples/ginput_manual_clabel.py b/dev/examples/pylab_examples/ginput_manual_clabel.py deleted file mode 100644 index f79056608c0..00000000000 --- a/dev/examples/pylab_examples/ginput_manual_clabel.py +++ /dev/null @@ -1,96 +0,0 @@ -#!/usr/bin/env python -# -*- noplot -*- - -from __future__ import print_function -""" -This provides examples of uses of interactive functions, such as ginput, -waitforbuttonpress and manual clabel placement. - -This script must be run interactively using a backend that has a -graphical user interface (for example, using GTKAgg backend, but not -PS backend). - -See also ginput_demo.py -""" -import time -import matplotlib -import numpy as np -import matplotlib.cm as cm -import matplotlib.mlab as mlab -import matplotlib.pyplot as plt - -def tellme(s): - print(s) - plt.title(s,fontsize=16) - plt.draw() - -################################################## -# Define a triangle by clicking three points -################################################## -plt.clf() -plt.axis([-1.,1.,-1.,1.]) -plt.setp(plt.gca(),autoscale_on=False) - -tellme('You will define a triangle, click to begin') - -plt.waitforbuttonpress() - -happy = False -while not happy: - pts = [] - while len(pts) < 3: - tellme('Select 3 corners with mouse') - pts = np.asarray( plt.ginput(3,timeout=-1) ) - if len(pts) < 3: - tellme('Too few points, starting over') - time.sleep(1) # Wait a second - - ph = plt.fill( pts[:,0], pts[:,1], 'r', lw=2 ) - - tellme('Happy? Key click for yes, mouse click for no') - - happy = plt.waitforbuttonpress() - - # Get rid of fill - if not happy: - for p in ph: p.remove() - -################################################## -# Now contour according to distance from triangle -# corners - just an example -################################################## - -# Define a nice function of distance from individual pts -def f(x,y,pts): - z = np.zeros_like(x) - for p in pts: - z = z + 1/(np.sqrt((x-p[0])**2+(y-p[1])**2)) - return 1/z - -X,Y = np.meshgrid( np.linspace(-1,1,51), np.linspace(-1,1,51) ) -Z = f(X,Y,pts) - -CS = plt.contour( X, Y, Z, 20 ) - -tellme( 'Use mouse to select contour label locations, middle button to finish' ) -CL = plt.clabel( CS, manual=True ) - -################################################## -# Now do a zoom -################################################## -tellme( 'Now do a nested zoom, click to begin' ) -plt.waitforbuttonpress() - -happy = False -while not happy: - tellme( 'Select two corners of zoom, middle mouse button to finish' ) - pts = np.asarray( plt.ginput(2,timeout=-1) ) - - happy = len(pts) < 2 - if happy: break - - pts = np.sort(pts,axis=0) - plt.axis( pts.T.ravel() ) - -tellme('All Done!') -plt.show() diff --git a/dev/examples/pylab_examples/gradient_bar.html b/dev/examples/pylab_examples/gradient_bar.html deleted file mode 100644 index 43c8a0bef91..00000000000 --- a/dev/examples/pylab_examples/gradient_bar.html +++ /dev/null @@ -1,178 +0,0 @@ - - - - - - - - pylab_examples example code: gradient_bar.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      pylab_examples example code: gradient_bar.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/gradient_bar.png -
      -
      from matplotlib.pyplot import figure, show, cm
      -from numpy import arange
      -from numpy.random import rand
      -
      -def gbar(ax, x, y, width=0.5, bottom=0):
      -   X = [[.6, .6],[.7,.7]]
      -   for left,top in zip(x, y):
      -       right = left+width
      -       ax.imshow(X, interpolation='bicubic', cmap=cm.Blues,
      -                 extent=(left, right, bottom, top), alpha=1)
      -
      -fig = figure()
      -
      -xmin, xmax = xlim = 0,10
      -ymin, ymax = ylim = 0,1
      -ax = fig.add_subplot(111, xlim=xlim, ylim=ylim,
      -                    autoscale_on=False)
      -X = [[.6, .6],[.7,.7]]
      -
      -ax.imshow(X, interpolation='bicubic', cmap=cm.copper,
      -         extent=(xmin, xmax, ymin, ymax), alpha=1)
      -
      -N = 10
      -x = arange(N)+0.25
      -y = rand(N)
      -gbar(ax, x, y, width=0.7)
      -ax.set_aspect('auto')
      -show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/pylab_examples/griddata_demo.html b/dev/examples/pylab_examples/griddata_demo.html deleted file mode 100644 index 2bfabc20f04..00000000000 --- a/dev/examples/pylab_examples/griddata_demo.html +++ /dev/null @@ -1,192 +0,0 @@ - - - - - - - - pylab_examples example code: griddata_demo.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      pylab_examples example code: griddata_demo.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/griddata_demo_00_00.png -
      -

      ()

      -
      from numpy.random import uniform, seed
      -from matplotlib.mlab import griddata
      -import matplotlib.pyplot as plt
      -import numpy as np
      -# make up data.
      -#npts = int(raw_input('enter # of random points to plot:'))
      -seed(0)
      -npts = 200
      -x = uniform(-2,2,npts)
      -y = uniform(-2,2,npts)
      -z = x*np.exp(-x**2-y**2)
      -# define grid.
      -xi = np.linspace(-2.1,2.1,100)
      -yi = np.linspace(-2.1,2.1,200)
      -# grid the data.
      -zi = griddata(x,y,z,xi,yi,interp='linear')
      -# contour the gridded data, plotting dots at the nonuniform data points.
      -CS = plt.contour(xi,yi,zi,15,linewidths=0.5,colors='k')
      -CS = plt.contourf(xi,yi,zi,15,cmap=plt.cm.rainbow,
      -                  vmax=abs(zi).max(), vmin=-abs(zi).max())
      -plt.colorbar() # draw colorbar
      -# plot data points.
      -plt.scatter(x,y,marker='o',c='b',s=5,zorder=10)
      -plt.xlim(-2,2)
      -plt.ylim(-2,2)
      -plt.title('griddata test (%d points)' % npts)
      -plt.show()
      -
      -# test case that scikits.delaunay fails on, but natgrid passes..
      -#data = np.array([[-1, -1], [-1, 0], [-1, 1],
      -#                 [ 0, -1], [ 0, 0], [ 0, 1],
      -#                 [ 1, -1 - np.finfo(np.float_).eps], [ 1, 0], [ 1, 1],
      -#                ])
      -#x = data[:,0]
      -#y = data[:,1]
      -#z = x*np.exp(-x**2-y**2)
      -## define grid.
      -#xi = np.linspace(-1.1,1.1,100)
      -#yi = np.linspace(-1.1,1.1,100)
      -## grid the data.
      -#zi = griddata(x,y,z,xi,yi)
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/pylab_examples/hatch_demo.html b/dev/examples/pylab_examples/hatch_demo.html deleted file mode 100644 index 3ace3d8b850..00000000000 --- a/dev/examples/pylab_examples/hatch_demo.html +++ /dev/null @@ -1,181 +0,0 @@ - - - - - - - - pylab_examples example code: hatch_demo.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      pylab_examples example code: hatch_demo.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/hatch_demo.png -
      -
      """
      -Hatching (pattern filled polygons) is supported currently in the PS,
      -PDF, SVG and Agg backends only.
      -"""
      -import matplotlib.pyplot as plt
      -from matplotlib.patches import Ellipse, Polygon
      -
      -fig = plt.figure()
      -ax1 = fig.add_subplot(131)
      -ax1.bar(range(1,5), range(1,5), color='red', edgecolor='black', hatch="/")
      -ax1.bar(range(1,5), [6] * 4, bottom=range(1,5), color='blue', edgecolor='black', hatch='//')
      -ax1.set_xticks([1.5,2.5,3.5,4.5])
      -
      -ax2 = fig.add_subplot(132)
      -bars = ax2.bar(range(1,5), range(1,5), color='yellow', ecolor='black') + \
      -    ax2.bar(range(1, 5), [6] * 4, bottom=range(1,5), color='green', ecolor='black')
      -ax2.set_xticks([1.5,2.5,3.5,4.5])
      -
      -patterns = ('-', '+', 'x', '\\', '*', 'o', 'O', '.')
      -for bar, pattern in zip(bars, patterns):
      -     bar.set_hatch(pattern)
      -
      -ax3 = fig.add_subplot(133)
      -ax3.fill([1,3,3,1],[1,1,2,2], fill=False, hatch='\\')
      -ax3.add_patch(Ellipse((4,1.5), 4, 0.5, fill=False, hatch='*'))
      -ax3.add_patch(Polygon([[0,0],[4,1.1],[6,2.5],[2,1.4]], closed=True,
      -                      fill=False, hatch='/'))
      -ax3.set_xlim((0,6))
      -ax3.set_ylim((0,2.5))
      -
      -plt.show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/pylab_examples/hexbin_demo.html b/dev/examples/pylab_examples/hexbin_demo.html deleted file mode 100644 index 8aa5df17de6..00000000000 --- a/dev/examples/pylab_examples/hexbin_demo.html +++ /dev/null @@ -1,185 +0,0 @@ - - - - - - - - pylab_examples example code: hexbin_demo.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      pylab_examples example code: hexbin_demo.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/hexbin_demo1.png -
      -
      """
      -hexbin is an axes method or pyplot function that is essentially
      -a pcolor of a 2-D histogram with hexagonal cells.  It can be
      -much more informative than a scatter plot; in the first subplot
      -below, try substituting 'scatter' for 'hexbin'.
      -"""
      -
      -import numpy as np
      -import matplotlib.pyplot as plt
      -
      -np.random.seed(0)
      -n = 100000
      -x = np.random.standard_normal(n)
      -y = 2.0 + 3.0 * x + 4.0 * np.random.standard_normal(n)
      -xmin = x.min()
      -xmax = x.max()
      -ymin = y.min()
      -ymax = y.max()
      -
      -plt.subplots_adjust(hspace=0.5)
      -plt.subplot(121)
      -plt.hexbin(x,y, cmap=plt.cm.YlOrRd_r)
      -plt.axis([xmin, xmax, ymin, ymax])
      -plt.title("Hexagon binning")
      -cb = plt.colorbar()
      -cb.set_label('counts')
      -
      -plt.subplot(122)
      -plt.hexbin(x,y,bins='log', cmap=plt.cm.YlOrRd_r)
      -plt.axis([xmin, xmax, ymin, ymax])
      -plt.title("With a log color scale")
      -cb = plt.colorbar()
      -cb.set_label('log10(N)')
      -
      -plt.show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/pylab_examples/hexbin_demo2.html b/dev/examples/pylab_examples/hexbin_demo2.html deleted file mode 100644 index 9b50f63d02e..00000000000 --- a/dev/examples/pylab_examples/hexbin_demo2.html +++ /dev/null @@ -1,205 +0,0 @@ - - - - - - - - pylab_examples example code: hexbin_demo2.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      pylab_examples example code: hexbin_demo2.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/hexbin_demo2.png -
      -
      """
      -hexbin is an axes method or pyplot function that is essentially a
      -pcolor of a 2-D histogram with hexagonal cells.
      -"""
      -
      -import numpy as np
      -import  matplotlib.pyplot as plt
      -import matplotlib.mlab as mlab
      -
      -delta = 0.025
      -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
      -
      -x = X.ravel()
      -y = Y.ravel()
      -z = Z.ravel()
      -
      -if 1:
      -    # make some points 20 times more common than others, but same mean
      -    xcond = (-1 < x) & (x < 1)
      -    ycond = (-2 < y) & (y < 0)
      -    cond = xcond & ycond
      -    xnew = x[cond]
      -    ynew = y[cond]
      -    znew = z[cond]
      -    for i in range(20):
      -        x = np.hstack((x,xnew))
      -        y = np.hstack((y,ynew))
      -        z = np.hstack((z,znew))
      -
      -xmin = x.min()
      -xmax = x.max()
      -ymin = y.min()
      -ymax = y.max()
      -
      -gridsize=30
      -
      -plt.subplot(211)
      -plt.hexbin(x,y, C=z, gridsize=gridsize, marginals=True, cmap=plt.cm.RdBu,
      -           vmax=abs(z).max(), vmin=-abs(z).max())
      -plt.axis([xmin, xmax, ymin, ymax])
      -cb = plt.colorbar()
      -cb.set_label('mean value')
      -
      -
      -plt.subplot(212)
      -plt.hexbin(x,y, gridsize=gridsize, cmap=plt.cm.Blues_r)
      -plt.axis([xmin, xmax, ymin, ymax])
      -cb = plt.colorbar()
      -cb.set_label('N observations')
      -
      -plt.show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/pylab_examples/hist2d_demo.html b/dev/examples/pylab_examples/hist2d_demo.html deleted file mode 100644 index cca508ef071..00000000000 --- a/dev/examples/pylab_examples/hist2d_demo.html +++ /dev/null @@ -1,157 +0,0 @@ - - - - - - - - pylab_examples example code: hist2d_demo.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      pylab_examples example code: hist2d_demo.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/hist2d_demo1.png -
      -
      from pylab import *
      -x = randn(1000)
      -y = randn(1000)+5
      -
      -#normal distribution center at x=0 and y=5
      -hist2d(x,y,bins=40)
      -show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/pylab_examples/hist2d_log_demo.html b/dev/examples/pylab_examples/hist2d_log_demo.html deleted file mode 100644 index 72ed8e9916f..00000000000 --- a/dev/examples/pylab_examples/hist2d_log_demo.html +++ /dev/null @@ -1,160 +0,0 @@ - - - - - - - - pylab_examples example code: hist2d_log_demo.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      pylab_examples example code: hist2d_log_demo.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/hist2d_log_demo.png -
      -
      from matplotlib.colors import LogNorm
      -from pylab import *
      -
      -#normal distribution center at x=0 and y=5
      -x = randn(100000)
      -y = randn(100000)+5
      -
      -hist2d(x, y, bins=40, norm=LogNorm())
      -colorbar()
      -show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/pylab_examples/hist_colormapped.html b/dev/examples/pylab_examples/hist_colormapped.html deleted file mode 100644 index 07d66f4ba71..00000000000 --- a/dev/examples/pylab_examples/hist_colormapped.html +++ /dev/null @@ -1,174 +0,0 @@ - - - - - - - - pylab_examples example code: hist_colormapped.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      pylab_examples example code: hist_colormapped.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/hist_colormapped.png -
      -
      import numpy as n
      -from pylab import figure, show
      -import matplotlib.cm as cm
      -import matplotlib.colors as colors
      -
      -fig = figure()
      -ax = fig.add_subplot(111)
      -Ntotal = 1000
      -N, bins, patches = ax.hist(n.random.rand(Ntotal), 20)
      -
      -#I'll color code by height, but you could use any scalar
      -
      -
      -# we need to normalize the data to 0..1 for the full
      -# range of the colormap
      -fracs = N.astype(float)/N.max()
      -norm = colors.normalize(fracs.min(), fracs.max())
      -
      -for thisfrac, thispatch in zip(fracs, patches):
      -    color = cm.jet(norm(thisfrac))
      -    thispatch.set_facecolor(color)
      -
      -
      -show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/pylab_examples/histogram_demo.html b/dev/examples/pylab_examples/histogram_demo.html deleted file mode 100644 index 9d02fc4ca48..00000000000 --- a/dev/examples/pylab_examples/histogram_demo.html +++ /dev/null @@ -1,178 +0,0 @@ - - - - - - - - - - pylab_examples example code: histogram_demo.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      pylab_examples example code: histogram_demo.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/histogram_demo2.png -
      -
      #!/usr/bin/env python
      -import numpy as np
      -import matplotlib.mlab as mlab
      -import matplotlib.pyplot as plt
      -
      -mu, sigma = 100, 15
      -x = mu + sigma*np.random.randn(10000)
      -
      -# the histogram of the data
      -n, bins, patches = plt.hist(x, 50, normed=1, facecolor='green', alpha=0.75)
      -
      -# add a 'best fit' line
      -y = mlab.normpdf( bins, mu, sigma)
      -l = plt.plot(bins, y, 'r--', linewidth=1)
      -
      -plt.xlabel('Smarts')
      -plt.ylabel('Probability')
      -plt.title(r'$\mathrm{Histogram\ of\ IQ:}\ \mu=100,\ \sigma=15$')
      -plt.axis([40, 160, 0, 0.03])
      -plt.grid(True)
      -
      -plt.show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/pylab_examples/histogram_demo_extended.html b/dev/examples/pylab_examples/histogram_demo_extended.html deleted file mode 100644 index f3bcc665ca2..00000000000 --- a/dev/examples/pylab_examples/histogram_demo_extended.html +++ /dev/null @@ -1,297 +0,0 @@ - - - - - - - - pylab_examples example code: histogram_demo_extended.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      pylab_examples example code: histogram_demo_extended.py

      -

      (Source code)

      -
      -../../_images/histogram_demo_extended_00.png -

      (png, hires.png, pdf)

      -
      -
      -../../_images/histogram_demo_extended_01.png -

      (png, hires.png, pdf)

      -
      -
      -../../_images/histogram_demo_extended_02.png -

      (png, hires.png, pdf)

      -
      -
      -../../_images/histogram_demo_extended_03.png -

      (png, hires.png, pdf)

      -
      -
      -../../_images/histogram_demo_extended_04.png -

      (png, hires.png, pdf)

      -
      -
      -../../_images/histogram_demo_extended_05.png -

      (png, hires.png, pdf)

      -
      -
      -../../_images/histogram_demo_extended_06.png -

      (png, hires.png, pdf)

      -
      -
      #!/usr/bin/env python
      -import numpy as np
      -import pylab as P
      -
      -#
      -# The hist() function now has a lot more options
      -#
      -
      -#
      -# first create a single histogram
      -#
      -mu, sigma = 200, 25
      -x = mu + sigma*P.randn(10000)
      -
      -# the histogram of the data with histtype='step'
      -n, bins, patches = P.hist(x, 50, normed=1, histtype='stepfilled')
      -P.setp(patches, 'facecolor', 'g', 'alpha', 0.75)
      -
      -# add a line showing the expected distribution
      -y = P.normpdf( bins, mu, sigma)
      -l = P.plot(bins, y, 'k--', linewidth=1.5)
      -
      -
      -#
      -# create a histogram by providing the bin edges (unequally spaced)
      -#
      -P.figure()
      -
      -bins = [100,125,150,160,170,180,190,200,210,220,230,240,250,275,300]
      -# the histogram of the data with histtype='step'
      -n, bins, patches = P.hist(x, bins, normed=1, histtype='bar', rwidth=0.8)
      -
      -#
      -# now we create a cumulative histogram of the data
      -#
      -P.figure()
      -
      -n, bins, patches = P.hist(x, 50, normed=1, histtype='step', cumulative=True)
      -
      -# add a line showing the expected distribution
      -y = P.normpdf( bins, mu, sigma).cumsum()
      -y /= y[-1]
      -l = P.plot(bins, y, 'k--', linewidth=1.5)
      -
      -# create a second data-set with a smaller standard deviation
      -sigma2 = 15.
      -x = mu + sigma2*P.randn(10000)
      -
      -n, bins, patches = P.hist(x, bins=bins, normed=1, histtype='step', cumulative=True)
      -
      -# add a line showing the expected distribution
      -y = P.normpdf( bins, mu, sigma2).cumsum()
      -y /= y[-1]
      -l = P.plot(bins, y, 'r--', linewidth=1.5)
      -
      -# finally overplot a reverted cumulative histogram
      -n, bins, patches = P.hist(x, bins=bins, normed=1,
      -    histtype='step', cumulative=-1)
      -
      -
      -P.grid(True)
      -P.ylim(0, 1.05)
      -
      -
      -#
      -# histogram has the ability to plot multiple data in parallel ...
      -# Note the new color kwarg, used to override the default, which
      -# uses the line color cycle.
      -#
      -P.figure()
      -
      -# create a new data-set
      -x = mu + sigma*P.randn(1000,3)
      -
      -n, bins, patches = P.hist(x, 10, normed=1, histtype='bar',
      -                            color=['crimson', 'burlywood', 'chartreuse'],
      -                            label=['Crimson', 'Burlywood', 'Chartreuse'])
      -P.legend()
      -
      -#
      -# ... or we can stack the data
      -#
      -P.figure()
      -
      -n, bins, patches = P.hist(x, 10, normed=1, histtype='bar', stacked=True)
      -
      -P.show()
      -
      -#
      -# we can also stack using the step histtype
      -#
      -
      -P.figure()
      -
      -n, bins, patches = P.hist(x, 10, histtype='step', stacked=True, fill=True)
      -
      -P.show()
      -
      -#
      -# finally: make a multiple-histogram of data-sets with different length
      -#
      -x0 = mu + sigma*P.randn(10000)
      -x1 = mu + sigma*P.randn(7000)
      -x2 = mu + sigma*P.randn(3000)
      -
      -# and exercise the weights option by arbitrarily giving the first half
      -# of each series only half the weight of the others:
      -
      -w0 = np.ones_like(x0)
      -w0[:len(x0)/2] = 0.5
      -w1 = np.ones_like(x1)
      -w1[:len(x1)/2] = 0.5
      -w2 = np.ones_like(x2)
      -w2[:len(x2)/2] = 0.5
      -
      -
      -
      -P.figure()
      -
      -n, bins, patches = P.hist( [x0,x1,x2], 10, weights=[w0, w1, w2], histtype='bar')
      -
      -P.show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/pylab_examples/histogram_percent_demo.html b/dev/examples/pylab_examples/histogram_percent_demo.html deleted file mode 100644 index a7a19e7a96e..00000000000 --- a/dev/examples/pylab_examples/histogram_percent_demo.html +++ /dev/null @@ -1,179 +0,0 @@ - - - - - - - - pylab_examples example code: histogram_percent_demo.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      pylab_examples example code: histogram_percent_demo.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/histogram_percent_demo.png -
      -
      import matplotlib
      -from numpy.random import randn
      -import matplotlib.pyplot as plt
      -from matplotlib.ticker import FuncFormatter
      -
      -def to_percent(y, position):
      -    # Ignore the passed in position. This has the effect of scaling the default
      -    # tick locations.
      -    s = str(100 * y)
      -
      -    # The percent symbol needs escaping in latex
      -    if matplotlib.rcParams['text.usetex'] == True:
      -        return s + r'$\%$'
      -    else:
      -        return s + '%'
      -
      -x = randn(5000)
      -
      -# Make a normed histogram. It'll be multiplied by 100 later.
      -plt.hist(x, bins=50, normed=True)
      -
      -# Create the formatter using the function to_percent. This multiplies all the
      -# default labels by 100, making them all percentages
      -formatter = FuncFormatter(to_percent)
      -
      -# Set the formatter
      -plt.gca().yaxis.set_major_formatter(formatter)
      -
      -plt.show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/pylab_examples/hline_demo.html b/dev/examples/pylab_examples/hline_demo.html deleted file mode 100644 index d4335b86e66..00000000000 --- a/dev/examples/pylab_examples/hline_demo.html +++ /dev/null @@ -1,178 +0,0 @@ - - - - - - - - - - pylab_examples example code: hline_demo.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      pylab_examples example code: hline_demo.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/hline_demo1.png -
      -
      #!/usr/bin/env python
      -import numpy as np
      -import matplotlib.pyplot as plt
      -
      -def f(t):
      -    s1 = np.sin(2*np.pi*t)
      -    e1 = np.exp(-t)
      -    return np.absolute((s1*e1))+.05
      -
      -
      -t = np.arange(0.0, 5.0, 0.1)
      -s = f(t)
      -nse = np.random.normal(0.0, 0.3, t.shape) * s
      -
      -
      -plt.plot(s+nse, t, 'b^')
      -plt.hlines(t, [0], s, lw=2)
      -plt.xlabel('time (s)')
      -plt.title('Comparison of model with data')
      -
      -plt.xlim(xmin=0)
      -plt.show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/pylab_examples/hyperlinks.html b/dev/examples/pylab_examples/hyperlinks.html deleted file mode 100644 index 74f7f440463..00000000000 --- a/dev/examples/pylab_examples/hyperlinks.html +++ /dev/null @@ -1,179 +0,0 @@ - - - - - - - - pylab_examples example code: hyperlinks.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - - - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/pylab_examples/hyperlinks.py b/dev/examples/pylab_examples/hyperlinks.py deleted file mode 100644 index 87df4301fbc..00000000000 --- a/dev/examples/pylab_examples/hyperlinks.py +++ /dev/null @@ -1,33 +0,0 @@ -#!/usr/bin/env python -# -*- noplot -*- - -""" -This example demonstrates how to set a hyperlinks on various kinds of elements. - -This currently only works with the SVG backend. -""" - -import numpy as np -import matplotlib.cm as cm -import matplotlib.mlab as mlab -import matplotlib.pyplot as plt - -f = plt.figure() -s = plt.scatter([1,2,3],[4,5,6]) -s.set_urls(['http://www.bbc.co.uk/news','http://www.google.com',None]) -f.canvas.print_figure('scatter.svg') - -f = plt.figure() -delta = 0.025 -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 - -im = plt.imshow(Z, interpolation='bilinear', cmap=cm.gray, - origin='lower', extent=[-3,3,-3,3]) - -im.set_url('http://www.google.com') -f.canvas.print_figure('image.svg') - diff --git a/dev/examples/pylab_examples/image_clip_path.html b/dev/examples/pylab_examples/image_clip_path.html deleted file mode 100644 index 915512a7f2f..00000000000 --- a/dev/examples/pylab_examples/image_clip_path.html +++ /dev/null @@ -1,175 +0,0 @@ - - - - - - - - pylab_examples example code: image_clip_path.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      pylab_examples example code: image_clip_path.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/image_clip_path.png -
      -
      #!/usr/bin/env python
      -import numpy as np
      -import matplotlib.cm as cm
      -import matplotlib.mlab as mlab
      -import matplotlib.pyplot as plt
      -from matplotlib.path import Path
      -from matplotlib.patches import PathPatch
      -
      -delta = 0.025
      -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
      -
      -path = Path([[0, 1], [1, 0], [0, -1], [-1, 0], [0, 1]])
      -patch = PathPatch(path, facecolor='none')
      -plt.gca().add_patch(patch)
      -
      -im = plt.imshow(Z, interpolation='bilinear', cmap=cm.gray,
      -                origin='lower', extent=[-3,3,-3,3],
      -                clip_path=patch, clip_on=True)
      -im.set_clip_path(patch)
      -
      -plt.show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/pylab_examples/image_demo.html b/dev/examples/pylab_examples/image_demo.html deleted file mode 100644 index 12a7d9f469f..00000000000 --- a/dev/examples/pylab_examples/image_demo.html +++ /dev/null @@ -1,168 +0,0 @@ - - - - - - - - pylab_examples example code: image_demo.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      pylab_examples example code: image_demo.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/image_demo2.png -
      -
      #!/usr/bin/env python
      -import numpy as np
      -import matplotlib.cm as cm
      -import matplotlib.mlab as mlab
      -import matplotlib.pyplot as plt
      -
      -delta = 0.025
      -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
      -
      -im = plt.imshow(Z, interpolation='bilinear', cmap=cm.RdYlGn,
      -                origin='lower', extent=[-3,3,-3,3],
      -                vmax=abs(Z).max(), vmin=-abs(Z).max())
      -
      -plt.show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/pylab_examples/image_demo2.html b/dev/examples/pylab_examples/image_demo2.html deleted file mode 100644 index 3c10db8302a..00000000000 --- a/dev/examples/pylab_examples/image_demo2.html +++ /dev/null @@ -1,186 +0,0 @@ - - - - - - - - pylab_examples example code: image_demo2.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      pylab_examples example code: image_demo2.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/image_demo21.png -
      -
      #!/usr/bin/env python
      -
      -from __future__ import print_function
      -from pylab import *
      -import matplotlib.cbook as cbook
      -
      -w, h = 512, 512
      -
      -datafile = cbook.get_sample_data('ct.raw.gz', asfileobj=True)
      -s = datafile.read()
      -A = fromstring(s, uint16).astype(float)
      -A *= 1.0/max(A)
      -A.shape = w, h
      -
      -extent = (0, 25, 0, 25)
      -im = imshow(A, cmap=cm.hot, origin='upper', extent=extent)
      -
      -markers = [(15.9, 14.5), (16.8, 15)]
      -x,y = zip(*markers)
      -plot(x, y, 'o')
      -#axis([0,25,0,25])
      -
      -
      -
      -#axis('off')
      -title('CT density')
      -
      -if 0:
      -    x = asum(A,0)
      -    subplot(212)
      -    bar(arange(w), x)
      -    xlim(0,h-1)
      -    ylabel('density')
      -    setp(gca(), 'xticklabels', [])
      -
      -show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/pylab_examples/image_demo3.html b/dev/examples/pylab_examples/image_demo3.html deleted file mode 100644 index ea3dcd37d2f..00000000000 --- a/dev/examples/pylab_examples/image_demo3.html +++ /dev/null @@ -1,176 +0,0 @@ - - - - - - - - - - pylab_examples example code: image_demo3.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      pylab_examples example code: image_demo3.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/image_demo3.png -
      -
      #!/usr/bin/env python
      -from pylab import *
      -try:
      -    from PIL import Image
      -except ImportError:
      -    raise SystemExit("PIL must be installed to run this example")
      -
      -import matplotlib.cbook as cbook
      -
      -datafile = cbook.get_sample_data('lena.jpg')
      -lena = Image.open(datafile)
      -dpi = rcParams['figure.dpi']
      -figsize = lena.size[0]/dpi, lena.size[1]/dpi
      -
      -figure(figsize=figsize)
      -ax = axes([0,0,1,1], frameon=False)
      -ax.set_axis_off()
      -im = imshow(lena)
      -
      -show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/pylab_examples/image_interp.html b/dev/examples/pylab_examples/image_interp.html deleted file mode 100644 index 4a98114f345..00000000000 --- a/dev/examples/pylab_examples/image_interp.html +++ /dev/null @@ -1,222 +0,0 @@ - - - - - - - - pylab_examples example code: image_interp.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      pylab_examples example code: image_interp.py

      -

      (Source code)

      -
      -../../_images/image_interp_00.png -

      (png, hires.png, pdf)

      -
      -
      -../../_images/image_interp_01.png -

      (png, hires.png, pdf)

      -
      -
      -../../_images/image_interp_02.png -

      (png, hires.png, pdf)

      -
      -
      #!/usr/bin/env python
      -"""
      -The same (small) array, interpolated with three different
      -interpolation methods.
      -
      -The center of the pixel at A[i,j] is plotted at i+0.5, i+0.5.  If you
      -are using interpolation='nearest', the region bounded by (i,j) and
      -(i+1,j+1) will have the same color.  If you are using interpolation,
      -the pixel center will have the same color as it does with nearest, but
      -other pixels will be interpolated between the neighboring pixels.
      -
      -Earlier versions of matplotlib (<0.63) tried to hide the edge effects
      -from you by setting the view limits so that they would not be visible.
      -A recent bugfix in antigrain, and a new implementation in the
      -matplotlib._image module which takes advantage of this fix, no longer
      -makes this necessary.  To prevent edge effects, when doing
      -interpolation, the matplotlib._image module now pads the input array
      -with identical pixels around the edge.  e.g., if you have a 5x5 array
      -with colors a-y as below
      -
      -
      -  a b c d e
      -  f g h i j
      -  k l m n o
      -  p q r s t
      -  u v w x y
      -
      -the _image module creates the padded array,
      -
      -  a a b c d e e
      -  a a b c d e e
      -  f f g h i j j
      -  k k l m n o o
      -  p p q r s t t
      -  o u v w x y y
      -  o u v w x y y
      -
      -does the interpolation/resizing, and then extracts the central region.
      -This allows you to plot the full range of your array w/o edge effects,
      -and for example to layer multiple images of different sizes over one
      -another with different interpolation methods - see
      -examples/layer_images.py.  It also implies a performance hit, as this
      -new temporary, padded array must be created.  Sophisticated
      -interpolation also implies a performance hit, so if you need maximal
      -performance or have very large images, interpolation='nearest' is
      -suggested.
      -
      -"""
      -from pylab import *
      -A = rand(5,5)
      -figure(1)
      -imshow(A, interpolation='nearest')
      -grid(True)
      -
      -figure(2)
      -imshow(A, interpolation='bilinear')
      -grid(True)
      -
      -figure(3)
      -imshow(A, interpolation='bicubic')
      -grid(True)
      -
      -show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/pylab_examples/image_masked.html b/dev/examples/pylab_examples/image_masked.html deleted file mode 100644 index 4e1707a8125..00000000000 --- a/dev/examples/pylab_examples/image_masked.html +++ /dev/null @@ -1,204 +0,0 @@ - - - - - - - - pylab_examples example code: image_masked.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      pylab_examples example code: image_masked.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/image_masked.png -
      -
      #!/usr/bin/env python
      -'''imshow with masked array input and out-of-range colors.
      -
      -    The second subplot illustrates the use of BoundaryNorm to
      -    get a filled contour effect.
      -'''
      -
      -from pylab import *
      -from numpy import ma
      -import matplotlib.colors as colors
      -
      -delta = 0.025
      -x = y = arange(-3.0, 3.0, delta)
      -X, Y = meshgrid(x, y)
      -Z1 = bivariate_normal(X, Y, 1.0, 1.0, 0.0, 0.0)
      -Z2 = bivariate_normal(X, Y, 1.5, 0.5, 1, 1)
      -Z = 10 * (Z2-Z1)  # difference of Gaussians
      -
      -# Set up a colormap:
      -palette = cm.gray
      -palette.set_over('r', 1.0)
      -palette.set_under('g', 1.0)
      -palette.set_bad('b', 1.0)
      -# Alternatively, we could use
      -# palette.set_bad(alpha = 0.0)
      -# to make the bad region transparent.  This is the default.
      -# If you comment out all the palette.set* lines, you will see
      -# all the defaults; under and over will be colored with the
      -# first and last colors in the palette, respectively.
      -Zm = ma.masked_where(Z > 1.2, Z)
      -
      -# By setting vmin and vmax in the norm, we establish the
      -# range to which the regular palette color scale is applied.
      -# Anything above that range is colored based on palette.set_over, etc.
      -
      -subplot(1,2,1)
      -im = imshow(Zm, interpolation='bilinear',
      -    cmap=palette,
      -    norm = colors.Normalize(vmin = -1.0, vmax = 1.0, clip = False),
      -    origin='lower', extent=[-3,3,-3,3])
      -title('Green=low, Red=high, Blue=bad')
      -colorbar(im, extend='both', orientation='horizontal', shrink=0.8)
      -
      -subplot(1,2,2)
      -im = imshow(Zm, interpolation='nearest',
      -    cmap=palette,
      -    norm = colors.BoundaryNorm([-1, -0.5, -0.2, 0, 0.2, 0.5, 1],
      -                        ncolors=256, clip = False),
      -    origin='lower', extent=[-3,3,-3,3])
      -title('With BoundaryNorm')
      -colorbar(im, extend='both', spacing='proportional',
      -                orientation='horizontal', shrink=0.8)
      -
      -show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/pylab_examples/image_nonuniform.html b/dev/examples/pylab_examples/image_nonuniform.html deleted file mode 100644 index b72496e3c40..00000000000 --- a/dev/examples/pylab_examples/image_nonuniform.html +++ /dev/null @@ -1,210 +0,0 @@ - - - - - - - - pylab_examples example code: image_nonuniform.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      pylab_examples example code: image_nonuniform.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/image_nonuniform.png -
      -
      '''
      -This illustrates the NonUniformImage class, which still needs
      -an axes method interface; either a separate interface, or a
      -generalization of imshow.
      -'''
      -
      -from matplotlib.pyplot import figure, show
      -import numpy as np
      -from matplotlib.image import NonUniformImage
      -from matplotlib import cm
      -
      -interp='nearest'
      -
      -x = np.linspace(-4, 4, 9)
      -x2 = x**3
      -y = np.linspace(-4, 4, 9)
      -#print 'Size %d points' % (len(x) * len(y))
      -z = np.sqrt(x[np.newaxis,:]**2 + y[:,np.newaxis]**2)
      -
      -fig = figure()
      -fig.suptitle('NonUniformImage class')
      -ax = fig.add_subplot(221)
      -im = NonUniformImage(ax, interpolation=interp, extent=(-4,4,-4,4),
      -                     cmap=cm.Purples)
      -im.set_data(x, y, z)
      -ax.images.append(im)
      -ax.set_xlim(-4,4)
      -ax.set_ylim(-4,4)
      -ax.set_title(interp)
      -
      -ax = fig.add_subplot(222)
      -im = NonUniformImage(ax, interpolation=interp, extent=(-64,64,-4,4),
      -                     cmap=cm.Purples)
      -im.set_data(x2, y, z)
      -ax.images.append(im)
      -ax.set_xlim(-64,64)
      -ax.set_ylim(-4,4)
      -ax.set_title(interp)
      -
      -interp = 'bilinear'
      -
      -ax = fig.add_subplot(223)
      -im = NonUniformImage(ax, interpolation=interp, extent=(-4,4,-4,4),
      -                     cmap=cm.Purples)
      -im.set_data(x, y, z)
      -ax.images.append(im)
      -ax.set_xlim(-4,4)
      -ax.set_ylim(-4,4)
      -ax.set_title(interp)
      -
      -ax = fig.add_subplot(224)
      -im = NonUniformImage(ax, interpolation=interp, extent=(-64,64,-4,4),
      -                     cmap=cm.Purples)
      -im.set_data(x2, y, z)
      -ax.images.append(im)
      -ax.set_xlim(-64,64)
      -ax.set_ylim(-4,4)
      -ax.set_title(interp)
      -
      -show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/pylab_examples/image_origin.html b/dev/examples/pylab_examples/image_origin.html deleted file mode 100644 index 8ed64fba04b..00000000000 --- a/dev/examples/pylab_examples/image_origin.html +++ /dev/null @@ -1,174 +0,0 @@ - - - - - - - - pylab_examples example code: image_origin.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      pylab_examples example code: image_origin.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/image_origin.png -
      -
      #!/usr/bin/env python
      -"""
      -You can specify whether images should be plotted with the array origin
      -x[0,0] in the upper left or upper right by using the origin parameter.
      -You can also control the default be setting image.origin in your
      -matplotlibrc file; see http://matplotlib.org/matplotlibrc
      -"""
      -from pylab import *
      -
      -x = arange(100.0); x.shape = 10,10
      -
      -interp = 'bilinear';
      -#interp = 'nearest';
      -lim = -2,11,-2,6
      -subplot(211, axisbg='g')
      -title('blue should be up')
      -imshow(x, origin='upper', interpolation=interp)
      -#axis(lim)
      -
      -subplot(212, axisbg='y')
      -title('blue should be down')
      -imshow(x, origin='lower', interpolation=interp)
      -#axis(lim)
      -show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/pylab_examples/image_slices_viewer.html b/dev/examples/pylab_examples/image_slices_viewer.html deleted file mode 100644 index 8e62d174617..00000000000 --- a/dev/examples/pylab_examples/image_slices_viewer.html +++ /dev/null @@ -1,196 +0,0 @@ - - - - - - - - pylab_examples example code: image_slices_viewer.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      pylab_examples example code: image_slices_viewer.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/image_slices_viewer.png -
      -
      from __future__ import print_function
      -import numpy
      -from matplotlib.pyplot import figure, show
      -
      -
      -
      -
      -class IndexTracker:
      -    def __init__(self, ax, X):
      -        self.ax = ax
      -        ax.set_title('use scroll wheel to navigate images')
      -
      -        self.X = X
      -        rows,cols,self.slices = X.shape
      -        self.ind  = self.slices/2
      -
      -        self.im = ax.imshow(self.X[:,:,self.ind])
      -        self.update()
      -
      -    def onscroll(self, event):
      -        print ("%s %s" % (event.button, event.step))
      -        if event.button=='up':
      -            self.ind = numpy.clip(self.ind+1, 0, self.slices-1)
      -        else:
      -            self.ind = numpy.clip(self.ind-1, 0, self.slices-1)
      -
      -
      -        self.update()
      -
      -    def update(self):
      -        self.im.set_data(self.X[:,:,self.ind])
      -        ax.set_ylabel('slice %s'%self.ind)
      -        self.im.axes.figure.canvas.draw()
      -
      -
      -fig = figure()
      -ax = fig.add_subplot(111)
      -
      -X = numpy.random.rand(20,20,40)
      -
      -tracker = IndexTracker(ax, X)
      -
      -
      -
      -fig.canvas.mpl_connect('scroll_event', tracker.onscroll)
      -show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/pylab_examples/index.html b/dev/examples/pylab_examples/index.html deleted file mode 100644 index c90e7c4b5ca..00000000000 --- a/dev/examples/pylab_examples/index.html +++ /dev/null @@ -1,381 +0,0 @@ - - - - - - - - pylab_examples Examples — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      pylab_examples Examples

      - --- - - - - - -
      Release:1.3.x
      Date:May 21, 2013
      -
      - -
      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/pylab_examples/integral_demo.html b/dev/examples/pylab_examples/integral_demo.html deleted file mode 100644 index 644919b2823..00000000000 --- a/dev/examples/pylab_examples/integral_demo.html +++ /dev/null @@ -1,190 +0,0 @@ - - - - - - - - - - pylab_examples example code: integral_demo.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      pylab_examples example code: integral_demo.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/integral_demo.png -
      -
      #!/usr/bin/env python
      -
      -# implement the example graphs/integral from pyx
      -from pylab import *
      -from matplotlib.patches import Polygon
      -
      -def func(x):
      -    return (x-3)*(x-5)*(x-7)+85
      -
      -ax = subplot(111)
      -
      -a, b = 2, 9 # integral area
      -x = arange(0, 10, 0.01)
      -y = func(x)
      -plot(x, y, linewidth=1)
      -
      -# make the shaded region
      -ix = arange(a, b, 0.01)
      -iy = func(ix)
      -verts = [(a,0)] + list(zip(ix,iy)) + [(b,0)]
      -poly = Polygon(verts, facecolor='0.8', edgecolor='k')
      -ax.add_patch(poly)
      -
      -text(0.5 * (a + b), 30,
      -     r"$\int_a^b f(x)\mathrm{d}x$", horizontalalignment='center',
      -     fontsize=20)
      -
      -axis([0,10, 0, 180])
      -figtext(0.9, 0.05, 'x')
      -figtext(0.1, 0.9, 'y')
      -ax.set_xticks((a,b))
      -ax.set_xticklabels(('a','b'))
      -ax.set_yticks([])
      -show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/pylab_examples/interp_demo.html b/dev/examples/pylab_examples/interp_demo.html deleted file mode 100644 index 760c064077a..00000000000 --- a/dev/examples/pylab_examples/interp_demo.html +++ /dev/null @@ -1,163 +0,0 @@ - - - - - - - - pylab_examples example code: interp_demo.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      pylab_examples example code: interp_demo.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/interp_demo.png -
      -
      from matplotlib.pyplot import figure, show
      -from numpy import pi, sin, linspace
      -from matplotlib.mlab import stineman_interp
      -
      -x = linspace(0,2*pi,20);
      -y = sin(x); yp = None
      -xi = linspace(x[0],x[-1],100);
      -yi = stineman_interp(xi,x,y,yp);
      -
      -fig = figure()
      -ax = fig.add_subplot(111)
      -ax.plot(x,y,'ro',xi,yi,'-b.')
      -show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/pylab_examples/invert_axes.html b/dev/examples/pylab_examples/invert_axes.html deleted file mode 100644 index eeace82d5b5..00000000000 --- a/dev/examples/pylab_examples/invert_axes.html +++ /dev/null @@ -1,171 +0,0 @@ - - - - - - - - pylab_examples example code: invert_axes.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      pylab_examples example code: invert_axes.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/invert_axes.png -
      -
      #!/usr/bin/env python
      -"""
      -
      -You can use decreasing axes by flipping the normal order of the axis
      -limits
      -
      -"""
      -from pylab import *
      -
      -t = arange(0.01, 5.0, 0.01)
      -s = exp(-t)
      -plot(t, s)
      -
      -xlim(5,0)  # decreasing time
      -
      -xlabel('decreasing time (s)')
      -ylabel('voltage (mV)')
      -title('Should be growing...')
      -grid(True)
      -
      -show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/pylab_examples/layer_images.html b/dev/examples/pylab_examples/layer_images.html deleted file mode 100644 index 525ad6a3c91..00000000000 --- a/dev/examples/pylab_examples/layer_images.html +++ /dev/null @@ -1,191 +0,0 @@ - - - - - - - - pylab_examples example code: layer_images.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      pylab_examples example code: layer_images.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/layer_images.png -
      -
      #!/usr/bin/env python
      -"""
      -Layer images above one another using alpha blending
      -"""
      -from __future__ import division
      -from pylab import *
      -
      -def func3(x,y):
      -    return (1- x/2 + x**5 + y**3)*exp(-x**2-y**2)
      -
      -# make these smaller to increase the resolution
      -dx, dy = 0.05, 0.05
      -
      -x = arange(-3.0, 3.0, dx)
      -y = arange(-3.0, 3.0, dy)
      -X,Y = meshgrid(x, y)
      -
      -# when layering multiple images, the images need to have the same
      -# extent.  This does not mean they need to have the same shape, but
      -# they both need to render to the same coordinate system determined by
      -# xmin, xmax, ymin, ymax.  Note if you use different interpolations
      -# for the images their apparent extent could be different due to
      -# interpolation edge effects
      -
      -
      -xmin, xmax, ymin, ymax = amin(x), amax(x), amin(y), amax(y)
      -extent = xmin, xmax, ymin, ymax
      -fig = plt.figure(frameon=False)
      -
      -Z1 = array(([0,1]*4 + [1,0]*4)*4); Z1.shape = 8,8  # chessboard
      -im1 = imshow(Z1, cmap=cm.gray, interpolation='nearest',
      -             extent=extent)
      -hold(True)
      -
      -Z2 = func3(X, Y)
      -
      -im2 = imshow(Z2, cmap=cm.jet, alpha=.9, interpolation='bilinear',
      -             extent=extent)
      -#axis([xmin, xmax, ymin, ymax])
      -
      -show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/pylab_examples/legend_auto.html b/dev/examples/pylab_examples/legend_auto.html deleted file mode 100644 index fdcde4f9fd5..00000000000 --- a/dev/examples/pylab_examples/legend_auto.html +++ /dev/null @@ -1,283 +0,0 @@ - - - - - - - - pylab_examples example code: legend_auto.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      pylab_examples example code: legend_auto.py

      -

      (Source code)

      -
      -../../_images/legend_auto_00.png -

      (png, hires.png, pdf)

      -
      -
      -../../_images/legend_auto_01.png -

      (png, hires.png, pdf)

      -
      -
      -../../_images/legend_auto_02.png -

      (png, hires.png, pdf)

      -
      -
      -../../_images/legend_auto_03.png -

      (png, hires.png, pdf)

      -
      -
      -../../_images/legend_auto_04.png -

      (png, hires.png, pdf)

      -
      -
      -../../_images/legend_auto_05.png -

      (png, hires.png, pdf)

      -
      -
      -../../_images/legend_auto_06.png -

      (png, hires.png, pdf)

      -
      -
      -../../_images/legend_auto_07.png -

      (png, hires.png, pdf)

      -
      -
      -../../_images/legend_auto_08.png -

      (png, hires.png, pdf)

      -
      -
      -../../_images/legend_auto_09.png -

      (png, hires.png, pdf)

      -
      -
      """
      -This file was written to test matplotlib's autolegend placement
      -algorithm, but shows lots of different ways to create legends so is
      -useful as a general examples
      -
      -Thanks to John Gill and Phil ?? for help at the matplotlib sprint at
      -pycon 2005 where the auto-legend support was written.
      -"""
      -from pylab import *
      -import sys
      -
      -rcParams['legend.loc'] = 'best'
      -
      -N = 100
      -x = arange(N)
      -
      -def fig_1():
      -    figure(1)
      -    t = arange(0, 40.0 * pi, 0.1)
      -    l, = plot(t, 100*sin(t), 'r', label='sine')
      -    legend(framealpha=0.5)
      -
      -def fig_2():
      -    figure(2)
      -    plot(x, 'o', label='x=y')
      -    legend()
      -
      -def fig_3():
      -    figure(3)
      -    plot(x, -x, 'o', label='x= -y')
      -    legend()
      -
      -def fig_4():
      -    figure(4)
      -    plot(x, ones(len(x)), 'o', label='y=1')
      -    plot(x, -ones(len(x)), 'o', label='y=-1')
      -    legend()
      -
      -def fig_5():
      -    figure(5)
      -    n, bins, patches = hist(randn(1000), 40, normed=1)
      -    l, = plot(bins, normpdf(bins, 0.0, 1.0), 'r--', label='fit', linewidth=3)
      -    legend([l, patches[0]], ['fit', 'hist'])
      -
      -def fig_6():
      -    figure(6)
      -    plot(x, 50-x, 'o', label='y=1')
      -    plot(x, x-50, 'o', label='y=-1')
      -    legend()
      -
      -def fig_7():
      -    figure(7)
      -    xx = x - (N/2.0)
      -    plot(xx, (xx*xx)-1225, 'bo', label='$y=x^2$')
      -    plot(xx, 25*xx, 'go', label='$y=25x$')
      -    plot(xx, -25*xx, 'mo', label='$y=-25x$')
      -    legend()
      -
      -def fig_8():
      -    figure(8)
      -    b1 = bar(x, x, color='m')
      -    b2 = bar(x, x[::-1], color='g')
      -    legend([b1[0], b2[0]], ['up', 'down'])
      -
      -def fig_9():
      -    figure(9)
      -    b1 = bar(x, -x)
      -    b2 = bar(x, -x[::-1], color='r')
      -    legend([b1[0], b2[0]], ['down', 'up'])
      -
      -def fig_10():
      -    figure(10)
      -    b1 = bar(x, x, bottom=-100, color='m')
      -    b2 = bar(x, x[::-1], bottom=-100, color='g')
      -    b3 = bar(x, -x, bottom=100)
      -    b4 = bar(x, -x[::-1], bottom=100, color='r')
      -    legend([b1[0], b2[0], b3[0], b4[0]], ['bottom right', 'bottom left',
      -                                          'top left', 'top right'])
      -
      -if __name__ == '__main__':
      -    nfigs = 10
      -    figures = []
      -    for f in sys.argv[1:]:
      -        try:
      -            figures.append(int(f))
      -        except ValueError:
      -            pass
      -    if len(figures) == 0:
      -        figures = range(1, nfigs+1)
      -
      -    for fig in figures:
      -        fn_name = "fig_%d" % fig
      -        fn = globals()[fn_name]
      -        fn()
      -
      -    show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/pylab_examples/legend_demo.html b/dev/examples/pylab_examples/legend_demo.html deleted file mode 100644 index a0fadd8e895..00000000000 --- a/dev/examples/pylab_examples/legend_demo.html +++ /dev/null @@ -1,192 +0,0 @@ - - - - - - - - pylab_examples example code: legend_demo.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      pylab_examples example code: legend_demo.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/legend_demo2.png -
      -
      """
      -Demo of the legend function with a few features.
      -
      -In addition to the basic legend, this demo shows a few optional features:
      -
      -    * Custom legend placement.
      -    * A keyword argument to a drop-shadow.
      -    * Setting the background color.
      -    * Setting the font size.
      -    * Setting the line width.
      -"""
      -import numpy as np
      -import matplotlib.pyplot as plt
      -
      -
      -# Example data
      -a = np.arange(0,3, .02)
      -b = np.arange(0,3, .02)
      -c = np.exp(a)
      -d = c[::-1]
      -
      -# Create plots with pre-defined labels.
      -# Alternatively, you can pass labels explicitly when calling `legend`.
      -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')
      -
      -# Now add the legend with some customizations.
      -legend = ax.legend(loc='upper center', shadow=True)
      -
      -# The frame is matplotlib.patches.Rectangle instance surrounding the legend.
      -frame  = legend.get_frame()
      -frame.set_facecolor('0.90')
      -
      -# Set the fontsize
      -for label in legend.get_texts():
      -    label.set_fontsize('large')
      -
      -for label in legend.get_lines():
      -    label.set_linewidth(1.5)  # the legend line width
      -plt.show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/pylab_examples/legend_demo2.html b/dev/examples/pylab_examples/legend_demo2.html deleted file mode 100644 index 57760771753..00000000000 --- a/dev/examples/pylab_examples/legend_demo2.html +++ /dev/null @@ -1,170 +0,0 @@ - - - - - - - - pylab_examples example code: legend_demo2.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      pylab_examples example code: legend_demo2.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/legend_demo21.png -
      -
      # Make a legend for specific lines.
      -import matplotlib.pyplot as plt
      -import numpy as np
      -
      -
      -t1 = np.arange(0.0, 2.0, 0.1)
      -t2 = np.arange(0.0, 2.0, 0.01)
      -
      -# note that plot returns a list of lines.  The "l1, = plot" usage
      -# extracts the first element of the list into l1 using tuple
      -# unpacking.  So l1 is a Line2D instance, not a sequence of lines
      -l1, = plt.plot(t2, np.exp(-t2))
      -l2, l3 = plt.plot(t2, np.sin(2 * np.pi * t2), '--go', t1, np.log(1 + t1), '.')
      -l4, = plt.plot(t2, np.exp(-t2) * np.sin(2 * np.pi * t2), 'rs-.')
      -
      -plt.legend( (l2, l4), ('oscillatory', 'damped'), 'upper right', shadow=True)
      -plt.xlabel('time')
      -plt.ylabel('volts')
      -plt.title('Damped oscillation')
      -plt.show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/pylab_examples/legend_demo3.html b/dev/examples/pylab_examples/legend_demo3.html deleted file mode 100644 index 0fd759cabff..00000000000 --- a/dev/examples/pylab_examples/legend_demo3.html +++ /dev/null @@ -1,180 +0,0 @@ - - - - - - - - pylab_examples example code: legend_demo3.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      pylab_examples example code: legend_demo3.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/legend_demo3.png -
      -
      #!/usr/bin/env python
      -import matplotlib
      -matplotlib.rcParams['legend.fancybox'] = True
      -import matplotlib.pyplot as plt
      -import numpy as np
      -
      -def myplot(ax):
      -    t1 = np.arange(0.0, 1.0, 0.1)
      -    for n in [1, 2, 3, 4]:
      -        ax.plot(t1, t1**n, label="n=%d"%(n,))
      -
      -ax1 = plt.subplot(3,1,1)
      -ax1.plot([1], label="multi\nline")
      -ax1.plot([1], label="$2^{2^2}$")
      -ax1.plot([1], label=r"$\frac{1}{2}\pi$")
      -ax1.legend(loc=1, ncol=3, shadow=True)
      -
      -ax2 = plt.subplot(3,1,2)
      -myplot(ax2)
      -ax2.legend(loc="center left", bbox_to_anchor=[0.5, 0.5],
      -           ncol=2, shadow=True, title="Legend")
      -ax2.get_legend().get_title().set_color("red")
      -
      -ax3 = plt.subplot(3,1,3)
      -myplot(ax3)
      -ax3.legend(shadow=True, fancybox=True)
      -
      -
      -plt.draw()
      -plt.show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/pylab_examples/legend_demo4.html b/dev/examples/pylab_examples/legend_demo4.html deleted file mode 100644 index c24ecc79df6..00000000000 --- a/dev/examples/pylab_examples/legend_demo4.html +++ /dev/null @@ -1,180 +0,0 @@ - - - - - - - - pylab_examples example code: legend_demo4.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      pylab_examples example code: legend_demo4.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/legend_demo4.png -
      -
      import matplotlib.pyplot as plt
      -
      -ax = plt.subplot(311)
      -
      -b1 = ax.bar([0, 1, 2], [0.2, 0.3, 0.1], width=0.4,
      -            label="Bar 1", align="center")
      -
      -b2 = ax.bar([0.5, 1.5, 2.5], [0.3, 0.2, 0.2], color="red", width=0.4,
      -            label="Bar 2", align="center")
      -
      -ax.legend()
      -
      -ax = plt.subplot(312)
      -
      -err1 = ax.errorbar([0, 1, 2], [2, 3, 1], xerr=0.4, fmt="s",
      -                   label="test 1")
      -err2 = ax.errorbar([0, 1, 2], [3, 2, 4], yerr=0.3, fmt="o",
      -                   label="test 2")
      -err3 = ax.errorbar([0, 1, 2], [1, 1, 3], xerr=0.4, yerr=0.3, fmt="^",
      -                   label="test 3")
      -
      -ax.legend()
      -
      -ax = plt.subplot(313)
      -
      -ll = ax.stem([0.3, 1.5, 2.7], [1, 3.6, 2.7], label="stem test")
      -
      -ax.legend()
      -
      -plt.show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/pylab_examples/legend_demo_custom_handler.html b/dev/examples/pylab_examples/legend_demo_custom_handler.html deleted file mode 100644 index 28297d2c5a3..00000000000 --- a/dev/examples/pylab_examples/legend_demo_custom_handler.html +++ /dev/null @@ -1,180 +0,0 @@ - - - - - - - - pylab_examples example code: legend_demo_custom_handler.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      pylab_examples example code: legend_demo_custom_handler.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/legend_demo_custom_handler.png -
      -
      import matplotlib.pyplot as plt
      -import numpy as np
      -
      -ax = plt.subplot(111, aspect=1)
      -x, y = np.random.randn(2, 20)
      -#[1.1, 2, 2.8], [1.1, 2, 1.8]
      -l1, = ax.plot(x,y, "k+", mew=3, ms=12)
      -l2, = ax.plot(x,y, "w+", mew=1, ms=10)
      -
      -import matplotlib.patches as mpatches
      -c = mpatches.Circle((0, 0), 1, fc="g", ec="r", lw=3)
      -ax.add_patch(c)
      -
      -
      -
      -from matplotlib.legend_handler import HandlerPatch
      -
      -def make_legend_ellipse(legend, orig_handle,
      -                        xdescent, ydescent,
      -                        width, height, fontsize):
      -    p = mpatches.Ellipse(xy=(0.5*width-0.5*xdescent, 0.5*height-0.5*ydescent),
      -                         width = width+xdescent, height=(height+ydescent))
      -
      -    return p
      -
      -plt.legend([c, (l1, l2)], ["Label 1", "Label 2"],
      -           handler_map={mpatches.Circle:HandlerPatch(patch_func=make_legend_ellipse),
      -                        })
      -
      -plt.show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/pylab_examples/legend_scatter.html b/dev/examples/pylab_examples/legend_scatter.html deleted file mode 100644 index 680cb912c2c..00000000000 --- a/dev/examples/pylab_examples/legend_scatter.html +++ /dev/null @@ -1,169 +0,0 @@ - - - - - - - - pylab_examples example code: legend_scatter.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      pylab_examples example code: legend_scatter.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/legend_scatter.png -
      -
      #!/usr/bin/env python
      -from pylab import *
      -
      -N=1000
      -
      -props = dict( alpha=0.5, edgecolors='none' )
      -
      -handles = []
      -colours = ['red', 'green', 'blue', 'magenta', 'cyan', 'yellow']
      -colours = ['red', 'green', 'blue']
      -for colour in colours:
      -    x, y = rand(2,N)
      -    s = 400.0 * rand(N)
      -    handles.append(scatter(x, y, c=colour, s=s, **props))
      -
      -legend(handles, colours)
      -grid(True)
      -
      -show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/pylab_examples/legend_translucent.html b/dev/examples/pylab_examples/legend_translucent.html deleted file mode 100644 index 7d9999180a4..00000000000 --- a/dev/examples/pylab_examples/legend_translucent.html +++ /dev/null @@ -1,168 +0,0 @@ - - - - - - - - pylab_examples example code: legend_translucent.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      pylab_examples example code: legend_translucent.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/legend_translucent.png -
      -
      #!/usr/bin/python
      -#
      -# Show how to add a translucent legend
      -
      -# import pyplot module
      -import matplotlib.pyplot as plt
      -
      -# draw 2 crossing lines
      -plt.plot([0,1], label='going up')
      -plt.plot([1,0], label='going down')
      -
      -# add the legend in the middle of the plot
      -leg = plt.legend(fancybox=True, loc='center')
      -# set the alpha value of the legend: it will be translucent
      -leg.get_frame().set_alpha(0.5)
      -
      -# show the plot
      -plt.show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/pylab_examples/line_collection.html b/dev/examples/pylab_examples/line_collection.html deleted file mode 100644 index 336b0909c4a..00000000000 --- a/dev/examples/pylab_examples/line_collection.html +++ /dev/null @@ -1,190 +0,0 @@ - - - - - - - - pylab_examples example code: line_collection.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      pylab_examples example code: line_collection.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/line_collection.png -
      -
      import matplotlib.pyplot as plt
      -from matplotlib.collections import LineCollection
      -from matplotlib.colors import colorConverter
      -
      -import numpy as np
      -
      -# In order to efficiently plot many lines in a single set of axes,
      -# Matplotlib has the ability to add the lines all at once. Here is a
      -# simple example showing how it is done.
      -
      -x = np.arange(100)
      -# Here are many sets of y to plot vs x
      -ys = x[:50, np.newaxis] + x[np.newaxis, :]
      -
      -segs = np.zeros((50, 100, 2), float)
      -segs[:,:,1] = ys
      -segs[:,:,0] = x
      -
      -# Mask some values to test masked array support:
      -segs = np.ma.masked_where((segs > 50) & (segs < 60), segs)
      -
      -# We need to set the plot limits.
      -ax = plt.axes()
      -ax.set_xlim(x.min(), x.max())
      -ax.set_ylim(ys.min(), ys.max())
      -
      -# colors is sequence of rgba tuples
      -# linestyle is a string or dash tuple. Legal string values are
      -#          solid|dashed|dashdot|dotted.  The dash tuple is (offset, onoffseq)
      -#          where onoffseq is an even length tuple of on and off ink in points.
      -#          If linestyle is omitted, 'solid' is used
      -# See matplotlib.collections.LineCollection for more information
      -line_segments = LineCollection(segs,
      -                                linewidths    = (0.5,1,1.5,2),
      -                                colors        = [colorConverter.to_rgba(i) \
      -                                                 for i in ('b','g','r','c','m','y','k')],
      -                                linestyle = 'solid')
      -ax.add_collection(line_segments)
      -ax.set_title('Line collection with masked arrays')
      -plt.show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/pylab_examples/line_collection2.html b/dev/examples/pylab_examples/line_collection2.html deleted file mode 100644 index b81ea245465..00000000000 --- a/dev/examples/pylab_examples/line_collection2.html +++ /dev/null @@ -1,184 +0,0 @@ - - - - - - - - pylab_examples example code: line_collection2.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      pylab_examples example code: line_collection2.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/line_collection2.png -
      -
      from pylab import *
      -from matplotlib.collections import LineCollection
      -
      -# In order to efficiently plot many lines in a single set of axes,
      -# Matplotlib has the ability to add the lines all at once. Here is a
      -# simple example showing how it is done.
      -
      -N = 50
      -x = arange(N)
      -# Here are many sets of y to plot vs x
      -ys = [x+i for i in x]
      -
      -# We need to set the plot limits, they will not autoscale
      -ax = axes()
      -ax.set_xlim((amin(x),amax(x)))
      -ax.set_ylim((amin(amin(ys)),amax(amax(ys))))
      -
      -# colors is sequence of rgba tuples
      -# linestyle is a string or dash tuple. Legal string values are
      -#          solid|dashed|dashdot|dotted.  The dash tuple is (offset, onoffseq)
      -#          where onoffseq is an even length tuple of on and off ink in points.
      -#          If linestyle is omitted, 'solid' is used
      -# See matplotlib.collections.LineCollection for more information
      -line_segments = LineCollection([list(zip(x,y)) for y in ys], # Make a sequence of x,y pairs
      -                                linewidths    = (0.5,1,1.5,2),
      -                                linestyles = 'solid')
      -line_segments.set_array(x)
      -ax.add_collection(line_segments)
      -fig = gcf()
      -axcb = fig.colorbar(line_segments)
      -axcb.set_label('Line Number')
      -ax.set_title('Line Collection with mapped colors')
      -sci(line_segments) # This allows interactive changing of the colormap.
      -show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/pylab_examples/line_styles.html b/dev/examples/pylab_examples/line_styles.html deleted file mode 100644 index 4cca6b41ddd..00000000000 --- a/dev/examples/pylab_examples/line_styles.html +++ /dev/null @@ -1,195 +0,0 @@ - - - - - - - - pylab_examples example code: line_styles.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      pylab_examples example code: line_styles.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/line_styles.png -
      -
      #!/usr/bin/env python
      -# This should probably be replaced with a demo that shows all
      -# line and marker types in a single panel, with labels.
      -
      -import matplotlib.pyplot as plt
      -from matplotlib.lines import Line2D
      -import numpy as np
      -
      -t = np.arange(0.0, 1.0, 0.1)
      -s = np.sin(2*np.pi*t)
      -linestyles = ['_', '-', '--', ':']
      -markers = []
      -for m in Line2D.markers:
      -    try:
      -        if len(m) == 1 and m != ' ':
      -            markers.append(m)
      -    except TypeError:
      -        pass
      -
      -styles = markers + [
      -    r'$\lambda$',
      -    r'$\bowtie$',
      -    r'$\circlearrowleft$',
      -    r'$\clubsuit$',
      -    r'$\checkmark$']
      -
      -colors = ('b', 'g', 'r', 'c', 'm', 'y', 'k')
      -
      -plt.figure(figsize=(8,8))
      -
      -axisNum = 0
      -for row in range(6):
      -    for col in range(5):
      -        axisNum += 1
      -        ax = plt.subplot(6, 5, axisNum)
      -        color = colors[axisNum % len(colors)]
      -        if axisNum < len(linestyles):
      -            plt.plot(t, s, linestyles[axisNum], color=color, markersize=10)
      -        else:
      -            style = styles[(axisNum - len(linestyles)) % len(styles)]
      -            plt.plot(t, s, linestyle='None', marker=style, color=color, markersize=10)
      -        ax.set_yticklabels([])
      -        ax.set_xticklabels([])
      -
      -plt.show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/pylab_examples/load_converter.html b/dev/examples/pylab_examples/load_converter.html deleted file mode 100644 index 620acbc4024..00000000000 --- a/dev/examples/pylab_examples/load_converter.html +++ /dev/null @@ -1,170 +0,0 @@ - - - - - - - - pylab_examples example code: load_converter.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      pylab_examples example code: load_converter.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/load_converter.png -
      -
      from __future__ import print_function
      -from matplotlib.dates import strpdate2num
      -#from matplotlib.mlab import load
      -import numpy as np
      -from pylab import figure, show
      -import matplotlib.cbook as cbook
      -
      -datafile = cbook.get_sample_data('msft.csv', asfileobj=False)
      -print('loading', datafile)
      -
      -dates, closes = np.loadtxt(
      -    datafile, delimiter=',',
      -    converters={0:strpdate2num('%d-%b-%y')},
      -    skiprows=1, usecols=(0,2), unpack=True)
      -
      -fig = figure()
      -ax = fig.add_subplot(111)
      -ax.plot_date(dates, closes, '-')
      -fig.autofmt_xdate()
      -show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/pylab_examples/loadrec.html b/dev/examples/pylab_examples/loadrec.html deleted file mode 100644 index ddc3e779e06..00000000000 --- a/dev/examples/pylab_examples/loadrec.html +++ /dev/null @@ -1,173 +0,0 @@ - - - - - - - - pylab_examples example code: loadrec.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      pylab_examples example code: loadrec.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/loadrec.png -
      -
      from __future__ import print_function
      -from matplotlib import mlab
      -from pylab import figure, show
      -import matplotlib.cbook as cbook
      -
      -datafile = cbook.get_sample_data('msft.csv', asfileobj=False)
      -print('loading', datafile)
      -a = mlab.csv2rec(datafile)
      -a.sort()
      -print(a.dtype)
      -
      -fig = figure()
      -ax = fig.add_subplot(111)
      -ax.plot(a.date, a.adj_close, '-')
      -fig.autofmt_xdate()
      -
      -# if you have xlwt installed, you can output excel
      -try:
      -    import mpl_toolkits.exceltools as exceltools
      -    exceltools.rec2excel(a, 'test.xls')
      -except ImportError:
      -    pass
      -show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/pylab_examples/log_bar.html b/dev/examples/pylab_examples/log_bar.html deleted file mode 100644 index 90b6127c623..00000000000 --- a/dev/examples/pylab_examples/log_bar.html +++ /dev/null @@ -1,173 +0,0 @@ - - - - - - - - pylab_examples example code: log_bar.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      pylab_examples example code: log_bar.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/log_bar.png -
      -
      #!/usr/bin/env python
      -
      -from matplotlib import pylab
      -
      -data = ((3,1000), (10,3), (100,30), (500, 800), (50,1))
      -
      -pylab.xlabel("FOO")
      -pylab.ylabel("FOO")
      -pylab.title("Testing")
      -pylab.gca().set_yscale('log')
      -
      -dim = len(data[0])
      -w = 0.75
      -dimw = w / dim
      -
      -x = pylab.arange(len(data))
      -for i in range(len(data[0])) :
      -    y = [d[i] for d in data]
      -    b = pylab.bar(x + i * dimw, y, dimw, bottom=0.001)
      -pylab.gca().set_xticks(x + w / 2)
      -pylab.gca().set_ylim( (0.001,1000))
      -
      -pylab.show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/pylab_examples/log_demo.html b/dev/examples/pylab_examples/log_demo.html deleted file mode 100644 index 10b846ea9fa..00000000000 --- a/dev/examples/pylab_examples/log_demo.html +++ /dev/null @@ -1,187 +0,0 @@ - - - - - - - - pylab_examples example code: log_demo.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      pylab_examples example code: log_demo.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/log_demo1.png -
      -
      import numpy as np
      -import matplotlib.pyplot as plt
      -
      -plt.subplots_adjust(hspace=0.4)
      -t = np.arange(0.01, 20.0, 0.01)
      -
      -# log y axis
      -plt.subplot(221)
      -plt.semilogy(t, np.exp(-t/5.0))
      -plt.title('semilogy')
      -plt.grid(True)
      -
      -# log x axis
      -plt.subplot(222)
      -plt.semilogx(t, np.sin(2*np.pi*t))
      -plt.title('semilogx')
      -plt.grid(True)
      -
      -# log x and y axis
      -plt.subplot(223)
      -plt.loglog(t, 20*np.exp(-t/10.0), basex=2)
      -plt.grid(True)
      -plt.title('loglog base 4 on x')
      -
      -# with errorbars: clip non-positive values
      -ax = plt.subplot(224)
      -ax.set_xscale("log", nonposx='clip')
      -ax.set_yscale("log", nonposy='clip')
      -
      -x = 10.0**np.linspace(0.0, 2.0, 20)
      -y = x**2.0
      -plt.errorbar(x, y, xerr=0.1*x, yerr=5.0+0.75*y)
      -ax.set_ylim(ymin=0.1)
      -ax.set_title('Errorbars go negative')
      -
      -
      -plt.show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/pylab_examples/log_test.html b/dev/examples/pylab_examples/log_test.html deleted file mode 100644 index 328f6e6f309..00000000000 --- a/dev/examples/pylab_examples/log_test.html +++ /dev/null @@ -1,160 +0,0 @@ - - - - - - - - pylab_examples example code: log_test.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      pylab_examples example code: log_test.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/log_test.png -
      -
      #!/usr/bin/env python
      -from pylab import *
      -
      -dt = 0.01
      -t = arange(dt, 20.0, dt)
      -
      -semilogx(t, exp(-t/5.0))
      -grid(True)
      -
      -show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/pylab_examples/logo.html b/dev/examples/pylab_examples/logo.html deleted file mode 100644 index 55511f6ddea..00000000000 --- a/dev/examples/pylab_examples/logo.html +++ /dev/null @@ -1,178 +0,0 @@ - - - - - - - - pylab_examples example code: logo.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      pylab_examples example code: logo.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/logo.png -
      -
      #!/usr/bin/env python
      -# This file generates the matplotlib web page logo
      -
      -from __future__ import print_function
      -from pylab import *
      -import matplotlib.cbook as cbook
      -
      -# convert data to mV
      -datafile = cbook.get_sample_data('membrane.dat', asfileobj=False)
      -print('loading', datafile)
      -
      -x = 1000*0.1*fromstring(file(datafile, 'rb').read(), float32)
      -# 0.0005 is the sample interval
      -t = 0.0005*arange(len(x))
      -figure(1, figsize=(7,1), dpi=100)
      -ax = subplot(111, axisbg='y')
      -plot(t, x)
      -text(0.5, 0.5,'matplotlib', color='r',
      -     fontsize=40, fontname='Courier',
      -     horizontalalignment='center',
      -     verticalalignment='center',
      -     transform = ax.transAxes,
      -     )
      -axis([1, 1.72,-60, 10])
      -setp(gca(), 'xticklabels', [])
      -setp(gca(), 'yticklabels', [])
      -
      -show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/pylab_examples/major_minor_demo1.html b/dev/examples/pylab_examples/major_minor_demo1.html deleted file mode 100644 index 075eca66e1f..00000000000 --- a/dev/examples/pylab_examples/major_minor_demo1.html +++ /dev/null @@ -1,203 +0,0 @@ - - - - - - - - pylab_examples example code: major_minor_demo1.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      pylab_examples example code: major_minor_demo1.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/major_minor_demo1.png -
      -
      #!/usr/bin/env python
      -"""
      -Demonstrate how to use major and minor tickers.
      -
      -The two relevant userland classes are Locators and Formatters.
      -Locators determine where the ticks are and formatters control the
      -formatting of ticks.
      -
      -Minor ticks are off by default (NullLocator and NullFormatter).  You
      -can turn minor ticks on w/o labels by setting the minor locator.  You
      -can also turn labeling on for the minor ticker by setting the minor
      -formatter
      -
      -Make a plot with major ticks that are multiples of 20 and minor ticks
      -that are multiples of 5.  Label major ticks with %d formatting but
      -don't label minor ticks
      -
      -The MultipleLocator ticker class is used to place ticks on multiples of
      -some base.  The FormatStrFormatter uses a string format string (eg
      -'%d' or '%1.2f' or '%1.1f cm' ) to format the tick
      -
      -The pylab interface grid command changes the grid settings of the
      -major ticks of the y and y axis together.  If you want to control the
      -grid of the minor ticks for a given axis, use for example
      -
      -  ax.xaxis.grid(True, which='minor')
      -
      -Note, you should not use the same locator between different Axis
      -because the locator stores references to the Axis data and view limits
      -
      -"""
      -
      -from pylab import *
      -from matplotlib.ticker import MultipleLocator, FormatStrFormatter
      -
      -majorLocator   = MultipleLocator(20)
      -majorFormatter = FormatStrFormatter('%d')
      -minorLocator   = MultipleLocator(5)
      -
      -
      -t = arange(0.0, 100.0, 0.1)
      -s = sin(0.1*pi*t)*exp(-t*0.01)
      -
      -ax = subplot(111)
      -plot(t,s)
      -
      -ax.xaxis.set_major_locator(majorLocator)
      -ax.xaxis.set_major_formatter(majorFormatter)
      -
      -#for the minor ticks, use no labels; default NullFormatter
      -ax.xaxis.set_minor_locator(minorLocator)
      -
      -show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/pylab_examples/major_minor_demo2.html b/dev/examples/pylab_examples/major_minor_demo2.html deleted file mode 100644 index a7fed160dea..00000000000 --- a/dev/examples/pylab_examples/major_minor_demo2.html +++ /dev/null @@ -1,184 +0,0 @@ - - - - - - - - pylab_examples example code: major_minor_demo2.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      pylab_examples example code: major_minor_demo2.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/major_minor_demo2.png -
      -
      #!/usr/bin/env python
      -"""
      -Automatic tick selection for major and minor ticks.
      -
      -Use interactive pan and zoom to see how the tick intervals
      -change. There will be either 4 or 5 minor tick intervals
      -per major interval, depending on the major interval.
      -"""
      -
      -import numpy as np
      -import matplotlib.pyplot as plt
      -from matplotlib.ticker import AutoMinorLocator
      -
      -# One can supply an argument to AutoMinorLocator to
      -# specify a fixed number of minor intervals per major interval, e.g.:
      -# minorLocator = AutoMinorLocator(2)
      -# would lead to a single minor tick between major ticks.
      -
      -minorLocator   = AutoMinorLocator()
      -
      -
      -t = np.arange(0.0, 100.0, 0.01)
      -s = np.sin(2*np.pi*t)*np.exp(-t*0.01)
      -
      -ax = plt.subplot(111)
      -plt.plot(t,s)
      -
      -ax.xaxis.set_minor_locator(minorLocator)
      -
      -plt.tick_params(which='both', width=2)
      -plt.tick_params(which='major', length=7)
      -plt.tick_params(which='minor', length=4, color='r')
      -
      -plt.show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/pylab_examples/manual_axis.html b/dev/examples/pylab_examples/manual_axis.html deleted file mode 100644 index 479a3bb805a..00000000000 --- a/dev/examples/pylab_examples/manual_axis.html +++ /dev/null @@ -1,207 +0,0 @@ - - - - - - - - pylab_examples example code: manual_axis.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      pylab_examples example code: manual_axis.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/manual_axis.png -
      -
      """
      -The techniques here are no longer required with the new support for
      -spines in matplotlib -- see
      -http://matplotlib.org/examples/pylab_examples/spine_placement_demo.html.
      -
      -This example should be considered deprecated and is left just for demo
      -purposes for folks wanting to make a pseudo-axis
      -
      -"""
      -
      -import numpy as np
      -from pylab import figure, show
      -import matplotlib.lines as lines
      -
      -def make_xaxis(ax, yloc, offset=0.05, **props):
      -    xmin, xmax = ax.get_xlim()
      -    locs = [loc for loc in ax.xaxis.get_majorticklocs()
      -            if loc>=xmin and loc<=xmax]
      -    tickline, = ax.plot(locs, [yloc]*len(locs),linestyle='',
      -            marker=lines.TICKDOWN, **props)
      -    axline, = ax.plot([xmin, xmax], [yloc, yloc], **props)
      -    tickline.set_clip_on(False)
      -    axline.set_clip_on(False)
      -    for loc in locs:
      -        ax.text(loc, yloc-offset, '%1.1f'%loc,
      -                horizontalalignment='center',
      -                verticalalignment='top')
      -
      -def make_yaxis(ax, xloc=0, offset=0.05, **props):
      -    ymin, ymax = ax.get_ylim()
      -    locs = [loc for loc in ax.yaxis.get_majorticklocs()
      -            if loc>=ymin and loc<=ymax]
      -    tickline, = ax.plot([xloc]*len(locs), locs, linestyle='',
      -            marker=lines.TICKLEFT, **props)
      -    axline, = ax.plot([xloc, xloc], [ymin, ymax], **props)
      -    tickline.set_clip_on(False)
      -    axline.set_clip_on(False)
      -
      -    for loc in locs:
      -        ax.text(xloc-offset, loc, '%1.1f'%loc,
      -                verticalalignment='center',
      -                horizontalalignment='right')
      -
      -
      -props = dict(color='black', linewidth=2, markeredgewidth=2)
      -x = np.arange(200.)
      -y = np.sin(2*np.pi*x/200.) + np.random.rand(200)-0.5
      -fig = figure(facecolor='white')
      -ax = fig.add_subplot(111, frame_on=False)
      -ax.axison = False
      -ax.plot(x, y, 'd', markersize=8, markerfacecolor='blue')
      -ax.set_xlim(0, 200)
      -ax.set_ylim(-1.5, 1.5)
      -make_xaxis(ax, 0, offset=0.1, **props)
      -make_yaxis(ax, 0, offset=5, **props)
      -
      -show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/pylab_examples/marker_path.html b/dev/examples/pylab_examples/marker_path.html deleted file mode 100644 index d9fe6f46124..00000000000 --- a/dev/examples/pylab_examples/marker_path.html +++ /dev/null @@ -1,166 +0,0 @@ - - - - - - - - pylab_examples example code: marker_path.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      pylab_examples example code: marker_path.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/marker_path.png -
      -
      import matplotlib.pyplot as plt
      -import matplotlib.path as mpath
      -import numpy as np
      -
      -
      -star = mpath.Path.unit_regular_star(6)
      -circle = mpath.Path.unit_circle()
      -# concatenate the circle with an internal cutout of the star
      -verts = np.concatenate([circle.vertices, star.vertices[::-1, ...]])
      -codes = np.concatenate([circle.codes, star.codes])
      -cut_star = mpath.Path(verts, codes)
      -
      -
      -plt.plot(np.arange(10)**2, '--r', marker=cut_star, markersize=15)
      -
      -plt.show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/pylab_examples/masked_demo.html b/dev/examples/pylab_examples/masked_demo.html deleted file mode 100644 index 6a96511d573..00000000000 --- a/dev/examples/pylab_examples/masked_demo.html +++ /dev/null @@ -1,176 +0,0 @@ - - - - - - - - pylab_examples example code: masked_demo.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      pylab_examples example code: masked_demo.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/masked_demo.png -
      -
      #!/usr/bin/env python
      -'''
      -Plot lines with points masked out.
      -
      -This would typically be used with gappy data, to
      -break the line at the data gaps.
      -'''
      -
      -from pylab import *
      -
      -x = ma.arange(0, 2*pi, 0.02)
      -y = ma.sin(x)
      -y1 = sin(2*x)
      -y2 = sin(3*x)
      -ym1 = ma.masked_where(y1 > 0.5, y1)
      -ym2 = ma.masked_where(y2 < -0.5, y2)
      -
      -lines = plot(x, y, 'r', x, ym1, 'g', x, ym2, 'bo')
      -setp(lines[0], linewidth = 4)
      -setp(lines[1], linewidth = 2)
      -setp(lines[2], markersize = 10)
      -
      -legend( ('No mask', 'Masked if > 0.5', 'Masked if < -0.5') ,
      -        loc = 'upper right')
      -title('Masked line demo')
      -show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/pylab_examples/mathtext_demo.html b/dev/examples/pylab_examples/mathtext_demo.html deleted file mode 100644 index bd5a61e4f55..00000000000 --- a/dev/examples/pylab_examples/mathtext_demo.html +++ /dev/null @@ -1,178 +0,0 @@ - - - - - - - - pylab_examples example code: mathtext_demo.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      pylab_examples example code: mathtext_demo.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/mathtext_demo.png -
      -
      #!/usr/bin/env python
      -"""
      -Use matplotlib's internal LaTeX parser and layout engine.  For true
      -latex rendering, see the text.usetex option
      -"""
      -import numpy as np
      -from matplotlib.pyplot import figure, show
      -
      -fig = figure()
      -fig.subplots_adjust(bottom=0.2)
      -
      -ax = fig.add_subplot(111, axisbg='y')
      -ax.plot([1,2,3], 'r')
      -x = np.arange(0.0, 3.0, 0.1)
      -
      -ax.grid(True)
      -ax.set_xlabel(r'$\Delta_i^j$', fontsize=20)
      -ax.set_ylabel(r'$\Delta_{i+1}^j$', fontsize=20)
      -tex = r'$\mathcal{R}\prod_{i=\alpha_{i+1}}^\infty a_i\sin(2 \pi f x_i)$'
      -
      -ax.text(1, 1.6, tex, fontsize=20, va='bottom')
      -
      -ax.legend([r"$\sqrt{x^2}$"])
      -
      -ax.set_title(r'$\Delta_i^j \hspace{0.4} \mathrm{versus} \hspace{0.4} \Delta_{i+1}^j$', fontsize=20)
      -
      -
      -show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/pylab_examples/mathtext_examples.html b/dev/examples/pylab_examples/mathtext_examples.html deleted file mode 100644 index e2d8a890f9b..00000000000 --- a/dev/examples/pylab_examples/mathtext_examples.html +++ /dev/null @@ -1,246 +0,0 @@ - - - - - - - - pylab_examples example code: mathtext_examples.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      pylab_examples example code: mathtext_examples.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/mathtext_examples.png -
      -
      #!/usr/bin/env python
      -
      -from __future__ import print_function
      -
      -import os, sys, re
      -
      -import gc
      -
      -stests = [
      -    r'$a+b+\dots+\dot{s}+\ldots$',
      -    r'$x \doteq y$',
      -    r'\$100.00 $\alpha \_$',
      -    r'$\frac{\$100.00}{y}$',
      -    r'$x   y$',
      -    r'$x+y\ x=y\ x<y\ x:y\ x,y\ x@y$',
      -    r'$100\%y\ x*y\ x/y x\$y$',
      -    r'$x\leftarrow y\ x\forall y\ x-y$',
      -    r'$x \sf x \bf x {\cal X} \rm x$',
      -    r'$x\ x\,x\;x\quad x\qquad x\!x\hspace{ 0.5 }y$',
      -    r'$\{ \rm braces \}$',
      -    r'$\left[\left\lfloor\frac{5}{\frac{\left(3\right)}{4}} y\right)\right]$',
      -    r'$\left(x\right)$',
      -    r'$\sin(x)$',
      -    r'$x_2$',
      -    r'$x^2$',
      -    r'$x^2_y$',
      -    r'$x_y^2$',
      -    r'$\prod_{i=\alpha_{i+1}}^\infty$',
      -    r'$x = \frac{x+\frac{5}{2}}{\frac{y+3}{8}}$',
      -    r'$dz/dt = \gamma x^2 + {\rm sin}(2\pi y+\phi)$',
      -    r'Foo: $\alpha_{i+1}^j = {\rm sin}(2\pi f_j t_i) e^{-5 t_i/\tau}$',
      -    r'$\mathcal{R}\prod_{i=\alpha_{i+1}}^\infty a_i \sin(2 \pi f x_i)$',
      -#    r'$\bigodot \bigoplus {\sf R} a_i{\rm sin}(2 \pi f x_i)$',
      -    r'Variable $i$ is good',
      -    r'$\Delta_i^j$',
      -    r'$\Delta^j_{i+1}$',
      -    r'$\ddot{o}\acute{e}\grave{e}\hat{O}\breve{\imath}\tilde{n}\vec{q}$',
      -    r'$_i$',
      -    r"$\arccos((x^i))$",
      -    r"$\gamma = \frac{x=\frac{6}{8}}{y} \delta$",
      -    r'$\limsup_{x\to\infty}$',
      -    r'$\oint^\infty_0$',
      -    r"$f^'$",
      -    r'$\frac{x_2888}{y}$',
      -    r"$\sqrt[3]{\frac{X_2}{Y}}=5$",
      -    r"$\sqrt[5]{\prod^\frac{x}{2\pi^2}_\infty}$",
      -    r"$\sqrt[3]{x}=5$",
      -    r'$\frac{X}{\frac{X}{Y}}$',
      -    # From UTR #25
      -    r"$W^{3\beta}_{\delta_1 \rho_1 \sigma_2} = U^{3\beta}_{\delta_1 \rho_1} + \frac{1}{8 \pi 2} \int^{\alpha_2}_{\alpha_2} d \alpha^\prime_2 \left[\frac{ U^{2\beta}_{\delta_1 \rho_1} - \alpha^\prime_2U^{1\beta}_{\rho_1 \sigma_2} }{U^{0\beta}_{\rho_1 \sigma_2}}\right]$",
      -    r'$\mathcal{H} = \int d \tau \left(\epsilon E^2 + \mu H^2\right)$',
      -    r'$\widehat{abc}\widetilde{def}$',
      -    r'$\Gamma \Delta \Theta \Lambda \Xi \Pi \Sigma \Upsilon \Phi \Psi \Omega$',
      -    r'$\alpha \beta \gamma \delta \epsilon \zeta \eta \theta \iota \lambda \mu \nu \xi \pi \kappa \rho \sigma \tau \upsilon \phi \chi \psi$',
      -    #ur'Generic symbol: $\u23ce$',
      -   ]
      -
      -#if sys.maxunicode > 0xffff:
      -#    stests.append(ur'$\mathrm{\ue0f2 \U0001D538}$')
      -
      -
      -from pylab import *
      -
      -def doall():
      -    tests = stests
      -
      -    figure(figsize=(8, (len(tests) * 1) + 2))
      -    plot([0, 0], 'r')
      -    grid(False)
      -    axis([0, 3, -len(tests), 0])
      -    yticks(arange(len(tests)) * -1)
      -    for i, s in enumerate(tests):
      -        print (i, s)
      -        text(0.1, -i, s, fontsize=20)
      -
      -    #savefig('mathtext_examples')
      -    #close('all')
      -    show()
      -
      -if '--latex' in sys.argv:
      -    fd = open("mathtext_examples.ltx", "w")
      -    fd.write("\\documentclass{article}\n")
      -    fd.write("\\begin{document}\n")
      -    fd.write("\\begin{enumerate}\n")
      -
      -    for i, s in enumerate(stests):
      -        s = re.sub(r"(?<!\\)\$", "$$", s)
      -        fd.write("\\item %s\n" % s)
      -
      -    fd.write("\\end{enumerate}\n")
      -    fd.write("\\end{document}\n")
      -    fd.close()
      -
      -    os.system("pdflatex mathtext_examples.ltx")
      -else:
      -    doall()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/pylab_examples/matplotlib_icon.html b/dev/examples/pylab_examples/matplotlib_icon.html deleted file mode 100644 index aae5ab15c48..00000000000 --- a/dev/examples/pylab_examples/matplotlib_icon.html +++ /dev/null @@ -1,170 +0,0 @@ - - - - - - - - pylab_examples example code: matplotlib_icon.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      pylab_examples example code: matplotlib_icon.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/matplotlib_icon.png -
      -
      #!/usr/bin/env python
      -"""
      -make the matplotlib svg minimization icon
      -"""
      -import matplotlib
      -#matplotlib.use('Svg')
      -from pylab import *
      -
      -rc('grid', ls='-', lw=2, color='k')
      -fig = figure(figsize=(1, 1), dpi=72)
      -axes([0.025, 0.025, 0.95, 0.95], axisbg='#bfd1d4')
      -
      -t = arange(0, 2, 0.05)
      -s = sin(2*pi*t)
      -plot(t,s, linewidth=4, color="#ca7900")
      -axis([-.2, 2.2, -1.2, 1.2])
      -
      -# grid(True)
      -setp(gca(), xticklabels=[], yticklabels=[])
      -savefig('matplotlib', facecolor='0.75')
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/pylab_examples/matshow.html b/dev/examples/pylab_examples/matshow.html deleted file mode 100644 index 0239458e28e..00000000000 --- a/dev/examples/pylab_examples/matshow.html +++ /dev/null @@ -1,189 +0,0 @@ - - - - - - - - pylab_examples example code: matshow.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      pylab_examples example code: matshow.py

      -

      (Source code)

      -
      -../../_images/matshow_001.png -

      (png, hires.png, pdf)

      -
      -
      -../../_images/matshow_011.png -

      (png, hires.png, pdf)

      -
      -
      -../../_images/matshow_021.png -

      (png, hires.png, pdf)

      -
      -
      -../../_images/matshow_031.png -

      (png, hires.png, pdf)

      -
      -
      -../../_images/matshow_041.png -

      (png, hires.png, pdf)

      -
      -
      #!/usr/bin/env python
      -"""Simple matshow() example."""
      -
      -from matplotlib.pylab import *
      -
      -def samplemat(dims):
      -    """Make a matrix with all zeros and increasing elements on the diagonal"""
      -    aa = zeros(dims)
      -    for i in range(min(dims)):
      -        aa[i,i] = i
      -    return aa
      -
      -# Make a few matrices of strange sizes
      -dimlist = [(12,12),(128,64),(64,512),(1024,128)]
      -
      -for d in dimlist:
      -    matshow(samplemat(d))
      -
      -# Display a random matrix with a specified figure number and a grayscale colormap
      -matshow(rand(64,64),fignum=100,cmap=cm.gray)
      -
      -show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/pylab_examples/movie_demo.html b/dev/examples/pylab_examples/movie_demo.html deleted file mode 100644 index df57df2ea83..00000000000 --- a/dev/examples/pylab_examples/movie_demo.html +++ /dev/null @@ -1,172 +0,0 @@ - - - - - - - - pylab_examples example code: movie_demo.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      pylab_examples example code: movie_demo.py

      -

      [source code]

      -
      #!/usr/bin/env python
      -# -*- noplot -*-
      -
      -from __future__ import print_function
      -
      -import os, sys
      -from pylab import *
      -
      -files = []
      -figure(figsize=(5,5))
      -ax = subplot(111)
      -for i in range(50):  # 50 frames
      -    cla()
      -    imshow(rand(5,5), interpolation='nearest')
      -    fname = '_tmp%03d.png'%i
      -    print('Saving frame', fname)
      -    savefig(fname)
      -    files.append(fname)
      -
      -print('Making movie animation.mpg - this make take a while')
      -os.system("mencoder 'mf://_tmp*.png' -mf type=png:fps=10 -ovc lavc -lavcopts vcodec=wmv2 -oac copy -o animation.mpg")
      -#os.system("convert _tmp*.png animation.mng")
      -
      -# cleanup
      -for fname in files: os.remove(fname)
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/pylab_examples/movie_demo.py b/dev/examples/pylab_examples/movie_demo.py deleted file mode 100644 index 7748c3b53d6..00000000000 --- a/dev/examples/pylab_examples/movie_demo.py +++ /dev/null @@ -1,25 +0,0 @@ -#!/usr/bin/env python -# -*- noplot -*- - -from __future__ import print_function - -import os, sys -from pylab import * - -files = [] -figure(figsize=(5,5)) -ax = subplot(111) -for i in range(50): # 50 frames - cla() - imshow(rand(5,5), interpolation='nearest') - fname = '_tmp%03d.png'%i - print('Saving frame', fname) - savefig(fname) - files.append(fname) - -print('Making movie animation.mpg - this make take a while') -os.system("mencoder 'mf://_tmp*.png' -mf type=png:fps=10 -ovc lavc -lavcopts vcodec=wmv2 -oac copy -o animation.mpg") -#os.system("convert _tmp*.png animation.mng") - -# cleanup -for fname in files: os.remove(fname) diff --git a/dev/examples/pylab_examples/mri_demo.html b/dev/examples/pylab_examples/mri_demo.html deleted file mode 100644 index bd7be6dd1dd..00000000000 --- a/dev/examples/pylab_examples/mri_demo.html +++ /dev/null @@ -1,165 +0,0 @@ - - - - - - - - pylab_examples example code: mri_demo.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      pylab_examples example code: mri_demo.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/mri_demo.png -
      -
      #!/usr/bin/env python
      -
      -from __future__ import print_function
      -from pylab import *
      -import matplotlib.cbook as cbook
      -# data are 256x256 16 bit integers
      -dfile = cbook.get_sample_data('s1045.ima.gz')
      -im = np.fromstring(dfile.read(), np.uint16).astype(float)
      -im.shape = 256, 256
      -
      -#imshow(im, ColormapJet(256))
      -imshow(im, cmap=cm.gray)
      -axis('off')
      -
      -show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/pylab_examples/mri_with_eeg.html b/dev/examples/pylab_examples/mri_with_eeg.html deleted file mode 100644 index ce4131298fd..00000000000 --- a/dev/examples/pylab_examples/mri_with_eeg.html +++ /dev/null @@ -1,228 +0,0 @@ - - - - - - - - pylab_examples example code: mri_with_eeg.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      pylab_examples example code: mri_with_eeg.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/mri_with_eeg.png -
      -
      #!/usr/bin/env python
      -
      -"""
      -This now uses the imshow command instead of pcolor which *is much
      -faster*
      -"""
      -from __future__ import division, print_function
      -
      -import numpy as np
      -
      -from matplotlib.pyplot import *
      -from matplotlib.collections import LineCollection
      -import matplotlib.cbook as cbook
      -# I use if 1 to break up the different regions of code visually
      -
      -if 1:   # load the data
      -    # data are 256x256 16 bit integers
      -    dfile = cbook.get_sample_data('s1045.ima.gz')
      -    im = np.fromstring(dfile.read(), np.uint16).astype(float)
      -    im.shape = 256, 256
      -
      -if 1: # plot the MRI in pcolor
      -    subplot(221)
      -    imshow(im, cmap=cm.gray)
      -    axis('off')
      -
      -if 1:  # plot the histogram of MRI intensity
      -    subplot(222)
      -    im = np.ravel(im)
      -    im = im[np.nonzero(im)] # ignore the background
      -    im = im/(2.0**15) # normalize
      -    hist(im, 100)
      -    xticks([-1, -.5, 0, .5, 1])
      -    yticks([])
      -    xlabel('intensity')
      -    ylabel('MRI density')
      -
      -if 1:   # plot the EEG
      -    # load the data
      -
      -    numSamples, numRows = 800,4
      -    eegfile = cbook.get_sample_data('eeg.dat', asfileobj=False)
      -    print ('loading eeg %s' % eegfile)
      -    data = np.fromstring(open(eegfile, 'rb').read(), float)
      -    data.shape = numSamples, numRows
      -    t = 10.0 * np.arange(numSamples, dtype=float)/numSamples
      -    ticklocs = []
      -    ax = subplot(212)
      -    xlim(0,10)
      -    xticks(np.arange(10))
      -    dmin = data.min()
      -    dmax = data.max()
      -    dr = (dmax - dmin)*0.7 # Crowd them a bit.
      -    y0 = dmin
      -    y1 = (numRows-1) * dr + dmax
      -    ylim(y0, y1)
      -
      -    segs = []
      -    for i in range(numRows):
      -        segs.append(np.hstack((t[:,np.newaxis], data[:,i,np.newaxis])))
      -        ticklocs.append(i*dr)
      -
      -    offsets = np.zeros((numRows,2), dtype=float)
      -    offsets[:,1] = ticklocs
      -
      -    lines = LineCollection(segs, offsets=offsets,
      -                           transOffset=None,
      -                           )
      -
      -    ax.add_collection(lines)
      -
      -    # set the yticks to use axes coords on the y axis
      -    ax.set_yticks(ticklocs)
      -    ax.set_yticklabels(['PG3', 'PG5', 'PG7', 'PG9'])
      -
      -    xlabel('time (s)')
      -
      -show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/pylab_examples/multi_image.html b/dev/examples/pylab_examples/multi_image.html deleted file mode 100644 index f2948447c52..00000000000 --- a/dev/examples/pylab_examples/multi_image.html +++ /dev/null @@ -1,227 +0,0 @@ - - - - - - - - pylab_examples example code: multi_image.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      pylab_examples example code: multi_image.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/multi_image.png -
      -
      #!/usr/bin/env python
      -'''
      -Make a set of images with a single colormap, norm, and colorbar.
      -
      -It also illustrates colorbar tick labelling with a multiplier.
      -'''
      -
      -from matplotlib.pyplot import figure, show, axes, sci
      -from matplotlib import cm, colors
      -from matplotlib.font_manager import FontProperties
      -from numpy import amin, amax, ravel
      -from numpy.random import rand
      -
      -Nr = 3
      -Nc = 2
      -
      -fig = figure()
      -cmap = cm.cool
      -
      -figtitle = 'Multiple images'
      -t = fig.text(0.5, 0.95, figtitle,
      -               horizontalalignment='center',
      -               fontproperties=FontProperties(size=16))
      -
      -cax = fig.add_axes([0.2, 0.08, 0.6, 0.04])
      -
      -w = 0.4
      -h = 0.22
      -ax = []
      -images = []
      -vmin = 1e40
      -vmax = -1e40
      -for i in range(Nr):
      -    for j in range(Nc):
      -        pos = [0.075 + j*1.1*w, 0.18 + i*1.2*h, w, h]
      -        a = fig.add_axes(pos)
      -        if i > 0:
      -            a.set_xticklabels([])
      -        # Make some fake data with a range that varies
      -        # somewhat from one plot to the next.
      -        data =((1+i+j)/10.0)*rand(10,20)*1e-6
      -        dd = ravel(data)
      -        # Manually find the min and max of all colors for
      -        # use in setting the color scale.
      -        vmin = min(vmin, amin(dd))
      -        vmax = max(vmax, amax(dd))
      -        images.append(a.imshow(data, cmap=cmap))
      -
      -        ax.append(a)
      -
      -# Set the first image as the master, with all the others
      -# observing it for changes in cmap or norm.
      -
      -class ImageFollower:
      -    'update image in response to changes in clim or cmap on another image'
      -    def __init__(self, follower):
      -        self.follower = follower
      -    def __call__(self, leader):
      -        self.follower.set_cmap(leader.get_cmap())
      -        self.follower.set_clim(leader.get_clim())
      -
      -norm = colors.Normalize(vmin=vmin, vmax=vmax)
      -for i, im in enumerate(images):
      -    im.set_norm(norm)
      -    if i > 0:
      -        images[0].callbacksSM.connect('changed', ImageFollower(im))
      -
      -# The colorbar is also based on this master image.
      -fig.colorbar(images[0], cax, orientation='horizontal')
      -
      -# We need the following only if we want to run this interactively and
      -# modify the colormap:
      -
      -axes(ax[0])     # Return the current axes to the first one,
      -sci(images[0])  # because the current image must be in current axes.
      -
      -show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/pylab_examples/multicolored_line.html b/dev/examples/pylab_examples/multicolored_line.html deleted file mode 100644 index d038d21e403..00000000000 --- a/dev/examples/pylab_examples/multicolored_line.html +++ /dev/null @@ -1,208 +0,0 @@ - - - - - - - - pylab_examples example code: multicolored_line.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      pylab_examples example code: multicolored_line.py

      -

      (Source code)

      -
      -../../_images/multicolored_line_00.png -

      (png, hires.png, pdf)

      -
      -
      -../../_images/multicolored_line_01.png -

      (png, hires.png, pdf)

      -
      -
      #!/usr/bin/env python
      -'''
      -Color parts of a line based on its properties, e.g., slope.
      -'''
      -import numpy as np
      -import matplotlib.pyplot as plt
      -from matplotlib.collections import LineCollection
      -from matplotlib.colors import ListedColormap, BoundaryNorm
      -
      -x = np.linspace(0, 3 * np.pi, 500)
      -y = np.sin(x)
      -z = np.cos(0.5 * (x[:-1] + x[1:]))  # first derivative
      -
      -# Create a colormap for red, green and blue and a norm to color
      -# f' < -0.5 red, f' > 0.5 blue, and the rest green
      -cmap = ListedColormap(['r', 'g', 'b'])
      -norm = BoundaryNorm([-1, -0.5, 0.5, 1], cmap.N)
      -
      -# Create a set of line segments so that we can color them individually
      -# This creates the points as a N x 1 x 2 array so that we can stack points
      -# together easily to get the segments. The segments array for line collection
      -# needs to be numlines x points per line x 2 (x and y)
      -points = np.array([x, y]).T.reshape(-1, 1, 2)
      -segments = np.concatenate([points[:-1], points[1:]], axis=1)
      -
      -# Create the line collection object, setting the colormapping parameters.
      -# Have to set the actual values used for colormapping separately.
      -lc = LineCollection(segments, cmap=cmap, norm=norm)
      -lc.set_array(z)
      -lc.set_linewidth(3)
      -
      -fig1 = plt.figure()
      -plt.gca().add_collection(lc)
      -plt.xlim(x.min(), x.max())
      -plt.ylim(-1.1, 1.1)
      -
      -# Now do a second plot coloring the curve using a continuous colormap
      -t = np.linspace(0, 10, 200)
      -x = np.cos(np.pi * t)
      -y = np.sin(t)
      -points = np.array([x, y]).T.reshape(-1, 1, 2)
      -segments = np.concatenate([points[:-1], points[1:]], axis=1)
      -
      -lc = LineCollection(segments, cmap=plt.get_cmap('copper'),
      -    norm=plt.Normalize(0, 10))
      -lc.set_array(t)
      -lc.set_linewidth(3)
      -
      -fig2 = plt.figure()
      -plt.gca().add_collection(lc)
      -plt.xlim(-1, 1)
      -plt.ylim(-1, 1)
      -plt.show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/pylab_examples/multiline.html b/dev/examples/pylab_examples/multiline.html deleted file mode 100644 index 0f7a1b4ae05..00000000000 --- a/dev/examples/pylab_examples/multiline.html +++ /dev/null @@ -1,196 +0,0 @@ - - - - - - - - pylab_examples example code: multiline.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      pylab_examples example code: multiline.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/multiline.png -
      -
      #!/usr/bin/env python
      -from pylab import *
      -#from matplotlib.pyplot import *
      -#from numpy import arange
      -
      -if 1:
      -    figure(figsize=(7, 4))
      -    ax = subplot(121)
      -    ax.set_aspect(1)
      -    plot(arange(10))
      -    xlabel('this is a xlabel\n(with newlines!)')
      -    ylabel('this is vertical\ntest', multialignment='center')
      -    #ylabel('this is another!')
      -    text(2, 7,'this is\nyet another test',
      -         rotation=45,
      -         horizontalalignment = 'center',
      -         verticalalignment   = 'top',
      -         multialignment      = 'center')
      -
      -    grid(True)
      -
      -
      -
      -    subplot(122)
      -
      -    text(0.29, 0.7, "Mat\nTTp\n123", size=18,
      -         va="baseline", ha="right", multialignment="left",
      -         bbox=dict(fc="none"))
      -
      -    text(0.34, 0.7, "Mag\nTTT\n123", size=18,
      -         va="baseline", ha="left", multialignment="left",
      -         bbox=dict(fc="none"))
      -
      -    text(0.95, 0.7, "Mag\nTTT$^{A^A}$\n123", size=18,
      -         va="baseline", ha="right", multialignment="left",
      -         bbox=dict(fc="none"))
      -
      -    xticks([0.2, 0.4, 0.6, 0.8, 1.],
      -           ["Jan\n2009","Feb\n2009","Mar\n2009", "Apr\n2009", "May\n2009"])
      -
      -    axhline(0.7)
      -    title("test line spacing for multiline text")
      -
      -subplots_adjust(bottom=0.25, top=0.8)
      -draw()
      -show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/pylab_examples/multipage_pdf.html b/dev/examples/pylab_examples/multipage_pdf.html deleted file mode 100644 index 93471f72e29..00000000000 --- a/dev/examples/pylab_examples/multipage_pdf.html +++ /dev/null @@ -1,190 +0,0 @@ - - - - - - - - pylab_examples example code: multipage_pdf.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      pylab_examples example code: multipage_pdf.py

      -

      (Source code)

      -
      # This is a demo of creating a pdf file with several pages.
      -
      -import datetime
      -import numpy as np
      -import matplotlib
      -from matplotlib.backends.backend_pdf import PdfPages
      -from pylab import *
      -
      -# Create the PdfPages object to which we will save the pages:
      -pdf = PdfPages('multipage_pdf.pdf')
      -
      -figure(figsize=(3,3))
      -plot(range(7), [3,1,4,1,5,9,2], 'r-o')
      -title('Page One')
      -savefig(pdf, format='pdf') # note the format='pdf' argument!
      -close()
      -
      -rc('text', usetex=True)
      -figure(figsize=(8,6))
      -x = np.arange(0,5,0.1)
      -plot(x, np.sin(x), 'b-')
      -title('Page Two')
      -pdf.savefig() # here's another way - or you could do pdf.savefig(1)
      -close()
      -
      -rc('text', usetex=False)
      -fig=figure(figsize=(4,5))
      -plot(x, x*x, 'ko')
      -title('Page Three')
      -pdf.savefig(fig) # or you can pass a Figure object to pdf.savefig
      -close()
      -
      -# We can also set the file's metadata via the PdfPages object:
      -d = pdf.infodict()
      -d['Title'] = 'Multipage PDF Example'
      -d['Author'] = u'Jouni K. Sepp\xe4nen'
      -d['Subject'] = 'How to create a multipage pdf file and set its metadata'
      -d['Keywords'] = 'PdfPages multipage keywords author title subject'
      -d['CreationDate'] = datetime.datetime(2009,11,13)
      -d['ModDate'] = datetime.datetime.today()
      -
      -# Remember to close the object - otherwise the file will not be usable
      -pdf.close()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/pylab_examples/multiple_figs_demo.html b/dev/examples/pylab_examples/multiple_figs_demo.html deleted file mode 100644 index 2856b79bb41..00000000000 --- a/dev/examples/pylab_examples/multiple_figs_demo.html +++ /dev/null @@ -1,184 +0,0 @@ - - - - - - - - pylab_examples example code: multiple_figs_demo.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      pylab_examples example code: multiple_figs_demo.py

      -

      (Source code)

      -
      -../../_images/multiple_figs_demo_00.png -

      (png, hires.png, pdf)

      -
      -
      -../../_images/multiple_figs_demo_01.png -

      (png, hires.png, pdf)

      -
      -
      #!/usr/bin/env python
      -# Working with multiple figure windows and subplots
      -from pylab import *
      -
      -t = arange(0.0, 2.0, 0.01)
      -s1 = sin(2*pi*t)
      -s2 = sin(4*pi*t)
      -
      -figure(1)
      -subplot(211)
      -plot(t,s1)
      -subplot(212)
      -plot(t,2*s1)
      -
      -figure(2)
      -plot(t,s2)
      -
      -# now switch back to figure 1 and make some changes
      -figure(1)
      -subplot(211)
      -plot(t,s2, 'gs')
      -setp(gca(), 'xticklabels', [])
      -
      -figure(1)
      -savefig('fig1')
      -figure(2)
      -savefig('fig2')
      -
      -show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/pylab_examples/multiple_yaxis_with_spines.html b/dev/examples/pylab_examples/multiple_yaxis_with_spines.html deleted file mode 100644 index f1194bc0a43..00000000000 --- a/dev/examples/pylab_examples/multiple_yaxis_with_spines.html +++ /dev/null @@ -1,204 +0,0 @@ - - - - - - - - pylab_examples example code: multiple_yaxis_with_spines.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      pylab_examples example code: multiple_yaxis_with_spines.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/multiple_yaxis_with_spines.png -
      -
      import matplotlib.pyplot as plt
      -
      -def make_patch_spines_invisible(ax):
      -    ax.set_frame_on(True)
      -    ax.patch.set_visible(False)
      -    for sp in ax.spines.itervalues():
      -        sp.set_visible(False)
      -
      -fig = plt.figure()
      -fig.subplots_adjust(right=0.75)
      -
      -host = fig.add_subplot(111)
      -par1 = host.twinx()
      -par2 = host.twinx()
      -
      -# Offset the right spine of par2.  The ticks and label have already been
      -# placed on the right by twinx above.
      -par2.spines["right"].set_position(("axes", 1.2))
      -# Having been created by twinx, par2 has its frame off, so the line of its
      -# detached spine is invisible.  First, activate the frame but make the patch
      -# and spines invisible.
      -make_patch_spines_invisible(par2)
      -# Second, show the right spine.
      -par2.spines["right"].set_visible(True)
      -
      -p1, = host.plot([0, 1, 2], [0, 1, 2], "b-", label="Density")
      -p2, = par1.plot([0, 1, 2], [0, 3, 2], "r-", label="Temperature")
      -p3, = par2.plot([0, 1, 2], [50, 30, 15], "g-", label="Velocity")
      -
      -host.set_xlim(0, 2)
      -host.set_ylim(0, 2)
      -par1.set_ylim(0, 4)
      -par2.set_ylim(1, 65)
      -
      -host.set_xlabel("Distance")
      -host.set_ylabel("Density")
      -par1.set_ylabel("Temperature")
      -par2.set_ylabel("Velocity")
      -
      -host.yaxis.label.set_color(p1.get_color())
      -par1.yaxis.label.set_color(p2.get_color())
      -par2.yaxis.label.set_color(p3.get_color())
      -
      -tkw = dict(size=4, width=1.5)
      -host.tick_params(axis='y', colors=p1.get_color(), **tkw)
      -par1.tick_params(axis='y', colors=p2.get_color(), **tkw)
      -par2.tick_params(axis='y', colors=p3.get_color(), **tkw)
      -host.tick_params(axis='x', **tkw)
      -
      -lines = [p1, p2, p3]
      -
      -host.legend(lines, [l.get_label() for l in lines])
      -
      -plt.show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/pylab_examples/nan_test.html b/dev/examples/pylab_examples/nan_test.html deleted file mode 100644 index afe3fce4370..00000000000 --- a/dev/examples/pylab_examples/nan_test.html +++ /dev/null @@ -1,181 +0,0 @@ - - - - - - - - pylab_examples example code: nan_test.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      pylab_examples example code: nan_test.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/nan_test.png -
      -
      #!/usr/bin/env python
      -"""
      -Example: simple line plots with NaNs inserted.
      -"""
      -from pylab import *
      -import numpy as np
      -
      -t = arange(0.0, 1.0+0.01, 0.01)
      -s = cos(2*2*pi*t)
      -t[41:60] = NaN
      -#t[50:60] = np.inf
      -
      -subplot(2,1,1)
      -plot(t, s, '-', lw=2)
      -
      -xlabel('time (s)')
      -ylabel('voltage (mV)')
      -title('A sine wave with a gap of NaNs between 0.4 and 0.6')
      -grid(True)
      -
      -subplot(2,1,2)
      -t[0] = NaN
      -t[-1] = NaN
      -plot(t, s, '-', lw=2)
      -title('Also with NaN in first and last point')
      -
      -xlabel('time (s)')
      -ylabel('more nans')
      -grid(True)
      -
      -show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/pylab_examples/newscalarformatter_demo.html b/dev/examples/pylab_examples/newscalarformatter_demo.html deleted file mode 100644 index 35f61f5dfb8..00000000000 --- a/dev/examples/pylab_examples/newscalarformatter_demo.html +++ /dev/null @@ -1,251 +0,0 @@ - - - - - - - - pylab_examples example code: newscalarformatter_demo.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      pylab_examples example code: newscalarformatter_demo.py

      -

      (Source code)

      -
      -../../_images/newscalarformatter_demo_00.png -

      (png, hires.png, pdf)

      -
      -
      -../../_images/newscalarformatter_demo_01.png -

      (png, hires.png, pdf)

      -
      -
      -../../_images/newscalarformatter_demo_02.png -

      (png, hires.png, pdf)

      -
      -
      -../../_images/newscalarformatter_demo_03.png -

      (png, hires.png, pdf)

      -
      -
      #!/usr/bin/env python
      -# Demonstrating the improvements and options of the proposed new ScalarFormatter
      -from pylab import *
      -from matplotlib.ticker import OldScalarFormatter
      -
      -x=frange(0,1,.01)
      -f=figure(figsize=(6,6))
      -f.text(0.5,0.975,'The old formatter',horizontalalignment='center',verticalalignment='top')
      -subplot(221)
      -plot(x*1e5+1e10,x*1e-10+1e-5)
      -gca().xaxis.set_major_formatter(OldScalarFormatter())
      -gca().yaxis.set_major_formatter(OldScalarFormatter())
      -subplot(222)
      -plot(x*1e5,x*1e-4)
      -gca().xaxis.set_major_formatter(OldScalarFormatter())
      -gca().yaxis.set_major_formatter(OldScalarFormatter())
      -subplot(223)
      -plot(-x*1e5-1e10,-x*1e-5-1e-10)
      -gca().xaxis.set_major_formatter(OldScalarFormatter())
      -gca().yaxis.set_major_formatter(OldScalarFormatter())
      -subplot(224)
      -plot(-x*1e5,-x*1e-4)
      -gca().xaxis.set_major_formatter(OldScalarFormatter())
      -gca().yaxis.set_major_formatter(OldScalarFormatter())
      -
      -x=frange(0,1,.01)
      -f=figure(figsize=(6,6))
      -f.text(0.5,0.975,'The new formatter, default settings',horizontalalignment='center',
      -       verticalalignment='top')
      -subplot(221)
      -plot(x*1e5+1e10,x*1e-10+1e-5)
      -gca().xaxis.set_major_formatter(ScalarFormatter())
      -gca().yaxis.set_major_formatter(ScalarFormatter())
      -subplot(222)
      -plot(x*1e5,x*1e-4)
      -gca().xaxis.set_major_formatter(ScalarFormatter())
      -gca().yaxis.set_major_formatter(ScalarFormatter())
      -subplot(223)
      -plot(-x*1e5-1e10,-x*1e-5-1e-10)
      -gca().xaxis.set_major_formatter(ScalarFormatter())
      -gca().yaxis.set_major_formatter(ScalarFormatter())
      -subplot(224)
      -plot(-x*1e5,-x*1e-4)
      -gca().xaxis.set_major_formatter(ScalarFormatter())
      -gca().yaxis.set_major_formatter(ScalarFormatter())
      -
      -x=frange(0,1,.01)
      -f=figure(figsize=(6,6))
      -f.text(0.5,0.975,'The new formatter, no numerical offset',horizontalalignment='center',
      -       verticalalignment='top')
      -subplot(221)
      -plot(x*1e5+1e10,x*1e-10+1e-5)
      -gca().xaxis.set_major_formatter(ScalarFormatter(useOffset=False))
      -gca().yaxis.set_major_formatter(ScalarFormatter(useOffset=False))
      -subplot(222)
      -plot(x*1e5,x*1e-4)
      -gca().xaxis.set_major_formatter(ScalarFormatter(useOffset=False))
      -gca().yaxis.set_major_formatter(ScalarFormatter(useOffset=False))
      -subplot(223)
      -plot(-x*1e5-1e10,-x*1e-5-1e-10)
      -gca().xaxis.set_major_formatter(ScalarFormatter(useOffset=False))
      -gca().yaxis.set_major_formatter(ScalarFormatter(useOffset=False))
      -subplot(224)
      -plot(-x*1e5,-x*1e-4)
      -gca().xaxis.set_major_formatter(ScalarFormatter(useOffset=False))
      -gca().yaxis.set_major_formatter(ScalarFormatter(useOffset=False))
      -
      -x=frange(0,1,.01)
      -f=figure(figsize=(6,6))
      -f.text(0.5,0.975,'The new formatter, with mathtext',horizontalalignment='center',
      -       verticalalignment='top')
      -subplot(221)
      -plot(x*1e5+1e10,x*1e-10+1e-5)
      -gca().xaxis.set_major_formatter(ScalarFormatter(useMathText=True))
      -gca().yaxis.set_major_formatter(ScalarFormatter(useMathText=True))
      -subplot(222)
      -plot(x*1e5,x*1e-4)
      -gca().xaxis.set_major_formatter(ScalarFormatter(useMathText=True))
      -gca().yaxis.set_major_formatter(ScalarFormatter(useMathText=True))
      -subplot(223)
      -plot(-x*1e5-1e10,-x*1e-5-1e-10)
      -gca().xaxis.set_major_formatter(ScalarFormatter(useMathText=True))
      -gca().yaxis.set_major_formatter(ScalarFormatter(useMathText=True))
      -subplot(224)
      -plot(-x*1e5,-x*1e-4)
      -gca().xaxis.set_major_formatter(ScalarFormatter(useMathText=True))
      -gca().yaxis.set_major_formatter(ScalarFormatter(useMathText=True))
      -show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/pylab_examples/patheffect_demo.html b/dev/examples/pylab_examples/patheffect_demo.html deleted file mode 100644 index 747e83899ec..00000000000 --- a/dev/examples/pylab_examples/patheffect_demo.html +++ /dev/null @@ -1,186 +0,0 @@ - - - - - - - - pylab_examples example code: patheffect_demo.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      pylab_examples example code: patheffect_demo.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/patheffect_demo.png -
      -
      import matplotlib.pyplot as plt
      -import matplotlib.patheffects as PathEffects
      -import numpy as np
      -
      -if 1:
      -    plt.figure(1, figsize=(8,3))
      -    ax1 = plt.subplot(131)
      -    ax1.imshow([[1,2],[2,3]])
      -    txt = ax1.annotate("test", (1., 1.), (0., 0),
      -                       arrowprops=dict(arrowstyle="->",
      -                                       connectionstyle="angle3", lw=2),
      -                       size=20, ha="center")
      -
      -    txt.set_path_effects([PathEffects.withStroke(linewidth=3,
      -                                                 foreground="w")])
      -    txt.arrow_patch.set_path_effects([PathEffects.Stroke(linewidth=5,
      -                                                         foreground="w"),
      -                                      PathEffects.Normal()])
      -
      -    ax2 = plt.subplot(132)
      -    arr = np.arange(25).reshape((5,5))
      -    ax2.imshow(arr)
      -    cntr = ax2.contour(arr, colors="k")
      -    clbls = ax2.clabel(cntr, fmt="%2.0f", use_clabeltext=True)
      -    plt.setp(clbls,
      -             path_effects=[PathEffects.withStroke(linewidth=3,
      -                                                  foreground="w")])
      -
      -
      -    # shadow as a path effect
      -    ax3 = plt.subplot(133)
      -    p1, = ax3.plot([0, 1], [0, 1])
      -    leg = ax3.legend([p1], ["Line 1"], fancybox=True, loc=2)
      -    leg.legendPatch.set_path_effects([PathEffects.withSimplePatchShadow()])
      -
      -    plt.show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/pylab_examples/pcolor_demo.html b/dev/examples/pylab_examples/pcolor_demo.html deleted file mode 100644 index 57d2f70f7c6..00000000000 --- a/dev/examples/pylab_examples/pcolor_demo.html +++ /dev/null @@ -1,207 +0,0 @@ - - - - - - - - pylab_examples example code: pcolor_demo.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      pylab_examples example code: pcolor_demo.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/pcolor_demo.png -
      -
      """
      -Demonstrates similarities between pcolor, pcolormesh, imshow and pcolorfast
      -for drawing quadrilateral grids.
      -
      -"""
      -import matplotlib.pyplot as plt
      -import numpy as np
      -
      -# make these smaller to increase the resolution
      -dx, dy = 0.15, 0.05
      -
      -# generate 2 2d grids for the x & y bounds
      -y, x = np.mgrid[slice(-3, 3 + dy, dy),
      -                slice(-3, 3 + dx, dx)]
      -z = (1 - x / 2. + x ** 5 + y ** 3) * np.exp(-x ** 2 - y ** 2)
      -# x and y are bounds, so z should be the value *inside* those bounds.
      -# Therefore, remove the last value from the z array.
      -z = z[:-1, :-1]
      -z_min, z_max = -np.abs(z).max(), np.abs(z).max()
      -
      -
      -
      -plt.subplot(2, 2, 1)
      -plt.pcolor(x, y, z, cmap='RdBu', vmin=z_min, vmax=z_max)
      -plt.title('pcolor')
      -# set the limits of the plot to the limits of the data
      -plt.axis([x.min(), x.max(), y.min(), y.max()])
      -plt.colorbar()
      -
      -
      -
      -plt.subplot(2, 2, 2)
      -plt.pcolormesh(x, y, z, cmap='RdBu', vmin=z_min, vmax=z_max)
      -plt.title('pcolormesh')
      -# set the limits of the plot to the limits of the data
      -plt.axis([x.min(), x.max(), y.min(), y.max()])
      -plt.colorbar()
      -
      -
      -
      -plt.subplot(2, 2, 3)
      -plt.imshow(z, cmap='RdBu', vmin=z_min, vmax=z_max,
      -           extent=[x.min(), x.max(), y.min(), y.max()],
      -           interpolation='nearest', origin='lower')
      -plt.title('image (interp. nearest)')
      -plt.colorbar()
      -
      -
      -
      -ax = plt.subplot(2, 2, 4)
      -ax.pcolorfast(x, y, z, cmap='RdBu', vmin=z_min, vmax=z_max)
      -plt.title('pcolorfast')
      -plt.colorbar()
      -
      -
      -
      -plt.show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/pylab_examples/pcolor_demo2.html b/dev/examples/pylab_examples/pcolor_demo2.html deleted file mode 100644 index eba6ef7d65d..00000000000 --- a/dev/examples/pylab_examples/pcolor_demo2.html +++ /dev/null @@ -1,185 +0,0 @@ - - - - - - - - - - pylab_examples example code: pcolor_demo2.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      pylab_examples example code: pcolor_demo2.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/pcolor_demo2.png -
      -
      #!/usr/bin/env python
      -"""
      -See pcolor_demo2 for a much faster way of generating pcolor plots
      -"""
      -from __future__ import division
      -from pylab import *
      -
      -def func3(x,y):
      -    return (1- x/2 + x**5 + y**3)*exp(-x**2-y**2)
      -
      -
      -# make these smaller to increase the resolution
      -dx, dy = 0.05, 0.05
      -
      -x = arange(-3.0, 3.0, dx)
      -y = arange(-3.0, 3.0, dy)
      -X,Y = meshgrid(x, y)
      -
      -Z = func3(X, Y)
      -
      -
      -ax = subplot(111)
      -im = imshow(Z, cmap=cm.RdBu, vmax=abs(Z).max(), vmin=-abs(Z).max())
      -#im.set_interpolation('nearest')
      -#im.set_interpolation('bicubic')
      -im.set_interpolation('bilinear')
      -#ax.set_image_extent(-3, 3, -3, 3)
      -
      -show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/pylab_examples/pcolor_log.html b/dev/examples/pylab_examples/pcolor_log.html deleted file mode 100644 index d37a28b7fdd..00000000000 --- a/dev/examples/pylab_examples/pcolor_log.html +++ /dev/null @@ -1,174 +0,0 @@ - - - - - - - - pylab_examples example code: pcolor_log.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      pylab_examples example code: pcolor_log.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/pcolor_log.png -
      -
      import matplotlib.pyplot as plt
      -from matplotlib.colors import LogNorm
      -import numpy as np
      -from matplotlib.mlab import bivariate_normal
      -
      -
      -N = 100
      -X, Y = np.mgrid[-3:3:complex(0, N), -2:2:complex(0, N)]
      -
      -# A low hump with a spike coming out of the top right.
      -# Needs to have z/colour axis on a log scale so we see both hump and spike.
      -# linear scale only shows the spike.
      -Z1 = bivariate_normal(X, Y, 0.1, 0.2, 1.0, 1.0) + 0.1 * bivariate_normal(X, Y, 1.0, 1.0, 0.0, 0.0)
      -
      -plt.subplot(2,1,1)
      -plt.pcolor(X, Y, Z1, norm=LogNorm(vmin=Z1.min(), vmax=Z1.max()), cmap='PuBu_r')
      -plt.colorbar()
      -
      -plt.subplot(2,1,2)
      -plt.pcolor(X, Y, Z1, cmap='PuBu_r')
      -plt.colorbar()
      -
      -
      -plt.show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/pylab_examples/pcolor_small.html b/dev/examples/pylab_examples/pcolor_small.html deleted file mode 100644 index f24fcfc1891..00000000000 --- a/dev/examples/pylab_examples/pcolor_small.html +++ /dev/null @@ -1,164 +0,0 @@ - - - - - - - - pylab_examples example code: pcolor_small.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      pylab_examples example code: pcolor_small.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/pcolor_small.png -
      -
      import matplotlib.pyplot as plt
      -from numpy.random import rand
      -
      -Z = rand(6,10)
      -
      -plt.subplot(2,1,1)
      -c = plt.pcolor(Z)
      -plt.title('default: no edges')
      -
      -plt.subplot(2,1,2)
      -c = plt.pcolor(Z, edgecolors='k', linewidths=4)
      -plt.title('thick edges')
      -
      -plt.show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/pylab_examples/pie_demo.html b/dev/examples/pylab_examples/pie_demo.html deleted file mode 100644 index 9a329497ee1..00000000000 --- a/dev/examples/pylab_examples/pie_demo.html +++ /dev/null @@ -1,186 +0,0 @@ - - - - - - - - - - pylab_examples example code: pie_demo.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      pylab_examples example code: pie_demo.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/pie_demo.png -
      -
      """
      -Make a pie chart - see
      -http://matplotlib.sf.net/matplotlib.pylab.html#-pie for the docstring.
      -
      -This example shows a basic pie chart with labels optional features,
      -like autolabeling the percentage, offsetting a slice with "explode",
      -adding a shadow, and changing the starting angle.
      -
      -"""
      -from pylab import *
      -
      -# make a square figure and axes
      -figure(1, figsize=(6,6))
      -ax = axes([0.1, 0.1, 0.8, 0.8])
      -
      -# The slices will be ordered and plotted counter-clockwise.
      -labels = 'Frogs', 'Hogs', 'Dogs', 'Logs'
      -fracs = [15, 30, 45, 10]
      -explode=(0, 0.05, 0, 0)
      -
      -pie(fracs, explode=explode, labels=labels,
      -                autopct='%1.1f%%', shadow=True, startangle=90)
      -                # The default startangle is 0, which would start
      -                # the Frogs slice on the x-axis.  With startangle=90,
      -                # everything is rotated counter-clockwise by 90 degrees,
      -                # so the plotting starts on the positive y-axis.
      -
      -title('Raining Hogs and Dogs', bbox={'facecolor':'0.8', 'pad':5})
      -
      -show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/pylab_examples/pie_demo2.html b/dev/examples/pylab_examples/pie_demo2.html deleted file mode 100644 index c922ca7296d..00000000000 --- a/dev/examples/pylab_examples/pie_demo2.html +++ /dev/null @@ -1,208 +0,0 @@ - - - - - - - - pylab_examples example code: pie_demo2.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      pylab_examples example code: pie_demo2.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/pie_demo2.png -
      -
      """
      -Make a pie charts of varying size - see
      -http://matplotlib.org/api/pyplot_api.html#matplotlib.pyplot.pie for the docstring.
      -
      -This example shows a basic pie charts with labels optional features,
      -like autolabeling the percentage, offsetting a slice with "explode"
      -and adding a shadow, in different sizes.
      -
      -"""
      -import matplotlib.pyplot as plt
      -from matplotlib.gridspec import GridSpec
      -
      -# Some data
      -
      -labels = 'Frogs', 'Hogs', 'Dogs', 'Logs'
      -fracs = [15, 30, 45, 10]
      -
      -explode=(0, 0.05, 0, 0)
      -
      -# Make square figures and axes
      -
      -the_grid = GridSpec(2, 2)
      -
      -plt.subplot(the_grid[0, 0], aspect=1)
      -
      -plt.pie(fracs, labels=labels, autopct='%1.1f%%', shadow=True)
      -
      -plt.subplot(the_grid[0, 1], aspect=1)
      -
      -plt.pie(fracs, explode=explode, labels=labels, autopct='%.0f%%', shadow=True)
      -
      -plt.subplot(the_grid[1, 0], aspect=1)
      -
      -patches, texts, autotexts = plt.pie(fracs, labels=labels,
      -                                    autopct='%.0f%%',
      -                                    shadow=True, radius=0.5)
      -
      -# Make the labels on the small plot easier to read.
      -for t in texts:
      -    t.set_size('smaller')
      -for t in autotexts:
      -    t.set_size('x-small')
      -autotexts[0].set_color('y')
      -
      -plt.subplot(the_grid[1, 1], aspect=1)
      -
      -patches, texts, autotexts = plt.pie(fracs, explode=explode,
      -                                labels=labels, autopct='%.0f%%',
      -                                shadow=False, radius=0.5)
      -                                # Turn off shadow for tiny plot
      -                                # with exploded slice.
      -for t in texts:
      -    t.set_size('smaller')
      -for t in autotexts:
      -    t.set_size('x-small')
      -autotexts[0].set_color('y')
      -
      -plt.show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/pylab_examples/plotfile_demo.html b/dev/examples/pylab_examples/plotfile_demo.html deleted file mode 100644 index ae72385a360..00000000000 --- a/dev/examples/pylab_examples/plotfile_demo.html +++ /dev/null @@ -1,214 +0,0 @@ - - - - - - - - pylab_examples example code: plotfile_demo.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      pylab_examples example code: plotfile_demo.py

      -

      (Source code)

      -
      -../../_images/plotfile_demo_00.png -

      (png, hires.png, pdf)

      -
      -
      -../../_images/plotfile_demo_01.png -

      (png, hires.png, pdf)

      -
      -
      -../../_images/plotfile_demo_02.png -

      (png, hires.png, pdf)

      -
      -
      -../../_images/plotfile_demo_03.png -

      (png, hires.png, pdf)

      -
      -
      -../../_images/plotfile_demo_04.png -

      (png, hires.png, pdf)

      -
      -
      -../../_images/plotfile_demo_05.png -

      (png, hires.png, pdf)

      -
      -
      -../../_images/plotfile_demo_06.png -

      (png, hires.png, pdf)

      -
      -
      -../../_images/plotfile_demo_07.png -

      (png, hires.png, pdf)

      -
      -
      from pylab import plotfile, show, gca
      -import matplotlib.cbook as cbook
      -
      -fname = cbook.get_sample_data('msft.csv', asfileobj=False)
      -fname2 = cbook.get_sample_data('data_x_x2_x3.csv', asfileobj=False)
      -
      -# test 1; use ints
      -plotfile(fname, (0,5,6))
      -
      -# test 2; use names
      -plotfile(fname, ('date', 'volume', 'adj_close'))
      -
      -# test 3; use semilogy for volume
      -plotfile(fname, ('date', 'volume', 'adj_close'), plotfuncs={'volume': 'semilogy'})
      -
      -# test 4; use semilogy for volume
      -plotfile(fname, (0,5,6), plotfuncs={5:'semilogy'})
      -
      -#test 5; single subplot
      -plotfile(fname, ('date', 'open', 'high', 'low', 'close'), subplots=False)
      -
      -# test 6; labeling, if no names in csv-file
      -plotfile(fname2, cols=(0,1,2), delimiter=' ',
      -         names=['$x$', '$f(x)=x^2$', '$f(x)=x^3$'])
      -
      -# test 7; more than one file per figure--illustrated here with a single file
      -plotfile(fname2, cols=(0, 1), delimiter=' ')
      -plotfile(fname2, cols=(0, 2), newfig=False, delimiter=' ') # use current figure
      -gca().set_xlabel(r'$x$')
      -gca().set_ylabel(r'$f(x) = x^2, x^3$')
      -
      -# test 8; use bar for volume
      -plotfile(fname, (0,5,6), plotfuncs={5:'bar'})
      -
      -show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/pylab_examples/polar_bar.html b/dev/examples/pylab_examples/polar_bar.html deleted file mode 100644 index 1d7bb8fa6b8..00000000000 --- a/dev/examples/pylab_examples/polar_bar.html +++ /dev/null @@ -1,177 +0,0 @@ - - - - - - - - - - pylab_examples example code: polar_bar.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      pylab_examples example code: polar_bar.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/polar_bar.png -
      -
      #!/usr/bin/env python
      -
      -import numpy as np
      -import matplotlib.cm as cm
      -from matplotlib.pyplot import figure, show, rc
      -
      -
      -# force square figure and square axes looks better for polar, IMO
      -fig = figure(figsize=(8,8))
      -ax = fig.add_axes([0.1, 0.1, 0.8, 0.8], polar=True)
      -
      -N = 20
      -theta = np.arange(0.0, 2*np.pi, 2*np.pi/N)
      -radii = 10*np.random.rand(N)
      -width = np.pi/4*np.random.rand(N)
      -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.5)
      -
      -show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/pylab_examples/polar_demo.html b/dev/examples/pylab_examples/polar_demo.html deleted file mode 100644 index 631ce3f34c5..00000000000 --- a/dev/examples/pylab_examples/polar_demo.html +++ /dev/null @@ -1,167 +0,0 @@ - - - - - - - - pylab_examples example code: polar_demo.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      pylab_examples example code: polar_demo.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/polar_demo.png -
      -
      """
      -Demo of a line plot on a polar axis.
      -"""
      -import numpy as np
      -import matplotlib.pyplot as plt
      -
      -
      -r = np.arange(0, 3.0, 0.01)
      -theta = 2 * np.pi * r
      -
      -ax = plt.subplot(111, polar=True)
      -ax.plot(theta, r, color='r', linewidth=3)
      -ax.set_rmax(2.0)
      -ax.grid(True)
      -
      -ax.set_title("A line plot on a polar axis", va='bottom')
      -plt.show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/pylab_examples/polar_legend.html b/dev/examples/pylab_examples/polar_legend.html deleted file mode 100644 index 8b009b118ad..00000000000 --- a/dev/examples/pylab_examples/polar_legend.html +++ /dev/null @@ -1,171 +0,0 @@ - - - - - - - - pylab_examples example code: polar_legend.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      pylab_examples example code: polar_legend.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/polar_legend.png -
      -
      #!/usr/bin/env python
      -
      -import numpy as np
      -from matplotlib.pyplot import figure, show, rc
      -
      -# radar green, solid grid lines
      -rc('grid', color='#316931', linewidth=1, linestyle='-')
      -rc('xtick', labelsize=15)
      -rc('ytick', labelsize=15)
      -
      -# force square figure and square axes looks better for polar, IMO
      -fig = figure(figsize=(8,8))
      -ax = fig.add_axes([0.1, 0.1, 0.8, 0.8], polar=True, axisbg='#d5de9c')
      -
      -r = np.arange(0, 3.0, 0.01)
      -theta = 2*np.pi*r
      -ax.plot(theta, r, color='#ee8d18', lw=3, label='a line')
      -ax.plot(0.5*theta, r, color='blue', ls='--', lw=3, label='another line')
      -ax.legend()
      -
      -show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/pylab_examples/polar_scatter.html b/dev/examples/pylab_examples/polar_scatter.html deleted file mode 100644 index da93fa7f9fa..00000000000 --- a/dev/examples/pylab_examples/polar_scatter.html +++ /dev/null @@ -1,173 +0,0 @@ - - - - - - - - - - pylab_examples example code: polar_scatter.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      pylab_examples example code: polar_scatter.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/polar_scatter.png -
      -
      #!/usr/bin/env python
      -# a polar scatter plot; size increases radially in this example and
      -# color increases with angle (just to verify the symbols are being
      -# scattered correctly).  In a real example, this would be wasting
      -# dimensionality of the plot
      -from pylab import *
      -
      -N = 150
      -r = 2*rand(N)
      -theta = 2*pi*rand(N)
      -area = 200*r**2*rand(N)
      -colors = theta
      -ax = subplot(111, polar=True)
      -c = scatter(theta, r, c=colors, s=area, cmap=cm.hsv)
      -c.set_alpha(0.75)
      -
      -show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/pylab_examples/poormans_contour.html b/dev/examples/pylab_examples/poormans_contour.html deleted file mode 100644 index 232806f3bd5..00000000000 --- a/dev/examples/pylab_examples/poormans_contour.html +++ /dev/null @@ -1,184 +0,0 @@ - - - - - - - - - - pylab_examples example code: poormans_contour.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      pylab_examples example code: poormans_contour.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/poormans_contour.png -
      -
      #!/usr/bin/env python
      -"""
      -Use a pcolor or imshow with a custom colormap to make a contour plot.
      -
      -Since this example was initially written, a proper contour routine was
      -added to matplotlib - see contour_demo.py and
      -http://matplotlib.sf.net/matplotlib.pylab.html#-contour.
      -"""
      -
      -from pylab import *
      -
      -
      -delta = 0.01
      -x = arange(-3.0, 3.0, delta)
      -y = arange(-3.0, 3.0, delta)
      -X,Y = meshgrid(x, y)
      -Z1 = bivariate_normal(X, Y, 1.0, 1.0, 0.0, 0.0)
      -Z2 = bivariate_normal(X, Y, 1.5, 0.5, 1, 1)
      -Z = Z2 - Z1 # difference of Gaussians
      -
      -cmap = cm.get_cmap('PiYG', 11)    # 11 discrete colors
      -
      -im = imshow(Z, cmap=cmap, interpolation='bilinear',
      -            vmax=abs(Z).max(), vmin=-abs(Z).max())
      -axis('off')
      -colorbar()
      -
      -show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/pylab_examples/print_stdout.html b/dev/examples/pylab_examples/print_stdout.html deleted file mode 100644 index 7cb7f14fbe3..00000000000 --- a/dev/examples/pylab_examples/print_stdout.html +++ /dev/null @@ -1,160 +0,0 @@ - - - - - - - - pylab_examples example code: print_stdout.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      pylab_examples example code: print_stdout.py

      -

      [source code]

      -
      #!/usr/bin/env python
      -# -*- noplot -*-
      -# print png to standard out
      -# usage: python print_stdout.py > somefile.png
      -import sys
      -import matplotlib
      -matplotlib.use('Agg')
      -from pylab import *
      -
      -plot([1,2,3])
      -
      -savefig(sys.stdout)
      -show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/pylab_examples/print_stdout.py b/dev/examples/pylab_examples/print_stdout.py deleted file mode 100644 index 53b48e63514..00000000000 --- a/dev/examples/pylab_examples/print_stdout.py +++ /dev/null @@ -1,13 +0,0 @@ -#!/usr/bin/env python -# -*- noplot -*- -# print png to standard out -# usage: python print_stdout.py > somefile.png -import sys -import matplotlib -matplotlib.use('Agg') -from pylab import * - -plot([1,2,3]) - -savefig(sys.stdout) -show() diff --git a/dev/examples/pylab_examples/psd_demo.html b/dev/examples/pylab_examples/psd_demo.html deleted file mode 100644 index b542cff8b9c..00000000000 --- a/dev/examples/pylab_examples/psd_demo.html +++ /dev/null @@ -1,186 +0,0 @@ - - - - - - - - pylab_examples example code: psd_demo.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      pylab_examples example code: psd_demo.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/psd_demo1.png -
      -
      #!/usr/bin/env python
      -# python
      -
      -from pylab import *
      -
      -dt = 0.01
      -t = arange(0,10,dt)
      -nse = randn(len(t))
      -r = exp(-t/0.05)
      -
      -cnse = convolve(nse, r)*dt
      -cnse = cnse[:len(t)]
      -s = 0.1*sin(2*pi*t) + cnse
      -
      -subplot(211)
      -plot(t,s)
      -subplot(212)
      -psd(s, 512, 1/dt)
      -
      -show()
      -"""
      -% compare with MATLAB
      -dt = 0.01;
      -t = [0:dt:10];
      -nse = randn(size(t));
      -r = exp(-t/0.05);
      -cnse = conv(nse, r)*dt;
      -cnse = cnse(1:length(t));
      -s = 0.1*sin(2*pi*t) + cnse;
      -
      -subplot(211)
      -plot(t,s)
      -subplot(212)
      -psd(s, 512, 1/dt)
      -
      -"""
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/pylab_examples/psd_demo2.html b/dev/examples/pylab_examples/psd_demo2.html deleted file mode 100644 index edff1bb5122..00000000000 --- a/dev/examples/pylab_examples/psd_demo2.html +++ /dev/null @@ -1,192 +0,0 @@ - - - - - - - - pylab_examples example code: psd_demo2.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      pylab_examples example code: psd_demo2.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/psd_demo2.png -
      -
      #This example shows the effects of some of the different PSD parameters
      -import numpy as np
      -import matplotlib.pyplot as plt
      -
      -dt = np.pi / 100.
      -fs = 1. / dt
      -t = np.arange(0, 8, dt)
      -y = 10. * np.sin(2 * np.pi * 4 * t) + 5. * np.sin(2 * np.pi * 4.25 * t)
      -y = y + np.random.randn(*t.shape)
      -
      -#Plot the raw time series
      -fig = plt.figure()
      -fig.subplots_adjust(hspace=0.45, wspace=0.3)
      -ax = fig.add_subplot(2, 1, 1)
      -ax.plot(t, y)
      -
      -#Plot the PSD with different amounts of zero padding. This uses the entire
      -#time series at once
      -ax2 = fig.add_subplot(2, 3, 4)
      -ax2.psd(y, NFFT=len(t), pad_to=len(t), Fs=fs)
      -ax2.psd(y, NFFT=len(t), pad_to=len(t)*2, Fs=fs)
      -ax2.psd(y, NFFT=len(t), pad_to=len(t)*4, Fs=fs)
      -plt.title('zero padding')
      -
      -#Plot the PSD with different block sizes, Zero pad to the length of the original
      -#data sequence.
      -ax3 = fig.add_subplot(2, 3, 5, sharex=ax2, sharey=ax2)
      -ax3.psd(y, NFFT=len(t), pad_to=len(t), Fs=fs)
      -ax3.psd(y, NFFT=len(t)//2, pad_to=len(t), Fs=fs)
      -ax3.psd(y, NFFT=len(t)//4, pad_to=len(t), Fs=fs)
      -ax3.set_ylabel('')
      -plt.title('block size')
      -
      -#Plot the PSD with different amounts of overlap between blocks
      -ax4 = fig.add_subplot(2, 3, 6, sharex=ax2, sharey=ax2)
      -ax4.psd(y, NFFT=len(t)//2, pad_to=len(t), noverlap=0, Fs=fs)
      -ax4.psd(y, NFFT=len(t)//2, pad_to=len(t), noverlap=int(0.05*len(t)/2.), Fs=fs)
      -ax4.psd(y, NFFT=len(t)//2, pad_to=len(t), noverlap=int(0.2*len(t)/2.), Fs=fs)
      -ax4.set_ylabel('')
      -plt.title('overlap')
      -
      -plt.show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/pylab_examples/psd_demo3.html b/dev/examples/pylab_examples/psd_demo3.html deleted file mode 100644 index fe246d9f294..00000000000 --- a/dev/examples/pylab_examples/psd_demo3.html +++ /dev/null @@ -1,186 +0,0 @@ - - - - - - - - pylab_examples example code: psd_demo3.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      pylab_examples example code: psd_demo3.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/psd_demo3.png -
      -
      #This is a ported version of a MATLAB example from the signal processing
      -#toolbox that showed some difference at one time between Matplotlib's and
      -#MATLAB's scaling of the PSD.
      -
      -import numpy as np
      -import matplotlib.pyplot as plt
      -import matplotlib.mlab as mlab
      -
      -fs = 1000
      -t = np.linspace(0, 0.3, 301)
      -A = np.array([2, 8]).reshape(-1, 1)
      -f = np.array([150, 140]).reshape(-1, 1)
      -xn = (A * np.sin(2 * np.pi * f * t)).sum(axis=0) + 5 * np.random.randn(*t.shape)
      -
      -yticks = np.arange(-50, 30, 10)
      -xticks = np.arange(0,550,100)
      -plt.subplots_adjust(hspace=0.45, wspace=0.3)
      -plt.subplot(1,2,1)
      -
      -plt.psd(xn, NFFT=301, Fs=fs, window=mlab.window_none, pad_to=1024,
      -    scale_by_freq=True)
      -plt.title('Periodogram')
      -plt.yticks(yticks)
      -plt.xticks(xticks)
      -plt.grid(True)
      -
      -plt.subplot(1,2,2)
      -plt.psd(xn, NFFT=150, Fs=fs, window=mlab.window_none, noverlap=75, pad_to=512,
      -    scale_by_freq=True)
      -plt.title('Welch')
      -plt.xticks(xticks)
      -plt.yticks(yticks)
      -plt.ylabel('')
      -plt.grid(True)
      -
      -plt.show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/pylab_examples/psd_demo_complex.html b/dev/examples/pylab_examples/psd_demo_complex.html deleted file mode 100644 index 4c2b7c0cf8e..00000000000 --- a/dev/examples/pylab_examples/psd_demo_complex.html +++ /dev/null @@ -1,188 +0,0 @@ - - - - - - - - pylab_examples example code: psd_demo_complex.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      pylab_examples example code: psd_demo_complex.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/psd_demo_complex.png -
      -
      #This is a ported version of a MATLAB example from the signal processing
      -#toolbox that showed some difference at one time between Matplotlib's and
      -#MATLAB's scaling of the PSD.  This differs from psd_demo3.py in that
      -#this uses a complex signal, so we can see that complex PSD's work properly
      -import numpy as np
      -import matplotlib.pyplot as plt
      -import matplotlib.mlab as mlab
      -
      -fs = 1000
      -t = np.linspace(0, 0.3, 301)
      -A = np.array([2, 8]).reshape(-1, 1)
      -f = np.array([150, 140]).reshape(-1, 1)
      -xn = (A * np.exp(2j * np.pi * f * t)).sum(axis=0) + 5 * np.random.randn(*t.shape)
      -
      -yticks = np.arange(-50, 30, 10)
      -xticks = np.arange(-500,550,100)
      -plt.subplots_adjust(hspace=0.45, wspace=0.3)
      -ax = plt.subplot(1, 2, 1)
      -
      -plt.psd(xn, NFFT=301, Fs=fs, window=mlab.window_none, pad_to=1024,
      -    scale_by_freq=True)
      -plt.title('Periodogram')
      -plt.yticks(yticks)
      -plt.xticks(xticks)
      -plt.grid(True)
      -plt.xlim(-500, 500)
      -
      -plt.subplot(1, 2, 2, sharex=ax, sharey=ax)
      -plt.psd(xn, NFFT=150, Fs=fs, window=mlab.window_none, noverlap=75, pad_to=512,
      -    scale_by_freq=True)
      -plt.title('Welch')
      -plt.xticks(xticks)
      -plt.yticks(yticks)
      -plt.ylabel('')
      -plt.grid(True)
      -plt.xlim(-500, 500)
      -
      -plt.show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/pylab_examples/pstest.html b/dev/examples/pylab_examples/pstest.html deleted file mode 100644 index 6baff133fe0..00000000000 --- a/dev/examples/pylab_examples/pstest.html +++ /dev/null @@ -1,176 +0,0 @@ - - - - - - - - pylab_examples example code: pstest.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      pylab_examples example code: pstest.py

      -

      [source code]

      -
      #!/usr/bin/env python
      -# -*- noplot -*-
      -import matplotlib
      -matplotlib.use('PS')
      -from pylab import *
      -
      -def f(t):
      -    s1 = cos(2*pi*t)
      -    e1 = exp(-t)
      -    return multiply(s1,e1)
      -
      -t1 = arange(0.0, 5.0, .1)
      -t2 = arange(0.0, 5.0, 0.02)
      -t3 = arange(0.0, 2.0, 0.01)
      -
      -figure(1)
      -subplot(211)
      -l = plot(t1, f(t1), 'k^')
      -setp(l, markerfacecolor='k', markeredgecolor='r')
      -title('A tale of 2 subplots', fontsize=14, fontname='Courier')
      -ylabel('Signal 1', fontsize=12)
      -subplot(212)
      -l = plot(t1, f(t1), 'k>')
      -
      -
      -ylabel('Signal 2', fontsize=12)
      -xlabel('time (s)', fontsize=12)
      -
      -show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/pylab_examples/pstest.py b/dev/examples/pylab_examples/pstest.py deleted file mode 100644 index 4ddc925f811..00000000000 --- a/dev/examples/pylab_examples/pstest.py +++ /dev/null @@ -1,30 +0,0 @@ -#!/usr/bin/env python -# -*- noplot -*- -import matplotlib -matplotlib.use('PS') -from pylab import * - -def f(t): - s1 = cos(2*pi*t) - e1 = exp(-t) - return multiply(s1,e1) - -t1 = arange(0.0, 5.0, .1) -t2 = arange(0.0, 5.0, 0.02) -t3 = arange(0.0, 2.0, 0.01) - -figure(1) -subplot(211) -l = plot(t1, f(t1), 'k^') -setp(l, markerfacecolor='k', markeredgecolor='r') -title('A tale of 2 subplots', fontsize=14, fontname='Courier') -ylabel('Signal 1', fontsize=12) -subplot(212) -l = plot(t1, f(t1), 'k>') - - -ylabel('Signal 2', fontsize=12) -xlabel('time (s)', fontsize=12) - -show() - diff --git a/dev/examples/pylab_examples/pythonic_matplotlib.html b/dev/examples/pylab_examples/pythonic_matplotlib.html deleted file mode 100644 index cf9e2988f36..00000000000 --- a/dev/examples/pylab_examples/pythonic_matplotlib.html +++ /dev/null @@ -1,232 +0,0 @@ - - - - - - - - pylab_examples example code: pythonic_matplotlib.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      pylab_examples example code: pythonic_matplotlib.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/pythonic_matplotlib.png -
      -
      #!/usr/bin/env python
      -"""
      -Some people prefer to write more pythonic, object oriented, code
      -rather than use the pylab interface to matplotlib.  This example shows
      -you how.
      -
      -Unless you are an application developer, I recommend using part of the
      -pylab interface, particularly the figure, close, subplot, axes, and
      -show commands.  These hide a lot of complexity from you that you don't
      -need to see in normal figure creation, like instantiating DPI
      -instances, managing the bounding boxes of the figure elements,
      -creating and reaslizing GUI windows and embedding figures in them.
      -
      -
      -If you are an application developer and want to embed matplotlib in
      -your application, follow the lead of examples/embedding_in_wx.py,
      -examples/embedding_in_gtk.py or examples/embedding_in_tk.py.  In this
      -case you will want to control the creation of all your figures,
      -embedding them in application windows, etc.
      -
      -If you are a web application developer, you may want to use the
      -example in webapp_demo.py, which shows how to use the backend agg
      -figure canvase directly, with none of the globals (current figure,
      -current axes) that are present in the pylab interface.  Note that
      -there is no reason why the pylab interface won't work for web
      -application developers, however.
      -
      -If you see an example in the examples dir written in pylab interface,
      -and you want to emulate that using the true python method calls, there
      -is an easy mapping.  Many of those examples use 'set' to control
      -figure properties.  Here's how to map those commands onto instance
      -methods
      -
      -The syntax of set is
      -
      -  setp(object or sequence, somestring, attribute)
      -
      -if called with an object, set calls
      -
      -  object.set_somestring(attribute)
      -
      -if called with a sequence, set does
      -
      -  for object in sequence:
      -       object.set_somestring(attribute)
      -
      -So for your example, if a is your axes object, you can do
      -
      -  a.set_xticklabels([])
      -  a.set_yticklabels([])
      -  a.set_xticks([])
      -  a.set_yticks([])
      -"""
      -
      -
      -from pylab import figure, show
      -from numpy import arange, sin, pi
      -
      -t = arange(0.0, 1.0, 0.01)
      -
      -fig = figure(1)
      -
      -ax1 = fig.add_subplot(211)
      -ax1.plot(t, sin(2*pi*t))
      -ax1.grid(True)
      -ax1.set_ylim( (-2,2) )
      -ax1.set_ylabel('1 Hz')
      -ax1.set_title('A sine wave or two')
      -
      -for label in ax1.get_xticklabels():
      -    label.set_color('r')
      -
      -
      -ax2 = fig.add_subplot(212)
      -ax2.plot(t, sin(2*2*pi*t))
      -ax2.grid(True)
      -ax2.set_ylim( (-2,2) )
      -l = ax2.set_xlabel('Hi mom')
      -l.set_color('g')
      -l.set_fontsize('large')
      -
      -show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/pylab_examples/quadmesh_demo.html b/dev/examples/pylab_examples/quadmesh_demo.html deleted file mode 100644 index e8fd4ca0fbc..00000000000 --- a/dev/examples/pylab_examples/quadmesh_demo.html +++ /dev/null @@ -1,195 +0,0 @@ - - - - - - - - pylab_examples example code: quadmesh_demo.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      pylab_examples example code: quadmesh_demo.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/quadmesh_demo.png -
      -
      #!/usr/bin/env python
      -"""
      -pcolormesh uses a QuadMesh, a faster generalization of pcolor, but
      -with some restrictions.
      -
      -This demo illustrates a bug in quadmesh with masked data.
      -"""
      -
      -import numpy as np
      -from matplotlib.pyplot import figure, show, savefig
      -from matplotlib import cm, colors
      -from numpy import ma
      -
      -n = 12
      -x = np.linspace(-1.5,1.5,n)
      -y = np.linspace(-1.5,1.5,n*2)
      -X,Y = np.meshgrid(x,y);
      -Qx = np.cos(Y) - np.cos(X)
      -Qz = np.sin(Y) + np.sin(X)
      -Qx = (Qx + 1.1)
      -Z = np.sqrt(X**2 + Y**2)/5;
      -Z = (Z - Z.min()) / (Z.max() - Z.min())
      -
      -# The color array can include masked values:
      -Zm = ma.masked_where(np.fabs(Qz) < 0.5*np.amax(Qz), Z)
      -
      -
      -fig = figure()
      -ax = fig.add_subplot(121)
      -ax.set_axis_bgcolor("#bdb76b")
      -ax.pcolormesh(Qx,Qz,Z, shading='gouraud')
      -ax.set_title('Without masked values')
      -
      -ax = fig.add_subplot(122)
      -ax.set_axis_bgcolor("#bdb76b")
      -#  You can control the color of the masked region:
      -#cmap = cm.jet
      -#cmap.set_bad('r', 1.0)
      -#ax.pcolormesh(Qx,Qz,Zm, cmap=cmap)
      -#  Or use the default, which is transparent:
      -col = ax.pcolormesh(Qx,Qz,Zm,shading='gouraud')
      -ax.set_title('With masked values')
      -
      -
      -show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/pylab_examples/quiver_demo.html b/dev/examples/pylab_examples/quiver_demo.html deleted file mode 100644 index cf5d29aad14..00000000000 --- a/dev/examples/pylab_examples/quiver_demo.html +++ /dev/null @@ -1,254 +0,0 @@ - - - - - - - - pylab_examples example code: quiver_demo.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      pylab_examples example code: quiver_demo.py

      -

      (Source code)

      -
      -../../_images/quiver_demo_00.png -

      (png, hires.png, pdf)

      -
      -
      -../../_images/quiver_demo_01.png -

      (png, hires.png, pdf)

      -
      -
      -../../_images/quiver_demo_02.png -

      (png, hires.png, pdf)

      -
      -
      -../../_images/quiver_demo_03.png -

      (png, hires.png, pdf)

      -
      -
      -../../_images/quiver_demo_04.png -

      (png, hires.png, pdf)

      -
      -
      -../../_images/quiver_demo_05.png -

      (png, hires.png, pdf)

      -
      -
      '''
      -Demonstration of quiver and quiverkey functions. This is using the
      -new version coming from the code in quiver.py.
      -
      -Known problem: the plot autoscaling does not take into account
      -the arrows, so those on the boundaries are often out of the picture.
      -This is *not* an easy problem to solve in a perfectly general way.
      -The workaround is to manually expand the axes.
      -
      -'''
      -from pylab import *
      -from numpy import ma
      -
      -X,Y = meshgrid( arange(0,2*pi,.2),arange(0,2*pi,.2) )
      -U = cos(X)
      -V = sin(Y)
      -
      -#1
      -figure()
      -Q = quiver( U, V)
      -qk = quiverkey(Q, 0.5, 0.92, 2, r'$2 \frac{m}{s}$', labelpos='W',
      -               fontproperties={'weight': 'bold'})
      -l,r,b,t = axis()
      -dx, dy = r-l, t-b
      -axis([l-0.05*dx, r+0.05*dx, b-0.05*dy, t+0.05*dy])
      -
      -title('Minimal arguments, no kwargs')
      -
      -#2
      -figure()
      -Q = quiver( X, Y, U, V, units='width')
      -qk = quiverkey(Q, 0.9, 0.95, 2, r'$2 \frac{m}{s}$',
      -               labelpos='E',
      -               coordinates='figure',
      -               fontproperties={'weight': 'bold'})
      -axis([-1, 7, -1, 7])
      -title('scales with plot width, not view')
      -
      -#3
      -figure()
      -Q = quiver( X[::3, ::3], Y[::3, ::3], U[::3, ::3], V[::3, ::3],
      -            pivot='mid', color='r', units='inches' )
      -qk = quiverkey(Q, 0.5, 0.03, 1, r'$1 \frac{m}{s}$', fontproperties={'weight': 'bold'})
      -plot( X[::3, ::3], Y[::3, ::3], 'k.')
      -axis([-1, 7, -1, 7])
      -title("pivot='mid'; every third arrow; units='inches'")
      -
      -#4
      -figure()
      -M = sqrt(pow(U, 2) + pow(V, 2))
      -Q = quiver( X, Y, U, V, M, units='x', pivot='tip', width=0.022, scale=1/0.15)
      -qk = quiverkey(Q, 0.9, 1.05, 1, r'$1 \frac{m}{s}$',
      -                            labelpos='E',
      -                            fontproperties={'weight': 'bold'})
      -plot(X, Y, 'k.')
      -axis([-1, 7, -1, 7])
      -title("scales with x view; pivot='tip'")
      -
      -#5
      -figure()
      -Q = quiver( X[::3, ::3], Y[::3, ::3], U[::3, ::3], V[::3, ::3],
      -             color='r', units='x',
      -            linewidths=(2,), edgecolors=('k'), headaxislength=5 )
      -qk = quiverkey(Q, 0.5, 0.03, 1, r'$1 \frac{m}{s}$', fontproperties={'weight': 'bold'})
      -axis([-1, 7, -1, 7])
      -title("triangular head; scale with x view; black edges")
      -
      -#6
      -figure()
      -M = zeros(U.shape, dtype='bool')
      -M[U.shape[0]/3:2*U.shape[0]/3,U.shape[1]/3:2*U.shape[1]/3] = True
      -U = ma.masked_array(U, mask=M)
      -V = ma.masked_array(V, mask=M)
      -Q = quiver( U, V)
      -qk = quiverkey(Q, 0.5, 0.92, 2, r'$2 \frac{m}{s}$', labelpos='W',
      -               fontproperties={'weight': 'bold'})
      -l,r,b,t = axis()
      -dx, dy = r-l, t-b
      -axis([l-0.05*dx, r+0.05*dx, b-0.05*dy, t+0.05*dy])
      -title('Minimal arguments, no kwargs - masked values')
      -
      -
      -show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/pylab_examples/scatter_custom_symbol.html b/dev/examples/pylab_examples/scatter_custom_symbol.html deleted file mode 100644 index 1ff3ad4e127..00000000000 --- a/dev/examples/pylab_examples/scatter_custom_symbol.html +++ /dev/null @@ -1,168 +0,0 @@ - - - - - - - - pylab_examples example code: scatter_custom_symbol.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      pylab_examples example code: scatter_custom_symbol.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/scatter_custom_symbol.png -
      -
      from matplotlib.pyplot import figure, show
      -from numpy import arange, pi, cos, sin, pi
      -from numpy.random import rand
      -
      -# unit area ellipse
      -rx, ry = 3., 1.
      -area = rx * ry * pi
      -theta = arange(0, 2*pi+0.01, 0.1)
      -verts = list(zip(rx/area*cos(theta), ry/area*sin(theta)))
      -
      -x,y,s,c = rand(4, 30)
      -s*= 10**2.
      -
      -fig = figure()
      -ax = fig.add_subplot(111)
      -ax.scatter(x,y,s,c,marker=None,verts =verts)
      -
      -show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/pylab_examples/scatter_demo.html b/dev/examples/pylab_examples/scatter_demo.html deleted file mode 100644 index 37381bf5a77..00000000000 --- a/dev/examples/pylab_examples/scatter_demo.html +++ /dev/null @@ -1,166 +0,0 @@ - - - - - - - - - - pylab_examples example code: scatter_demo.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      pylab_examples example code: scatter_demo.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/scatter_demo.png -
      -
      #!/usr/bin/env python
      -from pylab import *
      -
      -N = 30
      -x = 0.9*rand(N)
      -y = 0.9*rand(N)
      -area = pi*(10 * rand(N))**2 # 0 to 10 point radiuses
      -scatter(x,y,s=area, marker='^', c='r')
      -
      -show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/pylab_examples/scatter_demo2.html b/dev/examples/pylab_examples/scatter_demo2.html deleted file mode 100644 index 34ac4df5c1d..00000000000 --- a/dev/examples/pylab_examples/scatter_demo2.html +++ /dev/null @@ -1,182 +0,0 @@ - - - - - - - - pylab_examples example code: scatter_demo2.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      pylab_examples example code: scatter_demo2.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/scatter_demo2.png -
      -
      """
      -Demo of scatter plot with varying marker colors and sizes.
      -"""
      -import numpy as np
      -import matplotlib.pyplot as plt
      -import matplotlib.cbook as cbook
      -
      -# 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')
      -price_data = np.load(datafile).view(np.recarray)
      -price_data = price_data[-250:] # get the most recent 250 trading days
      -
      -delta1 = np.diff(price_data.adj_close)/price_data.adj_close[:-1]
      -
      -# Marker size in units of points^2
      -volume = (15 * price_data.volume[:-2] / price_data.volume[0])**2
      -close = 0.003 * price_data.close[:-2] / 0.003 * price_data.open[:-2]
      -
      -fig, ax = plt.subplots()
      -ax.scatter(delta1[:-1], delta1[1:], c=close, s=volume, alpha=0.5)
      -
      -ax.set_xlabel(r'$\Delta_i$', fontsize=20)
      -ax.set_ylabel(r'$\Delta_{i+1}$', fontsize=20)
      -ax.set_title('Volume and percent change')
      -
      -ax.grid(True)
      -fig.tight_layout()
      -
      -plt.show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/pylab_examples/scatter_hist.html b/dev/examples/pylab_examples/scatter_hist.html deleted file mode 100644 index 4c4eab0538c..00000000000 --- a/dev/examples/pylab_examples/scatter_hist.html +++ /dev/null @@ -1,196 +0,0 @@ - - - - - - - - pylab_examples example code: scatter_hist.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      pylab_examples example code: scatter_hist.py

      -

      (Source code)

      -
      import numpy as np
      -import matplotlib.pyplot as plt
      -from matplotlib.ticker import NullFormatter
      -
      -# the random data
      -x = np.random.randn(1000)
      -y = np.random.randn(1000)
      -
      -nullfmt   = NullFormatter()         # no labels
      -
      -# definitions for the axes
      -left, width = 0.1, 0.65
      -bottom, height = 0.1, 0.65
      -bottom_h = left_h = left+width+0.02
      -
      -rect_scatter = [left, bottom, width, height]
      -rect_histx = [left, bottom_h, width, 0.2]
      -rect_histy = [left_h, bottom, 0.2, height]
      -
      -# start with a rectangular Figure
      -plt.figure(1, figsize=(8,8))
      -
      -axScatter = plt.axes(rect_scatter)
      -axHistx = plt.axes(rect_histx)
      -axHisty = plt.axes(rect_histy)
      -
      -# no labels
      -axHistx.xaxis.set_major_formatter(nullfmt)
      -axHisty.yaxis.set_major_formatter(nullfmt)
      -
      -# the scatter plot:
      -axScatter.scatter(x, y)
      -
      -# 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
      -
      -axScatter.set_xlim( (-lim, lim) )
      -axScatter.set_ylim( (-lim, lim) )
      -
      -bins = np.arange(-lim, lim + binwidth, binwidth)
      -axHistx.hist(x, bins=bins)
      -axHisty.hist(y, bins=bins, orientation='horizontal')
      -
      -axHistx.set_xlim( axScatter.get_xlim() )
      -axHisty.set_ylim( axScatter.get_ylim() )
      -
      -plt.show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/pylab_examples/scatter_masked.html b/dev/examples/pylab_examples/scatter_masked.html deleted file mode 100644 index e6b955ee3a9..00000000000 --- a/dev/examples/pylab_examples/scatter_masked.html +++ /dev/null @@ -1,169 +0,0 @@ - - - - - - - - pylab_examples example code: scatter_masked.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      pylab_examples example code: scatter_masked.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/scatter_masked.png -
      -
      #!/usr/bin/env python
      -from pylab import *
      -
      -N = 100
      -r0 = 0.6
      -x = 0.9*rand(N)
      -y = 0.9*rand(N)
      -area = pi*(10 * rand(N))**2 # 0 to 10 point radiuses
      -c = sqrt(area)
      -r = sqrt(x*x+y*y)
      -area1 = ma.masked_where(r < r0, area)
      -area2 = ma.masked_where(r >= r0, area)
      -scatter(x,y,s=area1, marker='^', c=c, hold='on')
      -scatter(x,y,s=area2, marker='o', c=c)
      -# Show the boundary between the regions:
      -theta = arange(0, pi/2, 0.01)
      -plot(r0*cos(theta), r0*sin(theta))
      -
      -show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/pylab_examples/scatter_profile.html b/dev/examples/pylab_examples/scatter_profile.html deleted file mode 100644 index 0a601fbe959..00000000000 --- a/dev/examples/pylab_examples/scatter_profile.html +++ /dev/null @@ -1,171 +0,0 @@ - - - - - - - - pylab_examples example code: scatter_profile.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      pylab_examples example code: scatter_profile.py

      -

      [source code]

      -
      #!/usr/bin/env python
      -# -*- noplot -*-
      -
      -"""
      -N       Classic     Base renderer    Ext renderer
      -20       0.22           0.14            0.14
      -100      0.16           0.14            0.13
      -1000     0.45           0.26            0.17
      -10000    3.30           1.31            0.53
      -50000    19.30          6.53            1.98
      -"""
      -from __future__ import print_function
      -import pylab
      -
      -import time
      -
      -
      -for N in (20,100,1000,10000,50000):
      -    tstart = time.time()
      -    x = 0.9*pylab.rand(N)
      -    y = 0.9*pylab.rand(N)
      -    s = 20*pylab.rand(N)
      -    pylab.scatter(x,y,s)
      -    print ('%d symbols in %1.2f s' % (N, time.time()-tstart))
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/pylab_examples/scatter_profile.py b/dev/examples/pylab_examples/scatter_profile.py deleted file mode 100644 index 36952bdfc8f..00000000000 --- a/dev/examples/pylab_examples/scatter_profile.py +++ /dev/null @@ -1,24 +0,0 @@ -#!/usr/bin/env python -# -*- noplot -*- - -""" -N Classic Base renderer Ext renderer -20 0.22 0.14 0.14 -100 0.16 0.14 0.13 -1000 0.45 0.26 0.17 -10000 3.30 1.31 0.53 -50000 19.30 6.53 1.98 -""" -from __future__ import print_function -import pylab - -import time - - -for N in (20,100,1000,10000,50000): - tstart = time.time() - x = 0.9*pylab.rand(N) - y = 0.9*pylab.rand(N) - s = 20*pylab.rand(N) - pylab.scatter(x,y,s) - print ('%d symbols in %1.2f s' % (N, time.time()-tstart)) diff --git a/dev/examples/pylab_examples/scatter_star_poly.html b/dev/examples/pylab_examples/scatter_star_poly.html deleted file mode 100644 index 16f930b32d5..00000000000 --- a/dev/examples/pylab_examples/scatter_star_poly.html +++ /dev/null @@ -1,180 +0,0 @@ - - - - - - - - pylab_examples example code: scatter_star_poly.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      pylab_examples example code: scatter_star_poly.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/scatter_star_poly.png -
      -
      import numpy as np
      -import matplotlib.pyplot as plt
      -
      -
      -x = np.random.rand(10)
      -y = np.random.rand(10)
      -z = np.sqrt(x**2 + y**2)
      -
      -plt.subplot(321)
      -plt.scatter(x,y,s=80, c=z, marker=">")
      -
      -plt.subplot(322)
      -plt.scatter(x,y,s=80, c=z, marker=(5,0))
      -
      -verts = list(zip([-1.,1.,1.,-1.],[-1.,-1.,1.,-1.]))
      -plt.subplot(323)
      -plt.scatter(x,y,s=80, c=z, marker=(verts,0))
      -# equivalent:
      -#plt.scatter(x,y,s=80, c=z, marker=None, verts=verts)
      -
      -plt.subplot(324)
      -plt.scatter(x,y,s=80, c=z, marker=(5,1))
      -
      -plt.subplot(325)
      -plt.scatter(x,y,s=80, c=z, marker='+')
      -
      -plt.subplot(326)
      -plt.scatter(x,y,s=80, c=z, marker=(5,2))
      -
      -plt.show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/pylab_examples/scatter_symbol.html b/dev/examples/pylab_examples/scatter_symbol.html deleted file mode 100644 index 5856e592caa..00000000000 --- a/dev/examples/pylab_examples/scatter_symbol.html +++ /dev/null @@ -1,164 +0,0 @@ - - - - - - - - pylab_examples example code: scatter_symbol.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      pylab_examples example code: scatter_symbol.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/scatter_symbol.png -
      -
      from matplotlib import pyplot as plt
      -import numpy as np
      -import matplotlib
      -
      -x = np.arange(0.0, 50.0, 2.0)
      -y = x ** 1.3 + np.random.rand(*x.shape) * 30.0
      -s = np.random.rand(*x.shape) * 800 + 500
      -
      -plt.scatter(x, y, s, c="g", alpha=0.5, marker=r'$\clubsuit$',
      -            label="Luck")
      -plt.xlabel("Leprechauns")
      -plt.ylabel("Gold")
      -plt.legend(loc=2)
      -plt.show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/pylab_examples/set_and_get.html b/dev/examples/pylab_examples/set_and_get.html deleted file mode 100644 index baab44a1012..00000000000 --- a/dev/examples/pylab_examples/set_and_get.html +++ /dev/null @@ -1,247 +0,0 @@ - - - - - - - - pylab_examples example code: set_and_get.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      pylab_examples example code: set_and_get.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/set_and_get.png -
      -
      """
      -
      -MATLAB and pylab allow you to use setp and get to set and get
      -object properties, as well as to do introspection on the object
      -
      -set
      -    To set the linestyle of a line to be dashed, you can do
      -
      -      >>> line, = plot([1,2,3])
      -      >>> setp(line, linestyle='--')
      -
      -    If you want to know the valid types of arguments, you can provide the
      -    name of the property you want to set without a value
      -
      -      >>> setp(line, 'linestyle')
      -          linestyle: [ '-' | '--' | '-.' | ':' | 'steps' | 'None' ]
      -
      -    If you want to see all the properties that can be set, and their
      -    possible values, you can do
      -
      -        >>> setp(line)
      -
      -    set operates on a single instance or a list of instances.  If you are
      -    in query mode introspecting the possible values, only the first
      -    instance in the sequence is used.  When actually setting values, all
      -    the instances will be set.  e.g., suppose you have a list of two lines,
      -    the following will make both lines thicker and red
      -
      -        >>> x = arange(0,1.0,0.01)
      -        >>> y1 = sin(2*pi*x)
      -        >>> y2 = sin(4*pi*x)
      -        >>> lines = plot(x, y1, x, y2)
      -        >>> setp(lines, linewidth=2, color='r')
      -
      -
      -get:
      -
      -    get returns the value of a given attribute.  You can use get to query
      -    the value of a single attribute
      -
      -        >>> getp(line, 'linewidth')
      -            0.5
      -
      -    or all the attribute/value pairs
      -
      -    >>> getp(line)
      -        aa = True
      -        alpha = 1.0
      -        antialiased = True
      -        c = b
      -        clip_on = True
      -        color = b
      -        ... long listing skipped ...
      -
      -Aliases:
      -
      -  To reduce keystrokes in interactive mode, a number of properties
      -  have short aliases, eg 'lw' for 'linewidth' and 'mec' for
      -  'markeredgecolor'.  When calling set or get in introspection mode,
      -  these properties will be listed as 'fullname or aliasname', as in
      -
      -
      -
      -
      -"""
      -
      -from __future__ import print_function
      -from pylab import *
      -
      -
      -x = arange(0,1.0,0.01)
      -y1 = sin(2*pi*x)
      -y2 = sin(4*pi*x)
      -lines = plot(x, y1, x, y2)
      -l1, l2 = lines
      -setp(lines, linestyle='--')       # set both to dashed
      -setp(l1, linewidth=2, color='r')  # line1 is thick and red
      -setp(l2, linewidth=1, color='g')  # line2 is thicker and green
      -
      -
      -print ('Line setters')
      -setp(l1)
      -print ('Line getters')
      -getp(l1)
      -
      -print ('Rectangle setters')
      -setp(gca().patch)
      -print ('Rectangle getters')
      -getp(gca().patch)
      -
      -t = title('Hi mom')
      -print ('Text setters')
      -setp(t)
      -print ('Text getters')
      -getp(t)
      -
      -show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/pylab_examples/shading_example.html b/dev/examples/pylab_examples/shading_example.html deleted file mode 100644 index 43e17666235..00000000000 --- a/dev/examples/pylab_examples/shading_example.html +++ /dev/null @@ -1,178 +0,0 @@ - - - - - - - - pylab_examples example code: shading_example.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      pylab_examples example code: shading_example.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/shading_example.png -
      -
      import numpy as np
      -import matplotlib.pyplot as plt
      -from matplotlib.colors import LightSource
      -
      -# example showing how to make shaded relief plots
      -# like Mathematica
      -# (http://reference.wolfram.com/mathematica/ref/ReliefPlot.html)
      -# or Generic Mapping Tools
      -# (http://gmt.soest.hawaii.edu/gmt/doc/gmt/html/GMT_Docs/node145.html)
      -
      -# test data
      -X,Y=np.mgrid[-5:5:0.05,-5:5:0.05]
      -Z=np.sqrt(X**2+Y**2)+np.sin(X**2+Y**2)
      -# create light source object.
      -ls = LightSource(azdeg=0,altdeg=65)
      -# shade data, creating an rgb array.
      -rgb = ls.shade(Z,plt.cm.copper)
      -# plot un-shaded and shaded images.
      -plt.figure(figsize=(12,5))
      -plt.subplot(121)
      -plt.imshow(Z,cmap=plt.cm.copper)
      -plt.title('imshow')
      -plt.xticks([]); plt.yticks([])
      -plt.subplot(122)
      -plt.imshow(rgb)
      -plt.title('imshow with shading')
      -plt.xticks([]); plt.yticks([])
      -plt.show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/pylab_examples/shared_axis_across_figures.html b/dev/examples/pylab_examples/shared_axis_across_figures.html deleted file mode 100644 index 2c5c15694bc..00000000000 --- a/dev/examples/pylab_examples/shared_axis_across_figures.html +++ /dev/null @@ -1,175 +0,0 @@ - - - - - - - - pylab_examples example code: shared_axis_across_figures.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      pylab_examples example code: shared_axis_across_figures.py

      -

      [source code]

      -
      """
      -connect the data limits on the axes in one figure with the axes in
      -another.  This is not the right way to do this for two axes in the
      -same figure -- use the sharex and sharey property in that case
      -"""
      -# -*- noplot -*-
      -import numpy
      -from pylab import figure, show
      -
      -fig1 = figure()
      -fig2 = figure()
      -
      -ax1 = fig1.add_subplot(111)
      -ax2 = fig2.add_subplot(111, sharex=ax1, sharey=ax1)
      -
      -ax1.plot(numpy.random.rand(100), 'o')
      -ax2.plot(numpy.random.rand(100), 'o')
      -
      -# In the latest release, it is no longer necessary to do anything
      -# special to share axes across figures:
      -
      -# ax1.sharex_foreign(ax2)
      -# ax2.sharex_foreign(ax1)
      -
      -# ax1.sharey_foreign(ax2)
      -# ax2.sharey_foreign(ax1)
      -
      -show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/pylab_examples/shared_axis_across_figures.py b/dev/examples/pylab_examples/shared_axis_across_figures.py deleted file mode 100644 index b4cc8c70d35..00000000000 --- a/dev/examples/pylab_examples/shared_axis_across_figures.py +++ /dev/null @@ -1,28 +0,0 @@ -""" -connect the data limits on the axes in one figure with the axes in -another. This is not the right way to do this for two axes in the -same figure -- use the sharex and sharey property in that case -""" -# -*- noplot -*- -import numpy -from pylab import figure, show - -fig1 = figure() -fig2 = figure() - -ax1 = fig1.add_subplot(111) -ax2 = fig2.add_subplot(111, sharex=ax1, sharey=ax1) - -ax1.plot(numpy.random.rand(100), 'o') -ax2.plot(numpy.random.rand(100), 'o') - -# In the latest release, it is no longer necessary to do anything -# special to share axes across figures: - -# ax1.sharex_foreign(ax2) -# ax2.sharex_foreign(ax1) - -# ax1.sharey_foreign(ax2) -# ax2.sharey_foreign(ax1) - -show() diff --git a/dev/examples/pylab_examples/shared_axis_demo.html b/dev/examples/pylab_examples/shared_axis_demo.html deleted file mode 100644 index fc73e85e257..00000000000 --- a/dev/examples/pylab_examples/shared_axis_demo.html +++ /dev/null @@ -1,202 +0,0 @@ - - - - - - - - pylab_examples example code: shared_axis_demo.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      pylab_examples example code: shared_axis_demo.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/shared_axis_demo.png -
      -
      """
      -You can share the x or y axis limits for one axis with another by
      -passing an axes instance as a sharex or sharey kwarg.
      -
      -Changing the axis limits on one axes will be reflected automatically
      -in the other, and vice-versa, so when you navigate with the toolbar
      -the axes will follow each other on their shared axes.  Ditto for
      -changes in the axis scaling (eg log vs linear).  However, it is
      -possible to have differences in tick labeling, eg you can selectively
      -turn off the tick labels on one axes.
      -
      -The example below shows how to customize the tick labels on the
      -various axes.  Shared axes share the tick locator, tick formatter,
      -view limits, and transformation (eg log, linear).  But the ticklabels
      -themselves do not share properties.  This is a feature and not a bug,
      -because you may want to make the tick labels smaller on the upper
      -axes, eg in the example below.
      -
      -If you want to turn off the ticklabels for a given axes (eg on
      -subplot(211) or subplot(212), you cannot do the standard trick
      -
      -   setp(ax2, xticklabels=[])
      -
      -because this changes the tick Formatter, which is shared among all
      -axes.  But you can alter the visibility of the labels, which is a
      -property
      -
      -  setp( ax2.get_xticklabels(), visible=False)
      -
      -
      -"""
      -from pylab import *
      -
      -t = arange(0.01, 5.0, 0.01)
      -s1 = sin(2*pi*t)
      -s2 = exp(-t)
      -s3 = sin(4*pi*t)
      -ax1 = subplot(311)
      -plot(t,s1)
      -setp( ax1.get_xticklabels(), fontsize=6)
      -
      -## share x only
      -ax2 = subplot(312, sharex=ax1)
      -plot(t, s2)
      -# make these tick labels invisible
      -setp( ax2.get_xticklabels(), visible=False)
      -
      -# share x and y
      -ax3 = subplot(313,  sharex=ax1, sharey=ax1)
      -plot(t, s3)
      -xlim(0.01,5.0)
      -show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/pylab_examples/show_colormaps.html b/dev/examples/pylab_examples/show_colormaps.html deleted file mode 100644 index c55db4cc105..00000000000 --- a/dev/examples/pylab_examples/show_colormaps.html +++ /dev/null @@ -1,181 +0,0 @@ - - - - - - - - - - pylab_examples example code: show_colormaps.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      pylab_examples example code: show_colormaps.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/show_colormaps.png -
      -
      # This example comes from the Cookbook on www.scipy.org.  According to the
      -# history, Andrew Straw did the conversion from an old page, but it is
      -# unclear who the original author is.
      -import numpy as np
      -import matplotlib.pyplot as plt
      -
      -a = np.linspace(0, 1, 256).reshape(1,-1)
      -a = np.vstack((a,a))
      -
      -# Get a list of the colormaps in matplotlib.  Ignore the ones that end with
      -# '_r' because these are simply reversed versions of ones that don't end
      -# with '_r'
      -maps = sorted(m for m in plt.cm.datad if not m.endswith("_r"))
      -nmaps = len(maps) + 1
      -
      -fig = plt.figure(figsize=(5,10))
      -fig.subplots_adjust(top=0.99, bottom=0.01, left=0.2, right=0.99)
      -for i,m in enumerate(maps):
      -    ax = plt.subplot(nmaps, 1, i+1)
      -    plt.axis("off")
      -    plt.imshow(a, aspect='auto', cmap=plt.get_cmap(m), origin='lower')
      -    pos = list(ax.get_position().bounds)
      -    fig.text(pos[0] - 0.01, pos[1], m, fontsize=10, horizontalalignment='right')
      -
      -plt.show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/pylab_examples/simple_plot.html b/dev/examples/pylab_examples/simple_plot.html deleted file mode 100644 index f8cd9098bbb..00000000000 --- a/dev/examples/pylab_examples/simple_plot.html +++ /dev/null @@ -1,162 +0,0 @@ - - - - - - - - pylab_examples example code: simple_plot.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      pylab_examples example code: simple_plot.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/simple_plot.png -
      -
      from pylab import *
      -
      -t = arange(0.0, 2.0, 0.01)
      -s = sin(2*pi*t)
      -plot(t, s, linewidth=1.0)
      -
      -xlabel('time (s)')
      -ylabel('voltage (mV)')
      -title('About as simple as it gets, folks')
      -grid(True)
      -savefig("test.png")
      -show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/pylab_examples/simple_plot_fps.html b/dev/examples/pylab_examples/simple_plot_fps.html deleted file mode 100644 index aeb88048a0d..00000000000 --- a/dev/examples/pylab_examples/simple_plot_fps.html +++ /dev/null @@ -1,181 +0,0 @@ - - - - - - - - pylab_examples example code: simple_plot_fps.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      pylab_examples example code: simple_plot_fps.py

      -

      [source code]

      -
      #!/usr/bin/env python
      -
      -"""
      -Example: simple line plot.
      -Show how to make and save a simple line plot with labels, title and grid
      -"""
      -# -*- noplot -*-
      -from __future__ import print_function
      -from pylab import *
      -
      -ion()
      -
      -t = arange(0.0, 1.0+0.001, 0.001)
      -s = cos(2*2*pi*t)
      -plot(t, s, '-', lw=2)
      -
      -xlabel('time (s)')
      -ylabel('voltage (mV)')
      -title('About as simple as it gets, folks')
      -grid(True)
      -
      -import time
      -
      -frames = 100.0
      -t = time.time()
      -c = time.clock()
      -for i in range(int(frames)):
      -    part = i / frames
      -    axis([0.0, 1.0 - part, -1.0 + part, 1.0 - part])
      -wallclock = time.time() - t
      -user = time.clock() - c
      -print ("wallclock:", wallclock)
      -print ("user:", user)
      -print ("fps:", frames / wallclock)
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/pylab_examples/simple_plot_fps.py b/dev/examples/pylab_examples/simple_plot_fps.py deleted file mode 100644 index 545947966b5..00000000000 --- a/dev/examples/pylab_examples/simple_plot_fps.py +++ /dev/null @@ -1,34 +0,0 @@ -#!/usr/bin/env python - -""" -Example: simple line plot. -Show how to make and save a simple line plot with labels, title and grid -""" -# -*- noplot -*- -from __future__ import print_function -from pylab import * - -ion() - -t = arange(0.0, 1.0+0.001, 0.001) -s = cos(2*2*pi*t) -plot(t, s, '-', lw=2) - -xlabel('time (s)') -ylabel('voltage (mV)') -title('About as simple as it gets, folks') -grid(True) - -import time - -frames = 100.0 -t = time.time() -c = time.clock() -for i in range(int(frames)): - part = i / frames - axis([0.0, 1.0 - part, -1.0 + part, 1.0 - part]) -wallclock = time.time() - t -user = time.clock() - c -print ("wallclock:", wallclock) -print ("user:", user) -print ("fps:", frames / wallclock) diff --git a/dev/examples/pylab_examples/specgram_demo.html b/dev/examples/pylab_examples/specgram_demo.html deleted file mode 100644 index d7ffd1a022d..00000000000 --- a/dev/examples/pylab_examples/specgram_demo.html +++ /dev/null @@ -1,180 +0,0 @@ - - - - - - - - pylab_examples example code: specgram_demo.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      pylab_examples example code: specgram_demo.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/specgram_demo1.png -
      -
      #!/usr/bin/env python
      -from pylab import *
      -
      -dt = 0.0005
      -t = arange(0.0, 20.0, dt)
      -s1 = sin(2*pi*100*t)
      -s2 = 2*sin(2*pi*400*t)
      -
      -# create a transient "chirp"
      -mask = where(logical_and(t>10, t<12), 1.0, 0.0)
      -s2 = s2 * mask
      -
      -# add some noise into the mix
      -nse = 0.01*randn(len(t))
      -
      -x = s1 + s2 + nse # the signal
      -NFFT = 1024       # the length of the windowing segments
      -Fs = int(1.0/dt)  # the sampling frequency
      -
      -# Pxx is the segments x freqs array of instantaneous power, freqs is
      -# the frequency vector, bins are the centers of the time bins in which
      -# the power is computed, and im is the matplotlib.image.AxesImage
      -# instance
      -
      -ax1 = subplot(211)
      -plot(t, x)
      -subplot(212, sharex=ax1)
      -Pxx, freqs, bins, im = specgram(x, NFFT=NFFT, Fs=Fs, noverlap=900,
      -                                cmap=cm.gist_heat)
      -show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/pylab_examples/spine_placement_demo.html b/dev/examples/pylab_examples/spine_placement_demo.html deleted file mode 100644 index b874db765b2..00000000000 --- a/dev/examples/pylab_examples/spine_placement_demo.html +++ /dev/null @@ -1,255 +0,0 @@ - - - - - - - - pylab_examples example code: spine_placement_demo.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      pylab_examples example code: spine_placement_demo.py

      -

      (Source code)

      -
      -../../_images/spine_placement_demo_00.png -

      (png, hires.png, pdf)

      -
      -
      -../../_images/spine_placement_demo_01.png -

      (png, hires.png, pdf)

      -
      -
      import numpy as np
      -import matplotlib.pyplot as plt
      -
      -
      -fig = plt.figure()
      -x = np.linspace(-np.pi,np.pi,100)
      -y = 2*np.sin(x)
      -
      -ax = fig.add_subplot(2,2,1)
      -ax.set_title('centered spines')
      -ax.plot(x,y)
      -ax.spines['left'].set_position('center')
      -ax.spines['right'].set_color('none')
      -ax.spines['bottom'].set_position('center')
      -ax.spines['top'].set_color('none')
      -ax.spines['left'].set_smart_bounds(True)
      -ax.spines['bottom'].set_smart_bounds(True)
      -ax.xaxis.set_ticks_position('bottom')
      -ax.yaxis.set_ticks_position('left')
      -
      -ax = fig.add_subplot(2,2,2)
      -ax.set_title('zeroed spines')
      -ax.plot(x,y)
      -ax.spines['left'].set_position('zero')
      -ax.spines['right'].set_color('none')
      -ax.spines['bottom'].set_position('zero')
      -ax.spines['top'].set_color('none')
      -ax.spines['left'].set_smart_bounds(True)
      -ax.spines['bottom'].set_smart_bounds(True)
      -ax.xaxis.set_ticks_position('bottom')
      -ax.yaxis.set_ticks_position('left')
      -
      -ax = fig.add_subplot(2,2,3)
      -ax.set_title('spines at axes (0.6, 0.1)')
      -ax.plot(x,y)
      -ax.spines['left'].set_position(('axes',0.6))
      -ax.spines['right'].set_color('none')
      -ax.spines['bottom'].set_position(('axes',0.1))
      -ax.spines['top'].set_color('none')
      -ax.spines['left'].set_smart_bounds(True)
      -ax.spines['bottom'].set_smart_bounds(True)
      -ax.xaxis.set_ticks_position('bottom')
      -ax.yaxis.set_ticks_position('left')
      -
      -ax = fig.add_subplot(2,2,4)
      -ax.set_title('spines at data (1,2)')
      -ax.plot(x,y)
      -ax.spines['left'].set_position(('data',1))
      -ax.spines['right'].set_color('none')
      -ax.spines['bottom'].set_position(('data',2))
      -ax.spines['top'].set_color('none')
      -ax.spines['left'].set_smart_bounds(True)
      -ax.spines['bottom'].set_smart_bounds(True)
      -ax.xaxis.set_ticks_position('bottom')
      -ax.yaxis.set_ticks_position('left')
      -# ----------------------------------------------------
      -
      -def adjust_spines(ax,spines):
      -    for loc, spine in ax.spines.items():
      -        if loc in spines:
      -            spine.set_position(('outward',10)) # outward by 10 points
      -            spine.set_smart_bounds(True)
      -        else:
      -            spine.set_color('none') # don't draw spine
      -
      -    # turn off ticks where there is no spine
      -    if 'left' in spines:
      -        ax.yaxis.set_ticks_position('left')
      -    else:
      -        # no yaxis ticks
      -        ax.yaxis.set_ticks([])
      -
      -    if 'bottom' in spines:
      -        ax.xaxis.set_ticks_position('bottom')
      -    else:
      -        # no xaxis ticks
      -        ax.xaxis.set_ticks([])
      -
      -fig = plt.figure()
      -
      -x = np.linspace(0,2*np.pi,100)
      -y = 2*np.sin(x)
      -
      -ax = fig.add_subplot(2,2,1)
      -ax.plot(x,y)
      -adjust_spines(ax,['left'])
      -
      -ax = fig.add_subplot(2,2,2)
      -ax.plot(x,y)
      -adjust_spines(ax,[])
      -
      -ax = fig.add_subplot(2,2,3)
      -ax.plot(x,y)
      -adjust_spines(ax,['left','bottom'])
      -
      -ax = fig.add_subplot(2,2,4)
      -ax.plot(x,y)
      -adjust_spines(ax,['bottom'])
      -
      -plt.show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/pylab_examples/spy_demos.html b/dev/examples/pylab_examples/spy_demos.html deleted file mode 100644 index c9389fa37b2..00000000000 --- a/dev/examples/pylab_examples/spy_demos.html +++ /dev/null @@ -1,174 +0,0 @@ - - - - - - - - pylab_examples example code: spy_demos.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      pylab_examples example code: spy_demos.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/spy_demos.png -
      -
      """
      -Plot the sparsity pattern of arrays
      -"""
      -
      -from matplotlib.pyplot import figure, show
      -import numpy
      -
      -fig = figure()
      -ax1 = fig.add_subplot(221)
      -ax2 = fig.add_subplot(222)
      -ax3 = fig.add_subplot(223)
      -ax4 = fig.add_subplot(224)
      -
      -x = numpy.random.randn(20,20)
      -x[5] = 0.
      -x[:,12] = 0.
      -
      -ax1.spy(x, markersize=5)
      -ax2.spy(x, precision=0.1, markersize=5)
      -
      -ax3.spy(x)
      -ax4.spy(x, precision=0.1)
      -
      -show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/pylab_examples/stackplot_demo.html b/dev/examples/pylab_examples/stackplot_demo.html deleted file mode 100644 index 968115a9e2b..00000000000 --- a/dev/examples/pylab_examples/stackplot_demo.html +++ /dev/null @@ -1,172 +0,0 @@ - - - - - - - - pylab_examples example code: stackplot_demo.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      pylab_examples example code: stackplot_demo.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/stackplot_demo_00_00.png -
      -

      (png, hires.png, pdf)

      -
      -../../_images/stackplot_demo_01_00.png -
      -
      import numpy as np
      -from matplotlib import pyplot as plt
      -
      -fnx = lambda : np.random.randint(5, 50, 10)
      -y = np.row_stack((fnx(), fnx(), fnx()))
      -x = np.arange(10)
      -
      -y1, y2, y3 = fnx(), fnx(), fnx()
      -
      -fig = plt.figure()
      -ax = fig.add_subplot(111)
      -ax.stackplot(x, y)
      -plt.show()
      -
      -fig = plt.figure()
      -ax = fig.add_subplot(111)
      -ax.stackplot(x, y1, y2, y3)
      -plt.show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/pylab_examples/stackplot_demo2.html b/dev/examples/pylab_examples/stackplot_demo2.html deleted file mode 100644 index 8457c28400a..00000000000 --- a/dev/examples/pylab_examples/stackplot_demo2.html +++ /dev/null @@ -1,176 +0,0 @@ - - - - - - - - pylab_examples example code: stackplot_demo2.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      pylab_examples example code: stackplot_demo2.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/stackplot_demo2.png -
      -
      import numpy as np
      -import matplotlib.pyplot as plt
      -
      -np.random.seed(0)
      -def layers(n, m):
      -    """
      -    Return *n* random Gaussian mixtures, each of length *m*.
      -    """
      -    def bump(a):
      -        x = 1 / (.1 + np.random.random())
      -        y = 2 * np.random.random() - .5
      -        z = 10 / (.1 + np.random.random())
      -        for i in range(m):
      -            w = (i / float(m) - y) * z
      -            a[i] += x * np.exp(-w * w)
      -    a = np.zeros((m, n))
      -    for i in range(n):
      -        for j in range(5):
      -            bump(a[:, i])
      -    return a
      -
      -d = layers(3, 100)
      -
      -plt.subplots()
      -plt.stackplot(range(100), d.T, baseline='wiggle')
      -plt.show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/pylab_examples/stem_plot.html b/dev/examples/pylab_examples/stem_plot.html deleted file mode 100644 index 8fe3dd1178c..00000000000 --- a/dev/examples/pylab_examples/stem_plot.html +++ /dev/null @@ -1,159 +0,0 @@ - - - - - - - - pylab_examples example code: stem_plot.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      pylab_examples example code: stem_plot.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/stem_plot1.png -
      -
      #!/usr/bin/env python
      -from pylab import *
      -
      -x = linspace(0.1, 2*pi, 10)
      -markerline, stemlines, baseline = stem(x, cos(x), '-.')
      -setp(markerline, 'markerfacecolor', 'b')
      -setp(baseline, 'color','r', 'linewidth', 2)
      -
      -show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/pylab_examples/step_demo.html b/dev/examples/pylab_examples/step_demo.html deleted file mode 100644 index 78e149903dc..00000000000 --- a/dev/examples/pylab_examples/step_demo.html +++ /dev/null @@ -1,175 +0,0 @@ - - - - - - - - pylab_examples example code: step_demo.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      pylab_examples example code: step_demo.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/step_demo.png -
      -
      import numpy as np
      -from numpy import ma
      -from matplotlib.pyplot import step, legend, xlim, ylim, show
      -
      -x = np.arange(1, 7, 0.4)
      -y0 = np.sin(x)
      -y = y0.copy() + 2.5
      -
      -step(x, y, label='pre (default)')
      -
      -y -= 0.5
      -step(x, y, where='mid', label='mid')
      -
      -y -= 0.5
      -step(x, y, where='post', label='post')
      -
      -y = ma.masked_where((y0>-0.15)&(y0<0.15), y - 0.5)
      -step(x,y, label='masked (pre)')
      -
      -legend()
      -
      -xlim(0, 7)
      -ylim(-0.5, 4)
      -
      -show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/pylab_examples/stix_fonts_demo.html b/dev/examples/pylab_examples/stix_fonts_demo.html deleted file mode 100644 index 391da1a9c94..00000000000 --- a/dev/examples/pylab_examples/stix_fonts_demo.html +++ /dev/null @@ -1,207 +0,0 @@ - - - - - - - - pylab_examples example code: stix_fonts_demo.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      pylab_examples example code: stix_fonts_demo.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/stix_fonts_demo.png -
      -
      #!/usr/bin/env python
      -
      -from __future__ import unicode_literals
      -
      -import os, sys, re
      -
      -import gc
      -
      -stests = [
      -    r'$\mathcircled{123} \mathrm{\mathcircled{123}} \mathbf{\mathcircled{123}}$',
      -    r'$\mathsf{Sans \Omega} \mathrm{\mathsf{Sans \Omega}} \mathbf{\mathsf{Sans \Omega}}$',
      -    r'$\mathtt{Monospace}$',
      -    r'$\mathcal{CALLIGRAPHIC}$',
      -    r'$\mathbb{Blackboard \pi}$',
      -    r'$\mathrm{\mathbb{Blackboard \pi}}$',
      -    r'$\mathbf{\mathbb{Blackboard \pi}}$',
      -    r'$\mathfrak{Fraktur} \mathbf{\mathfrak{Fraktur}}$',
      -    r'$\mathscr{Script}$']
      -
      -if sys.maxunicode > 0xffff:
      -    s = r'Direct Unicode: $\u23ce \mathrm{\ue0f2 \U0001D538}$'
      -
      -from pylab import *
      -
      -def doall():
      -    tests = stests
      -
      -    figure(figsize=(8, (len(tests) * 1) + 2))
      -    plot([0, 0], 'r')
      -    grid(False)
      -    axis([0, 3, -len(tests), 0])
      -    yticks(arange(len(tests)) * -1)
      -    for i, s in enumerate(tests):
      -        #print (i, s.encode("ascii", "backslashreplace"))
      -        text(0.1, -i, s, fontsize=32)
      -
      -    savefig('stix_fonts_example')
      -    #close('all')
      -    show()
      -
      -if '--latex' in sys.argv:
      -    fd = open("stix_fonts_examples.ltx", "w")
      -    fd.write("\\documentclass{article}\n")
      -    fd.write("\\begin{document}\n")
      -    fd.write("\\begin{enumerate}\n")
      -
      -    for i, s in enumerate(stests):
      -        s = re.sub(r"(?<!\\)\$", "$$", s)
      -        fd.write("\\item %s\n" % s)
      -
      -    fd.write("\\end{enumerate}\n")
      -    fd.write("\\end{document}\n")
      -    fd.close()
      -
      -    os.system("pdflatex stix_fonts_examples.ltx")
      -else:
      -    doall()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/pylab_examples/stock_demo.html b/dev/examples/pylab_examples/stock_demo.html deleted file mode 100644 index 24cb573d298..00000000000 --- a/dev/examples/pylab_examples/stock_demo.html +++ /dev/null @@ -1,169 +0,0 @@ - - - - - - - - pylab_examples example code: stock_demo.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      pylab_examples example code: stock_demo.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/stock_demo.png -
      -
      #!/usr/bin/env python
      -
      -from matplotlib.ticker import MultipleLocator
      -from pylab import *
      -from data_helper import get_two_stock_data
      -
      -d1, p1, d2, p2 = get_two_stock_data()
      -
      -ax = subplot(111)
      -lines = plot(d1, p1, 'bs', d2, p2, 'go')
      -xlabel('Days')
      -ylabel('Normalized price')
      -xlim(0, 3)
      -ax.xaxis.set_major_locator(MultipleLocator(1))
      -
      -title('INTC vs AAPL')
      -legend( ('INTC', 'AAPL') )
      -
      -show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/pylab_examples/streamplot_demo.html b/dev/examples/pylab_examples/streamplot_demo.html deleted file mode 100644 index e4b7661db17..00000000000 --- a/dev/examples/pylab_examples/streamplot_demo.html +++ /dev/null @@ -1,179 +0,0 @@ - - - - - - - - - - pylab_examples example code: streamplot_demo.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      pylab_examples example code: streamplot_demo.py

      -

      (Source code)

      -
      -../../_images/streamplot_demo_00.png -

      (png, hires.png, pdf)

      -
      -
      -../../_images/streamplot_demo_01.png -

      (png, hires.png, pdf)

      -
      -
      import numpy as np
      -import matplotlib.pyplot as plt
      -
      -Y, X = np.mgrid[-3:3:100j, -3:3:100j]
      -U = -1 - X**2 + Y
      -V = 1 + X - Y**2
      -speed = np.sqrt(U*U + V*V)
      -
      -plt.streamplot(X, Y, U, V, color=U, linewidth=2, cmap=plt.cm.autumn)
      -plt.colorbar()
      -
      -f, (ax1, ax2) = plt.subplots(ncols=2)
      -ax1.streamplot(X, Y, U, V, density=[0.5, 1])
      -
      -lw = 5*speed/speed.max()
      -ax2.streamplot(X, Y, U, V, density=0.6, color='k', linewidth=lw)
      -
      -plt.show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/pylab_examples/streamplot_with_mask.html b/dev/examples/pylab_examples/streamplot_with_mask.html deleted file mode 100644 index 13f82c260a1..00000000000 --- a/dev/examples/pylab_examples/streamplot_with_mask.html +++ /dev/null @@ -1,178 +0,0 @@ - - - - - - - - - - pylab_examples example code: streamplot_with_mask.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      pylab_examples example code: streamplot_with_mask.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/streamplot_with_mask.png -
      -
      """
      -Demonstrate the use of the `streamplot` function using a masked array
      -and NaN values.
      -"""
      -import numpy as np
      -import matplotlib.pyplot as plt
      -
      -w = 3
      -Y, X = np.mgrid[-w:w:100j, -w:w:100j]
      -U = -1 - X**2 + Y
      -V = 1 + X - Y**2
      -speed = np.sqrt(U*U + V*V)
      -
      -mask = np.zeros(U.shape, dtype=bool)
      -mask[40:60, 40:60] = 1
      -U = np.ma.array(U, mask=mask)
      -U[:20, :20] = np.nan
      -
      -plt.streamplot(X, Y, U, V, color='r')
      -plt.imshow(~mask, extent=(-w, w, -w, w), alpha=0.5, interpolation='nearest')
      -
      -plt.show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/pylab_examples/subplot_demo.html b/dev/examples/pylab_examples/subplot_demo.html deleted file mode 100644 index 0a5e2fde122..00000000000 --- a/dev/examples/pylab_examples/subplot_demo.html +++ /dev/null @@ -1,174 +0,0 @@ - - - - - - - - pylab_examples example code: subplot_demo.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      pylab_examples example code: subplot_demo.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/subplot_demo1.png -
      -
      """
      -Simple demo with multiple subplots.
      -"""
      -import numpy as np
      -import matplotlib.pyplot as plt
      -
      -
      -x1 = np.linspace(0.0, 5.0)
      -x2 = np.linspace(0.0, 2.0)
      -
      -y1 = np.cos(2 * np.pi * x1) * np.exp(-x1)
      -y2 = np.cos(2 * np.pi * x2)
      -
      -plt.subplot(2, 1, 1)
      -plt.plot(x1, y1, 'ko-')
      -plt.title('A tale of 2 subplots')
      -plt.ylabel('Damped oscillation')
      -
      -plt.subplot(2, 1, 2)
      -plt.plot(x2, y2, 'r.-')
      -plt.xlabel('time (s)')
      -plt.ylabel('Undamped')
      -
      -plt.show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/pylab_examples/subplot_toolbar.html b/dev/examples/pylab_examples/subplot_toolbar.html deleted file mode 100644 index 6c5c32aaa4a..00000000000 --- a/dev/examples/pylab_examples/subplot_toolbar.html +++ /dev/null @@ -1,171 +0,0 @@ - - - - - - - - pylab_examples example code: subplot_toolbar.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      pylab_examples example code: subplot_toolbar.py

      -

      (Source code)

      -
      -../../_images/subplot_toolbar_00.png -

      (png, hires.png, pdf)

      -
      -
      -../../_images/subplot_toolbar_01.png -

      (png, hires.png, pdf)

      -
      -
      #!/usr/bin/env python
      -
      -from pylab import *
      -
      -fig = figure()
      -subplot(221)
      -imshow(rand(100,100))
      -subplot(222)
      -imshow(rand(100,100))
      -subplot(223)
      -imshow(rand(100,100))
      -subplot(224)
      -imshow(rand(100,100))
      -
      -subplot_tool()
      -show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/pylab_examples/subplots_adjust.html b/dev/examples/pylab_examples/subplots_adjust.html deleted file mode 100644 index 8e5c98515c5..00000000000 --- a/dev/examples/pylab_examples/subplots_adjust.html +++ /dev/null @@ -1,162 +0,0 @@ - - - - - - - - pylab_examples example code: subplots_adjust.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      pylab_examples example code: subplots_adjust.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/subplots_adjust.png -
      -
      from pylab import *
      -
      -
      -subplot(211)
      -imshow(rand(100,100), cmap=cm.BuPu_r)
      -subplot(212)
      -imshow(rand(100,100), cmap=cm.BuPu_r)
      -
      -subplots_adjust(bottom=0.1, right=0.8, top=0.9)
      -cax = axes([0.85, 0.1, 0.075, 0.8])
      -colorbar(cax=cax)
      -show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/pylab_examples/subplots_demo.html b/dev/examples/pylab_examples/subplots_demo.html deleted file mode 100644 index d26de6914c6..00000000000 --- a/dev/examples/pylab_examples/subplots_demo.html +++ /dev/null @@ -1,246 +0,0 @@ - - - - - - - - pylab_examples example code: subplots_demo.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      pylab_examples example code: subplots_demo.py

      -

      (Source code)

      -
      -../../_images/subplots_demo_00.png -

      (png, hires.png, pdf)

      -
      -
      -../../_images/subplots_demo_01.png -

      (png, hires.png, pdf)

      -
      -
      -../../_images/subplots_demo_02.png -

      (png, hires.png, pdf)

      -
      -
      -../../_images/subplots_demo_03.png -

      (png, hires.png, pdf)

      -
      -
      -../../_images/subplots_demo_04.png -

      (png, hires.png, pdf)

      -
      -
      -../../_images/subplots_demo_05.png -

      (png, hires.png, pdf)

      -
      -
      -../../_images/subplots_demo_06.png -

      (png, hires.png, pdf)

      -
      -
      """Examples illustrating the use of plt.subplots().
      -
      -This function creates a figure and a grid of subplots with a single call, while
      -providing reasonable control over how the individual plots are created.  For
      -very refined tuning of subplot creation, you can still use add_subplot()
      -directly on a new figure.
      -"""
      -
      -import matplotlib.pyplot as plt
      -import numpy as np
      -
      -# Simple data to display in various forms
      -x = np.linspace(0, 2 * np.pi, 400)
      -y = np.sin(x ** 2)
      -
      -plt.close('all')
      -
      -# Just a figure and one subplot
      -f, ax = plt.subplots()
      -ax.plot(x, y)
      -ax.set_title('Simple plot')
      -
      -# Two subplots, the axes array is 1-d
      -f, axarr = plt.subplots(2, sharex=True)
      -axarr[0].plot(x, y)
      -axarr[0].set_title('Sharing X axis')
      -axarr[1].scatter(x, y)
      -
      -# Two subplots, unpack the axes array immediately
      -f, (ax1, ax2) = plt.subplots(1, 2, sharey=True)
      -ax1.plot(x, y)
      -ax1.set_title('Sharing Y axis')
      -ax2.scatter(x, y)
      -
      -# Three subplots sharing both x/y axes
      -f, (ax1, ax2, ax3) = plt.subplots(3, sharex=True, sharey=True)
      -ax1.plot(x, y)
      -ax1.set_title('Sharing both axes')
      -ax2.scatter(x, y)
      -ax3.scatter(x, 2 * y ** 2 - 1, color='r')
      -# Fine-tune figure; make subplots close to each other and hide x ticks for
      -# all but bottom plot.
      -f.subplots_adjust(hspace=0)
      -plt.setp([a.get_xticklabels() for a in f.axes[:-1]], visible=False)
      -
      -# row and column sharing
      -f, ((ax1, ax2), (ax3, ax4)) = plt.subplots(2, 2, sharex='col', sharey='row')
      -ax1.plot(x, y)
      -ax1.set_title('Sharing x per column, y per row')
      -ax2.scatter(x, y)
      -ax3.scatter(x, 2 * y ** 2 - 1, color='r')
      -ax4.plot(x, 2 * y ** 2 - 1, color='r')
      -
      -# Four axes, returned as a 2-d array
      -f, axarr = plt.subplots(2, 2)
      -axarr[0, 0].plot(x, y)
      -axarr[0, 0].set_title('Axis [0,0]')
      -axarr[0, 1].scatter(x, y)
      -axarr[0, 1].set_title('Axis [0,1]')
      -axarr[1, 0].plot(x, y ** 2)
      -axarr[1, 0].set_title('Axis [1,0]')
      -axarr[1, 1].scatter(x, y ** 2)
      -axarr[1, 1].set_title('Axis [1,1]')
      -# Fine-tune figure; hide x ticks for top plots and y ticks for right plots
      -plt.setp([a.get_xticklabels() for a in axarr[0, :]], visible=False)
      -plt.setp([a.get_yticklabels() for a in axarr[:, 1]], visible=False)
      -
      -# Four polar axes
      -plt.subplots(2, 2, subplot_kw=dict(polar=True))
      -
      -plt.show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/pylab_examples/symlog_demo.html b/dev/examples/pylab_examples/symlog_demo.html deleted file mode 100644 index 290df3a8001..00000000000 --- a/dev/examples/pylab_examples/symlog_demo.html +++ /dev/null @@ -1,178 +0,0 @@ - - - - - - - - pylab_examples example code: symlog_demo.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      pylab_examples example code: symlog_demo.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/symlog_demo.png -
      -
      #!/usr/bin/env python
      -from pylab import *
      -
      -dt = 0.01
      -x = arange(-50.0, 50.0, dt)
      -y = arange(0, 100.0, dt)
      -
      -subplot(311)
      -plot(x, y)
      -xscale('symlog')
      -ylabel('symlogx')
      -grid(True)
      -gca().xaxis.grid(True, which='minor')  # minor grid on too
      -
      -subplot(312)
      -plot(y, x)
      -yscale('symlog')
      -ylabel('symlogy')
      -
      -
      -subplot(313)
      -plot(x, np.sin(x / 3.0))
      -xscale('symlog')
      -yscale('symlog', linthreshy=0.015)
      -grid(True)
      -ylabel('symlog both')
      -
      -show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/pylab_examples/system_monitor.html b/dev/examples/pylab_examples/system_monitor.html deleted file mode 100644 index a9380fac823..00000000000 --- a/dev/examples/pylab_examples/system_monitor.html +++ /dev/null @@ -1,195 +0,0 @@ - - - - - - - - pylab_examples example code: system_monitor.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      pylab_examples example code: system_monitor.py

      -

      [source code]

      -
      #!/usr/bin/env python
      -# -*- noplot -*-
      -import time
      -from pylab import *
      -
      -def get_memory():
      -    "Simulate a function that returns system memory"
      -    return 100*(0.5+0.5*sin(0.5*pi*time.time()))
      -
      -def get_cpu():
      -    "Simulate a function that returns cpu usage"
      -    return 100*(0.5+0.5*sin(0.2*pi*(time.time()-0.25)))
      -
      -def get_net():
      -    "Simulate a function that returns network bandwidth"
      -    return 100*(0.5+0.5*sin(0.7*pi*(time.time()-0.1)))
      -
      -def get_stats():
      -    return get_memory(), get_cpu(), get_net()
      -
      -# turn interactive mode on for dynamic updates.  If you aren't in
      -# interactive mode, you'll need to use a GUI event handler/timer.
      -ion()
      -
      -fig = figure(1)
      -ax = subplot(111)
      -ind = arange(1,4)
      -pm, pc, pn = bar(ind, get_stats())
      -centers = ind + 0.5*pm.get_width()
      -pm.set_facecolor('r')
      -pc.set_facecolor('g')
      -pn.set_facecolor('b')
      -ax.set_xlim([0.5,4])
      -ax.set_xticks(centers)
      -ax.set_ylim([0,100])
      -ax.set_xticklabels(['Memory', 'CPU', 'Bandwidth'])
      -ax.set_ylabel('Percent usage')
      -ax.set_title('System Monitor')
      -
      -for i in range(200):  # run for a little while
      -    m,c,n = get_stats()
      -
      -    pm.set_height(m)
      -    pc.set_height(c)
      -    pn.set_height(n)
      -    ax.set_ylim([0,100])
      -
      -    draw()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/pylab_examples/system_monitor.py b/dev/examples/pylab_examples/system_monitor.py deleted file mode 100644 index 4a20679a0e2..00000000000 --- a/dev/examples/pylab_examples/system_monitor.py +++ /dev/null @@ -1,53 +0,0 @@ -#!/usr/bin/env python -# -*- noplot -*- -import time -from pylab import * - -def get_memory(): - "Simulate a function that returns system memory" - return 100*(0.5+0.5*sin(0.5*pi*time.time())) - -def get_cpu(): - "Simulate a function that returns cpu usage" - return 100*(0.5+0.5*sin(0.2*pi*(time.time()-0.25))) - -def get_net(): - "Simulate a function that returns network bandwidth" - return 100*(0.5+0.5*sin(0.7*pi*(time.time()-0.1))) - -def get_stats(): - return get_memory(), get_cpu(), get_net() - -# turn interactive mode on for dynamic updates. If you aren't in -# interactive mode, you'll need to use a GUI event handler/timer. -ion() - -fig = figure(1) -ax = subplot(111) -ind = arange(1,4) -pm, pc, pn = bar(ind, get_stats()) -centers = ind + 0.5*pm.get_width() -pm.set_facecolor('r') -pc.set_facecolor('g') -pn.set_facecolor('b') -ax.set_xlim([0.5,4]) -ax.set_xticks(centers) -ax.set_ylim([0,100]) -ax.set_xticklabels(['Memory', 'CPU', 'Bandwidth']) -ax.set_ylabel('Percent usage') -ax.set_title('System Monitor') - -for i in range(200): # run for a little while - m,c,n = get_stats() - - pm.set_height(m) - pc.set_height(c) - pn.set_height(n) - ax.set_ylim([0,100]) - - draw() - - - - - diff --git a/dev/examples/pylab_examples/table_demo.html b/dev/examples/pylab_examples/table_demo.html deleted file mode 100644 index 49088833451..00000000000 --- a/dev/examples/pylab_examples/table_demo.html +++ /dev/null @@ -1,205 +0,0 @@ - - - - - - - - pylab_examples example code: table_demo.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      pylab_examples example code: table_demo.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/table_demo.png -
      -
      """
      -Demo of table function to display a table within a plot.
      -"""
      -import numpy as np
      -import matplotlib.pyplot as plt
      -
      -
      -data = [[  66386,  174296,   75131,  577908,   32015],
      -        [  58230,  381139,   78045,   99308,  160454],
      -        [  89135,   80552,  152558,  497981,  603535],
      -        [  78415,   81858,  150656,  193263,   69638],
      -        [ 139361,  331509,  343164,  781380,   52269]]
      -
      -columns = ('Freeze', 'Wind', 'Flood', 'Quake', 'Hail')
      -rows = ['%d year' % x for x in (100, 50, 20, 10, 5)]
      -
      -values = np.arange(0, 2500, 500)
      -value_increment = 1000
      -
      -# Get some pastel shades for the colors
      -colors = plt.cm.BuPu(np.linspace(0, 0.5, len(columns)))
      -n_rows = len(data)
      -
      -index = np.arange(len(columns)) + 0.3
      -bar_width = 0.4
      -
      -# Initialize the vertical-offset for the stacked bar chart.
      -y_offset = np.array([0.0] * len(columns))
      -
      -# Plot bars and create text labels for the table
      -cell_text = []
      -for row in range(n_rows):
      -    plt.bar(index, data[row], bar_width, bottom=y_offset, color=colors[row])
      -    y_offset = y_offset + data[row]
      -    cell_text.append(['%1.1f' % (x/1000.0) for x in y_offset])
      -# Reverse colors and text labels to display the last value at the top.
      -colors = colors[::-1]
      -cell_text.reverse()
      -
      -# Add a table at the bottom of the axes
      -the_table = plt.table(cellText=cell_text,
      -                      rowLabels=rows,
      -                      rowColours=colors,
      -                      colLabels=columns,
      -                      loc='bottom')
      -
      -# Adjust layout to make room for the table:
      -plt.subplots_adjust(left=0.2, bottom=0.2)
      -
      -plt.ylabel("Loss in ${0}'s".format(value_increment))
      -plt.yticks(values * value_increment, ['%d' % val for val in values])
      -plt.xticks([])
      -plt.title('Loss by Disaster')
      -
      -plt.show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/pylab_examples/tex_demo.html b/dev/examples/pylab_examples/tex_demo.html deleted file mode 100644 index 09dedb3b5c1..00000000000 --- a/dev/examples/pylab_examples/tex_demo.html +++ /dev/null @@ -1,180 +0,0 @@ - - - - - - - - pylab_examples example code: tex_demo.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      pylab_examples example code: tex_demo.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/tex_demo.png -
      -
      """
      -You can use TeX to render all of your matplotlib text if the rc
      -parameter text.usetex is set.  This works currently on the agg and ps
      -backends, and requires that you have tex and the other dependencies
      -described at http://matplotlib.org/users/usetex.html
      -properly installed on your system.  The first time you run a script
      -you will see a lot of output from tex and associated tools.  The next
      -time, the run may be silent, as a lot of the information is cached in
      -~/.tex.cache
      -
      -"""
      -import numpy as np
      -import matplotlib.pyplot as plt
      -
      -
      -plt.rc('text', usetex=True)
      -plt.rc('font', family='serif')
      -plt.figure(1, figsize=(6,4))
      -ax = plt.axes([0.1, 0.1, 0.8, 0.7])
      -t = np.linspace(0.0, 1.0, 100)
      -s = np.cos(4 * np.pi * t) + 2
      -plt.plot(t, s)
      -
      -plt.xlabel(r'\textbf{time (s)}')
      -plt.ylabel(r'\textit{voltage (mV)}',fontsize=16)
      -plt.title(r"\TeX\ is Number $\displaystyle\sum_{n=1}^\infty"
      -          r"\frac{-e^{i\pi}}{2^n}$!", fontsize=16, color='r')
      -plt.grid(True)
      -plt.savefig('tex_demo')
      -plt.show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/pylab_examples/tex_unicode_demo.html b/dev/examples/pylab_examples/tex_unicode_demo.html deleted file mode 100644 index 609f8e15461..00000000000 --- a/dev/examples/pylab_examples/tex_unicode_demo.html +++ /dev/null @@ -1,176 +0,0 @@ - - - - - - - - pylab_examples example code: tex_unicode_demo.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      pylab_examples example code: tex_unicode_demo.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/tex_unicode_demo.png -
      -
      #!/usr/bin/env python
      -# -*- coding: utf-8 -*-
      -"""
      -This demo is tex_demo.py modified to have unicode. See that file for
      -more information.
      -"""
      -from __future__ import unicode_literals
      -import matplotlib as mpl
      -mpl.rcParams['text.usetex']=True
      -mpl.rcParams['text.latex.unicode']=True
      -from numpy import arange, cos, pi
      -from matplotlib.pyplot import (figure, axes, plot, xlabel, ylabel, title,
      -     grid, savefig, show)
      -
      -figure(1, figsize=(6,4))
      -ax = axes([0.1, 0.1, 0.8, 0.7])
      -t = arange(0.0, 1.0+0.01, 0.01)
      -s = cos(2*2*pi*t)+2
      -plot(t, s)
      -
      -xlabel(r'\textbf{time (s)}')
      -ylabel(r'\textit{Velocity (\u00B0/sec)}', fontsize=16)
      -title(r"\TeX\ is Number $\displaystyle\sum_{n=1}^\infty\frac{-e^{i\pi}}{2^n}$!",
      -      fontsize=16, color='r')
      -grid(True)
      -show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/pylab_examples/text_handles.html b/dev/examples/pylab_examples/text_handles.html deleted file mode 100644 index b3bdb0f186f..00000000000 --- a/dev/examples/pylab_examples/text_handles.html +++ /dev/null @@ -1,180 +0,0 @@ - - - - - - - - pylab_examples example code: text_handles.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      pylab_examples example code: text_handles.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/text_handles.png -
      -
      #!/usr/bin/env python
      -#Controlling the properties of axis text using handles
      -
      -# See examples/text_themes.py for a more elegant, pythonic way to control
      -# fonts.  After all, if we were slaves to MATLAB , we wouldn't be
      -# using python!
      -
      -from pylab import *
      -
      -
      -def f(t):
      -    s1 = sin(2*pi*t)
      -    e1 = exp(-t)
      -    return multiply(s1,e1)
      -
      -t1 = arange(0.0, 5.0, 0.1)
      -t2 = arange(0.0, 5.0, 0.02)
      -
      -
      -subplot(111)
      -plot(t1, f(t1), 'bo', t2, f(t2), 'k')
      -text(3.0, 0.6, 'f(t) = exp(-t) sin(2 pi t)')
      -ttext = title('Fun with text!')
      -ytext = ylabel('Damped oscillation')
      -xtext = xlabel('time (s)')
      -
      -setp(ttext, size='large', color='r', style='italic')
      -setp(xtext, size='medium', name='courier', weight='bold', color='g')
      -setp(ytext, size='medium', name='helvetica', weight='light', color='b')
      -show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/pylab_examples/text_rotation.html b/dev/examples/pylab_examples/text_rotation.html deleted file mode 100644 index d2f299fb85d..00000000000 --- a/dev/examples/pylab_examples/text_rotation.html +++ /dev/null @@ -1,191 +0,0 @@ - - - - - - - - pylab_examples example code: text_rotation.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      pylab_examples example code: text_rotation.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/text_rotation.png -
      -
      #!/usr/bin/env python
      -"""
      -The way matplotlib does text layout is counter-intuitive to some, so
      -this example is designed to make it a little clearer.  The text is
      -aligned by it's bounding box (the rectangular box that surrounds the
      -ink rectangle).  The order of operations is basically rotation then
      -alignment, rather than alignment then rotation.  Basically, the text
      -is centered at your x,y location, rotated around this point, and then
      -aligned according to the bounding box of the rotated text.
      -
      -So if you specify left, bottom alignment, the bottom left of the
      -bounding box of the rotated text will be at the x,y coordinate of the
      -text.
      -
      -But a picture is worth a thousand words!
      -"""
      -from pylab import *
      -
      -def addtext(props):
      -    text(0.5, 0.5, 'text 0', props, rotation=0)
      -    text(1.5, 0.5, 'text 45', props, rotation=45)
      -    text(2.5, 0.5, 'text 135', props, rotation=135)
      -    text(3.5, 0.5, 'text 225', props, rotation=225)
      -    text(4.5, 0.5, 'text -45', props, rotation=-45)
      -    yticks([0,.5,1])
      -    grid(True)
      -
      -# the text bounding box
      -bbox = {'fc':'0.8', 'pad':0}
      -
      -subplot(211)
      -addtext({'ha':'center', 'va':'center', 'bbox':bbox})
      -xlim(0,5)
      -xticks(arange(0, 5.1, 0.5), [])
      -ylabel('center / center')
      -subplot(212)
      -addtext({'ha':'left', 'va':'bottom', 'bbox':bbox})
      -xlim(0,5)
      -xticks(arange(0, 5.1, 0.5))
      -ylabel('left / bottom')
      -show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/pylab_examples/text_rotation_relative_to_line.html b/dev/examples/pylab_examples/text_rotation_relative_to_line.html deleted file mode 100644 index 41a1a79f994..00000000000 --- a/dev/examples/pylab_examples/text_rotation_relative_to_line.html +++ /dev/null @@ -1,186 +0,0 @@ - - - - - - - - pylab_examples example code: text_rotation_relative_to_line.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      pylab_examples example code: text_rotation_relative_to_line.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/text_rotation_relative_to_line.png -
      -
      #!/usr/bin/env python
      -"""
      -Text objects in matplotlib are normally rotated with respect to the
      -screen coordinate system (i.e., 45 degrees rotation plots text along a
      -line that is in between horizontal and vertical no matter how the axes
      -are changed).  However, at times one wants to rotate text with respect
      -to something on the plot.  In this case, the correct angle won't be
      -the angle of that object in the plot coordinate system, but the angle
      -that that object APPEARS in the screen coordinate system.  This angle
      -is found by transforming the angle from the plot to the screen
      -coordinate system, as shown in the example below.
      -"""
      -from pylab import *
      -
      -# Plot diagonal line (45 degrees)
      -h = plot( r_[:10], r_[:10] )
      -
      -# set limits so that it no longer looks on screen to be 45 degrees
      -xlim([-10,20])
      -
      -# Locations to plot text
      -l1 = array((1,1))
      -l2 = array((5,5))
      -
      -# Rotate angle
      -angle = 45
      -trans_angle = gca().transData.transform_angles(array((45,)),
      -                                               l2.reshape((1,2)))[0]
      -
      -# Plot text
      -th1 = text(l1[0],l1[1],'text not rotated correctly',fontsize=16,
      -           rotation=angle)
      -th2 = text(l2[0],l2[1],'text not rotated correctly',fontsize=16,
      -           rotation=trans_angle)
      -
      -show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/pylab_examples/text_themes.html b/dev/examples/pylab_examples/text_themes.html deleted file mode 100644 index ab7d254dfa6..00000000000 --- a/dev/examples/pylab_examples/text_themes.html +++ /dev/null @@ -1,180 +0,0 @@ - - - - - - - - - - pylab_examples example code: text_themes.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      pylab_examples example code: text_themes.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/text_themes.png -
      -
      #!/usr/bin/env python
      -from pylab import *
      -
      -font = {'family'     : 'serif',
      -        'color'      : 'r',
      -        'weight' : 'normal',
      -        'size'   : 12,
      -        }
      -
      -def f(t):
      -    s1 = cos(2*pi*t)
      -    e1 = exp(-t)
      -    return multiply(s1,e1)
      -
      -t1 = arange(0.0, 5.0, 0.1)
      -t2 = arange(0.0, 5.0, 0.02)
      -
      -plot(t1, f(t1), 'bo', t2, f(t2), 'k')
      -title('Damped exponential decay', font, size='large', color='r')
      -text(2, 0.65, r'$\cos(2 \pi t) \exp(-t)$', color='k')
      -xlabel('time (s)', font, style='italic')
      -ylabel('voltage (mV)', font)
      -
      -show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/pylab_examples/titles_demo.html b/dev/examples/pylab_examples/titles_demo.html deleted file mode 100644 index 787b636b548..00000000000 --- a/dev/examples/pylab_examples/titles_demo.html +++ /dev/null @@ -1,165 +0,0 @@ - - - - - - - - pylab_examples example code: titles_demo.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      pylab_examples example code: titles_demo.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/titles_demo.png -
      -
      #!/usr/bin/env python
      -"""
      -matplotlib can display plot titles centered, flush with the left side of
      -a set of axes, and flush with the right side of a set of axes.
      -
      -"""
      -import matplotlib.pyplot as plt
      -
      -plt.plot(range(10))
      -
      -plt.title('Center Title')
      -plt.title('Left Title', loc='left')
      -plt.title('Right Title', loc='right')
      -
      -plt.show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/pylab_examples/to_numeric.html b/dev/examples/pylab_examples/to_numeric.html deleted file mode 100644 index c57ee3941e5..00000000000 --- a/dev/examples/pylab_examples/to_numeric.html +++ /dev/null @@ -1,183 +0,0 @@ - - - - - - - - pylab_examples example code: to_numeric.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      pylab_examples example code: to_numeric.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/to_numeric.png -
      -
      #!/usr/bin/env python
      -"""
      -Use backend agg to access the figure canvas as an RGB string and then
      -convert it to an array and pass the string it to PIL for
      -rendering
      -"""
      -
      -import pylab
      -from matplotlib.backends.backend_agg import FigureCanvasAgg
      -
      -try:
      -    from PIL import Image
      -except ImportError:
      -    raise SystemExit("PIL must be installed to run this example")
      -
      -pylab.plot([1,2,3])
      -
      -canvas = pylab.get_current_fig_manager().canvas
      -
      -agg = canvas.switch_backends(FigureCanvasAgg)
      -agg.draw()
      -s = agg.tostring_rgb()
      -
      -# get the width and the height to resize the matrix
      -l,b,w,h = agg.figure.bbox.bounds
      -w, h = int(w), int(h)
      -
      -
      -X = pylab.fromstring(s, pylab.uint8)
      -X.shape = h, w, 3
      -
      -im = Image.fromstring( "RGB", (w,h), s)
      -im.show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/pylab_examples/toggle_images.html b/dev/examples/pylab_examples/toggle_images.html deleted file mode 100644 index 3d31aac8c37..00000000000 --- a/dev/examples/pylab_examples/toggle_images.html +++ /dev/null @@ -1,194 +0,0 @@ - - - - - - - - pylab_examples example code: toggle_images.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      pylab_examples example code: toggle_images.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/toggle_images.png -
      -
      #!/usr/bin/env python
      -""" toggle between two images by pressing "t"
      -
      -The basic idea is to load two images (they can be different shapes) and plot
      -them to the same axes with hold "on".  Then, toggle the visible property of
      -them using keypress event handling
      -
      -If you want two images with different shapes to be plotted with the same
      -extent, they must have the same "extent" property
      -
      -As usual, we'll define some random images for demo.  Real data is much more
      -exciting!
      -
      -Note, on the wx backend on some platforms (eg linux), you have to
      -first click on the figure before the keypress events are activated.
      -If you know how to fix this, please email us!
      -
      -"""
      -
      -from pylab import *
      -
      -# two images x1 is initially visible, x2 is not
      -x1 = rand(100, 100)
      -x2 = rand(150, 175)
      -
      -# arbitrary extent - both images must have same extent if you want
      -# them to be resampled into the same axes space
      -extent = (0,1,0,1)
      -im1 = imshow(x1, extent=extent)
      -im2 = imshow(x2, extent=extent, hold=True)
      -im2.set_visible(False)
      -
      -def toggle_images(event):
      -    'toggle the visible state of the two images'
      -    if event.key != 't': return
      -    b1 = im1.get_visible()
      -    b2 = im2.get_visible()
      -    im1.set_visible(not b1)
      -    im2.set_visible(not b2)
      -    draw()
      -
      -connect('key_press_event', toggle_images)
      -
      -show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/pylab_examples/transoffset.html b/dev/examples/pylab_examples/transoffset.html deleted file mode 100644 index 604d1d5f763..00000000000 --- a/dev/examples/pylab_examples/transoffset.html +++ /dev/null @@ -1,206 +0,0 @@ - - - - - - - - pylab_examples example code: transoffset.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      pylab_examples example code: transoffset.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/transoffset.png -
      -
      #!/usr/bin/env python
      -
      -'''
      -This illustrates the use of transforms.offset_copy to
      -make a transform that positions a drawing element such as
      -a text string at a specified offset in screen coordinates
      -(dots or inches) relative to a location given in any
      -coordinates.
      -
      -Every Artist--the mpl class from which classes such as
      -Text and Line are derived--has a transform that can be
      -set when the Artist is created, such as by the corresponding
      -pylab command.  By default this is usually the Axes.transData
      -transform, going from data units to screen dots.  We can
      -use the offset_copy function to make a modified copy of
      -this transform, where the modification consists of an
      -offset.
      -'''
      -
      -import pylab as P
      -from matplotlib.transforms import offset_copy
      -
      -X = P.arange(7)
      -Y = X**2
      -
      -fig = P.figure(figsize=(5,10))
      -ax = P.subplot(2,1,1)
      -
      -# If we want the same offset for each text instance,
      -# we only need to make one transform.  To get the
      -# transform argument to offset_copy, we need to make the axes
      -# first; the subplot command above is one way to do this.
      -
      -transOffset = offset_copy(ax.transData, fig=fig,
      -                            x = 0.05, y=0.10, units='inches')
      -
      -for x, y in zip(X, Y):
      -    P.plot((x,),(y,), 'ro')
      -    P.text(x, y, '%d, %d' % (int(x),int(y)), transform=transOffset)
      -
      -
      -# offset_copy works for polar plots also.
      -
      -ax = P.subplot(2,1,2, polar=True)
      -
      -transOffset = offset_copy(ax.transData, fig=fig, y = 6, units='dots')
      -
      -for x, y in zip(X, Y):
      -    P.polar((x,),(y,), 'ro')
      -    P.text(x, y, '%d, %d' % (int(x),int(y)),
      -                transform=transOffset,
      -                horizontalalignment='center',
      -                verticalalignment='bottom')
      -
      -
      -P.show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/pylab_examples/tricontour_demo.html b/dev/examples/pylab_examples/tricontour_demo.html deleted file mode 100644 index ee208d27f67..00000000000 --- a/dev/examples/pylab_examples/tricontour_demo.html +++ /dev/null @@ -1,253 +0,0 @@ - - - - - - - - pylab_examples example code: tricontour_demo.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      pylab_examples example code: tricontour_demo.py

      -

      (Source code)

      -
      -../../_images/tricontour_demo_001.png -

      (png, hires.png, pdf)

      -
      -
      -../../_images/tricontour_demo_011.png -

      (png, hires.png, pdf)

      -
      -
      """
      -Contour plots of unstructured triangular grids.
      -"""
      -import matplotlib.pyplot as plt
      -import matplotlib.tri as tri
      -import numpy as np
      -import math
      -
      -# Creating a Triangulation without specifying the triangles results in the
      -# Delaunay triangulation of the points.
      -
      -# First create the x and y coordinates of the points.
      -n_angles = 48
      -n_radii = 8
      -min_radius = 0.25
      -radii = np.linspace(min_radius, 0.95, n_radii)
      -
      -angles = np.linspace(0, 2*math.pi, n_angles, endpoint=False)
      -angles = np.repeat(angles[...,np.newaxis], n_radii, axis=1)
      -angles[:,1::2] += math.pi/n_angles
      -
      -x = (radii*np.cos(angles)).flatten()
      -y = (radii*np.sin(angles)).flatten()
      -z = (np.cos(radii)*np.cos(angles*3.0)).flatten()
      -
      -# Create the Triangulation; no triangles so Delaunay triangulation created.
      -triang = tri.Triangulation(x, y)
      -
      -# Mask off unwanted triangles.
      -xmid = x[triang.triangles].mean(axis=1)
      -ymid = y[triang.triangles].mean(axis=1)
      -mask = np.where(xmid*xmid + ymid*ymid < min_radius*min_radius, 1, 0)
      -triang.set_mask(mask)
      -
      -# pcolor plot.
      -plt.figure()
      -plt.gca().set_aspect('equal')
      -plt.tricontourf(triang, z)
      -plt.colorbar()
      -plt.tricontour(triang, z, colors='k')
      -plt.title('Contour plot of Delaunay triangulation')
      -
      -# You can specify your own triangulation rather than perform a Delaunay
      -# triangulation of the points, where each triangle is given by the indices of
      -# the three points that make up the triangle, ordered in either a clockwise or
      -# anticlockwise manner.
      -
      -xy = np.asarray([
      -    [-0.101,0.872],[-0.080,0.883],[-0.069,0.888],[-0.054,0.890],[-0.045,0.897],
      -    [-0.057,0.895],[-0.073,0.900],[-0.087,0.898],[-0.090,0.904],[-0.069,0.907],
      -    [-0.069,0.921],[-0.080,0.919],[-0.073,0.928],[-0.052,0.930],[-0.048,0.942],
      -    [-0.062,0.949],[-0.054,0.958],[-0.069,0.954],[-0.087,0.952],[-0.087,0.959],
      -    [-0.080,0.966],[-0.085,0.973],[-0.087,0.965],[-0.097,0.965],[-0.097,0.975],
      -    [-0.092,0.984],[-0.101,0.980],[-0.108,0.980],[-0.104,0.987],[-0.102,0.993],
      -    [-0.115,1.001],[-0.099,0.996],[-0.101,1.007],[-0.090,1.010],[-0.087,1.021],
      -    [-0.069,1.021],[-0.052,1.022],[-0.052,1.017],[-0.069,1.010],[-0.064,1.005],
      -    [-0.048,1.005],[-0.031,1.005],[-0.031,0.996],[-0.040,0.987],[-0.045,0.980],
      -    [-0.052,0.975],[-0.040,0.973],[-0.026,0.968],[-0.020,0.954],[-0.006,0.947],
      -    [ 0.003,0.935],[ 0.006,0.926],[ 0.005,0.921],[ 0.022,0.923],[ 0.033,0.912],
      -    [ 0.029,0.905],[ 0.017,0.900],[ 0.012,0.895],[ 0.027,0.893],[ 0.019,0.886],
      -    [ 0.001,0.883],[-0.012,0.884],[-0.029,0.883],[-0.038,0.879],[-0.057,0.881],
      -    [-0.062,0.876],[-0.078,0.876],[-0.087,0.872],[-0.030,0.907],[-0.007,0.905],
      -    [-0.057,0.916],[-0.025,0.933],[-0.077,0.990],[-0.059,0.993] ])
      -x = xy[:,0]*180/3.14159
      -y = xy[:,1]*180/3.14159
      -x0 = -5
      -y0 = 52
      -z = np.exp(-0.01*( (x-x0)*(x-x0) + (y-y0)*(y-y0) ))
      -
      -triangles = np.asarray([
      -    [67,66, 1],[65, 2,66],[ 1,66, 2],[64, 2,65],[63, 3,64],[60,59,57],
      -    [ 2,64, 3],[ 3,63, 4],[ 0,67, 1],[62, 4,63],[57,59,56],[59,58,56],
      -    [61,60,69],[57,69,60],[ 4,62,68],[ 6, 5, 9],[61,68,62],[69,68,61],
      -    [ 9, 5,70],[ 6, 8, 7],[ 4,70, 5],[ 8, 6, 9],[56,69,57],[69,56,52],
      -    [70,10, 9],[54,53,55],[56,55,53],[68,70, 4],[52,56,53],[11,10,12],
      -    [69,71,68],[68,13,70],[10,70,13],[51,50,52],[13,68,71],[52,71,69],
      -    [12,10,13],[71,52,50],[71,14,13],[50,49,71],[49,48,71],[14,16,15],
      -    [14,71,48],[17,19,18],[17,20,19],[48,16,14],[48,47,16],[47,46,16],
      -    [16,46,45],[23,22,24],[21,24,22],[17,16,45],[20,17,45],[21,25,24],
      -    [27,26,28],[20,72,21],[25,21,72],[45,72,20],[25,28,26],[44,73,45],
      -    [72,45,73],[28,25,29],[29,25,31],[43,73,44],[73,43,40],[72,73,39],
      -    [72,31,25],[42,40,43],[31,30,29],[39,73,40],[42,41,40],[72,33,31],
      -    [32,31,33],[39,38,72],[33,72,38],[33,38,34],[37,35,38],[34,38,35],
      -    [35,37,36] ])
      -
      -# Rather than create a Triangulation object, can simply pass x, y and triangles
      -# arrays to tripcolor directly.  It would be better to use a Triangulation object
      -# if the same triangulation was to be used more than once to save duplicated
      -# calculations.
      -plt.figure()
      -plt.gca().set_aspect('equal')
      -plt.tricontourf(x, y, triangles, z)
      -plt.colorbar()
      -plt.title('Contour plot of user-specified triangulation')
      -plt.xlabel('Longitude (degrees)')
      -plt.ylabel('Latitude (degrees)')
      -
      -plt.show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/pylab_examples/tricontour_smooth_delaunay.html b/dev/examples/pylab_examples/tricontour_smooth_delaunay.html deleted file mode 100644 index 8d23644e6c4..00000000000 --- a/dev/examples/pylab_examples/tricontour_smooth_delaunay.html +++ /dev/null @@ -1,283 +0,0 @@ - - - - - - - - pylab_examples example code: tricontour_smooth_delaunay.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      pylab_examples example code: tricontour_smooth_delaunay.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/tricontour_smooth_delaunay1.png -
      -
      """
      -Demonstrates high-resolution tricontouring of a random set of points ;
      -a matplotlib.tri.TriAnalyzer is used to improve the plot quality.
      -
      -The initial data points and triangular grid for this demo are:
      -    - a set of random points is instantiated, inside [-1, 1] x [-1, 1] square
      -    - A Delaunay triangulation of these points is then computed, of which a
      -    random subset of triangles is masked out by the user (based on
      -    *init_mask_frac* parameter). This simulates invalidated data.
      -
      -The proposed generic procedure to obtain a high resolution contouring of such
      -a data set is the following:
      -    1) Compute an extended mask with a matplotlib.tri.TriAnalyzer, which will
      -    exclude badly shaped (flat) triangles from the border of the
      -    triangulation. Apply the mask to the triangulation (using set_mask).
      -    2) Refine and interpolate the data using a
      -    matplotlib.tri.UniformTriRefiner.
      -    3) Plot the refined data with tricontour.
      -
      -"""
      -from matplotlib.tri import Triangulation, TriAnalyzer, UniformTriRefiner
      -import matplotlib.pyplot as plt
      -import matplotlib.cm as cm
      -import numpy as np
      -
      -
      -#-----------------------------------------------------------------------------
      -# Analytical test function
      -#-----------------------------------------------------------------------------
      -def experiment_res(x, y):
      -    """ An analytic function representing experiment results """
      -    x = 2.*x
      -    r1 = np.sqrt((0.5-x)**2 + (0.5-y)**2)
      -    theta1 = np.arctan2(0.5-x, 0.5-y)
      -    r2 = np.sqrt((-x-0.2)**2 + (-y-0.2)**2)
      -    theta2 = np.arctan2(-x-0.2, -y-0.2)
      -    z = (4*(np.exp((r1/10)**2)-1)*30. * np.cos(3*theta1) +
      -         (np.exp((r2/10)**2)-1)*30. * np.cos(5*theta2) +
      -         2*(x**2 + y**2))
      -    return (np.max(z)-z)/(np.max(z)-np.min(z))
      -
      -#-----------------------------------------------------------------------------
      -# Generating the initial data test points and triangulation for the demo
      -#-----------------------------------------------------------------------------
      -# User parameters for data test points
      -n_test = 200  # Number of test data points, tested from 3 to 5000 for subdiv=3
      -
      -subdiv = 3  # Number of recursive subdivisions of the initial mesh for smooth
      -            # plots. Values >3 might result in a very high number of triangles
      -            # for the refine mesh: new triangles numbering = (4**subdiv)*ntri
      -
      -init_mask_frac = 0.0    # Float > 0. adjusting the proportion of
      -                        # (invalid) initial triangles which will be masked
      -                        # out. Enter 0 for no mask.
      -
      -min_circle_ratio = .01  # Minimum circle ratio - border triangles with circle
      -                        # ratio below this will be masked if they touch a
      -                        # border. Suggested value 0.01 ; Use -1 to keep
      -                        # all triangles.
      -
      -# Random points
      -random_gen = np.random.mtrand.RandomState(seed=127260)
      -x_test = random_gen.uniform(-1., 1., size=n_test)
      -y_test = random_gen.uniform(-1., 1., size=n_test)
      -z_test = experiment_res(x_test, y_test)
      -
      -# meshing with Delaunay triangulation
      -tri = Triangulation(x_test, y_test)
      -ntri = tri.triangles.shape[0]
      -
      -# Some invalid data are masked out
      -mask_init = np.zeros(ntri, dtype=np.bool)
      -masked_tri = random_gen.randint(0, ntri, int(ntri*init_mask_frac))
      -mask_init[masked_tri] = True
      -tri.set_mask(mask_init)
      -
      -
      -#-----------------------------------------------------------------------------
      -# Improving the triangulation before high-res plots: removing flat triangles
      -#-----------------------------------------------------------------------------
      -# masking badly shaped triangles at the border of the triangular mesh.
      -mask = TriAnalyzer(tri).get_flat_tri_mask(min_circle_ratio)
      -tri.set_mask(mask)
      -
      -# refining the data
      -refiner = UniformTriRefiner(tri)
      -tri_refi, z_test_refi = refiner.refine_field(z_test, subdiv=subdiv)
      -
      -# analytical 'results' for comparison
      -z_expected = experiment_res(tri_refi.x, tri_refi.y)
      -
      -# for the demo: loading the 'flat' triangles for plot
      -flat_tri = Triangulation(x_test, y_test)
      -flat_tri.set_mask(~mask)
      -
      -
      -#-----------------------------------------------------------------------------
      -# Now the plots
      -#-----------------------------------------------------------------------------
      -# User options for plots
      -plot_tri = True          # plot of the base triangulation
      -plot_masked_tri = True   # plot of the excessively flat excluded triangles
      -plot_refi_tri = False    # plot of the refined triangulation
      -plot_expected = False    # plot of the analytical function values for comparison
      -
      -
      -# Graphical options for tricontouring
      -levels = np.arange(0., 1., 0.025)
      -cmap = cm.get_cmap(name='Blues', lut=None)
      -
      -plt.figure()
      -plt.gca().set_aspect('equal')
      -plt.title("Filtering a Delaunay mesh\n" +
      -          "(application to high-resolution tricontouring)")
      -
      -# 1) plot of the refined (computed) data countours:
      -plt.tricontour(tri_refi, z_test_refi, levels=levels, cmap=cmap,
      -               linewidths=[2.0, 0.5, 1.0, 0.5])
      -# 2) plot of the expected (analytical) data countours (dashed):
      -if plot_expected:
      -    plt.tricontour(tri_refi, z_expected, levels=levels, cmap=cmap,
      -                   linestyles='--')
      -# 3) plot of the fine mesh on which interpolation was done:
      -if plot_refi_tri:
      -    plt.triplot(tri_refi, color='0.97')
      -# 4) plot of the initial 'coarse' mesh:
      -if plot_tri:
      -    plt.triplot(tri, color='0.7')
      -# 4) plot of the unvalidated triangles from naive Delaunay Triangulation:
      -if plot_masked_tri:
      -    plt.triplot(flat_tri, color='red')
      -
      -plt.show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/pylab_examples/tricontour_smooth_user.html b/dev/examples/pylab_examples/tricontour_smooth_user.html deleted file mode 100644 index 563235df3cc..00000000000 --- a/dev/examples/pylab_examples/tricontour_smooth_user.html +++ /dev/null @@ -1,226 +0,0 @@ - - - - - - - - pylab_examples example code: tricontour_smooth_user.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      pylab_examples example code: tricontour_smooth_user.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/tricontour_smooth_user1.png -
      -
      """
      -Demonstrates high-resolution tricontouring on user-defined triangular grids
      -with matplotlib.tri.UniformTriRefiner
      -"""
      -from matplotlib.tri import Triangulation, UniformTriRefiner
      -import matplotlib.pyplot as plt
      -import matplotlib.cm as cm
      -import numpy as np
      -import math
      -
      -
      -#-----------------------------------------------------------------------------
      -# Analytical test function
      -#-----------------------------------------------------------------------------
      -def function_z(x, y):
      -    """ A function of 2 variables """
      -    r1 = np.sqrt((0.5-x)**2 + (0.5-y)**2)
      -    theta1 = np.arctan2(0.5-x, 0.5-y)
      -    r2 = np.sqrt((-x-0.2)**2 + (-y-0.2)**2)
      -    theta2 = np.arctan2(-x-0.2, -y-0.2)
      -    z = -(2*(np.exp((r1/10)**2)-1)*30. * np.cos(7.*theta1) +
      -          (np.exp((r2/10)**2)-1)*30. * np.cos(11.*theta2) +
      -          0.7*(x**2 + y**2))
      -    return (np.max(z)-z)/(np.max(z)-np.min(z))
      -
      -#-----------------------------------------------------------------------------
      -# Creating a Triangulation
      -#-----------------------------------------------------------------------------
      -# First create the x and y coordinates of the points.
      -n_angles = 20
      -n_radii = 10
      -min_radius = 0.15
      -radii = np.linspace(min_radius, 0.95, n_radii)
      -
      -angles = np.linspace(0, 2*math.pi, n_angles, endpoint=False)
      -angles = np.repeat(angles[..., np.newaxis], n_radii, axis=1)
      -angles[:, 1::2] += math.pi/n_angles
      -
      -x = (radii*np.cos(angles)).flatten()
      -y = (radii*np.sin(angles)).flatten()
      -z = function_z(x, y)
      -
      -# Now create the Triangulation.
      -# (Creating a Triangulation without specifying the triangles results in the
      -# Delaunay triangulation of the points.)
      -triang = Triangulation(x, y)
      -
      -# Mask off unwanted triangles.
      -xmid = x[triang.triangles].mean(axis=1)
      -ymid = y[triang.triangles].mean(axis=1)
      -mask = np.where(xmid*xmid + ymid*ymid < min_radius*min_radius, 1, 0)
      -triang.set_mask(mask)
      -
      -#-----------------------------------------------------------------------------
      -# Refine data
      -#-----------------------------------------------------------------------------
      -refiner = UniformTriRefiner(triang)
      -tri_refi, z_test_refi = refiner.refine_field(z, subdiv=3)
      -
      -#-----------------------------------------------------------------------------
      -# Plot the triangulation and the high-res iso-contours
      -#-----------------------------------------------------------------------------
      -plt.figure()
      -plt.gca().set_aspect('equal')
      -plt.triplot(triang, lw=0.5, color='white')
      -
      -levels = np.arange(0., 1., 0.025)
      -cmap = cm.get_cmap(name='terrain', lut=None)
      -plt.tricontourf(tri_refi, z_test_refi, levels=levels, cmap=cmap)
      -plt.tricontour(tri_refi, z_test_refi, levels=levels,
      -               colors=['0.25', '0.5', '0.5', '0.5', '0.5'],
      -               linewidths=[1.0, 0.5, 0.5, 0.5, 0.5])
      -
      -plt.title("High-resolution tricontouring")
      -
      -plt.show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/pylab_examples/tricontour_vs_griddata.html b/dev/examples/pylab_examples/tricontour_vs_griddata.html deleted file mode 100644 index 6c4758b0f90..00000000000 --- a/dev/examples/pylab_examples/tricontour_vs_griddata.html +++ /dev/null @@ -1,200 +0,0 @@ - - - - - - - - pylab_examples example code: tricontour_vs_griddata.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      pylab_examples example code: tricontour_vs_griddata.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/tricontour_vs_griddata.png -
      -
      """
      -Comparison of griddata and tricontour for an unstructured triangular grid.
      -"""
      -from __future__ import print_function
      -import matplotlib.pyplot as plt
      -import matplotlib.tri as tri
      -import numpy as np
      -from numpy.random import uniform, seed
      -from matplotlib.mlab import griddata
      -import time
      -
      -seed(0)
      -npts = 200
      -ngridx = 100
      -ngridy = 200
      -x = uniform(-2,2,npts)
      -y = uniform(-2,2,npts)
      -z = x*np.exp(-x**2-y**2)
      -
      -# griddata and contour.
      -start = time.clock()
      -plt.subplot(211)
      -xi = np.linspace(-2.1,2.1,ngridx)
      -yi = np.linspace(-2.1,2.1,ngridy)
      -zi = griddata(x,y,z,xi,yi,interp='linear')
      -plt.contour(xi,yi,zi,15,linewidths=0.5,colors='k')
      -plt.contourf(xi,yi,zi,15,cmap=plt.cm.rainbow,
      -             norm=plt.normalize(vmax=abs(zi).max(), vmin=-abs(zi).max()))
      -plt.colorbar() # draw colorbar
      -plt.plot(x, y, 'ko', ms=3)
      -plt.xlim(-2,2)
      -plt.ylim(-2,2)
      -plt.title('griddata and contour (%d points, %d grid points)' % (npts, ngridx*ngridy))
      -print ('griddata and contour seconds: %f' % (time.clock() - start))
      -
      -# tricontour.
      -start = time.clock()
      -plt.subplot(212)
      -triang = tri.Triangulation(x, y)
      -plt.tricontour(x, y, z, 15, linewidths=0.5, colors='k')
      -plt.tricontourf(x, y, z, 15, cmap=plt.cm.rainbow,
      -                norm=plt.normalize(vmax=abs(zi).max(), vmin=-abs(zi).max()))
      -plt.colorbar()
      -plt.plot(x, y, 'ko', ms=3)
      -plt.xlim(-2,2)
      -plt.ylim(-2,2)
      -plt.title('tricontour (%d points)' % npts)
      -print ('tricontour seconds: %f' % (time.clock() - start))
      -
      -plt.show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/pylab_examples/trigradient_demo.html b/dev/examples/pylab_examples/trigradient_demo.html deleted file mode 100644 index 7dd9ea60fb8..00000000000 --- a/dev/examples/pylab_examples/trigradient_demo.html +++ /dev/null @@ -1,231 +0,0 @@ - - - - - - - - pylab_examples example code: trigradient_demo.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      pylab_examples example code: trigradient_demo.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/trigradient_demo1.png -
      -
      """
      -Demonstrates computation of gradient with matplotlib.tri.CubicTriInterpolator.
      -"""
      -from matplotlib.tri import Triangulation, UniformTriRefiner,\
      -    CubicTriInterpolator
      -import matplotlib.pyplot as plt
      -import matplotlib.cm as cm
      -import numpy as np
      -import math
      -
      -
      -#-----------------------------------------------------------------------------
      -# Electrical potential of a dipole
      -#-----------------------------------------------------------------------------
      -def dipole_potential(x, y):
      -    """ The electric dipole potential V """
      -    r_sq = x**2 + y**2
      -    theta = np.arctan2(y, x)
      -    z = np.cos(theta)/r_sq
      -    return (np.max(z)-z) / (np.max(z)-np.min(z))
      -
      -
      -#-----------------------------------------------------------------------------
      -# Creating a Triangulation
      -#-----------------------------------------------------------------------------
      -# First create the x and y coordinates of the points.
      -n_angles = 30
      -n_radii = 10
      -min_radius = 0.2
      -radii = np.linspace(min_radius, 0.95, n_radii)
      -
      -angles = np.linspace(0, 2*math.pi, n_angles, endpoint=False)
      -angles = np.repeat(angles[..., np.newaxis], n_radii, axis=1)
      -angles[:, 1::2] += math.pi/n_angles
      -
      -x = (radii*np.cos(angles)).flatten()
      -y = (radii*np.sin(angles)).flatten()
      -V = dipole_potential(x, y)
      -
      -# Create the Triangulation; no triangles specified so Delaunay triangulation
      -# created.
      -triang = Triangulation(x, y)
      -
      -# Mask off unwanted triangles.
      -xmid = x[triang.triangles].mean(axis=1)
      -ymid = y[triang.triangles].mean(axis=1)
      -mask = np.where(xmid*xmid + ymid*ymid < min_radius*min_radius, 1, 0)
      -triang.set_mask(mask)
      -
      -#-----------------------------------------------------------------------------
      -# Refine data - interpolates the electrical potential V
      -#-----------------------------------------------------------------------------
      -refiner = UniformTriRefiner(triang)
      -tri_refi, z_test_refi = refiner.refine_field(V, subdiv=3)
      -
      -#-----------------------------------------------------------------------------
      -# Computes the electrical field (Ex, Ey) as gradient of electrical potential
      -#-----------------------------------------------------------------------------
      -tci = CubicTriInterpolator(triang, -V)
      -# Gradient requested here at the mesh nodes but could be anywhere else:
      -(Ex, Ey) = tci.gradient(triang.x, triang.y)
      -E_norm = np.sqrt(Ex**2 + Ey**2)
      -
      -#-----------------------------------------------------------------------------
      -# Plot the triangulation, the potential iso-contours and the vector field
      -#-----------------------------------------------------------------------------
      -plt.figure()
      -plt.gca().set_aspect('equal')
      -plt.triplot(triang, color='0.8')
      -
      -levels = np.arange(0., 1., 0.01)
      -cmap = cm.get_cmap(name='hot', lut=None)
      -plt.tricontour(tri_refi, z_test_refi, levels=levels, cmap=cmap,
      -               linewidths=[2.0, 1.0, 1.0, 1.0])
      -# Plots direction of the electrical vector field
      -plt.quiver(triang.x, triang.y, Ex/E_norm, Ey/E_norm,
      -           units='xy', scale=10., zorder=3, color='blue',
      -           width=0.007, headwidth=3., headlength=4.)
      -
      -plt.title('Gradient plot: an electrical dipole')
      -plt.show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/pylab_examples/triinterp_demo.html b/dev/examples/pylab_examples/triinterp_demo.html deleted file mode 100644 index 90cf83d64a3..00000000000 --- a/dev/examples/pylab_examples/triinterp_demo.html +++ /dev/null @@ -1,207 +0,0 @@ - - - - - - - - pylab_examples example code: triinterp_demo.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      pylab_examples example code: triinterp_demo.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/triinterp_demo.png -
      -
      """
      -Interpolation from triangular grid to quad grid.
      -"""
      -import matplotlib.pyplot as plt
      -import matplotlib.tri as mtri
      -import numpy as np
      -
      -# Create triangulation.
      -x = np.asarray([0, 1, 2, 3, 0.5, 1.5, 2.5, 1, 2, 1.5])
      -y = np.asarray([0, 0, 0, 0, 1.0, 1.0, 1.0, 2, 2, 3.0])
      -triangles = [[0, 1, 4], [1, 2, 5], [2, 3, 6], [1, 5, 4], [2, 6, 5], [4, 5, 7],
      -             [5, 6, 8], [5, 8, 7], [7, 8, 9]]
      -triang = mtri.Triangulation(x, y, triangles)
      -
      -# Interpolate to regularly-spaced quad grid.
      -z = np.cos(1.5*x)*np.cos(1.5*y)
      -xi, yi = np.meshgrid(np.linspace(0, 3, 20), np.linspace(0, 3, 20))
      -
      -interp_lin = mtri.LinearTriInterpolator(triang, z)
      -zi_lin = interp_lin(xi, yi)
      -
      -interp_cubic_geom = mtri.CubicTriInterpolator(triang, z, kind='geom')
      -zi_cubic_geom = interp_cubic_geom(xi, yi)
      -
      -interp_cubic_min_E = mtri.CubicTriInterpolator(triang, z, kind='min_E')
      -zi_cubic_min_E = interp_cubic_min_E(xi, yi)
      -
      -
      -# Plot the triangulation.
      -plt.subplot(221)
      -plt.tricontourf(triang, z)
      -plt.triplot(triang, 'ko-')
      -plt.title('Triangular grid')
      -
      -# Plot linear interpolation to quad grid.
      -plt.subplot(222)
      -plt.contourf(xi, yi, zi_lin)
      -plt.plot(xi, yi, 'k-', alpha=0.5)
      -plt.plot(xi.T, yi.T, 'k-', alpha=0.5)
      -plt.title("Linear interpolation")
      -
      -# Plot cubic interpolation to quad grid, kind=geom
      -plt.subplot(223)
      -plt.contourf(xi, yi, zi_cubic_geom)
      -plt.plot(xi, yi, 'k-', alpha=0.5)
      -plt.plot(xi.T, yi.T, 'k-', alpha=0.5)
      -plt.title("Cubic interpolation,\nkind='geom'")
      -
      -# Plot cubic interpolation to quad grid, kind=min_E
      -plt.subplot(224)
      -plt.contourf(xi, yi, zi_cubic_min_E)
      -plt.plot(xi, yi, 'k-', alpha=0.5)
      -plt.plot(xi.T, yi.T, 'k-', alpha=0.5)
      -plt.title("Cubic interpolation,\nkind='min_E'")
      -
      -plt.tight_layout()
      -plt.show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/pylab_examples/tripcolor_demo.html b/dev/examples/pylab_examples/tripcolor_demo.html deleted file mode 100644 index 29c999b4777..00000000000 --- a/dev/examples/pylab_examples/tripcolor_demo.html +++ /dev/null @@ -1,269 +0,0 @@ - - - - - - - - pylab_examples example code: tripcolor_demo.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      pylab_examples example code: tripcolor_demo.py

      -

      (Source code)

      -
      -../../_images/tripcolor_demo_001.png -

      (png, hires.png, pdf)

      -
      -
      -../../_images/tripcolor_demo_011.png -

      (png, hires.png, pdf)

      -
      -
      -../../_images/tripcolor_demo_021.png -

      (png, hires.png, pdf)

      -
      -
      """
      -Pseudocolor plots of unstructured triangular grids.
      -"""
      -import matplotlib.pyplot as plt
      -import matplotlib.tri as tri
      -import numpy as np
      -import math
      -
      -# Creating a Triangulation without specifying the triangles results in the
      -# Delaunay triangulation of the points.
      -
      -# First create the x and y coordinates of the points.
      -n_angles = 36
      -n_radii = 8
      -min_radius = 0.25
      -radii = np.linspace(min_radius, 0.95, n_radii)
      -
      -angles = np.linspace(0, 2*math.pi, n_angles, endpoint=False)
      -angles = np.repeat(angles[...,np.newaxis], n_radii, axis=1)
      -angles[:,1::2] += math.pi/n_angles
      -
      -x = (radii*np.cos(angles)).flatten()
      -y = (radii*np.sin(angles)).flatten()
      -z = (np.cos(radii)*np.cos(angles*3.0)).flatten()
      -
      -# Create the Triangulation; no triangles so Delaunay triangulation created.
      -triang = tri.Triangulation(x, y)
      -
      -# Mask off unwanted triangles.
      -xmid = x[triang.triangles].mean(axis=1)
      -ymid = y[triang.triangles].mean(axis=1)
      -mask = np.where(xmid*xmid + ymid*ymid < min_radius*min_radius, 1, 0)
      -triang.set_mask(mask)
      -
      -# tripcolor plot.
      -plt.figure()
      -plt.gca().set_aspect('equal')
      -plt.tripcolor(triang, z, shading='flat', cmap=plt.cm.rainbow)
      -plt.colorbar()
      -plt.title('tripcolor of Delaunay triangulation, flat shading')
      -
      -# Illustrate Gouraud shading.
      -plt.figure()
      -plt.gca().set_aspect('equal')
      -plt.tripcolor(triang, z, shading='gouraud', cmap=plt.cm.rainbow)
      -plt.colorbar()
      -plt.title('tripcolor of Delaunay triangulation, gouraud shading')
      -
      -
      -# You can specify your own triangulation rather than perform a Delaunay
      -# triangulation of the points, where each triangle is given by the indices of
      -# the three points that make up the triangle, ordered in either a clockwise or
      -# anticlockwise manner.
      -
      -xy = np.asarray([
      -    [-0.101,0.872],[-0.080,0.883],[-0.069,0.888],[-0.054,0.890],[-0.045,0.897],
      -    [-0.057,0.895],[-0.073,0.900],[-0.087,0.898],[-0.090,0.904],[-0.069,0.907],
      -    [-0.069,0.921],[-0.080,0.919],[-0.073,0.928],[-0.052,0.930],[-0.048,0.942],
      -    [-0.062,0.949],[-0.054,0.958],[-0.069,0.954],[-0.087,0.952],[-0.087,0.959],
      -    [-0.080,0.966],[-0.085,0.973],[-0.087,0.965],[-0.097,0.965],[-0.097,0.975],
      -    [-0.092,0.984],[-0.101,0.980],[-0.108,0.980],[-0.104,0.987],[-0.102,0.993],
      -    [-0.115,1.001],[-0.099,0.996],[-0.101,1.007],[-0.090,1.010],[-0.087,1.021],
      -    [-0.069,1.021],[-0.052,1.022],[-0.052,1.017],[-0.069,1.010],[-0.064,1.005],
      -    [-0.048,1.005],[-0.031,1.005],[-0.031,0.996],[-0.040,0.987],[-0.045,0.980],
      -    [-0.052,0.975],[-0.040,0.973],[-0.026,0.968],[-0.020,0.954],[-0.006,0.947],
      -    [ 0.003,0.935],[ 0.006,0.926],[ 0.005,0.921],[ 0.022,0.923],[ 0.033,0.912],
      -    [ 0.029,0.905],[ 0.017,0.900],[ 0.012,0.895],[ 0.027,0.893],[ 0.019,0.886],
      -    [ 0.001,0.883],[-0.012,0.884],[-0.029,0.883],[-0.038,0.879],[-0.057,0.881],
      -    [-0.062,0.876],[-0.078,0.876],[-0.087,0.872],[-0.030,0.907],[-0.007,0.905],
      -    [-0.057,0.916],[-0.025,0.933],[-0.077,0.990],[-0.059,0.993] ])
      -x = xy[:,0]*180/3.14159
      -y = xy[:,1]*180/3.14159
      -
      -triangles = np.asarray([
      -    [67,66, 1],[65, 2,66],[ 1,66, 2],[64, 2,65],[63, 3,64],[60,59,57],
      -    [ 2,64, 3],[ 3,63, 4],[ 0,67, 1],[62, 4,63],[57,59,56],[59,58,56],
      -    [61,60,69],[57,69,60],[ 4,62,68],[ 6, 5, 9],[61,68,62],[69,68,61],
      -    [ 9, 5,70],[ 6, 8, 7],[ 4,70, 5],[ 8, 6, 9],[56,69,57],[69,56,52],
      -    [70,10, 9],[54,53,55],[56,55,53],[68,70, 4],[52,56,53],[11,10,12],
      -    [69,71,68],[68,13,70],[10,70,13],[51,50,52],[13,68,71],[52,71,69],
      -    [12,10,13],[71,52,50],[71,14,13],[50,49,71],[49,48,71],[14,16,15],
      -    [14,71,48],[17,19,18],[17,20,19],[48,16,14],[48,47,16],[47,46,16],
      -    [16,46,45],[23,22,24],[21,24,22],[17,16,45],[20,17,45],[21,25,24],
      -    [27,26,28],[20,72,21],[25,21,72],[45,72,20],[25,28,26],[44,73,45],
      -    [72,45,73],[28,25,29],[29,25,31],[43,73,44],[73,43,40],[72,73,39],
      -    [72,31,25],[42,40,43],[31,30,29],[39,73,40],[42,41,40],[72,33,31],
      -    [32,31,33],[39,38,72],[33,72,38],[33,38,34],[37,35,38],[34,38,35],
      -    [35,37,36] ])
      -
      -xmid = x[triangles].mean(axis=1)
      -ymid = y[triangles].mean(axis=1)
      -x0 = -5
      -y0 = 52
      -zfaces = np.exp(-0.01*( (xmid-x0)*(xmid-x0) + (ymid-y0)*(ymid-y0) ))
      -
      -# Rather than create a Triangulation object, can simply pass x, y and triangles
      -# arrays to tripcolor directly.  It would be better to use a Triangulation object
      -# if the same triangulation was to be used more than once to save duplicated
      -# calculations.
      -# Can specify one color value per face rather than one per point by using the
      -# facecolors kwarg.
      -plt.figure()
      -plt.gca().set_aspect('equal')
      -plt.tripcolor(x, y, triangles, facecolors=zfaces, edgecolors='k')
      -plt.colorbar()
      -plt.title('tripcolor of user-specified triangulation')
      -plt.xlabel('Longitude (degrees)')
      -plt.ylabel('Latitude (degrees)')
      -
      -plt.show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/pylab_examples/triplot_demo.html b/dev/examples/pylab_examples/triplot_demo.html deleted file mode 100644 index c5ace765761..00000000000 --- a/dev/examples/pylab_examples/triplot_demo.html +++ /dev/null @@ -1,247 +0,0 @@ - - - - - - - - pylab_examples example code: triplot_demo.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      pylab_examples example code: triplot_demo.py

      -

      (Source code)

      -
      -../../_images/triplot_demo_001.png -

      (png, hires.png, pdf)

      -
      -
      -../../_images/triplot_demo_011.png -

      (png, hires.png, pdf)

      -
      -
      """
      -Creating and plotting unstructured triangular grids.
      -"""
      -import matplotlib.pyplot as plt
      -import matplotlib.tri as tri
      -import numpy as np
      -import math
      -
      -# Creating a Triangulation without specifying the triangles results in the
      -# Delaunay triangulation of the points.
      -
      -# First create the x and y coordinates of the points.
      -n_angles = 36
      -n_radii = 8
      -min_radius = 0.25
      -radii = np.linspace(min_radius, 0.95, n_radii)
      -
      -angles = np.linspace(0, 2*math.pi, n_angles, endpoint=False)
      -angles = np.repeat(angles[...,np.newaxis], n_radii, axis=1)
      -angles[:,1::2] += math.pi/n_angles
      -
      -x = (radii*np.cos(angles)).flatten()
      -y = (radii*np.sin(angles)).flatten()
      -
      -# Create the Triangulation; no triangles so Delaunay triangulation created.
      -triang = tri.Triangulation(x, y)
      -
      -# Mask off unwanted triangles.
      -xmid = x[triang.triangles].mean(axis=1)
      -ymid = y[triang.triangles].mean(axis=1)
      -mask = np.where(xmid*xmid + ymid*ymid < min_radius*min_radius, 1, 0)
      -triang.set_mask(mask)
      -
      -# Plot the triangulation.
      -plt.figure()
      -plt.gca().set_aspect('equal')
      -plt.triplot(triang, 'bo-')
      -plt.title('triplot of Delaunay triangulation')
      -
      -
      -# You can specify your own triangulation rather than perform a Delaunay
      -# triangulation of the points, where each triangle is given by the indices of
      -# the three points that make up the triangle, ordered in either a clockwise or
      -# anticlockwise manner.
      -
      -xy = np.asarray([
      -    [-0.101,0.872],[-0.080,0.883],[-0.069,0.888],[-0.054,0.890],[-0.045,0.897],
      -    [-0.057,0.895],[-0.073,0.900],[-0.087,0.898],[-0.090,0.904],[-0.069,0.907],
      -    [-0.069,0.921],[-0.080,0.919],[-0.073,0.928],[-0.052,0.930],[-0.048,0.942],
      -    [-0.062,0.949],[-0.054,0.958],[-0.069,0.954],[-0.087,0.952],[-0.087,0.959],
      -    [-0.080,0.966],[-0.085,0.973],[-0.087,0.965],[-0.097,0.965],[-0.097,0.975],
      -    [-0.092,0.984],[-0.101,0.980],[-0.108,0.980],[-0.104,0.987],[-0.102,0.993],
      -    [-0.115,1.001],[-0.099,0.996],[-0.101,1.007],[-0.090,1.010],[-0.087,1.021],
      -    [-0.069,1.021],[-0.052,1.022],[-0.052,1.017],[-0.069,1.010],[-0.064,1.005],
      -    [-0.048,1.005],[-0.031,1.005],[-0.031,0.996],[-0.040,0.987],[-0.045,0.980],
      -    [-0.052,0.975],[-0.040,0.973],[-0.026,0.968],[-0.020,0.954],[-0.006,0.947],
      -    [ 0.003,0.935],[ 0.006,0.926],[ 0.005,0.921],[ 0.022,0.923],[ 0.033,0.912],
      -    [ 0.029,0.905],[ 0.017,0.900],[ 0.012,0.895],[ 0.027,0.893],[ 0.019,0.886],
      -    [ 0.001,0.883],[-0.012,0.884],[-0.029,0.883],[-0.038,0.879],[-0.057,0.881],
      -    [-0.062,0.876],[-0.078,0.876],[-0.087,0.872],[-0.030,0.907],[-0.007,0.905],
      -    [-0.057,0.916],[-0.025,0.933],[-0.077,0.990],[-0.059,0.993] ])
      -x = xy[:,0]*180/3.14159
      -y = xy[:,1]*180/3.14159
      -
      -triangles = np.asarray([
      -    [67,66, 1],[65, 2,66],[ 1,66, 2],[64, 2,65],[63, 3,64],[60,59,57],
      -    [ 2,64, 3],[ 3,63, 4],[ 0,67, 1],[62, 4,63],[57,59,56],[59,58,56],
      -    [61,60,69],[57,69,60],[ 4,62,68],[ 6, 5, 9],[61,68,62],[69,68,61],
      -    [ 9, 5,70],[ 6, 8, 7],[ 4,70, 5],[ 8, 6, 9],[56,69,57],[69,56,52],
      -    [70,10, 9],[54,53,55],[56,55,53],[68,70, 4],[52,56,53],[11,10,12],
      -    [69,71,68],[68,13,70],[10,70,13],[51,50,52],[13,68,71],[52,71,69],
      -    [12,10,13],[71,52,50],[71,14,13],[50,49,71],[49,48,71],[14,16,15],
      -    [14,71,48],[17,19,18],[17,20,19],[48,16,14],[48,47,16],[47,46,16],
      -    [16,46,45],[23,22,24],[21,24,22],[17,16,45],[20,17,45],[21,25,24],
      -    [27,26,28],[20,72,21],[25,21,72],[45,72,20],[25,28,26],[44,73,45],
      -    [72,45,73],[28,25,29],[29,25,31],[43,73,44],[73,43,40],[72,73,39],
      -    [72,31,25],[42,40,43],[31,30,29],[39,73,40],[42,41,40],[72,33,31],
      -    [32,31,33],[39,38,72],[33,72,38],[33,38,34],[37,35,38],[34,38,35],
      -    [35,37,36] ])
      -
      -# Rather than create a Triangulation object, can simply pass x, y and triangles
      -# arrays to triplot directly.  It would be better to use a Triangulation object
      -# if the same triangulation was to be used more than once to save duplicated
      -# calculations.
      -plt.figure()
      -plt.gca().set_aspect('equal')
      -plt.triplot(x, y, triangles, 'go-')
      -plt.title('triplot of user-specified triangulation')
      -plt.xlabel('Longitude (degrees)')
      -plt.ylabel('Latitude (degrees)')
      -
      -plt.show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/pylab_examples/unicode_demo.html b/dev/examples/pylab_examples/unicode_demo.html deleted file mode 100644 index 73eb024dcfa..00000000000 --- a/dev/examples/pylab_examples/unicode_demo.html +++ /dev/null @@ -1,171 +0,0 @@ - - - - - - - - - - pylab_examples example code: unicode_demo.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      pylab_examples example code: unicode_demo.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/unicode_demo.png -
      -
      #!/usr/bin/python
      -# -*- coding: utf-8 -*-
      -
      -from __future__ import unicode_literals
      -
      -import pylab
      -
      -pylab.plot([1, 2, 4])
      -pylab.title('Développés et fabriqués')
      -pylab.xlabel("réactivité nous permettent d'être sélectionnés et adoptés")
      -pylab.ylabel('André was here!')
      -pylab.text( 0.5, 2.5, 'Institut für Festkörperphysik', rotation=45)
      -pylab.text( 1, 1.5, 'AVA (check kerning)')
      -
      -pylab.show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/pylab_examples/usetex_baseline_test.html b/dev/examples/pylab_examples/usetex_baseline_test.html deleted file mode 100644 index 5e21a7dc6d9..00000000000 --- a/dev/examples/pylab_examples/usetex_baseline_test.html +++ /dev/null @@ -1,228 +0,0 @@ - - - - - - - - pylab_examples example code: usetex_baseline_test.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      pylab_examples example code: usetex_baseline_test.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/usetex_baseline_test.png -
      -
      import matplotlib
      -import matplotlib.pyplot as plt
      -import matplotlib.axes as maxes
      -
      -from matplotlib import rcParams
      -rcParams['text.usetex']=True
      -rcParams['text.latex.unicode']=True
      -
      -class Axes(maxes.Axes):
      -    """
      -    A hackish way to simultaneously draw texts w/ usetex=True and
      -    usetex=False in the same figure. It does not work in the ps backend.
      -    """
      -    def __init__(self, *kl, **kw):
      -        self.usetex = kw.pop("usetex", "False")
      -        self.preview = kw.pop("preview", "False")
      -
      -        maxes.Axes.__init__(self, *kl, **kw)
      -
      -    def draw(self, renderer):
      -        usetex = plt.rcParams["text.usetex"]
      -        preview = plt.rcParams["text.latex.preview"]
      -        plt.rcParams["text.usetex"] = self.usetex
      -        plt.rcParams["text.latex.preview"] = self.preview
      -
      -        maxes.Axes.draw(self, renderer)
      -
      -        plt.rcParams["text.usetex"] = usetex
      -        plt.rcParams["text.latex.preview"] = preview
      -
      -Subplot = maxes.subplot_class_factory(Axes)
      -
      -
      -def test_window_extent(ax, usetex, preview):
      -
      -    va = "baseline"
      -    ax.xaxis.set_visible(False)
      -    ax.yaxis.set_visible(False)
      -
      -
      -    #t = ax.text(0., 0., r"mlp", va="baseline", size=150)
      -    text_kw = dict(va=va,
      -                   size=50,
      -                   bbox=dict(pad=0., ec="k", fc="none"))
      -
      -
      -    test_strings = ["lg", r"$\frac{1}{2}\pi$",
      -                    r"$p^{3^A}$", r"$p_{3_2}$"]
      -
      -    ax.axvline(0, color="r")
      -
      -    for i, s in enumerate(test_strings):
      -
      -        ax.axhline(i, color="r")
      -        ax.text(0., 3-i, s, **text_kw)
      -
      -    ax.set_xlim(-0.1,1.1)
      -    ax.set_ylim(-.8,3.9)
      -
      -
      -    ax.set_title("usetex=%s\npreview=%s" % (str(usetex), str(preview)))
      -
      -
      -
      -F = plt.figure(figsize=(2.*3,6.5))
      -
      -for i, usetex, preview in [[0, False, False],
      -                           [1, True, False],
      -                           [2, True, True]]:
      -    ax = Subplot(F, 1, 3, i+1, usetex=usetex, preview=preview)
      -    F.add_subplot(ax)
      -    F.subplots_adjust(top=0.85)
      -
      -    test_window_extent(ax, usetex=usetex, preview=preview)
      -
      -
      -plt.draw()
      -plt.show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/pylab_examples/usetex_demo.html b/dev/examples/pylab_examples/usetex_demo.html deleted file mode 100644 index 09242abbbc0..00000000000 --- a/dev/examples/pylab_examples/usetex_demo.html +++ /dev/null @@ -1,213 +0,0 @@ - - - - - - - - pylab_examples example code: usetex_demo.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      pylab_examples example code: usetex_demo.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/usetex_demo.png -
      -
      import matplotlib
      -matplotlib.rc('text', usetex = True)
      -import pylab
      -import numpy as np
      -
      -## interface tracking profiles
      -N = 500
      -delta = 0.6
      -X = -1 + 2. * np.arange(N) / (N - 1)
      -pylab.plot(X, (1 - np.tanh(4. * X / delta)) / 2,     ## phase field tanh profiles
      -           X, (X + 1) / 2,                           ## level set distance function
      -           X, (1.4 + np.tanh(4. * X / delta)) / 4,   ## composition profile
      -           X, X < 0, 'k--',                               ## sharp interface
      -           linewidth = 5)
      -
      -## legend
      -pylab.legend((r'phase field', r'level set', r'composition', r'sharp interface'), shadow = True, loc = (0.01, 0.55))
      -
      -ltext = pylab.gca().get_legend().get_texts()
      -pylab.setp(ltext[0], fontsize = 20, color = 'b')
      -pylab.setp(ltext[1], fontsize = 20, color = 'g')
      -pylab.setp(ltext[2], fontsize = 20, color = 'r')
      -pylab.setp(ltext[3], fontsize = 20, color = 'k')
      -
      -## the arrow
      -height = 0.1
      -offset = 0.02
      -pylab.plot((-delta / 2., delta / 2), (height, height), 'k', linewidth = 2)
      -pylab.plot((-delta / 2, -delta / 2 + offset * 2), (height, height - offset), 'k', linewidth = 2)
      -pylab.plot((-delta / 2, -delta / 2 + offset * 2), (height, height + offset), 'k', linewidth = 2)
      -pylab.plot((delta / 2, delta / 2 - offset * 2), (height, height - offset), 'k', linewidth = 2)
      -pylab.plot((delta / 2, delta / 2 - offset * 2), (height, height + offset), 'k', linewidth = 2)
      -pylab.text(-0.06, height - 0.06, r'$\delta$', {'color' : 'k', 'fontsize' : 24})
      -
      -## X-axis label
      -pylab.xticks((-1, 0,  1), ('-1', '0',  '1'), color = 'k', size = 20)
      -
      -## Left Y-axis labels
      -pylab.ylabel(r'\bf{phase field} $\phi$', {'color'    : 'b',
      -                                   'fontsize'   : 20 })
      -pylab.yticks((0, 0.5, 1), ('0', '.5', '1'), color = 'k', size = 20)
      -
      -## Right Y-axis labels
      -pylab.text(1.05, 0.5, r"\bf{level set} $\phi$", {'color' : 'g', 'fontsize' : 20},
      -           horizontalalignment = 'left',
      -           verticalalignment = 'center',
      -           rotation = 90,
      -           clip_on = False)
      -pylab.text(1.01, -0.02, "-1", {'color' : 'k', 'fontsize' : 20})
      -pylab.text(1.01, 0.98, "1", {'color' : 'k', 'fontsize' : 20})
      -pylab.text(1.01, 0.48, "0", {'color' : 'k', 'fontsize' : 20})
      -
      -## level set equations
      -pylab.text(0.1, 0.85, r'$|\nabla\phi| = 1,$ \newline $ \frac{\partial \phi}{\partial t} + U|\nabla \phi| = 0$', {'color' : 'g', 'fontsize' : 20})
      -
      -## phase field equations
      -pylab.text(0.2, 0.15, r'$\mathcal{F} = \int f\left( \phi, c \right) dV,$ \newline $ \frac{ \partial \phi } { \partial t } = -M_{ \phi } \frac{ \delta \mathcal{F} } { \delta \phi }$', {'color' : 'b', 'fontsize' : 20})
      -
      -## these went wrong in pdf in a previous version
      -pylab.text(-.9,.42,r'gamma: $\gamma$', {'color': 'r', 'fontsize': 20})
      -pylab.text(-.9,.36,r'Omega: $\Omega$', {'color': 'b', 'fontsize': 20})
      -
      -pylab.show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/pylab_examples/usetex_fonteffects.html b/dev/examples/pylab_examples/usetex_fonteffects.html deleted file mode 100644 index aa2729cb7ec..00000000000 --- a/dev/examples/pylab_examples/usetex_fonteffects.html +++ /dev/null @@ -1,172 +0,0 @@ - - - - - - - - pylab_examples example code: usetex_fonteffects.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      pylab_examples example code: usetex_fonteffects.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/usetex_fonteffects.png -
      -
      # This script demonstrates that font effects specified in your pdftex.map
      -# are now supported in pdf usetex.
      -
      -import matplotlib
      -matplotlib.rc('text', usetex=True)
      -import pylab
      -
      -def setfont(font):
      -    return r'\font\a %s at 14pt\a ' % font
      -
      -for y, font, text in zip(range(5),
      -                         ['ptmr8r', 'ptmri8r', 'ptmro8r', 'ptmr8rn', 'ptmrr8re'],
      -                         ['Nimbus Roman No9 L ' + x for x in
      -                          ['', 'Italics (real italics for comparison)',
      -                           '(slanted)', '(condensed)', '(extended)']]):
      -    pylab.text(0, y, setfont(font) + text)
      -
      -pylab.ylim(-1, 5)
      -pylab.xlim(-0.2, 0.6)
      -pylab.setp(pylab.gca(), frame_on=False, xticks=(), yticks=())
      -pylab.title('Usetex font effects')
      -pylab.savefig('usetex_fonteffects.pdf')
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/pylab_examples/vertical_ticklabels.html b/dev/examples/pylab_examples/vertical_ticklabels.html deleted file mode 100644 index cfb292e7c6b..00000000000 --- a/dev/examples/pylab_examples/vertical_ticklabels.html +++ /dev/null @@ -1,163 +0,0 @@ - - - - - - - - - - pylab_examples example code: vertical_ticklabels.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      pylab_examples example code: vertical_ticklabels.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/vertical_ticklabels.png -
      -
      #!/usr/bin/env python
      -from pylab import *
      -
      -plot([1,2,3,4], [1,4,9,16])
      -locs, labels = xticks([1,2,3,4], ['Frogs', 'Hogs', 'Bogs', 'Slogs'])
      -setp(labels, 'rotation', 'vertical')
      -show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/pylab_examples/vline_demo.html b/dev/examples/pylab_examples/vline_demo.html deleted file mode 100644 index 069a97cf66a..00000000000 --- a/dev/examples/pylab_examples/vline_demo.html +++ /dev/null @@ -1,176 +0,0 @@ - - - - - - - - - - pylab_examples example code: vline_demo.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      pylab_examples example code: vline_demo.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/vline_demo.png -
      -
      #!/usr/bin/env python
      -from matplotlib.pyplot import *
      -from numpy import sin, exp,  absolute, pi, arange
      -from numpy.random import normal
      -
      -def f(t):
      -    s1 = sin(2*pi*t)
      -    e1 = exp(-t)
      -    return absolute((s1*e1))+.05
      -
      -
      -t = arange(0.0, 5.0, 0.1)
      -s = f(t)
      -nse = normal(0.0, 0.3, t.shape) * s
      -
      -plot(t, s+nse, 'b^')
      -vlines(t, [0], s)
      -xlabel('time (s)')
      -title('Comparison of model with data')
      -show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/pylab_examples/vline_hline_demo.html b/dev/examples/pylab_examples/vline_hline_demo.html deleted file mode 100644 index e972957fbbc..00000000000 --- a/dev/examples/pylab_examples/vline_hline_demo.html +++ /dev/null @@ -1,186 +0,0 @@ - - - - - - - - pylab_examples example code: vline_hline_demo.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      pylab_examples example code: vline_hline_demo.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/vline_hline_demo1.png -
      -
      #!/usr/bin/env python
      -
      -"""
      -Small demonstration of the hlines and vlines plots.
      -"""
      -
      -from matplotlib import pyplot as plt
      -from numpy import sin, exp,  absolute, pi, arange
      -from numpy.random import normal
      -
      -
      -def f(t):
      -    s1 = sin(2 * pi * t)
      -    e1 = exp(-t)
      -    return absolute((s1 * e1)) + .05
      -
      -
      -t = arange(0.0, 5.0, 0.1)
      -s = f(t)
      -nse = normal(0.0, 0.3, t.shape) * s
      -
      -fig = plt.figure(figsize=(12, 6))
      -vax = fig.add_subplot(121)
      -hax = fig.add_subplot(122)
      -
      -vax.plot(t, s + nse, 'b^')
      -vax.vlines(t, [0], s)
      -vax.set_xlabel('time (s)')
      -vax.set_title('Vertical lines demo')
      -
      -hax.plot(s + nse, t, 'b^')
      -hax.hlines(t, [0], s, lw=2)
      -hax.set_xlabel('time (s)')
      -hax.set_title('Horizontal lines demo')
      -
      -plt.show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/pylab_examples/webapp_demo.html b/dev/examples/pylab_examples/webapp_demo.html deleted file mode 100644 index 59f000ab82b..00000000000 --- a/dev/examples/pylab_examples/webapp_demo.html +++ /dev/null @@ -1,206 +0,0 @@ - - - - - - - - pylab_examples example code: webapp_demo.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      pylab_examples example code: webapp_demo.py

      -

      [source code]

      -
      #!/usr/bin/env python
      -# -*- noplot -*-
      -"""
      -This example shows how to use the agg backend directly to create
      -images, which may be of use to web application developers who want
      -full control over their code without using the pyplot interface to
      -manage figures, figure closing etc.
      -
      -.. note::
      -
      -    It is not necessary to avoid using the pyplot interface in order to
      -    create figures without a graphical front-end - simply setting
      -    the backend to "Agg" would be sufficient.
      -
      -
      -It is also worth noting that, because matplotlib can save figures to file-like
      -object, matplotlib can also be used inside a cgi-script *without* needing to
      -write a figure to disk.
      -
      -"""
      -
      -from matplotlib.backends.backend_agg import FigureCanvasAgg
      -from matplotlib.figure import Figure
      -import numpy as np
      -
      -
      -def make_fig():
      -    """
      -    Make a figure and save it to "webagg.png".
      -
      -    """
      -    fig = Figure()
      -    ax = fig.add_subplot(1, 1, 1)
      -
      -    ax.plot([1, 2, 3], 'ro--', markersize=12, markerfacecolor='g')
      -
      -    # make a translucent scatter collection
      -    x = np.random.rand(100)
      -    y = np.random.rand(100)
      -    area = np.pi * (10 * np.random.rand(100)) ** 2 # 0 to 10 point radiuses
      -    c = ax.scatter(x, y, area)
      -    c.set_alpha(0.5)
      -
      -    # add some text decoration
      -    ax.set_title('My first image')
      -    ax.set_ylabel('Some numbers')
      -    ax.set_xticks((.2, .4, .6, .8))
      -    labels = ax.set_xticklabels(('Bill', 'Fred', 'Ted', 'Ed'))
      -
      -    # To set object properties, you can either iterate over the
      -    # objects manually, or define you own set command, as in setapi
      -    # above.
      -    for label in labels:
      -        label.set_rotation(45)
      -        label.set_fontsize(12)
      -
      -    FigureCanvasAgg(fig).print_png('webapp.png', dpi=150)
      -
      -make_fig()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/pylab_examples/webapp_demo.py b/dev/examples/pylab_examples/webapp_demo.py deleted file mode 100644 index ad3702a62bf..00000000000 --- a/dev/examples/pylab_examples/webapp_demo.py +++ /dev/null @@ -1,59 +0,0 @@ -#!/usr/bin/env python -# -*- noplot -*- -""" -This example shows how to use the agg backend directly to create -images, which may be of use to web application developers who want -full control over their code without using the pyplot interface to -manage figures, figure closing etc. - -.. note:: - - It is not necessary to avoid using the pyplot interface in order to - create figures without a graphical front-end - simply setting - the backend to "Agg" would be sufficient. - - -It is also worth noting that, because matplotlib can save figures to file-like -object, matplotlib can also be used inside a cgi-script *without* needing to -write a figure to disk. - -""" - -from matplotlib.backends.backend_agg import FigureCanvasAgg -from matplotlib.figure import Figure -import numpy as np - - -def make_fig(): - """ - Make a figure and save it to "webagg.png". - - """ - fig = Figure() - ax = fig.add_subplot(1, 1, 1) - - ax.plot([1, 2, 3], 'ro--', markersize=12, markerfacecolor='g') - - # make a translucent scatter collection - x = np.random.rand(100) - y = np.random.rand(100) - area = np.pi * (10 * np.random.rand(100)) ** 2 # 0 to 10 point radiuses - c = ax.scatter(x, y, area) - c.set_alpha(0.5) - - # add some text decoration - ax.set_title('My first image') - ax.set_ylabel('Some numbers') - ax.set_xticks((.2, .4, .6, .8)) - labels = ax.set_xticklabels(('Bill', 'Fred', 'Ted', 'Ed')) - - # To set object properties, you can either iterate over the - # objects manually, or define you own set command, as in setapi - # above. - for label in labels: - label.set_rotation(45) - label.set_fontsize(12) - - FigureCanvasAgg(fig).print_png('webapp.png', dpi=150) - -make_fig() \ No newline at end of file diff --git a/dev/examples/pylab_examples/xcorr_demo.html b/dev/examples/pylab_examples/xcorr_demo.html deleted file mode 100644 index 5a5a51b06b7..00000000000 --- a/dev/examples/pylab_examples/xcorr_demo.html +++ /dev/null @@ -1,166 +0,0 @@ - - - - - - - - pylab_examples example code: xcorr_demo.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      pylab_examples example code: xcorr_demo.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/xcorr_demo1.png -
      -
      import matplotlib.pyplot as plt
      -import numpy as np
      -
      -x,y = np.random.randn(2,100)
      -fig = plt.figure()
      -ax1 = fig.add_subplot(211)
      -ax1.xcorr(x, y, usevlines=True, maxlags=50, normed=True, lw=2)
      -ax1.grid(True)
      -ax1.axhline(0, color='black', lw=2)
      -
      -ax2 = fig.add_subplot(212, sharex=ax1)
      -ax2.acorr(x, usevlines=True, normed=True, maxlags=50, lw=2)
      -ax2.grid(True)
      -ax2.axhline(0, color='black', lw=2)
      -
      -plt.show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/pylab_examples/zorder_demo.html b/dev/examples/pylab_examples/zorder_demo.html deleted file mode 100644 index 934f39e5cd5..00000000000 --- a/dev/examples/pylab_examples/zorder_demo.html +++ /dev/null @@ -1,199 +0,0 @@ - - - - - - - - pylab_examples example code: zorder_demo.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      pylab_examples example code: zorder_demo.py

      -

      (Source code)

      -
      -../../_images/zorder_demo_00.png -

      (png, hires.png, pdf)

      -
      -
      -../../_images/zorder_demo_01.png -

      (png, hires.png, pdf)

      -
      -
      #!/usr/bin/env python
      -"""
      -The default drawing order for axes is patches, lines, text.  This
      -order is determined by the zorder attribute.  The following defaults
      -are set
      -
      -Artist                      Z-order
      -Patch / PatchCollection      1
      -Line2D / LineCollection      2
      -Text                         3
      -
      -You can change the order for individual artists by setting the zorder.  Any
      -individual plot() call can set a value for the zorder of that particular item.
      -
      -In the fist subplot below, the lines are drawn above the patch
      -collection from the scatter, which is the default.
      -
      -In the subplot below, the order is reversed.
      -
      -The second figure shows how to control the zorder of individual lines.
      -"""
      -
      -from pylab import *
      -x = rand(20); y = rand(20)
      -
      -subplot(211)
      -plot(x, y, 'r', lw=3)
      -scatter(x,y,s=120)
      -
      -subplot(212)
      -plot(x, y, 'r', zorder=1, lw=3)
      -scatter(x,y,s=120, zorder=2)
      -
      -# A new figure, with individually ordered items
      -x=frange(0,2*pi,npts=100)
      -figure()
      -plot(x,sin(x),linewidth=10, color='black',label='zorder=10',zorder = 10)  # on top
      -plot(x,cos(1.3*x),linewidth=10, color='red', label='zorder=1',zorder = 1) # bottom
      -plot(x,sin(2.1*x),linewidth=10, color='green', label='zorder=3',zorder = 3)
      -axhline(0,linewidth=10, color='blue', label='zorder=2',zorder = 2)
      -l = legend()
      -l.set_zorder(20) # put the legend on top
      -
      -show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/shapes_and_collections/artist_reference.html b/dev/examples/shapes_and_collections/artist_reference.html deleted file mode 100644 index 089af4e9d71..00000000000 --- a/dev/examples/shapes_and_collections/artist_reference.html +++ /dev/null @@ -1,251 +0,0 @@ - - - - - - - - shapes_and_collections example code: artist_reference.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      shapes_and_collections example code: artist_reference.py

      -

      (Source code)

      -
      """
      -Reference for matplotlib artists
      -
      -This example displays several of matplotlib's graphics primitives (artists)
      -drawn using matplotlib API. A full list of artists and the documentation is
      -available at http://matplotlib.org/api/artist_api.html.
      -
      -Copyright (c) 2010, Bartosz Telenczuk
      -BSD License
      -"""
      -import matplotlib.pyplot as plt; plt.rcdefaults()
      -from mpltools import style; style.use('gallery')
      -
      -import numpy as np
      -import matplotlib.pyplot as plt
      -import matplotlib.path as mpath
      -import matplotlib.lines as mlines
      -import matplotlib.patches as mpatches
      -from matplotlib.collections import PatchCollection
      -
      -
      -def label(xy, text):
      -    y = xy[1] - 0.15 # shift y-value for label so that it's below the artist
      -    plt.text(xy[0], y, text, ha="center", family='sans-serif', size=14)
      -
      -
      -fig, ax = plt.subplots()
      -# create 3x3 grid to plot the artists
      -grid = np.mgrid[0.2:0.8:3j, 0.2:0.8:3j].reshape(2, -1).T
      -
      -patches = []
      -
      -# add a circle
      -circle = mpatches.Circle(grid[0], 0.1,ec="none")
      -patches.append(circle)
      -label(grid[0], "Circle")
      -
      -# add a rectangle
      -rect = mpatches.Rectangle(grid[1] - [0.025, 0.05], 0.05, 0.1, ec="none")
      -patches.append(rect)
      -label(grid[1], "Rectangle")
      -
      -# add a wedge
      -wedge = mpatches.Wedge(grid[2], 0.1, 30, 270, ec="none")
      -patches.append(wedge)
      -label(grid[2], "Wedge")
      -
      -# add a Polygon
      -polygon = mpatches.RegularPolygon(grid[3], 5, 0.1)
      -patches.append(polygon)
      -label(grid[3], "Polygon")
      -
      -#add an ellipse
      -ellipse = mpatches.Ellipse(grid[4], 0.2, 0.1)
      -patches.append(ellipse)
      -label(grid[4], "Ellipse")
      -
      -#add an arrow
      -arrow = mpatches.Arrow(grid[5, 0]-0.05, grid[5, 1]-0.05, 0.1, 0.1, width=0.1)
      -patches.append(arrow)
      -label(grid[5], "Arrow")
      -
      -# add a path patch
      -Path = mpath.Path
      -path_data = [
      -     (Path.MOVETO, [ 0.018, -0.11 ]),
      -     (Path.CURVE4, [-0.031, -0.051]),
      -     (Path.CURVE4, [-0.115,  0.073]),
      -     (Path.CURVE4, [-0.03 ,  0.073]),
      -     (Path.LINETO, [-0.011,  0.039]),
      -     (Path.CURVE4, [ 0.043,  0.121]),
      -     (Path.CURVE4, [ 0.075, -0.005]),
      -     (Path.CURVE4, [ 0.035, -0.027]),
      -     (Path.CLOSEPOLY, [0.018, -0.11])
      -    ]
      -codes, verts = zip(*path_data)
      -path = mpath.Path(verts + grid[6], codes)
      -patch = mpatches.PathPatch(path)
      -patches.append(patch)
      -label(grid[6], "PathPatch")
      -
      -# add a fancy box
      -fancybox = mpatches.FancyBboxPatch(
      -        grid[7] - [0.025, 0.05], 0.05, 0.1,
      -        boxstyle=mpatches.BoxStyle("Round", pad=0.02))
      -patches.append(fancybox)
      -label(grid[7], "FancyBoxPatch")
      -
      -# add a line
      -x,y = np.array([[-0.06, 0.0, 0.1], [0.05, -0.05, 0.05]])
      -line = mlines.Line2D(x + grid[8, 0], y + grid[8, 1], lw=5., alpha=0.3)
      -label(grid[8], "Line2D")
      -
      -colors = np.linspace(0, 1, len(patches))
      -collection = PatchCollection(patches, cmap=plt.cm.hsv, alpha=0.3)
      -collection.set_array(np.array(colors))
      -ax.add_collection(collection)
      -ax.add_line(line)
      -
      -plt.subplots_adjust(left=0, right=1, bottom=0, top=1)
      -plt.axis('equal')
      -plt.axis('off')
      -
      -plt.show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/shapes_and_collections/index.html b/dev/examples/shapes_and_collections/index.html deleted file mode 100644 index fadaa2c73c8..00000000000 --- a/dev/examples/shapes_and_collections/index.html +++ /dev/null @@ -1,160 +0,0 @@ - - - - - - - - shapes_and_collections Examples — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      shapes_and_collections Examples

      - --- - - - - - -
      Release:1.3.x
      Date:May 21, 2013
      - -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/shapes_and_collections/path_patch_demo.html b/dev/examples/shapes_and_collections/path_patch_demo.html deleted file mode 100644 index 4e077b337b4..00000000000 --- a/dev/examples/shapes_and_collections/path_patch_demo.html +++ /dev/null @@ -1,184 +0,0 @@ - - - - - - - - shapes_and_collections example code: path_patch_demo.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      shapes_and_collections example code: path_patch_demo.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/path_patch_demo.png -
      -
      """
      -Demo of a PathPatch object.
      -"""
      -import matplotlib.path as mpath
      -import matplotlib.patches as mpatches
      -import matplotlib.pyplot as plt
      -
      -
      -fig, ax = plt.subplots()
      -
      -Path = mpath.Path
      -path_data = [
      -    (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(*path_data)
      -path = mpath.Path(verts, codes)
      -patch = mpatches.PathPatch(path, facecolor='r', alpha=0.5)
      -ax.add_patch(patch)
      -
      -# plot control points and connecting lines
      -x, y = zip(*path.vertices)
      -line, = ax.plot(x, y, 'go-')
      -
      -ax.grid()
      -ax.axis('equal')
      -plt.show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/shapes_and_collections/scatter_demo.html b/dev/examples/shapes_and_collections/scatter_demo.html deleted file mode 100644 index 3e1bd219791..00000000000 --- a/dev/examples/shapes_and_collections/scatter_demo.html +++ /dev/null @@ -1,164 +0,0 @@ - - - - - - - - shapes_and_collections example code: scatter_demo.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      shapes_and_collections example code: scatter_demo.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/scatter_demo1.png -
      -
      """
      -Simple demo of a scatter plot.
      -"""
      -import numpy as np
      -import matplotlib.pyplot as plt
      -
      -
      -N = 50
      -x = np.random.rand(N)
      -y = np.random.rand(N)
      -area = np.pi * (15 * np.random.rand(N))**2 # 0 to 15 point radiuses
      -
      -plt.scatter(x, y, s=area, alpha=0.5)
      -plt.show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/showcase/index.html b/dev/examples/showcase/index.html deleted file mode 100644 index 6a513d55bf8..00000000000 --- a/dev/examples/showcase/index.html +++ /dev/null @@ -1,158 +0,0 @@ - - - - - - - - showcase Examples — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      showcase Examples

      - --- - - - - - -
      Release:1.3.x
      Date:May 21, 2013
      - -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/showcase/integral_demo.html b/dev/examples/showcase/integral_demo.html deleted file mode 100644 index 380944e1909..00000000000 --- a/dev/examples/showcase/integral_demo.html +++ /dev/null @@ -1,201 +0,0 @@ - - - - - - - - showcase example code: integral_demo.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      showcase example code: integral_demo.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/integral_demo.png -
      -
      """
      -Plot demonstrating the integral as the area under a curve.
      -
      -Although this is a simple example, it demonstrates some important tweaks:
      -
      -    * A simple line plot with custom color and line width.
      -    * A shaded region created using a Polygon patch.
      -    * A text label with mathtext rendering.
      -    * figtext calls to label the x- and y-axes.
      -    * Use of axis spines to hide the top and right spines.
      -    * Custom tick placement and labels.
      -"""
      -import numpy as np
      -import matplotlib.pyplot as plt
      -from matplotlib.patches import Polygon
      -
      -
      -def func(x):
      -    return (x - 3) * (x - 5) * (x - 7) + 85
      -
      -
      -a, b = 2, 9 # integral limits
      -x = np.linspace(0, 10)
      -y = func(x)
      -
      -fig, ax = plt.subplots()
      -plt.plot(x, y, 'r', linewidth=2)
      -plt.ylim(ymin=0)
      -
      -# Make the shaded region
      -ix = np.linspace(a, b)
      -iy = func(ix)
      -verts = [(a, 0)] + list(zip(ix, iy)) + [(b, 0)]
      -poly = Polygon(verts, facecolor='0.9', edgecolor='0.5')
      -ax.add_patch(poly)
      -
      -plt.text(0.5 * (a + b), 30, r"$\int_a^b f(x)\mathrm{d}x$",
      -         horizontalalignment='center', fontsize=20)
      -
      -plt.figtext(0.9, 0.05, '$x$')
      -plt.figtext(0.1, 0.9, '$y$')
      -
      -ax.spines['right'].set_visible(False)
      -ax.spines['top'].set_visible(False)
      -ax.xaxis.set_ticks_position('bottom')
      -
      -ax.set_xticks((a, b))
      -ax.set_xticklabels(('$a$', '$b$'))
      -ax.set_yticks([])
      -
      -plt.show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/specialty_plots/hinton_demo.html b/dev/examples/specialty_plots/hinton_demo.html deleted file mode 100644 index 4d43c4a9e19..00000000000 --- a/dev/examples/specialty_plots/hinton_demo.html +++ /dev/null @@ -1,190 +0,0 @@ - - - - - - - - specialty_plots example code: hinton_demo.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      specialty_plots example code: hinton_demo.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/hinton_demo.png -
      -
      """
      -Demo of a function to create Hinton diagrams.
      -
      -Hinton diagrams are useful for visualizing the values of a 2D array (e.g.
      -a weight matrix): Positive and negative values are represented by white and
      -black squares, respectively, and the size of each square represents the
      -magnitude of each value.
      -
      -Initial idea from David Warde-Farley on the SciPy Cookbook
      -"""
      -import numpy as np
      -import matplotlib.pyplot as plt
      -
      -
      -def hinton(matrix, max_weight=None, ax=None):
      -    """Draw Hinton diagram for visualizing a weight matrix."""
      -    ax = ax if ax is not None else plt.gca()
      -
      -    if not max_weight:
      -        max_weight = 2**np.ceil(np.log(np.abs(matrix).max())/np.log(2))
      -
      -    ax.patch.set_facecolor('gray')
      -    ax.set_aspect('equal', 'box')
      -    ax.xaxis.set_major_locator(plt.NullLocator())
      -    ax.yaxis.set_major_locator(plt.NullLocator())
      -
      -    for (x,y),w in np.ndenumerate(matrix):
      -        color = 'white' if w > 0 else 'black'
      -        size = np.sqrt(np.abs(w))
      -        rect = plt.Rectangle([x - size / 2, y - size / 2], size, size,
      -                             facecolor=color, edgecolor=color)
      -        ax.add_patch(rect)
      -
      -    ax.autoscale_view()
      -    ax.invert_yaxis()
      -
      -
      -if __name__ == '__main__':
      -    hinton(np.random.rand(20, 20) - 0.5)
      -    plt.show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/specialty_plots/index.html b/dev/examples/specialty_plots/index.html deleted file mode 100644 index ea66acbde82..00000000000 --- a/dev/examples/specialty_plots/index.html +++ /dev/null @@ -1,158 +0,0 @@ - - - - - - - - specialty_plots Examples — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      specialty_plots Examples

      - --- - - - - - -
      Release:1.3.x
      Date:May 21, 2013
      -
      - -
      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/statistics/errorbar_demo.html b/dev/examples/statistics/errorbar_demo.html deleted file mode 100644 index 2a63040e694..00000000000 --- a/dev/examples/statistics/errorbar_demo.html +++ /dev/null @@ -1,162 +0,0 @@ - - - - - - - - statistics example code: errorbar_demo.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      statistics example code: errorbar_demo.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/errorbar_demo1.png -
      -
      """
      -Demo of the errorbar function.
      -"""
      -import numpy as np
      -import matplotlib.pyplot as plt
      -
      -# example data
      -x = np.arange(0.1, 4, 0.5)
      -y = np.exp(-x)
      -
      -plt.errorbar(x, y, xerr=0.2, yerr=0.4)
      -plt.show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/statistics/errorbar_demo_features.html b/dev/examples/statistics/errorbar_demo_features.html deleted file mode 100644 index bea37720411..00000000000 --- a/dev/examples/statistics/errorbar_demo_features.html +++ /dev/null @@ -1,188 +0,0 @@ - - - - - - - - statistics example code: errorbar_demo_features.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      statistics example code: errorbar_demo_features.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/errorbar_demo_features.png -
      -
      """
      -Demo of errorbar function with different ways of specifying error bars.
      -
      -Errors can be specified as a constant value (as shown in `errorbar_demo.py`),
      -or as demonstrated in this example, they can be specified by an N x 1 or 2 x N,
      -where N is the number of data points.
      -
      -N x 1:
      -    Error varies for each point, but the error values are symmetric (i.e. the
      -    lower and upper values are equal).
      -
      -2 x N:
      -    Error varies for each point, and the lower and upper limits (in that order)
      -    are different (asymmetric case)
      -
      -In addition, this example demonstrates how to use log scale with errorbar.
      -"""
      -import numpy as np
      -import matplotlib.pyplot as plt
      -
      -# example data
      -x = np.arange(0.1, 4, 0.5)
      -y = np.exp(-x)
      -# example error bar values that vary with x-position
      -error = 0.1 + 0.2 * x
      -# error bar values w/ different -/+ errors
      -lower_error = 0.4 * error
      -upper_error = error
      -asymmetric_error = [lower_error, upper_error]
      -
      -fig, (ax0, ax1) = plt.subplots(nrows=2, sharex=True)
      -ax0.errorbar(x, y, yerr=error, fmt='-o')
      -ax0.set_title('variable, symmetric error')
      -
      -ax1.errorbar(x, y, xerr=asymmetric_error, fmt='o')
      -ax1.set_title('variable, asymmetric error')
      -ax1.set_yscale('log')
      -plt.show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/statistics/histogram_demo_features.html b/dev/examples/statistics/histogram_demo_features.html deleted file mode 100644 index f1cfbef4997..00000000000 --- a/dev/examples/statistics/histogram_demo_features.html +++ /dev/null @@ -1,185 +0,0 @@ - - - - - - - - statistics example code: histogram_demo_features.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      statistics example code: histogram_demo_features.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/histogram_demo_features1.png -
      -
      """
      -Demo of the histogram (hist) function with a few features.
      -
      -In addition to the basic histogram, this demo shows a few optional features:
      -
      -    * Setting the number of data bins
      -    * The ``normed`` flag, which normalizes bin heights so that the integral of
      -      the histogram is 1. The resulting histogram is a probability density.
      -    * Setting the face color of the bars
      -    * Setting the opacity (alpha value).
      -
      -"""
      -import numpy as np
      -import matplotlib.mlab as mlab
      -import matplotlib.pyplot as plt
      -
      -
      -# example data
      -mu = 100 # mean of distribution
      -sigma = 15 # standard deviation of distribution
      -x = mu + sigma * np.random.randn(10000)
      -
      -num_bins = 50
      -# the histogram of the data
      -n, bins, patches = plt.hist(x, num_bins, normed=1, facecolor='green', alpha=0.5)
      -# add a 'best fit' line
      -y = mlab.normpdf(bins, mu, sigma)
      -plt.plot(bins, y, 'r--')
      -plt.xlabel('Smarts')
      -plt.ylabel('Probability')
      -plt.title(r'Histogram of IQ: $\mu=100$, $\sigma=15$')
      -
      -# Tweak spacing to prevent clipping of ylabel
      -plt.subplots_adjust(left=0.15)
      -plt.show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/statistics/index.html b/dev/examples/statistics/index.html deleted file mode 100644 index f2345f5ed06..00000000000 --- a/dev/examples/statistics/index.html +++ /dev/null @@ -1,160 +0,0 @@ - - - - - - - - statistics Examples — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      statistics Examples

      - --- - - - - - -
      Release:1.3.x
      Date:May 21, 2013
      - -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/subplots_axes_and_figures/index.html b/dev/examples/subplots_axes_and_figures/index.html deleted file mode 100644 index d7326cdc697..00000000000 --- a/dev/examples/subplots_axes_and_figures/index.html +++ /dev/null @@ -1,158 +0,0 @@ - - - - - - - - subplots_axes_and_figures Examples — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      subplots_axes_and_figures Examples

      - --- - - - - - -
      Release:1.3.x
      Date:May 21, 2013
      -
      - -
      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/subplots_axes_and_figures/subplot_demo.html b/dev/examples/subplots_axes_and_figures/subplot_demo.html deleted file mode 100644 index 911a01a3ecd..00000000000 --- a/dev/examples/subplots_axes_and_figures/subplot_demo.html +++ /dev/null @@ -1,174 +0,0 @@ - - - - - - - - subplots_axes_and_figures example code: subplot_demo.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      subplots_axes_and_figures example code: subplot_demo.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/subplot_demo2.png -
      -
      """
      -Simple demo with multiple subplots.
      -"""
      -import numpy as np
      -import matplotlib.pyplot as plt
      -
      -
      -x1 = np.linspace(0.0, 5.0)
      -x2 = np.linspace(0.0, 2.0)
      -
      -y1 = np.cos(2 * np.pi * x1) * np.exp(-x1)
      -y2 = np.cos(2 * np.pi * x2)
      -
      -plt.subplot(2, 1, 1)
      -plt.plot(x1, y1, 'yo-')
      -plt.title('A tale of 2 subplots')
      -plt.ylabel('Damped oscillation')
      -
      -plt.subplot(2, 1, 2)
      -plt.plot(x2, y2, 'r.-')
      -plt.xlabel('time (s)')
      -plt.ylabel('Undamped')
      -
      -plt.show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/tests/backend_driver.html b/dev/examples/tests/backend_driver.html deleted file mode 100644 index 8951634b111..00000000000 --- a/dev/examples/tests/backend_driver.html +++ /dev/null @@ -1,673 +0,0 @@ - - - - - - - - tests example code: backend_driver.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      tests example code: backend_driver.py

      -

      [source code]

      -
      #!/usr/bin/env python
      -
      -from __future__ import print_function, division
      -"""
      -This is used to drive many of the examples across the backends, for
      -regression testing, and comparing backend efficiency.
      -
      -You can specify the backends to be tested either via the --backends
      -switch, which takes a comma-separated list, or as separate arguments,
      -e.g.
      -
      -    python backend_driver.py agg ps
      -
      -would test the agg and ps backends. If no arguments are given, a
      -default list of backends will be tested.
      -
      -Interspersed with the backend arguments can be switches for the Python
      -interpreter executing the tests. If entering such arguments causes an
      -option parsing error with the driver script, separate them from driver
      -switches with a --.
      -"""
      -
      -import os
      -import time
      -import sys
      -import glob
      -from optparse import OptionParser
      -
      -import matplotlib.rcsetup as rcsetup
      -from matplotlib.cbook import Bunch, dedent
      -
      -
      -all_backends = list(rcsetup.all_backends)  # to leave the original list alone
      -
      -# actual physical directory for each dir
      -dirs = dict(files=os.path.join('..', 'lines_bars_and_markers'),
      -            shapes=os.path.join('..', 'shapes_and_collections'),
      -            images=os.path.join('..', 'images_contours_and_fields'),
      -            pie=os.path.join('..', 'pie_and_polar_charts'),
      -            text=os.path.join('..', 'text_labels_and_annotations'),
      -            ticks=os.path.join('..', 'ticks_and_spines'),
      -            subplots=os.path.join('..', 'subplots_axes_and_figures'),
      -            specialty=os.path.join('..', 'specialty_plots'),
      -            showcase=os.path.join('..', 'showcase'),
      -            pylab = os.path.join('..', 'pylab_examples'),
      -            api = os.path.join('..', 'api'),
      -            units = os.path.join('..', 'units'),
      -            mplot3d = os.path.join('..', 'mplot3d'))
      -
      -
      -# files in each dir
      -files = dict()
      -
      -files['lines'] = [
      -    'barh_demo.py',
      -    'fill_demo.py',
      -    'fill_demo_features.py',
      -    'line_demo_dash_control.py',
      -    ]
      -
      -files['shapes'] = [
      -    'path_patch_demo.py',
      -    'scatter_demo.py',
      -    ]
      -
      -files['colors'] = [
      -    'color_cycle_demo.py',
      -    ]
      -
      -files['images'] = [
      -    'imshow_demo.py',
      -    ]
      -
      -files['statistics'] = [
      -    'errorbar_demo.py',
      -    'errorbar_demo_features.py',
      -    'histogram_demo_features.py',
      -    ]
      -
      -files['pie'] = [
      -    'pie_demo.py',
      -    'polar_bar_demo.py',
      -    'polar_scatter_demo.py',
      -    ]
      -
      -files['text_labels_and_annotations'] = [
      -    'text_demo_fontdict.py',
      -    'unicode_demo.py',
      -    ]
      -
      -files['ticks_and_spines'] = [
      -    'spines_demo_bounds.py',
      -    'ticklabels_demo_rotation.py',
      -    ]
      -
      -files['subplots_axes_and_figures'] = [
      -    'subplot_demo.py',
      -    ]
      -
      -files['showcase'] = [
      -    'integral_demo.py',
      -    ]
      -
      -files['pylab'] = [
      -    'accented_text.py',
      -    'alignment_test.py',
      -    'annotation_demo.py',
      -    'annotation_demo.py',
      -    'annotation_demo2.py',
      -    'annotation_demo2.py',
      -    'anscombe.py',
      -    'arctest.py',
      -    'arrow_demo.py',
      -    'axes_demo.py',
      -    'axes_props.py',
      -    'axhspan_demo.py',
      -    'axis_equal_demo.py',
      -    'bar_stacked.py',
      -    'barb_demo.py',
      -    'barchart_demo.py',
      -    'barcode_demo.py',
      -    'boxplot_demo.py',
      -    'broken_barh.py',
      -    'clippedline.py',
      -    'cohere_demo.py',
      -    'color_by_yvalue.py',
      -    'color_demo.py',
      -    'colorbar_tick_labelling_demo.py',
      -    'contour_demo.py',
      -    'contour_image.py',
      -    'contour_label_demo.py',
      -    'contourf_demo.py',
      -    'contourf_log.py',
      -    'coords_demo.py',
      -    'coords_report.py',
      -    'csd_demo.py',
      -    'cursor_demo.py',
      -    'custom_cmap.py',
      -    'custom_figure_class.py',
      -    'custom_ticker1.py',
      -    'customize_rc.py',
      -    'dashpointlabel.py',
      -    'date_demo1.py',
      -    'date_demo2.py',
      -    'date_demo_convert.py',
      -    'date_demo_rrule.py',
      -    'date_index_formatter.py',
      -    'dolphin.py',
      -    'ellipse_collection.py',
      -    'ellipse_demo.py',
      -    'ellipse_rotated.py',
      -    'equal_aspect_ratio.py',
      -    'errorbar_limits.py',
      -    'fancyarrow_demo.py',
      -    'fancybox_demo.py',
      -    'fancybox_demo2.py',
      -    'fancytextbox_demo.py',
      -    'figimage_demo.py',
      -    'figlegend_demo.py',
      -    'figure_title.py',
      -    'fill_between_demo.py',
      -    'fill_spiral.py',
      -    'finance_demo.py',
      -    'findobj_demo.py',
      -    'fonts_demo.py',
      -    'fonts_demo_kw.py',
      -    'ganged_plots.py',
      -    'geo_demo.py',
      -    'gradient_bar.py',
      -    'griddata_demo.py',
      -    'hatch_demo.py',
      -    'hexbin_demo.py',
      -    'hexbin_demo2.py',
      -    'hist_colormapped.py',
      -    'histogram_demo_extended.py',
      -    'vline_hline_demo.py',
      -
      -    'image_clip_path.py',
      -    'image_demo.py',
      -    'image_demo2.py',
      -    'image_interp.py',
      -    'image_masked.py',
      -    'image_nonuniform.py',
      -    'image_origin.py',
      -    'image_slices_viewer.py',
      -    'interp_demo.py',
      -    'invert_axes.py',
      -    'layer_images.py',
      -    'legend_auto.py',
      -    'legend_demo.py',
      -    'legend_demo2.py',
      -    'legend_demo3.py',
      -    'legend_scatter.py',
      -    'line_collection.py',
      -    'line_collection2.py',
      -    'line_styles.py',
      -    'log_bar.py',
      -    'log_demo.py',
      -    'log_test.py',
      -    'major_minor_demo1.py',
      -    'major_minor_demo2.py',
      -    'manual_axis.py',
      -    'masked_demo.py',
      -    'mathtext_demo.py',
      -    'mathtext_examples.py',
      -    'matplotlib_icon.py',
      -    'matshow.py',
      -    'mri_demo.py',
      -    'mri_with_eeg.py',
      -    'multi_image.py',
      -    'multiline.py',
      -    'multiple_figs_demo.py',
      -    'nan_test.py',
      -    'newscalarformatter_demo.py',
      -    'pcolor_demo.py',
      -    'pcolor_log.py',
      -    'pcolor_small.py',
      -    'pie_demo2.py',
      -    'plotfile_demo.py',
      -    'polar_demo.py',
      -    'polar_legend.py',
      -    'psd_demo.py',
      -    'psd_demo2.py',
      -    'psd_demo3.py',
      -    'quadmesh_demo.py',
      -    'quiver_demo.py',
      -    'scatter_custom_symbol.py',
      -    'scatter_demo2.py',
      -    'scatter_masked.py',
      -    'scatter_profile.py',
      -    'scatter_star_poly.py',
      -    #'set_and_get.py',
      -    'shared_axis_across_figures.py',
      -    'shared_axis_demo.py',
      -    'simple_plot.py',
      -    'specgram_demo.py',
      -    'spine_placement_demo.py',
      -    'spy_demos.py',
      -    'stem_plot.py',
      -    'step_demo.py',
      -    'stix_fonts_demo.py',
      -    'stock_demo.py',
      -    'subplots_adjust.py',
      -    'symlog_demo.py',
      -    'table_demo.py',
      -    'text_handles.py',
      -    'text_rotation.py',
      -    'text_rotation_relative_to_line.py',
      -    'transoffset.py',
      -    'xcorr_demo.py',
      -    'zorder_demo.py',
      -    ]
      -
      -
      -files['api'] = [
      -    'agg_oo.py',
      -    'barchart_demo.py',
      -    'bbox_intersect.py',
      -    'collections_demo.py',
      -    'colorbar_only.py',
      -    'custom_projection_example.py',
      -    'custom_scale_example.py',
      -    'date_demo.py',
      -    'date_index_formatter.py',
      -    'donut_demo.py',
      -    'font_family_rc.py',
      -    'image_zcoord.py',
      -    'joinstyle.py',
      -    'legend_demo.py',
      -    'line_with_text.py',
      -    'logo2.py',
      -    'mathtext_asarray.py',
      -    'patch_collection.py',
      -    'quad_bezier.py',
      -    'scatter_piecharts.py',
      -    'span_regions.py',
      -    'two_scales.py',
      -    'unicode_minus.py',
      -    'watermark_image.py',
      -    'watermark_text.py',
      -]
      -
      -files['units'] = [
      -    'annotate_with_units.py',
      -    #'artist_tests.py',  # broken, fixme
      -    'bar_demo2.py',
      -    #'bar_unit_demo.py', # broken, fixme
      -    #'ellipse_with_units.py',  # broken, fixme
      -    'radian_demo.py',
      -    'units_sample.py',
      -    #'units_scatter.py', # broken, fixme
      -
      -    ]
      -
      -files['mplot3d'] = [
      -    '2dcollections3d_demo.py',
      -    'bars3d_demo.py',
      -    'contour3d_demo.py',
      -    'contour3d_demo2.py',
      -    'contourf3d_demo.py',
      -    'lines3d_demo.py',
      -    'polys3d_demo.py',
      -    'scatter3d_demo.py',
      -    'surface3d_demo.py',
      -    'surface3d_demo2.py',
      -    'text3d_demo.py',
      -    'wire3d_demo.py',
      -    ]
      -
      -# dict from dir to files we know we don't want to test (eg examples
      -# not using pyplot, examples requiring user input, animation examples,
      -# examples that may only work in certain environs (usetex examples?),
      -# examples that generate multiple figures
      -
      -excluded = {
      -    'pylab' : ['__init__.py', 'toggle_images.py',],
      -    'units' : ['__init__.py', 'date_support.py',],
      -}
      -
      -def report_missing(dir, flist):
      -    'report the py files in dir that are not in flist'
      -    globstr = os.path.join(dir, '*.py')
      -    fnames = glob.glob(globstr)
      -
      -    pyfiles = set([os.path.split(fullpath)[-1] for fullpath in set(fnames)])
      -
      -    exclude = set(excluded.get(dir, []))
      -    flist = set(flist)
      -    missing = list(pyfiles-flist-exclude)
      -    missing.sort()
      -    if missing:
      -        print ('%s files not tested: %s'%(dir, ', '.join(missing)))
      -
      -def report_all_missing(directories):
      -    for f in directories:
      -        report_missing(dirs[f], files[f])
      -
      -
      -# tests known to fail on a given backend
      -
      -failbackend = dict(
      -    svg = ('tex_demo.py', ),
      -    agg = ('hyperlinks.py', ),
      -    pdf = ('hyperlinks.py', ),
      -    ps = ('hyperlinks.py', ),
      -    )
      -
      -
      -try:
      -    import subprocess
      -    def run(arglist):
      -        try:
      -            ret = subprocess.call(arglist)
      -        except KeyboardInterrupt:
      -            sys.exit()
      -        else:
      -            return ret
      -except ImportError:
      -    def run(arglist):
      -        os.system(' '.join(arglist))
      -
      -def drive(backend, directories, python=['python'], switches = []):
      -    exclude = failbackend.get(backend, [])
      -
      -    # Clear the destination directory for the examples
      -    path = backend
      -    if os.path.exists(path):
      -        import glob
      -        for fname in os.listdir(path):
      -            os.unlink(os.path.join(path, fname))
      -    else:
      -        os.mkdir(backend)
      -    failures = []
      -
      -    testcases = [os.path.join(dirs[d], fname)
      -                 for d in directories
      -                 for fname in files[d]]
      -
      -    for fullpath in testcases:
      -        print ('\tdriving %-40s' % (fullpath)),
      -        sys.stdout.flush()
      -        fpath, fname = os.path.split(fullpath)
      -
      -        if fname in exclude:
      -            print ('\tSkipping %s, known to fail on backend: %s'%backend)
      -            continue
      -
      -        basename, ext = os.path.splitext(fname)
      -        outfile = os.path.join(path, basename)
      -        tmpfile_name = '_tmp_%s.py' % basename
      -        tmpfile = open(tmpfile_name, 'w')
      -
      -        future_imports = 'from __future__ import division, print_function'
      -        for line in open(fullpath):
      -            line_lstrip = line.lstrip()
      -            if line_lstrip.startswith("#"):
      -                tmpfile.write(line)
      -            elif 'unicode_literals' in line:
      -                future_imports = future_imports + ', unicode_literals'
      -
      -        tmpfile.writelines((
      -            future_imports+'\n',
      -            'import sys\n',
      -            'sys.path.append("%s")\n' % fpath.replace('\\', '\\\\'),
      -            'import matplotlib\n',
      -            'matplotlib.use("%s")\n' % backend,
      -            'from pylab import savefig\n',
      -            'import numpy\n',
      -            'numpy.seterr(invalid="ignore")\n',
      -            ))
      -        for line in open(fullpath):
      -            line_lstrip = line.lstrip()
      -            if (line_lstrip.startswith('from __future__ import') or
      -                line_lstrip.startswith('matplotlib.use') or
      -                line_lstrip.startswith('savefig') or
      -                line_lstrip.startswith('show')):
      -                continue
      -            tmpfile.write(line)
      -        if backend in rcsetup.interactive_bk:
      -            tmpfile.write('show()')
      -        else:
      -            tmpfile.write('\nsavefig(r"%s", dpi=150)' % outfile)
      -
      -        tmpfile.close()
      -        start_time = time.time()
      -        program = [x % {'name': basename} for x in python]
      -        ret = run(program + [tmpfile_name] + switches)
      -        end_time = time.time()
      -        print ("%s %s" % ((end_time - start_time), ret))
      -        #os.system('%s %s %s' % (python, tmpfile_name, ' '.join(switches)))
      -        os.remove(tmpfile_name)
      -        if ret:
      -            failures.append(fullpath)
      -    return failures
      -
      -def parse_options():
      -    doc = (__doc__ and __doc__.split('\n\n')) or "  "
      -    op = OptionParser(description=doc[0].strip(),
      -                      usage='%prog [options] [--] [backends and switches]',
      -                      #epilog='\n'.join(doc[1:])  # epilog not supported on my python2.4 machine: JDH
      -                      )
      -    op.disable_interspersed_args()
      -    op.set_defaults(dirs='pylab,api,units,mplot3d',
      -                    clean=False, coverage=False, valgrind=False)
      -    op.add_option('-d', '--dirs', '--directories', type='string',
      -                  dest='dirs', help=dedent('''
      -      Run only the tests in these directories; comma-separated list of
      -      one or more of: pylab (or pylab_examples), api, units, mplot3d'''))
      -    op.add_option('-b', '--backends', type='string', dest='backends',
      -                  help=dedent('''
      -      Run tests only for these backends; comma-separated list of
      -      one or more of: agg, ps, svg, pdf, template, cairo,
      -      Default is everything except cairo.'''))
      -    op.add_option('--clean', action='store_true', dest='clean',
      -                  help='Remove result directories, run no tests')
      -    op.add_option('-c', '--coverage', action='store_true', dest='coverage',
      -                  help='Run in coverage.py')
      -    op.add_option('-v', '--valgrind', action='store_true', dest='valgrind',
      -                  help='Run in valgrind')
      -
      -    options, args = op.parse_args()
      -    switches = [x for x in args if x.startswith('--')]
      -    backends = [x.lower() for x in args if not x.startswith('--')]
      -    if options.backends:
      -        backends += [be.lower() for be in options.backends.split(',')]
      -
      -    result = Bunch(
      -        dirs = options.dirs.split(','),
      -        backends = backends or ['agg', 'ps', 'svg', 'pdf', 'template'],
      -        clean = options.clean,
      -        coverage = options.coverage,
      -        valgrind = options.valgrind,
      -        switches = switches)
      -    if 'pylab_examples' in result.dirs:
      -        result.dirs[result.dirs.index('pylab_examples')] = 'pylab'
      -    #print result
      -    return (result)
      -
      -if __name__ == '__main__':
      -    times = {}
      -    failures = {}
      -    options = parse_options()
      -
      -    if options.clean:
      -        localdirs = [d for d in glob.glob('*') if os.path.isdir(d)]
      -        all_backends_set = set(all_backends)
      -        for d in localdirs:
      -            if d.lower() not in all_backends_set:
      -                continue
      -            print ('removing %s'%d)
      -            for fname in glob.glob(os.path.join(d, '*')):
      -                os.remove(fname)
      -            os.rmdir(d)
      -        for fname in glob.glob('_tmp*.py'):
      -            os.remove(fname)
      -
      -        print ('all clean...')
      -        raise SystemExit
      -    if options.coverage:
      -        python = ['coverage.py', '-x']
      -    elif options.valgrind:
      -        python = ['valgrind', '--tool=memcheck', '--leak-check=yes',
      -                  '--log-file=%(name)s', sys.executable]
      -    elif sys.platform == 'win32':
      -        python = [sys.executable]
      -    else:
      -        python = [sys.executable]
      -
      -    report_all_missing(options.dirs)
      -    for backend in options.backends:
      -        print ('testing %s %s' % (backend, ' '.join(options.switches)))
      -        t0 = time.time()
      -        failures[backend] = \
      -            drive(backend, options.dirs, python, options.switches)
      -        t1 = time.time()
      -        times[backend] = (t1-t0)/60.0
      -
      -    # print times
      -    for backend, elapsed in times.items():
      -        print ('Backend %s took %1.2f minutes to complete' % (backend, elapsed))
      -        failed = failures[backend]
      -        if failed:
      -            print ('  Failures: %s' % failed)
      -        if 'template' in times:
      -            print ('\ttemplate ratio %1.3f, template residual %1.3f' % (
      -                elapsed/times['template'], elapsed-times['template']))
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/tests/backend_driver.py b/dev/examples/tests/backend_driver.py deleted file mode 100644 index 1c7a4587538..00000000000 --- a/dev/examples/tests/backend_driver.py +++ /dev/null @@ -1,526 +0,0 @@ -#!/usr/bin/env python - -from __future__ import print_function, division -""" -This is used to drive many of the examples across the backends, for -regression testing, and comparing backend efficiency. - -You can specify the backends to be tested either via the --backends -switch, which takes a comma-separated list, or as separate arguments, -e.g. - - python backend_driver.py agg ps - -would test the agg and ps backends. If no arguments are given, a -default list of backends will be tested. - -Interspersed with the backend arguments can be switches for the Python -interpreter executing the tests. If entering such arguments causes an -option parsing error with the driver script, separate them from driver -switches with a --. -""" - -import os -import time -import sys -import glob -from optparse import OptionParser - -import matplotlib.rcsetup as rcsetup -from matplotlib.cbook import Bunch, dedent - - -all_backends = list(rcsetup.all_backends) # to leave the original list alone - -# actual physical directory for each dir -dirs = dict(files=os.path.join('..', 'lines_bars_and_markers'), - shapes=os.path.join('..', 'shapes_and_collections'), - images=os.path.join('..', 'images_contours_and_fields'), - pie=os.path.join('..', 'pie_and_polar_charts'), - text=os.path.join('..', 'text_labels_and_annotations'), - ticks=os.path.join('..', 'ticks_and_spines'), - subplots=os.path.join('..', 'subplots_axes_and_figures'), - specialty=os.path.join('..', 'specialty_plots'), - showcase=os.path.join('..', 'showcase'), - pylab = os.path.join('..', 'pylab_examples'), - api = os.path.join('..', 'api'), - units = os.path.join('..', 'units'), - mplot3d = os.path.join('..', 'mplot3d')) - - -# files in each dir -files = dict() - -files['lines'] = [ - 'barh_demo.py', - 'fill_demo.py', - 'fill_demo_features.py', - 'line_demo_dash_control.py', - ] - -files['shapes'] = [ - 'path_patch_demo.py', - 'scatter_demo.py', - ] - -files['colors'] = [ - 'color_cycle_demo.py', - ] - -files['images'] = [ - 'imshow_demo.py', - ] - -files['statistics'] = [ - 'errorbar_demo.py', - 'errorbar_demo_features.py', - 'histogram_demo_features.py', - ] - -files['pie'] = [ - 'pie_demo.py', - 'polar_bar_demo.py', - 'polar_scatter_demo.py', - ] - -files['text_labels_and_annotations'] = [ - 'text_demo_fontdict.py', - 'unicode_demo.py', - ] - -files['ticks_and_spines'] = [ - 'spines_demo_bounds.py', - 'ticklabels_demo_rotation.py', - ] - -files['subplots_axes_and_figures'] = [ - 'subplot_demo.py', - ] - -files['showcase'] = [ - 'integral_demo.py', - ] - -files['pylab'] = [ - 'accented_text.py', - 'alignment_test.py', - 'annotation_demo.py', - 'annotation_demo.py', - 'annotation_demo2.py', - 'annotation_demo2.py', - 'anscombe.py', - 'arctest.py', - 'arrow_demo.py', - 'axes_demo.py', - 'axes_props.py', - 'axhspan_demo.py', - 'axis_equal_demo.py', - 'bar_stacked.py', - 'barb_demo.py', - 'barchart_demo.py', - 'barcode_demo.py', - 'boxplot_demo.py', - 'broken_barh.py', - 'clippedline.py', - 'cohere_demo.py', - 'color_by_yvalue.py', - 'color_demo.py', - 'colorbar_tick_labelling_demo.py', - 'contour_demo.py', - 'contour_image.py', - 'contour_label_demo.py', - 'contourf_demo.py', - 'contourf_log.py', - 'coords_demo.py', - 'coords_report.py', - 'csd_demo.py', - 'cursor_demo.py', - 'custom_cmap.py', - 'custom_figure_class.py', - 'custom_ticker1.py', - 'customize_rc.py', - 'dashpointlabel.py', - 'date_demo1.py', - 'date_demo2.py', - 'date_demo_convert.py', - 'date_demo_rrule.py', - 'date_index_formatter.py', - 'dolphin.py', - 'ellipse_collection.py', - 'ellipse_demo.py', - 'ellipse_rotated.py', - 'equal_aspect_ratio.py', - 'errorbar_limits.py', - 'fancyarrow_demo.py', - 'fancybox_demo.py', - 'fancybox_demo2.py', - 'fancytextbox_demo.py', - 'figimage_demo.py', - 'figlegend_demo.py', - 'figure_title.py', - 'fill_between_demo.py', - 'fill_spiral.py', - 'finance_demo.py', - 'findobj_demo.py', - 'fonts_demo.py', - 'fonts_demo_kw.py', - 'ganged_plots.py', - 'geo_demo.py', - 'gradient_bar.py', - 'griddata_demo.py', - 'hatch_demo.py', - 'hexbin_demo.py', - 'hexbin_demo2.py', - 'hist_colormapped.py', - 'histogram_demo_extended.py', - 'vline_hline_demo.py', - - 'image_clip_path.py', - 'image_demo.py', - 'image_demo2.py', - 'image_interp.py', - 'image_masked.py', - 'image_nonuniform.py', - 'image_origin.py', - 'image_slices_viewer.py', - 'interp_demo.py', - 'invert_axes.py', - 'layer_images.py', - 'legend_auto.py', - 'legend_demo.py', - 'legend_demo2.py', - 'legend_demo3.py', - 'legend_scatter.py', - 'line_collection.py', - 'line_collection2.py', - 'line_styles.py', - 'log_bar.py', - 'log_demo.py', - 'log_test.py', - 'major_minor_demo1.py', - 'major_minor_demo2.py', - 'manual_axis.py', - 'masked_demo.py', - 'mathtext_demo.py', - 'mathtext_examples.py', - 'matplotlib_icon.py', - 'matshow.py', - 'mri_demo.py', - 'mri_with_eeg.py', - 'multi_image.py', - 'multiline.py', - 'multiple_figs_demo.py', - 'nan_test.py', - 'newscalarformatter_demo.py', - 'pcolor_demo.py', - 'pcolor_log.py', - 'pcolor_small.py', - 'pie_demo2.py', - 'plotfile_demo.py', - 'polar_demo.py', - 'polar_legend.py', - 'psd_demo.py', - 'psd_demo2.py', - 'psd_demo3.py', - 'quadmesh_demo.py', - 'quiver_demo.py', - 'scatter_custom_symbol.py', - 'scatter_demo2.py', - 'scatter_masked.py', - 'scatter_profile.py', - 'scatter_star_poly.py', - #'set_and_get.py', - 'shared_axis_across_figures.py', - 'shared_axis_demo.py', - 'simple_plot.py', - 'specgram_demo.py', - 'spine_placement_demo.py', - 'spy_demos.py', - 'stem_plot.py', - 'step_demo.py', - 'stix_fonts_demo.py', - 'stock_demo.py', - 'subplots_adjust.py', - 'symlog_demo.py', - 'table_demo.py', - 'text_handles.py', - 'text_rotation.py', - 'text_rotation_relative_to_line.py', - 'transoffset.py', - 'xcorr_demo.py', - 'zorder_demo.py', - ] - - -files['api'] = [ - 'agg_oo.py', - 'barchart_demo.py', - 'bbox_intersect.py', - 'collections_demo.py', - 'colorbar_only.py', - 'custom_projection_example.py', - 'custom_scale_example.py', - 'date_demo.py', - 'date_index_formatter.py', - 'donut_demo.py', - 'font_family_rc.py', - 'image_zcoord.py', - 'joinstyle.py', - 'legend_demo.py', - 'line_with_text.py', - 'logo2.py', - 'mathtext_asarray.py', - 'patch_collection.py', - 'quad_bezier.py', - 'scatter_piecharts.py', - 'span_regions.py', - 'two_scales.py', - 'unicode_minus.py', - 'watermark_image.py', - 'watermark_text.py', -] - -files['units'] = [ - 'annotate_with_units.py', - #'artist_tests.py', # broken, fixme - 'bar_demo2.py', - #'bar_unit_demo.py', # broken, fixme - #'ellipse_with_units.py', # broken, fixme - 'radian_demo.py', - 'units_sample.py', - #'units_scatter.py', # broken, fixme - - ] - -files['mplot3d'] = [ - '2dcollections3d_demo.py', - 'bars3d_demo.py', - 'contour3d_demo.py', - 'contour3d_demo2.py', - 'contourf3d_demo.py', - 'lines3d_demo.py', - 'polys3d_demo.py', - 'scatter3d_demo.py', - 'surface3d_demo.py', - 'surface3d_demo2.py', - 'text3d_demo.py', - 'wire3d_demo.py', - ] - -# dict from dir to files we know we don't want to test (eg examples -# not using pyplot, examples requiring user input, animation examples, -# examples that may only work in certain environs (usetex examples?), -# examples that generate multiple figures - -excluded = { - 'pylab' : ['__init__.py', 'toggle_images.py',], - 'units' : ['__init__.py', 'date_support.py',], -} - -def report_missing(dir, flist): - 'report the py files in dir that are not in flist' - globstr = os.path.join(dir, '*.py') - fnames = glob.glob(globstr) - - pyfiles = set([os.path.split(fullpath)[-1] for fullpath in set(fnames)]) - - exclude = set(excluded.get(dir, [])) - flist = set(flist) - missing = list(pyfiles-flist-exclude) - missing.sort() - if missing: - print ('%s files not tested: %s'%(dir, ', '.join(missing))) - -def report_all_missing(directories): - for f in directories: - report_missing(dirs[f], files[f]) - - -# tests known to fail on a given backend - -failbackend = dict( - svg = ('tex_demo.py', ), - agg = ('hyperlinks.py', ), - pdf = ('hyperlinks.py', ), - ps = ('hyperlinks.py', ), - ) - - -try: - import subprocess - def run(arglist): - try: - ret = subprocess.call(arglist) - except KeyboardInterrupt: - sys.exit() - else: - return ret -except ImportError: - def run(arglist): - os.system(' '.join(arglist)) - -def drive(backend, directories, python=['python'], switches = []): - exclude = failbackend.get(backend, []) - - # Clear the destination directory for the examples - path = backend - if os.path.exists(path): - import glob - for fname in os.listdir(path): - os.unlink(os.path.join(path, fname)) - else: - os.mkdir(backend) - failures = [] - - testcases = [os.path.join(dirs[d], fname) - for d in directories - for fname in files[d]] - - for fullpath in testcases: - print ('\tdriving %-40s' % (fullpath)), - sys.stdout.flush() - fpath, fname = os.path.split(fullpath) - - if fname in exclude: - print ('\tSkipping %s, known to fail on backend: %s'%backend) - continue - - basename, ext = os.path.splitext(fname) - outfile = os.path.join(path, basename) - tmpfile_name = '_tmp_%s.py' % basename - tmpfile = open(tmpfile_name, 'w') - - future_imports = 'from __future__ import division, print_function' - for line in open(fullpath): - line_lstrip = line.lstrip() - if line_lstrip.startswith("#"): - tmpfile.write(line) - elif 'unicode_literals' in line: - future_imports = future_imports + ', unicode_literals' - - tmpfile.writelines(( - future_imports+'\n', - 'import sys\n', - 'sys.path.append("%s")\n' % fpath.replace('\\', '\\\\'), - 'import matplotlib\n', - 'matplotlib.use("%s")\n' % backend, - 'from pylab import savefig\n', - 'import numpy\n', - 'numpy.seterr(invalid="ignore")\n', - )) - for line in open(fullpath): - line_lstrip = line.lstrip() - if (line_lstrip.startswith('from __future__ import') or - line_lstrip.startswith('matplotlib.use') or - line_lstrip.startswith('savefig') or - line_lstrip.startswith('show')): - continue - tmpfile.write(line) - if backend in rcsetup.interactive_bk: - tmpfile.write('show()') - else: - tmpfile.write('\nsavefig(r"%s", dpi=150)' % outfile) - - tmpfile.close() - start_time = time.time() - program = [x % {'name': basename} for x in python] - ret = run(program + [tmpfile_name] + switches) - end_time = time.time() - print ("%s %s" % ((end_time - start_time), ret)) - #os.system('%s %s %s' % (python, tmpfile_name, ' '.join(switches))) - os.remove(tmpfile_name) - if ret: - failures.append(fullpath) - return failures - -def parse_options(): - doc = (__doc__ and __doc__.split('\n\n')) or " " - op = OptionParser(description=doc[0].strip(), - usage='%prog [options] [--] [backends and switches]', - #epilog='\n'.join(doc[1:]) # epilog not supported on my python2.4 machine: JDH - ) - op.disable_interspersed_args() - op.set_defaults(dirs='pylab,api,units,mplot3d', - clean=False, coverage=False, valgrind=False) - op.add_option('-d', '--dirs', '--directories', type='string', - dest='dirs', help=dedent(''' - Run only the tests in these directories; comma-separated list of - one or more of: pylab (or pylab_examples), api, units, mplot3d''')) - op.add_option('-b', '--backends', type='string', dest='backends', - help=dedent(''' - Run tests only for these backends; comma-separated list of - one or more of: agg, ps, svg, pdf, template, cairo, - Default is everything except cairo.''')) - op.add_option('--clean', action='store_true', dest='clean', - help='Remove result directories, run no tests') - op.add_option('-c', '--coverage', action='store_true', dest='coverage', - help='Run in coverage.py') - op.add_option('-v', '--valgrind', action='store_true', dest='valgrind', - help='Run in valgrind') - - options, args = op.parse_args() - switches = [x for x in args if x.startswith('--')] - backends = [x.lower() for x in args if not x.startswith('--')] - if options.backends: - backends += [be.lower() for be in options.backends.split(',')] - - result = Bunch( - dirs = options.dirs.split(','), - backends = backends or ['agg', 'ps', 'svg', 'pdf', 'template'], - clean = options.clean, - coverage = options.coverage, - valgrind = options.valgrind, - switches = switches) - if 'pylab_examples' in result.dirs: - result.dirs[result.dirs.index('pylab_examples')] = 'pylab' - #print result - return (result) - -if __name__ == '__main__': - times = {} - failures = {} - options = parse_options() - - if options.clean: - localdirs = [d for d in glob.glob('*') if os.path.isdir(d)] - all_backends_set = set(all_backends) - for d in localdirs: - if d.lower() not in all_backends_set: - continue - print ('removing %s'%d) - for fname in glob.glob(os.path.join(d, '*')): - os.remove(fname) - os.rmdir(d) - for fname in glob.glob('_tmp*.py'): - os.remove(fname) - - print ('all clean...') - raise SystemExit - if options.coverage: - python = ['coverage.py', '-x'] - elif options.valgrind: - python = ['valgrind', '--tool=memcheck', '--leak-check=yes', - '--log-file=%(name)s', sys.executable] - elif sys.platform == 'win32': - python = [sys.executable] - else: - python = [sys.executable] - - report_all_missing(options.dirs) - for backend in options.backends: - print ('testing %s %s' % (backend, ' '.join(options.switches))) - t0 = time.time() - failures[backend] = \ - drive(backend, options.dirs, python, options.switches) - t1 = time.time() - times[backend] = (t1-t0)/60.0 - - # print times - for backend, elapsed in times.items(): - print ('Backend %s took %1.2f minutes to complete' % (backend, elapsed)) - failed = failures[backend] - if failed: - print (' Failures: %s' % failed) - if 'template' in times: - print ('\ttemplate ratio %1.3f, template residual %1.3f' % ( - elapsed/times['template'], elapsed-times['template'])) diff --git a/dev/examples/tests/index.html b/dev/examples/tests/index.html deleted file mode 100644 index aede6453b54..00000000000 --- a/dev/examples/tests/index.html +++ /dev/null @@ -1,158 +0,0 @@ - - - - - - - - tests Examples — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      tests Examples

      - --- - - - - - -
      Release:1.3.x
      Date:May 21, 2013
      - -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/text_labels_and_annotations/index.html b/dev/examples/text_labels_and_annotations/index.html deleted file mode 100644 index 0a4dde21f41..00000000000 --- a/dev/examples/text_labels_and_annotations/index.html +++ /dev/null @@ -1,159 +0,0 @@ - - - - - - - - text_labels_and_annotations Examples — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      text_labels_and_annotations Examples

      - --- - - - - - -
      Release:1.3.x
      Date:May 21, 2013
      - -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/text_labels_and_annotations/text_demo_fontdict.html b/dev/examples/text_labels_and_annotations/text_demo_fontdict.html deleted file mode 100644 index 569a080d7b3..00000000000 --- a/dev/examples/text_labels_and_annotations/text_demo_fontdict.html +++ /dev/null @@ -1,175 +0,0 @@ - - - - - - - - text_labels_and_annotations example code: text_demo_fontdict.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      text_labels_and_annotations example code: text_demo_fontdict.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/text_demo_fontdict.png -
      -
      """
      -Demo using fontdict to control style of text and labels.
      -"""
      -import numpy as np
      -import matplotlib.pyplot as plt
      -
      -
      -font = {'family' : 'serif',
      -        'color'  : 'darkred',
      -        'weight' : 'normal',
      -        'size'   : 16,
      -        }
      -
      -x = np.linspace(0.0, 5.0, 100)
      -y = np.cos(2 * np.pi * x) * np.exp(-x)
      -
      -plt.plot(x, y, 'k')
      -plt.title('Damped exponential decay', fontdict=font)
      -plt.text(2, 0.65, r'$\cos(2 \pi t) \exp(-t)$', fontdict=font)
      -plt.xlabel('time (s)', fontdict=font)
      -plt.ylabel('voltage (mV)', fontdict=font)
      -
      -# Tweak spacing to prevent clipping of ylabel
      -plt.subplots_adjust(left=0.15)
      -plt.show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/text_labels_and_annotations/unicode_demo.html b/dev/examples/text_labels_and_annotations/unicode_demo.html deleted file mode 100644 index 4ab7bf5c112..00000000000 --- a/dev/examples/text_labels_and_annotations/unicode_demo.html +++ /dev/null @@ -1,166 +0,0 @@ - - - - - - - - text_labels_and_annotations example code: unicode_demo.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      text_labels_and_annotations example code: unicode_demo.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/unicode_demo.png -
      -
      # -*- coding: utf-8 -*-
      -"""
      -Demo of unicode support in text and labels.
      -"""
      -from __future__ import unicode_literals
      -
      -import matplotlib.pyplot as plt
      -
      -
      -plt.title('Développés et fabriqués')
      -plt.xlabel("réactivité nous permettent d'être sélectionnés et adoptés")
      -plt.ylabel('André was here!')
      -plt.text( 0.2, 0.8, 'Institut für Festkörperphysik', rotation=45)
      -plt.text( 0.4, 0.2, 'AVA (check kerning)')
      -
      -plt.show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/ticks_and_spines/index.html b/dev/examples/ticks_and_spines/index.html deleted file mode 100644 index a58a8780a25..00000000000 --- a/dev/examples/ticks_and_spines/index.html +++ /dev/null @@ -1,161 +0,0 @@ - - - - - - - - ticks_and_spines Examples — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      ticks_and_spines Examples

      - --- - - - - - -
      Release:1.3.x
      Date:May 21, 2013
      - -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/ticks_and_spines/spines_demo.html b/dev/examples/ticks_and_spines/spines_demo.html deleted file mode 100644 index 0551a72c29a..00000000000 --- a/dev/examples/ticks_and_spines/spines_demo.html +++ /dev/null @@ -1,181 +0,0 @@ - - - - - - - - ticks_and_spines example code: spines_demo.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      ticks_and_spines example code: spines_demo.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/spines_demo.png -
      -
      """
      -Basic demo of axis spines.
      -
      -This demo compares a normal axes, with spines on all four sides, and an axes
      -with spines only on the left and bottom.
      -"""
      -import numpy as np
      -import matplotlib.pyplot as plt
      -
      -
      -x = np.linspace(0, 2 * np.pi, 100)
      -y = 2 * np.sin(x)
      -
      -fig, (ax0, ax1) = plt.subplots(nrows=2)
      -
      -ax0.plot(x, y)
      -ax0.set_title('normal spines')
      -
      -ax1.plot(x, y)
      -ax1.set_title('bottom-left spines')
      -
      -# Hide the right and top spines
      -ax1.spines['right'].set_visible(False)
      -ax1.spines['top'].set_visible(False)
      -# Only show ticks on the left and bottom spines
      -ax1.yaxis.set_ticks_position('left')
      -ax1.xaxis.set_ticks_position('bottom')
      -
      -# Tweak spacing between subplots to prevent labels from overlapping
      -plt.subplots_adjust(hspace=0.5)
      -plt.show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/ticks_and_spines/spines_demo_bounds.html b/dev/examples/ticks_and_spines/spines_demo_bounds.html deleted file mode 100644 index b9c98e4658e..00000000000 --- a/dev/examples/ticks_and_spines/spines_demo_bounds.html +++ /dev/null @@ -1,182 +0,0 @@ - - - - - - - - ticks_and_spines example code: spines_demo_bounds.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      ticks_and_spines example code: spines_demo_bounds.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/spines_demo_bounds.png -
      -
      """
      -Demo of spines using custom bounds to limit the extent of the spine.
      -"""
      -import numpy as np
      -import matplotlib.pyplot as plt
      -
      -
      -x = np.linspace(0, 2*np.pi, 50)
      -y = np.sin(x)
      -y2 = y + 0.1 * np.random.normal(size=x.shape)
      -
      -fig, ax = plt.subplots()
      -ax.plot(x, y, 'k--')
      -ax.plot(x, y2, 'ro')
      -
      -# set ticks and tick labels
      -ax.set_xlim((0, 2*np.pi))
      -ax.set_xticks([0, np.pi, 2*np.pi])
      -ax.set_xticklabels(['0', '$\pi$','2$\pi$'])
      -ax.set_ylim((-1.5, 1.5))
      -ax.set_yticks([-1, 0, 1])
      -
      -# Only draw spine between the y-ticks
      -ax.spines['left'].set_bounds(-1, 1)
      -# Hide the right and top spines
      -ax.spines['right'].set_visible(False)
      -ax.spines['top'].set_visible(False)
      -# Only show ticks on the left and bottom spines
      -ax.yaxis.set_ticks_position('left')
      -ax.xaxis.set_ticks_position('bottom')
      -
      -plt.show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/ticks_and_spines/spines_demo_dropped.html b/dev/examples/ticks_and_spines/spines_demo_dropped.html deleted file mode 100644 index 55bb4d565fe..00000000000 --- a/dev/examples/ticks_and_spines/spines_demo_dropped.html +++ /dev/null @@ -1,174 +0,0 @@ - - - - - - - - ticks_and_spines example code: spines_demo_dropped.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      ticks_and_spines example code: spines_demo_dropped.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/spines_demo_dropped.png -
      -
      """
      -Demo of spines offset from the axes (a.k.a. "dropped spines").
      -"""
      -import numpy as np
      -import matplotlib.pyplot as plt
      -
      -
      -fig, ax = plt.subplots()
      -
      -image = np.random.uniform(size=(10, 10))
      -ax.imshow(image, cmap=plt.cm.gray, interpolation='nearest')
      -ax.set_title('dropped spines')
      -
      -# Move left and bottom spines outward by 10 points
      -ax.spines['left'].set_position(('outward', 10))
      -ax.spines['bottom'].set_position(('outward', 10))
      -# Hide the right and top spines
      -ax.spines['right'].set_visible(False)
      -ax.spines['top'].set_visible(False)
      -# Only show ticks on the left and bottom spines
      -ax.yaxis.set_ticks_position('left')
      -ax.xaxis.set_ticks_position('bottom')
      -
      -plt.show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/ticks_and_spines/ticklabels_demo_rotation.html b/dev/examples/ticks_and_spines/ticklabels_demo_rotation.html deleted file mode 100644 index f3b4246c22a..00000000000 --- a/dev/examples/ticks_and_spines/ticklabels_demo_rotation.html +++ /dev/null @@ -1,168 +0,0 @@ - - - - - - - - ticks_and_spines example code: ticklabels_demo_rotation.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      ticks_and_spines example code: ticklabels_demo_rotation.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/ticklabels_demo_rotation.png -
      -
      """
      -Demo of custom tick-labels with user-defined rotation.
      -"""
      -import matplotlib.pyplot as plt
      -
      -
      -x = [1, 2, 3, 4]
      -y = [1, 4, 9, 6]
      -labels = ['Frogs', 'Hogs', 'Bogs', 'Slogs']
      -
      -plt.plot(x, y, 'ro')
      -# You can specify a rotation for the tick labels in degrees or with keywords.
      -plt.xticks(x, labels, rotation='vertical')
      -# Pad margins so that markers don't get clipped by the axes
      -plt.margins(0.2)
      -# Tweak spacing to prevent clipping of tick-labels
      -plt.subplots_adjust(bottom=0.15)
      -plt.show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/units/annotate_with_units.html b/dev/examples/units/annotate_with_units.html deleted file mode 100644 index e0813076c2e..00000000000 --- a/dev/examples/units/annotate_with_units.html +++ /dev/null @@ -1,175 +0,0 @@ - - - - - - - - units example code: annotate_with_units.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      units example code: annotate_with_units.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/annotate_with_units.png -
      -
      import matplotlib.pyplot as plt
      -from basic_units import cm
      -
      -fig = plt.figure()
      -ax = fig.add_subplot(111)
      -
      -
      -ax.annotate( "Note 01", [0.5*cm,  0.5*cm] )
      -
      -# xy and text both unitized
      -ax.annotate('local max', xy=(3*cm, 1*cm),  xycoords='data',
      -            xytext=(0.8*cm, 0.95*cm), textcoords='data',
      -            arrowprops=dict(facecolor='black', shrink=0.05),
      -            horizontalalignment='right', verticalalignment='top')
      -
      -# mixing units w/ nonunits
      -ax.annotate('local max', xy=(3*cm, 1*cm),  xycoords='data',
      -            xytext=(0.8, 0.95), textcoords='axes fraction',
      -            arrowprops=dict(facecolor='black', shrink=0.05),
      -            horizontalalignment='right', verticalalignment='top')
      -
      -
      -ax.set_xlim(0*cm, 4*cm)
      -ax.set_ylim(0*cm, 4*cm)
      -plt.show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/units/artist_tests.html b/dev/examples/units/artist_tests.html deleted file mode 100644 index 3a51b478e7c..00000000000 --- a/dev/examples/units/artist_tests.html +++ /dev/null @@ -1,204 +0,0 @@ - - - - - - - - units example code: artist_tests.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      units example code: artist_tests.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/artist_tests.png -
      -
      """
      -Test unit support with each of the matplotlib primitive artist types
      -
      -The axes handles unit conversions and the artists keep a pointer to
      -their axes parent, so you must init the artists with the axes instance
      -if you want to initialize them with unit data, or else they will not
      -know how to convert the units to scalars
      -"""
      -import random
      -import matplotlib.lines as lines
      -import matplotlib.patches as patches
      -import matplotlib.text as text
      -import matplotlib.collections as collections
      -import matplotlib.units as units
      -
      -from basic_units import cm, inch
      -import numpy as np
      -from matplotlib.pyplot import figure, show
      -
      -fig = figure()
      -ax = fig.add_subplot(111)
      -ax.xaxis.set_units(cm)
      -ax.yaxis.set_units(cm)
      -
      -if 0:
      -    # test a line collection
      -    # Not supported at present.
      -    verts = []
      -    for i in range(10):
      -        # a random line segment in inches
      -        verts.append(zip(*inch*10*np.random.rand(2, random.randint(2,15))))
      -    lc = collections.LineCollection(verts, axes=ax)
      -    ax.add_collection(lc)
      -
      -# test a plain-ol-line
      -line = lines.Line2D([0*cm, 1.5*cm], [0*cm, 2.5*cm], lw=2, color='black', axes=ax)
      -ax.add_line(line)
      -
      -if 0:
      -    # test a patch
      -    # Not supported at present.
      -    rect = patches.Rectangle( (1*cm, 1*cm), width=5*cm, height=2*cm, alpha=0.2, axes=ax)
      -    ax.add_patch(rect)
      -
      -
      -t = text.Text(3*cm, 2.5*cm, 'text label', ha='left', va='bottom', axes=ax)
      -ax.add_artist(t)
      -
      -ax.set_xlim(-1*cm, 10*cm)
      -ax.set_ylim(-1*cm, 10*cm)
      -#ax.xaxis.set_units(inch)
      -ax.grid(True)
      -ax.set_title("Artists with units")
      -show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/units/bar_demo2.html b/dev/examples/units/bar_demo2.html deleted file mode 100644 index 548e1d1db2e..00000000000 --- a/dev/examples/units/bar_demo2.html +++ /dev/null @@ -1,186 +0,0 @@ - - - - - - - - units example code: bar_demo2.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      units example code: bar_demo2.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/bar_demo2.png -
      -
      """
      -plot using a variety of cm vs inches conversions.  The example shows
      -how default unit instrospection works (ax1), how various keywords can
      -be used to set the x and y units to override the defaults (ax2, ax3,
      -ax4) and how one can set the xlimits using scalars (ax3, current units
      -assumed) or units (conversions applied to get the numbers to current
      -units)
      -
      -"""
      -import numpy as np
      -from basic_units import cm, inch
      -import matplotlib.pyplot as plt
      -
      -
      -cms = cm *np.arange(0, 10, 2)
      -bottom=0*cm
      -width=0.8*cm
      -
      -fig = plt.figure()
      -
      -ax1 = fig.add_subplot(2,2,1)
      -ax1.bar(cms, cms, bottom=bottom)
      -
      -ax2 = fig.add_subplot(2,2,2)
      -ax2.bar(cms, cms, bottom=bottom, width=width, xunits=cm, yunits=inch)
      -
      -ax3 = fig.add_subplot(2,2,3)
      -ax3.bar(cms, cms, bottom=bottom, width=width, xunits=inch, yunits=cm)
      -ax3.set_xlim(2, 6)  # scalars are interpreted in current units
      -
      -ax4 = fig.add_subplot(2,2,4)
      -ax4.bar(cms, cms, bottom=bottom, width=width, xunits=inch, yunits=inch)
      -#fig.savefig('simple_conversion_plot.png')
      -ax4.set_xlim(2*cm, 6*cm) # cm are converted to inches
      -
      -plt.show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/units/bar_unit_demo.html b/dev/examples/units/bar_unit_demo.html deleted file mode 100644 index 88d668189ec..00000000000 --- a/dev/examples/units/bar_unit_demo.html +++ /dev/null @@ -1,182 +0,0 @@ - - - - - - - - units example code: bar_unit_demo.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      units example code: bar_unit_demo.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/bar_unit_demo.png -
      -
      #!/usr/bin/env python
      -import numpy as np
      -from basic_units import cm, inch
      -import matplotlib.pyplot as plt
      -
      -
      -N = 5
      -menMeans = (150*cm, 160*cm, 146*cm, 172*cm, 155*cm)
      -menStd =   ( 20*cm,  30*cm,  32*cm,  10*cm,  20*cm)
      -
      -fig = plt.figure()
      -ax = fig.add_subplot(111)
      -
      -ind = np.arange(N)    # the x locations for the groups
      -width = 0.35         # the width of the bars
      -p1 = ax.bar(ind, menMeans, width, color='r', bottom=0*cm, yerr=menStd)
      -
      -
      -womenMeans = (145*cm, 149*cm, 172*cm, 165*cm, 200*cm)
      -womenStd =   (30*cm, 25*cm, 20*cm, 31*cm, 22*cm)
      -p2 = ax.bar(ind+width, womenMeans, width, color='y', bottom=0*cm, yerr=womenStd)
      -
      -ax.set_title('Scores by group and gender')
      -ax.set_xticks(ind+width)
      -ax.set_xticklabels( ('G1', 'G2', 'G3', 'G4', 'G5') )
      -
      -ax.legend( (p1[0], p2[0]), ('Men', 'Women') )
      -ax.yaxis.set_units(inch)
      -ax.autoscale_view()
      -
      -#plt.savefig('barchart_demo')
      -plt.show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/units/basic_units.html b/dev/examples/units/basic_units.html deleted file mode 100644 index 5c0277d27ff..00000000000 --- a/dev/examples/units/basic_units.html +++ /dev/null @@ -1,518 +0,0 @@ - - - - - - - - units example code: basic_units.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      units example code: basic_units.py

      -

      (Source code)

      -
      import math
      -
      -import numpy as np
      -
      -import matplotlib.units as units
      -import matplotlib.ticker as ticker
      -from matplotlib.axes import Axes
      -from matplotlib.cbook import iterable
      -
      -
      -class ProxyDelegate(object):
      -    def __init__(self, fn_name, proxy_type):
      -        self.proxy_type = proxy_type
      -        self.fn_name = fn_name
      -
      -    def __get__(self, obj, objtype=None):
      -        return self.proxy_type(self.fn_name, obj)
      -
      -
      -class TaggedValueMeta (type):
      -    def __init__(cls, name, bases, dict):
      -        for fn_name in cls._proxies.keys():
      -            try:
      -                dummy = getattr(cls, fn_name)
      -            except AttributeError:
      -                setattr(cls, fn_name,
      -                        ProxyDelegate(fn_name, cls._proxies[fn_name]))
      -
      -
      -class PassThroughProxy(object):
      -    def __init__(self, fn_name, obj):
      -        self.fn_name = fn_name
      -        self.target = obj.proxy_target
      -
      -    def __call__(self, *args):
      -        fn = getattr(self.target, self.fn_name)
      -        ret = fn(*args)
      -        return ret
      -
      -
      -class ConvertArgsProxy(PassThroughProxy):
      -    def __init__(self, fn_name, obj):
      -        PassThroughProxy.__init__(self, fn_name, obj)
      -        self.unit = obj.unit
      -
      -    def __call__(self, *args):
      -        converted_args = []
      -        for a in args:
      -            try:
      -                converted_args.append(a.convert_to(self.unit))
      -            except AttributeError:
      -                converted_args.append(TaggedValue(a, self.unit))
      -        converted_args = tuple([c.get_value() for c in converted_args])
      -        return PassThroughProxy.__call__(self, *converted_args)
      -
      -
      -class ConvertReturnProxy(PassThroughProxy):
      -    def __init__(self, fn_name, obj):
      -        PassThroughProxy.__init__(self, fn_name, obj)
      -        self.unit = obj.unit
      -
      -    def __call__(self, *args):
      -        ret = PassThroughProxy.__call__(self, *args)
      -        if (type(ret) == type(NotImplemented)):
      -            return NotImplemented
      -        return TaggedValue(ret, self.unit)
      -
      -
      -class ConvertAllProxy(PassThroughProxy):
      -    def __init__(self, fn_name, obj):
      -        PassThroughProxy.__init__(self, fn_name, obj)
      -        self.unit = obj.unit
      -
      -    def __call__(self, *args):
      -        converted_args = []
      -        arg_units = [self.unit]
      -        for a in args:
      -            if hasattr(a, 'get_unit') and not hasattr(a, 'convert_to'):
      -                # if this arg has a unit type but no conversion ability,
      -                # this operation is prohibited
      -                return NotImplemented
      -
      -            if hasattr(a, 'convert_to'):
      -                try:
      -                    a = a.convert_to(self.unit)
      -                except:
      -                    pass
      -                arg_units.append(a.get_unit())
      -                converted_args.append(a.get_value())
      -            else:
      -                converted_args.append(a)
      -                if hasattr(a, 'get_unit'):
      -                    arg_units.append(a.get_unit())
      -                else:
      -                    arg_units.append(None)
      -        converted_args = tuple(converted_args)
      -        ret = PassThroughProxy.__call__(self, *converted_args)
      -        if (type(ret) == type(NotImplemented)):
      -            return NotImplemented
      -        ret_unit = unit_resolver(self.fn_name, arg_units)
      -        if (ret_unit == NotImplemented):
      -            return NotImplemented
      -        return TaggedValue(ret, ret_unit)
      -
      -
      -class _TaggedValue(object):
      -
      -    _proxies = {'__add__': ConvertAllProxy,
      -                '__sub__': ConvertAllProxy,
      -                '__mul__': ConvertAllProxy,
      -                '__rmul__': ConvertAllProxy,
      -                '__cmp__': ConvertAllProxy,
      -                '__lt__': ConvertAllProxy,
      -                '__gt__': ConvertAllProxy,
      -                '__len__': PassThroughProxy}
      -
      -    def __new__(cls, value, unit):
      -        # generate a new subclass for value
      -        value_class = type(value)
      -        try:
      -            subcls = type('TaggedValue_of_%s' % (value_class.__name__),
      -                          tuple([cls, value_class]),
      -                          {})
      -            if subcls not in units.registry:
      -                units.registry[subcls] = basicConverter
      -            return object.__new__(subcls, value, unit)
      -        except TypeError:
      -            if cls not in units.registry:
      -                units.registry[cls] = basicConverter
      -            return object.__new__(cls, value, unit)
      -
      -    def __init__(self, value, unit):
      -        self.value = value
      -        self.unit = unit
      -        self.proxy_target = self.value
      -
      -    def  __getattribute__(self, name):
      -        if (name.startswith('__')):
      -            return object.__getattribute__(self, name)
      -        variable = object.__getattribute__(self, 'value')
      -        if (hasattr(variable, name) and name not in self.__class__.__dict__):
      -            return getattr(variable, name)
      -        return object.__getattribute__(self, name)
      -
      -    def __array__(self, t=None, context=None):
      -        if t is not None:
      -            return np.asarray(self.value).astype(t)
      -        else:
      -            return np.asarray(self.value, 'O')
      -
      -    def __array_wrap__(self, array, context):
      -        return TaggedValue(array, self.unit)
      -
      -    def __repr__(self):
      -        return 'TaggedValue(' + repr(self.value) + ', ' + repr(self.unit) + ')'
      -
      -    def __str__(self):
      -        return str(self.value) + ' in ' + str(self.unit)
      -
      -    def __len__(self):
      -        return len(self.value)
      -
      -    def __iter__(self):
      -        class IteratorProxy(object):
      -            def __init__(self, iter, unit):
      -                self.iter = iter
      -                self.unit = unit
      -
      -            def __next__(self):
      -                value = next(self.iter)
      -                return TaggedValue(value, self.unit)
      -            next = __next__  # for Python 2
      -        return IteratorProxy(iter(self.value), self.unit)
      -
      -    def get_compressed_copy(self, mask):
      -        new_value = np.ma.masked_array(self.value, mask=mask).compressed()
      -        return TaggedValue(new_value, self.unit)
      -
      -    def convert_to(self, unit):
      -        if (unit == self.unit or not unit):
      -            return self
      -        new_value = self.unit.convert_value_to(self.value, unit)
      -        return TaggedValue(new_value, unit)
      -
      -    def get_value(self):
      -        return self.value
      -
      -    def get_unit(self):
      -        return self.unit
      -
      -
      -TaggedValue = TaggedValueMeta('TaggedValue', (_TaggedValue, ), {})
      -
      -
      -class BasicUnit(object):
      -    def __init__(self, name, fullname=None):
      -        self.name = name
      -        if fullname is None:
      -            fullname = name
      -        self.fullname = fullname
      -        self.conversions = dict()
      -
      -    def __repr__(self):
      -        return 'BasicUnit(%s)'%self.name
      -
      -    def __str__(self):
      -        return self.fullname
      -
      -    def __call__(self, value):
      -        return TaggedValue(value, self)
      -
      -    def __mul__(self, rhs):
      -        value = rhs
      -        unit = self
      -        if hasattr(rhs, 'get_unit'):
      -            value = rhs.get_value()
      -            unit = rhs.get_unit()
      -            unit = unit_resolver('__mul__', (self, unit))
      -        if (unit == NotImplemented):
      -            return NotImplemented
      -        return TaggedValue(value, unit)
      -
      -    def __rmul__(self, lhs):
      -        return self*lhs
      -
      -    def __array_wrap__(self, array, context):
      -        return TaggedValue(array, self)
      -
      -    def __array__(self, t=None, context=None):
      -        ret = np.array([1])
      -        if t is not None:
      -            return ret.astype(t)
      -        else:
      -            return ret
      -
      -    def add_conversion_factor(self, unit, factor):
      -        def convert(x):
      -            return x*factor
      -        self.conversions[unit] = convert
      -
      -    def add_conversion_fn(self, unit, fn):
      -        self.conversions[unit] = fn
      -
      -    def get_conversion_fn(self, unit):
      -        return self.conversions[unit]
      -
      -    def convert_value_to(self, value, unit):
      -        conversion_fn = self.conversions[unit]
      -        ret = conversion_fn(value)
      -        return ret
      -
      -    def get_unit(self):
      -        return self
      -
      -
      -class UnitResolver(object):
      -    def addition_rule(self, units):
      -        for unit_1, unit_2 in zip(units[:-1], units[1:]):
      -            if (unit_1 != unit_2):
      -                return NotImplemented
      -        return units[0]
      -
      -    def multiplication_rule(self, units):
      -        non_null = [u for u in units if u]
      -        if (len(non_null) > 1):
      -            return NotImplemented
      -        return non_null[0]
      -
      -    op_dict = {
      -        '__mul__': multiplication_rule,
      -        '__rmul__': multiplication_rule,
      -        '__add__': addition_rule,
      -        '__radd__': addition_rule,
      -        '__sub__': addition_rule,
      -        '__rsub__': addition_rule}
      -
      -    def __call__(self, operation, units):
      -        if (operation not in self.op_dict):
      -            return NotImplemented
      -
      -        return self.op_dict[operation](self, units)
      -
      -
      -unit_resolver = UnitResolver()
      -
      -cm = BasicUnit('cm', 'centimeters')
      -inch = BasicUnit('inch', 'inches')
      -inch.add_conversion_factor(cm, 2.54)
      -cm.add_conversion_factor(inch, 1/2.54)
      -
      -radians = BasicUnit('rad', 'radians')
      -degrees = BasicUnit('deg', 'degrees')
      -radians.add_conversion_factor(degrees, 180.0/np.pi)
      -degrees.add_conversion_factor(radians, np.pi/180.0)
      -
      -secs = BasicUnit('s', 'seconds')
      -hertz = BasicUnit('Hz', 'Hertz')
      -minutes = BasicUnit('min', 'minutes')
      -
      -secs.add_conversion_fn(hertz, lambda x: 1./x)
      -secs.add_conversion_factor(minutes, 1/60.0)
      -
      -
      -# radians formatting
      -def rad_fn(x, pos=None):
      -    n = int((x / np.pi) * 2.0 + 0.25)
      -    if n == 0:
      -        return '0'
      -    elif n == 1:
      -        return r'$\pi/2$'
      -    elif n == 2:
      -        return r'$\pi$'
      -    elif n % 2 == 0:
      -        return r'$%s\pi$' % (n/2,)
      -    else:
      -        return r'$%s\pi/2$' % (n,)
      -
      -
      -class BasicUnitConverter(units.ConversionInterface):
      -
      -    @staticmethod
      -    def axisinfo(unit, axis):
      -        'return AxisInfo instance for x and unit'
      -
      -        if unit==radians:
      -            return units.AxisInfo(
      -                majloc=ticker.MultipleLocator(base=np.pi/2),
      -                majfmt=ticker.FuncFormatter(rad_fn),
      -                label=unit.fullname,
      -            )
      -        elif unit==degrees:
      -            return units.AxisInfo(
      -                majloc=ticker.AutoLocator(),
      -                majfmt=ticker.FormatStrFormatter(r'$%i^\circ$'),
      -                label=unit.fullname,
      -            )
      -        elif unit is not None:
      -            if hasattr(unit, 'fullname'):
      -                return units.AxisInfo(label=unit.fullname)
      -            elif hasattr(unit, 'unit'):
      -                return units.AxisInfo(label=unit.unit.fullname)
      -        return None
      -
      -    @staticmethod
      -    def convert(val, unit, axis):
      -        if units.ConversionInterface.is_numlike(val):
      -            return val
      -        if iterable(val):
      -            return [thisval.convert_to(unit).get_value() for thisval in val]
      -        else:
      -            return val.convert_to(unit).get_value()
      -
      -    @staticmethod
      -    def default_units(x, axis):
      -        'return the default unit for x or None'
      -        if iterable(x):
      -            for thisx in x:
      -                return thisx.unit
      -        return x.unit
      -
      -
      -def cos(x):
      -    if iterable(x):
      -        return [math.cos(val.convert_to(radians).get_value()) for val in x]
      -    else:
      -        return math.cos(x.convert_to(radians).get_value())
      -
      -
      -basicConverter = BasicUnitConverter()
      -units.registry[BasicUnit] = basicConverter
      -units.registry[TaggedValue] = basicConverter
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/units/ellipse_with_units.html b/dev/examples/units/ellipse_with_units.html deleted file mode 100644 index 9e58950cfde..00000000000 --- a/dev/examples/units/ellipse_with_units.html +++ /dev/null @@ -1,225 +0,0 @@ - - - - - - - - units example code: ellipse_with_units.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      units example code: ellipse_with_units.py

      -

      (Source code)

      -
      -../../_images/ellipse_with_units_00.png -

      (png, hires.png, pdf)

      -
      -
      -../../_images/ellipse_with_units_01.png -

      (png, hires.png, pdf)

      -
      -
      """
      -Compare the ellipse generated with arcs versus a polygonal approximation
      -"""
      -from basic_units import cm
      -import numpy as np
      -from matplotlib import patches
      -import matplotlib.pyplot as plt
      -
      -
      -xcenter, ycenter = 0.38*cm, 0.52*cm
      -#xcenter, ycenter = 0., 0.
      -width, height = 1e-1*cm, 3e-1*cm
      -angle = -30
      -
      -theta = np.arange(0.0, 360.0, 1.0)*np.pi/180.0
      -x = 0.5 * width * np.cos(theta)
      -y = 0.5 * height * np.sin(theta)
      -
      -rtheta = angle*np.pi/180.
      -R = np.array([
      -    [np.cos(rtheta),  -np.sin(rtheta)],
      -    [np.sin(rtheta), np.cos(rtheta)],
      -    ])
      -
      -
      -x, y = np.dot(R, np.array([x, y]))
      -x += xcenter
      -y += ycenter
      -
      -fig = plt.figure()
      -ax = fig.add_subplot(211, aspect='auto')
      -ax.fill(x, y, alpha=0.2, facecolor='yellow', edgecolor='yellow', linewidth=1, zorder=1)
      -
      -e1 = patches.Ellipse((xcenter, ycenter), width, height,
      -             angle=angle, linewidth=2, fill=False, zorder=2)
      -
      -ax.add_patch(e1)
      -
      -ax = fig.add_subplot(212, aspect='equal')
      -ax.fill(x, y, alpha=0.2, facecolor='green', edgecolor='green', zorder=1)
      -e2 = patches.Ellipse((xcenter, ycenter), width, height,
      -             angle=angle, linewidth=2, fill=False, zorder=2)
      -
      -
      -ax.add_patch(e2)
      -
      -#fig.savefig('ellipse_compare.png')
      -fig.savefig('ellipse_compare')
      -
      -fig = plt.figure()
      -ax = fig.add_subplot(211, aspect='auto')
      -ax.fill(x, y, alpha=0.2, facecolor='yellow', edgecolor='yellow', linewidth=1, zorder=1)
      -
      -e1 = patches.Arc((xcenter, ycenter), width, height,
      -             angle=angle, linewidth=2, fill=False, zorder=2)
      -
      -ax.add_patch(e1)
      -
      -ax = fig.add_subplot(212, aspect='equal')
      -ax.fill(x, y, alpha=0.2, facecolor='green', edgecolor='green', zorder=1)
      -e2 = patches.Arc((xcenter, ycenter), width, height,
      -             angle=angle, linewidth=2, fill=False, zorder=2)
      -
      -
      -ax.add_patch(e2)
      -
      -#fig.savefig('arc_compare.png')
      -fig.savefig('arc_compare')
      -
      -plt.show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/units/evans_test.html b/dev/examples/units/evans_test.html deleted file mode 100644 index 2bbe4d32517..00000000000 --- a/dev/examples/units/evans_test.html +++ /dev/null @@ -1,241 +0,0 @@ - - - - - - - - units example code: evans_test.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      units example code: evans_test.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/evans_test.png -
      -
      """
      -A mockup "Foo" units class which supports
      -conversion and different tick formatting depending on the "unit".
      -Here the "unit" is just a scalar conversion factor, but this example shows mpl is
      -entirely agnostic to what kind of units client packages use
      -"""
      -from matplotlib.cbook import iterable
      -import matplotlib.units as units
      -import matplotlib.ticker as ticker
      -import matplotlib.pyplot as plt
      -
      -
      -class Foo:
      -    def __init__( self, val, unit=1.0 ):
      -        self.unit = unit
      -        self._val = val * unit
      -
      -    def value( self, unit ):
      -        if unit is None: unit = self.unit
      -        return self._val / unit
      -
      -class FooConverter:
      -
      -    @staticmethod
      -    def axisinfo(unit, axis):
      -        'return the Foo AxisInfo'
      -        if unit==1.0 or unit==2.0:
      -            return units.AxisInfo(
      -                majloc = ticker.IndexLocator( 8, 0 ),
      -                majfmt = ticker.FormatStrFormatter("VAL: %s"),
      -                label='foo',
      -                )
      -
      -        else:
      -            return None
      -
      -    @staticmethod
      -    def convert(obj, unit, axis):
      -        """
      -        convert obj using unit.  If obj is a sequence, return the
      -        converted sequence
      -        """
      -        if units.ConversionInterface.is_numlike(obj):
      -            return obj
      -
      -        if iterable(obj):
      -            return [o.value(unit) for o in obj]
      -        else:
      -            return obj.value(unit)
      -
      -    @staticmethod
      -    def default_units(x, axis):
      -        'return the default unit for x or None'
      -        if iterable(x):
      -            for thisx in x:
      -                return thisx.unit
      -        else:
      -            return x.unit
      -
      -units.registry[Foo] = FooConverter()
      -
      -# create some Foos
      -x = []
      -for val in range( 0, 50, 2 ):
      -    x.append( Foo( val, 1.0 ) )
      -
      -# and some arbitrary y data
      -y = [i for i in range( len(x) ) ]
      -
      -
      -# plot specifying units
      -fig = plt.figure()
      -fig.suptitle("Custom units")
      -fig.subplots_adjust(bottom=0.2)
      -ax = fig.add_subplot(1,2,2)
      -ax.plot( x, y, 'o', xunits=2.0 )
      -for label in ax.get_xticklabels():
      -    label.set_rotation(30)
      -    label.set_ha('right')
      -ax.set_title("xunits = 2.0")
      -
      -
      -# plot without specifying units; will use the None branch for axisinfo
      -ax = fig.add_subplot(1,2,1)
      -ax.plot( x, y ) # uses default units
      -ax.set_title('default units')
      -for label in ax.get_xticklabels():
      -    label.set_rotation(30)
      -    label.set_ha('right')
      -
      -plt.show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/units/index.html b/dev/examples/units/index.html deleted file mode 100644 index 9e16b9bc690..00000000000 --- a/dev/examples/units/index.html +++ /dev/null @@ -1,167 +0,0 @@ - - - - - - - - units Examples — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      units Examples

      - --- - - - - - -
      Release:1.3.x
      Date:May 21, 2013
      - -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/units/radian_demo.html b/dev/examples/units/radian_demo.html deleted file mode 100644 index 741efc83274..00000000000 --- a/dev/examples/units/radian_demo.html +++ /dev/null @@ -1,171 +0,0 @@ - - - - - - - - units example code: radian_demo.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      units example code: radian_demo.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/radian_demo.png -
      -
      """
      -Plot with radians from the basic_units mockup example package
      -This example shows how the unit class can determine the tick locating,
      -formatting and axis labeling.
      -"""
      -import numpy as np
      -from basic_units import radians, degrees, cos
      -from matplotlib.pyplot import figure, show
      -
      -x = [val*radians for val in np.arange(0, 15, 0.01)]
      -
      -fig = figure()
      -fig.subplots_adjust(hspace=0.3)
      -
      -ax = fig.add_subplot(211)
      -line1, = ax.plot(x, cos(x), xunits=radians)
      -
      -ax = fig.add_subplot(212)
      -line2, = ax.plot(x, cos(x), xunits=degrees)
      -
      -show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/units/units_sample.html b/dev/examples/units/units_sample.html deleted file mode 100644 index ee8eaca1481..00000000000 --- a/dev/examples/units/units_sample.html +++ /dev/null @@ -1,183 +0,0 @@ - - - - - - - - units example code: units_sample.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      units example code: units_sample.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/units_sample.png -
      -
      """
      -plot using a variety of cm vs inches conversions.  The example shows
      -how default unit instrospection works (ax1), how various keywords can
      -be used to set the x and y units to override the defaults (ax2, ax3,
      -ax4) and how one can set the xlimits using scalars (ax3, current units
      -assumed) or units (conversions applied to get the numbers to current
      -units)
      -
      -"""
      -from basic_units import cm, inch
      -import matplotlib.pyplot as plt
      -import numpy
      -
      -cms = cm *numpy.arange(0, 10, 2)
      -
      -fig = plt.figure()
      -
      -ax1 = fig.add_subplot(2,2,1)
      -ax1.plot(cms, cms)
      -
      -ax2 = fig.add_subplot(2,2,2)
      -ax2.plot(cms, cms, xunits=cm, yunits=inch)
      -
      -ax3 = fig.add_subplot(2,2,3)
      -ax3.plot(cms, cms, xunits=inch, yunits=cm)
      -ax3.set_xlim(3, 6)  # scalars are interpreted in current units
      -
      -ax4 = fig.add_subplot(2,2,4)
      -ax4.plot(cms, cms, xunits=inch, yunits=inch)
      -#fig.savefig('simple_conversion_plot.png')
      -ax4.set_xlim(3*cm, 6*cm) # cm are converted to inches
      -
      -plt.show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/units/units_scatter.html b/dev/examples/units/units_scatter.html deleted file mode 100644 index 53841f623ff..00000000000 --- a/dev/examples/units/units_scatter.html +++ /dev/null @@ -1,186 +0,0 @@ - - - - - - - - units example code: units_scatter.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      units example code: units_scatter.py

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/units_scatter.png -
      -
      """
      -Demonstrate unit handling
      -
      -basic_units is a mockup of a true units package used for testing
      -purposed, which illustrates the basic interface that a units package
      -must provide to matplotlib.
      -
      -The example below shows support for unit conversions over masked
      -arrays.
      -"""
      -import numpy as np
      -from basic_units import secs, hertz, minutes
      -from matplotlib.pylab import figure, show
      -
      -# create masked array
      -
      -
      -xsecs = secs*np.ma.MaskedArray((1,2,3,4,5,6,7,8), (1,0,1,0,0,0,1,0), np.float)
      -#xsecs = secs*np.arange(1,10.)
      -
      -fig = figure()
      -ax1 = fig.add_subplot(3,1,1)
      -ax1.scatter(xsecs, xsecs)
      -#ax1.set_ylabel('seconds')
      -ax1.axis([0,10,0,10])
      -
      -ax2 = fig.add_subplot(3,1,2, sharex=ax1)
      -ax2.scatter(xsecs, xsecs, yunits=hertz)
      -ax2.axis([0,10,0,1])
      -
      -ax3 = fig.add_subplot(3,1,3, sharex=ax1)
      -ax3.scatter(xsecs, xsecs, yunits=hertz)
      -ax3.yaxis.set_units(minutes)
      -ax3.axis([0,10,0,1])
      -
      -show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/user_interfaces/embedding_in_gtk.html b/dev/examples/user_interfaces/embedding_in_gtk.html deleted file mode 100644 index f74e3b0cfc0..00000000000 --- a/dev/examples/user_interfaces/embedding_in_gtk.html +++ /dev/null @@ -1,180 +0,0 @@ - - - - - - - - user_interfaces example code: embedding_in_gtk.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      user_interfaces example code: embedding_in_gtk.py

      -

      [source code]

      -
      #!/usr/bin/env python
      -"""
      -show how to add a matplotlib FigureCanvasGTK or FigureCanvasGTKAgg widget to a
      -gtk.Window
      -"""
      -
      -import gtk
      -
      -from matplotlib.figure import Figure
      -from numpy import arange, sin, pi
      -
      -# uncomment to select /GTK/GTKAgg/GTKCairo
      -#from matplotlib.backends.backend_gtk import FigureCanvasGTK as FigureCanvas
      -from matplotlib.backends.backend_gtkagg import FigureCanvasGTKAgg as FigureCanvas
      -#from matplotlib.backends.backend_gtkcairo import FigureCanvasGTKCairo as FigureCanvas
      -
      -
      -win = gtk.Window()
      -win.connect("destroy", lambda x: gtk.main_quit())
      -win.set_default_size(400,300)
      -win.set_title("Embedding in GTK")
      -
      -f = Figure(figsize=(5,4), dpi=100)
      -a = f.add_subplot(111)
      -t = arange(0.0,3.0,0.01)
      -s = sin(2*pi*t)
      -a.plot(t,s)
      -
      -canvas = FigureCanvas(f)  # a gtk.DrawingArea
      -win.add(canvas)
      -
      -win.show_all()
      -gtk.main()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/user_interfaces/embedding_in_gtk.py b/dev/examples/user_interfaces/embedding_in_gtk.py deleted file mode 100644 index bad2382b82d..00000000000 --- a/dev/examples/user_interfaces/embedding_in_gtk.py +++ /dev/null @@ -1,33 +0,0 @@ -#!/usr/bin/env python -""" -show how to add a matplotlib FigureCanvasGTK or FigureCanvasGTKAgg widget to a -gtk.Window -""" - -import gtk - -from matplotlib.figure import Figure -from numpy import arange, sin, pi - -# uncomment to select /GTK/GTKAgg/GTKCairo -#from matplotlib.backends.backend_gtk import FigureCanvasGTK as FigureCanvas -from matplotlib.backends.backend_gtkagg import FigureCanvasGTKAgg as FigureCanvas -#from matplotlib.backends.backend_gtkcairo import FigureCanvasGTKCairo as FigureCanvas - - -win = gtk.Window() -win.connect("destroy", lambda x: gtk.main_quit()) -win.set_default_size(400,300) -win.set_title("Embedding in GTK") - -f = Figure(figsize=(5,4), dpi=100) -a = f.add_subplot(111) -t = arange(0.0,3.0,0.01) -s = sin(2*pi*t) -a.plot(t,s) - -canvas = FigureCanvas(f) # a gtk.DrawingArea -win.add(canvas) - -win.show_all() -gtk.main() diff --git a/dev/examples/user_interfaces/embedding_in_gtk2.html b/dev/examples/user_interfaces/embedding_in_gtk2.html deleted file mode 100644 index 76ed962f95c..00000000000 --- a/dev/examples/user_interfaces/embedding_in_gtk2.html +++ /dev/null @@ -1,199 +0,0 @@ - - - - - - - - user_interfaces example code: embedding_in_gtk2.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      user_interfaces example code: embedding_in_gtk2.py

      -

      [source code]

      -
      #!/usr/bin/env python
      -"""
      -show how to add a matplotlib FigureCanvasGTK or FigureCanvasGTKAgg widget and
      -a toolbar to a gtk.Window
      -"""
      -import gtk
      -
      -from matplotlib.figure import Figure
      -from numpy import arange, sin, pi
      -
      -# uncomment to select /GTK/GTKAgg/GTKCairo
      -#from matplotlib.backends.backend_gtk import FigureCanvasGTK as FigureCanvas
      -from matplotlib.backends.backend_gtkagg import FigureCanvasGTKAgg as FigureCanvas
      -#from matplotlib.backends.backend_gtkcairo import FigureCanvasGTKCairo as FigureCanvas
      -
      -# or NavigationToolbar for classic
      -#from matplotlib.backends.backend_gtk import NavigationToolbar2GTK as NavigationToolbar
      -from matplotlib.backends.backend_gtkagg import NavigationToolbar2GTKAgg as NavigationToolbar
      -
      -# implement the default mpl key bindings
      -from matplotlib.backend_bases import key_press_handler
      -
      -win = gtk.Window()
      -win.connect("destroy", lambda x: gtk.main_quit())
      -win.set_default_size(400,300)
      -win.set_title("Embedding in GTK")
      -
      -vbox = gtk.VBox()
      -win.add(vbox)
      -
      -fig = Figure(figsize=(5,4), dpi=100)
      -ax = fig.add_subplot(111)
      -t = arange(0.0,3.0,0.01)
      -s = sin(2*pi*t)
      -
      -ax.plot(t,s)
      -
      -
      -canvas = FigureCanvas(fig)  # a gtk.DrawingArea
      -vbox.pack_start(canvas)
      -toolbar = NavigationToolbar(canvas, win)
      -vbox.pack_start(toolbar, False, False)
      -
      -
      -def on_key_event(event):
      -    print('you pressed %s'%event.key)
      -    key_press_handler(event, canvas, toolbar)
      -
      -canvas.mpl_connect('key_press_event', on_key_event)
      -
      -win.show_all()
      -gtk.main()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/user_interfaces/embedding_in_gtk2.py b/dev/examples/user_interfaces/embedding_in_gtk2.py deleted file mode 100644 index 44b94272221..00000000000 --- a/dev/examples/user_interfaces/embedding_in_gtk2.py +++ /dev/null @@ -1,52 +0,0 @@ -#!/usr/bin/env python -""" -show how to add a matplotlib FigureCanvasGTK or FigureCanvasGTKAgg widget and -a toolbar to a gtk.Window -""" -import gtk - -from matplotlib.figure import Figure -from numpy import arange, sin, pi - -# uncomment to select /GTK/GTKAgg/GTKCairo -#from matplotlib.backends.backend_gtk import FigureCanvasGTK as FigureCanvas -from matplotlib.backends.backend_gtkagg import FigureCanvasGTKAgg as FigureCanvas -#from matplotlib.backends.backend_gtkcairo import FigureCanvasGTKCairo as FigureCanvas - -# or NavigationToolbar for classic -#from matplotlib.backends.backend_gtk import NavigationToolbar2GTK as NavigationToolbar -from matplotlib.backends.backend_gtkagg import NavigationToolbar2GTKAgg as NavigationToolbar - -# implement the default mpl key bindings -from matplotlib.backend_bases import key_press_handler - -win = gtk.Window() -win.connect("destroy", lambda x: gtk.main_quit()) -win.set_default_size(400,300) -win.set_title("Embedding in GTK") - -vbox = gtk.VBox() -win.add(vbox) - -fig = Figure(figsize=(5,4), dpi=100) -ax = fig.add_subplot(111) -t = arange(0.0,3.0,0.01) -s = sin(2*pi*t) - -ax.plot(t,s) - - -canvas = FigureCanvas(fig) # a gtk.DrawingArea -vbox.pack_start(canvas) -toolbar = NavigationToolbar(canvas, win) -vbox.pack_start(toolbar, False, False) - - -def on_key_event(event): - print('you pressed %s'%event.key) - key_press_handler(event, canvas, toolbar) - -canvas.mpl_connect('key_press_event', on_key_event) - -win.show_all() -gtk.main() diff --git a/dev/examples/user_interfaces/embedding_in_gtk3.html b/dev/examples/user_interfaces/embedding_in_gtk3.html deleted file mode 100644 index 935910acf97..00000000000 --- a/dev/examples/user_interfaces/embedding_in_gtk3.html +++ /dev/null @@ -1,181 +0,0 @@ - - - - - - - - user_interfaces example code: embedding_in_gtk3.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      user_interfaces example code: embedding_in_gtk3.py

      -

      [source code]

      -
      #!/usr/bin/env python
      -"""
      -demonstrate adding a FigureCanvasGTK3Agg widget to a Gtk.ScrolledWindow
      -using GTK3 accessed via pygobject
      -"""
      -
      -from gi.repository import Gtk
      -
      -from matplotlib.figure import Figure
      -from numpy import arange, sin, pi
      -from matplotlib.backends.backend_gtk3agg import FigureCanvasGTK3Agg as FigureCanvas
      -
      -win = Gtk.Window()
      -win.connect("delete-event", Gtk.main_quit )
      -win.set_default_size(400,300)
      -win.set_title("Embedding in GTK")
      -
      -f = Figure(figsize=(5,4), dpi=100)
      -a = f.add_subplot(111)
      -t = arange(0.0,3.0,0.01)
      -s = sin(2*pi*t)
      -a.plot(t,s)
      -
      -sw = Gtk.ScrolledWindow()
      -win.add (sw)
      -# A scrolled window border goes outside the scrollbars and viewport
      -sw.set_border_width (10)
      -
      -canvas = FigureCanvas(f)  # a Gtk.DrawingArea
      -canvas.set_size_request(800,600)
      -sw.add_with_viewport (canvas)
      -
      -win.show_all()
      -Gtk.main()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/user_interfaces/embedding_in_gtk3.py b/dev/examples/user_interfaces/embedding_in_gtk3.py deleted file mode 100644 index 5b24db1857f..00000000000 --- a/dev/examples/user_interfaces/embedding_in_gtk3.py +++ /dev/null @@ -1,35 +0,0 @@ -#!/usr/bin/env python -""" -demonstrate adding a FigureCanvasGTK3Agg widget to a Gtk.ScrolledWindow -using GTK3 accessed via pygobject -""" - -from gi.repository import Gtk - -from matplotlib.figure import Figure -from numpy import arange, sin, pi -from matplotlib.backends.backend_gtk3agg import FigureCanvasGTK3Agg as FigureCanvas - -win = Gtk.Window() -win.connect("delete-event", Gtk.main_quit ) -win.set_default_size(400,300) -win.set_title("Embedding in GTK") - -f = Figure(figsize=(5,4), dpi=100) -a = f.add_subplot(111) -t = arange(0.0,3.0,0.01) -s = sin(2*pi*t) -a.plot(t,s) - -sw = Gtk.ScrolledWindow() -win.add (sw) -# A scrolled window border goes outside the scrollbars and viewport -sw.set_border_width (10) - -canvas = FigureCanvas(f) # a Gtk.DrawingArea -canvas.set_size_request(800,600) -sw.add_with_viewport (canvas) - -win.show_all() -Gtk.main() - diff --git a/dev/examples/user_interfaces/embedding_in_gtk3_panzoom.html b/dev/examples/user_interfaces/embedding_in_gtk3_panzoom.html deleted file mode 100644 index fbfb363db8e..00000000000 --- a/dev/examples/user_interfaces/embedding_in_gtk3_panzoom.html +++ /dev/null @@ -1,183 +0,0 @@ - - - - - - - - user_interfaces example code: embedding_in_gtk3_panzoom.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      user_interfaces example code: embedding_in_gtk3_panzoom.py

      -

      [source code]

      -
      #!/usr/bin/env python
      -"""
      -demonstrate NavigationToolbar with GTK3 accessed via pygobject
      -"""
      -
      -from gi.repository import Gtk
      -
      -from matplotlib.figure import Figure
      -from numpy import arange, sin, pi
      -from matplotlib.backends.backend_gtk3agg import FigureCanvasGTK3Agg as FigureCanvas
      -from matplotlib.backends.backend_gtk3 import NavigationToolbar2GTK3 as NavigationToolbar
      -
      -win = Gtk.Window()
      -win.connect("delete-event", Gtk.main_quit )
      -win.set_default_size(400,300)
      -win.set_title("Embedding in GTK")
      -
      -f = Figure(figsize=(5,4), dpi=100)
      -a = f.add_subplot(1,1,1)
      -t = arange(0.0,3.0,0.01)
      -s = sin(2*pi*t)
      -a.plot(t,s)
      -
      -vbox = Gtk.VBox()
      -win.add(vbox)
      -
      -# Add canvas to vbox
      -canvas = FigureCanvas(f)  # a Gtk.DrawingArea
      -vbox.pack_start(canvas, True, True, 0)
      -
      -# Create toolbar
      -toolbar = NavigationToolbar(canvas, win)
      -vbox.pack_start(toolbar, False, False, 0)
      -
      -win.show_all()
      -Gtk.main()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/user_interfaces/embedding_in_gtk3_panzoom.py b/dev/examples/user_interfaces/embedding_in_gtk3_panzoom.py deleted file mode 100644 index d576974656d..00000000000 --- a/dev/examples/user_interfaces/embedding_in_gtk3_panzoom.py +++ /dev/null @@ -1,37 +0,0 @@ -#!/usr/bin/env python -""" -demonstrate NavigationToolbar with GTK3 accessed via pygobject -""" - -from gi.repository import Gtk - -from matplotlib.figure import Figure -from numpy import arange, sin, pi -from matplotlib.backends.backend_gtk3agg import FigureCanvasGTK3Agg as FigureCanvas -from matplotlib.backends.backend_gtk3 import NavigationToolbar2GTK3 as NavigationToolbar - -win = Gtk.Window() -win.connect("delete-event", Gtk.main_quit ) -win.set_default_size(400,300) -win.set_title("Embedding in GTK") - -f = Figure(figsize=(5,4), dpi=100) -a = f.add_subplot(1,1,1) -t = arange(0.0,3.0,0.01) -s = sin(2*pi*t) -a.plot(t,s) - -vbox = Gtk.VBox() -win.add(vbox) - -# Add canvas to vbox -canvas = FigureCanvas(f) # a Gtk.DrawingArea -vbox.pack_start(canvas, True, True, 0) - -# Create toolbar -toolbar = NavigationToolbar(canvas, win) -vbox.pack_start(toolbar, False, False, 0) - -win.show_all() -Gtk.main() - diff --git a/dev/examples/user_interfaces/embedding_in_qt.html b/dev/examples/user_interfaces/embedding_in_qt.html deleted file mode 100644 index 761f899d231..00000000000 --- a/dev/examples/user_interfaces/embedding_in_qt.html +++ /dev/null @@ -1,284 +0,0 @@ - - - - - - - - user_interfaces example code: embedding_in_qt.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      user_interfaces example code: embedding_in_qt.py

      -

      [source code]

      -
      #! /usr/bin/env python
      -
      -# embedding_in_qt.py --- Simple Qt application embedding matplotlib canvases
      -#
      -# Copyright (C) 2005 Florent Rougon
      -#
      -# This file is an example program for matplotlib. It may be used and
      -# modified with no restriction; raw copies as well as modified versions
      -# may be distributed without limitation.
      -
      -from __future__ import unicode_literals
      -import sys, os, random
      -from qt import *
      -
      -from numpy import arange, sin, pi
      -from matplotlib.backends.backend_qtagg import FigureCanvasQTAgg as FigureCanvas
      -from matplotlib.figure import Figure
      -
      -# This seems to be what PyQt expects, according to the examples shipped in
      -# its distribution.
      -TRUE  = 1
      -FALSE = 0
      -
      -progname = os.path.basename(sys.argv[0])
      -progversion = "0.1"
      -
      -# Note: color-intensive applications may require a different color allocation
      -# strategy.
      -#QApplication.setColorSpec(QApplication.NormalColor)
      -app = QApplication(sys.argv)
      -
      -class MyMplCanvas(FigureCanvas):
      -    """Ultimately, this is a QWidget (as well as a FigureCanvasAgg, etc.)."""
      -    def __init__(self, parent=None, width=5, height=4, dpi=100):
      -        self.fig = Figure(figsize=(width, height), dpi=dpi)
      -        self.axes = self.fig.add_subplot(111)
      -        # We want the axes cleared every time plot() is called
      -        self.axes.hold(False)
      -
      -        self.compute_initial_figure()
      -
      -        FigureCanvas.__init__(self, self.fig)
      -        self.reparent(parent, QPoint(0, 0))
      -
      -        FigureCanvas.setSizePolicy(self,
      -                                   QSizePolicy.Expanding,
      -                                   QSizePolicy.Expanding)
      -        FigureCanvas.updateGeometry(self)
      -
      -    def sizeHint(self):
      -        w, h = self.get_width_height()
      -        return QSize(w, h)
      -
      -    def minimumSizeHint(self):
      -        return QSize(10, 10)
      -
      -
      -class MyStaticMplCanvas(MyMplCanvas):
      -    """Simple canvas with a sine plot."""
      -    def compute_initial_figure(self):
      -        t = arange(0.0, 3.0, 0.01)
      -        s = sin(2*pi*t)
      -        self.axes.plot(t, s)
      -
      -
      -class MyDynamicMplCanvas(MyMplCanvas):
      -    """A canvas that updates itself every second with a new plot."""
      -    def __init__(self, *args, **kwargs):
      -        MyMplCanvas.__init__(self, *args, **kwargs)
      -        timer = QTimer(self, "canvas update timer")
      -        QObject.connect(timer, SIGNAL("timeout()"), self.update_figure)
      -        timer.start(1000, FALSE)
      -
      -    def compute_initial_figure(self):
      -         self.axes.plot([0, 1, 2, 3], [1, 2, 0, 4], 'r')
      -
      -    def update_figure(self):
      -        # Build a list of 4 random integers between 0 and 10 (both inclusive)
      -        l = [ random.randint(0, 10) for i in range(4) ]
      -
      -        self.axes.plot([0, 1, 2, 3], l, 'r')
      -        self.draw()
      -
      -
      -class ApplicationWindow(QMainWindow):
      -    def __init__(self):
      -        QMainWindow.__init__(self, None,
      -                             "application main window",
      -                             Qt.WType_TopLevel | Qt.WDestructiveClose)
      -
      -        self.file_menu = QPopupMenu(self)
      -        self.file_menu.insertItem('&Quit', self.fileQuit, Qt.CTRL + Qt.Key_Q)
      -        self.menuBar().insertItem('&File', self.file_menu)
      -
      -        self.help_menu = QPopupMenu(self)
      -        self.menuBar().insertSeparator()
      -        self.menuBar().insertItem('&Help', self.help_menu)
      -
      -        self.help_menu.insertItem('&About', self.about)
      -
      -        self.main_widget = QWidget(self, "Main widget")
      -
      -        l = QVBoxLayout(self.main_widget)
      -        sc = MyStaticMplCanvas(self.main_widget, width=5, height=4, dpi=100)
      -        dc = MyDynamicMplCanvas(self.main_widget, width=5, height=4, dpi=100)
      -        l.addWidget(sc)
      -        l.addWidget(dc)
      -
      -        self.main_widget.setFocus()
      -        self.setCentralWidget(self.main_widget)
      -
      -        self.statusBar().message("All hail matplotlib!", 2000)
      -
      -    def fileQuit(self):
      -        qApp.exit(0)
      -
      -    def closeEvent(self, ce):
      -        self.fileQuit()
      -
      -    def about(self):
      -        QMessageBox.about(self, "About %s" % progname,
      -"""%(prog)s version %(version)s
      -Copyright \N{COPYRIGHT SIGN} 2005 Florent Rougon
      -
      -This program is a simple example of a Qt application embedding matplotlib
      -canvases.
      -
      -It may be used and modified with no restriction; raw copies as well as
      -modified versions may be distributed without limitation."""
      -                          % {"prog": progname, "version": progversion})
      -
      -
      -aw = ApplicationWindow()
      -aw.setCaption("%s" % progname)
      -qApp.setMainWidget(aw)
      -aw.show()
      -sys.exit(qApp.exec_loop())
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/user_interfaces/embedding_in_qt.py b/dev/examples/user_interfaces/embedding_in_qt.py deleted file mode 100644 index 311fd9e961f..00000000000 --- a/dev/examples/user_interfaces/embedding_in_qt.py +++ /dev/null @@ -1,137 +0,0 @@ -#! /usr/bin/env python - -# embedding_in_qt.py --- Simple Qt application embedding matplotlib canvases -# -# Copyright (C) 2005 Florent Rougon -# -# This file is an example program for matplotlib. It may be used and -# modified with no restriction; raw copies as well as modified versions -# may be distributed without limitation. - -from __future__ import unicode_literals -import sys, os, random -from qt import * - -from numpy import arange, sin, pi -from matplotlib.backends.backend_qtagg import FigureCanvasQTAgg as FigureCanvas -from matplotlib.figure import Figure - -# This seems to be what PyQt expects, according to the examples shipped in -# its distribution. -TRUE = 1 -FALSE = 0 - -progname = os.path.basename(sys.argv[0]) -progversion = "0.1" - -# Note: color-intensive applications may require a different color allocation -# strategy. -#QApplication.setColorSpec(QApplication.NormalColor) -app = QApplication(sys.argv) - -class MyMplCanvas(FigureCanvas): - """Ultimately, this is a QWidget (as well as a FigureCanvasAgg, etc.).""" - def __init__(self, parent=None, width=5, height=4, dpi=100): - self.fig = Figure(figsize=(width, height), dpi=dpi) - self.axes = self.fig.add_subplot(111) - # We want the axes cleared every time plot() is called - self.axes.hold(False) - - self.compute_initial_figure() - - FigureCanvas.__init__(self, self.fig) - self.reparent(parent, QPoint(0, 0)) - - FigureCanvas.setSizePolicy(self, - QSizePolicy.Expanding, - QSizePolicy.Expanding) - FigureCanvas.updateGeometry(self) - - def sizeHint(self): - w, h = self.get_width_height() - return QSize(w, h) - - def minimumSizeHint(self): - return QSize(10, 10) - - -class MyStaticMplCanvas(MyMplCanvas): - """Simple canvas with a sine plot.""" - def compute_initial_figure(self): - t = arange(0.0, 3.0, 0.01) - s = sin(2*pi*t) - self.axes.plot(t, s) - - -class MyDynamicMplCanvas(MyMplCanvas): - """A canvas that updates itself every second with a new plot.""" - def __init__(self, *args, **kwargs): - MyMplCanvas.__init__(self, *args, **kwargs) - timer = QTimer(self, "canvas update timer") - QObject.connect(timer, SIGNAL("timeout()"), self.update_figure) - timer.start(1000, FALSE) - - def compute_initial_figure(self): - self.axes.plot([0, 1, 2, 3], [1, 2, 0, 4], 'r') - - def update_figure(self): - # Build a list of 4 random integers between 0 and 10 (both inclusive) - l = [ random.randint(0, 10) for i in range(4) ] - - self.axes.plot([0, 1, 2, 3], l, 'r') - self.draw() - - -class ApplicationWindow(QMainWindow): - def __init__(self): - QMainWindow.__init__(self, None, - "application main window", - Qt.WType_TopLevel | Qt.WDestructiveClose) - - self.file_menu = QPopupMenu(self) - self.file_menu.insertItem('&Quit', self.fileQuit, Qt.CTRL + Qt.Key_Q) - self.menuBar().insertItem('&File', self.file_menu) - - self.help_menu = QPopupMenu(self) - self.menuBar().insertSeparator() - self.menuBar().insertItem('&Help', self.help_menu) - - self.help_menu.insertItem('&About', self.about) - - self.main_widget = QWidget(self, "Main widget") - - l = QVBoxLayout(self.main_widget) - sc = MyStaticMplCanvas(self.main_widget, width=5, height=4, dpi=100) - dc = MyDynamicMplCanvas(self.main_widget, width=5, height=4, dpi=100) - l.addWidget(sc) - l.addWidget(dc) - - self.main_widget.setFocus() - self.setCentralWidget(self.main_widget) - - self.statusBar().message("All hail matplotlib!", 2000) - - def fileQuit(self): - qApp.exit(0) - - def closeEvent(self, ce): - self.fileQuit() - - def about(self): - QMessageBox.about(self, "About %s" % progname, -"""%(prog)s version %(version)s -Copyright \N{COPYRIGHT SIGN} 2005 Florent Rougon - -This program is a simple example of a Qt application embedding matplotlib -canvases. - -It may be used and modified with no restriction; raw copies as well as -modified versions may be distributed without limitation.""" - % {"prog": progname, "version": progversion}) - - -aw = ApplicationWindow() -aw.setCaption("%s" % progname) -qApp.setMainWidget(aw) -aw.show() -sys.exit(qApp.exec_loop()) diff --git a/dev/examples/user_interfaces/embedding_in_qt4.html b/dev/examples/user_interfaces/embedding_in_qt4.html deleted file mode 100644 index 55d32f1a103..00000000000 --- a/dev/examples/user_interfaces/embedding_in_qt4.html +++ /dev/null @@ -1,276 +0,0 @@ - - - - - - - - user_interfaces example code: embedding_in_qt4.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      user_interfaces example code: embedding_in_qt4.py

      -

      [source code]

      -
      #!/usr/bin/env python
      -
      -# embedding_in_qt4.py --- Simple Qt4 application embedding matplotlib canvases
      -#
      -# Copyright (C) 2005 Florent Rougon
      -#               2006 Darren Dale
      -#
      -# This file is an example program for matplotlib. It may be used and
      -# modified with no restriction; raw copies as well as modified versions
      -# may be distributed without limitation.
      -
      -from __future__ import unicode_literals
      -import sys, os, random
      -from PyQt4 import QtGui, QtCore
      -
      -from numpy import arange, sin, pi
      -from matplotlib.backends.backend_qt4agg import FigureCanvasQTAgg as FigureCanvas
      -from matplotlib.figure import Figure
      -
      -progname = os.path.basename(sys.argv[0])
      -progversion = "0.1"
      -
      -
      -class MyMplCanvas(FigureCanvas):
      -    """Ultimately, this is a QWidget (as well as a FigureCanvasAgg, etc.)."""
      -    def __init__(self, parent=None, width=5, height=4, dpi=100):
      -        fig = Figure(figsize=(width, height), dpi=dpi)
      -        self.axes = fig.add_subplot(111)
      -        # We want the axes cleared every time plot() is called
      -        self.axes.hold(False)
      -
      -        self.compute_initial_figure()
      -
      -        #
      -        FigureCanvas.__init__(self, fig)
      -        self.setParent(parent)
      -
      -        FigureCanvas.setSizePolicy(self,
      -                                   QtGui.QSizePolicy.Expanding,
      -                                   QtGui.QSizePolicy.Expanding)
      -        FigureCanvas.updateGeometry(self)
      -
      -    def compute_initial_figure(self):
      -        pass
      -
      -
      -class MyStaticMplCanvas(MyMplCanvas):
      -    """Simple canvas with a sine plot."""
      -    def compute_initial_figure(self):
      -        t = arange(0.0, 3.0, 0.01)
      -        s = sin(2*pi*t)
      -        self.axes.plot(t, s)
      -
      -
      -class MyDynamicMplCanvas(MyMplCanvas):
      -    """A canvas that updates itself every second with a new plot."""
      -    def __init__(self, *args, **kwargs):
      -        MyMplCanvas.__init__(self, *args, **kwargs)
      -        timer = QtCore.QTimer(self)
      -        QtCore.QObject.connect(timer, QtCore.SIGNAL("timeout()"), self.update_figure)
      -        timer.start(1000)
      -
      -    def compute_initial_figure(self):
      -         self.axes.plot([0, 1, 2, 3], [1, 2, 0, 4], 'r')
      -
      -    def update_figure(self):
      -        # Build a list of 4 random integers between 0 and 10 (both inclusive)
      -        l = [ random.randint(0, 10) for i in range(4) ]
      -
      -        self.axes.plot([0, 1, 2, 3], l, 'r')
      -        self.draw()
      -
      -
      -class ApplicationWindow(QtGui.QMainWindow):
      -    def __init__(self):
      -        QtGui.QMainWindow.__init__(self)
      -        self.setAttribute(QtCore.Qt.WA_DeleteOnClose)
      -        self.setWindowTitle("application main window")
      -
      -        self.file_menu = QtGui.QMenu('&File', self)
      -        self.file_menu.addAction('&Quit', self.fileQuit,
      -                                 QtCore.Qt.CTRL + QtCore.Qt.Key_Q)
      -        self.menuBar().addMenu(self.file_menu)
      -
      -        self.help_menu = QtGui.QMenu('&Help', self)
      -        self.menuBar().addSeparator()
      -        self.menuBar().addMenu(self.help_menu)
      -
      -        self.help_menu.addAction('&About', self.about)
      -
      -        self.main_widget = QtGui.QWidget(self)
      -
      -        l = QtGui.QVBoxLayout(self.main_widget)
      -        sc = MyStaticMplCanvas(self.main_widget, width=5, height=4, dpi=100)
      -        dc = MyDynamicMplCanvas(self.main_widget, width=5, height=4, dpi=100)
      -        l.addWidget(sc)
      -        l.addWidget(dc)
      -
      -        self.main_widget.setFocus()
      -        self.setCentralWidget(self.main_widget)
      -
      -        self.statusBar().showMessage("All hail matplotlib!", 2000)
      -
      -    def fileQuit(self):
      -        self.close()
      -
      -    def closeEvent(self, ce):
      -        self.fileQuit()
      -
      -    def about(self):
      -        QtGui.QMessageBox.about(self, "About",
      -"""embedding_in_qt4.py example
      -Copyright 2005 Florent Rougon, 2006 Darren Dale
      -
      -This program is a simple example of a Qt4 application embedding matplotlib
      -canvases.
      -
      -It may be used and modified with no restriction; raw copies as well as
      -modified versions may be distributed without limitation."""
      -)
      -
      -
      -qApp = QtGui.QApplication(sys.argv)
      -
      -aw = ApplicationWindow()
      -aw.setWindowTitle("%s" % progname)
      -aw.show()
      -sys.exit(qApp.exec_())
      -#qApp.exec_()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/user_interfaces/embedding_in_qt4.py b/dev/examples/user_interfaces/embedding_in_qt4.py deleted file mode 100644 index d0c40799865..00000000000 --- a/dev/examples/user_interfaces/embedding_in_qt4.py +++ /dev/null @@ -1,129 +0,0 @@ -#!/usr/bin/env python - -# embedding_in_qt4.py --- Simple Qt4 application embedding matplotlib canvases -# -# Copyright (C) 2005 Florent Rougon -# 2006 Darren Dale -# -# This file is an example program for matplotlib. It may be used and -# modified with no restriction; raw copies as well as modified versions -# may be distributed without limitation. - -from __future__ import unicode_literals -import sys, os, random -from PyQt4 import QtGui, QtCore - -from numpy import arange, sin, pi -from matplotlib.backends.backend_qt4agg import FigureCanvasQTAgg as FigureCanvas -from matplotlib.figure import Figure - -progname = os.path.basename(sys.argv[0]) -progversion = "0.1" - - -class MyMplCanvas(FigureCanvas): - """Ultimately, this is a QWidget (as well as a FigureCanvasAgg, etc.).""" - def __init__(self, parent=None, width=5, height=4, dpi=100): - fig = Figure(figsize=(width, height), dpi=dpi) - self.axes = fig.add_subplot(111) - # We want the axes cleared every time plot() is called - self.axes.hold(False) - - self.compute_initial_figure() - - # - FigureCanvas.__init__(self, fig) - self.setParent(parent) - - FigureCanvas.setSizePolicy(self, - QtGui.QSizePolicy.Expanding, - QtGui.QSizePolicy.Expanding) - FigureCanvas.updateGeometry(self) - - def compute_initial_figure(self): - pass - - -class MyStaticMplCanvas(MyMplCanvas): - """Simple canvas with a sine plot.""" - def compute_initial_figure(self): - t = arange(0.0, 3.0, 0.01) - s = sin(2*pi*t) - self.axes.plot(t, s) - - -class MyDynamicMplCanvas(MyMplCanvas): - """A canvas that updates itself every second with a new plot.""" - def __init__(self, *args, **kwargs): - MyMplCanvas.__init__(self, *args, **kwargs) - timer = QtCore.QTimer(self) - QtCore.QObject.connect(timer, QtCore.SIGNAL("timeout()"), self.update_figure) - timer.start(1000) - - def compute_initial_figure(self): - self.axes.plot([0, 1, 2, 3], [1, 2, 0, 4], 'r') - - def update_figure(self): - # Build a list of 4 random integers between 0 and 10 (both inclusive) - l = [ random.randint(0, 10) for i in range(4) ] - - self.axes.plot([0, 1, 2, 3], l, 'r') - self.draw() - - -class ApplicationWindow(QtGui.QMainWindow): - def __init__(self): - QtGui.QMainWindow.__init__(self) - self.setAttribute(QtCore.Qt.WA_DeleteOnClose) - self.setWindowTitle("application main window") - - self.file_menu = QtGui.QMenu('&File', self) - self.file_menu.addAction('&Quit', self.fileQuit, - QtCore.Qt.CTRL + QtCore.Qt.Key_Q) - self.menuBar().addMenu(self.file_menu) - - self.help_menu = QtGui.QMenu('&Help', self) - self.menuBar().addSeparator() - self.menuBar().addMenu(self.help_menu) - - self.help_menu.addAction('&About', self.about) - - self.main_widget = QtGui.QWidget(self) - - l = QtGui.QVBoxLayout(self.main_widget) - sc = MyStaticMplCanvas(self.main_widget, width=5, height=4, dpi=100) - dc = MyDynamicMplCanvas(self.main_widget, width=5, height=4, dpi=100) - l.addWidget(sc) - l.addWidget(dc) - - self.main_widget.setFocus() - self.setCentralWidget(self.main_widget) - - self.statusBar().showMessage("All hail matplotlib!", 2000) - - def fileQuit(self): - self.close() - - def closeEvent(self, ce): - self.fileQuit() - - def about(self): - QtGui.QMessageBox.about(self, "About", -"""embedding_in_qt4.py example -Copyright 2005 Florent Rougon, 2006 Darren Dale - -This program is a simple example of a Qt4 application embedding matplotlib -canvases. - -It may be used and modified with no restriction; raw copies as well as -modified versions may be distributed without limitation.""" -) - - -qApp = QtGui.QApplication(sys.argv) - -aw = ApplicationWindow() -aw.setWindowTitle("%s" % progname) -aw.show() -sys.exit(qApp.exec_()) -#qApp.exec_() diff --git a/dev/examples/user_interfaces/embedding_in_qt4_wtoolbar.html b/dev/examples/user_interfaces/embedding_in_qt4_wtoolbar.html deleted file mode 100644 index 856c78e1b7c..00000000000 --- a/dev/examples/user_interfaces/embedding_in_qt4_wtoolbar.html +++ /dev/null @@ -1,214 +0,0 @@ - - - - - - - - user_interfaces example code: embedding_in_qt4_wtoolbar.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      user_interfaces example code: embedding_in_qt4_wtoolbar.py

      -

      [source code]

      -
      from __future__ import print_function
      -
      -import sys
      -
      -import numpy as np
      -from matplotlib.figure import Figure
      -from matplotlib.backend_bases import key_press_handler
      -from matplotlib.backends.backend_qt4agg import (
      -    FigureCanvasQTAgg as FigureCanvas,
      -    NavigationToolbar2QTAgg as NavigationToolbar)
      -from PyQt4.QtCore import *
      -from PyQt4.QtGui import *
      -
      -
      -class AppForm(QMainWindow):
      -    def __init__(self, parent=None):
      -        QMainWindow.__init__(self, parent)
      -        #self.x, self.y = self.get_data()
      -        self.data = self.get_data2()
      -        self.create_main_frame()
      -        self.on_draw()
      -
      -    def create_main_frame(self):
      -        self.main_frame = QWidget()
      -
      -        self.fig = Figure((5.0, 4.0), dpi=100)
      -        self.canvas = FigureCanvas(self.fig)
      -        self.canvas.setParent(self.main_frame)
      -        self.canvas.setFocusPolicy(Qt.StrongFocus)
      -        self.canvas.setFocus()
      -
      -        self.mpl_toolbar = NavigationToolbar(self.canvas, self.main_frame)
      -
      -        self.canvas.mpl_connect('key_press_event', self.on_key_press)
      -
      -        vbox = QVBoxLayout()
      -        vbox.addWidget(self.canvas)  # the matplotlib canvas
      -        vbox.addWidget(self.mpl_toolbar)
      -        self.main_frame.setLayout(vbox)
      -        self.setCentralWidget(self.main_frame)
      -
      -    def get_data2(self):
      -        return np.arange(20).reshape([4, 5]).copy()
      -
      -    def on_draw(self):
      -        self.fig.clear()
      -        self.axes = self.fig.add_subplot(111)
      -        #self.axes.plot(self.x, self.y, 'ro')
      -        self.axes.imshow(self.data, interpolation='nearest')
      -        #self.axes.plot([1,2,3])
      -        self.canvas.draw()
      -
      -    def on_key_press(self, event):
      -        print('you pressed', event.key)
      -        # implement the default mpl key press events described at
      -        # http://matplotlib.org/users/navigation_toolbar.html#navigation-keyboard-shortcuts
      -        key_press_handler(event, self.canvas, self.mpl_toolbar)
      -
      -
      -def main():
      -    app = QApplication(sys.argv)
      -    form = AppForm()
      -    form.show()
      -    app.exec_()
      -
      -if __name__ == "__main__":
      -    main()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/user_interfaces/embedding_in_qt4_wtoolbar.py b/dev/examples/user_interfaces/embedding_in_qt4_wtoolbar.py deleted file mode 100644 index 38eb89d184d..00000000000 --- a/dev/examples/user_interfaces/embedding_in_qt4_wtoolbar.py +++ /dev/null @@ -1,67 +0,0 @@ -from __future__ import print_function - -import sys - -import numpy as np -from matplotlib.figure import Figure -from matplotlib.backend_bases import key_press_handler -from matplotlib.backends.backend_qt4agg import ( - FigureCanvasQTAgg as FigureCanvas, - NavigationToolbar2QTAgg as NavigationToolbar) -from PyQt4.QtCore import * -from PyQt4.QtGui import * - - -class AppForm(QMainWindow): - def __init__(self, parent=None): - QMainWindow.__init__(self, parent) - #self.x, self.y = self.get_data() - self.data = self.get_data2() - self.create_main_frame() - self.on_draw() - - def create_main_frame(self): - self.main_frame = QWidget() - - self.fig = Figure((5.0, 4.0), dpi=100) - self.canvas = FigureCanvas(self.fig) - self.canvas.setParent(self.main_frame) - self.canvas.setFocusPolicy(Qt.StrongFocus) - self.canvas.setFocus() - - self.mpl_toolbar = NavigationToolbar(self.canvas, self.main_frame) - - self.canvas.mpl_connect('key_press_event', self.on_key_press) - - vbox = QVBoxLayout() - vbox.addWidget(self.canvas) # the matplotlib canvas - vbox.addWidget(self.mpl_toolbar) - self.main_frame.setLayout(vbox) - self.setCentralWidget(self.main_frame) - - def get_data2(self): - return np.arange(20).reshape([4, 5]).copy() - - def on_draw(self): - self.fig.clear() - self.axes = self.fig.add_subplot(111) - #self.axes.plot(self.x, self.y, 'ro') - self.axes.imshow(self.data, interpolation='nearest') - #self.axes.plot([1,2,3]) - self.canvas.draw() - - def on_key_press(self, event): - print('you pressed', event.key) - # implement the default mpl key press events described at - # http://matplotlib.org/users/navigation_toolbar.html#navigation-keyboard-shortcuts - key_press_handler(event, self.canvas, self.mpl_toolbar) - - -def main(): - app = QApplication(sys.argv) - form = AppForm() - form.show() - app.exec_() - -if __name__ == "__main__": - main() diff --git a/dev/examples/user_interfaces/embedding_in_tk.html b/dev/examples/user_interfaces/embedding_in_tk.html deleted file mode 100644 index 9f07ac01a06..00000000000 --- a/dev/examples/user_interfaces/embedding_in_tk.html +++ /dev/null @@ -1,204 +0,0 @@ - - - - - - - - user_interfaces example code: embedding_in_tk.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      user_interfaces example code: embedding_in_tk.py

      -

      [source code]

      -
      #!/usr/bin/env python
      -
      -import matplotlib
      -matplotlib.use('TkAgg')
      -
      -from numpy import arange, sin, pi
      -from matplotlib.backends.backend_tkagg import FigureCanvasTkAgg, NavigationToolbar2TkAgg
      -# implement the default mpl key bindings
      -from matplotlib.backend_bases import key_press_handler
      -
      -
      -from matplotlib.figure import Figure
      -
      -import sys
      -if sys.version_info[0] < 3:
      -    import Tkinter as Tk
      -else:
      -    import tkinter as Tk
      -
      -root = Tk.Tk()
      -root.wm_title("Embedding in TK")
      -
      -
      -f = Figure(figsize=(5,4), dpi=100)
      -a = f.add_subplot(111)
      -t = arange(0.0,3.0,0.01)
      -s = sin(2*pi*t)
      -
      -a.plot(t,s)
      -
      -
      -# a tk.DrawingArea
      -canvas = FigureCanvasTkAgg(f, master=root)
      -canvas.show()
      -canvas.get_tk_widget().pack(side=Tk.TOP, fill=Tk.BOTH, expand=1)
      -
      -toolbar = NavigationToolbar2TkAgg( canvas, root )
      -toolbar.update()
      -canvas._tkcanvas.pack(side=Tk.TOP, fill=Tk.BOTH, expand=1)
      -
      -def on_key_event(event):
      -    print('you pressed %s'%event.key)
      -    key_press_handler(event, canvas, toolbar)
      -
      -canvas.mpl_connect('key_press_event', on_key_event)
      -
      -def _quit():
      -    root.quit()     # stops mainloop
      -    root.destroy()  # this is necessary on Windows to prevent
      -                    # Fatal Python Error: PyEval_RestoreThread: NULL tstate
      -
      -button = Tk.Button(master=root, text='Quit', command=_quit)
      -button.pack(side=Tk.BOTTOM)
      -
      -Tk.mainloop()
      -# If you put root.destroy() here, it will cause an error if
      -# the window is closed with the window manager.
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/user_interfaces/embedding_in_tk.py b/dev/examples/user_interfaces/embedding_in_tk.py deleted file mode 100644 index 1868ea68f45..00000000000 --- a/dev/examples/user_interfaces/embedding_in_tk.py +++ /dev/null @@ -1,59 +0,0 @@ -#!/usr/bin/env python - -import matplotlib -matplotlib.use('TkAgg') - -from numpy import arange, sin, pi -from matplotlib.backends.backend_tkagg import FigureCanvasTkAgg, NavigationToolbar2TkAgg -# implement the default mpl key bindings -from matplotlib.backend_bases import key_press_handler - - -from matplotlib.figure import Figure - -import sys -if sys.version_info[0] < 3: - import Tkinter as Tk -else: - import tkinter as Tk - -root = Tk.Tk() -root.wm_title("Embedding in TK") - - -f = Figure(figsize=(5,4), dpi=100) -a = f.add_subplot(111) -t = arange(0.0,3.0,0.01) -s = sin(2*pi*t) - -a.plot(t,s) - - -# a tk.DrawingArea -canvas = FigureCanvasTkAgg(f, master=root) -canvas.show() -canvas.get_tk_widget().pack(side=Tk.TOP, fill=Tk.BOTH, expand=1) - -toolbar = NavigationToolbar2TkAgg( canvas, root ) -toolbar.update() -canvas._tkcanvas.pack(side=Tk.TOP, fill=Tk.BOTH, expand=1) - -def on_key_event(event): - print('you pressed %s'%event.key) - key_press_handler(event, canvas, toolbar) - -canvas.mpl_connect('key_press_event', on_key_event) - -def _quit(): - root.quit() # stops mainloop - root.destroy() # this is necessary on Windows to prevent - # Fatal Python Error: PyEval_RestoreThread: NULL tstate - -button = Tk.Button(master=root, text='Quit', command=_quit) -button.pack(side=Tk.BOTTOM) - -Tk.mainloop() -# If you put root.destroy() here, it will cause an error if -# the window is closed with the window manager. - - diff --git a/dev/examples/user_interfaces/embedding_in_tk2.html b/dev/examples/user_interfaces/embedding_in_tk2.html deleted file mode 100644 index fd9fa1d179b..00000000000 --- a/dev/examples/user_interfaces/embedding_in_tk2.html +++ /dev/null @@ -1,192 +0,0 @@ - - - - - - - - user_interfaces example code: embedding_in_tk2.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      user_interfaces example code: embedding_in_tk2.py

      -

      [source code]

      -
      #!/usr/bin/env python
      -import matplotlib
      -matplotlib.use('TkAgg')
      -
      -from numpy import arange, sin, pi
      -from matplotlib.backends.backend_tkagg import FigureCanvasTkAgg, NavigationToolbar2TkAgg
      -from matplotlib.figure import Figure
      -
      -import sys
      -if sys.version_info[0] < 3:
      -    import Tkinter as Tk
      -else:
      -    import tkinter as Tk
      -
      -def destroy(e): sys.exit()
      -
      -root = Tk.Tk()
      -root.wm_title("Embedding in TK")
      -#root.bind("<Destroy>", destroy)
      -
      -
      -f = Figure(figsize=(5,4), dpi=100)
      -a = f.add_subplot(111)
      -t = arange(0.0,3.0,0.01)
      -s = sin(2*pi*t)
      -
      -a.plot(t,s)
      -a.set_title('Tk embedding')
      -a.set_xlabel('X axis label')
      -a.set_ylabel('Y label')
      -
      -
      -# a tk.DrawingArea
      -canvas = FigureCanvasTkAgg(f, master=root)
      -canvas.show()
      -canvas.get_tk_widget().pack(side=Tk.TOP, fill=Tk.BOTH, expand=1)
      -
      -#toolbar = NavigationToolbar2TkAgg( canvas, root )
      -#toolbar.update()
      -canvas._tkcanvas.pack(side=Tk.TOP, fill=Tk.BOTH, expand=1)
      -
      -button = Tk.Button(master=root, text='Quit', command=sys.exit)
      -button.pack(side=Tk.BOTTOM)
      -
      -Tk.mainloop()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/user_interfaces/embedding_in_tk2.py b/dev/examples/user_interfaces/embedding_in_tk2.py deleted file mode 100644 index 9e2a524a1b2..00000000000 --- a/dev/examples/user_interfaces/embedding_in_tk2.py +++ /dev/null @@ -1,45 +0,0 @@ -#!/usr/bin/env python -import matplotlib -matplotlib.use('TkAgg') - -from numpy import arange, sin, pi -from matplotlib.backends.backend_tkagg import FigureCanvasTkAgg, NavigationToolbar2TkAgg -from matplotlib.figure import Figure - -import sys -if sys.version_info[0] < 3: - import Tkinter as Tk -else: - import tkinter as Tk - -def destroy(e): sys.exit() - -root = Tk.Tk() -root.wm_title("Embedding in TK") -#root.bind("", destroy) - - -f = Figure(figsize=(5,4), dpi=100) -a = f.add_subplot(111) -t = arange(0.0,3.0,0.01) -s = sin(2*pi*t) - -a.plot(t,s) -a.set_title('Tk embedding') -a.set_xlabel('X axis label') -a.set_ylabel('Y label') - - -# a tk.DrawingArea -canvas = FigureCanvasTkAgg(f, master=root) -canvas.show() -canvas.get_tk_widget().pack(side=Tk.TOP, fill=Tk.BOTH, expand=1) - -#toolbar = NavigationToolbar2TkAgg( canvas, root ) -#toolbar.update() -canvas._tkcanvas.pack(side=Tk.TOP, fill=Tk.BOTH, expand=1) - -button = Tk.Button(master=root, text='Quit', command=sys.exit) -button.pack(side=Tk.BOTTOM) - -Tk.mainloop() diff --git a/dev/examples/user_interfaces/embedding_in_wx2.html b/dev/examples/user_interfaces/embedding_in_wx2.html deleted file mode 100644 index e3df7942eed..00000000000 --- a/dev/examples/user_interfaces/embedding_in_wx2.html +++ /dev/null @@ -1,235 +0,0 @@ - - - - - - - - user_interfaces example code: embedding_in_wx2.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      user_interfaces example code: embedding_in_wx2.py

      -

      [source code]

      -
      #!/usr/bin/env python
      -"""
      -An example of how to use wx or wxagg in an application with the new
      -toolbar - comment out the setA_toolbar line for no toolbar
      -"""
      -
      -# Used to guarantee to use at least Wx2.8
      -import wxversion
      -wxversion.ensureMinimal('2.8')
      -
      -from numpy import arange, sin, pi
      -
      -import matplotlib
      -
      -# uncomment the following to use wx rather than wxagg
      -#matplotlib.use('WX')
      -#from matplotlib.backends.backend_wx import FigureCanvasWx as FigureCanvas
      -
      -# comment out the following to use wx rather than wxagg
      -matplotlib.use('WXAgg')
      -from matplotlib.backends.backend_wxagg import FigureCanvasWxAgg as FigureCanvas
      -
      -from matplotlib.backends.backend_wx import NavigationToolbar2Wx
      -
      -from matplotlib.figure import Figure
      -
      -import wx
      -
      -class CanvasFrame(wx.Frame):
      -
      -    def __init__(self):
      -        wx.Frame.__init__(self,None,-1,
      -                         'CanvasFrame',size=(550,350))
      -
      -        self.SetBackgroundColour(wx.NamedColour("WHITE"))
      -
      -        self.figure = Figure()
      -        self.axes = self.figure.add_subplot(111)
      -        t = arange(0.0,3.0,0.01)
      -        s = sin(2*pi*t)
      -
      -        self.axes.plot(t,s)
      -        self.canvas = FigureCanvas(self, -1, self.figure)
      -
      -        self.sizer = wx.BoxSizer(wx.VERTICAL)
      -        self.sizer.Add(self.canvas, 1, wx.LEFT | wx.TOP | wx.GROW)
      -        self.SetSizer(self.sizer)
      -        self.Fit()
      -
      -        self.add_toolbar()  # comment this out for no toolbar
      -
      -
      -    def add_toolbar(self):
      -        self.toolbar = NavigationToolbar2Wx(self.canvas)
      -        self.toolbar.Realize()
      -        if wx.Platform == '__WXMAC__':
      -            # Mac platform (OSX 10.3, MacPython) does not seem to cope with
      -            # having a toolbar in a sizer. This work-around gets the buttons
      -            # back, but at the expense of having the toolbar at the top
      -            self.SetToolBar(self.toolbar)
      -        else:
      -            # On Windows platform, default window size is incorrect, so set
      -            # toolbar width to figure width.
      -            tw, th = self.toolbar.GetSizeTuple()
      -            fw, fh = self.canvas.GetSizeTuple()
      -            # By adding toolbar in sizer, we are able to put it at the bottom
      -            # of the frame - so appearance is closer to GTK version.
      -            # As noted above, doesn't work for Mac.
      -            self.toolbar.SetSize(wx.Size(fw, th))
      -            self.sizer.Add(self.toolbar, 0, wx.LEFT | wx.EXPAND)
      -        # update the axes menu on the toolbar
      -        self.toolbar.update()
      -
      -
      -    def OnPaint(self, event):
      -        self.canvas.draw()
      -
      -class App(wx.App):
      -
      -    def OnInit(self):
      -        'Create the main window and insert the custom frame'
      -        frame = CanvasFrame()
      -        frame.Show(True)
      -
      -        return True
      -
      -app = App(0)
      -app.MainLoop()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/user_interfaces/embedding_in_wx2.py b/dev/examples/user_interfaces/embedding_in_wx2.py deleted file mode 100644 index 2fe9d09376b..00000000000 --- a/dev/examples/user_interfaces/embedding_in_wx2.py +++ /dev/null @@ -1,88 +0,0 @@ -#!/usr/bin/env python -""" -An example of how to use wx or wxagg in an application with the new -toolbar - comment out the setA_toolbar line for no toolbar -""" - -# Used to guarantee to use at least Wx2.8 -import wxversion -wxversion.ensureMinimal('2.8') - -from numpy import arange, sin, pi - -import matplotlib - -# uncomment the following to use wx rather than wxagg -#matplotlib.use('WX') -#from matplotlib.backends.backend_wx import FigureCanvasWx as FigureCanvas - -# comment out the following to use wx rather than wxagg -matplotlib.use('WXAgg') -from matplotlib.backends.backend_wxagg import FigureCanvasWxAgg as FigureCanvas - -from matplotlib.backends.backend_wx import NavigationToolbar2Wx - -from matplotlib.figure import Figure - -import wx - -class CanvasFrame(wx.Frame): - - def __init__(self): - wx.Frame.__init__(self,None,-1, - 'CanvasFrame',size=(550,350)) - - self.SetBackgroundColour(wx.NamedColour("WHITE")) - - self.figure = Figure() - self.axes = self.figure.add_subplot(111) - t = arange(0.0,3.0,0.01) - s = sin(2*pi*t) - - self.axes.plot(t,s) - self.canvas = FigureCanvas(self, -1, self.figure) - - self.sizer = wx.BoxSizer(wx.VERTICAL) - self.sizer.Add(self.canvas, 1, wx.LEFT | wx.TOP | wx.GROW) - self.SetSizer(self.sizer) - self.Fit() - - self.add_toolbar() # comment this out for no toolbar - - - def add_toolbar(self): - self.toolbar = NavigationToolbar2Wx(self.canvas) - self.toolbar.Realize() - if wx.Platform == '__WXMAC__': - # Mac platform (OSX 10.3, MacPython) does not seem to cope with - # having a toolbar in a sizer. This work-around gets the buttons - # back, but at the expense of having the toolbar at the top - self.SetToolBar(self.toolbar) - else: - # On Windows platform, default window size is incorrect, so set - # toolbar width to figure width. - tw, th = self.toolbar.GetSizeTuple() - fw, fh = self.canvas.GetSizeTuple() - # By adding toolbar in sizer, we are able to put it at the bottom - # of the frame - so appearance is closer to GTK version. - # As noted above, doesn't work for Mac. - self.toolbar.SetSize(wx.Size(fw, th)) - self.sizer.Add(self.toolbar, 0, wx.LEFT | wx.EXPAND) - # update the axes menu on the toolbar - self.toolbar.update() - - - def OnPaint(self, event): - self.canvas.draw() - -class App(wx.App): - - def OnInit(self): - 'Create the main window and insert the custom frame' - frame = CanvasFrame() - frame.Show(True) - - return True - -app = App(0) -app.MainLoop() diff --git a/dev/examples/user_interfaces/embedding_in_wx3.html b/dev/examples/user_interfaces/embedding_in_wx3.html deleted file mode 100644 index 06ed09887d2..00000000000 --- a/dev/examples/user_interfaces/embedding_in_wx3.html +++ /dev/null @@ -1,308 +0,0 @@ - - - - - - - - user_interfaces example code: embedding_in_wx3.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      user_interfaces example code: embedding_in_wx3.py

      -

      [source code]

      -
      #!/usr/bin/env python
      -
      -"""
      -Copyright (C) 2003-2004 Andrew Straw, 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
      -
      -This is yet another example of using matplotlib with wx.  Hopefully
      -this is pretty full-featured:
      -
      -  - both matplotlib toolbar and WX buttons manipulate plot
      -  - full wxApp framework, including widget interaction
      -  - XRC (XML wxWidgets resource) file to create GUI (made with XRCed)
      -
      -This was derived from embedding_in_wx and dynamic_image_wxagg.
      -
      -Thanks to matplotlib and wx teams for creating such great software!
      -
      -"""
      -from __future__ import print_function
      -
      -# Used to guarantee to use at least Wx2.8
      -import wxversion
      -wxversion.ensureMinimal('2.8')
      -
      -import sys, time, os, gc
      -import matplotlib
      -matplotlib.use('WXAgg')
      -import matplotlib.cm as cm
      -import matplotlib.cbook as cbook
      -from matplotlib.backends.backend_wxagg import Toolbar, FigureCanvasWxAgg
      -from matplotlib.figure import Figure
      -import numpy as np
      -
      -import wx
      -import wx.xrc as xrc
      -
      -ERR_TOL = 1e-5 # floating point slop for peak-detection
      -
      -
      -matplotlib.rc('image', origin='lower')
      -
      -class PlotPanel(wx.Panel):
      -
      -    def __init__(self, parent):
      -        wx.Panel.__init__(self, parent, -1)
      -
      -        self.fig = Figure((5,4), 75)
      -        self.canvas = FigureCanvasWxAgg(self, -1, self.fig)
      -        self.toolbar = Toolbar(self.canvas) #matplotlib toolbar
      -        self.toolbar.Realize()
      -        #self.toolbar.set_active([0,1])
      -
      -        # Now put all into a sizer
      -        sizer = wx.BoxSizer(wx.VERTICAL)
      -        # This way of adding to sizer allows resizing
      -        sizer.Add(self.canvas, 1, wx.LEFT|wx.TOP|wx.GROW)
      -        # Best to allow the toolbar to resize!
      -        sizer.Add(self.toolbar, 0, wx.GROW)
      -        self.SetSizer(sizer)
      -        self.Fit()
      -
      -    def init_plot_data(self):
      -        a = self.fig.add_subplot(111)
      -
      -        x = np.arange(120.0)*2*np.pi/60.0
      -        y = np.arange(100.0)*2*np.pi/50.0
      -        self.x, self.y = np.meshgrid(x, y)
      -        z = np.sin(self.x) + np.cos(self.y)
      -        self.im = a.imshow( z, cmap=cm.jet)#, interpolation='nearest')
      -
      -        zmax = np.amax(z) - ERR_TOL
      -        ymax_i, xmax_i = np.nonzero(z >= zmax)
      -        if self.im.origin == 'upper':
      -            ymax_i = z.shape[0]-ymax_i
      -        self.lines = a.plot(xmax_i,ymax_i,'ko')
      -
      -        self.toolbar.update() # Not sure why this is needed - ADS
      -
      -    def GetToolBar(self):
      -        # You will need to override GetToolBar if you are using an
      -        # unmanaged toolbar in your frame
      -        return self.toolbar
      -
      -    def OnWhiz(self,evt):
      -        self.x += np.pi/15
      -        self.y += np.pi/20
      -        z = np.sin(self.x) + np.cos(self.y)
      -        self.im.set_array(z)
      -
      -        zmax = np.amax(z) - ERR_TOL
      -        ymax_i, xmax_i = np.nonzero(z >= zmax)
      -        if self.im.origin == 'upper':
      -            ymax_i = z.shape[0]-ymax_i
      -        self.lines[0].set_data(xmax_i,ymax_i)
      -
      -        self.canvas.draw()
      -
      -    def onEraseBackground(self, evt):
      -        # this is supposed to prevent redraw flicker on some X servers...
      -        pass
      -
      -class MyApp(wx.App):
      -    def OnInit(self):
      -        xrcfile = cbook.get_sample_data('embedding_in_wx3.xrc', asfileobj=False)
      -        print('loading', xrcfile)
      -
      -        self.res = xrc.XmlResource(xrcfile)
      -
      -        # main frame and panel ---------
      -
      -        self.frame = self.res.LoadFrame(None,"MainFrame")
      -        self.panel = xrc.XRCCTRL(self.frame,"MainPanel")
      -
      -        # matplotlib panel -------------
      -
      -        # container for matplotlib panel (I like to make a container
      -        # panel for our panel so I know where it'll go when in XRCed.)
      -        plot_container = xrc.XRCCTRL(self.frame,"plot_container_panel")
      -        sizer = wx.BoxSizer(wx.VERTICAL)
      -
      -        # matplotlib panel itself
      -        self.plotpanel = PlotPanel(plot_container)
      -        self.plotpanel.init_plot_data()
      -
      -        # wx boilerplate
      -        sizer.Add(self.plotpanel, 1, wx.EXPAND)
      -        plot_container.SetSizer(sizer)
      -
      -        # whiz button ------------------
      -
      -        whiz_button = xrc.XRCCTRL(self.frame,"whiz_button")
      -        wx.EVT_BUTTON(whiz_button, whiz_button.GetId(),
      -                      self.plotpanel.OnWhiz)
      -
      -        # bang button ------------------
      -
      -        bang_button = xrc.XRCCTRL(self.frame,"bang_button")
      -        wx.EVT_BUTTON(bang_button, bang_button.GetId(),
      -                      self.OnBang)
      -
      -        # final setup ------------------
      -
      -        sizer = self.panel.GetSizer()
      -        self.frame.Show(1)
      -
      -        self.SetTopWindow(self.frame)
      -
      -        return True
      -
      -    def OnBang(self,event):
      -        bang_count = xrc.XRCCTRL(self.frame,"bang_count")
      -        bangs = bang_count.GetValue()
      -        bangs = int(bangs)+1
      -        bang_count.SetValue(str(bangs))
      -
      -if __name__ == '__main__':
      -    app = MyApp(0)
      -    app.MainLoop()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/user_interfaces/embedding_in_wx3.py b/dev/examples/user_interfaces/embedding_in_wx3.py deleted file mode 100644 index 931e043a5fd..00000000000 --- a/dev/examples/user_interfaces/embedding_in_wx3.py +++ /dev/null @@ -1,162 +0,0 @@ -#!/usr/bin/env python - -""" -Copyright (C) 2003-2004 Andrew Straw, 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 - -This is yet another example of using matplotlib with wx. Hopefully -this is pretty full-featured: - - - both matplotlib toolbar and WX buttons manipulate plot - - full wxApp framework, including widget interaction - - XRC (XML wxWidgets resource) file to create GUI (made with XRCed) - -This was derived from embedding_in_wx and dynamic_image_wxagg. - -Thanks to matplotlib and wx teams for creating such great software! - -""" -from __future__ import print_function - -# Used to guarantee to use at least Wx2.8 -import wxversion -wxversion.ensureMinimal('2.8') - -import sys, time, os, gc -import matplotlib -matplotlib.use('WXAgg') -import matplotlib.cm as cm -import matplotlib.cbook as cbook -from matplotlib.backends.backend_wxagg import Toolbar, FigureCanvasWxAgg -from matplotlib.figure import Figure -import numpy as np - -import wx -import wx.xrc as xrc - -ERR_TOL = 1e-5 # floating point slop for peak-detection - - -matplotlib.rc('image', origin='lower') - -class PlotPanel(wx.Panel): - - def __init__(self, parent): - wx.Panel.__init__(self, parent, -1) - - self.fig = Figure((5,4), 75) - self.canvas = FigureCanvasWxAgg(self, -1, self.fig) - self.toolbar = Toolbar(self.canvas) #matplotlib toolbar - self.toolbar.Realize() - #self.toolbar.set_active([0,1]) - - # Now put all into a sizer - sizer = wx.BoxSizer(wx.VERTICAL) - # This way of adding to sizer allows resizing - sizer.Add(self.canvas, 1, wx.LEFT|wx.TOP|wx.GROW) - # Best to allow the toolbar to resize! - sizer.Add(self.toolbar, 0, wx.GROW) - self.SetSizer(sizer) - self.Fit() - - def init_plot_data(self): - a = self.fig.add_subplot(111) - - x = np.arange(120.0)*2*np.pi/60.0 - y = np.arange(100.0)*2*np.pi/50.0 - self.x, self.y = np.meshgrid(x, y) - z = np.sin(self.x) + np.cos(self.y) - self.im = a.imshow( z, cmap=cm.jet)#, interpolation='nearest') - - zmax = np.amax(z) - ERR_TOL - ymax_i, xmax_i = np.nonzero(z >= zmax) - if self.im.origin == 'upper': - ymax_i = z.shape[0]-ymax_i - self.lines = a.plot(xmax_i,ymax_i,'ko') - - self.toolbar.update() # Not sure why this is needed - ADS - - def GetToolBar(self): - # You will need to override GetToolBar if you are using an - # unmanaged toolbar in your frame - return self.toolbar - - def OnWhiz(self,evt): - self.x += np.pi/15 - self.y += np.pi/20 - z = np.sin(self.x) + np.cos(self.y) - self.im.set_array(z) - - zmax = np.amax(z) - ERR_TOL - ymax_i, xmax_i = np.nonzero(z >= zmax) - if self.im.origin == 'upper': - ymax_i = z.shape[0]-ymax_i - self.lines[0].set_data(xmax_i,ymax_i) - - self.canvas.draw() - - def onEraseBackground(self, evt): - # this is supposed to prevent redraw flicker on some X servers... - pass - -class MyApp(wx.App): - def OnInit(self): - xrcfile = cbook.get_sample_data('embedding_in_wx3.xrc', asfileobj=False) - print('loading', xrcfile) - - self.res = xrc.XmlResource(xrcfile) - - # main frame and panel --------- - - self.frame = self.res.LoadFrame(None,"MainFrame") - self.panel = xrc.XRCCTRL(self.frame,"MainPanel") - - # matplotlib panel ------------- - - # container for matplotlib panel (I like to make a container - # panel for our panel so I know where it'll go when in XRCed.) - plot_container = xrc.XRCCTRL(self.frame,"plot_container_panel") - sizer = wx.BoxSizer(wx.VERTICAL) - - # matplotlib panel itself - self.plotpanel = PlotPanel(plot_container) - self.plotpanel.init_plot_data() - - # wx boilerplate - sizer.Add(self.plotpanel, 1, wx.EXPAND) - plot_container.SetSizer(sizer) - - # whiz button ------------------ - - whiz_button = xrc.XRCCTRL(self.frame,"whiz_button") - wx.EVT_BUTTON(whiz_button, whiz_button.GetId(), - self.plotpanel.OnWhiz) - - # bang button ------------------ - - bang_button = xrc.XRCCTRL(self.frame,"bang_button") - wx.EVT_BUTTON(bang_button, bang_button.GetId(), - self.OnBang) - - # final setup ------------------ - - sizer = self.panel.GetSizer() - self.frame.Show(1) - - self.SetTopWindow(self.frame) - - return True - - def OnBang(self,event): - bang_count = xrc.XRCCTRL(self.frame,"bang_count") - bangs = bang_count.GetValue() - bangs = int(bangs)+1 - bang_count.SetValue(str(bangs)) - -if __name__ == '__main__': - app = MyApp(0) - app.MainLoop() - diff --git a/dev/examples/user_interfaces/embedding_in_wx4.html b/dev/examples/user_interfaces/embedding_in_wx4.html deleted file mode 100644 index 612fe7c939e..00000000000 --- a/dev/examples/user_interfaces/embedding_in_wx4.html +++ /dev/null @@ -1,265 +0,0 @@ - - - - - - - - user_interfaces example code: embedding_in_wx4.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      user_interfaces example code: embedding_in_wx4.py

      -

      [source code]

      -
      #!/usr/bin/env python
      -"""
      -An example of how to use wx or wxagg in an application with a custom
      -toolbar
      -"""
      -
      -# Used to guarantee to use at least Wx2.8
      -import wxversion
      -wxversion.ensureMinimal('2.8')
      -
      -from numpy import arange, sin, pi
      -
      -import matplotlib
      -
      -matplotlib.use('WXAgg')
      -from matplotlib.backends.backend_wxagg import FigureCanvasWxAgg as FigureCanvas
      -from matplotlib.backends.backend_wxagg import NavigationToolbar2WxAgg
      -
      -from matplotlib.backends.backend_wx import _load_bitmap
      -from matplotlib.figure import Figure
      -from numpy.random import rand
      -
      -import wx
      -
      -class MyNavigationToolbar(NavigationToolbar2WxAgg):
      -    """
      -    Extend the default wx toolbar with your own event handlers
      -    """
      -    ON_CUSTOM = wx.NewId()
      -    def __init__(self, canvas, cankill):
      -        NavigationToolbar2WxAgg.__init__(self, canvas)
      -
      -        # for simplicity I'm going to reuse a bitmap from wx, you'll
      -        # probably want to add your own.
      -        self.AddSimpleTool(self.ON_CUSTOM, _load_bitmap('stock_left.xpm'),
      -                           'Click me', 'Activate custom contol')
      -        wx.EVT_TOOL(self, self.ON_CUSTOM, self._on_custom)
      -
      -    def _on_custom(self, evt):
      -        # add some text to the axes in a random location in axes (0,1)
      -        # coords) with a random color
      -
      -        # get the axes
      -        ax = self.canvas.figure.axes[0]
      -
      -        # generate a random location can color
      -        x,y = tuple(rand(2))
      -        rgb = tuple(rand(3))
      -
      -        # add the text and draw
      -        ax.text(x, y, 'You clicked me',
      -                transform=ax.transAxes,
      -                color=rgb)
      -        self.canvas.draw()
      -        evt.Skip()
      -
      -
      -class CanvasFrame(wx.Frame):
      -
      -    def __init__(self):
      -        wx.Frame.__init__(self,None,-1,
      -                         'CanvasFrame',size=(550,350))
      -
      -        self.SetBackgroundColour(wx.NamedColour("WHITE"))
      -
      -        self.figure = Figure(figsize=(5,4), dpi=100)
      -        self.axes = self.figure.add_subplot(111)
      -        t = arange(0.0,3.0,0.01)
      -        s = sin(2*pi*t)
      -
      -        self.axes.plot(t,s)
      -
      -        self.canvas = FigureCanvas(self, -1, self.figure)
      -
      -        self.sizer = wx.BoxSizer(wx.VERTICAL)
      -        self.sizer.Add(self.canvas, 1, wx.TOP | wx.LEFT | wx.EXPAND)
      -        # Capture the paint message
      -        wx.EVT_PAINT(self, self.OnPaint)
      -
      -        self.toolbar = MyNavigationToolbar(self.canvas, True)
      -        self.toolbar.Realize()
      -        if wx.Platform == '__WXMAC__':
      -            # Mac platform (OSX 10.3, MacPython) does not seem to cope with
      -            # having a toolbar in a sizer. This work-around gets the buttons
      -            # back, but at the expense of having the toolbar at the top
      -            self.SetToolBar(self.toolbar)
      -        else:
      -            # On Windows platform, default window size is incorrect, so set
      -            # toolbar width to figure width.
      -            tw, th = self.toolbar.GetSizeTuple()
      -            fw, fh = self.canvas.GetSizeTuple()
      -            # By adding toolbar in sizer, we are able to put it at the bottom
      -            # of the frame - so appearance is closer to GTK version.
      -            # As noted above, doesn't work for Mac.
      -            self.toolbar.SetSize(wx.Size(fw, th))
      -            self.sizer.Add(self.toolbar, 0, wx.LEFT | wx.EXPAND)
      -
      -        # update the axes menu on the toolbar
      -        self.toolbar.update()
      -        self.SetSizer(self.sizer)
      -        self.Fit()
      -
      -
      -    def OnPaint(self, event):
      -        self.canvas.draw()
      -        event.Skip()
      -
      -class App(wx.App):
      -
      -    def OnInit(self):
      -        'Create the main window and insert the custom frame'
      -        frame = CanvasFrame()
      -        frame.Show(True)
      -
      -        return True
      -
      -app = App(0)
      -app.MainLoop()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/user_interfaces/embedding_in_wx4.py b/dev/examples/user_interfaces/embedding_in_wx4.py deleted file mode 100644 index 578be3b5da1..00000000000 --- a/dev/examples/user_interfaces/embedding_in_wx4.py +++ /dev/null @@ -1,118 +0,0 @@ -#!/usr/bin/env python -""" -An example of how to use wx or wxagg in an application with a custom -toolbar -""" - -# Used to guarantee to use at least Wx2.8 -import wxversion -wxversion.ensureMinimal('2.8') - -from numpy import arange, sin, pi - -import matplotlib - -matplotlib.use('WXAgg') -from matplotlib.backends.backend_wxagg import FigureCanvasWxAgg as FigureCanvas -from matplotlib.backends.backend_wxagg import NavigationToolbar2WxAgg - -from matplotlib.backends.backend_wx import _load_bitmap -from matplotlib.figure import Figure -from numpy.random import rand - -import wx - -class MyNavigationToolbar(NavigationToolbar2WxAgg): - """ - Extend the default wx toolbar with your own event handlers - """ - ON_CUSTOM = wx.NewId() - def __init__(self, canvas, cankill): - NavigationToolbar2WxAgg.__init__(self, canvas) - - # for simplicity I'm going to reuse a bitmap from wx, you'll - # probably want to add your own. - self.AddSimpleTool(self.ON_CUSTOM, _load_bitmap('stock_left.xpm'), - 'Click me', 'Activate custom contol') - wx.EVT_TOOL(self, self.ON_CUSTOM, self._on_custom) - - def _on_custom(self, evt): - # add some text to the axes in a random location in axes (0,1) - # coords) with a random color - - # get the axes - ax = self.canvas.figure.axes[0] - - # generate a random location can color - x,y = tuple(rand(2)) - rgb = tuple(rand(3)) - - # add the text and draw - ax.text(x, y, 'You clicked me', - transform=ax.transAxes, - color=rgb) - self.canvas.draw() - evt.Skip() - - -class CanvasFrame(wx.Frame): - - def __init__(self): - wx.Frame.__init__(self,None,-1, - 'CanvasFrame',size=(550,350)) - - self.SetBackgroundColour(wx.NamedColour("WHITE")) - - self.figure = Figure(figsize=(5,4), dpi=100) - self.axes = self.figure.add_subplot(111) - t = arange(0.0,3.0,0.01) - s = sin(2*pi*t) - - self.axes.plot(t,s) - - self.canvas = FigureCanvas(self, -1, self.figure) - - self.sizer = wx.BoxSizer(wx.VERTICAL) - self.sizer.Add(self.canvas, 1, wx.TOP | wx.LEFT | wx.EXPAND) - # Capture the paint message - wx.EVT_PAINT(self, self.OnPaint) - - self.toolbar = MyNavigationToolbar(self.canvas, True) - self.toolbar.Realize() - if wx.Platform == '__WXMAC__': - # Mac platform (OSX 10.3, MacPython) does not seem to cope with - # having a toolbar in a sizer. This work-around gets the buttons - # back, but at the expense of having the toolbar at the top - self.SetToolBar(self.toolbar) - else: - # On Windows platform, default window size is incorrect, so set - # toolbar width to figure width. - tw, th = self.toolbar.GetSizeTuple() - fw, fh = self.canvas.GetSizeTuple() - # By adding toolbar in sizer, we are able to put it at the bottom - # of the frame - so appearance is closer to GTK version. - # As noted above, doesn't work for Mac. - self.toolbar.SetSize(wx.Size(fw, th)) - self.sizer.Add(self.toolbar, 0, wx.LEFT | wx.EXPAND) - - # update the axes menu on the toolbar - self.toolbar.update() - self.SetSizer(self.sizer) - self.Fit() - - - def OnPaint(self, event): - self.canvas.draw() - event.Skip() - -class App(wx.App): - - def OnInit(self): - 'Create the main window and insert the custom frame' - frame = CanvasFrame() - frame.Show(True) - - return True - -app = App(0) -app.MainLoop() diff --git a/dev/examples/user_interfaces/embedding_in_wx5.html b/dev/examples/user_interfaces/embedding_in_wx5.html deleted file mode 100644 index b0e9433a10f..00000000000 --- a/dev/examples/user_interfaces/embedding_in_wx5.html +++ /dev/null @@ -1,198 +0,0 @@ - - - - - - - - user_interfaces example code: embedding_in_wx5.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      user_interfaces example code: embedding_in_wx5.py

      -

      [source code]

      -
      # Used to guarantee to use at least Wx2.8
      -import wxversion
      -wxversion.ensureMinimal('2.8')
      -
      -import wx
      -import wx.aui
      -import matplotlib as mpl
      -from matplotlib.backends.backend_wxagg import FigureCanvasWxAgg as Canvas
      -from matplotlib.backends.backend_wxagg import NavigationToolbar2Wx as Toolbar
      -
      -class Plot(wx.Panel):
      -    def __init__(self, parent, id = -1, dpi = None, **kwargs):
      -        wx.Panel.__init__(self, parent, id=id, **kwargs)
      -        self.figure = mpl.figure.Figure(dpi=dpi, figsize=(2,2))
      -        self.canvas = Canvas(self, -1, self.figure)
      -        self.toolbar = Toolbar(self.canvas)
      -        self.toolbar.Realize()
      -
      -        sizer = wx.BoxSizer(wx.VERTICAL)
      -        sizer.Add(self.canvas,1,wx.EXPAND)
      -        sizer.Add(self.toolbar, 0 , wx.LEFT | wx.EXPAND)
      -        self.SetSizer(sizer)
      -
      -class PlotNotebook(wx.Panel):
      -    def __init__(self, parent, id = -1):
      -        wx.Panel.__init__(self, parent, id=id)
      -        self.nb = wx.aui.AuiNotebook(self)
      -        sizer = wx.BoxSizer()
      -        sizer.Add(self.nb, 1, wx.EXPAND)
      -        self.SetSizer(sizer)
      -
      -    def add(self,name="plot"):
      -       page = Plot(self.nb)
      -       self.nb.AddPage(page,name)
      -       return page.figure
      -
      -
      -def demo():
      -    app = wx.PySimpleApp()
      -    frame = wx.Frame(None,-1,'Plotter')
      -    plotter = PlotNotebook(frame)
      -    axes1 = plotter.add('figure 1').gca()
      -    axes1.plot([1,2,3],[2,1,4])
      -    axes2 = plotter.add('figure 2').gca()
      -    axes2.plot([1,2,3,4,5],[2,1,4,2,3])
      -    #axes1.figure.canvas.draw()
      -    #axes2.figure.canvas.draw()
      -    frame.Show()
      -    app.MainLoop()
      -
      -if __name__ == "__main__": demo()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/user_interfaces/embedding_in_wx5.py b/dev/examples/user_interfaces/embedding_in_wx5.py deleted file mode 100644 index fd3969aca88..00000000000 --- a/dev/examples/user_interfaces/embedding_in_wx5.py +++ /dev/null @@ -1,52 +0,0 @@ -# Used to guarantee to use at least Wx2.8 -import wxversion -wxversion.ensureMinimal('2.8') - -import wx -import wx.aui -import matplotlib as mpl -from matplotlib.backends.backend_wxagg import FigureCanvasWxAgg as Canvas -from matplotlib.backends.backend_wxagg import NavigationToolbar2Wx as Toolbar - -class Plot(wx.Panel): - def __init__(self, parent, id = -1, dpi = None, **kwargs): - wx.Panel.__init__(self, parent, id=id, **kwargs) - self.figure = mpl.figure.Figure(dpi=dpi, figsize=(2,2)) - self.canvas = Canvas(self, -1, self.figure) - self.toolbar = Toolbar(self.canvas) - self.toolbar.Realize() - - sizer = wx.BoxSizer(wx.VERTICAL) - sizer.Add(self.canvas,1,wx.EXPAND) - sizer.Add(self.toolbar, 0 , wx.LEFT | wx.EXPAND) - self.SetSizer(sizer) - -class PlotNotebook(wx.Panel): - def __init__(self, parent, id = -1): - wx.Panel.__init__(self, parent, id=id) - self.nb = wx.aui.AuiNotebook(self) - sizer = wx.BoxSizer() - sizer.Add(self.nb, 1, wx.EXPAND) - self.SetSizer(sizer) - - def add(self,name="plot"): - page = Plot(self.nb) - self.nb.AddPage(page,name) - return page.figure - - -def demo(): - app = wx.PySimpleApp() - frame = wx.Frame(None,-1,'Plotter') - plotter = PlotNotebook(frame) - axes1 = plotter.add('figure 1').gca() - axes1.plot([1,2,3],[2,1,4]) - axes2 = plotter.add('figure 2').gca() - axes2.plot([1,2,3,4,5],[2,1,4,2,3]) - #axes1.figure.canvas.draw() - #axes2.figure.canvas.draw() - frame.Show() - app.MainLoop() - -if __name__ == "__main__": demo() - diff --git a/dev/examples/user_interfaces/fourier_demo_wx.html b/dev/examples/user_interfaces/fourier_demo_wx.html deleted file mode 100644 index 6951228bd19..00000000000 --- a/dev/examples/user_interfaces/fourier_demo_wx.html +++ /dev/null @@ -1,361 +0,0 @@ - - - - - - - - user_interfaces example code: fourier_demo_wx.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      user_interfaces example code: fourier_demo_wx.py

      -

      [source code]

      -
      import numpy as np
      -import wx
      -
      -import matplotlib
      -matplotlib.interactive(False)
      -matplotlib.use('WXAgg')
      -from matplotlib.backends.backend_wxagg import FigureCanvasWxAgg
      -from matplotlib.figure import Figure
      -from matplotlib.pyplot import gcf, setp
      -
      -
      -class Knob:
      -    """
      -    Knob - simple class with a "setKnob" method.
      -    A Knob instance is attached to a Param instance, e.g., param.attach(knob)
      -    Base class is for documentation purposes.
      -    """
      -    def setKnob(self, value):
      -        pass
      -
      -
      -class Param:
      -    """
      -    The idea of the "Param" class is that some parameter in the GUI may have
      -    several knobs that both control it and reflect the parameter's state, e.g.
      -    a slider, text, and dragging can all change the value of the frequency in
      -    the waveform of this example.
      -    The class allows a cleaner way to update/"feedback" to the other knobs when
      -    one is being changed.  Also, this class handles min/max constraints for all
      -    the knobs.
      -    Idea - knob list - in "set" method, knob object is passed as well
      -      - the other knobs in the knob list have a "set" method which gets
      -        called for the others.
      -    """
      -    def __init__(self, initialValue=None, minimum=0., maximum=1.):
      -        self.minimum = minimum
      -        self.maximum = maximum
      -        if initialValue != self.constrain(initialValue):
      -            raise ValueError('illegal initial value')
      -        self.value = initialValue
      -        self.knobs = []
      -
      -    def attach(self, knob):
      -        self.knobs += [knob]
      -
      -    def set(self, value, knob=None):
      -        self.value = value
      -        self.value = self.constrain(value)
      -        for feedbackKnob in self.knobs:
      -            if feedbackKnob != knob:
      -                feedbackKnob.setKnob(self.value)
      -        return self.value
      -
      -    def constrain(self, value):
      -        if value <= self.minimum:
      -            value = self.minimum
      -        if value >= self.maximum:
      -            value = self.maximum
      -        return value
      -
      -
      -class SliderGroup(Knob):
      -    def __init__(self, parent, label, param):
      -        self.sliderLabel = wx.StaticText(parent, label=label)
      -        self.sliderText = wx.TextCtrl(parent, -1, style=wx.TE_PROCESS_ENTER)
      -        self.slider = wx.Slider(parent, -1)
      -        self.slider.SetMax(param.maximum*1000)
      -        self.setKnob(param.value)
      -
      -        sizer = wx.BoxSizer(wx.HORIZONTAL)
      -        sizer.Add(self.sliderLabel, 0, wx.EXPAND | wx.ALIGN_CENTER | wx.ALL, border=2)
      -        sizer.Add(self.sliderText, 0, wx.EXPAND | wx.ALIGN_CENTER | wx.ALL, border=2)
      -        sizer.Add(self.slider, 1, wx.EXPAND)
      -        self.sizer = sizer
      -
      -        self.slider.Bind(wx.EVT_SLIDER, self.sliderHandler)
      -        self.sliderText.Bind(wx.EVT_TEXT_ENTER, self.sliderTextHandler)
      -
      -        self.param = param
      -        self.param.attach(self)
      -
      -    def sliderHandler(self, evt):
      -        value = evt.GetInt() / 1000.
      -        self.param.set(value)
      -
      -    def sliderTextHandler(self, evt):
      -        value = float(self.sliderText.GetValue())
      -        self.param.set(value)
      -
      -    def setKnob(self, value):
      -        self.sliderText.SetValue('%g'%value)
      -        self.slider.SetValue(value*1000)
      -
      -
      -class FourierDemoFrame(wx.Frame):
      -    def __init__(self, *args, **kwargs):
      -        wx.Frame.__init__(self, *args, **kwargs)
      -
      -        self.fourierDemoWindow = FourierDemoWindow(self)
      -        self.frequencySliderGroup = SliderGroup(self, label='Frequency f0:', \
      -            param=self.fourierDemoWindow.f0)
      -        self.amplitudeSliderGroup = SliderGroup(self, label=' Amplitude a:', \
      -            param=self.fourierDemoWindow.A)
      -
      -        sizer = wx.BoxSizer(wx.VERTICAL)
      -        sizer.Add(self.fourierDemoWindow, 1, wx.EXPAND)
      -        sizer.Add(self.frequencySliderGroup.sizer, 0, \
      -            wx.EXPAND | wx.ALIGN_CENTER | wx.ALL, border=5)
      -        sizer.Add(self.amplitudeSliderGroup.sizer, 0, \
      -            wx.EXPAND | wx.ALIGN_CENTER | wx.ALL, border=5)
      -        self.SetSizer(sizer)
      -
      -
      -class FourierDemoWindow(wx.Window, Knob):
      -    def __init__(self, *args, **kwargs):
      -        wx.Window.__init__(self, *args, **kwargs)
      -        self.lines = []
      -        self.figure = Figure()
      -        self.canvas = FigureCanvasWxAgg(self, -1, self.figure)
      -        self.canvas.callbacks.connect('button_press_event', self.mouseDown)
      -        self.canvas.callbacks.connect('motion_notify_event', self.mouseMotion)
      -        self.canvas.callbacks.connect('button_release_event', self.mouseUp)
      -        self.state = ''
      -        self.mouseInfo = (None, None, None, None)
      -        self.f0 = Param(2., minimum=0., maximum=6.)
      -        self.A = Param(1., minimum=0.01, maximum=2.)
      -        self.draw()
      -
      -        # Not sure I like having two params attached to the same Knob,
      -        # but that is what we have here... it works but feels kludgy -
      -        # although maybe it's not too bad since the knob changes both params
      -        # at the same time (both f0 and A are affected during a drag)
      -        self.f0.attach(self)
      -        self.A.attach(self)
      -        self.Bind(wx.EVT_SIZE, self.sizeHandler)
      -
      -    def sizeHandler(self, *args, **kwargs):
      -        self.canvas.SetSize(self.GetSize())
      -
      -    def mouseDown(self, evt):
      -        if self.lines[0] in self.figure.hitlist(evt):
      -            self.state = 'frequency'
      -        elif self.lines[1] in self.figure.hitlist(evt):
      -            self.state = 'time'
      -        else:
      -            self.state = ''
      -        self.mouseInfo = (evt.xdata, evt.ydata, max(self.f0.value, .1), self.A.value)
      -
      -    def mouseMotion(self, evt):
      -        if self.state == '':
      -            return
      -        x, y = evt.xdata, evt.ydata
      -        if x is None:  # outside the axes
      -            return
      -        x0, y0, f0Init, AInit = self.mouseInfo
      -        self.A.set(AInit+(AInit*(y-y0)/y0), self)
      -        if self.state == 'frequency':
      -            self.f0.set(f0Init+(f0Init*(x-x0)/x0))
      -        elif self.state == 'time':
      -            if (x-x0)/x0 != -1.:
      -                self.f0.set(1./(1./f0Init+(1./f0Init*(x-x0)/x0)))
      -
      -    def mouseUp(self, evt):
      -        self.state = ''
      -
      -    def draw(self):
      -        if not hasattr(self, 'subplot1'):
      -            self.subplot1 = self.figure.add_subplot(211)
      -            self.subplot2 = self.figure.add_subplot(212)
      -        x1, y1, x2, y2 = self.compute(self.f0.value, self.A.value)
      -        color = (1., 0., 0.)
      -        self.lines += self.subplot1.plot(x1, y1, color=color, linewidth=2)
      -        self.lines += self.subplot2.plot(x2, y2, color=color, linewidth=2)
      -        #Set some plot attributes
      -        self.subplot1.set_title("Click and drag waveforms to change frequency and amplitude", fontsize=12)
      -        self.subplot1.set_ylabel("Frequency Domain Waveform X(f)", fontsize = 8)
      -        self.subplot1.set_xlabel("frequency f", fontsize = 8)
      -        self.subplot2.set_ylabel("Time Domain Waveform x(t)", fontsize = 8)
      -        self.subplot2.set_xlabel("time t", fontsize = 8)
      -        self.subplot1.set_xlim([-6, 6])
      -        self.subplot1.set_ylim([0, 1])
      -        self.subplot2.set_xlim([-2, 2])
      -        self.subplot2.set_ylim([-2, 2])
      -        self.subplot1.text(0.05, .95, r'$X(f) = \mathcal{F}\{x(t)\}$', \
      -            verticalalignment='top', transform = self.subplot1.transAxes)
      -        self.subplot2.text(0.05, .95, r'$x(t) = a \cdot \cos(2\pi f_0 t) e^{-\pi t^2}$', \
      -            verticalalignment='top', transform = self.subplot2.transAxes)
      -
      -    def compute(self, f0, A):
      -        f = np.arange(-6., 6., 0.02)
      -        t = np.arange(-2., 2., 0.01)
      -        x = A*np.cos(2*np.pi*f0*t)*np.exp(-np.pi*t**2)
      -        X = A/2*(np.exp(-np.pi*(f-f0)**2) + np.exp(-np.pi*(f+f0)**2))
      -        return f, X, t, x
      -
      -    def repaint(self):
      -        self.canvas.draw()
      -
      -    def setKnob(self, value):
      -        # Note, we ignore value arg here and just go by state of the params
      -        x1, y1, x2, y2 = self.compute(self.f0.value, self.A.value)
      -        setp(self.lines[0], xdata=x1, ydata=y1)
      -        setp(self.lines[1], xdata=x2, ydata=y2)
      -        self.repaint()
      -
      -
      -class App(wx.App):
      -    def OnInit(self):
      -        self.frame1 = FourierDemoFrame(parent=None, title="Fourier Demo", size=(640, 480))
      -        self.frame1.Show()
      -        return True
      -
      -app = App()
      -app.MainLoop()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/user_interfaces/fourier_demo_wx.py b/dev/examples/user_interfaces/fourier_demo_wx.py deleted file mode 100644 index aa52809ff1c..00000000000 --- a/dev/examples/user_interfaces/fourier_demo_wx.py +++ /dev/null @@ -1,214 +0,0 @@ -import numpy as np -import wx - -import matplotlib -matplotlib.interactive(False) -matplotlib.use('WXAgg') -from matplotlib.backends.backend_wxagg import FigureCanvasWxAgg -from matplotlib.figure import Figure -from matplotlib.pyplot import gcf, setp - - -class Knob: - """ - Knob - simple class with a "setKnob" method. - A Knob instance is attached to a Param instance, e.g., param.attach(knob) - Base class is for documentation purposes. - """ - def setKnob(self, value): - pass - - -class Param: - """ - The idea of the "Param" class is that some parameter in the GUI may have - several knobs that both control it and reflect the parameter's state, e.g. - a slider, text, and dragging can all change the value of the frequency in - the waveform of this example. - The class allows a cleaner way to update/"feedback" to the other knobs when - one is being changed. Also, this class handles min/max constraints for all - the knobs. - Idea - knob list - in "set" method, knob object is passed as well - - the other knobs in the knob list have a "set" method which gets - called for the others. - """ - def __init__(self, initialValue=None, minimum=0., maximum=1.): - self.minimum = minimum - self.maximum = maximum - if initialValue != self.constrain(initialValue): - raise ValueError('illegal initial value') - self.value = initialValue - self.knobs = [] - - def attach(self, knob): - self.knobs += [knob] - - def set(self, value, knob=None): - self.value = value - self.value = self.constrain(value) - for feedbackKnob in self.knobs: - if feedbackKnob != knob: - feedbackKnob.setKnob(self.value) - return self.value - - def constrain(self, value): - if value <= self.minimum: - value = self.minimum - if value >= self.maximum: - value = self.maximum - return value - - -class SliderGroup(Knob): - def __init__(self, parent, label, param): - self.sliderLabel = wx.StaticText(parent, label=label) - self.sliderText = wx.TextCtrl(parent, -1, style=wx.TE_PROCESS_ENTER) - self.slider = wx.Slider(parent, -1) - self.slider.SetMax(param.maximum*1000) - self.setKnob(param.value) - - sizer = wx.BoxSizer(wx.HORIZONTAL) - sizer.Add(self.sliderLabel, 0, wx.EXPAND | wx.ALIGN_CENTER | wx.ALL, border=2) - sizer.Add(self.sliderText, 0, wx.EXPAND | wx.ALIGN_CENTER | wx.ALL, border=2) - sizer.Add(self.slider, 1, wx.EXPAND) - self.sizer = sizer - - self.slider.Bind(wx.EVT_SLIDER, self.sliderHandler) - self.sliderText.Bind(wx.EVT_TEXT_ENTER, self.sliderTextHandler) - - self.param = param - self.param.attach(self) - - def sliderHandler(self, evt): - value = evt.GetInt() / 1000. - self.param.set(value) - - def sliderTextHandler(self, evt): - value = float(self.sliderText.GetValue()) - self.param.set(value) - - def setKnob(self, value): - self.sliderText.SetValue('%g'%value) - self.slider.SetValue(value*1000) - - -class FourierDemoFrame(wx.Frame): - def __init__(self, *args, **kwargs): - wx.Frame.__init__(self, *args, **kwargs) - - self.fourierDemoWindow = FourierDemoWindow(self) - self.frequencySliderGroup = SliderGroup(self, label='Frequency f0:', \ - param=self.fourierDemoWindow.f0) - self.amplitudeSliderGroup = SliderGroup(self, label=' Amplitude a:', \ - param=self.fourierDemoWindow.A) - - sizer = wx.BoxSizer(wx.VERTICAL) - sizer.Add(self.fourierDemoWindow, 1, wx.EXPAND) - sizer.Add(self.frequencySliderGroup.sizer, 0, \ - wx.EXPAND | wx.ALIGN_CENTER | wx.ALL, border=5) - sizer.Add(self.amplitudeSliderGroup.sizer, 0, \ - wx.EXPAND | wx.ALIGN_CENTER | wx.ALL, border=5) - self.SetSizer(sizer) - - -class FourierDemoWindow(wx.Window, Knob): - def __init__(self, *args, **kwargs): - wx.Window.__init__(self, *args, **kwargs) - self.lines = [] - self.figure = Figure() - self.canvas = FigureCanvasWxAgg(self, -1, self.figure) - self.canvas.callbacks.connect('button_press_event', self.mouseDown) - self.canvas.callbacks.connect('motion_notify_event', self.mouseMotion) - self.canvas.callbacks.connect('button_release_event', self.mouseUp) - self.state = '' - self.mouseInfo = (None, None, None, None) - self.f0 = Param(2., minimum=0., maximum=6.) - self.A = Param(1., minimum=0.01, maximum=2.) - self.draw() - - # Not sure I like having two params attached to the same Knob, - # but that is what we have here... it works but feels kludgy - - # although maybe it's not too bad since the knob changes both params - # at the same time (both f0 and A are affected during a drag) - self.f0.attach(self) - self.A.attach(self) - self.Bind(wx.EVT_SIZE, self.sizeHandler) - - def sizeHandler(self, *args, **kwargs): - self.canvas.SetSize(self.GetSize()) - - def mouseDown(self, evt): - if self.lines[0] in self.figure.hitlist(evt): - self.state = 'frequency' - elif self.lines[1] in self.figure.hitlist(evt): - self.state = 'time' - else: - self.state = '' - self.mouseInfo = (evt.xdata, evt.ydata, max(self.f0.value, .1), self.A.value) - - def mouseMotion(self, evt): - if self.state == '': - return - x, y = evt.xdata, evt.ydata - if x is None: # outside the axes - return - x0, y0, f0Init, AInit = self.mouseInfo - self.A.set(AInit+(AInit*(y-y0)/y0), self) - if self.state == 'frequency': - self.f0.set(f0Init+(f0Init*(x-x0)/x0)) - elif self.state == 'time': - if (x-x0)/x0 != -1.: - self.f0.set(1./(1./f0Init+(1./f0Init*(x-x0)/x0))) - - def mouseUp(self, evt): - self.state = '' - - def draw(self): - if not hasattr(self, 'subplot1'): - self.subplot1 = self.figure.add_subplot(211) - self.subplot2 = self.figure.add_subplot(212) - x1, y1, x2, y2 = self.compute(self.f0.value, self.A.value) - color = (1., 0., 0.) - self.lines += self.subplot1.plot(x1, y1, color=color, linewidth=2) - self.lines += self.subplot2.plot(x2, y2, color=color, linewidth=2) - #Set some plot attributes - self.subplot1.set_title("Click and drag waveforms to change frequency and amplitude", fontsize=12) - self.subplot1.set_ylabel("Frequency Domain Waveform X(f)", fontsize = 8) - self.subplot1.set_xlabel("frequency f", fontsize = 8) - self.subplot2.set_ylabel("Time Domain Waveform x(t)", fontsize = 8) - self.subplot2.set_xlabel("time t", fontsize = 8) - self.subplot1.set_xlim([-6, 6]) - self.subplot1.set_ylim([0, 1]) - self.subplot2.set_xlim([-2, 2]) - self.subplot2.set_ylim([-2, 2]) - self.subplot1.text(0.05, .95, r'$X(f) = \mathcal{F}\{x(t)\}$', \ - verticalalignment='top', transform = self.subplot1.transAxes) - self.subplot2.text(0.05, .95, r'$x(t) = a \cdot \cos(2\pi f_0 t) e^{-\pi t^2}$', \ - verticalalignment='top', transform = self.subplot2.transAxes) - - def compute(self, f0, A): - f = np.arange(-6., 6., 0.02) - t = np.arange(-2., 2., 0.01) - x = A*np.cos(2*np.pi*f0*t)*np.exp(-np.pi*t**2) - X = A/2*(np.exp(-np.pi*(f-f0)**2) + np.exp(-np.pi*(f+f0)**2)) - return f, X, t, x - - def repaint(self): - self.canvas.draw() - - def setKnob(self, value): - # Note, we ignore value arg here and just go by state of the params - x1, y1, x2, y2 = self.compute(self.f0.value, self.A.value) - setp(self.lines[0], xdata=x1, ydata=y1) - setp(self.lines[1], xdata=x2, ydata=y2) - self.repaint() - - -class App(wx.App): - def OnInit(self): - self.frame1 = FourierDemoFrame(parent=None, title="Fourier Demo", size=(640, 480)) - self.frame1.Show() - return True - -app = App() -app.MainLoop() diff --git a/dev/examples/user_interfaces/gtk_spreadsheet.html b/dev/examples/user_interfaces/gtk_spreadsheet.html deleted file mode 100644 index e54029d0f8b..00000000000 --- a/dev/examples/user_interfaces/gtk_spreadsheet.html +++ /dev/null @@ -1,242 +0,0 @@ - - - - - - - - user_interfaces example code: gtk_spreadsheet.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      user_interfaces example code: gtk_spreadsheet.py

      -

      [source code]

      -
      #!/usr/bin/env python
      -"""
      -Example of embedding matplotlib in an application and interacting with
      -a treeview to store data.  Double click on an entry to update plot
      -data
      -
      -"""
      -import pygtk
      -pygtk.require('2.0')
      -import gtk
      -from gtk import gdk
      -
      -import matplotlib
      -matplotlib.use('GTKAgg')  # or 'GTK'
      -from matplotlib.backends.backend_gtk import FigureCanvasGTK as FigureCanvas
      -
      -from numpy.random import random
      -from matplotlib.figure import Figure
      -
      -
      -class DataManager(gtk.Window):
      -    numRows, numCols = 20,10
      -
      -    data = random((numRows, numCols))
      -
      -    def __init__(self):
      -        gtk.Window.__init__(self)
      -        self.set_default_size(600, 600)
      -        self.connect('destroy', lambda win: gtk.main_quit())
      -
      -        self.set_title('GtkListStore demo')
      -        self.set_border_width(8)
      -
      -        vbox = gtk.VBox(False, 8)
      -        self.add(vbox)
      -
      -        label = gtk.Label('Double click a row to plot the data')
      -
      -        vbox.pack_start(label, False, False)
      -
      -        sw = gtk.ScrolledWindow()
      -        sw.set_shadow_type(gtk.SHADOW_ETCHED_IN)
      -        sw.set_policy(gtk.POLICY_NEVER,
      -                      gtk.POLICY_AUTOMATIC)
      -        vbox.pack_start(sw, True, True)
      -
      -        model = self.create_model()
      -
      -        self.treeview = gtk.TreeView(model)
      -        self.treeview.set_rules_hint(True)
      -
      -
      -        # matplotlib stuff
      -        fig = Figure(figsize=(6,4))
      -
      -        self.canvas = FigureCanvas(fig)  # a gtk.DrawingArea
      -        vbox.pack_start(self.canvas, True, True)
      -        ax = fig.add_subplot(111)
      -        self.line, = ax.plot(self.data[0,:], 'go')  # plot the first row
      -
      -        self.treeview.connect('row-activated', self.plot_row)
      -        sw.add(self.treeview)
      -
      -        self.add_columns()
      -
      -        self.add_events(gdk.BUTTON_PRESS_MASK |
      -                        gdk.KEY_PRESS_MASK|
      -                        gdk.KEY_RELEASE_MASK)
      -
      -
      -    def plot_row(self, treeview, path, view_column):
      -        ind, = path  # get the index into data
      -        points = self.data[ind,:]
      -        self.line.set_ydata(points)
      -        self.canvas.draw()
      -
      -
      -    def add_columns(self):
      -        for i in range(self.numCols):
      -            column = gtk.TreeViewColumn('%d'%i, gtk.CellRendererText(), text=i)
      -            self.treeview.append_column(column)
      -
      -
      -    def create_model(self):
      -        types = [float]*self.numCols
      -        store = gtk.ListStore(*types)
      -
      -        for row in self.data:
      -            store.append(row)
      -        return store
      -
      -
      -manager = DataManager()
      -manager.show_all()
      -gtk.main()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/user_interfaces/gtk_spreadsheet.py b/dev/examples/user_interfaces/gtk_spreadsheet.py deleted file mode 100644 index e1e50329b1c..00000000000 --- a/dev/examples/user_interfaces/gtk_spreadsheet.py +++ /dev/null @@ -1,95 +0,0 @@ -#!/usr/bin/env python -""" -Example of embedding matplotlib in an application and interacting with -a treeview to store data. Double click on an entry to update plot -data - -""" -import pygtk -pygtk.require('2.0') -import gtk -from gtk import gdk - -import matplotlib -matplotlib.use('GTKAgg') # or 'GTK' -from matplotlib.backends.backend_gtk import FigureCanvasGTK as FigureCanvas - -from numpy.random import random -from matplotlib.figure import Figure - - -class DataManager(gtk.Window): - numRows, numCols = 20,10 - - data = random((numRows, numCols)) - - def __init__(self): - gtk.Window.__init__(self) - self.set_default_size(600, 600) - self.connect('destroy', lambda win: gtk.main_quit()) - - self.set_title('GtkListStore demo') - self.set_border_width(8) - - vbox = gtk.VBox(False, 8) - self.add(vbox) - - label = gtk.Label('Double click a row to plot the data') - - vbox.pack_start(label, False, False) - - sw = gtk.ScrolledWindow() - sw.set_shadow_type(gtk.SHADOW_ETCHED_IN) - sw.set_policy(gtk.POLICY_NEVER, - gtk.POLICY_AUTOMATIC) - vbox.pack_start(sw, True, True) - - model = self.create_model() - - self.treeview = gtk.TreeView(model) - self.treeview.set_rules_hint(True) - - - # matplotlib stuff - fig = Figure(figsize=(6,4)) - - self.canvas = FigureCanvas(fig) # a gtk.DrawingArea - vbox.pack_start(self.canvas, True, True) - ax = fig.add_subplot(111) - self.line, = ax.plot(self.data[0,:], 'go') # plot the first row - - self.treeview.connect('row-activated', self.plot_row) - sw.add(self.treeview) - - self.add_columns() - - self.add_events(gdk.BUTTON_PRESS_MASK | - gdk.KEY_PRESS_MASK| - gdk.KEY_RELEASE_MASK) - - - def plot_row(self, treeview, path, view_column): - ind, = path # get the index into data - points = self.data[ind,:] - self.line.set_ydata(points) - self.canvas.draw() - - - def add_columns(self): - for i in range(self.numCols): - column = gtk.TreeViewColumn('%d'%i, gtk.CellRendererText(), text=i) - self.treeview.append_column(column) - - - def create_model(self): - types = [float]*self.numCols - store = gtk.ListStore(*types) - - for row in self.data: - store.append(row) - return store - - -manager = DataManager() -manager.show_all() -gtk.main() diff --git a/dev/examples/user_interfaces/histogram_demo_canvasagg.html b/dev/examples/user_interfaces/histogram_demo_canvasagg.html deleted file mode 100644 index c5d25ba5835..00000000000 --- a/dev/examples/user_interfaces/histogram_demo_canvasagg.html +++ /dev/null @@ -1,206 +0,0 @@ - - - - - - - - user_interfaces example code: histogram_demo_canvasagg.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      user_interfaces example code: histogram_demo_canvasagg.py

      -

      [source code]

      -
      #!/usr/bin/env python
      -"""
      -This is an example that shows you how to work directly with the agg
      -figure canvas to create a figure using the pythonic API.
      -
      -In this example, the contents of the agg canvas are extracted to a
      -string, which can in turn be passed off to PIL or put in a numeric
      -array
      -
      -
      -"""
      -from matplotlib.backends.backend_agg import FigureCanvasAgg
      -from matplotlib.figure import Figure
      -from matplotlib.mlab import normpdf
      -from numpy.random import randn
      -import numpy
      -
      -fig = Figure(figsize=(5,4), dpi=100)
      -ax = fig.add_subplot(111)
      -
      -canvas = FigureCanvasAgg(fig)
      -
      -mu, sigma = 100, 15
      -x = mu + sigma*randn(10000)
      -
      -# the histogram of the data
      -n, bins, patches = ax.hist(x, 50, normed=1)
      -
      -# add a 'best fit' line
      -y = normpdf( bins, mu, sigma)
      -line, = ax.plot(bins, y, 'r--')
      -line.set_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))
      -
      -canvas.draw()
      -
      -s = canvas.tostring_rgb()  # save this and convert to bitmap as needed
      -
      -# get the figure dimensions for creating bitmaps or numpy arrays,
      -# etc.
      -l,b,w,h = fig.bbox.bounds
      -w, h = int(w), int(h)
      -
      -if 0:
      -    # convert to a numpy array
      -    X = numpy.fromstring(s, numpy.uint8)
      -    X.shape = h, w, 3
      -
      -if 0:
      -    # pass off to PIL
      -    from PIL import Image
      -    im = Image.fromstring( "RGB", (w,h), s)
      -    im.show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/user_interfaces/histogram_demo_canvasagg.py b/dev/examples/user_interfaces/histogram_demo_canvasagg.py deleted file mode 100644 index 3f99c3d1f42..00000000000 --- a/dev/examples/user_interfaces/histogram_demo_canvasagg.py +++ /dev/null @@ -1,62 +0,0 @@ -#!/usr/bin/env python -""" -This is an example that shows you how to work directly with the agg -figure canvas to create a figure using the pythonic API. - -In this example, the contents of the agg canvas are extracted to a -string, which can in turn be passed off to PIL or put in a numeric -array - - -""" -from matplotlib.backends.backend_agg import FigureCanvasAgg -from matplotlib.figure import Figure -from matplotlib.mlab import normpdf -from numpy.random import randn -import numpy - -fig = Figure(figsize=(5,4), dpi=100) -ax = fig.add_subplot(111) - -canvas = FigureCanvasAgg(fig) - -mu, sigma = 100, 15 -x = mu + sigma*randn(10000) - -# the histogram of the data -n, bins, patches = ax.hist(x, 50, normed=1) - -# add a 'best fit' line -y = normpdf( bins, mu, sigma) -line, = ax.plot(bins, y, 'r--') -line.set_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)) - -canvas.draw() - -s = canvas.tostring_rgb() # save this and convert to bitmap as needed - -# get the figure dimensions for creating bitmaps or numpy arrays, -# etc. -l,b,w,h = fig.bbox.bounds -w, h = int(w), int(h) - -if 0: - # convert to a numpy array - X = numpy.fromstring(s, numpy.uint8) - X.shape = h, w, 3 - -if 0: - # pass off to PIL - from PIL import Image - im = Image.fromstring( "RGB", (w,h), s) - im.show() - - - diff --git a/dev/examples/user_interfaces/index.html b/dev/examples/user_interfaces/index.html deleted file mode 100644 index ae3f3610368..00000000000 --- a/dev/examples/user_interfaces/index.html +++ /dev/null @@ -1,184 +0,0 @@ - - - - - - - - user_interfaces Examples — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - - - - - - \ No newline at end of file diff --git a/dev/examples/user_interfaces/interactive.html b/dev/examples/user_interfaces/interactive.html deleted file mode 100644 index a2500a12c96..00000000000 --- a/dev/examples/user_interfaces/interactive.html +++ /dev/null @@ -1,388 +0,0 @@ - - - - - - - - user_interfaces example code: interactive.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      user_interfaces example code: interactive.py

      -

      [source code]

      -
      #!/usr/bin/env python
      -
      -"""Multithreaded interactive interpreter with GTK and Matplotlib support.
      -
      -WARNING:
      -As of 2010/06/25, this is not working, at least on Linux.
      -I have disabled it as a runnable script. - EF
      -
      -
      -Usage:
      -
      -  pyint-gtk.py -> starts shell with gtk thread running separately
      -
      -  pyint-gtk.py -pylab [filename] -> initializes matplotlib, optionally running
      -  the named file.  The shell starts after the file is executed.
      -
      -Threading code taken from:
      -http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/65109, by Brian
      -McErlean and John Finlay.
      -
      -Matplotlib support taken from interactive.py in the matplotlib distribution.
      -
      -Also borrows liberally from code.py in the Python standard library."""
      -
      -from __future__ import print_function
      -
      -__author__ = "Fernando Perez <Fernando.Perez@colorado.edu>"
      -
      -import sys
      -import code
      -import threading
      -
      -import gobject
      -import gtk
      -
      -try:
      -    import readline
      -except ImportError:
      -    has_readline = False
      -else:
      -    has_readline = True
      -
      -class MTConsole(code.InteractiveConsole):
      -    """Simple multi-threaded shell"""
      -
      -    def __init__(self,on_kill=None,*args,**kw):
      -        code.InteractiveConsole.__init__(self,*args,**kw)
      -        self.code_to_run = None
      -        self.ready = threading.Condition()
      -        self._kill = False
      -        if on_kill is None:
      -            on_kill = []
      -        # Check that all things to kill are callable:
      -        for _ in on_kill:
      -            if not callable(_):
      -                raise TypeError,'on_kill must be a list of callables'
      -        self.on_kill = on_kill
      -        # Set up tab-completer
      -        if has_readline:
      -            import rlcompleter
      -            try:  # this form only works with python 2.3
      -                self.completer = rlcompleter.Completer(self.locals)
      -            except: # simpler for py2.2
      -                self.completer = rlcompleter.Completer()
      -
      -            readline.set_completer(self.completer.complete)
      -            # Use tab for completions
      -            readline.parse_and_bind('tab: complete')
      -            # This forces readline to automatically print the above list when tab
      -            # completion is set to 'complete'.
      -            readline.parse_and_bind('set show-all-if-ambiguous on')
      -            # Bindings for incremental searches in the history. These searches
      -            # use the string typed so far on the command line and search
      -            # anything in the previous input history containing them.
      -            readline.parse_and_bind('"\C-r": reverse-search-history')
      -            readline.parse_and_bind('"\C-s": forward-search-history')
      -
      -    def runsource(self, source, filename="<input>", symbol="single"):
      -        """Compile and run some source in the interpreter.
      -
      -        Arguments are as for compile_command().
      -
      -        One several things can happen:
      -
      -        1) The input is incorrect; compile_command() raised an
      -        exception (SyntaxError or OverflowError).  A syntax traceback
      -        will be printed by calling the showsyntaxerror() method.
      -
      -        2) The input is incomplete, and more input is required;
      -        compile_command() returned None.  Nothing happens.
      -
      -        3) The input is complete; compile_command() returned a code
      -        object.  The code is executed by calling self.runcode() (which
      -        also handles run-time exceptions, except for SystemExit).
      -
      -        The return value is True in case 2, False in the other cases (unless
      -        an exception is raised).  The return value can be used to
      -        decide whether to use sys.ps1 or sys.ps2 to prompt the next
      -        line.
      -        """
      -        try:
      -            code = self.compile(source, filename, symbol)
      -        except (OverflowError, SyntaxError, ValueError):
      -            # Case 1
      -            self.showsyntaxerror(filename)
      -            return False
      -
      -        if code is None:
      -            # Case 2
      -            return True
      -
      -        # Case 3
      -        # Store code in self, so the execution thread can handle it
      -        self.ready.acquire()
      -        self.code_to_run = code
      -        self.ready.wait()  # Wait until processed in timeout interval
      -        self.ready.release()
      -
      -        return False
      -
      -    def runcode(self):
      -        """Execute a code object.
      -
      -        When an exception occurs, self.showtraceback() is called to display a
      -        traceback."""
      -
      -        self.ready.acquire()
      -        if self._kill:
      -            print('Closing threads...')
      -            sys.stdout.flush()
      -            for tokill in self.on_kill:
      -                tokill()
      -            print('Done.')
      -
      -        if self.code_to_run is not None:
      -            self.ready.notify()
      -            code.InteractiveConsole.runcode(self,self.code_to_run)
      -
      -        self.code_to_run = None
      -        self.ready.release()
      -        return True
      -
      -    def kill (self):
      -        """Kill the thread, returning when it has been shut down."""
      -        self.ready.acquire()
      -        self._kill = True
      -        self.ready.release()
      -
      -class GTKInterpreter(threading.Thread):
      -    """Run gtk.main in the main thread and a python interpreter in a
      -    separate thread.
      -    Python commands can be passed to the thread where they will be executed.
      -    This is implemented by periodically checking for passed code using a
      -    GTK timeout callback.
      -    """
      -    TIMEOUT = 100 # Millisecond interval between timeouts.
      -
      -    def __init__(self,banner=None):
      -        threading.Thread.__init__(self)
      -        self.banner = banner
      -        self.shell = MTConsole(on_kill=[gtk.main_quit])
      -
      -    def run(self):
      -        self.pre_interact()
      -        self.shell.interact(self.banner)
      -        self.shell.kill()
      -
      -    def mainloop(self):
      -        self.start()
      -        gobject.timeout_add(self.TIMEOUT, self.shell.runcode)
      -        try:
      -            if gtk.gtk_version[0] >= 2:
      -                gtk.gdk.threads_init()
      -        except AttributeError:
      -            pass
      -        gtk.main()
      -        self.join()
      -
      -    def pre_interact(self):
      -        """This method should be overridden by subclasses.
      -
      -        It gets called right before interact(), but after the thread starts.
      -        Typically used to push initialization code into the interpreter"""
      -
      -        pass
      -
      -class MatplotLibInterpreter(GTKInterpreter):
      -    """Threaded interpreter with matplotlib support.
      -
      -    Note that this explicitly sets GTKAgg as the backend, since it has
      -    specific GTK hooks in it."""
      -
      -    def __init__(self,banner=None):
      -        banner = """\nWelcome to matplotlib, a MATLAB-like python environment.
      -    help(matlab)   -> help on matlab compatible commands from matplotlib.
      -    help(plotting) -> help on plotting commands.
      -    """
      -        GTKInterpreter.__init__(self,banner)
      -
      -    def pre_interact(self):
      -        """Initialize matplotlib before user interaction begins"""
      -
      -        push = self.shell.push
      -        # Code to execute in user's namespace
      -        lines = ["import matplotlib",
      -                 "matplotlib.use('GTKAgg')",
      -                 "matplotlib.interactive(1)",
      -                 "import matplotlib.pylab as pylab",
      -                 "from matplotlib.pylab import *\n"]
      -
      -        map(push,lines)
      -
      -        # Execute file if given.
      -        if len(sys.argv)>1:
      -            import matplotlib
      -            matplotlib.interactive(0) # turn off interaction
      -            fname = sys.argv[1]
      -            try:
      -                inFile = file(fname, 'r')
      -            except IOError:
      -                print('*** ERROR *** Could not read file <%s>' % fname)
      -            else:
      -                print('*** Executing file <%s>:' % fname)
      -                for line in inFile:
      -                    if line.lstrip().find('show()')==0: continue
      -                    print('>>', line)
      -                    push(line)
      -                inFile.close()
      -            matplotlib.interactive(1)   # turn on interaction
      -
      -if __name__ == '__main__':
      -    print("This demo is not presently functional, so running")
      -    print("it as a script has been disabled.")
      -    sys.exit()
      -    # Quick sys.argv hack to extract the option and leave filenames in sys.argv.
      -    # For real option handling, use optparse or getopt.
      -    if len(sys.argv) > 1 and sys.argv[1]=='-pylab':
      -        sys.argv = [sys.argv[0]]+sys.argv[2:]
      -        MatplotLibInterpreter().mainloop()
      -    else:
      -        GTKInterpreter().mainloop()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/user_interfaces/interactive.py b/dev/examples/user_interfaces/interactive.py deleted file mode 100644 index c38a3c30ddb..00000000000 --- a/dev/examples/user_interfaces/interactive.py +++ /dev/null @@ -1,241 +0,0 @@ -#!/usr/bin/env python - -"""Multithreaded interactive interpreter with GTK and Matplotlib support. - -WARNING: -As of 2010/06/25, this is not working, at least on Linux. -I have disabled it as a runnable script. - EF - - -Usage: - - pyint-gtk.py -> starts shell with gtk thread running separately - - pyint-gtk.py -pylab [filename] -> initializes matplotlib, optionally running - the named file. The shell starts after the file is executed. - -Threading code taken from: -http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/65109, by Brian -McErlean and John Finlay. - -Matplotlib support taken from interactive.py in the matplotlib distribution. - -Also borrows liberally from code.py in the Python standard library.""" - -from __future__ import print_function - -__author__ = "Fernando Perez " - -import sys -import code -import threading - -import gobject -import gtk - -try: - import readline -except ImportError: - has_readline = False -else: - has_readline = True - -class MTConsole(code.InteractiveConsole): - """Simple multi-threaded shell""" - - def __init__(self,on_kill=None,*args,**kw): - code.InteractiveConsole.__init__(self,*args,**kw) - self.code_to_run = None - self.ready = threading.Condition() - self._kill = False - if on_kill is None: - on_kill = [] - # Check that all things to kill are callable: - for _ in on_kill: - if not callable(_): - raise TypeError,'on_kill must be a list of callables' - self.on_kill = on_kill - # Set up tab-completer - if has_readline: - import rlcompleter - try: # this form only works with python 2.3 - self.completer = rlcompleter.Completer(self.locals) - except: # simpler for py2.2 - self.completer = rlcompleter.Completer() - - readline.set_completer(self.completer.complete) - # Use tab for completions - readline.parse_and_bind('tab: complete') - # This forces readline to automatically print the above list when tab - # completion is set to 'complete'. - readline.parse_and_bind('set show-all-if-ambiguous on') - # Bindings for incremental searches in the history. These searches - # use the string typed so far on the command line and search - # anything in the previous input history containing them. - readline.parse_and_bind('"\C-r": reverse-search-history') - readline.parse_and_bind('"\C-s": forward-search-history') - - def runsource(self, source, filename="", symbol="single"): - """Compile and run some source in the interpreter. - - Arguments are as for compile_command(). - - One several things can happen: - - 1) The input is incorrect; compile_command() raised an - exception (SyntaxError or OverflowError). A syntax traceback - will be printed by calling the showsyntaxerror() method. - - 2) The input is incomplete, and more input is required; - compile_command() returned None. Nothing happens. - - 3) The input is complete; compile_command() returned a code - object. The code is executed by calling self.runcode() (which - also handles run-time exceptions, except for SystemExit). - - The return value is True in case 2, False in the other cases (unless - an exception is raised). The return value can be used to - decide whether to use sys.ps1 or sys.ps2 to prompt the next - line. - """ - try: - code = self.compile(source, filename, symbol) - except (OverflowError, SyntaxError, ValueError): - # Case 1 - self.showsyntaxerror(filename) - return False - - if code is None: - # Case 2 - return True - - # Case 3 - # Store code in self, so the execution thread can handle it - self.ready.acquire() - self.code_to_run = code - self.ready.wait() # Wait until processed in timeout interval - self.ready.release() - - return False - - def runcode(self): - """Execute a code object. - - When an exception occurs, self.showtraceback() is called to display a - traceback.""" - - self.ready.acquire() - if self._kill: - print('Closing threads...') - sys.stdout.flush() - for tokill in self.on_kill: - tokill() - print('Done.') - - if self.code_to_run is not None: - self.ready.notify() - code.InteractiveConsole.runcode(self,self.code_to_run) - - self.code_to_run = None - self.ready.release() - return True - - def kill (self): - """Kill the thread, returning when it has been shut down.""" - self.ready.acquire() - self._kill = True - self.ready.release() - -class GTKInterpreter(threading.Thread): - """Run gtk.main in the main thread and a python interpreter in a - separate thread. - Python commands can be passed to the thread where they will be executed. - This is implemented by periodically checking for passed code using a - GTK timeout callback. - """ - TIMEOUT = 100 # Millisecond interval between timeouts. - - def __init__(self,banner=None): - threading.Thread.__init__(self) - self.banner = banner - self.shell = MTConsole(on_kill=[gtk.main_quit]) - - def run(self): - self.pre_interact() - self.shell.interact(self.banner) - self.shell.kill() - - def mainloop(self): - self.start() - gobject.timeout_add(self.TIMEOUT, self.shell.runcode) - try: - if gtk.gtk_version[0] >= 2: - gtk.gdk.threads_init() - except AttributeError: - pass - gtk.main() - self.join() - - def pre_interact(self): - """This method should be overridden by subclasses. - - It gets called right before interact(), but after the thread starts. - Typically used to push initialization code into the interpreter""" - - pass - -class MatplotLibInterpreter(GTKInterpreter): - """Threaded interpreter with matplotlib support. - - Note that this explicitly sets GTKAgg as the backend, since it has - specific GTK hooks in it.""" - - def __init__(self,banner=None): - banner = """\nWelcome to matplotlib, a MATLAB-like python environment. - help(matlab) -> help on matlab compatible commands from matplotlib. - help(plotting) -> help on plotting commands. - """ - GTKInterpreter.__init__(self,banner) - - def pre_interact(self): - """Initialize matplotlib before user interaction begins""" - - push = self.shell.push - # Code to execute in user's namespace - lines = ["import matplotlib", - "matplotlib.use('GTKAgg')", - "matplotlib.interactive(1)", - "import matplotlib.pylab as pylab", - "from matplotlib.pylab import *\n"] - - map(push,lines) - - # Execute file if given. - if len(sys.argv)>1: - import matplotlib - matplotlib.interactive(0) # turn off interaction - fname = sys.argv[1] - try: - inFile = file(fname, 'r') - except IOError: - print('*** ERROR *** Could not read file <%s>' % fname) - else: - print('*** Executing file <%s>:' % fname) - for line in inFile: - if line.lstrip().find('show()')==0: continue - print('>>', line) - push(line) - inFile.close() - matplotlib.interactive(1) # turn on interaction - -if __name__ == '__main__': - print("This demo is not presently functional, so running") - print("it as a script has been disabled.") - sys.exit() - # Quick sys.argv hack to extract the option and leave filenames in sys.argv. - # For real option handling, use optparse or getopt. - if len(sys.argv) > 1 and sys.argv[1]=='-pylab': - sys.argv = [sys.argv[0]]+sys.argv[2:] - MatplotLibInterpreter().mainloop() - else: - GTKInterpreter().mainloop() diff --git a/dev/examples/user_interfaces/interactive2.html b/dev/examples/user_interfaces/interactive2.html deleted file mode 100644 index 3013bed361c..00000000000 --- a/dev/examples/user_interfaces/interactive2.html +++ /dev/null @@ -1,527 +0,0 @@ - - - - - - - - user_interfaces example code: interactive2.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      user_interfaces example code: interactive2.py

      -

      [source code]

      -
      #!/usr/bin/env python
      -
      -from __future__ import print_function
      -
      -#  GTK Interactive Console
      -#  (C) 2003, Jon Anderson
      -#  See www.python.org/2.2/license.html for
      -#  license details.
      -#
      -import gtk
      -import gtk.gdk
      -
      -import code
      -import os, sys
      -import pango
      -
      -import __builtin__
      -import __main__
      -
      -
      -banner = """GTK Interactive Python Console
      -Thanks to Jon Anderson
      -%s
      -""" % sys.version
      -
      -banner += """
      -
      -Welcome to matplotlib.
      -
      -    help(matplotlib) -- some general information about matplotlib
      -    help(plotting) -- shows a list of plot specific commands
      -
      -"""
      -class Completer:
      -  """
      -  Taken from rlcompleter, with readline references stripped, and a local dictionary to use.
      -  """
      -  def __init__(self, locals):
      -    self.locals = locals
      -
      -  def complete(self, text, state):
      -    """Return the next possible completion for 'text'.
      -    This is called successively with state == 0, 1, 2, ... until it
      -    returns None.  The completion should begin with 'text'.
      -
      -    """
      -    if state == 0:
      -      if "." in text:
      -        self.matches = self.attr_matches(text)
      -      else:
      -        self.matches = self.global_matches(text)
      -    try:
      -      return self.matches[state]
      -    except IndexError:
      -      return None
      -
      -  def global_matches(self, text):
      -    """Compute matches when text is a simple name.
      -
      -    Return a list of all keywords, built-in functions and names
      -    currently defines in __main__ that match.
      -
      -    """
      -    import keyword
      -    matches = []
      -    n = len(text)
      -    for list in [keyword.kwlist,__builtin__.__dict__.keys(),__main__.__dict__.keys(), self.locals.keys()]:
      -      for word in list:
      -        if word[:n] == text and word != "__builtins__":
      -          matches.append(word)
      -    return matches
      -
      -  def attr_matches(self, text):
      -    """Compute matches when text contains a dot.
      -
      -    Assuming the text is of the form NAME.NAME....[NAME], and is
      -    evaluatable in the globals of __main__, it will be evaluated
      -    and its attributes (as revealed by dir()) are used as possible
      -    completions.  (For class instances, class members are are also
      -    considered.)
      -
      -    WARNING: this can still invoke arbitrary C code, if an object
      -    with a __getattr__ hook is evaluated.
      -
      -    """
      -    import re
      -    m = re.match(r"(\w+(\.\w+)*)\.(\w*)", text)
      -    if not m:
      -      return
      -    expr, attr = m.group(1, 3)
      -    object = eval(expr, __main__.__dict__, self.locals)
      -    words = dir(object)
      -    if hasattr(object,'__class__'):
      -      words.append('__class__')
      -      words = words + get_class_members(object.__class__)
      -    matches = []
      -    n = len(attr)
      -    for word in words:
      -      if word[:n] == attr and word != "__builtins__":
      -        matches.append("%s.%s" % (expr, word))
      -    return matches
      -
      -def get_class_members(klass):
      -  ret = dir(klass)
      -  if hasattr(klass,'__bases__'):
      -     for base in klass.__bases__:
      -       ret = ret + get_class_members(base)
      -  return ret
      -
      -
      -
      -class OutputStream:
      -  """
      -  A Multiplexing output stream.
      -  It can replace another stream, and tee output to the original stream and too
      -  a GTK textview.
      -  """
      -  def __init__(self,view,old_out,style):
      -    self.view = view
      -    self.buffer = view.get_buffer()
      -    self.mark = self.buffer.create_mark("End",self.buffer.get_end_iter(), False )
      -    self.out = old_out
      -    self.style = style
      -    self.tee = 1
      -
      -  def write(self,text):
      -    if self.tee:
      -      self.out.write(text)
      -
      -    end = self.buffer.get_end_iter()
      -
      -    if not self.view  == None:
      -      self.view.scroll_to_mark(self.mark, 0, True, 1, 1)
      -
      -    self.buffer.insert_with_tags(end,text,self.style)
      -
      -class GTKInterpreterConsole(gtk.ScrolledWindow):
      -  """
      -  An InteractiveConsole for GTK. It's an actual widget,
      -  so it can be dropped in just about anywhere.
      -  """
      -  def __init__(self):
      -    gtk.ScrolledWindow.__init__(self)
      -    self.set_policy (gtk.POLICY_AUTOMATIC,gtk.POLICY_AUTOMATIC)
      -
      -    self.text = gtk.TextView()
      -    self.text.set_wrap_mode(True)
      -
      -    self.interpreter = code.InteractiveInterpreter()
      -
      -    self.completer = Completer(self.interpreter.locals)
      -    self.buffer = []
      -    self.history = []
      -    self.banner = banner
      -    self.ps1 = ">>> "
      -    self.ps2 = "... "
      -
      -    self.text.add_events( gtk.gdk.KEY_PRESS_MASK )
      -    self.text.connect( "key_press_event", self.key_pressed )
      -
      -    self.current_history = -1
      -
      -    self.mark = self.text.get_buffer().create_mark("End",self.text.get_buffer().get_end_iter(), False )
      -
      -            #setup colors
      -    self.style_banner = gtk.TextTag("banner")
      -    self.style_banner.set_property( "foreground", "saddle brown" )
      -
      -    self.style_ps1 = gtk.TextTag("ps1")
      -    self.style_ps1.set_property( "foreground", "DarkOrchid4" )
      -    self.style_ps1.set_property( "editable", False )
      -    self.style_ps1.set_property("font", "courier" )
      -
      -    self.style_ps2 = gtk.TextTag("ps2")
      -    self.style_ps2.set_property( "foreground", "DarkOliveGreen" )
      -    self.style_ps2.set_property( "editable", False  )
      -    self.style_ps2.set_property("font", "courier" )
      -
      -    self.style_out = gtk.TextTag("stdout")
      -    self.style_out.set_property( "foreground", "midnight blue" )
      -    self.style_err = gtk.TextTag("stderr")
      -    self.style_err.set_property( "style", pango.STYLE_ITALIC )
      -    self.style_err.set_property( "foreground", "red" )
      -
      -    self.text.get_buffer().get_tag_table().add(self.style_banner)
      -    self.text.get_buffer().get_tag_table().add(self.style_ps1)
      -    self.text.get_buffer().get_tag_table().add(self.style_ps2)
      -    self.text.get_buffer().get_tag_table().add(self.style_out)
      -    self.text.get_buffer().get_tag_table().add(self.style_err)
      -
      -    self.stdout = OutputStream(self.text,sys.stdout,self.style_out)
      -    self.stderr = OutputStream(self.text,sys.stderr,self.style_err)
      -
      -    sys.stderr = self.stderr
      -    sys.stdout = self.stdout
      -
      -    self.current_prompt = None
      -
      -    self.write_line(self.banner, self.style_banner)
      -    self.prompt_ps1()
      -
      -    self.add(self.text)
      -    self.text.show()
      -
      -
      -  def reset_history(self):
      -    self.history = []
      -
      -  def reset_buffer(self):
      -    self.buffer = []
      -
      -  def prompt_ps1(self):
      -    self.current_prompt = self.prompt_ps1
      -    self.write_line(self.ps1,self.style_ps1)
      -
      -  def prompt_ps2(self):
      -    self.current_prompt = self.prompt_ps2
      -    self.write_line(self.ps2,self.style_ps2)
      -
      -  def write_line(self,text,style=None):
      -    start,end = self.text.get_buffer().get_bounds()
      -    if style==None:
      -      self.text.get_buffer().insert(end,text)
      -    else:
      -      self.text.get_buffer().insert_with_tags(end,text,style)
      -
      -    self.text.scroll_to_mark(self.mark, 0, True, 1, 1)
      -
      -  def push(self, line):
      -
      -    self.buffer.append(line)
      -    if len(line) > 0:
      -      self.history.append(line)
      -
      -    source = "\n".join(self.buffer)
      -
      -    more = self.interpreter.runsource(source, "<<console>>")
      -
      -    if not more:
      -      self.reset_buffer()
      -
      -    return more
      -
      -  def key_pressed(self,widget,event):
      -    if event.keyval == gtk.gdk.keyval_from_name('Return'):
      -      return self.execute_line()
      -
      -    if event.keyval == gtk.gdk.keyval_from_name('Up'):
      -      self.current_history = self.current_history - 1
      -      if self.current_history < - len(self.history):
      -        self.current_history = - len(self.history)
      -      return self.show_history()
      -    elif event.keyval == gtk.gdk.keyval_from_name('Down'):
      -      self.current_history = self.current_history + 1
      -      if self.current_history > 0:
      -        self.current_history = 0
      -      return self.show_history()
      -    elif event.keyval == gtk.gdk.keyval_from_name( 'Home'):
      -      l = self.text.get_buffer().get_line_count() - 1
      -      start = self.text.get_buffer().get_iter_at_line_offset(l,4)
      -      self.text.get_buffer().place_cursor(start)
      -      return True
      -    elif event.keyval == gtk.gdk.keyval_from_name( 'space') and event.state & gtk.gdk.CONTROL_MASK:
      -      return self.complete_line()
      -    return False
      -
      -  def show_history(self):
      -    if self.current_history == 0:
      -      return True
      -    else:
      -      self.replace_line( self.history[self.current_history] )
      -      return True
      -
      -  def current_line(self):
      -    start,end = self.current_line_bounds()
      -    return self.text.get_buffer().get_text(start,end, True)
      -
      -  def current_line_bounds(self):
      -    txt_buffer = self.text.get_buffer()
      -    l = txt_buffer.get_line_count() - 1
      -
      -    start = txt_buffer.get_iter_at_line(l)
      -    if start.get_chars_in_line() >= 4:
      -      start.forward_chars(4)
      -    end = txt_buffer.get_end_iter()
      -    return start,end
      -
      -  def replace_line(self,txt):
      -    start,end = self.current_line_bounds()
      -    self.text.get_buffer().delete(start,end)
      -    self.write_line(txt)
      -
      -  def execute_line(self, line=None):
      -    if line is None:
      -      line = self.current_line()
      -      self.write_line("\n")
      -    else:
      -      self.write_line(line + "\n")
      -
      -
      -    more = self.push(line)
      -
      -    self.text.get_buffer().place_cursor(self.text.get_buffer().get_end_iter())
      -
      -    if more:
      -        self.prompt_ps2()
      -    else:
      -        self.prompt_ps1()
      -
      -
      -    self.current_history = 0
      -
      -    self.window.raise_()
      -
      -    return True
      -
      -  def complete_line(self):
      -    line = self.current_line()
      -    tokens = line.split()
      -    token = tokens[-1]
      -
      -    completions = []
      -    p = self.completer.complete(token,len(completions))
      -    while p != None:
      -      completions.append(p)
      -      p = self.completer.complete(token, len(completions))
      -
      -    if len(completions) != 1:
      -      self.write_line("\n")
      -      self.write_line("\n".join(completions), self.style_ps1)
      -      self.write_line("\n")
      -      self.current_prompt()
      -      self.write_line(line)
      -    else:
      -      i = line.rfind(token)
      -      line = line[0:i] + completions[0]
      -      self.replace_line(line)
      -
      -    return True
      -
      -
      -def main():
      -  w = gtk.Window()
      -  console = GTKInterpreterConsole()
      -  console.set_size_request(640,480)
      -  w.add(console)
      -
      -  def destroy(arg=None):
      -      gtk.main_quit()
      -
      -  def key_event(widget,event):
      -      if gtk.gdk.keyval_name( event.keyval) == 'd' and \
      -             event.state & gtk.gdk.CONTROL_MASK:
      -          destroy()
      -      return False
      -
      -  w.connect("destroy", destroy)
      -
      -  w.add_events( gtk.gdk.KEY_PRESS_MASK )
      -  w.connect( 'key_press_event', key_event)
      -  w.show_all()
      -
      -  console.execute_line('import matplotlib')
      -  console.execute_line("matplotlib.use('GTKAgg')")
      -  console.execute_line('matplotlib.interactive(1)')
      -  console.execute_line('from pylab import *')
      -
      -
      -  if len(sys.argv)>1:
      -    fname = sys.argv[1]
      -    if not os.path.exists(fname):
      -      print('%s does not exist' % fname)
      -    for line in file(fname):
      -      line = line.strip()
      -
      -      console.execute_line(line)
      -  gtk.main()
      -
      -if __name__ == '__main__':
      -  main()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/user_interfaces/interactive2.py b/dev/examples/user_interfaces/interactive2.py deleted file mode 100644 index 03c9c14801e..00000000000 --- a/dev/examples/user_interfaces/interactive2.py +++ /dev/null @@ -1,380 +0,0 @@ -#!/usr/bin/env python - -from __future__ import print_function - -# GTK Interactive Console -# (C) 2003, Jon Anderson -# See www.python.org/2.2/license.html for -# license details. -# -import gtk -import gtk.gdk - -import code -import os, sys -import pango - -import __builtin__ -import __main__ - - -banner = """GTK Interactive Python Console -Thanks to Jon Anderson -%s -""" % sys.version - -banner += """ - -Welcome to matplotlib. - - help(matplotlib) -- some general information about matplotlib - help(plotting) -- shows a list of plot specific commands - -""" -class Completer: - """ - Taken from rlcompleter, with readline references stripped, and a local dictionary to use. - """ - def __init__(self, locals): - self.locals = locals - - def complete(self, text, state): - """Return the next possible completion for 'text'. - This is called successively with state == 0, 1, 2, ... until it - returns None. The completion should begin with 'text'. - - """ - if state == 0: - if "." in text: - self.matches = self.attr_matches(text) - else: - self.matches = self.global_matches(text) - try: - return self.matches[state] - except IndexError: - return None - - def global_matches(self, text): - """Compute matches when text is a simple name. - - Return a list of all keywords, built-in functions and names - currently defines in __main__ that match. - - """ - import keyword - matches = [] - n = len(text) - for list in [keyword.kwlist,__builtin__.__dict__.keys(),__main__.__dict__.keys(), self.locals.keys()]: - for word in list: - if word[:n] == text and word != "__builtins__": - matches.append(word) - return matches - - def attr_matches(self, text): - """Compute matches when text contains a dot. - - Assuming the text is of the form NAME.NAME....[NAME], and is - evaluatable in the globals of __main__, it will be evaluated - and its attributes (as revealed by dir()) are used as possible - completions. (For class instances, class members are are also - considered.) - - WARNING: this can still invoke arbitrary C code, if an object - with a __getattr__ hook is evaluated. - - """ - import re - m = re.match(r"(\w+(\.\w+)*)\.(\w*)", text) - if not m: - return - expr, attr = m.group(1, 3) - object = eval(expr, __main__.__dict__, self.locals) - words = dir(object) - if hasattr(object,'__class__'): - words.append('__class__') - words = words + get_class_members(object.__class__) - matches = [] - n = len(attr) - for word in words: - if word[:n] == attr and word != "__builtins__": - matches.append("%s.%s" % (expr, word)) - return matches - -def get_class_members(klass): - ret = dir(klass) - if hasattr(klass,'__bases__'): - for base in klass.__bases__: - ret = ret + get_class_members(base) - return ret - - - -class OutputStream: - """ - A Multiplexing output stream. - It can replace another stream, and tee output to the original stream and too - a GTK textview. - """ - def __init__(self,view,old_out,style): - self.view = view - self.buffer = view.get_buffer() - self.mark = self.buffer.create_mark("End",self.buffer.get_end_iter(), False ) - self.out = old_out - self.style = style - self.tee = 1 - - def write(self,text): - if self.tee: - self.out.write(text) - - end = self.buffer.get_end_iter() - - if not self.view == None: - self.view.scroll_to_mark(self.mark, 0, True, 1, 1) - - self.buffer.insert_with_tags(end,text,self.style) - -class GTKInterpreterConsole(gtk.ScrolledWindow): - """ - An InteractiveConsole for GTK. It's an actual widget, - so it can be dropped in just about anywhere. - """ - def __init__(self): - gtk.ScrolledWindow.__init__(self) - self.set_policy (gtk.POLICY_AUTOMATIC,gtk.POLICY_AUTOMATIC) - - self.text = gtk.TextView() - self.text.set_wrap_mode(True) - - self.interpreter = code.InteractiveInterpreter() - - self.completer = Completer(self.interpreter.locals) - self.buffer = [] - self.history = [] - self.banner = banner - self.ps1 = ">>> " - self.ps2 = "... " - - self.text.add_events( gtk.gdk.KEY_PRESS_MASK ) - self.text.connect( "key_press_event", self.key_pressed ) - - self.current_history = -1 - - self.mark = self.text.get_buffer().create_mark("End",self.text.get_buffer().get_end_iter(), False ) - - #setup colors - self.style_banner = gtk.TextTag("banner") - self.style_banner.set_property( "foreground", "saddle brown" ) - - self.style_ps1 = gtk.TextTag("ps1") - self.style_ps1.set_property( "foreground", "DarkOrchid4" ) - self.style_ps1.set_property( "editable", False ) - self.style_ps1.set_property("font", "courier" ) - - self.style_ps2 = gtk.TextTag("ps2") - self.style_ps2.set_property( "foreground", "DarkOliveGreen" ) - self.style_ps2.set_property( "editable", False ) - self.style_ps2.set_property("font", "courier" ) - - self.style_out = gtk.TextTag("stdout") - self.style_out.set_property( "foreground", "midnight blue" ) - self.style_err = gtk.TextTag("stderr") - self.style_err.set_property( "style", pango.STYLE_ITALIC ) - self.style_err.set_property( "foreground", "red" ) - - self.text.get_buffer().get_tag_table().add(self.style_banner) - self.text.get_buffer().get_tag_table().add(self.style_ps1) - self.text.get_buffer().get_tag_table().add(self.style_ps2) - self.text.get_buffer().get_tag_table().add(self.style_out) - self.text.get_buffer().get_tag_table().add(self.style_err) - - self.stdout = OutputStream(self.text,sys.stdout,self.style_out) - self.stderr = OutputStream(self.text,sys.stderr,self.style_err) - - sys.stderr = self.stderr - sys.stdout = self.stdout - - self.current_prompt = None - - self.write_line(self.banner, self.style_banner) - self.prompt_ps1() - - self.add(self.text) - self.text.show() - - - def reset_history(self): - self.history = [] - - def reset_buffer(self): - self.buffer = [] - - def prompt_ps1(self): - self.current_prompt = self.prompt_ps1 - self.write_line(self.ps1,self.style_ps1) - - def prompt_ps2(self): - self.current_prompt = self.prompt_ps2 - self.write_line(self.ps2,self.style_ps2) - - def write_line(self,text,style=None): - start,end = self.text.get_buffer().get_bounds() - if style==None: - self.text.get_buffer().insert(end,text) - else: - self.text.get_buffer().insert_with_tags(end,text,style) - - self.text.scroll_to_mark(self.mark, 0, True, 1, 1) - - def push(self, line): - - self.buffer.append(line) - if len(line) > 0: - self.history.append(line) - - source = "\n".join(self.buffer) - - more = self.interpreter.runsource(source, "<>") - - if not more: - self.reset_buffer() - - return more - - def key_pressed(self,widget,event): - if event.keyval == gtk.gdk.keyval_from_name('Return'): - return self.execute_line() - - if event.keyval == gtk.gdk.keyval_from_name('Up'): - self.current_history = self.current_history - 1 - if self.current_history < - len(self.history): - self.current_history = - len(self.history) - return self.show_history() - elif event.keyval == gtk.gdk.keyval_from_name('Down'): - self.current_history = self.current_history + 1 - if self.current_history > 0: - self.current_history = 0 - return self.show_history() - elif event.keyval == gtk.gdk.keyval_from_name( 'Home'): - l = self.text.get_buffer().get_line_count() - 1 - start = self.text.get_buffer().get_iter_at_line_offset(l,4) - self.text.get_buffer().place_cursor(start) - return True - elif event.keyval == gtk.gdk.keyval_from_name( 'space') and event.state & gtk.gdk.CONTROL_MASK: - return self.complete_line() - return False - - def show_history(self): - if self.current_history == 0: - return True - else: - self.replace_line( self.history[self.current_history] ) - return True - - def current_line(self): - start,end = self.current_line_bounds() - return self.text.get_buffer().get_text(start,end, True) - - def current_line_bounds(self): - txt_buffer = self.text.get_buffer() - l = txt_buffer.get_line_count() - 1 - - start = txt_buffer.get_iter_at_line(l) - if start.get_chars_in_line() >= 4: - start.forward_chars(4) - end = txt_buffer.get_end_iter() - return start,end - - def replace_line(self,txt): - start,end = self.current_line_bounds() - self.text.get_buffer().delete(start,end) - self.write_line(txt) - - def execute_line(self, line=None): - if line is None: - line = self.current_line() - self.write_line("\n") - else: - self.write_line(line + "\n") - - - more = self.push(line) - - self.text.get_buffer().place_cursor(self.text.get_buffer().get_end_iter()) - - if more: - self.prompt_ps2() - else: - self.prompt_ps1() - - - self.current_history = 0 - - self.window.raise_() - - return True - - def complete_line(self): - line = self.current_line() - tokens = line.split() - token = tokens[-1] - - completions = [] - p = self.completer.complete(token,len(completions)) - while p != None: - completions.append(p) - p = self.completer.complete(token, len(completions)) - - if len(completions) != 1: - self.write_line("\n") - self.write_line("\n".join(completions), self.style_ps1) - self.write_line("\n") - self.current_prompt() - self.write_line(line) - else: - i = line.rfind(token) - line = line[0:i] + completions[0] - self.replace_line(line) - - return True - - -def main(): - w = gtk.Window() - console = GTKInterpreterConsole() - console.set_size_request(640,480) - w.add(console) - - def destroy(arg=None): - gtk.main_quit() - - def key_event(widget,event): - if gtk.gdk.keyval_name( event.keyval) == 'd' and \ - event.state & gtk.gdk.CONTROL_MASK: - destroy() - return False - - w.connect("destroy", destroy) - - w.add_events( gtk.gdk.KEY_PRESS_MASK ) - w.connect( 'key_press_event', key_event) - w.show_all() - - console.execute_line('import matplotlib') - console.execute_line("matplotlib.use('GTKAgg')") - console.execute_line('matplotlib.interactive(1)') - console.execute_line('from pylab import *') - - - if len(sys.argv)>1: - fname = sys.argv[1] - if not os.path.exists(fname): - print('%s does not exist' % fname) - for line in file(fname): - line = line.strip() - - console.execute_line(line) - gtk.main() - -if __name__ == '__main__': - main() diff --git a/dev/examples/user_interfaces/lineprops_dialog_gtk.html b/dev/examples/user_interfaces/lineprops_dialog_gtk.html deleted file mode 100644 index 819628315e4..00000000000 --- a/dev/examples/user_interfaces/lineprops_dialog_gtk.html +++ /dev/null @@ -1,171 +0,0 @@ - - - - - - - - user_interfaces example code: lineprops_dialog_gtk.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      user_interfaces example code: lineprops_dialog_gtk.py

      -

      [source code]

      -
      import matplotlib
      -matplotlib.use('GTKAgg')
      -from matplotlib.backends.backend_gtk import DialogLineprops
      -
      -import numpy as np
      -import matplotlib.pyplot as plt
      -
      -def f(t):
      -    s1 = np.cos(2*np.pi*t)
      -    e1 = np.exp(-t)
      -    return np.multiply(s1,e1)
      -
      -t1 = np.arange(0.0, 5.0, 0.1)
      -t2 = np.arange(0.0, 5.0, 0.02)
      -t3 = np.arange(0.0, 2.0, 0.01)
      -
      -fig = plt.figure()
      -ax = fig.add_subplot(111)
      -l1,  = ax.plot(t1, f(t1), 'bo', label='line 1')
      -l2,  = ax.plot(t2, f(t2), 'k--', label='line 2')
      -
      -dlg = DialogLineprops([l1,l2])
      -dlg.show()
      -plt.show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/user_interfaces/lineprops_dialog_gtk.py b/dev/examples/user_interfaces/lineprops_dialog_gtk.py deleted file mode 100644 index f7c86b47c5d..00000000000 --- a/dev/examples/user_interfaces/lineprops_dialog_gtk.py +++ /dev/null @@ -1,25 +0,0 @@ -import matplotlib -matplotlib.use('GTKAgg') -from matplotlib.backends.backend_gtk import DialogLineprops - -import numpy as np -import matplotlib.pyplot as plt - -def f(t): - s1 = np.cos(2*np.pi*t) - e1 = np.exp(-t) - return np.multiply(s1,e1) - -t1 = np.arange(0.0, 5.0, 0.1) -t2 = np.arange(0.0, 5.0, 0.02) -t3 = np.arange(0.0, 2.0, 0.01) - -fig = plt.figure() -ax = fig.add_subplot(111) -l1, = ax.plot(t1, f(t1), 'bo', label='line 1') -l2, = ax.plot(t2, f(t2), 'k--', label='line 2') - -dlg = DialogLineprops([l1,l2]) -dlg.show() -plt.show() - diff --git a/dev/examples/user_interfaces/mathtext_wx.html b/dev/examples/user_interfaces/mathtext_wx.html deleted file mode 100644 index d6b8c7af0d1..00000000000 --- a/dev/examples/user_interfaces/mathtext_wx.html +++ /dev/null @@ -1,270 +0,0 @@ - - - - - - - - user_interfaces example code: mathtext_wx.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      user_interfaces example code: mathtext_wx.py

      -

      [source code]

      -
      """
      -Demonstrates how to convert mathtext to a wx.Bitmap for display in various
      -controls on wxPython.
      -"""
      -
      -import matplotlib
      -matplotlib.use("WxAgg")
      -from numpy import arange, sin, pi, cos, log
      -from matplotlib.backends.backend_wxagg import FigureCanvasWxAgg as FigureCanvas
      -from matplotlib.backends.backend_wx import NavigationToolbar2Wx
      -from matplotlib.figure import Figure
      -
      -import wx
      -
      -IS_GTK = 'wxGTK' in wx.PlatformInfo
      -IS_WIN = 'wxMSW' in wx.PlatformInfo
      -IS_MAC = 'wxMac' in wx.PlatformInfo
      -
      -############################################################
      -# This is where the "magic" happens.
      -from matplotlib.mathtext import MathTextParser
      -mathtext_parser = MathTextParser("Bitmap")
      -def mathtext_to_wxbitmap(s):
      -    ftimage, depth = mathtext_parser.parse(s, 150)
      -    return wx.BitmapFromBufferRGBA(
      -        ftimage.get_width(), ftimage.get_height(),
      -        ftimage.as_rgba_str())
      -############################################################
      -
      -functions = [
      -    (r'$\sin(2 \pi x)$'      , lambda x: sin(2*pi*x)),
      -    (r'$\frac{4}{3}\pi x^3$' , lambda x: (4.0 / 3.0) * pi * x**3),
      -    (r'$\cos(2 \pi x)$'      , lambda x: cos(2*pi*x)),
      -    (r'$\log(x)$'            , lambda x: log(x))
      -]
      -
      -class CanvasFrame(wx.Frame):
      -    def __init__(self, parent, title):
      -        wx.Frame.__init__(self, parent, -1, title, size=(550, 350))
      -        self.SetBackgroundColour(wx.NamedColour("WHITE"))
      -
      -        self.figure = Figure()
      -        self.axes = self.figure.add_subplot(111)
      -        self.change_plot(0)
      -
      -        self.canvas = FigureCanvas(self, -1, self.figure)
      -
      -        self.sizer = wx.BoxSizer(wx.VERTICAL)
      -        self.add_buttonbar()
      -        self.sizer.Add(self.canvas, 1, wx.LEFT | wx.TOP | wx.GROW)
      -        self.add_toolbar()  # comment this out for no toolbar
      -
      -        menuBar = wx.MenuBar()
      -
      -        # File Menu
      -        menu = wx.Menu()
      -        menu.Append(wx.ID_EXIT, "E&xit\tAlt-X", "Exit this simple sample")
      -        menuBar.Append(menu, "&File")
      -
      -        if IS_GTK or IS_WIN:
      -            # Equation Menu
      -            menu = wx.Menu()
      -            for i, (mt, func) in enumerate(functions):
      -                bm = mathtext_to_wxbitmap(mt)
      -                item = wx.MenuItem(menu, 1000 + i, "")
      -                item.SetBitmap(bm)
      -                menu.AppendItem(item)
      -                self.Bind(wx.EVT_MENU, self.OnChangePlot, item)
      -            menuBar.Append(menu, "&Functions")
      -
      -        self.SetMenuBar(menuBar)
      -
      -        self.SetSizer(self.sizer)
      -        self.Fit()
      -
      -    def add_buttonbar(self):
      -        self.button_bar = wx.Panel(self)
      -        self.button_bar_sizer = wx.BoxSizer(wx.HORIZONTAL)
      -        self.sizer.Add(self.button_bar, 0, wx.LEFT | wx.TOP | wx.GROW)
      -
      -        for i, (mt, func) in enumerate(functions):
      -            bm = mathtext_to_wxbitmap(mt)
      -            button = wx.BitmapButton(self.button_bar, 1000 + i, bm)
      -            self.button_bar_sizer.Add(button, 1, wx.GROW)
      -            self.Bind(wx.EVT_BUTTON, self.OnChangePlot, button)
      -
      -        self.button_bar.SetSizer(self.button_bar_sizer)
      -
      -    def add_toolbar(self):
      -        """Copied verbatim from embedding_wx2.py"""
      -        self.toolbar = NavigationToolbar2Wx(self.canvas)
      -        self.toolbar.Realize()
      -        if IS_MAC:
      -            self.SetToolBar(self.toolbar)
      -        else:
      -            tw, th = self.toolbar.GetSizeTuple()
      -            fw, fh = self.canvas.GetSizeTuple()
      -            self.toolbar.SetSize(wx.Size(fw, th))
      -            self.sizer.Add(self.toolbar, 0, wx.LEFT | wx.EXPAND)
      -        self.toolbar.update()
      -
      -    def OnPaint(self, event):
      -        self.canvas.draw()
      -
      -    def OnChangePlot(self, event):
      -        self.change_plot(event.GetId() - 1000)
      -
      -    def change_plot(self, plot_number):
      -        t = arange(1.0,3.0,0.01)
      -        s = functions[plot_number][1](t)
      -        self.axes.clear()
      -        self.axes.plot(t, s)
      -        self.Refresh()
      -
      -class MyApp(wx.App):
      -    def OnInit(self):
      -        frame = CanvasFrame(None, "wxPython mathtext demo app")
      -        self.SetTopWindow(frame)
      -        frame.Show(True)
      -        return True
      -
      -app = MyApp()
      -app.MainLoop()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/user_interfaces/mathtext_wx.py b/dev/examples/user_interfaces/mathtext_wx.py deleted file mode 100644 index 84e0f98c1b9..00000000000 --- a/dev/examples/user_interfaces/mathtext_wx.py +++ /dev/null @@ -1,124 +0,0 @@ -""" -Demonstrates how to convert mathtext to a wx.Bitmap for display in various -controls on wxPython. -""" - -import matplotlib -matplotlib.use("WxAgg") -from numpy import arange, sin, pi, cos, log -from matplotlib.backends.backend_wxagg import FigureCanvasWxAgg as FigureCanvas -from matplotlib.backends.backend_wx import NavigationToolbar2Wx -from matplotlib.figure import Figure - -import wx - -IS_GTK = 'wxGTK' in wx.PlatformInfo -IS_WIN = 'wxMSW' in wx.PlatformInfo -IS_MAC = 'wxMac' in wx.PlatformInfo - -############################################################ -# This is where the "magic" happens. -from matplotlib.mathtext import MathTextParser -mathtext_parser = MathTextParser("Bitmap") -def mathtext_to_wxbitmap(s): - ftimage, depth = mathtext_parser.parse(s, 150) - return wx.BitmapFromBufferRGBA( - ftimage.get_width(), ftimage.get_height(), - ftimage.as_rgba_str()) -############################################################ - -functions = [ - (r'$\sin(2 \pi x)$' , lambda x: sin(2*pi*x)), - (r'$\frac{4}{3}\pi x^3$' , lambda x: (4.0 / 3.0) * pi * x**3), - (r'$\cos(2 \pi x)$' , lambda x: cos(2*pi*x)), - (r'$\log(x)$' , lambda x: log(x)) -] - -class CanvasFrame(wx.Frame): - def __init__(self, parent, title): - wx.Frame.__init__(self, parent, -1, title, size=(550, 350)) - self.SetBackgroundColour(wx.NamedColour("WHITE")) - - self.figure = Figure() - self.axes = self.figure.add_subplot(111) - self.change_plot(0) - - self.canvas = FigureCanvas(self, -1, self.figure) - - self.sizer = wx.BoxSizer(wx.VERTICAL) - self.add_buttonbar() - self.sizer.Add(self.canvas, 1, wx.LEFT | wx.TOP | wx.GROW) - self.add_toolbar() # comment this out for no toolbar - - menuBar = wx.MenuBar() - - # File Menu - menu = wx.Menu() - menu.Append(wx.ID_EXIT, "E&xit\tAlt-X", "Exit this simple sample") - menuBar.Append(menu, "&File") - - if IS_GTK or IS_WIN: - # Equation Menu - menu = wx.Menu() - for i, (mt, func) in enumerate(functions): - bm = mathtext_to_wxbitmap(mt) - item = wx.MenuItem(menu, 1000 + i, "") - item.SetBitmap(bm) - menu.AppendItem(item) - self.Bind(wx.EVT_MENU, self.OnChangePlot, item) - menuBar.Append(menu, "&Functions") - - self.SetMenuBar(menuBar) - - self.SetSizer(self.sizer) - self.Fit() - - def add_buttonbar(self): - self.button_bar = wx.Panel(self) - self.button_bar_sizer = wx.BoxSizer(wx.HORIZONTAL) - self.sizer.Add(self.button_bar, 0, wx.LEFT | wx.TOP | wx.GROW) - - for i, (mt, func) in enumerate(functions): - bm = mathtext_to_wxbitmap(mt) - button = wx.BitmapButton(self.button_bar, 1000 + i, bm) - self.button_bar_sizer.Add(button, 1, wx.GROW) - self.Bind(wx.EVT_BUTTON, self.OnChangePlot, button) - - self.button_bar.SetSizer(self.button_bar_sizer) - - def add_toolbar(self): - """Copied verbatim from embedding_wx2.py""" - self.toolbar = NavigationToolbar2Wx(self.canvas) - self.toolbar.Realize() - if IS_MAC: - self.SetToolBar(self.toolbar) - else: - tw, th = self.toolbar.GetSizeTuple() - fw, fh = self.canvas.GetSizeTuple() - self.toolbar.SetSize(wx.Size(fw, th)) - self.sizer.Add(self.toolbar, 0, wx.LEFT | wx.EXPAND) - self.toolbar.update() - - def OnPaint(self, event): - self.canvas.draw() - - def OnChangePlot(self, event): - self.change_plot(event.GetId() - 1000) - - def change_plot(self, plot_number): - t = arange(1.0,3.0,0.01) - s = functions[plot_number][1](t) - self.axes.clear() - self.axes.plot(t, s) - self.Refresh() - -class MyApp(wx.App): - def OnInit(self): - frame = CanvasFrame(None, "wxPython mathtext demo app") - self.SetTopWindow(frame) - frame.Show(True) - return True - -app = MyApp() -app.MainLoop() - diff --git a/dev/examples/user_interfaces/mpl_with_glade.html b/dev/examples/user_interfaces/mpl_with_glade.html deleted file mode 100644 index e6d91aa3f0b..00000000000 --- a/dev/examples/user_interfaces/mpl_with_glade.html +++ /dev/null @@ -1,254 +0,0 @@ - - - - - - - - user_interfaces example code: mpl_with_glade.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      user_interfaces example code: mpl_with_glade.py

      -

      [source code]

      -
      #!/usr/bin/env python
      -
      -from __future__ import print_function
      -import matplotlib
      -matplotlib.use('GTK')
      -
      -from matplotlib.figure import Figure
      -from matplotlib.axes import Subplot
      -from matplotlib.backends.backend_gtkagg import FigureCanvasGTKAgg as FigureCanvas
      -from matplotlib.backends.backend_gtkagg import NavigationToolbar2GTKAgg as NavigationToolbar
      -from matplotlib.widgets import SpanSelector
      -
      -from numpy import arange, sin, pi
      -import gtk
      -import gtk.glade
      -
      -
      -def simple_msg(msg, parent=None, title=None):
      -    dialog = gtk.MessageDialog(
      -        parent         = None,
      -        type           = gtk.MESSAGE_INFO,
      -        buttons        = gtk.BUTTONS_OK,
      -        message_format = msg)
      -    if parent is not None:
      -        dialog.set_transient_for(parent)
      -    if title is not None:
      -        dialog.set_title(title)
      -    dialog.show()
      -    dialog.run()
      -    dialog.destroy()
      -    return None
      -
      -
      -
      -class GladeHandlers:
      -    def on_buttonClickMe_clicked(event):
      -        simple_msg('Nothing to say, really',
      -                   parent=widgets['windowMain'],
      -                   title='Thanks!')
      -
      -class WidgetsWrapper:
      -    def __init__(self):
      -        self.widgets = gtk.glade.XML('mpl_with_glade.glade')
      -        self.widgets.signal_autoconnect(GladeHandlers.__dict__)
      -
      -        self['windowMain'].connect('destroy', lambda x: gtk.main_quit())
      -        self['windowMain'].move(10,10)
      -        self.figure = Figure(figsize=(8,6), dpi=72)
      -        self.axis = self.figure.add_subplot(111)
      -
      -        t = arange(0.0,3.0,0.01)
      -        s = sin(2*pi*t)
      -        self.axis.plot(t,s)
      -        self.axis.set_xlabel('time (s)')
      -        self.axis.set_ylabel('voltage')
      -
      -        self.canvas = FigureCanvas(self.figure) # a gtk.DrawingArea
      -        self.canvas.show()
      -        self.canvas.set_size_request(600, 400)
      -        self.canvas.set_events(
      -            gtk.gdk.BUTTON_PRESS_MASK      |
      -            gtk.gdk.KEY_PRESS_MASK      |
      -            gtk.gdk.KEY_RELEASE_MASK
      -            )
      -        self.canvas.set_flags(gtk.HAS_FOCUS|gtk.CAN_FOCUS)
      -        self.canvas.grab_focus()
      -
      -        def keypress(widget, event):
      -            print('key press')
      -        def buttonpress(widget, event):
      -            print('button press')
      -
      -        self.canvas.connect('key_press_event', keypress)
      -        self.canvas.connect('button_press_event', buttonpress)
      -
      -        def onselect(xmin, xmax):
      -            print(xmin, xmax)
      -
      -        span = SpanSelector(self.axis, onselect, 'horizontal', useblit=False,
      -                            rectprops=dict(alpha=0.5, facecolor='red') )
      -
      -
      -        self['vboxMain'].pack_start(self.canvas, True, True)
      -        self['vboxMain'].show()
      -
      -        # below is optional if you want the navigation toolbar
      -        self.navToolbar = NavigationToolbar(self.canvas, self['windowMain'])
      -        self.navToolbar.lastDir = '/var/tmp/'
      -        self['vboxMain'].pack_start(self.navToolbar)
      -        self.navToolbar.show()
      -
      -        sep = gtk.HSeparator()
      -        sep.show()
      -        self['vboxMain'].pack_start(sep, True, True)
      -
      -
      -        self['vboxMain'].reorder_child(self['buttonClickMe'],-1)
      -
      -
      -
      -
      -
      -    def __getitem__(self, key):
      -        return self.widgets.get_widget(key)
      -
      -widgets = WidgetsWrapper()
      -gtk.main()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/user_interfaces/mpl_with_glade.py b/dev/examples/user_interfaces/mpl_with_glade.py deleted file mode 100644 index 87c9ef85214..00000000000 --- a/dev/examples/user_interfaces/mpl_with_glade.py +++ /dev/null @@ -1,107 +0,0 @@ -#!/usr/bin/env python - -from __future__ import print_function -import matplotlib -matplotlib.use('GTK') - -from matplotlib.figure import Figure -from matplotlib.axes import Subplot -from matplotlib.backends.backend_gtkagg import FigureCanvasGTKAgg as FigureCanvas -from matplotlib.backends.backend_gtkagg import NavigationToolbar2GTKAgg as NavigationToolbar -from matplotlib.widgets import SpanSelector - -from numpy import arange, sin, pi -import gtk -import gtk.glade - - -def simple_msg(msg, parent=None, title=None): - dialog = gtk.MessageDialog( - parent = None, - type = gtk.MESSAGE_INFO, - buttons = gtk.BUTTONS_OK, - message_format = msg) - if parent is not None: - dialog.set_transient_for(parent) - if title is not None: - dialog.set_title(title) - dialog.show() - dialog.run() - dialog.destroy() - return None - - - -class GladeHandlers: - def on_buttonClickMe_clicked(event): - simple_msg('Nothing to say, really', - parent=widgets['windowMain'], - title='Thanks!') - -class WidgetsWrapper: - def __init__(self): - self.widgets = gtk.glade.XML('mpl_with_glade.glade') - self.widgets.signal_autoconnect(GladeHandlers.__dict__) - - self['windowMain'].connect('destroy', lambda x: gtk.main_quit()) - self['windowMain'].move(10,10) - self.figure = Figure(figsize=(8,6), dpi=72) - self.axis = self.figure.add_subplot(111) - - t = arange(0.0,3.0,0.01) - s = sin(2*pi*t) - self.axis.plot(t,s) - self.axis.set_xlabel('time (s)') - self.axis.set_ylabel('voltage') - - self.canvas = FigureCanvas(self.figure) # a gtk.DrawingArea - self.canvas.show() - self.canvas.set_size_request(600, 400) - self.canvas.set_events( - gtk.gdk.BUTTON_PRESS_MASK | - gtk.gdk.KEY_PRESS_MASK | - gtk.gdk.KEY_RELEASE_MASK - ) - self.canvas.set_flags(gtk.HAS_FOCUS|gtk.CAN_FOCUS) - self.canvas.grab_focus() - - def keypress(widget, event): - print('key press') - def buttonpress(widget, event): - print('button press') - - self.canvas.connect('key_press_event', keypress) - self.canvas.connect('button_press_event', buttonpress) - - def onselect(xmin, xmax): - print(xmin, xmax) - - span = SpanSelector(self.axis, onselect, 'horizontal', useblit=False, - rectprops=dict(alpha=0.5, facecolor='red') ) - - - self['vboxMain'].pack_start(self.canvas, True, True) - self['vboxMain'].show() - - # below is optional if you want the navigation toolbar - self.navToolbar = NavigationToolbar(self.canvas, self['windowMain']) - self.navToolbar.lastDir = '/var/tmp/' - self['vboxMain'].pack_start(self.navToolbar) - self.navToolbar.show() - - sep = gtk.HSeparator() - sep.show() - self['vboxMain'].pack_start(sep, True, True) - - - self['vboxMain'].reorder_child(self['buttonClickMe'],-1) - - - - - - def __getitem__(self, key): - return self.widgets.get_widget(key) - -widgets = WidgetsWrapper() -gtk.main() diff --git a/dev/examples/user_interfaces/printing_in_wx.html b/dev/examples/user_interfaces/printing_in_wx.html deleted file mode 100644 index e31c13578ec..00000000000 --- a/dev/examples/user_interfaces/printing_in_wx.html +++ /dev/null @@ -1,341 +0,0 @@ - - - - - - - - - - user_interfaces example code: printing_in_wx.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      user_interfaces example code: printing_in_wx.py

      -

      [source code]

      -
      #!/usr/bin/env python
      -# printing_in_wx.py
      -#
      -
      -from __future__ import print_function
      -"""
      -This examples demonstrates Printing (ie, to a printer) with a
      -matplotlib figure using a wx Frame.  This borrows the data from
      -embedding_in_wx.py, but with several changes:
      -  Menus for
      -     Save           export figure (png,eps,bmp) to file
      -     Copy           copy bitmap of figure to the system clipboard
      -     Print Setup    setup size of figure for printing
      -     Print Preview  preview printer page
      -     Print          send figure to a system printer
      -     Exit           end application
      -
      -     where 'figure' means an image of the matplotlib canvas
      -
      -  In addition, "Ctrl-C" is bound to Copy-figure-to-clipboard
      -
      -
      -This is a very simple use of matplotlib, and mostly focused on
      -demonstrating the interaction between wxPython and the matplotlib
      -figure canvas.
      -
      -Matt Newville <newville@cars.uchicago.edu>
      -last modified: 12-Nov-2004
      -license:  use it any way you want
      -"""
      -
      -import wx
      -import os
      -import matplotlib
      -
      -# either WX or WXAgg can be used here.
      -# matplotlib.use('WX')
      -# from matplotlib.backends.backend_wxagg import FigureCanvasWx as FigCanvas
      -
      -matplotlib.use('WXAgg')
      -from matplotlib.backends.backend_wxagg import FigureCanvasWxAgg as FigCanvas
      -
      -from matplotlib.figure import Figure
      -import  numpy
      -
      -class PlotFrame(wx.Frame):
      -    help_msg="""  Menus for
      -     Save           export figure (png,eps,bmp) to file
      -     Copy           copy bitmap of figure to the system clipboard
      -     Print Setup    setup size of figure for printing
      -     Print Preview  preview printer page
      -     Print          send figure to a system printer
      -     Exit           end application
      -
      -     where 'figure' means an image of the matplotlib canvas
      -
      -  In addition, "Ctrl-C" is bound to copy-figure-to-clipboard
      -"""
      -
      -    start_msg  = """        Use Menus to test printing
      -        or Ctrl-C to copy plot image to clipboard  """
      -
      -    about_msg =  """        printing_in_wx version 0.1  12-Nov-2004
      -        Matt Newville <newville@cars.uchicago.edu>"""
      -
      -    def __init__(self):
      -        wx.Frame.__init__(self, None, -1, "Test Printing with WX Backend")
      -        self.fig   = Figure((5.0,3.0), 100)
      -        self.canvas= FigCanvas(self, -1, self.fig)
      -        self.axes  = self.fig.add_axes([0.15,0.15,0.75,0.75])
      -
      -
      -        sizer = wx.BoxSizer(wx.VERTICAL)
      -        sizer.Add(self.canvas, 1, wx.LEFT|wx.TOP|wx.GROW)
      -        sizer.Add(wx.StaticText(self,-1, self.start_msg), 0,
      -                  wx.ALIGN_LEFT|wx.TOP)
      -
      -        self.canvas.Bind(wx.EVT_KEY_DOWN, self.onKeyEvent)
      -
      -        self.SetSizer(sizer)
      -        self.Fit()
      -        self.Build_Menus()
      -        self.Plot_Data()
      -
      -    def Build_Menus(self):
      -        """ build menus """
      -        MENU_EXIT  = wx.NewId()
      -        MENU_SAVE  = wx.NewId()
      -        MENU_PRINT = wx.NewId()
      -        MENU_PSETUP= wx.NewId()
      -        MENU_PREVIEW=wx.NewId()
      -        MENU_CLIPB  =wx.NewId()
      -        MENU_HELP   =wx.NewId()
      -
      -        menuBar = wx.MenuBar()
      -
      -        f0 = wx.Menu()
      -        f0.Append(MENU_SAVE,   "&Export",   "Save Image of Plot")
      -        f0.AppendSeparator()
      -        f0.Append(MENU_PSETUP, "Page Setup...",    "Printer Setup")
      -        f0.Append(MENU_PREVIEW,"Print Preview...", "Print Preview")
      -        f0.Append(MENU_PRINT,  "&Print",           "Print Plot")
      -        f0.AppendSeparator()
      -        f0.Append(MENU_EXIT,   "E&xit", "Exit")
      -        menuBar.Append(f0,     "&File");
      -
      -        f1 = wx.Menu()
      -        f1.Append(MENU_HELP, "Quick Reference",  "Quick Reference")
      -
      -        menuBar.Append(f1, "&Help");
      -
      -        self.SetMenuBar(menuBar)
      -
      -        self.Bind(wx.EVT_MENU, self.onPrint,        id=MENU_PRINT)
      -        self.Bind(wx.EVT_MENU, self.onPrinterSetup, id=MENU_PSETUP)
      -        self.Bind(wx.EVT_MENU, self.onPrinterPreview, id=MENU_PREVIEW)
      -        self.Bind(wx.EVT_MENU, self.onClipboard,    id=MENU_CLIPB)
      -        self.Bind(wx.EVT_MENU, self.onExport,       id=MENU_SAVE)
      -        self.Bind(wx.EVT_MENU, self.onExit ,        id=MENU_EXIT)
      -        self.Bind(wx.EVT_MENU, self.onHelp,         id=MENU_HELP)
      -
      -    # the printer / clipboard methods are implemented
      -    # in backend_wx, and so are very simple to use.
      -    def onPrinterSetup(self,event=None):
      -        self.canvas.Printer_Setup(event=event)
      -
      -    def onPrinterPreview(self,event=None):
      -        self.canvas.Printer_Preview(event=event)
      -
      -    def onPrint(self,event=None):
      -        self.canvas.Printer_Print(event=event)
      -
      -    def onClipboard(self,event=None):
      -        self.canvas.Copy_to_Clipboard(event=event)
      -
      -
      -    def onKeyEvent(self,event=None):
      -        """ capture , act upon keystroke events"""
      -        if event == None: return
      -        key = event.KeyCode()
      -        if (key < wx.WXK_SPACE or  key > 255):  return
      -
      -        if (event.ControlDown() and chr(key)=='C'): # Ctrl-C
      -            self.onClipboard(event=event)
      -
      -    def onHelp(self, event=None):
      -        dlg = wx.MessageDialog(self, self.help_msg,
      -                               "Quick Reference",
      -                               wx.OK | wx.ICON_INFORMATION)
      -        dlg.ShowModal()
      -        dlg.Destroy()
      -
      -    def onExport(self,event=None):
      -        """ save figure image to file"""
      -        file_choices = "PNG (*.png)|*.png|" \
      -                       "PS (*.ps)|*.ps|" \
      -                       "EPS (*.eps)|*.eps|" \
      -                       "BMP (*.bmp)|*.bmp"
      -
      -        thisdir  = os.getcwd()
      -
      -        dlg = wx.FileDialog(self, message='Save Plot Figure as...',
      -                            defaultDir = thisdir, defaultFile='plot.png',
      -                            wildcard=file_choices, style=wx.SAVE)
      -
      -        if dlg.ShowModal() == wx.ID_OK:
      -            path = dlg.GetPath()
      -            self.canvas.print_figure(path,dpi=300)
      -            if (path.find(thisdir) ==  0):
      -                path = path[len(thisdir)+1:]
      -            print('Saved plot to %s' % path)
      -
      -    def onExit(self,event=None):
      -        self.Destroy()
      -
      -    def Plot_Data(self):
      -        t = numpy.arange(0.0,5.0,0.01)
      -        s = numpy.sin(2.0*numpy.pi*t)
      -        c = numpy.cos(0.4*numpy.pi*t)
      -        self.axes.plot(t,s)
      -        self.axes.plot(t,c)
      -
      -
      -if __name__ == '__main__':
      -    app = wx.PySimpleApp()
      -    fig = PlotFrame()
      -    fig.Show(True)
      -    app.MainLoop()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/user_interfaces/printing_in_wx.py b/dev/examples/user_interfaces/printing_in_wx.py deleted file mode 100644 index 9348462dfaa..00000000000 --- a/dev/examples/user_interfaces/printing_in_wx.py +++ /dev/null @@ -1,188 +0,0 @@ -#!/usr/bin/env python -# printing_in_wx.py -# - -from __future__ import print_function -""" -This examples demonstrates Printing (ie, to a printer) with a -matplotlib figure using a wx Frame. This borrows the data from -embedding_in_wx.py, but with several changes: - Menus for - Save export figure (png,eps,bmp) to file - Copy copy bitmap of figure to the system clipboard - Print Setup setup size of figure for printing - Print Preview preview printer page - Print send figure to a system printer - Exit end application - - where 'figure' means an image of the matplotlib canvas - - In addition, "Ctrl-C" is bound to Copy-figure-to-clipboard - - -This is a very simple use of matplotlib, and mostly focused on -demonstrating the interaction between wxPython and the matplotlib -figure canvas. - -Matt Newville -last modified: 12-Nov-2004 -license: use it any way you want -""" - -import wx -import os -import matplotlib - -# either WX or WXAgg can be used here. -# matplotlib.use('WX') -# from matplotlib.backends.backend_wxagg import FigureCanvasWx as FigCanvas - -matplotlib.use('WXAgg') -from matplotlib.backends.backend_wxagg import FigureCanvasWxAgg as FigCanvas - -from matplotlib.figure import Figure -import numpy - -class PlotFrame(wx.Frame): - help_msg=""" Menus for - Save export figure (png,eps,bmp) to file - Copy copy bitmap of figure to the system clipboard - Print Setup setup size of figure for printing - Print Preview preview printer page - Print send figure to a system printer - Exit end application - - where 'figure' means an image of the matplotlib canvas - - In addition, "Ctrl-C" is bound to copy-figure-to-clipboard -""" - - start_msg = """ Use Menus to test printing - or Ctrl-C to copy plot image to clipboard """ - - about_msg = """ printing_in_wx version 0.1 12-Nov-2004 - Matt Newville """ - - def __init__(self): - wx.Frame.__init__(self, None, -1, "Test Printing with WX Backend") - self.fig = Figure((5.0,3.0), 100) - self.canvas= FigCanvas(self, -1, self.fig) - self.axes = self.fig.add_axes([0.15,0.15,0.75,0.75]) - - - sizer = wx.BoxSizer(wx.VERTICAL) - sizer.Add(self.canvas, 1, wx.LEFT|wx.TOP|wx.GROW) - sizer.Add(wx.StaticText(self,-1, self.start_msg), 0, - wx.ALIGN_LEFT|wx.TOP) - - self.canvas.Bind(wx.EVT_KEY_DOWN, self.onKeyEvent) - - self.SetSizer(sizer) - self.Fit() - self.Build_Menus() - self.Plot_Data() - - def Build_Menus(self): - """ build menus """ - MENU_EXIT = wx.NewId() - MENU_SAVE = wx.NewId() - MENU_PRINT = wx.NewId() - MENU_PSETUP= wx.NewId() - MENU_PREVIEW=wx.NewId() - MENU_CLIPB =wx.NewId() - MENU_HELP =wx.NewId() - - menuBar = wx.MenuBar() - - f0 = wx.Menu() - f0.Append(MENU_SAVE, "&Export", "Save Image of Plot") - f0.AppendSeparator() - f0.Append(MENU_PSETUP, "Page Setup...", "Printer Setup") - f0.Append(MENU_PREVIEW,"Print Preview...", "Print Preview") - f0.Append(MENU_PRINT, "&Print", "Print Plot") - f0.AppendSeparator() - f0.Append(MENU_EXIT, "E&xit", "Exit") - menuBar.Append(f0, "&File"); - - f1 = wx.Menu() - f1.Append(MENU_HELP, "Quick Reference", "Quick Reference") - - menuBar.Append(f1, "&Help"); - - self.SetMenuBar(menuBar) - - self.Bind(wx.EVT_MENU, self.onPrint, id=MENU_PRINT) - self.Bind(wx.EVT_MENU, self.onPrinterSetup, id=MENU_PSETUP) - self.Bind(wx.EVT_MENU, self.onPrinterPreview, id=MENU_PREVIEW) - self.Bind(wx.EVT_MENU, self.onClipboard, id=MENU_CLIPB) - self.Bind(wx.EVT_MENU, self.onExport, id=MENU_SAVE) - self.Bind(wx.EVT_MENU, self.onExit , id=MENU_EXIT) - self.Bind(wx.EVT_MENU, self.onHelp, id=MENU_HELP) - - # the printer / clipboard methods are implemented - # in backend_wx, and so are very simple to use. - def onPrinterSetup(self,event=None): - self.canvas.Printer_Setup(event=event) - - def onPrinterPreview(self,event=None): - self.canvas.Printer_Preview(event=event) - - def onPrint(self,event=None): - self.canvas.Printer_Print(event=event) - - def onClipboard(self,event=None): - self.canvas.Copy_to_Clipboard(event=event) - - - def onKeyEvent(self,event=None): - """ capture , act upon keystroke events""" - if event == None: return - key = event.KeyCode() - if (key < wx.WXK_SPACE or key > 255): return - - if (event.ControlDown() and chr(key)=='C'): # Ctrl-C - self.onClipboard(event=event) - - def onHelp(self, event=None): - dlg = wx.MessageDialog(self, self.help_msg, - "Quick Reference", - wx.OK | wx.ICON_INFORMATION) - dlg.ShowModal() - dlg.Destroy() - - def onExport(self,event=None): - """ save figure image to file""" - file_choices = "PNG (*.png)|*.png|" \ - "PS (*.ps)|*.ps|" \ - "EPS (*.eps)|*.eps|" \ - "BMP (*.bmp)|*.bmp" - - thisdir = os.getcwd() - - dlg = wx.FileDialog(self, message='Save Plot Figure as...', - defaultDir = thisdir, defaultFile='plot.png', - wildcard=file_choices, style=wx.SAVE) - - if dlg.ShowModal() == wx.ID_OK: - path = dlg.GetPath() - self.canvas.print_figure(path,dpi=300) - if (path.find(thisdir) == 0): - path = path[len(thisdir)+1:] - print('Saved plot to %s' % path) - - def onExit(self,event=None): - self.Destroy() - - def Plot_Data(self): - t = numpy.arange(0.0,5.0,0.01) - s = numpy.sin(2.0*numpy.pi*t) - c = numpy.cos(0.4*numpy.pi*t) - self.axes.plot(t,s) - self.axes.plot(t,c) - - -if __name__ == '__main__': - app = wx.PySimpleApp() - fig = PlotFrame() - fig.Show(True) - app.MainLoop() diff --git a/dev/examples/user_interfaces/pylab_with_gtk.html b/dev/examples/user_interfaces/pylab_with_gtk.html deleted file mode 100644 index d2b03820c7f..00000000000 --- a/dev/examples/user_interfaces/pylab_with_gtk.html +++ /dev/null @@ -1,203 +0,0 @@ - - - - - - - - user_interfaces example code: pylab_with_gtk.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      user_interfaces example code: pylab_with_gtk.py

      -

      [source code]

      -
      """
      -An example of how to use pylab to manage your figure windows, but
      -modify the GUI by accessing the underlying gtk widgets
      -"""
      -from __future__ import print_function
      -import matplotlib
      -matplotlib.use('GTKAgg')
      -import matplotlib.pyplot as plt
      -
      -
      -ax = plt.subplot(111)
      -plt.plot([1,2,3], 'ro-', label='easy as 1 2 3')
      -plt.plot([1,4,9], 'gs--', label='easy as 1 2 3 squared')
      -plt.legend()
      -
      -
      -manager = plt.get_current_fig_manager()
      -# you can also access the window or vbox attributes this way
      -toolbar = manager.toolbar
      -
      -# now let's add a button to the toolbar
      -import gtk
      -next = 8; #where to insert this in the mpl toolbar
      -button = gtk.Button('Click me')
      -button.show()
      -
      -def clicked(button):
      -    print('hi mom')
      -button.connect('clicked', clicked)
      -
      -toolitem = gtk.ToolItem()
      -toolitem.show()
      -toolitem.set_tooltip(
      -    toolbar.tooltips,
      -    'Click me for fun and profit')
      -
      -toolitem.add(button)
      -toolbar.insert(toolitem, next); next +=1
      -
      -# now let's add a widget to the vbox
      -label = gtk.Label()
      -label.set_markup('Drag mouse over axes for position')
      -label.show()
      -vbox = manager.vbox
      -vbox.pack_start(label, False, False)
      -vbox.reorder_child(manager.toolbar, -1)
      -
      -def update(event):
      -    if event.xdata is None:
      -        label.set_markup('Drag mouse over axes for position')
      -    else:
      -        label.set_markup('<span color="#ef0000">x,y=(%f, %f)</span>'%(event.xdata, event.ydata))
      -
      -plt.connect('motion_notify_event', update)
      -
      -plt.show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/user_interfaces/pylab_with_gtk.py b/dev/examples/user_interfaces/pylab_with_gtk.py deleted file mode 100644 index 4aca382ffe3..00000000000 --- a/dev/examples/user_interfaces/pylab_with_gtk.py +++ /dev/null @@ -1,56 +0,0 @@ -""" -An example of how to use pylab to manage your figure windows, but -modify the GUI by accessing the underlying gtk widgets -""" -from __future__ import print_function -import matplotlib -matplotlib.use('GTKAgg') -import matplotlib.pyplot as plt - - -ax = plt.subplot(111) -plt.plot([1,2,3], 'ro-', label='easy as 1 2 3') -plt.plot([1,4,9], 'gs--', label='easy as 1 2 3 squared') -plt.legend() - - -manager = plt.get_current_fig_manager() -# you can also access the window or vbox attributes this way -toolbar = manager.toolbar - -# now let's add a button to the toolbar -import gtk -next = 8; #where to insert this in the mpl toolbar -button = gtk.Button('Click me') -button.show() - -def clicked(button): - print('hi mom') -button.connect('clicked', clicked) - -toolitem = gtk.ToolItem() -toolitem.show() -toolitem.set_tooltip( - toolbar.tooltips, - 'Click me for fun and profit') - -toolitem.add(button) -toolbar.insert(toolitem, next); next +=1 - -# now let's add a widget to the vbox -label = gtk.Label() -label.set_markup('Drag mouse over axes for position') -label.show() -vbox = manager.vbox -vbox.pack_start(label, False, False) -vbox.reorder_child(manager.toolbar, -1) - -def update(event): - if event.xdata is None: - label.set_markup('Drag mouse over axes for position') - else: - label.set_markup('x,y=(%f, %f)'%(event.xdata, event.ydata)) - -plt.connect('motion_notify_event', update) - -plt.show() diff --git a/dev/examples/user_interfaces/rec_edit_gtk_custom.html b/dev/examples/user_interfaces/rec_edit_gtk_custom.html deleted file mode 100644 index bd3ebe96b40..00000000000 --- a/dev/examples/user_interfaces/rec_edit_gtk_custom.html +++ /dev/null @@ -1,188 +0,0 @@ - - - - - - - - user_interfaces example code: rec_edit_gtk_custom.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      user_interfaces example code: rec_edit_gtk_custom.py

      -

      [source code]

      -
      """
      -generate an editable gtk treeview widget for record arrays with custom
      -formatting of the cells and show how to limit string entries to a list
      -of strings
      -"""
      -from __future__ import print_function
      -import gtk
      -import numpy as np
      -import matplotlib.mlab as mlab
      -import matplotlib.cbook as cbook
      -import mpl_toolkits.gtktools as gtktools
      -
      -
      -datafile = cbook.get_sample_data('demodata.csv', asfileobj=False)
      -r = mlab.csv2rec(datafile, converterd={'weekdays':str})
      -
      -
      -formatd = mlab.get_formatd(r)
      -formatd['date'] = mlab.FormatDate('%Y-%m-%d')
      -formatd['prices'] = mlab.FormatMillions(precision=1)
      -formatd['gain'] = mlab.FormatPercent(precision=2)
      -
      -# use a drop down combo for weekdays
      -stringd = dict(weekdays=['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'])
      -constant = ['clientid']   # block editing of this field
      -
      -
      -liststore = gtktools.RecListStore(r, formatd=formatd, stringd=stringd)
      -treeview = gtktools.RecTreeView(liststore, constant=constant)
      -
      -def mycallback(liststore, rownum, colname, oldval, newval):
      -    print('verify: old=%s, new=%s, rec=%s'%(oldval, newval, liststore.r[rownum][colname]))
      -
      -liststore.callbacks.connect('cell_changed', mycallback)
      -
      -win = gtk.Window()
      -win.set_title('click to edit')
      -win.add(treeview)
      -win.show_all()
      -win.connect('delete-event', lambda *args: gtk.main_quit())
      -gtk.main()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/user_interfaces/rec_edit_gtk_custom.py b/dev/examples/user_interfaces/rec_edit_gtk_custom.py deleted file mode 100644 index d1ec6833839..00000000000 --- a/dev/examples/user_interfaces/rec_edit_gtk_custom.py +++ /dev/null @@ -1,41 +0,0 @@ -""" -generate an editable gtk treeview widget for record arrays with custom -formatting of the cells and show how to limit string entries to a list -of strings -""" -from __future__ import print_function -import gtk -import numpy as np -import matplotlib.mlab as mlab -import matplotlib.cbook as cbook -import mpl_toolkits.gtktools as gtktools - - -datafile = cbook.get_sample_data('demodata.csv', asfileobj=False) -r = mlab.csv2rec(datafile, converterd={'weekdays':str}) - - -formatd = mlab.get_formatd(r) -formatd['date'] = mlab.FormatDate('%Y-%m-%d') -formatd['prices'] = mlab.FormatMillions(precision=1) -formatd['gain'] = mlab.FormatPercent(precision=2) - -# use a drop down combo for weekdays -stringd = dict(weekdays=['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat']) -constant = ['clientid'] # block editing of this field - - -liststore = gtktools.RecListStore(r, formatd=formatd, stringd=stringd) -treeview = gtktools.RecTreeView(liststore, constant=constant) - -def mycallback(liststore, rownum, colname, oldval, newval): - print('verify: old=%s, new=%s, rec=%s'%(oldval, newval, liststore.r[rownum][colname])) - -liststore.callbacks.connect('cell_changed', mycallback) - -win = gtk.Window() -win.set_title('click to edit') -win.add(treeview) -win.show_all() -win.connect('delete-event', lambda *args: gtk.main_quit()) -gtk.main() diff --git a/dev/examples/user_interfaces/rec_edit_gtk_simple.html b/dev/examples/user_interfaces/rec_edit_gtk_simple.html deleted file mode 100644 index e86ded6d2d2..00000000000 --- a/dev/examples/user_interfaces/rec_edit_gtk_simple.html +++ /dev/null @@ -1,164 +0,0 @@ - - - - - - - - user_interfaces example code: rec_edit_gtk_simple.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      user_interfaces example code: rec_edit_gtk_simple.py

      -

      [source code]

      -
      """
      -Load a CSV file into a record array and edit it in a gtk treeview
      -"""
      -
      -import gtk
      -import numpy as np
      -import matplotlib.mlab as mlab
      -import matplotlib.cbook as cbook
      -import mpl_toolkits.gtktools as gtktools
      -
      -datafile = cbook.get_sample_data('demodata.csv', asfileobj=False)
      -r = mlab.csv2rec(datafile, converterd={'weekdays':str})
      -
      -liststore, treeview, win = gtktools.edit_recarray(r)
      -win.set_title('click to edit')
      -win.connect('delete-event', lambda *args: gtk.main_quit())
      -gtk.main()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/user_interfaces/rec_edit_gtk_simple.py b/dev/examples/user_interfaces/rec_edit_gtk_simple.py deleted file mode 100644 index 61986429a6f..00000000000 --- a/dev/examples/user_interfaces/rec_edit_gtk_simple.py +++ /dev/null @@ -1,17 +0,0 @@ -""" -Load a CSV file into a record array and edit it in a gtk treeview -""" - -import gtk -import numpy as np -import matplotlib.mlab as mlab -import matplotlib.cbook as cbook -import mpl_toolkits.gtktools as gtktools - -datafile = cbook.get_sample_data('demodata.csv', asfileobj=False) -r = mlab.csv2rec(datafile, converterd={'weekdays':str}) - -liststore, treeview, win = gtktools.edit_recarray(r) -win.set_title('click to edit') -win.connect('delete-event', lambda *args: gtk.main_quit()) -gtk.main() diff --git a/dev/examples/user_interfaces/svg_histogram.html b/dev/examples/user_interfaces/svg_histogram.html deleted file mode 100644 index 1004d2a2501..00000000000 --- a/dev/examples/user_interfaces/svg_histogram.html +++ /dev/null @@ -1,303 +0,0 @@ - - - - - - - - user_interfaces example code: svg_histogram.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      user_interfaces example code: svg_histogram.py

      -

      [source code]

      -
      #!/usr/bin/env python
      -#-*- encoding:utf-8 -*-
      -
      -"""
      -Demonstrate how to create an interactive histogram, in which bars
      -are hidden or shown by cliking on legend markers.
      -
      -The interactivity is encoded in ecmascript (javascript) and inserted in
      -the SVG code in a post-processing step. To render the image, open it in
      -a web browser. SVG is supported in most web browsers used by Linux and
      -OSX users. Windows IE9 supports SVG, but earlier versions do not.
      -
      -Notes
      ------
      -The matplotlib backend lets us assign ids to each object. This is the
      -mechanism used here to relate matplotlib objects created in python and
      -the corresponding SVG constructs that are parsed in the second step.
      -While flexible, ids are cumbersome to use for large collection of
      -objects. Two mechanisms could be used to simplify things:
      - * systematic grouping of objects into SVG <g> tags,
      - * assingning classes to each SVG object according to its origin.
      -
      -For example, instead of modifying the properties of each individual bar,
      -the bars from the `hist` function could either be grouped in
      -a PatchCollection, or be assigned a class="hist_##" attribute.
      -
      -CSS could also be used more extensively to replace repetitive markup
      -troughout the generated SVG.
      -
      -__author__="david.huard@gmail.com"
      -
      -"""
      -
      -
      -import numpy as np
      -import matplotlib.pyplot as plt
      -import xml.etree.ElementTree as ET
      -from StringIO import StringIO
      -import json
      -
      -plt.rcParams['svg.embed_char_paths'] = 'none'
      -
      -# Apparently, this `register_namespace` method works only with
      -# python 2.7 and up and is necessary to avoid garbling the XML name
      -# space with ns0.
      -ET.register_namespace("","http://www.w3.org/2000/svg")
      -
      -
      -
      -
      -# --- Create histogram, legend and title ---
      -plt.figure()
      -r = np.random.randn(100)
      -r1 = r + 1
      -labels = ['Rabbits', 'Frogs']
      -H = plt.hist([r,r1], label=labels)
      -containers = H[-1]
      -leg = plt.legend(frameon=False)
      -plt.title("""From a web browser, click on the legend
      -marker to toggle the corresponding histogram.""")
      -
      -
      -# --- Add ids to the svg objects we'll modify
      -
      -hist_patches = {}
      -for ic, c in enumerate(containers):
      -    hist_patches['hist_%d'%ic] = []
      -    for il, element in enumerate(c):
      -        element.set_gid('hist_%d_patch_%d'%(ic, il))
      -        hist_patches['hist_%d'%ic].append('hist_%d_patch_%d'%(ic,il))
      -
      -# Set ids for the legend patches
      -for i, t in enumerate(leg.get_patches()):
      -    t.set_gid('leg_patch_%d'%i)
      -
      -# Set ids for the text patches
      -for i, t in enumerate(leg.get_texts()):
      -    t.set_gid('leg_text_%d'%i)
      -
      -# Save SVG in a fake file object.
      -f = StringIO()
      -plt.savefig(f, format="svg")
      -
      -# Create XML tree from the SVG file.
      -tree, xmlid = ET.XMLID(f.getvalue())
      -
      -
      -# --- Add interactivity ---
      -
      -# Add attributes to the patch objects.
      -for i, t in enumerate(leg.get_patches()):
      -    el = xmlid['leg_patch_%d'%i]
      -    el.set('cursor', 'pointer')
      -    el.set('onclick', "toggle_hist(this)")
      -
      -# Add attributes to the text objects.
      -for i, t in enumerate(leg.get_texts()):
      -    el = xmlid['leg_text_%d'%i]
      -    el.set('cursor', 'pointer')
      -    el.set('onclick', "toggle_hist(this)")
      -
      -# Create script defining the function `toggle_hist`.
      -# We create a global variable `container` that stores the patches id
      -# belonging to each histogram. Then a function "toggle_element" sets the
      -# visibility attribute of all patches of each histogram and the opacity
      -# of the marker itself.
      -
      -script = """
      -<script type="text/ecmascript">
      -<![CDATA[
      -var container = %s
      -
      -function toggle(oid, attribute, values) {
      -    /* Toggle the style attribute of an object between two values.
      -
      -    Parameters
      -    ----------
      -    oid : str
      -      Object identifier.
      -    attribute : str
      -      Name of syle attribute.
      -    values : [on state, off state]
      -      The two values that are switched between.
      -    */
      -    var obj = document.getElementById(oid);
      -    var a = obj.style[attribute];
      -
      -    a = (a == values[0] || a == "") ? values[1] : values[0];
      -    obj.style[attribute] = a;
      -    }
      -
      -function toggle_hist(obj) {
      -
      -    var num = obj.id.slice(-1);
      -
      -    toggle('leg_patch_' + num, 'opacity', [1, 0.3]);
      -    toggle('leg_text_' + num, 'opacity', [1, 0.5]);
      -
      -    var names = container['hist_'+num]
      -
      -    for (var i=0; i < names.length; i++) {
      -        toggle(names[i], 'opacity', [1,0])
      -    };
      -    }
      -]]>
      -</script>
      -"""%json.dumps(hist_patches)
      -
      -# Add a transition effect
      -css = tree.getchildren()[0][0]
      -css.text = css.text + "g {-webkit-transition:opacity 0.4s ease-out;-moz-transition:opacity 0.4s ease-out;}"
      -
      -# Insert the script and save to file.
      -tree.insert(0, ET.XML(script))
      -
      -ET.ElementTree(tree).write("svg_histogram.svg")
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/user_interfaces/svg_histogram.py b/dev/examples/user_interfaces/svg_histogram.py deleted file mode 100644 index d1097353a97..00000000000 --- a/dev/examples/user_interfaces/svg_histogram.py +++ /dev/null @@ -1,159 +0,0 @@ -#!/usr/bin/env python -#-*- encoding:utf-8 -*- - -""" -Demonstrate how to create an interactive histogram, in which bars -are hidden or shown by cliking on legend markers. - -The interactivity is encoded in ecmascript (javascript) and inserted in -the SVG code in a post-processing step. To render the image, open it in -a web browser. SVG is supported in most web browsers used by Linux and -OSX users. Windows IE9 supports SVG, but earlier versions do not. - -Notes ------ -The matplotlib backend lets us assign ids to each object. This is the -mechanism used here to relate matplotlib objects created in python and -the corresponding SVG constructs that are parsed in the second step. -While flexible, ids are cumbersome to use for large collection of -objects. Two mechanisms could be used to simplify things: - * systematic grouping of objects into SVG tags, - * assingning classes to each SVG object according to its origin. - -For example, instead of modifying the properties of each individual bar, -the bars from the `hist` function could either be grouped in -a PatchCollection, or be assigned a class="hist_##" attribute. - -CSS could also be used more extensively to replace repetitive markup -troughout the generated SVG. - -__author__="david.huard@gmail.com" - -""" - - -import numpy as np -import matplotlib.pyplot as plt -import xml.etree.ElementTree as ET -from StringIO import StringIO -import json - -plt.rcParams['svg.embed_char_paths'] = 'none' - -# Apparently, this `register_namespace` method works only with -# python 2.7 and up and is necessary to avoid garbling the XML name -# space with ns0. -ET.register_namespace("","http://www.w3.org/2000/svg") - - - - -# --- Create histogram, legend and title --- -plt.figure() -r = np.random.randn(100) -r1 = r + 1 -labels = ['Rabbits', 'Frogs'] -H = plt.hist([r,r1], label=labels) -containers = H[-1] -leg = plt.legend(frameon=False) -plt.title("""From a web browser, click on the legend -marker to toggle the corresponding histogram.""") - - -# --- Add ids to the svg objects we'll modify - -hist_patches = {} -for ic, c in enumerate(containers): - hist_patches['hist_%d'%ic] = [] - for il, element in enumerate(c): - element.set_gid('hist_%d_patch_%d'%(ic, il)) - hist_patches['hist_%d'%ic].append('hist_%d_patch_%d'%(ic,il)) - -# Set ids for the legend patches -for i, t in enumerate(leg.get_patches()): - t.set_gid('leg_patch_%d'%i) - -# Set ids for the text patches -for i, t in enumerate(leg.get_texts()): - t.set_gid('leg_text_%d'%i) - -# Save SVG in a fake file object. -f = StringIO() -plt.savefig(f, format="svg") - -# Create XML tree from the SVG file. -tree, xmlid = ET.XMLID(f.getvalue()) - - -# --- Add interactivity --- - -# Add attributes to the patch objects. -for i, t in enumerate(leg.get_patches()): - el = xmlid['leg_patch_%d'%i] - el.set('cursor', 'pointer') - el.set('onclick', "toggle_hist(this)") - -# Add attributes to the text objects. -for i, t in enumerate(leg.get_texts()): - el = xmlid['leg_text_%d'%i] - el.set('cursor', 'pointer') - el.set('onclick', "toggle_hist(this)") - -# Create script defining the function `toggle_hist`. -# We create a global variable `container` that stores the patches id -# belonging to each histogram. Then a function "toggle_element" sets the -# visibility attribute of all patches of each histogram and the opacity -# of the marker itself. - -script = """ - -"""%json.dumps(hist_patches) - -# Add a transition effect -css = tree.getchildren()[0][0] -css.text = css.text + "g {-webkit-transition:opacity 0.4s ease-out;-moz-transition:opacity 0.4s ease-out;}" - -# Insert the script and save to file. -tree.insert(0, ET.XML(script)) - -ET.ElementTree(tree).write("svg_histogram.svg") - - - diff --git a/dev/examples/user_interfaces/svg_tooltip.html b/dev/examples/user_interfaces/svg_tooltip.html deleted file mode 100644 index c90f8e818e5..00000000000 --- a/dev/examples/user_interfaces/svg_tooltip.html +++ /dev/null @@ -1,272 +0,0 @@ - - - - - - - - user_interfaces example code: svg_tooltip.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      user_interfaces example code: svg_tooltip.py

      -

      [source code]

      -
      """
      -SVG tooltip example
      -===================
      -
      -This example shows how to create a tooltip that will show up when
      -hovering over a matplotlib patch.
      -
      -Although it is possible to create the tooltip from CSS or javascript,
      -here we create it in matplotlib and simply toggle its visibility on
      -when hovering over the patch. This approach provides total control over
      -the tooltip placement and appearance, at the expense of more code up
      -front.
      -
      -The alternative approach would be to put the tooltip content in `title`
      -atttributes of SVG objects. Then, using an existing js/CSS library, it
      -would be relatively straightforward to create the tooltip in the
      -browser. The content would be dictated by the `title` attribute, and
      -the appearance by the CSS.
      -
      -
      -:author: David Huard
      -"""
      -
      -
      -import matplotlib.pyplot as plt
      -import xml.etree.ElementTree as ET
      -from StringIO import StringIO
      -
      -ET.register_namespace("","http://www.w3.org/2000/svg")
      -
      -fig = plt.figure()
      -ax = fig.add_subplot(111)
      -
      -# Create patches to which tooltips will be assigned.
      -circle = plt.Circle((0,0), 5, fc='blue')
      -rect = plt.Rectangle((-5, 10), 10, 5, fc='green')
      -
      -ax.add_patch(circle)
      -ax.add_patch(rect)
      -
      -# Create the tooltips
      -circle_tip = ax.annotate('This is a blue circle.',
      -            xy=(0,0),
      -            xytext=(30,-30),
      -            textcoords='offset points',
      -            color='w',
      -            ha='left',
      -            bbox=dict(boxstyle='round,pad=.5', fc=(.1,.1,.1,.92), ec=(1.,1.,1.), lw=1, zorder=1),
      -            )
      -
      -rect_tip = ax.annotate('This is a green rectangle.',
      -            xy=(-5,10),
      -            xytext=(30,40),
      -            textcoords='offset points',
      -            color='w',
      -            ha='left',
      -            bbox=dict(boxstyle='round,pad=.5', fc=(.1,.1,.1,.92), ec=(1.,1.,1.), lw=1, zorder=1),
      -            )
      -
      -
      -# Set id for the patches
      -for i, t in enumerate(ax.patches):
      -    t.set_gid('patch_%d'%i)
      -
      -# Set id for the annotations
      -for i, t in enumerate(ax.texts):
      -    t.set_gid('tooltip_%d'%i)
      -
      -
      -# Save the figure in a fake file object
      -ax.set_xlim(-30, 30)
      -ax.set_ylim(-30, 30)
      -ax.set_aspect('equal')
      -
      -f = StringIO()
      -plt.savefig(f, format="svg")
      -
      -# --- Add interactivity ---
      -
      -# Create XML tree from the SVG file.
      -tree, xmlid = ET.XMLID(f.getvalue())
      -tree.set('onload', 'init(evt)')
      -
      -# Hide the tooltips
      -for i, t in enumerate(ax.texts):
      -    el = xmlid['tooltip_%d'%i]
      -    el.set('visibility', 'hidden')
      -
      -# Assign onmouseover and onmouseout callbacks to patches.
      -for i, t in enumerate(ax.patches):
      -    el = xmlid['patch_%d'%i]
      -    el.set('onmouseover', "ShowTooltip(this)")
      -    el.set('onmouseout', "HideTooltip(this)")
      -
      -# This is the script defining the ShowTooltip and HideTooltip functions.
      -script = """
      -    <script type="text/ecmascript">
      -    <![CDATA[
      -
      -    function init(evt) {
      -        if ( window.svgDocument == null ) {
      -            svgDocument = evt.target.ownerDocument;
      -            }
      -        }
      -
      -    function ShowTooltip(obj) {
      -        var cur = obj.id.slice(-1);
      -
      -        var tip = svgDocument.getElementById('tooltip_' + cur);
      -        tip.setAttribute('visibility',"visible")
      -        }
      -
      -    function HideTooltip(obj) {
      -        var cur = obj.id.slice(-1);
      -        var tip = svgDocument.getElementById('tooltip_' + cur);
      -        tip.setAttribute('visibility',"hidden")
      -        }
      -
      -    ]]>
      -    </script>
      -    """
      -
      -# Insert the script at the top of the file and save it.
      -tree.insert(0, ET.XML(script))
      -ET.ElementTree(tree).write('svg_tooltip.svg')
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/user_interfaces/svg_tooltip.py b/dev/examples/user_interfaces/svg_tooltip.py deleted file mode 100644 index 15a435c1fe7..00000000000 --- a/dev/examples/user_interfaces/svg_tooltip.py +++ /dev/null @@ -1,125 +0,0 @@ -""" -SVG tooltip example -=================== - -This example shows how to create a tooltip that will show up when -hovering over a matplotlib patch. - -Although it is possible to create the tooltip from CSS or javascript, -here we create it in matplotlib and simply toggle its visibility on -when hovering over the patch. This approach provides total control over -the tooltip placement and appearance, at the expense of more code up -front. - -The alternative approach would be to put the tooltip content in `title` -atttributes of SVG objects. Then, using an existing js/CSS library, it -would be relatively straightforward to create the tooltip in the -browser. The content would be dictated by the `title` attribute, and -the appearance by the CSS. - - -:author: David Huard -""" - - -import matplotlib.pyplot as plt -import xml.etree.ElementTree as ET -from StringIO import StringIO - -ET.register_namespace("","http://www.w3.org/2000/svg") - -fig = plt.figure() -ax = fig.add_subplot(111) - -# Create patches to which tooltips will be assigned. -circle = plt.Circle((0,0), 5, fc='blue') -rect = plt.Rectangle((-5, 10), 10, 5, fc='green') - -ax.add_patch(circle) -ax.add_patch(rect) - -# Create the tooltips -circle_tip = ax.annotate('This is a blue circle.', - xy=(0,0), - xytext=(30,-30), - textcoords='offset points', - color='w', - ha='left', - bbox=dict(boxstyle='round,pad=.5', fc=(.1,.1,.1,.92), ec=(1.,1.,1.), lw=1, zorder=1), - ) - -rect_tip = ax.annotate('This is a green rectangle.', - xy=(-5,10), - xytext=(30,40), - textcoords='offset points', - color='w', - ha='left', - bbox=dict(boxstyle='round,pad=.5', fc=(.1,.1,.1,.92), ec=(1.,1.,1.), lw=1, zorder=1), - ) - - -# Set id for the patches -for i, t in enumerate(ax.patches): - t.set_gid('patch_%d'%i) - -# Set id for the annotations -for i, t in enumerate(ax.texts): - t.set_gid('tooltip_%d'%i) - - -# Save the figure in a fake file object -ax.set_xlim(-30, 30) -ax.set_ylim(-30, 30) -ax.set_aspect('equal') - -f = StringIO() -plt.savefig(f, format="svg") - -# --- Add interactivity --- - -# Create XML tree from the SVG file. -tree, xmlid = ET.XMLID(f.getvalue()) -tree.set('onload', 'init(evt)') - -# Hide the tooltips -for i, t in enumerate(ax.texts): - el = xmlid['tooltip_%d'%i] - el.set('visibility', 'hidden') - -# Assign onmouseover and onmouseout callbacks to patches. -for i, t in enumerate(ax.patches): - el = xmlid['patch_%d'%i] - el.set('onmouseover', "ShowTooltip(this)") - el.set('onmouseout', "HideTooltip(this)") - -# This is the script defining the ShowTooltip and HideTooltip functions. -script = """ - - """ - -# Insert the script at the top of the file and save it. -tree.insert(0, ET.XML(script)) -ET.ElementTree(tree).write('svg_tooltip.svg') diff --git a/dev/examples/user_interfaces/wxcursor_demo.html b/dev/examples/user_interfaces/wxcursor_demo.html deleted file mode 100644 index 094a869e948..00000000000 --- a/dev/examples/user_interfaces/wxcursor_demo.html +++ /dev/null @@ -1,218 +0,0 @@ - - - - - - - - user_interfaces example code: wxcursor_demo.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      user_interfaces example code: wxcursor_demo.py

      -

      [source code]

      -
      """
      -Example to draw a cursor and report the data coords in wx
      -"""
      -
      -import matplotlib
      -matplotlib.use('WXAgg')
      -
      -from matplotlib.backends.backend_wxagg import FigureCanvasWxAgg as FigureCanvas
      -from matplotlib.backends.backend_wx import NavigationToolbar2Wx
      -from matplotlib.figure import Figure
      -from numpy import arange, sin, pi
      -
      -import wx
      -
      -class CanvasFrame(wx.Frame):
      -
      -    def __init__(self, ):
      -        wx.Frame.__init__(self,None,-1,
      -                         'CanvasFrame',size=(550,350))
      -
      -        self.SetBackgroundColour(wx.NamedColour("WHITE"))
      -
      -        self.figure = Figure()
      -        self.axes = self.figure.add_subplot(111)
      -        t = arange(0.0,3.0,0.01)
      -        s = sin(2*pi*t)
      -
      -        self.axes.plot(t,s)
      -        self.axes.set_xlabel('t')
      -        self.axes.set_ylabel('sin(t)')
      -        self.figure_canvas = FigureCanvas(self, -1, self.figure)
      -
      -        # Note that event is a MplEvent
      -        self.figure_canvas.mpl_connect('motion_notify_event', self.UpdateStatusBar)
      -        self.figure_canvas.Bind(wx.EVT_ENTER_WINDOW, self.ChangeCursor)
      -
      -        self.sizer = wx.BoxSizer(wx.VERTICAL)
      -        self.sizer.Add(self.figure_canvas, 1, wx.LEFT | wx.TOP | wx.GROW)
      -        self.SetSizer(self.sizer)
      -        self.Fit()
      -
      -        self.statusBar = wx.StatusBar(self, -1)
      -        self.statusBar.SetFieldsCount(1)
      -        self.SetStatusBar(self.statusBar)
      -
      -        self.toolbar = NavigationToolbar2Wx(self.figure_canvas)
      -        self.sizer.Add(self.toolbar, 0, wx.LEFT | wx.EXPAND)
      -        self.toolbar.Show()
      -
      -    def ChangeCursor(self, event):
      -        self.figure_canvas.SetCursor(wx.StockCursor(wx.CURSOR_BULLSEYE))
      -
      -    def UpdateStatusBar(self, event):
      -        if event.inaxes:
      -            x, y = event.xdata, event.ydata
      -            self.statusBar.SetStatusText(( "x= " + str(x) +
      -                                           "  y=" +str(y) ),
      -                                           0)
      -
      -class App(wx.App):
      -
      -    def OnInit(self):
      -        'Create the main window and insert the custom frame'
      -        frame = CanvasFrame()
      -        self.SetTopWindow(frame)
      -        frame.Show(True)
      -        return True
      -
      -if __name__=='__main__':
      -    app = App(0)
      -    app.MainLoop()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/user_interfaces/wxcursor_demo.py b/dev/examples/user_interfaces/wxcursor_demo.py deleted file mode 100644 index 4d610ffc44d..00000000000 --- a/dev/examples/user_interfaces/wxcursor_demo.py +++ /dev/null @@ -1,71 +0,0 @@ -""" -Example to draw a cursor and report the data coords in wx -""" - -import matplotlib -matplotlib.use('WXAgg') - -from matplotlib.backends.backend_wxagg import FigureCanvasWxAgg as FigureCanvas -from matplotlib.backends.backend_wx import NavigationToolbar2Wx -from matplotlib.figure import Figure -from numpy import arange, sin, pi - -import wx - -class CanvasFrame(wx.Frame): - - def __init__(self, ): - wx.Frame.__init__(self,None,-1, - 'CanvasFrame',size=(550,350)) - - self.SetBackgroundColour(wx.NamedColour("WHITE")) - - self.figure = Figure() - self.axes = self.figure.add_subplot(111) - t = arange(0.0,3.0,0.01) - s = sin(2*pi*t) - - self.axes.plot(t,s) - self.axes.set_xlabel('t') - self.axes.set_ylabel('sin(t)') - self.figure_canvas = FigureCanvas(self, -1, self.figure) - - # Note that event is a MplEvent - self.figure_canvas.mpl_connect('motion_notify_event', self.UpdateStatusBar) - self.figure_canvas.Bind(wx.EVT_ENTER_WINDOW, self.ChangeCursor) - - self.sizer = wx.BoxSizer(wx.VERTICAL) - self.sizer.Add(self.figure_canvas, 1, wx.LEFT | wx.TOP | wx.GROW) - self.SetSizer(self.sizer) - self.Fit() - - self.statusBar = wx.StatusBar(self, -1) - self.statusBar.SetFieldsCount(1) - self.SetStatusBar(self.statusBar) - - self.toolbar = NavigationToolbar2Wx(self.figure_canvas) - self.sizer.Add(self.toolbar, 0, wx.LEFT | wx.EXPAND) - self.toolbar.Show() - - def ChangeCursor(self, event): - self.figure_canvas.SetCursor(wx.StockCursor(wx.CURSOR_BULLSEYE)) - - def UpdateStatusBar(self, event): - if event.inaxes: - x, y = event.xdata, event.ydata - self.statusBar.SetStatusText(( "x= " + str(x) + - " y=" +str(y) ), - 0) - -class App(wx.App): - - def OnInit(self): - 'Create the main window and insert the custom frame' - frame = CanvasFrame() - self.SetTopWindow(frame) - frame.Show(True) - return True - -if __name__=='__main__': - app = App(0) - app.MainLoop() diff --git a/dev/examples/widgets/buttons.html b/dev/examples/widgets/buttons.html deleted file mode 100644 index 52303893e5a..00000000000 --- a/dev/examples/widgets/buttons.html +++ /dev/null @@ -1,185 +0,0 @@ - - - - - - - - widgets example code: buttons.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      widgets example code: buttons.py

      -

      [source code]

      -
      import numpy as np
      -import matplotlib.pyplot as plt
      -from matplotlib.widgets import Button
      -
      -freqs = np.arange(2, 20, 3)
      -
      -ax = plt.subplot(111)
      -plt.subplots_adjust(bottom=0.2)
      -t = np.arange(0.0, 1.0, 0.001)
      -s = np.sin(2*np.pi*freqs[0]*t)
      -l, = plt.plot(t, s, lw=2)
      -
      -
      -class Index:
      -    ind = 0
      -    def next(self, event):
      -        self.ind += 1
      -        i = self.ind % len(freqs)
      -        ydata = np.sin(2*np.pi*freqs[i]*t)
      -        l.set_ydata(ydata)
      -        plt.draw()
      -
      -    def prev(self, event):
      -        self.ind -= 1
      -        i = self.ind % len(freqs)
      -        ydata = np.sin(2*np.pi*freqs[i]*t)
      -        l.set_ydata(ydata)
      -        plt.draw()
      -
      -callback = Index()
      -axprev = plt.axes([0.7, 0.05, 0.1, 0.075])
      -axnext = plt.axes([0.81, 0.05, 0.1, 0.075])
      -bnext = Button(axnext, 'Next')
      -bnext.on_clicked(callback.next)
      -bprev = Button(axprev, 'Previous')
      -bprev.on_clicked(callback.prev)
      -
      -plt.show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/widgets/buttons.py b/dev/examples/widgets/buttons.py deleted file mode 100644 index 6c3d68423f2..00000000000 --- a/dev/examples/widgets/buttons.py +++ /dev/null @@ -1,40 +0,0 @@ - -import numpy as np -import matplotlib.pyplot as plt -from matplotlib.widgets import Button - -freqs = np.arange(2, 20, 3) - -ax = plt.subplot(111) -plt.subplots_adjust(bottom=0.2) -t = np.arange(0.0, 1.0, 0.001) -s = np.sin(2*np.pi*freqs[0]*t) -l, = plt.plot(t, s, lw=2) - - -class Index: - ind = 0 - def next(self, event): - self.ind += 1 - i = self.ind % len(freqs) - ydata = np.sin(2*np.pi*freqs[i]*t) - l.set_ydata(ydata) - plt.draw() - - def prev(self, event): - self.ind -= 1 - i = self.ind % len(freqs) - ydata = np.sin(2*np.pi*freqs[i]*t) - l.set_ydata(ydata) - plt.draw() - -callback = Index() -axprev = plt.axes([0.7, 0.05, 0.1, 0.075]) -axnext = plt.axes([0.81, 0.05, 0.1, 0.075]) -bnext = Button(axnext, 'Next') -bnext.on_clicked(callback.next) -bprev = Button(axprev, 'Previous') -bprev.on_clicked(callback.prev) - -plt.show() - diff --git a/dev/examples/widgets/check_buttons.html b/dev/examples/widgets/check_buttons.html deleted file mode 100644 index 9432504c37d..00000000000 --- a/dev/examples/widgets/check_buttons.html +++ /dev/null @@ -1,173 +0,0 @@ - - - - - - - - widgets example code: check_buttons.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      widgets example code: check_buttons.py

      -

      [source code]

      -
      import numpy as np
      -import matplotlib.pyplot as plt
      -from matplotlib.widgets import CheckButtons
      -
      -t = np.arange(0.0, 2.0, 0.01)
      -s0 = np.sin(2*np.pi*t)
      -s1 = np.sin(4*np.pi*t)
      -s2 = np.sin(6*np.pi*t)
      -
      -ax = plt.subplot(111)
      -l0, = ax.plot(t, s0, visible=False, lw=2)
      -l1, = ax.plot(t, s1, lw=2)
      -l2, = ax.plot(t, s2, lw=2)
      -plt.subplots_adjust(left=0.2)
      -
      -rax = plt.axes([0.05, 0.4, 0.1, 0.15])
      -check = CheckButtons(rax, ('2 Hz', '4 Hz', '6 Hz'), (False, True, True))
      -
      -def func(label):
      -    if label == '2 Hz': l0.set_visible(not l0.get_visible())
      -    elif label == '4 Hz': l1.set_visible(not l1.get_visible())
      -    elif label == '6 Hz': l2.set_visible(not l2.get_visible())
      -    plt.draw()
      -check.on_clicked(func)
      -
      -plt.show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/widgets/check_buttons.py b/dev/examples/widgets/check_buttons.py deleted file mode 100644 index 2ef55709cf0..00000000000 --- a/dev/examples/widgets/check_buttons.py +++ /dev/null @@ -1,26 +0,0 @@ -import numpy as np -import matplotlib.pyplot as plt -from matplotlib.widgets import CheckButtons - -t = np.arange(0.0, 2.0, 0.01) -s0 = np.sin(2*np.pi*t) -s1 = np.sin(4*np.pi*t) -s2 = np.sin(6*np.pi*t) - -ax = plt.subplot(111) -l0, = ax.plot(t, s0, visible=False, lw=2) -l1, = ax.plot(t, s1, lw=2) -l2, = ax.plot(t, s2, lw=2) -plt.subplots_adjust(left=0.2) - -rax = plt.axes([0.05, 0.4, 0.1, 0.15]) -check = CheckButtons(rax, ('2 Hz', '4 Hz', '6 Hz'), (False, True, True)) - -def func(label): - if label == '2 Hz': l0.set_visible(not l0.get_visible()) - elif label == '4 Hz': l1.set_visible(not l1.get_visible()) - elif label == '6 Hz': l2.set_visible(not l2.get_visible()) - plt.draw() -check.on_clicked(func) - -plt.show() diff --git a/dev/examples/widgets/cursor.html b/dev/examples/widgets/cursor.html deleted file mode 100644 index 75662d1ecdc..00000000000 --- a/dev/examples/widgets/cursor.html +++ /dev/null @@ -1,166 +0,0 @@ - - - - - - - - widgets example code: cursor.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      widgets example code: cursor.py

      -

      [source code]

      -
      #!/usr/bin/env python
      -
      -from matplotlib.widgets import Cursor
      -import numpy as np
      -import matplotlib.pyplot as plt
      -
      -
      -fig = plt.figure(figsize=(8, 6))
      -ax = fig.add_subplot(111, axisbg='#FFFFCC')
      -
      -x, y = 4*(np.random.rand(2, 100)-.5)
      -ax.plot(x, y, 'o')
      -ax.set_xlim(-2, 2)
      -ax.set_ylim(-2, 2)
      -
      -# set useblit = True on gtkagg for enhanced performance
      -cursor = Cursor(ax, useblit=True, color='red', linewidth=2 )
      -
      -plt.show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/widgets/cursor.py b/dev/examples/widgets/cursor.py deleted file mode 100644 index 0e5d30e141e..00000000000 --- a/dev/examples/widgets/cursor.py +++ /dev/null @@ -1,19 +0,0 @@ -#!/usr/bin/env python - -from matplotlib.widgets import Cursor -import numpy as np -import matplotlib.pyplot as plt - - -fig = plt.figure(figsize=(8, 6)) -ax = fig.add_subplot(111, axisbg='#FFFFCC') - -x, y = 4*(np.random.rand(2, 100)-.5) -ax.plot(x, y, 'o') -ax.set_xlim(-2, 2) -ax.set_ylim(-2, 2) - -# set useblit = True on gtkagg for enhanced performance -cursor = Cursor(ax, useblit=True, color='red', linewidth=2 ) - -plt.show() diff --git a/dev/examples/widgets/index.html b/dev/examples/widgets/index.html deleted file mode 100644 index cf9ee1a58a7..00000000000 --- a/dev/examples/widgets/index.html +++ /dev/null @@ -1,167 +0,0 @@ - - - - - - - - widgets Examples — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      widgets Examples

      - --- - - - - - -
      Release:1.3.x
      Date:May 21, 2013
      - -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/widgets/lasso_selector_demo.html b/dev/examples/widgets/lasso_selector_demo.html deleted file mode 100644 index a009c6e08e4..00000000000 --- a/dev/examples/widgets/lasso_selector_demo.html +++ /dev/null @@ -1,236 +0,0 @@ - - - - - - - - widgets example code: lasso_selector_demo.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      widgets example code: lasso_selector_demo.py

      -

      [source code]

      -
      from __future__ import print_function
      -
      -import numpy as np
      -
      -from matplotlib.widgets import LassoSelector
      -from matplotlib.path import Path
      -
      -try:
      -    raw_input
      -except NameError:
      -    # Python 3
      -    raw_input = input
      -
      -
      -class SelectFromCollection(object):
      -    """Select indices from a matplotlib collection using `LassoSelector`.
      -
      -    Selected indices are saved in the `ind` attribute. This tool highlights
      -    selected points by fading them out (i.e., reducing their alpha values).
      -    If your collection has alpha < 1, this tool will permanently alter them.
      -
      -    Note that this tool selects collection objects based on their *origins*
      -    (i.e., `offsets`).
      -
      -    Parameters
      -    ----------
      -    ax : :class:`~matplotlib.axes.Axes`
      -        Axes to interact with.
      -
      -    collection : :class:`matplotlib.collections.Collection` subclass
      -        Collection you want to select from.
      -
      -    alpha_other : 0 <= float <= 1
      -        To highlight a selection, this tool sets all selected points to an
      -        alpha value of 1 and non-selected points to `alpha_other`.
      -    """
      -    def __init__(self, ax, collection, alpha_other=0.3):
      -        self.canvas = ax.figure.canvas
      -        self.collection = collection
      -        self.alpha_other = alpha_other
      -
      -        self.xys = collection.get_offsets()
      -        self.Npts = len(self.xys)
      -
      -        # Ensure that we have separate colors for each object
      -        self.fc = collection.get_facecolors()
      -        if len(self.fc) == 0:
      -            raise ValueError('Collection must have a facecolor')
      -        elif len(self.fc) == 1:
      -            self.fc = np.tile(self.fc, self.Npts).reshape(self.Npts, -1)
      -
      -        self.lasso = LassoSelector(ax, onselect=self.onselect)
      -        self.ind = []
      -
      -    def onselect(self, verts):
      -        path = Path(verts)
      -        self.ind = np.nonzero([path.contains_point(xy) for xy in self.xys])[0]
      -        self.fc[:, -1] = self.alpha_other
      -        self.fc[self.ind, -1] = 1
      -        self.collection.set_facecolors(self.fc)
      -        self.canvas.draw_idle()
      -
      -    def disconnect(self):
      -        self.lasso.disconnect_events()
      -        self.fc[:, -1] = 1
      -        self.collection.set_facecolors(self.fc)
      -        self.canvas.draw_idle()
      -
      -
      -if __name__ == '__main__':
      -    import matplotlib.pyplot as plt
      -
      -    plt.ion()
      -    data = np.random.rand(100, 2)
      -
      -    subplot_kw = dict(xlim=(0, 1), ylim=(0, 1), autoscale_on=False)
      -    fig, ax = plt.subplots(subplot_kw=subplot_kw)
      -
      -    pts = ax.scatter(data[:, 0], data[:, 1], s=80)
      -    selector = SelectFromCollection(ax, pts)
      -
      -    plt.draw()
      -    raw_input('Press any key to accept selected points')
      -    print("Selected points:")
      -    print(selector.xys[selector.ind])
      -    selector.disconnect()
      -
      -    # Block end of script so you can check that the lasso is disconnected.
      -    raw_input('Press any key to quit')
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/widgets/lasso_selector_demo.py b/dev/examples/widgets/lasso_selector_demo.py deleted file mode 100644 index b842d0093a5..00000000000 --- a/dev/examples/widgets/lasso_selector_demo.py +++ /dev/null @@ -1,89 +0,0 @@ -from __future__ import print_function - -import numpy as np - -from matplotlib.widgets import LassoSelector -from matplotlib.path import Path - -try: - raw_input -except NameError: - # Python 3 - raw_input = input - - -class SelectFromCollection(object): - """Select indices from a matplotlib collection using `LassoSelector`. - - Selected indices are saved in the `ind` attribute. This tool highlights - selected points by fading them out (i.e., reducing their alpha values). - If your collection has alpha < 1, this tool will permanently alter them. - - Note that this tool selects collection objects based on their *origins* - (i.e., `offsets`). - - Parameters - ---------- - ax : :class:`~matplotlib.axes.Axes` - Axes to interact with. - - collection : :class:`matplotlib.collections.Collection` subclass - Collection you want to select from. - - alpha_other : 0 <= float <= 1 - To highlight a selection, this tool sets all selected points to an - alpha value of 1 and non-selected points to `alpha_other`. - """ - def __init__(self, ax, collection, alpha_other=0.3): - self.canvas = ax.figure.canvas - self.collection = collection - self.alpha_other = alpha_other - - self.xys = collection.get_offsets() - self.Npts = len(self.xys) - - # Ensure that we have separate colors for each object - self.fc = collection.get_facecolors() - if len(self.fc) == 0: - raise ValueError('Collection must have a facecolor') - elif len(self.fc) == 1: - self.fc = np.tile(self.fc, self.Npts).reshape(self.Npts, -1) - - self.lasso = LassoSelector(ax, onselect=self.onselect) - self.ind = [] - - def onselect(self, verts): - path = Path(verts) - self.ind = np.nonzero([path.contains_point(xy) for xy in self.xys])[0] - self.fc[:, -1] = self.alpha_other - self.fc[self.ind, -1] = 1 - self.collection.set_facecolors(self.fc) - self.canvas.draw_idle() - - def disconnect(self): - self.lasso.disconnect_events() - self.fc[:, -1] = 1 - self.collection.set_facecolors(self.fc) - self.canvas.draw_idle() - - -if __name__ == '__main__': - import matplotlib.pyplot as plt - - plt.ion() - data = np.random.rand(100, 2) - - subplot_kw = dict(xlim=(0, 1), ylim=(0, 1), autoscale_on=False) - fig, ax = plt.subplots(subplot_kw=subplot_kw) - - pts = ax.scatter(data[:, 0], data[:, 1], s=80) - selector = SelectFromCollection(ax, pts) - - plt.draw() - raw_input('Press any key to accept selected points') - print("Selected points:") - print(selector.xys[selector.ind]) - selector.disconnect() - - # Block end of script so you can check that the lasso is disconnected. - raw_input('Press any key to quit') diff --git a/dev/examples/widgets/menu.html b/dev/examples/widgets/menu.html deleted file mode 100644 index ff780671ef4..00000000000 --- a/dev/examples/widgets/menu.html +++ /dev/null @@ -1,328 +0,0 @@ - - - - - - - - widgets example code: menu.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      widgets example code: menu.py

      -

      [source code]

      -
      from __future__ import division, print_function
      -import numpy as np
      -import matplotlib
      -import matplotlib.colors as colors
      -import matplotlib.patches as patches
      -import matplotlib.mathtext as mathtext
      -import matplotlib.pyplot as plt
      -import matplotlib.artist as artist
      -import matplotlib.image as image
      -
      -
      -class ItemProperties:
      -    def __init__(self, fontsize=14, labelcolor='black', bgcolor='yellow',
      -                 alpha=1.0):
      -        self.fontsize = fontsize
      -        self.labelcolor = labelcolor
      -        self.bgcolor = bgcolor
      -        self.alpha = alpha
      -
      -        self.labelcolor_rgb = colors.colorConverter.to_rgb(labelcolor)
      -        self.bgcolor_rgb = colors.colorConverter.to_rgb(bgcolor)
      -
      -class MenuItem(artist.Artist):
      -    parser = mathtext.MathTextParser("Bitmap")
      -    padx = 5
      -    pady = 5
      -    def __init__(self, fig, labelstr, props=None, hoverprops=None,
      -                 on_select=None):
      -        artist.Artist.__init__(self)
      -
      -        self.set_figure(fig)
      -        self.labelstr = labelstr
      -
      -        if props is None:
      -            props = ItemProperties()
      -
      -        if hoverprops is None:
      -            hoverprops = ItemProperties()
      -
      -        self.props = props
      -        self.hoverprops = hoverprops
      -
      -
      -        self.on_select = on_select
      -
      -        x, self.depth = self.parser.to_mask(
      -            labelstr, fontsize=props.fontsize, dpi=fig.dpi)
      -
      -        if props.fontsize!=hoverprops.fontsize:
      -            raise NotImplementedError(
      -                        'support for different font sizes not implemented')
      -
      -
      -        self.labelwidth = x.shape[1]
      -        self.labelheight = x.shape[0]
      -
      -        self.labelArray = np.zeros((x.shape[0], x.shape[1], 4))
      -        self.labelArray[:, :, -1] = x/255.
      -
      -        self.label = image.FigureImage(fig, origin='upper')
      -        self.label.set_array(self.labelArray)
      -
      -        # we'll update these later
      -        self.rect = patches.Rectangle((0,0), 1,1)
      -
      -        self.set_hover_props(False)
      -
      -        fig.canvas.mpl_connect('button_release_event', self.check_select)
      -
      -    def check_select(self, event):
      -        over, junk = self.rect.contains(event)
      -        if not over:
      -            return
      -
      -        if self.on_select is not None:
      -            self.on_select(self)
      -
      -    def set_extent(self, x, y, w, h):
      -        print(x, y, w, h)
      -        self.rect.set_x(x)
      -        self.rect.set_y(y)
      -        self.rect.set_width(w)
      -        self.rect.set_height(h)
      -
      -        self.label.ox = x+self.padx
      -        self.label.oy = y-self.depth+self.pady/2.
      -
      -        self.rect._update_patch_transform()
      -        self.hover = False
      -
      -    def draw(self, renderer):
      -        self.rect.draw(renderer)
      -        self.label.draw(renderer)
      -
      -    def set_hover_props(self, b):
      -        if b:
      -            props = self.hoverprops
      -        else:
      -            props = self.props
      -
      -        r, g, b = props.labelcolor_rgb
      -        self.labelArray[:, :, 0] = r
      -        self.labelArray[:, :, 1] = g
      -        self.labelArray[:, :, 2] = b
      -        self.label.set_array(self.labelArray)
      -        self.rect.set(facecolor=props.bgcolor, alpha=props.alpha)
      -
      -    def set_hover(self, event):
      -        'check the hover status of event and return true if status is changed'
      -        b,junk = self.rect.contains(event)
      -
      -        changed = (b != self.hover)
      -
      -        if changed:
      -            self.set_hover_props(b)
      -
      -
      -        self.hover = b
      -        return changed
      -
      -class Menu:
      -
      -    def __init__(self, fig, menuitems):
      -        self.figure = fig
      -        fig.suppressComposite = True
      -
      -        self.menuitems = menuitems
      -        self.numitems = len(menuitems)
      -
      -        maxw = max([item.labelwidth for item in menuitems])
      -        maxh = max([item.labelheight for item in menuitems])
      -
      -
      -        totalh = self.numitems*maxh + (self.numitems+1)*2*MenuItem.pady
      -
      -
      -        x0 = 100
      -        y0 = 400
      -
      -        width = maxw + 2*MenuItem.padx
      -        height = maxh+MenuItem.pady
      -
      -        for item in menuitems:
      -            left = x0
      -            bottom = y0-maxh-MenuItem.pady
      -
      -
      -            item.set_extent(left, bottom, width, height)
      -
      -            fig.artists.append(item)
      -            y0 -= maxh + MenuItem.pady
      -
      -
      -        fig.canvas.mpl_connect('motion_notify_event', self.on_move)
      -
      -    def on_move(self, event):
      -        draw = False
      -        for item in self.menuitems:
      -            draw = item.set_hover(event)
      -            if draw:
      -                self.figure.canvas.draw()
      -                break
      -
      -
      -fig = plt.figure()
      -fig.subplots_adjust(left=0.3)
      -props = ItemProperties(labelcolor='black', bgcolor='yellow',
      -                       fontsize=15, alpha=0.2)
      -hoverprops = ItemProperties(labelcolor='white', bgcolor='blue',
      -                            fontsize=15, alpha=0.2)
      -
      -menuitems = []
      -for label in ('open', 'close', 'save', 'save as', 'quit'):
      -    def on_select(item):
      -        print('you selected %s' % item.labelstr)
      -    item = MenuItem(fig, label, props=props, hoverprops=hoverprops,
      -                    on_select=on_select)
      -    menuitems.append(item)
      -
      -menu = Menu(fig, menuitems)
      -plt.show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/widgets/menu.py b/dev/examples/widgets/menu.py deleted file mode 100644 index 062cd57cb06..00000000000 --- a/dev/examples/widgets/menu.py +++ /dev/null @@ -1,181 +0,0 @@ -from __future__ import division, print_function -import numpy as np -import matplotlib -import matplotlib.colors as colors -import matplotlib.patches as patches -import matplotlib.mathtext as mathtext -import matplotlib.pyplot as plt -import matplotlib.artist as artist -import matplotlib.image as image - - -class ItemProperties: - def __init__(self, fontsize=14, labelcolor='black', bgcolor='yellow', - alpha=1.0): - self.fontsize = fontsize - self.labelcolor = labelcolor - self.bgcolor = bgcolor - self.alpha = alpha - - self.labelcolor_rgb = colors.colorConverter.to_rgb(labelcolor) - self.bgcolor_rgb = colors.colorConverter.to_rgb(bgcolor) - -class MenuItem(artist.Artist): - parser = mathtext.MathTextParser("Bitmap") - padx = 5 - pady = 5 - def __init__(self, fig, labelstr, props=None, hoverprops=None, - on_select=None): - artist.Artist.__init__(self) - - self.set_figure(fig) - self.labelstr = labelstr - - if props is None: - props = ItemProperties() - - if hoverprops is None: - hoverprops = ItemProperties() - - self.props = props - self.hoverprops = hoverprops - - - self.on_select = on_select - - x, self.depth = self.parser.to_mask( - labelstr, fontsize=props.fontsize, dpi=fig.dpi) - - if props.fontsize!=hoverprops.fontsize: - raise NotImplementedError( - 'support for different font sizes not implemented') - - - self.labelwidth = x.shape[1] - self.labelheight = x.shape[0] - - self.labelArray = np.zeros((x.shape[0], x.shape[1], 4)) - self.labelArray[:, :, -1] = x/255. - - self.label = image.FigureImage(fig, origin='upper') - self.label.set_array(self.labelArray) - - # we'll update these later - self.rect = patches.Rectangle((0,0), 1,1) - - self.set_hover_props(False) - - fig.canvas.mpl_connect('button_release_event', self.check_select) - - def check_select(self, event): - over, junk = self.rect.contains(event) - if not over: - return - - if self.on_select is not None: - self.on_select(self) - - def set_extent(self, x, y, w, h): - print(x, y, w, h) - self.rect.set_x(x) - self.rect.set_y(y) - self.rect.set_width(w) - self.rect.set_height(h) - - self.label.ox = x+self.padx - self.label.oy = y-self.depth+self.pady/2. - - self.rect._update_patch_transform() - self.hover = False - - def draw(self, renderer): - self.rect.draw(renderer) - self.label.draw(renderer) - - def set_hover_props(self, b): - if b: - props = self.hoverprops - else: - props = self.props - - r, g, b = props.labelcolor_rgb - self.labelArray[:, :, 0] = r - self.labelArray[:, :, 1] = g - self.labelArray[:, :, 2] = b - self.label.set_array(self.labelArray) - self.rect.set(facecolor=props.bgcolor, alpha=props.alpha) - - def set_hover(self, event): - 'check the hover status of event and return true if status is changed' - b,junk = self.rect.contains(event) - - changed = (b != self.hover) - - if changed: - self.set_hover_props(b) - - - self.hover = b - return changed - -class Menu: - - def __init__(self, fig, menuitems): - self.figure = fig - fig.suppressComposite = True - - self.menuitems = menuitems - self.numitems = len(menuitems) - - maxw = max([item.labelwidth for item in menuitems]) - maxh = max([item.labelheight for item in menuitems]) - - - totalh = self.numitems*maxh + (self.numitems+1)*2*MenuItem.pady - - - x0 = 100 - y0 = 400 - - width = maxw + 2*MenuItem.padx - height = maxh+MenuItem.pady - - for item in menuitems: - left = x0 - bottom = y0-maxh-MenuItem.pady - - - item.set_extent(left, bottom, width, height) - - fig.artists.append(item) - y0 -= maxh + MenuItem.pady - - - fig.canvas.mpl_connect('motion_notify_event', self.on_move) - - def on_move(self, event): - draw = False - for item in self.menuitems: - draw = item.set_hover(event) - if draw: - self.figure.canvas.draw() - break - - -fig = plt.figure() -fig.subplots_adjust(left=0.3) -props = ItemProperties(labelcolor='black', bgcolor='yellow', - fontsize=15, alpha=0.2) -hoverprops = ItemProperties(labelcolor='white', bgcolor='blue', - fontsize=15, alpha=0.2) - -menuitems = [] -for label in ('open', 'close', 'save', 'save as', 'quit'): - def on_select(item): - print('you selected %s' % item.labelstr) - item = MenuItem(fig, label, props=props, hoverprops=hoverprops, - on_select=on_select) - menuitems.append(item) - -menu = Menu(fig, menuitems) -plt.show() diff --git a/dev/examples/widgets/multicursor.html b/dev/examples/widgets/multicursor.html deleted file mode 100644 index 488acac5e79..00000000000 --- a/dev/examples/widgets/multicursor.html +++ /dev/null @@ -1,164 +0,0 @@ - - - - - - - - widgets example code: multicursor.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      widgets example code: multicursor.py

      -

      [source code]

      -
      import numpy as np
      -import matplotlib.pyplot as plt
      -from matplotlib.widgets import MultiCursor
      -
      -t = np.arange(0.0, 2.0, 0.01)
      -s1 = np.sin(2*np.pi*t)
      -s2 = np.sin(4*np.pi*t)
      -fig = plt.figure()
      -ax1 = fig.add_subplot(211)
      -ax1.plot(t, s1)
      -
      -
      -ax2 = fig.add_subplot(212, sharex=ax1)
      -ax2.plot(t, s2)
      -
      -multi = MultiCursor(fig.canvas, (ax1, ax2), color='r', lw=1)
      -plt.show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/widgets/multicursor.py b/dev/examples/widgets/multicursor.py deleted file mode 100644 index f6c5a36bff8..00000000000 --- a/dev/examples/widgets/multicursor.py +++ /dev/null @@ -1,17 +0,0 @@ -import numpy as np -import matplotlib.pyplot as plt -from matplotlib.widgets import MultiCursor - -t = np.arange(0.0, 2.0, 0.01) -s1 = np.sin(2*np.pi*t) -s2 = np.sin(4*np.pi*t) -fig = plt.figure() -ax1 = fig.add_subplot(211) -ax1.plot(t, s1) - - -ax2 = fig.add_subplot(212, sharex=ax1) -ax2.plot(t, s2) - -multi = MultiCursor(fig.canvas, (ax1, ax2), color='r', lw=1) -plt.show() diff --git a/dev/examples/widgets/radio_buttons.html b/dev/examples/widgets/radio_buttons.html deleted file mode 100644 index f182c61fd41..00000000000 --- a/dev/examples/widgets/radio_buttons.html +++ /dev/null @@ -1,185 +0,0 @@ - - - - - - - - widgets example code: radio_buttons.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      widgets example code: radio_buttons.py

      -

      [source code]

      -
      import numpy as np
      -import matplotlib.pyplot as plt
      -from matplotlib.widgets import RadioButtons
      -
      -t = np.arange(0.0, 2.0, 0.01)
      -s0 = np.sin(2*np.pi*t)
      -s1 = np.sin(4*np.pi*t)
      -s2 = np.sin(8*np.pi*t)
      -
      -ax = plt.subplot(111)
      -l, = ax.plot(t, s0, lw=2, color='red')
      -plt.subplots_adjust(left=0.3)
      -
      -axcolor = 'lightgoldenrodyellow'
      -rax = plt.axes([0.05, 0.7, 0.15, 0.15], axisbg=axcolor)
      -radio = RadioButtons(rax, ('2 Hz', '4 Hz', '8 Hz'))
      -def hzfunc(label):
      -    hzdict = {'2 Hz':s0, '4 Hz':s1, '8 Hz':s2}
      -    ydata = hzdict[label]
      -    l.set_ydata(ydata)
      -    plt.draw()
      -radio.on_clicked(hzfunc)
      -
      -rax = plt.axes([0.05, 0.4, 0.15, 0.15], axisbg=axcolor)
      -radio2 = RadioButtons(rax, ('red', 'blue', 'green'))
      -def colorfunc(label):
      -    l.set_color(label)
      -    plt.draw()
      -radio2.on_clicked(colorfunc)
      -
      -rax = plt.axes([0.05, 0.1, 0.15, 0.15], axisbg=axcolor)
      -radio3 = RadioButtons(rax, ('-', '--', '-.', 'steps', ':'))
      -def stylefunc(label):
      -    l.set_linestyle(label)
      -    plt.draw()
      -radio3.on_clicked(stylefunc)
      -
      -plt.show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/widgets/radio_buttons.py b/dev/examples/widgets/radio_buttons.py deleted file mode 100644 index 8d4f32c3d03..00000000000 --- a/dev/examples/widgets/radio_buttons.py +++ /dev/null @@ -1,38 +0,0 @@ -import numpy as np -import matplotlib.pyplot as plt -from matplotlib.widgets import RadioButtons - -t = np.arange(0.0, 2.0, 0.01) -s0 = np.sin(2*np.pi*t) -s1 = np.sin(4*np.pi*t) -s2 = np.sin(8*np.pi*t) - -ax = plt.subplot(111) -l, = ax.plot(t, s0, lw=2, color='red') -plt.subplots_adjust(left=0.3) - -axcolor = 'lightgoldenrodyellow' -rax = plt.axes([0.05, 0.7, 0.15, 0.15], axisbg=axcolor) -radio = RadioButtons(rax, ('2 Hz', '4 Hz', '8 Hz')) -def hzfunc(label): - hzdict = {'2 Hz':s0, '4 Hz':s1, '8 Hz':s2} - ydata = hzdict[label] - l.set_ydata(ydata) - plt.draw() -radio.on_clicked(hzfunc) - -rax = plt.axes([0.05, 0.4, 0.15, 0.15], axisbg=axcolor) -radio2 = RadioButtons(rax, ('red', 'blue', 'green')) -def colorfunc(label): - l.set_color(label) - plt.draw() -radio2.on_clicked(colorfunc) - -rax = plt.axes([0.05, 0.1, 0.15, 0.15], axisbg=axcolor) -radio3 = RadioButtons(rax, ('-', '--', '-.', 'steps', ':')) -def stylefunc(label): - l.set_linestyle(label) - plt.draw() -radio3.on_clicked(stylefunc) - -plt.show() diff --git a/dev/examples/widgets/rectangle_selector.html b/dev/examples/widgets/rectangle_selector.html deleted file mode 100644 index 59dd38b3ff2..00000000000 --- a/dev/examples/widgets/rectangle_selector.html +++ /dev/null @@ -1,196 +0,0 @@ - - - - - - - - widgets example code: rectangle_selector.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      widgets example code: rectangle_selector.py

      -

      [source code]

      -
      from __future__ import print_function
      -"""
      -Do a mouseclick somewhere, move the mouse to some destination, release
      -the button.  This class gives click- and release-events and also draws
      -a line or a box from the click-point to the actual mouseposition
      -(within the same axes) until the button is released.  Within the
      -method 'self.ignore()' it is checked wether the button from eventpress
      -and eventrelease are the same.
      -
      -"""
      -from matplotlib.widgets import RectangleSelector
      -import numpy as np
      -import matplotlib.pyplot as plt
      -
      -def line_select_callback(eclick, erelease):
      -    'eclick and erelease are the press and release events'
      -    x1, y1 = eclick.xdata, eclick.ydata
      -    x2, y2 = erelease.xdata, erelease.ydata
      -    print ("(%3.2f, %3.2f) --> (%3.2f, %3.2f)" % (x1, y1, x2, y2))
      -    print (" The button you used were: %s %s" % (eclick.button, erelease.button))
      -
      -def toggle_selector(event):
      -    print (' Key pressed.')
      -    if event.key in ['Q', 'q'] and toggle_selector.RS.active:
      -        print (' RectangleSelector deactivated.')
      -        toggle_selector.RS.set_active(False)
      -    if event.key in ['A', 'a'] and not toggle_selector.RS.active:
      -        print (' RectangleSelector activated.')
      -        toggle_selector.RS.set_active(True)
      -
      -
      -current_ax = plt.subplot(111)                    # make a new plotingrange
      -N = 100000                                       # If N is large one can see
      -x = np.linspace(0.0, 10.0, N)                    # improvement by use blitting!
      -
      -plt.plot(x, +np.sin(.2*np.pi*x), lw=3.5, c='b', alpha=.7)  # plot something
      -plt.plot(x, +np.cos(.2*np.pi*x), lw=3.5, c='r', alpha=.5)
      -plt.plot(x, -np.sin(.2*np.pi*x), lw=3.5, c='g', alpha=.3)
      -
      -print ("\n      click  -->  release")
      -
      -# drawtype is 'box' or 'line' or 'none'
      -toggle_selector.RS = RectangleSelector(current_ax, line_select_callback,
      -                                       drawtype='box', useblit=True,
      -                                       button=[1,3], # don't use middle button
      -                                       minspanx=5, minspany=5,
      -                                       spancoords='pixels')
      -plt.connect('key_press_event', toggle_selector)
      -plt.show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/widgets/rectangle_selector.py b/dev/examples/widgets/rectangle_selector.py deleted file mode 100644 index ed3d2eacbb5..00000000000 --- a/dev/examples/widgets/rectangle_selector.py +++ /dev/null @@ -1,49 +0,0 @@ -from __future__ import print_function -""" -Do a mouseclick somewhere, move the mouse to some destination, release -the button. This class gives click- and release-events and also draws -a line or a box from the click-point to the actual mouseposition -(within the same axes) until the button is released. Within the -method 'self.ignore()' it is checked wether the button from eventpress -and eventrelease are the same. - -""" -from matplotlib.widgets import RectangleSelector -import numpy as np -import matplotlib.pyplot as plt - -def line_select_callback(eclick, erelease): - 'eclick and erelease are the press and release events' - x1, y1 = eclick.xdata, eclick.ydata - x2, y2 = erelease.xdata, erelease.ydata - print ("(%3.2f, %3.2f) --> (%3.2f, %3.2f)" % (x1, y1, x2, y2)) - print (" The button you used were: %s %s" % (eclick.button, erelease.button)) - -def toggle_selector(event): - print (' Key pressed.') - if event.key in ['Q', 'q'] and toggle_selector.RS.active: - print (' RectangleSelector deactivated.') - toggle_selector.RS.set_active(False) - if event.key in ['A', 'a'] and not toggle_selector.RS.active: - print (' RectangleSelector activated.') - toggle_selector.RS.set_active(True) - - -current_ax = plt.subplot(111) # make a new plotingrange -N = 100000 # If N is large one can see -x = np.linspace(0.0, 10.0, N) # improvement by use blitting! - -plt.plot(x, +np.sin(.2*np.pi*x), lw=3.5, c='b', alpha=.7) # plot something -plt.plot(x, +np.cos(.2*np.pi*x), lw=3.5, c='r', alpha=.5) -plt.plot(x, -np.sin(.2*np.pi*x), lw=3.5, c='g', alpha=.3) - -print ("\n click --> release") - -# drawtype is 'box' or 'line' or 'none' -toggle_selector.RS = RectangleSelector(current_ax, line_select_callback, - drawtype='box', useblit=True, - button=[1,3], # don't use middle button - minspanx=5, minspany=5, - spancoords='pixels') -plt.connect('key_press_event', toggle_selector) -plt.show() diff --git a/dev/examples/widgets/slider_demo.html b/dev/examples/widgets/slider_demo.html deleted file mode 100644 index 542780a9ef0..00000000000 --- a/dev/examples/widgets/slider_demo.html +++ /dev/null @@ -1,191 +0,0 @@ - - - - - - - - widgets example code: slider_demo.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      widgets example code: slider_demo.py

      -

      [source code]

      -
      import numpy as np
      -import matplotlib.pyplot as plt
      -from matplotlib.widgets import Slider, Button, RadioButtons
      -
      -fig = plt.figure()
      -ax = fig.add_subplot(111)
      -plt.subplots_adjust(left=0.25, bottom=0.25)
      -t = np.arange(0.0, 1.0, 0.001)
      -a0 = 5
      -f0 = 3
      -s = a0*np.sin(2*np.pi*f0*t)
      -l, = plt.plot(t,s, lw=2, color='red')
      -plt.axis([0, 1, -10, 10])
      -
      -axcolor = 'lightgoldenrodyellow'
      -axfreq = plt.axes([0.25, 0.1, 0.65, 0.03], axisbg=axcolor)
      -axamp  = plt.axes([0.25, 0.15, 0.65, 0.03], axisbg=axcolor)
      -
      -sfreq = Slider(axfreq, 'Freq', 0.1, 30.0, valinit=f0)
      -samp = Slider(axamp, 'Amp', 0.1, 10.0, valinit=a0)
      -
      -def update(val):
      -    amp = samp.val
      -    freq = sfreq.val
      -    l.set_ydata(amp*np.sin(2*np.pi*freq*t))
      -    fig.canvas.draw_idle()
      -sfreq.on_changed(update)
      -samp.on_changed(update)
      -
      -resetax = plt.axes([0.8, 0.025, 0.1, 0.04])
      -button = Button(resetax, 'Reset', color=axcolor, hovercolor='0.975')
      -def reset(event):
      -    sfreq.reset()
      -    samp.reset()
      -button.on_clicked(reset)
      -
      -rax = plt.axes([0.025, 0.5, 0.15, 0.15], axisbg=axcolor)
      -radio = RadioButtons(rax, ('red', 'blue', 'green'), active=0)
      -def colorfunc(label):
      -    l.set_color(label)
      -    fig.canvas.draw_idle()
      -radio.on_clicked(colorfunc)
      -
      -plt.show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/widgets/slider_demo.py b/dev/examples/widgets/slider_demo.py deleted file mode 100644 index 04c222a5673..00000000000 --- a/dev/examples/widgets/slider_demo.py +++ /dev/null @@ -1,44 +0,0 @@ -import numpy as np -import matplotlib.pyplot as plt -from matplotlib.widgets import Slider, Button, RadioButtons - -fig = plt.figure() -ax = fig.add_subplot(111) -plt.subplots_adjust(left=0.25, bottom=0.25) -t = np.arange(0.0, 1.0, 0.001) -a0 = 5 -f0 = 3 -s = a0*np.sin(2*np.pi*f0*t) -l, = plt.plot(t,s, lw=2, color='red') -plt.axis([0, 1, -10, 10]) - -axcolor = 'lightgoldenrodyellow' -axfreq = plt.axes([0.25, 0.1, 0.65, 0.03], axisbg=axcolor) -axamp = plt.axes([0.25, 0.15, 0.65, 0.03], axisbg=axcolor) - -sfreq = Slider(axfreq, 'Freq', 0.1, 30.0, valinit=f0) -samp = Slider(axamp, 'Amp', 0.1, 10.0, valinit=a0) - -def update(val): - amp = samp.val - freq = sfreq.val - l.set_ydata(amp*np.sin(2*np.pi*freq*t)) - fig.canvas.draw_idle() -sfreq.on_changed(update) -samp.on_changed(update) - -resetax = plt.axes([0.8, 0.025, 0.1, 0.04]) -button = Button(resetax, 'Reset', color=axcolor, hovercolor='0.975') -def reset(event): - sfreq.reset() - samp.reset() -button.on_clicked(reset) - -rax = plt.axes([0.025, 0.5, 0.15, 0.15], axisbg=axcolor) -radio = RadioButtons(rax, ('red', 'blue', 'green'), active=0) -def colorfunc(label): - l.set_color(label) - fig.canvas.draw_idle() -radio.on_clicked(colorfunc) - -plt.show() diff --git a/dev/examples/widgets/span_selector.html b/dev/examples/widgets/span_selector.html deleted file mode 100644 index 316c1d5dd0e..00000000000 --- a/dev/examples/widgets/span_selector.html +++ /dev/null @@ -1,187 +0,0 @@ - - - - - - - - widgets example code: span_selector.py — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      widgets example code: span_selector.py

      -

      [source code]

      -
      #!/usr/bin/env python
      -"""
      -The SpanSelector is a mouse widget to select a xmin/xmax range and plot the
      -detail view of the selected region in the lower axes
      -"""
      -import numpy as np
      -import matplotlib.pyplot as plt
      -from matplotlib.widgets import SpanSelector
      -
      -fig = plt.figure(figsize=(8,6))
      -ax = fig.add_subplot(211, axisbg='#FFFFCC')
      -
      -x = np.arange(0.0, 5.0, 0.01)
      -y = np.sin(2*np.pi*x) + 0.5*np.random.randn(len(x))
      -
      -ax.plot(x, y, '-')
      -ax.set_ylim(-2,2)
      -ax.set_title('Press left mouse button and drag to test')
      -
      -ax2 = fig.add_subplot(212, axisbg='#FFFFCC')
      -line2, = ax2.plot(x, y, '-')
      -
      -
      -def onselect(xmin, xmax):
      -    indmin, indmax = np.searchsorted(x, (xmin, xmax))
      -    indmax = min(len(x)-1, indmax)
      -
      -    thisx = x[indmin:indmax]
      -    thisy = y[indmin:indmax]
      -    line2.set_data(thisx, thisy)
      -    ax2.set_xlim(thisx[0], thisx[-1])
      -    ax2.set_ylim(thisy.min(), thisy.max())
      -    fig.canvas.draw()
      -
      -# set useblit True on gtkagg for enhanced performance
      -span = SpanSelector(ax, onselect, 'horizontal', useblit=True,
      -                    rectprops=dict(alpha=0.5, facecolor='red') )
      -
      -
      -plt.show()
      -
      -
      -

      Keywords: python, matplotlib, pylab, example, codex (see Search examples)

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/examples/widgets/span_selector.py b/dev/examples/widgets/span_selector.py deleted file mode 100644 index 9ce64904e37..00000000000 --- a/dev/examples/widgets/span_selector.py +++ /dev/null @@ -1,40 +0,0 @@ -#!/usr/bin/env python -""" -The SpanSelector is a mouse widget to select a xmin/xmax range and plot the -detail view of the selected region in the lower axes -""" -import numpy as np -import matplotlib.pyplot as plt -from matplotlib.widgets import SpanSelector - -fig = plt.figure(figsize=(8,6)) -ax = fig.add_subplot(211, axisbg='#FFFFCC') - -x = np.arange(0.0, 5.0, 0.01) -y = np.sin(2*np.pi*x) + 0.5*np.random.randn(len(x)) - -ax.plot(x, y, '-') -ax.set_ylim(-2,2) -ax.set_title('Press left mouse button and drag to test') - -ax2 = fig.add_subplot(212, axisbg='#FFFFCC') -line2, = ax2.plot(x, y, '-') - - -def onselect(xmin, xmax): - indmin, indmax = np.searchsorted(x, (xmin, xmax)) - indmax = min(len(x)-1, indmax) - - thisx = x[indmin:indmax] - thisy = y[indmin:indmax] - line2.set_data(thisx, thisy) - ax2.set_xlim(thisx[0], thisx[-1]) - ax2.set_ylim(thisy.min(), thisy.max()) - fig.canvas.draw() - -# set useblit True on gtkagg for enhanced performance -span = SpanSelector(ax, onselect, 'horizontal', useblit=True, - rectprops=dict(alpha=0.5, facecolor='red') ) - - -plt.show() diff --git a/dev/faq/environment_variables_faq.html b/dev/faq/environment_variables_faq.html deleted file mode 100644 index 70f302fc99c..00000000000 --- a/dev/faq/environment_variables_faq.html +++ /dev/null @@ -1,273 +0,0 @@ - - - - - - - - Environment Variables — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      Table Of Contents

      - - -

      Previous topic

      -

      Troubleshooting

      -

      Next topic

      -

      The Matplotlib Developers’ Guide

      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      Environment Variables

      - -
      -
      -HOME
      -

      The user’s home directory. On linux, ~ is shorthand for HOME.

      -
      - -
      -
      -PATH
      -

      The list of directories searched to find executable programs

      -
      - -
      -
      -PYTHONPATH
      -

      The list of directories that is added to Python’s standard search list when -importing packages and modules

      -
      - -
      -
      -MPLCONFIGDIR
      -

      This is the directory used to store user customizations to matplotlib, as -well as some caches to improve performance. If MPLCONFIGDIR is not -defined, HOME/.matplotlib is used if it is writable. -Otherwise, the python standard library tempfile.gettmpdir() is -used to find a base directory in which the matplotlib -subdirectory is created.

      -
      - -
      -

      Setting environment variables in Linux and OS-X

      -

      To list the current value of PYTHONPATH, which may be empty, try:

      -
      echo $PYTHONPATH
      -
      -

      The procedure for setting environment variables in depends on what your default -shell is. BASH seems to be the most common, but CSH is -also common. You should be able to determine which by running at the command -prompt:

      -
      echo $SHELL
      -
      -
      -

      BASH/KSH

      -

      To create a new environment variable:

      -
      export PYTHONPATH=~/Python
      -
      -

      To prepend to an existing environment variable:

      -
      export PATH=~/bin:${PATH}
      -
      -

      The search order may be important to you, do you want ~/bin to -be searched first or last? To append to an existing environment -variable:

      -
      export PATH=${PATH}:~/bin
      -
      -

      To make your changes available in the future, add the commands to your -~/.bashrc file.

      -
      -
      -

      CSH/TCSH

      -

      To create a new environment variable:

      -
      setenv PYTHONPATH ~/Python
      -
      -

      To prepend to an existing environment variable:

      -
      setenv PATH ~/bin:${PATH}
      -
      -

      The search order may be important to you, do you want ~/bin to be searched -first or last? To append to an existing environment variable:

      -
      setenv PATH ${PATH}:~/bin
      -
      -

      To make your changes available in the future, add the commands to your -~/.cshrc file.

      -
      -
      -
      -

      Setting environment variables in windows

      -

      Open the Control Panel (Start ‣ Control Panel), -start the System program. Click the Advanced tab -and select the Environment Variables button. You can edit or add to -the User Variables.

      -
      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/faq/howto_faq-1.hires.png b/dev/faq/howto_faq-1.hires.png deleted file mode 100644 index 32007940296..00000000000 Binary files a/dev/faq/howto_faq-1.hires.png and /dev/null differ diff --git a/dev/faq/howto_faq-1.pdf b/dev/faq/howto_faq-1.pdf deleted file mode 100644 index 5bd583fb323..00000000000 Binary files a/dev/faq/howto_faq-1.pdf and /dev/null differ diff --git a/dev/faq/howto_faq-1.png b/dev/faq/howto_faq-1.png deleted file mode 100644 index 1698c613c05..00000000000 Binary files a/dev/faq/howto_faq-1.png and /dev/null differ diff --git a/dev/faq/howto_faq-1.py b/dev/faq/howto_faq-1.py deleted file mode 100644 index 5e998e5fea4..00000000000 --- a/dev/faq/howto_faq-1.py +++ /dev/null @@ -1,16 +0,0 @@ -import numpy as np -import matplotlib.pyplot as plt - -fig = plt.figure() -ax1 = fig.add_subplot(111) -t = np.arange(0.01, 10.0, 0.01) -s1 = np.exp(t) -ax1.plot(t, s1, 'b-') -ax1.set_xlabel('time (s)') -ax1.set_ylabel('exp') - -ax2 = ax1.twinx() -s2 = np.sin(2*np.pi*t) -ax2.plot(t, s2, 'r.') -ax2.set_ylabel('sin') -plt.show() \ No newline at end of file diff --git a/dev/faq/howto_faq.html b/dev/faq/howto_faq.html deleted file mode 100644 index 4c06cc52add..00000000000 --- a/dev/faq/howto_faq.html +++ /dev/null @@ -1,947 +0,0 @@ - - - - - - - - How-To — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - - - -
      -
      -
      -
      - -
      -

      How-To

      - -
      -

      Plotting: howto

      -
      -

      Find all objects in a figure of a certain type

      -

      Every matplotlib artist (see Artist tutorial) has a method -called findobj() that can be used to -recursively search the artist for any artists it may contain that meet -some criteria (eg match all Line2D -instances or match some arbitrary filter function). For example, the -following snippet finds every object in the figure which has a -set_color property and makes the object blue:

      -
      def myfunc(x):
      -    return hasattr(x, 'set_color')
      -
      -for o in fig.findobj(myfunc):
      -    o.set_color('blue')
      -
      -
      -

      You can also filter on class instances:

      -
      import matplotlib.text as text
      -for o in fig.findobj(text.Text):
      -    o.set_fontstyle('italic')
      -
      -
      -
      -
      -

      Save transparent figures

      -

      The savefig() command has a keyword argument -transparent which, if ‘True’, will make the figure and axes -backgrounds transparent when saving, but will not affect the displayed -image on the screen.

      -

      If you need finer grained control, eg you do not want full transparency -or you want to affect the screen displayed version as well, you can set -the alpha properties directly. The figure has a -Rectangle instance called patch -and the axes has a Rectangle instance called patch. You can set -any property on them directly (facecolor, edgecolor, linewidth, -linestyle, alpha). e.g.:

      -
      fig = plt.figure()
      -fig.patch.set_alpha(0.5)
      -ax = fig.add_subplot(111)
      -ax.patch.set_alpha(0.5)
      -
      -
      -

      If you need all the figure elements to be transparent, there is -currently no global alpha setting, but you can set the alpha channel -on individual elements, e.g.:

      -
      ax.plot(x, y, alpha=0.5)
      -ax.set_xlabel('volts', alpha=0.5)
      -
      -
      -
      -
      -

      Save multiple plots to one pdf file

      -

      Many image file formats can only have one image per file, but some -formats support multi-page files. Currently only the pdf backend has -support for this. To make a multi-page pdf file, first initialize the -file:

      -
      from matplotlib.backends.backend_pdf import PdfPages
      -pp = PdfPages('multipage.pdf')
      -
      -
      -

      You can give the PdfPages -object to savefig(), but you have to specify -the format:

      -
      plt.savefig(pp, format='pdf')
      -
      -
      -

      An easier way is to call -PdfPages.savefig:

      -
      pp.savefig()
      -
      -
      -

      Finally, the multipage pdf object has to be closed:

      -
      pp.close()
      -
      -
      -
      -
      -

      Move the edge of an axes to make room for tick labels

      -

      For subplots, you can control the default spacing on the left, right, -bottom, and top as well as the horizontal and vertical spacing between -multiple rows and columns using the -matplotlib.figure.Figure.subplots_adjust() method (in pyplot it -is subplots_adjust()). For example, to move -the bottom of the subplots up to make room for some rotated x tick -labels:

      -
      fig = plt.figure()
      -fig.subplots_adjust(bottom=0.2)
      -ax = fig.add_subplot(111)
      -
      -
      -

      You can control the defaults for these parameters in your -matplotlibrc file; see Customizing matplotlib. For -example, to make the above setting permanent, you would set:

      -
      figure.subplot.bottom : 0.2   # the bottom of the subplots of the figure
      -
      -

      The other parameters you can configure are, with their defaults

      -
      -
      left = 0.125
      -
      the left side of the subplots of the figure
      -
      right = 0.9
      -
      the right side of the subplots of the figure
      -
      bottom = 0.1
      -
      the bottom of the subplots of the figure
      -
      top = 0.9
      -
      the top of the subplots of the figure
      -
      wspace = 0.2
      -
      the amount of width reserved for blank space between subplots
      -
      hspace = 0.2
      -
      the amount of height reserved for white space between subplots
      -
      -

      If you want additional control, you can create an -Axes using the -axes() command (or equivalently the figure -add_axes() method), which allows you to -specify the location explicitly:

      -
      ax = fig.add_axes([left, bottom, width, height])
      -
      -
      -

      where all values are in fractional (0 to 1) coordinates. See -pylab_examples example code: axes_demo.py for an example of placing axes manually.

      -
      -
      -

      Automatically make room for tick labels

      -
      -

      Note

      -

      This is now easier to handle than ever before. -Calling tight_layout() can fix many common -layout issues. See the Tight Layout guide.

      -

      The information below is kept here in case it is useful for other -purposes.

      -
      -

      In most use cases, it is enough to simply change the subplots adjust -parameters as described in Move the edge of an axes to make room for tick labels. But in some -cases, you don’t know ahead of time what your tick labels will be, or -how large they will be (data and labels outside your control may be -being fed into your graphing application), and you may need to -automatically adjust your subplot parameters based on the size of the -tick labels. Any Text instance can report -its extent in window coordinates (a negative x coordinate is outside -the window), but there is a rub.

      -

      The RendererBase instance, which is -used to calculate the text size, is not known until the figure is -drawn (draw()). After the window is -drawn and the text instance knows its renderer, you can call -get_window_extent(). One way to solve -this chicken and egg problem is to wait until the figure is draw by -connecting -(mpl_connect()) to the -“on_draw” signal (DrawEvent) and -get the window extent there, and then do something with it, eg move -the left of the canvas over; see Event handling and picking.

      -

      Here is an example that gets a bounding box in relative figure coordinates -(0..1) of each of the labels and uses it to move the left of the subplots -over so that the tick labels fit in the figure

      -
      import matplotlib.pyplot as plt
      -import matplotlib.transforms as mtransforms
      -fig = plt.figure()
      -ax = fig.add_subplot(111)
      -ax.plot(range(10))
      -ax.set_yticks((2,5,7))
      -labels = ax.set_yticklabels(('really, really, really', 'long', 'labels'))
      -
      -def on_draw(event):
      -   bboxes = []
      -   for label in labels:
      -       bbox = label.get_window_extent()
      -       # the figure transform goes from relative coords->pixels and we
      -       # want the inverse of that
      -       bboxi = bbox.inverse_transformed(fig.transFigure)
      -       bboxes.append(bboxi)
      -
      -   # this is the bbox that bounds all the bboxes, again in relative
      -   # figure coords
      -   bbox = mtransforms.Bbox.union(bboxes)
      -   if fig.subplotpars.left < bbox.width:
      -       # we need to move it over
      -       fig.subplots_adjust(left=1.1*bbox.width) # pad a little
      -       fig.canvas.draw()
      -   return False
      -
      -fig.canvas.mpl_connect('draw_event', on_draw)
      -
      -plt.show()
      -
      -
      -

      (Source code, png, hires.png, pdf)

      -
      -../_images/auto_subplots_adjust.png -
      -
      -
      -

      Configure the tick linewidths

      -

      In matplotlib, the ticks are markers. All -Line2D objects support a line (solid, -dashed, etc) and a marker (circle, square, tick). The tick linewidth -is controlled by the “markeredgewidth” property:

      -
      import matplotlib.pyplot as plt
      -fig = plt.figure()
      -ax = fig.add_subplot(111)
      -ax.plot(range(10))
      -
      -for line in ax.get_xticklines() + ax.get_yticklines():
      -    line.set_markersize(10)
      -
      -plt.show()
      -
      -
      -

      The other properties that control the tick marker, and all markers, -are markerfacecolor, markeredgecolor, markeredgewidth, -markersize. For more information on configuring ticks, see -Axis containers and Tick containers.

      -
      -
      -

      Align my ylabels across multiple subplots

      -

      If you have multiple subplots over one another, and the y data have -different scales, you can often get ylabels that do not align -vertically across the multiple subplots, which can be unattractive. -By default, matplotlib positions the x location of the ylabel so that -it does not overlap any of the y ticks. You can override this default -behavior by specifying the coordinates of the label. The example -below shows the default behavior in the left subplots, and the manual -setting in the right subplots.

      -
      import numpy as np
      -import matplotlib.pyplot as plt
      -
      -box = dict(facecolor='yellow', pad=5, alpha=0.2)
      -
      -fig = plt.figure()
      -fig.subplots_adjust(left=0.2, wspace=0.6)
      -
      -
      -ax1 = fig.add_subplot(221)
      -ax1.plot(2000*np.random.rand(10))
      -ax1.set_title('ylabels not aligned')
      -ax1.set_ylabel('misaligned 1', bbox=box)
      -ax1.set_ylim(0, 2000)
      -ax3 = fig.add_subplot(223)
      -ax3.set_ylabel('misaligned 2',bbox=box)
      -ax3.plot(np.random.rand(10))
      -
      -
      -labelx = -0.3  # axes coords
      -
      -ax2 = fig.add_subplot(222)
      -ax2.set_title('ylabels aligned')
      -ax2.plot(2000*np.random.rand(10))
      -ax2.set_ylabel('aligned 1', bbox=box)
      -ax2.yaxis.set_label_coords(labelx, 0.5)
      -ax2.set_ylim(0, 2000)
      -
      -ax4 = fig.add_subplot(224)
      -ax4.plot(np.random.rand(10))
      -ax4.set_ylabel('aligned 2', bbox=box)
      -ax4.yaxis.set_label_coords(labelx, 0.5)
      -
      -
      -plt.show()
      -
      -
      -

      (Source code, png, hires.png, pdf)

      -
      -../_images/align_ylabels.png -
      -
      -
      -

      Skip dates where there is no data

      -

      When plotting time series, eg financial time series, one often wants -to leave out days on which there is no data, eg weekends. By passing -in dates on the x-xaxis, you get large horizontal gaps on periods when -there is not data. The solution is to pass in some proxy x-data, eg -evenly sampled indices, and then use a custom formatter to format -these as dates. The example below shows how to use an ‘index formatter’ -to achieve the desired plot:

      -
      import numpy as np
      -import matplotlib.pyplot as plt
      -import matplotlib.mlab as mlab
      -import matplotlib.ticker as ticker
      -
      -r = mlab.csv2rec('../data/aapl.csv')
      -r.sort()
      -r = r[-30:]  # get the last 30 days
      -
      -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 = plt.figure()
      -ax = fig.add_subplot(111)
      -ax.plot(ind, r.adj_close, 'o-')
      -ax.xaxis.set_major_formatter(ticker.FuncFormatter(format_date))
      -fig.autofmt_xdate()
      -
      -plt.show()
      -
      -
      -
      -
      -

      Test whether a point is inside a polygon

      -

      The nxutils provides two high-performance methods: -for a single point use pnpoly() and for an -array of points use points_inside_poly(). -For a discussion of the implementation see pnpoly.

      -
      In [25]: import numpy as np
      -
      -In [26]: import matplotlib.nxutils as nx
      -
      -In [27]: verts = np.array([ [0,0], [0, 1], [1, 1], [1,0]], float)
      -
      -In [28]: nx.pnpoly( 0.5, 0.5, verts)
      -Out[28]: 1
      -
      -In [29]: nx.pnpoly( 0.5, 1.5, verts)
      -Out[29]: 0
      -
      -In [30]: points = np.random.rand(10,2)*2
      -
      -In [31]: points
      -Out[31]:
      -array([[ 1.03597426,  0.61029911],
      -       [ 1.94061056,  0.65233947],
      -       [ 1.08593748,  1.16010789],
      -       [ 0.9255139 ,  1.79098751],
      -       [ 1.54564936,  1.15604046],
      -       [ 1.71514397,  1.26147554],
      -       [ 1.19133536,  0.56787764],
      -       [ 0.40939549,  0.35190339],
      -       [ 1.8944715 ,  0.61785408],
      -       [ 0.03128518,  0.48144145]])
      -
      -In [32]: nx.points_inside_poly(points, verts)
      -Out[32]: array([False, False, False, False, False, False, False,  True, False, True], dtype=bool)
      -
      -
      -For a complete example, see event_handling example code: lasso_demo.py.
      -
      -

      Control the depth of plot elements

      -

      Within an axes, the order that the various lines, markers, text, -collections, etc appear is determined by the -set_zorder() property. The default -order is patches, lines, text, with collections of lines and -collections of patches appearing at the same level as regular lines -and patches, respectively:

      -
      line, = ax.plot(x, y, zorder=10)
      -
      -
      -See pylab_examples example code: zorder_demo.py for a complete example.

      You can also use the Axes property -set_axisbelow() to control whether the grid -lines are placed above or below your other plot elements.

      -
      -
      -

      Make the aspect ratio for plots equal

      -

      The Axes property set_aspect() controls the -aspect ratio of the axes. You can set it to be ‘auto’, ‘equal’, or -some ratio which controls the ratio:

      -
      ax = fig.add_subplot(111, aspect='equal')
      -
      -
      -See pylab_examples example code: equal_aspect_ratio.py for a complete example.
      -
      -

      Make a movie

      -

      If you want to take an animated plot and turn it into a movie, the -best approach is to save a series of image files (eg PNG) and use an -external tool to convert them to a movie. You can use mencoder, -which is part of the mplayer suite -for this:

      -
      #fps (frames per second) controls the play speed
      -mencoder 'mf://*.png' -mf type=png:fps=10 -ovc \\
      -   lavc -lavcopts vcodec=wmv2 -oac copy -o animation.avi
      -
      -

      The swiss army knife of image tools, ImageMagick’s convert works for this as -well.

      -

      Here is a simple example script that saves some PNGs, makes them into -a movie, and then cleans up:

      -
      import os, sys
      -import matplotlib.pyplot as plt
      -
      -files = []
      -fig = plt.figure(figsize=(5,5))
      -ax = fig.add_subplot(111)
      -for i in range(50):  # 50 frames
      -    ax.cla()
      -    ax.imshow(rand(5,5), interpolation='nearest')
      -    fname = '_tmp%03d.png'%i
      -    print 'Saving frame', fname
      -    fig.savefig(fname)
      -    files.append(fname)
      -
      -print 'Making movie animation.mpg - this make take a while'
      -os.system("mencoder 'mf://_tmp*.png' -mf type=png:fps=10 \\
      -  -ovc lavc -lavcopts vcodec=wmv2 -oac copy -o animation.mpg")
      -
      -Josh Lifton provided this example old_animation example code: movie_demo.py, which -is possibly dated since it was written in 2004.
      -
      -

      Multiple y-axis scales

      -

      A frequent request is to have two scales for the left and right -y-axis, which is possible using twinx() (more -than two scales are not currently supported, though it is on the wish -list). This works pretty well, though there are some quirks when you -are trying to interactively pan and zoom, because both scales do not get -the signals.

      -

      The approach uses twinx() (and its sister -twiny()) to use 2 different axes, -turning the axes rectangular frame off on the 2nd axes to keep it from -obscuring the first, and manually setting the tick locs and labels as -desired. You can use separate matplotlib.ticker formatters and -locators as desired because the two axes are independent.

      -

      (Source code, png, hires.png, pdf)

      -
      -../_images/howto_faq-1.png -
      -See api example code: two_scales.py for a complete example
      -
      -

      Generate images without having a window appear

      -

      The easiest way to do this is use a non-interactive backend (see -What is a backend?) such as Agg (for PNGs), PDF, SVG or PS. In -your figure-generating script, just call the -matplotlib.use() directive before importing pylab or -pyplot:

      -
      import matplotlib
      -matplotlib.use('Agg')
      -import matplotlib.pyplot as plt
      -plt.plot([1,2,3])
      -plt.savefig('myfig')
      -
      -
      -
      -

      See also

      -

      Matplotlib in a web application server for information about running matplotlib inside -of a web application.

      -
      -
      -
      -

      Use show()

      -

      When you want to view your plots on your display, -the user interface backend will need to start the GUI mainloop. -This is what show() does. It tells -matplotlib to raise all of the figure windows created so far and start -the mainloop. Because this mainloop is blocking by default (i.e., script -execution is paused), you should only call this once per script, at the end. -Script execution is resumed after the last window is closed. Therefore, if -you are using matplotlib to generate only images and do not want a user -interface window, you do not need to call show (see Generate images without having a window appear -and What is a backend?).

      -
      -

      Note

      -

      Because closing a figure window invokes the destruction of its plotting -elements, you should call savefig() before -calling show if you wish to save the figure as well as view it.

      -
      -
      -

      New in version v1.0.0: show now starts the GUI mainloop only if it isn’t already running. -Therefore, multiple calls to show are now allowed.

      -
      -

      Having show block further execution of the script or the python -interpreter depends on whether matplotlib is set for interactive mode -or not. In non-interactive mode (the default setting), execution is paused -until the last figure window is closed. In interactive mode, the execution -is not paused, which allows you to create additional figures (but the script -won’t finish until the last figure window is closed).

      -
      -

      Note

      -

      Support for interactive/non-interactive mode depends upon the backend. -Until version 1.0.0 (and subsequent fixes for 1.0.1), the behavior of -the interactive mode was not consistent across backends. -As of v1.0.1, only the macosx backend differs from other backends -because it does not support non-interactive mode.

      -
      -

      Because it is expensive to draw, you typically will not want matplotlib -to redraw a figure many times in a script such as the following:

      -
      plot([1,2,3])            # draw here ?
      -xlabel('time')           # and here ?
      -ylabel('volts')          # and here ?
      -title('a simple plot')   # and here ?
      -show()
      -
      -
      -

      However, it is possible to force matplotlib to draw after every command, -which might be what you want when working interactively at the -python console (see Using matplotlib in a python shell), but in a script you want to -defer all drawing until the call to show. This is especially -important for complex figures that take some time to draw. -show() is designed to tell matplotlib that -you’re all done issuing commands and you want to draw the figure now.

      -
      -

      Note

      -

      show() should typically only be called at -most once per script and it should be the last line of your -script. At that point, the GUI takes control of the interpreter. -If you want to force a figure draw, use -draw() instead.

      -
      -

      Many users are frustrated by show because they want it to be a -blocking call that raises the figure, pauses the script until they -close the figure, and then allow the script to continue running until -the next figure is created and the next show is made. Something like -this:

      -
      # WARNING : illustrating how NOT to use show
      -for i in range(10):
      -    # make figure i
      -    show()
      -
      -
      -

      This is not what show does and unfortunately, because doing blocking -calls across user interfaces can be tricky, is currently unsupported, -though we have made significant progress towards supporting blocking events.

      -
      -

      New in version v1.0.0: As noted earlier, this restriction has been relaxed to allow multiple -calls to show. In most backends, you can now expect to be -able to create new figures and raise them in a subsequent call to -show after closing the figures from a previous call to show.

      -
      -
      -
      -
      -

      Contributing: howto

      -
      -

      Submit a patch

      -

      See Making patches for information on how to make a patch with git.

      -

      If you are posting a patch to fix a code bug, please explain your -patch in words – what was broken before and how you fixed it. Also, -even if your patch is particularly simple, just a few lines or a -single function replacement, we encourage people to submit git diffs -against HEAD of the branch they are patching. It just makes life -easier for us, since we (fortunately) get a lot of contributions, and -want to receive them in a standard format. If possible, for any -non-trivial change, please include a complete, free-standing example -that the developers can run unmodified which shows the undesired -behavior pre-patch and the desired behavior post-patch, with a clear -verbal description of what to look for. A developer may -have written the function you are working on years ago, and may no -longer be with the project, so it is quite possible you are the world -expert on the code you are patching and we want to hear as much detail -as you can offer.

      -

      When emailing your patch and examples, feel free to paste any code -into the text of the message, indeed we encourage it, but also attach -the patches and examples since many email clients screw up the -formatting of plain text, and we spend lots of needless time trying to -reformat the code to make it usable.

      -

      You should check out the guide to developing matplotlib to make sure -your patch abides by our coding conventions -The Matplotlib Developers’ Guide.

      -
      -
      -

      Contribute to matplotlib documentation

      -

      matplotlib is a big library, which is used in many ways, and the -documentation has only scratched the surface of everything it can -do. So far, the place most people have learned all these features are -through studying the examples (Search examples), which is a -recommended and great way to learn, but it would be nice to have more -official narrative documentation guiding people through all the dark -corners. This is where you come in.

      -

      There is a good chance you know more about matplotlib usage in some -areas, the stuff you do every day, than many of the core developers -who wrote most of the documentation. Just pulled your hair out -compiling matplotlib for windows? Write a FAQ or a section for the -Installation page. Are you a digital signal processing wizard? -Write a tutorial on the signal analysis plotting functions like -xcorr(), psd() and -specgram(). Do you use matplotlib with -django or other popular web -application servers? Write a FAQ or tutorial and we’ll find a place -for it in the User’s Guide. Bundle matplotlib in a -py2exe app? ... I think you get the idea.

      -

      matplotlib is documented using the sphinx extensions to restructured text -(ReST). sphinx is an -extensible python framework for documentation projects which generates -HTML and PDF, and is pretty easy to write; you can see the source for this -document or any page on this site by clicking on the Show Source link -at the end of the page in the sidebar (or here for this document).

      -

      The sphinx website is a good resource for learning sphinx, but we have -put together a cheat-sheet at Documenting matplotlib which -shows you how to get started, and outlines the matplotlib conventions -and extensions, eg for including plots directly from external code in -your documents.

      -

      Once your documentation contributions are working (and hopefully -tested by actually building the docs) you can submit them as a patch -against git. See Install git and Submit a patch. -Looking for something to do? Search for TODO.

      -
      -
      -
      -

      Matplotlib in a web application server

      -

      Many users report initial problems trying to use maptlotlib in web -application servers, because by default matplotlib ships configured to -work with a graphical user interface which may require an X11 -connection. Since many barebones application servers do not have X11 -enabled, you may get errors if you don’t configure matplotlib for use -in these environments. Most importantly, you need to decide what -kinds of images you want to generate (PNG, PDF, SVG) and configure the -appropriate default backend. For 99% of users, this will be the Agg -backend, which uses the C++ antigrain -rendering engine to make nice PNGs. The Agg backend is also -configured to recognize requests to generate other output formats -(PDF, PS, EPS, SVG). The easiest way to configure matplotlib to use -Agg is to call:

      -
      # do this before importing pylab or pyplot
      -import matplotlib
      -matplotlib.use('Agg')
      -import matplotlib.pyplot as plt
      -
      -
      -

      For more on configuring your backend, see -What is a backend?.

      -

      Alternatively, you can avoid pylab/pyplot altogether, which will give -you a little more control, by calling the API directly as shown in -api example code: agg_oo.py.

      -

      You can either generate hardcopy on the filesystem by calling savefig:

      -
      # do this before importing pylab or pyplot
      -import matplotlib
      -matplotlib.use('Agg')
      -import matplotlib.pyplot as plt
      -fig = plt.figure()
      -ax = fig.add_subplot(111)
      -ax.plot([1,2,3])
      -fig.savefig('test.png')
      -
      -
      -

      or by saving to a file handle:

      -
      import sys
      -fig.savefig(sys.stdout)
      -
      -
      -

      Here is an example using the Python Imaging Library (PIL). First, the figure -is saved to a StringIO object which is then fed to PIL for further -processing:

      -
      import StringIO, Image
      -imgdata = StringIO.StringIO()
      -fig.savefig(imgdata, format='png')
      -imgdata.seek(0)  # rewind the data
      -im = Image.open(imgdata)
      -
      -
      -
      -

      matplotlib with apache

      -

      TODO; see Contribute to matplotlib documentation.

      -
      -
      -

      matplotlib with django

      -

      TODO; see Contribute to matplotlib documentation.

      -
      -
      -

      matplotlib with zope

      -

      TODO; see Contribute to matplotlib documentation.

      -
      -
      -

      Clickable images for HTML

      -

      Andrew Dalke of Dalke Scientific -has written a nice article -on how to make html click maps with matplotlib agg PNGs. We would -also like to add this functionality to SVG and add a SWF backend to -support these kind of images. If you are interested in contributing -to these efforts that would be great.

      -
      -
      -
      -

      Search examples

      -

      The nearly 300 code Matplotlib Examples included with the matplotlib -source distribution are full-text searchable from the Search Page -page, but sometimes when you search, you get a lot of results from the -The Matplotlib API or other documentation that you may not be interested -in if you just want to find a complete, free-standing, working piece -of example code. To facilitate example searches, we have tagged every -code example page with the keyword codex for code example which -shouldn’t appear anywhere else on this site except in the FAQ. -So if you want to search for an example that uses an -ellipse, Search Page for codex ellipse.

      -
      -
      -

      Cite Matplotlib

      -

      If you want to refer to matplotlib in a publication, you can use -“Matplotlib: A 2D Graphics Environment” by J. D. Hunter In Computing -in Science & Engineering, Vol. 9, No. 3. (2007), pp. 90-95 (see this -reference page):

      -
      @article{Hunter:2007,
      -        Address = {10662 LOS VAQUEROS CIRCLE, PO BOX 3014, LOS ALAMITOS, CA 90720-1314 USA},
      -        Author = {Hunter, John D.},
      -        Date-Added = {2010-09-23 12:22:10 -0700},
      -        Date-Modified = {2010-09-23 12:22:10 -0700},
      -        Isi = {000245668100019},
      -        Isi-Recid = {155389429},
      -        Journal = {Computing In Science \& Engineering},
      -        Month = {May-Jun},
      -        Number = {3},
      -        Pages = {90--95},
      -        Publisher = {IEEE COMPUTER SOC},
      -        Times-Cited = {21},
      -        Title = {Matplotlib: A 2D graphics environment},
      -        Type = {Editorial Material},
      -        Volume = {9},
      -        Year = {2007},
      -        Abstract = {Matplotlib is a 2D graphics package used for Python for application
      -                    development, interactive scripting, and publication-quality image
      -                    generation across user interfaces and operating systems.},
      -        Bdsk-Url-1 = {http://gateway.isiknowledge.com/gateway/Gateway.cgi?GWVersion=2&SrcAuth=Alerting&SrcApp=Alerting&DestApp=WOS&DestLinkType=FullRecord;KeyUT=000245668100019}}
      -
      -
      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/faq/index.html b/dev/faq/index.html deleted file mode 100644 index 56c40dcbf54..00000000000 --- a/dev/faq/index.html +++ /dev/null @@ -1,217 +0,0 @@ - - - - - - - - The Matplotlib FAQ — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      Previous topic

      -

      Credits

      -

      Next topic

      -

      Installation

      -

      This Page

      - - - -
      -
      - - - - - - \ No newline at end of file diff --git a/dev/faq/installing_faq.html b/dev/faq/installing_faq.html deleted file mode 100644 index 7c75dc179bb..00000000000 --- a/dev/faq/installing_faq.html +++ /dev/null @@ -1,482 +0,0 @@ - - - - - - - - Installation — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - - - -
      -
      -
      -
      - -
      -

      Installation

      - -
      -

      Report a compilation problem

      -

      See Getting help.

      -
      -
      -

      matplotlib compiled fine, but nothing shows up when I use it

      -

      The first thing to try is a clean install and see if -that helps. If not, the best way to test your install is by running a script, -rather than working interactively from a python shell or an integrated -development environment such as IDLE which add additional -complexities. Open up a UNIX shell or a DOS command prompt and cd into a -directory containing a minimal example in a file. Something like -simple_plot.py for example:

      -
      from pylab import *
      -plot([1,2,3])
      -show()
      -
      -
      -

      and run it with:

      -
      python simple_plot.py --verbose-helpful
      -
      -

      This will give you additional information about which backends matplotlib is -loading, version information, and more. At this point you might want to make -sure you understand matplotlib’s configuration -process, governed by the matplotlibrc configuration file which contains -instructions within and the concept of the matplotlib backend.

      -

      If you are still having trouble, see Getting help.

      -
      -
      -

      How to completely remove matplotlib

      -

      Occasionally, problems with matplotlib can be solved with a clean -installation of the package.

      -

      The process for removing an installation of matplotlib depends on how -matplotlib was originally installed on your system. Follow the steps -below that goes with your original installation method to cleanly -remove matplotlib from your system.

      -
      -

      Easy Install

      -
        -
      1. Delete the caches from your .matplotlib configuration directory.

        -
      2. -
      3. Run:

        -
        easy_install -m matplotlib
        -
        -
      4. -
      5. Delete any .egg files or directories from your installation -directory.

        -
      6. -
      -
      -
      -

      Windows installer

      -
        -
      1. Delete the caches from your .matplotlib configuration directory.
      2. -
      3. Use Start ‣ Control Panel to start the Add and -Remove Software utility.
      4. -
      -
      -
      -

      Source install

      -

      Unfortunately:

      -
      python setup.py clean
      -
      -

      does not properly clean the build directory, and does nothing to the -install directory. To cleanly rebuild:

      -
        -
      1. Delete the caches from your .matplotlib configuration directory.
      2. -
      3. Delete the build directory in the source tree.
      4. -
      5. Delete any matplotlib directories or eggs from your installation -directory.
      6. -
      -
      -
      -
      -

      How to Install

      -
      -

      Source install from git

      -

      Clone the main source using one of:

      -
      git clone git@github.com:matplotlib/matplotlib.git
      -
      -

      or:

      -
      git clone git://github.com/matplotlib/matplotlib.git
      -
      -

      and build and install as usual with:

      -
      > cd matplotlib
      -> python setup.py install
      -
      -
      -

      Note

      -

      If you are on debian/ubuntu, you can get all the dependencies -required to build matplotlib with:

      -
      sudo apt-get build-dep python-matplotlib
      -
      -

      If you are on Fedora/RedHat, you can get all the dependencies -required to build matplotlib by first installing yum-builddep -and then running:

      -
      su -c "yum-builddep python-matplotlib"
      -
      -

      This does not build matplotlib, but it does get all of the -build dependencies, which will make building from source easier.

      -
      -

      If you want to be able to follow the development branch as it changes -just replace the last step with (make sure you have setuptools -installed):

      -
      > python setup.py develop
      -
      -

      This creates links in the right places and installs the command -line script to the appropriate places.

      -
      -

      Note

      -

      Mac OSX users please see the Building on OSX guide.

      -
      -

      Then, if you want to update your matplotlib at any time, just do:

      -
      > git pull
      -
      -

      When you run git pull, if the output shows that only Python files have been -updated, you are all set. If C files have changed, you need to run the python -setupegg.py develop command again to compile them.

      -

      There is more information on using git in -the developer docs.

      -
      -
      -
      -

      Linux Notes

      -

      Because most Linux distributions use some sort of package manager, -we do not provide a pre-built binary for the Linux platform. -Instead, we recommend that you use the “Add Software” method for -your system to install matplotlib. This will guarantee that everything -that is needed for matplotlib will be installed as well.

      -

      If, for some reason, you can not use the package manager, Linux usually -comes with at least a basic build system. Follow the instructions found above for how to build and install matplotlib.

      -
      -
      -

      OS-X Notes

      -
      -

      Which python for OS X?

      -

      Apple ships with its own python, and many users have had trouble -with it. There are several alternative versions of python that -can be used. If it is feasible, we recommend that you use the enthought -python distribution EPD -for OS X (which comes with matplotlib and much more). Also available is -MacPython or the -official OS X version from python.org.

      -
      -

      Note

      -

      Before installing any of the binary packages, be sure that all of the -packages were compiled for the same version of python. -Often, the download site for NumPy and matplotlib will display a -supposed ‘current’ version of the package, but you may need to choose -a different package from the full list that was built for your -combination of python and OSX.

      -
      -
      -
      -

      Installing OSX binaries

      -

      If you want to install matplotlib from one of the binary installers we -build, you have two choices: a mpkg installer, which is a typical -Installer.app, or a binary OSX egg, which you can install via -setuptools’ easy_install.

      -

      The mkpg installer will have a “zip” extension, and will have a name -like matplotlib-1.2.0-py2.7-macosx10.5_mpkg.zip. -The name of the installer depends on which versions of python, matplotlib, -and OSX it was built for. You need to unzip this file using either the -“unzip” command, or simply double clicking on the it. Then when you -double-click on the resulting mpkd, which will have a name like -matplotlib-1.2.0-py2.7-macosx10.5.mpkg, it will run the -Installer.app, prompt you for a password if you need system-wide -installation privileges, and install to a directory like -/Library/Python/2.7/site-packages/ (exact path depends on your -python version). This directory may not be in your python ‘path’ variable, -so you should test your installation with:

      -
      > python -c 'import matplotlib; print matplotlib.__version__, matplotlib.__file__'
      -
      -

      If you get an error like:

      -
      Traceback (most recent call last):
      -  File "<string>", line 1, in <module>
      -ImportError: No module named matplotlib
      -
      -

      then you will need to set your PYTHONPATH, eg:

      -
      export PYTHONPATH=/Library/Python/2.7/site-packages:$PYTHONPATH
      -
      -

      See also ref:environment-variables.

      -
      -
      -

      Building and installing from source on OSX with EPD

      -

      If you have the EPD installed (Which python for OS X?), it might turn out -to be rather tricky to install a new version of matplotlib from source on the -Mac OS 10.5 . Here’s a procedure that seems to work, at least sometimes:

      -
        -
      1. Remove the ~/.matplotlib folder (“rm -rf ~/.matplotlib”).
      2. -
      -

      1. Edit the file (make a backup before you start, just in case): -/Library/Frameworks/Python.framework/Versions/Current/lib/python2.5/config/Makefile, -removing all occurrences of the string -arch ppc, changing the line -MACOSX_DEPLOYMENT_TARGET=10.3 to MACOSX_DEPLOYMENT_TARGET=10.5 and -changing the occurrences of MacOSX10.4u.sdk into MacOSX10.5.sdk

      -

      2. In -/Library/Frameworks/Python.framework/Versions/Current/lib/pythonX.Y/site-packages/easy-install.pth, -(where X.Y is the version of Python you are building against) -Comment out the line containing the name of the directory in which the -previous version of MPL was installed (Looks something like -./matplotlib-0.98.5.2n2-py2.5-macosx-10.3-fat.egg).

      -

      3. Save the following as a shell script, for example -./install-matplotlib-epd-osx.sh:

      -
      NAME=matplotlib
      -VERSION=v1.1.x
      -PREFIX=$HOME
      -#branch="release"
      -branch="master"
      -git clone git://github.com/matplotlib/matplotlib.git
      -cd matplotlib
      -if [ $branch = "release" ]
      -    then
      -    echo getting the maintenance branch
      -    git checkout -b $VERSION origin/$VERSION
      -fi
      -export CFLAGS="-Os -arch i386"
      -export LDFLAGS="-Os -arch i386"
      -export PKG_CONFIG_PATH="/usr/x11/lib/pkgconfig"
      -export ARCHFLAGS="-arch i386"
      -python setup.py build
      -# use --prefix if you don't want it installed in the default location:
      -python setup.py install #--prefix=$PREFIX
      -cd ..
      -
      -

      Run this script (for example sh ./install-matplotlib-epd-osx.sh) in the -directory in which you want the source code to be placed, or simply type the -commands in the terminal command line. This script sets some local variable -(CFLAGS, LDFLAGS, PKG_CONFIG_PATH, ARCHFLAGS), removes previous installations, -checks out the source from github, builds and installs it. The backend should -to be set to MacOSX.

      -
      -
      -
      -

      Windows Notes

      -
      -

      Binary installers for Windows

      -

      If you have already installed python, you can use one of the -matplotlib binary installers for windows – you can get these from the -download site. -Choose the files that match your version of python (eg py2.7 if -you installed Python 2.7) which have the exe extension. If you -haven’t already installed python, you can get the official version -from the python web site.

      -

      There are also two packaged distributions of python that come -preloaded with matplotlib and many other tools like ipython, numpy, -scipy, vtk and user interface toolkits. These packages are quite -large because they come with so much, but you get everything with -a single click installer.

      - -
      -
      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/faq/troubleshooting_faq.html b/dev/faq/troubleshooting_faq.html deleted file mode 100644 index 8709c1ea9c3..00000000000 --- a/dev/faq/troubleshooting_faq.html +++ /dev/null @@ -1,325 +0,0 @@ - - - - - - - - Troubleshooting — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      Table Of Contents

      - - -

      Previous topic

      -

      How-To

      -

      Next topic

      -

      Environment Variables

      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      Troubleshooting

      - -
      -

      Obtaining matplotlib version

      -

      To find out your matplotlib version number, import it and print the -__version__ attribute:

      -
      >>> import matplotlib
      ->>> matplotlib.__version__
      -'0.98.0'
      -
      -
      -
      -
      -

      matplotlib install location

      -

      You can find what directory matplotlib is installed in by importing it -and printing the __file__ attribute:

      -
      >>> import matplotlib
      ->>> matplotlib.__file__
      -'/home/jdhunter/dev/lib64/python2.5/site-packages/matplotlib/__init__.pyc'
      -
      -
      -
      -
      -

      .matplotlib directory location

      -

      Each user has a .matplotlib/ directory which may contain a -matplotlibrc file and various -caches to improve matplotlib’s performance. To locate your .matplotlib/ -directory, use matplotlib.get_configdir():

      -
      >>> import matplotlib as mpl
      ->>> mpl.get_configdir()
      -'/home/darren/.matplotlib'
      -
      -
      -

      On unix-like systems, this directory is generally located in your -HOME directory. On windows, it is in your documents and -settings directory by default:

      -
      >>> import matplotlib
      ->>> mpl.get_configdir()
      -'C:\\Documents and Settings\\jdhunter\\.matplotlib'
      -
      -
      -

      If you would like to use a different configuration directory, you can -do so by specifying the location in your MPLCONFIGDIR -environment variable – see -Setting environment variables in Linux and OS-X.

      -
      -
      -

      Getting help

      -

      There are a number of good resources for getting help with matplotlib. -There is a good chance your question has already been asked:

      -
      -
      -
      -

      If you are unable to find an answer to your question through search, -please provide the following information in your e-mail to the -mailing list:

      -
      -
        -
      • your operating system; (Linux/UNIX users: post the output of uname -a)

        -
      • -
      • matplotlib version:

        -
        python -c `import matplotlib; print matplotlib.__version__`
        -
        -
      • -
      • where you obtained matplotlib (e.g., your Linux distribution’s -packages or the matplotlib Sourceforge site, or the enthought -python distribution EPD).

        -
      • -
      • any customizations to your matplotlibrc file (see -Customizing matplotlib).

        -
      • -
      • if the problem is reproducible, please try to provide a minimal, -standalone Python script that demonstrates the problem. This is -the critical step. If you can’t post a piece of code that we -can run and reproduce your error, the chances of getting help are -significantly diminished. Very often, the mere act of trying to -minimize your code to the smallest bit that produces the error -will help you find a bug in your code that is causing the -problem.

        -
      • -
      • you can get very helpful debugging output from matlotlib by -running your script with a verbose-helpful or ---verbose-debug flags and posting the verbose output the -lists:

        -
        > python simple_plot.py --verbose-helpful > output.txt
        -
        -
      • -
      -
      -

      If you compiled matplotlib yourself, please also provide

      -
      -
        -
      • any changes you have made to setup.py or setupext.py

        -
      • -
      • the output of:

        -
        rm -rf build
        -python setup.py build
        -
        -

        The beginning of the build output contains lots of details about your -platform that are useful for the matplotlib developers to diagnose -your problem.

        -
      • -
      • your compiler version – eg, gcc --version

        -
      • -
      -
      -

      Including this information in your first e-mail to the mailing list -will save a lot of time.

      -

      You will likely get a faster response writing to the mailing list than -filing a bug in the bug tracker. Most developers check the bug -tracker only periodically. If your problem has been determined to be -a bug and can not be quickly solved, you may be asked to file a bug in -the tracker so the issue doesn’t get lost.

      -
      -
      -

      Problems with recent git versions

      -

      First make sure you have a clean build and install (see -How to completely remove matplotlib), get the latest git update, install it and run a -simple test script in debug mode:

      -
      rm -rf build
      -rm -rf /path/to/site-packages/matplotlib*
      -git pull
      -python setup.py install > build.out
      -python examples/pylab_examples/simple_plot.py --verbose-debug > run.out
      -
      -

      and post build.out and run.out to the -matplotlib-devel -mailing list (please do not post git problems to the users list).

      -

      Of course, you will want to clearly describe your problem, what you -are expecting and what you are getting, but often a clean build and -install will help. See also Getting help.

      -
      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/faq/usage_faq.html b/dev/faq/usage_faq.html deleted file mode 100644 index 29ed1164fc2..00000000000 --- a/dev/faq/usage_faq.html +++ /dev/null @@ -1,631 +0,0 @@ - - - - - - - - Usage — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      Table Of Contents

      - - -

      Previous topic

      -

      Installation

      -

      Next topic

      -

      How-To

      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      Usage

      - -
      -

      General Concepts

      -

      matplotlib has an extensive codebase that can be daunting to many -new users. However, most of matplotlib can be understood with a fairly -simple conceptual framework and knowledge of a few important points.

      -

      Plotting requires action on a range of levels, from the most general -(e.g., ‘contour this 2-D array’) to the most specific (e.g., ‘color -this screen pixel red’). The purpose of a plotting package is to assist -you in visualizing your data as easily as possible, with all the necessary -control – that is, by using relatively high-level commands most of -the time, and still have the ability to use the low-level commands when -needed.

      -

      Therefore, everything in matplotlib is organized in a hierarchy. At the top -of the hierarchy is the matplotlib “state-machine environment” which is -provided by the matplotlib.pyplot module. At this level, simple -functions are used to add plot elements (lines, images, text, etc.) to -the current axes in the current figure.

      -
      -

      Note

      -

      Pyplot’s state-machine environment behaves similarly to MATLAB and -should be most familiar to users with MATLAB experience.

      -
      -

      The next level down in the hierarchy is the first level of the object-oriented -interface, in which pyplot is used only for a few functions such as figure -creation, and the user explicitly creates and keeps track of the figure -and axes objects. At this level, the user uses pyplot to create figures, -and through those figures, one or more axes objects can be created. These -axes objects are then used for most plotting actions.

      -

      For even more control – which is essential for things like embedding -matplotlib plots in GUI applications – the pyplot level may be dropped -completely, leaving a purely object-oriented approach.

      -
      - -
      -

      Coding Styles

      -

      When viewing this documentation and examples, you will find different -coding styles and usage patterns. These styles are perfectly valid -and have their pros and cons. Just about all of the examples can be -converted into another style and achieve the same results. -The only caveat is to avoid mixing the coding styles for your own code.

      -
      -

      Note

      -

      Developers for matplotlib have to follow a specific style and guidelines. -See The Matplotlib Developers’ Guide.

      -
      -

      Of the different styles, there are two that are officially supported. -Therefore, these are the preferred ways to use matplotlib.

      -

      For the preferred pyplot style, the imports at the top of your -scripts will typically be:

      -
      import matplotlib.pyplot as plt
      -import numpy as np
      -
      -
      -

      Then one calls, for example, np.arange, np.zeros, np.pi, plt.figure, -plt.plot, plt.show, etc. So, a simple example in this style would be:

      -
      import matplotlib.pyplot as plt
      -import numpy as np
      -x = np.arange(0, 10, 0.2)
      -y = np.sin(x)
      -plt.plot(x, y)
      -plt.show()
      -
      -
      -

      Note that this example used pyplot’s state-machine to -automatically and implicitly create a figure and an axes. For full -control of your plots and more advanced usage, use the pyplot interface -for creating figures, and then use the object methods for the rest:

      -
      import matplotlib.pyplot as plt
      -import numpy as np
      -x = np.arange(0, 10, 0.2)
      -y = np.sin(x)
      -fig = plt.figure()
      -ax = fig.add_subplot(111)
      -ax.plot(x, y)
      -plt.show()
      -
      -
      -

      Next, the same example using a pure MATLAB-style:

      -
      from pylab import *
      -x = arange(0, 10, 0.2)
      -y = sin(x)
      -plot(x, y)
      -show()
      -
      -
      -

      So, why all the extra typing as one moves away from the pure -MATLAB-style? For very simple things like this example, the only -advantage is academic: the wordier styles are more explicit, more -clear as to where things come from and what is going on. For more -complicated applications, this explicitness and clarity becomes -increasingly valuable, and the richer and more complete object-oriented -interface will likely make the program easier to write and maintain.

      -
      -
      -

      What is a backend?

      -

      A lot of documentation on the website and in the mailing lists refers -to the “backend” and many new users are confused by this term. -matplotlib targets many different use cases and output formats. Some -people use matplotlib interactively from the python shell and have -plotting windows pop up when they type commands. Some people embed -matplotlib into graphical user interfaces like wxpython or pygtk to -build rich applications. Others use matplotlib in batch scripts to -generate postscript images from some numerical simulations, and still -others in web application servers to dynamically serve up graphs.

      -

      To support all of these use cases, matplotlib can target different -outputs, and each of these capabilities is called a backend; the -“frontend” is the user facing code, ie the plotting code, whereas the -“backend” does all the hard work behind-the-scenes to make the -figure. There are two types of backends: user interface backends (for -use in pygtk, wxpython, tkinter, qt, macosx, or fltk; also -referred to as “interactive backends”) and hardcopy backends to -make image files (PNG, SVG, PDF, PS; also referred to as “non-interactive -backends”).

      -

      There are a two primary ways to configure your backend. One is to set -the backend parameter in your matplotlibrc file (see -Customizing matplotlib):

      -
      backend : WXAgg   # use wxpython with antigrain (agg) rendering
      -
      -

      The other is to use the matplotlib use() directive:

      -
      import matplotlib
      -matplotlib.use('PS')   # generate postscript output by default
      -
      -
      -

      If you use the use directive, this must be done before importing -matplotlib.pyplot or matplotlib.pylab.

      -
      -

      Note

      -

      Backend name specifications are not case-sensitive; e.g., ‘GTKAgg’ -and ‘gtkagg’ are equivalent.

      -
      -

      With a typical installation of matplotlib, such as from a -binary installer or a linux distribution package, a good default -backend will already be set, allowing both interactive work and -plotting from scripts, with output to the screen and/or to -a file, so at least initially you will not need to use either of the -two methods given above.

      -

      If, however, you want to write graphical user interfaces, or a web -application server (Matplotlib in a web application server), or need a better -understanding of what is going on, read on. To make things a little -more customizable for graphical user interfaces, matplotlib separates -the concept of the renderer (the thing that actually does the drawing) -from the canvas (the place where the drawing goes). The canonical -renderer for user interfaces is Agg which uses the Anti-Grain -Geometry C++ library to make a raster (pixel) image of the figure. -All of the user interfaces except macosx can be used with -agg rendering, eg -WXAgg, GTKAgg, QT4Agg, TkAgg. In -addition, some of the user interfaces support other rendering engines. -For example, with GTK, you can also select GDK rendering (backend -GTK) or Cairo rendering (backend GTKCairo).

      -

      For the rendering engines, one can also distinguish between vector or raster renderers. Vector -graphics languages issue drawing commands like “draw a line from this -point to this point” and hence are scale free, and raster backends -generate a pixel representation of the line whose accuracy depends on a -DPI setting.

      -

      Here is a summary of the matplotlib renderers (there is an eponymous -backed for each; these are non-interactive backends, capable of -writing to a file):

      - ----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      RendererFiletypesDescription
      AGGpngraster graphics – high quality images -using the Anti-Grain Geometry engine
      PSps -epsvector graphicsPostscript output
      PDFpdfvector graphics – -Portable Document Format
      SVGsvgvector graphics – -Scalable Vector Graphics
      Cairopng -ps -pdf -svg -...vector graphics – -Cairo graphics
      GDKpng -jpg -tiff -...raster graphics – -the Gimp Drawing Kit
      -

      And here are the user interfaces and renderer combinations supported; -these are interactive backends, capable of displaying to the screen -and of using appropriate renderers from the table above to write to -a file:

      - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      BackendDescription
      GTKAggAgg rendering to a GTK 2.x canvas (requires PyGTK)
      GTK3AggAgg rendering to a GTK 3.x canvas (requires PyGObject)
      GTKGDK rendering to a GTK 2.x canvas (not recommended) -(requires PyGTK)
      GTKCairoCairo rendering to a GTK 2.x canvas (requires PyGTK -and pycairo)
      GTK3CairoCairo rendering to a GTK 3.x canvas (requires PyGObject -and pycairo)
      WXAggAgg rendering to to a wxWidgets canvas -(requires wxPython)
      WXNative wxWidgets drawing to a wxWidgets Canvas -(not recommended) (requires wxPython)
      TkAggAgg rendering to a Tk canvas (requires TkInter)
      QtAggAgg rendering to a Qt canvas (requires PyQt) -(deprecated; use Qt4Agg)
      Qt4AggAgg rendering to a Qt4 canvas (requires PyQt4)
      FLTKAggAgg rendering to a FLTK canvas (requires pyFLTK) -(not widely used; consider TKAgg, GTKAgg, WXAgg, or -QT4Agg instead)
      macosxCocoa rendering in OSX windows -(presently lacks blocking show() behavior when matplotlib -is in non-interactive mode)
      -
      -
      -

      What is interactive mode?

      -

      Use of an interactive backend (see What is a backend?) -permits–but does not by itself require or ensure–plotting -to the screen. Whether and when plotting to the screen occurs, -and whether a script or shell session continues after a plot -is drawn on the screen, depends on the functions and methods -that are called, and on a state variable that determines whether -matplotlib is in “interactive mode”. The default Boolean value is set -by the matplotlibrc file, and may be customized like any other -configuration parameter (see Customizing matplotlib). It -may also be set via matplotlib.interactive(), and its -value may be queried via matplotlib.is_interactive(). Turning -interactive mode on and off in the middle of a stream of plotting -commands, whether in a script or in a shell, is rarely needed -and potentially confusing, so in the following we will assume all -plotting is done with interactive mode either on or off.

      -
      -

      Note

      -

      Major changes related to interactivity, and in particular the -role and behavior of show(), were made in the -transition to matplotlib version 1.0, and bugs were fixed in -1.0.1. Here we describe the version 1.0.1 behavior for the -primary interactive backends, with the partial exception of -macosx.

      -
      -

      Interactive mode may also be turned on via matplotlib.pyplot.ion(), -and turned off via matplotlib.pyplot.ioff().

      -
      -

      Note

      -

      Interactive mode works with suitable backends in ipython and in -the ordinary python shell, but it does not work in the IDLE IDE.

      -
      -
      -

      Interactive example

      -

      From an ordinary python prompt, or after invoking ipython with no options, -try this:

      -
      import matplotlib.pyplot as plt
      -plt.ion()
      -plt.plot([1.6, 2.7])
      -
      -
      -

      Assuming you are running version 1.0.1 or higher, and you have -an interactive backend installed and selected by default, you should -see a plot, and your terminal prompt should also be active; you -can type additional commands such as:

      -
      plt.title("interactive test")
      -plt.xlabel("index")
      -
      -
      -

      and you will see the plot being updated after each line. This is -because you are in interactive mode and you are using pyplot -functions. Now try an alternative method of modifying the -plot. Get a -reference to the Axes instance, and -call a method of that instance:

      -
      ax = plt.gca()
      -ax.plot([3.1, 2.2])
      -
      -
      -

      Nothing changed, because the Axes methods do not include an -automatic call to draw_if_interactive(); -that call is added by the pyplot functions. If you are using -methods, then when you want to update the plot on the screen, -you need to call draw():

      -
      plt.draw()
      -
      -
      -

      Now you should see the new line added to the plot.

      -
      -
      -

      Non-interactive example

      -

      Start a fresh session as in the previous example, but now -turn interactive mode off:

      -
      import matplotlib.pyplot as plt
      -plt.ioff()
      -plt.plot([1.6, 2.7])
      -
      -
      -

      Nothing happened–or at least nothing has shown up on the -screen (unless you are using macosx backend, which is -anomalous). To make the plot appear, you need to do this:

      -
      plt.show()
      -
      -
      -

      Now you see the plot, but your terminal command line is -unresponsive; the show() command blocks the input -of additional commands until you manually kill the plot -window.

      -

      What good is this–being forced to use a blocking function? -Suppose you need a script that plots the contents of a file -to the screen. You want to look at that plot, and then end -the script. Without some blocking command such as show(), the -script would flash up the plot and then end immediately, -leaving nothing on the screen.

      -

      In addition, non-interactive mode delays all drawing until -show() is called; this is more efficient than redrawing -the plot each time a line in the script adds a new feature.

      -

      Prior to version 1.0, show() generally could not be called -more than once in a single script (although sometimes one -could get away with it); for version 1.0.1 and above, this -restriction is lifted, so one can write a script like this:

      -
      import numpy as np
      -import matplotlib.pyplot as plt
      -plt.ioff()
      -for i in range(3):
      -    plt.plot(np.random.rand(10))
      -    plt.show()
      -
      -
      -

      which makes three plots, one at a time.

      -
      -
      -

      Summary

      -

      In interactive mode, pyplot functions automatically draw -to the screen.

      -

      When plotting interactively, if using -object method calls in addition to pyplot functions, then -call draw() whenever you want to -refresh the plot.

      -

      Use non-interactive mode in scripts in which you want to -generate one or more figures and display them before ending -or generating a new set of figures. In that case, use -show() to display the figure(s) and -to block execution until you have manually destroyed them.

      -
      -
      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/gallery.html b/dev/gallery.html deleted file mode 100644 index bc48a951694..00000000000 --- a/dev/gallery.html +++ /dev/null @@ -1,1080 +0,0 @@ - - - - - - - - Thumbnail gallery — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      - - -
      -
      - -
      -
      -
      -
      - - -

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

      -
      - -
    • Gallery - -
    • - -
      -

      - Lines, bars, and markers -

      -fill_demo - -fill_demo_features - -line_demo_dash_control - -
      -
      -

      - Shapes and collections -

      -path_patch_demo - -scatter_demo - -
      -
      -

      - Statistical plots -

      -errorbar_demo - -errorbar_demo_features - -histogram_demo_features - -
      -
      -

      - Images, contours, and fields -

      -image_demo - -image_demo_clip_path - -pcolormesh_levels - -streamplot_demo_features - -streamplot_demo_features - -streamplot_demo_masking - -
      -
      -

      - Pie and polar charts -

      -pie_demo_features - -polar_bar_demo - -polar_scatter_demo - -
      -
      -

      - Color -

      -color_cycle_demo - -colormaps_reference - -colormaps_reference - -colormaps_reference - -colormaps_reference - -colormaps_reference - -
      -
      -

      - Text, labels, and annotations -

      -text_demo_fontdict - -unicode_demo - -
      -
      -

      - Ticks and spines -

      -spines_demo - -spines_demo_bounds - -spines_demo_dropped - -ticklabels_demo_rotation - -
      -
      -

      - Subplots, axes, and figures -

      -subplot_demo - -
      -
      -

      - Specialty plots -

      -hinton_demo - -
      -
      -

      - Showcase -

      -integral_demo - -
      -
      -

      - API -

      -barchart_demo - -bbox_intersect - -collections_demo - -compound_path - -custom_projection_example - -custom_scale_example - -date_demo - -date_index_formatter - -date_index_formatter - -demo_affine_image - -donut_demo - -engineering_formatter - -fahrenheit_celsius_scales - -histogram_path_demo - -image_zcoord - -joinstyle - -legend_demo - -line_with_text - -logo2 - -mathtext_asarray - -patch_collection - -quad_bezier - -radar_chart - -sankey_demo_basics - -sankey_demo_basics - -sankey_demo_basics - -sankey_demo_links - -sankey_demo_old - -sankey_demo_rankine - -scatter_piecharts - -span_regions - -two_scales - -unicode_minus - -watermark_image - -watermark_text - -
      -
      -

      - pylab examples -

      -accented_text - -agg_buffer_to_array - -agg_buffer_to_array - -alignment_test - -anchored_artists - -animation_demo - -annotation_demo2 - -annotation_demo2 - -annotation_demo3 - -annotation_demo - -annotation_demo - -annotation_demo - -anscombe - -arctest - -arrow_demo - -arrow_simple_demo - -aspect_loglog - -axes_demo - -axes_props - -axes_zoom_effect - -axhspan_demo - -axis_equal_demo - -bar_stacked - -barb_demo - -barb_demo - -barchart_demo - -barchart_demo2 - -barcode_demo - -boxplot_demo2 - -boxplot_demo3 - -boxplot_demo - -boxplot_demo - -boxplot_demo - -boxplot_demo - -boxplot_demo - -boxplot_demo - -boxplot_demo - -break - -broken_axis - -broken_barh - -centered_ticklabels - -clippedline - -cohere_demo - -color_by_yvalue - -color_demo - -colorbar_tick_labelling_demo - -colorbar_tick_labelling_demo - -contour_demo - -contour_demo - -contour_demo - -contour_demo - -contour_demo - -contour_demo - -contour_image - -contour_label_demo - -contour_label_demo - -contour_label_demo - -contourf_demo - -contourf_demo - -contourf_demo - -contourf_hatching - -contourf_hatching - -contourf_log - -coords_demo - -coords_report - -csd_demo - -custom_cmap - -custom_figure_class - -custom_ticker1 - -customize_rc - -dannys_example - -dashpointlabel - -date_demo1 - -date_demo2 - -date_demo_convert - -date_demo_rrule - -date_index_formatter - -demo_agg_filter - -demo_annotation_box - -demo_bboximage - -demo_ribbon_box - -demo_text_path - -demo_text_rotation_mode - -demo_tight_layout - -demo_tight_layout - -demo_tight_layout - -demo_tight_layout - -demo_tight_layout - -demo_tight_layout - -demo_tight_layout - -demo_tight_layout - -dolphin - -ellipse_collection - -ellipse_demo - -ellipse_rotated - -equal_aspect_ratio - -errorbar_limits - -errorbar_limits - -errorbar_subsample - -eventcollection_demo - -eventplot_demo - -fancyarrow_demo - -fancybox_demo2 - -fancybox_demo - -fancytextbox_demo - -figimage_demo - -figlegend_demo - -figure_title - -fill_between_demo - -fill_between_demo - -fill_between_demo - -fill_betweenx_demo - -fill_betweenx_demo - -fill_spiral - -filledmarker_demo - -filledmarker_demo - -filledmarker_demo - -filledmarker_demo - -filledmarker_demo - -filledmarker_demo - -filledmarker_demo - -filledmarker_demo - -filledmarker_demo - -filledmarker_demo - -filledmarker_demo - -filledmarker_demo - -filledmarker_demo - -finance_demo - -finance_work2 - -findobj_demo - -fonts_demo - -fonts_demo_kw - -ganged_plots - -geo_demo - -gradient_bar - -griddata_demo - -hatch_demo - -hexbin_demo - -hexbin_demo2 - -hist2d_demo - -hist2d_log_demo - -hist_colormapped - -histogram_demo_extended - -histogram_demo_extended - -histogram_demo_extended - -histogram_demo_extended - -histogram_demo_extended - -histogram_demo_extended - -histogram_demo_extended - -histogram_percent_demo - -image_clip_path - -image_demo - -image_demo2 - -image_interp - -image_interp - -image_interp - -image_masked - -image_nonuniform - -image_origin - -image_slices_viewer - -interp_demo - -invert_axes - -layer_images - -legend_auto - -legend_auto - -legend_auto - -legend_auto - -legend_auto - -legend_auto - -legend_auto - -legend_auto - -legend_auto - -legend_auto - -legend_demo - -legend_demo2 - -legend_demo3 - -legend_demo4 - -legend_demo_custom_handler - -legend_scatter - -legend_translucent - -line_collection - -line_collection2 - -line_styles - -load_converter - -loadrec - -log_bar - -log_demo - -log_test - -logo - -major_minor_demo1 - -major_minor_demo2 - -manual_axis - -marker_path - -masked_demo - -mathtext_demo - -matshow - -matshow - -matshow - -mri_demo - -mri_with_eeg - -multi_image - -multicolored_line - -multicolored_line - -multiline - -multiple_figs_demo - -multiple_figs_demo - -multiple_yaxis_with_spines - -nan_test - -newscalarformatter_demo - -newscalarformatter_demo - -newscalarformatter_demo - -newscalarformatter_demo - -patheffect_demo - -pcolor_demo - -pcolor_log - -pcolor_small - -pie_demo2 - -plotfile_demo - -plotfile_demo - -plotfile_demo - -plotfile_demo - -plotfile_demo - -plotfile_demo - -plotfile_demo - -plotfile_demo - -polar_demo - -polar_legend - -psd_demo - -psd_demo2 - -psd_demo3 - -psd_demo_complex - -pythonic_matplotlib - -quadmesh_demo - -quiver_demo - -quiver_demo - -quiver_demo - -quiver_demo - -quiver_demo - -quiver_demo - -scatter_custom_symbol - -scatter_demo2 - -scatter_masked - -scatter_star_poly - -scatter_symbol - -set_and_get - -shading_example - -shared_axis_demo - -simple_plot - -specgram_demo - -spine_placement_demo - -spine_placement_demo - -spy_demos - -stackplot_demo2 - -stackplot_demo - -stackplot_demo - -stem_plot - -step_demo - -stix_fonts_demo - -stock_demo - -subplot_demo - -subplot_toolbar - -subplot_toolbar - -subplots_adjust - -subplots_demo - -subplots_demo - -subplots_demo - -subplots_demo - -subplots_demo - -subplots_demo - -subplots_demo - -symlog_demo - -table_demo - -tex_demo - -tex_unicode_demo - -text_handles - -text_rotation - -text_rotation_relative_to_line - -titles_demo - -to_numeric - -toggle_images - -transoffset - -tricontour_demo - -tricontour_demo - -tricontour_smooth_delaunay - -tricontour_smooth_user - -tricontour_vs_griddata - -trigradient_demo - -triinterp_demo - -tripcolor_demo - -tripcolor_demo - -tripcolor_demo - -triplot_demo - -triplot_demo - -usetex_baseline_test - -usetex_demo - -usetex_fonteffects - -vline_hline_demo - -xcorr_demo - -zorder_demo - -zorder_demo - -
      -
      -

      - mplot3d toolkit -

      -2dcollections3d_demo - -bars3d_demo - -contour3d_demo - -contour3d_demo2 - -contour3d_demo3 - -contourf3d_demo - -contourf3d_demo2 - -hist3d_demo - -lines3d_demo - -lorenz_attractor - -mixed_subplots_demo - -offset_demo - -pathpatch3d_demo - -polys3d_demo - -rotate_axes3d_demo - -scatter3d_demo - -subplot3d_demo - -surface3d_demo - -surface3d_demo2 - -surface3d_demo3 - -surface3d_radial_demo - -text3d_demo - -trisurf3d_demo - -trisurf3d_demo2 - -trisurf3d_demo2 - -wire3d_animation_demo - -wire3d_demo - -
      -
      -

      - axes_grid toolkit -

      -demo_axes_divider - -demo_axes_grid - -demo_axes_grid2 - -demo_axes_hbox_divider - -demo_axes_rgb - -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_parasite_axes2 - -inset_locator_demo - -inset_locator_demo2 - -make_room_for_ylabel_using_axesgrid - -make_room_for_ylabel_using_axesgrid - -make_room_for_ylabel_using_axesgrid - -parasite_simple2 - -simple_anchored_artists - -simple_axesgrid - -simple_axesgrid2 - -simple_axisline4 - -
      -
      -

      - widgets -

      -cursor - -slider_demo - -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/genindex.html b/dev/genindex.html deleted file mode 100644 index 01856965f2e..00000000000 --- a/dev/genindex.html +++ /dev/null @@ -1,12809 +0,0 @@ - - - - - - - - - Index — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      - - - - - -
      -
      - -
      -
      -
      -
      - - -

      Index

      - -
      - _ - | A - | B - | C - | D - | E - | F - | G - | H - | I - | J - | K - | L - | M - | N - | O - | P - | Q - | R - | S - | T - | U - | V - | W - | X - | Y - | Z - -
      -

      _

      - - -
      - -
      __call__() (matplotlib.tri.CubicTriInterpolator method) -
      - -
      - -
      (matplotlib.tri.LinearTriInterpolator method) -
      - - -
      (matplotlib.tri.TrapezoidMapTriFinder method) -
      - -
      -
      - -

      A

      - - - -
      - -
      Accent (class in matplotlib.mathtext) -
      - - -
      accent() (matplotlib.mathtext.Parser method) -
      - - -
      acorr() (in module matplotlib.pyplot) -
      - -
      - -
      (matplotlib.axes.Axes method) -
      - -
      - -
      add() (matplotlib.figure.AxesStack method) -
      - -
      - -
      (matplotlib.mlab.FIFOBuffer method) -
      - - -
      (matplotlib.sankey.Sankey method) -
      - -
      - -
      add_artist() (matplotlib.axes.Axes method) -
      - - -
      add_auto_adjustable_area() (mpl_toolkits.axes_grid.axes_divider.Divider method) -
      - - -
      add_axes() (matplotlib.figure.Figure method) -
      - - -
      add_axobserver() (matplotlib.figure.Figure method) -
      - - -
      add_callback() (matplotlib.artist.Artist method) -
      - -
      - -
      (matplotlib.backend_bases.TimerBase method) -
      - -
      - -
      add_checker() (matplotlib.cm.ScalarMappable method) -
      - - -
      add_collection() (matplotlib.axes.Axes method) -
      - - -
      add_collection3d() (mpl_toolkits.mplot3d.Axes3D method) -
      - -
      - -
      (mpl_toolkits.mplot3d.axes3d.Axes3D method) -
      - -
      - -
      add_container() (matplotlib.axes.Axes method) -
      - - -
      add_contour_set() (mpl_toolkits.mplot3d.axes3d.Axes3D method) -
      - - -
      add_contourf_set() (mpl_toolkits.mplot3d.axes3d.Axes3D method) -
      - - -
      add_line() (matplotlib.axes.Axes method) -
      - - -
      add_lines() (matplotlib.colorbar.Colorbar method) -
      - -
      - -
      (matplotlib.colorbar.ColorbarBase method) -
      - -
      - -
      add_patch() (matplotlib.axes.Axes method) -
      - - -
      add_positions() (matplotlib.collections.EventCollection method) -
      - - -
      add_subplot() (matplotlib.figure.Figure method) -
      - - -
      add_table() (matplotlib.axes.Axes method) -
      - - -
      Affine2D (class in matplotlib.transforms) -
      - - -
      Affine2DBase (class in matplotlib.transforms) -
      - - -
      AffineBase (class in matplotlib.transforms) -
      - - -
      AFM (class in matplotlib.afm) -
      - - -
      afmFontProperty() (in module matplotlib.font_manager) -
      - - -
      AGG -
      - - -
      alias (matplotlib.mathtext.BakomaFonts attribute) -
      - - -
      aliased_name() (matplotlib.artist.ArtistInspector method) -
      - - -
      aliased_name_rest() (matplotlib.artist.ArtistInspector method) -
      - - -
      align_iterators() (in module matplotlib.cbook) -
      - - -
      allequal() (in module matplotlib.cbook) -
      - - -
      allow_rasterization() (in module matplotlib.artist) -
      - - -
      allowed_metadata (matplotlib.animation.MencoderBase attribute) -
      - - -
      allpairs() (in module matplotlib.cbook) -
      - - -
      alltrue() (in module matplotlib.cbook) -
      - - -
      alphaState() (matplotlib.backends.backend_pdf.PdfFile method) -
      - - -
      amap() (in module matplotlib.mlab) -
      - - -
      aname (matplotlib.artist.Artist attribute) -
      - - -
      anchored() (matplotlib.transforms.BboxBase method) -
      - - -
      Animation (class in matplotlib.animation) -
      - - -
      annotate() (in module matplotlib.pyplot) -
      - -
      - -
      (matplotlib.axes.Axes method) -
      - -
      - -
      Annotation (class in matplotlib.text) -
      - - -
      append() (matplotlib.cbook.RingBuffer method) -
      - - -
      append_axes() (mpl_toolkits.axes_grid.axes_divider.AxesDivider method) -
      - - -
      append_positions() (matplotlib.collections.EventCollection method) -
      - - -
      append_size() (mpl_toolkits.axes_grid.axes_divider.Divider method) -
      - - -
      apply_aspect() (matplotlib.axes.Axes method) -
      - - -
      apply_tickdir() (matplotlib.axis.Tick method) -
      - -
      - -
      (matplotlib.axis.XTick method) -
      - - -
      (matplotlib.axis.YTick method) -
      - -
      - -
      Arc (class in matplotlib.patches) -
      - - -
      arc() (matplotlib.path.Path class method) -
      - - -
      args_key (matplotlib.animation.AVConvBase attribute) -
      - -
      - -
      (matplotlib.animation.FFMpegBase attribute) -
      - - -
      (matplotlib.animation.ImageMagickBase attribute) -
      - - -
      (matplotlib.animation.MencoderBase attribute) -
      - -
      - -
      Arrow (class in matplotlib.patches) -
      - - -
      arrow() (in module matplotlib.pyplot) -
      - -
      - -
      (matplotlib.axes.Axes method) -
      - -
      - -
      ArrowStyle (class in matplotlib.patches) -
      - - -
      ArrowStyle.BarAB (class in matplotlib.patches) -
      - - -
      ArrowStyle.BracketA (class in matplotlib.patches) -
      - - -
      ArrowStyle.BracketAB (class in matplotlib.patches) -
      - - -
      ArrowStyle.BracketB (class in matplotlib.patches) -
      - -
      - -
      ArrowStyle.Curve (class in matplotlib.patches) -
      - - -
      ArrowStyle.CurveA (class in matplotlib.patches) -
      - - -
      ArrowStyle.CurveAB (class in matplotlib.patches) -
      - - -
      ArrowStyle.CurveB (class in matplotlib.patches) -
      - - -
      ArrowStyle.CurveFilledA (class in matplotlib.patches) -
      - - -
      ArrowStyle.CurveFilledAB (class in matplotlib.patches) -
      - - -
      ArrowStyle.CurveFilledB (class in matplotlib.patches) -
      - - -
      ArrowStyle.Fancy (class in matplotlib.patches) -
      - - -
      ArrowStyle.Simple (class in matplotlib.patches) -
      - - -
      ArrowStyle.Wedge (class in matplotlib.patches) -
      - - -
      Artist (class in matplotlib.artist) -
      - - -
      artist_picker() (matplotlib.legend.DraggableLegend method) -
      - - -
      ArtistAnimation (class in matplotlib.animation) -
      - - -
      ArtistInspector (class in matplotlib.artist) -
      - - -
      as_list() (matplotlib.figure.AxesStack method) -
      - - -
      asarrays() (matplotlib.mlab.FIFOBuffer method) -
      - - -
      AsteriskPolygonCollection (class in matplotlib.collections) -
      - - -
      auto_adjust_subplotpars() (in module matplotlib.tight_layout) -
      - - -
      auto_delim() (matplotlib.mathtext.Parser method) -
      - - -
      auto_scale_xyz() (mpl_toolkits.mplot3d.axes3d.Axes3D method) -
      - - -
      AutoDateFormatter (class in matplotlib.dates) -
      - - -
      AutoDateLocator (class in matplotlib.dates) -
      - - -
      autofmt_xdate() (matplotlib.figure.Figure method) -
      - - -
      AutoHeightChar (class in matplotlib.mathtext) -
      - - -
      AutoLocator (class in matplotlib.ticker) -
      - - -
      AutoMinorLocator (class in matplotlib.ticker) -
      - - -
      autoscale() (in module matplotlib.pyplot) -
      - -
      - -
      (matplotlib.axes.Axes method) -
      - - -
      (matplotlib.cm.ScalarMappable method) -
      - - -
      (matplotlib.colors.LogNorm method) -
      - - -
      (matplotlib.colors.Normalize method) -
      - - -
      (matplotlib.colors.SymLogNorm method) -
      - - -
      (matplotlib.dates.AutoDateLocator method) -
      - - -
      (matplotlib.dates.RRuleLocator method) -
      - - -
      (matplotlib.dates.YearLocator method) -
      - - -
      (matplotlib.ticker.Locator method) -
      - - -
      (mpl_toolkits.mplot3d.axes3d.Axes3D method) -
      - -
      - -
      autoscale_None() (matplotlib.cm.ScalarMappable method) -
      - -
      - -
      (matplotlib.colors.LogNorm method) -
      - - -
      (matplotlib.colors.Normalize method) -
      - - -
      (matplotlib.colors.SymLogNorm method) -
      - -
      - -
      autoscale_view() (matplotlib.axes.Axes method) -
      - -
      - -
      (mpl_toolkits.mplot3d.axes3d.Axes3D method) -
      - -
      - -
      AutoWidthChar (class in matplotlib.mathtext) -
      - - -
      autumn() (in module matplotlib.pyplot) -
      - - -
      available() (matplotlib.widgets.LockDraw method) -
      - - -
      AVConvBase (class in matplotlib.animation) -
      - - -
      AVConvFileWriter (class in matplotlib.animation) -
      - - -
      AVConvWriter (class in matplotlib.animation) -
      - - -
      Axes (class in matplotlib.axes) -
      - - -
      axes (matplotlib.figure.Figure attribute) -
      - - -
      axes() (in module matplotlib.pyplot) -
      - - -
      Axes3D (class in mpl_toolkits.mplot3d.axes3d) -
      - - -
      AxesDivider (class in mpl_toolkits.axes_grid.axes_divider) -
      - - -
      AxesLocator (class in mpl_toolkits.axes_grid.axes_divider) -
      - - -
      AxesStack (class in matplotlib.figure) -
      - - -
      AxesWidget (class in matplotlib.widgets) -
      - - -
      AxesX (class in mpl_toolkits.axes_grid.axes_size) -
      - - -
      AxesY (class in mpl_toolkits.axes_grid.axes_size) -
      - - -
      axhline() (in module matplotlib.pyplot) -
      - -
      - -
      (matplotlib.axes.Axes method) -
      - -
      - -
      axhspan() (in module matplotlib.pyplot) -
      - -
      - -
      (matplotlib.axes.Axes method) -
      - -
      - -
      Axis (class in matplotlib.axis) -
      - -
      - -
      (class in mpl_toolkits.mplot3d.axis3d) -
      - -
      - -
      axis (matplotlib.ticker.TickHelper attribute) -
      - - -
      axis() (in module matplotlib.pyplot) -
      - -
      - -
      (matplotlib.axes.Axes method) -
      - -
      - -
      axis_date() (matplotlib.axis.Axis method) -
      - - -
      axis_name (matplotlib.axis.XAxis attribute) -
      - -
      - -
      (matplotlib.axis.YAxis attribute) -
      - -
      - -
      AxisArtist (class in mpl_toolkits.axes_grid.axis_artist) -
      - - -
      AxisInfo (class in matplotlib.units) -
      - - -
      axisinfo() (matplotlib.units.ConversionInterface static method) -
      - - -
      AxisLabel (class in mpl_toolkits.axes_grid.axis_artist) -
      - - -
      axvline() (in module matplotlib.pyplot) -
      - -
      - -
      (matplotlib.axes.Axes method) -
      - -
      - -
      axvspan() (in module matplotlib.pyplot) -
      - -
      - -
      (matplotlib.axes.Axes method) -
      - -
      -
      - -

      B

      - - - -
      - -
      back() (matplotlib.backend_bases.NavigationToolbar2 method) -
      - -
      - -
      (matplotlib.cbook.Stack method) -
      - -
      - -
      BakomaFonts (class in matplotlib.mathtext) -
      - - -
      bar() (in module matplotlib.pyplot) -
      - -
      - -
      (matplotlib.axes.Axes method) -
      - - -
      (mpl_toolkits.mplot3d.Axes3D method) -
      - - -
      (mpl_toolkits.mplot3d.axes3d.Axes3D method) -
      - -
      - -
      bar3d() (mpl_toolkits.mplot3d.axes3d.Axes3D method) -
      - - -
      barbs() (in module matplotlib.pyplot) -
      - -
      - -
      (matplotlib.axes.Axes method) -
      - -
      - -
      barh() (in module matplotlib.pyplot) -
      - -
      - -
      (matplotlib.axes.Axes method) -
      - -
      - -
      base() (matplotlib.ticker.LogFormatter method) -
      - -
      - -
      (matplotlib.ticker.LogLocator method) -
      - -
      - -
      base_repr() (in module matplotlib.mlab) -
      - - -
      basepath (matplotlib.mathtext.StandardPsFonts attribute) -
      - - -
      Bbox (class in matplotlib.transforms) -
      - - -
      bbox_artist() (in module matplotlib.patches) -
      - - -
      BboxBase (class in matplotlib.transforms) -
      - - -
      BboxTransform (class in matplotlib.transforms) -
      - - -
      BboxTransformFrom (class in matplotlib.transforms) -
      - - -
      BboxTransformTo (class in matplotlib.transforms) -
      - - -
      bin_boundaries() (matplotlib.ticker.MaxNLocator method) -
      - - -
      bin_path() (matplotlib.animation.MovieWriter class method) -
      - - -
      binary_repr() (in module matplotlib.mlab) -
      - - -
      binom() (matplotlib.mathtext.Parser method) -
      - - -
      bivariate_normal() (in module matplotlib.mlab) -
      - - -
      blended_transform_factory() (in module matplotlib.transforms) -
      - - -
      BlendedAffine2D (class in matplotlib.transforms) -
      - - -
      BlendedGenericTransform (class in matplotlib.transforms) -
      - - -
      blit() (matplotlib.backend_bases.FigureCanvasBase method) -
      - -
      - -
      (matplotlib.backends.backend_qt4agg.FigureCanvasQTAgg method) -
      - - -
      (matplotlib.backends.backend_wxagg.FigureCanvasWxAgg method) -
      - -
      -
      - -
      bone() (in module matplotlib.pyplot) -
      - - -
      BoundaryNorm (class in matplotlib.colors) -
      - - -
      bounds (matplotlib.transforms.BboxBase attribute) -
      - - -
      Box (class in matplotlib.mathtext) -
      - - -
      box() (in module matplotlib.pyplot) -
      - - -
      boxplot() (in module matplotlib.pyplot) -
      - -
      - -
      (matplotlib.axes.Axes method) -
      - -
      - -
      BoxStyle (class in matplotlib.patches) -
      - - -
      BoxStyle.LArrow (class in matplotlib.patches) -
      - - -
      BoxStyle.RArrow (class in matplotlib.patches) -
      - - -
      BoxStyle.Round (class in matplotlib.patches) -
      - - -
      BoxStyle.Round4 (class in matplotlib.patches) -
      - - -
      BoxStyle.Roundtooth (class in matplotlib.patches) -
      - - -
      BoxStyle.Sawtooth (class in matplotlib.patches) -
      - - -
      BoxStyle.Square (class in matplotlib.patches) -
      - - -
      broken_barh() (in module matplotlib.pyplot) -
      - -
      - -
      (matplotlib.axes.Axes method) -
      - -
      - -
      BrokenBarHCollection (class in matplotlib.collections) -
      - - -
      bubble() (matplotlib.cbook.Stack method) -
      - -
      - -
      (matplotlib.figure.AxesStack method) -
      - -
      - -
      Bunch (class in matplotlib.cbook) -
      - - -
      Button (class in matplotlib.widgets) -
      - - -
      button (matplotlib.backend_bases.MouseEvent attribute) -
      - - -
      button_press_event() (matplotlib.backend_bases.FigureCanvasBase method) -
      - - -
      button_release_event() (matplotlib.backend_bases.FigureCanvasBase method) -
      - - -
      byAttribute() (matplotlib.cbook.Sorter method) -
      - - -
      byItem() (matplotlib.cbook.Sorter method) -
      - -
      - -

      C

      - - - -
      - -
      c_over_c() (matplotlib.mathtext.Parser method) -
      - - -
      cache (matplotlib.colors.ColorConverter attribute) -
      - - -
      cached (matplotlib.text.Text attribute) -
      - - -
      Cairo -
      - - -
      calculate_plane_coefficients() (matplotlib.tri.Triangulation method) -
      - - -
      CallbackRegistry (class in matplotlib.cbook) -
      - - -
      can_pan() (matplotlib.axes.Axes method) -
      - -
      - -
      (matplotlib.projections.polar.PolarAxes method) -
      - - -
      (mpl_toolkits.mplot3d.axes3d.Axes3D method) -
      - -
      - -
      can_zoom() (matplotlib.axes.Axes method) -
      - -
      - -
      (matplotlib.projections.polar.PolarAxes method) -
      - - -
      (mpl_toolkits.mplot3d.axes3d.Axes3D method) -
      - -
      - -
      center() (matplotlib.mlab.PCA method) -
      - - -
      center_matrix() (in module matplotlib.mlab) -
      - - -
      change_geometry() (matplotlib.axes.SubplotBase method) -
      - -
      - -
      (mpl_toolkits.axes_grid.axes_divider.SubplotDivider method) -
      - -
      - -
      changed() (matplotlib.cm.ScalarMappable method) -
      - - -
      Char (class in matplotlib.mathtext) -
      - - -
      check_update() (matplotlib.cm.ScalarMappable method) -
      - - -
      CheckButtons (class in matplotlib.widgets) -
      - - -
      checksum (matplotlib.dviread.Tfm attribute), [1] -
      - - -
      Circle (class in matplotlib.patches) -
      - - -
      circle_ratios() (matplotlib.tri.TriAnalyzer method) -
      - - -
      CircleCollection (class in matplotlib.collections) -
      - - -
      CirclePolygon (class in matplotlib.patches) -
      - - -
      circular_spine() (matplotlib.spines.Spine class method) -
      - - -
      cla() (in module matplotlib.pyplot) -
      - -
      - -
      (matplotlib.axes.Axes method) -
      - - -
      (matplotlib.axis.Axis method) -
      - - -
      (matplotlib.spines.Spine method) -
      - - -
      (mpl_toolkits.mplot3d.axes3d.Axes3D method) -
      - -
      - -
      clabel() (in module matplotlib.pyplot) -
      - -
      - -
      (matplotlib.axes.Axes method) -
      - - -
      (mpl_toolkits.mplot3d.axes3d.Axes3D method) -
      - -
      - -
      clamp() (matplotlib.mathtext.Ship static method) -
      - - -
      clean() (matplotlib.cbook.Grouper method) -
      - - -
      cleanup() (matplotlib.animation.FileMovieWriter method) -
      - -
      - -
      (matplotlib.animation.MovieWriter method) -
      - -
      - -
      cleanup_path() (in module matplotlib.path) -
      - - -
      clear() (matplotlib.axes.Axes method) -
      - -
      - -
      (matplotlib.cbook.MemoryMonitor method) -
      - - -
      (matplotlib.cbook.Stack method) -
      - - -
      (matplotlib.figure.Figure method) -
      - - -
      (matplotlib.transforms.Affine2D method) -
      - - -
      (matplotlib.widgets.Cursor method) -
      - - -
      (matplotlib.widgets.MultiCursor method) -
      - -
      - -
      clf() (in module matplotlib.pyplot) -
      - -
      - -
      (matplotlib.figure.Figure method) -
      - -
      - -
      clim() (in module matplotlib.pyplot) -
      - - -
      clip_path_to_rect() (in module matplotlib.path) -
      - - -
      clip_to_bbox() (matplotlib.path.Path method) -
      - - -
      close() (in module matplotlib.pyplot) -
      - -
      - -
      (matplotlib.backends.backend_pdf.PdfPages method) -
      - - -
      (matplotlib.dviread.Dvi method) -
      - -
      - -
      close_event() (matplotlib.backend_bases.FigureCanvasBase method) -
      - - -
      close_group() (matplotlib.backend_bases.RendererBase method) -
      - - -
      CloseEvent (class in matplotlib.backend_bases) -
      - - -
      CLOSEPOLY (matplotlib.path.Path attribute) -
      - - -
      cm_fallback (matplotlib.mathtext.StixFonts attribute) -
      - - -
      code_type (matplotlib.path.Path attribute) -
      - - -
      codes (matplotlib.legend.Legend attribute) -
      - - -
      cohere() (in module matplotlib.mlab) -
      - -
      - -
      (in module matplotlib.pyplot) -
      - - -
      (matplotlib.axes.Axes method) -
      - -
      - -
      cohere_pairs() (in module matplotlib.mlab) -
      - - -
      Collection (class in matplotlib.collections) -
      - - -
      color() (matplotlib.collections.LineCollection method) -
      - - -
      Colorbar (class in matplotlib.colorbar) -
      - - -
      colorbar() (in module matplotlib.pyplot) -
      - -
      - -
      (matplotlib.figure.Figure method) -
      - -
      - -
      colorbar_factory() (in module matplotlib.colorbar) -
      - - -
      ColorbarBase (class in matplotlib.colorbar) -
      - - -
      ColorbarPatch (class in matplotlib.colorbar) -
      - - -
      ColorConverter (class in matplotlib.colors) -
      - - -
      Colormap (class in matplotlib.colors) -
      - - -
      colormaps() (in module matplotlib.pyplot) -
      - - -
      colors (matplotlib.colors.ColorConverter attribute) -
      - - -
      colors() (in module matplotlib.pyplot) -
      - - -
      composite_transform_factory() (in module matplotlib.transforms) -
      - - -
      CompositeAffine2D (class in matplotlib.transforms) -
      - -
      - -
      CompositeGenericTransform (class in matplotlib.transforms) -
      - - -
      config_axis() (matplotlib.colorbar.ColorbarBase method) -
      - - -
      connect() (in module matplotlib.pyplot) -
      - -
      - -
      (matplotlib.cbook.CallbackRegistry method) -
      - - -
      (matplotlib.patches.ConnectionStyle.Angle method) -
      - - -
      (matplotlib.patches.ConnectionStyle.Angle3 method) -
      - - -
      (matplotlib.patches.ConnectionStyle.Arc method) -
      - - -
      (matplotlib.patches.ConnectionStyle.Arc3 method) -
      - - -
      (matplotlib.patches.ConnectionStyle.Bar method) -
      - -
      - -
      connect_event() (matplotlib.widgets.AxesWidget method) -
      - - -
      ConnectionPatch (class in matplotlib.patches) -
      - - -
      ConnectionStyle (class in matplotlib.patches) -
      - - -
      ConnectionStyle.Angle (class in matplotlib.patches) -
      - - -
      ConnectionStyle.Angle3 (class in matplotlib.patches) -
      - - -
      ConnectionStyle.Arc (class in matplotlib.patches) -
      - - -
      ConnectionStyle.Arc3 (class in matplotlib.patches) -
      - - -
      ConnectionStyle.Bar (class in matplotlib.patches) -
      - - -
      contains() (matplotlib.artist.Artist method) -
      - -
      - -
      (matplotlib.axes.Axes method) -
      - - -
      (matplotlib.axis.Tick method) -
      - - -
      (matplotlib.axis.XAxis method) -
      - - -
      (matplotlib.axis.YAxis method) -
      - - -
      (matplotlib.collections.Collection method) -
      - - -
      (matplotlib.figure.Figure method) -
      - - -
      (matplotlib.legend.Legend method) -
      - - -
      (matplotlib.lines.Line2D method) -
      - - -
      (matplotlib.patches.Ellipse method) -
      - - -
      (matplotlib.patches.Patch method) -
      - - -
      (matplotlib.patches.Rectangle method) -
      - - -
      (matplotlib.text.Annotation method) -
      - - -
      (matplotlib.text.Text method) -
      - - -
      (matplotlib.transforms.BboxBase method) -
      - -
      - -
      contains_branch() (matplotlib.transforms.Transform method) -
      - - -
      contains_branch_seperately() (matplotlib.transforms.Transform method) -
      - - -
      contains_path() (matplotlib.path.Path method) -
      - - -
      contains_point() (matplotlib.axes.Axes method) -
      - -
      - -
      (matplotlib.patches.Patch method) -
      - - -
      (matplotlib.path.Path method) -
      - -
      - -
      contains_points() (matplotlib.path.Path method) -
      - - -
      containsx() (matplotlib.transforms.BboxBase method) -
      - - -
      containsy() (matplotlib.transforms.BboxBase method) -
      - - -
      contiguous_regions() (in module matplotlib.mlab) -
      - - -
      contour() (in module matplotlib.pyplot) -
      - -
      - -
      (matplotlib.axes.Axes method) -
      - - -
      (mpl_toolkits.mplot3d.Axes3D method) -
      - - -
      (mpl_toolkits.mplot3d.axes3d.Axes3D method) -
      - -
      - -
      contour3D() (mpl_toolkits.mplot3d.axes3d.Axes3D method) -
      - - -
      contourf() (in module matplotlib.pyplot) -
      - -
      - -
      (matplotlib.axes.Axes method) -
      - - -
      (mpl_toolkits.mplot3d.Axes3D method) -
      - - -
      (mpl_toolkits.mplot3d.axes3d.Axes3D method) -
      - -
      - -
      contourf3D() (mpl_toolkits.mplot3d.axes3d.Axes3D method) -
      - - -
      ConversionInterface (class in matplotlib.units) -
      - - -
      convert() (matplotlib.units.ConversionInterface static method) -
      - - -
      convert_mesh_to_paths() (matplotlib.collections.QuadMesh static method) -
      - -
      - -
      (matplotlib.collections.TriMesh static method) -
      - -
      - -
      convert_mesh_to_triangles() (matplotlib.collections.QuadMesh method) -
      - - -
      convert_path_to_polygons() (in module matplotlib.path) -
      - - -
      convert_units() (matplotlib.axis.Axis method) -
      - - -
      convert_xunits() (matplotlib.artist.Artist method) -
      - - -
      convert_yunits() (matplotlib.artist.Artist method) -
      - - -
      convert_zunits() (mpl_toolkits.mplot3d.axes3d.Axes3D method) -
      - - -
      converter (class in matplotlib.cbook) -
      - - -
      cool() (in module matplotlib.pyplot) -
      - - -
      copper() (in module matplotlib.pyplot) -
      - - -
      copy() (matplotlib.font_manager.FontProperties method) -
      - -
      - -
      (matplotlib.mathtext.GlueSpec method) -
      - - -
      (matplotlib.mathtext.Parser.State method) -
      - -
      - -
      copy_properties() (matplotlib.backend_bases.GraphicsContextBase method) -
      - - -
      corners() (matplotlib.transforms.BboxBase method) -
      - - -
      count_contains() (matplotlib.transforms.BboxBase method) -
      - - -
      count_overlaps() (matplotlib.transforms.BboxBase method) -
      - - -
      create_dummy_axis() (matplotlib.ticker.TickHelper method) -
      - - -
      createFontList() (in module matplotlib.font_manager) -
      - - -
      cross_from_above() (in module matplotlib.mlab) -
      - - -
      cross_from_below() (in module matplotlib.mlab) -
      - - -
      csd() (in module matplotlib.mlab) -
      - -
      - -
      (in module matplotlib.pyplot) -
      - - -
      (matplotlib.axes.Axes method) -
      - -
      - -
      csv2rec() (in module matplotlib.mlab) -
      - - -
      csvformat_factory() (in module matplotlib.mlab) -
      - - -
      CubicTriInterpolator (class in matplotlib.tri) -
      - - -
      current_key_axes() (matplotlib.figure.AxesStack method) -
      - - -
      Cursor (class in matplotlib.widgets) -
      - - -
      Cursors (class in matplotlib.backend_bases) -
      - - -
      CURVE3 (matplotlib.path.Path attribute) -
      - - -
      CURVE4 (matplotlib.path.Path attribute) -
      - - -
      customspace() (matplotlib.mathtext.Parser method) -
      - -
      - -

      D

      - - - -
      - -
      dashd (matplotlib.backend_bases.GraphicsContextBase attribute) -
      - - -
      datalim_to_dt() (matplotlib.dates.DateLocator method) -
      - - -
      date2num() (in module matplotlib.dates) -
      - - -
      DateFormatter (class in matplotlib.dates) -
      - - -
      DateLocator (class in matplotlib.dates) -
      - - -
      dateutil -
      - - -
      DayLocator (class in matplotlib.dates) -
      - - -
      dblclick (matplotlib.backend_bases.MouseEvent attribute) -
      - - -
      dedent() (in module matplotlib.cbook) -
      - - -
      default_params (matplotlib.ticker.MaxNLocator attribute) -
      - - -
      default_units() (matplotlib.units.ConversionInterface static method) -
      - - -
      delaxes() (in module matplotlib.pyplot) -
      - -
      - -
      (matplotlib.figure.Figure method) -
      - -
      - -
      delay (matplotlib.animation.ImageMagickBase attribute) -
      - - -
      delete_masked_points() (in module matplotlib.cbook) -
      - - -
      demean() (in module matplotlib.mlab) -
      - - -
      depth (matplotlib.dviread.Tfm attribute), [1] -
      - -
      - -
      (matplotlib.mathtext.Kern attribute) -
      - - -
      (matplotlib.transforms.Transform attribute) -
      - -
      - -
      design_size (matplotlib.dviread.Tfm attribute), [1] -
      - - -
      destroy() (matplotlib.backend_bases.FigureManagerBase method) -
      - -
      - -
      (matplotlib.mathtext.Fonts method) -
      - - -
      (matplotlib.mathtext.TruetypeFonts method) -
      - -
      - -
      detrend() (in module matplotlib.mlab) -
      - - -
      detrend_linear() (in module matplotlib.mlab) -
      - - -
      detrend_mean() (in module matplotlib.mlab) -
      - - -
      detrend_none() (in module matplotlib.mlab) -
      - - -
      dict_delall() (in module matplotlib.cbook) -
      - - -
      disable_mouse_rotation() (mpl_toolkits.mplot3d.axes3d.Axes3D method) -
      - - -
      disconnect() (in module matplotlib.pyplot) -
      - -
      - -
      (matplotlib.cbook.CallbackRegistry method) -
      - - -
      (matplotlib.widgets.Button method) -
      - - -
      (matplotlib.widgets.CheckButtons method) -
      - - -
      (matplotlib.widgets.RadioButtons method) -
      - - -
      (matplotlib.widgets.Slider method) -
      - -
      - -
      disconnect_events() (matplotlib.widgets.AxesWidget method) -
      - - -
      dist() (in module matplotlib.mlab) -
      - - -
      dist_point_to_segment() (in module matplotlib.mlab) -
      - - -
      distances_along_curve() (in module matplotlib.mlab) -
      - - -
      Divider (class in mpl_toolkits.axes_grid.axes_divider) -
      - - -
      do_3d_projection() (mpl_toolkits.mplot3d.art3d.Line3DCollection method) -
      - -
      - -
      (mpl_toolkits.mplot3d.art3d.Patch3D method) -
      - - -
      (mpl_toolkits.mplot3d.art3d.Patch3DCollection method) -
      - - -
      (mpl_toolkits.mplot3d.art3d.PathPatch3D method) -
      - - -
      (mpl_toolkits.mplot3d.art3d.Poly3DCollection method) -
      - -
      - -
      donothing_callback() (in module matplotlib.mlab) -
      - - -
      dpi (matplotlib.figure.Figure attribute) -
      - -
      - -
      drag_pan() (matplotlib.axes.Axes method) -
      - -
      - -
      (matplotlib.backend_bases.NavigationToolbar2 method) -
      - -
      - -
      drag_zoom() (matplotlib.backend_bases.NavigationToolbar2 method) -
      - - -
      draggable() (matplotlib.legend.Legend method) -
      - - -
      DraggableLegend (class in matplotlib.legend) -
      - - -
      drange() (in module matplotlib.dates) -
      - - -
      draw() (in module matplotlib.pyplot) -
      - -
      - -
      (matplotlib.artist.Artist method) -
      - - -
      (matplotlib.axes.Axes method) -
      - - -
      (matplotlib.axis.Axis method) -
      - - -
      (matplotlib.axis.Tick method) -
      - - -
      (matplotlib.backend_bases.FigureCanvasBase method) -
      - - -
      (matplotlib.backend_bases.NavigationToolbar2 method) -
      - - -
      (matplotlib.backends.backend_qt4agg.FigureCanvasQTAgg method) -
      - - -
      (matplotlib.backends.backend_wxagg.FigureCanvasWxAgg method) -
      - - -
      (matplotlib.collections.CircleCollection method) -
      - - -
      (matplotlib.collections.Collection method) -
      - - -
      (matplotlib.collections.EllipseCollection method) -
      - - -
      (matplotlib.collections.PathCollection method) -
      - - -
      (matplotlib.collections.PolyCollection method) -
      - - -
      (matplotlib.collections.QuadMesh method) -
      - - -
      (matplotlib.collections.RegularPolyCollection method) -
      - - -
      (matplotlib.collections.TriMesh method) -
      - - -
      (matplotlib.figure.Figure method) -
      - - -
      (matplotlib.legend.Legend method) -
      - - -
      (matplotlib.lines.Line2D method) -
      - - -
      (matplotlib.patches.Arc method) -
      - - -
      (matplotlib.patches.ConnectionPatch method) -
      - - -
      (matplotlib.patches.FancyArrowPatch method) -
      - - -
      (matplotlib.patches.Patch method) -
      - - -
      (matplotlib.patches.Shadow method) -
      - - -
      (matplotlib.spines.Spine method) -
      - - -
      (matplotlib.text.Annotation method) -
      - - -
      (matplotlib.text.Text method) -
      - - -
      (matplotlib.text.TextWithDash method) -
      - - -
      (mpl_toolkits.axes_grid.axis_artist.AxisArtist method) -
      - - -
      (mpl_toolkits.mplot3d.art3d.Line3D method) -
      - - -
      (mpl_toolkits.mplot3d.art3d.Line3DCollection method) -
      - - -
      (mpl_toolkits.mplot3d.art3d.Patch3D method) -
      - - -
      (mpl_toolkits.mplot3d.art3d.Patch3DCollection method) -
      - - -
      (mpl_toolkits.mplot3d.art3d.Poly3DCollection method) -
      - - -
      (mpl_toolkits.mplot3d.art3d.Text3D method) -
      - - -
      (mpl_toolkits.mplot3d.axes3d.Axes3D method) -
      - - -
      (mpl_toolkits.mplot3d.axis3d.Axis method) -
      - -
      - -
      draw_all() (matplotlib.colorbar.ColorbarBase method) -
      - - -
      draw_artist() (matplotlib.axes.Axes method) -
      - -
      - -
      (matplotlib.figure.Figure method) -
      - -
      - -
      draw_bbox() (in module matplotlib.patches) -
      - - -
      draw_cursor() (matplotlib.backend_bases.FigureCanvasBase method) -
      - - -
      draw_event() (matplotlib.backend_bases.FigureCanvasBase method) -
      - - -
      draw_frame() (matplotlib.legend.Legend method) -
      - - -
      draw_gouraud_triangle() (matplotlib.backend_bases.RendererBase method) -
      - - -
      draw_gouraud_triangles() (matplotlib.backend_bases.RendererBase method) -
      - - -
      draw_idle() (matplotlib.backend_bases.FigureCanvasBase method) -
      - - -
      draw_image() (matplotlib.backend_bases.RendererBase method) -
      - - -
      draw_markers() (matplotlib.backend_bases.RendererBase method) -
      - - -
      draw_pane() (mpl_toolkits.mplot3d.axis3d.Axis method) -
      - - -
      draw_path() (matplotlib.backend_bases.RendererBase method) -
      - - -
      draw_path_collection() (matplotlib.backend_bases.RendererBase method) -
      - - -
      draw_quad_mesh() (matplotlib.backend_bases.RendererBase method) -
      - - -
      draw_rubberband() (matplotlib.backend_bases.NavigationToolbar2 method) -
      - - -
      draw_tex() (matplotlib.backend_bases.RendererBase method) -
      - - -
      draw_text() (matplotlib.backend_bases.RendererBase method) -
      - - -
      DrawEvent (class in matplotlib.backend_bases) -
      - - -
      drawon (matplotlib.widgets.Widget attribute) -
      - - -
      drawRectangle() (matplotlib.backends.backend_qt4agg.FigureCanvasQTAgg method) -
      - - -
      drawStyleKeys (matplotlib.lines.Line2D attribute) -
      - - -
      drawStyles (matplotlib.lines.Line2D attribute) -
      - - -
      Dvi (class in matplotlib.dviread) -
      - - -
      DviFont (class in matplotlib.dviread) -
      - - -
      dynamic_update() (matplotlib.backend_bases.NavigationToolbar2 method) -
      - -
      - -

      E

      - - - -
      - -
      Ellipse (class in matplotlib.patches) -
      - - -
      EllipseCollection (class in matplotlib.collections) -
      - - -
      embedTTF() (matplotlib.backends.backend_pdf.PdfFile method) -
      - - -
      empty() (matplotlib.cbook.Stack method) -
      - - -
      Encoding (class in matplotlib.dviread) -
      - - -
      encoding (matplotlib.dviread.Encoding attribute) -
      - - -
      end() (matplotlib.backends.backend_pdf.Stream method) -
      - - -
      end_group() (matplotlib.mathtext.Parser method) -
      - - -
      end_pan() (matplotlib.axes.Axes method) -
      - - -
      enter_notify_event() (matplotlib.backend_bases.FigureCanvasBase method) -
      - - -
      entropy() (in module matplotlib.mlab) -
      - - -
      - environment variable -
      - -
      - -
      HOME, [1], [2], [3] -
      - - -
      MPLCONFIGDIR, [1], [2] -
      - - -
      PATH, [1], [2], [3], [4], [5] -
      - - -
      PYTHONPATH, [1], [2] -
      - -
      - -
      epoch2num() (in module matplotlib.dates) -
      - - -
      EPS -
      - -
      - -
      Error() (in module matplotlib.mathtext) -
      - - -
      errorbar() (in module matplotlib.pyplot) -
      - -
      - -
      (matplotlib.axes.Axes method) -
      - -
      - -
      Event (class in matplotlib.backend_bases) -
      - - -
      EventCollection (class in matplotlib.collections) -
      - - -
      eventplot() (in module matplotlib.pyplot) -
      - -
      - -
      (matplotlib.axes.Axes method) -
      - -
      - -
      events (matplotlib.backend_bases.FigureCanvasBase attribute) -
      - - -
      eventson (matplotlib.widgets.Widget attribute) -
      - - -
      exception_to_str() (in module matplotlib.cbook) -
      - - -
      exec_key (matplotlib.animation.AVConvBase attribute) -
      - -
      - -
      (matplotlib.animation.FFMpegBase attribute) -
      - - -
      (matplotlib.animation.ImageMagickBase attribute) -
      - - -
      (matplotlib.animation.MencoderBase attribute) -
      - -
      - -
      exp_safe() (in module matplotlib.mlab) -
      - - -
      expanded() (matplotlib.transforms.BboxBase method) -
      - - -
      extend_positions() (matplotlib.collections.EventCollection method) -
      - - -
      extents (matplotlib.transforms.BboxBase attribute) -
      - -
      - -

      F

      - - - -
      - -
      factory() (matplotlib.mathtext.GlueSpec class method) -
      - - -
      family_escape() (in module matplotlib.fontconfig_pattern) -
      - - -
      family_unescape() (in module matplotlib.fontconfig_pattern) -
      - - -
      FancyArrow (class in matplotlib.patches) -
      - - -
      FancyArrowPatch (class in matplotlib.patches) -
      - - -
      FancyBboxPatch (class in matplotlib.patches) -
      - - -
      FFMpegBase (class in matplotlib.animation) -
      - - -
      FFMpegFileWriter (class in matplotlib.animation) -
      - - -
      FFMpegWriter (class in matplotlib.animation) -
      - - -
      fftsurr() (in module matplotlib.mlab) -
      - - -
      FIFOBuffer (class in matplotlib.mlab) -
      - - -
      figaspect() (in module matplotlib.figure) -
      - - -
      figimage() (in module matplotlib.pyplot) -
      - -
      - -
      (matplotlib.figure.Figure method) -
      - -
      - -
      figlegend() (in module matplotlib.pyplot) -
      - - -
      figtext() (in module matplotlib.pyplot) -
      - - -
      Figure (class in matplotlib.figure) -
      - - -
      figure() (in module matplotlib.pyplot) -
      - - -
      FigureCanvasBase (class in matplotlib.backend_bases) -
      - - -
      FigureCanvasPdf (class in matplotlib.backends.backend_pdf) -
      - - -
      FigureCanvasQTAgg (class in matplotlib.backends.backend_qt4agg) -
      - - -
      FigureCanvasWxAgg (class in matplotlib.backends.backend_wxagg) -
      - - -
      FigureFrameWxAgg (class in matplotlib.backends.backend_wxagg) -
      - - -
      FigureManagerBase (class in matplotlib.backend_bases) -
      - - -
      FigureManagerQTAgg (class in matplotlib.backends.backend_qt4agg) -
      - - -
      Fil (class in matplotlib.mathtext) -
      - - -
      FileMovieWriter (class in matplotlib.animation) -
      - - -
      filetypes (matplotlib.backend_bases.FigureCanvasBase attribute) -
      - -
      - -
      (matplotlib.backends.backend_wxagg.FigureCanvasWxAgg attribute) -
      - -
      - -
      Fill (class in matplotlib.mathtext) -
      - - -
      fill (matplotlib.patches.Patch attribute) -
      - - -
      fill() (in module matplotlib.backends.backend_pdf) -
      - -
      - -
      (in module matplotlib.pyplot) -
      - - -
      (matplotlib.axes.Axes method) -
      - -
      - -
      fill_between() (in module matplotlib.pyplot) -
      - -
      - -
      (matplotlib.axes.Axes method) -
      - -
      - -
      fill_betweenx() (in module matplotlib.pyplot) -
      - -
      - -
      (matplotlib.axes.Axes method) -
      - -
      - -
      filled_markers (matplotlib.lines.Line2D attribute) -
      - -
      - -
      (matplotlib.markers.MarkerStyle attribute) -
      - -
      - -
      Filll (class in matplotlib.mathtext) -
      - - -
      fillStyles (matplotlib.lines.Line2D attribute) -
      - - -
      fillstyles (matplotlib.markers.MarkerStyle attribute) -
      - - -
      finalize_offset() (matplotlib.legend.DraggableLegend method) -
      - - -
      find() (in module matplotlib.mlab) -
      - - -
      find_tex_file() (in module matplotlib.dviread) -
      - - -
      finddir() (in module matplotlib.cbook) -
      - - -
      findfont() (in module matplotlib.font_manager) -
      - -
      - -
      (matplotlib.font_manager.FontManager method) -
      - -
      - -
      findobj() (in module matplotlib.pyplot) -
      - -
      - -
      (matplotlib.artist.Artist method) -
      - - -
      (matplotlib.artist.ArtistInspector method) -
      - -
      - -
      findSystemFonts() (in module matplotlib.font_manager) -
      - - -
      finish() (matplotlib.animation.FileMovieWriter method) -
      - -
      - -
      (matplotlib.animation.MovieWriter method) -
      - - -
      (matplotlib.sankey.Sankey method) -
      - -
      - -
      fix_minus() (matplotlib.ticker.Formatter method) -
      - -
      - -
      (matplotlib.ticker.ScalarFormatter method) -
      - -
      - -
      Fixed (class in mpl_toolkits.axes_grid.axes_size) -
      - - -
      FixedFormatter (class in matplotlib.ticker) -
      - - -
      FixedLocator (class in matplotlib.ticker) -
      - - -
      flag() (in module matplotlib.pyplot) -
      - - -
      flatten() (in module matplotlib.cbook) -
      - - -
      flipy() (matplotlib.backend_bases.RendererBase method) -
      - - -
      FLTK -
      - - -
      flush_events() (matplotlib.backend_bases.FigureCanvasBase method) -
      - - -
      font (matplotlib.mathtext.Parser.State attribute) -
      - - -
      font() (matplotlib.mathtext.Parser method) -
      - -
      - -
      FontconfigPatternParser (class in matplotlib.fontconfig_pattern) -
      - - -
      FontEntry (class in matplotlib.font_manager) -
      - - -
      FontManager (class in matplotlib.font_manager) -
      - - -
      fontmap (matplotlib.mathtext.StandardPsFonts attribute) -
      - - -
      fontName() (matplotlib.backends.backend_pdf.PdfFile method) -
      - - -
      FontProperties (class in matplotlib.font_manager) -
      - - -
      Fonts (class in matplotlib.mathtext) -
      - - -
      format_coord() (matplotlib.axes.Axes method) -
      - -
      - -
      (matplotlib.projections.polar.PolarAxes method) -
      - - -
      (mpl_toolkits.mplot3d.axes3d.Axes3D method) -
      - -
      - -
      format_data() (matplotlib.ticker.Formatter method) -
      - -
      - -
      (matplotlib.ticker.LogFormatter method) -
      - - -
      (matplotlib.ticker.ScalarFormatter method) -
      - -
      - -
      format_data_short() (matplotlib.ticker.Formatter method) -
      - -
      - -
      (matplotlib.ticker.LogFormatter method) -
      - - -
      (matplotlib.ticker.ScalarFormatter method) -
      - -
      - -
      format_xdata() (matplotlib.axes.Axes method) -
      - - -
      format_ydata() (matplotlib.axes.Axes method) -
      - - -
      format_zdata() (mpl_toolkits.mplot3d.axes3d.Axes3D method) -
      - - -
      FormatBool (class in matplotlib.mlab) -
      - - -
      FormatDate (class in matplotlib.mlab) -
      - - -
      FormatDatetime (class in matplotlib.mlab) -
      - - -
      FormatFloat (class in matplotlib.mlab) -
      - - -
      FormatFormatStr (class in matplotlib.mlab) -
      - - -
      FormatInt (class in matplotlib.mlab) -
      - - -
      FormatMillions (class in matplotlib.mlab) -
      - - -
      FormatObj (class in matplotlib.mlab) -
      - - -
      FormatPercent (class in matplotlib.mlab) -
      - - -
      FormatStrFormatter (class in matplotlib.ticker) -
      - - -
      FormatString (class in matplotlib.mlab) -
      - - -
      Formatter (class in matplotlib.ticker) -
      - - -
      formatter (matplotlib.axis.Ticker attribute) -
      - - -
      FormatThousands (class in matplotlib.mlab) -
      - - -
      forward() (matplotlib.backend_bases.NavigationToolbar2 method) -
      - -
      - -
      (matplotlib.cbook.Stack method) -
      - -
      - -
      frac() (matplotlib.mathtext.Parser method) -
      - - -
      Fraction (class in mpl_toolkits.axes_grid.axes_size) -
      - - -
      frame_format (matplotlib.animation.FileMovieWriter attribute) -
      - - -
      frame_size (matplotlib.animation.MovieWriter attribute) -
      - - -
      frange() (in module matplotlib.mlab) -
      - - -
      freetype -
      - - -
      from_any() (in module mpl_toolkits.axes_grid.axes_size) -
      - - -
      from_bounds() (matplotlib.transforms.Bbox static method) -
      - - -
      from_extents() (matplotlib.transforms.Bbox static method) -
      - - -
      from_list() (matplotlib.colors.LinearSegmentedColormap static method) -
      - - -
      from_values() (matplotlib.transforms.Affine2D static method) -
      - - -
      fromstr() (matplotlib.mlab.FormatBool method) -
      - -
      - -
      (matplotlib.mlab.FormatDate method) -
      - - -
      (matplotlib.mlab.FormatDatetime method) -
      - - -
      (matplotlib.mlab.FormatFloat method) -
      - - -
      (matplotlib.mlab.FormatInt method) -
      - - -
      (matplotlib.mlab.FormatObj method) -
      - -
      - -
      frozen() (matplotlib.transforms.Affine2DBase method) -
      - -
      - -
      (matplotlib.transforms.BboxBase method) -
      - - -
      (matplotlib.transforms.BlendedGenericTransform method) -
      - - -
      (matplotlib.transforms.CompositeGenericTransform method) -
      - - -
      (matplotlib.transforms.IdentityTransform method) -
      - - -
      (matplotlib.transforms.TransformNode method) -
      - - -
      (matplotlib.transforms.TransformWrapper method) -
      - -
      - -
      full_screen_toggle() (matplotlib.backend_bases.FigureManagerBase method) -
      - - -
      fully_contains() (matplotlib.transforms.BboxBase method) -
      - - -
      fully_containsx() (matplotlib.transforms.BboxBase method) -
      - - -
      fully_containsy() (matplotlib.transforms.BboxBase method) -
      - - -
      fully_overlaps() (matplotlib.transforms.BboxBase method) -
      - - -
      FuncAnimation (class in matplotlib.animation) -
      - - -
      funcbottom() (matplotlib.widgets.SubplotTool method) -
      - - -
      FuncFormatter (class in matplotlib.ticker) -
      - - -
      funchspace() (matplotlib.widgets.SubplotTool method) -
      - - -
      funcleft() (matplotlib.widgets.SubplotTool method) -
      - - -
      funcright() (matplotlib.widgets.SubplotTool method) -
      - - -
      function() (matplotlib.mathtext.Parser method) -
      - - -
      functop() (matplotlib.widgets.SubplotTool method) -
      - - -
      funcwspace() (matplotlib.widgets.SubplotTool method) -
      - -
      - -

      G

      - - - -
      - -
      gca() (in module matplotlib.pyplot) -
      - -
      - -
      (matplotlib.figure.Figure method) -
      - -
      - -
      gcf() (in module matplotlib.pyplot) -
      - - -
      gci() (in module matplotlib.pyplot) -
      - - -
      GDK -
      - - -
      generate_fontconfig_pattern() (in module matplotlib.fontconfig_pattern) -
      - - -
      genfrac() (matplotlib.mathtext.Parser method) -
      - - -
      get() (in module matplotlib.artist) -
      - -
      - -
      (matplotlib.cbook.RingBuffer method) -
      - - -
      (matplotlib.figure.AxesStack method) -
      - -
      - -
      get_aa() (matplotlib.lines.Line2D method) -
      - -
      - -
      (matplotlib.patches.Patch method) -
      - -
      - -
      get_active() (matplotlib.widgets.RectangleSelector method) -
      - - -
      get_adjustable() (matplotlib.axes.Axes method) -
      - - -
      get_affine() (matplotlib.transforms.AffineBase method) -
      - -
      - -
      (matplotlib.transforms.BlendedGenericTransform method) -
      - - -
      (matplotlib.transforms.CompositeGenericTransform method) -
      - - -
      (matplotlib.transforms.IdentityTransform method) -
      - - -
      (matplotlib.transforms.Transform method) -
      - -
      - -
      get_agg_filter() (matplotlib.artist.Artist method) -
      - - -
      get_aliases() (matplotlib.artist.ArtistInspector method) -
      - - -
      get_alpha() (matplotlib.artist.Artist method) -
      - -
      - -
      (matplotlib.backend_bases.GraphicsContextBase method) -
      - -
      - -
      get_alt_path() (matplotlib.markers.MarkerStyle method) -
      - - -
      get_alt_transform() (matplotlib.markers.MarkerStyle method) -
      - - -
      get_anchor() (matplotlib.axes.Axes method) -
      - -
      - -
      (mpl_toolkits.axes_grid.axes_divider.Divider method) -
      - -
      - -
      get_angle() (matplotlib.afm.AFM method) -
      - - -
      get_animated() (matplotlib.artist.Artist method) -
      - - -
      get_annotation_clip() (matplotlib.patches.ConnectionPatch method) -
      - - -
      get_antialiased() (matplotlib.backend_bases.GraphicsContextBase method) -
      - -
      - -
      (matplotlib.lines.Line2D method) -
      - - -
      (matplotlib.patches.Patch method) -
      - -
      - -
      get_array() (matplotlib.cm.ScalarMappable method) -
      - - -
      get_arrowstyle() (matplotlib.patches.FancyArrowPatch method) -
      - - -
      get_aspect() (matplotlib.axes.Axes method) -
      - -
      - -
      (mpl_toolkits.axes_grid.axes_divider.Divider method) -
      - -
      - -
      get_autoscale_on() (matplotlib.axes.Axes method) -
      - -
      - -
      (mpl_toolkits.mplot3d.axes3d.Axes3D method) -
      - -
      - -
      get_autoscalex_on() (matplotlib.axes.Axes method) -
      - - -
      get_autoscaley_on() (matplotlib.axes.Axes method) -
      - - -
      get_autoscalez_on() (mpl_toolkits.mplot3d.axes3d.Axes3D method) -
      - - -
      get_axes() (matplotlib.artist.Artist method) -
      - -
      - -
      (matplotlib.figure.Figure method) -
      - -
      - -
      get_axes_locator() (matplotlib.axes.Axes method) -
      - - -
      get_axis_bgcolor() (matplotlib.axes.Axes method) -
      - - -
      get_axis_position() (mpl_toolkits.mplot3d.axes3d.Axes3D method) -
      - - -
      get_axisbelow() (matplotlib.axes.Axes method) -
      - -
      - -
      (mpl_toolkits.mplot3d.axes3d.Axes3D method) -
      - -
      - -
      get_axisline_style() (mpl_toolkits.axes_grid.axis_artist.AxisArtist method) -
      - - -
      get_bbox() (matplotlib.patches.FancyBboxPatch method) -
      - -
      - -
      (matplotlib.patches.Rectangle method) -
      - -
      - -
      get_bbox_char() (matplotlib.afm.AFM method) -
      - - -
      get_bbox_patch() (matplotlib.text.Text method) -
      - - -
      get_bbox_to_anchor() (matplotlib.legend.Legend method) -
      - - -
      get_bounds() (matplotlib.spines.Spine method) -
      - - -
      get_boxstyle() (matplotlib.patches.FancyBboxPatch method) -
      - - -
      get_c() (matplotlib.lines.Line2D method) -
      - - -
      get_canvas() (matplotlib.backends.backend_wxagg.FigureFrameWxAgg method) -
      - -
      - -
      (matplotlib.backends.backend_wxagg.NavigationToolbar2WxAgg method) -
      - -
      - -
      get_canvas_width_height() (matplotlib.backend_bases.RendererBase method) -
      - - -
      get_capheight() (matplotlib.afm.AFM method) -
      - - -
      get_capstyle() (matplotlib.backend_bases.GraphicsContextBase method) -
      - -
      - -
      (matplotlib.markers.MarkerStyle method) -
      - -
      - -
      get_children() (matplotlib.artist.Artist method) -
      - -
      - -
      (matplotlib.axes.Axes method) -
      - - -
      (matplotlib.axis.Axis method) -
      - - -
      (matplotlib.axis.Tick method) -
      - - -
      (matplotlib.figure.Figure method) -
      - - -
      (matplotlib.legend.Legend method) -
      - - -
      (mpl_toolkits.mplot3d.axes3d.Axes3D method) -
      - -
      - -
      get_clim() (matplotlib.cm.ScalarMappable method) -
      - - -
      get_clip_box() (matplotlib.artist.Artist method) -
      - - -
      get_clip_on() (matplotlib.artist.Artist method) -
      - - -
      get_clip_path() (matplotlib.artist.Artist method) -
      - -
      - -
      (matplotlib.backend_bases.GraphicsContextBase method) -
      - -
      - -
      get_clip_rectangle() (matplotlib.backend_bases.GraphicsContextBase method) -
      - - -
      get_closed() (matplotlib.patches.Polygon method) -
      - - -
      get_cmap() (in module matplotlib.cm) -
      - -
      - -
      (matplotlib.cm.ScalarMappable method) -
      - -
      - -
      get_color() (matplotlib.collections.EventCollection method) -
      - -
      - -
      (matplotlib.collections.LineCollection method) -
      - - -
      (matplotlib.lines.Line2D method) -
      - - -
      (matplotlib.text.Text method) -
      - -
      - -
      get_colors() (in module mpl_toolkits.mplot3d.art3d) -
      - -
      - -
      (matplotlib.collections.LineCollection method) -
      - -
      - -
      get_connectionstyle() (matplotlib.patches.FancyArrowPatch method) -
      - - -
      get_contains() (matplotlib.artist.Artist method) -
      - - -
      get_converter() (matplotlib.units.Registry method) -
      - - -
      get_current_fig_manager() (in module matplotlib.pyplot) -
      - - -
      get_cursor_props() (matplotlib.axes.Axes method) -
      - - -
      get_dash_capstyle() (matplotlib.lines.Line2D method) -
      - - -
      get_dash_joinstyle() (matplotlib.lines.Line2D method) -
      - - -
      get_dashdirection() (matplotlib.text.TextWithDash method) -
      - - -
      get_dashes() (matplotlib.backend_bases.GraphicsContextBase method) -
      - -
      - -
      (matplotlib.collections.Collection method) -
      - -
      - -
      get_dashlength() (matplotlib.text.TextWithDash method) -
      - - -
      get_dashpad() (matplotlib.text.TextWithDash method) -
      - - -
      get_dashpush() (matplotlib.text.TextWithDash method) -
      - - -
      get_dashrotation() (matplotlib.text.TextWithDash method) -
      - - -
      get_data() (matplotlib.lines.Line2D method) -
      - - -
      get_data_interval() (matplotlib.axis.Axis method) -
      - -
      - -
      (matplotlib.axis.XAxis method) -
      - - -
      (matplotlib.axis.YAxis method) -
      - - -
      (mpl_toolkits.mplot3d.axis3d.XAxis method) -
      - - -
      (mpl_toolkits.mplot3d.axis3d.YAxis method) -
      - - -
      (mpl_toolkits.mplot3d.axis3d.ZAxis method) -
      - -
      - -
      get_data_ratio() (matplotlib.axes.Axes method) -
      - -
      - -
      (matplotlib.projections.polar.PolarAxes method) -
      - -
      - -
      get_data_ratio_log() (matplotlib.axes.Axes method) -
      - - -
      get_data_transform() (matplotlib.patches.Patch method) -
      - - -
      get_datalim() (matplotlib.collections.Collection method) -
      - -
      - -
      (matplotlib.collections.QuadMesh method) -
      - -
      - -
      get_default_bbox_extra_artists() (matplotlib.axes.Axes method) -
      - -
      - -
      (matplotlib.figure.Figure method) -
      - -
      - -
      get_default_filename() (matplotlib.backend_bases.FigureCanvasBase method) -
      - - -
      get_default_filetype() (matplotlib.backend_bases.FigureCanvasBase method) -
      - - -
      get_default_handler_map() (matplotlib.legend.Legend class method) -
      - - -
      get_default_size() (matplotlib.font_manager.FontManager static method) -
      - - -
      get_default_weight() (matplotlib.font_manager.FontManager method) -
      - - -
      get_depth() (matplotlib.mathtext.MathTextParser method) -
      - - -
      get_dir_vector() (in module mpl_toolkits.mplot3d.art3d) -
      - - -
      get_dpi() (matplotlib.figure.Figure method) -
      - - -
      get_dpi_cor() (matplotlib.patches.FancyArrowPatch method) -
      - - -
      get_drawstyle() (matplotlib.lines.Line2D method) -
      - - -
      get_ec() (matplotlib.patches.Patch method) -
      - - -
      get_edgecolor() (matplotlib.collections.Collection method) -
      - -
      - -
      (matplotlib.figure.Figure method) -
      - - -
      (matplotlib.patches.Patch method) -
      - - -
      (mpl_toolkits.mplot3d.art3d.Poly3DCollection method) -
      - -
      - -
      get_edgecolors() (matplotlib.collections.Collection method) -
      - -
      - -
      (mpl_toolkits.mplot3d.art3d.Poly3DCollection method) -
      - -
      - -
      get_extents() (matplotlib.patches.Patch method) -
      - -
      - -
      (matplotlib.path.Path method) -
      - -
      - -
      get_facecolor() (matplotlib.collections.Collection method) -
      - -
      - -
      (matplotlib.figure.Figure method) -
      - - -
      (matplotlib.patches.Patch method) -
      - - -
      (mpl_toolkits.mplot3d.art3d.Patch3D method) -
      - - -
      (mpl_toolkits.mplot3d.art3d.Poly3DCollection method) -
      - -
      - -
      get_facecolors() (matplotlib.collections.Collection method) -
      - -
      - -
      (mpl_toolkits.mplot3d.art3d.Poly3DCollection method) -
      - -
      - -
      get_family() (matplotlib.font_manager.FontProperties method) -
      - -
      - -
      (matplotlib.text.Text method) -
      - -
      - -
      get_familyname() (matplotlib.afm.AFM method) -
      - - -
      get_fc() (matplotlib.patches.Patch method) -
      - - -
      get_figheight() (matplotlib.figure.Figure method) -
      - - -
      get_figlabels() (in module matplotlib.pyplot) -
      - - -
      get_fignums() (in module matplotlib.pyplot) -
      - - -
      get_figure() (matplotlib.artist.Artist method) -
      - -
      - -
      (matplotlib.text.TextWithDash method) -
      - -
      - -
      get_figwidth() (matplotlib.figure.Figure method) -
      - - -
      get_file() (matplotlib.font_manager.FontProperties method) -
      - - -
      get_fill() (matplotlib.patches.Patch method) -
      - - -
      get_fillstyle() (matplotlib.lines.Line2D method) -
      - -
      - -
      (matplotlib.markers.MarkerStyle method) -
      - -
      - -
      get_flat_tri_mask() (matplotlib.tri.TriAnalyzer method) -
      - - -
      get_flip_min_max() (in module mpl_toolkits.mplot3d.axis3d) -
      - - -
      get_font_properties() (matplotlib.text.Text method) -
      - - -
      get_fontconfig_fonts() (in module matplotlib.font_manager) -
      - - -
      get_fontconfig_pattern() (matplotlib.font_manager.FontProperties method) -
      - - -
      get_fontext_synonyms() (in module matplotlib.font_manager) -
      - - -
      get_fontfamily() (matplotlib.text.Text method) -
      - - -
      get_fontname() (matplotlib.afm.AFM method) -
      - -
      - -
      (matplotlib.text.Text method) -
      - -
      - -
      get_fontproperties() (matplotlib.text.Text method) -
      - - -
      get_fontsize() (matplotlib.text.Text method) -
      - - -
      get_fontstretch() (matplotlib.text.Text method) -
      - - -
      get_fontstyle() (matplotlib.text.Text method) -
      - - -
      get_fontvariant() (matplotlib.text.Text method) -
      - - -
      get_fontweight() (matplotlib.text.Text method) -
      - - -
      get_formatd() (in module matplotlib.mlab) -
      - - -
      get_frame() (matplotlib.axes.Axes method) -
      - -
      - -
      (matplotlib.legend.Legend method) -
      - -
      - -
      get_frame_on() (matplotlib.axes.Axes method) -
      - -
      - -
      (matplotlib.legend.Legend method) -
      - - -
      (mpl_toolkits.mplot3d.axes3d.Axes3D method) -
      - -
      - -
      get_frameon() (matplotlib.figure.Figure method) -
      - - -
      get_from_args_and_kwargs() (matplotlib.tri.Triangulation static method) -
      - - -
      get_fullname() (matplotlib.afm.AFM method) -
      - - -
      get_fully_transformed_path() (matplotlib.transforms.TransformedPath method) -
      - - -
      get_geometry() (matplotlib.axes.SubplotBase method) -
      - -
      - -
      (matplotlib.gridspec.GridSpecBase method) -
      - - -
      (matplotlib.gridspec.SubplotSpec method) -
      - - -
      (mpl_toolkits.axes_grid.axes_divider.SubplotDivider method) -
      - -
      - -
      get_gid() (matplotlib.artist.Artist method) -
      - -
      - -
      (matplotlib.backend_bases.GraphicsContextBase method) -
      - -
      - -
      get_grid_positions() (matplotlib.gridspec.GridSpecBase method) -
      - - -
      get_gridlines() (matplotlib.axis.Axis method) -
      - - -
      get_gridspec() (matplotlib.gridspec.SubplotSpec method) -
      - - -
      get_ha() (matplotlib.text.Text method) -
      - - -
      get_hatch() (matplotlib.backend_bases.GraphicsContextBase method) -
      - -
      - -
      (matplotlib.collections.Collection method) -
      - - -
      (matplotlib.patches.Patch method) -
      - -
      - -
      get_hatch_path() (matplotlib.backend_bases.GraphicsContextBase method) -
      - - -
      get_height() (matplotlib.patches.FancyBboxPatch method) -
      - -
      - -
      (matplotlib.patches.Rectangle method) -
      - -
      - -
      get_height_char() (matplotlib.afm.AFM method) -
      - - -
      get_height_ratios() (matplotlib.gridspec.GridSpecBase method) -
      - - -
      get_helper() (mpl_toolkits.axes_grid.axis_artist.AxisArtist method) -
      - - -
      get_hinting_type() (matplotlib.mathtext.MathtextBackend method) -
      - -
      - -
      (matplotlib.mathtext.MathtextBackendAgg method) -
      - -
      - -
      get_horizontal() (mpl_toolkits.axes_grid.axes_divider.Divider method) -
      - - -
      get_horizontal_sizes() (mpl_toolkits.axes_grid.axes_divider.Divider method) -
      - - -
      get_horizontal_stem_width() (matplotlib.afm.AFM method) -
      - - -
      get_horizontalalignment() (matplotlib.text.Text method) -
      - - -
      get_image_magnification() (matplotlib.backend_bases.RendererBase method) -
      - - -
      get_images() (matplotlib.axes.Axes method) -
      - - -
      get_joinstyle() (matplotlib.backend_bases.GraphicsContextBase method) -
      - -
      - -
      (matplotlib.markers.MarkerStyle method) -
      - -
      - -
      get_kern() (matplotlib.mathtext.Fonts method) -
      - -
      - -
      (matplotlib.mathtext.StandardPsFonts method) -
      - - -
      (matplotlib.mathtext.TruetypeFonts method) -
      - -
      - -
      get_kern_dist() (matplotlib.afm.AFM method) -
      - - -
      get_kern_dist_from_name() (matplotlib.afm.AFM method) -
      - - -
      get_kerning() (matplotlib.mathtext.Char method) -
      - -
      - -
      (matplotlib.mathtext.Node method) -
      - -
      - -
      get_label() (matplotlib.artist.Artist method) -
      - -
      - -
      (matplotlib.axis.Axis method) -
      - -
      - -
      get_label_position() (matplotlib.axis.XAxis method) -
      - -
      - -
      (matplotlib.axis.YAxis method) -
      - -
      - -
      get_label_text() (matplotlib.axis.Axis method) -
      - - -
      get_legend() (matplotlib.axes.Axes method) -
      - - -
      get_legend_handler() (matplotlib.legend.Legend static method) -
      - - -
      get_legend_handler_map() (matplotlib.legend.Legend method) -
      - - -
      get_legend_handles_labels() (matplotlib.axes.Axes method) -
      - - -
      get_linelength() (matplotlib.collections.EventCollection method) -
      - - -
      get_lineoffset() (matplotlib.collections.EventCollection method) -
      - - -
      get_lines() (matplotlib.axes.Axes method) -
      - -
      - -
      (matplotlib.legend.Legend method) -
      - -
      - -
      get_linestyle() (matplotlib.backend_bases.GraphicsContextBase method) -
      - -
      - -
      (matplotlib.collections.Collection method) -
      - - -
      (matplotlib.collections.EventCollection method) -
      - - -
      (matplotlib.lines.Line2D method) -
      - - -
      (matplotlib.patches.Patch method) -
      - -
      - -
      get_linestyles() (matplotlib.collections.Collection method) -
      - - -
      get_linewidth() (matplotlib.backend_bases.GraphicsContextBase method) -
      - -
      - -
      (matplotlib.collections.Collection method) -
      - - -
      (matplotlib.collections.EventCollection method) -
      - - -
      (matplotlib.lines.Line2D method) -
      - - -
      (matplotlib.patches.Patch method) -
      - -
      - -
      get_linewidths() (matplotlib.collections.Collection method) -
      - - -
      get_loc() (matplotlib.axis.Tick method) -
      - - -
      get_locator() (matplotlib.dates.AutoDateLocator method) -
      - -
      - -
      (mpl_toolkits.axes_grid.axes_divider.Divider method) -
      - -
      - -
      get_ls() (matplotlib.lines.Line2D method) -
      - -
      - -
      (matplotlib.patches.Patch method) -
      - -
      - -
      get_lw() (matplotlib.lines.Line2D method) -
      - -
      - -
      (matplotlib.patches.Patch method) -
      - -
      - -
      get_major_formatter() (matplotlib.axis.Axis method) -
      - - -
      get_major_locator() (matplotlib.axis.Axis method) -
      - - -
      get_major_ticks() (matplotlib.axis.Axis method) -
      - -
      - -
      (mpl_toolkits.mplot3d.axis3d.Axis method) -
      - -
      - -
      get_majorticklabels() (matplotlib.axis.Axis method) -
      - - -
      get_majorticklines() (matplotlib.axis.Axis method) -
      - - -
      get_majorticklocs() (matplotlib.axis.Axis method) -
      - - -
      get_marker() (matplotlib.lines.Line2D method) -
      - -
      - -
      (matplotlib.markers.MarkerStyle method) -
      - -
      - -
      get_markeredgecolor() (matplotlib.lines.Line2D method) -
      - - -
      get_markeredgewidth() (matplotlib.lines.Line2D method) -
      - - -
      get_markerfacecolor() (matplotlib.lines.Line2D method) -
      - - -
      get_markerfacecoloralt() (matplotlib.lines.Line2D method) -
      - - -
      get_markersize() (matplotlib.lines.Line2D method) -
      - - -
      get_markevery() (matplotlib.lines.Line2D method) -
      - - -
      get_masked_triangles() (matplotlib.tri.Triangulation method) -
      - - -
      get_matrix() (matplotlib.projections.polar.PolarAffine method) -
      - -
      - -
      (matplotlib.projections.polar.PolarAxes.PolarAffine method) -
      - - -
      (matplotlib.transforms.Affine2D method) -
      - - -
      (matplotlib.transforms.BboxTransform method) -
      - - -
      (matplotlib.transforms.BboxTransformFrom method) -
      - - -
      (matplotlib.transforms.BboxTransformTo method) -
      - - -
      (matplotlib.transforms.BlendedAffine2D method) -
      - - -
      (matplotlib.transforms.CompositeAffine2D method) -
      - - -
      (matplotlib.transforms.IdentityTransform method) -
      - - -
      (matplotlib.transforms.ScaledTranslation method) -
      - - -
      (matplotlib.transforms.Transform method) -
      - -
      - -
      get_mec() (matplotlib.lines.Line2D method) -
      - - -
      get_metrics() (matplotlib.mathtext.Fonts method) -
      - - -
      get_mew() (matplotlib.lines.Line2D method) -
      - - -
      get_mfc() (matplotlib.lines.Line2D method) -
      - - -
      get_mfcalt() (matplotlib.lines.Line2D method) -
      - - -
      get_minor_formatter() (matplotlib.axis.Axis method) -
      - - -
      get_minor_locator() (matplotlib.axis.Axis method) -
      - - -
      get_minor_ticks() (matplotlib.axis.Axis method) -
      - - -
      get_minorticklabels() (matplotlib.axis.Axis method) -
      - - -
      get_minorticklines() (matplotlib.axis.Axis method) -
      - - -
      get_minorticklocs() (matplotlib.axis.Axis method) -
      - - -
      get_minpos() (matplotlib.axis.XAxis method) -
      - -
      - -
      (matplotlib.axis.YAxis method) -
      - -
      - -
      get_ms() (matplotlib.lines.Line2D method) -
      - - -
      get_mutation_aspect() (matplotlib.patches.FancyArrowPatch method) -
      - -
      - -
      (matplotlib.patches.FancyBboxPatch method) -
      - -
      - -
      get_mutation_scale() (matplotlib.patches.FancyArrowPatch method) -
      - -
      - -
      (matplotlib.patches.FancyBboxPatch method) -
      - -
      - -
      get_name() (matplotlib.font_manager.FontProperties method) -
      - -
      - -
      (matplotlib.text.Text method) -
      - -
      - -
      get_name_char() (matplotlib.afm.AFM method) -
      - - -
      get_navigate() (matplotlib.axes.Axes method) -
      - - -
      get_navigate_mode() (matplotlib.axes.Axes method) -
      - - -
      get_numsides() (matplotlib.collections.RegularPolyCollection method) -
      - - -
      get_offset() (matplotlib.ticker.FixedFormatter method) -
      - -
      - -
      (matplotlib.ticker.Formatter method) -
      - - -
      (matplotlib.ticker.ScalarFormatter method) -
      - -
      -
      - -
      get_offset_position() (matplotlib.collections.Collection method) -
      - - -
      get_offset_text() (matplotlib.axis.Axis method) -
      - - -
      get_offset_transform() (matplotlib.collections.Collection method) -
      - - -
      get_offsets() (matplotlib.collections.Collection method) -
      - - -
      get_orientation() (matplotlib.collections.EventCollection method) -
      - - -
      get_pad() (matplotlib.axis.Tick method) -
      - -
      - -
      (mpl_toolkits.axes_grid.axis_artist.AxisLabel method) -
      - -
      - -
      get_pad_pixels() (matplotlib.axis.Tick method) -
      - - -
      get_patch_transform() (matplotlib.patches.Arrow method) -
      - -
      - -
      (matplotlib.patches.Ellipse method) -
      - - -
      (matplotlib.patches.Patch method) -
      - - -
      (matplotlib.patches.Rectangle method) -
      - - -
      (matplotlib.patches.RegularPolygon method) -
      - - -
      (matplotlib.patches.Shadow method) -
      - - -
      (matplotlib.patches.YAArrow method) -
      - - -
      (matplotlib.spines.Spine method) -
      - -
      - -
      get_patch_verts() (in module mpl_toolkits.mplot3d.art3d) -
      - - -
      get_patches() (matplotlib.legend.Legend method) -
      - - -
      get_path() (matplotlib.lines.Line2D method) -
      - -
      - -
      (matplotlib.markers.MarkerStyle method) -
      - - -
      (matplotlib.patches.Arrow method) -
      - - -
      (matplotlib.patches.Ellipse method) -
      - - -
      (matplotlib.patches.FancyArrowPatch method) -
      - - -
      (matplotlib.patches.FancyBboxPatch method) -
      - - -
      (matplotlib.patches.Patch method) -
      - - -
      (matplotlib.patches.PathPatch method) -
      - - -
      (matplotlib.patches.Polygon method) -
      - - -
      (matplotlib.patches.Rectangle method) -
      - - -
      (matplotlib.patches.RegularPolygon method) -
      - - -
      (matplotlib.patches.Shadow method) -
      - - -
      (matplotlib.patches.Wedge method) -
      - - -
      (matplotlib.patches.YAArrow method) -
      - - -
      (matplotlib.spines.Spine method) -
      - - -
      (mpl_toolkits.mplot3d.art3d.Patch3D method) -
      - -
      - -
      get_path_collection_extents() (in module matplotlib.path) -
      - - -
      get_path_effects() (matplotlib.patches.Patch method) -
      - -
      - -
      (matplotlib.text.Text method) -
      - -
      - -
      get_path_extents() (in module matplotlib.path) -
      - - -
      get_path_in_displaycoord() (matplotlib.patches.ConnectionPatch method) -
      - -
      - -
      (matplotlib.patches.FancyArrowPatch method) -
      - -
      - -
      get_paths() (matplotlib.collections.Collection method) -
      - -
      - -
      (matplotlib.collections.PathCollection method) -
      - - -
      (matplotlib.collections.QuadMesh method) -
      - - -
      (matplotlib.collections.TriMesh method) -
      - -
      - -
      get_paths_extents() (in module matplotlib.path) -
      - - -
      get_picker() (matplotlib.artist.Artist method) -
      - - -
      get_pickradius() (matplotlib.axis.Axis method) -
      - -
      - -
      (matplotlib.collections.Collection method) -
      - - -
      (matplotlib.lines.Line2D method) -
      - -
      - -
      get_plot_commands() (in module matplotlib.pyplot) -
      - - -
      get_points() (matplotlib.transforms.Bbox method) -
      - -
      - -
      (matplotlib.transforms.TransformedBbox method) -
      - -
      - -
      get_position() (matplotlib.axes.Axes method) -
      - -
      - -
      (matplotlib.gridspec.SubplotSpec method) -
      - - -
      (matplotlib.spines.Spine method) -
      - - -
      (matplotlib.text.Text method) -
      - - -
      (matplotlib.text.TextWithDash method) -
      - - -
      (mpl_toolkits.axes_grid.axes_divider.Divider method) -
      - - -
      (mpl_toolkits.axes_grid.axes_divider.SubplotDivider method) -
      - -
      - -
      get_position_runtime() (mpl_toolkits.axes_grid.axes_divider.Divider method) -
      - - -
      get_positions() (matplotlib.collections.EventCollection method) -
      - - -
      get_proj() (mpl_toolkits.mplot3d.axes3d.Axes3D method) -
      - - -
      get_projection_class() (in module matplotlib.projections) -
      - -
      - -
      (matplotlib.projections.ProjectionRegistry method) -
      - -
      - -
      get_projection_names() (in module matplotlib.projections) -
      - -
      - -
      (matplotlib.projections.ProjectionRegistry method) -
      - -
      - -
      get_prop_tup() (matplotlib.text.Text method) -
      - -
      - -
      (matplotlib.text.TextWithDash method) -
      - -
      - -
      get_radius() (matplotlib.patches.Circle method) -
      - - -
      get_rasterization_zorder() (matplotlib.axes.Axes method) -
      - - -
      get_rasterized() (matplotlib.artist.Artist method) -
      - - -
      get_recursive_filelist() (in module matplotlib.cbook) -
      - - -
      get_renderer() (in module matplotlib.tight_layout) -
      - - -
      get_renderer_cache() (matplotlib.axes.Axes method) -
      - - -
      get_results() (matplotlib.mathtext.Fonts method) -
      - -
      - -
      (matplotlib.mathtext.MathtextBackend method) -
      - - -
      (matplotlib.mathtext.MathtextBackendAgg method) -
      - - -
      (matplotlib.mathtext.MathtextBackendBitmap method) -
      - - -
      (matplotlib.mathtext.MathtextBackendCairo method) -
      - - -
      (matplotlib.mathtext.MathtextBackendPath method) -
      - - -
      (matplotlib.mathtext.MathtextBackendPdf method) -
      - - -
      (matplotlib.mathtext.MathtextBackendPs method) -
      - - -
      (matplotlib.mathtext.MathtextBackendSvg method) -
      - -
      - -
      get_rgb() (matplotlib.backend_bases.GraphicsContextBase method) -
      - - -
      get_rotate_label() (mpl_toolkits.mplot3d.axis3d.Axis method) -
      - - -
      get_rotation() (in module matplotlib.text) -
      - -
      - -
      (matplotlib.collections.RegularPolyCollection method) -
      - - -
      (matplotlib.text.Text method) -
      - -
      - -
      get_rotation_mode() (matplotlib.text.Text method) -
      - - -
      get_sample_data() (in module matplotlib.cbook) -
      - - -
      get_scale() (matplotlib.axis.Axis method) -
      - - -
      get_scale_docs() (in module matplotlib.scale) -
      - - -
      get_segments() (matplotlib.collections.LineCollection method) -
      - - -
      get_setters() (matplotlib.artist.ArtistInspector method) -
      - - -
      get_shared_x_axes() (matplotlib.axes.Axes method) -
      - - -
      get_shared_y_axes() (matplotlib.axes.Axes method) -
      - - -
      get_siblings() (matplotlib.cbook.Grouper method) -
      - - -
      get_size() (matplotlib.font_manager.FontProperties method) -
      - -
      - -
      (matplotlib.text.Text method) -
      - -
      - -
      get_size_in_points() (matplotlib.font_manager.FontProperties method) -
      - - -
      get_size_inches() (matplotlib.figure.Figure method) -
      - - -
      get_sized_alternatives_for_symbol() (matplotlib.mathtext.BakomaFonts method) -
      - -
      - -
      (matplotlib.mathtext.Fonts method) -
      - - -
      (matplotlib.mathtext.StixFonts method) -
      - - -
      (matplotlib.mathtext.UnicodeFonts method) -
      - -
      - -
      get_sizes() (matplotlib.collections.CircleCollection method) -
      - -
      - -
      (matplotlib.collections.PathCollection method) -
      - - -
      (matplotlib.collections.RegularPolyCollection method) -
      - -
      - -
      get_slant() (matplotlib.font_manager.FontProperties method) -
      - - -
      get_smart_bounds() (matplotlib.axis.Axis method) -
      - -
      - -
      (matplotlib.spines.Spine method) -
      - -
      - -
      get_snap() (matplotlib.artist.Artist method) -
      - -
      - -
      (matplotlib.backend_bases.GraphicsContextBase method) -
      - -
      - -
      get_snap_threshold() (matplotlib.markers.MarkerStyle method) -
      - - -
      get_solid_capstyle() (matplotlib.lines.Line2D method) -
      - - -
      get_solid_joinstyle() (matplotlib.lines.Line2D method) -
      - - -
      get_sparse_matrix() (in module matplotlib.mlab) -
      - - -
      get_spine_transform() (matplotlib.spines.Spine method) -
      - - -
      get_split_ind() (in module matplotlib.cbook) -
      - - -
      get_state() (matplotlib.mathtext.Parser method) -
      - - -
      get_str_bbox() (matplotlib.afm.AFM method) -
      - - -
      get_str_bbox_and_descent() (matplotlib.afm.AFM method) -
      - - -
      get_stretch() (matplotlib.font_manager.FontProperties method) -
      - -
      - -
      (matplotlib.text.Text method) -
      - -
      - -
      get_style() (matplotlib.font_manager.FontProperties method) -
      - -
      - -
      (matplotlib.text.Text method) -
      - -
      - -
      get_subplot_params() (matplotlib.gridspec.GridSpec method) -
      - -
      - -
      (matplotlib.gridspec.GridSpecBase method) -
      - - -
      (matplotlib.gridspec.GridSpecFromSubplotSpec method) -
      - -
      - -
      get_subplotspec() (matplotlib.axes.SubplotBase method) -
      - -
      - -
      (mpl_toolkits.axes_grid.axes_divider.AxesLocator method) -
      - - -
      (mpl_toolkits.axes_grid.axes_divider.SubplotDivider method) -
      - -
      - -
      get_subplotspec_list() (in module matplotlib.tight_layout) -
      - - -
      get_supported_filetypes() (matplotlib.backend_bases.FigureCanvasBase method) -
      - - -
      get_supported_filetypes_grouped() (matplotlib.backend_bases.FigureCanvasBase method) -
      - - -
      get_test_data() (in module mpl_toolkits.mplot3d.axes3d) -
      - - -
      get_texmanager() (matplotlib.backend_bases.RendererBase method) -
      - - -
      get_text() (matplotlib.text.Text method) -
      - - -
      get_text_heights() (matplotlib.axis.XAxis method) -
      - - -
      get_text_width_height_descent() (matplotlib.backend_bases.RendererBase method) -
      - - -
      get_text_widths() (matplotlib.axis.YAxis method) -
      - - -
      get_texts() (matplotlib.legend.Legend method) -
      - - -
      get_texts_widths_heights_descents() (mpl_toolkits.axes_grid.axis_artist.TickLabels method) -
      - - -
      get_theta_direction() (matplotlib.projections.polar.PolarAxes method) -
      - - -
      get_theta_offset() (matplotlib.projections.polar.PolarAxes method) -
      - - -
      get_tick_out() (mpl_toolkits.axes_grid.axis_artist.Ticks method) -
      - - -
      get_tick_positions() (mpl_toolkits.mplot3d.axis3d.Axis method) -
      - - -
      get_ticklabel_extents() (matplotlib.axis.Axis method) -
      - - -
      get_ticklabels() (matplotlib.axis.Axis method) -
      - - -
      get_ticklines() (matplotlib.axis.Axis method) -
      - - -
      get_ticklocs() (matplotlib.axis.Axis method) -
      - - -
      get_ticks_position() (matplotlib.axis.XAxis method) -
      - -
      - -
      (matplotlib.axis.YAxis method) -
      - -
      - -
      get_ticksize() (mpl_toolkits.axes_grid.axis_artist.Ticks method) -
      - - -
      get_tight_layout() (matplotlib.figure.Figure method) -
      - - -
      get_tight_layout_figure() (in module matplotlib.tight_layout) -
      - - -
      get_tightbbox() (matplotlib.axes.Axes method) -
      - -
      - -
      (matplotlib.axis.Axis method) -
      - - -
      (matplotlib.figure.Figure method) -
      - - -
      (mpl_toolkits.axes_grid.axis_artist.AxisArtist method) -
      - - -
      (mpl_toolkits.mplot3d.axis3d.Axis method) -
      - -
      - -
      get_title() (matplotlib.axes.Axes method) -
      - -
      - -
      (matplotlib.legend.Legend method) -
      - -
      - -
      get_topmost_subplotspec() (matplotlib.gridspec.GridSpecFromSubplotSpec method) -
      - -
      - -
      (matplotlib.gridspec.SubplotSpec method) -
      - -
      - -
      get_transform() (matplotlib.artist.Artist method) -
      - -
      - -
      (matplotlib.axis.Axis method) -
      - - -
      (matplotlib.markers.MarkerStyle method) -
      - - -
      (matplotlib.patches.Patch method) -
      - - -
      (matplotlib.scale.LinearScale method) -
      - - -
      (matplotlib.scale.LogScale method) -
      - - -
      (matplotlib.scale.ScaleBase method) -
      - - -
      (matplotlib.scale.SymmetricalLogScale method) -
      - - -
      (mpl_toolkits.axes_grid.axis_artist.AxisArtist method) -
      - -
      - -
      get_transformed_clip_path_and_affine() (matplotlib.artist.Artist method) -
      - - -
      get_transformed_path_and_affine() (matplotlib.transforms.TransformedPath method) -
      - - -
      get_transformed_points_and_affine() (matplotlib.transforms.TransformedPath method) -
      - - -
      get_transforms() (matplotlib.collections.Collection method) -
      - - -
      get_trifinder() (matplotlib.tri.Triangulation method) -
      - - -
      get_underline_thickness() (matplotlib.afm.AFM method) -
      - -
      - -
      (matplotlib.mathtext.Fonts method) -
      - - -
      (matplotlib.mathtext.StandardPsFonts method) -
      - - -
      (matplotlib.mathtext.TruetypeFonts method) -
      - -
      - -
      get_unicode_index() (in module matplotlib.mathtext) -
      - - -
      get_unit() (matplotlib.text.OffsetFrom method) -
      - - -
      get_unit_generic() (matplotlib.dates.RRuleLocator static method) -
      - - -
      get_units() (matplotlib.axis.Axis method) -
      - - -
      get_url() (matplotlib.artist.Artist method) -
      - -
      - -
      (matplotlib.backend_bases.GraphicsContextBase method) -
      - -
      - -
      get_urls() (matplotlib.collections.Collection method) -
      - - -
      get_used_characters() (matplotlib.mathtext.Fonts method) -
      - - -
      get_useLocale() (matplotlib.ticker.ScalarFormatter method) -
      - - -
      get_useOffset() (matplotlib.ticker.ScalarFormatter method) -
      - - -
      get_va() (matplotlib.text.Text method) -
      - - -
      get_valid_values() (matplotlib.artist.ArtistInspector method) -
      - - -
      get_variant() (matplotlib.font_manager.FontProperties method) -
      - -
      - -
      (matplotlib.text.Text method) -
      - -
      - -
      get_vector() (mpl_toolkits.mplot3d.art3d.Poly3DCollection method) -
      - - -
      get_vertical() (mpl_toolkits.axes_grid.axes_divider.Divider method) -
      - - -
      get_vertical_sizes() (mpl_toolkits.axes_grid.axes_divider.Divider method) -
      - - -
      get_vertical_stem_width() (matplotlib.afm.AFM method) -
      - - -
      get_verticalalignment() (matplotlib.text.Text method) -
      - - -
      get_verts() (matplotlib.patches.Patch method) -
      - - -
      get_view_interval() (matplotlib.axis.Axis method) -
      - -
      - -
      (matplotlib.axis.Tick method) -
      - - -
      (matplotlib.axis.XAxis method) -
      - - -
      (matplotlib.axis.XTick method) -
      - - -
      (matplotlib.axis.YAxis method) -
      - - -
      (matplotlib.axis.YTick method) -
      - - -
      (mpl_toolkits.mplot3d.axis3d.Axis method) -
      - -
      - -
      get_visible() (matplotlib.artist.Artist method) -
      - - -
      get_vsize_hsize() (mpl_toolkits.axes_grid.axes_divider.Divider method) -
      - - -
      get_w_lims() (mpl_toolkits.mplot3d.axes3d.Axes3D method) -
      - - -
      get_weight() (matplotlib.afm.AFM method) -
      - -
      - -
      (matplotlib.font_manager.FontProperties method) -
      - - -
      (matplotlib.text.Text method) -
      - -
      - -
      get_width() (matplotlib.patches.FancyBboxPatch method) -
      - -
      - -
      (matplotlib.patches.Rectangle method) -
      - -
      - -
      get_width_char() (matplotlib.afm.AFM method) -
      - - -
      get_width_from_char_name() (matplotlib.afm.AFM method) -
      - - -
      get_width_height() (matplotlib.backend_bases.FigureCanvasBase method) -
      - - -
      get_width_ratios() (matplotlib.gridspec.GridSpecBase method) -
      - - -
      get_window_extent() (matplotlib.artist.Artist method) -
      - -
      - -
      (matplotlib.axes.Axes method) -
      - - -
      (matplotlib.collections.Collection method) -
      - - -
      (matplotlib.figure.Figure method) -
      - - -
      (matplotlib.legend.Legend method) -
      - - -
      (matplotlib.lines.Line2D method) -
      - - -
      (matplotlib.patches.Patch method) -
      - - -
      (matplotlib.text.Text method) -
      - - -
      (matplotlib.text.TextWithDash method) -
      - -
      - -
      get_window_title() (matplotlib.backend_bases.FigureCanvasBase method) -
      - -
      - -
      (matplotlib.backend_bases.FigureManagerBase method) -
      - -
      - -
      get_x() (matplotlib.patches.FancyBboxPatch method) -
      - -
      - -
      (matplotlib.patches.Rectangle method) -
      - -
      - -
      get_xaxis() (matplotlib.axes.Axes method) -
      - - -
      get_xaxis_text1_transform() (matplotlib.axes.Axes method) -
      - - -
      get_xaxis_text2_transform() (matplotlib.axes.Axes method) -
      - - -
      get_xaxis_transform() (matplotlib.axes.Axes method) -
      - - -
      get_xbound() (matplotlib.axes.Axes method) -
      - - -
      get_xdata() (matplotlib.lines.Line2D method) -
      - - -
      get_xgridlines() (matplotlib.axes.Axes method) -
      - - -
      get_xheight() (matplotlib.afm.AFM method) -
      - -
      - -
      (matplotlib.mathtext.Fonts method) -
      - - -
      (matplotlib.mathtext.StandardPsFonts method) -
      - - -
      (matplotlib.mathtext.TruetypeFonts method) -
      - -
      - -
      get_xlabel() (matplotlib.axes.Axes method) -
      - - -
      get_xlim() (matplotlib.axes.Axes method) -
      - -
      - -
      (mpl_toolkits.mplot3d.axes3d.Axes3D method) -
      - -
      - -
      get_xlim3d() (mpl_toolkits.mplot3d.axes3d.Axes3D method) -
      - - -
      get_xmajorticklabels() (matplotlib.axes.Axes method) -
      - - -
      get_xminorticklabels() (matplotlib.axes.Axes method) -
      - - -
      get_xscale() (matplotlib.axes.Axes method) -
      - - -
      get_xticklabels() (matplotlib.axes.Axes method) -
      - - -
      get_xticklines() (matplotlib.axes.Axes method) -
      - - -
      get_xticks() (matplotlib.axes.Axes method) -
      - - -
      get_xy() (matplotlib.patches.Polygon method) -
      - -
      - -
      (matplotlib.patches.Rectangle method) -
      - -
      - -
      get_xydata() (matplotlib.lines.Line2D method) -
      - - -
      get_xyz_where() (in module matplotlib.mlab) -
      - - -
      get_y() (matplotlib.patches.FancyBboxPatch method) -
      - -
      - -
      (matplotlib.patches.Rectangle method) -
      - -
      - -
      get_yaxis() (matplotlib.axes.Axes method) -
      - - -
      get_yaxis_text1_transform() (matplotlib.axes.Axes method) -
      - - -
      get_yaxis_text2_transform() (matplotlib.axes.Axes method) -
      - - -
      get_yaxis_transform() (matplotlib.axes.Axes method) -
      - - -
      get_ybound() (matplotlib.axes.Axes method) -
      - - -
      get_ydata() (matplotlib.lines.Line2D method) -
      - - -
      get_ygridlines() (matplotlib.axes.Axes method) -
      - - -
      get_ylabel() (matplotlib.axes.Axes method) -
      - - -
      get_ylim() (matplotlib.axes.Axes method) -
      - -
      - -
      (mpl_toolkits.mplot3d.axes3d.Axes3D method) -
      - -
      - -
      get_ylim3d() (mpl_toolkits.mplot3d.axes3d.Axes3D method) -
      - - -
      get_ymajorticklabels() (matplotlib.axes.Axes method) -
      - - -
      get_yminorticklabels() (matplotlib.axes.Axes method) -
      - - -
      get_yscale() (matplotlib.axes.Axes method) -
      - - -
      get_yticklabels() (matplotlib.axes.Axes method) -
      - - -
      get_yticklines() (matplotlib.axes.Axes method) -
      - - -
      get_yticks() (matplotlib.axes.Axes method) -
      - - -
      get_zbound() (mpl_toolkits.mplot3d.axes3d.Axes3D method) -
      - - -
      get_zlabel() (mpl_toolkits.mplot3d.axes3d.Axes3D method) -
      - - -
      get_zlim() (mpl_toolkits.mplot3d.axes3d.Axes3D method) -
      - - -
      get_zlim3d() (mpl_toolkits.mplot3d.axes3d.Axes3D method) -
      - - -
      get_zmajorticklabels() (mpl_toolkits.mplot3d.axes3d.Axes3D method) -
      - - -
      get_zminorticklabels() (mpl_toolkits.mplot3d.axes3d.Axes3D method) -
      - - -
      get_zorder() (matplotlib.artist.Artist method) -
      - - -
      get_zscale() (mpl_toolkits.mplot3d.axes3d.Axes3D method) -
      - - -
      get_zticklabels() (mpl_toolkits.mplot3d.axes3d.Axes3D method) -
      - - -
      get_zticklines() (mpl_toolkits.mplot3d.axes3d.Axes3D method) -
      - - -
      get_zticks() (mpl_toolkits.mplot3d.axes3d.Axes3D method) -
      - - -
      getp() (in module matplotlib.artist) -
      - - -
      getpoints() (matplotlib.patches.YAArrow method) -
      - - -
      GetRealpathAndStat (class in matplotlib.cbook) -
      - - -
      ginput() (in module matplotlib.pyplot) -
      - -
      - -
      (matplotlib.figure.Figure method) -
      - -
      - -
      Glue (class in matplotlib.mathtext) -
      - - -
      GlueSpec (class in matplotlib.mathtext) -
      - - -
      grab_frame() (matplotlib.animation.MovieWriter method) -
      - - -
      grab_mouse() (matplotlib.backend_bases.FigureCanvasBase method) -
      - - -
      gradient() (matplotlib.tri.CubicTriInterpolator method) -
      - -
      - -
      (matplotlib.tri.LinearTriInterpolator method) -
      - -
      - -
      GraphicsContextBase (class in matplotlib.backend_bases) -
      - - -
      gray() (in module matplotlib.pyplot) -
      - - -
      Grid (class in mpl_toolkits.axes_grid.axes_grid) -
      - - -
      grid() (in module matplotlib.pyplot) -
      - -
      - -
      (matplotlib.axes.Axes method) -
      - - -
      (matplotlib.axis.Axis method) -
      - - -
      (mpl_toolkits.mplot3d.axes3d.Axes3D method) -
      - -
      - -
      griddata() (in module matplotlib.mlab) -
      - - -
      GridSpec (class in matplotlib.gridspec) -
      - - -
      GridSpecBase (class in matplotlib.gridspec) -
      - - -
      GridSpecFromSubplotSpec (class in matplotlib.gridspec) -
      - - -
      group() (matplotlib.mathtext.Parser method) -
      - - -
      Grouper (class in matplotlib.cbook) -
      - - -
      grow() (matplotlib.mathtext.Accent method) -
      - -
      - -
      (matplotlib.mathtext.Box method) -
      - - -
      (matplotlib.mathtext.Char method) -
      - - -
      (matplotlib.mathtext.Glue method) -
      - - -
      (matplotlib.mathtext.Kern method) -
      - - -
      (matplotlib.mathtext.List method) -
      - - -
      (matplotlib.mathtext.Node method) -
      - -
      - -
      GTK -
      - -
      - -

      H

      - - - -
      - -
      HAND (matplotlib.backend_bases.Cursors attribute) -
      - - -
      has_data() (matplotlib.axes.Axes method) -
      - - -
      has_inverse (matplotlib.transforms.Transform attribute) -
      - - -
      hatch() (matplotlib.path.Path class method) -
      - - -
      have_units() (matplotlib.artist.Artist method) -
      - -
      - -
      (matplotlib.axis.Axis method) -
      - - -
      (mpl_toolkits.mplot3d.axes3d.Axes3D method) -
      - -
      - -
      Hbox (class in matplotlib.mathtext) -
      - - -
      HCentered (class in matplotlib.mathtext) -
      - - -
      height (matplotlib.dviread.Tfm attribute), [1] -
      - -
      - -
      (matplotlib.mathtext.Kern attribute) -
      - - -
      (matplotlib.transforms.BboxBase attribute) -
      - -
      - -
      hex2color() (in module matplotlib.colors) -
      - - -
      hexbin() (in module matplotlib.pyplot) -
      - -
      - -
      (matplotlib.axes.Axes method) -
      - -
      - -
      hist() (in module matplotlib.pyplot) -
      - -
      - -
      (matplotlib.axes.Axes method) -
      - -
      - -
      hist2d() (in module matplotlib.pyplot) -
      - -
      - -
      (matplotlib.axes.Axes method) -
      - -
      - -
      hitlist() (matplotlib.artist.Artist method) -
      - - -
      hlines() (in module matplotlib.pyplot) -
      - -
      - -
      (matplotlib.axes.Axes method) -
      - -
      -
      - -
      Hlist (class in matplotlib.mathtext) -
      - - -
      hlist_out() (matplotlib.mathtext.Ship method) -
      - - -
      hms0d (matplotlib.dates.DateLocator attribute) -
      - - -
      hold() (in module matplotlib.pyplot) -
      - -
      - -
      (matplotlib.axes.Axes method) -
      - - -
      (matplotlib.figure.Figure method) -
      - -
      - -
      HOME, [1], [2] -
      - - -
      home() (matplotlib.backend_bases.NavigationToolbar2 method) -
      - -
      - -
      (matplotlib.cbook.Stack method) -
      - -
      - -
      HorizontalSpanSelector (class in matplotlib.widgets) -
      - - -
      hot() (in module matplotlib.pyplot) -
      - - -
      HourLocator (class in matplotlib.dates) -
      - - -
      hours() (in module matplotlib.dates) -
      - - -
      hpack() (matplotlib.mathtext.Hlist method) -
      - - -
      Hrule (class in matplotlib.mathtext) -
      - - -
      hsv() (in module matplotlib.pyplot) -
      - - -
      hsv_to_rgb() (in module matplotlib.colors) -
      - -
      - -

      I

      - - - -
      - -
      id (matplotlib.cbook.Scheduler attribute) -
      - - -
      identity() (in module matplotlib.mlab) -
      - -
      - -
      (matplotlib.transforms.Affine2D static method) -
      - -
      - -
      IdentityTransform (class in matplotlib.transforms) -
      - - -
      Idle (class in matplotlib.cbook) -
      - - -
      idle_event() (matplotlib.backend_bases.FigureCanvasBase method) -
      - - -
      IdleEvent (class in matplotlib.backend_bases) -
      - - -
      idlelock (matplotlib.cbook.Scheduler attribute) -
      - - -
      ignore() (matplotlib.transforms.Bbox method) -
      - -
      - -
      (matplotlib.widgets.AxesWidget method) -
      - - -
      (matplotlib.widgets.LassoSelector method) -
      - - -
      (matplotlib.widgets.RectangleSelector method) -
      - - -
      (matplotlib.widgets.SpanSelector method) -
      - -
      - -
      illegal_s (matplotlib.dates.DateFormatter attribute) -
      - - -
      ImageGrid (class in mpl_toolkits.axes_grid.axes_grid) -
      - - -
      ImageMagickBase (class in matplotlib.animation) -
      - - -
      ImageMagickFileWriter (class in matplotlib.animation) -
      - - -
      ImageMagickWriter (class in matplotlib.animation) -
      - - -
      imageObject() (matplotlib.backends.backend_pdf.PdfFile method) -
      - - -
      imread() (in module matplotlib.pyplot) -
      - - -
      imsave() (in module matplotlib.pyplot) -
      - - -
      imshow() (in module matplotlib.pyplot) -
      - -
      - -
      (matplotlib.axes.Axes method) -
      - -
      - -
      in_axes() (matplotlib.axes.Axes method) -
      - - -
      inaxes (matplotlib.backend_bases.LocationEvent attribute) -
      - -
      - -
      (matplotlib.backend_bases.MouseEvent attribute) -
      - -
      - -
      IndexDateFormatter (class in matplotlib.dates) -
      - - -
      IndexLocator (class in matplotlib.ticker) -
      - - -
      infodict() (matplotlib.backends.backend_pdf.PdfPages method) -
      - - -
      init3d() (mpl_toolkits.mplot3d.axis3d.Axis method) -
      - - -
      input_dims (matplotlib.transforms.Transform attribute) -
      - - -
      inside_poly() (in module matplotlib.mlab) -
      - - -
      interpolated() (matplotlib.path.Path method) -
      - - -
      intersection() (matplotlib.transforms.BboxBase static method) -
      - - -
      intersects_bbox() (matplotlib.path.Path method) -
      - - -
      intersects_path() (matplotlib.path.Path method) -
      - - -
      interval (matplotlib.backend_bases.TimerBase attribute) -
      - - -
      intervalx (matplotlib.transforms.BboxBase attribute) -
      - - -
      intervaly (matplotlib.transforms.BboxBase attribute) -
      - - -
      inv_transform() (in module mpl_toolkits.mplot3d.proj3d) -
      - - -
      invalidate() (matplotlib.transforms.TransformNode method) -
      - - -
      inverse() (matplotlib.colors.BoundaryNorm method) -
      - -
      - -
      (matplotlib.colors.LogNorm method) -
      - - -
      (matplotlib.colors.NoNorm method) -
      - - -
      (matplotlib.colors.Normalize method) -
      - - -
      (matplotlib.colors.SymLogNorm method) -
      - -
      - -
      inverse_transformed() (matplotlib.transforms.BboxBase method) -
      - - -
      invert_ticklabel_direction() (mpl_toolkits.axes_grid.axis_artist.AxisArtist method) -
      - - -
      invert_xaxis() (matplotlib.axes.Axes method) -
      - - -
      invert_yaxis() (matplotlib.axes.Axes method) -
      - - -
      invert_zaxis() (mpl_toolkits.mplot3d.axes3d.Axes3D method) -
      - - -
      inverted() (matplotlib.projections.polar.InvertedPolarTransform method) -
      - -
      - -
      (matplotlib.projections.polar.PolarAxes.InvertedPolarTransform method) -
      - - -
      (matplotlib.projections.polar.PolarAxes.PolarTransform method) -
      - - -
      (matplotlib.projections.polar.PolarTransform method) -
      - - -
      (matplotlib.transforms.Affine2DBase method) -
      - - -
      (matplotlib.transforms.BlendedGenericTransform method) -
      - - -
      (matplotlib.transforms.CompositeGenericTransform method) -
      - - -
      (matplotlib.transforms.IdentityTransform method) -
      - - -
      (matplotlib.transforms.Transform method) -
      - -
      - -
      InvertedPolarTransform (class in matplotlib.projections.polar) -
      - -
      - -
      ioff() (in module matplotlib.pyplot) -
      - - -
      ion() (in module matplotlib.pyplot) -
      - - -
      is_alias() (matplotlib.artist.ArtistInspector method) -
      - - -
      is_available() (matplotlib.animation.MovieWriterRegistry method) -
      - - -
      is_closed_polygon() (in module matplotlib.mlab) -
      - - -
      is_color_like() (in module matplotlib.colors) -
      - - -
      is_dashed() (matplotlib.lines.Line2D method) -
      - - -
      is_dropsub() (matplotlib.mathtext.Parser method) -
      - - -
      is_figure_set() (matplotlib.artist.Artist method) -
      - - -
      is_filled() (matplotlib.markers.MarkerStyle method) -
      - - -
      is_first_col() (matplotlib.axes.SubplotBase method) -
      - - -
      is_first_row() (matplotlib.axes.SubplotBase method) -
      - - -
      is_frame_like() (matplotlib.spines.Spine method) -
      - - -
      is_gray() (matplotlib.colors.Colormap method) -
      - - -
      is_horizontal() (matplotlib.collections.EventCollection method) -
      - - -
      is_last_col() (matplotlib.axes.SubplotBase method) -
      - - -
      is_last_row() (matplotlib.axes.SubplotBase method) -
      - - -
      is_math_text() (in module matplotlib.cbook) -
      - -
      - -
      (matplotlib.text.Text static method) -
      - -
      - -
      is_missing() (matplotlib.cbook.converter method) -
      - - -
      is_numlike() (in module matplotlib.cbook) -
      - -
      - -
      (matplotlib.units.ConversionInterface static method) -
      - -
      - -
      is_opentype_cff_font() (in module matplotlib.font_manager) -
      - - -
      is_overunder() (matplotlib.mathtext.Parser method) -
      - - -
      is_scalar() (in module matplotlib.cbook) -
      - - -
      is_scalar_or_string() (in module matplotlib.cbook) -
      - - -
      is_separable (matplotlib.transforms.Transform attribute) -
      - - -
      is_sequence_of_strings() (in module matplotlib.cbook) -
      - - -
      is_slanted() (matplotlib.mathtext.Char method) -
      - -
      - -
      (matplotlib.mathtext.Parser method) -
      - -
      - -
      is_string_like() (in module matplotlib.cbook) -
      - - -
      is_transform_set() (matplotlib.artist.Artist method) -
      - - -
      is_unit() (matplotlib.transforms.BboxBase method) -
      - - -
      is_writable_file_like() (in module matplotlib.cbook) -
      - - -
      isAvailable() (matplotlib.animation.MovieWriter class method) -
      - - -
      iscolor() (in module mpl_toolkits.mplot3d.art3d) -
      - - -
      ishold() (in module matplotlib.pyplot) -
      - -
      - -
      (matplotlib.axes.Axes method) -
      - -
      - -
      isinteractive() (in module matplotlib.pyplot) -
      - - -
      isowner() (matplotlib.widgets.LockDraw method) -
      - - -
      ispower2() (in module matplotlib.mlab) -
      - - -
      issubclass_safe() (in module matplotlib.cbook) -
      - - -
      isvector() (in module matplotlib.mlab) -
      - - -
      iter_segments() (matplotlib.path.Path method) -
      - - -
      iter_ticks() (matplotlib.axis.Axis method) -
      - - -
      iterable() (in module matplotlib.cbook) -
      - -
      - -

      J

      - - - -
      - -
      jet() (in module matplotlib.pyplot) -
      - - -
      join() (matplotlib.cbook.Grouper method) -
      - - -
      joined() (matplotlib.cbook.Grouper method) -
      - -
      - -
      JPG -
      - - -
      juggle_axes() (in module mpl_toolkits.mplot3d.art3d) -
      - -
      - -

      K

      - - - -
      - -
      Kern (class in matplotlib.mathtext) -
      - - -
      kern() (matplotlib.mathtext.Hlist method) -
      - - -
      key_press() (matplotlib.backend_bases.FigureManagerBase method) -
      - - -
      key_press_event() (matplotlib.backend_bases.FigureCanvasBase method) -
      - - -
      key_press_handler() (in module matplotlib.backend_bases) -
      - -
      - -
      key_press_handler_id (matplotlib.backend_bases.FigureManagerBase attribute) -
      - - -
      key_release_event() (matplotlib.backend_bases.FigureCanvasBase method) -
      - - -
      KeyEvent (class in matplotlib.backend_bases) -
      - - -
      kwdoc() (in module matplotlib.artist) -
      - -
      - -

      L

      - - - -
      - -
      l1norm() (in module matplotlib.mlab) -
      - - -
      l2norm() (in module matplotlib.mlab) -
      - - -
      label_minor() (matplotlib.ticker.LogFormatter method) -
      - - -
      label_outer() (matplotlib.axes.SubplotBase method) -
      - - -
      LABELPAD (mpl_toolkits.axes_grid.axis_artist.AxisArtist attribute) -
      - - -
      Lasso (class in matplotlib.widgets) -
      - - -
      LassoSelector (class in matplotlib.widgets) -
      - - -
      last() (matplotlib.mlab.FIFOBuffer method) -
      - - -
      lastevent (matplotlib.backend_bases.LocationEvent attribute) -
      - - -
      leave_notify_event() (matplotlib.backend_bases.FigureCanvasBase method) -
      - - -
      Legend (class in matplotlib.legend) -
      - - -
      legend() (in module matplotlib.pyplot) -
      - -
      - -
      (matplotlib.axes.Axes method) -
      - - -
      (matplotlib.figure.Figure method) -
      - -
      - -
      less_simple_linear_interpolation() (in module matplotlib.mlab) -
      - - -
      levypdf() (in module matplotlib.mlab) -
      - - -
      liaupunov() (in module matplotlib.mlab) -
      - - -
      LightSource (class in matplotlib.colors) -
      - - -
      limit_range_for_scale() (matplotlib.axis.Axis method) -
      - -
      - -
      (matplotlib.scale.LogScale method) -
      - - -
      (matplotlib.scale.ScaleBase method) -
      - -
      - -
      Line2D (class in matplotlib.lines) -
      - - -
      line2d() (in module mpl_toolkits.mplot3d.proj3d) -
      - - -
      line2d_dist() (in module mpl_toolkits.mplot3d.proj3d) -
      - - -
      line2d_seg_dist() (in module mpl_toolkits.mplot3d.proj3d) -
      - - -
      Line3D (class in mpl_toolkits.mplot3d.art3d) -
      - - -
      Line3DCollection (class in mpl_toolkits.mplot3d.art3d) -
      - - -
      line_2d_to_3d() (in module mpl_toolkits.mplot3d.art3d) -
      - - -
      line_collection_2d_to_3d() (in module mpl_toolkits.mplot3d.art3d) -
      - - -
      linear_spine() (matplotlib.spines.Spine class method) -
      - - -
      LinearLocator (class in matplotlib.ticker) -
      - - -
      LinearScale (class in matplotlib.scale) -
      - - -
      LinearSegmentedColormap (class in matplotlib.colors) -
      - - -
      LinearTriInterpolator (class in matplotlib.tri) -
      - -
      - -
      LineCollection (class in matplotlib.collections) -
      - - -
      lineStyles (matplotlib.lines.Line2D attribute) -
      - - -
      LINETO (matplotlib.path.Path attribute) -
      - - -
      List (class in matplotlib.mathtext) -
      - - -
      list() (matplotlib.animation.MovieWriterRegistry method) -
      - - -
      list_fonts() (in module matplotlib.font_manager) -
      - - -
      ListedColormap (class in matplotlib.colors) -
      - - -
      listFiles() (in module matplotlib.cbook) -
      - - -
      load() (in module matplotlib.mlab) -
      - - -
      locally_modified_subplot_params() (matplotlib.gridspec.GridSpec method) -
      - - -
      locate() (mpl_toolkits.axes_grid.axes_divider.Divider method) -
      - - -
      LocationEvent (class in matplotlib.backend_bases) -
      - - -
      Locator (class in matplotlib.ticker) -
      - - -
      locator (matplotlib.axis.Ticker attribute) -
      - - -
      locator_params() (in module matplotlib.pyplot) -
      - -
      - -
      (matplotlib.axes.Axes method) -
      - - -
      (mpl_toolkits.mplot3d.axes3d.Axes3D method) -
      - -
      - -
      LockDraw (class in matplotlib.widgets) -
      - - -
      locked() (matplotlib.widgets.LockDraw method) -
      - - -
      locs (matplotlib.ticker.Formatter attribute) -
      - - -
      log2() (in module matplotlib.mlab) -
      - - -
      LogFormatter (class in matplotlib.ticker) -
      - - -
      LogFormatterExponent (class in matplotlib.ticker) -
      - - -
      LogFormatterMathtext (class in matplotlib.ticker) -
      - - -
      LogLocator (class in matplotlib.ticker) -
      - - -
      loglog() (in module matplotlib.pyplot) -
      - -
      - -
      (matplotlib.axes.Axes method) -
      - -
      - -
      LogNorm (class in matplotlib.colors) -
      - - -
      LogScale (class in matplotlib.scale) -
      - - -
      logspace() (in module matplotlib.mlab) -
      - - -
      longest_contiguous_ones() (in module matplotlib.mlab) -
      - - -
      longest_ones() (in module matplotlib.mlab) -
      - -
      - -

      M

      - - - -
      - -
      main() (matplotlib.mathtext.Parser method) -
      - - -
      mainloop() (matplotlib.backend_bases.ShowBase method) -
      - - -
      make_axes() (in module matplotlib.colorbar) -
      - - -
      make_axes_gridspec() (in module matplotlib.colorbar) -
      - - -
      make_compound_path() (matplotlib.path.Path class method) -
      - - -
      make_compound_path_from_polys() (matplotlib.path.Path class method) -
      - - -
      makeMappingArray() (in module matplotlib.colors) -
      - - -
      margins() (in module matplotlib.pyplot) -
      - -
      - -
      (matplotlib.axes.Axes method) -
      - - -
      (mpl_toolkits.mplot3d.axes3d.Axes3D method) -
      - -
      - -
      markerObject() (matplotlib.backends.backend_pdf.PdfFile method) -
      - - -
      markers (matplotlib.lines.Line2D attribute) -
      - -
      - -
      (matplotlib.markers.MarkerStyle attribute) -
      - -
      - -
      MarkerStyle (class in matplotlib.markers) -
      - - -
      math() (matplotlib.mathtext.Parser method) -
      - - -
      math_string() (matplotlib.mathtext.Parser method) -
      - - -
      math_to_image() (in module matplotlib.mathtext) -
      - - -
      MathtextBackend (class in matplotlib.mathtext) -
      - - -
      MathtextBackendAgg (class in matplotlib.mathtext) -
      - - -
      MathtextBackendBitmap (class in matplotlib.mathtext) -
      - - -
      MathtextBackendCairo (class in matplotlib.mathtext) -
      - - -
      MathtextBackendPath (class in matplotlib.mathtext) -
      - - -
      MathtextBackendPdf (class in matplotlib.mathtext) -
      - - -
      MathtextBackendPs (class in matplotlib.mathtext) -
      - - -
      MathtextBackendSvg (class in matplotlib.mathtext) -
      - - -
      MathTextParser (class in matplotlib.mathtext) -
      - - -
      MathTextWarning -
      - - -
      matplotlib (module) -
      - - -
      matplotlib.afm (module) -
      - - -
      matplotlib.animation (module) -
      - - -
      matplotlib.artist (module) -
      - - -
      matplotlib.axes (module) -
      - - -
      matplotlib.axis (module) -
      - - -
      matplotlib.backend_bases (module) -
      - - -
      matplotlib.backends.backend_pdf (module) -
      - - -
      matplotlib.backends.backend_qt4agg (module) -
      - - -
      matplotlib.backends.backend_wxagg (module) -
      - - -
      matplotlib.cbook (module) -
      - - -
      matplotlib.cm (module) -
      - - -
      matplotlib.collections (module) -
      - - -
      matplotlib.colorbar (module) -
      - - -
      matplotlib.colors (module) -
      - - -
      matplotlib.dates (module) -
      - - -
      matplotlib.dviread (module) -
      - - -
      matplotlib.figure (module) -
      - - -
      matplotlib.font_manager (module) -
      - - -
      matplotlib.fontconfig_pattern (module) -
      - - -
      matplotlib.gridspec (module) -
      - - -
      matplotlib.legend (module) -
      - - -
      matplotlib.lines (module) -
      - - -
      matplotlib.markers (module) -
      - - -
      matplotlib.mathtext (module) -
      - - -
      matplotlib.mlab (module) -
      - - -
      matplotlib.patches (module) -
      - - -
      matplotlib.path (module) -
      - - -
      matplotlib.projections (module) -
      - - -
      matplotlib.projections.polar (module) -
      - - -
      matplotlib.pyplot (module) -
      - - -
      matplotlib.sankey (module) -
      - - -
      matplotlib.scale (module) -
      - -
      - -
      matplotlib.sphinxext.plot_directive (module) -
      - - -
      matplotlib.spines (module) -
      - - -
      matplotlib.text (module) -
      - - -
      matplotlib.ticker (module) -
      - - -
      matplotlib.tight_layout (module) -
      - - -
      matplotlib.transforms (module) -
      - - -
      matplotlib.tri (module) -
      - - -
      matplotlib.type1font (module) -
      - - -
      matplotlib.units (module) -
      - - -
      matplotlib.widgets (module) -
      - - -
      MatplotlibDeprecationWarning -
      - - -
      matrix_from_values() (matplotlib.transforms.Affine2DBase static method) -
      - - -
      matshow() (in module matplotlib.pyplot) -
      - -
      - -
      (matplotlib.axes.Axes method) -
      - -
      - -
      max (matplotlib.transforms.BboxBase attribute) -
      - - -
      maxdict (class in matplotlib.cbook) -
      - - -
      MaxHeight (class in mpl_toolkits.axes_grid.axes_size) -
      - - -
      MaxNLocator (class in matplotlib.ticker) -
      - - -
      MAXTICKS (matplotlib.ticker.Locator attribute) -
      - - -
      MaxWidth (class in mpl_toolkits.axes_grid.axes_size) -
      - - -
      MemoryMonitor (class in matplotlib.cbook) -
      - - -
      MencoderBase (class in matplotlib.animation) -
      - - -
      MencoderFileWriter (class in matplotlib.animation) -
      - - -
      MencoderWriter (class in matplotlib.animation) -
      - - -
      min (matplotlib.transforms.BboxBase attribute) -
      - - -
      minorticks_off() (in module matplotlib.pyplot) -
      - -
      - -
      (matplotlib.axes.Axes method) -
      - -
      - -
      minorticks_on() (in module matplotlib.pyplot) -
      - -
      - -
      (matplotlib.axes.Axes method) -
      - -
      - -
      MinuteLocator (class in matplotlib.dates) -
      - - -
      minutes() (in module matplotlib.dates) -
      - - -
      mkdirs() (in module matplotlib.cbook) -
      - - -
      mod() (in module mpl_toolkits.mplot3d.proj3d) -
      - - -
      MonthLocator (class in matplotlib.dates) -
      - - -
      motion_notify_event() (matplotlib.backend_bases.FigureCanvasBase method) -
      - - -
      mouse_init() (mpl_toolkits.mplot3d.axes3d.Axes3D method) -
      - - -
      mouse_move() (matplotlib.backend_bases.NavigationToolbar2 method) -
      - - -
      MouseEvent (class in matplotlib.backend_bases) -
      - - -
      movavg() (in module matplotlib.mlab) -
      - - -
      MOVE (matplotlib.backend_bases.Cursors attribute) -
      - - -
      move_from_center() (in module mpl_toolkits.mplot3d.axis3d) -
      - - -
      MOVETO (matplotlib.path.Path attribute) -
      - - -
      MovieWriter (class in matplotlib.animation) -
      - - -
      MovieWriterRegistry (class in matplotlib.animation) -
      - - -
      mpl_connect() (matplotlib.backend_bases.FigureCanvasBase method) -
      - - -
      mpl_disconnect() (matplotlib.backend_bases.FigureCanvasBase method) -
      - - -
      mpl_toolkits.axes_grid.axes_size (module) -
      - - -
      mpl_toolkits.mplot3d.art3d (module) -
      - - -
      mpl_toolkits.mplot3d.axes3d (module) -
      - - -
      mpl_toolkits.mplot3d.axis3d (module) -
      - - -
      mpl_toolkits.mplot3d.proj3d (module) -
      - - -
      MPLCONFIGDIR, [1] -
      - - -
      mplDeprecation (in module matplotlib.cbook) -
      - - -
      MultiCursor (class in matplotlib.widgets) -
      - - -
      MultipleLocator (class in matplotlib.ticker) -
      - - -
      mutated() (matplotlib.transforms.Bbox method) -
      - - -
      mutatedx() (matplotlib.transforms.Bbox method) -
      - - -
      mutatedy() (matplotlib.transforms.Bbox method) -
      - - -
      mx2num() (in module matplotlib.dates) -
      - -
      - -

      N

      - - - -
      - -
      Name (class in matplotlib.backends.backend_pdf) -
      - - -
      name (matplotlib.axes.Axes attribute) -
      - -
      - -
      (mpl_toolkits.mplot3d.axes3d.Axes3D attribute) -
      - -
      - -
      NavigationToolbar2 (class in matplotlib.backend_bases) -
      - - -
      NavigationToolbar2QTAgg (class in matplotlib.backends.backend_qt4agg) -
      - - -
      NavigationToolbar2WxAgg (class in matplotlib.backends.backend_wxagg) -
      - - -
      NegFil (class in matplotlib.mathtext) -
      - - -
      NegFill (class in matplotlib.mathtext) -
      - - -
      NegFilll (class in matplotlib.mathtext) -
      - - -
      new_axes() (matplotlib.widgets.SpanSelector method) -
      - - -
      new_figure_manager() (in module matplotlib.backends.backend_pdf) -
      - -
      - -
      (in module matplotlib.backends.backend_qt4agg) -
      - - -
      (in module matplotlib.backends.backend_wxagg) -
      - -
      - -
      new_figure_manager_given_figure() (in module matplotlib.backends.backend_pdf) -
      - -
      - -
      (in module matplotlib.backends.backend_qt4agg) -
      - - -
      (in module matplotlib.backends.backend_wxagg) -
      - -
      - -
      new_frame_seq() (matplotlib.animation.Animation method) -
      - -
      - -
      (matplotlib.animation.FuncAnimation method) -
      - -
      - -
      new_gc() (matplotlib.backend_bases.RendererBase method) -
      - - -
      new_horizontal() (mpl_toolkits.axes_grid.axes_divider.AxesDivider method) -
      - - -
      new_locator() (mpl_toolkits.axes_grid.axes_divider.Divider method) -
      - - -
      new_saved_frame_seq() (matplotlib.animation.Animation method) -
      - -
      - -
      (matplotlib.animation.FuncAnimation method) -
      - -
      - -
      new_subplotspec() (matplotlib.gridspec.GridSpecBase method) -
      - - -
      new_timer() (matplotlib.backend_bases.FigureCanvasBase method) -
      - - -
      new_vertical() (mpl_toolkits.axes_grid.axes_divider.AxesDivider method) -
      - - -
      no_norm (in module matplotlib.colors) -
      - -
      - -
      Node (class in matplotlib.mathtext) -
      - - -
      non_math() (matplotlib.mathtext.Parser method) -
      - - -
      NonGuiException -
      - - -
      NoNorm (class in matplotlib.colors) -
      - - -
      nonsingular() (in module matplotlib.transforms) -
      - -
      - -
      (matplotlib.dates.DateLocator method) -
      - -
      - -
      norm_angle() (in module mpl_toolkits.mplot3d.art3d) -
      - - -
      norm_flat() (in module matplotlib.mlab) -
      - - -
      norm_text_angle() (in module mpl_toolkits.mplot3d.art3d) -
      - - -
      Normalize (class in matplotlib.colors) -
      - - -
      normalize (in module matplotlib.colors) -
      - - -
      normpdf() (in module matplotlib.mlab) -
      - - -
      Null (class in matplotlib.cbook) -
      - - -
      NullFormatter (class in matplotlib.ticker) -
      - - -
      NullLocator (class in matplotlib.ticker) -
      - - -
      num2date() (in module matplotlib.dates) -
      - - -
      num2epoch() (in module matplotlib.dates) -
      - - -
      NUM_VERTICES (matplotlib.path.Path attribute) -
      - - -
      numpy -
      - - -
      numvertices (matplotlib.patches.RegularPolygon attribute) -
      - -
      - -

      O

      - - - -
      - -
      offset_line() (in module matplotlib.mlab) -
      - - -
      OffsetFrom (class in matplotlib.text) -
      - - -
      OFFSETTEXTPAD (matplotlib.axis.Axis attribute) -
      - - -
      on_changed() (matplotlib.widgets.Slider method) -
      - - -
      on_clicked() (matplotlib.widgets.Button method) -
      - -
      - -
      (matplotlib.widgets.CheckButtons method) -
      - - -
      (matplotlib.widgets.RadioButtons method) -
      - -
      - -
      on_mappable_changed() (matplotlib.colorbar.Colorbar method) -
      - - -
      onetrue() (in module matplotlib.cbook) -
      - - -
      onHilite() (matplotlib.backend_bases.FigureCanvasBase method) -
      - - -
      onmove() (matplotlib.widgets.Cursor method) -
      - -
      - -
      (matplotlib.widgets.Lasso method) -
      - - -
      (matplotlib.widgets.LassoSelector method) -
      - - -
      (matplotlib.widgets.MultiCursor method) -
      - - -
      (matplotlib.widgets.RectangleSelector method) -
      - - -
      (matplotlib.widgets.SpanSelector method) -
      - -
      - -
      onpick() (matplotlib.lines.VertexSelector method) -
      - - -
      onpress() (matplotlib.widgets.LassoSelector method) -
      - - -
      onrelease() (matplotlib.widgets.Lasso method) -
      - -
      - -
      (matplotlib.widgets.LassoSelector method) -
      - -
      - -
      onRemove() (matplotlib.backend_bases.FigureCanvasBase method) -
      - -
      - -
      open_group() (matplotlib.backend_bases.RendererBase method) -
      - - -
      Operator (class in matplotlib.backends.backend_pdf) -
      - - -
      operatorname() (matplotlib.mathtext.Parser method) -
      - - -
      option_image_nocomposite() (matplotlib.backend_bases.RendererBase method) -
      - - -
      option_scale_image() (matplotlib.backend_bases.RendererBase method) -
      - - -
      orientation (matplotlib.patches.RegularPolygon attribute) -
      - - -
      OSXInstalledFonts() (in module matplotlib.font_manager) -
      - - -
      output_args (matplotlib.animation.FFMpegBase attribute) -
      - -
      - -
      (matplotlib.animation.ImageMagickBase attribute) -
      - - -
      (matplotlib.animation.MencoderBase attribute) -
      - -
      - -
      output_dims (matplotlib.transforms.Transform attribute) -
      - - -
      over() (in module matplotlib.pyplot) -
      - - -
      overlaps() (matplotlib.transforms.BboxBase method) -
      - - -
      overline() (matplotlib.mathtext.Parser method) -
      - -
      - -

      P

      - - - -
      - -
      p0 (matplotlib.transforms.BboxBase attribute) -
      - - -
      p1 (matplotlib.transforms.BboxBase attribute) -
      - - -
      Padded (class in mpl_toolkits.axes_grid.axes_size) -
      - - -
      padded() (matplotlib.transforms.BboxBase method) -
      - - -
      paintEvent() (matplotlib.backends.backend_qt4agg.FigureCanvasQTAgg method) -
      - - -
      pan() (matplotlib.axis.Axis method) -
      - -
      - -
      (matplotlib.backend_bases.NavigationToolbar2 method) -
      - - -
      (matplotlib.ticker.Locator method) -
      - -
      - -
      parse() (matplotlib.fontconfig_pattern.FontconfigPatternParser method) -
      - -
      - -
      (matplotlib.mathtext.MathTextParser method) -
      - - -
      (matplotlib.mathtext.Parser method) -
      - -
      - -
      parse_afm() (in module matplotlib.afm) -
      - - -
      Parser (class in matplotlib.mathtext) -
      - - -
      Parser.State (class in matplotlib.mathtext) -
      - - -
      parts (matplotlib.type1font.Type1Font attribute), [1] -
      - - -
      pass_through (matplotlib.transforms.TransformNode attribute) -
      - - -
      Patch (class in matplotlib.patches) -
      - - -
      Patch3D (class in mpl_toolkits.mplot3d.art3d) -
      - - -
      Patch3DCollection (class in mpl_toolkits.mplot3d.art3d) -
      - - -
      patch_2d_to_3d() (in module mpl_toolkits.mplot3d.art3d) -
      - - -
      patch_collection_2d_to_3d() (in module mpl_toolkits.mplot3d.art3d) -
      - - -
      PatchCollection (class in matplotlib.collections) -
      - - -
      PATH, [1], [2], [3], [4] -
      - - -
      Path (class in matplotlib.path) -
      - - -
      path_in_path() (in module matplotlib.path) -
      - - -
      path_intersects_path() (in module matplotlib.path) -
      - - -
      path_length() (in module matplotlib.mlab) -
      - - -
      path_to_3d_segment() (in module mpl_toolkits.mplot3d.art3d) -
      - - -
      PathCollection (class in matplotlib.collections) -
      - - -
      PathPatch (class in matplotlib.patches) -
      - - -
      PathPatch3D (class in mpl_toolkits.mplot3d.art3d) -
      - - -
      pathpatch_2d_to_3d() (in module mpl_toolkits.mplot3d.art3d) -
      - - -
      paths_to_3d_segments() (in module mpl_toolkits.mplot3d.art3d) -
      - - -
      pause() (in module matplotlib.pyplot) -
      - - -
      PCA (class in matplotlib.mlab) -
      - - -
      pchanged() (matplotlib.artist.Artist method) -
      - - -
      pcolor() (in module matplotlib.pyplot) -
      - -
      - -
      (matplotlib.axes.Axes method) -
      - -
      - -
      pcolorfast() (matplotlib.axes.Axes method) -
      - - -
      pcolormesh() (in module matplotlib.pyplot) -
      - -
      - -
      (matplotlib.axes.Axes method) -
      - -
      - -
      PDF -
      - - -
      PdfFile (class in matplotlib.backends.backend_pdf) -
      - - -
      PdfPages (class in matplotlib.backends.backend_pdf) -
      - - -
      pdfRepr() (in module matplotlib.backends.backend_pdf) -
      - - -
      persp_transformation() (in module mpl_toolkits.mplot3d.proj3d) -
      - - -
      pick() (matplotlib.artist.Artist method) -
      - -
      - -
      (matplotlib.axes.Axes method) -
      - - -
      (matplotlib.backend_bases.FigureCanvasBase method) -
      - -
      - -
      pick_event() (matplotlib.backend_bases.FigureCanvasBase method) -
      - - -
      pickable() (matplotlib.artist.Artist method) -
      - - -
      PickEvent (class in matplotlib.backend_bases) -
      - - -
      pickle_dump() (in module matplotlib.font_manager) -
      - - -
      pickle_load() (in module matplotlib.font_manager) -
      - - -
      pie() (in module matplotlib.pyplot) -
      - -
      - -
      (matplotlib.axes.Axes method) -
      - -
      - -
      pieces() (in module matplotlib.cbook) -
      - - -
      pink() (in module matplotlib.pyplot) -
      - - -
      plot() (in module matplotlib.pyplot) -
      - -
      - -
      (matplotlib.axes.Axes method) -
      - - -
      (matplotlib.cbook.MemoryMonitor method) -
      - - -
      (mpl_toolkits.mplot3d.Axes3D method) -
      - - -
      (mpl_toolkits.mplot3d.axes3d.Axes3D method) -
      - -
      - -
      plot3D() (mpl_toolkits.mplot3d.axes3d.Axes3D method) -
      - - -
      plot_date() (in module matplotlib.pyplot) -
      - -
      - -
      (matplotlib.axes.Axes method) -
      - -
      - -
      plot_surface() (mpl_toolkits.mplot3d.Axes3D method) -
      - -
      - -
      (mpl_toolkits.mplot3d.axes3d.Axes3D method) -
      - -
      - -
      plot_trisurf() (mpl_toolkits.mplot3d.Axes3D method) -
      - -
      - -
      (mpl_toolkits.mplot3d.axes3d.Axes3D method) -
      - -
      - -
      plot_wireframe() (mpl_toolkits.mplot3d.Axes3D method) -
      - -
      - -
      (mpl_toolkits.mplot3d.axes3d.Axes3D method) -
      - -
      - -
      plotfile() (in module matplotlib.pyplot) -
      - - -
      plotting() (in module matplotlib.pyplot) -
      - - -
      PNG -
      - - -
      point_in_path() (in module matplotlib.path) -
      - - -
      point_in_path_collection() (in module matplotlib.path) -
      - - -
      POINTER (matplotlib.backend_bases.Cursors attribute) -
      - - -
      points_in_path() (in module matplotlib.path) -
      - - -
      points_to_pixels() (matplotlib.backend_bases.RendererBase method) -
      - - -
      polar() (in module matplotlib.pyplot) -
      - - -
      PolarAffine (class in matplotlib.projections.polar) -
      - - -
      PolarAxes (class in matplotlib.projections.polar) -
      - - -
      PolarAxes.InvertedPolarTransform (class in matplotlib.projections.polar) -
      - - -
      PolarAxes.PolarAffine (class in matplotlib.projections.polar) -
      - -
      - -
      PolarAxes.PolarTransform (class in matplotlib.projections.polar) -
      - - -
      PolarAxes.RadialLocator (class in matplotlib.projections.polar) -
      - - -
      PolarAxes.ThetaFormatter (class in matplotlib.projections.polar) -
      - - -
      PolarTransform (class in matplotlib.projections.polar) -
      - - -
      Poly3DCollection (class in mpl_toolkits.mplot3d.art3d) -
      - - -
      poly_below() (in module matplotlib.mlab) -
      - - -
      poly_between() (in module matplotlib.mlab) -
      - - -
      poly_collection_2d_to_3d() (in module mpl_toolkits.mplot3d.art3d) -
      - - -
      PolyCollection (class in matplotlib.collections) -
      - - -
      Polygon (class in matplotlib.patches) -
      - - -
      pop_state() (matplotlib.mathtext.Parser method) -
      - - -
      popall() (in module matplotlib.cbook) -
      - - -
      pprint_getters() (matplotlib.artist.ArtistInspector method) -
      - - -
      pprint_setters() (matplotlib.artist.ArtistInspector method) -
      - - -
      pprint_setters_rest() (matplotlib.artist.ArtistInspector method) -
      - - -
      pprint_val() (matplotlib.ticker.LogFormatter method) -
      - -
      - -
      (matplotlib.ticker.ScalarFormatter method) -
      - -
      - -
      prctile() (in module matplotlib.mlab) -
      - - -
      prctile_rank() (in module matplotlib.mlab) -
      - - -
      prepca() (in module matplotlib.mlab) -
      - - -
      press() (matplotlib.backend_bases.NavigationToolbar2 method) -
      - -
      - -
      (matplotlib.widgets.RectangleSelector method) -
      - - -
      (matplotlib.widgets.SpanSelector method) -
      - -
      - -
      press_pan() (matplotlib.backend_bases.NavigationToolbar2 method) -
      - - -
      press_zoom() (matplotlib.backend_bases.NavigationToolbar2 method) -
      - - -
      print_bmp() (matplotlib.backend_bases.FigureCanvasBase method) -
      - - -
      print_cycles() (in module matplotlib.cbook) -
      - - -
      print_emf() (matplotlib.backend_bases.FigureCanvasBase method) -
      - - -
      print_eps() (matplotlib.backend_bases.FigureCanvasBase method) -
      - - -
      print_figure() (matplotlib.backend_bases.FigureCanvasBase method) -
      - -
      - -
      (matplotlib.backends.backend_qt4agg.FigureCanvasQTAgg method) -
      - - -
      (matplotlib.backends.backend_wxagg.FigureCanvasWxAgg method) -
      - -
      - -
      print_jpeg() (matplotlib.backend_bases.FigureCanvasBase method) -
      - - -
      print_jpg() (matplotlib.backend_bases.FigureCanvasBase method) -
      - - -
      print_pdf() (matplotlib.backend_bases.FigureCanvasBase method) -
      - - -
      print_pgf() (matplotlib.backend_bases.FigureCanvasBase method) -
      - - -
      print_png() (matplotlib.backend_bases.FigureCanvasBase method) -
      - - -
      print_ps() (matplotlib.backend_bases.FigureCanvasBase method) -
      - - -
      print_raw() (matplotlib.backend_bases.FigureCanvasBase method) -
      - - -
      print_rgba() (matplotlib.backend_bases.FigureCanvasBase method) -
      - - -
      print_svg() (matplotlib.backend_bases.FigureCanvasBase method) -
      - - -
      print_svgz() (matplotlib.backend_bases.FigureCanvasBase method) -
      - - -
      print_tif() (matplotlib.backend_bases.FigureCanvasBase method) -
      - - -
      print_tiff() (matplotlib.backend_bases.FigureCanvasBase method) -
      - - -
      prism() (in module matplotlib.pyplot) -
      - - -
      process() (matplotlib.cbook.CallbackRegistry method) -
      - - -
      process_projection_requirements() (in module matplotlib.projections) -
      - - -
      process_selected() (matplotlib.lines.VertexSelector method) -
      - - -
      process_value() (matplotlib.colors.Normalize static method) -
      - - -
      proj_points() (in module mpl_toolkits.mplot3d.proj3d) -
      - - -
      proj_trans_clip_points() (in module mpl_toolkits.mplot3d.proj3d) -
      - - -
      proj_trans_points() (in module mpl_toolkits.mplot3d.proj3d) -
      - - -
      proj_transform() (in module mpl_toolkits.mplot3d.proj3d) -
      - - -
      proj_transform_clip() (in module mpl_toolkits.mplot3d.proj3d) -
      - - -
      proj_transform_vec() (in module mpl_toolkits.mplot3d.proj3d) -
      - - -
      proj_transform_vec_clip() (in module mpl_toolkits.mplot3d.proj3d) -
      - - -
      project() (matplotlib.mlab.PCA method) -
      - - -
      projection_factory() (in module matplotlib.projections) -
      - - -
      ProjectionRegistry (class in matplotlib.projections) -
      - - -
      prop (matplotlib.type1font.Type1Font attribute), [1] -
      - - -
      properties() (matplotlib.artist.Artist method) -
      - -
      - -
      (matplotlib.artist.ArtistInspector method) -
      - -
      - -
      PS -
      - - -
      psd() (in module matplotlib.mlab) -
      - -
      - -
      (in module matplotlib.pyplot) -
      - - -
      (matplotlib.axes.Axes method) -
      - -
      - -
      PsfontsMap (class in matplotlib.dviread) -
      - - -
      push() (matplotlib.cbook.Stack method) -
      - - -
      push_current() (matplotlib.backend_bases.NavigationToolbar2 method) -
      - - -
      push_state() (matplotlib.mathtext.Parser method) -
      - - -
      pyfltk -
      - - -
      pygtk -
      - - -
      pyqt -
      - - -
      python -
      - - -
      PYTHONPATH, [1] -
      - - -
      pytz -
      - -
      - -

      Q

      - - - -
      - -
      Qt -
      - - -
      Qt4 -
      - - -
      quad2cubic() (in module matplotlib.mlab) -
      - -
      - -
      QuadMesh (class in matplotlib.collections) -
      - - -
      quiver() (in module matplotlib.pyplot) -
      - -
      - -
      (matplotlib.axes.Axes method) -
      - -
      - -
      quiverkey() (in module matplotlib.pyplot) -
      - -
      - -
      (matplotlib.axes.Axes method) -
      - -
      -
      - -

      R

      - - - -
      - -
      RadialLocator (class in matplotlib.projections.polar) -
      - - -
      RadioButtons (class in matplotlib.widgets) -
      - - -
      radius (matplotlib.patches.Circle attribute) -
      - -
      - -
      (matplotlib.patches.RegularPolygon attribute) -
      - -
      - -
      raise_if_exceeds() (matplotlib.ticker.Locator method) -
      - - -
      raster graphics -
      - - -
      rc() (in module matplotlib) -
      - -
      - -
      (in module matplotlib.pyplot) -
      - -
      - -
      rc_context() (in module matplotlib.pyplot) -
      - - -
      rcdefaults() (in module matplotlib) -
      - -
      - -
      (in module matplotlib.pyplot) -
      - -
      - -
      rec2csv() (in module matplotlib.mlab) -
      - - -
      rec2txt() (in module matplotlib.mlab) -
      - - -
      rec_append_fields() (in module matplotlib.mlab) -
      - - -
      rec_drop_fields() (in module matplotlib.mlab) -
      - - -
      rec_groupby() (in module matplotlib.mlab) -
      - - -
      rec_join() (in module matplotlib.mlab) -
      - - -
      rec_keep_fields() (in module matplotlib.mlab) -
      - - -
      rec_summarize() (in module matplotlib.mlab) -
      - - -
      recache() (matplotlib.lines.Line2D method) -
      - - -
      recache_always() (matplotlib.lines.Line2D method) -
      - - -
      recs_join() (in module matplotlib.mlab) -
      - - -
      Rectangle (class in matplotlib.patches) -
      - - -
      RectangleSelector (class in matplotlib.widgets) -
      - - -
      recursive_remove() (in module matplotlib.cbook) -
      - - -
      redraw_in_frame() (matplotlib.axes.Axes method) -
      - - -
      Reference (class in matplotlib.backends.backend_pdf) -
      - - -
      refine_field() (matplotlib.tri.UniformTriRefiner method) -
      - - -
      refine_triangulation() (matplotlib.tri.UniformTriRefiner method) -
      - - -
      refresh() (matplotlib.dates.AutoDateLocator method) -
      - -
      - -
      (matplotlib.ticker.Locator method) -
      - -
      - -
      register() (matplotlib.animation.MovieWriterRegistry method) -
      - -
      - -
      (matplotlib.mlab.FIFOBuffer method) -
      - - -
      (matplotlib.projections.ProjectionRegistry method) -
      - -
      - -
      register_axis() (matplotlib.spines.Spine method) -
      - - -
      register_backend() (in module matplotlib.backend_bases) -
      - - -
      register_cmap() (in module matplotlib.cm) -
      - - -
      register_scale() (in module matplotlib.scale) -
      - - -
      Registry (class in matplotlib.units) -
      - - -
      RegularPolyCollection (class in matplotlib.collections) -
      - - -
      RegularPolygon (class in matplotlib.patches) -
      - - -
      relativedelta (class in matplotlib.dates) -
      - - -
      release() (matplotlib.backend_bases.NavigationToolbar2 method) -
      - -
      - -
      (matplotlib.widgets.LockDraw method) -
      - - -
      (matplotlib.widgets.RectangleSelector method) -
      - - -
      (matplotlib.widgets.SpanSelector method) -
      - -
      - -
      release_mouse() (matplotlib.backend_bases.FigureCanvasBase method) -
      - - -
      release_pan() (matplotlib.backend_bases.NavigationToolbar2 method) -
      - - -
      release_zoom() (matplotlib.backend_bases.NavigationToolbar2 method) -
      - -
      - -
      relim() (matplotlib.axes.Axes method) -
      - - -
      remove() (matplotlib.artist.Artist method) -
      - -
      - -
      (matplotlib.cbook.Stack method) -
      - - -
      (matplotlib.figure.AxesStack method) -
      - -
      - -
      remove_callback() (matplotlib.artist.Artist method) -
      - -
      - -
      (matplotlib.backend_bases.TimerBase method) -
      - -
      - -
      render() (matplotlib.mathtext.Accent method) -
      - -
      - -
      (matplotlib.mathtext.Box method) -
      - - -
      (matplotlib.mathtext.Char method) -
      - - -
      (matplotlib.mathtext.Node method) -
      - - -
      (matplotlib.mathtext.Rule method) -
      - -
      - -
      render_filled_rect() (matplotlib.mathtext.MathtextBackend method) -
      - - -
      render_glyph() (matplotlib.mathtext.Fonts method) -
      - -
      - -
      (matplotlib.mathtext.MathtextBackend method) -
      - - -
      (matplotlib.mathtext.MathtextBackendAgg method) -
      - - -
      (matplotlib.mathtext.MathtextBackendCairo method) -
      - - -
      (matplotlib.mathtext.MathtextBackendPath method) -
      - - -
      (matplotlib.mathtext.MathtextBackendPdf method) -
      - - -
      (matplotlib.mathtext.MathtextBackendPs method) -
      - - -
      (matplotlib.mathtext.MathtextBackendSvg method) -
      - -
      - -
      render_rect_filled() (matplotlib.mathtext.Fonts method) -
      - -
      - -
      (matplotlib.mathtext.MathtextBackendAgg method) -
      - - -
      (matplotlib.mathtext.MathtextBackendCairo method) -
      - - -
      (matplotlib.mathtext.MathtextBackendPath method) -
      - - -
      (matplotlib.mathtext.MathtextBackendPdf method) -
      - - -
      (matplotlib.mathtext.MathtextBackendPs method) -
      - - -
      (matplotlib.mathtext.MathtextBackendSvg method) -
      - -
      - -
      RendererBase (class in matplotlib.backend_bases) -
      - - -
      report() (matplotlib.cbook.MemoryMonitor method) -
      - - -
      report_memory() (in module matplotlib.cbook) -
      - - -
      required_group() (matplotlib.mathtext.Parser method) -
      - - -
      reserveObject() (matplotlib.backends.backend_pdf.PdfFile method) -
      - - -
      reset() (matplotlib.widgets.Slider method) -
      - - -
      reset_position() (matplotlib.axes.Axes method) -
      - - -
      reset_ticks() (matplotlib.axis.Axis method) -
      - - -
      resize() (matplotlib.backend_bases.FigureCanvasBase method) -
      - -
      - -
      (matplotlib.backend_bases.FigureManagerBase method) -
      - -
      - -
      resize_event() (matplotlib.backend_bases.FigureCanvasBase method) -
      - - -
      ResizeEvent (class in matplotlib.backend_bases) -
      - - -
      restore() (matplotlib.backend_bases.GraphicsContextBase method) -
      - - -
      restrict_dict() (in module matplotlib.cbook) -
      - - -
      revcmap() (in module matplotlib.cm) -
      - - -
      reverse_dict() (in module matplotlib.cbook) -
      - - -
      rgb2hex() (in module matplotlib.colors) -
      - - -
      rgb_to_hsv() (in module matplotlib.colors) -
      - - -
      rgrids() (in module matplotlib.pyplot) -
      - - -
      RingBuffer (class in matplotlib.cbook) -
      - - -
      rk4() (in module matplotlib.mlab) -
      - - -
      rms_flat() (in module matplotlib.mlab) -
      - - -
      rot_x() (in module mpl_toolkits.mplot3d.proj3d) -
      - - -
      rotate() (matplotlib.transforms.Affine2D method) -
      - - -
      rotate_around() (matplotlib.transforms.Affine2D method) -
      - - -
      rotate_axes() (in module mpl_toolkits.mplot3d.art3d) -
      - - -
      rotate_deg() (matplotlib.transforms.Affine2D method) -
      - - -
      rotate_deg_around() (matplotlib.transforms.Affine2D method) -
      - - -
      rotated() (matplotlib.transforms.BboxBase method) -
      - - -
      rrule (class in matplotlib.dates) -
      - - -
      RRuleLocator (class in matplotlib.dates) -
      - - -
      Rule (class in matplotlib.mathtext) -
      - - -
      run() (matplotlib.cbook.Idle method) -
      - -
      - -
      (matplotlib.cbook.Timeout method) -
      - -
      -
      - -

      S

      - - - -
      - -
      safe_isinf() (in module matplotlib.mlab) -
      - - -
      safe_isnan() (in module matplotlib.mlab) -
      - - -
      safe_masked_invalid() (in module matplotlib.cbook) -
      - - -
      safezip() (in module matplotlib.cbook) -
      - - -
      Sankey (class in matplotlib.sankey) -
      - - -
      save() (in module matplotlib.mlab) -
      - -
      - -
      (matplotlib.animation.Animation method) -
      - -
      - -
      save_figure() (matplotlib.backend_bases.NavigationToolbar2 method) -
      - - -
      savefig() (in module matplotlib.pyplot) -
      - -
      - -
      (matplotlib.backends.backend_pdf.PdfPages method) -
      - - -
      (matplotlib.figure.Figure method) -
      - -
      - -
      saving() (matplotlib.animation.MovieWriter method) -
      - - -
      sca() (in module matplotlib.pyplot) -
      - -
      - -
      (matplotlib.figure.Figure method) -
      - -
      - -
      ScalarFormatter (class in matplotlib.ticker) -
      - - -
      ScalarMappable (class in matplotlib.cm) -
      - - -
      scale() (matplotlib.transforms.Affine2D method) -
      - - -
      scale_factors (matplotlib.tri.TriAnalyzer attribute) -
      - - -
      scale_factory() (in module matplotlib.scale) -
      - - -
      ScaleBase (class in matplotlib.scale) -
      - - -
      Scaled (class in mpl_toolkits.axes_grid.axes_size) -
      - - -
      scaled() (matplotlib.colors.Normalize method) -
      - - -
      ScaledTranslation (class in matplotlib.transforms) -
      - - -
      scatter() (in module matplotlib.pyplot) -
      - -
      - -
      (matplotlib.axes.Axes method) -
      - - -
      (mpl_toolkits.mplot3d.Axes3D method) -
      - - -
      (mpl_toolkits.mplot3d.axes3d.Axes3D method) -
      - -
      - -
      scatter3D() (mpl_toolkits.mplot3d.axes3d.Axes3D method) -
      - - -
      Scheduler (class in matplotlib.cbook) -
      - - -
      sci() (in module matplotlib.pyplot) -
      - - -
      score_family() (matplotlib.font_manager.FontManager method) -
      - - -
      score_size() (matplotlib.font_manager.FontManager method) -
      - - -
      score_stretch() (matplotlib.font_manager.FontManager method) -
      - - -
      score_style() (matplotlib.font_manager.FontManager method) -
      - - -
      score_variant() (matplotlib.font_manager.FontManager method) -
      - - -
      score_weight() (matplotlib.font_manager.FontManager method) -
      - - -
      scroll_event() (matplotlib.backend_bases.FigureCanvasBase method) -
      - - -
      SecondLocator (class in matplotlib.dates) -
      - - -
      seconds() (in module matplotlib.dates) -
      - - -
      segment_hits() (in module matplotlib.lines) -
      - - -
      segments_intersect() (in module matplotlib.mlab) -
      - - -
      SELECT_REGION (matplotlib.backend_bases.Cursors attribute) -
      - - -
      semilogx() (in module matplotlib.pyplot) -
      - -
      - -
      (matplotlib.axes.Axes method) -
      - -
      - -
      semilogy() (in module matplotlib.pyplot) -
      - -
      - -
      (matplotlib.axes.Axes method) -
      - -
      - -
      set() (matplotlib.artist.Artist method) -
      - -
      - -
      (matplotlib.transforms.Affine2D method) -
      - - -
      (matplotlib.transforms.Bbox method) -
      - - -
      (matplotlib.transforms.TransformWrapper method) -
      - -
      - -
      set_3d_properties() (mpl_toolkits.mplot3d.art3d.Line3D method) -
      - -
      - -
      (mpl_toolkits.mplot3d.art3d.Patch3D method) -
      - - -
      (mpl_toolkits.mplot3d.art3d.Patch3DCollection method) -
      - - -
      (mpl_toolkits.mplot3d.art3d.PathPatch3D method) -
      - - -
      (mpl_toolkits.mplot3d.art3d.Poly3DCollection method) -
      - - -
      (mpl_toolkits.mplot3d.art3d.Text3D method) -
      - -
      - -
      set_aa() (matplotlib.lines.Line2D method) -
      - -
      - -
      (matplotlib.patches.Patch method) -
      - -
      - -
      set_active() (matplotlib.widgets.RectangleSelector method) -
      - - -
      set_adjustable() (matplotlib.axes.Axes method) -
      - - -
      set_agg_filter() (matplotlib.artist.Artist method) -
      - - -
      set_alpha() (matplotlib.artist.Artist method) -
      - -
      - -
      (matplotlib.backend_bases.GraphicsContextBase method) -
      - - -
      (matplotlib.collections.Collection method) -
      - - -
      (matplotlib.colorbar.ColorbarBase method) -
      - - -
      (matplotlib.patches.Patch method) -
      - -
      - -
      set_anchor() (matplotlib.axes.Axes method) -
      - -
      - -
      (mpl_toolkits.axes_grid.axes_divider.Divider method) -
      - -
      - -
      set_animated() (matplotlib.artist.Artist method) -
      - - -
      set_annotation_clip() (matplotlib.patches.ConnectionPatch method) -
      - - -
      set_antialiased() (matplotlib.backend_bases.GraphicsContextBase method) -
      - -
      - -
      (matplotlib.collections.Collection method) -
      - - -
      (matplotlib.lines.Line2D method) -
      - - -
      (matplotlib.patches.Patch method) -
      - -
      - -
      set_antialiaseds() (matplotlib.collections.Collection method) -
      - - -
      set_array() (matplotlib.cm.ScalarMappable method) -
      - - -
      set_arrowstyle() (matplotlib.patches.FancyArrowPatch method) -
      - - -
      set_aspect() (matplotlib.axes.Axes method) -
      - -
      - -
      (mpl_toolkits.axes_grid.axes_divider.Divider method) -
      - -
      - -
      set_autoscale_on() (matplotlib.axes.Axes method) -
      - -
      - -
      (mpl_toolkits.mplot3d.axes3d.Axes3D method) -
      - -
      - -
      set_autoscalex_on() (matplotlib.axes.Axes method) -
      - - -
      set_autoscaley_on() (matplotlib.axes.Axes method) -
      - - -
      set_autoscalez_on() (mpl_toolkits.mplot3d.axes3d.Axes3D method) -
      - - -
      set_axes() (matplotlib.artist.Artist method) -
      - -
      - -
      (matplotlib.lines.Line2D method) -
      - -
      - -
      set_axes_locator() (matplotlib.axes.Axes method) -
      - - -
      set_axis() (matplotlib.dates.AutoDateLocator method) -
      - -
      - -
      (matplotlib.ticker.TickHelper method) -
      - -
      - -
      set_axis_bgcolor() (matplotlib.axes.Axes method) -
      - - -
      set_axis_direction() (mpl_toolkits.axes_grid.axis_artist.AxisArtist method) -
      - -
      - -
      (mpl_toolkits.axes_grid.axis_artist.AxisLabel method) -
      - - -
      (mpl_toolkits.axes_grid.axis_artist.TickLabels method) -
      - -
      - -
      set_axis_off() (matplotlib.axes.Axes method) -
      - -
      - -
      (mpl_toolkits.mplot3d.axes3d.Axes3D method) -
      - -
      - -
      set_axis_on() (matplotlib.axes.Axes method) -
      - -
      - -
      (mpl_toolkits.mplot3d.axes3d.Axes3D method) -
      - -
      - -
      set_axisbelow() (matplotlib.axes.Axes method) -
      - -
      - -
      (mpl_toolkits.mplot3d.axes3d.Axes3D method) -
      - -
      - -
      set_axislabel_direction() (mpl_toolkits.axes_grid.axis_artist.AxisArtist method) -
      - - -
      set_axisline_style() (mpl_toolkits.axes_grid.axis_artist.AxisArtist method) -
      - - -
      set_backgroundcolor() (matplotlib.text.Text method) -
      - - -
      set_bad() (matplotlib.colors.Colormap method) -
      - - -
      set_bbox() (matplotlib.text.Text method) -
      - - -
      set_bbox_to_anchor() (matplotlib.legend.Legend method) -
      - - -
      set_bounds() (matplotlib.patches.FancyBboxPatch method) -
      - -
      - -
      (matplotlib.patches.Rectangle method) -
      - - -
      (matplotlib.spines.Spine method) -
      - - -
      (matplotlib.ticker.TickHelper method) -
      - -
      - -
      set_boxstyle() (matplotlib.patches.FancyBboxPatch method) -
      - - -
      set_c() (matplotlib.lines.Line2D method) -
      - - -
      set_canvas() (matplotlib.figure.Figure method) -
      - - -
      set_canvas_size() (matplotlib.mathtext.Fonts method) -
      - -
      - -
      (matplotlib.mathtext.MathtextBackend method) -
      - - -
      (matplotlib.mathtext.MathtextBackendAgg method) -
      - -
      - -
      set_capstyle() (matplotlib.backend_bases.GraphicsContextBase method) -
      - - -
      set_center() (matplotlib.patches.Wedge method) -
      - - -
      set_children() (matplotlib.transforms.TransformNode method) -
      - - -
      set_clim() (matplotlib.cm.ScalarMappable method) -
      - - -
      set_clip_box() (matplotlib.artist.Artist method) -
      - - -
      set_clip_on() (matplotlib.artist.Artist method) -
      - - -
      set_clip_path() (matplotlib.artist.Artist method) -
      - -
      - -
      (matplotlib.axis.Axis method) -
      - - -
      (matplotlib.axis.Tick method) -
      - - -
      (matplotlib.backend_bases.GraphicsContextBase method) -
      - -
      - -
      set_clip_rectangle() (matplotlib.backend_bases.GraphicsContextBase method) -
      - - -
      set_closed() (matplotlib.patches.Polygon method) -
      - - -
      set_cmap() (in module matplotlib.pyplot) -
      - -
      - -
      (matplotlib.cm.ScalarMappable method) -
      - -
      - -
      set_color() (matplotlib.collections.Collection method) -
      - -
      - -
      (matplotlib.collections.LineCollection method) -
      - - -
      (matplotlib.lines.Line2D method) -
      - - -
      (matplotlib.patches.Patch method) -
      - - -
      (matplotlib.spines.Spine method) -
      - - -
      (matplotlib.text.Text method) -
      - -
      - -
      set_color_cycle() (matplotlib.axes.Axes method) -
      - - -
      set_colorbar() (matplotlib.cm.ScalarMappable method) -
      - - -
      set_connectionstyle() (matplotlib.patches.FancyArrowPatch method) -
      - - -
      set_contains() (matplotlib.artist.Artist method) -
      - - -
      set_cursor() (matplotlib.backend_bases.NavigationToolbar2 method) -
      - - -
      set_cursor_props() (matplotlib.axes.Axes method) -
      - - -
      set_dash_capstyle() (matplotlib.lines.Line2D method) -
      - - -
      set_dash_joinstyle() (matplotlib.lines.Line2D method) -
      - - -
      set_dashdirection() (matplotlib.text.TextWithDash method) -
      - - -
      set_dashes() (matplotlib.backend_bases.GraphicsContextBase method) -
      - -
      - -
      (matplotlib.collections.Collection method) -
      - - -
      (matplotlib.lines.Line2D method) -
      - -
      - -
      set_dashlength() (matplotlib.text.TextWithDash method) -
      - - -
      set_dashpad() (matplotlib.text.TextWithDash method) -
      - - -
      set_dashpush() (matplotlib.text.TextWithDash method) -
      - - -
      set_dashrotation() (matplotlib.text.TextWithDash method) -
      - - -
      set_data() (matplotlib.lines.Line2D method) -
      - - -
      set_data_interval() (matplotlib.axis.Axis method) -
      - -
      - -
      (matplotlib.axis.XAxis method) -
      - - -
      (matplotlib.axis.YAxis method) -
      - - -
      (matplotlib.ticker.TickHelper method) -
      - -
      - -
      set_default_handler_map() (matplotlib.legend.Legend class method) -
      - - -
      set_default_intervals() (matplotlib.axis.Axis method) -
      - -
      - -
      (matplotlib.axis.XAxis method) -
      - - -
      (matplotlib.axis.YAxis method) -
      - -
      - -
      set_default_locators_and_formatters() (matplotlib.scale.LinearScale method) -
      - -
      - -
      (matplotlib.scale.LogScale method) -
      - - -
      (matplotlib.scale.ScaleBase method) -
      - - -
      (matplotlib.scale.SymmetricalLogScale method) -
      - -
      - -
      set_default_weight() (matplotlib.font_manager.FontManager method) -
      - - -
      set_dpi() (matplotlib.figure.Figure method) -
      - - -
      set_dpi_cor() (matplotlib.patches.FancyArrowPatch method) -
      - - -
      set_drawstyle() (matplotlib.lines.Line2D method) -
      - - -
      set_ec() (matplotlib.patches.Patch method) -
      - - -
      set_edgecolor() (matplotlib.collections.Collection method) -
      - -
      - -
      (matplotlib.figure.Figure method) -
      - - -
      (matplotlib.patches.Patch method) -
      - - -
      (mpl_toolkits.mplot3d.art3d.Poly3DCollection method) -
      - -
      - -
      set_edgecolors() (matplotlib.collections.Collection method) -
      - -
      - -
      (mpl_toolkits.mplot3d.art3d.Poly3DCollection method) -
      - -
      - -
      set_facecolor() (matplotlib.collections.Collection method) -
      - -
      - -
      (matplotlib.figure.Figure method) -
      - - -
      (matplotlib.patches.Patch method) -
      - - -
      (mpl_toolkits.mplot3d.art3d.Poly3DCollection method) -
      - -
      - -
      set_facecolors() (matplotlib.collections.Collection method) -
      - -
      - -
      (mpl_toolkits.mplot3d.art3d.Poly3DCollection method) -
      - -
      - -
      set_family() (matplotlib.font_manager.FontProperties method) -
      - -
      - -
      (matplotlib.text.Text method) -
      - -
      - -
      set_fc() (matplotlib.patches.Patch method) -
      - - -
      set_figheight() (matplotlib.figure.Figure method) -
      - - -
      set_figure() (matplotlib.artist.Artist method) -
      - -
      - -
      (matplotlib.axes.Axes method) -
      - - -
      (matplotlib.text.Annotation method) -
      - - -
      (matplotlib.text.TextWithDash method) -
      - -
      - -
      set_figwidth() (matplotlib.figure.Figure method) -
      - - -
      set_file() (matplotlib.font_manager.FontProperties method) -
      - - -
      set_fill() (matplotlib.patches.Patch method) -
      - - -
      set_fillstyle() (matplotlib.lines.Line2D method) -
      - -
      - -
      (matplotlib.markers.MarkerStyle method) -
      - -
      - -
      set_font_properties() (matplotlib.text.Text method) -
      - - -
      set_fontconfig_pattern() (matplotlib.font_manager.FontProperties method) -
      - - -
      set_fontname() (matplotlib.text.Text method) -
      - - -
      set_fontproperties() (matplotlib.text.Text method) -
      - - -
      set_fontsize() (matplotlib.text.Text method) -
      - - -
      set_fontstretch() (matplotlib.text.Text method) -
      - - -
      set_fontstyle() (matplotlib.text.Text method) -
      - - -
      set_fontvariant() (matplotlib.text.Text method) -
      - - -
      set_fontweight() (matplotlib.text.Text method) -
      - - -
      set_foreground() (matplotlib.backend_bases.GraphicsContextBase method) -
      - - -
      set_frame_on() (matplotlib.axes.Axes method) -
      - -
      - -
      (matplotlib.legend.Legend method) -
      - - -
      (mpl_toolkits.mplot3d.axes3d.Axes3D method) -
      - -
      - -
      set_frameon() (matplotlib.figure.Figure method) -
      - - -
      set_gamma() (matplotlib.colors.LinearSegmentedColormap method) -
      - - -
      set_gid() (matplotlib.artist.Artist method) -
      - -
      - -
      (matplotlib.backend_bases.GraphicsContextBase method) -
      - -
      - -
      set_graylevel() (matplotlib.backend_bases.GraphicsContextBase method) -
      - - -
      set_ha() (matplotlib.text.Text method) -
      - - -
      set_hatch() (matplotlib.backend_bases.GraphicsContextBase method) -
      - -
      - -
      (matplotlib.collections.Collection method) -
      - - -
      (matplotlib.patches.Patch method) -
      - -
      - -
      set_height() (matplotlib.patches.FancyBboxPatch method) -
      - -
      - -
      (matplotlib.patches.Rectangle method) -
      - -
      - -
      set_height_ratios() (matplotlib.gridspec.GridSpecBase method) -
      - - -
      set_history_buttons() (matplotlib.backend_bases.NavigationToolbar2 method) -
      - - -
      set_horizontal() (mpl_toolkits.axes_grid.axes_divider.Divider method) -
      - - -
      set_horizontalalignment() (matplotlib.text.Text method) -
      - - -
      set_joinstyle() (matplotlib.backend_bases.GraphicsContextBase method) -
      - - -
      set_label() (matplotlib.artist.Artist method) -
      - -
      - -
      (matplotlib.axis.Tick method) -
      - - -
      (matplotlib.colorbar.ColorbarBase method) -
      - - -
      (mpl_toolkits.axes_grid.axis_artist.AxisArtist method) -
      - -
      - -
      set_label1() (matplotlib.axis.Tick method) -
      - - -
      set_label2() (matplotlib.axis.Tick method) -
      - - -
      set_label_coords() (matplotlib.axis.Axis method) -
      - - -
      set_label_position() (matplotlib.axis.XAxis method) -
      - -
      - -
      (matplotlib.axis.YAxis method) -
      - -
      - -
      set_label_text() (matplotlib.axis.Axis method) -
      - - -
      set_linelength() (matplotlib.collections.EventCollection method) -
      - - -
      set_lineoffset() (matplotlib.collections.EventCollection method) -
      - - -
      set_linespacing() (matplotlib.text.Text method) -
      - - -
      set_linestyle() (matplotlib.backend_bases.GraphicsContextBase method) -
      - -
      - -
      (matplotlib.collections.Collection method) -
      - - -
      (matplotlib.lines.Line2D method) -
      - - -
      (matplotlib.patches.Patch method) -
      - -
      - -
      set_linestyles() (matplotlib.collections.Collection method) -
      - - -
      set_linewidth() (matplotlib.backend_bases.GraphicsContextBase method) -
      - -
      - -
      (matplotlib.collections.Collection method) -
      - - -
      (matplotlib.lines.Line2D method) -
      - - -
      (matplotlib.patches.Patch method) -
      - -
      - -
      set_linewidths() (matplotlib.collections.Collection method) -
      - - -
      set_locator() (mpl_toolkits.axes_grid.axes_divider.Divider method) -
      - - -
      set_locs() (matplotlib.ticker.Formatter method) -
      - -
      - -
      (matplotlib.ticker.ScalarFormatter method) -
      - -
      - -
      set_lod() (matplotlib.artist.Artist method) -
      - - -
      set_ls() (matplotlib.lines.Line2D method) -
      - -
      - -
      (matplotlib.patches.Patch method) -
      - -
      - -
      set_lw() (matplotlib.collections.Collection method) -
      - -
      - -
      (matplotlib.lines.Line2D method) -
      - - -
      (matplotlib.patches.Patch method) -
      - -
      - -
      set_ma() (matplotlib.text.Text method) -
      - - -
      set_major_formatter() (matplotlib.axis.Axis method) -
      - - -
      set_major_locator() (matplotlib.axis.Axis method) -
      - - -
      set_marker() (matplotlib.lines.Line2D method) -
      - -
      - -
      (matplotlib.markers.MarkerStyle method) -
      - -
      - -
      set_markeredgecolor() (matplotlib.lines.Line2D method) -
      - - -
      set_markeredgewidth() (matplotlib.lines.Line2D method) -
      - - -
      set_markerfacecolor() (matplotlib.lines.Line2D method) -
      - - -
      set_markerfacecoloralt() (matplotlib.lines.Line2D method) -
      - - -
      set_markersize() (matplotlib.lines.Line2D method) -
      - - -
      set_markevery() (matplotlib.lines.Line2D method) -
      - - -
      set_mask() (matplotlib.tri.Triangulation method) -
      - - -
      set_matrix() (matplotlib.transforms.Affine2D method) -
      - - -
      set_mec() (matplotlib.lines.Line2D method) -
      - - -
      set_message() (matplotlib.backend_bases.NavigationToolbar2 method) -
      - - -
      set_mew() (matplotlib.lines.Line2D method) -
      - - -
      set_mfc() (matplotlib.lines.Line2D method) -
      - - -
      set_mfcalt() (matplotlib.lines.Line2D method) -
      - - -
      set_minor_formatter() (matplotlib.axis.Axis method) -
      - - -
      set_minor_locator() (matplotlib.axis.Axis method) -
      - - -
      set_ms() (matplotlib.lines.Line2D method) -
      - - -
      set_multialignment() (matplotlib.text.Text method) -
      - - -
      set_mutation_aspect() (matplotlib.patches.FancyArrowPatch method) -
      - -
      - -
      (matplotlib.patches.FancyBboxPatch method) -
      - -
      - -
      set_mutation_scale() (matplotlib.patches.FancyArrowPatch method) -
      - -
      - -
      (matplotlib.patches.FancyBboxPatch method) -
      - -
      - -
      set_name() (matplotlib.font_manager.FontProperties method) -
      - -
      - -
      (matplotlib.text.Text method) -
      - -
      - -
      set_navigate() (matplotlib.axes.Axes method) -
      - - -
      set_navigate_mode() (matplotlib.axes.Axes method) -
      - - -
      set_norm() (matplotlib.cm.ScalarMappable method) -
      - - -
      set_offset_position() (matplotlib.axis.YAxis method) -
      - -
      - -
      (matplotlib.collections.Collection method) -
      - -
      - -
      set_offset_string() (matplotlib.ticker.FixedFormatter method) -
      - - -
      set_offsets() (matplotlib.collections.Collection method) -
      - - -
      set_orientation() (matplotlib.collections.EventCollection method) -
      - - -
      set_over() (matplotlib.colors.Colormap method) -
      - -
      - -
      set_pad() (matplotlib.axis.Tick method) -
      - -
      - -
      (mpl_toolkits.axes_grid.axis_artist.AxisLabel method) -
      - -
      - -
      set_pane_color() (mpl_toolkits.mplot3d.axis3d.Axis method) -
      - - -
      set_pane_pos() (mpl_toolkits.mplot3d.axis3d.Axis method) -
      - - -
      set_params() (matplotlib.ticker.MaxNLocator method) -
      - - -
      set_patch_circle() (matplotlib.spines.Spine method) -
      - - -
      set_patch_line() (matplotlib.spines.Spine method) -
      - - -
      set_patchA() (matplotlib.patches.FancyArrowPatch method) -
      - - -
      set_patchB() (matplotlib.patches.FancyArrowPatch method) -
      - - -
      set_path_effects() (matplotlib.patches.Patch method) -
      - -
      - -
      (matplotlib.text.Text method) -
      - -
      - -
      set_paths() (matplotlib.collections.Collection method) -
      - -
      - -
      (matplotlib.collections.LineCollection method) -
      - - -
      (matplotlib.collections.PatchCollection method) -
      - - -
      (matplotlib.collections.PathCollection method) -
      - - -
      (matplotlib.collections.PolyCollection method) -
      - - -
      (matplotlib.collections.QuadMesh method) -
      - - -
      (matplotlib.collections.TriMesh method) -
      - -
      - -
      set_picker() (matplotlib.artist.Artist method) -
      - -
      - -
      (matplotlib.lines.Line2D method) -
      - -
      - -
      set_pickradius() (matplotlib.axis.Axis method) -
      - -
      - -
      (matplotlib.collections.Collection method) -
      - - -
      (matplotlib.lines.Line2D method) -
      - -
      - -
      set_points() (matplotlib.transforms.Bbox method) -
      - - -
      set_position() (matplotlib.axes.Axes method) -
      - -
      - -
      (matplotlib.spines.Spine method) -
      - - -
      (matplotlib.text.Text method) -
      - - -
      (matplotlib.text.TextWithDash method) -
      - - -
      (mpl_toolkits.axes_grid.axes_divider.Divider method) -
      - -
      - -
      set_positions() (matplotlib.collections.EventCollection method) -
      - -
      - -
      (matplotlib.patches.FancyArrowPatch method) -
      - -
      - -
      set_powerlimits() (matplotlib.ticker.ScalarFormatter method) -
      - - -
      set_radius() (matplotlib.patches.Circle method) -
      - -
      - -
      (matplotlib.patches.Wedge method) -
      - -
      - -
      set_rasterization_zorder() (matplotlib.axes.Axes method) -
      - - -
      set_rasterized() (matplotlib.artist.Artist method) -
      - - -
      set_rgrids() (matplotlib.projections.polar.PolarAxes method) -
      - - -
      set_rotate_label() (mpl_toolkits.mplot3d.axis3d.Axis method) -
      - - -
      set_rotation() (matplotlib.text.Text method) -
      - - -
      set_rotation_mode() (matplotlib.text.Text method) -
      - - -
      set_scale() (matplotlib.axis.Axis method) -
      - - -
      set_scientific() (matplotlib.ticker.ScalarFormatter method) -
      - - -
      set_segments() (matplotlib.collections.LineCollection method) -
      - -
      - -
      (mpl_toolkits.mplot3d.art3d.Line3DCollection method) -
      - -
      - -
      set_size() (matplotlib.font_manager.FontProperties method) -
      - -
      - -
      (matplotlib.text.Text method) -
      - -
      - -
      set_size_inches() (matplotlib.figure.Figure method) -
      - - -
      set_slant() (matplotlib.font_manager.FontProperties method) -
      - - -
      set_smart_bounds() (matplotlib.axis.Axis method) -
      - -
      - -
      (matplotlib.spines.Spine method) -
      - -
      - -
      set_snap() (matplotlib.artist.Artist method) -
      - -
      - -
      (matplotlib.backend_bases.GraphicsContextBase method) -
      - -
      - -
      set_solid_capstyle() (matplotlib.lines.Line2D method) -
      - - -
      set_solid_joinstyle() (matplotlib.lines.Line2D method) -
      - - -
      set_sort_zpos() (mpl_toolkits.mplot3d.art3d.Line3DCollection method) -
      - -
      - -
      (mpl_toolkits.mplot3d.art3d.Patch3DCollection method) -
      - - -
      (mpl_toolkits.mplot3d.art3d.Poly3DCollection method) -
      - -
      - -
      set_stretch() (matplotlib.font_manager.FontProperties method) -
      - -
      - -
      (matplotlib.text.Text method) -
      - -
      - -
      set_style() (matplotlib.font_manager.FontProperties method) -
      - -
      - -
      (matplotlib.text.Text method) -
      - -
      - -
      set_subplotspec() (matplotlib.axes.SubplotBase method) -
      - -
      - -
      (mpl_toolkits.axes_grid.axes_divider.SubplotDivider method) -
      - -
      - -
      set_text() (matplotlib.text.Text method) -
      - - -
      set_theta1() (matplotlib.patches.Wedge method) -
      - - -
      set_theta2() (matplotlib.patches.Wedge method) -
      - - -
      set_theta_direction() (matplotlib.projections.polar.PolarAxes method) -
      - - -
      set_theta_offset() (matplotlib.projections.polar.PolarAxes method) -
      - - -
      set_theta_zero_location() (matplotlib.projections.polar.PolarAxes method) -
      - - -
      set_thetagrids() (matplotlib.projections.polar.PolarAxes method) -
      - - -
      set_tick_out() (mpl_toolkits.axes_grid.axis_artist.Ticks method) -
      - - -
      set_tick_params() (matplotlib.axis.Axis method) -
      - - -
      set_ticklabel_direction() (mpl_toolkits.axes_grid.axis_artist.AxisArtist method) -
      - - -
      set_ticklabels() (matplotlib.axis.Axis method) -
      - -
      - -
      (matplotlib.colorbar.ColorbarBase method) -
      - -
      - -
      set_ticks() (matplotlib.axis.Axis method) -
      - -
      - -
      (matplotlib.colorbar.ColorbarBase method) -
      - -
      - -
      set_ticks_position() (matplotlib.axis.XAxis method) -
      - -
      - -
      (matplotlib.axis.YAxis method) -
      - -
      - -
      set_ticksize() (mpl_toolkits.axes_grid.axis_artist.Ticks method) -
      - - -
      set_tight_layout() (matplotlib.figure.Figure method) -
      - - -
      set_title() (matplotlib.axes.Axes method) -
      - -
      - -
      (matplotlib.legend.Legend method) -
      - - -
      (mpl_toolkits.mplot3d.axes3d.Axes3D method) -
      - -
      - -
      set_top_view() (mpl_toolkits.mplot3d.axes3d.Axes3D method) -
      - - -
      set_transform() (matplotlib.artist.Artist method) -
      - -
      - -
      (matplotlib.lines.Line2D method) -
      - - -
      (matplotlib.text.TextWithDash method) -
      - -
      - -
      set_tzinfo() (matplotlib.dates.DateFormatter method) -
      - -
      - -
      (matplotlib.dates.DateLocator method) -
      - -
      - -
      set_under() (matplotlib.colors.Colormap method) -
      - - -
      set_unit() (matplotlib.text.OffsetFrom method) -
      - - -
      set_units() (matplotlib.axis.Axis method) -
      - - -
      set_url() (matplotlib.artist.Artist method) -
      - -
      - -
      (matplotlib.backend_bases.GraphicsContextBase method) -
      - -
      - -
      set_urls() (matplotlib.collections.Collection method) -
      - - -
      set_useLocale() (matplotlib.ticker.ScalarFormatter method) -
      - - -
      set_useOffset() (matplotlib.ticker.ScalarFormatter method) -
      - - -
      set_va() (matplotlib.text.Text method) -
      - - -
      set_val() (matplotlib.widgets.Slider method) -
      - - -
      set_variant() (matplotlib.font_manager.FontProperties method) -
      - -
      - -
      (matplotlib.text.Text method) -
      - -
      - -
      set_vertical() (mpl_toolkits.axes_grid.axes_divider.Divider method) -
      - - -
      set_verticalalignment() (matplotlib.text.Text method) -
      - - -
      set_verts() (matplotlib.collections.LineCollection method) -
      - -
      - -
      (matplotlib.collections.PolyCollection method) -
      - - -
      (mpl_toolkits.mplot3d.art3d.Poly3DCollection method) -
      - -
      - -
      set_view_interval() (matplotlib.axis.Axis method) -
      - -
      - -
      (matplotlib.axis.XAxis method) -
      - - -
      (matplotlib.axis.YAxis method) -
      - - -
      (matplotlib.ticker.TickHelper method) -
      - - -
      (mpl_toolkits.mplot3d.axis3d.Axis method) -
      - -
      - -
      set_visible() (matplotlib.artist.Artist method) -
      - - -
      set_weight() (matplotlib.font_manager.FontProperties method) -
      - -
      - -
      (matplotlib.text.Text method) -
      - -
      - -
      set_width() (matplotlib.patches.FancyBboxPatch method) -
      - -
      - -
      (matplotlib.patches.Rectangle method) -
      - - -
      (matplotlib.patches.Wedge method) -
      - -
      - -
      set_width_ratios() (matplotlib.gridspec.GridSpecBase method) -
      - - -
      set_window_title() (matplotlib.backend_bases.FigureCanvasBase method) -
      - -
      - -
      (matplotlib.backend_bases.FigureManagerBase method) -
      - -
      - -
      set_x() (matplotlib.patches.FancyBboxPatch method) -
      - -
      - -
      (matplotlib.patches.Rectangle method) -
      - - -
      (matplotlib.text.Text method) -
      - - -
      (matplotlib.text.TextWithDash method) -
      - -
      - -
      set_xbound() (matplotlib.axes.Axes method) -
      - - -
      set_xdata() (matplotlib.lines.Line2D method) -
      - - -
      set_xlabel() (matplotlib.axes.Axes method) -
      - - -
      set_xlim() (matplotlib.axes.Axes method) -
      - -
      - -
      (mpl_toolkits.mplot3d.axes3d.Axes3D method) -
      - -
      - -
      set_xlim3d() (mpl_toolkits.mplot3d.axes3d.Axes3D method) -
      - - -
      set_xmargin() (matplotlib.axes.Axes method) -
      - - -
      set_xscale() (matplotlib.axes.Axes method) -
      - -
      - -
      (mpl_toolkits.mplot3d.axes3d.Axes3D method) -
      - -
      - -
      set_xticklabels() (matplotlib.axes.Axes method) -
      - - -
      set_xticks() (matplotlib.axes.Axes method) -
      - - -
      set_xy() (matplotlib.patches.Polygon method) -
      - -
      - -
      (matplotlib.patches.Rectangle method) -
      - -
      - -
      set_y() (matplotlib.patches.FancyBboxPatch method) -
      - -
      - -
      (matplotlib.patches.Rectangle method) -
      - - -
      (matplotlib.text.Text method) -
      - - -
      (matplotlib.text.TextWithDash method) -
      - -
      - -
      set_ybound() (matplotlib.axes.Axes method) -
      - - -
      set_ydata() (matplotlib.lines.Line2D method) -
      - - -
      set_ylabel() (matplotlib.axes.Axes method) -
      - - -
      set_ylim() (matplotlib.axes.Axes method) -
      - -
      - -
      (mpl_toolkits.mplot3d.axes3d.Axes3D method) -
      - -
      - -
      set_ylim3d() (mpl_toolkits.mplot3d.axes3d.Axes3D method) -
      - - -
      set_ymargin() (matplotlib.axes.Axes method) -
      - - -
      set_yscale() (matplotlib.axes.Axes method) -
      - -
      - -
      (mpl_toolkits.mplot3d.axes3d.Axes3D method) -
      - -
      - -
      set_yticklabels() (matplotlib.axes.Axes method) -
      - - -
      set_yticks() (matplotlib.axes.Axes method) -
      - - -
      set_zbound() (mpl_toolkits.mplot3d.axes3d.Axes3D method) -
      - - -
      set_zlabel() (mpl_toolkits.mplot3d.axes3d.Axes3D method) -
      - - -
      set_zlim() (mpl_toolkits.mplot3d.axes3d.Axes3D method) -
      - - -
      set_zlim3d() (mpl_toolkits.mplot3d.axes3d.Axes3D method) -
      - - -
      set_zmargin() (mpl_toolkits.mplot3d.axes3d.Axes3D method) -
      - - -
      set_zorder() (matplotlib.artist.Artist method) -
      - - -
      set_zscale() (mpl_toolkits.mplot3d.axes3d.Axes3D method) -
      - - -
      set_zsort() (mpl_toolkits.mplot3d.art3d.Poly3DCollection method) -
      - - -
      set_zticklabels() (mpl_toolkits.mplot3d.axes3d.Axes3D method) -
      - - -
      set_zticks() (mpl_toolkits.mplot3d.axes3d.Axes3D method) -
      - - -
      setp() (in module matplotlib.artist) -
      - -
      - -
      (in module matplotlib.pyplot) -
      - -
      - -
      setup() (matplotlib.animation.FileMovieWriter method) -
      - -
      - -
      (matplotlib.animation.MovieWriter method) -
      - -
      - -
      shade() (matplotlib.colors.LightSource method) -
      - - -
      shade_rgb() (matplotlib.colors.LightSource method) -
      - - -
      Shadow (class in matplotlib.patches) -
      - - -
      Ship (class in matplotlib.mathtext) -
      - - -
      show() (in module matplotlib.pyplot) -
      - -
      - -
      (matplotlib.backend_bases.FigureManagerBase method) -
      - - -
      (matplotlib.figure.Figure method) -
      - -
      - -
      show_popup() (matplotlib.backend_bases.FigureManagerBase method) -
      - - -
      ShowBase (class in matplotlib.backend_bases) -
      - - -
      shrink() (matplotlib.mathtext.Accent method) -
      - -
      - -
      (matplotlib.mathtext.Box method) -
      - - -
      (matplotlib.mathtext.Char method) -
      - - -
      (matplotlib.mathtext.Glue method) -
      - - -
      (matplotlib.mathtext.Kern method) -
      - - -
      (matplotlib.mathtext.List method) -
      - - -
      (matplotlib.mathtext.Node method) -
      - -
      - -
      shrunk() (matplotlib.transforms.BboxBase method) -
      - - -
      shrunk_to_aspect() (matplotlib.transforms.BboxBase method) -
      - - -
      silent_list (class in matplotlib.cbook) -
      - - -
      simple_group() (matplotlib.mathtext.Parser method) -
      - - -
      simple_linear_interpolation() (in module matplotlib.cbook) -
      - - -
      single_shot (matplotlib.backend_bases.TimerBase attribute) -
      - - -
      size (matplotlib.dviread.DviFont attribute), [1] -
      - -
      - -
      (matplotlib.transforms.BboxBase attribute) -
      - -
      - -
      Slider (class in matplotlib.widgets) -
      - - -
      slopes() (in module matplotlib.mlab) -
      - - -
      sort() (matplotlib.cbook.Sorter method) -
      - - -
      Sorter (class in matplotlib.cbook) -
      - - -
      soundex() (in module matplotlib.cbook) -
      - - -
      space() (matplotlib.mathtext.Parser method) -
      - - -
      span_where() (matplotlib.collections.BrokenBarHCollection static method) -
      - - -
      SpanSelector (class in matplotlib.widgets) -
      - - -
      specgram() (in module matplotlib.mlab) -
      - -
      - -
      (in module matplotlib.pyplot) -
      - - -
      (matplotlib.axes.Axes method) -
      - -
      - -
      spectral() (in module matplotlib.pyplot) -
      - - -
      Spine (class in matplotlib.spines) -
      - - -
      splitx() (matplotlib.transforms.BboxBase method) -
      - - -
      splity() (matplotlib.transforms.BboxBase method) -
      - - -
      spring() (in module matplotlib.pyplot) -
      - - -
      spy() (in module matplotlib.pyplot) -
      - -
      - -
      (matplotlib.axes.Axes method) -
      - -
      - -
      sqrt() (matplotlib.mathtext.Parser method) -
      - - -
      SsGlue (class in matplotlib.mathtext) -
      - - -
      Stack (class in matplotlib.cbook) -
      - - -
      stackplot() (in module matplotlib.pyplot) -
      - -
      - -
      (matplotlib.axes.Axes method) -
      - -
      - -
      stackrel() (matplotlib.mathtext.Parser method) -
      - - -
      StandardPsFonts (class in matplotlib.mathtext) -
      - - -
      StarPolygonCollection (class in matplotlib.collections) -
      - - -
      start() (matplotlib.backend_bases.TimerBase method) -
      - - -
      start_event_loop() (matplotlib.backend_bases.FigureCanvasBase method) -
      - - -
      start_event_loop_default() (matplotlib.backend_bases.FigureCanvasBase method) -
      - - -
      start_filter() (matplotlib.backend_bases.RendererBase method) -
      - - -
      start_group() (matplotlib.mathtext.Parser method) -
      - - -
      start_pan() (matplotlib.axes.Axes method) -
      - - -
      start_rasterizing() (matplotlib.backend_bases.RendererBase method) -
      - - -
      stem() (in module matplotlib.pyplot) -
      - -
      - -
      (matplotlib.axes.Axes method) -
      - -
      - -
      step (matplotlib.backend_bases.MouseEvent attribute) -
      - - -
      step() (in module matplotlib.pyplot) -
      - -
      - -
      (matplotlib.axes.Axes method) -
      - -
      - -
      stineman_interp() (in module matplotlib.mlab) -
      - - -
      StixFonts (class in matplotlib.mathtext) -
      - - -
      StixSansFonts (class in matplotlib.mathtext) -
      - - -
      STOP (matplotlib.path.Path attribute) -
      - - -
      stop() (matplotlib.backend_bases.TimerBase method) -
      - -
      - -
      (matplotlib.cbook.Scheduler method) -
      - -
      - -
      stop_event_loop() (matplotlib.backend_bases.FigureCanvasBase method) -
      - - -
      stop_event_loop_default() (matplotlib.backend_bases.FigureCanvasBase method) -
      - - -
      stop_filter() (matplotlib.backend_bases.RendererBase method) -
      - - -
      stop_rasterizing() (matplotlib.backend_bases.RendererBase method) -
      - - -
      Stream (class in matplotlib.backends.backend_pdf) -
      - - -
      streamplot() (in module matplotlib.pyplot) -
      - -
      - -
      (matplotlib.axes.Axes method) -
      - -
      - -
      strftime() (matplotlib.dates.DateFormatter method) -
      - - -
      string_width_height() (matplotlib.afm.AFM method) -
      - - -
      strip_math() (in module matplotlib.cbook) -
      - -
      - -
      (matplotlib.backend_bases.RendererBase method) -
      - -
      - -
      Subplot (in module matplotlib.axes) -
      - - -
      subplot() (in module matplotlib.pyplot) -
      - - -
      subplot2grid() (in module matplotlib.pyplot) -
      - - -
      subplot_class_factory() (in module matplotlib.axes) -
      - - -
      subplot_tool() (in module matplotlib.pyplot) -
      - - -
      SubplotBase (class in matplotlib.axes) -
      - - -
      SubplotDivider (class in mpl_toolkits.axes_grid.axes_divider) -
      - - -
      SubplotParams (class in matplotlib.figure) -
      - - -
      subplots() (in module matplotlib.pyplot) -
      - - -
      subplots_adjust() (in module matplotlib.pyplot) -
      - -
      - -
      (matplotlib.figure.Figure method) -
      - -
      - -
      SubplotSpec (class in matplotlib.gridspec) -
      - - -
      SubplotTool (class in matplotlib.widgets) -
      - - -
      subs() (matplotlib.ticker.LogLocator method) -
      - - -
      subsuper() (matplotlib.mathtext.Parser method) -
      - - -
      SubSuperCluster (class in matplotlib.mathtext) -
      - - -
      summer() (in module matplotlib.pyplot) -
      - - -
      supported_formats (matplotlib.animation.FFMpegFileWriter attribute) -
      - -
      - -
      (matplotlib.animation.ImageMagickFileWriter attribute) -
      - - -
      (matplotlib.animation.MencoderFileWriter attribute) -
      - -
      - -
      supports_blit (matplotlib.backend_bases.FigureCanvasBase attribute) -
      - - -
      suptitle() (in module matplotlib.pyplot) -
      - -
      - -
      (matplotlib.figure.Figure method) -
      - -
      - -
      SVG -
      - - -
      switch_backend() (in module matplotlib.pyplot) -
      - - -
      switch_backends() (matplotlib.backend_bases.FigureCanvasBase method) -
      - - -
      switch_orientation() (matplotlib.collections.EventCollection method) -
      - - -
      symbol() (matplotlib.mathtext.Parser method) -
      - - -
      SymLogNorm (class in matplotlib.colors) -
      - - -
      SymmetricalLogScale (class in matplotlib.scale) -
      - -
      - -

      T

      - - - -
      - -
      table() (in module matplotlib.pyplot) -
      - -
      - -
      (matplotlib.axes.Axes method) -
      - -
      - -
      target (matplotlib.mathtext.BakomaFonts attribute) -
      - - -
      test_lines_dists() (in module mpl_toolkits.mplot3d.proj3d) -
      - - -
      test_proj() (in module mpl_toolkits.mplot3d.proj3d) -
      - - -
      test_proj_draw_axes() (in module mpl_toolkits.mplot3d.proj3d) -
      - - -
      test_proj_make_M() (in module mpl_toolkits.mplot3d.proj3d) -
      - - -
      test_rot() (in module mpl_toolkits.mplot3d.proj3d) -
      - - -
      test_world() (in module mpl_toolkits.mplot3d.proj3d) -
      - - -
      texname (matplotlib.dviread.DviFont attribute), [1] -
      - - -
      Text (class in matplotlib.text) -
      - - -
      text() (in module matplotlib.pyplot) -
      - -
      - -
      (matplotlib.axes.Axes method) -
      - - -
      (matplotlib.figure.Figure method) -
      - - -
      (mpl_toolkits.mplot3d.Axes3D method) -
      - - -
      (mpl_toolkits.mplot3d.axes3d.Axes3D method) -
      - -
      - -
      text2D() (mpl_toolkits.mplot3d.axes3d.Axes3D method) -
      - - -
      Text3D (class in mpl_toolkits.mplot3d.art3d) -
      - - -
      text3D() (mpl_toolkits.mplot3d.axes3d.Axes3D method) -
      - - -
      text_2d_to_3d() (in module mpl_toolkits.mplot3d.art3d) -
      - - -
      TextWithDash (class in matplotlib.text) -
      - - -
      Tfm (class in matplotlib.dviread) -
      - - -
      ThetaFormatter (class in matplotlib.projections.polar) -
      - - -
      thetagrids() (in module matplotlib.pyplot) -
      - - -
      Tick (class in matplotlib.axis) -
      - - -
      tick_bottom() (matplotlib.axis.XAxis method) -
      - - -
      tick_left() (matplotlib.axis.YAxis method) -
      - - -
      tick_params() (in module matplotlib.pyplot) -
      - -
      - -
      (matplotlib.axes.Axes method) -
      - - -
      (mpl_toolkits.mplot3d.axes3d.Axes3D method) -
      - -
      - -
      tick_right() (matplotlib.axis.YAxis method) -
      - - -
      tick_top() (matplotlib.axis.XAxis method) -
      - - -
      tick_update_position() (in module mpl_toolkits.mplot3d.axis3d) -
      - - -
      tick_values() (matplotlib.ticker.AutoMinorLocator method) -
      - -
      - -
      (matplotlib.ticker.FixedLocator method) -
      - - -
      (matplotlib.ticker.IndexLocator method) -
      - - -
      (matplotlib.ticker.LinearLocator method) -
      - - -
      (matplotlib.ticker.Locator method) -
      - - -
      (matplotlib.ticker.LogLocator method) -
      - - -
      (matplotlib.ticker.MaxNLocator method) -
      - - -
      (matplotlib.ticker.MultipleLocator method) -
      - - -
      (matplotlib.ticker.NullLocator method) -
      - -
      - -
      Ticker (class in matplotlib.axis) -
      - - -
      TickHelper (class in matplotlib.ticker) -
      - - -
      ticklabel_format() (in module matplotlib.pyplot) -
      - -
      - -
      (matplotlib.axes.Axes method) -
      - - -
      (mpl_toolkits.mplot3d.axes3d.Axes3D method) -
      - -
      - -
      TickLabels (class in mpl_toolkits.axes_grid.axis_artist) -
      - - -
      Ticks (class in mpl_toolkits.axes_grid.axis_artist) -
      - - -
      TIFF -
      - - -
      tight_layout() (in module matplotlib.pyplot) -
      - -
      - -
      (matplotlib.figure.Figure method) -
      - - -
      (matplotlib.gridspec.GridSpec method) -
      - -
      - -
      TimedAnimation (class in matplotlib.animation) -
      - - -
      Timeout (class in matplotlib.cbook) -
      - - -
      TimerBase (class in matplotlib.backend_bases) -
      - - -
      title() (in module matplotlib.pyplot) -
      - - -
      Tk -
      - - -
      to_filehandle() (in module matplotlib.cbook) -
      - - -
      to_mask() (matplotlib.mathtext.MathTextParser method) -
      - - -
      to_png() (matplotlib.mathtext.MathTextParser method) -
      - - -
      to_polygons() (matplotlib.path.Path method) -
      - - -
      to_rgb() (matplotlib.colors.ColorConverter method) -
      - - -
      to_rgba() (matplotlib.cm.ScalarMappable method) -
      - -
      - -
      (matplotlib.colors.ColorConverter method) -
      - - -
      (matplotlib.mathtext.MathTextParser method) -
      - -
      - -
      to_rgba_array() (matplotlib.colors.ColorConverter method) -
      - - -
      to_values() (matplotlib.transforms.Affine2DBase method) -
      - -
      - -
      todate (class in matplotlib.cbook) -
      - - -
      todatetime (class in matplotlib.cbook) -
      - - -
      tofloat (class in matplotlib.cbook) -
      - - -
      toggle() (mpl_toolkits.axes_grid.axis_artist.AxisArtist method) -
      - - -
      toint (class in matplotlib.cbook) -
      - - -
      toolitems (matplotlib.backend_bases.NavigationToolbar2 attribute) -
      - - -
      tostr (class in matplotlib.cbook) -
      - - -
      tostr() (matplotlib.mlab.FormatFormatStr method) -
      - -
      - -
      (matplotlib.mlab.FormatInt method) -
      - - -
      (matplotlib.mlab.FormatObj method) -
      - - -
      (matplotlib.mlab.FormatString method) -
      - -
      - -
      toval() (matplotlib.mlab.FormatBool method) -
      - -
      - -
      (matplotlib.mlab.FormatDate method) -
      - - -
      (matplotlib.mlab.FormatFloat method) -
      - - -
      (matplotlib.mlab.FormatInt method) -
      - - -
      (matplotlib.mlab.FormatObj method) -
      - -
      - -
      Transform (class in matplotlib.transforms) -
      - - -
      transform() (in module mpl_toolkits.mplot3d.proj3d) -
      - -
      - -
      (matplotlib.transforms.AffineBase method) -
      - - -
      (matplotlib.transforms.IdentityTransform method) -
      - - -
      (matplotlib.transforms.Transform method) -
      - - -
      (matplotlib.type1font.Type1Font method) -
      - -
      - -
      transform_affine() (matplotlib.transforms.Affine2DBase method) -
      - -
      - -
      (matplotlib.transforms.AffineBase method) -
      - - -
      (matplotlib.transforms.CompositeGenericTransform method) -
      - - -
      (matplotlib.transforms.IdentityTransform method) -
      - - -
      (matplotlib.transforms.Transform method) -
      - -
      - -
      transform_angles() (matplotlib.transforms.Transform method) -
      - - -
      transform_non_affine() (matplotlib.projections.polar.InvertedPolarTransform method) -
      - -
      - -
      (matplotlib.projections.polar.PolarAxes.InvertedPolarTransform method) -
      - - -
      (matplotlib.projections.polar.PolarAxes.PolarTransform method) -
      - - -
      (matplotlib.projections.polar.PolarTransform method) -
      - - -
      (matplotlib.transforms.AffineBase method) -
      - - -
      (matplotlib.transforms.BlendedGenericTransform method) -
      - - -
      (matplotlib.transforms.CompositeGenericTransform method) -
      - - -
      (matplotlib.transforms.IdentityTransform method) -
      - - -
      (matplotlib.transforms.Transform method) -
      - -
      - -
      transform_path() (matplotlib.transforms.AffineBase method) -
      - -
      - -
      (matplotlib.transforms.IdentityTransform method) -
      - - -
      (matplotlib.transforms.Transform method) -
      - -
      - -
      transform_path_affine() (matplotlib.transforms.AffineBase method) -
      - -
      - -
      (matplotlib.transforms.IdentityTransform method) -
      - - -
      (matplotlib.transforms.Transform method) -
      - -
      - -
      transform_path_non_affine() (matplotlib.projections.polar.PolarAxes.PolarTransform method) -
      - -
      - -
      (matplotlib.projections.polar.PolarTransform method) -
      - - -
      (matplotlib.transforms.AffineBase method) -
      - - -
      (matplotlib.transforms.CompositeGenericTransform method) -
      - - -
      (matplotlib.transforms.IdentityTransform method) -
      - - -
      (matplotlib.transforms.Transform method) -
      - -
      - -
      transform_point() (matplotlib.transforms.Affine2DBase method) -
      - -
      - -
      (matplotlib.transforms.Transform method) -
      - -
      - -
      transformed() (matplotlib.path.Path method) -
      - -
      - -
      (matplotlib.transforms.BboxBase method) -
      - -
      - -
      TransformedBbox (class in matplotlib.transforms) -
      - - -
      TransformedPath (class in matplotlib.transforms) -
      - - -
      TransformNode (class in matplotlib.transforms) -
      - - -
      TransformWrapper (class in matplotlib.transforms) -
      - - -
      translate() (matplotlib.transforms.Affine2D method) -
      - - -
      translated() (matplotlib.transforms.BboxBase method) -
      - - -
      transmute() (matplotlib.patches.ArrowStyle.Fancy method) -
      - -
      - -
      (matplotlib.patches.ArrowStyle.Simple method) -
      - - -
      (matplotlib.patches.ArrowStyle.Wedge method) -
      - - -
      (matplotlib.patches.BoxStyle.LArrow method) -
      - - -
      (matplotlib.patches.BoxStyle.RArrow method) -
      - - -
      (matplotlib.patches.BoxStyle.Round method) -
      - - -
      (matplotlib.patches.BoxStyle.Round4 method) -
      - - -
      (matplotlib.patches.BoxStyle.Roundtooth method) -
      - - -
      (matplotlib.patches.BoxStyle.Sawtooth method) -
      - - -
      (matplotlib.patches.BoxStyle.Square method) -
      - -
      - -
      TrapezoidMapTriFinder (class in matplotlib.tri) -
      - - -
      TriAnalyzer (class in matplotlib.tri) -
      - - -
      Triangulation (class in matplotlib.tri) -
      - - -
      tricontour() (in module matplotlib.pyplot) -
      - -
      - -
      (matplotlib.axes.Axes method) -
      - - -
      (mpl_toolkits.mplot3d.axes3d.Axes3D method) -
      - -
      - -
      tricontourf() (in module matplotlib.pyplot) -
      - -
      - -
      (matplotlib.axes.Axes method) -
      - - -
      (mpl_toolkits.mplot3d.axes3d.Axes3D method) -
      - -
      - -
      TriFinder (class in matplotlib.tri) -
      - - -
      TriInterpolator (class in matplotlib.tri) -
      - - -
      TriMesh (class in matplotlib.collections) -
      - - -
      tripcolor() (in module matplotlib.pyplot) -
      - -
      - -
      (matplotlib.axes.Axes method) -
      - -
      - -
      triplot() (in module matplotlib.pyplot) -
      - -
      - -
      (matplotlib.axes.Axes method) -
      - -
      - -
      TriRefiner (class in matplotlib.tri) -
      - - -
      TruetypeFonts (class in matplotlib.mathtext) -
      - - -
      TruetypeFonts.CachedFont (class in matplotlib.mathtext) -
      - - -
      ttfdict_to_fnames() (in module matplotlib.font_manager) -
      - - -
      ttfFontProperty() (in module matplotlib.font_manager) -
      - - -
      tunit_cube() (mpl_toolkits.mplot3d.axes3d.Axes3D method) -
      - - -
      tunit_edges() (mpl_toolkits.mplot3d.axes3d.Axes3D method) -
      - - -
      twinx() (in module matplotlib.pyplot) -
      - -
      - -
      (matplotlib.axes.Axes method) -
      - -
      - -
      twiny() (in module matplotlib.pyplot) -
      - -
      - -
      (matplotlib.axes.Axes method) -
      - -
      - -
      Type1Font (class in matplotlib.type1font) -
      - -
      - -

      U

      - - - -
      - -
      unichr_safe() (in module matplotlib.mathtext) -
      - - -
      unicode_safe() (in module matplotlib.cbook) -
      - - -
      UnicodeFonts (class in matplotlib.mathtext) -
      - - -
      UniformTriRefiner (class in matplotlib.tri) -
      - - -
      union() (matplotlib.transforms.BboxBase static method) -
      - - -
      unique() (in module matplotlib.cbook) -
      - - -
      unit() (matplotlib.transforms.Bbox static method) -
      - - -
      unit_bbox() (in module mpl_toolkits.mplot3d.axes3d) -
      - - -
      unit_circle() (matplotlib.path.Path class method) -
      - - -
      unit_circle_righthalf() (matplotlib.path.Path class method) -
      - - -
      unit_cube() (mpl_toolkits.mplot3d.axes3d.Axes3D method) -
      - - -
      unit_rectangle() (matplotlib.path.Path class method) -
      - - -
      unit_regular_asterisk() (matplotlib.path.Path class method) -
      - - -
      unit_regular_polygon() (matplotlib.path.Path class method) -
      - - -
      unit_regular_star() (matplotlib.path.Path class method) -
      - - -
      unknown_symbol() (matplotlib.mathtext.Parser method) -
      - - -
      unmasked_index_ranges() (in module matplotlib.cbook) -
      - - -
      update() (matplotlib.artist.Artist method) -
      - -
      - -
      (matplotlib.backend_bases.NavigationToolbar2 method) -
      - - -
      (matplotlib.figure.SubplotParams method) -
      - - -
      (matplotlib.gridspec.GridSpec method) -
      - - -
      (matplotlib.widgets.RectangleSelector method) -
      - - -
      (matplotlib.widgets.SpanSelector method) -
      - -
      - -
      update_background() (matplotlib.widgets.LassoSelector method) -
      - -
      - -
      (matplotlib.widgets.RectangleSelector method) -
      - - -
      (matplotlib.widgets.SpanSelector method) -
      - -
      - -
      update_bbox_position_size() (matplotlib.text.Annotation method) -
      - -
      - -
      (matplotlib.text.Text method) -
      - -
      - -
      update_bruteforce() (matplotlib.colorbar.Colorbar method) -
      - - -
      update_coords() (matplotlib.text.TextWithDash method) -
      - -
      - -
      update_datalim() (matplotlib.axes.Axes method) -
      - -
      - -
      (mpl_toolkits.mplot3d.axes3d.Axes3D method) -
      - -
      - -
      update_datalim_bounds() (matplotlib.axes.Axes method) -
      - - -
      update_datalim_numerix() (matplotlib.axes.Axes method) -
      - - -
      update_datalim_to_current() (matplotlib.mlab.FIFOBuffer method) -
      - - -
      update_default_handler_map() (matplotlib.legend.Legend class method) -
      - - -
      update_fonts() (matplotlib.font_manager.FontManager method) -
      - - -
      update_from() (matplotlib.artist.Artist method) -
      - -
      - -
      (matplotlib.collections.Collection method) -
      - - -
      (matplotlib.lines.Line2D method) -
      - - -
      (matplotlib.patches.Patch method) -
      - - -
      (matplotlib.text.Text method) -
      - -
      - -
      update_from_data() (matplotlib.transforms.Bbox method) -
      - - -
      update_from_data_xy() (matplotlib.transforms.Bbox method) -
      - - -
      update_from_path() (matplotlib.transforms.Bbox method) -
      - - -
      update_normal() (matplotlib.colorbar.Colorbar method) -
      - - -
      update_params() (matplotlib.axes.SubplotBase method) -
      - -
      - -
      (mpl_toolkits.axes_grid.axes_divider.SubplotDivider method) -
      - -
      - -
      update_position() (matplotlib.axis.XTick method) -
      - -
      - -
      (matplotlib.axis.YTick method) -
      - -
      - -
      update_positions() (matplotlib.text.Annotation method) -
      - - -
      update_scalarmappable() (matplotlib.collections.Collection method) -
      - - -
      update_ticks() (matplotlib.colorbar.ColorbarBase method) -
      - - -
      update_units() (matplotlib.axis.Axis method) -
      - - -
      use() (in module matplotlib) -
      - - -
      use_cmex (matplotlib.mathtext.StixFonts attribute) -
      - -
      - -
      (matplotlib.mathtext.UnicodeFonts attribute) -
      - -
      - -
      useLocale (matplotlib.ticker.ScalarFormatter attribute) -
      - - -
      useOffset (matplotlib.ticker.ScalarFormatter attribute) -
      - -
      - -

      V

      - - - -
      - -
      validCap (matplotlib.lines.Line2D attribute) -
      - - -
      validJoin (matplotlib.lines.Line2D attribute) -
      - - -
      value_escape() (in module matplotlib.fontconfig_pattern) -
      - - -
      value_unescape() (in module matplotlib.fontconfig_pattern) -
      - - -
      Vbox (class in matplotlib.mathtext) -
      - - -
      VCentered (class in matplotlib.mathtext) -
      - - -
      vec_pad_ones() (in module mpl_toolkits.mplot3d.proj3d) -
      - - -
      vector graphics -
      - - -
      vector_lengths() (in module matplotlib.mlab) -
      - - -
      VertexSelector (class in matplotlib.lines) -
      - -
      - -
      Vf (class in matplotlib.dviread) -
      - - -
      view_init() (mpl_toolkits.mplot3d.axes3d.Axes3D method) -
      - - -
      view_limits() (matplotlib.ticker.LinearLocator method) -
      - -
      - -
      (matplotlib.ticker.Locator method) -
      - - -
      (matplotlib.ticker.LogLocator method) -
      - - -
      (matplotlib.ticker.MaxNLocator method) -
      - - -
      (matplotlib.ticker.MultipleLocator method) -
      - -
      - -
      view_transformation() (in module mpl_toolkits.mplot3d.proj3d) -
      - - -
      viewlim_to_dt() (matplotlib.dates.DateLocator method) -
      - - -
      vlines() (in module matplotlib.pyplot) -
      - -
      - -
      (matplotlib.axes.Axes method) -
      - -
      - -
      Vlist (class in matplotlib.mathtext) -
      - - -
      vlist_out() (matplotlib.mathtext.Ship method) -
      - - -
      vpack() (matplotlib.mathtext.Vlist method) -
      - - -
      Vrule (class in matplotlib.mathtext) -
      - -
      - -

      W

      - - - -
      - -
      waitforbuttonpress() (in module matplotlib.pyplot) -
      - -
      - -
      (matplotlib.figure.Figure method) -
      - -
      - -
      waittime (matplotlib.cbook.Idle attribute) -
      - - -
      Wedge (class in matplotlib.patches) -
      - - -
      wedge() (matplotlib.path.Path class method) -
      - - -
      WeekdayLocator (class in matplotlib.dates) -
      - - -
      weeks() (in module matplotlib.dates) -
      - - -
      weight_as_number() (in module matplotlib.font_manager) -
      - - -
      Widget (class in matplotlib.widgets) -
      - - -
      width (matplotlib.dviread.Tfm attribute), [1] -
      - -
      - -
      (matplotlib.transforms.BboxBase attribute) -
      - -
      - -
      widths (matplotlib.dviread.DviFont attribute), [1] -
      - - -
      win32FontDirectory() (in module matplotlib.font_manager) -
      - - -
      win32InstalledFonts() (in module matplotlib.font_manager) -
      - -
      - -
      window_hanning() (in module matplotlib.mlab) -
      - - -
      window_none() (in module matplotlib.mlab) -
      - - -
      winter() (in module matplotlib.pyplot) -
      - - -
      world_transformation() (in module mpl_toolkits.mplot3d.proj3d) -
      - - -
      wrap() (in module matplotlib.cbook) -
      - - -
      write() (matplotlib.backends.backend_pdf.Stream method) -
      - - -
      writeInfoDict() (matplotlib.backends.backend_pdf.PdfFile method) -
      - - -
      writeTrailer() (matplotlib.backends.backend_pdf.PdfFile method) -
      - - -
      writeXref() (matplotlib.backends.backend_pdf.PdfFile method) -
      - - -
      wxpython -
      - - -
      wxWidgets -
      - -
      - -

      X

      - - - -
      - -
      x (matplotlib.backend_bases.LocationEvent attribute) -
      - -
      - -
      (matplotlib.backend_bases.MouseEvent attribute) -
      - -
      - -
      x0 (matplotlib.transforms.BboxBase attribute) -
      - - -
      x1 (matplotlib.transforms.BboxBase attribute) -
      - - -
      XAxis (class in matplotlib.axis) -
      - -
      - -
      (class in mpl_toolkits.mplot3d.axis3d) -
      - -
      - -
      xaxis_date() (matplotlib.axes.Axes method) -
      - - -
      xaxis_inverted() (matplotlib.axes.Axes method) -
      - - -
      xcorr() (in module matplotlib.pyplot) -
      - -
      - -
      (matplotlib.axes.Axes method) -
      - -
      - -
      xdata (matplotlib.backend_bases.LocationEvent attribute) -
      - -
      - -
      (matplotlib.backend_bases.MouseEvent attribute) -
      - -
      - -
      xlabel() (in module matplotlib.pyplot) -
      - - -
      xlat() (matplotlib.cbook.Xlator method) -
      - -
      - -
      Xlator (class in matplotlib.cbook) -
      - - -
      xlim() (in module matplotlib.pyplot) -
      - - -
      xmax (matplotlib.transforms.BboxBase attribute) -
      - - -
      xmin (matplotlib.transforms.BboxBase attribute) -
      - - -
      xscale() (in module matplotlib.pyplot) -
      - - -
      XTick (class in matplotlib.axis) -
      - - -
      xticks() (in module matplotlib.pyplot) -
      - - -
      xy (matplotlib.patches.Polygon attribute) -
      - -
      - -
      (matplotlib.patches.Rectangle attribute) -
      - - -
      (matplotlib.patches.RegularPolygon attribute) -
      - -
      - -
      xy() (matplotlib.cbook.MemoryMonitor method) -
      - -
      - -

      Y

      - - - -
      - -
      y (matplotlib.backend_bases.LocationEvent attribute) -
      - -
      - -
      (matplotlib.backend_bases.MouseEvent attribute) -
      - -
      - -
      y0 (matplotlib.transforms.BboxBase attribute) -
      - - -
      y1 (matplotlib.transforms.BboxBase attribute) -
      - - -
      YAArrow (class in matplotlib.patches) -
      - - -
      YAxis (class in matplotlib.axis) -
      - -
      - -
      (class in mpl_toolkits.mplot3d.axis3d) -
      - -
      - -
      yaxis_date() (matplotlib.axes.Axes method) -
      - - -
      yaxis_inverted() (matplotlib.axes.Axes method) -
      - - -
      ydata (matplotlib.backend_bases.LocationEvent attribute) -
      - -
      - -
      (matplotlib.backend_bases.MouseEvent attribute) -
      - -
      -
      - -
      YearLocator (class in matplotlib.dates) -
      - - -
      ylabel() (in module matplotlib.pyplot) -
      - - -
      ylim() (in module matplotlib.pyplot) -
      - - -
      ymax (matplotlib.transforms.BboxBase attribute) -
      - - -
      ymin (matplotlib.transforms.BboxBase attribute) -
      - - -
      yscale() (in module matplotlib.pyplot) -
      - - -
      YTick (class in matplotlib.axis) -
      - - -
      yticks() (in module matplotlib.pyplot) -
      - -
      - -

      Z

      - - - -
      - -
      zalpha() (in module mpl_toolkits.mplot3d.art3d) -
      - - -
      ZAxis (class in mpl_toolkits.mplot3d.axis3d) -
      - - -
      zaxis_date() (mpl_toolkits.mplot3d.axes3d.Axes3D method) -
      - - -
      zaxis_inverted() (mpl_toolkits.mplot3d.axes3d.Axes3D method) -
      - -
      - -
      zoom() (matplotlib.axis.Axis method) -
      - -
      - -
      (matplotlib.backend_bases.NavigationToolbar2 method) -
      - - -
      (matplotlib.ticker.Locator method) -
      - -
      - -
      zorder (matplotlib.artist.Artist attribute) -
      - -
      - -
      (matplotlib.legend.Legend attribute) -
      - - -
      (matplotlib.lines.Line2D attribute) -
      - - -
      (matplotlib.patches.Patch attribute) -
      - - -
      (matplotlib.text.Text attribute) -
      - -
      - -
      ZORDER (mpl_toolkits.axes_grid.axis_artist.AxisArtist attribute) -
      - -
      - - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/glossary/index.html b/dev/glossary/index.html deleted file mode 100644 index 66735bacf04..00000000000 --- a/dev/glossary/index.html +++ /dev/null @@ -1,267 +0,0 @@ - - - - - - - - Glossary — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      Previous topic

      -

      widgets

      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      Glossary

      -
      -
      AGG
      -
      The Anti-Grain Geometry (Agg) rendering engine, capable of rendering -high-quality images
      -
      Cairo
      -
      The Cairo graphics engine
      -
      dateutil
      -
      The dateutil library -provides extensions to the standard datetime module
      -
      EPS
      -
      Encapsulated Postscript (EPS)
      -
      FLTK
      -
      FLTK (pronounced “fulltick”) is a cross-platform C++ GUI toolkit for -UNIX/Linux (X11), Microsoft Windows, and MacOS X
      -
      freetype
      -
      freetype is a font rasterization -library used by matplotlib which supports TrueType, Type 1, and -OpenType fonts.
      -
      GDK
      -
      The Gimp Drawing Kit for GTK+
      -
      GTK
      -
      The GIMP Toolkit (GTK) graphical user interface library
      -
      JPG
      -
      The Joint Photographic Experts Group (JPEG) compression method and -file format for photographic images
      -
      numpy
      -
      numpy is the standard numerical -array library for python, the successor to Numeric and numarray. -numpy provides fast operations for homogeneous data sets and -common mathematical operations like correlations, standard -deviation, fourier transforms, and convolutions.
      -
      PDF
      -
      Adobe’s Portable Document Format (PDF)
      -
      PNG
      -
      Portable Network Graphics (PNG), a raster graphics format -that employs lossless data compression which is more suitable -for line art than the lossy jpg format. Unlike the gif format, -png is not encumbered by requirements for a patent license.
      -
      PS
      -
      Postscript (PS) is a -vector graphics ASCII text language widely used in printers and -publishing. Postscript was developed by adobe systems and is -starting to show its age: for example is does not have an alpha -channel. PDF was designed in part as a next-generation document -format to replace postscript
      -
      pyfltk
      -
      pyfltk provides python -wrappers for the FLTK widgets library for use with -FLTKAgg
      -
      pygtk
      -
      pygtk provides python wrappers for -the GTK widgets library for use with the GTK or GTKAgg -backend. Widely used on linux, and is often packages as -‘python-gtk2’
      -
      pyqt
      -
      pyqt provides python -wrappers for the Qt widgets library and is required by -the matplotlib QtAgg and Qt4Agg backends. Widely used on linux -and windows; many linux distributions package this as -‘python-qt3’ or ‘python-qt4’.
      -
      python
      -
      python is an object oriented interpreted -language widely used for scripting, application development, web -application servers, scientific computing and more.
      -
      pytz
      -
      pytz provides the Olson tz -database in Python. it allows accurate and cross platform -timezone calculations and solves the issue of ambiguous times at -the end of daylight savings
      -
      Qt
      -
      Qt is a cross-platform -application framework for desktop and embedded development.
      -
      Qt4
      -
      Qt4 is the most recent -version of Qt cross-platform application framework for desktop -and embedded development.
      -
      raster graphics
      -
      Raster graphics, or bitmaps, -represent an image as an array of pixels which is resolution -dependent. Raster graphics are generally most practical for -photo-realistic images, but do not scale easily without loss of -quality.
      -
      SVG
      -
      The Scalable Vector Graphics format (SVG). An XML based vector -graphics format supported by many web browsers.
      -
      TIFF
      -
      Tagged Image File Format (TIFF) is a -file format for storing images, including photographs and line -art.
      -
      Tk
      -
      Tk is a graphical user interface for Tcl -and many other dynamic languages. It can produce rich, native -applications that run unchanged across Windows, Mac OS X, Linux -and more.
      -
      vector graphics
      -
      vector graphics use geometrical -primitives based upon mathematical equations to represent images -in computer graphics. Primitives can include points, lines, -curves, and shapes or polygons. Vector graphics are scalable, -which means that they can be resized without suffering from -issues related to inherent resolution like are seen in raster -graphics. Vector graphics are generally most practical for -typesetting and graphic design applications.
      -
      wxpython
      -
      wxpython provides python wrappers -for the wxWidgets library for use with the WX and WXAgg -backends. Widely used on linux, OS-X and windows, it is often -packaged by linux distributions as ‘python-wxgtk’
      -
      wxWidgets
      -
      WX is cross-platform GUI and -tools library for GTK, MS Windows, and MacOS. It uses native -widgets for each operating system, so applications will have the -look-and-feel that users on that operating system expect.
      -
      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/index.html b/dev/index.html deleted file mode 100644 index 70182b71de4..00000000000 --- a/dev/index.html +++ /dev/null @@ -1,343 +0,0 @@ - - - - - - - - matplotlib: python plotting — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      - - -
      -
      - -
      -
      -
      -
      - - -

      Introduction

      - -

      matplotlib is a python 2D plotting library which produces - publication quality figures in a variety of hardcopy formats and - interactive environments across platforms. matplotlib can be used - in python scripts, the python and ipython shell (ala - MATLAB®* - or - Mathematica®), - web application servers, and six graphical user - interface toolkits.

      - -

      screenshots

      - -

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

      - -

      For example, using "ipython --pylab" to provide an interactive - environment, to generate 10,000 gaussian random numbers and plot a - histogram with 100 bins, you simply need to - type

      - -
      -  x = randn(10000)
      -  hist(x, 100)
      - -

      For the power user, you have full control of line styles, font - properties, axes properties, etc, via an object oriented interface - or via a set of functions familiar to MATLAB users.

      - -
      -

      John Hunter (1968-2012)

      - - - - - -
      - - -

      - On August 28 2012, John D. Hunter, the creator of matplotlib, died - from complications arising from cancer treatment, after a brief but - intense battle with this terrible illness. John is survived by his - wife Miriam, his three daughters Rahel, Ava and Clara, his sisters - Layne and Mary, and his mother Sarah.

      - -

      - If you have benefited from John's many contributions, please say - thanks in the way that would matter most to him. Please consider - making a donation to - the John Hunter Memorial - Fund.

      -
      -
      - -

      Download

      - - Visit the - matplotlib downloads - page. - -

      Documentation

      - - This is the documentation for matplotlib version 1.3.x. - -

      - - -

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

      - -

      Other learning resources

      - - - -

      Need help?

      - -

      Check the faq, -the api docs, -mailing -list archives, and join the matplotlib -mailing lists. -Check out the matplotlib questions -on stackoverflow. -The search tool searches all of -the documentation, including full text search of over 350 complete -examples which exercise almost every corner of matplotlib.

      - -

      You can file bugs, patches and feature requests on the -github -tracker, -but it is a good idea to ping us on the mailing list too.

      - -

      To keep up to date with what's going on in matplotlib, see -the what's new -page, the more detailed changelog or browse -the source -code. Anything that could require changes to your existing code -is logged in the api -changes file.

      - -

      Toolkits

      - -

      There are several matplotlib add-on toolkits, -including a choice of two projection and mapping toolkits basemap and -cartopy, -3d plotting with mplot3d, -axes and axis helpers in axes_grid and more. -

      - -

      Citing matplotlib

      - -

      - matplotlib is the brainchild of John Hunter (1968-2012), who, along with its many - contributors, have put an immeasurable amount of time and effort into producing a - piece of software utilized by thousands of scientists worldwide. - - If matplotlib contributes to a project that leads to a scientific publication, - please acknowledge this work by citing the project. You can use this - ready-made citation entry. -

      - -

      Open source

      - -

      -Please consider donating -to support matplotlib development or to the John Hunter Memorial Fund. -

      - -

      -The matplotlib license is based on the Python Software Foundation -(PSF) license. -

      - -

      -There is an active developer community and a long list of people -who have made significant contributions. -

      - - -

      -* -MATLAB is a registered trademark of The MathWorks, Inc. -

      -

      - -Mathematica is a registered trademark of Wolfram Research, Inc. -

      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/mpl_examples/api/artist_demo.hires.png b/dev/mpl_examples/api/artist_demo.hires.png deleted file mode 100644 index 61d9b6830fc..00000000000 Binary files a/dev/mpl_examples/api/artist_demo.hires.png and /dev/null differ diff --git a/dev/mpl_examples/api/artist_demo.pdf b/dev/mpl_examples/api/artist_demo.pdf deleted file mode 100644 index 83905f17b56..00000000000 Binary files a/dev/mpl_examples/api/artist_demo.pdf and /dev/null differ diff --git a/dev/mpl_examples/api/artist_demo.png b/dev/mpl_examples/api/artist_demo.png deleted file mode 100644 index a603600d141..00000000000 Binary files a/dev/mpl_examples/api/artist_demo.png and /dev/null differ diff --git a/dev/mpl_examples/api/artist_demo.py b/dev/mpl_examples/api/artist_demo.py deleted file mode 100644 index 35dc77759c6..00000000000 --- a/dev/mpl_examples/api/artist_demo.py +++ /dev/null @@ -1,119 +0,0 @@ -""" -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() diff --git a/dev/mpl_examples/api/barchart_demo.hires.png b/dev/mpl_examples/api/barchart_demo.hires.png deleted file mode 100644 index 2cd395f9c1a..00000000000 Binary files a/dev/mpl_examples/api/barchart_demo.hires.png and /dev/null differ diff --git a/dev/mpl_examples/api/barchart_demo.pdf b/dev/mpl_examples/api/barchart_demo.pdf deleted file mode 100644 index aa371dcd463..00000000000 Binary files a/dev/mpl_examples/api/barchart_demo.pdf and /dev/null differ diff --git a/dev/mpl_examples/api/barchart_demo.png b/dev/mpl_examples/api/barchart_demo.png deleted file mode 100644 index 16a956b6e51..00000000000 Binary files a/dev/mpl_examples/api/barchart_demo.png and /dev/null differ diff --git a/dev/mpl_examples/api/barchart_demo.py b/dev/mpl_examples/api/barchart_demo.py deleted file mode 100644 index 2c3468a4762..00000000000 --- a/dev/mpl_examples/api/barchart_demo.py +++ /dev/null @@ -1,40 +0,0 @@ - -#!/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 = plt.figure() -ax = fig.add_subplot(111) -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 -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() diff --git a/dev/mpl_examples/api/bbox_intersect.hires.png b/dev/mpl_examples/api/bbox_intersect.hires.png deleted file mode 100644 index b93bdfe95dd..00000000000 Binary files a/dev/mpl_examples/api/bbox_intersect.hires.png and /dev/null differ diff --git a/dev/mpl_examples/api/bbox_intersect.pdf b/dev/mpl_examples/api/bbox_intersect.pdf deleted file mode 100644 index 83459d8eebf..00000000000 Binary files a/dev/mpl_examples/api/bbox_intersect.pdf and /dev/null differ diff --git a/dev/mpl_examples/api/bbox_intersect.png b/dev/mpl_examples/api/bbox_intersect.png deleted file mode 100644 index 205a3a30f75..00000000000 Binary files a/dev/mpl_examples/api/bbox_intersect.png and /dev/null differ diff --git a/dev/mpl_examples/api/bbox_intersect.py b/dev/mpl_examples/api/bbox_intersect.py deleted file mode 100644 index 9a495a2e241..00000000000 --- a/dev/mpl_examples/api/bbox_intersect.py +++ /dev/null @@ -1,19 +0,0 @@ -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() diff --git a/dev/mpl_examples/api/clippath_demo.hires.png b/dev/mpl_examples/api/clippath_demo.hires.png deleted file mode 100644 index 970194adbd5..00000000000 Binary files a/dev/mpl_examples/api/clippath_demo.hires.png and /dev/null differ diff --git a/dev/mpl_examples/api/clippath_demo.pdf b/dev/mpl_examples/api/clippath_demo.pdf deleted file mode 100644 index 054afc69655..00000000000 Binary files a/dev/mpl_examples/api/clippath_demo.pdf and /dev/null differ diff --git a/dev/mpl_examples/api/clippath_demo.png b/dev/mpl_examples/api/clippath_demo.png deleted file mode 100644 index c9e551fe3e3..00000000000 Binary files a/dev/mpl_examples/api/clippath_demo.png and /dev/null differ diff --git a/dev/mpl_examples/api/clippath_demo.py b/dev/mpl_examples/api/clippath_demo.py deleted file mode 100644 index 7a07467524b..00000000000 --- a/dev/mpl_examples/api/clippath_demo.py +++ /dev/null @@ -1,19 +0,0 @@ -""" -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() - - diff --git a/dev/mpl_examples/api/collections_demo.hires.png b/dev/mpl_examples/api/collections_demo.hires.png deleted file mode 100644 index b641f9a78d7..00000000000 Binary files a/dev/mpl_examples/api/collections_demo.hires.png and /dev/null differ diff --git a/dev/mpl_examples/api/collections_demo.pdf b/dev/mpl_examples/api/collections_demo.pdf deleted file mode 100644 index 9127a5eb8ca..00000000000 Binary files a/dev/mpl_examples/api/collections_demo.pdf and /dev/null differ diff --git a/dev/mpl_examples/api/collections_demo.png b/dev/mpl_examples/api/collections_demo.png deleted file mode 100644 index df8395ee38f..00000000000 Binary files a/dev/mpl_examples/api/collections_demo.png and /dev/null differ diff --git a/dev/mpl_examples/api/collections_demo.py b/dev/mpl_examples/api/collections_demo.py deleted file mode 100644 index c967be18ba2..00000000000 --- a/dev/mpl_examples/api/collections_demo.py +++ /dev/null @@ -1,133 +0,0 @@ -#!/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.array(range(nverts)) -theta = np.array(range(nverts)) * (2*np.pi)/(nverts-1) -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 = plt.figure() - -a = fig.add_subplot(2,2,1) -col = collections.LineCollection([spiral], offsets=xyo, - transOffset=a.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. -a.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 'a.autoscale_view()' call below. - -# Make a transform for the line segments such that their size is -# given in points: -col.set_color(colors) - -a.autoscale_view() # See comment above, after a.add_collection. -a.set_title('LineCollection using offsets') - - -# The same data as above, but fill the curves. - -a = fig.add_subplot(2,2,2) - -col = collections.PolyCollection([spiral], offsets=xyo, - transOffset=a.transData) -trans = transforms.Affine2D().scale(fig.dpi/72.0) -col.set_transform(trans) # the points to pixels transform -a.add_collection(col, autolim=True) -col.set_color(colors) - - -a.autoscale_view() -a.set_title('PolyCollection using offsets') - -# 7-sided regular polygons - -a = fig.add_subplot(2,2,3) - -col = collections.RegularPolyCollection(7, - sizes = np.fabs(xx)*10.0, offsets=xyo, - transOffset=a.transData) -trans = transforms.Affine2D().scale(fig.dpi/72.0) -col.set_transform(trans) # the points to pixels transform -a.add_collection(col, autolim=True) -col.set_color(colors) -a.autoscale_view() -a.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. - -a = fig.add_subplot(2,2,4) - -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) -a.add_collection(col, autolim=True) -col.set_color(colors) -a.autoscale_view() -a.set_title('Successive data offsets') -a.set_xlabel('Zonal velocity component (m/s)') -a.set_ylabel('Depth (m)') -# Reverse the y-axis so depth increases downward -a.set_ylim(a.get_ylim()[::-1]) - - -plt.show() - - diff --git a/dev/mpl_examples/api/color_cycle.hires.png b/dev/mpl_examples/api/color_cycle.hires.png deleted file mode 100644 index 45e64952b21..00000000000 Binary files a/dev/mpl_examples/api/color_cycle.hires.png and /dev/null differ diff --git a/dev/mpl_examples/api/color_cycle.pdf b/dev/mpl_examples/api/color_cycle.pdf deleted file mode 100644 index 20f4972bba9..00000000000 Binary files a/dev/mpl_examples/api/color_cycle.pdf and /dev/null differ diff --git a/dev/mpl_examples/api/color_cycle.png b/dev/mpl_examples/api/color_cycle.png deleted file mode 100644 index e85016978b3..00000000000 Binary files a/dev/mpl_examples/api/color_cycle.png and /dev/null differ diff --git a/dev/mpl_examples/api/color_cycle.py b/dev/mpl_examples/api/color_cycle.py deleted file mode 100644 index 6b2abe873cd..00000000000 --- a/dev/mpl_examples/api/color_cycle.py +++ /dev/null @@ -1,28 +0,0 @@ -""" -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() - - diff --git a/dev/mpl_examples/api/colorbar_only.hires.png b/dev/mpl_examples/api/colorbar_only.hires.png deleted file mode 100644 index a0ed290f7ec..00000000000 Binary files a/dev/mpl_examples/api/colorbar_only.hires.png and /dev/null differ diff --git a/dev/mpl_examples/api/colorbar_only.pdf b/dev/mpl_examples/api/colorbar_only.pdf deleted file mode 100644 index 6518634b15c..00000000000 Binary files a/dev/mpl_examples/api/colorbar_only.pdf and /dev/null differ diff --git a/dev/mpl_examples/api/colorbar_only.png b/dev/mpl_examples/api/colorbar_only.png deleted file mode 100644 index 673aa093e7f..00000000000 Binary files a/dev/mpl_examples/api/colorbar_only.png and /dev/null differ diff --git a/dev/mpl_examples/api/colorbar_only.py b/dev/mpl_examples/api/colorbar_only.py deleted file mode 100644 index d40ea2ed2dc..00000000000 --- a/dev/mpl_examples/api/colorbar_only.py +++ /dev/null @@ -1,73 +0,0 @@ -''' -Make a colorbar as a separate figure. -''' - -from matplotlib import pyplot - -# 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() diff --git a/dev/mpl_examples/api/compound_path.hires.png b/dev/mpl_examples/api/compound_path.hires.png deleted file mode 100644 index 12ce864de8f..00000000000 Binary files a/dev/mpl_examples/api/compound_path.hires.png and /dev/null differ diff --git a/dev/mpl_examples/api/compound_path.pdf b/dev/mpl_examples/api/compound_path.pdf deleted file mode 100644 index 988f8e0b446..00000000000 Binary files a/dev/mpl_examples/api/compound_path.pdf and /dev/null differ diff --git a/dev/mpl_examples/api/compound_path.png b/dev/mpl_examples/api/compound_path.png deleted file mode 100644 index fa971e0da7e..00000000000 Binary files a/dev/mpl_examples/api/compound_path.png and /dev/null differ diff --git a/dev/mpl_examples/api/compound_path.py b/dev/mpl_examples/api/compound_path.py deleted file mode 100644 index 3155010954b..00000000000 --- a/dev/mpl_examples/api/compound_path.py +++ /dev/null @@ -1,35 +0,0 @@ -""" -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 = plt.figure() -ax = fig.add_subplot(111) -ax.add_patch(pathpatch) -ax.set_title('A compound path') - -ax.dataLim.update_from_data_xy(vertices) -ax.autoscale_view() - - -plt.show() diff --git a/dev/mpl_examples/api/custom_projection_example.hires.png b/dev/mpl_examples/api/custom_projection_example.hires.png deleted file mode 100644 index c27d30a68cb..00000000000 Binary files a/dev/mpl_examples/api/custom_projection_example.hires.png and /dev/null differ diff --git a/dev/mpl_examples/api/custom_projection_example.pdf b/dev/mpl_examples/api/custom_projection_example.pdf deleted file mode 100644 index 24609a2f74d..00000000000 Binary files a/dev/mpl_examples/api/custom_projection_example.pdf and /dev/null differ diff --git a/dev/mpl_examples/api/custom_projection_example.png b/dev/mpl_examples/api/custom_projection_example.png deleted file mode 100644 index 8c2903d0d28..00000000000 Binary files a/dev/mpl_examples/api/custom_projection_example.png and /dev/null differ diff --git a/dev/mpl_examples/api/custom_projection_example.py b/dev/mpl_examples/api/custom_projection_example.py deleted file mode 100644 index 31f55f6b523..00000000000 --- a/dev/mpl_examples/api/custom_projection_example.py +++ /dev/null @@ -1,479 +0,0 @@ -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(np.pi * 2.0, 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 = 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' - # \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 = (x / np.pi) * 180.0 - degrees = round(degrees / 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 = degrees * (np.pi / 180.0) - # 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() - diff --git a/dev/mpl_examples/api/custom_scale_example.hires.png b/dev/mpl_examples/api/custom_scale_example.hires.png deleted file mode 100644 index aa24b96e3db..00000000000 Binary files a/dev/mpl_examples/api/custom_scale_example.hires.png and /dev/null differ diff --git a/dev/mpl_examples/api/custom_scale_example.pdf b/dev/mpl_examples/api/custom_scale_example.pdf deleted file mode 100644 index 726fac86633..00000000000 Binary files a/dev/mpl_examples/api/custom_scale_example.pdf and /dev/null differ diff --git a/dev/mpl_examples/api/custom_scale_example.png b/dev/mpl_examples/api/custom_scale_example.png deleted file mode 100644 index ce37637090f..00000000000 Binary files a/dev/mpl_examples/api/custom_scale_example.png and /dev/null differ diff --git a/dev/mpl_examples/api/custom_scale_example.py b/dev/mpl_examples/api/custom_scale_example.py deleted file mode 100644 index 6b3e3caba50..00000000000 --- a/dev/mpl_examples/api/custom_scale_example.py +++ /dev/null @@ -1,173 +0,0 @@ -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", (85 / 180.0) * np.pi) - 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" % ((x / np.pi) * 180.0) - - deg2rad = np.pi / 180.0 - axis.set_major_locator(FixedLocator( - np.arange(-90, 90, 10) * deg2rad)) - 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 = t / 360.0 * np.pi - - 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() - diff --git a/dev/mpl_examples/api/date_demo.hires.png b/dev/mpl_examples/api/date_demo.hires.png deleted file mode 100644 index 253a8207313..00000000000 Binary files a/dev/mpl_examples/api/date_demo.hires.png and /dev/null differ diff --git a/dev/mpl_examples/api/date_demo.pdf b/dev/mpl_examples/api/date_demo.pdf deleted file mode 100644 index b4b292f95bd..00000000000 Binary files a/dev/mpl_examples/api/date_demo.pdf and /dev/null differ diff --git a/dev/mpl_examples/api/date_demo.png b/dev/mpl_examples/api/date_demo.png deleted file mode 100644 index 43b58809714..00000000000 Binary files a/dev/mpl_examples/api/date_demo.png and /dev/null differ diff --git a/dev/mpl_examples/api/date_demo.py b/dev/mpl_examples/api/date_demo.py deleted file mode 100644 index 4348c210506..00000000000 --- a/dev/mpl_examples/api/date_demo.py +++ /dev/null @@ -1,55 +0,0 @@ -#!/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') -r = np.load(datafile).view(np.recarray) - -fig = plt.figure() -ax = fig.add_subplot(111) -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() diff --git a/dev/mpl_examples/api/date_index_formatter.py b/dev/mpl_examples/api/date_index_formatter.py deleted file mode 100644 index 7b4843aac9c..00000000000 --- a/dev/mpl_examples/api/date_index_formatter.py +++ /dev/null @@ -1,41 +0,0 @@ -""" -When plotting time series, eg 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 = plt.figure() -ax = fig.add_subplot(111) -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 = plt.figure() -ax = fig.add_subplot(111) -ax.plot(ind, r.adj_close, 'o-') -ax.xaxis.set_major_formatter(ticker.FuncFormatter(format_date)) -fig.autofmt_xdate() - -plt.show() diff --git a/dev/mpl_examples/api/date_index_formatter_00.hires.png b/dev/mpl_examples/api/date_index_formatter_00.hires.png deleted file mode 100644 index c17e50104aa..00000000000 Binary files a/dev/mpl_examples/api/date_index_formatter_00.hires.png and /dev/null differ diff --git a/dev/mpl_examples/api/date_index_formatter_00.pdf b/dev/mpl_examples/api/date_index_formatter_00.pdf deleted file mode 100644 index 1b540a50688..00000000000 Binary files a/dev/mpl_examples/api/date_index_formatter_00.pdf and /dev/null differ diff --git a/dev/mpl_examples/api/date_index_formatter_00.png b/dev/mpl_examples/api/date_index_formatter_00.png deleted file mode 100644 index 23385f8e87f..00000000000 Binary files a/dev/mpl_examples/api/date_index_formatter_00.png and /dev/null differ diff --git a/dev/mpl_examples/api/date_index_formatter_01.hires.png b/dev/mpl_examples/api/date_index_formatter_01.hires.png deleted file mode 100644 index 288fa30252e..00000000000 Binary files a/dev/mpl_examples/api/date_index_formatter_01.hires.png and /dev/null differ diff --git a/dev/mpl_examples/api/date_index_formatter_01.pdf b/dev/mpl_examples/api/date_index_formatter_01.pdf deleted file mode 100644 index 44988656d95..00000000000 Binary files a/dev/mpl_examples/api/date_index_formatter_01.pdf and /dev/null differ diff --git a/dev/mpl_examples/api/date_index_formatter_01.png b/dev/mpl_examples/api/date_index_formatter_01.png deleted file mode 100644 index 44ce7b9ec08..00000000000 Binary files a/dev/mpl_examples/api/date_index_formatter_01.png and /dev/null differ diff --git a/dev/mpl_examples/api/demo_affine_image.py b/dev/mpl_examples/api/demo_affine_image.py deleted file mode 100644 index 68e416fbfd2..00000000000 --- a/dev/mpl_examples/api/demo_affine_image.py +++ /dev/null @@ -1,66 +0,0 @@ -#!/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 - - ax1 = plt.subplot(121) - 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 - - ax2 = plt.subplot(122) - 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") diff --git a/dev/mpl_examples/api/demo_affine_image_00_00.hires.png b/dev/mpl_examples/api/demo_affine_image_00_00.hires.png deleted file mode 100644 index bca689406e4..00000000000 Binary files a/dev/mpl_examples/api/demo_affine_image_00_00.hires.png and /dev/null differ diff --git a/dev/mpl_examples/api/demo_affine_image_00_00.pdf b/dev/mpl_examples/api/demo_affine_image_00_00.pdf deleted file mode 100644 index f4ba25ba632..00000000000 Binary files a/dev/mpl_examples/api/demo_affine_image_00_00.pdf and /dev/null differ diff --git a/dev/mpl_examples/api/demo_affine_image_00_00.png b/dev/mpl_examples/api/demo_affine_image_00_00.png deleted file mode 100644 index ade67c73caa..00000000000 Binary files a/dev/mpl_examples/api/demo_affine_image_00_00.png and /dev/null differ diff --git a/dev/mpl_examples/api/donut_demo.hires.png b/dev/mpl_examples/api/donut_demo.hires.png deleted file mode 100644 index 03fc246d813..00000000000 Binary files a/dev/mpl_examples/api/donut_demo.hires.png and /dev/null differ diff --git a/dev/mpl_examples/api/donut_demo.pdf b/dev/mpl_examples/api/donut_demo.pdf deleted file mode 100644 index edb9414ffef..00000000000 Binary files a/dev/mpl_examples/api/donut_demo.pdf and /dev/null differ diff --git a/dev/mpl_examples/api/donut_demo.png b/dev/mpl_examples/api/donut_demo.png deleted file mode 100644 index 7fd5bb837ba..00000000000 Binary files a/dev/mpl_examples/api/donut_demo.png and /dev/null differ diff --git a/dev/mpl_examples/api/donut_demo.py b/dev/mpl_examples/api/donut_demo.py deleted file mode 100644 index 4bc56b1be88..00000000000 --- a/dev/mpl_examples/api/donut_demo.py +++ /dev/null @@ -1,54 +0,0 @@ -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 = plt.figure() -ax = fig.add_subplot(111) - -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() - - diff --git a/dev/mpl_examples/api/engineering_formatter.hires.png b/dev/mpl_examples/api/engineering_formatter.hires.png deleted file mode 100644 index 1e07065ae4c..00000000000 Binary files a/dev/mpl_examples/api/engineering_formatter.hires.png and /dev/null differ diff --git a/dev/mpl_examples/api/engineering_formatter.pdf b/dev/mpl_examples/api/engineering_formatter.pdf deleted file mode 100644 index 354d7e4b496..00000000000 Binary files a/dev/mpl_examples/api/engineering_formatter.pdf and /dev/null differ diff --git a/dev/mpl_examples/api/engineering_formatter.png b/dev/mpl_examples/api/engineering_formatter.png deleted file mode 100644 index b6b5e129ccf..00000000000 Binary files a/dev/mpl_examples/api/engineering_formatter.png and /dev/null differ diff --git a/dev/mpl_examples/api/engineering_formatter.py b/dev/mpl_examples/api/engineering_formatter.py deleted file mode 100644 index a71f5e23045..00000000000 --- a/dev/mpl_examples/api/engineering_formatter.py +++ /dev/null @@ -1,19 +0,0 @@ -''' -Demo to show use of the engineering Formatter. -''' - -import matplotlib.pyplot as plt -import numpy as np - -from matplotlib.ticker import EngFormatter - -ax = plt.subplot(111) -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() diff --git a/dev/mpl_examples/api/fahrenheit_celsius_scales.hires.png b/dev/mpl_examples/api/fahrenheit_celsius_scales.hires.png deleted file mode 100644 index e85daf53c57..00000000000 Binary files a/dev/mpl_examples/api/fahrenheit_celsius_scales.hires.png and /dev/null differ diff --git a/dev/mpl_examples/api/fahrenheit_celsius_scales.pdf b/dev/mpl_examples/api/fahrenheit_celsius_scales.pdf deleted file mode 100644 index e39d835d78e..00000000000 Binary files a/dev/mpl_examples/api/fahrenheit_celsius_scales.pdf and /dev/null differ diff --git a/dev/mpl_examples/api/fahrenheit_celsius_scales.png b/dev/mpl_examples/api/fahrenheit_celsius_scales.png deleted file mode 100644 index d683f989430..00000000000 Binary files a/dev/mpl_examples/api/fahrenheit_celsius_scales.png and /dev/null differ diff --git a/dev/mpl_examples/api/fahrenheit_celsius_scales.py b/dev/mpl_examples/api/fahrenheit_celsius_scales.py deleted file mode 100644 index 5250dfb34ae..00000000000 --- a/dev/mpl_examples/api/fahrenheit_celsius_scales.py +++ /dev/null @@ -1,28 +0,0 @@ -""" -Show how to display two scales on the left and right y axis -- Fahrenheit and Celsius -""" - -import matplotlib.pyplot as plt - -fig = plt.figure() -ax1 = fig.add_subplot(111) # the Fahrenheit scale -ax2 = ax1.twinx() # 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() diff --git a/dev/mpl_examples/api/hinton_demo.hires.png b/dev/mpl_examples/api/hinton_demo.hires.png deleted file mode 100644 index 81199bdf850..00000000000 Binary files a/dev/mpl_examples/api/hinton_demo.hires.png and /dev/null differ diff --git a/dev/mpl_examples/api/hinton_demo.pdf b/dev/mpl_examples/api/hinton_demo.pdf deleted file mode 100644 index 6e74bf5e9a1..00000000000 Binary files a/dev/mpl_examples/api/hinton_demo.pdf and /dev/null differ diff --git a/dev/mpl_examples/api/hinton_demo.png b/dev/mpl_examples/api/hinton_demo.png deleted file mode 100644 index d79ce52bbcf..00000000000 Binary files a/dev/mpl_examples/api/hinton_demo.png and /dev/null differ diff --git a/dev/mpl_examples/api/hinton_demo.py b/dev/mpl_examples/api/hinton_demo.py deleted file mode 100644 index 700e13c1bb6..00000000000 --- a/dev/mpl_examples/api/hinton_demo.py +++ /dev/null @@ -1,60 +0,0 @@ -#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() - diff --git a/dev/mpl_examples/api/histogram_demo.hires.png b/dev/mpl_examples/api/histogram_demo.hires.png deleted file mode 100644 index 349bd0c32de..00000000000 Binary files a/dev/mpl_examples/api/histogram_demo.hires.png and /dev/null differ diff --git a/dev/mpl_examples/api/histogram_demo.pdf b/dev/mpl_examples/api/histogram_demo.pdf deleted file mode 100644 index 9ee83e043cb..00000000000 Binary files a/dev/mpl_examples/api/histogram_demo.pdf and /dev/null differ diff --git a/dev/mpl_examples/api/histogram_demo.png b/dev/mpl_examples/api/histogram_demo.png deleted file mode 100644 index f8a1481e0e8..00000000000 Binary files a/dev/mpl_examples/api/histogram_demo.png and /dev/null differ diff --git a/dev/mpl_examples/api/histogram_demo.py b/dev/mpl_examples/api/histogram_demo.py deleted file mode 100644 index 11c4b0adaba..00000000000 --- a/dev/mpl_examples/api/histogram_demo.py +++ /dev/null @@ -1,34 +0,0 @@ -""" -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() diff --git a/dev/mpl_examples/api/histogram_path_demo.hires.png b/dev/mpl_examples/api/histogram_path_demo.hires.png deleted file mode 100644 index 7692256e349..00000000000 Binary files a/dev/mpl_examples/api/histogram_path_demo.hires.png and /dev/null differ diff --git a/dev/mpl_examples/api/histogram_path_demo.pdf b/dev/mpl_examples/api/histogram_path_demo.pdf deleted file mode 100644 index a3714a984f0..00000000000 Binary files a/dev/mpl_examples/api/histogram_path_demo.pdf and /dev/null differ diff --git a/dev/mpl_examples/api/histogram_path_demo.png b/dev/mpl_examples/api/histogram_path_demo.png deleted file mode 100644 index 7879fa6147a..00000000000 Binary files a/dev/mpl_examples/api/histogram_path_demo.png and /dev/null differ diff --git a/dev/mpl_examples/api/histogram_path_demo.py b/dev/mpl_examples/api/histogram_path_demo.py deleted file mode 100644 index 9b21b509d80..00000000000 --- a/dev/mpl_examples/api/histogram_path_demo.py +++ /dev/null @@ -1,47 +0,0 @@ -""" -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 = plt.figure() -ax = fig.add_subplot(111) - -# 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() diff --git a/dev/mpl_examples/api/image_zcoord.hires.png b/dev/mpl_examples/api/image_zcoord.hires.png deleted file mode 100644 index f93804abb1b..00000000000 Binary files a/dev/mpl_examples/api/image_zcoord.hires.png and /dev/null differ diff --git a/dev/mpl_examples/api/image_zcoord.pdf b/dev/mpl_examples/api/image_zcoord.pdf deleted file mode 100644 index 88b3351a5f3..00000000000 Binary files a/dev/mpl_examples/api/image_zcoord.pdf and /dev/null differ diff --git a/dev/mpl_examples/api/image_zcoord.png b/dev/mpl_examples/api/image_zcoord.png deleted file mode 100644 index a12fd38ff0c..00000000000 Binary files a/dev/mpl_examples/api/image_zcoord.png and /dev/null differ diff --git a/dev/mpl_examples/api/image_zcoord.py b/dev/mpl_examples/api/image_zcoord.py deleted file mode 100644 index 170f8df5e5b..00000000000 --- a/dev/mpl_examples/api/image_zcoord.py +++ /dev/null @@ -1,27 +0,0 @@ -""" -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 = plt.figure() -ax = fig.add_subplot(111) -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=0 and row 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} = U^{3\beta}_{\delta_1 \rho_1} + \frac{1}{8 \pi 2} \int^{\alpha_2}_{\alpha_2} d \alpha^\prime_2 \left[\frac{ U^{2\beta}_{\delta_1 \rho_1} - \alpha^\prime_2U^{1\beta}_{\rho_1 \sigma_2} }{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} = -\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], polar=True) - - - 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() diff --git a/dev/mpl_examples/api/mathtext_asarray.hires.png b/dev/mpl_examples/api/mathtext_asarray.hires.png deleted file mode 100644 index 40c8f68c2f2..00000000000 Binary files a/dev/mpl_examples/api/mathtext_asarray.hires.png and /dev/null differ diff --git a/dev/mpl_examples/api/mathtext_asarray.pdf b/dev/mpl_examples/api/mathtext_asarray.pdf deleted file mode 100644 index 613a9290cc8..00000000000 Binary files a/dev/mpl_examples/api/mathtext_asarray.pdf and /dev/null differ diff --git a/dev/mpl_examples/api/mathtext_asarray.png b/dev/mpl_examples/api/mathtext_asarray.png deleted file mode 100644 index f9e7bf06eb7..00000000000 Binary files a/dev/mpl_examples/api/mathtext_asarray.png and /dev/null differ diff --git a/dev/mpl_examples/api/mathtext_asarray.py b/dev/mpl_examples/api/mathtext_asarray.py deleted file mode 100644 index 049184ffa57..00000000000 --- a/dev/mpl_examples/api/mathtext_asarray.py +++ /dev/null @@ -1,24 +0,0 @@ -""" -Load a mathtext image as numpy array -""" - -import numpy as np -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}} 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() diff --git a/dev/mpl_examples/api/patch_collection.hires.png b/dev/mpl_examples/api/patch_collection.hires.png deleted file mode 100644 index b502b4cc995..00000000000 Binary files a/dev/mpl_examples/api/patch_collection.hires.png and /dev/null differ diff --git a/dev/mpl_examples/api/patch_collection.pdf b/dev/mpl_examples/api/patch_collection.pdf deleted file mode 100644 index 2e02d22bf55..00000000000 Binary files a/dev/mpl_examples/api/patch_collection.pdf and /dev/null differ diff --git a/dev/mpl_examples/api/patch_collection.png b/dev/mpl_examples/api/patch_collection.png deleted file mode 100644 index a49c121d4e5..00000000000 Binary files a/dev/mpl_examples/api/patch_collection.png and /dev/null differ diff --git a/dev/mpl_examples/api/patch_collection.py b/dev/mpl_examples/api/patch_collection.py deleted file mode 100644 index 44d3d403a19..00000000000 --- a/dev/mpl_examples/api/patch_collection.py +++ /dev/null @@ -1,48 +0,0 @@ -import numpy as np -import matplotlib -from matplotlib.patches import Circle, Wedge, Polygon -from matplotlib.collections import PatchCollection -import matplotlib.pyplot as plt - - -fig=plt.figure() -ax=fig.add_subplot(111) - -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() diff --git a/dev/mpl_examples/api/path_patch_demo.hires.png b/dev/mpl_examples/api/path_patch_demo.hires.png deleted file mode 100644 index 95e4dd539c9..00000000000 Binary files a/dev/mpl_examples/api/path_patch_demo.hires.png and /dev/null differ diff --git a/dev/mpl_examples/api/path_patch_demo.pdf b/dev/mpl_examples/api/path_patch_demo.pdf deleted file mode 100644 index 3c1d3208c01..00000000000 Binary files a/dev/mpl_examples/api/path_patch_demo.pdf and /dev/null differ diff --git a/dev/mpl_examples/api/path_patch_demo.png b/dev/mpl_examples/api/path_patch_demo.png deleted file mode 100644 index 9aaa1ae19fc..00000000000 Binary files a/dev/mpl_examples/api/path_patch_demo.png and /dev/null differ diff --git a/dev/mpl_examples/api/path_patch_demo.py b/dev/mpl_examples/api/path_patch_demo.py deleted file mode 100644 index d28fa2c3701..00000000000 --- a/dev/mpl_examples/api/path_patch_demo.py +++ /dev/null @@ -1,36 +0,0 @@ -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() - - diff --git a/dev/mpl_examples/api/quad_bezier.hires.png b/dev/mpl_examples/api/quad_bezier.hires.png deleted file mode 100644 index e94091ace67..00000000000 Binary files a/dev/mpl_examples/api/quad_bezier.hires.png and /dev/null differ diff --git a/dev/mpl_examples/api/quad_bezier.pdf b/dev/mpl_examples/api/quad_bezier.pdf deleted file mode 100644 index ff14ef23ad3..00000000000 Binary files a/dev/mpl_examples/api/quad_bezier.pdf and /dev/null differ diff --git a/dev/mpl_examples/api/quad_bezier.png b/dev/mpl_examples/api/quad_bezier.png deleted file mode 100644 index 53557c61fea..00000000000 Binary files a/dev/mpl_examples/api/quad_bezier.png and /dev/null differ diff --git a/dev/mpl_examples/api/quad_bezier.py b/dev/mpl_examples/api/quad_bezier.py deleted file mode 100644 index 5314dfb936b..00000000000 --- a/dev/mpl_examples/api/quad_bezier.py +++ /dev/null @@ -1,20 +0,0 @@ -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) -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() - diff --git a/dev/mpl_examples/api/radar_chart.hires.png b/dev/mpl_examples/api/radar_chart.hires.png deleted file mode 100644 index 6fcb13c82d2..00000000000 Binary files a/dev/mpl_examples/api/radar_chart.hires.png and /dev/null differ diff --git a/dev/mpl_examples/api/radar_chart.pdf b/dev/mpl_examples/api/radar_chart.pdf deleted file mode 100644 index d0930b8a9ef..00000000000 Binary files a/dev/mpl_examples/api/radar_chart.pdf and /dev/null differ diff --git a/dev/mpl_examples/api/radar_chart.png b/dev/mpl_examples/api/radar_chart.png deleted file mode 100644 index 58a5414a8ec..00000000000 Binary files a/dev/mpl_examples/api/radar_chart.png and /dev/null differ diff --git a/dev/mpl_examples/api/radar_chart.py b/dev/mpl_examples/api/radar_chart.py deleted file mode 100644 index 23df848b8a4..00000000000 --- a/dev/mpl_examples/api/radar_chart.py +++ /dev/null @@ -1,195 +0,0 @@ -""" -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 = 2*np.pi * np.linspace(0, 1-1./num_vars, num_vars) - # 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(theta * 180/np.pi, 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 = { - 'column names': - ['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('column names') - - 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 in enumerate(data.keys()): - 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(data[title], 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() diff --git a/dev/mpl_examples/api/sankey_demo_basics.py b/dev/mpl_examples/api/sankey_demo_basics.py deleted file mode 100644 index 2e84b51fee4..00000000000 --- a/dev/mpl_examples/api/sankey_demo_basics.py +++ /dev/null @@ -1,78 +0,0 @@ -"""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 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() diff --git a/dev/mpl_examples/api/sankey_demo_basics_00.hires.png b/dev/mpl_examples/api/sankey_demo_basics_00.hires.png deleted file mode 100644 index 5a83917b105..00000000000 Binary files a/dev/mpl_examples/api/sankey_demo_basics_00.hires.png and /dev/null differ diff --git a/dev/mpl_examples/api/sankey_demo_basics_00.pdf b/dev/mpl_examples/api/sankey_demo_basics_00.pdf deleted file mode 100644 index ead92e96ed6..00000000000 Binary files a/dev/mpl_examples/api/sankey_demo_basics_00.pdf and /dev/null differ diff --git a/dev/mpl_examples/api/sankey_demo_basics_00.png b/dev/mpl_examples/api/sankey_demo_basics_00.png deleted file mode 100644 index ab0d6570927..00000000000 Binary files a/dev/mpl_examples/api/sankey_demo_basics_00.png and /dev/null differ diff --git a/dev/mpl_examples/api/sankey_demo_basics_01.hires.png b/dev/mpl_examples/api/sankey_demo_basics_01.hires.png deleted file mode 100644 index ab2ee252a2b..00000000000 Binary files a/dev/mpl_examples/api/sankey_demo_basics_01.hires.png and /dev/null differ diff --git a/dev/mpl_examples/api/sankey_demo_basics_01.pdf b/dev/mpl_examples/api/sankey_demo_basics_01.pdf deleted file mode 100644 index 93265ed4228..00000000000 Binary files a/dev/mpl_examples/api/sankey_demo_basics_01.pdf and /dev/null differ diff --git a/dev/mpl_examples/api/sankey_demo_basics_01.png b/dev/mpl_examples/api/sankey_demo_basics_01.png deleted file mode 100644 index bb6466b2b38..00000000000 Binary files a/dev/mpl_examples/api/sankey_demo_basics_01.png and /dev/null differ diff --git a/dev/mpl_examples/api/sankey_demo_basics_02.hires.png b/dev/mpl_examples/api/sankey_demo_basics_02.hires.png deleted file mode 100644 index 5abb3103ff5..00000000000 Binary files a/dev/mpl_examples/api/sankey_demo_basics_02.hires.png and /dev/null differ diff --git a/dev/mpl_examples/api/sankey_demo_basics_02.pdf b/dev/mpl_examples/api/sankey_demo_basics_02.pdf deleted file mode 100644 index c4b0b14d28b..00000000000 Binary files a/dev/mpl_examples/api/sankey_demo_basics_02.pdf and /dev/null differ diff --git a/dev/mpl_examples/api/sankey_demo_basics_02.png b/dev/mpl_examples/api/sankey_demo_basics_02.png deleted file mode 100644 index 40426d76696..00000000000 Binary files a/dev/mpl_examples/api/sankey_demo_basics_02.png and /dev/null differ diff --git a/dev/mpl_examples/api/sankey_demo_links.hires.png b/dev/mpl_examples/api/sankey_demo_links.hires.png deleted file mode 100644 index 171bcf75f9d..00000000000 Binary files a/dev/mpl_examples/api/sankey_demo_links.hires.png and /dev/null differ diff --git a/dev/mpl_examples/api/sankey_demo_links.pdf b/dev/mpl_examples/api/sankey_demo_links.pdf deleted file mode 100644 index f0a7ac2f6b8..00000000000 Binary files a/dev/mpl_examples/api/sankey_demo_links.pdf and /dev/null differ diff --git a/dev/mpl_examples/api/sankey_demo_links.png b/dev/mpl_examples/api/sankey_demo_links.png deleted file mode 100644 index 48f6cd288d0..00000000000 Binary files a/dev/mpl_examples/api/sankey_demo_links.png and /dev/null differ diff --git a/dev/mpl_examples/api/sankey_demo_links.py b/dev/mpl_examples/api/sankey_demo_links.py deleted file mode 100644 index 064931c9dbe..00000000000 --- a/dev/mpl_examples/api/sankey_demo_links.py +++ /dev/null @@ -1,54 +0,0 @@ -"""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() diff --git a/dev/mpl_examples/api/sankey_demo_old.hires.png b/dev/mpl_examples/api/sankey_demo_old.hires.png deleted file mode 100644 index 2eb2e387909..00000000000 Binary files a/dev/mpl_examples/api/sankey_demo_old.hires.png and /dev/null differ diff --git a/dev/mpl_examples/api/sankey_demo_old.pdf b/dev/mpl_examples/api/sankey_demo_old.pdf deleted file mode 100644 index 1fab22b13fd..00000000000 Binary files a/dev/mpl_examples/api/sankey_demo_old.pdf and /dev/null differ diff --git a/dev/mpl_examples/api/sankey_demo_old.png b/dev/mpl_examples/api/sankey_demo_old.png deleted file mode 100644 index b4f2dc93b69..00000000000 Binary files a/dev/mpl_examples/api/sankey_demo_old.png and /dev/null differ diff --git a/dev/mpl_examples/api/sankey_demo_old.py b/dev/mpl_examples/api/sankey_demo_old.py deleted file mode 100644 index f8b73696bc7..00000000000 --- a/dev/mpl_examples/api/sankey_demo_old.py +++ /dev/null @@ -1,189 +0,0 @@ -#!/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): - h = (loss/2 + w)*np.tan(outangle/180. * np.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)*np.tan(inangle/180. * np.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 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() diff --git a/dev/mpl_examples/api/sankey_demo_rankine.hires.png b/dev/mpl_examples/api/sankey_demo_rankine.hires.png deleted file mode 100644 index 5b2dc922c9d..00000000000 Binary files a/dev/mpl_examples/api/sankey_demo_rankine.hires.png and /dev/null differ diff --git a/dev/mpl_examples/api/sankey_demo_rankine.pdf b/dev/mpl_examples/api/sankey_demo_rankine.pdf deleted file mode 100644 index e851383f88b..00000000000 Binary files a/dev/mpl_examples/api/sankey_demo_rankine.pdf and /dev/null differ diff --git a/dev/mpl_examples/api/sankey_demo_rankine.png b/dev/mpl_examples/api/sankey_demo_rankine.png deleted file mode 100644 index ebe66ceae6a..00000000000 Binary files a/dev/mpl_examples/api/sankey_demo_rankine.png and /dev/null differ diff --git a/dev/mpl_examples/api/sankey_demo_rankine.py b/dev/mpl_examples/api/sankey_demo_rankine.py deleted file mode 100644 index b334acf5175..00000000000 --- a/dev/mpl_examples/api/sankey_demo_rankine.py +++ /dev/null @@ -1,77 +0,0 @@ -"""Demonstrate the Sankey class with a practicle example of a Rankine power cycle. -""" -import numpy as np -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() diff --git a/dev/mpl_examples/api/scatter_piecharts.hires.png b/dev/mpl_examples/api/scatter_piecharts.hires.png deleted file mode 100644 index 0f7a8f9f8f7..00000000000 Binary files a/dev/mpl_examples/api/scatter_piecharts.hires.png and /dev/null differ diff --git a/dev/mpl_examples/api/scatter_piecharts.pdf b/dev/mpl_examples/api/scatter_piecharts.pdf deleted file mode 100644 index 5ec9f695454..00000000000 Binary files a/dev/mpl_examples/api/scatter_piecharts.pdf and /dev/null differ diff --git a/dev/mpl_examples/api/scatter_piecharts.png b/dev/mpl_examples/api/scatter_piecharts.png deleted file mode 100644 index 75657bae984..00000000000 Binary files a/dev/mpl_examples/api/scatter_piecharts.png and /dev/null differ diff --git a/dev/mpl_examples/api/scatter_piecharts.py b/dev/mpl_examples/api/scatter_piecharts.py deleted file mode 100644 index 48997fb11d5..00000000000 --- a/dev/mpl_examples/api/scatter_piecharts.py +++ /dev/null @@ -1,40 +0,0 @@ -""" -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)) - -# ... -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)) - -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)) - - -fig = plt.figure() -ax = fig.add_subplot(111) -ax.scatter( np.arange(3), np.arange(3), marker=(xy1,0), s=sizes, facecolor='blue' ) -ax.scatter( np.arange(3), np.arange(3), marker=(xy2,0), s=sizes, facecolor='green' ) -ax.scatter( np.arange(3), np.arange(3), marker=(xy3,0), s=sizes, facecolor='red' ) -plt.show() diff --git a/dev/mpl_examples/api/span_regions.hires.png b/dev/mpl_examples/api/span_regions.hires.png deleted file mode 100644 index 6fe65939b03..00000000000 Binary files a/dev/mpl_examples/api/span_regions.hires.png and /dev/null differ diff --git a/dev/mpl_examples/api/span_regions.pdf b/dev/mpl_examples/api/span_regions.pdf deleted file mode 100644 index 5e35e35bf19..00000000000 Binary files a/dev/mpl_examples/api/span_regions.pdf and /dev/null differ diff --git a/dev/mpl_examples/api/span_regions.png b/dev/mpl_examples/api/span_regions.png deleted file mode 100644 index 5507fc32e19..00000000000 Binary files a/dev/mpl_examples/api/span_regions.png and /dev/null differ diff --git a/dev/mpl_examples/api/span_regions.py b/dev/mpl_examples/api/span_regions.py deleted file mode 100644 index 7acc223e170..00000000000 --- a/dev/mpl_examples/api/span_regions.py +++ /dev/null @@ -1,38 +0,0 @@ -""" -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 = plt.figure() -ax = fig.add_subplot(111) -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() - - - - - diff --git a/dev/mpl_examples/api/two_scales.hires.png b/dev/mpl_examples/api/two_scales.hires.png deleted file mode 100644 index 5b67c3ac4cb..00000000000 Binary files a/dev/mpl_examples/api/two_scales.hires.png and /dev/null differ diff --git a/dev/mpl_examples/api/two_scales.pdf b/dev/mpl_examples/api/two_scales.pdf deleted file mode 100644 index 3c1c6f8cab2..00000000000 Binary files a/dev/mpl_examples/api/two_scales.pdf and /dev/null differ diff --git a/dev/mpl_examples/api/two_scales.png b/dev/mpl_examples/api/two_scales.png deleted file mode 100644 index bba36bd85ae..00000000000 Binary files a/dev/mpl_examples/api/two_scales.png and /dev/null differ diff --git a/dev/mpl_examples/api/two_scales.py b/dev/mpl_examples/api/two_scales.py deleted file mode 100644 index 475f3ac666f..00000000000 --- a/dev/mpl_examples/api/two_scales.py +++ /dev/null @@ -1,46 +0,0 @@ -#!/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 = plt.figure() -ax1 = fig.add_subplot(111) -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() - diff --git a/dev/mpl_examples/api/unicode_minus.hires.png b/dev/mpl_examples/api/unicode_minus.hires.png deleted file mode 100644 index 49dbc628d42..00000000000 Binary files a/dev/mpl_examples/api/unicode_minus.hires.png and /dev/null differ diff --git a/dev/mpl_examples/api/unicode_minus.pdf b/dev/mpl_examples/api/unicode_minus.pdf deleted file mode 100644 index 7d11879d6d8..00000000000 Binary files a/dev/mpl_examples/api/unicode_minus.pdf and /dev/null differ diff --git a/dev/mpl_examples/api/unicode_minus.png b/dev/mpl_examples/api/unicode_minus.png deleted file mode 100644 index 419897e9398..00000000000 Binary files a/dev/mpl_examples/api/unicode_minus.png and /dev/null differ diff --git a/dev/mpl_examples/api/unicode_minus.py b/dev/mpl_examples/api/unicode_minus.py deleted file mode 100644 index 5fc35266899..00000000000 --- a/dev/mpl_examples/api/unicode_minus.py +++ /dev/null @@ -1,18 +0,0 @@ -""" -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 = plt.figure() -ax = fig.add_subplot(111) -ax.plot(10*np.random.randn(100), 10*np.random.randn(100), 'o') -ax.set_title('Using hypen instead of unicode minus') -plt.show() diff --git a/dev/mpl_examples/api/watermark_image.hires.png b/dev/mpl_examples/api/watermark_image.hires.png deleted file mode 100644 index 9e48556ee40..00000000000 Binary files a/dev/mpl_examples/api/watermark_image.hires.png and /dev/null differ diff --git a/dev/mpl_examples/api/watermark_image.pdf b/dev/mpl_examples/api/watermark_image.pdf deleted file mode 100644 index 44be6c28d67..00000000000 Binary files a/dev/mpl_examples/api/watermark_image.pdf and /dev/null differ diff --git a/dev/mpl_examples/api/watermark_image.png b/dev/mpl_examples/api/watermark_image.png deleted file mode 100644 index c361f314e5f..00000000000 Binary files a/dev/mpl_examples/api/watermark_image.png and /dev/null differ diff --git a/dev/mpl_examples/api/watermark_image.py b/dev/mpl_examples/api/watermark_image.py deleted file mode 100644 index 3d437193a05..00000000000 --- a/dev/mpl_examples/api/watermark_image.py +++ /dev/null @@ -1,23 +0,0 @@ -""" -Use a PNG file as a watermark -""" -from __future__ import print_function -import numpy as np -import matplotlib -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 = plt.figure() -ax = fig.add_subplot(111) - -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() diff --git a/dev/mpl_examples/api/watermark_text.hires.png b/dev/mpl_examples/api/watermark_text.hires.png deleted file mode 100644 index 98e12594827..00000000000 Binary files a/dev/mpl_examples/api/watermark_text.hires.png and /dev/null differ diff --git a/dev/mpl_examples/api/watermark_text.pdf b/dev/mpl_examples/api/watermark_text.pdf deleted file mode 100644 index c82fdd9b2ce..00000000000 Binary files a/dev/mpl_examples/api/watermark_text.pdf and /dev/null differ diff --git a/dev/mpl_examples/api/watermark_text.png b/dev/mpl_examples/api/watermark_text.png deleted file mode 100644 index 0ddf21c6057..00000000000 Binary files a/dev/mpl_examples/api/watermark_text.png and /dev/null differ diff --git a/dev/mpl_examples/api/watermark_text.py b/dev/mpl_examples/api/watermark_text.py deleted file mode 100644 index 7d87de10003..00000000000 --- a/dev/mpl_examples/api/watermark_text.py +++ /dev/null @@ -1,21 +0,0 @@ -""" -Use a Text as a watermark -""" -import numpy as np -#import matplotlib -#matplotlib.use('Agg') - -import matplotlib.pyplot as plt - -fig = plt.figure() - -ax = fig.add_subplot(111) -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() diff --git a/dev/mpl_examples/axes_grid/demo_axes_divider.py b/dev/mpl_examples/axes_grid/demo_axes_divider.py deleted file mode 100644 index 5a0652cf105..00000000000 --- a/dev/mpl_examples/axes_grid/demo_axes_divider.py +++ /dev/null @@ -1,129 +0,0 @@ -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_sied(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_sied(ax) - - plt.draw() - plt.show() - - -demo() diff --git a/dev/mpl_examples/axes_grid/demo_axes_divider_01_00.hires.png b/dev/mpl_examples/axes_grid/demo_axes_divider_01_00.hires.png deleted file mode 100644 index 610d70e7729..00000000000 Binary files a/dev/mpl_examples/axes_grid/demo_axes_divider_01_00.hires.png and /dev/null differ diff --git a/dev/mpl_examples/axes_grid/demo_axes_divider_01_00.pdf b/dev/mpl_examples/axes_grid/demo_axes_divider_01_00.pdf deleted file mode 100644 index 3b542485c90..00000000000 Binary files a/dev/mpl_examples/axes_grid/demo_axes_divider_01_00.pdf and /dev/null differ diff --git a/dev/mpl_examples/axes_grid/demo_axes_divider_01_00.png b/dev/mpl_examples/axes_grid/demo_axes_divider_01_00.png deleted file mode 100644 index 02c2071e2a0..00000000000 Binary files a/dev/mpl_examples/axes_grid/demo_axes_divider_01_00.png and /dev/null differ diff --git a/dev/mpl_examples/axes_grid/demo_axes_grid.hires.png b/dev/mpl_examples/axes_grid/demo_axes_grid.hires.png deleted file mode 100644 index b6755c77ea9..00000000000 Binary files a/dev/mpl_examples/axes_grid/demo_axes_grid.hires.png and /dev/null differ diff --git a/dev/mpl_examples/axes_grid/demo_axes_grid.pdf b/dev/mpl_examples/axes_grid/demo_axes_grid.pdf deleted file mode 100644 index 7cfa5232b1d..00000000000 Binary files a/dev/mpl_examples/axes_grid/demo_axes_grid.pdf and /dev/null differ diff --git a/dev/mpl_examples/axes_grid/demo_axes_grid.png b/dev/mpl_examples/axes_grid/demo_axes_grid.png deleted file mode 100644 index 377fb1269ea..00000000000 Binary files a/dev/mpl_examples/axes_grid/demo_axes_grid.png and /dev/null differ diff --git a/dev/mpl_examples/axes_grid/demo_axes_grid.py b/dev/mpl_examples/axes_grid/demo_axes_grid.py deleted file mode 100644 index d28f50efbd4..00000000000 --- a/dev/mpl_examples/axes_grid/demo_axes_grid.py +++ /dev/null @@ -1,99 +0,0 @@ -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, 131, # similar to subplot(131) - 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, 132, # similar to subplot(132) - 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(F, 133, # similar to subplot(122) - 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]) - - - -if 1: - F = plt.figure(1, (5.5, 2.5)) - - F.subplots_adjust(left=0.05, right=0.98) - - demo_simple_grid(F) - demo_grid_with_single_cbar(F) - demo_grid_with_each_cbar(F) - - plt.draw() - plt.show() - diff --git a/dev/mpl_examples/axes_grid/demo_axes_grid2.hires.png b/dev/mpl_examples/axes_grid/demo_axes_grid2.hires.png deleted file mode 100644 index 4b6ad452bcf..00000000000 Binary files a/dev/mpl_examples/axes_grid/demo_axes_grid2.hires.png and /dev/null differ diff --git a/dev/mpl_examples/axes_grid/demo_axes_grid2.pdf b/dev/mpl_examples/axes_grid/demo_axes_grid2.pdf deleted file mode 100644 index d7d7f3a498b..00000000000 Binary files a/dev/mpl_examples/axes_grid/demo_axes_grid2.pdf and /dev/null differ diff --git a/dev/mpl_examples/axes_grid/demo_axes_grid2.png b/dev/mpl_examples/axes_grid/demo_axes_grid2.png deleted file mode 100644 index ae8f5711897..00000000000 Binary files a/dev/mpl_examples/axes_grid/demo_axes_grid2.png and /dev/null differ diff --git a/dev/mpl_examples/axes_grid/demo_axes_grid2.py b/dev/mpl_examples/axes_grid/demo_axes_grid2.py deleted file mode 100644 index 9fa682ab8e1..00000000000 --- a/dev/mpl_examples/axes_grid/demo_axes_grid2.py +++ /dev/null @@ -1,113 +0,0 @@ -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() diff --git a/dev/mpl_examples/axes_grid/demo_axes_hbox_divider.hires.png b/dev/mpl_examples/axes_grid/demo_axes_hbox_divider.hires.png deleted file mode 100644 index 09cd23f1007..00000000000 Binary files a/dev/mpl_examples/axes_grid/demo_axes_hbox_divider.hires.png and /dev/null differ diff --git a/dev/mpl_examples/axes_grid/demo_axes_hbox_divider.pdf b/dev/mpl_examples/axes_grid/demo_axes_hbox_divider.pdf deleted file mode 100644 index b8484146319..00000000000 Binary files a/dev/mpl_examples/axes_grid/demo_axes_hbox_divider.pdf and /dev/null differ diff --git a/dev/mpl_examples/axes_grid/demo_axes_hbox_divider.png b/dev/mpl_examples/axes_grid/demo_axes_hbox_divider.png deleted file mode 100644 index 0c697e6498a..00000000000 Binary files a/dev/mpl_examples/axes_grid/demo_axes_hbox_divider.png and /dev/null differ diff --git a/dev/mpl_examples/axes_grid/demo_axes_hbox_divider.py b/dev/mpl_examples/axes_grid/demo_axes_hbox_divider.py deleted file mode 100644 index fe72bdc1419..00000000000 --- a/dev/mpl_examples/axes_grid/demo_axes_hbox_divider.py +++ /dev/null @@ -1,52 +0,0 @@ -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__": - - fig1 = plt.figure() - - arr1 = np.arange(20).reshape((4,5)) - arr2 = np.arange(20).reshape((5,4)) - - ax1 = plt.subplot(121) - ax2 = plt.subplot(122) - - ax1.imshow(arr1, interpolation="nearest") - ax2.imshow(arr2, interpolation="nearest") - - rect = 111 # subplot param for combined axes - make_heights_equal(fig1, 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() - diff --git a/dev/mpl_examples/axes_grid/demo_axes_rgb.py b/dev/mpl_examples/axes_grid/demo_axes_rgb.py deleted file mode 100644 index 08c704c08ed..00000000000 --- a/dev/mpl_examples/axes_grid/demo_axes_rgb.py +++ /dev/null @@ -1,90 +0,0 @@ -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 = plt.figure(1) - fig.clf() - - ax = fig.add_subplot(111) - 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() diff --git a/dev/mpl_examples/axes_grid/demo_axes_rgb_00.hires.png b/dev/mpl_examples/axes_grid/demo_axes_rgb_00.hires.png deleted file mode 100644 index 21552773015..00000000000 Binary files a/dev/mpl_examples/axes_grid/demo_axes_rgb_00.hires.png and /dev/null differ diff --git a/dev/mpl_examples/axes_grid/demo_axes_rgb_00.pdf b/dev/mpl_examples/axes_grid/demo_axes_rgb_00.pdf deleted file mode 100644 index 14f5dc90c97..00000000000 Binary files a/dev/mpl_examples/axes_grid/demo_axes_rgb_00.pdf and /dev/null differ diff --git a/dev/mpl_examples/axes_grid/demo_axes_rgb_00.png b/dev/mpl_examples/axes_grid/demo_axes_rgb_00.png deleted file mode 100644 index 4b92809001c..00000000000 Binary files a/dev/mpl_examples/axes_grid/demo_axes_rgb_00.png and /dev/null differ diff --git a/dev/mpl_examples/axes_grid/demo_axes_rgb_01.hires.png b/dev/mpl_examples/axes_grid/demo_axes_rgb_01.hires.png deleted file mode 100644 index 7a1a25bf179..00000000000 Binary files a/dev/mpl_examples/axes_grid/demo_axes_rgb_01.hires.png and /dev/null differ diff --git a/dev/mpl_examples/axes_grid/demo_axes_rgb_01.pdf b/dev/mpl_examples/axes_grid/demo_axes_rgb_01.pdf deleted file mode 100644 index 9e858c5dc4e..00000000000 Binary files a/dev/mpl_examples/axes_grid/demo_axes_rgb_01.pdf and /dev/null differ diff --git a/dev/mpl_examples/axes_grid/demo_axes_rgb_01.png b/dev/mpl_examples/axes_grid/demo_axes_rgb_01.png deleted file mode 100644 index 5f33f38a236..00000000000 Binary files a/dev/mpl_examples/axes_grid/demo_axes_rgb_01.png and /dev/null differ diff --git a/dev/mpl_examples/axes_grid/demo_axisline_style.hires.png b/dev/mpl_examples/axes_grid/demo_axisline_style.hires.png deleted file mode 100644 index 71ee2200616..00000000000 Binary files a/dev/mpl_examples/axes_grid/demo_axisline_style.hires.png and /dev/null differ diff --git a/dev/mpl_examples/axes_grid/demo_axisline_style.pdf b/dev/mpl_examples/axes_grid/demo_axisline_style.pdf deleted file mode 100644 index 11a34ff55fc..00000000000 Binary files a/dev/mpl_examples/axes_grid/demo_axisline_style.pdf and /dev/null differ diff --git a/dev/mpl_examples/axes_grid/demo_axisline_style.png b/dev/mpl_examples/axes_grid/demo_axisline_style.png deleted file mode 100644 index 69343b482f0..00000000000 Binary files a/dev/mpl_examples/axes_grid/demo_axisline_style.png and /dev/null differ diff --git a/dev/mpl_examples/axes_grid/demo_axisline_style.py b/dev/mpl_examples/axes_grid/demo_axisline_style.py deleted file mode 100644 index 3d0b0d6f5da..00000000000 --- a/dev/mpl_examples/axes_grid/demo_axisline_style.py +++ /dev/null @@ -1,21 +0,0 @@ - -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() diff --git a/dev/mpl_examples/axes_grid/demo_colorbar_with_inset_locator.hires.png b/dev/mpl_examples/axes_grid/demo_colorbar_with_inset_locator.hires.png deleted file mode 100644 index fd09506f3f2..00000000000 Binary files a/dev/mpl_examples/axes_grid/demo_colorbar_with_inset_locator.hires.png and /dev/null differ diff --git a/dev/mpl_examples/axes_grid/demo_colorbar_with_inset_locator.pdf b/dev/mpl_examples/axes_grid/demo_colorbar_with_inset_locator.pdf deleted file mode 100644 index 01d357704c9..00000000000 Binary files a/dev/mpl_examples/axes_grid/demo_colorbar_with_inset_locator.pdf and /dev/null differ diff --git a/dev/mpl_examples/axes_grid/demo_colorbar_with_inset_locator.png b/dev/mpl_examples/axes_grid/demo_colorbar_with_inset_locator.png deleted file mode 100644 index f23dab10f69..00000000000 Binary files a/dev/mpl_examples/axes_grid/demo_colorbar_with_inset_locator.png and /dev/null differ diff --git a/dev/mpl_examples/axes_grid/demo_colorbar_with_inset_locator.py b/dev/mpl_examples/axes_grid/demo_colorbar_with_inset_locator.py deleted file mode 100644 index bc5cd79cfc6..00000000000 --- a/dev/mpl_examples/axes_grid/demo_colorbar_with_inset_locator.py +++ /dev/null @@ -1,39 +0,0 @@ -import matplotlib.pyplot as plt - -from mpl_toolkits.axes_grid1.inset_locator import inset_axes - -fig = plt.figure(1, [6, 3]) - -# first subplot -ax1 = fig.add_subplot(121) - -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") - -# first subplot -ax = fig.add_subplot(122) - -axins = inset_axes(ax, - width="5%", # width = 10% of parent_bbox width - height="50%", # height : 50% - loc=3, - bbox_to_anchor=(1.05, 0., 1, 1), - bbox_transform=ax.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=ax.imshow([[1,2],[2, 3]]) -plt.colorbar(im, cax=axins, ticks=[1,2,3]) - -plt.draw() -plt.show() diff --git a/dev/mpl_examples/axes_grid/demo_curvelinear_grid.hires.png b/dev/mpl_examples/axes_grid/demo_curvelinear_grid.hires.png deleted file mode 100644 index bd53f91490f..00000000000 Binary files a/dev/mpl_examples/axes_grid/demo_curvelinear_grid.hires.png and /dev/null differ diff --git a/dev/mpl_examples/axes_grid/demo_curvelinear_grid.pdf b/dev/mpl_examples/axes_grid/demo_curvelinear_grid.pdf deleted file mode 100644 index a53c50c5122..00000000000 Binary files a/dev/mpl_examples/axes_grid/demo_curvelinear_grid.pdf and /dev/null differ diff --git a/dev/mpl_examples/axes_grid/demo_curvelinear_grid.png b/dev/mpl_examples/axes_grid/demo_curvelinear_grid.png deleted file mode 100644 index 490d7849657..00000000000 Binary files a/dev/mpl_examples/axes_grid/demo_curvelinear_grid.png and /dev/null differ diff --git a/dev/mpl_examples/axes_grid/demo_curvelinear_grid.py b/dev/mpl_examples/axes_grid/demo_curvelinear_grid.py deleted file mode 100644 index 1a738b50d71..00000000000 --- a/dev/mpl_examples/axes_grid/demo_curvelinear_grid.py +++ /dev/null @@ -1,133 +0,0 @@ -import numpy as np -#from matplotlib.path import Path - -import matplotlib.pyplot as plt -import matplotlib.cbook as cbook - -from mpl_toolkits.axisartist.grid_helper_curvelinear import GridHelperCurveLinear -from mpl_toolkits.axisartist import Subplot - -from mpl_toolkits.axisartist import SubplotHost, \ - ParasiteAxesAuxTrans - - -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() - - - diff --git a/dev/mpl_examples/axes_grid/demo_curvelinear_grid2.hires.png b/dev/mpl_examples/axes_grid/demo_curvelinear_grid2.hires.png deleted file mode 100644 index 56f68dbd1b5..00000000000 Binary files a/dev/mpl_examples/axes_grid/demo_curvelinear_grid2.hires.png and /dev/null differ diff --git a/dev/mpl_examples/axes_grid/demo_curvelinear_grid2.pdf b/dev/mpl_examples/axes_grid/demo_curvelinear_grid2.pdf deleted file mode 100644 index 7e15724315f..00000000000 Binary files a/dev/mpl_examples/axes_grid/demo_curvelinear_grid2.pdf and /dev/null differ diff --git a/dev/mpl_examples/axes_grid/demo_curvelinear_grid2.png b/dev/mpl_examples/axes_grid/demo_curvelinear_grid2.png deleted file mode 100644 index 95fc60d6676..00000000000 Binary files a/dev/mpl_examples/axes_grid/demo_curvelinear_grid2.png and /dev/null differ diff --git a/dev/mpl_examples/axes_grid/demo_curvelinear_grid2.py b/dev/mpl_examples/axes_grid/demo_curvelinear_grid2.py deleted file mode 100644 index 2d96044a2a7..00000000000 --- a/dev/mpl_examples/axes_grid/demo_curvelinear_grid2.py +++ /dev/null @@ -1,63 +0,0 @@ -import numpy as np -#from matplotlib.path import Path - -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, - lon_minmax = None, #(0, np.inf), - 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() - - - diff --git a/dev/mpl_examples/axes_grid/demo_edge_colorbar.hires.png b/dev/mpl_examples/axes_grid/demo_edge_colorbar.hires.png deleted file mode 100644 index ab9557076c3..00000000000 Binary files a/dev/mpl_examples/axes_grid/demo_edge_colorbar.hires.png and /dev/null differ diff --git a/dev/mpl_examples/axes_grid/demo_edge_colorbar.pdf b/dev/mpl_examples/axes_grid/demo_edge_colorbar.pdf deleted file mode 100644 index 935cf17e579..00000000000 Binary files a/dev/mpl_examples/axes_grid/demo_edge_colorbar.pdf and /dev/null differ diff --git a/dev/mpl_examples/axes_grid/demo_edge_colorbar.png b/dev/mpl_examples/axes_grid/demo_edge_colorbar.png deleted file mode 100644 index 2b3c85ff219..00000000000 Binary files a/dev/mpl_examples/axes_grid/demo_edge_colorbar.png and /dev/null differ diff --git a/dev/mpl_examples/axes_grid/demo_edge_colorbar.py b/dev/mpl_examples/axes_grid/demo_edge_colorbar.py deleted file mode 100644 index 6e25d02a0d1..00000000000 --- a/dev/mpl_examples/axes_grid/demo_edge_colorbar.py +++ /dev/null @@ -1,89 +0,0 @@ -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() - diff --git a/dev/mpl_examples/axes_grid/demo_floating_axes.hires.png b/dev/mpl_examples/axes_grid/demo_floating_axes.hires.png deleted file mode 100644 index 552db487a1a..00000000000 Binary files a/dev/mpl_examples/axes_grid/demo_floating_axes.hires.png and /dev/null differ diff --git a/dev/mpl_examples/axes_grid/demo_floating_axes.pdf b/dev/mpl_examples/axes_grid/demo_floating_axes.pdf deleted file mode 100644 index 70ad0975b9d..00000000000 Binary files a/dev/mpl_examples/axes_grid/demo_floating_axes.pdf and /dev/null differ diff --git a/dev/mpl_examples/axes_grid/demo_floating_axes.png b/dev/mpl_examples/axes_grid/demo_floating_axes.png deleted file mode 100644 index 5ef60d9e119..00000000000 Binary files a/dev/mpl_examples/axes_grid/demo_floating_axes.png and /dev/null differ diff --git a/dev/mpl_examples/axes_grid/demo_floating_axes.py b/dev/mpl_examples/axes_grid/demo_floating_axes.py deleted file mode 100644 index 4ffb9ead058..00000000000 --- a/dev/mpl_examples/axes_grid/demo_floating_axes.py +++ /dev/null @@ -1,157 +0,0 @@ -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 - -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_scale = Affine2D().scale(np.pi/180., 1.) - - 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 - - - -if 1: - import matplotlib.pyplot as plt - fig = plt.figure(1, figsize=(8, 4)) - fig.subplots_adjust(wspace=0.3, left=0.05, right=0.95) - - ax1, aux_ax2 = setup_axes1(fig, 131) - aux_ax2.bar([0, 1, 2, 3], [3, 2, 1, 3]) - - #theta = np.random.rand(10) #*.5*np.pi - #radius = np.random.rand(10) #+1. - #aux_ax1.scatter(theta, radius) - - - 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() - diff --git a/dev/mpl_examples/axes_grid/demo_floating_axis.hires.png b/dev/mpl_examples/axes_grid/demo_floating_axis.hires.png deleted file mode 100644 index d8773051e17..00000000000 Binary files a/dev/mpl_examples/axes_grid/demo_floating_axis.hires.png and /dev/null differ diff --git a/dev/mpl_examples/axes_grid/demo_floating_axis.pdf b/dev/mpl_examples/axes_grid/demo_floating_axis.pdf deleted file mode 100644 index 34b530da468..00000000000 Binary files a/dev/mpl_examples/axes_grid/demo_floating_axis.pdf and /dev/null differ diff --git a/dev/mpl_examples/axes_grid/demo_floating_axis.png b/dev/mpl_examples/axes_grid/demo_floating_axis.png deleted file mode 100644 index a19c9599b92..00000000000 Binary files a/dev/mpl_examples/axes_grid/demo_floating_axis.png and /dev/null differ diff --git a/dev/mpl_examples/axes_grid/demo_floating_axis.py b/dev/mpl_examples/axes_grid/demo_floating_axis.py deleted file mode 100644 index bc8dea6b272..00000000000 --- a/dev/mpl_examples/axes_grid/demo_floating_axis.py +++ /dev/null @@ -1,71 +0,0 @@ -""" -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() - - diff --git a/dev/mpl_examples/axes_grid/demo_parasite_axes2.py b/dev/mpl_examples/axes_grid/demo_parasite_axes2.py deleted file mode 100644 index 2f73bb084cc..00000000000 --- a/dev/mpl_examples/axes_grid/demo_parasite_axes2.py +++ /dev/null @@ -1,47 +0,0 @@ -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") diff --git a/dev/mpl_examples/axes_grid/demo_parasite_axes2_00_00.hires.png b/dev/mpl_examples/axes_grid/demo_parasite_axes2_00_00.hires.png deleted file mode 100644 index 21c0dc073ef..00000000000 Binary files a/dev/mpl_examples/axes_grid/demo_parasite_axes2_00_00.hires.png and /dev/null differ diff --git a/dev/mpl_examples/axes_grid/demo_parasite_axes2_00_00.pdf b/dev/mpl_examples/axes_grid/demo_parasite_axes2_00_00.pdf deleted file mode 100644 index 8090929aa05..00000000000 Binary files a/dev/mpl_examples/axes_grid/demo_parasite_axes2_00_00.pdf and /dev/null differ diff --git a/dev/mpl_examples/axes_grid/demo_parasite_axes2_00_00.png b/dev/mpl_examples/axes_grid/demo_parasite_axes2_00_00.png deleted file mode 100644 index 1e2f2c2b4a2..00000000000 Binary files a/dev/mpl_examples/axes_grid/demo_parasite_axes2_00_00.png and /dev/null differ diff --git a/dev/mpl_examples/axes_grid/inset_locator_demo.hires.png b/dev/mpl_examples/axes_grid/inset_locator_demo.hires.png deleted file mode 100644 index 7452c005133..00000000000 Binary files a/dev/mpl_examples/axes_grid/inset_locator_demo.hires.png and /dev/null differ diff --git a/dev/mpl_examples/axes_grid/inset_locator_demo.pdf b/dev/mpl_examples/axes_grid/inset_locator_demo.pdf deleted file mode 100644 index 86c8025ea8e..00000000000 Binary files a/dev/mpl_examples/axes_grid/inset_locator_demo.pdf and /dev/null differ diff --git a/dev/mpl_examples/axes_grid/inset_locator_demo.png b/dev/mpl_examples/axes_grid/inset_locator_demo.png deleted file mode 100644 index 9f13f2e4a31..00000000000 Binary files a/dev/mpl_examples/axes_grid/inset_locator_demo.png and /dev/null differ diff --git a/dev/mpl_examples/axes_grid/inset_locator_demo.py b/dev/mpl_examples/axes_grid/inset_locator_demo.py deleted file mode 100644 index 9dfe0024feb..00000000000 --- a/dev/mpl_examples/axes_grid/inset_locator_demo.py +++ /dev/null @@ -1,45 +0,0 @@ -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 = plt.figure(1, [5.5, 3]) - -# first subplot -ax = fig.add_subplot(1,2,1) -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 -ax = fig.add_subplot(1,2,2) -ax.set_aspect(1.) - -axins = zoomed_inset_axes(ax, 0.5, loc=1) # zoom = 0.5 - -plt.xticks(visible=False) -plt.yticks(visible=False) - -add_sizebar(ax, 0.5) -add_sizebar(axins, 0.5) - -plt.draw() -plt.show() diff --git a/dev/mpl_examples/axes_grid/inset_locator_demo2.hires.png b/dev/mpl_examples/axes_grid/inset_locator_demo2.hires.png deleted file mode 100644 index ce10cc7e3a8..00000000000 Binary files a/dev/mpl_examples/axes_grid/inset_locator_demo2.hires.png and /dev/null differ diff --git a/dev/mpl_examples/axes_grid/inset_locator_demo2.pdf b/dev/mpl_examples/axes_grid/inset_locator_demo2.pdf deleted file mode 100644 index 2aafcddf2f8..00000000000 Binary files a/dev/mpl_examples/axes_grid/inset_locator_demo2.pdf and /dev/null differ diff --git a/dev/mpl_examples/axes_grid/inset_locator_demo2.png b/dev/mpl_examples/axes_grid/inset_locator_demo2.png deleted file mode 100644 index 53739e339bb..00000000000 Binary files a/dev/mpl_examples/axes_grid/inset_locator_demo2.png and /dev/null differ diff --git a/dev/mpl_examples/axes_grid/inset_locator_demo2.py b/dev/mpl_examples/axes_grid/inset_locator_demo2.py deleted file mode 100644 index a4e08be3493..00000000000 --- a/dev/mpl_examples/axes_grid/inset_locator_demo2.py +++ /dev/null @@ -1,48 +0,0 @@ -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 = plt.figure(1, [5,4]) -ax = fig.add_subplot(111) - -# 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() - diff --git a/dev/mpl_examples/axes_grid/make_room_for_ylabel_using_axesgrid.py b/dev/mpl_examples/axes_grid/make_room_for_ylabel_using_axesgrid.py deleted file mode 100644 index 6a269a5c8f3..00000000000 --- a/dev/mpl_examples/axes_grid/make_room_for_ylabel_using_axesgrid.py +++ /dev/null @@ -1,62 +0,0 @@ -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() diff --git a/dev/mpl_examples/axes_grid/make_room_for_ylabel_using_axesgrid_00.hires.png b/dev/mpl_examples/axes_grid/make_room_for_ylabel_using_axesgrid_00.hires.png deleted file mode 100644 index e0a1e3500ff..00000000000 Binary files a/dev/mpl_examples/axes_grid/make_room_for_ylabel_using_axesgrid_00.hires.png and /dev/null differ diff --git a/dev/mpl_examples/axes_grid/make_room_for_ylabel_using_axesgrid_00.pdf b/dev/mpl_examples/axes_grid/make_room_for_ylabel_using_axesgrid_00.pdf deleted file mode 100644 index 75fab540cdc..00000000000 Binary files a/dev/mpl_examples/axes_grid/make_room_for_ylabel_using_axesgrid_00.pdf and /dev/null differ diff --git a/dev/mpl_examples/axes_grid/make_room_for_ylabel_using_axesgrid_00.png b/dev/mpl_examples/axes_grid/make_room_for_ylabel_using_axesgrid_00.png deleted file mode 100644 index e88953c4bf0..00000000000 Binary files a/dev/mpl_examples/axes_grid/make_room_for_ylabel_using_axesgrid_00.png and /dev/null differ diff --git a/dev/mpl_examples/axes_grid/make_room_for_ylabel_using_axesgrid_01.hires.png b/dev/mpl_examples/axes_grid/make_room_for_ylabel_using_axesgrid_01.hires.png deleted file mode 100644 index 9e6c04c125b..00000000000 Binary files a/dev/mpl_examples/axes_grid/make_room_for_ylabel_using_axesgrid_01.hires.png and /dev/null differ diff --git a/dev/mpl_examples/axes_grid/make_room_for_ylabel_using_axesgrid_01.pdf b/dev/mpl_examples/axes_grid/make_room_for_ylabel_using_axesgrid_01.pdf deleted file mode 100644 index 4e52c79adc4..00000000000 Binary files a/dev/mpl_examples/axes_grid/make_room_for_ylabel_using_axesgrid_01.pdf and /dev/null differ diff --git a/dev/mpl_examples/axes_grid/make_room_for_ylabel_using_axesgrid_01.png b/dev/mpl_examples/axes_grid/make_room_for_ylabel_using_axesgrid_01.png deleted file mode 100644 index 7fe8b745212..00000000000 Binary files a/dev/mpl_examples/axes_grid/make_room_for_ylabel_using_axesgrid_01.png and /dev/null differ diff --git a/dev/mpl_examples/axes_grid/make_room_for_ylabel_using_axesgrid_02.hires.png b/dev/mpl_examples/axes_grid/make_room_for_ylabel_using_axesgrid_02.hires.png deleted file mode 100644 index 2e0fc5bc8a9..00000000000 Binary files a/dev/mpl_examples/axes_grid/make_room_for_ylabel_using_axesgrid_02.hires.png and /dev/null differ diff --git a/dev/mpl_examples/axes_grid/make_room_for_ylabel_using_axesgrid_02.pdf b/dev/mpl_examples/axes_grid/make_room_for_ylabel_using_axesgrid_02.pdf deleted file mode 100644 index 15656d0add3..00000000000 Binary files a/dev/mpl_examples/axes_grid/make_room_for_ylabel_using_axesgrid_02.pdf and /dev/null differ diff --git a/dev/mpl_examples/axes_grid/make_room_for_ylabel_using_axesgrid_02.png b/dev/mpl_examples/axes_grid/make_room_for_ylabel_using_axesgrid_02.png deleted file mode 100644 index b7566f883f4..00000000000 Binary files a/dev/mpl_examples/axes_grid/make_room_for_ylabel_using_axesgrid_02.png and /dev/null differ diff --git a/dev/mpl_examples/axes_grid/parasite_simple2.hires.png b/dev/mpl_examples/axes_grid/parasite_simple2.hires.png deleted file mode 100644 index 4c436683038..00000000000 Binary files a/dev/mpl_examples/axes_grid/parasite_simple2.hires.png and /dev/null differ diff --git a/dev/mpl_examples/axes_grid/parasite_simple2.pdf b/dev/mpl_examples/axes_grid/parasite_simple2.pdf deleted file mode 100644 index 2049039afc5..00000000000 Binary files a/dev/mpl_examples/axes_grid/parasite_simple2.pdf and /dev/null differ diff --git a/dev/mpl_examples/axes_grid/parasite_simple2.png b/dev/mpl_examples/axes_grid/parasite_simple2.png deleted file mode 100644 index 96a89ec7e3f..00000000000 Binary files a/dev/mpl_examples/axes_grid/parasite_simple2.png and /dev/null differ diff --git a/dev/mpl_examples/axes_grid/parasite_simple2.py b/dev/mpl_examples/axes_grid/parasite_simple2.py deleted file mode 100644 index 136ffd2912b..00000000000 --- a/dev/mpl_examples/axes_grid/parasite_simple2.py +++ /dev/null @@ -1,42 +0,0 @@ -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("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() diff --git a/dev/mpl_examples/axes_grid/scatter_hist.hires.png b/dev/mpl_examples/axes_grid/scatter_hist.hires.png deleted file mode 100644 index 25d463914cf..00000000000 Binary files a/dev/mpl_examples/axes_grid/scatter_hist.hires.png and /dev/null differ diff --git a/dev/mpl_examples/axes_grid/scatter_hist.pdf b/dev/mpl_examples/axes_grid/scatter_hist.pdf deleted file mode 100644 index 2b5dd415135..00000000000 Binary files a/dev/mpl_examples/axes_grid/scatter_hist.pdf and /dev/null differ diff --git a/dev/mpl_examples/axes_grid/scatter_hist.png b/dev/mpl_examples/axes_grid/scatter_hist.png deleted file mode 100644 index 5dd584aa089..00000000000 Binary files a/dev/mpl_examples/axes_grid/scatter_hist.png and /dev/null differ diff --git a/dev/mpl_examples/axes_grid/scatter_hist.py b/dev/mpl_examples/axes_grid/scatter_hist.py deleted file mode 100644 index b846704e0e7..00000000000 --- a/dev/mpl_examples/axes_grid/scatter_hist.py +++ /dev/null @@ -1,53 +0,0 @@ -import numpy as np -import matplotlib.pyplot as plt - -# the random data -x = np.random.randn(1000) -y = np.random.randn(1000) - - -fig = plt.figure(1, figsize=(5.5,5.5)) - -from mpl_toolkits.axes_grid1 import make_axes_locatable - -# the scatter plot: -axScatter = plt.subplot(111) -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() diff --git a/dev/mpl_examples/axes_grid/simple_anchored_artists.hires.png b/dev/mpl_examples/axes_grid/simple_anchored_artists.hires.png deleted file mode 100644 index a05178702fc..00000000000 Binary files a/dev/mpl_examples/axes_grid/simple_anchored_artists.hires.png and /dev/null differ diff --git a/dev/mpl_examples/axes_grid/simple_anchored_artists.pdf b/dev/mpl_examples/axes_grid/simple_anchored_artists.pdf deleted file mode 100644 index ff5a53b0e26..00000000000 Binary files a/dev/mpl_examples/axes_grid/simple_anchored_artists.pdf and /dev/null differ diff --git a/dev/mpl_examples/axes_grid/simple_anchored_artists.png b/dev/mpl_examples/axes_grid/simple_anchored_artists.png deleted file mode 100644 index 28e27973e35..00000000000 Binary files a/dev/mpl_examples/axes_grid/simple_anchored_artists.png and /dev/null differ diff --git a/dev/mpl_examples/axes_grid/simple_anchored_artists.py b/dev/mpl_examples/axes_grid/simple_anchored_artists.py deleted file mode 100644 index 8853534d23b..00000000000 --- a/dev/mpl_examples/axes_grid/simple_anchored_artists.py +++ /dev/null @@ -1,61 +0,0 @@ -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() - - diff --git a/dev/mpl_examples/axes_grid/simple_axesgrid.hires.png b/dev/mpl_examples/axes_grid/simple_axesgrid.hires.png deleted file mode 100644 index 82b12457aa4..00000000000 Binary files a/dev/mpl_examples/axes_grid/simple_axesgrid.hires.png and /dev/null differ diff --git a/dev/mpl_examples/axes_grid/simple_axesgrid.pdf b/dev/mpl_examples/axes_grid/simple_axesgrid.pdf deleted file mode 100644 index ceff04afdd1..00000000000 Binary files a/dev/mpl_examples/axes_grid/simple_axesgrid.pdf and /dev/null differ diff --git a/dev/mpl_examples/axes_grid/simple_axesgrid.png b/dev/mpl_examples/axes_grid/simple_axesgrid.png deleted file mode 100644 index 1beeaf6af9e..00000000000 Binary files a/dev/mpl_examples/axes_grid/simple_axesgrid.png and /dev/null differ diff --git a/dev/mpl_examples/axes_grid/simple_axesgrid.py b/dev/mpl_examples/axes_grid/simple_axesgrid.py deleted file mode 100644 index 5038b4eee0b..00000000000 --- a/dev/mpl_examples/axes_grid/simple_axesgrid.py +++ /dev/null @@ -1,17 +0,0 @@ -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() diff --git a/dev/mpl_examples/axes_grid/simple_axesgrid2.hires.png b/dev/mpl_examples/axes_grid/simple_axesgrid2.hires.png deleted file mode 100644 index c7f96647825..00000000000 Binary files a/dev/mpl_examples/axes_grid/simple_axesgrid2.hires.png and /dev/null differ diff --git a/dev/mpl_examples/axes_grid/simple_axesgrid2.pdf b/dev/mpl_examples/axes_grid/simple_axesgrid2.pdf deleted file mode 100644 index de17c9ee92e..00000000000 Binary files a/dev/mpl_examples/axes_grid/simple_axesgrid2.pdf and /dev/null differ diff --git a/dev/mpl_examples/axes_grid/simple_axesgrid2.png b/dev/mpl_examples/axes_grid/simple_axesgrid2.png deleted file mode 100644 index 3efc6a415a8..00000000000 Binary files a/dev/mpl_examples/axes_grid/simple_axesgrid2.png and /dev/null differ diff --git a/dev/mpl_examples/axes_grid/simple_axesgrid2.py b/dev/mpl_examples/axes_grid/simple_axesgrid2.py deleted file mode 100644 index efd7fb45a9b..00000000000 --- a/dev/mpl_examples/axes_grid/simple_axesgrid2.py +++ /dev/null @@ -1,31 +0,0 @@ -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() diff --git a/dev/mpl_examples/axes_grid/simple_axisline4.hires.png b/dev/mpl_examples/axes_grid/simple_axisline4.hires.png deleted file mode 100644 index 9f4fa6c0901..00000000000 Binary files a/dev/mpl_examples/axes_grid/simple_axisline4.hires.png and /dev/null differ diff --git a/dev/mpl_examples/axes_grid/simple_axisline4.pdf b/dev/mpl_examples/axes_grid/simple_axisline4.pdf deleted file mode 100644 index d16d49c5db8..00000000000 Binary files a/dev/mpl_examples/axes_grid/simple_axisline4.pdf and /dev/null differ diff --git a/dev/mpl_examples/axes_grid/simple_axisline4.png b/dev/mpl_examples/axes_grid/simple_axisline4.png deleted file mode 100644 index 693519f1c4b..00000000000 Binary files a/dev/mpl_examples/axes_grid/simple_axisline4.png and /dev/null differ diff --git a/dev/mpl_examples/axes_grid/simple_axisline4.py b/dev/mpl_examples/axes_grid/simple_axisline4.py deleted file mode 100644 index 3b2c675666b..00000000000 --- a/dev/mpl_examples/axes_grid/simple_axisline4.py +++ /dev/null @@ -1,19 +0,0 @@ -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() - diff --git a/dev/mpl_examples/color/color_cycle_demo.hires.png b/dev/mpl_examples/color/color_cycle_demo.hires.png deleted file mode 100644 index 8bdcc091a45..00000000000 Binary files a/dev/mpl_examples/color/color_cycle_demo.hires.png and /dev/null differ diff --git a/dev/mpl_examples/color/color_cycle_demo.pdf b/dev/mpl_examples/color/color_cycle_demo.pdf deleted file mode 100644 index 873258455e6..00000000000 Binary files a/dev/mpl_examples/color/color_cycle_demo.pdf and /dev/null differ diff --git a/dev/mpl_examples/color/color_cycle_demo.png b/dev/mpl_examples/color/color_cycle_demo.png deleted file mode 100644 index 3e87f9c9531..00000000000 Binary files a/dev/mpl_examples/color/color_cycle_demo.png and /dev/null differ diff --git a/dev/mpl_examples/color/color_cycle_demo.py b/dev/mpl_examples/color/color_cycle_demo.py deleted file mode 100644 index b453de4c1ae..00000000000 --- a/dev/mpl_examples/color/color_cycle_demo.py +++ /dev/null @@ -1,34 +0,0 @@ -""" -Demo of custom color-cycle settings to control colors for multi-line plots. - -This example demonstrates two different APIs: - - 1. Setting the default rc-parameter specifying the color cycle. - This affects all subsequent plots. - 2. Setting the color cycle for a specific axes. This only affects a single - axes. -""" -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) -fig, (ax0, ax1) = plt.subplots(nrows=2) - -plt.rc('axes', color_cycle=['r', 'g', 'b', 'y']) -ax0.plot(yy) -ax0.set_title('Set default color cycle to rgby') - -ax1.set_color_cycle(['c', 'm', 'y', 'k']) -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() - - diff --git a/dev/mpl_examples/color/colormaps_reference.py b/dev/mpl_examples/color/colormaps_reference.py deleted file mode 100644 index 1c433794e4e..00000000000 --- a/dev/mpl_examples/color/colormaps_reference.py +++ /dev/null @@ -1,79 +0,0 @@ -""" -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 - - -cmaps = [('Sequential', ['binary', 'Blues', 'BuGn', 'BuPu', 'gist_yarg', - 'GnBu', 'Greens', 'Greys', 'Oranges', 'OrRd', - 'PuBu', 'PuBuGn', 'PuRd', 'Purples', 'RdPu', - 'Reds', 'YlGn', 'YlGnBu', 'YlOrBr', 'YlOrRd']), - ('Sequential (2)', ['afmhot', 'autumn', 'bone', 'cool', 'copper', - 'gist_gray', 'gist_heat', 'gray', 'hot', 'pink', - 'spring', 'summer', 'winter']), - ('Diverging', ['BrBG', 'bwr', 'coolwarm', 'PiYG', 'PRGn', 'PuOr', - 'RdBu', 'RdGy', 'RdYlBu', 'RdYlGn', 'seismic']), - ('Qualitative', ['Accent', 'Dark2', 'hsv', 'Paired', 'Pastel1', - 'Pastel2', 'Set1', 'Set2', 'Set3', 'spectral']), - ('Miscellaneous', ['gist_earth', 'gist_ncar', 'gist_rainbow', - 'gist_stern', 'jet', 'brg', 'CMRmap', 'cubehelix', - 'gnuplot', 'gnuplot2', 'ocean', 'rainbow', - 'terrain', '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() diff --git a/dev/mpl_examples/color/colormaps_reference_00.hires.png b/dev/mpl_examples/color/colormaps_reference_00.hires.png deleted file mode 100644 index a55e8e2589b..00000000000 Binary files a/dev/mpl_examples/color/colormaps_reference_00.hires.png and /dev/null differ diff --git a/dev/mpl_examples/color/colormaps_reference_00.pdf b/dev/mpl_examples/color/colormaps_reference_00.pdf deleted file mode 100644 index a4404f99c3b..00000000000 Binary files a/dev/mpl_examples/color/colormaps_reference_00.pdf and /dev/null differ diff --git a/dev/mpl_examples/color/colormaps_reference_00.png b/dev/mpl_examples/color/colormaps_reference_00.png deleted file mode 100644 index 0b6464522ee..00000000000 Binary files a/dev/mpl_examples/color/colormaps_reference_00.png and /dev/null differ diff --git a/dev/mpl_examples/color/colormaps_reference_01.hires.png b/dev/mpl_examples/color/colormaps_reference_01.hires.png deleted file mode 100644 index f5054dfa338..00000000000 Binary files a/dev/mpl_examples/color/colormaps_reference_01.hires.png and /dev/null differ diff --git a/dev/mpl_examples/color/colormaps_reference_01.pdf b/dev/mpl_examples/color/colormaps_reference_01.pdf deleted file mode 100644 index be91b077009..00000000000 Binary files a/dev/mpl_examples/color/colormaps_reference_01.pdf and /dev/null differ diff --git a/dev/mpl_examples/color/colormaps_reference_01.png b/dev/mpl_examples/color/colormaps_reference_01.png deleted file mode 100644 index 22a8e726599..00000000000 Binary files a/dev/mpl_examples/color/colormaps_reference_01.png and /dev/null differ diff --git a/dev/mpl_examples/color/colormaps_reference_02.hires.png b/dev/mpl_examples/color/colormaps_reference_02.hires.png deleted file mode 100644 index aeb0922cf37..00000000000 Binary files a/dev/mpl_examples/color/colormaps_reference_02.hires.png and /dev/null differ diff --git a/dev/mpl_examples/color/colormaps_reference_02.pdf b/dev/mpl_examples/color/colormaps_reference_02.pdf deleted file mode 100644 index d0af21cb70b..00000000000 Binary files a/dev/mpl_examples/color/colormaps_reference_02.pdf and /dev/null differ diff --git a/dev/mpl_examples/color/colormaps_reference_02.png b/dev/mpl_examples/color/colormaps_reference_02.png deleted file mode 100644 index 744549fcc6f..00000000000 Binary files a/dev/mpl_examples/color/colormaps_reference_02.png and /dev/null differ diff --git a/dev/mpl_examples/color/colormaps_reference_03.hires.png b/dev/mpl_examples/color/colormaps_reference_03.hires.png deleted file mode 100644 index bbbbc2b23c4..00000000000 Binary files a/dev/mpl_examples/color/colormaps_reference_03.hires.png and /dev/null differ diff --git a/dev/mpl_examples/color/colormaps_reference_03.pdf b/dev/mpl_examples/color/colormaps_reference_03.pdf deleted file mode 100644 index fb14d347273..00000000000 Binary files a/dev/mpl_examples/color/colormaps_reference_03.pdf and /dev/null differ diff --git a/dev/mpl_examples/color/colormaps_reference_03.png b/dev/mpl_examples/color/colormaps_reference_03.png deleted file mode 100644 index 290af2cc738..00000000000 Binary files a/dev/mpl_examples/color/colormaps_reference_03.png and /dev/null differ diff --git a/dev/mpl_examples/color/colormaps_reference_04.hires.png b/dev/mpl_examples/color/colormaps_reference_04.hires.png deleted file mode 100644 index 55139477207..00000000000 Binary files a/dev/mpl_examples/color/colormaps_reference_04.hires.png and /dev/null differ diff --git a/dev/mpl_examples/color/colormaps_reference_04.pdf b/dev/mpl_examples/color/colormaps_reference_04.pdf deleted file mode 100644 index c2ff069ecdc..00000000000 Binary files a/dev/mpl_examples/color/colormaps_reference_04.pdf and /dev/null differ diff --git a/dev/mpl_examples/color/colormaps_reference_04.png b/dev/mpl_examples/color/colormaps_reference_04.png deleted file mode 100644 index 40168bdc64f..00000000000 Binary files a/dev/mpl_examples/color/colormaps_reference_04.png and /dev/null differ diff --git a/dev/mpl_examples/images_contours_and_fields/image_demo.hires.png b/dev/mpl_examples/images_contours_and_fields/image_demo.hires.png deleted file mode 100644 index 94d2c9bf79a..00000000000 Binary files a/dev/mpl_examples/images_contours_and_fields/image_demo.hires.png and /dev/null differ diff --git a/dev/mpl_examples/images_contours_and_fields/image_demo.pdf b/dev/mpl_examples/images_contours_and_fields/image_demo.pdf deleted file mode 100644 index a287087848a..00000000000 Binary files a/dev/mpl_examples/images_contours_and_fields/image_demo.pdf and /dev/null differ diff --git a/dev/mpl_examples/images_contours_and_fields/image_demo.png b/dev/mpl_examples/images_contours_and_fields/image_demo.png deleted file mode 100644 index 39b56edf5de..00000000000 Binary files a/dev/mpl_examples/images_contours_and_fields/image_demo.png and /dev/null differ diff --git a/dev/mpl_examples/images_contours_and_fields/image_demo.py b/dev/mpl_examples/images_contours_and_fields/image_demo.py deleted file mode 100644 index 83e49217816..00000000000 --- a/dev/mpl_examples/images_contours_and_fields/image_demo.py +++ /dev/null @@ -1,13 +0,0 @@ -""" -Simple demo of the imshow function. -""" -import matplotlib.pyplot as plt -import matplotlib.cbook as cbook - -image_file = cbook.get_sample_data('ada.png') -image = plt.imread(image_file) - -plt.imshow(image) -plt.axis('off') # clear x- and y-axes -plt.show() - diff --git a/dev/mpl_examples/images_contours_and_fields/image_demo_clip_path.hires.png b/dev/mpl_examples/images_contours_and_fields/image_demo_clip_path.hires.png deleted file mode 100644 index 36a082901ed..00000000000 Binary files a/dev/mpl_examples/images_contours_and_fields/image_demo_clip_path.hires.png and /dev/null differ diff --git a/dev/mpl_examples/images_contours_and_fields/image_demo_clip_path.pdf b/dev/mpl_examples/images_contours_and_fields/image_demo_clip_path.pdf deleted file mode 100644 index 8237d66c51a..00000000000 Binary files a/dev/mpl_examples/images_contours_and_fields/image_demo_clip_path.pdf and /dev/null differ diff --git a/dev/mpl_examples/images_contours_and_fields/image_demo_clip_path.png b/dev/mpl_examples/images_contours_and_fields/image_demo_clip_path.png deleted file mode 100644 index 8af5f87ad91..00000000000 Binary files a/dev/mpl_examples/images_contours_and_fields/image_demo_clip_path.png and /dev/null differ diff --git a/dev/mpl_examples/images_contours_and_fields/image_demo_clip_path.py b/dev/mpl_examples/images_contours_and_fields/image_demo_clip_path.py deleted file mode 100644 index 77a7f7718b7..00000000000 --- a/dev/mpl_examples/images_contours_and_fields/image_demo_clip_path.py +++ /dev/null @@ -1,18 +0,0 @@ -""" -Demo of image that's been clipped by a circular patch. -""" -import matplotlib.pyplot as plt -import matplotlib.patches as patches -import matplotlib.cbook as cbook - - -image_file = cbook.get_sample_data('grace_hopper.png') -image = plt.imread(image_file) - -fig, ax = plt.subplots() -im = ax.imshow(image) -patch = patches.Circle((260, 200), radius=200, transform=ax.transData) -im.set_clip_path(patch) - -plt.axis('off') -plt.show() diff --git a/dev/mpl_examples/images_contours_and_fields/pcolormesh_levels.hires.png b/dev/mpl_examples/images_contours_and_fields/pcolormesh_levels.hires.png deleted file mode 100644 index ecacbec1513..00000000000 Binary files a/dev/mpl_examples/images_contours_and_fields/pcolormesh_levels.hires.png and /dev/null differ diff --git a/dev/mpl_examples/images_contours_and_fields/pcolormesh_levels.pdf b/dev/mpl_examples/images_contours_and_fields/pcolormesh_levels.pdf deleted file mode 100644 index c83258dbb2b..00000000000 Binary files a/dev/mpl_examples/images_contours_and_fields/pcolormesh_levels.pdf and /dev/null differ diff --git a/dev/mpl_examples/images_contours_and_fields/pcolormesh_levels.png b/dev/mpl_examples/images_contours_and_fields/pcolormesh_levels.png deleted file mode 100644 index 1a93c9261c7..00000000000 Binary files a/dev/mpl_examples/images_contours_and_fields/pcolormesh_levels.png and /dev/null differ diff --git a/dev/mpl_examples/images_contours_and_fields/pcolormesh_levels.py b/dev/mpl_examples/images_contours_and_fields/pcolormesh_levels.py deleted file mode 100644 index a042e9236d3..00000000000 --- a/dev/mpl_examples/images_contours_and_fields/pcolormesh_levels.py +++ /dev/null @@ -1,53 +0,0 @@ -""" -Shows how to combine Normalization and Colormap instances to draw -"levels" in pcolor, pcolormesh and imshow type plots in a similar -way to the levels keyword argument to contour/contourf. - -""" - -import matplotlib.pyplot as plt -from matplotlib.colors import BoundaryNorm -from matplotlib.ticker import MaxNLocator -import numpy as np - - -# make these smaller to increase the resolution -dx, dy = 0.05, 0.05 - -# generate 2 2d grids for the x & y bounds -y, x = np.mgrid[slice(1, 5 + dy, dy), - slice(1, 5 + dx, dx)] - -z = np.sin(x) ** 10 + np.cos(10 + y * x) * np.cos(x) - -# x and y are bounds, so z should be the value *inside* those bounds. -# Therefore, remove the last value from the z array. -z = z[:-1, :-1] -levels = MaxNLocator(nbins=15).tick_values(z.min(), z.max()) - - -# pick the desired colormap, sensible levels, and define a normalization -# instance which takes data values and translates those into levels. -cmap = plt.get_cmap('PiYG') -norm = BoundaryNorm(levels, ncolors=cmap.N, clip=True) - -plt.subplot(2, 1, 1) -im = plt.pcolormesh(x, y, z, cmap=cmap, norm=norm) -plt.colorbar() -# set the limits of the plot to the limits of the data -plt.axis([x.min(), x.max(), y.min(), y.max()]) -plt.title('pcolormesh with levels') - - - -plt.subplot(2, 1, 2) -# contours are *point* based plots, so convert our bound into point -# centers -plt.contourf(x[:-1, :-1] + dx / 2., - y[:-1, :-1] + dy / 2., z, levels=levels, - cmap=cmap) -plt.colorbar() -plt.title('contourf with levels') - - -plt.show() \ No newline at end of file diff --git a/dev/mpl_examples/images_contours_and_fields/streamplot_demo_features.py b/dev/mpl_examples/images_contours_and_fields/streamplot_demo_features.py deleted file mode 100644 index 2cc10bf877e..00000000000 --- a/dev/mpl_examples/images_contours_and_fields/streamplot_demo_features.py +++ /dev/null @@ -1,29 +0,0 @@ -""" -Demo of the `streamplot` function. - -A streamplot, or streamline plot, is used to display 2D vector fields. This -example shows a few features of the stream plot function: - - * Varying the color along a streamline. - * Varying the density of streamlines. - * Varying the line width along a stream line. -""" -import numpy as np -import matplotlib.pyplot as plt - -Y, X = np.mgrid[-3:3:100j, -3:3:100j] -U = -1 - X**2 + Y -V = 1 + X - Y**2 -speed = np.sqrt(U*U + V*V) - -plt.streamplot(X, Y, U, V, color=U, linewidth=2, cmap=plt.cm.autumn) -plt.colorbar() - -f, (ax1, ax2) = plt.subplots(ncols=2) -ax1.streamplot(X, Y, U, V, density=[0.5, 1]) - -lw = 5*speed/speed.max() -ax2.streamplot(X, Y, U, V, density=0.6, color='k', linewidth=lw) - -plt.show() - diff --git a/dev/mpl_examples/images_contours_and_fields/streamplot_demo_features_00.hires.png b/dev/mpl_examples/images_contours_and_fields/streamplot_demo_features_00.hires.png deleted file mode 100644 index 8e73071b9d9..00000000000 Binary files a/dev/mpl_examples/images_contours_and_fields/streamplot_demo_features_00.hires.png and /dev/null differ diff --git a/dev/mpl_examples/images_contours_and_fields/streamplot_demo_features_00.pdf b/dev/mpl_examples/images_contours_and_fields/streamplot_demo_features_00.pdf deleted file mode 100644 index 54d88c9bd14..00000000000 Binary files a/dev/mpl_examples/images_contours_and_fields/streamplot_demo_features_00.pdf and /dev/null differ diff --git a/dev/mpl_examples/images_contours_and_fields/streamplot_demo_features_00.png b/dev/mpl_examples/images_contours_and_fields/streamplot_demo_features_00.png deleted file mode 100644 index 37e26bf5864..00000000000 Binary files a/dev/mpl_examples/images_contours_and_fields/streamplot_demo_features_00.png and /dev/null differ diff --git a/dev/mpl_examples/images_contours_and_fields/streamplot_demo_features_01.hires.png b/dev/mpl_examples/images_contours_and_fields/streamplot_demo_features_01.hires.png deleted file mode 100644 index 4146d0e5994..00000000000 Binary files a/dev/mpl_examples/images_contours_and_fields/streamplot_demo_features_01.hires.png and /dev/null differ diff --git a/dev/mpl_examples/images_contours_and_fields/streamplot_demo_features_01.pdf b/dev/mpl_examples/images_contours_and_fields/streamplot_demo_features_01.pdf deleted file mode 100644 index 43ccd30c1d0..00000000000 Binary files a/dev/mpl_examples/images_contours_and_fields/streamplot_demo_features_01.pdf and /dev/null differ diff --git a/dev/mpl_examples/images_contours_and_fields/streamplot_demo_features_01.png b/dev/mpl_examples/images_contours_and_fields/streamplot_demo_features_01.png deleted file mode 100644 index fde42ff773c..00000000000 Binary files a/dev/mpl_examples/images_contours_and_fields/streamplot_demo_features_01.png and /dev/null differ diff --git a/dev/mpl_examples/images_contours_and_fields/streamplot_demo_masking.hires.png b/dev/mpl_examples/images_contours_and_fields/streamplot_demo_masking.hires.png deleted file mode 100644 index 785510891ad..00000000000 Binary files a/dev/mpl_examples/images_contours_and_fields/streamplot_demo_masking.hires.png and /dev/null differ diff --git a/dev/mpl_examples/images_contours_and_fields/streamplot_demo_masking.pdf b/dev/mpl_examples/images_contours_and_fields/streamplot_demo_masking.pdf deleted file mode 100644 index e31c510b0d1..00000000000 Binary files a/dev/mpl_examples/images_contours_and_fields/streamplot_demo_masking.pdf and /dev/null differ diff --git a/dev/mpl_examples/images_contours_and_fields/streamplot_demo_masking.png b/dev/mpl_examples/images_contours_and_fields/streamplot_demo_masking.png deleted file mode 100644 index 6b9b196870d..00000000000 Binary files a/dev/mpl_examples/images_contours_and_fields/streamplot_demo_masking.png and /dev/null differ diff --git a/dev/mpl_examples/images_contours_and_fields/streamplot_demo_masking.py b/dev/mpl_examples/images_contours_and_fields/streamplot_demo_masking.py deleted file mode 100644 index ce0ac99b941..00000000000 --- a/dev/mpl_examples/images_contours_and_fields/streamplot_demo_masking.py +++ /dev/null @@ -1,27 +0,0 @@ -""" -Demo of the streamplot function with masking. - -This example shows how streamlines created by the streamplot function skips -masked regions and NaN values. -""" -import numpy as np -import matplotlib.pyplot as plt - -w = 3 -Y, X = np.mgrid[-w:w:100j, -w:w:100j] -U = -1 - X**2 + Y -V = 1 + X - Y**2 -speed = np.sqrt(U*U + V*V) - -mask = np.zeros(U.shape, dtype=bool) -mask[40:60, 40:60] = 1 -U = np.ma.array(U, mask=mask) -U[:20, :20] = np.nan - -plt.streamplot(X, Y, U, V, color='r') - -plt.imshow(~mask, extent=(-w, w, -w, w), alpha=0.5, - interpolation='nearest', cmap=plt.cm.gray) - -plt.show() - diff --git a/dev/mpl_examples/lines_bars_and_markers/barh_demo.py b/dev/mpl_examples/lines_bars_and_markers/barh_demo.py deleted file mode 100644 index b0087acb1eb..00000000000 --- a/dev/mpl_examples/lines_bars_and_markers/barh_demo.py +++ /dev/null @@ -1,21 +0,0 @@ -""" -Simple demo of a horizontal bar chart. -""" -import matplotlib.pyplot as plt; plt.rcdefaults() -from mpltools import style; style.use('gallery') -import numpy as np -import matplotlib.pyplot as plt - - -# Example data -people = ('Tom', 'Dick', 'Harry', 'Slim', 'Jim') -y_pos = np.arange(len(people)) -performance = 3 + 10 * np.random.rand(len(people)) -error = np.random.rand(len(people)) - -plt.barh(y_pos, performance, xerr=error, align='center', alpha=0.4) -plt.yticks(y_pos, people) -plt.xlabel('Performance') -plt.title('How fast do you want to go today?') - -plt.show() diff --git a/dev/mpl_examples/lines_bars_and_markers/fill_demo.hires.png b/dev/mpl_examples/lines_bars_and_markers/fill_demo.hires.png deleted file mode 100644 index e86754127cc..00000000000 Binary files a/dev/mpl_examples/lines_bars_and_markers/fill_demo.hires.png and /dev/null differ diff --git a/dev/mpl_examples/lines_bars_and_markers/fill_demo.pdf b/dev/mpl_examples/lines_bars_and_markers/fill_demo.pdf deleted file mode 100644 index 42334a35684..00000000000 Binary files a/dev/mpl_examples/lines_bars_and_markers/fill_demo.pdf and /dev/null differ diff --git a/dev/mpl_examples/lines_bars_and_markers/fill_demo.png b/dev/mpl_examples/lines_bars_and_markers/fill_demo.png deleted file mode 100644 index 8ff5c490456..00000000000 Binary files a/dev/mpl_examples/lines_bars_and_markers/fill_demo.png and /dev/null differ diff --git a/dev/mpl_examples/lines_bars_and_markers/fill_demo.py b/dev/mpl_examples/lines_bars_and_markers/fill_demo.py deleted file mode 100644 index fff88f2e503..00000000000 --- a/dev/mpl_examples/lines_bars_and_markers/fill_demo.py +++ /dev/null @@ -1,13 +0,0 @@ -""" -Simple demo of the fill function. -""" -import numpy as np -import matplotlib.pyplot as plt - - -x = np.linspace(0, 1) -y = np.sin(4 * np.pi * x) * np.exp(-5 * x) - -plt.fill(x, y, 'r') -plt.grid(True) -plt.show() diff --git a/dev/mpl_examples/lines_bars_and_markers/fill_demo_features.hires.png b/dev/mpl_examples/lines_bars_and_markers/fill_demo_features.hires.png deleted file mode 100644 index e7890cf9f59..00000000000 Binary files a/dev/mpl_examples/lines_bars_and_markers/fill_demo_features.hires.png and /dev/null differ diff --git a/dev/mpl_examples/lines_bars_and_markers/fill_demo_features.pdf b/dev/mpl_examples/lines_bars_and_markers/fill_demo_features.pdf deleted file mode 100644 index 1d3a5f87a37..00000000000 Binary files a/dev/mpl_examples/lines_bars_and_markers/fill_demo_features.pdf and /dev/null differ diff --git a/dev/mpl_examples/lines_bars_and_markers/fill_demo_features.png b/dev/mpl_examples/lines_bars_and_markers/fill_demo_features.png deleted file mode 100644 index e0d574d3707..00000000000 Binary files a/dev/mpl_examples/lines_bars_and_markers/fill_demo_features.png and /dev/null differ diff --git a/dev/mpl_examples/lines_bars_and_markers/fill_demo_features.py b/dev/mpl_examples/lines_bars_and_markers/fill_demo_features.py deleted file mode 100644 index 230f1631c0a..00000000000 --- a/dev/mpl_examples/lines_bars_and_markers/fill_demo_features.py +++ /dev/null @@ -1,17 +0,0 @@ -""" -Demo of the fill function with a few features. - -In addition to the basic fill plot, this demo shows a few optional features: - - * Multiple curves with a single command. - * Setting the fill color. - * Setting the opacity (alpha value). -""" -import numpy as np -import matplotlib.pyplot as plt - -x = np.linspace(0, 2 * np.pi, 100) -y1 = np.sin(x) -y2 = np.sin(3 * x) -plt.fill(x, y1, 'b', x, y2, 'r', alpha=0.3) -plt.show() diff --git a/dev/mpl_examples/lines_bars_and_markers/line_demo_dash_control.hires.png b/dev/mpl_examples/lines_bars_and_markers/line_demo_dash_control.hires.png deleted file mode 100644 index 7fa1bda5725..00000000000 Binary files a/dev/mpl_examples/lines_bars_and_markers/line_demo_dash_control.hires.png and /dev/null differ diff --git a/dev/mpl_examples/lines_bars_and_markers/line_demo_dash_control.pdf b/dev/mpl_examples/lines_bars_and_markers/line_demo_dash_control.pdf deleted file mode 100644 index 87fb8ece8bb..00000000000 Binary files a/dev/mpl_examples/lines_bars_and_markers/line_demo_dash_control.pdf and /dev/null differ diff --git a/dev/mpl_examples/lines_bars_and_markers/line_demo_dash_control.png b/dev/mpl_examples/lines_bars_and_markers/line_demo_dash_control.png deleted file mode 100644 index 85545a36512..00000000000 Binary files a/dev/mpl_examples/lines_bars_and_markers/line_demo_dash_control.png and /dev/null differ diff --git a/dev/mpl_examples/lines_bars_and_markers/line_demo_dash_control.py b/dev/mpl_examples/lines_bars_and_markers/line_demo_dash_control.py deleted file mode 100644 index b884c7e2867..00000000000 --- a/dev/mpl_examples/lines_bars_and_markers/line_demo_dash_control.py +++ /dev/null @@ -1,17 +0,0 @@ -""" -Demo of a simple plot with a custom dashed line. - -A Line object's ``set_dashes`` method allows you to specify dashes with -a series of on/off lengths (in points). -""" -import numpy as np -import matplotlib.pyplot as plt - - -x = np.linspace(0, 10) -line, = plt.plot(x, np.sin(x), '--', linewidth=2) - -dashes = [10, 5, 100, 5] # 10 points on, 5 off, 100 on, 5 off -line.set_dashes(dashes) - -plt.show() diff --git a/dev/mpl_examples/mplot3d/2dcollections3d_demo.hires.png b/dev/mpl_examples/mplot3d/2dcollections3d_demo.hires.png deleted file mode 100644 index b18f2254710..00000000000 Binary files a/dev/mpl_examples/mplot3d/2dcollections3d_demo.hires.png and /dev/null differ diff --git a/dev/mpl_examples/mplot3d/2dcollections3d_demo.pdf b/dev/mpl_examples/mplot3d/2dcollections3d_demo.pdf deleted file mode 100644 index bf97beaba8f..00000000000 Binary files a/dev/mpl_examples/mplot3d/2dcollections3d_demo.pdf and /dev/null differ diff --git a/dev/mpl_examples/mplot3d/2dcollections3d_demo.png b/dev/mpl_examples/mplot3d/2dcollections3d_demo.png deleted file mode 100644 index 68871b1bb3a..00000000000 Binary files a/dev/mpl_examples/mplot3d/2dcollections3d_demo.png and /dev/null differ diff --git a/dev/mpl_examples/mplot3d/2dcollections3d_demo.py b/dev/mpl_examples/mplot3d/2dcollections3d_demo.py deleted file mode 100644 index 2f53f542c6f..00000000000 --- a/dev/mpl_examples/mplot3d/2dcollections3d_demo.py +++ /dev/null @@ -1,24 +0,0 @@ -from mpl_toolkits.mplot3d import Axes3D -import numpy as np -import matplotlib.pyplot as plt - -fig = plt.figure() -ax = fig.gca(projection='3d') - -x = np.linspace(0, 1, 100) -y = np.sin(x * 2 * np.pi) / 2 + 0.5 -ax.plot(x, y, zs=0, zdir='z', label='zs=0, zdir=z') - -colors = ('r', 'g', 'b', 'k') -for c in colors: - x = np.random.sample(20) - y = np.random.sample(20) - ax.scatter(x, y, 0, zdir='y', c=c) - -ax.legend() -ax.set_xlim3d(0, 1) -ax.set_ylim3d(0, 1) -ax.set_zlim3d(0, 1) - -plt.show() - diff --git a/dev/mpl_examples/mplot3d/bars3d_demo.hires.png b/dev/mpl_examples/mplot3d/bars3d_demo.hires.png deleted file mode 100644 index 97b6cbad179..00000000000 Binary files a/dev/mpl_examples/mplot3d/bars3d_demo.hires.png and /dev/null differ diff --git a/dev/mpl_examples/mplot3d/bars3d_demo.pdf b/dev/mpl_examples/mplot3d/bars3d_demo.pdf deleted file mode 100644 index b9c76ec7e8a..00000000000 Binary files a/dev/mpl_examples/mplot3d/bars3d_demo.pdf and /dev/null differ diff --git a/dev/mpl_examples/mplot3d/bars3d_demo.png b/dev/mpl_examples/mplot3d/bars3d_demo.png deleted file mode 100644 index 3c74d94fbbc..00000000000 Binary files a/dev/mpl_examples/mplot3d/bars3d_demo.png and /dev/null differ diff --git a/dev/mpl_examples/mplot3d/bars3d_demo.py b/dev/mpl_examples/mplot3d/bars3d_demo.py deleted file mode 100644 index 8dc76c24cf4..00000000000 --- a/dev/mpl_examples/mplot3d/bars3d_demo.py +++ /dev/null @@ -1,22 +0,0 @@ -from mpl_toolkits.mplot3d import Axes3D -import matplotlib.pyplot as plt -import numpy as np - -fig = plt.figure() -ax = fig.add_subplot(111, projection='3d') -for c, z in zip(['r', 'g', 'b', 'y'], [30, 20, 10, 0]): - xs = np.arange(20) - ys = np.random.rand(20) - - # You can provide either a single color or an array. To demonstrate this, - # the first bar of each set will be colored cyan. - cs = [c] * len(xs) - cs[0] = 'c' - ax.bar(xs, ys, zs=z, zdir='y', color=cs, alpha=0.8) - -ax.set_xlabel('X') -ax.set_ylabel('Y') -ax.set_zlabel('Z') - -plt.show() - diff --git a/dev/mpl_examples/mplot3d/contour3d_demo.hires.png b/dev/mpl_examples/mplot3d/contour3d_demo.hires.png deleted file mode 100644 index ca275c5a7a6..00000000000 Binary files a/dev/mpl_examples/mplot3d/contour3d_demo.hires.png and /dev/null differ diff --git a/dev/mpl_examples/mplot3d/contour3d_demo.pdf b/dev/mpl_examples/mplot3d/contour3d_demo.pdf deleted file mode 100644 index 828f93a8c55..00000000000 Binary files a/dev/mpl_examples/mplot3d/contour3d_demo.pdf and /dev/null differ diff --git a/dev/mpl_examples/mplot3d/contour3d_demo.png b/dev/mpl_examples/mplot3d/contour3d_demo.png deleted file mode 100644 index 430347b1d11..00000000000 Binary files a/dev/mpl_examples/mplot3d/contour3d_demo.png and /dev/null differ diff --git a/dev/mpl_examples/mplot3d/contour3d_demo.py b/dev/mpl_examples/mplot3d/contour3d_demo.py deleted file mode 100644 index 32bb8d3abef..00000000000 --- a/dev/mpl_examples/mplot3d/contour3d_demo.py +++ /dev/null @@ -1,12 +0,0 @@ -from mpl_toolkits.mplot3d import axes3d -import matplotlib.pyplot as plt -from matplotlib import cm - -fig = plt.figure() -ax = fig.add_subplot(111, projection='3d') -X, Y, Z = axes3d.get_test_data(0.05) -cset = ax.contour(X, Y, Z, cmap=cm.coolwarm) -ax.clabel(cset, fontsize=9, inline=1) - -plt.show() - diff --git a/dev/mpl_examples/mplot3d/contour3d_demo2.hires.png b/dev/mpl_examples/mplot3d/contour3d_demo2.hires.png deleted file mode 100644 index abe3c0db66e..00000000000 Binary files a/dev/mpl_examples/mplot3d/contour3d_demo2.hires.png and /dev/null differ diff --git a/dev/mpl_examples/mplot3d/contour3d_demo2.pdf b/dev/mpl_examples/mplot3d/contour3d_demo2.pdf deleted file mode 100644 index 4bf58476e42..00000000000 Binary files a/dev/mpl_examples/mplot3d/contour3d_demo2.pdf and /dev/null differ diff --git a/dev/mpl_examples/mplot3d/contour3d_demo2.png b/dev/mpl_examples/mplot3d/contour3d_demo2.png deleted file mode 100644 index abddb58c5c1..00000000000 Binary files a/dev/mpl_examples/mplot3d/contour3d_demo2.png and /dev/null differ diff --git a/dev/mpl_examples/mplot3d/contour3d_demo2.py b/dev/mpl_examples/mplot3d/contour3d_demo2.py deleted file mode 100644 index 62e79841942..00000000000 --- a/dev/mpl_examples/mplot3d/contour3d_demo2.py +++ /dev/null @@ -1,12 +0,0 @@ -from mpl_toolkits.mplot3d import axes3d -import matplotlib.pyplot as plt -from matplotlib import cm - -fig = plt.figure() -ax = fig.gca(projection='3d') -X, Y, Z = axes3d.get_test_data(0.05) -cset = ax.contour(X, Y, Z, extend3d=True, cmap=cm.coolwarm) -ax.clabel(cset, fontsize=9, inline=1) - -plt.show() - diff --git a/dev/mpl_examples/mplot3d/contour3d_demo3.hires.png b/dev/mpl_examples/mplot3d/contour3d_demo3.hires.png deleted file mode 100644 index b3ae7ad95ad..00000000000 Binary files a/dev/mpl_examples/mplot3d/contour3d_demo3.hires.png and /dev/null differ diff --git a/dev/mpl_examples/mplot3d/contour3d_demo3.pdf b/dev/mpl_examples/mplot3d/contour3d_demo3.pdf deleted file mode 100644 index 4e608a73a4e..00000000000 Binary files a/dev/mpl_examples/mplot3d/contour3d_demo3.pdf and /dev/null differ diff --git a/dev/mpl_examples/mplot3d/contour3d_demo3.png b/dev/mpl_examples/mplot3d/contour3d_demo3.png deleted file mode 100644 index 17d4c300104..00000000000 Binary files a/dev/mpl_examples/mplot3d/contour3d_demo3.png and /dev/null differ diff --git a/dev/mpl_examples/mplot3d/contour3d_demo3.py b/dev/mpl_examples/mplot3d/contour3d_demo3.py deleted file mode 100644 index 125b3bf2fa1..00000000000 --- a/dev/mpl_examples/mplot3d/contour3d_demo3.py +++ /dev/null @@ -1,21 +0,0 @@ -from mpl_toolkits.mplot3d import axes3d -import matplotlib.pyplot as plt -from matplotlib import cm - -fig = plt.figure() -ax = fig.gca(projection='3d') -X, Y, Z = axes3d.get_test_data(0.05) -ax.plot_surface(X, Y, Z, rstride=8, cstride=8, alpha=0.3) -cset = ax.contour(X, Y, Z, zdir='z', offset=-100, cmap=cm.coolwarm) -cset = ax.contour(X, Y, Z, zdir='x', offset=-40, cmap=cm.coolwarm) -cset = ax.contour(X, Y, Z, zdir='y', offset=40, cmap=cm.coolwarm) - -ax.set_xlabel('X') -ax.set_xlim(-40, 40) -ax.set_ylabel('Y') -ax.set_ylim(-40, 40) -ax.set_zlabel('Z') -ax.set_zlim(-100, 100) - -plt.show() - diff --git a/dev/mpl_examples/mplot3d/contourf3d_demo.hires.png b/dev/mpl_examples/mplot3d/contourf3d_demo.hires.png deleted file mode 100644 index 8293464ef30..00000000000 Binary files a/dev/mpl_examples/mplot3d/contourf3d_demo.hires.png and /dev/null differ diff --git a/dev/mpl_examples/mplot3d/contourf3d_demo.pdf b/dev/mpl_examples/mplot3d/contourf3d_demo.pdf deleted file mode 100644 index 2a843e90c12..00000000000 Binary files a/dev/mpl_examples/mplot3d/contourf3d_demo.pdf and /dev/null differ diff --git a/dev/mpl_examples/mplot3d/contourf3d_demo.png b/dev/mpl_examples/mplot3d/contourf3d_demo.png deleted file mode 100644 index ef58900e506..00000000000 Binary files a/dev/mpl_examples/mplot3d/contourf3d_demo.png and /dev/null differ diff --git a/dev/mpl_examples/mplot3d/contourf3d_demo.py b/dev/mpl_examples/mplot3d/contourf3d_demo.py deleted file mode 100644 index c2c28877ea6..00000000000 --- a/dev/mpl_examples/mplot3d/contourf3d_demo.py +++ /dev/null @@ -1,12 +0,0 @@ -from mpl_toolkits.mplot3d import axes3d -import matplotlib.pyplot as plt -from matplotlib import cm - -fig = plt.figure() -ax = fig.gca(projection='3d') -X, Y, Z = axes3d.get_test_data(0.05) -cset = ax.contourf(X, Y, Z, cmap=cm.coolwarm) -ax.clabel(cset, fontsize=9, inline=1) - -plt.show() - diff --git a/dev/mpl_examples/mplot3d/contourf3d_demo2.hires.png b/dev/mpl_examples/mplot3d/contourf3d_demo2.hires.png deleted file mode 100644 index c9d5d4b2bb1..00000000000 Binary files a/dev/mpl_examples/mplot3d/contourf3d_demo2.hires.png and /dev/null differ diff --git a/dev/mpl_examples/mplot3d/contourf3d_demo2.pdf b/dev/mpl_examples/mplot3d/contourf3d_demo2.pdf deleted file mode 100644 index 4e2db70bbd5..00000000000 Binary files a/dev/mpl_examples/mplot3d/contourf3d_demo2.pdf and /dev/null differ diff --git a/dev/mpl_examples/mplot3d/contourf3d_demo2.png b/dev/mpl_examples/mplot3d/contourf3d_demo2.png deleted file mode 100644 index c0d88f0b8c8..00000000000 Binary files a/dev/mpl_examples/mplot3d/contourf3d_demo2.png and /dev/null differ diff --git a/dev/mpl_examples/mplot3d/contourf3d_demo2.py b/dev/mpl_examples/mplot3d/contourf3d_demo2.py deleted file mode 100644 index f20f029acf7..00000000000 --- a/dev/mpl_examples/mplot3d/contourf3d_demo2.py +++ /dev/null @@ -1,26 +0,0 @@ -""" -.. versionadded:: 1.1.0 - This demo depends on new features added to contourf3d. -""" - -from mpl_toolkits.mplot3d import axes3d -import matplotlib.pyplot as plt -from matplotlib import cm - -fig = plt.figure() -ax = fig.gca(projection='3d') -X, Y, Z = axes3d.get_test_data(0.05) -ax.plot_surface(X, Y, Z, rstride=8, cstride=8, alpha=0.3) -cset = ax.contourf(X, Y, Z, zdir='z', offset=-100, cmap=cm.coolwarm) -cset = ax.contourf(X, Y, Z, zdir='x', offset=-40, cmap=cm.coolwarm) -cset = ax.contourf(X, Y, Z, zdir='y', offset=40, cmap=cm.coolwarm) - -ax.set_xlabel('X') -ax.set_xlim(-40, 40) -ax.set_ylabel('Y') -ax.set_ylim(-40, 40) -ax.set_zlabel('Z') -ax.set_zlim(-100, 100) - -plt.show() - diff --git a/dev/mpl_examples/mplot3d/hist3d_demo.hires.png b/dev/mpl_examples/mplot3d/hist3d_demo.hires.png deleted file mode 100644 index 11333da970d..00000000000 Binary files a/dev/mpl_examples/mplot3d/hist3d_demo.hires.png and /dev/null differ diff --git a/dev/mpl_examples/mplot3d/hist3d_demo.pdf b/dev/mpl_examples/mplot3d/hist3d_demo.pdf deleted file mode 100644 index d4e1d73703c..00000000000 Binary files a/dev/mpl_examples/mplot3d/hist3d_demo.pdf and /dev/null differ diff --git a/dev/mpl_examples/mplot3d/hist3d_demo.png b/dev/mpl_examples/mplot3d/hist3d_demo.png deleted file mode 100644 index 8d772df0067..00000000000 Binary files a/dev/mpl_examples/mplot3d/hist3d_demo.png and /dev/null differ diff --git a/dev/mpl_examples/mplot3d/hist3d_demo.py b/dev/mpl_examples/mplot3d/hist3d_demo.py deleted file mode 100644 index 0af55a4288d..00000000000 --- a/dev/mpl_examples/mplot3d/hist3d_demo.py +++ /dev/null @@ -1,23 +0,0 @@ -from mpl_toolkits.mplot3d import Axes3D -import matplotlib.pyplot as plt -import numpy as np - -fig = plt.figure() -ax = fig.add_subplot(111, projection='3d') -x, y = np.random.rand(2, 100) * 4 -hist, xedges, yedges = np.histogram2d(x, y, bins=4) - -elements = (len(xedges) - 1) * (len(yedges) - 1) -xpos, ypos = np.meshgrid(xedges[:-1]+0.25, yedges[:-1]+0.25) - -xpos = xpos.flatten() -ypos = ypos.flatten() -zpos = np.zeros(elements) -dx = 0.5 * np.ones_like(zpos) -dy = dx.copy() -dz = hist.flatten() - -ax.bar3d(xpos, ypos, zpos, dx, dy, dz, color='b', zsort='average') - -plt.show() - diff --git a/dev/mpl_examples/mplot3d/lines3d_demo.hires.png b/dev/mpl_examples/mplot3d/lines3d_demo.hires.png deleted file mode 100644 index 2a4ea49d1db..00000000000 Binary files a/dev/mpl_examples/mplot3d/lines3d_demo.hires.png and /dev/null differ diff --git a/dev/mpl_examples/mplot3d/lines3d_demo.pdf b/dev/mpl_examples/mplot3d/lines3d_demo.pdf deleted file mode 100644 index 613d4289e1b..00000000000 Binary files a/dev/mpl_examples/mplot3d/lines3d_demo.pdf and /dev/null differ diff --git a/dev/mpl_examples/mplot3d/lines3d_demo.png b/dev/mpl_examples/mplot3d/lines3d_demo.png deleted file mode 100644 index 0c8398bfe71..00000000000 Binary files a/dev/mpl_examples/mplot3d/lines3d_demo.png and /dev/null differ diff --git a/dev/mpl_examples/mplot3d/lines3d_demo.py b/dev/mpl_examples/mplot3d/lines3d_demo.py deleted file mode 100644 index 883657d9ef4..00000000000 --- a/dev/mpl_examples/mplot3d/lines3d_demo.py +++ /dev/null @@ -1,19 +0,0 @@ -import matplotlib as mpl -from mpl_toolkits.mplot3d import Axes3D -import numpy as np -import matplotlib.pyplot as plt - -mpl.rcParams['legend.fontsize'] = 10 - -fig = plt.figure() -ax = fig.gca(projection='3d') -theta = np.linspace(-4 * np.pi, 4 * np.pi, 100) -z = np.linspace(-2, 2, 100) -r = z**2 + 1 -x = r * np.sin(theta) -y = r * np.cos(theta) -ax.plot(x, y, z, label='parametric curve') -ax.legend() - -plt.show() - diff --git a/dev/mpl_examples/mplot3d/lorenz_attractor.hires.png b/dev/mpl_examples/mplot3d/lorenz_attractor.hires.png deleted file mode 100644 index ae90ee881d1..00000000000 Binary files a/dev/mpl_examples/mplot3d/lorenz_attractor.hires.png and /dev/null differ diff --git a/dev/mpl_examples/mplot3d/lorenz_attractor.pdf b/dev/mpl_examples/mplot3d/lorenz_attractor.pdf deleted file mode 100644 index 4ad2e74d2be..00000000000 Binary files a/dev/mpl_examples/mplot3d/lorenz_attractor.pdf and /dev/null differ diff --git a/dev/mpl_examples/mplot3d/lorenz_attractor.png b/dev/mpl_examples/mplot3d/lorenz_attractor.png deleted file mode 100644 index edc3fe938a7..00000000000 Binary files a/dev/mpl_examples/mplot3d/lorenz_attractor.png and /dev/null differ diff --git a/dev/mpl_examples/mplot3d/lorenz_attractor.py b/dev/mpl_examples/mplot3d/lorenz_attractor.py deleted file mode 100644 index e88e4f6b4c4..00000000000 --- a/dev/mpl_examples/mplot3d/lorenz_attractor.py +++ /dev/null @@ -1,50 +0,0 @@ -# Plot of the Lorenz Attractor based on Edward Lorenz's 1963 "Deterministic -# Nonperiodic Flow" publication. -# http://journals.ametsoc.org/doi/abs/10.1175/1520-0469%281963%29020%3C0130%3ADNF%3E2.0.CO%3B2 -# -# Note: Because this is a simple non-linear ODE, it would be more easily -# done using SciPy's ode solver, but this approach depends only -# upon NumPy. - -import numpy as np -import matplotlib.pyplot as plt -from mpl_toolkits.mplot3d import Axes3D - - -def lorenz(x, y, z, s=10, r=28, b=2.667) : - x_dot = s*(y - x) - y_dot = r*x - y - x*z - z_dot = x*y - b*z - return x_dot, y_dot, z_dot - - -dt = 0.01 -stepCnt = 10000 - -# Need one more for the initial values -xs = np.empty((stepCnt + 1,)) -ys = np.empty((stepCnt + 1,)) -zs = np.empty((stepCnt + 1,)) - -# Setting initial values -xs[0], ys[0], zs[0] = (0., 1., 1.05) - -# Stepping through "time". -for i in range(stepCnt) : - # Derivatives of the X, Y, Z state - x_dot, y_dot, z_dot = lorenz(xs[i], ys[i], zs[i]) - xs[i + 1] = xs[i] + (x_dot * dt) - ys[i + 1] = ys[i] + (y_dot * dt) - zs[i + 1] = zs[i] + (z_dot * dt) - -fig = plt.figure() -ax = fig.gca(projection='3d') - -ax.plot(xs, ys, zs) -ax.set_xlabel("X Axis") -ax.set_ylabel("Y Axis") -ax.set_zlabel("Z Axis") -ax.set_title("Lorenz Attractor") - -plt.show() - diff --git a/dev/mpl_examples/mplot3d/mixed_subplots_demo.hires.png b/dev/mpl_examples/mplot3d/mixed_subplots_demo.hires.png deleted file mode 100644 index 2740d802493..00000000000 Binary files a/dev/mpl_examples/mplot3d/mixed_subplots_demo.hires.png and /dev/null differ diff --git a/dev/mpl_examples/mplot3d/mixed_subplots_demo.pdf b/dev/mpl_examples/mplot3d/mixed_subplots_demo.pdf deleted file mode 100644 index 45131da054c..00000000000 Binary files a/dev/mpl_examples/mplot3d/mixed_subplots_demo.pdf and /dev/null differ diff --git a/dev/mpl_examples/mplot3d/mixed_subplots_demo.png b/dev/mpl_examples/mplot3d/mixed_subplots_demo.png deleted file mode 100644 index 204968d76ad..00000000000 Binary files a/dev/mpl_examples/mplot3d/mixed_subplots_demo.png and /dev/null differ diff --git a/dev/mpl_examples/mplot3d/mixed_subplots_demo.py b/dev/mpl_examples/mplot3d/mixed_subplots_demo.py deleted file mode 100644 index aaaf4372cc8..00000000000 --- a/dev/mpl_examples/mplot3d/mixed_subplots_demo.py +++ /dev/null @@ -1,49 +0,0 @@ -""" -Demonstrate the mixing of 2d and 3d subplots -""" -from mpl_toolkits.mplot3d import Axes3D -import matplotlib.pyplot as plt -import numpy as np - -def f(t): - s1 = np.cos(2*np.pi*t) - e1 = np.exp(-t) - return np.multiply(s1,e1) - - -################ -# First subplot -################ -t1 = np.arange(0.0, 5.0, 0.1) -t2 = np.arange(0.0, 5.0, 0.02) -t3 = np.arange(0.0, 2.0, 0.01) - -# Twice as tall as it is wide. -fig = plt.figure(figsize=plt.figaspect(2.)) -fig.suptitle('A tale of 2 subplots') -ax = fig.add_subplot(2, 1, 1) -l = ax.plot(t1, f(t1), 'bo', - t2, f(t2), 'k--', markerfacecolor='green') -ax.grid(True) -ax.set_ylabel('Damped oscillation') - - -################# -# Second subplot -################# -ax = fig.add_subplot(2, 1, 2, projection='3d') -X = np.arange(-5, 5, 0.25) -xlen = len(X) -Y = np.arange(-5, 5, 0.25) -ylen = len(Y) -X, Y = np.meshgrid(X, Y) -R = np.sqrt(X**2 + Y**2) -Z = np.sin(R) - -surf = ax.plot_surface(X, Y, Z, rstride=1, cstride=1, - linewidth=0, antialiased=False) - -ax.set_zlim3d(-1, 1) - -plt.show() - diff --git a/dev/mpl_examples/mplot3d/offset_demo.hires.png b/dev/mpl_examples/mplot3d/offset_demo.hires.png deleted file mode 100644 index 34db0c9eb98..00000000000 Binary files a/dev/mpl_examples/mplot3d/offset_demo.hires.png and /dev/null differ diff --git a/dev/mpl_examples/mplot3d/offset_demo.pdf b/dev/mpl_examples/mplot3d/offset_demo.pdf deleted file mode 100644 index 6c620789a7d..00000000000 Binary files a/dev/mpl_examples/mplot3d/offset_demo.pdf and /dev/null differ diff --git a/dev/mpl_examples/mplot3d/offset_demo.png b/dev/mpl_examples/mplot3d/offset_demo.png deleted file mode 100644 index 57571282114..00000000000 Binary files a/dev/mpl_examples/mplot3d/offset_demo.png and /dev/null differ diff --git a/dev/mpl_examples/mplot3d/offset_demo.py b/dev/mpl_examples/mplot3d/offset_demo.py deleted file mode 100644 index 3edb9cbff8b..00000000000 --- a/dev/mpl_examples/mplot3d/offset_demo.py +++ /dev/null @@ -1,26 +0,0 @@ -from mpl_toolkits.mplot3d import Axes3D -import matplotlib.pyplot as plt -import numpy as np - -# This example demonstrates mplot3d's offset text display. -# As one rotates the 3D figure, the offsets should remain oriented -# same way as the axis label, and should also be located "away" -# from the center of the plot. -# -# This demo triggers the display of the offset text for the x and -# y axis by adding 1e5 to X and Y. Anything less would not -# automatically trigger it. - -fig = plt.figure() -ax = fig.gca(projection='3d') -X, Y = np.mgrid[0:6*np.pi:0.25, 0:4*np.pi:0.25] -Z = np.sqrt(np.abs(np.cos(X) + np.cos(Y))) - -surf = ax.plot_surface(X + 1e5, Y + 1e5, Z, cmap='autumn', cstride=2, rstride=2) -ax.set_xlabel("X-Label") -ax.set_ylabel("Y-Label") -ax.set_zlabel("Z-Label") -ax.set_zlim(0, 2) - -plt.show() - diff --git a/dev/mpl_examples/mplot3d/pathpatch3d_demo.hires.png b/dev/mpl_examples/mplot3d/pathpatch3d_demo.hires.png deleted file mode 100644 index ac0cdabd8f5..00000000000 Binary files a/dev/mpl_examples/mplot3d/pathpatch3d_demo.hires.png and /dev/null differ diff --git a/dev/mpl_examples/mplot3d/pathpatch3d_demo.pdf b/dev/mpl_examples/mplot3d/pathpatch3d_demo.pdf deleted file mode 100644 index 3433e55de2f..00000000000 Binary files a/dev/mpl_examples/mplot3d/pathpatch3d_demo.pdf and /dev/null differ diff --git a/dev/mpl_examples/mplot3d/pathpatch3d_demo.png b/dev/mpl_examples/mplot3d/pathpatch3d_demo.png deleted file mode 100644 index 2f3c886eb16..00000000000 Binary files a/dev/mpl_examples/mplot3d/pathpatch3d_demo.png and /dev/null differ diff --git a/dev/mpl_examples/mplot3d/pathpatch3d_demo.py b/dev/mpl_examples/mplot3d/pathpatch3d_demo.py deleted file mode 100644 index 9be590f333f..00000000000 --- a/dev/mpl_examples/mplot3d/pathpatch3d_demo.py +++ /dev/null @@ -1,53 +0,0 @@ -import matplotlib.pyplot as plt -from matplotlib.patches import Circle, PathPatch -# register Axes3D class with matplotlib by importing Axes3D -from mpl_toolkits.mplot3d import Axes3D -import mpl_toolkits.mplot3d.art3d as art3d -from matplotlib.text import TextPath -from matplotlib.transforms import Affine2D - - -def text3d(ax, xyz, s, zdir="z", size=None, angle=0, usetex=False, **kwargs): - - x, y, z = xyz - if zdir == "y": - xy1, z1 = (x, z), y - elif zdir == "y": - xy1, z1 = (y, z), x - else: - xy1, z1 = (x, y), z - - text_path = TextPath((0, 0), s, size=size, usetex=usetex) - trans = Affine2D().rotate(angle).translate(xy1[0], xy1[1]) - - p1 = PathPatch(trans.transform_path(text_path), **kwargs) - ax.add_patch(p1) - art3d.pathpatch_2d_to_3d(p1, z=z1, zdir=zdir) - - -fig = plt.figure() -ax = fig.add_subplot(111, projection='3d') - -p = Circle((5, 5), 3) -ax.add_patch(p) -art3d.pathpatch_2d_to_3d(p, z=0, zdir="x") - - -text3d(ax, (4, -2, 0), "X-axis", zdir="z", size=.5, usetex=False, - ec="none", fc="k") -text3d(ax, (12, 4, 0), "Y-axis", zdir="z", size=.5, usetex=False, - angle=.5*3.14159, ec="none", fc="k") -text3d(ax, (12, 10, 4), "Z-axis", zdir="y", size=.5, usetex=False, - angle=.5*3.14159, ec="none", fc="k") - -text3d(ax, (1, 5, 0), - r"$\displaystyle G_{\mu\nu} + \Lambda g_{\mu\nu} = " - r"\frac{8\pi G}{c^4} T_{\mu\nu} $", - zdir="z", size=1, usetex=True, - ec="none", fc="k") - -ax.set_xlim3d(0, 10) -ax.set_ylim3d(0, 10) -ax.set_zlim3d(0, 10) - -plt.show() diff --git a/dev/mpl_examples/mplot3d/polys3d_demo.hires.png b/dev/mpl_examples/mplot3d/polys3d_demo.hires.png deleted file mode 100644 index 8461b9e28d9..00000000000 Binary files a/dev/mpl_examples/mplot3d/polys3d_demo.hires.png and /dev/null differ diff --git a/dev/mpl_examples/mplot3d/polys3d_demo.pdf b/dev/mpl_examples/mplot3d/polys3d_demo.pdf deleted file mode 100644 index 65c98fbe426..00000000000 Binary files a/dev/mpl_examples/mplot3d/polys3d_demo.pdf and /dev/null differ diff --git a/dev/mpl_examples/mplot3d/polys3d_demo.png b/dev/mpl_examples/mplot3d/polys3d_demo.png deleted file mode 100644 index 4c2900d59a8..00000000000 Binary files a/dev/mpl_examples/mplot3d/polys3d_demo.png and /dev/null differ diff --git a/dev/mpl_examples/mplot3d/polys3d_demo.py b/dev/mpl_examples/mplot3d/polys3d_demo.py deleted file mode 100644 index ed64d3ae9f5..00000000000 --- a/dev/mpl_examples/mplot3d/polys3d_demo.py +++ /dev/null @@ -1,33 +0,0 @@ -from mpl_toolkits.mplot3d import Axes3D -from matplotlib.collections import PolyCollection -from matplotlib.colors import colorConverter -import matplotlib.pyplot as plt -import numpy as np - -fig = plt.figure() -ax = fig.gca(projection='3d') - -cc = lambda arg: colorConverter.to_rgba(arg, alpha=0.6) - -xs = np.arange(0, 10, 0.4) -verts = [] -zs = [0.0, 1.0, 2.0, 3.0] -for z in zs: - ys = np.random.rand(len(xs)) - ys[0], ys[-1] = 0, 0 - verts.append(list(zip(xs, ys))) - -poly = PolyCollection(verts, facecolors = [cc('r'), cc('g'), cc('b'), - cc('y')]) -poly.set_alpha(0.7) -ax.add_collection3d(poly, zs=zs, zdir='y') - -ax.set_xlabel('X') -ax.set_xlim3d(0, 10) -ax.set_ylabel('Y') -ax.set_ylim3d(-1, 4) -ax.set_zlabel('Z') -ax.set_zlim3d(0, 1) - -plt.show() - diff --git a/dev/mpl_examples/mplot3d/rotate_axes3d_demo.hires.png b/dev/mpl_examples/mplot3d/rotate_axes3d_demo.hires.png deleted file mode 100644 index f65273a7f8a..00000000000 Binary files a/dev/mpl_examples/mplot3d/rotate_axes3d_demo.hires.png and /dev/null differ diff --git a/dev/mpl_examples/mplot3d/rotate_axes3d_demo.pdf b/dev/mpl_examples/mplot3d/rotate_axes3d_demo.pdf deleted file mode 100644 index cdfc101a9c9..00000000000 Binary files a/dev/mpl_examples/mplot3d/rotate_axes3d_demo.pdf and /dev/null differ diff --git a/dev/mpl_examples/mplot3d/rotate_axes3d_demo.png b/dev/mpl_examples/mplot3d/rotate_axes3d_demo.png deleted file mode 100644 index d526887f3ec..00000000000 Binary files a/dev/mpl_examples/mplot3d/rotate_axes3d_demo.png and /dev/null differ diff --git a/dev/mpl_examples/mplot3d/rotate_axes3d_demo.py b/dev/mpl_examples/mplot3d/rotate_axes3d_demo.py deleted file mode 100644 index ad8a1f70b6e..00000000000 --- a/dev/mpl_examples/mplot3d/rotate_axes3d_demo.py +++ /dev/null @@ -1,15 +0,0 @@ -from mpl_toolkits.mplot3d import axes3d -import matplotlib.pyplot as plt -import numpy as np - -plt.ion() - -fig = plt.figure() -ax = fig.add_subplot(111, projection='3d') -X, Y, Z = axes3d.get_test_data(0.1) -ax.plot_wireframe(X, Y, Z, rstride=5, cstride=5) - -for angle in range(0, 360): - ax.view_init(30, angle) - plt.draw() - diff --git a/dev/mpl_examples/mplot3d/scatter3d_demo.hires.png b/dev/mpl_examples/mplot3d/scatter3d_demo.hires.png deleted file mode 100644 index 4abb064af7a..00000000000 Binary files a/dev/mpl_examples/mplot3d/scatter3d_demo.hires.png and /dev/null differ diff --git a/dev/mpl_examples/mplot3d/scatter3d_demo.pdf b/dev/mpl_examples/mplot3d/scatter3d_demo.pdf deleted file mode 100644 index 8c0d8ef8970..00000000000 Binary files a/dev/mpl_examples/mplot3d/scatter3d_demo.pdf and /dev/null differ diff --git a/dev/mpl_examples/mplot3d/scatter3d_demo.png b/dev/mpl_examples/mplot3d/scatter3d_demo.png deleted file mode 100644 index 80af332ef2b..00000000000 Binary files a/dev/mpl_examples/mplot3d/scatter3d_demo.png and /dev/null differ diff --git a/dev/mpl_examples/mplot3d/scatter3d_demo.py b/dev/mpl_examples/mplot3d/scatter3d_demo.py deleted file mode 100644 index 1a1a7dd18b7..00000000000 --- a/dev/mpl_examples/mplot3d/scatter3d_demo.py +++ /dev/null @@ -1,22 +0,0 @@ -import numpy as np -from mpl_toolkits.mplot3d import Axes3D -import matplotlib.pyplot as plt - -def randrange(n, vmin, vmax): - return (vmax-vmin)*np.random.rand(n) + vmin - -fig = plt.figure() -ax = fig.add_subplot(111, projection='3d') -n = 100 -for c, m, zl, zh in [('r', 'o', -50, -25), ('b', '^', -30, -5)]: - xs = randrange(n, 23, 32) - ys = randrange(n, 0, 100) - zs = randrange(n, zl, zh) - ax.scatter(xs, ys, zs, c=c, marker=m) - -ax.set_xlabel('X Label') -ax.set_ylabel('Y Label') -ax.set_zlabel('Z Label') - -plt.show() - diff --git a/dev/mpl_examples/mplot3d/subplot3d_demo.hires.png b/dev/mpl_examples/mplot3d/subplot3d_demo.hires.png deleted file mode 100644 index c243192b23a..00000000000 Binary files a/dev/mpl_examples/mplot3d/subplot3d_demo.hires.png and /dev/null differ diff --git a/dev/mpl_examples/mplot3d/subplot3d_demo.pdf b/dev/mpl_examples/mplot3d/subplot3d_demo.pdf deleted file mode 100644 index 8b07b8decf3..00000000000 Binary files a/dev/mpl_examples/mplot3d/subplot3d_demo.pdf and /dev/null differ diff --git a/dev/mpl_examples/mplot3d/subplot3d_demo.png b/dev/mpl_examples/mplot3d/subplot3d_demo.png deleted file mode 100644 index 3ef1b8b1e0d..00000000000 Binary files a/dev/mpl_examples/mplot3d/subplot3d_demo.png and /dev/null differ diff --git a/dev/mpl_examples/mplot3d/subplot3d_demo.py b/dev/mpl_examples/mplot3d/subplot3d_demo.py deleted file mode 100644 index 23c758fc6b6..00000000000 --- a/dev/mpl_examples/mplot3d/subplot3d_demo.py +++ /dev/null @@ -1,32 +0,0 @@ -from mpl_toolkits.mplot3d.axes3d import Axes3D -import matplotlib.pyplot as plt - - -# imports specific to the plots in this example -import numpy as np -from matplotlib import cm -from mpl_toolkits.mplot3d.axes3d import get_test_data - -# Twice as wide as it is tall. -fig = plt.figure(figsize=plt.figaspect(0.5)) - -#---- First subplot -ax = fig.add_subplot(1, 2, 1, projection='3d') -X = np.arange(-5, 5, 0.25) -Y = np.arange(-5, 5, 0.25) -X, Y = np.meshgrid(X, Y) -R = np.sqrt(X**2 + Y**2) -Z = np.sin(R) -surf = ax.plot_surface(X, Y, Z, rstride=1, cstride=1, cmap=cm.coolwarm, - linewidth=0, antialiased=False) -ax.set_zlim3d(-1.01, 1.01) - -fig.colorbar(surf, shrink=0.5, aspect=10) - -#---- Second subplot -ax = fig.add_subplot(1, 2, 2, projection='3d') -X, Y, Z = get_test_data(0.05) -ax.plot_wireframe(X, Y, Z, rstride=10, cstride=10) - -plt.show() - diff --git a/dev/mpl_examples/mplot3d/surface3d_demo.hires.png b/dev/mpl_examples/mplot3d/surface3d_demo.hires.png deleted file mode 100644 index ba6f70338cc..00000000000 Binary files a/dev/mpl_examples/mplot3d/surface3d_demo.hires.png and /dev/null differ diff --git a/dev/mpl_examples/mplot3d/surface3d_demo.pdf b/dev/mpl_examples/mplot3d/surface3d_demo.pdf deleted file mode 100644 index 15bcd97c9bb..00000000000 Binary files a/dev/mpl_examples/mplot3d/surface3d_demo.pdf and /dev/null differ diff --git a/dev/mpl_examples/mplot3d/surface3d_demo.png b/dev/mpl_examples/mplot3d/surface3d_demo.png deleted file mode 100644 index 4edc1eae84d..00000000000 Binary files a/dev/mpl_examples/mplot3d/surface3d_demo.png and /dev/null differ diff --git a/dev/mpl_examples/mplot3d/surface3d_demo.py b/dev/mpl_examples/mplot3d/surface3d_demo.py deleted file mode 100644 index f8c0e28beb8..00000000000 --- a/dev/mpl_examples/mplot3d/surface3d_demo.py +++ /dev/null @@ -1,24 +0,0 @@ -from mpl_toolkits.mplot3d import Axes3D -from matplotlib import cm -from matplotlib.ticker import LinearLocator, FormatStrFormatter -import matplotlib.pyplot as plt -import numpy as np - -fig = plt.figure() -ax = fig.gca(projection='3d') -X = np.arange(-5, 5, 0.25) -Y = np.arange(-5, 5, 0.25) -X, Y = np.meshgrid(X, Y) -R = np.sqrt(X**2 + Y**2) -Z = np.sin(R) -surf = ax.plot_surface(X, Y, Z, rstride=1, cstride=1, cmap=cm.coolwarm, - linewidth=0, antialiased=False) -ax.set_zlim(-1.01, 1.01) - -ax.zaxis.set_major_locator(LinearLocator(10)) -ax.zaxis.set_major_formatter(FormatStrFormatter('%.02f')) - -fig.colorbar(surf, shrink=0.5, aspect=5) - -plt.show() - diff --git a/dev/mpl_examples/mplot3d/surface3d_demo2.hires.png b/dev/mpl_examples/mplot3d/surface3d_demo2.hires.png deleted file mode 100644 index 84b4945c977..00000000000 Binary files a/dev/mpl_examples/mplot3d/surface3d_demo2.hires.png and /dev/null differ diff --git a/dev/mpl_examples/mplot3d/surface3d_demo2.pdf b/dev/mpl_examples/mplot3d/surface3d_demo2.pdf deleted file mode 100644 index 18b6d19e1c5..00000000000 Binary files a/dev/mpl_examples/mplot3d/surface3d_demo2.pdf and /dev/null differ diff --git a/dev/mpl_examples/mplot3d/surface3d_demo2.png b/dev/mpl_examples/mplot3d/surface3d_demo2.png deleted file mode 100644 index 44a923a6d43..00000000000 Binary files a/dev/mpl_examples/mplot3d/surface3d_demo2.png and /dev/null differ diff --git a/dev/mpl_examples/mplot3d/surface3d_demo2.py b/dev/mpl_examples/mplot3d/surface3d_demo2.py deleted file mode 100644 index 80684036b55..00000000000 --- a/dev/mpl_examples/mplot3d/surface3d_demo2.py +++ /dev/null @@ -1,17 +0,0 @@ -from mpl_toolkits.mplot3d import Axes3D -import matplotlib.pyplot as plt -import numpy as np - -fig = plt.figure() -ax = fig.add_subplot(111, projection='3d') - -u = np.linspace(0, 2 * np.pi, 100) -v = np.linspace(0, np.pi, 100) - -x = 10 * np.outer(np.cos(u), np.sin(v)) -y = 10 * np.outer(np.sin(u), np.sin(v)) -z = 10 * np.outer(np.ones(np.size(u)), np.cos(v)) -ax.plot_surface(x, y, z, rstride=4, cstride=4, color='b') - -plt.show() - diff --git a/dev/mpl_examples/mplot3d/surface3d_demo3.hires.png b/dev/mpl_examples/mplot3d/surface3d_demo3.hires.png deleted file mode 100644 index 41be6b7fde9..00000000000 Binary files a/dev/mpl_examples/mplot3d/surface3d_demo3.hires.png and /dev/null differ diff --git a/dev/mpl_examples/mplot3d/surface3d_demo3.pdf b/dev/mpl_examples/mplot3d/surface3d_demo3.pdf deleted file mode 100644 index 11a4bd2e81b..00000000000 Binary files a/dev/mpl_examples/mplot3d/surface3d_demo3.pdf and /dev/null differ diff --git a/dev/mpl_examples/mplot3d/surface3d_demo3.png b/dev/mpl_examples/mplot3d/surface3d_demo3.png deleted file mode 100644 index d6f718ee1b4..00000000000 Binary files a/dev/mpl_examples/mplot3d/surface3d_demo3.png and /dev/null differ diff --git a/dev/mpl_examples/mplot3d/surface3d_demo3.py b/dev/mpl_examples/mplot3d/surface3d_demo3.py deleted file mode 100644 index 5d4038f9438..00000000000 --- a/dev/mpl_examples/mplot3d/surface3d_demo3.py +++ /dev/null @@ -1,30 +0,0 @@ -from mpl_toolkits.mplot3d import Axes3D -from matplotlib import cm -from matplotlib.ticker import LinearLocator -import matplotlib.pyplot as plt -import numpy as np - -fig = plt.figure() -ax = fig.gca(projection='3d') -X = np.arange(-5, 5, 0.25) -xlen = len(X) -Y = np.arange(-5, 5, 0.25) -ylen = len(Y) -X, Y = np.meshgrid(X, Y) -R = np.sqrt(X**2 + Y**2) -Z = np.sin(R) - -colortuple = ('y', 'b') -colors = np.empty(X.shape, dtype=str) -for y in range(ylen): - for x in range(xlen): - colors[x, y] = colortuple[(x + y) % len(colortuple)] - -surf = ax.plot_surface(X, Y, Z, rstride=1, cstride=1, facecolors=colors, - linewidth=0, antialiased=False) - -ax.set_zlim3d(-1, 1) -ax.w_zaxis.set_major_locator(LinearLocator(6)) - -plt.show() - diff --git a/dev/mpl_examples/mplot3d/surface3d_radial_demo.hires.png b/dev/mpl_examples/mplot3d/surface3d_radial_demo.hires.png deleted file mode 100644 index 15729bb6800..00000000000 Binary files a/dev/mpl_examples/mplot3d/surface3d_radial_demo.hires.png and /dev/null differ diff --git a/dev/mpl_examples/mplot3d/surface3d_radial_demo.pdf b/dev/mpl_examples/mplot3d/surface3d_radial_demo.pdf deleted file mode 100644 index ad608fec75c..00000000000 Binary files a/dev/mpl_examples/mplot3d/surface3d_radial_demo.pdf and /dev/null differ diff --git a/dev/mpl_examples/mplot3d/surface3d_radial_demo.png b/dev/mpl_examples/mplot3d/surface3d_radial_demo.png deleted file mode 100644 index c380aa52c6f..00000000000 Binary files a/dev/mpl_examples/mplot3d/surface3d_radial_demo.png and /dev/null differ diff --git a/dev/mpl_examples/mplot3d/surface3d_radial_demo.py b/dev/mpl_examples/mplot3d/surface3d_radial_demo.py deleted file mode 100644 index 8b1088fcc01..00000000000 --- a/dev/mpl_examples/mplot3d/surface3d_radial_demo.py +++ /dev/null @@ -1,26 +0,0 @@ -# By Armin Moser - -from mpl_toolkits.mplot3d import Axes3D -import matplotlib -import numpy as np -from matplotlib import cm -from matplotlib import pyplot as plt -step = 0.04 -maxval = 1.0 -fig = plt.figure() -ax = fig.add_subplot(111, projection='3d') - -# create supporting points in polar coordinates -r = np.linspace(0,1.25,50) -p = np.linspace(0,2*np.pi,50) -R,P = np.meshgrid(r,p) -# transform them to cartesian system -X,Y = R*np.cos(P),R*np.sin(P) - -Z = ((R**2 - 1)**2) -ax.plot_surface(X, Y, Z, rstride=1, cstride=1, cmap=cm.YlGnBu_r) -ax.set_zlim3d(0, 1) -ax.set_xlabel(r'$\phi_\mathrm{real}$') -ax.set_ylabel(r'$\phi_\mathrm{im}$') -ax.set_zlabel(r'$V(\phi)$') -plt.show() diff --git a/dev/mpl_examples/mplot3d/text3d_demo.hires.png b/dev/mpl_examples/mplot3d/text3d_demo.hires.png deleted file mode 100644 index 88813b98d45..00000000000 Binary files a/dev/mpl_examples/mplot3d/text3d_demo.hires.png and /dev/null differ diff --git a/dev/mpl_examples/mplot3d/text3d_demo.pdf b/dev/mpl_examples/mplot3d/text3d_demo.pdf deleted file mode 100644 index ab5f8cb5e38..00000000000 Binary files a/dev/mpl_examples/mplot3d/text3d_demo.pdf and /dev/null differ diff --git a/dev/mpl_examples/mplot3d/text3d_demo.png b/dev/mpl_examples/mplot3d/text3d_demo.png deleted file mode 100644 index 81ca9ff2d26..00000000000 Binary files a/dev/mpl_examples/mplot3d/text3d_demo.png and /dev/null differ diff --git a/dev/mpl_examples/mplot3d/text3d_demo.py b/dev/mpl_examples/mplot3d/text3d_demo.py deleted file mode 100644 index da7e1a88d45..00000000000 --- a/dev/mpl_examples/mplot3d/text3d_demo.py +++ /dev/null @@ -1,28 +0,0 @@ -from mpl_toolkits.mplot3d import Axes3D -import matplotlib.pyplot as plt - -fig = plt.figure() -ax = fig.gca(projection='3d') - -zdirs = (None, 'x', 'y', 'z', (1, 1, 0), (1, 1, 1)) -xs = (2, 6, 4, 9, 7, 2) -ys = (6, 4, 8, 7, 2, 2) -zs = (4, 2, 5, 6, 1, 7) - -for zdir, x, y, z in zip(zdirs, xs, ys, zs): - label = '(%d, %d, %d), dir=%s' % (x, y, z, zdir) - ax.text(x, y, z, label, zdir) - -ax.text(1, 1, 1, "red", color='red') -ax.text2D(0.05, 0.95, "2D Text", transform=ax.transAxes) - -ax.set_xlim3d(0, 10) -ax.set_ylim3d(0, 10) -ax.set_zlim3d(0, 10) - -ax.set_xlabel('X axis') -ax.set_ylabel('Y axis') -ax.set_zlabel('Z axis') - -plt.show() - diff --git a/dev/mpl_examples/mplot3d/trisurf3d_demo.hires.png b/dev/mpl_examples/mplot3d/trisurf3d_demo.hires.png deleted file mode 100644 index bd01d85baeb..00000000000 Binary files a/dev/mpl_examples/mplot3d/trisurf3d_demo.hires.png and /dev/null differ diff --git a/dev/mpl_examples/mplot3d/trisurf3d_demo.pdf b/dev/mpl_examples/mplot3d/trisurf3d_demo.pdf deleted file mode 100644 index 7b437a2ea9c..00000000000 Binary files a/dev/mpl_examples/mplot3d/trisurf3d_demo.pdf and /dev/null differ diff --git a/dev/mpl_examples/mplot3d/trisurf3d_demo.png b/dev/mpl_examples/mplot3d/trisurf3d_demo.png deleted file mode 100644 index 39c2a58e30b..00000000000 Binary files a/dev/mpl_examples/mplot3d/trisurf3d_demo.png and /dev/null differ diff --git a/dev/mpl_examples/mplot3d/trisurf3d_demo.py b/dev/mpl_examples/mplot3d/trisurf3d_demo.py deleted file mode 100644 index dca39e9592c..00000000000 --- a/dev/mpl_examples/mplot3d/trisurf3d_demo.py +++ /dev/null @@ -1,32 +0,0 @@ -from mpl_toolkits.mplot3d import Axes3D -from matplotlib import cm -import matplotlib.pyplot as plt -import numpy as np - -n_angles = 36 -n_radii = 8 - -# An array of radii -# Does not include radius r=0, this is to eliminate duplicate points -radii = np.linspace(0.125, 1.0, n_radii) - -# An array of angles -angles = np.linspace(0, 2*np.pi, n_angles, endpoint=False) - -# Repeat all angles for each radius -angles = np.repeat(angles[...,np.newaxis], n_radii, axis=1) - -# Convert polar (radii, angles) coords to cartesian (x, y) coords -# (0, 0) is added here. There are no duplicate points in the (x, y) plane -x = np.append(0, (radii*np.cos(angles)).flatten()) -y = np.append(0, (radii*np.sin(angles)).flatten()) - -# Pringle surface -z = np.sin(-x*y) - -fig = plt.figure() -ax = fig.gca(projection='3d') - -ax.plot_trisurf(x, y, z, cmap=cm.jet, linewidth=0.2) - -plt.show() diff --git a/dev/mpl_examples/mplot3d/trisurf3d_demo2.py b/dev/mpl_examples/mplot3d/trisurf3d_demo2.py deleted file mode 100644 index bb86564ca8e..00000000000 --- a/dev/mpl_examples/mplot3d/trisurf3d_demo2.py +++ /dev/null @@ -1,55 +0,0 @@ -import numpy as np -import matplotlib.pyplot as plt -from mpl_toolkits.mplot3d import Axes3D -import matplotlib.tri as mtri - -# u, v are parameterisation variables -u = (np.linspace(0, 2.0 * np.pi, endpoint=True, num=50) * np.ones((10, 1))).flatten() -v = np.repeat(np.linspace(-0.5, 0.5, endpoint=True, num=10), repeats=50).flatten() - -# This is the Mobius mapping, taking a u, v pair and returning an x, y, z -# triple -x = (1 + 0.5 * v * np.cos(u / 2.0)) * np.cos(u) -y = (1 + 0.5 * v * np.cos(u / 2.0)) * np.sin(u) -z = 0.5 * v * np.sin(u / 2.0) - -# Triangulate parameter space to determine the triangles -tri = mtri.Triangulation(u, v) - -fig = plt.figure() -ax = fig.add_subplot(1, 1, 1, projection='3d') - -# The triangles in parameter space determine which x, y, z points are -# connected by an edge -ax.plot_trisurf(x, y, z, triangles=tri.triangles, cmap=plt.cm.Spectral) - -ax.set_zlim(-1, 1) - -# First create the x and y coordinates of the points. -n_angles = 36 -n_radii = 8 -min_radius = 0.25 -radii = np.linspace(min_radius, 0.95, n_radii) - -angles = np.linspace(0, 2*np.pi, n_angles, endpoint=False) -angles = np.repeat(angles[...,np.newaxis], n_radii, axis=1) -angles[:,1::2] += np.pi/n_angles - -x = (radii*np.cos(angles)).flatten() -y = (radii*np.sin(angles)).flatten() -z = (np.cos(radii)*np.cos(angles*3.0)).flatten() - -# Create the Triangulation; no triangles so Delaunay triangulation created. -triang = mtri.Triangulation(x, y) - -# Mask off unwanted triangles. -xmid = x[triang.triangles].mean(axis=1) -ymid = y[triang.triangles].mean(axis=1) -mask = np.where(xmid*xmid + ymid*ymid < min_radius*min_radius, 1, 0) -triang.set_mask(mask) - -# tripcolor plot. -fig = plt.figure() -ax = fig.add_subplot(1, 1, 1, projection='3d') -ax.plot_trisurf(triang, z, cmap=plt.cm.CMRmap) -plt.show() diff --git a/dev/mpl_examples/mplot3d/trisurf3d_demo2_00.hires.png b/dev/mpl_examples/mplot3d/trisurf3d_demo2_00.hires.png deleted file mode 100644 index f88e120b2f8..00000000000 Binary files a/dev/mpl_examples/mplot3d/trisurf3d_demo2_00.hires.png and /dev/null differ diff --git a/dev/mpl_examples/mplot3d/trisurf3d_demo2_00.pdf b/dev/mpl_examples/mplot3d/trisurf3d_demo2_00.pdf deleted file mode 100644 index c5289d5cd9c..00000000000 Binary files a/dev/mpl_examples/mplot3d/trisurf3d_demo2_00.pdf and /dev/null differ diff --git a/dev/mpl_examples/mplot3d/trisurf3d_demo2_00.png b/dev/mpl_examples/mplot3d/trisurf3d_demo2_00.png deleted file mode 100644 index 0bd12808728..00000000000 Binary files a/dev/mpl_examples/mplot3d/trisurf3d_demo2_00.png and /dev/null differ diff --git a/dev/mpl_examples/mplot3d/trisurf3d_demo2_01.hires.png b/dev/mpl_examples/mplot3d/trisurf3d_demo2_01.hires.png deleted file mode 100644 index 7dc8484e6b0..00000000000 Binary files a/dev/mpl_examples/mplot3d/trisurf3d_demo2_01.hires.png and /dev/null differ diff --git a/dev/mpl_examples/mplot3d/trisurf3d_demo2_01.pdf b/dev/mpl_examples/mplot3d/trisurf3d_demo2_01.pdf deleted file mode 100644 index 8c5015a5197..00000000000 Binary files a/dev/mpl_examples/mplot3d/trisurf3d_demo2_01.pdf and /dev/null differ diff --git a/dev/mpl_examples/mplot3d/trisurf3d_demo2_01.png b/dev/mpl_examples/mplot3d/trisurf3d_demo2_01.png deleted file mode 100644 index ce2f11d2692..00000000000 Binary files a/dev/mpl_examples/mplot3d/trisurf3d_demo2_01.png and /dev/null differ diff --git a/dev/mpl_examples/mplot3d/wire3d_animation_demo.hires.png b/dev/mpl_examples/mplot3d/wire3d_animation_demo.hires.png deleted file mode 100644 index 1cb055880da..00000000000 Binary files a/dev/mpl_examples/mplot3d/wire3d_animation_demo.hires.png and /dev/null differ diff --git a/dev/mpl_examples/mplot3d/wire3d_animation_demo.pdf b/dev/mpl_examples/mplot3d/wire3d_animation_demo.pdf deleted file mode 100644 index 544800a20e4..00000000000 Binary files a/dev/mpl_examples/mplot3d/wire3d_animation_demo.pdf and /dev/null differ diff --git a/dev/mpl_examples/mplot3d/wire3d_animation_demo.png b/dev/mpl_examples/mplot3d/wire3d_animation_demo.png deleted file mode 100644 index b7ed7c6cf50..00000000000 Binary files a/dev/mpl_examples/mplot3d/wire3d_animation_demo.png and /dev/null differ diff --git a/dev/mpl_examples/mplot3d/wire3d_animation_demo.py b/dev/mpl_examples/mplot3d/wire3d_animation_demo.py deleted file mode 100644 index aeaf2d56743..00000000000 --- a/dev/mpl_examples/mplot3d/wire3d_animation_demo.py +++ /dev/null @@ -1,38 +0,0 @@ -from __future__ import print_function -""" -A very simple 'animation' of a 3D plot -""" -from mpl_toolkits.mplot3d import axes3d -import matplotlib.pyplot as plt -import numpy as np -import time - -def generate(X, Y, phi): - R = 1 - np.sqrt(X**2 + Y**2) - return np.cos(2 * np.pi * X + phi) * R - -plt.ion() -fig = plt.figure() -ax = fig.add_subplot(111, projection='3d') - -xs = np.linspace(-1, 1, 50) -ys = np.linspace(-1, 1, 50) -X, Y = np.meshgrid(xs, ys) -Z = generate(X, Y, 0.0) - -wframe = None -tstart = time.time() -for phi in np.linspace(0, 360 / 2 / np.pi, 100): - - oldcol = wframe - - Z = generate(X, Y, phi) - wframe = ax.plot_wireframe(X, Y, Z, rstride=2, cstride=2) - - # Remove old line collection before drawing - if oldcol is not None: - ax.collections.remove(oldcol) - - plt.draw() - -print ('FPS: %f' % (100 / (time.time() - tstart))) diff --git a/dev/mpl_examples/mplot3d/wire3d_demo.hires.png b/dev/mpl_examples/mplot3d/wire3d_demo.hires.png deleted file mode 100644 index 2cecaf0026e..00000000000 Binary files a/dev/mpl_examples/mplot3d/wire3d_demo.hires.png and /dev/null differ diff --git a/dev/mpl_examples/mplot3d/wire3d_demo.pdf b/dev/mpl_examples/mplot3d/wire3d_demo.pdf deleted file mode 100644 index 26240cce3bb..00000000000 Binary files a/dev/mpl_examples/mplot3d/wire3d_demo.pdf and /dev/null differ diff --git a/dev/mpl_examples/mplot3d/wire3d_demo.png b/dev/mpl_examples/mplot3d/wire3d_demo.png deleted file mode 100644 index 926bcf4b0fd..00000000000 Binary files a/dev/mpl_examples/mplot3d/wire3d_demo.png and /dev/null differ diff --git a/dev/mpl_examples/mplot3d/wire3d_demo.py b/dev/mpl_examples/mplot3d/wire3d_demo.py deleted file mode 100644 index 8bb749738c8..00000000000 --- a/dev/mpl_examples/mplot3d/wire3d_demo.py +++ /dev/null @@ -1,11 +0,0 @@ -from mpl_toolkits.mplot3d import axes3d -import matplotlib.pyplot as plt -import numpy as np - -fig = plt.figure() -ax = fig.add_subplot(111, projection='3d') -X, Y, Z = axes3d.get_test_data(0.05) -ax.plot_wireframe(X, Y, Z, rstride=10, cstride=10) - -plt.show() - diff --git a/dev/mpl_examples/pie_and_polar_charts/pie_demo_features.hires.png b/dev/mpl_examples/pie_and_polar_charts/pie_demo_features.hires.png deleted file mode 100644 index f0da969cd32..00000000000 Binary files a/dev/mpl_examples/pie_and_polar_charts/pie_demo_features.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pie_and_polar_charts/pie_demo_features.pdf b/dev/mpl_examples/pie_and_polar_charts/pie_demo_features.pdf deleted file mode 100644 index 50b3a3360a5..00000000000 Binary files a/dev/mpl_examples/pie_and_polar_charts/pie_demo_features.pdf and /dev/null differ diff --git a/dev/mpl_examples/pie_and_polar_charts/pie_demo_features.png b/dev/mpl_examples/pie_and_polar_charts/pie_demo_features.png deleted file mode 100644 index 838f93654f1..00000000000 Binary files a/dev/mpl_examples/pie_and_polar_charts/pie_demo_features.png and /dev/null differ diff --git a/dev/mpl_examples/pie_and_polar_charts/pie_demo_features.py b/dev/mpl_examples/pie_and_polar_charts/pie_demo_features.py deleted file mode 100644 index 763d38461ae..00000000000 --- a/dev/mpl_examples/pie_and_polar_charts/pie_demo_features.py +++ /dev/null @@ -1,32 +0,0 @@ -""" -Demo of a basic pie chart plus a few additional features. - -In addition to the basic pie chart, this demo shows a few optional features: - - * slice labels - * auto-labeling the percentage - * offsetting a slice with "explode" - * drop-shadow - * custom start angle - -Note about the custom start angle: - -The default ``startangle`` is 0, which would start the "Frogs" slice on the -positive x-axis. This example sets ``startangle = 90`` such that everything is -rotated counter-clockwise by 90 degrees, and the frog slice starts on the -positive y-axis. -""" -import matplotlib.pyplot as plt - - -# The slices will be ordered and plotted counter-clockwise. -labels = 'Frogs', 'Hogs', 'Dogs', 'Logs' -sizes = [15, 30, 45, 10] -colors = ['yellowgreen', 'gold', 'lightskyblue', 'lightcoral'] -explode = (0, 0.1, 0, 0) # only "explode" the 2nd slice (i.e. 'Hogs') - -plt.pie(sizes, explode=explode, labels=labels, colors=colors, - autopct='%1.1f%%', shadow=True, startangle=90) -# Set aspect ratio to be equal so that pie is drawn as a circle. -plt.axis('equal') -plt.show() diff --git a/dev/mpl_examples/pie_and_polar_charts/polar_bar_demo.hires.png b/dev/mpl_examples/pie_and_polar_charts/polar_bar_demo.hires.png deleted file mode 100644 index d2e322bd6f7..00000000000 Binary files a/dev/mpl_examples/pie_and_polar_charts/polar_bar_demo.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pie_and_polar_charts/polar_bar_demo.pdf b/dev/mpl_examples/pie_and_polar_charts/polar_bar_demo.pdf deleted file mode 100644 index 729fc2e5dea..00000000000 Binary files a/dev/mpl_examples/pie_and_polar_charts/polar_bar_demo.pdf and /dev/null differ diff --git a/dev/mpl_examples/pie_and_polar_charts/polar_bar_demo.png b/dev/mpl_examples/pie_and_polar_charts/polar_bar_demo.png deleted file mode 100644 index 50f9004d1c0..00000000000 Binary files a/dev/mpl_examples/pie_and_polar_charts/polar_bar_demo.png and /dev/null differ diff --git a/dev/mpl_examples/pie_and_polar_charts/polar_bar_demo.py b/dev/mpl_examples/pie_and_polar_charts/polar_bar_demo.py deleted file mode 100644 index 459dd6f958f..00000000000 --- a/dev/mpl_examples/pie_and_polar_charts/polar_bar_demo.py +++ /dev/null @@ -1,21 +0,0 @@ -""" -Demo of bar plot on a polar axis. -""" -import numpy as np -import matplotlib.pyplot as plt - - -N = 20 -theta = np.linspace(0.0, 2 * np.pi, N, endpoint=False) -radii = 10 * np.random.rand(N) -width = np.pi / 4 * np.random.rand(N) - -ax = plt.subplot(111, polar=True) -bars = ax.bar(theta, radii, width=width, bottom=0.0) - -# Use custom colors and opacity -for r, bar in zip(radii, bars): - bar.set_facecolor(plt.cm.jet(r / 10.)) - bar.set_alpha(0.5) - -plt.show() diff --git a/dev/mpl_examples/pie_and_polar_charts/polar_scatter_demo.hires.png b/dev/mpl_examples/pie_and_polar_charts/polar_scatter_demo.hires.png deleted file mode 100644 index 6c69df5ebbd..00000000000 Binary files a/dev/mpl_examples/pie_and_polar_charts/polar_scatter_demo.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pie_and_polar_charts/polar_scatter_demo.pdf b/dev/mpl_examples/pie_and_polar_charts/polar_scatter_demo.pdf deleted file mode 100644 index fa3bb64d941..00000000000 Binary files a/dev/mpl_examples/pie_and_polar_charts/polar_scatter_demo.pdf and /dev/null differ diff --git a/dev/mpl_examples/pie_and_polar_charts/polar_scatter_demo.png b/dev/mpl_examples/pie_and_polar_charts/polar_scatter_demo.png deleted file mode 100644 index 961c476bcec..00000000000 Binary files a/dev/mpl_examples/pie_and_polar_charts/polar_scatter_demo.png and /dev/null differ diff --git a/dev/mpl_examples/pie_and_polar_charts/polar_scatter_demo.py b/dev/mpl_examples/pie_and_polar_charts/polar_scatter_demo.py deleted file mode 100644 index 90eea4e2b3a..00000000000 --- a/dev/mpl_examples/pie_and_polar_charts/polar_scatter_demo.py +++ /dev/null @@ -1,21 +0,0 @@ -""" -Demo of scatter plot on a polar axis. - -Size increases radially in this example and color increases with angle (just to -verify the symbols are being scattered correctly). -""" -import numpy as np -import matplotlib.pyplot as plt - - -N = 150 -r = 2 * np.random.rand(N) -theta = 2 * np.pi * np.random.rand(N) -area = 200 * r**2 * np.random.rand(N) -colors = theta - -ax = plt.subplot(111, polar=True) -c = plt.scatter(theta, r, c=colors, s=area, cmap=plt.cm.hsv) -c.set_alpha(0.75) - -plt.show() diff --git a/dev/mpl_examples/pylab_examples/accented_text.hires.png b/dev/mpl_examples/pylab_examples/accented_text.hires.png deleted file mode 100644 index fdf54068878..00000000000 Binary files a/dev/mpl_examples/pylab_examples/accented_text.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/accented_text.pdf b/dev/mpl_examples/pylab_examples/accented_text.pdf deleted file mode 100644 index fd4dde79e0a..00000000000 Binary files a/dev/mpl_examples/pylab_examples/accented_text.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/accented_text.png b/dev/mpl_examples/pylab_examples/accented_text.png deleted file mode 100644 index 3a01508ec6a..00000000000 Binary files a/dev/mpl_examples/pylab_examples/accented_text.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/accented_text.py b/dev/mpl_examples/pylab_examples/accented_text.py deleted file mode 100644 index 1482622f389..00000000000 --- a/dev/mpl_examples/pylab_examples/accented_text.py +++ /dev/null @@ -1,22 +0,0 @@ -#!/usr/bin/env python -""" -matplotlib supports accented characters via TeX mathtext - -The following accents are provided: \hat, \breve, \grave, \bar, -\acute, \tilde, \vec, \dot, \ddot. All of them have the same syntax, -eg to make an overbar you do \bar{o} or to make an o umlaut you do -\ddot{o}. The shortcuts are also provided, eg: \"o \'e \`e \~n \.x -\^y - -""" -from pylab import * - -axes([0.1, 0.15, 0.8, 0.75]) -plot(range(10)) - -title(r'$\ddot{o}\acute{e}\grave{e}\hat{O}\breve{i}\bar{A}\tilde{n}\vec{q}$', fontsize=20) -# shorthand is also supported and curly's are optional -xlabel(r"""$\"o\ddot o \'e\`e\~n\.x\^y$""", fontsize=20) - - -show() diff --git a/dev/mpl_examples/pylab_examples/agg_buffer_to_array.py b/dev/mpl_examples/pylab_examples/agg_buffer_to_array.py deleted file mode 100644 index a391fb2ca7c..00000000000 --- a/dev/mpl_examples/pylab_examples/agg_buffer_to_array.py +++ /dev/null @@ -1,24 +0,0 @@ -import matplotlib -from pylab import figure, show -import numpy as np - -# make an agg figure -fig = figure() -ax = fig.add_subplot(111) -ax.plot([1,2,3]) -ax.set_title('a simple figure') -fig.canvas.draw() - -# grab the pixel buffer and dump it into a numpy array -buf = fig.canvas.buffer_rgba() -l, b, w, h = fig.bbox.bounds -# The array needs to be copied, because the underlying buffer -# may be reallocated when the window is resized. -X = np.frombuffer(buf, np.uint8).copy() -X.shape = h,w,4 - -# now display the array X as an Axes in a new figure -fig2 = figure() -ax2 = fig2.add_subplot(111, frameon=False) -ax2.imshow(X) -show() diff --git a/dev/mpl_examples/pylab_examples/agg_buffer_to_array_00.hires.png b/dev/mpl_examples/pylab_examples/agg_buffer_to_array_00.hires.png deleted file mode 100644 index bf919d9c474..00000000000 Binary files a/dev/mpl_examples/pylab_examples/agg_buffer_to_array_00.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/agg_buffer_to_array_00.pdf b/dev/mpl_examples/pylab_examples/agg_buffer_to_array_00.pdf deleted file mode 100644 index b4ff3cdd100..00000000000 Binary files a/dev/mpl_examples/pylab_examples/agg_buffer_to_array_00.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/agg_buffer_to_array_00.png b/dev/mpl_examples/pylab_examples/agg_buffer_to_array_00.png deleted file mode 100644 index 93f7a61d9dd..00000000000 Binary files a/dev/mpl_examples/pylab_examples/agg_buffer_to_array_00.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/agg_buffer_to_array_01.hires.png b/dev/mpl_examples/pylab_examples/agg_buffer_to_array_01.hires.png deleted file mode 100644 index 66a1c2bf968..00000000000 Binary files a/dev/mpl_examples/pylab_examples/agg_buffer_to_array_01.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/agg_buffer_to_array_01.pdf b/dev/mpl_examples/pylab_examples/agg_buffer_to_array_01.pdf deleted file mode 100644 index 6587e5f2cb2..00000000000 Binary files a/dev/mpl_examples/pylab_examples/agg_buffer_to_array_01.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/agg_buffer_to_array_01.png b/dev/mpl_examples/pylab_examples/agg_buffer_to_array_01.png deleted file mode 100644 index ea4d5f5aa9d..00000000000 Binary files a/dev/mpl_examples/pylab_examples/agg_buffer_to_array_01.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/alignment_test.hires.png b/dev/mpl_examples/pylab_examples/alignment_test.hires.png deleted file mode 100644 index 20ff8924324..00000000000 Binary files a/dev/mpl_examples/pylab_examples/alignment_test.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/alignment_test.pdf b/dev/mpl_examples/pylab_examples/alignment_test.pdf deleted file mode 100644 index b3308cc94e5..00000000000 Binary files a/dev/mpl_examples/pylab_examples/alignment_test.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/alignment_test.png b/dev/mpl_examples/pylab_examples/alignment_test.png deleted file mode 100644 index 7f790a32843..00000000000 Binary files a/dev/mpl_examples/pylab_examples/alignment_test.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/alignment_test.py b/dev/mpl_examples/pylab_examples/alignment_test.py deleted file mode 100644 index 1dd83d5d4f5..00000000000 --- a/dev/mpl_examples/pylab_examples/alignment_test.py +++ /dev/null @@ -1,82 +0,0 @@ -#!/usr/bin/env python -""" -You can precisely layout text in data or axes (0,1) coordinates. This -example shows you some of the alignment and rotation specifications to -layout text -""" - -from pylab import * -from matplotlib.lines import Line2D -from matplotlib.patches import Rectangle - -# build a rectangle in axes coords -left, width = .25, .5 -bottom, height = .25, .5 -right = left + width -top = bottom + height -ax = gca() -p = Rectangle((left, bottom), width, height, - fill=False, - ) -p.set_transform(ax.transAxes) -p.set_clip_on(False) -ax.add_patch(p) - - -ax.text(left, bottom, 'left top', - horizontalalignment='left', - verticalalignment='top', - transform=ax.transAxes) - -ax.text(left, bottom, 'left bottom', - horizontalalignment='left', - verticalalignment='bottom', - transform=ax.transAxes) - -ax.text(right, top, 'right bottom', - horizontalalignment='right', - verticalalignment='bottom', - transform=ax.transAxes) - -ax.text(right, top, 'right top', - horizontalalignment='right', - verticalalignment='top', - transform=ax.transAxes) - -ax.text(right, bottom, 'center top', - horizontalalignment='center', - verticalalignment='top', - transform=ax.transAxes) - -ax.text(left, 0.5*(bottom+top), 'right center', - horizontalalignment='right', - verticalalignment='center', - rotation='vertical', - transform=ax.transAxes) - -ax.text(left, 0.5*(bottom+top), 'left center', - horizontalalignment='left', - verticalalignment='center', - rotation='vertical', - transform=ax.transAxes) - -ax.text(0.5*(left+right), 0.5*(bottom+top), 'middle', - horizontalalignment='center', - verticalalignment='center', - transform=ax.transAxes) - -ax.text(right, 0.5*(bottom+top), 'centered', - horizontalalignment='center', - verticalalignment='center', - rotation='vertical', - transform=ax.transAxes) - -ax.text(left, top, 'rotated\nwith newlines', - horizontalalignment='center', - verticalalignment='center', - rotation=45, - transform=ax.transAxes) - -axis('off') - -show() diff --git a/dev/mpl_examples/pylab_examples/anchored_artists.hires.png b/dev/mpl_examples/pylab_examples/anchored_artists.hires.png deleted file mode 100644 index 7ec6b56ace1..00000000000 Binary files a/dev/mpl_examples/pylab_examples/anchored_artists.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/anchored_artists.pdf b/dev/mpl_examples/pylab_examples/anchored_artists.pdf deleted file mode 100644 index fb2459f4560..00000000000 Binary files a/dev/mpl_examples/pylab_examples/anchored_artists.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/anchored_artists.png b/dev/mpl_examples/pylab_examples/anchored_artists.png deleted file mode 100644 index 7f4a17c589b..00000000000 Binary files a/dev/mpl_examples/pylab_examples/anchored_artists.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/anchored_artists.py b/dev/mpl_examples/pylab_examples/anchored_artists.py deleted file mode 100644 index 946f07c9af3..00000000000 --- a/dev/mpl_examples/pylab_examples/anchored_artists.py +++ /dev/null @@ -1,117 +0,0 @@ -from matplotlib.patches import Rectangle, Ellipse - -from matplotlib.offsetbox import AnchoredOffsetbox, AuxTransformBox, VPacker,\ - TextArea, DrawingArea - - -class AnchoredText(AnchoredOffsetbox): - def __init__(self, s, loc, pad=0.4, borderpad=0.5, prop=None, frameon=True): - - self.txt = TextArea(s, - minimumdescent=False) - - - super(AnchoredText, self).__init__(loc, pad=pad, borderpad=borderpad, - child=self.txt, - prop=prop, - frameon=frameon) - - -class AnchoredSizeBar(AnchoredOffsetbox): - def __init__(self, transform, size, label, loc, - pad=0.1, borderpad=0.1, sep=2, prop=None, frameon=True): - """ - Draw a horizontal bar with the size in data coordinate of the give axes. - A label will be drawn underneath (center-aligned). - - pad, borderpad in fraction of the legend font size (or prop) - sep in points. - """ - self.size_bar = AuxTransformBox(transform) - self.size_bar.add_artist(Rectangle((0,0), size, 0, fc="none")) - - self.txt_label = TextArea(label, minimumdescent=False) - - self._box = VPacker(children=[self.size_bar, self.txt_label], - align="center", - pad=0, sep=sep) - - AnchoredOffsetbox.__init__(self, loc, pad=pad, borderpad=borderpad, - child=self._box, - prop=prop, - frameon=frameon) - - -class AnchoredEllipse(AnchoredOffsetbox): - def __init__(self, transform, width, height, angle, loc, - pad=0.1, borderpad=0.1, prop=None, frameon=True): - """ - Draw an ellipse the size in data coordinate of the give axes. - - pad, borderpad in fraction of the legend font size (or prop) - """ - self._box = AuxTransformBox(transform) - self.ellipse = Ellipse((0,0), width, height, angle) - self._box.add_artist(self.ellipse) - - AnchoredOffsetbox.__init__(self, loc, pad=pad, borderpad=borderpad, - child=self._box, - prop=prop, - frameon=frameon) - - - -class AnchoredDrawingArea(AnchoredOffsetbox): - def __init__(self, width, height, xdescent, ydescent, - loc, pad=0.4, borderpad=0.5, prop=None, frameon=True): - - self.da = DrawingArea(width, height, xdescent, ydescent, clip=True) - - super(AnchoredDrawingArea, self).__init__(loc, pad=pad, borderpad=borderpad, - child=self.da, - prop=None, - frameon=frameon) - - - -if __name__ == "__main__": - - import matplotlib.pyplot as plt - - ax = plt.gca() - ax.set_aspect(1.) - - at = AnchoredText("Figure 1a", - loc=2, frameon=True) - at.patch.set_boxstyle("round,pad=0.,rounding_size=0.2") - ax.add_artist(at) - - 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) - - # 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) - - # 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) - - plt.draw() - plt.show() - - - - diff --git a/dev/mpl_examples/pylab_examples/animation_demo.hires.png b/dev/mpl_examples/pylab_examples/animation_demo.hires.png deleted file mode 100644 index 8ed85469726..00000000000 Binary files a/dev/mpl_examples/pylab_examples/animation_demo.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/animation_demo.pdf b/dev/mpl_examples/pylab_examples/animation_demo.pdf deleted file mode 100644 index e6275e8f667..00000000000 Binary files a/dev/mpl_examples/pylab_examples/animation_demo.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/animation_demo.png b/dev/mpl_examples/pylab_examples/animation_demo.png deleted file mode 100644 index c71e3b52345..00000000000 Binary files a/dev/mpl_examples/pylab_examples/animation_demo.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/animation_demo.py b/dev/mpl_examples/pylab_examples/animation_demo.py deleted file mode 100644 index 13a5649ee20..00000000000 --- a/dev/mpl_examples/pylab_examples/animation_demo.py +++ /dev/null @@ -1,27 +0,0 @@ -""" -Pyplot animation example. - -The method shown here is only for very simple, low-performance -use. For more demanding applications, look at the animation -module and the examples that use it. -""" - -import matplotlib.pyplot as plt -import numpy as np - -x = np.arange(6) -y = np.arange(5) -z = x * y[:,np.newaxis] - -for i in xrange(5): - if i==0: - p = plt.imshow(z) - fig = plt.gcf() - plt.clim() # clamp the color limits - plt.title("Boring slide show") - else: - z = z + 2 - p.set_data(z) - - print("step", i) - plt.pause(0.5) diff --git a/dev/mpl_examples/pylab_examples/annotation_demo.py b/dev/mpl_examples/pylab_examples/annotation_demo.py deleted file mode 100644 index 913b3a0d982..00000000000 --- a/dev/mpl_examples/pylab_examples/annotation_demo.py +++ /dev/null @@ -1,141 +0,0 @@ -""" -Some examples of how to annotate points in figures. You specify an -annotation point xy=(x,y) and a text point xytext=(x,y) for the -annotated points and text location, respectively. Optionally, you can -specify the coordinate system of xy and xytext with one of the -following strings for xycoords and textcoords (default is 'data') - - - 'figure points' : points from the lower left corner of the figure - 'figure pixels' : pixels from the lower left corner of the figure - 'figure fraction' : 0,0 is lower left of figure and 1,1 is upper, right - 'axes points' : points from lower left corner of axes - 'axes pixels' : pixels from lower left corner of axes - 'axes fraction' : 0,1 is lower left of axes and 1,1 is upper right - 'offset points' : Specify an offset (in points) from the xy value - 'data' : use the axes data coordinate system - -Optionally, you can specify arrow properties which draws and arrow -from the text to the annotated point by giving a dictionary of arrow -properties - -Valid keys are - - width : the width of the arrow in points - frac : the fraction of the arrow length occupied by the head - headwidth : the width of the base of the arrow head in points - shrink : move the tip and base some percent away from the - annotated point and text - any key for matplotlib.patches.polygon (eg facecolor) - -For physical coordinate systems (points or pixels) the origin is the -(bottom, left) of the figure or axes. If the value is negative, -however, the origin is from the (right, top) of the figure or axes, -analogous to negative indexing of sequences. -""" - - -from matplotlib.pyplot import figure, show -from matplotlib.patches import Ellipse -import numpy as np - - -if 1: - # if only one location is given, the text and xypoint being - # annotated are assumed to be the same - fig = figure() - ax = fig.add_subplot(111, autoscale_on=False, xlim=(-1,5), ylim=(-3,5)) - - t = np.arange(0.0, 5.0, 0.01) - s = np.cos(2*np.pi*t) - line, = ax.plot(t, s, lw=3, color='purple') - - ax.annotate('axes center', xy=(.5, .5), xycoords='axes fraction', - horizontalalignment='center', verticalalignment='center') - - ax.annotate('pixels', xy=(20, 20), xycoords='figure pixels') - - ax.annotate('points', xy=(100, 300), xycoords='figure points') - - ax.annotate('offset', xy=(1, 1), xycoords='data', - xytext=(-15, 10), textcoords='offset points', - arrowprops=dict(facecolor='black', shrink=0.05), - horizontalalignment='right', verticalalignment='bottom', - ) - - ax.annotate('local max', xy=(3, 1), xycoords='data', - xytext=(0.8, 0.95), textcoords='axes fraction', - arrowprops=dict(facecolor='black', shrink=0.05), - horizontalalignment='right', verticalalignment='top', - ) - - ax.annotate('a fractional title', xy=(.025, .975), - xycoords='figure fraction', - horizontalalignment='left', verticalalignment='top', - fontsize=20) - - # use negative points or pixels to specify from right, top -10, 10 - # is 10 points to the left of the right side of the axes and 10 - # points above the bottom - ax.annotate('bottom right (points)', xy=(-10, 10), - xycoords='axes points', - horizontalalignment='right', verticalalignment='bottom', - fontsize=20) - - -if 1: - # you can specify the xypoint and the xytext in different - # positions and coordinate systems, and optionally turn on a - # connecting line and mark the point with a marker. Annotations - # work on polar axes too. In the example below, the xy point is - # in native coordinates (xycoords defaults to 'data'). For a - # polar axes, this is in (theta, radius) space. The text in this - # example is placed in the fractional figure coordinate system. - # Text keyword args like horizontal and vertical alignment are - # respected - fig = figure() - ax = fig.add_subplot(111, polar=True) - r = np.arange(0,1,0.001) - theta = 2*2*np.pi*r - line, = ax.plot(theta, r, color='#ee8d18', lw=3) - - ind = 800 - thisr, thistheta = r[ind], theta[ind] - ax.plot([thistheta], [thisr], 'o') - ax.annotate('a polar annotation', - xy=(thistheta, thisr), # theta, radius - xytext=(0.05, 0.05), # fraction, fraction - textcoords='figure fraction', - arrowprops=dict(facecolor='black', shrink=0.05), - horizontalalignment='left', - verticalalignment='bottom', - ) - - -if 1: - # You can also use polar notation on a cartesian axes. Here the - # native coordinate system ('data') is cartesian, so you need to - # specify the xycoords and textcoords as 'polar' if you want to - # use (theta, radius) - - el = Ellipse((0,0), 10, 20, facecolor='r', alpha=0.5) - - fig = figure() - ax = fig.add_subplot(111, aspect='equal') - ax.add_artist(el) - el.set_clip_box(ax.bbox) - ax.annotate('the top', - xy=(np.pi/2., 10.), # theta, radius - xytext=(np.pi/3, 20.), # theta, radius - xycoords='polar', - textcoords='polar', - arrowprops=dict(facecolor='black', shrink=0.05), - horizontalalignment='left', - verticalalignment='bottom', - clip_on=True, # clip to the axes bounding box - ) - - ax.set_xlim(-20, 20) - ax.set_ylim(-20, 20) - -show() diff --git a/dev/mpl_examples/pylab_examples/annotation_demo2.py b/dev/mpl_examples/pylab_examples/annotation_demo2.py deleted file mode 100644 index b3fd99ed6b8..00000000000 --- a/dev/mpl_examples/pylab_examples/annotation_demo2.py +++ /dev/null @@ -1,156 +0,0 @@ - -from matplotlib.pyplot import figure, show -from matplotlib.patches import Ellipse -import numpy as np - -if 1: - fig = figure(1,figsize=(8,5)) - ax = fig.add_subplot(111, autoscale_on=False, xlim=(-1,5), ylim=(-4,3)) - - t = np.arange(0.0, 5.0, 0.01) - s = np.cos(2*np.pi*t) - line, = ax.plot(t, s, lw=3, color='purple') - - ax.annotate('arrowstyle', xy=(0, 1), xycoords='data', - xytext=(-50, 30), textcoords='offset points', - arrowprops=dict(arrowstyle="->") - ) - - ax.annotate('arc3', xy=(0.5, -1), xycoords='data', - xytext=(-30, -30), textcoords='offset points', - arrowprops=dict(arrowstyle="->", - connectionstyle="arc3,rad=.2") - ) - - ax.annotate('arc', xy=(1., 1), xycoords='data', - xytext=(-40, 30), textcoords='offset points', - arrowprops=dict(arrowstyle="->", - connectionstyle="arc,angleA=0,armA=30,rad=10"), - ) - - ax.annotate('arc', xy=(1.5, -1), xycoords='data', - xytext=(-40, -30), textcoords='offset points', - arrowprops=dict(arrowstyle="->", - connectionstyle="arc,angleA=0,armA=20,angleB=-90,armB=15,rad=7"), - ) - - ax.annotate('angle', xy=(2., 1), xycoords='data', - xytext=(-50, 30), textcoords='offset points', - arrowprops=dict(arrowstyle="->", - connectionstyle="angle,angleA=0,angleB=90,rad=10"), - ) - - ax.annotate('angle3', xy=(2.5, -1), xycoords='data', - xytext=(-50, -30), textcoords='offset points', - arrowprops=dict(arrowstyle="->", - connectionstyle="angle3,angleA=0,angleB=-90"), - ) - - - ax.annotate('angle', xy=(3., 1), xycoords='data', - xytext=(-50, 30), textcoords='offset points', - bbox=dict(boxstyle="round", fc="0.8"), - arrowprops=dict(arrowstyle="->", - connectionstyle="angle,angleA=0,angleB=90,rad=10"), - ) - - ax.annotate('angle', xy=(3.5, -1), xycoords='data', - xytext=(-70, -60), textcoords='offset points', - size=20, - bbox=dict(boxstyle="round4,pad=.5", fc="0.8"), - arrowprops=dict(arrowstyle="->", - connectionstyle="angle,angleA=0,angleB=-90,rad=10"), - ) - - ax.annotate('angle', xy=(4., 1), xycoords='data', - xytext=(-50, 30), textcoords='offset points', - bbox=dict(boxstyle="round", fc="0.8"), - arrowprops=dict(arrowstyle="->", - shrinkA=0, shrinkB=10, - connectionstyle="angle,angleA=0,angleB=90,rad=10"), - ) - - - ann = ax.annotate('', xy=(4., 1.), xycoords='data', - xytext=(4.5, -1), textcoords='data', - arrowprops=dict(arrowstyle="<->", - connectionstyle="bar", - ec="k", - shrinkA=5, shrinkB=5, - ) - ) - - -if 1: - fig = figure(2) - fig.clf() - ax = fig.add_subplot(111, autoscale_on=False, xlim=(-1,5), ylim=(-5,3)) - - el = Ellipse((2, -1), 0.5, 0.5) - ax.add_patch(el) - - ax.annotate('$->$', xy=(2., -1), xycoords='data', - xytext=(-150, -140), textcoords='offset points', - bbox=dict(boxstyle="round", fc="0.8"), - arrowprops=dict(arrowstyle="->", - patchB=el, - connectionstyle="angle,angleA=90,angleB=0,rad=10"), - ) - - ax.annotate('fancy', xy=(2., -1), xycoords='data', - xytext=(-100, 60), textcoords='offset points', - size=20, - #bbox=dict(boxstyle="round", fc="0.8"), - arrowprops=dict(arrowstyle="fancy", - fc="0.6", ec="none", - patchB=el, - connectionstyle="angle3,angleA=0,angleB=-90"), - ) - - ax.annotate('simple', xy=(2., -1), xycoords='data', - xytext=(100, 60), textcoords='offset points', - size=20, - #bbox=dict(boxstyle="round", fc="0.8"), - arrowprops=dict(arrowstyle="simple", - fc="0.6", ec="none", - patchB=el, - connectionstyle="arc3,rad=0.3"), - ) - - ax.annotate('wedge', xy=(2., -1), xycoords='data', - xytext=(-100, -100), textcoords='offset points', - size=20, - #bbox=dict(boxstyle="round", fc="0.8"), - arrowprops=dict(arrowstyle="wedge,tail_width=0.7", - fc="0.6", ec="none", - patchB=el, - connectionstyle="arc3,rad=-0.3"), - ) - - - ann = ax.annotate('wedge', xy=(2., -1), xycoords='data', - xytext=(0, -45), textcoords='offset points', - size=20, - bbox=dict(boxstyle="round", fc=(1.0, 0.7, 0.7), ec=(1., .5, .5)), - arrowprops=dict(arrowstyle="wedge,tail_width=1.", - fc=(1.0, 0.7, 0.7), ec=(1., .5, .5), - patchA=None, - patchB=el, - relpos=(0.2, 0.8), - connectionstyle="arc3,rad=-0.1"), - ) - - ann = ax.annotate('wedge', xy=(2., -1), xycoords='data', - xytext=(35, 0), textcoords='offset points', - size=20, va="center", - bbox=dict(boxstyle="round", fc=(1.0, 0.7, 0.7), ec="none"), - arrowprops=dict(arrowstyle="wedge,tail_width=1.", - fc=(1.0, 0.7, 0.7), ec="none", - patchA=None, - patchB=el, - relpos=(0.2, 0.5), - ) - ) - - -show() diff --git a/dev/mpl_examples/pylab_examples/annotation_demo2_00.hires.png b/dev/mpl_examples/pylab_examples/annotation_demo2_00.hires.png deleted file mode 100644 index 178244c0794..00000000000 Binary files a/dev/mpl_examples/pylab_examples/annotation_demo2_00.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/annotation_demo2_00.pdf b/dev/mpl_examples/pylab_examples/annotation_demo2_00.pdf deleted file mode 100644 index 3f31dacd393..00000000000 Binary files a/dev/mpl_examples/pylab_examples/annotation_demo2_00.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/annotation_demo2_00.png b/dev/mpl_examples/pylab_examples/annotation_demo2_00.png deleted file mode 100644 index ebfdcdc1f79..00000000000 Binary files a/dev/mpl_examples/pylab_examples/annotation_demo2_00.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/annotation_demo2_01.hires.png b/dev/mpl_examples/pylab_examples/annotation_demo2_01.hires.png deleted file mode 100644 index 317ad6697b9..00000000000 Binary files a/dev/mpl_examples/pylab_examples/annotation_demo2_01.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/annotation_demo2_01.pdf b/dev/mpl_examples/pylab_examples/annotation_demo2_01.pdf deleted file mode 100644 index edfdbed1a94..00000000000 Binary files a/dev/mpl_examples/pylab_examples/annotation_demo2_01.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/annotation_demo2_01.png b/dev/mpl_examples/pylab_examples/annotation_demo2_01.png deleted file mode 100644 index c5585eb52ee..00000000000 Binary files a/dev/mpl_examples/pylab_examples/annotation_demo2_01.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/annotation_demo3.hires.png b/dev/mpl_examples/pylab_examples/annotation_demo3.hires.png deleted file mode 100644 index ceb7fb7c7c1..00000000000 Binary files a/dev/mpl_examples/pylab_examples/annotation_demo3.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/annotation_demo3.pdf b/dev/mpl_examples/pylab_examples/annotation_demo3.pdf deleted file mode 100644 index 88e6390b004..00000000000 Binary files a/dev/mpl_examples/pylab_examples/annotation_demo3.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/annotation_demo3.png b/dev/mpl_examples/pylab_examples/annotation_demo3.png deleted file mode 100644 index c7d022d5775..00000000000 Binary files a/dev/mpl_examples/pylab_examples/annotation_demo3.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/annotation_demo3.py b/dev/mpl_examples/pylab_examples/annotation_demo3.py deleted file mode 100644 index cf78da77cdb..00000000000 --- a/dev/mpl_examples/pylab_examples/annotation_demo3.py +++ /dev/null @@ -1,101 +0,0 @@ -import matplotlib.pyplot as plt - -fig = plt.figure(1) -fig.clf() - -ax1 = plt.subplot(121) -ax2 = plt.subplot(122) - -bbox_args = dict(boxstyle="round", fc="0.8") -arrow_args = dict(arrowstyle="->") - -ax1.annotate('figure fraction : 0, 0', xy=(0, 0), xycoords='figure fraction', - xytext=(20, 20), textcoords='offset points', - ha="left", va="bottom", - bbox=bbox_args, - arrowprops=arrow_args - ) - -ax1.annotate('figure fraction : 1, 1', xy=(1, 1), xycoords='figure fraction', - xytext=(-20, -20), textcoords='offset points', - ha="right", va="top", - bbox=bbox_args, - arrowprops=arrow_args - ) - -ax1.annotate('axes fraction : 0, 0', xy=(0, 0), xycoords='axes fraction', - xytext=(20, 20), textcoords='offset points', - ha="left", va="bottom", - bbox=bbox_args, - arrowprops=arrow_args - ) - -ax1.annotate('axes fraction : 1, 1', xy=(1, 1), xycoords='axes fraction', - xytext=(-20, -20), textcoords='offset points', - ha="right", va="top", - bbox=bbox_args, - arrowprops=arrow_args - ) - - -an1 = ax1.annotate('Drag me 1', xy=(.5, .7), xycoords='data', - #xytext=(.5, .7), textcoords='data', - ha="center", va="center", - bbox=bbox_args, - #arrowprops=arrow_args - ) - -an2 = ax1.annotate('Drag me 2', xy=(.5, .5), xycoords=an1, - xytext=(.5, .3), textcoords='axes fraction', - ha="center", va="center", - bbox=bbox_args, - arrowprops=dict(patchB=an1.get_bbox_patch(), - connectionstyle="arc3,rad=0.2", - **arrow_args) - ) - -an3 = ax1.annotate('', xy=(.5, .5), xycoords=an2, - xytext=(.5, .5), textcoords=an1, - ha="center", va="center", - bbox=bbox_args, - arrowprops=dict(patchA=an1.get_bbox_patch(), - patchB=an2.get_bbox_patch(), - connectionstyle="arc3,rad=0.2", - **arrow_args) - ) - - - -t = ax2.annotate('xy=(0, 1)\nxycoords=("data", "axes fraction")', - xy=(0, 1), xycoords=("data", 'axes fraction'), - xytext=(0, -20), textcoords='offset points', - ha="center", va="top", - bbox=bbox_args, - arrowprops=arrow_args - ) - -from matplotlib.text import OffsetFrom - -ax2.annotate('xy=(0.5, 0)\nxycoords=artist', - xy=(0.5, 0.), xycoords=t, - xytext=(0, -20), textcoords='offset points', - ha="center", va="top", - bbox=bbox_args, - arrowprops=arrow_args - ) - -ax2.annotate('xy=(0.8, 0.5)\nxycoords=ax1.transData', - xy=(0.8, 0.5), xycoords=ax1.transData, - xytext=(10, 10), textcoords=OffsetFrom(ax2.bbox, (0, 0), "points"), - ha="left", va="bottom", - bbox=bbox_args, - arrowprops=arrow_args - ) - -ax2.set_xlim(-2, 2) -ax2.set_ylim(-2, 2) - -an1.draggable() -an2.draggable() - -plt.show() diff --git a/dev/mpl_examples/pylab_examples/annotation_demo_00.hires.png b/dev/mpl_examples/pylab_examples/annotation_demo_00.hires.png deleted file mode 100644 index 276843cb4e7..00000000000 Binary files a/dev/mpl_examples/pylab_examples/annotation_demo_00.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/annotation_demo_00.pdf b/dev/mpl_examples/pylab_examples/annotation_demo_00.pdf deleted file mode 100644 index 50d8c30604e..00000000000 Binary files a/dev/mpl_examples/pylab_examples/annotation_demo_00.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/annotation_demo_00.png b/dev/mpl_examples/pylab_examples/annotation_demo_00.png deleted file mode 100644 index 40062b448a1..00000000000 Binary files a/dev/mpl_examples/pylab_examples/annotation_demo_00.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/annotation_demo_01.hires.png b/dev/mpl_examples/pylab_examples/annotation_demo_01.hires.png deleted file mode 100644 index e4ce1f9a0e5..00000000000 Binary files a/dev/mpl_examples/pylab_examples/annotation_demo_01.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/annotation_demo_01.pdf b/dev/mpl_examples/pylab_examples/annotation_demo_01.pdf deleted file mode 100644 index b77edc8de98..00000000000 Binary files a/dev/mpl_examples/pylab_examples/annotation_demo_01.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/annotation_demo_01.png b/dev/mpl_examples/pylab_examples/annotation_demo_01.png deleted file mode 100644 index 223e704db7c..00000000000 Binary files a/dev/mpl_examples/pylab_examples/annotation_demo_01.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/annotation_demo_02.hires.png b/dev/mpl_examples/pylab_examples/annotation_demo_02.hires.png deleted file mode 100644 index 16db579e2e2..00000000000 Binary files a/dev/mpl_examples/pylab_examples/annotation_demo_02.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/annotation_demo_02.pdf b/dev/mpl_examples/pylab_examples/annotation_demo_02.pdf deleted file mode 100644 index f2e9c9346df..00000000000 Binary files a/dev/mpl_examples/pylab_examples/annotation_demo_02.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/annotation_demo_02.png b/dev/mpl_examples/pylab_examples/annotation_demo_02.png deleted file mode 100644 index ec47513eadd..00000000000 Binary files a/dev/mpl_examples/pylab_examples/annotation_demo_02.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/anscombe.hires.png b/dev/mpl_examples/pylab_examples/anscombe.hires.png deleted file mode 100644 index 80bbe271d22..00000000000 Binary files a/dev/mpl_examples/pylab_examples/anscombe.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/anscombe.pdf b/dev/mpl_examples/pylab_examples/anscombe.pdf deleted file mode 100644 index ec3c1d5206c..00000000000 Binary files a/dev/mpl_examples/pylab_examples/anscombe.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/anscombe.png b/dev/mpl_examples/pylab_examples/anscombe.png deleted file mode 100644 index abdd72dc668..00000000000 Binary files a/dev/mpl_examples/pylab_examples/anscombe.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/anscombe.py b/dev/mpl_examples/pylab_examples/anscombe.py deleted file mode 100644 index 189294861cc..00000000000 --- a/dev/mpl_examples/pylab_examples/anscombe.py +++ /dev/null @@ -1,59 +0,0 @@ -#!/usr/bin/env python - -from __future__ import print_function -""" -Edward Tufte uses this example from Anscombe to show 4 datasets of x -and y that have the same mean, standard deviation, and regression -line, but which are qualitatively different. - -matplotlib fun for a rainy day -""" - -from pylab import * - -x = array([10, 8, 13, 9, 11, 14, 6, 4, 12, 7, 5]) -y1 = array([8.04, 6.95, 7.58, 8.81, 8.33, 9.96, 7.24, 4.26, 10.84, 4.82, 5.68]) -y2 = array([9.14, 8.14, 8.74, 8.77, 9.26, 8.10, 6.13, 3.10, 9.13, 7.26, 4.74]) -y3 = array([7.46, 6.77, 12.74, 7.11, 7.81, 8.84, 6.08, 5.39, 8.15, 6.42, 5.73]) -x4 = array([8,8,8,8,8,8,8,19,8,8,8]) -y4 = array([6.58,5.76,7.71,8.84,8.47,7.04,5.25,12.50,5.56,7.91,6.89]) - -def fit(x): - return 3+0.5*x - - - -xfit = array( [amin(x), amax(x) ] ) - -subplot(221) -plot(x,y1,'ks', xfit, fit(xfit), 'r-', lw=2) -axis([2,20,2,14]) -setp(gca(), xticklabels=[], yticks=(4,8,12), xticks=(0,10,20)) -text(3,12, 'I', fontsize=20) - -subplot(222) -plot(x,y2,'ks', xfit, fit(xfit), 'r-', lw=2) -axis([2,20,2,14]) -setp(gca(), xticklabels=[], yticks=(4,8,12), yticklabels=[], xticks=(0,10,20)) -text(3,12, 'II', fontsize=20) - -subplot(223) -plot(x,y3,'ks', xfit, fit(xfit), 'r-', lw=2) -axis([2,20,2,14]) -text(3,12, 'III', fontsize=20) -setp(gca(), yticks=(4,8,12), xticks=(0,10,20)) - -subplot(224) - -xfit = array([amin(x4),amax(x4)]) -plot(x4,y4,'ks', xfit, fit(xfit), 'r-', lw=2) -axis([2,20,2,14]) -setp(gca(), yticklabels=[], yticks=(4,8,12), xticks=(0,10,20)) -text(3,12, 'IV', fontsize=20) - -#verify the stats -pairs = (x,y1), (x,y2), (x,y3), (x4,y4) -for x,y in pairs: - print ('mean=%1.2f, std=%1.2f, r=%1.2f'%(mean(y), std(y), corrcoef(x,y)[0][1])) - -show() diff --git a/dev/mpl_examples/pylab_examples/arctest.hires.png b/dev/mpl_examples/pylab_examples/arctest.hires.png deleted file mode 100644 index 28a85cc66e8..00000000000 Binary files a/dev/mpl_examples/pylab_examples/arctest.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/arctest.pdf b/dev/mpl_examples/pylab_examples/arctest.pdf deleted file mode 100644 index 9b14fbfa950..00000000000 Binary files a/dev/mpl_examples/pylab_examples/arctest.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/arctest.png b/dev/mpl_examples/pylab_examples/arctest.png deleted file mode 100644 index 2839b0a7d4e..00000000000 Binary files a/dev/mpl_examples/pylab_examples/arctest.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/arctest.py b/dev/mpl_examples/pylab_examples/arctest.py deleted file mode 100644 index 90e3bd9236c..00000000000 --- a/dev/mpl_examples/pylab_examples/arctest.py +++ /dev/null @@ -1,18 +0,0 @@ -#!/usr/bin/env python -from pylab import * - -def f(t): - 'a damped exponential' - s1 = cos(2*pi*t) - e1 = exp(-t) - return multiply(s1,e1) - -t1 = arange(0.0, 5.0, .2) - - -l = plot(t1, f(t1), 'ro') -setp(l, 'markersize', 30) -setp(l, 'markerfacecolor', 'b') - -show() - diff --git a/dev/mpl_examples/pylab_examples/arrow_demo.hires.png b/dev/mpl_examples/pylab_examples/arrow_demo.hires.png deleted file mode 100644 index df32ecbd1bf..00000000000 Binary files a/dev/mpl_examples/pylab_examples/arrow_demo.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/arrow_demo.pdf b/dev/mpl_examples/pylab_examples/arrow_demo.pdf deleted file mode 100644 index d97a0abae02..00000000000 Binary files a/dev/mpl_examples/pylab_examples/arrow_demo.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/arrow_demo.png b/dev/mpl_examples/pylab_examples/arrow_demo.png deleted file mode 100644 index ec238228be8..00000000000 Binary files a/dev/mpl_examples/pylab_examples/arrow_demo.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/arrow_demo.py b/dev/mpl_examples/pylab_examples/arrow_demo.py deleted file mode 100644 index d75470e58a8..00000000000 --- a/dev/mpl_examples/pylab_examples/arrow_demo.py +++ /dev/null @@ -1,312 +0,0 @@ -#!/usr/bin/env python -"""Arrow drawing example for the new fancy_arrow facilities. - -Code contributed by: Rob Knight - -usage: - - python arrow_demo.py realistic|full|sample|extreme - - -""" -from pylab import * - -rates_to_bases={'r1':'AT', 'r2':'TA', 'r3':'GA','r4':'AG','r5':'CA','r6':'AC', \ - 'r7':'GT', 'r8':'TG', 'r9':'CT','r10':'TC','r11':'GC','r12':'CG'} -numbered_bases_to_rates = dict([(v,k) for k, v in rates_to_bases.items()]) -lettered_bases_to_rates = dict([(v, 'r'+v) for k, v in rates_to_bases.items()]) -def add_dicts(d1, d2): - """Adds two dicts and returns the result.""" - result = d1.copy() - result.update(d2) - return result - -def make_arrow_plot(data, size=4, display='length', shape='right', \ - max_arrow_width=0.03, arrow_sep = 0.02, alpha=0.5, \ - normalize_data=False, ec=None, labelcolor=None, \ - head_starts_at_zero=True, rate_labels=lettered_bases_to_rates,\ - **kwargs): - """Makes an arrow plot. - - Parameters: - - data: dict with probabilities for the bases and pair transitions. - size: size of the graph in inches. - display: 'length', 'width', or 'alpha' for arrow property to change. - shape: 'full', 'left', or 'right' for full or half arrows. - max_arrow_width: maximum width of an arrow, data coordinates. - arrow_sep: separation between arrows in a pair, data coordinates. - alpha: maximum opacity of arrows, default 0.8. - - **kwargs can be anything allowed by a Arrow object, e.g. - linewidth and edgecolor. - """ - - xlim(-0.5,1.5) - ylim(-0.5,1.5) - gcf().set_size_inches(size,size) - xticks([]) - yticks([]) - max_text_size = size*12 - min_text_size = size - label_text_size = size*2.5 - text_params={'ha':'center', 'va':'center', 'family':'sans-serif',\ - 'fontweight':'bold'} - r2 = sqrt(2) - - deltas = {\ - 'AT':(1,0), - 'TA':(-1,0), - 'GA':(0,1), - 'AG':(0,-1), - 'CA':(-1/r2, 1/r2), - 'AC':(1/r2, -1/r2), - 'GT':(1/r2, 1/r2), - 'TG':(-1/r2,-1/r2), - 'CT':(0,1), - 'TC':(0,-1), - 'GC':(1,0), - 'CG':(-1,0) - } - - colors = {\ - 'AT':'r', - 'TA':'k', - 'GA':'g', - 'AG':'r', - 'CA':'b', - 'AC':'r', - 'GT':'g', - 'TG':'k', - 'CT':'b', - 'TC':'k', - 'GC':'g', - 'CG':'b' - } - - label_positions = {\ - 'AT':'center', - 'TA':'center', - 'GA':'center', - 'AG':'center', - 'CA':'left', - 'AC':'left', - 'GT':'left', - 'TG':'left', - 'CT':'center', - 'TC':'center', - 'GC':'center', - 'CG':'center' - } - - - def do_fontsize(k): - return float(clip(max_text_size*sqrt(data[k]),\ - min_text_size,max_text_size)) - - A = text(0,1, '$A_3$', color='r', size=do_fontsize('A'), **text_params) - T = text(1,1, '$T_3$', color='k', size=do_fontsize('T'), **text_params) - G = text(0,0, '$G_3$', color='g', size=do_fontsize('G'), **text_params) - C = text(1,0, '$C_3$', color='b', size=do_fontsize('C'), **text_params) - - arrow_h_offset = 0.25 #data coordinates, empirically determined - max_arrow_length = 1 - 2*arrow_h_offset - - max_arrow_width = max_arrow_width - max_head_width = 2.5*max_arrow_width - max_head_length = 2*max_arrow_width - arrow_params={'length_includes_head':True, 'shape':shape, \ - 'head_starts_at_zero':head_starts_at_zero} - ax = gca() - sf = 0.6 #max arrow size represents this in data coords - - d = (r2/2 + arrow_h_offset - 0.5)/r2 #distance for diags - r2v = arrow_sep/r2 #offset for diags - - #tuple of x, y for start position - positions = {\ - 'AT': (arrow_h_offset, 1+arrow_sep), - 'TA': (1-arrow_h_offset, 1-arrow_sep), - 'GA': (-arrow_sep, arrow_h_offset), - 'AG': (arrow_sep, 1-arrow_h_offset), - 'CA': (1-d-r2v, d-r2v), - 'AC': (d+r2v, 1-d+r2v), - 'GT': (d-r2v, d+r2v), - 'TG': (1-d+r2v, 1-d-r2v), - 'CT': (1-arrow_sep, arrow_h_offset), - 'TC': (1+arrow_sep, 1-arrow_h_offset), - 'GC': (arrow_h_offset, arrow_sep), - 'CG': (1-arrow_h_offset, -arrow_sep), - } - - if normalize_data: - #find maximum value for rates, i.e. where keys are 2 chars long - max_val = 0 - for k, v in data.items(): - if len(k) == 2: - max_val = max(max_val, v) - #divide rates by max val, multiply by arrow scale factor - for k, v in data.items(): - data[k] = v/max_val*sf - - def draw_arrow(pair, alpha=alpha, ec=ec, labelcolor=labelcolor): - #set the length of the arrow - if display == 'length': - length = max_head_length+(max_arrow_length-max_head_length)*\ - data[pair]/sf - else: - length = max_arrow_length - #set the transparency of the arrow - if display == 'alph': - alpha = min(data[pair]/sf, alpha) - else: - alpha=alpha - #set the width of the arrow - if display == 'width': - scale = data[pair]/sf - width = max_arrow_width*scale - head_width = max_head_width*scale - head_length = max_head_length*scale - else: - width = max_arrow_width - head_width = max_head_width - head_length = max_head_length - - fc = colors[pair] - ec = ec or fc - - x_scale, y_scale = deltas[pair] - x_pos, y_pos = positions[pair] - arrow(x_pos, y_pos, x_scale*length, y_scale*length, \ - fc=fc, ec=ec, alpha=alpha, width=width, head_width=head_width, \ - head_length=head_length, **arrow_params) - - #figure out coordinates for text - #if drawing relative to base: x and y are same as for arrow - #dx and dy are one arrow width left and up - #need to rotate based on direction of arrow, use x_scale and y_scale - #as sin x and cos x? - sx, cx = y_scale, x_scale - - where = label_positions[pair] - if where == 'left': - orig_position = 3*array([[max_arrow_width, max_arrow_width]]) - elif where == 'absolute': - orig_position = array([[max_arrow_length/2.0, 3*max_arrow_width]]) - elif where == 'right': - orig_position = array([[length-3*max_arrow_width,\ - 3*max_arrow_width]]) - elif where == 'center': - orig_position = array([[length/2.0, 3*max_arrow_width]]) - else: - raise ValueError("Got unknown position parameter %s" % where) - - - - M = array([[cx, sx],[-sx,cx]]) - coords = dot(orig_position, M) + [[x_pos, y_pos]] - x, y = ravel(coords) - orig_label = rate_labels[pair] - label = '$%s_{_{\mathrm{%s}}}$' % (orig_label[0], orig_label[1:]) - - text(x, y, label, size=label_text_size, ha='center', va='center', \ - color=labelcolor or fc) - - for p in positions.keys(): - draw_arrow(p) - - #test data -all_on_max = dict([(i, 1) for i in 'TCAG'] + \ - [(i+j, 0.6) for i in 'TCAG' for j in 'TCAG']) - -realistic_data = { - 'A':0.4, - 'T':0.3, - 'G':0.5, - 'C':0.2, - 'AT':0.4, - 'AC':0.3, - 'AG':0.2, - 'TA':0.2, - 'TC':0.3, - 'TG':0.4, - 'CT':0.2, - 'CG':0.3, - 'CA':0.2, - 'GA':0.1, - 'GT':0.4, - 'GC':0.1, - } - -extreme_data = { - 'A':0.75, - 'T':0.10, - 'G':0.10, - 'C':0.05, - 'AT':0.6, - 'AC':0.3, - 'AG':0.1, - 'TA':0.02, - 'TC':0.3, - 'TG':0.01, - 'CT':0.2, - 'CG':0.5, - 'CA':0.2, - 'GA':0.1, - 'GT':0.4, - 'GC':0.2, - } - -sample_data = { - 'A':0.2137, - 'T':0.3541, - 'G':0.1946, - 'C':0.2376, - 'AT':0.0228, - 'AC':0.0684, - 'AG':0.2056, - 'TA':0.0315, - 'TC':0.0629, - 'TG':0.0315, - 'CT':0.1355, - 'CG':0.0401, - 'CA':0.0703, - 'GA':0.1824, - 'GT':0.0387, - 'GC':0.1106, - } - - -if __name__ == '__main__': - from sys import argv - d = None - if len(argv) > 1: - if argv[1] == 'full': - d = all_on_max - scaled = False - elif argv[1] == 'extreme': - d = extreme_data - scaled = False - elif argv[1] == 'realistic': - d = realistic_data - scaled = False - elif argv[1] == 'sample': - d = sample_data - scaled = True - if d is None: - d = all_on_max - scaled=False - if len(argv) > 2: - display = argv[2] - else: - display = 'length' - - size = 4 - figure(figsize=(size,size)) - - make_arrow_plot(d, display=display, linewidth=0.001, edgecolor=None, - normalize_data=scaled, head_starts_at_zero=True, size=size) - - draw() - - show() diff --git a/dev/mpl_examples/pylab_examples/arrow_simple_demo.hires.png b/dev/mpl_examples/pylab_examples/arrow_simple_demo.hires.png deleted file mode 100644 index 4ae28d2e971..00000000000 Binary files a/dev/mpl_examples/pylab_examples/arrow_simple_demo.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/arrow_simple_demo.pdf b/dev/mpl_examples/pylab_examples/arrow_simple_demo.pdf deleted file mode 100644 index 6881214d595..00000000000 Binary files a/dev/mpl_examples/pylab_examples/arrow_simple_demo.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/arrow_simple_demo.png b/dev/mpl_examples/pylab_examples/arrow_simple_demo.png deleted file mode 100644 index 19b3e420191..00000000000 Binary files a/dev/mpl_examples/pylab_examples/arrow_simple_demo.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/arrow_simple_demo.py b/dev/mpl_examples/pylab_examples/arrow_simple_demo.py deleted file mode 100644 index 65fb5a9eabc..00000000000 --- a/dev/mpl_examples/pylab_examples/arrow_simple_demo.py +++ /dev/null @@ -1,5 +0,0 @@ -import matplotlib.pyplot as plt - -ax = plt.axes() -ax.arrow(0, 0, 0.5, 0.5, head_width=0.05, head_length=0.1, fc='k', ec='k') -plt.show() diff --git a/dev/mpl_examples/pylab_examples/aspect_loglog.hires.png b/dev/mpl_examples/pylab_examples/aspect_loglog.hires.png deleted file mode 100644 index f78b7aec3e1..00000000000 Binary files a/dev/mpl_examples/pylab_examples/aspect_loglog.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/aspect_loglog.pdf b/dev/mpl_examples/pylab_examples/aspect_loglog.pdf deleted file mode 100644 index 512608a4232..00000000000 Binary files a/dev/mpl_examples/pylab_examples/aspect_loglog.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/aspect_loglog.png b/dev/mpl_examples/pylab_examples/aspect_loglog.png deleted file mode 100644 index 98739cc5c42..00000000000 Binary files a/dev/mpl_examples/pylab_examples/aspect_loglog.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/aspect_loglog.py b/dev/mpl_examples/pylab_examples/aspect_loglog.py deleted file mode 100644 index 4ce384633e9..00000000000 --- a/dev/mpl_examples/pylab_examples/aspect_loglog.py +++ /dev/null @@ -1,22 +0,0 @@ -import matplotlib.pyplot as plt - -ax1 = plt.subplot(121) -ax1.set_xscale("log") -ax1.set_yscale("log") -ax1.set_xlim(1e1, 1e3) -ax1.set_ylim(1e2, 1e3) -ax1.set_aspect(1) -ax1.set_title("adjustable = box") - -ax2 = plt.subplot(122) -ax2.set_xscale("log") -ax2.set_yscale("log") -ax2.set_adjustable("datalim") -ax2.plot([1,3, 10], [1, 9, 100], "o-") -ax2.set_xlim(1e-1, 1e2) -ax2.set_ylim(1e-1, 1e3) -ax2.set_aspect(1) -ax2.set_title("adjustable = datalim") - -plt.draw() -plt.show() diff --git a/dev/mpl_examples/pylab_examples/axes_demo.hires.png b/dev/mpl_examples/pylab_examples/axes_demo.hires.png deleted file mode 100644 index c151ea11542..00000000000 Binary files a/dev/mpl_examples/pylab_examples/axes_demo.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/axes_demo.pdf b/dev/mpl_examples/pylab_examples/axes_demo.pdf deleted file mode 100644 index 481df142b42..00000000000 Binary files a/dev/mpl_examples/pylab_examples/axes_demo.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/axes_demo.png b/dev/mpl_examples/pylab_examples/axes_demo.png deleted file mode 100644 index 589f673469e..00000000000 Binary files a/dev/mpl_examples/pylab_examples/axes_demo.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/axes_demo.py b/dev/mpl_examples/pylab_examples/axes_demo.py deleted file mode 100644 index 34ace972d0b..00000000000 --- a/dev/mpl_examples/pylab_examples/axes_demo.py +++ /dev/null @@ -1,32 +0,0 @@ -#!/usr/bin/env python - -from pylab import * - -# create some data to use for the plot -dt = 0.001 -t = arange(0.0, 10.0, dt) -r = exp(-t[:1000]/0.05) # impulse response -x = randn(len(t)) -s = convolve(x,r)[:len(x)]*dt # colored noise - -# the main axes is subplot(111) by default -plot(t, s) -axis([0, 1, 1.1*amin(s), 2*amax(s) ]) -xlabel('time (s)') -ylabel('current (nA)') -title('Gaussian colored noise') - -# this is an inset axes over the main axes -a = axes([.65, .6, .2, .2], axisbg='y') -n, bins, patches = hist(s, 400, normed=1) -title('Probability') -setp(a, xticks=[], yticks=[]) - -# this is another inset axes over the main axes -a = axes([0.2, 0.6, .2, .2], axisbg='y') -plot(t[:len(r)], r) -title('Impulse response') -setp(a, xlim=(0,.2), xticks=[], yticks=[]) - - -show() diff --git a/dev/mpl_examples/pylab_examples/axes_props.hires.png b/dev/mpl_examples/pylab_examples/axes_props.hires.png deleted file mode 100644 index 97eca4dd31e..00000000000 Binary files a/dev/mpl_examples/pylab_examples/axes_props.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/axes_props.pdf b/dev/mpl_examples/pylab_examples/axes_props.pdf deleted file mode 100644 index f862bb03b92..00000000000 Binary files a/dev/mpl_examples/pylab_examples/axes_props.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/axes_props.png b/dev/mpl_examples/pylab_examples/axes_props.png deleted file mode 100644 index e131ba0a990..00000000000 Binary files a/dev/mpl_examples/pylab_examples/axes_props.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/axes_props.py b/dev/mpl_examples/pylab_examples/axes_props.py deleted file mode 100644 index 7fe564ef7d4..00000000000 --- a/dev/mpl_examples/pylab_examples/axes_props.py +++ /dev/null @@ -1,62 +0,0 @@ -#!/usr/bin/env python -""" -You can control the axis tick and grid properties -""" - -from pylab import * - -t = arange(0.0, 2.0, 0.01) -s = sin(2*pi*t) -plot(t, s) -grid(True) - -# MATLAB style -xticklines = getp(gca(), 'xticklines') -yticklines = getp(gca(), 'yticklines') -xgridlines = getp(gca(), 'xgridlines') -ygridlines = getp(gca(), 'ygridlines') -xticklabels = getp(gca(), 'xticklabels') -yticklabels = getp(gca(), 'yticklabels') - -setp(xticklines, 'linewidth', 3) -setp(yticklines, 'linewidth', 3) -setp(xgridlines, 'linestyle', '-') -setp(ygridlines, 'linestyle', '-') -setp(yticklabels, 'color', 'r', fontsize='medium') -setp(xticklabels, 'color', 'r', fontsize='medium') - - - -show() - - -""" -# the same script, python style -from pylab import * - -t = arange(0.0, 2.0, 0.01) -s = sin(2*pi*t) -ax = subplot(111) -ax.plot(t, s) -ax.grid(True) - -ticklines = ax.get_xticklines() -ticklines.extend( ax.get_yticklines() ) -gridlines = ax.get_xgridlines() -gridlines.extend( ax.get_ygridlines() ) -ticklabels = ax.get_xticklabels() -ticklabels.extend( ax.get_yticklabels() ) - -for line in ticklines: - line.set_linewidth(3) - -for line in gridlines: - line.set_linestyle('-') - -for label in ticklabels: - label.set_color('r') - label.set_fontsize('medium') - -show() - -""" diff --git a/dev/mpl_examples/pylab_examples/axes_zoom_effect.hires.png b/dev/mpl_examples/pylab_examples/axes_zoom_effect.hires.png deleted file mode 100644 index 1f9659854b0..00000000000 Binary files a/dev/mpl_examples/pylab_examples/axes_zoom_effect.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/axes_zoom_effect.pdf b/dev/mpl_examples/pylab_examples/axes_zoom_effect.pdf deleted file mode 100644 index ed67f671718..00000000000 Binary files a/dev/mpl_examples/pylab_examples/axes_zoom_effect.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/axes_zoom_effect.png b/dev/mpl_examples/pylab_examples/axes_zoom_effect.png deleted file mode 100644 index 0fb88526c12..00000000000 Binary files a/dev/mpl_examples/pylab_examples/axes_zoom_effect.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/axes_zoom_effect.py b/dev/mpl_examples/pylab_examples/axes_zoom_effect.py deleted file mode 100644 index 22f54df401a..00000000000 --- a/dev/mpl_examples/pylab_examples/axes_zoom_effect.py +++ /dev/null @@ -1,118 +0,0 @@ -from matplotlib.transforms import Bbox, TransformedBbox, \ - blended_transform_factory - -from mpl_toolkits.axes_grid1.inset_locator import BboxPatch, BboxConnector,\ - BboxConnectorPatch - - -def connect_bbox(bbox1, bbox2, - loc1a, loc2a, loc1b, loc2b, - prop_lines, prop_patches=None): - if prop_patches is None: - prop_patches = prop_lines.copy() - prop_patches["alpha"] = prop_patches.get("alpha", 1)*0.2 - - c1 = BboxConnector(bbox1, bbox2, loc1=loc1a, loc2=loc2a, **prop_lines) - c1.set_clip_on(False) - c2 = BboxConnector(bbox1, bbox2, loc1=loc1b, loc2=loc2b, **prop_lines) - c2.set_clip_on(False) - - bbox_patch1 = BboxPatch(bbox1, **prop_patches) - bbox_patch2 = BboxPatch(bbox2, **prop_patches) - - p = BboxConnectorPatch(bbox1, bbox2, - #loc1a=3, loc2a=2, loc1b=4, loc2b=1, - loc1a=loc1a, loc2a=loc2a, loc1b=loc1b, loc2b=loc2b, - **prop_patches) - p.set_clip_on(False) - - return c1, c2, bbox_patch1, bbox_patch2, p - - -def zoom_effect01(ax1, ax2, xmin, xmax, **kwargs): - """ - ax1 : the main axes - ax1 : the zoomed axes - (xmin,xmax) : the limits of the colored area in both plot axes. - - connect ax1 & ax2. The x-range of (xmin, xmax) in both axes will - be marked. The keywords parameters will be used ti create - patches. - - """ - - trans1 = blended_transform_factory(ax1.transData, ax1.transAxes) - trans2 = blended_transform_factory(ax2.transData, ax2.transAxes) - - bbox = Bbox.from_extents(xmin, 0, xmax, 1) - - mybbox1 = TransformedBbox(bbox, trans1) - mybbox2 = TransformedBbox(bbox, trans2) - - prop_patches=kwargs.copy() - prop_patches["ec"]="none" - prop_patches["alpha"]=0.2 - - c1, c2, bbox_patch1, bbox_patch2, p = \ - connect_bbox(mybbox1, mybbox2, - loc1a=3, loc2a=2, loc1b=4, loc2b=1, - prop_lines=kwargs, prop_patches=prop_patches) - - ax1.add_patch(bbox_patch1) - ax2.add_patch(bbox_patch2) - ax2.add_patch(c1) - ax2.add_patch(c2) - ax2.add_patch(p) - - return c1, c2, bbox_patch1, bbox_patch2, p - - -def zoom_effect02(ax1, ax2, **kwargs): - """ - ax1 : the main axes - ax1 : the zoomed axes - - Similar to zoom_effect01. The xmin & xmax will be taken from the - ax1.viewLim. - """ - - tt = ax1.transScale + (ax1.transLimits + ax2.transAxes) - trans = blended_transform_factory(ax2.transData, tt) - - mybbox1 = ax1.bbox - mybbox2 = TransformedBbox(ax1.viewLim, trans) - - prop_patches=kwargs.copy() - prop_patches["ec"]="none" - prop_patches["alpha"]=0.2 - - c1, c2, bbox_patch1, bbox_patch2, p = \ - connect_bbox(mybbox1, mybbox2, - loc1a=3, loc2a=2, loc1b=4, loc2b=1, - prop_lines=kwargs, prop_patches=prop_patches) - - ax1.add_patch(bbox_patch1) - ax2.add_patch(bbox_patch2) - ax2.add_patch(c1) - ax2.add_patch(c2) - ax2.add_patch(p) - - return c1, c2, bbox_patch1, bbox_patch2, p - - -import matplotlib.pyplot as plt - -plt.figure(1, figsize=(5,5)) -ax1 = plt.subplot(221) -ax2 = plt.subplot(212) -ax2.set_xlim(0, 1) -ax2.set_xlim(0, 5) -zoom_effect01(ax1, ax2, 0.2, 0.8) - - -ax1 = plt.subplot(222) -ax1.set_xlim(2, 3) -ax2.set_xlim(0, 5) -zoom_effect02(ax1, ax2) - -plt.show() diff --git a/dev/mpl_examples/pylab_examples/axhspan_demo.hires.png b/dev/mpl_examples/pylab_examples/axhspan_demo.hires.png deleted file mode 100644 index b6fce39f636..00000000000 Binary files a/dev/mpl_examples/pylab_examples/axhspan_demo.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/axhspan_demo.pdf b/dev/mpl_examples/pylab_examples/axhspan_demo.pdf deleted file mode 100644 index f4a75562fb4..00000000000 Binary files a/dev/mpl_examples/pylab_examples/axhspan_demo.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/axhspan_demo.png b/dev/mpl_examples/pylab_examples/axhspan_demo.png deleted file mode 100644 index 9beeb93ef4d..00000000000 Binary files a/dev/mpl_examples/pylab_examples/axhspan_demo.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/axhspan_demo.py b/dev/mpl_examples/pylab_examples/axhspan_demo.py deleted file mode 100644 index ac056e33ad5..00000000000 --- a/dev/mpl_examples/pylab_examples/axhspan_demo.py +++ /dev/null @@ -1,32 +0,0 @@ -import numpy as np -import matplotlib.pyplot as plt - -t = np.arange(-1,2, .01) -s = np.sin(2*np.pi*t) - -plt.plot(t,s) -# draw a thick red hline at y=0 that spans the xrange -l = plt.axhline(linewidth=4, color='r') - -# draw a default hline at y=1 that spans the xrange -l = plt.axhline(y=1) - -# draw a default vline at x=1 that spans the yrange -l = plt.axvline(x=1) - -# draw a thick blue vline at x=0 that spans the upper quadrant of -# the yrange -l = plt.axvline(x=0, ymin=0.75, linewidth=4, color='b') - -# draw a default hline at y=.5 that spans the the middle half of -# the axes -l = plt.axhline(y=.5, xmin=0.25, xmax=0.75) - -p = plt.axhspan(0.25, 0.75, facecolor='0.5', alpha=0.5) - -p = plt.axvspan(1.25, 1.55, facecolor='g', alpha=0.5) - -plt.axis([-1,2,-1,2]) - - -plt.show() diff --git a/dev/mpl_examples/pylab_examples/axis_equal_demo.hires.png b/dev/mpl_examples/pylab_examples/axis_equal_demo.hires.png deleted file mode 100644 index 61effa4291b..00000000000 Binary files a/dev/mpl_examples/pylab_examples/axis_equal_demo.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/axis_equal_demo.pdf b/dev/mpl_examples/pylab_examples/axis_equal_demo.pdf deleted file mode 100644 index ba40f4bb82a..00000000000 Binary files a/dev/mpl_examples/pylab_examples/axis_equal_demo.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/axis_equal_demo.png b/dev/mpl_examples/pylab_examples/axis_equal_demo.png deleted file mode 100644 index dcd0dd66690..00000000000 Binary files a/dev/mpl_examples/pylab_examples/axis_equal_demo.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/axis_equal_demo.py b/dev/mpl_examples/pylab_examples/axis_equal_demo.py deleted file mode 100644 index e850a847427..00000000000 --- a/dev/mpl_examples/pylab_examples/axis_equal_demo.py +++ /dev/null @@ -1,36 +0,0 @@ -'''This example is only interesting when ran in interactive mode''' - -from pylab import * - -# Plot circle or radius 3 - -an = linspace(0,2*pi,100) - -subplot(221) -plot( 3*cos(an), 3*sin(an) ) -title('not equal, looks like ellipse',fontsize=10) - -subplot(222) -plot( 3*cos(an), 3*sin(an) ) -axis('equal') -title('equal, looks like circle',fontsize=10) - -subplot(223) -plot( 3*cos(an), 3*sin(an) ) -axis('equal') -axis([-3,3,-3,3]) -title('looks like circle, even after changing limits',fontsize=10) - -subplot(224) -plot( 3*cos(an), 3*sin(an) ) -axis('equal') -axis([-3,3,-3,3]) -plot([0,4],[0,4]) -title('still equal after adding line',fontsize=10) - -show() - - - - - diff --git a/dev/mpl_examples/pylab_examples/bar_stacked.hires.png b/dev/mpl_examples/pylab_examples/bar_stacked.hires.png deleted file mode 100644 index 2c717d76e76..00000000000 Binary files a/dev/mpl_examples/pylab_examples/bar_stacked.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/bar_stacked.pdf b/dev/mpl_examples/pylab_examples/bar_stacked.pdf deleted file mode 100644 index d8c3c150acb..00000000000 Binary files a/dev/mpl_examples/pylab_examples/bar_stacked.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/bar_stacked.png b/dev/mpl_examples/pylab_examples/bar_stacked.png deleted file mode 100644 index 6ff0fc52374..00000000000 Binary files a/dev/mpl_examples/pylab_examples/bar_stacked.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/bar_stacked.py b/dev/mpl_examples/pylab_examples/bar_stacked.py deleted file mode 100644 index f1cf8c0c38b..00000000000 --- a/dev/mpl_examples/pylab_examples/bar_stacked.py +++ /dev/null @@ -1,25 +0,0 @@ -#!/usr/bin/env python -# a stacked bar plot with errorbars -import numpy as np -import matplotlib.pyplot as plt - - -N = 5 -menMeans = (20, 35, 30, 35, 27) -womenMeans = (25, 32, 34, 20, 25) -menStd = (2, 3, 4, 1, 2) -womenStd = (3, 5, 2, 3, 3) -ind = np.arange(N) # the x locations for the groups -width = 0.35 # the width of the bars: can also be len(x) sequence - -p1 = plt.bar(ind, menMeans, width, color='r', yerr=womenStd) -p2 = plt.bar(ind, womenMeans, width, color='y', - bottom=menMeans, yerr=menStd) - -plt.ylabel('Scores') -plt.title('Scores by group and gender') -plt.xticks(ind+width/2., ('G1', 'G2', 'G3', 'G4', 'G5') ) -plt.yticks(np.arange(0,81,10)) -plt.legend( (p1[0], p2[0]), ('Men', 'Women') ) - -plt.show() diff --git a/dev/mpl_examples/pylab_examples/barb_demo.py b/dev/mpl_examples/pylab_examples/barb_demo.py deleted file mode 100644 index 71e948fbdf9..00000000000 --- a/dev/mpl_examples/pylab_examples/barb_demo.py +++ /dev/null @@ -1,53 +0,0 @@ -''' -Demonstration of wind barb plots -''' -import matplotlib.pyplot as plt -import numpy as np - -x = np.linspace(-5, 5, 5) -X,Y = np.meshgrid(x, x) -U, V = 12*X, 12*Y - -data = [(-1.5, .5, -6, -6), - (1, -1, -46, 46), - (-3, -1, 11, -11), - (1, 1.5, 80, 80), - (0.5, 0.25, 25, 15), - (-1.5, -0.5, -5, 40)] - -data = np.array(data, dtype=[('x', np.float32), ('y', np.float32), - ('u', np.float32), ('v', np.float32)]) - -#Default parameters, uniform grid -ax = plt.subplot(2,2,1) -ax.barbs(X, Y, U, V) - -#Arbitrary set of vectors, make them longer and change the pivot point -#(point around which they're rotated) to be the middle -ax = plt.subplot(2,2,2) -ax.barbs(data['x'], data['y'], data['u'], data['v'], length=8, pivot='middle') - -#Showing colormapping with uniform grid. Fill the circle for an empty barb, -#don't round the values, and change some of the size parameters -ax = plt.subplot(2,2,3) -ax.barbs(X, Y, U, V, np.sqrt(U*U + V*V), fill_empty=True, rounding=False, - sizes=dict(emptybarb=0.25, spacing=0.2, height=0.3)) - -#Change colors as well as the increments for parts of the barbs -ax = plt.subplot(2,2,4) -ax.barbs(data['x'], data['y'], data['u'], data['v'], flagcolor='r', - barbcolor=['b','g'], barb_increments=dict(half=10, full=20, flag=100), - flip_barb=True) - -#Masked arrays are also supported -masked_u = np.ma.masked_array(data['u']) -masked_u[4] = 1000 #Bad value that should not be plotted when masked -masked_u[4] = np.ma.masked - -#Identical plot to panel 2 in the first figure, but with the point at -#(0.5, 0.25) missing (masked) -fig2 = plt.figure() -ax = fig2.add_subplot(1, 1, 1) -ax.barbs(data['x'], data['y'], masked_u, data['v'], length=8, pivot='middle') - -plt.show() diff --git a/dev/mpl_examples/pylab_examples/barb_demo_00.hires.png b/dev/mpl_examples/pylab_examples/barb_demo_00.hires.png deleted file mode 100644 index 1dddc049bef..00000000000 Binary files a/dev/mpl_examples/pylab_examples/barb_demo_00.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/barb_demo_00.pdf b/dev/mpl_examples/pylab_examples/barb_demo_00.pdf deleted file mode 100644 index 49179db5539..00000000000 Binary files a/dev/mpl_examples/pylab_examples/barb_demo_00.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/barb_demo_00.png b/dev/mpl_examples/pylab_examples/barb_demo_00.png deleted file mode 100644 index 68f8a269e31..00000000000 Binary files a/dev/mpl_examples/pylab_examples/barb_demo_00.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/barb_demo_01.hires.png b/dev/mpl_examples/pylab_examples/barb_demo_01.hires.png deleted file mode 100644 index 79c2a430f24..00000000000 Binary files a/dev/mpl_examples/pylab_examples/barb_demo_01.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/barb_demo_01.pdf b/dev/mpl_examples/pylab_examples/barb_demo_01.pdf deleted file mode 100644 index 20a989fa956..00000000000 Binary files a/dev/mpl_examples/pylab_examples/barb_demo_01.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/barb_demo_01.png b/dev/mpl_examples/pylab_examples/barb_demo_01.png deleted file mode 100644 index c91caf8f444..00000000000 Binary files a/dev/mpl_examples/pylab_examples/barb_demo_01.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/barchart_demo.hires.png b/dev/mpl_examples/pylab_examples/barchart_demo.hires.png deleted file mode 100644 index 8d4749c01ad..00000000000 Binary files a/dev/mpl_examples/pylab_examples/barchart_demo.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/barchart_demo.pdf b/dev/mpl_examples/pylab_examples/barchart_demo.pdf deleted file mode 100644 index 26afbfbeb46..00000000000 Binary files a/dev/mpl_examples/pylab_examples/barchart_demo.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/barchart_demo.png b/dev/mpl_examples/pylab_examples/barchart_demo.png deleted file mode 100644 index a160d8aa8a2..00000000000 Binary files a/dev/mpl_examples/pylab_examples/barchart_demo.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/barchart_demo.py b/dev/mpl_examples/pylab_examples/barchart_demo.py deleted file mode 100644 index e71357d743e..00000000000 --- a/dev/mpl_examples/pylab_examples/barchart_demo.py +++ /dev/null @@ -1,43 +0,0 @@ -""" -Bar chart demo with pairs of bars grouped for easy comparison. -""" -import numpy as np -import matplotlib.pyplot as plt - - -n_groups = 5 - -means_men = (20, 35, 30, 35, 27) -std_men = (2, 3, 4, 1, 2) - -means_women = (25, 32, 34, 20, 25) -std_women = (3, 5, 2, 3, 3) - -index = np.arange(n_groups) -bar_width = 0.35 - -opacity = 0.4 -error_config = {'ecolor': '0.3'} - -rects1 = plt.bar(index, means_men, bar_width, - alpha=opacity, - color='b', - yerr=std_men, - error_kw=error_config, - label='Men') - -rects2 = plt.bar(index + bar_width, means_women, bar_width, - alpha=opacity, - color='r', - yerr=std_women, - error_kw=error_config, - label='Women') - -plt.xlabel('Group') -plt.ylabel('Scores') -plt.title('Scores by group and gender') -plt.xticks(index + bar_width, ('A', 'B', 'C', 'D', 'E')) -plt.legend() - -plt.tight_layout() -plt.show() diff --git a/dev/mpl_examples/pylab_examples/barchart_demo2.hires.png b/dev/mpl_examples/pylab_examples/barchart_demo2.hires.png deleted file mode 100644 index 84fb6a3f4cf..00000000000 Binary files a/dev/mpl_examples/pylab_examples/barchart_demo2.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/barchart_demo2.pdf b/dev/mpl_examples/pylab_examples/barchart_demo2.pdf deleted file mode 100644 index 6545ed18ce3..00000000000 Binary files a/dev/mpl_examples/pylab_examples/barchart_demo2.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/barchart_demo2.png b/dev/mpl_examples/pylab_examples/barchart_demo2.png deleted file mode 100644 index 87c173f6622..00000000000 Binary files a/dev/mpl_examples/pylab_examples/barchart_demo2.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/barchart_demo2.py b/dev/mpl_examples/pylab_examples/barchart_demo2.py deleted file mode 100644 index 0886fe8fded..00000000000 --- a/dev/mpl_examples/pylab_examples/barchart_demo2.py +++ /dev/null @@ -1,107 +0,0 @@ -""" -Thanks Josh Hemann for the example - -This examples comes from an application in which grade school gym -teachers wanted to be able to show parents how their child did across -a handful of fitness tests, and importantly, relative to how other -children did. To extract the plotting code for demo purposes, we'll -just make up some data for little Johnny Doe... - -""" -import numpy as np -import matplotlib.pyplot as plt -import pylab -from matplotlib.patches import Polygon -from matplotlib.ticker import MaxNLocator - - - -student = 'Johnny Doe' -grade = 2 -gender = 'boy' -cohortSize = 62 #The number of other 2nd grade boys - -numTests = 5 -testNames = ['Pacer Test', 'Flexed Arm\n Hang', 'Mile Run', 'Agility', - 'Push Ups'] -testMeta = ['laps', 'sec', 'min:sec', 'sec', ''] -scores = ['7', '48', '12:52', '17', '14'] -rankings = np.round(np.random.uniform(0, 1, numTests)*100, 0) - -fig = plt.figure(figsize=(9,7)) -ax1 = fig.add_subplot(111) -plt.subplots_adjust(left=0.115, right=0.88) -fig.canvas.set_window_title('Eldorado K-8 Fitness Chart') -pos = np.arange(numTests)+0.5 #Center bars on the Y-axis ticks -rects = ax1.barh(pos, rankings, align='center', height=0.5, color='m') - -ax1.axis([0,100,0,5]) -pylab.yticks(pos, testNames) -ax1.set_title('Johnny Doe') -plt.text(50, -0.5, 'Cohort Size: ' + str(cohortSize), - horizontalalignment='center', size='small') - -# Set the right-hand Y-axis ticks and labels and set X-axis tick marks at the -# deciles -ax2 = ax1.twinx() -ax2.plot([100,100], [0, 5], 'white', alpha=0.1) -ax2.xaxis.set_major_locator(MaxNLocator(11)) -xticks = pylab.setp(ax2, xticklabels=['0','10','20','30','40','50','60', -'70', - '80','90','100']) -ax2.xaxis.grid(True, linestyle='--', which='major', color='grey', -alpha=0.25) -#Plot a solid vertical gridline to highlight the median position -plt.plot([50,50], [0, 5], 'grey', alpha=0.25) - -# Build up the score labels for the right Y-axis by first appending a carriage -# return to each string and then tacking on the appropriate meta information -# (i.e., 'laps' vs 'seconds'). We want the labels centered on the ticks, so if -# there is no meta info (like for pushups) then don't add the carriage return to -# the string - -def withnew(i, scr): - if testMeta[i] != '' : return '%s\n'%scr - else: return scr -scoreLabels = [withnew(i, scr) for i,scr in enumerate(scores)] -scoreLabels = [i+j for i,j in zip(scoreLabels, testMeta)] -pylab.yticks(pos, scoreLabels) -ax2.set_ylabel('Test Scores') -#Make list of numerical suffixes corresponding to position in a list -# 0 1 2 3 4 5 6 7 8 9 -suffixes =['th', 'st', 'nd', 'rd', 'th', 'th', 'th', 'th', 'th', 'th'] -ax2.set_xlabel('Percentile Ranking Across ' + str(grade) + suffixes[grade] \ - + ' Grade ' + gender.title() + 's') - -# Lastly, write in the ranking inside each bar to aid in interpretation -for rect in rects: - # Rectangle widths are already integer-valued but are floating - # type, so it helps to remove the trailing decimal point and 0 by - # converting width to int type - width = int(rect.get_width()) - - # Figure out what the last digit (width modulo 10) so we can add - # the appropriate numerical suffix (e.g., 1st, 2nd, 3rd, etc) - lastDigit = width % 10 - # Note that 11, 12, and 13 are special cases - if (width == 11) or (width == 12) or (width == 13): - suffix = 'th' - else: - suffix = suffixes[lastDigit] - - rankStr = str(width) + suffix - if (width < 5): # The bars aren't wide enough to print the ranking inside - xloc = width + 1 # Shift the text to the right side of the right edge - clr = 'black' # Black against white background - align = 'left' - else: - xloc = 0.98*width # Shift the text to the left side of the right edge - clr = 'white' # White on magenta - align = 'right' - - yloc = rect.get_y()+rect.get_height()/2.0 #Center the text vertically in the bar - ax1.text(xloc, yloc, rankStr, horizontalalignment=align, - verticalalignment='center', color=clr, weight='bold') - -plt.show() - diff --git a/dev/mpl_examples/pylab_examples/barcode_demo.hires.png b/dev/mpl_examples/pylab_examples/barcode_demo.hires.png deleted file mode 100644 index adb6c1f76ee..00000000000 Binary files a/dev/mpl_examples/pylab_examples/barcode_demo.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/barcode_demo.pdf b/dev/mpl_examples/pylab_examples/barcode_demo.pdf deleted file mode 100644 index d7939c1ce83..00000000000 Binary files a/dev/mpl_examples/pylab_examples/barcode_demo.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/barcode_demo.png b/dev/mpl_examples/pylab_examples/barcode_demo.png deleted file mode 100644 index ba11e409db1..00000000000 Binary files a/dev/mpl_examples/pylab_examples/barcode_demo.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/barcode_demo.py b/dev/mpl_examples/pylab_examples/barcode_demo.py deleted file mode 100644 index 2e4eba0c1b1..00000000000 --- a/dev/mpl_examples/pylab_examples/barcode_demo.py +++ /dev/null @@ -1,26 +0,0 @@ -from matplotlib.pyplot import figure, show, cm -from numpy import where -from numpy.random import rand - -# the bar -x = where(rand(500)>0.7, 1.0, 0.0) - -axprops = dict(xticks=[], yticks=[]) -barprops = dict(aspect='auto', cmap=cm.binary, interpolation='nearest') - -fig = figure() - -# a vertical barcode -- this is broken at present -x.shape = len(x), 1 -ax = fig.add_axes([0.1, 0.3, 0.1, 0.6], **axprops) -ax.imshow(x, **barprops) - -x = x.copy() -# a horizontal barcode -x.shape = 1, len(x) -ax = fig.add_axes([0.3, 0.1, 0.6, 0.1], **axprops) -ax.imshow(x, **barprops) - - -show() - diff --git a/dev/mpl_examples/pylab_examples/barh_demo.py b/dev/mpl_examples/pylab_examples/barh_demo.py deleted file mode 100644 index 0daef263fd3..00000000000 --- a/dev/mpl_examples/pylab_examples/barh_demo.py +++ /dev/null @@ -1,20 +0,0 @@ -#!/usr/bin/env python -# make a horizontal bar chart - -from pylab import * -val = 3+10*rand(5) # the bar lengths -pos = arange(5)+.5 # the bar centers on the y axis - -figure(1) -barh(pos,val, align='center') -yticks(pos, ('Tom', 'Dick', 'Harry', 'Slim', 'Jim')) -xlabel('Performance') -title('How fast do you want to go today?') -grid(True) - -figure(2) -barh(pos,val, xerr=rand(5), ecolor='r', align='center') -yticks(pos, ('Tom', 'Dick', 'Harry', 'Slim', 'Jim')) -xlabel('Performance') - -show() diff --git a/dev/mpl_examples/pylab_examples/barh_demo_00.hires.png b/dev/mpl_examples/pylab_examples/barh_demo_00.hires.png deleted file mode 100644 index 1318e56e8a6..00000000000 Binary files a/dev/mpl_examples/pylab_examples/barh_demo_00.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/barh_demo_00.pdf b/dev/mpl_examples/pylab_examples/barh_demo_00.pdf deleted file mode 100644 index b6e5be6b05d..00000000000 Binary files a/dev/mpl_examples/pylab_examples/barh_demo_00.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/barh_demo_00.png b/dev/mpl_examples/pylab_examples/barh_demo_00.png deleted file mode 100644 index 0475157c815..00000000000 Binary files a/dev/mpl_examples/pylab_examples/barh_demo_00.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/barh_demo_01.hires.png b/dev/mpl_examples/pylab_examples/barh_demo_01.hires.png deleted file mode 100644 index c330857484f..00000000000 Binary files a/dev/mpl_examples/pylab_examples/barh_demo_01.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/barh_demo_01.pdf b/dev/mpl_examples/pylab_examples/barh_demo_01.pdf deleted file mode 100644 index 1916335219b..00000000000 Binary files a/dev/mpl_examples/pylab_examples/barh_demo_01.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/barh_demo_01.png b/dev/mpl_examples/pylab_examples/barh_demo_01.png deleted file mode 100644 index 877f5586503..00000000000 Binary files a/dev/mpl_examples/pylab_examples/barh_demo_01.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/boxplot_demo.py b/dev/mpl_examples/pylab_examples/boxplot_demo.py deleted file mode 100644 index d220adc3541..00000000000 --- a/dev/mpl_examples/pylab_examples/boxplot_demo.py +++ /dev/null @@ -1,58 +0,0 @@ -#!/usr/bin/python - -# -# Example boxplot code -# - -from pylab import * - -# fake up some data -spread= rand(50) * 100 -center = ones(25) * 50 -flier_high = rand(10) * 100 + 100 -flier_low = rand(10) * -100 -data =concatenate((spread, center, flier_high, flier_low), 0) - -# basic plot -boxplot(data) - -# notched plot -figure() -boxplot(data,1) - -# change outlier point symbols -figure() -boxplot(data,0,'gD') - -# don't show outlier points -figure() -boxplot(data,0,'') - -# horizontal boxes -figure() -boxplot(data,0,'rs',0) - -# change whisker length -figure() -boxplot(data,0,'rs',0,0.75) - -# fake up some more data -spread= rand(50) * 100 -center = ones(25) * 40 -flier_high = rand(10) * 100 + 100 -flier_low = rand(10) * -100 -d2 = concatenate( (spread, center, flier_high, flier_low), 0 ) -data.shape = (-1, 1) -d2.shape = (-1, 1) -#data = concatenate( (data, d2), 1 ) -# Making a 2-D array only works if all the columns are the -# same length. If they are not, then use a list instead. -# This is actually more efficient because boxplot converts -# a 2-D array into a list of vectors internally anyway. -data = [data, d2, d2[::2,0]] -# multiple box plots on one figure -figure() -boxplot(data) - -show() - diff --git a/dev/mpl_examples/pylab_examples/boxplot_demo2.hires.png b/dev/mpl_examples/pylab_examples/boxplot_demo2.hires.png deleted file mode 100644 index a8c1cfd08f4..00000000000 Binary files a/dev/mpl_examples/pylab_examples/boxplot_demo2.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/boxplot_demo2.pdf b/dev/mpl_examples/pylab_examples/boxplot_demo2.pdf deleted file mode 100644 index 5fe03cfc8ad..00000000000 Binary files a/dev/mpl_examples/pylab_examples/boxplot_demo2.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/boxplot_demo2.png b/dev/mpl_examples/pylab_examples/boxplot_demo2.png deleted file mode 100644 index 59dc5773867..00000000000 Binary files a/dev/mpl_examples/pylab_examples/boxplot_demo2.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/boxplot_demo2.py b/dev/mpl_examples/pylab_examples/boxplot_demo2.py deleted file mode 100644 index 6f4c9ad3e87..00000000000 --- a/dev/mpl_examples/pylab_examples/boxplot_demo2.py +++ /dev/null @@ -1,121 +0,0 @@ -""" -Thanks Josh Hemann for the example -""" - -import numpy as np -import matplotlib.pyplot as plt -from matplotlib.patches import Polygon - - -# Generate some data from five different probability distributions, -# each with different characteristics. We want to play with how an IID -# bootstrap resample of the data preserves the distributional -# properties of the original sample, and a boxplot is one visual tool -# to make this assessment -numDists = 5 -randomDists = ['Normal(1,1)',' Lognormal(1,1)', 'Exp(1)', 'Gumbel(6,4)', - 'Triangular(2,9,11)'] -N = 500 -norm = np.random.normal(1,1, N) -logn = np.random.lognormal(1,1, N) -expo = np.random.exponential(1, N) -gumb = np.random.gumbel(6, 4, N) -tria = np.random.triangular(2, 9, 11, N) - -# Generate some random indices that we'll use to resample the original data -# arrays. For code brevity, just use the same random indices for each array -bootstrapIndices = np.random.random_integers(0, N-1, N) -normBoot = norm[bootstrapIndices] -expoBoot = expo[bootstrapIndices] -gumbBoot = gumb[bootstrapIndices] -lognBoot = logn[bootstrapIndices] -triaBoot = tria[bootstrapIndices] - -data = [norm, normBoot, logn, lognBoot, expo, expoBoot, gumb, gumbBoot, - tria, triaBoot] - -fig = plt.figure(figsize=(10,6)) -fig.canvas.set_window_title('A Boxplot Example') -ax1 = fig.add_subplot(111) -plt.subplots_adjust(left=0.075, right=0.95, top=0.9, bottom=0.25) - -bp = plt.boxplot(data, notch=0, sym='+', vert=1, whis=1.5) -plt.setp(bp['boxes'], color='black') -plt.setp(bp['whiskers'], color='black') -plt.setp(bp['fliers'], color='red', marker='+') - -# Add a horizontal grid to the plot, but make it very light in color -# so we can use it for reading data values but not be distracting -ax1.yaxis.grid(True, linestyle='-', which='major', color='lightgrey', - alpha=0.5) - -# Hide these grid behind plot objects -ax1.set_axisbelow(True) -ax1.set_title('Comparison of IID Bootstrap Resampling Across Five Distributions') -ax1.set_xlabel('Distribution') -ax1.set_ylabel('Value') - -# Now fill the boxes with desired colors -boxColors = ['darkkhaki','royalblue'] -numBoxes = numDists*2 -medians = range(numBoxes) -for i in range(numBoxes): - box = bp['boxes'][i] - boxX = [] - boxY = [] - for j in range(5): - boxX.append(box.get_xdata()[j]) - boxY.append(box.get_ydata()[j]) - boxCoords = zip(boxX,boxY) - # Alternate between Dark Khaki and Royal Blue - k = i % 2 - boxPolygon = Polygon(boxCoords, facecolor=boxColors[k]) - ax1.add_patch(boxPolygon) - # Now draw the median lines back over what we just filled in - med = bp['medians'][i] - medianX = [] - medianY = [] - for j in range(2): - medianX.append(med.get_xdata()[j]) - medianY.append(med.get_ydata()[j]) - plt.plot(medianX, medianY, 'k') - medians[i] = medianY[0] - # Finally, overplot the sample averages, with horizontal alignment - # in the center of each box - plt.plot([np.average(med.get_xdata())], [np.average(data[i])], - color='w', marker='*', markeredgecolor='k') - -# Set the axes ranges and axes labels -ax1.set_xlim(0.5, numBoxes+0.5) -top = 40 -bottom = -5 -ax1.set_ylim(bottom, top) -xtickNames = plt.setp(ax1, xticklabels=np.repeat(randomDists, 2)) -plt.setp(xtickNames, rotation=45, fontsize=8) - -# Due to the Y-axis scale being different across samples, it can be -# hard to compare differences in medians across the samples. Add upper -# X-axis tick labels with the sample medians to aid in comparison -# (just use two decimal places of precision) -pos = np.arange(numBoxes)+1 -upperLabels = [str(np.round(s, 2)) for s in medians] -weights = ['bold', 'semibold'] -for tick,label in zip(range(numBoxes),ax1.get_xticklabels()): - k = tick % 2 - ax1.text(pos[tick], top-(top*0.05), upperLabels[tick], - horizontalalignment='center', size='x-small', weight=weights[k], - color=boxColors[k]) - -# Finally, add a basic legend -plt.figtext(0.80, 0.08, str(N) + ' Random Numbers' , - backgroundcolor=boxColors[0], color='black', weight='roman', - size='x-small') -plt.figtext(0.80, 0.045, 'IID Bootstrap Resample', -backgroundcolor=boxColors[1], - color='white', weight='roman', size='x-small') -plt.figtext(0.80, 0.015, '*', color='white', backgroundcolor='silver', - weight='roman', size='medium') -plt.figtext(0.815, 0.013, ' Average Value', color='black', weight='roman', - size='x-small') - -plt.show() diff --git a/dev/mpl_examples/pylab_examples/boxplot_demo3.hires.png b/dev/mpl_examples/pylab_examples/boxplot_demo3.hires.png deleted file mode 100644 index 8b99ed789aa..00000000000 Binary files a/dev/mpl_examples/pylab_examples/boxplot_demo3.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/boxplot_demo3.pdf b/dev/mpl_examples/pylab_examples/boxplot_demo3.pdf deleted file mode 100644 index 5887fa98f22..00000000000 Binary files a/dev/mpl_examples/pylab_examples/boxplot_demo3.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/boxplot_demo3.png b/dev/mpl_examples/pylab_examples/boxplot_demo3.png deleted file mode 100644 index 8617db018a4..00000000000 Binary files a/dev/mpl_examples/pylab_examples/boxplot_demo3.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/boxplot_demo3.py b/dev/mpl_examples/pylab_examples/boxplot_demo3.py deleted file mode 100644 index fe7e5b77a3d..00000000000 --- a/dev/mpl_examples/pylab_examples/boxplot_demo3.py +++ /dev/null @@ -1,49 +0,0 @@ -import matplotlib.pyplot as plt -import matplotlib.transforms as mtransforms -import numpy as np - -def fakeBootStrapper(n): - ''' - This is just a placeholder for the user's method of - bootstrapping the median and its confidence intervals. - - Returns an arbitrary median and confidence intervals - packed into a tuple - ''' - if n == 1: - med = 0.1 - CI = (-0.25, 0.25) - else: - med = 0.2 - CI = (-0.35, 0.50) - - return med, CI - - - -np.random.seed(2) -inc = 0.1 -e1 = np.random.normal(0, 1, size=(500,)) -e2 = np.random.normal(0, 1, size=(500,)) -e3 = np.random.normal(0, 1 + inc, size=(500,)) -e4 = np.random.normal(0, 1 + 2*inc, size=(500,)) - -treatments = [e1,e2,e3,e4] -med1, CI1 = fakeBootStrapper(1) -med2, CI2 = fakeBootStrapper(2) -medians = [None, None, med1, med2] -conf_intervals = [None, None, CI1, CI2] - -fig = plt.figure() -ax = fig.add_subplot(111) -pos = np.array(range(len(treatments)))+1 -bp = ax.boxplot(treatments, sym='k+', positions=pos, - notch=1, bootstrap=5000, - usermedians=medians, - conf_intervals=conf_intervals) - -ax.set_xlabel('treatment') -ax.set_ylabel('response') -plt.setp(bp['whiskers'], color='k', linestyle='-' ) -plt.setp(bp['fliers'], markersize=3.0) -plt.show() diff --git a/dev/mpl_examples/pylab_examples/boxplot_demo_00.hires.png b/dev/mpl_examples/pylab_examples/boxplot_demo_00.hires.png deleted file mode 100644 index c72f1f71efb..00000000000 Binary files a/dev/mpl_examples/pylab_examples/boxplot_demo_00.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/boxplot_demo_00.pdf b/dev/mpl_examples/pylab_examples/boxplot_demo_00.pdf deleted file mode 100644 index a8eab18a127..00000000000 Binary files a/dev/mpl_examples/pylab_examples/boxplot_demo_00.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/boxplot_demo_00.png b/dev/mpl_examples/pylab_examples/boxplot_demo_00.png deleted file mode 100644 index 1cfca29d061..00000000000 Binary files a/dev/mpl_examples/pylab_examples/boxplot_demo_00.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/boxplot_demo_01.hires.png b/dev/mpl_examples/pylab_examples/boxplot_demo_01.hires.png deleted file mode 100644 index d505f1a28ee..00000000000 Binary files a/dev/mpl_examples/pylab_examples/boxplot_demo_01.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/boxplot_demo_01.pdf b/dev/mpl_examples/pylab_examples/boxplot_demo_01.pdf deleted file mode 100644 index 3090618de06..00000000000 Binary files a/dev/mpl_examples/pylab_examples/boxplot_demo_01.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/boxplot_demo_01.png b/dev/mpl_examples/pylab_examples/boxplot_demo_01.png deleted file mode 100644 index ccbcdbd9f29..00000000000 Binary files a/dev/mpl_examples/pylab_examples/boxplot_demo_01.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/boxplot_demo_02.hires.png b/dev/mpl_examples/pylab_examples/boxplot_demo_02.hires.png deleted file mode 100644 index 1e51258e645..00000000000 Binary files a/dev/mpl_examples/pylab_examples/boxplot_demo_02.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/boxplot_demo_02.pdf b/dev/mpl_examples/pylab_examples/boxplot_demo_02.pdf deleted file mode 100644 index 7ce7a6e504d..00000000000 Binary files a/dev/mpl_examples/pylab_examples/boxplot_demo_02.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/boxplot_demo_02.png b/dev/mpl_examples/pylab_examples/boxplot_demo_02.png deleted file mode 100644 index eb3f719cff0..00000000000 Binary files a/dev/mpl_examples/pylab_examples/boxplot_demo_02.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/boxplot_demo_03.hires.png b/dev/mpl_examples/pylab_examples/boxplot_demo_03.hires.png deleted file mode 100644 index 4d00911cdd8..00000000000 Binary files a/dev/mpl_examples/pylab_examples/boxplot_demo_03.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/boxplot_demo_03.pdf b/dev/mpl_examples/pylab_examples/boxplot_demo_03.pdf deleted file mode 100644 index 56846c0740e..00000000000 Binary files a/dev/mpl_examples/pylab_examples/boxplot_demo_03.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/boxplot_demo_03.png b/dev/mpl_examples/pylab_examples/boxplot_demo_03.png deleted file mode 100644 index 209f713ffff..00000000000 Binary files a/dev/mpl_examples/pylab_examples/boxplot_demo_03.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/boxplot_demo_04.hires.png b/dev/mpl_examples/pylab_examples/boxplot_demo_04.hires.png deleted file mode 100644 index ff3e936f7ec..00000000000 Binary files a/dev/mpl_examples/pylab_examples/boxplot_demo_04.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/boxplot_demo_04.pdf b/dev/mpl_examples/pylab_examples/boxplot_demo_04.pdf deleted file mode 100644 index a82dae9f227..00000000000 Binary files a/dev/mpl_examples/pylab_examples/boxplot_demo_04.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/boxplot_demo_04.png b/dev/mpl_examples/pylab_examples/boxplot_demo_04.png deleted file mode 100644 index 30dd8832e8f..00000000000 Binary files a/dev/mpl_examples/pylab_examples/boxplot_demo_04.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/boxplot_demo_05.hires.png b/dev/mpl_examples/pylab_examples/boxplot_demo_05.hires.png deleted file mode 100644 index 7b308f49451..00000000000 Binary files a/dev/mpl_examples/pylab_examples/boxplot_demo_05.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/boxplot_demo_05.pdf b/dev/mpl_examples/pylab_examples/boxplot_demo_05.pdf deleted file mode 100644 index 071b1c6c676..00000000000 Binary files a/dev/mpl_examples/pylab_examples/boxplot_demo_05.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/boxplot_demo_05.png b/dev/mpl_examples/pylab_examples/boxplot_demo_05.png deleted file mode 100644 index 72edd5507e6..00000000000 Binary files a/dev/mpl_examples/pylab_examples/boxplot_demo_05.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/boxplot_demo_06.hires.png b/dev/mpl_examples/pylab_examples/boxplot_demo_06.hires.png deleted file mode 100644 index 7e62b87e599..00000000000 Binary files a/dev/mpl_examples/pylab_examples/boxplot_demo_06.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/boxplot_demo_06.pdf b/dev/mpl_examples/pylab_examples/boxplot_demo_06.pdf deleted file mode 100644 index 5604b46d781..00000000000 Binary files a/dev/mpl_examples/pylab_examples/boxplot_demo_06.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/boxplot_demo_06.png b/dev/mpl_examples/pylab_examples/boxplot_demo_06.png deleted file mode 100644 index 45c364db183..00000000000 Binary files a/dev/mpl_examples/pylab_examples/boxplot_demo_06.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/break.hires.png b/dev/mpl_examples/pylab_examples/break.hires.png deleted file mode 100644 index 65a1dd8055a..00000000000 Binary files a/dev/mpl_examples/pylab_examples/break.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/break.pdf b/dev/mpl_examples/pylab_examples/break.pdf deleted file mode 100644 index 889e46feef0..00000000000 Binary files a/dev/mpl_examples/pylab_examples/break.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/break.png b/dev/mpl_examples/pylab_examples/break.png deleted file mode 100644 index ad7431781cc..00000000000 Binary files a/dev/mpl_examples/pylab_examples/break.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/break.py b/dev/mpl_examples/pylab_examples/break.py deleted file mode 100644 index 6b1f6142d1d..00000000000 --- a/dev/mpl_examples/pylab_examples/break.py +++ /dev/null @@ -1,8 +0,0 @@ -#!/usr/bin/env python -from pylab import * - - -gcf().text(0.5, 0.95, - 'Distance Histograms by Category is a really long title') - -show() diff --git a/dev/mpl_examples/pylab_examples/broken_axis.hires.png b/dev/mpl_examples/pylab_examples/broken_axis.hires.png deleted file mode 100644 index d1537891bda..00000000000 Binary files a/dev/mpl_examples/pylab_examples/broken_axis.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/broken_axis.pdf b/dev/mpl_examples/pylab_examples/broken_axis.pdf deleted file mode 100644 index f7d931d7aab..00000000000 Binary files a/dev/mpl_examples/pylab_examples/broken_axis.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/broken_axis.png b/dev/mpl_examples/pylab_examples/broken_axis.png deleted file mode 100644 index 96acb141784..00000000000 Binary files a/dev/mpl_examples/pylab_examples/broken_axis.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/broken_axis.py b/dev/mpl_examples/pylab_examples/broken_axis.py deleted file mode 100644 index a5927d9132c..00000000000 --- a/dev/mpl_examples/pylab_examples/broken_axis.py +++ /dev/null @@ -1,61 +0,0 @@ -""" -Broken axis example, where the y-axis will have a portion cut out. -""" -import matplotlib.pylab as plt -import numpy as np - - -# 30 points between 0 0.2] originally made using np.random.rand(30)*.2 -pts = np.array([ 0.015, 0.166, 0.133, 0.159, 0.041, 0.024, 0.195, - 0.039, 0.161, 0.018, 0.143, 0.056, 0.125, 0.096, 0.094, 0.051, - 0.043, 0.021, 0.138, 0.075, 0.109, 0.195, 0.05 , 0.074, 0.079, - 0.155, 0.02 , 0.01 , 0.061, 0.008]) - -# Now let's make two outlier points which are far away from everything. -pts[[3,14]] += .8 - -# If we were to simply plot pts, we'd lose most of the interesting -# details due to the outliers. So let's 'break' or 'cut-out' the y-axis -# into two portions - use the top (ax) for the outliers, and the bottom -# (ax2) for the details of the majority of our data -f,(ax,ax2) = plt.subplots(2,1,sharex=True) - -# plot the same data on both axes -ax.plot(pts) -ax2.plot(pts) - -# zoom-in / limit the view to different portions of the data -ax.set_ylim(.78,1.) # outliers only -ax2.set_ylim(0,.22) # most of the data - -# hide the spines between ax and ax2 -ax.spines['bottom'].set_visible(False) -ax2.spines['top'].set_visible(False) -ax.xaxis.tick_top() -ax.tick_params(labeltop='off') # don't put tick labels at the top -ax2.xaxis.tick_bottom() - -# This looks pretty good, and was fairly painless, but you can get that -# cut-out diagonal lines look with just a bit more work. The important -# thing to know here is that in axes coordinates, which are always -# between 0-1, spine endpoints are at these locations (0,0), (0,1), -# (1,0), and (1,1). Thus, we just need to put the diagonals in the -# appropriate corners of each of our axes, and so long as we use the -# right transform and disable clipping. - -d = .015 # how big to make the diagonal lines in axes coordinates -# arguments to pass plot, just so we don't keep repeating them -kwargs = dict(transform=ax.transAxes, color='k', clip_on=False) -ax.plot((-d,+d),(-d,+d), **kwargs) # top-left diagonal -ax.plot((1-d,1+d),(-d,+d), **kwargs) # top-right diagonal - -kwargs.update(transform=ax2.transAxes) # switch to the bottom axes -ax2.plot((-d,+d),(1-d,1+d), **kwargs) # bottom-left diagonal -ax2.plot((1-d,1+d),(1-d,1+d), **kwargs) # bottom-right diagonal - -# What's cool about this is that now if we vary the distance between -# ax and ax2 via f.subplots_adjust(hspace=...) or plt.subplot_tool(), -# the diagonal lines will move accordingly, and stay right at the tips -# of the spines they are 'breaking' - -plt.show() diff --git a/dev/mpl_examples/pylab_examples/broken_barh.hires.png b/dev/mpl_examples/pylab_examples/broken_barh.hires.png deleted file mode 100644 index e28490893a3..00000000000 Binary files a/dev/mpl_examples/pylab_examples/broken_barh.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/broken_barh.pdf b/dev/mpl_examples/pylab_examples/broken_barh.pdf deleted file mode 100644 index 1daa340eddd..00000000000 Binary files a/dev/mpl_examples/pylab_examples/broken_barh.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/broken_barh.png b/dev/mpl_examples/pylab_examples/broken_barh.png deleted file mode 100644 index 50d6fa1cdaf..00000000000 Binary files a/dev/mpl_examples/pylab_examples/broken_barh.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/broken_barh.py b/dev/mpl_examples/pylab_examples/broken_barh.py deleted file mode 100644 index 3d427e61f61..00000000000 --- a/dev/mpl_examples/pylab_examples/broken_barh.py +++ /dev/null @@ -1,23 +0,0 @@ -""" -Make a "broken" horizontal bar plot, ie one with gaps -""" -import matplotlib.pyplot as plt - -fig = plt.figure() -ax = fig.add_subplot(111) -ax.broken_barh([ (110, 30), (150, 10) ] , (10, 9), facecolors='blue') -ax.broken_barh([ (10, 50), (100, 20), (130, 10)] , (20, 9), - facecolors=('red', 'yellow', 'green')) -ax.set_ylim(5,35) -ax.set_xlim(0,200) -ax.set_xlabel('seconds since start') -ax.set_yticks([15,25]) -ax.set_yticklabels(['Bill', 'Jim']) -ax.grid(True) -ax.annotate('race interrupted', (61, 25), - xytext=(0.8, 0.9), textcoords='axes fraction', - arrowprops=dict(facecolor='black', shrink=0.05), - fontsize=16, - horizontalalignment='right', verticalalignment='top') - -plt.show() diff --git a/dev/mpl_examples/pylab_examples/centered_ticklabels.hires.png b/dev/mpl_examples/pylab_examples/centered_ticklabels.hires.png deleted file mode 100644 index ca931c09971..00000000000 Binary files a/dev/mpl_examples/pylab_examples/centered_ticklabels.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/centered_ticklabels.pdf b/dev/mpl_examples/pylab_examples/centered_ticklabels.pdf deleted file mode 100644 index f2d292b8977..00000000000 Binary files a/dev/mpl_examples/pylab_examples/centered_ticklabels.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/centered_ticklabels.png b/dev/mpl_examples/pylab_examples/centered_ticklabels.png deleted file mode 100644 index ae05ab9acf4..00000000000 Binary files a/dev/mpl_examples/pylab_examples/centered_ticklabels.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/centered_ticklabels.py b/dev/mpl_examples/pylab_examples/centered_ticklabels.py deleted file mode 100644 index b6e40deb50f..00000000000 --- a/dev/mpl_examples/pylab_examples/centered_ticklabels.py +++ /dev/null @@ -1,45 +0,0 @@ -# sometimes it is nice to have ticklabels centered. mpl currently -# associates a label with a tick, and the label can be aligned -# 'center', 'left', or 'right' using the horizontal alignment property: -# -# -# for label in ax.xaxis.get_xticklabels(): -# label.set_horizontalalignment('right') -# -# -# but this doesn't help center the label between ticks. One solution -# is to "face it". Use the minor ticks to place a tick centered -# between the major ticks. Here is an example that labels the months, -# centered between the ticks - -import datetime -import numpy as np -import matplotlib -import matplotlib.cbook as cbook -import matplotlib.dates as dates -import matplotlib.ticker as ticker -import matplotlib.pyplot as plt - -# load some financial data; apple's stock price -fh = cbook.get_sample_data('aapl.npy.gz') -r = np.load(fh); fh.close() -r = r[-250:] # get the last 250 days - -fig = plt.figure() -ax = fig.add_subplot(111) -ax.plot(r.date, r.adj_close) - -ax.xaxis.set_major_locator(dates.MonthLocator()) -ax.xaxis.set_minor_locator(dates.MonthLocator(bymonthday=15)) - -ax.xaxis.set_major_formatter(ticker.NullFormatter()) -ax.xaxis.set_minor_formatter(dates.DateFormatter('%b')) - -for tick in ax.xaxis.get_minor_ticks(): - tick.tick1line.set_markersize(0) - tick.tick2line.set_markersize(0) - tick.label1.set_horizontalalignment('center') - -imid = len(r)/2 -ax.set_xlabel(str(r.date[imid].year)) -plt.show() diff --git a/dev/mpl_examples/pylab_examples/clippedline.hires.png b/dev/mpl_examples/pylab_examples/clippedline.hires.png deleted file mode 100644 index 12b453f11cd..00000000000 Binary files a/dev/mpl_examples/pylab_examples/clippedline.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/clippedline.pdf b/dev/mpl_examples/pylab_examples/clippedline.pdf deleted file mode 100644 index b2437b5e2a0..00000000000 Binary files a/dev/mpl_examples/pylab_examples/clippedline.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/clippedline.png b/dev/mpl_examples/pylab_examples/clippedline.png deleted file mode 100644 index b5e12533d08..00000000000 Binary files a/dev/mpl_examples/pylab_examples/clippedline.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/clippedline.py b/dev/mpl_examples/pylab_examples/clippedline.py deleted file mode 100644 index 03e67db1a24..00000000000 --- a/dev/mpl_examples/pylab_examples/clippedline.py +++ /dev/null @@ -1,60 +0,0 @@ -""" -Clip a line according to the current xlimits, and change the marker -style when zoomed in. - -It is not clear this example is still needed or valid; clipping -is now automatic for Line2D objects when x is sorted in -ascending order. - -""" - -from matplotlib.lines import Line2D -import numpy as np -from pylab import figure, show - -class ClippedLine(Line2D): - """ - Clip the xlimits to the axes view limits -- this example assumes x is sorted - """ - - def __init__(self, ax, *args, **kwargs): - Line2D.__init__(self, *args, **kwargs) - self.ax = ax - - - def set_data(self, *args, **kwargs): - Line2D.set_data(self, *args, **kwargs) - self.recache() - self.xorig = np.array(self._x) - self.yorig = np.array(self._y) - - def draw(self, renderer): - xlim = self.ax.get_xlim() - - ind0, ind1 = np.searchsorted(self.xorig, xlim) - self._x = self.xorig[ind0:ind1] - self._y = self.yorig[ind0:ind1] - N = len(self._x) - if N<1000: - self._marker = 's' - self._linestyle = '-' - else: - self._marker = None - self._linestyle = '-' - - - Line2D.draw(self, renderer) - - -fig = figure() -ax = fig.add_subplot(111, autoscale_on=False) - -t = np.arange(0.0, 100.0, 0.01) -s = np.sin(2*np.pi*t) -line = ClippedLine(ax, t, s, color='g', ls='-', lw=2) -ax.add_line(line) -ax.set_xlim(10,30) -ax.set_ylim(-1.1,1.1) -show() - - diff --git a/dev/mpl_examples/pylab_examples/cohere_demo.hires.png b/dev/mpl_examples/pylab_examples/cohere_demo.hires.png deleted file mode 100644 index 43a52b1961b..00000000000 Binary files a/dev/mpl_examples/pylab_examples/cohere_demo.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/cohere_demo.pdf b/dev/mpl_examples/pylab_examples/cohere_demo.pdf deleted file mode 100644 index 28522b98cd9..00000000000 Binary files a/dev/mpl_examples/pylab_examples/cohere_demo.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/cohere_demo.png b/dev/mpl_examples/pylab_examples/cohere_demo.png deleted file mode 100644 index 7ca0d4474e0..00000000000 Binary files a/dev/mpl_examples/pylab_examples/cohere_demo.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/cohere_demo.py b/dev/mpl_examples/pylab_examples/cohere_demo.py deleted file mode 100644 index 52e0fc32a06..00000000000 --- a/dev/mpl_examples/pylab_examples/cohere_demo.py +++ /dev/null @@ -1,36 +0,0 @@ -#!/usr/bin/env python -""" -Compute the coherence of two signals -""" -import numpy as np -import matplotlib.pyplot as plt - -# make a little extra space between the subplots -plt.subplots_adjust(wspace=0.5) - -dt = 0.01 -t = np.arange(0, 30, dt) -nse1 = np.random.randn(len(t)) # white noise 1 -nse2 = np.random.randn(len(t)) # white noise 2 -r = np.exp(-t/0.05) - -cnse1 = np.convolve(nse1, r, mode='same')*dt # colored noise 1 -cnse2 = np.convolve(nse2, r, mode='same')*dt # colored noise 2 - -# two signals with a coherent part and a random part -s1 = 0.01*np.sin(2*np.pi*10*t) + cnse1 -s2 = 0.01*np.sin(2*np.pi*10*t) + cnse2 - -plt.subplot(211) -plt.plot(t, s1, 'b-', t, s2, 'g-') -plt.xlim(0,5) -plt.xlabel('time') -plt.ylabel('s1 and s2') -plt.grid(True) - -plt.subplot(212) -cxy, f = plt.cohere(s1, s2, 256, 1./dt) -plt.ylabel('coherence') -plt.show() - - diff --git a/dev/mpl_examples/pylab_examples/color_by_yvalue.hires.png b/dev/mpl_examples/pylab_examples/color_by_yvalue.hires.png deleted file mode 100644 index 260c5c526dd..00000000000 Binary files a/dev/mpl_examples/pylab_examples/color_by_yvalue.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/color_by_yvalue.pdf b/dev/mpl_examples/pylab_examples/color_by_yvalue.pdf deleted file mode 100644 index 7e7ca0bf7f0..00000000000 Binary files a/dev/mpl_examples/pylab_examples/color_by_yvalue.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/color_by_yvalue.png b/dev/mpl_examples/pylab_examples/color_by_yvalue.png deleted file mode 100644 index 5a875bc70f9..00000000000 Binary files a/dev/mpl_examples/pylab_examples/color_by_yvalue.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/color_by_yvalue.py b/dev/mpl_examples/pylab_examples/color_by_yvalue.py deleted file mode 100644 index 5d5eca36552..00000000000 --- a/dev/mpl_examples/pylab_examples/color_by_yvalue.py +++ /dev/null @@ -1,18 +0,0 @@ -# use masked arrays to plot a line with different colors by y-value -from numpy import logical_or, arange, sin, pi -from numpy import ma -from matplotlib.pyplot import plot, show - -t = arange(0.0, 2.0, 0.01) -s = sin(2*pi*t) - -upper = 0.77 -lower = -0.77 - - -supper = ma.masked_where(s < upper, s) -slower = ma.masked_where(s > lower, s) -smiddle = ma.masked_where(logical_or(supper), s) - -plot(t, slower, 'r', t, smiddle, 'b', t, supper, 'g') -show() diff --git a/dev/mpl_examples/pylab_examples/color_demo.hires.png b/dev/mpl_examples/pylab_examples/color_demo.hires.png deleted file mode 100644 index 814a5d16102..00000000000 Binary files a/dev/mpl_examples/pylab_examples/color_demo.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/color_demo.pdf b/dev/mpl_examples/pylab_examples/color_demo.pdf deleted file mode 100644 index 56d851595fe..00000000000 Binary files a/dev/mpl_examples/pylab_examples/color_demo.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/color_demo.png b/dev/mpl_examples/pylab_examples/color_demo.png deleted file mode 100644 index 10cf549701b..00000000000 Binary files a/dev/mpl_examples/pylab_examples/color_demo.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/color_demo.py b/dev/mpl_examples/pylab_examples/color_demo.py deleted file mode 100644 index c700ce3ef6a..00000000000 --- a/dev/mpl_examples/pylab_examples/color_demo.py +++ /dev/null @@ -1,26 +0,0 @@ -#!/usr/bin/env python -""" -matplotlib gives you 4 ways to specify colors, - - 1) as a single letter string, ala MATLAB - - 2) as an html style hex string or html color name - - 3) as an R,G,B tuple, where R,G,B, range from 0-1 - - 4) as a string representing a floating point number - from 0 to 1, corresponding to shades of gray. - -See help(colors) for more info. -""" -from pylab import * - -subplot(111, axisbg='darkslategray') -#subplot(111, axisbg='#ababab') -t = arange(0.0, 2.0, 0.01) -s = sin(2*pi*t) -plot(t, s, 'y') -xlabel('time (s)', color='r') -ylabel('voltage (mV)', color='0.5') # grayscale color -title('About as silly as it gets, folks', color='#afeeee') -show() diff --git a/dev/mpl_examples/pylab_examples/colorbar_tick_labelling_demo.py b/dev/mpl_examples/pylab_examples/colorbar_tick_labelling_demo.py deleted file mode 100644 index 63c84232a04..00000000000 --- a/dev/mpl_examples/pylab_examples/colorbar_tick_labelling_demo.py +++ /dev/null @@ -1,36 +0,0 @@ -"""Produce custom labelling for a colorbar. - -Contributed by Scott Sinclair -""" - -import matplotlib.pyplot as plt -import numpy as np -from matplotlib import cm -from numpy.random import randn - -# Make plot with vertical (default) colorbar -fig = plt.figure() -ax = fig.add_subplot(111) - -data = np.clip(randn(250, 250), -1, 1) - -cax = ax.imshow(data, interpolation='nearest', cmap=cm.coolwarm) -ax.set_title('Gaussian noise with vertical colorbar') - -# Add colorbar, make sure to specify tick locations to match desired ticklabels -cbar = fig.colorbar(cax, ticks=[-1, 0, 1]) -cbar.ax.set_yticklabels(['< -1', '0', '> 1'])# vertically oriented colorbar - -# Make plot with horizontal colorbar -fig = plt.figure() -ax = fig.add_subplot(111) - -data = np.clip(randn(250, 250), -1, 1) - -cax = ax.imshow(data, interpolation='nearest', cmap=cm.afmhot) -ax.set_title('Gaussian noise with horizontal colorbar') - -cbar = fig.colorbar(cax, ticks=[-1, 0, 1], orientation='horizontal') -cbar.ax.set_xticklabels(['Low', 'Medium', 'High'])# horizontal colorbar - -plt.show() diff --git a/dev/mpl_examples/pylab_examples/colorbar_tick_labelling_demo_00.hires.png b/dev/mpl_examples/pylab_examples/colorbar_tick_labelling_demo_00.hires.png deleted file mode 100644 index 90894b582b6..00000000000 Binary files a/dev/mpl_examples/pylab_examples/colorbar_tick_labelling_demo_00.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/colorbar_tick_labelling_demo_00.pdf b/dev/mpl_examples/pylab_examples/colorbar_tick_labelling_demo_00.pdf deleted file mode 100644 index c28595d466f..00000000000 Binary files a/dev/mpl_examples/pylab_examples/colorbar_tick_labelling_demo_00.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/colorbar_tick_labelling_demo_00.png b/dev/mpl_examples/pylab_examples/colorbar_tick_labelling_demo_00.png deleted file mode 100644 index 0d49e8dba9f..00000000000 Binary files a/dev/mpl_examples/pylab_examples/colorbar_tick_labelling_demo_00.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/colorbar_tick_labelling_demo_01.hires.png b/dev/mpl_examples/pylab_examples/colorbar_tick_labelling_demo_01.hires.png deleted file mode 100644 index e78266749f7..00000000000 Binary files a/dev/mpl_examples/pylab_examples/colorbar_tick_labelling_demo_01.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/colorbar_tick_labelling_demo_01.pdf b/dev/mpl_examples/pylab_examples/colorbar_tick_labelling_demo_01.pdf deleted file mode 100644 index b71d03c11b5..00000000000 Binary files a/dev/mpl_examples/pylab_examples/colorbar_tick_labelling_demo_01.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/colorbar_tick_labelling_demo_01.png b/dev/mpl_examples/pylab_examples/colorbar_tick_labelling_demo_01.png deleted file mode 100644 index 10b029cc466..00000000000 Binary files a/dev/mpl_examples/pylab_examples/colorbar_tick_labelling_demo_01.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/contour_demo.py b/dev/mpl_examples/pylab_examples/contour_demo.py deleted file mode 100644 index c4d1e0fdc84..00000000000 --- a/dev/mpl_examples/pylab_examples/contour_demo.py +++ /dev/null @@ -1,114 +0,0 @@ -#!/usr/bin/env python -""" -Illustrate simple contour plotting, contours on an image with -a colorbar for the contours, and labelled contours. - -See also contour_image.py. -""" -import matplotlib -import numpy as np -import matplotlib.cm as cm -import matplotlib.mlab as mlab -import matplotlib.pyplot as plt - -matplotlib.rcParams['xtick.direction'] = 'out' -matplotlib.rcParams['ytick.direction'] = 'out' - -delta = 0.025 -x = np.arange(-3.0, 3.0, delta) -y = np.arange(-2.0, 2.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) -# difference of Gaussians -Z = 10.0 * (Z2 - Z1) - - - -# Create a simple contour plot with labels using default colors. The -# inline argument to clabel will control whether the labels are draw -# over the line segments of the contour, removing the lines beneath -# the label -plt.figure() -CS = plt.contour(X, Y, Z) -plt.clabel(CS, inline=1, fontsize=10) -plt.title('Simplest default with labels') - - -# contour labels can be placed manually by providing list of positions -# (in data coordinate). See ginput_manual_clabel.py for interactive -# placement. -plt.figure() -CS = plt.contour(X, Y, Z) -manual_locations = [(-1, -1.4), (-0.62, -0.7), (-2, 0.5), (1.7, 1.2), (2.0, 1.4), (2.4, 1.7)] -plt.clabel(CS, inline=1, fontsize=10, manual=manual_locations) -plt.title('labels at selected locations') - - -# You can force all the contours to be the same color. -plt.figure() -CS = plt.contour(X, Y, Z, 6, - colors='k', # negative contours will be dashed by default - ) -plt.clabel(CS, fontsize=9, inline=1) -plt.title('Single color - negative contours dashed') - -# You can set negative contours to be solid instead of dashed: -matplotlib.rcParams['contour.negative_linestyle'] = 'solid' -plt.figure() -CS = plt.contour(X, Y, Z, 6, - colors='k', # negative contours will be dashed by default - ) -plt.clabel(CS, fontsize=9, inline=1) -plt.title('Single color - negative contours solid') - - -# And you can manually specify the colors of the contour -plt.figure() -CS = plt.contour(X, Y, Z, 6, - linewidths=np.arange(.5, 4, .5), - colors=('r', 'green', 'blue', (1,1,0), '#afeeee', '0.5') - ) -plt.clabel(CS, fontsize=9, inline=1) -plt.title('Crazy lines') - - -# Or you can use a colormap to specify the colors; the default -# colormap will be used for the contour lines -plt.figure() -im = plt.imshow(Z, interpolation='bilinear', origin='lower', - cmap=cm.gray, extent=(-3,3,-2,2)) -levels = np.arange(-1.2, 1.6, 0.2) -CS = plt.contour(Z, levels, - origin='lower', - linewidths=2, - extent=(-3,3,-2,2)) - -#Thicken the zero contour. -zc = CS.collections[6] -plt.setp(zc, linewidth=4) - -plt.clabel(CS, levels[1::2], # label every second level - inline=1, - fmt='%1.1f', - fontsize=14) - -# make a colorbar for the contour lines -CB = plt.colorbar(CS, shrink=0.8, extend='both') - -plt.title('Lines with colorbar') -#plt.hot() # Now change the colormap for the contour lines and colorbar -plt.flag() - -# We can still add a colorbar for the image, too. -CBI = plt.colorbar(im, orientation='horizontal', shrink=0.8) - -# This makes the original colorbar look a bit out of place, -# so let's improve its position. - -l,b,w,h = plt.gca().get_position().bounds -ll,bb,ww,hh = CB.ax.get_position().bounds -CB.ax.set_position([ll, b+0.1*h, ww, h*0.8]) - - -plt.show() diff --git a/dev/mpl_examples/pylab_examples/contour_demo_00.hires.png b/dev/mpl_examples/pylab_examples/contour_demo_00.hires.png deleted file mode 100644 index a7558a0bd8a..00000000000 Binary files a/dev/mpl_examples/pylab_examples/contour_demo_00.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/contour_demo_00.pdf b/dev/mpl_examples/pylab_examples/contour_demo_00.pdf deleted file mode 100644 index e4fe4371552..00000000000 Binary files a/dev/mpl_examples/pylab_examples/contour_demo_00.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/contour_demo_00.png b/dev/mpl_examples/pylab_examples/contour_demo_00.png deleted file mode 100644 index 67c8850aa32..00000000000 Binary files a/dev/mpl_examples/pylab_examples/contour_demo_00.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/contour_demo_01.hires.png b/dev/mpl_examples/pylab_examples/contour_demo_01.hires.png deleted file mode 100644 index 9de340e1ae3..00000000000 Binary files a/dev/mpl_examples/pylab_examples/contour_demo_01.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/contour_demo_01.pdf b/dev/mpl_examples/pylab_examples/contour_demo_01.pdf deleted file mode 100644 index 97dbd0b045b..00000000000 Binary files a/dev/mpl_examples/pylab_examples/contour_demo_01.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/contour_demo_01.png b/dev/mpl_examples/pylab_examples/contour_demo_01.png deleted file mode 100644 index fd1fe8769b8..00000000000 Binary files a/dev/mpl_examples/pylab_examples/contour_demo_01.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/contour_demo_02.hires.png b/dev/mpl_examples/pylab_examples/contour_demo_02.hires.png deleted file mode 100644 index a5e68a02612..00000000000 Binary files a/dev/mpl_examples/pylab_examples/contour_demo_02.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/contour_demo_02.pdf b/dev/mpl_examples/pylab_examples/contour_demo_02.pdf deleted file mode 100644 index adf7561ce1e..00000000000 Binary files a/dev/mpl_examples/pylab_examples/contour_demo_02.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/contour_demo_02.png b/dev/mpl_examples/pylab_examples/contour_demo_02.png deleted file mode 100644 index 5f0fb74c5de..00000000000 Binary files a/dev/mpl_examples/pylab_examples/contour_demo_02.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/contour_demo_03.hires.png b/dev/mpl_examples/pylab_examples/contour_demo_03.hires.png deleted file mode 100644 index 1fffda3d33f..00000000000 Binary files a/dev/mpl_examples/pylab_examples/contour_demo_03.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/contour_demo_03.pdf b/dev/mpl_examples/pylab_examples/contour_demo_03.pdf deleted file mode 100644 index f87f18a494f..00000000000 Binary files a/dev/mpl_examples/pylab_examples/contour_demo_03.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/contour_demo_03.png b/dev/mpl_examples/pylab_examples/contour_demo_03.png deleted file mode 100644 index de262b5940b..00000000000 Binary files a/dev/mpl_examples/pylab_examples/contour_demo_03.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/contour_demo_04.hires.png b/dev/mpl_examples/pylab_examples/contour_demo_04.hires.png deleted file mode 100644 index 66a31fc39b8..00000000000 Binary files a/dev/mpl_examples/pylab_examples/contour_demo_04.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/contour_demo_04.pdf b/dev/mpl_examples/pylab_examples/contour_demo_04.pdf deleted file mode 100644 index a919f0b1787..00000000000 Binary files a/dev/mpl_examples/pylab_examples/contour_demo_04.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/contour_demo_04.png b/dev/mpl_examples/pylab_examples/contour_demo_04.png deleted file mode 100644 index d7b30dcc310..00000000000 Binary files a/dev/mpl_examples/pylab_examples/contour_demo_04.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/contour_demo_05.hires.png b/dev/mpl_examples/pylab_examples/contour_demo_05.hires.png deleted file mode 100644 index 57d280bc642..00000000000 Binary files a/dev/mpl_examples/pylab_examples/contour_demo_05.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/contour_demo_05.pdf b/dev/mpl_examples/pylab_examples/contour_demo_05.pdf deleted file mode 100644 index 8e802dca1cb..00000000000 Binary files a/dev/mpl_examples/pylab_examples/contour_demo_05.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/contour_demo_05.png b/dev/mpl_examples/pylab_examples/contour_demo_05.png deleted file mode 100644 index 2605daec437..00000000000 Binary files a/dev/mpl_examples/pylab_examples/contour_demo_05.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/contour_image.hires.png b/dev/mpl_examples/pylab_examples/contour_image.hires.png deleted file mode 100644 index 1df3c6cde50..00000000000 Binary files a/dev/mpl_examples/pylab_examples/contour_image.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/contour_image.pdf b/dev/mpl_examples/pylab_examples/contour_image.pdf deleted file mode 100644 index bc580d07124..00000000000 Binary files a/dev/mpl_examples/pylab_examples/contour_image.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/contour_image.png b/dev/mpl_examples/pylab_examples/contour_image.png deleted file mode 100644 index 6c2101fd51a..00000000000 Binary files a/dev/mpl_examples/pylab_examples/contour_image.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/contour_image.py b/dev/mpl_examples/pylab_examples/contour_image.py deleted file mode 100644 index db42fcbcd1c..00000000000 --- a/dev/mpl_examples/pylab_examples/contour_image.py +++ /dev/null @@ -1,106 +0,0 @@ -#!/usr/bin/env python -''' -Test combinations of contouring, filled contouring, and image plotting. -For contour labelling, see contour_demo.py. - -The emphasis in this demo is on showing how to make contours register -correctly on images, and on how to get both of them oriented as -desired. In particular, note the usage of the "origin" and "extent" -keyword arguments to imshow and contour. -''' -from pylab import * - -#Default delta is large because that makes it fast, and it illustrates -# the correct registration between image and contours. -delta = 0.5 - -extent = (-3,4,-4,3) - -x = arange(-3.0, 4.001, delta) -y = arange(-4.0, 3.001, delta) -X, Y = meshgrid(x, y) -Z1 = bivariate_normal(X, Y, 1.0, 1.0, 0.0, 0.0) -Z2 = bivariate_normal(X, Y, 1.5, 0.5, 1, 1) -Z = (Z1 - Z2) * 10 - -levels = arange(-2.0, 1.601, 0.4) # Boost the upper limit to avoid truncation - # errors. - -norm = cm.colors.Normalize(vmax=abs(Z).max(), vmin=-abs(Z).max()) -cmap = cm.PRGn - -figure() - - -subplot(2,2,1) - -cset1 = contourf(X, Y, Z, levels, - cmap=cm.get_cmap(cmap, len(levels)-1), - norm=norm, - ) -# It is not necessary, but for the colormap, we need only the -# number of levels minus 1. To avoid discretization error, use -# either this number or a large number such as the default (256). - -#If we want lines as well as filled regions, we need to call -# contour separately; don't try to change the edgecolor or edgewidth -# of the polygons in the collections returned by contourf. -# Use levels output from previous call to guarantee they are the same. -cset2 = contour(X, Y, Z, cset1.levels, - colors = 'k', - hold='on') -# We don't really need dashed contour lines to indicate negative -# regions, so let's turn them off. -for c in cset2.collections: - c.set_linestyle('solid') - -# It is easier here to make a separate call to contour than -# to set up an array of colors and linewidths. -# We are making a thick green line as a zero contour. -# Specify the zero level as a tuple with only 0 in it. -cset3 = contour(X, Y, Z, (0,), - colors = 'g', - linewidths = 2, - hold='on') -title('Filled contours') -colorbar(cset1) -#hot() - - -subplot(2,2,2) - -imshow(Z, extent=extent, cmap=cmap, norm=norm) -v = axis() -contour(Z, levels, hold='on', colors = 'k', - origin='upper', extent=extent) -axis(v) -title("Image, origin 'upper'") - -subplot(2,2,3) - -imshow(Z, origin='lower', extent=extent, cmap=cmap, norm=norm) -v = axis() -contour(Z, levels, hold='on', colors = 'k', - origin='lower', extent=extent) -axis(v) -title("Image, origin 'lower'") - -subplot(2,2,4) - -# We will use the interpolation "nearest" here to show the actual -# image pixels. -# Note that the contour lines don't extend to the edge of the box. -# This is intentional. The Z values are defined at the center of each -# image pixel (each color block on the following subplot), so the -# domain that is contoured does not extend beyond these pixel centers. -im = imshow(Z, interpolation='nearest', extent=extent, cmap=cmap, norm=norm) -v = axis() -contour(Z, levels, hold='on', colors = 'k', - origin='image', extent=extent) -axis(v) -ylim = get(gca(), 'ylim') -setp(gca(), ylim=ylim[::-1]) -title("Image, origin from rc, reversed y-axis") -colorbar(im) - -show() diff --git a/dev/mpl_examples/pylab_examples/contour_label_demo.py b/dev/mpl_examples/pylab_examples/contour_label_demo.py deleted file mode 100644 index 6d24dd6c66b..00000000000 --- a/dev/mpl_examples/pylab_examples/contour_label_demo.py +++ /dev/null @@ -1,87 +0,0 @@ -#!/usr/bin/env python -""" -Illustrate some of the more advanced things that one can do with -contour labels. - -See also contour_demo.py. -""" -import matplotlib -import numpy as np -import matplotlib.cm as cm -import matplotlib.mlab as mlab -import matplotlib.ticker as ticker -import matplotlib.pyplot as plt - -matplotlib.rcParams['xtick.direction'] = 'out' -matplotlib.rcParams['ytick.direction'] = 'out' - -################################################## -# Define our surface -################################################## -delta = 0.025 -x = np.arange(-3.0, 3.0, delta) -y = np.arange(-2.0, 2.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) -# difference of Gaussians -Z = 10.0 * (Z2 - Z1) - -################################################## -# Make contour labels using creative float classes -# Follows suggestion of Manuel Metz -################################################## -plt.figure() - -# Basic contour plot -CS = plt.contour(X, Y, Z) - -# Define a class that forces representation of float to look a certain way -# This remove trailing zero so '1.0' becomes '1' -class nf(float): - def __repr__(self): - str = '%.1f' % (self.__float__(),) - if str[-1]=='0': - return '%.0f' % self.__float__() - else: - return '%.1f' % self.__float__() - -# Recast levels to new class -CS.levels = [nf(val) for val in CS.levels ] - -# Label levels with specially formatted floats -if plt.rcParams["text.usetex"]: - fmt = r'%r \%%' -else: - fmt = '%r %%' -plt.clabel(CS, CS.levels, inline=True, fmt=fmt, fontsize=10) - -################################################## -# Label contours with arbitrary strings using a -# dictionary -################################################## -plt.figure() - -# Basic contour plot -CS = plt.contour(X, Y, Z) - -fmt = {} -strs = [ 'first', 'second', 'third', 'fourth', 'fifth', 'sixth', 'seventh' ] -for l,s in zip( CS.levels, strs ): - fmt[l] = s - -# Label every other level using strings -plt.clabel(CS,CS.levels[::2],inline=True,fmt=fmt,fontsize=10) - -# Use a Formatter - -plt.figure() - -CS = plt.contour(X, Y, 100**Z, locator=plt.LogLocator()) -fmt = ticker.LogFormatterMathtext() -fmt.create_dummy_axis() -plt.clabel(CS, CS.levels, fmt=fmt) -plt.title("$100^Z$") - -plt.show() - diff --git a/dev/mpl_examples/pylab_examples/contour_label_demo_00.hires.png b/dev/mpl_examples/pylab_examples/contour_label_demo_00.hires.png deleted file mode 100644 index 740f9d8b19c..00000000000 Binary files a/dev/mpl_examples/pylab_examples/contour_label_demo_00.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/contour_label_demo_00.pdf b/dev/mpl_examples/pylab_examples/contour_label_demo_00.pdf deleted file mode 100644 index b2c9b262b02..00000000000 Binary files a/dev/mpl_examples/pylab_examples/contour_label_demo_00.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/contour_label_demo_00.png b/dev/mpl_examples/pylab_examples/contour_label_demo_00.png deleted file mode 100644 index 9dc8916877d..00000000000 Binary files a/dev/mpl_examples/pylab_examples/contour_label_demo_00.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/contour_label_demo_01.hires.png b/dev/mpl_examples/pylab_examples/contour_label_demo_01.hires.png deleted file mode 100644 index 9b350a90925..00000000000 Binary files a/dev/mpl_examples/pylab_examples/contour_label_demo_01.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/contour_label_demo_01.pdf b/dev/mpl_examples/pylab_examples/contour_label_demo_01.pdf deleted file mode 100644 index ac9067083ee..00000000000 Binary files a/dev/mpl_examples/pylab_examples/contour_label_demo_01.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/contour_label_demo_01.png b/dev/mpl_examples/pylab_examples/contour_label_demo_01.png deleted file mode 100644 index 37503667c6f..00000000000 Binary files a/dev/mpl_examples/pylab_examples/contour_label_demo_01.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/contour_label_demo_02.hires.png b/dev/mpl_examples/pylab_examples/contour_label_demo_02.hires.png deleted file mode 100644 index d79102a2f9d..00000000000 Binary files a/dev/mpl_examples/pylab_examples/contour_label_demo_02.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/contour_label_demo_02.pdf b/dev/mpl_examples/pylab_examples/contour_label_demo_02.pdf deleted file mode 100644 index eaa6af24b6b..00000000000 Binary files a/dev/mpl_examples/pylab_examples/contour_label_demo_02.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/contour_label_demo_02.png b/dev/mpl_examples/pylab_examples/contour_label_demo_02.png deleted file mode 100644 index 625a7cd8a43..00000000000 Binary files a/dev/mpl_examples/pylab_examples/contour_label_demo_02.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/contourf_demo.py b/dev/mpl_examples/pylab_examples/contourf_demo.py deleted file mode 100644 index a7859bb59fa..00000000000 --- a/dev/mpl_examples/pylab_examples/contourf_demo.py +++ /dev/null @@ -1,107 +0,0 @@ -#!/usr/bin/env python -import numpy as np -import matplotlib.pyplot as plt - -origin = 'lower' -#origin = 'upper' - -delta = 0.025 - -x = y = np.arange(-3.0, 3.01, delta) -X, Y = np.meshgrid(x, y) -Z1 = plt.mlab.bivariate_normal(X, Y, 1.0, 1.0, 0.0, 0.0) -Z2 = plt.mlab.bivariate_normal(X, Y, 1.5, 0.5, 1, 1) -Z = 10 * (Z1 - Z2) - -nr, nc = Z.shape - -# put NaNs in one corner: -Z[-nr//6:, -nc//6:] = np.nan -# contourf will convert these to masked - - -Z = np.ma.array(Z) -# mask another corner: -Z[:nr//6, :nc//6] = np.ma.masked - -# mask a circle in the middle: -interior = np.sqrt((X**2) + (Y**2)) < 0.5 -Z[interior] = np.ma.masked - - -# We are using automatic selection of contour levels; -# this is usually not such a good idea, because they don't -# occur on nice boundaries, but we do it here for purposes -# of illustration. -CS = plt.contourf(X, Y, Z, 10, # [-1, -0.1, 0, 0.1], - #alpha=0.5, - cmap=plt.cm.bone, - origin=origin) - -# Note that in the following, we explicitly pass in a subset of -# the contour levels used for the filled contours. Alternatively, -# We could pass in additional levels to provide extra resolution, -# or leave out the levels kwarg to use all of the original levels. - -CS2 = plt.contour(CS, levels=CS.levels[::2], - colors = 'r', - origin=origin, - hold='on') - -plt.title('Nonsense (3 masked regions)') -plt.xlabel('word length anomaly') -plt.ylabel('sentence length anomaly') - -# Make a colorbar for the ContourSet returned by the contourf call. -cbar = plt.colorbar(CS) -cbar.ax.set_ylabel('verbosity coefficient') -# Add the contour line levels to the colorbar -cbar.add_lines(CS2) - -plt.figure() - -# Now make a contour plot with the levels specified, -# and with the colormap generated automatically from a list -# of colors. -levels = [-1.5, -1, -0.5, 0, 0.5, 1] -CS3 = plt.contourf(X, Y, Z, levels, - colors = ('r', 'g', 'b'), - origin=origin, - extend='both') -# Our data range extends outside the range of levels; make -# data below the lowest contour level yellow, and above the -# highest level cyan: -CS3.cmap.set_under('yellow') -CS3.cmap.set_over('cyan') - -CS4 = plt.contour(X, Y, Z, levels, - colors = ('k',), - linewidths = (3,), - origin = origin) -plt.title('Listed colors (3 masked regions)') -plt.clabel(CS4, fmt = '%2.1f', colors = 'w', fontsize=14) - -# Notice that the colorbar command gets all the information it -# needs from the ContourSet object, CS3. -plt.colorbar(CS3) - -# Illustrate all 4 possible "extend" settings: -extends = ["neither", "both", "min", "max"] -cmap = plt.cm.get_cmap("winter") -cmap.set_under("magenta") -cmap.set_over("yellow") -# Note: contouring simply excludes masked or nan regions, so -# instead of using the "bad" colormap value for them, it draws -# nothing at all in them. Therefore the following would have -# no effect: -#cmap.set_bad("red") - -fig, axs = plt.subplots(2,2) -for ax, extend in zip(axs.ravel(), extends): - cs = ax.contourf(X, Y, Z, levels, cmap=cmap, extend=extend, origin=origin) - fig.colorbar(cs, ax=ax, shrink=0.9) - ax.set_title("extend = %s" % extend) - ax.locator_params(nbins=4) - -plt.show() - diff --git a/dev/mpl_examples/pylab_examples/contourf_demo_00.hires.png b/dev/mpl_examples/pylab_examples/contourf_demo_00.hires.png deleted file mode 100644 index c9038319a3a..00000000000 Binary files a/dev/mpl_examples/pylab_examples/contourf_demo_00.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/contourf_demo_00.pdf b/dev/mpl_examples/pylab_examples/contourf_demo_00.pdf deleted file mode 100644 index db028120b16..00000000000 Binary files a/dev/mpl_examples/pylab_examples/contourf_demo_00.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/contourf_demo_00.png b/dev/mpl_examples/pylab_examples/contourf_demo_00.png deleted file mode 100644 index 20605f13bca..00000000000 Binary files a/dev/mpl_examples/pylab_examples/contourf_demo_00.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/contourf_demo_01.hires.png b/dev/mpl_examples/pylab_examples/contourf_demo_01.hires.png deleted file mode 100644 index d280eda6b6d..00000000000 Binary files a/dev/mpl_examples/pylab_examples/contourf_demo_01.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/contourf_demo_01.pdf b/dev/mpl_examples/pylab_examples/contourf_demo_01.pdf deleted file mode 100644 index 84da4e7e5e5..00000000000 Binary files a/dev/mpl_examples/pylab_examples/contourf_demo_01.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/contourf_demo_01.png b/dev/mpl_examples/pylab_examples/contourf_demo_01.png deleted file mode 100644 index 5c6ce0e2002..00000000000 Binary files a/dev/mpl_examples/pylab_examples/contourf_demo_01.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/contourf_demo_02.hires.png b/dev/mpl_examples/pylab_examples/contourf_demo_02.hires.png deleted file mode 100644 index 23c58c89b75..00000000000 Binary files a/dev/mpl_examples/pylab_examples/contourf_demo_02.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/contourf_demo_02.pdf b/dev/mpl_examples/pylab_examples/contourf_demo_02.pdf deleted file mode 100644 index fbe6d8758b4..00000000000 Binary files a/dev/mpl_examples/pylab_examples/contourf_demo_02.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/contourf_demo_02.png b/dev/mpl_examples/pylab_examples/contourf_demo_02.png deleted file mode 100644 index 114db83fe43..00000000000 Binary files a/dev/mpl_examples/pylab_examples/contourf_demo_02.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/contourf_hatching.py b/dev/mpl_examples/pylab_examples/contourf_hatching.py deleted file mode 100644 index 21b188e6dac..00000000000 --- a/dev/mpl_examples/pylab_examples/contourf_hatching.py +++ /dev/null @@ -1,45 +0,0 @@ -import matplotlib.pyplot as plt -import numpy as np - - -# invent some numbers, turning the x and y arrays into simple -# 2d arrays, which make combining them together easier. -x = np.linspace(-3, 5, 150).reshape(1, -1) -y = np.linspace(-3, 5, 120).reshape(-1, 1) -z = np.cos(x) + np.sin(y) - -# we no longer need x and y to be 2 dimensional, so flatten them. -x, y = x.flatten(), y.flatten() - - -# --------------------------------------------- -# | Plot #1 | -# --------------------------------------------- -# the simplest hatched plot with a colorbar -fig = plt.figure() -cs = plt.contourf(x, y, z, hatches=['-', '/', '\\', '//'], - cmap=plt.get_cmap('gray'), - extend='both', alpha=0.5 - ) -plt.colorbar() - - -# --------------------------------------------- -# | Plot #2 | -# --------------------------------------------- -# a plot of hatches without color with a legend -plt.figure() -n_levels = 6 -plt.contour(x, y, z, n_levels, colors='black', linestyles='-') -cs = plt.contourf(x, y, z, n_levels, colors='none', - hatches=['.', '/', '\\', None, '\\\\', '*'], - extend='lower' - ) - -# create a legend for the contour set -artists, labels = cs.legend_elements() -plt.legend(artists, labels, handleheight=2) - - - -plt.show() diff --git a/dev/mpl_examples/pylab_examples/contourf_hatching_00.hires.png b/dev/mpl_examples/pylab_examples/contourf_hatching_00.hires.png deleted file mode 100644 index 59ff9d5fcc0..00000000000 Binary files a/dev/mpl_examples/pylab_examples/contourf_hatching_00.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/contourf_hatching_00.pdf b/dev/mpl_examples/pylab_examples/contourf_hatching_00.pdf deleted file mode 100644 index 0c334387cc8..00000000000 Binary files a/dev/mpl_examples/pylab_examples/contourf_hatching_00.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/contourf_hatching_00.png b/dev/mpl_examples/pylab_examples/contourf_hatching_00.png deleted file mode 100644 index 728bd3dd212..00000000000 Binary files a/dev/mpl_examples/pylab_examples/contourf_hatching_00.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/contourf_hatching_01.hires.png b/dev/mpl_examples/pylab_examples/contourf_hatching_01.hires.png deleted file mode 100644 index 4b32a7b4c50..00000000000 Binary files a/dev/mpl_examples/pylab_examples/contourf_hatching_01.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/contourf_hatching_01.pdf b/dev/mpl_examples/pylab_examples/contourf_hatching_01.pdf deleted file mode 100644 index 5a75b4b5a4a..00000000000 Binary files a/dev/mpl_examples/pylab_examples/contourf_hatching_01.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/contourf_hatching_01.png b/dev/mpl_examples/pylab_examples/contourf_hatching_01.png deleted file mode 100644 index 3781aa69b14..00000000000 Binary files a/dev/mpl_examples/pylab_examples/contourf_hatching_01.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/contourf_log.hires.png b/dev/mpl_examples/pylab_examples/contourf_log.hires.png deleted file mode 100644 index 600b3a81b52..00000000000 Binary files a/dev/mpl_examples/pylab_examples/contourf_log.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/contourf_log.pdf b/dev/mpl_examples/pylab_examples/contourf_log.pdf deleted file mode 100644 index a411067ff5b..00000000000 Binary files a/dev/mpl_examples/pylab_examples/contourf_log.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/contourf_log.png b/dev/mpl_examples/pylab_examples/contourf_log.png deleted file mode 100644 index dd2227461c0..00000000000 Binary files a/dev/mpl_examples/pylab_examples/contourf_log.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/contourf_log.py b/dev/mpl_examples/pylab_examples/contourf_log.py deleted file mode 100644 index de24cf0d2f0..00000000000 --- a/dev/mpl_examples/pylab_examples/contourf_log.py +++ /dev/null @@ -1,48 +0,0 @@ -''' -Demonstrate use of a log color scale in contourf -''' - -from matplotlib import pyplot as P -import numpy as np -from numpy import ma -from matplotlib import colors, ticker, cm -from matplotlib.mlab import bivariate_normal - -N = 100 -x = np.linspace(-3.0, 3.0, N) -y = np.linspace(-2.0, 2.0, N) - -X, Y = np.meshgrid(x, y) - -# A low hump with a spike coming out of the top right. -# Needs to have z/colour axis on a log scale so we see both hump and spike. -# linear scale only shows the spike. -z = (bivariate_normal(X, Y, 0.1, 0.2, 1.0, 1.0) - + 0.1 * bivariate_normal(X, Y, 1.0, 1.0, 0.0, 0.0)) - -# Put in some negative values (lower left corner) to cause trouble with logs: -z[:5, :5] = -1 - -# The following is not strictly essential, but it will eliminate -# a warning. Comment it out to see the warning. -z = ma.masked_where(z<= 0, z) - - -# Automatic selection of levels works; setting the -# log locator tells contourf to use a log scale: -cs = P.contourf(X, Y, z, locator=ticker.LogLocator(), cmap=cm.PuBu_r) - -# Alternatively, you can manually set the levels -# and the norm: -#lev_exp = np.arange(np.floor(np.log10(z.min())-1), -# np.ceil(np.log10(z.max())+1)) -#levs = np.power(10, lev_exp) -#cs = P.contourf(X, Y, z, levs, norm=colors.LogNorm()) - -#The 'extend' kwarg does not work yet with a log scale. - -cbar = P.colorbar() - -P.show() - - diff --git a/dev/mpl_examples/pylab_examples/coords_demo.hires.png b/dev/mpl_examples/pylab_examples/coords_demo.hires.png deleted file mode 100644 index 5aa626ac3eb..00000000000 Binary files a/dev/mpl_examples/pylab_examples/coords_demo.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/coords_demo.pdf b/dev/mpl_examples/pylab_examples/coords_demo.pdf deleted file mode 100644 index 9ee9d68c648..00000000000 Binary files a/dev/mpl_examples/pylab_examples/coords_demo.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/coords_demo.png b/dev/mpl_examples/pylab_examples/coords_demo.png deleted file mode 100644 index 482742399cc..00000000000 Binary files a/dev/mpl_examples/pylab_examples/coords_demo.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/coords_demo.py b/dev/mpl_examples/pylab_examples/coords_demo.py deleted file mode 100644 index 9f6cdcb8700..00000000000 --- a/dev/mpl_examples/pylab_examples/coords_demo.py +++ /dev/null @@ -1,39 +0,0 @@ -#!/usr/bin/env python - -""" -An example of how to interact with the plotting canvas by connecting -to move and click events -""" -from __future__ import print_function -import sys -from pylab import * - -t = arange(0.0, 1.0, 0.01) -s = sin(2*pi*t) -ax = subplot(111) -ax.plot(t,s) - - -def on_move(event): - # get the x and y pixel coords - x, y = event.x, event.y - - if event.inaxes: - ax = event.inaxes # the axes instance - print ('data coords %f %f' % (event.xdata, event.ydata)) - -def on_click(event): - # get the x and y coords, flip y from top to bottom - x, y = event.x, event.y - if event.button==1: - if event.inaxes is not None: - print ('data coords %f %f' % (event.xdata, event.ydata)) - -binding_id = connect('motion_notify_event', on_move) -connect('button_press_event', on_click) - -if "test_disconnect" in sys.argv: - print ("disconnecting console coordinate printout...") - disconnect(binding_id) - -show() diff --git a/dev/mpl_examples/pylab_examples/coords_report.hires.png b/dev/mpl_examples/pylab_examples/coords_report.hires.png deleted file mode 100644 index 90906def7f6..00000000000 Binary files a/dev/mpl_examples/pylab_examples/coords_report.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/coords_report.pdf b/dev/mpl_examples/pylab_examples/coords_report.pdf deleted file mode 100644 index 12d774a68bf..00000000000 Binary files a/dev/mpl_examples/pylab_examples/coords_report.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/coords_report.png b/dev/mpl_examples/pylab_examples/coords_report.png deleted file mode 100644 index fa0c9518b0f..00000000000 Binary files a/dev/mpl_examples/pylab_examples/coords_report.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/coords_report.py b/dev/mpl_examples/pylab_examples/coords_report.py deleted file mode 100644 index 9710e887b82..00000000000 --- a/dev/mpl_examples/pylab_examples/coords_report.py +++ /dev/null @@ -1,18 +0,0 @@ -#!/usr/bin/env python - -# override the default reporting of coords - -from pylab import * - -def millions(x): - return '$%1.1fM' % (x*1e-6) - -x = rand(20) -y = 1e7*rand(20) - -ax = subplot(111) -ax.fmt_ydata = millions -plot(x, y, 'o') - -show() - diff --git a/dev/mpl_examples/pylab_examples/csd_demo.hires.png b/dev/mpl_examples/pylab_examples/csd_demo.hires.png deleted file mode 100644 index 5637dc4b7dd..00000000000 Binary files a/dev/mpl_examples/pylab_examples/csd_demo.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/csd_demo.pdf b/dev/mpl_examples/pylab_examples/csd_demo.pdf deleted file mode 100644 index 218354157db..00000000000 Binary files a/dev/mpl_examples/pylab_examples/csd_demo.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/csd_demo.png b/dev/mpl_examples/pylab_examples/csd_demo.png deleted file mode 100644 index 08d746b61b6..00000000000 Binary files a/dev/mpl_examples/pylab_examples/csd_demo.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/csd_demo.py b/dev/mpl_examples/pylab_examples/csd_demo.py deleted file mode 100644 index 86a4963d694..00000000000 --- a/dev/mpl_examples/pylab_examples/csd_demo.py +++ /dev/null @@ -1,36 +0,0 @@ -#!/usr/bin/env python -""" -Compute the cross spectral density of two signals -""" -import numpy as np -import matplotlib.pyplot as plt - -# make a little extra space between the subplots -plt.subplots_adjust(wspace=0.5) - -dt = 0.01 -t = np.arange(0, 30, dt) -nse1 = np.random.randn(len(t)) # white noise 1 -nse2 = np.random.randn(len(t)) # white noise 2 -r = np.exp(-t/0.05) - -cnse1 = np.convolve(nse1, r, mode='same')*dt # colored noise 1 -cnse2 = np.convolve(nse2, r, mode='same')*dt # colored noise 2 - -# two signals with a coherent part and a random part -s1 = 0.01*np.sin(2*np.pi*10*t) + cnse1 -s2 = 0.01*np.sin(2*np.pi*10*t) + cnse2 - -plt.subplot(211) -plt.plot(t, s1, 'b-', t, s2, 'g-') -plt.xlim(0,5) -plt.xlabel('time') -plt.ylabel('s1 and s2') -plt.grid(True) - -plt.subplot(212) -cxy, f = plt.csd(s1, s2, 256, 1./dt) -plt.ylabel('CSD (db)') -plt.show() - - diff --git a/dev/mpl_examples/pylab_examples/custom_cmap.hires.png b/dev/mpl_examples/pylab_examples/custom_cmap.hires.png deleted file mode 100644 index 4f8f44b83ee..00000000000 Binary files a/dev/mpl_examples/pylab_examples/custom_cmap.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/custom_cmap.pdf b/dev/mpl_examples/pylab_examples/custom_cmap.pdf deleted file mode 100644 index 723a3b704e8..00000000000 Binary files a/dev/mpl_examples/pylab_examples/custom_cmap.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/custom_cmap.png b/dev/mpl_examples/pylab_examples/custom_cmap.png deleted file mode 100644 index 80b5aea934d..00000000000 Binary files a/dev/mpl_examples/pylab_examples/custom_cmap.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/custom_cmap.py b/dev/mpl_examples/pylab_examples/custom_cmap.py deleted file mode 100644 index 3a8419b0a80..00000000000 --- a/dev/mpl_examples/pylab_examples/custom_cmap.py +++ /dev/null @@ -1,193 +0,0 @@ -#!/usr/bin/env python - -import numpy as np -import matplotlib.pyplot as plt -from matplotlib.colors import LinearSegmentedColormap - -""" - -Example: suppose you want red to increase from 0 to 1 over the bottom -half, green to do the same over the middle half, and blue over the top -half. Then you would use: - -cdict = {'red': ((0.0, 0.0, 0.0), - (0.5, 1.0, 1.0), - (1.0, 1.0, 1.0)), - - 'green': ((0.0, 0.0, 0.0), - (0.25, 0.0, 0.0), - (0.75, 1.0, 1.0), - (1.0, 1.0, 1.0)), - - 'blue': ((0.0, 0.0, 0.0), - (0.5, 0.0, 0.0), - (1.0, 1.0, 1.0))} - -If, as in this example, there are no discontinuities in the r, g, and b -components, then it is quite simple: the second and third element of -each tuple, above, is the same--call it "y". The first element ("x") -defines interpolation intervals over the full range of 0 to 1, and it -must span that whole range. In other words, the values of x divide the -0-to-1 range into a set of segments, and y gives the end-point color -values for each segment. - -Now consider the green. cdict['green'] is saying that for -0 <= x <= 0.25, y is zero; no green. -0.25 < x <= 0.75, y varies linearly from 0 to 1. -x > 0.75, y remains at 1, full green. - -If there are discontinuities, then it is a little more complicated. -Label the 3 elements in each row in the cdict entry for a given color as -(x, y0, y1). Then for values of x between x[i] and x[i+1] the color -value is interpolated between y1[i] and y0[i+1]. - -Going back to the cookbook example, look at cdict['red']; because y0 != -y1, it is saying that for x from 0 to 0.5, red increases from 0 to 1, -but then it jumps down, so that for x from 0.5 to 1, red increases from -0.7 to 1. Green ramps from 0 to 1 as x goes from 0 to 0.5, then jumps -back to 0, and ramps back to 1 as x goes from 0.5 to 1. - -row i: x y0 y1 - / - / -row i+1: x y0 y1 - -Above is an attempt to show that for x in the range x[i] to x[i+1], the -interpolation is between y1[i] and y0[i+1]. So, y0[0] and y1[-1] are -never used. - -""" - - - -cdict1 = {'red': ((0.0, 0.0, 0.0), - (0.5, 0.0, 0.1), - (1.0, 1.0, 1.0)), - - 'green': ((0.0, 0.0, 0.0), - (1.0, 0.0, 0.0)), - - 'blue': ((0.0, 0.0, 1.0), - (0.5, 0.1, 0.0), - (1.0, 0.0, 0.0)) - } - -cdict2 = {'red': ((0.0, 0.0, 0.0), - (0.5, 0.0, 1.0), - (1.0, 0.1, 1.0)), - - 'green': ((0.0, 0.0, 0.0), - (1.0, 0.0, 0.0)), - - 'blue': ((0.0, 0.0, 0.1), - (0.5, 1.0, 0.0), - (1.0, 0.0, 0.0)) - } - -cdict3 = {'red': ((0.0, 0.0, 0.0), - (0.25,0.0, 0.0), - (0.5, 0.8, 1.0), - (0.75,1.0, 1.0), - (1.0, 0.4, 1.0)), - - 'green': ((0.0, 0.0, 0.0), - (0.25,0.0, 0.0), - (0.5, 0.9, 0.9), - (0.75,0.0, 0.0), - (1.0, 0.0, 0.0)), - - 'blue': ((0.0, 0.0, 0.4), - (0.25,1.0, 1.0), - (0.5, 1.0, 0.8), - (0.75,0.0, 0.0), - (1.0, 0.0, 0.0)) - } - -# Make a modified version of cdict3 with some transparency -# in the middle of the range. -cdict4 = cdict3.copy() -cdict4['alpha'] = ((0.0, 1.0, 1.0), - # (0.25,1.0, 1.0), - (0.5, 0.3, 0.3), - # (0.75,1.0, 1.0), - (1.0, 1.0, 1.0)) - - -# Now we will use this example to illustrate 3 ways of -# handling custom colormaps. -# First, the most direct and explicit: - -blue_red1 = LinearSegmentedColormap('BlueRed1', cdict1) - -# Second, create the map explicitly and register it. -# Like the first method, this method works with any kind -# of Colormap, not just -# a LinearSegmentedColormap: - -blue_red2 = LinearSegmentedColormap('BlueRed2', cdict2) -plt.register_cmap(cmap=blue_red2) - -# Third, for LinearSegmentedColormap only, -# leave everything to register_cmap: - -plt.register_cmap(name='BlueRed3', data=cdict3) # optional lut kwarg -plt.register_cmap(name='BlueRedAlpha', data=cdict4) - -# Make some illustrative fake data: - -x = np.arange(0, np.pi, 0.1) -y = np.arange(0, 2*np.pi, 0.1) -X, Y = np.meshgrid(x,y) -Z = np.cos(X) * np.sin(Y) * 10 - -# Make the figure: - -plt.figure(figsize=(6,9)) -plt.subplots_adjust(left=0.02, bottom=0.06, right=0.95, top=0.94, wspace=0.05) - -# Make 4 subplots: - -plt.subplot(2,2,1) -plt.imshow(Z, interpolation='nearest', cmap=blue_red1) -plt.colorbar() - -plt.subplot(2,2,2) -cmap = plt.get_cmap('BlueRed2') -plt.imshow(Z, interpolation='nearest', cmap=cmap) -plt.colorbar() - -# Now we will set the third cmap as the default. One would -# not normally do this in the middle of a script like this; -# it is done here just to illustrate the method. - -plt.rcParams['image.cmap'] = 'BlueRed3' - -plt.subplot(2,2,3) -plt.imshow(Z, interpolation='nearest') -plt.colorbar() -plt.title("Alpha = 1") - -# Or as yet another variation, we can replace the rcParams -# specification *before* the imshow with the following *after* -# imshow. -# This sets the new default *and* sets the colormap of the last -# image-like item plotted via pyplot, if any. -# - -plt.subplot(2,2,4) -# Draw a line with low zorder so it will be behind the image. -plt.plot([0, 10*np.pi], [0, 20*np.pi], color='c', lw=20, zorder=-1) - -plt.imshow(Z, interpolation='nearest') -plt.colorbar() - -# Here it is: changing the colormap for the current image and its -# colorbar after they have been plotted. -plt.set_cmap('BlueRedAlpha') -plt.title("Varying alpha") -# - -plt.suptitle('Custom Blue-Red colormaps', fontsize=16) - -plt.show() - diff --git a/dev/mpl_examples/pylab_examples/custom_figure_class.hires.png b/dev/mpl_examples/pylab_examples/custom_figure_class.hires.png deleted file mode 100644 index 68cb428dc44..00000000000 Binary files a/dev/mpl_examples/pylab_examples/custom_figure_class.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/custom_figure_class.pdf b/dev/mpl_examples/pylab_examples/custom_figure_class.pdf deleted file mode 100644 index e01ac0e42d4..00000000000 Binary files a/dev/mpl_examples/pylab_examples/custom_figure_class.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/custom_figure_class.png b/dev/mpl_examples/pylab_examples/custom_figure_class.png deleted file mode 100644 index 2b9fccaf21d..00000000000 Binary files a/dev/mpl_examples/pylab_examples/custom_figure_class.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/custom_figure_class.py b/dev/mpl_examples/pylab_examples/custom_figure_class.py deleted file mode 100644 index c9fa67616c8..00000000000 --- a/dev/mpl_examples/pylab_examples/custom_figure_class.py +++ /dev/null @@ -1,21 +0,0 @@ -""" -You can pass a custom Figure constructor to figure if you want to derive from the default Figure. This simple example creates a figure with a figure title -""" -from matplotlib.pyplot import figure, show -from matplotlib.figure import Figure - -class MyFigure(Figure): - def __init__(self, *args, **kwargs): - """ - custom kwarg figtitle is a figure title - """ - figtitle = kwargs.pop('figtitle', 'hi mom') - Figure.__init__(self, *args, **kwargs) - self.text(0.5, 0.95, figtitle, ha='center') - -fig = figure(FigureClass=MyFigure, figtitle='my title') -ax = fig.add_subplot(111) -ax.plot([1,2,3]) - -show() - diff --git a/dev/mpl_examples/pylab_examples/custom_ticker1.hires.png b/dev/mpl_examples/pylab_examples/custom_ticker1.hires.png deleted file mode 100644 index 40c31921d8d..00000000000 Binary files a/dev/mpl_examples/pylab_examples/custom_ticker1.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/custom_ticker1.pdf b/dev/mpl_examples/pylab_examples/custom_ticker1.pdf deleted file mode 100644 index a9fd30586b9..00000000000 Binary files a/dev/mpl_examples/pylab_examples/custom_ticker1.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/custom_ticker1.png b/dev/mpl_examples/pylab_examples/custom_ticker1.png deleted file mode 100644 index 3599c45e540..00000000000 Binary files a/dev/mpl_examples/pylab_examples/custom_ticker1.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/custom_ticker1.py b/dev/mpl_examples/pylab_examples/custom_ticker1.py deleted file mode 100644 index 8dc453f7aca..00000000000 --- a/dev/mpl_examples/pylab_examples/custom_ticker1.py +++ /dev/null @@ -1,29 +0,0 @@ -#!/usr/bin/env python - -""" -The new ticker code was designed to explicitly support user customized -ticking. The documentation -http://matplotlib.org/matplotlib.ticker.html details this -process. That code defines a lot of preset tickers but was primarily -designed to be user extensible. - -In this example a user defined function is used to format the ticks in -millions of dollars on the y axis -""" -from matplotlib.ticker import FuncFormatter -from pylab import * - -x = arange(4) -money = [1.5e5, 2.5e6, 5.5e6, 2.0e7] - -def millions(x, pos): - 'The two args are the value and tick position' - return '$%1.1fM' % (x*1e-6) - -formatter = FuncFormatter(millions) - -ax = subplot(111) -ax.yaxis.set_major_formatter(formatter) -bar(x, money) -xticks( x + 0.5, ('Bill', 'Fred', 'Mary', 'Sue') ) -show() diff --git a/dev/mpl_examples/pylab_examples/customize_rc.hires.png b/dev/mpl_examples/pylab_examples/customize_rc.hires.png deleted file mode 100644 index b3e445128e2..00000000000 Binary files a/dev/mpl_examples/pylab_examples/customize_rc.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/customize_rc.pdf b/dev/mpl_examples/pylab_examples/customize_rc.pdf deleted file mode 100644 index 25bef6ac39b..00000000000 Binary files a/dev/mpl_examples/pylab_examples/customize_rc.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/customize_rc.png b/dev/mpl_examples/pylab_examples/customize_rc.png deleted file mode 100644 index fcd1fc2f636..00000000000 Binary files a/dev/mpl_examples/pylab_examples/customize_rc.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/customize_rc.py b/dev/mpl_examples/pylab_examples/customize_rc.py deleted file mode 100644 index 9715f5f96e1..00000000000 --- a/dev/mpl_examples/pylab_examples/customize_rc.py +++ /dev/null @@ -1,51 +0,0 @@ - -""" -I'm not trying to make a good looking figure here, but just to show -some examples of customizing rc params on the fly - -If you like to work interactively, and need to create different sets -of defaults for figures (eg one set of defaults for publication, one -set for interactive exploration), you may want to define some -functions in a custom module that set the defaults, eg - -def set_pub(): - rc('font', weight='bold') # bold fonts are easier to see - rc('tick', labelsize=15) # tick labels bigger - rc('lines', lw=1, color='k') # thicker black lines (no budget for color!) - rc('grid', c='0.5', ls='-', lw=0.5) # solid gray grid lines - rc('savefig', dpi=300) # higher res outputs - - - -Then as you are working interactively, you just need to do - ->>> set_pub() ->>> subplot(111) ->>> plot([1,2,3]) ->>> savefig('myfig') ->>> rcdefaults() # restore the defaults - -""" -from pylab import * - -subplot(311) -plot([1,2,3]) - -# the axes attributes need to be set before the call to subplot -rc('font', weight='bold') -rc('xtick.major', size=5, pad=7) -rc('xtick', labelsize=15) - -# using aliases for color, linestyle and linewidth; gray, solid, thick -rc('grid', c='0.5', ls='-', lw=5) -rc('lines', lw=2, color='g') -subplot(312) - -plot([1,2,3]) -grid(True) - -rcdefaults() -subplot(313) -plot([1,2,3]) -grid(True) -show() diff --git a/dev/mpl_examples/pylab_examples/dannys_example.hires.png b/dev/mpl_examples/pylab_examples/dannys_example.hires.png deleted file mode 100644 index f80e68f2839..00000000000 Binary files a/dev/mpl_examples/pylab_examples/dannys_example.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/dannys_example.pdf b/dev/mpl_examples/pylab_examples/dannys_example.pdf deleted file mode 100644 index 938b63a029c..00000000000 Binary files a/dev/mpl_examples/pylab_examples/dannys_example.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/dannys_example.png b/dev/mpl_examples/pylab_examples/dannys_example.png deleted file mode 100644 index 6eccb9f62e8..00000000000 Binary files a/dev/mpl_examples/pylab_examples/dannys_example.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/dannys_example.py b/dev/mpl_examples/pylab_examples/dannys_example.py deleted file mode 100644 index 8d8adb56b2f..00000000000 --- a/dev/mpl_examples/pylab_examples/dannys_example.py +++ /dev/null @@ -1,59 +0,0 @@ -import matplotlib -matplotlib.rc('text', usetex = True) -import pylab -import numpy as np - -## interface tracking profiles -N = 500 -delta = 0.6 -X = -1 + 2. * np.arange(N) / (N - 1) -pylab.plot(X, (1 - np.tanh(4. * X / delta)) / 2, ## phase field tanh profiles - X, (X + 1) / 2, ## level set distance function - X, (1.4 + np.tanh(4. * X / delta)) / 4, ## composition profile - X, X < 0, 'k--', ## sharp interface - linewidth = 5) - -## legend -pylab.legend((r'phase field', r'level set', r'composition', r'sharp interface'), shadow = True, loc = (0.01, 0.55)) -ltext = pylab.gca().get_legend().get_texts() -pylab.setp(ltext[0], fontsize = 20, color = 'b') -pylab.setp(ltext[1], fontsize = 20, color = 'g') -pylab.setp(ltext[2], fontsize = 20, color = 'r') -pylab.setp(ltext[3], fontsize = 20, color = 'k') - -## the arrow -height = 0.1 -offset = 0.02 -pylab.plot((-delta / 2., delta / 2), (height, height), 'k', linewidth = 2) -pylab.plot((-delta / 2, -delta / 2 + offset * 2), (height, height - offset), 'k', linewidth = 2) -pylab.plot((-delta / 2, -delta / 2 + offset * 2), (height, height + offset), 'k', linewidth = 2) -pylab.plot((delta / 2, delta / 2 - offset * 2), (height, height - offset), 'k', linewidth = 2) -pylab.plot((delta / 2, delta / 2 - offset * 2), (height, height + offset), 'k', linewidth = 2) -pylab.text(-0.06, height - 0.06, r'$\delta$', {'color' : 'k', 'fontsize' : 24}) - -## X-axis label -pylab.xticks((-1, 0, 1), ('-1', '0', '1'), color = 'k', size = 20) - -## Left Y-axis labels -pylab.ylabel(r'\bf{phase field} $\phi$', {'color' : 'b', - 'fontsize' : 20 }) -pylab.yticks((0, 0.5, 1), ('0', '.5', '1'), color = 'k', size = 20) - -## Right Y-axis labels -pylab.text(1.05, 0.5, r"\bf{level set} $\phi$", {'color' : 'g', 'fontsize' : 20}, - horizontalalignment = 'left', - verticalalignment = 'center', - rotation = 90, - clip_on = False) -pylab.text(1.01, -0.02, "-1", {'color' : 'k', 'fontsize' : 20}) -pylab.text(1.01, 0.98, "1", {'color' : 'k', 'fontsize' : 20}) -pylab.text(1.01, 0.48, "0", {'color' : 'k', 'fontsize' : 20}) - -## level set equations -pylab.text(0.1, 0.85, r'$|\nabla\phi| = 1,$ \newline $ \frac{\partial \phi}{\partial t} + U|\nabla \phi| = 0$', {'color' : 'g', 'fontsize' : 20}) - -## phase field equations -pylab.text(0.2, 0.15, r'$\mathcal{F} = \int f\left( \phi, c \right) dV,$ \newline $ \frac{ \partial \phi } { \partial t } = -M_{ \phi } \frac{ \delta \mathcal{F} } { \delta \phi }$', - {'color' : 'b', 'fontsize' : 20}) - -pylab.show() diff --git a/dev/mpl_examples/pylab_examples/dash_control.hires.png b/dev/mpl_examples/pylab_examples/dash_control.hires.png deleted file mode 100644 index e4e447f8038..00000000000 Binary files a/dev/mpl_examples/pylab_examples/dash_control.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/dash_control.pdf b/dev/mpl_examples/pylab_examples/dash_control.pdf deleted file mode 100644 index 360a4b68ada..00000000000 Binary files a/dev/mpl_examples/pylab_examples/dash_control.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/dash_control.png b/dev/mpl_examples/pylab_examples/dash_control.png deleted file mode 100644 index ebe5876e723..00000000000 Binary files a/dev/mpl_examples/pylab_examples/dash_control.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/dash_control.py b/dev/mpl_examples/pylab_examples/dash_control.py deleted file mode 100644 index 1100882b887..00000000000 --- a/dev/mpl_examples/pylab_examples/dash_control.py +++ /dev/null @@ -1,14 +0,0 @@ -#!/usr/bin/env python - -""" -You can precisely specify dashes with an on/off ink rect sequence in -points. -""" -from pylab import * - -dashes = [5,2,10,5] # 5 points on, 2 off, 3 on, 1 off - -l, = plot(arange(20), '--') -l.set_dashes(dashes) - -show() diff --git a/dev/mpl_examples/pylab_examples/dashpointlabel.hires.png b/dev/mpl_examples/pylab_examples/dashpointlabel.hires.png deleted file mode 100644 index bb5125edb4b..00000000000 Binary files a/dev/mpl_examples/pylab_examples/dashpointlabel.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/dashpointlabel.pdf b/dev/mpl_examples/pylab_examples/dashpointlabel.pdf deleted file mode 100644 index 854947a0cb1..00000000000 Binary files a/dev/mpl_examples/pylab_examples/dashpointlabel.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/dashpointlabel.png b/dev/mpl_examples/pylab_examples/dashpointlabel.png deleted file mode 100644 index 9bce699f936..00000000000 Binary files a/dev/mpl_examples/pylab_examples/dashpointlabel.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/dashpointlabel.py b/dev/mpl_examples/pylab_examples/dashpointlabel.py deleted file mode 100644 index fe5149d5f87..00000000000 --- a/dev/mpl_examples/pylab_examples/dashpointlabel.py +++ /dev/null @@ -1,40 +0,0 @@ -import pylab - -DATA = ((1, 3), - (2, 4), - (3, 1), - (4, 2)) -# dash_style = -# direction, length, (text)rotation, dashrotation, push -# (The parameters are varied to show their effects, -# not for visual appeal). -dash_style = ( - (0, 20, -15, 30, 10), - (1, 30, 0, 15, 10), - (0, 40, 15, 15, 10), - (1, 20, 30, 60, 10), - ) - -fig = pylab.figure() -ax = fig.add_subplot(111) - - -(x,y) = zip(*DATA) -ax.plot(x, y, marker='o') -for i in range(len(DATA)): - (x,y) = DATA[i] - (dd, dl, r, dr, dp) = dash_style[i] - #print 'dashlen call', dl - t = ax.text(x, y, str((x,y)), withdash=True, - dashdirection=dd, - dashlength=dl, - rotation=r, - dashrotation=dr, - dashpush=dp, - ) - -ax.set_xlim((0.0, 5.0)) -ax.set_ylim((0.0, 5.0)) - -pylab.show() - diff --git a/dev/mpl_examples/pylab_examples/data_helper.py b/dev/mpl_examples/pylab_examples/data_helper.py deleted file mode 100644 index c6e83abfc9e..00000000000 --- a/dev/mpl_examples/pylab_examples/data_helper.py +++ /dev/null @@ -1,58 +0,0 @@ -#!/usr/bin/env python -# Some functions to load a return data for the plot demos - -from numpy import fromstring, argsort, take, array, resize -import matplotlib.cbook as cbook -def get_two_stock_data(): - """ - load stock time and price data for two stocks The return values - (d1,p1,d2,p2) are the trade time (in days) and prices for stocks 1 - and 2 (intc and aapl) - """ - ticker1, ticker2 = 'INTC', 'AAPL' - - file1 = cbook.get_sample_data('INTC.dat.gz') - file2 = cbook.get_sample_data('AAPL.dat.gz') - M1 = fromstring( file1.read(), '=len(self.dates) or ind<0: return '' - - return self.dates[ind].strftime(self.fmt) - -formatter = MyFormatter(r.date) - -fig = figure() -ax = fig.add_subplot(111) -ax.xaxis.set_major_formatter(formatter) -ax.plot(numpy.arange(len(r)), r.close, 'o-') -fig.autofmt_xdate() -show() diff --git a/dev/mpl_examples/pylab_examples/demo_agg_filter.hires.png b/dev/mpl_examples/pylab_examples/demo_agg_filter.hires.png deleted file mode 100644 index 24aa973142b..00000000000 Binary files a/dev/mpl_examples/pylab_examples/demo_agg_filter.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/demo_agg_filter.pdf b/dev/mpl_examples/pylab_examples/demo_agg_filter.pdf deleted file mode 100644 index 151a522b2c6..00000000000 Binary files a/dev/mpl_examples/pylab_examples/demo_agg_filter.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/demo_agg_filter.png b/dev/mpl_examples/pylab_examples/demo_agg_filter.png deleted file mode 100644 index 044b1cda6cc..00000000000 Binary files a/dev/mpl_examples/pylab_examples/demo_agg_filter.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/demo_agg_filter.py b/dev/mpl_examples/pylab_examples/demo_agg_filter.py deleted file mode 100644 index 48c1b092d80..00000000000 --- a/dev/mpl_examples/pylab_examples/demo_agg_filter.py +++ /dev/null @@ -1,334 +0,0 @@ -import matplotlib.pyplot as plt - -import numpy as np -import matplotlib.cm as cm -import matplotlib.mlab as mlab - -def smooth1d(x, window_len): - # copied from http://www.scipy.org/Cookbook/SignalSmooth - - s=np.r_[2*x[0]-x[window_len:1:-1],x,2*x[-1]-x[-1:-window_len:-1]] - w = np.hanning(window_len) - y=np.convolve(w/w.sum(),s,mode='same') - return y[window_len-1:-window_len+1] - -def smooth2d(A, sigma=3): - - window_len = max(int(sigma), 3)*2+1 - A1 = np.array([smooth1d(x, window_len) for x in np.asarray(A)]) - A2 = np.transpose(A1) - A3 = np.array([smooth1d(x, window_len) for x in A2]) - A4 = np.transpose(A3) - - return A4 - - - - -class BaseFilter(object): - def prepare_image(self, src_image, dpi, pad): - ny, nx, depth = src_image.shape - #tgt_image = np.zeros([pad*2+ny, pad*2+nx, depth], dtype="d") - padded_src = np.zeros([pad*2+ny, pad*2+nx, depth], dtype="d") - padded_src[pad:-pad, pad:-pad,:] = src_image[:,:,:] - - return padded_src#, tgt_image - - def get_pad(self, dpi): - return 0 - - def __call__(self, im, dpi): - pad = self.get_pad(dpi) - padded_src = self.prepare_image(im, dpi, pad) - tgt_image = self.process_image(padded_src, dpi) - return tgt_image, -pad, -pad - - -class OffsetFilter(BaseFilter): - def __init__(self, offsets=None): - if offsets is None: - self.offsets = (0, 0) - else: - self.offsets = offsets - - def get_pad(self, dpi): - return int(max(*self.offsets)/72.*dpi) - - def process_image(self, padded_src, dpi): - ox, oy = self.offsets - a1 = np.roll(padded_src, int(ox/72.*dpi), axis=1) - a2 = np.roll(a1, -int(oy/72.*dpi), axis=0) - return a2 - -class GaussianFilter(BaseFilter): - "simple gauss filter" - def __init__(self, sigma, alpha=0.5, color=None): - self.sigma = sigma - self.alpha = alpha - if color is None: - self.color=(0, 0, 0) - else: - self.color=color - - def get_pad(self, dpi): - return int(self.sigma*3/72.*dpi) - - - def process_image(self, padded_src, dpi): - #offsetx, offsety = int(self.offsets[0]), int(self.offsets[1]) - tgt_image = np.zeros_like(padded_src) - aa = smooth2d(padded_src[:,:,-1]*self.alpha, - self.sigma/72.*dpi) - tgt_image[:,:,-1] = aa - tgt_image[:,:,:-1] = self.color - return tgt_image - -class DropShadowFilter(BaseFilter): - def __init__(self, sigma, alpha=0.3, color=None, offsets=None): - self.gauss_filter = GaussianFilter(sigma, alpha, color) - self.offset_filter = OffsetFilter(offsets) - - def get_pad(self, dpi): - return max(self.gauss_filter.get_pad(dpi), - self.offset_filter.get_pad(dpi)) - - def process_image(self, padded_src, dpi): - t1 = self.gauss_filter.process_image(padded_src, dpi) - t2 = self.offset_filter.process_image(t1, dpi) - return t2 - - -from matplotlib.colors import LightSource - -class LightFilter(BaseFilter): - "simple gauss filter" - def __init__(self, sigma, fraction=0.5): - self.gauss_filter = GaussianFilter(sigma, alpha=1) - self.light_source = LightSource() - self.fraction = fraction - #hsv_min_val=0.5,hsv_max_val=0.9, - # hsv_min_sat=0.1,hsv_max_sat=0.1) - def get_pad(self, dpi): - return self.gauss_filter.get_pad(dpi) - - def process_image(self, padded_src, dpi): - t1 = self.gauss_filter.process_image(padded_src, dpi) - elevation = t1[:,:,3] - rgb = padded_src[:,:,:3] - - rgb2 = self.light_source.shade_rgb(rgb, elevation, - fraction=self.fraction) - - tgt = np.empty_like(padded_src) - tgt[:,:,:3] = rgb2 - tgt[:,:,3] = padded_src[:,:,3] - - return tgt - - - -class GrowFilter(BaseFilter): - "enlarge the area" - def __init__(self, pixels, color=None): - self.pixels = pixels - if color is None: - self.color=(1, 1, 1) - else: - self.color=color - - def __call__(self, im, dpi): - pad = self.pixels - ny, nx, depth = im.shape - new_im = np.empty([pad*2+ny, pad*2+nx, depth], dtype="d") - alpha = new_im[:,:,3] - alpha.fill(0) - alpha[pad:-pad, pad:-pad] = im[:,:,-1] - alpha2 = np.clip(smooth2d(alpha, self.pixels/72.*dpi) * 5, 0, 1) - new_im[:,:,-1] = alpha2 - new_im[:,:,:-1] = self.color - offsetx, offsety = -pad, -pad - - return new_im, offsetx, offsety - - -from matplotlib.artist import Artist - -class FilteredArtistList(Artist): - """ - A simple container to draw filtered artist. - """ - def __init__(self, artist_list, filter): - self._artist_list = artist_list - self._filter = filter - Artist.__init__(self) - - def draw(self, renderer): - renderer.start_rasterizing() - renderer.start_filter() - for a in self._artist_list: - a.draw(renderer) - renderer.stop_filter(self._filter) - renderer.stop_rasterizing() - - - -import matplotlib.transforms as mtransforms - -def filtered_text(ax): - # mostly copied from contour_demo.py - - # prepare image - delta = 0.025 - x = np.arange(-3.0, 3.0, delta) - y = np.arange(-2.0, 2.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) - # difference of Gaussians - Z = 10.0 * (Z2 - Z1) - - - # draw - im = ax.imshow(Z, interpolation='bilinear', origin='lower', - cmap=cm.gray, extent=(-3,3,-2,2)) - levels = np.arange(-1.2, 1.6, 0.2) - CS = ax.contour(Z, levels, - origin='lower', - linewidths=2, - extent=(-3,3,-2,2)) - - ax.set_aspect("auto") - - # contour label - cl = ax.clabel(CS, levels[1::2], # label every second level - inline=1, - fmt='%1.1f', - fontsize=11) - - # change clable color to black - from matplotlib.patheffects import Normal - for t in cl: - t.set_color("k") - t.set_path_effects([Normal()]) # to force TextPath (i.e., same font in all backends) - - # Add white glows to improve visibility of labels. - white_glows = FilteredArtistList(cl, GrowFilter(3)) - ax.add_artist(white_glows) - white_glows.set_zorder(cl[0].get_zorder()-0.1) - - ax.xaxis.set_visible(False) - ax.yaxis.set_visible(False) - - -def drop_shadow_line(ax): - # copied from examples/misc/svg_filter_line.py - - # draw lines - l1, = ax.plot([0.1, 0.5, 0.9], [0.1, 0.9, 0.5], "bo-", - mec="b", mfc="w", lw=5, mew=3, ms=10, label="Line 1") - l2, = ax.plot([0.1, 0.5, 0.9], [0.5, 0.2, 0.7], "ro-", - mec="r", mfc="w", lw=5, mew=3, ms=10, label="Line 1") - - - gauss = DropShadowFilter(4) - - for l in [l1, l2]: - - # draw shadows with same lines with slight offset. - - xx = l.get_xdata() - yy = l.get_ydata() - shadow, = ax.plot(xx, yy) - shadow.update_from(l) - - # offset transform - ot = mtransforms.offset_copy(l.get_transform(), ax.figure, - x=4.0, y=-6.0, units='points') - - shadow.set_transform(ot) - - - # adjust zorder of the shadow lines so that it is drawn below the - # original lines - shadow.set_zorder(l.get_zorder()-0.5) - shadow.set_agg_filter(gauss) - shadow.set_rasterized(True) # to support mixed-mode renderers - - - - ax.set_xlim(0., 1.) - ax.set_ylim(0., 1.) - - ax.xaxis.set_visible(False) - ax.yaxis.set_visible(False) - - - - -def drop_shadow_patches(ax): - # copyed from barchart_demo.py - N = 5 - menMeans = (20, 35, 30, 35, 27) - - ind = np.arange(N) # the x locations for the groups - width = 0.35 # the width of the bars - - rects1 = ax.bar(ind, menMeans, width, color='r', ec="w", lw=2) - - womenMeans = (25, 32, 34, 20, 25) - rects2 = ax.bar(ind+width+0.1, womenMeans, width, color='y', ec="w", lw=2) - - #gauss = GaussianFilter(1.5, offsets=(1,1), ) - gauss = DropShadowFilter(5, offsets=(1,1), ) - shadow = FilteredArtistList(rects1+rects2, gauss) - ax.add_artist(shadow) - shadow.set_zorder(rects1[0].get_zorder()-0.1) - - ax.set_xlim(ind[0]-0.5, ind[-1]+1.5) - ax.set_ylim(0, 40) - - ax.xaxis.set_visible(False) - ax.yaxis.set_visible(False) - - -def light_filter_pie(ax): - fracs = [15,30,45, 10] - explode=(0, 0.05, 0, 0) - pies = ax.pie(fracs, explode=explode) - ax.patch.set_visible(True) - - light_filter = LightFilter(9) - for p in pies[0]: - p.set_agg_filter(light_filter) - p.set_rasterized(True) # to support mixed-mode renderers - p.set(ec="none", - lw=2) - - gauss = DropShadowFilter(9, offsets=(3,4), alpha=0.7) - shadow = FilteredArtistList(pies[0], gauss) - ax.add_artist(shadow) - shadow.set_zorder(pies[0][0].get_zorder()-0.1) - - -if 1: - - plt.figure(1, figsize=(6, 6)) - plt.subplots_adjust(left=0.05, right=0.95) - - ax = plt.subplot(221) - filtered_text(ax) - - ax = plt.subplot(222) - drop_shadow_line(ax) - - ax = plt.subplot(223) - drop_shadow_patches(ax) - - ax = plt.subplot(224) - ax.set_aspect(1) - light_filter_pie(ax) - ax.set_frame_on(True) - - plt.show() - - diff --git a/dev/mpl_examples/pylab_examples/demo_annotation_box.hires.png b/dev/mpl_examples/pylab_examples/demo_annotation_box.hires.png deleted file mode 100644 index baea2281561..00000000000 Binary files a/dev/mpl_examples/pylab_examples/demo_annotation_box.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/demo_annotation_box.pdf b/dev/mpl_examples/pylab_examples/demo_annotation_box.pdf deleted file mode 100644 index d23669d9813..00000000000 Binary files a/dev/mpl_examples/pylab_examples/demo_annotation_box.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/demo_annotation_box.png b/dev/mpl_examples/pylab_examples/demo_annotation_box.png deleted file mode 100644 index 5917eec05be..00000000000 Binary files a/dev/mpl_examples/pylab_examples/demo_annotation_box.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/demo_annotation_box.py b/dev/mpl_examples/pylab_examples/demo_annotation_box.py deleted file mode 100644 index ed1fd71943c..00000000000 --- a/dev/mpl_examples/pylab_examples/demo_annotation_box.py +++ /dev/null @@ -1,94 +0,0 @@ -import matplotlib.pyplot as plt -from matplotlib.offsetbox import TextArea, DrawingArea, OffsetImage, \ - AnnotationBbox -from matplotlib.cbook import get_sample_data - -import numpy as np - -if 1: - fig = plt.gcf() - fig.clf() - ax = plt.subplot(111) - - offsetbox = TextArea("Test 1", minimumdescent=False) - - xy = (0.5, 0.7) - - ax.plot(xy[0], xy[1], ".r") - - ab = AnnotationBbox(offsetbox, xy, - xybox=(-20, 40), - xycoords='data', - boxcoords="offset points", - arrowprops=dict(arrowstyle="->")) - ax.add_artist(ab) - - offsetbox = TextArea("Test", minimumdescent=False) - - ab = AnnotationBbox(offsetbox, xy, - xybox=(1.02, xy[1]), - xycoords='data', - boxcoords=("axes fraction", "data"), - box_alignment=(0.,0.5), - arrowprops=dict(arrowstyle="->")) - ax.add_artist(ab) - - - from matplotlib.patches import Circle - da = DrawingArea(20, 20, 0, 0) - p = Circle((10, 10), 10) - da.add_artist(p) - - xy = [0.3, 0.55] - ab = AnnotationBbox(da, xy, - xybox=(1.02, xy[1]), - xycoords='data', - boxcoords=("axes fraction", "data"), - box_alignment=(0.,0.5), - arrowprops=dict(arrowstyle="->")) - #arrowprops=None) - - ax.add_artist(ab) - - - arr = np.arange(100).reshape((10,10)) - im = OffsetImage(arr, zoom=2) - - ab = AnnotationBbox(im, xy, - xybox=(-50., 50.), - xycoords='data', - boxcoords="offset points", - pad=0.3, - arrowprops=dict(arrowstyle="->")) - #arrowprops=None) - - ax.add_artist(ab) - - - # another image - - - from matplotlib._png import read_png - fn = get_sample_data("grace_hopper.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) - - ax.set_xlim(0, 1) - ax.set_ylim(0, 1) - - - plt.draw() - plt.show() diff --git a/dev/mpl_examples/pylab_examples/demo_bboximage.hires.png b/dev/mpl_examples/pylab_examples/demo_bboximage.hires.png deleted file mode 100644 index 7a9cb963e20..00000000000 Binary files a/dev/mpl_examples/pylab_examples/demo_bboximage.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/demo_bboximage.pdf b/dev/mpl_examples/pylab_examples/demo_bboximage.pdf deleted file mode 100644 index 1ec3a7e37ae..00000000000 Binary files a/dev/mpl_examples/pylab_examples/demo_bboximage.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/demo_bboximage.png b/dev/mpl_examples/pylab_examples/demo_bboximage.png deleted file mode 100644 index c68722cd171..00000000000 Binary files a/dev/mpl_examples/pylab_examples/demo_bboximage.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/demo_bboximage.py b/dev/mpl_examples/pylab_examples/demo_bboximage.py deleted file mode 100644 index e442fb70bc3..00000000000 --- a/dev/mpl_examples/pylab_examples/demo_bboximage.py +++ /dev/null @@ -1,62 +0,0 @@ -import matplotlib.pyplot as plt -import numpy as np -from matplotlib.image import BboxImage -from matplotlib.transforms import Bbox, TransformedBbox - -if __name__ == "__main__": - - fig = plt.figure(1) - ax = plt.subplot(121) - - txt = ax.text(0.5, 0.5, "test", size=30, ha="center", color="w") - kwargs = dict() - - bbox_image = BboxImage(txt.get_window_extent, - norm = None, - origin=None, - clip_on=False, - **kwargs - ) - a = np.arange(256).reshape(1,256)/256. - bbox_image.set_data(a) - ax.add_artist(bbox_image) - - - ax = plt.subplot(122) - a = np.linspace(0, 1, 256).reshape(1,-1) - a = np.vstack((a,a)) - - maps = sorted(m for m in plt.cm.datad if not m.endswith("_r")) - #nmaps = len(maps) + 1 - - #fig.subplots_adjust(top=0.99, bottom=0.01, left=0.2, right=0.99) - - ncol = 2 - nrow = len(maps)//ncol + 1 - - xpad_fraction = 0.3 - dx = 1./(ncol + xpad_fraction*(ncol-1)) - - ypad_fraction = 0.3 - dy = 1./(nrow + ypad_fraction*(nrow-1)) - - for i,m in enumerate(maps): - ix, iy = divmod(i, nrow) - #plt.figimage(a, 10, i*10, cmap=plt.get_cmap(m), origin='lower') - bbox0 = Bbox.from_bounds(ix*dx*(1+xpad_fraction), - 1.-iy*dy*(1+ypad_fraction)-dy, - dx, dy) - bbox = TransformedBbox(bbox0, ax.transAxes) - - bbox_image = BboxImage(bbox, - cmap = plt.get_cmap(m), - norm = None, - origin=None, - **kwargs - ) - - bbox_image.set_data(a) - ax.add_artist(bbox_image) - - plt.draw() - plt.show() diff --git a/dev/mpl_examples/pylab_examples/demo_ribbon_box.hires.png b/dev/mpl_examples/pylab_examples/demo_ribbon_box.hires.png deleted file mode 100644 index 239842e52b0..00000000000 Binary files a/dev/mpl_examples/pylab_examples/demo_ribbon_box.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/demo_ribbon_box.pdf b/dev/mpl_examples/pylab_examples/demo_ribbon_box.pdf deleted file mode 100644 index caab090a927..00000000000 Binary files a/dev/mpl_examples/pylab_examples/demo_ribbon_box.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/demo_ribbon_box.png b/dev/mpl_examples/pylab_examples/demo_ribbon_box.png deleted file mode 100644 index bd5ba7303a2..00000000000 Binary files a/dev/mpl_examples/pylab_examples/demo_ribbon_box.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/demo_ribbon_box.py b/dev/mpl_examples/pylab_examples/demo_ribbon_box.py deleted file mode 100644 index 9ab0be183ec..00000000000 --- a/dev/mpl_examples/pylab_examples/demo_ribbon_box.py +++ /dev/null @@ -1,141 +0,0 @@ -import matplotlib.pyplot as plt -import numpy as np -from matplotlib.image import BboxImage - -from matplotlib._png import read_png -import matplotlib.colors -from matplotlib.cbook import get_sample_data - -class RibbonBox(object): - - original_image = read_png(get_sample_data("Minduka_Present_Blue_Pack.png", - asfileobj=False)) - cut_location = 70 - b_and_h = original_image[:,:,2] - color = original_image[:,:,2] - original_image[:,:,0] - alpha = original_image[:,:,3] - nx = original_image.shape[1] - - def __init__(self, color): - rgb = matplotlib.colors.colorConverter.to_rgb(color) - - im = np.empty(self.original_image.shape, - self.original_image.dtype) - - - im[:,:,:3] = self.b_and_h[:,:,np.newaxis] - im[:,:,:3] -= self.color[:,:,np.newaxis]*(1.-np.array(rgb)) - im[:,:,3] = self.alpha - - self.im = im - - - def get_stretched_image(self, stretch_factor): - stretch_factor = max(stretch_factor, 1) - ny, nx, nch = self.im.shape - ny2 = int(ny*stretch_factor) - - stretched_image = np.empty((ny2, nx, nch), - self.im.dtype) - cut = self.im[self.cut_location,:,:] - stretched_image[:,:,:] = cut - stretched_image[:self.cut_location,:,:] = \ - self.im[:self.cut_location,:,:] - stretched_image[-(ny-self.cut_location):,:,:] = \ - self.im[-(ny-self.cut_location):,:,:] - - self._cached_im = stretched_image - return stretched_image - - - -class RibbonBoxImage(BboxImage): - zorder = 1 - - def __init__(self, bbox, color, - cmap = None, - norm = None, - interpolation=None, - origin=None, - filternorm=1, - filterrad=4.0, - resample = False, - **kwargs - ): - - BboxImage.__init__(self, bbox, - cmap = cmap, - norm = norm, - interpolation=interpolation, - origin=origin, - filternorm=filternorm, - filterrad=filterrad, - resample = resample, - **kwargs - ) - - self._ribbonbox = RibbonBox(color) - self._cached_ny = None - - - def draw(self, renderer, *args, **kwargs): - - bbox = self.get_window_extent(renderer) - stretch_factor = bbox.height / bbox.width - - ny = int(stretch_factor*self._ribbonbox.nx) - if self._cached_ny != ny: - arr = self._ribbonbox.get_stretched_image(stretch_factor) - self.set_array(arr) - self._cached_ny = ny - - BboxImage.draw(self, renderer, *args, **kwargs) - - -if 1: - from matplotlib.transforms import Bbox, TransformedBbox - from matplotlib.ticker import ScalarFormatter - - fig = plt.gcf() - fig.clf() - ax = plt.subplot(111) - - years = np.arange(2004, 2009) - box_colors = [(0.8, 0.2, 0.2), - (0.2, 0.8, 0.2), - (0.2, 0.2, 0.8), - (0.7, 0.5, 0.8), - (0.3, 0.8, 0.7), - ] - heights = np.random.random(years.shape) * 7000 + 3000 - - fmt = ScalarFormatter(useOffset=False) - ax.xaxis.set_major_formatter(fmt) - - for year, h, bc in zip(years, heights, box_colors): - bbox0 = Bbox.from_extents(year-0.4, 0., year+0.4, h) - bbox = TransformedBbox(bbox0, ax.transData) - rb_patch = RibbonBoxImage(bbox, bc, interpolation="bicubic") - - ax.add_artist(rb_patch) - - ax.annotate(r"%d" % (int(h/100.)*100), - (year, h), va="bottom", ha="center") - - patch_gradient = BboxImage(ax.bbox, - interpolation="bicubic", - zorder=0.1, - ) - gradient = np.zeros((2, 2, 4), dtype=np.float) - gradient[:,:,:3] = [1, 1, 0.] - gradient[:,:,3] = [[0.1, 0.3],[0.3, 0.5]] # alpha channel - patch_gradient.set_array(gradient) - ax.add_artist(patch_gradient) - - - ax.set_xlim(years[0]-0.5, years[-1]+0.5) - ax.set_ylim(0, 10000) - - fig.savefig('ribbon_box.png') - plt.show() - diff --git a/dev/mpl_examples/pylab_examples/demo_text_path.hires.png b/dev/mpl_examples/pylab_examples/demo_text_path.hires.png deleted file mode 100644 index 5dd6eeae02b..00000000000 Binary files a/dev/mpl_examples/pylab_examples/demo_text_path.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/demo_text_path.pdf b/dev/mpl_examples/pylab_examples/demo_text_path.pdf deleted file mode 100644 index 79758843a77..00000000000 Binary files a/dev/mpl_examples/pylab_examples/demo_text_path.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/demo_text_path.png b/dev/mpl_examples/pylab_examples/demo_text_path.png deleted file mode 100644 index 8684eccd575..00000000000 Binary files a/dev/mpl_examples/pylab_examples/demo_text_path.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/demo_text_path.py b/dev/mpl_examples/pylab_examples/demo_text_path.py deleted file mode 100644 index f5d931d0f0a..00000000000 --- a/dev/mpl_examples/pylab_examples/demo_text_path.py +++ /dev/null @@ -1,155 +0,0 @@ - -# -*- coding: utf-8 -*- - -import matplotlib.pyplot as plt -from matplotlib.image import BboxImage -import numpy as np -from matplotlib.transforms import IdentityTransform - -import matplotlib.patches as mpatches - -from matplotlib.offsetbox import AnnotationBbox,\ - AnchoredOffsetbox, AuxTransformBox - -from matplotlib.cbook import get_sample_data - -from matplotlib.text import TextPath - - -class PathClippedImagePatch(mpatches.PathPatch): - """ - The given image is used to draw the face of the patch. Internally, - it uses BboxImage whose clippath set to the path of the patch. - - FIXME : The result is currently dpi dependent. - """ - def __init__(self, path, bbox_image, **kwargs): - mpatches.PathPatch.__init__(self, path, **kwargs) - self._init_bbox_image(bbox_image) - - def set_facecolor(self, color): - """simply ignore facecolor""" - mpatches.PathPatch.set_facecolor(self, "none") - - def _init_bbox_image(self, im): - - bbox_image = BboxImage(self.get_window_extent, - norm = None, - origin=None, - ) - bbox_image.set_transform(IdentityTransform()) - - bbox_image.set_data(im) - self.bbox_image = bbox_image - - def draw(self, renderer=None): - - - # the clip path must be updated every draw. any solution? -JJ - self.bbox_image.set_clip_path(self._path, self.get_transform()) - self.bbox_image.draw(renderer) - - mpatches.PathPatch.draw(self, renderer) - - -if 1: - - usetex = plt.rcParams["text.usetex"] - - fig = plt.figure(1) - - # EXAMPLE 1 - - ax = plt.subplot(211) - - from matplotlib._png import read_png - fn = get_sample_data("grace_hopper.png", asfileobj=False) - arr = read_png(fn) - - text_path = TextPath((0, 0), "!?", size=150) - p = PathClippedImagePatch(text_path, arr, ec="k", - transform=IdentityTransform()) - - #p.set_clip_on(False) - - # make offset box - offsetbox = AuxTransformBox(IdentityTransform()) - offsetbox.add_artist(p) - - # make anchored offset box - ao = AnchoredOffsetbox(loc=2, child=offsetbox, frameon=True, borderpad=0.2) - ax.add_artist(ao) - - # another text - from matplotlib.patches import PathPatch - if usetex: - r = r"\mbox{textpath supports mathtext \& \TeX}" - else: - r = r"textpath supports mathtext & TeX" - - text_path = TextPath((0, 0), r, - size=20, usetex=usetex) - - p1 = PathPatch(text_path, ec="w", lw=3, fc="w", alpha=0.9, - transform=IdentityTransform()) - p2 = PathPatch(text_path, ec="none", fc="k", - transform=IdentityTransform()) - - offsetbox2 = AuxTransformBox(IdentityTransform()) - offsetbox2.add_artist(p1) - offsetbox2.add_artist(p2) - - ab = AnnotationBbox(offsetbox2, (0.95, 0.05), - xycoords='axes fraction', - boxcoords="offset points", - box_alignment=(1.,0.), - frameon=False - ) - ax.add_artist(ab) - - ax.imshow([[0,1,2],[1,2,3]], cmap=plt.cm.gist_gray_r, - interpolation="bilinear", - aspect="auto") - - - - # EXAMPLE 2 - - ax = plt.subplot(212) - - arr = np.arange(256).reshape(1,256)/256. - - if usetex: - s = r"$\displaystyle\left[\sum_{n=1}^\infty\frac{-e^{i\pi}}{2^n}\right]$!" - else: - s = r"$\left[\sum_{n=1}^\infty\frac{-e^{i\pi}}{2^n}\right]$!" - text_path = TextPath((0, 0), s, size=40, usetex=usetex) - text_patch = PathClippedImagePatch(text_path, arr, ec="none", - transform=IdentityTransform()) - - shadow1 = mpatches.Shadow(text_patch, 1, -1, props=dict(fc="none", ec="0.6", lw=3)) - shadow2 = mpatches.Shadow(text_patch, 1, -1, props=dict(fc="0.3", ec="none")) - - - # make offset box - offsetbox = AuxTransformBox(IdentityTransform()) - offsetbox.add_artist(shadow1) - offsetbox.add_artist(shadow2) - offsetbox.add_artist(text_patch) - - # place the anchored offset box using AnnotationBbox - ab = AnnotationBbox(offsetbox, (0.5, 0.5), - xycoords='data', - boxcoords="offset points", - box_alignment=(0.5,0.5), - ) - #text_path.set_size(10) - - ax.add_artist(ab) - - ax.set_xlim(0, 1) - ax.set_ylim(0, 1) - - - plt.draw() - plt.show() diff --git a/dev/mpl_examples/pylab_examples/demo_text_rotation_mode.hires.png b/dev/mpl_examples/pylab_examples/demo_text_rotation_mode.hires.png deleted file mode 100644 index cbb9e6203de..00000000000 Binary files a/dev/mpl_examples/pylab_examples/demo_text_rotation_mode.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/demo_text_rotation_mode.pdf b/dev/mpl_examples/pylab_examples/demo_text_rotation_mode.pdf deleted file mode 100644 index 0a3870e74ee..00000000000 Binary files a/dev/mpl_examples/pylab_examples/demo_text_rotation_mode.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/demo_text_rotation_mode.png b/dev/mpl_examples/pylab_examples/demo_text_rotation_mode.png deleted file mode 100644 index 403d0368769..00000000000 Binary files a/dev/mpl_examples/pylab_examples/demo_text_rotation_mode.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/demo_text_rotation_mode.py b/dev/mpl_examples/pylab_examples/demo_text_rotation_mode.py deleted file mode 100644 index e32a89f7557..00000000000 --- a/dev/mpl_examples/pylab_examples/demo_text_rotation_mode.py +++ /dev/null @@ -1,45 +0,0 @@ - -#clf() -from mpl_toolkits.axes_grid1.axes_grid import ImageGrid - -def test_rotation_mode(fig, mode, subplot_location): - ha_list = "left center right".split() - va_list = "top center baseline bottom".split() - grid = ImageGrid(fig, subplot_location, - nrows_ncols=(len(va_list), len(ha_list)), - share_all=True, aspect=True, #label_mode='1', - cbar_mode=None) - - for ha, ax in zip(ha_list, grid.axes_row[-1]): - ax.axis["bottom"].label.set_text(ha) - - grid.axes_row[0][1].set_title(mode, size="large") - - for va, ax in zip(va_list, grid.axes_column[0]): - ax.axis["left"].label.set_text(va) - - i = 0 - for va in va_list: - for ha in ha_list: - ax = grid[i] - for axis in ax.axis.values(): - axis.toggle(ticks=False, ticklabels=False) - - ax.text(0.5, 0.5, "Tpg", - size="large", rotation=40, - bbox=dict(boxstyle="square,pad=0.", - ec="none", fc="0.5", alpha=0.5), - ha=ha, va=va, - rotation_mode=mode) - ax.axvline(0.5) - ax.axhline(0.5) - i += 1 - -if 1: - import matplotlib.pyplot as plt - fig = plt.figure(1, figsize=(5.5,4 )) - fig.clf() - - test_rotation_mode(fig, "default", 121) - test_rotation_mode(fig, "anchor", 122) - plt.show() diff --git a/dev/mpl_examples/pylab_examples/demo_tight_layout.py b/dev/mpl_examples/pylab_examples/demo_tight_layout.py deleted file mode 100644 index e428a7b28a5..00000000000 --- a/dev/mpl_examples/pylab_examples/demo_tight_layout.py +++ /dev/null @@ -1,105 +0,0 @@ - -import matplotlib.pyplot as plt - - -import random -fontsizes = [8, 16, 24, 32] -def example_plot(ax): - ax.plot([1, 2]) - ax.set_xlabel('x-label', fontsize=random.choice(fontsizes)) - ax.set_ylabel('y-label', fontsize=random.choice(fontsizes)) - ax.set_title('Title', fontsize=random.choice(fontsizes)) - -fig, ax = plt.subplots() -example_plot(ax) -plt.tight_layout() - -fig, ((ax1, ax2), (ax3, ax4)) = plt.subplots(nrows=2, ncols=2) -example_plot(ax1) -example_plot(ax2) -example_plot(ax3) -example_plot(ax4) -plt.tight_layout() - -fig, (ax1, ax2) = plt.subplots(nrows=2, ncols=1) -example_plot(ax1) -example_plot(ax2) -plt.tight_layout() - -fig, (ax1, ax2) = plt.subplots(nrows=1, ncols=2) -example_plot(ax1) -example_plot(ax2) -plt.tight_layout() - -fig, axes = plt.subplots(nrows=3, ncols=3) -for row in axes: - for ax in row: - example_plot(ax) -plt.tight_layout() - - -fig = plt.figure() - -ax1 = plt.subplot(221) -ax2 = plt.subplot(223) -ax3 = plt.subplot(122) - -example_plot(ax1) -example_plot(ax2) -example_plot(ax3) - -plt.tight_layout() - - -fig = plt.figure() - -ax1 = plt.subplot2grid((3, 3), (0, 0)) -ax2 = plt.subplot2grid((3, 3), (0, 1), colspan=2) -ax3 = plt.subplot2grid((3, 3), (1, 0), colspan=2, rowspan=2) -ax4 = plt.subplot2grid((3, 3), (1, 2), rowspan=2) - -example_plot(ax1) -example_plot(ax2) -example_plot(ax3) -example_plot(ax4) - -plt.tight_layout() - -plt.show() - - -fig = plt.figure() - -import matplotlib.gridspec as gridspec - -gs1 = gridspec.GridSpec(3, 1) -ax1 = fig.add_subplot(gs1[0]) -ax2 = fig.add_subplot(gs1[1]) -ax3 = fig.add_subplot(gs1[2]) - -example_plot(ax1) -example_plot(ax2) -example_plot(ax3) - -gs1.tight_layout(fig, rect=[None, None, 0.45, None]) - -gs2 = gridspec.GridSpec(2, 1) -ax4 = fig.add_subplot(gs2[0]) -ax5 = fig.add_subplot(gs2[1]) - -#example_plot(ax4) -#example_plot(ax5) - -gs2.tight_layout(fig, rect=[0.45, None, None, None]) - -# now match the top and bottom of two gridspecs. -top = min(gs1.top, gs2.top) -bottom = max(gs1.bottom, gs2.bottom) - -gs1.update(top=top, bottom=bottom) -gs2.update(top=top, bottom=bottom) - -plt.show() - - - diff --git a/dev/mpl_examples/pylab_examples/demo_tight_layout_00_00.hires.png b/dev/mpl_examples/pylab_examples/demo_tight_layout_00_00.hires.png deleted file mode 100644 index 5798b40ff76..00000000000 Binary files a/dev/mpl_examples/pylab_examples/demo_tight_layout_00_00.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/demo_tight_layout_00_00.pdf b/dev/mpl_examples/pylab_examples/demo_tight_layout_00_00.pdf deleted file mode 100644 index b47ac3f8041..00000000000 Binary files a/dev/mpl_examples/pylab_examples/demo_tight_layout_00_00.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/demo_tight_layout_00_00.png b/dev/mpl_examples/pylab_examples/demo_tight_layout_00_00.png deleted file mode 100644 index 66451bedb84..00000000000 Binary files a/dev/mpl_examples/pylab_examples/demo_tight_layout_00_00.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/demo_tight_layout_00_01.hires.png b/dev/mpl_examples/pylab_examples/demo_tight_layout_00_01.hires.png deleted file mode 100644 index bab4dc0c8c6..00000000000 Binary files a/dev/mpl_examples/pylab_examples/demo_tight_layout_00_01.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/demo_tight_layout_00_01.pdf b/dev/mpl_examples/pylab_examples/demo_tight_layout_00_01.pdf deleted file mode 100644 index eedcb40ce29..00000000000 Binary files a/dev/mpl_examples/pylab_examples/demo_tight_layout_00_01.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/demo_tight_layout_00_01.png b/dev/mpl_examples/pylab_examples/demo_tight_layout_00_01.png deleted file mode 100644 index 191a6a06390..00000000000 Binary files a/dev/mpl_examples/pylab_examples/demo_tight_layout_00_01.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/demo_tight_layout_00_02.hires.png b/dev/mpl_examples/pylab_examples/demo_tight_layout_00_02.hires.png deleted file mode 100644 index 9e4040de681..00000000000 Binary files a/dev/mpl_examples/pylab_examples/demo_tight_layout_00_02.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/demo_tight_layout_00_02.pdf b/dev/mpl_examples/pylab_examples/demo_tight_layout_00_02.pdf deleted file mode 100644 index 65c45598689..00000000000 Binary files a/dev/mpl_examples/pylab_examples/demo_tight_layout_00_02.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/demo_tight_layout_00_02.png b/dev/mpl_examples/pylab_examples/demo_tight_layout_00_02.png deleted file mode 100644 index 63437947235..00000000000 Binary files a/dev/mpl_examples/pylab_examples/demo_tight_layout_00_02.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/demo_tight_layout_00_03.hires.png b/dev/mpl_examples/pylab_examples/demo_tight_layout_00_03.hires.png deleted file mode 100644 index 42c2a454e10..00000000000 Binary files a/dev/mpl_examples/pylab_examples/demo_tight_layout_00_03.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/demo_tight_layout_00_03.pdf b/dev/mpl_examples/pylab_examples/demo_tight_layout_00_03.pdf deleted file mode 100644 index 8e9f1dc292e..00000000000 Binary files a/dev/mpl_examples/pylab_examples/demo_tight_layout_00_03.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/demo_tight_layout_00_03.png b/dev/mpl_examples/pylab_examples/demo_tight_layout_00_03.png deleted file mode 100644 index dd591f75a36..00000000000 Binary files a/dev/mpl_examples/pylab_examples/demo_tight_layout_00_03.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/demo_tight_layout_00_04.hires.png b/dev/mpl_examples/pylab_examples/demo_tight_layout_00_04.hires.png deleted file mode 100644 index 10d06edd0c2..00000000000 Binary files a/dev/mpl_examples/pylab_examples/demo_tight_layout_00_04.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/demo_tight_layout_00_04.pdf b/dev/mpl_examples/pylab_examples/demo_tight_layout_00_04.pdf deleted file mode 100644 index 3b81e1910bb..00000000000 Binary files a/dev/mpl_examples/pylab_examples/demo_tight_layout_00_04.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/demo_tight_layout_00_04.png b/dev/mpl_examples/pylab_examples/demo_tight_layout_00_04.png deleted file mode 100644 index fcd34f547ec..00000000000 Binary files a/dev/mpl_examples/pylab_examples/demo_tight_layout_00_04.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/demo_tight_layout_00_05.hires.png b/dev/mpl_examples/pylab_examples/demo_tight_layout_00_05.hires.png deleted file mode 100644 index 955ed36ad99..00000000000 Binary files a/dev/mpl_examples/pylab_examples/demo_tight_layout_00_05.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/demo_tight_layout_00_05.pdf b/dev/mpl_examples/pylab_examples/demo_tight_layout_00_05.pdf deleted file mode 100644 index 034fced2e46..00000000000 Binary files a/dev/mpl_examples/pylab_examples/demo_tight_layout_00_05.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/demo_tight_layout_00_05.png b/dev/mpl_examples/pylab_examples/demo_tight_layout_00_05.png deleted file mode 100644 index 085c75f75cd..00000000000 Binary files a/dev/mpl_examples/pylab_examples/demo_tight_layout_00_05.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/demo_tight_layout_00_06.hires.png b/dev/mpl_examples/pylab_examples/demo_tight_layout_00_06.hires.png deleted file mode 100644 index 34119b32f0a..00000000000 Binary files a/dev/mpl_examples/pylab_examples/demo_tight_layout_00_06.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/demo_tight_layout_00_06.pdf b/dev/mpl_examples/pylab_examples/demo_tight_layout_00_06.pdf deleted file mode 100644 index 5f3de2a57c8..00000000000 Binary files a/dev/mpl_examples/pylab_examples/demo_tight_layout_00_06.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/demo_tight_layout_00_06.png b/dev/mpl_examples/pylab_examples/demo_tight_layout_00_06.png deleted file mode 100644 index d85eff7ce9c..00000000000 Binary files a/dev/mpl_examples/pylab_examples/demo_tight_layout_00_06.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/demo_tight_layout_01_00.hires.png b/dev/mpl_examples/pylab_examples/demo_tight_layout_01_00.hires.png deleted file mode 100644 index fc6a6846052..00000000000 Binary files a/dev/mpl_examples/pylab_examples/demo_tight_layout_01_00.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/demo_tight_layout_01_00.pdf b/dev/mpl_examples/pylab_examples/demo_tight_layout_01_00.pdf deleted file mode 100644 index a397e92e89b..00000000000 Binary files a/dev/mpl_examples/pylab_examples/demo_tight_layout_01_00.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/demo_tight_layout_01_00.png b/dev/mpl_examples/pylab_examples/demo_tight_layout_01_00.png deleted file mode 100644 index 89ca273e096..00000000000 Binary files a/dev/mpl_examples/pylab_examples/demo_tight_layout_01_00.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/dolphin.hires.png b/dev/mpl_examples/pylab_examples/dolphin.hires.png deleted file mode 100644 index d95f83451ed..00000000000 Binary files a/dev/mpl_examples/pylab_examples/dolphin.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/dolphin.pdf b/dev/mpl_examples/pylab_examples/dolphin.pdf deleted file mode 100644 index ab0fc39ef1b..00000000000 Binary files a/dev/mpl_examples/pylab_examples/dolphin.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/dolphin.png b/dev/mpl_examples/pylab_examples/dolphin.png deleted file mode 100644 index 8eee0b398a2..00000000000 Binary files a/dev/mpl_examples/pylab_examples/dolphin.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/dolphin.py b/dev/mpl_examples/pylab_examples/dolphin.py deleted file mode 100644 index f457ccc0c79..00000000000 --- a/dev/mpl_examples/pylab_examples/dolphin.py +++ /dev/null @@ -1,91 +0,0 @@ -import matplotlib.cm as cm -import matplotlib.pyplot as plt -from matplotlib.patches import Circle, PathPatch -from matplotlib.path import Path -from matplotlib.transforms import Affine2D -import numpy as np - - -r = np.random.rand(50) -t = np.random.rand(50) * np.pi * 2.0 -x = r * np.cos(t) -y = r * np.sin(t) - -fig = plt.figure(figsize=(6,6)) -ax = plt.subplot(111) -circle = Circle((0, 0), 1, facecolor='none', - edgecolor=(0,0.8,0.8), linewidth=3, alpha=0.5) -ax.add_patch(circle) - -im = plt.imshow(np.random.random((100, 100)), - origin='lower', cmap=cm.winter, - interpolation='spline36', - extent=([-1, 1, -1, 1])) -im.set_clip_path(circle) - -plt.plot(x, y, 'o', color=(0.9, 0.9, 1.0), alpha=0.8) - -# Dolphin from OpenClipart library by Andy Fitzsimon -# -# -# -# -# - -dolphin = """ -M -0.59739425,160.18173 C -0.62740401,160.18885 -0.57867129,160.11183 --0.57867129,160.11183 C -0.57867129,160.11183 -0.5438361,159.89315 --0.39514638,159.81496 C -0.24645668,159.73678 -0.18316813,159.71981 --0.18316813,159.71981 C -0.18316813,159.71981 -0.10322971,159.58124 --0.057804323,159.58725 C -0.029723983,159.58913 -0.061841603,159.60356 --0.071265813,159.62815 C -0.080250183,159.65325 -0.082918513,159.70554 --0.061841203,159.71248 C -0.040763903,159.7194 -0.0066711426,159.71091 -0.077336307,159.73612 C 0.16879567,159.76377 0.28380306,159.86448 -0.31516668,159.91533 C 0.3465303,159.96618 0.5011127,160.1771 -0.5011127,160.1771 C 0.63668998,160.19238 0.67763022,160.31259 -0.66556395,160.32668 C 0.65339985,160.34212 0.66350443,160.33642 -0.64907098,160.33088 C 0.63463742,160.32533 0.61309688,160.297 -0.5789627,160.29339 C 0.54348657,160.28968 0.52329693,160.27674 -0.50728856,160.27737 C 0.49060916,160.27795 0.48965803,160.31565 -0.46114204,160.33673 C 0.43329696,160.35786 0.4570711,160.39871 -0.43309565,160.40685 C 0.4105108,160.41442 0.39416631,160.33027 -0.3954995,160.2935 C 0.39683269,160.25672 0.43807996,160.21522 -0.44567915,160.19734 C 0.45327833,160.17946 0.27946869,159.9424 --0.061852613,159.99845 C -0.083965233,160.0427 -0.26176109,160.06683 --0.26176109,160.06683 C -0.30127962,160.07028 -0.21167141,160.09731 --0.24649368,160.1011 C -0.32642366,160.11569 -0.34521187,160.06895 --0.40622293,160.0819 C -0.467234,160.09485 -0.56738444,160.17461 --0.59739425,160.18173 -""" - -vertices = [] -codes = [] -parts = dolphin.split() -i = 0 -code_map = { - 'M': (Path.MOVETO, 1), - 'C': (Path.CURVE4, 3), - 'L': (Path.LINETO, 1) - } - -while i < len(parts): - code = parts[i] - path_code, npoints = code_map[code] - codes.extend([path_code] * npoints) - vertices.extend([[float(x) for x in y.split(',')] for y in parts[i+1:i+npoints+1]]) - i += npoints + 1 -vertices = np.array(vertices, np.float) -vertices[:,1] -= 160 - -dolphin_path = Path(vertices, codes) -dolphin_patch = PathPatch(dolphin_path, facecolor=(0.6, 0.6, 0.6), - edgecolor=(0.0, 0.0, 0.0)) -ax.add_patch(dolphin_patch) - -vertices = Affine2D().rotate_deg(60).transform(vertices) -dolphin_path2 = Path(vertices, codes) -dolphin_patch2 = PathPatch(dolphin_path2, facecolor=(0.5, 0.5, 0.5), - edgecolor=(0.0, 0.0, 0.0)) -ax.add_patch(dolphin_patch2) - -plt.show() diff --git a/dev/mpl_examples/pylab_examples/ellipse_collection.hires.png b/dev/mpl_examples/pylab_examples/ellipse_collection.hires.png deleted file mode 100644 index 3d899fbaa7c..00000000000 Binary files a/dev/mpl_examples/pylab_examples/ellipse_collection.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/ellipse_collection.pdf b/dev/mpl_examples/pylab_examples/ellipse_collection.pdf deleted file mode 100644 index 6a187b1d267..00000000000 Binary files a/dev/mpl_examples/pylab_examples/ellipse_collection.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/ellipse_collection.png b/dev/mpl_examples/pylab_examples/ellipse_collection.png deleted file mode 100644 index 5cf303779b1..00000000000 Binary files a/dev/mpl_examples/pylab_examples/ellipse_collection.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/ellipse_collection.py b/dev/mpl_examples/pylab_examples/ellipse_collection.py deleted file mode 100644 index bc228db77e8..00000000000 --- a/dev/mpl_examples/pylab_examples/ellipse_collection.py +++ /dev/null @@ -1,34 +0,0 @@ -import matplotlib.pyplot as plt -import numpy as np -from matplotlib.collections import EllipseCollection - -x = np.arange(10) -y = np.arange(15) -X, Y = np.meshgrid(x, y) - -XY = np.hstack((X.ravel()[:,np.newaxis], Y.ravel()[:,np.newaxis])) - -ww = X/10.0 -hh = Y/15.0 -aa = X*9 - - -ax = plt.subplot(1,1,1) - -ec = EllipseCollection( - ww, - hh, - aa, - units='x', - offsets=XY, - transOffset=ax.transData) -ec.set_array((X+Y).ravel()) -ax.add_collection(ec) -ax.autoscale_view() -ax.set_xlabel('X') -ax.set_ylabel('y') -cbar = plt.colorbar(ec) -cbar.set_label('X+Y') -plt.show() - - diff --git a/dev/mpl_examples/pylab_examples/ellipse_demo.hires.png b/dev/mpl_examples/pylab_examples/ellipse_demo.hires.png deleted file mode 100644 index 2a7b706a0e7..00000000000 Binary files a/dev/mpl_examples/pylab_examples/ellipse_demo.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/ellipse_demo.pdf b/dev/mpl_examples/pylab_examples/ellipse_demo.pdf deleted file mode 100644 index 47e42de2871..00000000000 Binary files a/dev/mpl_examples/pylab_examples/ellipse_demo.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/ellipse_demo.png b/dev/mpl_examples/pylab_examples/ellipse_demo.png deleted file mode 100644 index de067636bbe..00000000000 Binary files a/dev/mpl_examples/pylab_examples/ellipse_demo.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/ellipse_demo.py b/dev/mpl_examples/pylab_examples/ellipse_demo.py deleted file mode 100644 index 866c9c096f2..00000000000 --- a/dev/mpl_examples/pylab_examples/ellipse_demo.py +++ /dev/null @@ -1,20 +0,0 @@ -from pylab import figure, show, rand -from matplotlib.patches import Ellipse - -NUM = 250 - -ells = [Ellipse(xy=rand(2)*10, width=rand(), height=rand(), angle=rand()*360) - for i in range(NUM)] - -fig = figure() -ax = fig.add_subplot(111, aspect='equal') -for e in ells: - ax.add_artist(e) - e.set_clip_box(ax.bbox) - e.set_alpha(rand()) - e.set_facecolor(rand(3)) - -ax.set_xlim(0, 10) -ax.set_ylim(0, 10) - -show() diff --git a/dev/mpl_examples/pylab_examples/ellipse_rotated.hires.png b/dev/mpl_examples/pylab_examples/ellipse_rotated.hires.png deleted file mode 100644 index e9a7276f553..00000000000 Binary files a/dev/mpl_examples/pylab_examples/ellipse_rotated.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/ellipse_rotated.pdf b/dev/mpl_examples/pylab_examples/ellipse_rotated.pdf deleted file mode 100644 index f26f6e148c7..00000000000 Binary files a/dev/mpl_examples/pylab_examples/ellipse_rotated.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/ellipse_rotated.png b/dev/mpl_examples/pylab_examples/ellipse_rotated.png deleted file mode 100644 index 2283b57e51e..00000000000 Binary files a/dev/mpl_examples/pylab_examples/ellipse_rotated.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/ellipse_rotated.py b/dev/mpl_examples/pylab_examples/ellipse_rotated.py deleted file mode 100644 index 87814618fca..00000000000 --- a/dev/mpl_examples/pylab_examples/ellipse_rotated.py +++ /dev/null @@ -1,19 +0,0 @@ -from pylab import * -from matplotlib.patches import Ellipse - -delta = 45.0 # degrees - -angles = arange(0, 360+delta, delta) -ells = [Ellipse((1, 1), 4, 2, a) for a in angles] - -a = subplot(111, aspect='equal') - -for e in ells: - e.set_clip_box(a.bbox) - e.set_alpha(0.1) - a.add_artist(e) - -xlim(-2, 4) -ylim(-1, 3) - -show() diff --git a/dev/mpl_examples/pylab_examples/equal_aspect_ratio.hires.png b/dev/mpl_examples/pylab_examples/equal_aspect_ratio.hires.png deleted file mode 100644 index e9fe84b2c20..00000000000 Binary files a/dev/mpl_examples/pylab_examples/equal_aspect_ratio.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/equal_aspect_ratio.pdf b/dev/mpl_examples/pylab_examples/equal_aspect_ratio.pdf deleted file mode 100644 index 0dfdf4c7a1c..00000000000 Binary files a/dev/mpl_examples/pylab_examples/equal_aspect_ratio.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/equal_aspect_ratio.png b/dev/mpl_examples/pylab_examples/equal_aspect_ratio.png deleted file mode 100644 index 0dd7118767f..00000000000 Binary files a/dev/mpl_examples/pylab_examples/equal_aspect_ratio.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/equal_aspect_ratio.py b/dev/mpl_examples/pylab_examples/equal_aspect_ratio.py deleted file mode 100644 index 2496d7c7c13..00000000000 --- a/dev/mpl_examples/pylab_examples/equal_aspect_ratio.py +++ /dev/null @@ -1,20 +0,0 @@ -#!/usr/bin/env python -""" -Example: simple line plot. -Show how to make a plot that has equal aspect ratio -""" -from pylab import * - -t = arange(0.0, 1.0+0.01, 0.01) -s = cos(2*2*pi*t) -plot(t, s, '-', lw=2) - -xlabel('time (s)') -ylabel('voltage (mV)') -title('About as simple as it gets, folks') -grid(True) - -axes().set_aspect('equal', 'datalim') - - -show() diff --git a/dev/mpl_examples/pylab_examples/errorbar_demo.py b/dev/mpl_examples/pylab_examples/errorbar_demo.py deleted file mode 100644 index dbe6bdb2cd6..00000000000 --- a/dev/mpl_examples/pylab_examples/errorbar_demo.py +++ /dev/null @@ -1,48 +0,0 @@ -#!/usr/bin/env python -import numpy as np -import matplotlib.pyplot as plt - -# example data -x = np.arange(0.1, 4, 0.5) -y = np.exp(-x) - -# example variable error bar values -yerr = 0.1 + 0.2*np.sqrt(x) -xerr = 0.1 + yerr - -# First illustrate basic pyplot interface, using defaults where possible. -plt.figure() -plt.errorbar(x, y, xerr=0.2, yerr=0.4) -plt.title("Simplest errorbars, 0.2 in x, 0.4 in y") - -# Now switch to a more OO interface to exercise more features. -fig, axs = plt.subplots(nrows=2, ncols=2, sharex=True) -ax = axs[0,0] -ax.errorbar(x, y, yerr=yerr, fmt='o') -ax.set_title('Vert. symmetric') - -# With 4 subplots, reduce the number of axis ticks to avoid crowding. -ax.locator_params(nbins=4) - -ax = axs[0,1] -ax.errorbar(x, y, xerr=xerr, fmt='o') -ax.set_title('Hor. symmetric') - -ax = axs[1,0] -ax.errorbar(x, y, yerr=[yerr, 2*yerr], xerr=[xerr, 2*xerr], fmt='--o') -ax.set_title('H, V asymmetric') - -ax = axs[1,1] -ax.set_yscale('log') -# Here we have to be careful to keep all y values positive: -ylower = np.maximum(1e-2, y - yerr) -yerr_lower = y - ylower - -ax.errorbar(x, y, yerr=[yerr_lower, 2*yerr], xerr=xerr, - fmt='o', ecolor='g', capthick=2) -ax.set_title('Mixed sym., log y') - -fig.suptitle('Variable errorbars') - -plt.show() - diff --git a/dev/mpl_examples/pylab_examples/errorbar_demo_00.hires.png b/dev/mpl_examples/pylab_examples/errorbar_demo_00.hires.png deleted file mode 100644 index bdc2ed9647f..00000000000 Binary files a/dev/mpl_examples/pylab_examples/errorbar_demo_00.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/errorbar_demo_00.pdf b/dev/mpl_examples/pylab_examples/errorbar_demo_00.pdf deleted file mode 100644 index 4eab57150a8..00000000000 Binary files a/dev/mpl_examples/pylab_examples/errorbar_demo_00.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/errorbar_demo_00.png b/dev/mpl_examples/pylab_examples/errorbar_demo_00.png deleted file mode 100644 index 0001fac325c..00000000000 Binary files a/dev/mpl_examples/pylab_examples/errorbar_demo_00.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/errorbar_demo_01.hires.png b/dev/mpl_examples/pylab_examples/errorbar_demo_01.hires.png deleted file mode 100644 index ca1bc2f1d42..00000000000 Binary files a/dev/mpl_examples/pylab_examples/errorbar_demo_01.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/errorbar_demo_01.pdf b/dev/mpl_examples/pylab_examples/errorbar_demo_01.pdf deleted file mode 100644 index 7af65f0711b..00000000000 Binary files a/dev/mpl_examples/pylab_examples/errorbar_demo_01.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/errorbar_demo_01.png b/dev/mpl_examples/pylab_examples/errorbar_demo_01.png deleted file mode 100644 index 4a84e9c7c9f..00000000000 Binary files a/dev/mpl_examples/pylab_examples/errorbar_demo_01.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/errorbar_limits.py b/dev/mpl_examples/pylab_examples/errorbar_limits.py deleted file mode 100644 index 12c491f6796..00000000000 --- a/dev/mpl_examples/pylab_examples/errorbar_limits.py +++ /dev/null @@ -1,40 +0,0 @@ -''' -Illustration of upper and lower limit symbols on errorbars -''' - -from math import pi -from numpy import array, arange, sin -import pylab as P - -fig = P.figure() -x = arange(10.0) -y = sin(arange(10.0)/20.0*pi) - -P.errorbar(x,y,yerr=0.1,capsize=3) - -y = sin(arange(10.0)/20.0*pi) + 1 -P.errorbar(x,y,yerr=0.1, uplims=True) - -y = sin(arange(10.0)/20.0*pi) + 2 -upperlimits = array([1,0]*5) -lowerlimits = array([0,1]*5) -P.errorbar(x, y, yerr=0.1, uplims=upperlimits, lolims=lowerlimits) - -P.xlim(-1,10) - -fig = P.figure() -x = arange(10.0)/10.0 -y = (x+0.1)**2 - -P.errorbar(x, y, xerr=0.1, xlolims=True) -y = (x+0.1)**3 - -P.errorbar(x+0.6, y, xerr=0.1, xuplims=upperlimits, xlolims=lowerlimits) - -y = (x+0.1)**4 -P.errorbar(x+1.2, y, xerr=0.1, xuplims=True) - -P.xlim(-0.2,2.4) -P.ylim(-0.1,1.3) - -P.show() diff --git a/dev/mpl_examples/pylab_examples/errorbar_limits_00.hires.png b/dev/mpl_examples/pylab_examples/errorbar_limits_00.hires.png deleted file mode 100644 index faed442f87a..00000000000 Binary files a/dev/mpl_examples/pylab_examples/errorbar_limits_00.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/errorbar_limits_00.pdf b/dev/mpl_examples/pylab_examples/errorbar_limits_00.pdf deleted file mode 100644 index 6d9388a378f..00000000000 Binary files a/dev/mpl_examples/pylab_examples/errorbar_limits_00.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/errorbar_limits_00.png b/dev/mpl_examples/pylab_examples/errorbar_limits_00.png deleted file mode 100644 index b6258306f44..00000000000 Binary files a/dev/mpl_examples/pylab_examples/errorbar_limits_00.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/errorbar_limits_01.hires.png b/dev/mpl_examples/pylab_examples/errorbar_limits_01.hires.png deleted file mode 100644 index 7db1b39db95..00000000000 Binary files a/dev/mpl_examples/pylab_examples/errorbar_limits_01.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/errorbar_limits_01.pdf b/dev/mpl_examples/pylab_examples/errorbar_limits_01.pdf deleted file mode 100644 index 42861f26718..00000000000 Binary files a/dev/mpl_examples/pylab_examples/errorbar_limits_01.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/errorbar_limits_01.png b/dev/mpl_examples/pylab_examples/errorbar_limits_01.png deleted file mode 100644 index 1158e2559e7..00000000000 Binary files a/dev/mpl_examples/pylab_examples/errorbar_limits_01.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/errorbar_subsample.hires.png b/dev/mpl_examples/pylab_examples/errorbar_subsample.hires.png deleted file mode 100644 index 373c67f347f..00000000000 Binary files a/dev/mpl_examples/pylab_examples/errorbar_subsample.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/errorbar_subsample.pdf b/dev/mpl_examples/pylab_examples/errorbar_subsample.pdf deleted file mode 100644 index 79f1c0b5977..00000000000 Binary files a/dev/mpl_examples/pylab_examples/errorbar_subsample.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/errorbar_subsample.png b/dev/mpl_examples/pylab_examples/errorbar_subsample.png deleted file mode 100644 index 7d630b19e88..00000000000 Binary files a/dev/mpl_examples/pylab_examples/errorbar_subsample.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/errorbar_subsample.py b/dev/mpl_examples/pylab_examples/errorbar_subsample.py deleted file mode 100644 index 6b21a36d492..00000000000 --- a/dev/mpl_examples/pylab_examples/errorbar_subsample.py +++ /dev/null @@ -1,30 +0,0 @@ -''' -Demo for the errorevery keyword to show data full accuracy data plots with -few errorbars. -''' - -import numpy as np -import matplotlib.pyplot as plt - -# example data -x = np.arange(0.1, 4, 0.1) -y = np.exp(-x) - -# example variable error bar values -yerr = 0.1 + 0.1*np.sqrt(x) - - -# Now switch to a more OO interface to exercise more features. -fig, axs = plt.subplots(nrows=1, ncols=2, sharex=True) -ax = axs[0] -ax.errorbar(x, y, yerr=yerr) -ax.set_title('all errorbars') - -ax = axs[1] -ax.errorbar(x, y, yerr=yerr, errorevery=5) -ax.set_title('only every 5th errorbar') - - -fig.suptitle('Errorbar subsampling for better visualibility') - -plt.show() diff --git a/dev/mpl_examples/pylab_examples/eventcollection_demo.hires.png b/dev/mpl_examples/pylab_examples/eventcollection_demo.hires.png deleted file mode 100644 index cdaf3abe648..00000000000 Binary files a/dev/mpl_examples/pylab_examples/eventcollection_demo.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/eventcollection_demo.pdf b/dev/mpl_examples/pylab_examples/eventcollection_demo.pdf deleted file mode 100644 index f782b6cb875..00000000000 Binary files a/dev/mpl_examples/pylab_examples/eventcollection_demo.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/eventcollection_demo.png b/dev/mpl_examples/pylab_examples/eventcollection_demo.png deleted file mode 100644 index 77b73eebded..00000000000 Binary files a/dev/mpl_examples/pylab_examples/eventcollection_demo.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/eventcollection_demo.py b/dev/mpl_examples/pylab_examples/eventcollection_demo.py deleted file mode 100644 index 3510a70479a..00000000000 --- a/dev/mpl_examples/pylab_examples/eventcollection_demo.py +++ /dev/null @@ -1,54 +0,0 @@ -#!/usr/bin/env python -# -*- Coding:utf-8 -*- -'''Plot two curves, then use EventCollections to mark the locations of the x -and y data points on the respective axes for each curve''' - -import matplotlib.pyplot as plt -from matplotlib.collections import EventCollection -import numpy as np - -# create random data -np.random.seed(50) -xdata = np.random.random([2, 10]) - -# split the data into two parts -xdata1 = xdata[0, :] -xdata2 = xdata[1, :] - -# sort the data so it makes clean curves -xdata1.sort() -xdata2.sort() - -# create some y data points -ydata1 = xdata1 ** 2 -ydata2 = 1 - xdata2 ** 3 - -# plot the data -fig = plt.figure() -ax = fig.add_subplot(1, 1, 1) -ax.plot(xdata1, ydata1, 'r', xdata2, ydata2, 'b') - -# create the events marking the x data points -xevents1 = EventCollection(xdata1, color=[1, 0, 0], linelength=0.05) -xevents2 = EventCollection(xdata2, color=[0, 0, 1], linelength=0.05) - -# create the events marking the y data points -yevents1 = EventCollection(ydata1, color=[1, 0, 0], linelength=0.05, - orientation='vertical') -yevents2 = EventCollection(ydata2, color=[0, 0, 1], linelength=0.05, - orientation='vertical') - -# add the events to the axis -ax.add_collection(xevents1) -ax.add_collection(xevents2) -ax.add_collection(yevents1) -ax.add_collection(yevents2) - -# set the limits -ax.set_xlim([0, 1]) -ax.set_ylim([0, 1]) - -ax.set_title('line plot with data points') - -# display the plot -plt.show() diff --git a/dev/mpl_examples/pylab_examples/eventplot_demo.hires.png b/dev/mpl_examples/pylab_examples/eventplot_demo.hires.png deleted file mode 100644 index 4932f4986a5..00000000000 Binary files a/dev/mpl_examples/pylab_examples/eventplot_demo.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/eventplot_demo.pdf b/dev/mpl_examples/pylab_examples/eventplot_demo.pdf deleted file mode 100644 index b1a56a5d5f8..00000000000 Binary files a/dev/mpl_examples/pylab_examples/eventplot_demo.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/eventplot_demo.png b/dev/mpl_examples/pylab_examples/eventplot_demo.png deleted file mode 100644 index 0ef3e9dc0eb..00000000000 Binary files a/dev/mpl_examples/pylab_examples/eventplot_demo.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/eventplot_demo.py b/dev/mpl_examples/pylab_examples/eventplot_demo.py deleted file mode 100644 index 8af41530aa9..00000000000 --- a/dev/mpl_examples/pylab_examples/eventplot_demo.py +++ /dev/null @@ -1,67 +0,0 @@ -#!/usr/bin/env python -# -*- Coding:utf-8 -*- -'''an eventplot showing sequences of events with various line properties -the plot is shown in both horizontal and vertical orientations''' - -import matplotlib.pyplot as plt -import numpy as np - -# set the random seed -np.random.seed(0) - -# create random data -data1 = np.random.random([6, 50]) - -# set different colors for each set of positions -colors1 = np.array([[1, 0, 0], - [0, 1, 0], - [0, 0, 1], - [1, 1, 0], - [1, 0, 1], - [0, 1, 1]]) - -# set different line properties for each set of positions -# note that some overlap -lineoffsets1 = np.array([-15, -3, 1, 1.5, 6, 10]) -linelengths1 = [5, 2, 1, 1, 3, 1.5] - -fig = plt.figure() - -# create a horizontal plot -ax1 = fig.add_subplot(221) -ax1.eventplot(data1, colors=colors1, lineoffsets=lineoffsets1, - linelengths=linelengths1) -ax1.set_title('horizontal eventplot 1') - - -# create a vertical plot -ax2 = fig.add_subplot(223) -ax2.eventplot(data1, colors=colors1, lineoffsets=lineoffsets1, - linelengths=linelengths1, orientation='vertical') -ax2.set_title('vertical eventplot 1') - -# create another set of random data. -# the gamma distribution is only used fo aesthetic purposes -data2 = np.random.gamma(4, size=[60, 50]) - -# use individual values for the parameters this time -# these values will be used for all data sets (except lineoffsets2, which -# sets the increment between each data set in this usage) -colors2 = [[0, 0, 0]] -lineoffsets2 = 1 -linelengths2 = 1 - -# create a horizontal plot -ax1 = fig.add_subplot(222) -ax1.eventplot(data2, colors=colors2, lineoffsets=lineoffsets2, - linelengths=linelengths2) -ax1.set_title('horizontal eventplot 2') - - -# create a vertical plot -ax2 = fig.add_subplot(224) -ax2.eventplot(data2, colors=colors2, lineoffsets=lineoffsets2, - linelengths=linelengths2, orientation='vertical') -ax2.set_title('vertical eventplot 2') - -plt.show() diff --git a/dev/mpl_examples/pylab_examples/fancyarrow_demo.hires.png b/dev/mpl_examples/pylab_examples/fancyarrow_demo.hires.png deleted file mode 100644 index 2a15b04ab6a..00000000000 Binary files a/dev/mpl_examples/pylab_examples/fancyarrow_demo.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/fancyarrow_demo.pdf b/dev/mpl_examples/pylab_examples/fancyarrow_demo.pdf deleted file mode 100644 index 4b535d0eb1f..00000000000 Binary files a/dev/mpl_examples/pylab_examples/fancyarrow_demo.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/fancyarrow_demo.png b/dev/mpl_examples/pylab_examples/fancyarrow_demo.png deleted file mode 100644 index a527d92ded5..00000000000 Binary files a/dev/mpl_examples/pylab_examples/fancyarrow_demo.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/fancyarrow_demo.py b/dev/mpl_examples/pylab_examples/fancyarrow_demo.py deleted file mode 100644 index 4d3c4553419..00000000000 --- a/dev/mpl_examples/pylab_examples/fancyarrow_demo.py +++ /dev/null @@ -1,50 +0,0 @@ -import matplotlib.patches as mpatches -import matplotlib.pyplot as plt - -styles = mpatches.ArrowStyle.get_styles() - -ncol=2 -nrow = (len(styles)+1) // ncol -figheight = (nrow+0.5) -fig1 = plt.figure(1, (4.*ncol/1.5, figheight/1.5)) -fontsize = 0.2 * 70 - - -ax = fig1.add_axes([0, 0, 1, 1], frameon=False, aspect=1.) - -ax.set_xlim(0, 4*ncol) -ax.set_ylim(0, figheight) - -def to_texstring(s): - s = s.replace("<", r"$<$") - s = s.replace(">", r"$>$") - s = s.replace("|", r"$|$") - return s - -for i, (stylename, styleclass) in enumerate(sorted(styles.items())): - x = 3.2 + (i//nrow)*4 - y = (figheight - 0.7 - i%nrow) # /figheight - p = mpatches.Circle((x, y), 0.2, fc="w") - ax.add_patch(p) - - ax.annotate(to_texstring(stylename), (x, y), - (x-1.2, y), - #xycoords="figure fraction", textcoords="figure fraction", - ha="right", va="center", - size=fontsize, - arrowprops=dict(arrowstyle=stylename, - patchB=p, - shrinkA=5, - shrinkB=5, - fc="w", ec="k", - connectionstyle="arc3,rad=-0.05", - ), - bbox=dict(boxstyle="square", fc="w")) - -ax.xaxis.set_visible(False) -ax.yaxis.set_visible(False) - - - -plt.draw() -plt.show() diff --git a/dev/mpl_examples/pylab_examples/fancybox_demo.py b/dev/mpl_examples/pylab_examples/fancybox_demo.py deleted file mode 100644 index 324871115f1..00000000000 --- a/dev/mpl_examples/pylab_examples/fancybox_demo.py +++ /dev/null @@ -1,171 +0,0 @@ -import matplotlib.pyplot as plt -import matplotlib.transforms as mtransforms -from matplotlib.patches import FancyBboxPatch - - -# Bbox object around which the fancy box will be drawn. -bb = mtransforms.Bbox([[0.3, 0.4], [0.7, 0.6]]) - -def draw_bbox(ax, bb): - # boxstyle=square with pad=0, i.e. bbox itself. - p_bbox = FancyBboxPatch((bb.xmin, bb.ymin), - abs(bb.width), abs(bb.height), - boxstyle="square,pad=0.", - ec="k", fc="none", zorder=10., - ) - ax.add_patch(p_bbox) - -def test1(ax): - - # a fancy box with round corners. pad=0.1 - p_fancy = FancyBboxPatch((bb.xmin, bb.ymin), - abs(bb.width), abs(bb.height), - boxstyle="round,pad=0.1", - fc=(1., .8, 1.), - ec=(1., 0.5, 1.)) - - - ax.add_patch(p_fancy) - - ax.text(0.1, 0.8, - r' boxstyle="round,pad=0.1"', - size=10, transform=ax.transAxes) - - # draws control points for the fancy box. - #l = p_fancy.get_path().vertices - #ax.plot(l[:,0], l[:,1], ".") - - # draw the original bbox in black - draw_bbox(ax, bb) - - -def test2(ax): - - # bbox=round has two optional argument. pad and rounding_size. - # They can be set during the initialization. - p_fancy = FancyBboxPatch((bb.xmin, bb.ymin), - abs(bb.width), abs(bb.height), - boxstyle="round,pad=0.1", - fc=(1., .8, 1.), - ec=(1., 0.5, 1.)) - - - ax.add_patch(p_fancy) - - # boxstyle and its argument can be later modified with - # set_boxstyle method. Note that the old attributes are simply - # forgotten even if the boxstyle name is same. - - p_fancy.set_boxstyle("round,pad=0.1, rounding_size=0.2") - #or - #p_fancy.set_boxstyle("round", pad=0.1, rounding_size=0.2) - - ax.text(0.1, 0.8, - ' boxstyle="round,pad=0.1\n rounding\\_size=0.2"', - size=10, transform=ax.transAxes) - - # draws control points for the fancy box. - #l = p_fancy.get_path().vertices - #ax.plot(l[:,0], l[:,1], ".") - - draw_bbox(ax, bb) - - - -def test3(ax): - - # mutation_scale determine overall scale of the mutation, - # i.e. both pad and rounding_size is scaled according to this - # value. - p_fancy = FancyBboxPatch((bb.xmin, bb.ymin), - abs(bb.width), abs(bb.height), - boxstyle="round,pad=0.1", - mutation_scale=2., - fc=(1., .8, 1.), - ec=(1., 0.5, 1.)) - - - ax.add_patch(p_fancy) - - ax.text(0.1, 0.8, - ' boxstyle="round,pad=0.1"\n mutation\\_scale=2', - size=10, transform=ax.transAxes) - - # draws control points for the fancy box. - #l = p_fancy.get_path().vertices - #ax.plot(l[:,0], l[:,1], ".") - - draw_bbox(ax, bb) - - - -def test4(ax): - - # When the aspect ratio of the axes is not 1, the fancy box may - # not be what you expected (green) - - p_fancy = FancyBboxPatch((bb.xmin, bb.ymin), - abs(bb.width), abs(bb.height), - boxstyle="round,pad=0.2", - fc="none", - ec=(0., .5, 0.), zorder=4) - - - ax.add_patch(p_fancy) - - - # You can compensate this by setting the mutation_aspect (pink). - p_fancy = FancyBboxPatch((bb.xmin, bb.ymin), - abs(bb.width), abs(bb.height), - boxstyle="round,pad=0.3", - mutation_aspect=.5, - fc=(1., 0.8, 1.), - ec=(1., 0.5, 1.)) - - - ax.add_patch(p_fancy) - - ax.text(0.1, 0.8, - ' boxstyle="round,pad=0.3"\n mutation\\_aspect=.5', - size=10, transform=ax.transAxes) - - draw_bbox(ax, bb) - - - -def test_all(): - plt.clf() - - ax = plt.subplot(2, 2, 1) - test1(ax) - ax.set_xlim(0., 1.) - ax.set_ylim(0., 1.) - ax.set_title("test1") - ax.set_aspect(1.) - - - ax = plt.subplot(2, 2, 2) - ax.set_title("test2") - test2(ax) - ax.set_xlim(0., 1.) - ax.set_ylim(0., 1.) - ax.set_aspect(1.) - - ax = plt.subplot(2, 2, 3) - ax.set_title("test3") - test3(ax) - ax.set_xlim(0., 1.) - ax.set_ylim(0., 1.) - ax.set_aspect(1) - - ax = plt.subplot(2, 2, 4) - ax.set_title("test4") - test4(ax) - ax.set_xlim(-0.5, 1.5) - ax.set_ylim(0., 1.) - ax.set_aspect(2.) - - plt.draw() - plt.show() - -test_all() diff --git a/dev/mpl_examples/pylab_examples/fancybox_demo2.hires.png b/dev/mpl_examples/pylab_examples/fancybox_demo2.hires.png deleted file mode 100644 index 401c9ae5122..00000000000 Binary files a/dev/mpl_examples/pylab_examples/fancybox_demo2.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/fancybox_demo2.pdf b/dev/mpl_examples/pylab_examples/fancybox_demo2.pdf deleted file mode 100644 index e11e9718889..00000000000 Binary files a/dev/mpl_examples/pylab_examples/fancybox_demo2.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/fancybox_demo2.png b/dev/mpl_examples/pylab_examples/fancybox_demo2.png deleted file mode 100644 index 62d1d13cca0..00000000000 Binary files a/dev/mpl_examples/pylab_examples/fancybox_demo2.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/fancybox_demo2.py b/dev/mpl_examples/pylab_examples/fancybox_demo2.py deleted file mode 100644 index 43a04a876b6..00000000000 --- a/dev/mpl_examples/pylab_examples/fancybox_demo2.py +++ /dev/null @@ -1,18 +0,0 @@ -import matplotlib.patches as mpatch -import matplotlib.pyplot as plt - -styles = mpatch.BoxStyle.get_styles() - -figheight = (len(styles)+.5) -fig1 = plt.figure(1, (4/1.5, figheight/1.5)) -fontsize = 0.3 * 72 - -for i, (stylename, styleclass) in enumerate(styles.items()): - fig1.text(0.5, (float(len(styles)) - 0.5 - i)/figheight, stylename, - ha="center", - size=fontsize, - transform=fig1.transFigure, - bbox=dict(boxstyle=stylename, fc="w", ec="k")) -plt.draw() -plt.show() - diff --git a/dev/mpl_examples/pylab_examples/fancybox_demo_01_00.hires.png b/dev/mpl_examples/pylab_examples/fancybox_demo_01_00.hires.png deleted file mode 100644 index 97722069ada..00000000000 Binary files a/dev/mpl_examples/pylab_examples/fancybox_demo_01_00.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/fancybox_demo_01_00.pdf b/dev/mpl_examples/pylab_examples/fancybox_demo_01_00.pdf deleted file mode 100644 index 175cc6104de..00000000000 Binary files a/dev/mpl_examples/pylab_examples/fancybox_demo_01_00.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/fancybox_demo_01_00.png b/dev/mpl_examples/pylab_examples/fancybox_demo_01_00.png deleted file mode 100644 index d4e3c051b30..00000000000 Binary files a/dev/mpl_examples/pylab_examples/fancybox_demo_01_00.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/fancytextbox_demo.hires.png b/dev/mpl_examples/pylab_examples/fancytextbox_demo.hires.png deleted file mode 100644 index 5eff799a9b2..00000000000 Binary files a/dev/mpl_examples/pylab_examples/fancytextbox_demo.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/fancytextbox_demo.pdf b/dev/mpl_examples/pylab_examples/fancytextbox_demo.pdf deleted file mode 100644 index 887202e1fe1..00000000000 Binary files a/dev/mpl_examples/pylab_examples/fancytextbox_demo.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/fancytextbox_demo.png b/dev/mpl_examples/pylab_examples/fancytextbox_demo.png deleted file mode 100644 index c6186ee37c6..00000000000 Binary files a/dev/mpl_examples/pylab_examples/fancytextbox_demo.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/fancytextbox_demo.py b/dev/mpl_examples/pylab_examples/fancytextbox_demo.py deleted file mode 100644 index 1bd54734263..00000000000 --- a/dev/mpl_examples/pylab_examples/fancytextbox_demo.py +++ /dev/null @@ -1,21 +0,0 @@ -import matplotlib.pyplot as plt - -plt.text(0.6, 0.5, "test", size=50, rotation=30., - ha="center", va="center", - bbox = dict(boxstyle="round", - ec=(1., 0.5, 0.5), - fc=(1., 0.8, 0.8), - ) - ) - -plt.text(0.5, 0.4, "test", size=50, rotation=-30., - ha="right", va="top", - bbox = dict(boxstyle="square", - ec=(1., 0.5, 0.5), - fc=(1., 0.8, 0.8), - ) - ) - - -plt.draw() -plt.show() diff --git a/dev/mpl_examples/pylab_examples/figimage_demo.hires.png b/dev/mpl_examples/pylab_examples/figimage_demo.hires.png deleted file mode 100644 index 486bd89317d..00000000000 Binary files a/dev/mpl_examples/pylab_examples/figimage_demo.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/figimage_demo.pdf b/dev/mpl_examples/pylab_examples/figimage_demo.pdf deleted file mode 100644 index c1c55356f85..00000000000 Binary files a/dev/mpl_examples/pylab_examples/figimage_demo.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/figimage_demo.png b/dev/mpl_examples/pylab_examples/figimage_demo.png deleted file mode 100644 index e3de2815c3c..00000000000 Binary files a/dev/mpl_examples/pylab_examples/figimage_demo.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/figimage_demo.py b/dev/mpl_examples/pylab_examples/figimage_demo.py deleted file mode 100644 index dc86be33e0b..00000000000 --- a/dev/mpl_examples/pylab_examples/figimage_demo.py +++ /dev/null @@ -1,22 +0,0 @@ -""" -This illustrates placing images directly in the figure, with no axes. - -""" -import numpy as np -import matplotlib -import matplotlib.cm as cm -import matplotlib.pyplot as plt - - -fig = plt.figure() -Z = np.arange(10000.0) -Z.shape = 100,100 -Z[:,50:] = 1. - -im1 = plt.figimage(Z, xo=50, yo=0, cmap=cm.jet, origin='lower') -im2 = plt.figimage(Z, xo=100, yo=100, alpha=.8, cmap=cm.jet, origin='lower') - -plt.show() - - - diff --git a/dev/mpl_examples/pylab_examples/figlegend_demo.hires.png b/dev/mpl_examples/pylab_examples/figlegend_demo.hires.png deleted file mode 100644 index 4534ea9b618..00000000000 Binary files a/dev/mpl_examples/pylab_examples/figlegend_demo.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/figlegend_demo.pdf b/dev/mpl_examples/pylab_examples/figlegend_demo.pdf deleted file mode 100644 index 4ad8a433feb..00000000000 Binary files a/dev/mpl_examples/pylab_examples/figlegend_demo.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/figlegend_demo.png b/dev/mpl_examples/pylab_examples/figlegend_demo.png deleted file mode 100644 index 2b8e82f19e6..00000000000 Binary files a/dev/mpl_examples/pylab_examples/figlegend_demo.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/figlegend_demo.py b/dev/mpl_examples/pylab_examples/figlegend_demo.py deleted file mode 100644 index 408d0cbb593..00000000000 --- a/dev/mpl_examples/pylab_examples/figlegend_demo.py +++ /dev/null @@ -1,19 +0,0 @@ -import numpy as np -import matplotlib.pyplot as plt - -fig = plt.figure() -ax1 = fig.add_axes([0.1, 0.1, 0.4, 0.7]) -ax2 = fig.add_axes([0.55, 0.1, 0.4, 0.7]) - -x = np.arange(0.0, 2.0, 0.02) -y1 = np.sin(2*np.pi*x) -y2 = np.exp(-x) -l1, l2 = ax1.plot(x, y1, 'rs-', x, y2, 'go') - -y3 = np.sin(4*np.pi*x) -y4 = np.exp(-2*x) -l3, l4 = ax2.plot(x, y3, 'yd-', x, y3, 'k^') - -fig.legend((l1, l2), ('Line 1', 'Line 2'), 'upper left') -fig.legend((l3, l4), ('Line 3', 'Line 4'), 'upper right') -plt.show() diff --git a/dev/mpl_examples/pylab_examples/figure_title.hires.png b/dev/mpl_examples/pylab_examples/figure_title.hires.png deleted file mode 100644 index 37fa83a4d8b..00000000000 Binary files a/dev/mpl_examples/pylab_examples/figure_title.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/figure_title.pdf b/dev/mpl_examples/pylab_examples/figure_title.pdf deleted file mode 100644 index 029935e0d31..00000000000 Binary files a/dev/mpl_examples/pylab_examples/figure_title.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/figure_title.png b/dev/mpl_examples/pylab_examples/figure_title.png deleted file mode 100644 index 54b688e2efb..00000000000 Binary files a/dev/mpl_examples/pylab_examples/figure_title.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/figure_title.py b/dev/mpl_examples/pylab_examples/figure_title.py deleted file mode 100644 index e1253d87e95..00000000000 --- a/dev/mpl_examples/pylab_examples/figure_title.py +++ /dev/null @@ -1,29 +0,0 @@ -#!/usr/bin/env python -from matplotlib.font_manager import FontProperties -from pylab import * - -def f(t): - s1 = cos(2*pi*t) - e1 = exp(-t) - return multiply(s1,e1) - -t1 = arange(0.0, 5.0, 0.1) -t2 = arange(0.0, 5.0, 0.02) -t3 = arange(0.0, 2.0, 0.01) - - -subplot(121) -plot(t1, f(t1), 'bo', t2, f(t2), 'k') -title('subplot 1') -ylabel('Damped oscillation') -suptitle('This is a somewhat long figure title', fontsize=16) - - -subplot(122) -plot(t3, cos(2*pi*t3), 'r--') -xlabel('time (s)') -title('subplot 2') -ylabel('Undamped') - -show() - diff --git a/dev/mpl_examples/pylab_examples/fill_between_demo.py b/dev/mpl_examples/pylab_examples/fill_between_demo.py deleted file mode 100644 index 1dd2dc2ea36..00000000000 --- a/dev/mpl_examples/pylab_examples/fill_between_demo.py +++ /dev/null @@ -1,67 +0,0 @@ -#!/usr/bin/env python -import matplotlib.mlab as mlab -from matplotlib.pyplot import figure, show -import numpy as np - -x = np.arange(0.0, 2, 0.01) -y1 = np.sin(2*np.pi*x) -y2 = 1.2*np.sin(4*np.pi*x) - -fig = figure() -ax1 = fig.add_subplot(311) -ax2 = fig.add_subplot(312, sharex=ax1) -ax3 = fig.add_subplot(313, sharex=ax1) - -ax1.fill_between(x, 0, y1) -ax1.set_ylabel('between y1 and 0') - -ax2.fill_between(x, y1, 1) -ax2.set_ylabel('between y1 and 1') - -ax3.fill_between(x, y1, y2) -ax3.set_ylabel('between y1 and y2') -ax3.set_xlabel('x') - -# now fill between y1 and y2 where a logical condition is met. Note -# this is different than calling -# fill_between(x[where], y1[where],y2[where] -# because of edge effects over multiple contiguous regions. -fig = figure() -ax = fig.add_subplot(211) -ax.plot(x, y1, x, y2, color='black') -ax.fill_between(x, y1, y2, where=y2>=y1, facecolor='green', interpolate=True) -ax.fill_between(x, y1, y2, where=y2<=y1, facecolor='red', interpolate=True) -ax.set_title('fill between where') - -# Test support for masked arrays. -y2 = np.ma.masked_greater(y2, 1.0) -ax1 = fig.add_subplot(212, sharex=ax) -ax1.plot(x, y1, x, y2, color='black') -ax1.fill_between(x, y1, y2, where=y2>=y1, facecolor='green', interpolate=True) -ax1.fill_between(x, y1, y2, where=y2<=y1, facecolor='red', interpolate=True) -ax1.set_title('Now regions with y2>1 are masked') - -# This example illustrates a problem; because of the data -# gridding, there are undesired unfilled triangles at the crossover -# points. A brute-force solution would be to interpolate all -# arrays to a very fine grid before plotting. - -# show how to use transforms to create axes spans where a certain condition is satisfied -fig = figure() -ax = fig.add_subplot(111) -y = np.sin(4*np.pi*x) -ax.plot(x, y, color='black') - -# use the data coordinates for the x-axis and the axes coordinates for the y-axis -import matplotlib.transforms as mtransforms -trans = mtransforms.blended_transform_factory(ax.transData, ax.transAxes) -theta = 0.9 -ax.axhline(theta, color='green', lw=2, alpha=0.5) -ax.axhline(-theta, color='red', lw=2, alpha=0.5) -ax.fill_between(x, 0, 1, where=y>theta, facecolor='green', alpha=0.5, transform=trans) -ax.fill_between(x, 0, 1, where=y<-theta, facecolor='red', alpha=0.5, transform=trans) - - - -show() - diff --git a/dev/mpl_examples/pylab_examples/fill_between_demo_00.hires.png b/dev/mpl_examples/pylab_examples/fill_between_demo_00.hires.png deleted file mode 100644 index b0388577570..00000000000 Binary files a/dev/mpl_examples/pylab_examples/fill_between_demo_00.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/fill_between_demo_00.pdf b/dev/mpl_examples/pylab_examples/fill_between_demo_00.pdf deleted file mode 100644 index 2658cb05579..00000000000 Binary files a/dev/mpl_examples/pylab_examples/fill_between_demo_00.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/fill_between_demo_00.png b/dev/mpl_examples/pylab_examples/fill_between_demo_00.png deleted file mode 100644 index 5e514a06d8b..00000000000 Binary files a/dev/mpl_examples/pylab_examples/fill_between_demo_00.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/fill_between_demo_01.hires.png b/dev/mpl_examples/pylab_examples/fill_between_demo_01.hires.png deleted file mode 100644 index 250129df83b..00000000000 Binary files a/dev/mpl_examples/pylab_examples/fill_between_demo_01.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/fill_between_demo_01.pdf b/dev/mpl_examples/pylab_examples/fill_between_demo_01.pdf deleted file mode 100644 index 167443353e1..00000000000 Binary files a/dev/mpl_examples/pylab_examples/fill_between_demo_01.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/fill_between_demo_01.png b/dev/mpl_examples/pylab_examples/fill_between_demo_01.png deleted file mode 100644 index 270c1a539a4..00000000000 Binary files a/dev/mpl_examples/pylab_examples/fill_between_demo_01.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/fill_between_demo_02.hires.png b/dev/mpl_examples/pylab_examples/fill_between_demo_02.hires.png deleted file mode 100644 index d918384b226..00000000000 Binary files a/dev/mpl_examples/pylab_examples/fill_between_demo_02.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/fill_between_demo_02.pdf b/dev/mpl_examples/pylab_examples/fill_between_demo_02.pdf deleted file mode 100644 index b2744be93aa..00000000000 Binary files a/dev/mpl_examples/pylab_examples/fill_between_demo_02.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/fill_between_demo_02.png b/dev/mpl_examples/pylab_examples/fill_between_demo_02.png deleted file mode 100644 index 449ad4c5d57..00000000000 Binary files a/dev/mpl_examples/pylab_examples/fill_between_demo_02.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/fill_betweenx_demo.py b/dev/mpl_examples/pylab_examples/fill_betweenx_demo.py deleted file mode 100644 index 799718b1d12..00000000000 --- a/dev/mpl_examples/pylab_examples/fill_betweenx_demo.py +++ /dev/null @@ -1,50 +0,0 @@ -import matplotlib.mlab as mlab -from matplotlib.pyplot import figure, show -import numpy as np - -## Copy of fill_between.py but using fill_betweenx() instead. - -x = np.arange(0.0, 2, 0.01) -y1 = np.sin(2*np.pi*x) -y2 = 1.2*np.sin(4*np.pi*x) - -fig = figure() -ax1 = fig.add_subplot(311) -ax2 = fig.add_subplot(312, sharex=ax1) -ax3 = fig.add_subplot(313, sharex=ax1) - -ax1.fill_betweenx(x, 0, y1) -ax1.set_ylabel('between y1 and 0') - -ax2.fill_betweenx(x, y1, 1) -ax2.set_ylabel('between y1 and 1') - -ax3.fill_betweenx(x, y1, y2) -ax3.set_ylabel('between y1 and y2') -ax3.set_xlabel('x') - -# now fill between y1 and y2 where a logical condition is met. Note -# this is different than calling -# fill_between(x[where], y1[where],y2[where] -# because of edge effects over multiple contiguous regions. -fig = figure() -ax = fig.add_subplot(211) -ax.plot(y1, x, y2, x, color='black') -ax.fill_betweenx(x, y1, y2, where=y2>=y1, facecolor='green') -ax.fill_betweenx(x, y1, y2, where=y2<=y1, facecolor='red') -ax.set_title('fill between where') - -# Test support for masked arrays. -y2 = np.ma.masked_greater(y2, 1.0) -ax1 = fig.add_subplot(212, sharex=ax) -ax1.plot(y1, x, y2, x, color='black') -ax1.fill_betweenx(x, y1, y2, where=y2>=y1, facecolor='green') -ax1.fill_betweenx(x, y1, y2, where=y2<=y1, facecolor='red') -ax1.set_title('Now regions with y2 > 1 are masked') - -# This example illustrates a problem; because of the data -# gridding, there are undesired unfilled triangles at the crossover -# points. A brute-force solution would be to interpolate all -# arrays to a very fine grid before plotting. - -show() diff --git a/dev/mpl_examples/pylab_examples/fill_betweenx_demo_00.hires.png b/dev/mpl_examples/pylab_examples/fill_betweenx_demo_00.hires.png deleted file mode 100644 index 95a5f5469fa..00000000000 Binary files a/dev/mpl_examples/pylab_examples/fill_betweenx_demo_00.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/fill_betweenx_demo_00.pdf b/dev/mpl_examples/pylab_examples/fill_betweenx_demo_00.pdf deleted file mode 100644 index 13be3ace392..00000000000 Binary files a/dev/mpl_examples/pylab_examples/fill_betweenx_demo_00.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/fill_betweenx_demo_00.png b/dev/mpl_examples/pylab_examples/fill_betweenx_demo_00.png deleted file mode 100644 index 2463af08077..00000000000 Binary files a/dev/mpl_examples/pylab_examples/fill_betweenx_demo_00.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/fill_betweenx_demo_01.hires.png b/dev/mpl_examples/pylab_examples/fill_betweenx_demo_01.hires.png deleted file mode 100644 index ec0b6542fc7..00000000000 Binary files a/dev/mpl_examples/pylab_examples/fill_betweenx_demo_01.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/fill_betweenx_demo_01.pdf b/dev/mpl_examples/pylab_examples/fill_betweenx_demo_01.pdf deleted file mode 100644 index 51063ff8856..00000000000 Binary files a/dev/mpl_examples/pylab_examples/fill_betweenx_demo_01.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/fill_betweenx_demo_01.png b/dev/mpl_examples/pylab_examples/fill_betweenx_demo_01.png deleted file mode 100644 index 2ef00064334..00000000000 Binary files a/dev/mpl_examples/pylab_examples/fill_betweenx_demo_01.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/fill_demo.hires.png b/dev/mpl_examples/pylab_examples/fill_demo.hires.png deleted file mode 100644 index f5cd2edb583..00000000000 Binary files a/dev/mpl_examples/pylab_examples/fill_demo.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/fill_demo.pdf b/dev/mpl_examples/pylab_examples/fill_demo.pdf deleted file mode 100644 index f1968de0c10..00000000000 Binary files a/dev/mpl_examples/pylab_examples/fill_demo.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/fill_demo.png b/dev/mpl_examples/pylab_examples/fill_demo.png deleted file mode 100644 index ecac2972ed1..00000000000 Binary files a/dev/mpl_examples/pylab_examples/fill_demo.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/fill_demo.py b/dev/mpl_examples/pylab_examples/fill_demo.py deleted file mode 100644 index 1cfded4d60c..00000000000 --- a/dev/mpl_examples/pylab_examples/fill_demo.py +++ /dev/null @@ -1,10 +0,0 @@ -#!/usr/bin/env python -import numpy as np -import matplotlib.pyplot as plt - -t = np.arange(0.0, 1.01, 0.01) -s = np.sin(2*2*np.pi*t) - -plt.fill(t, s*np.exp(-5*t), 'r') -plt.grid(True) -plt.show() diff --git a/dev/mpl_examples/pylab_examples/fill_demo2.hires.png b/dev/mpl_examples/pylab_examples/fill_demo2.hires.png deleted file mode 100644 index 72c0a8994e6..00000000000 Binary files a/dev/mpl_examples/pylab_examples/fill_demo2.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/fill_demo2.pdf b/dev/mpl_examples/pylab_examples/fill_demo2.pdf deleted file mode 100644 index bf188dcfa86..00000000000 Binary files a/dev/mpl_examples/pylab_examples/fill_demo2.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/fill_demo2.png b/dev/mpl_examples/pylab_examples/fill_demo2.png deleted file mode 100644 index 86eedc88dea..00000000000 Binary files a/dev/mpl_examples/pylab_examples/fill_demo2.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/fill_demo2.py b/dev/mpl_examples/pylab_examples/fill_demo2.py deleted file mode 100644 index 77b86d79017..00000000000 --- a/dev/mpl_examples/pylab_examples/fill_demo2.py +++ /dev/null @@ -1,10 +0,0 @@ -from matplotlib.pyplot import figure, show -from numpy import arange, sin, pi - -fig = figure() -ax = fig.add_subplot(111) -t = arange(0.0,3.01,0.01) -s = sin(2*pi*t) -c = sin(4*pi*t) -ax.fill(t, s, 'b', t, c, 'g', alpha=0.2) -show() diff --git a/dev/mpl_examples/pylab_examples/fill_spiral.hires.png b/dev/mpl_examples/pylab_examples/fill_spiral.hires.png deleted file mode 100644 index 6fda4d2d3e9..00000000000 Binary files a/dev/mpl_examples/pylab_examples/fill_spiral.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/fill_spiral.pdf b/dev/mpl_examples/pylab_examples/fill_spiral.pdf deleted file mode 100644 index a94830dfe8d..00000000000 Binary files a/dev/mpl_examples/pylab_examples/fill_spiral.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/fill_spiral.png b/dev/mpl_examples/pylab_examples/fill_spiral.png deleted file mode 100644 index c1ae62b4e5d..00000000000 Binary files a/dev/mpl_examples/pylab_examples/fill_spiral.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/fill_spiral.py b/dev/mpl_examples/pylab_examples/fill_spiral.py deleted file mode 100644 index 0e7674c0594..00000000000 --- a/dev/mpl_examples/pylab_examples/fill_spiral.py +++ /dev/null @@ -1,24 +0,0 @@ -#!/usr/bin/env python - -from pylab import * - -theta = arange(0,8*pi,0.1) -a=1 -b=.2 - -for dt in arange(0,2*pi,pi/2.0): - - x = a*cos( theta+dt )*exp(b*theta) - y = a*sin( theta+dt )*exp(b*theta) - - dt = dt+pi/4.0 - - x2 = a*cos( theta+dt )*exp(b*theta) - y2 = a*sin( theta+dt )*exp(b*theta) - - xf = concatenate( (x,x2[::-1]) ) - yf = concatenate( (y,y2[::-1]) ) - - p1=fill(xf,yf) - -show() diff --git a/dev/mpl_examples/pylab_examples/filledmarker_demo.py b/dev/mpl_examples/pylab_examples/filledmarker_demo.py deleted file mode 100644 index b4f001512ff..00000000000 --- a/dev/mpl_examples/pylab_examples/filledmarker_demo.py +++ /dev/null @@ -1,38 +0,0 @@ -import itertools - -import numpy as np -import matplotlib.lines as mlines -import matplotlib.pyplot as plt - -colors = itertools.cycle(['b', 'g', 'r', 'c', 'm', 'y', 'k']) -altcolor = 'lightgreen' - -plt.rcParams['text.usetex'] = False # otherwise, '^' will cause trouble - -y = np.arange(10) -for marker in mlines.Line2D.filled_markers: - f = plt.figure() - f.text(.5,.95, "marker = %r" % marker, ha='center') - for i,fs in enumerate(mlines.Line2D.fillStyles): - color = colors.next() - - ax = f.add_subplot(121) - ax.plot(2*(4-i)+y, c=color, - marker=marker, - markersize=20, - fillstyle=fs, - label=fs) - ax.legend(loc=2) - ax.set_title('fillstyle') - - ax = f.add_subplot(122) - ax.plot(2*(4-i)+y, c=color, - marker=marker, - markersize=20, - markerfacecoloralt=altcolor, - fillstyle=fs, - label=fs) - ax.legend(loc=2) - ax.set_title('fillstyle') - -plt.show() diff --git a/dev/mpl_examples/pylab_examples/filledmarker_demo_00.hires.png b/dev/mpl_examples/pylab_examples/filledmarker_demo_00.hires.png deleted file mode 100644 index 08adc63c1c8..00000000000 Binary files a/dev/mpl_examples/pylab_examples/filledmarker_demo_00.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/filledmarker_demo_00.pdf b/dev/mpl_examples/pylab_examples/filledmarker_demo_00.pdf deleted file mode 100644 index f642d184859..00000000000 Binary files a/dev/mpl_examples/pylab_examples/filledmarker_demo_00.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/filledmarker_demo_00.png b/dev/mpl_examples/pylab_examples/filledmarker_demo_00.png deleted file mode 100644 index 6c039629b83..00000000000 Binary files a/dev/mpl_examples/pylab_examples/filledmarker_demo_00.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/filledmarker_demo_01.hires.png b/dev/mpl_examples/pylab_examples/filledmarker_demo_01.hires.png deleted file mode 100644 index 47646132811..00000000000 Binary files a/dev/mpl_examples/pylab_examples/filledmarker_demo_01.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/filledmarker_demo_01.pdf b/dev/mpl_examples/pylab_examples/filledmarker_demo_01.pdf deleted file mode 100644 index 8044cb4908c..00000000000 Binary files a/dev/mpl_examples/pylab_examples/filledmarker_demo_01.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/filledmarker_demo_01.png b/dev/mpl_examples/pylab_examples/filledmarker_demo_01.png deleted file mode 100644 index 1236b1eb9fb..00000000000 Binary files a/dev/mpl_examples/pylab_examples/filledmarker_demo_01.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/filledmarker_demo_02.hires.png b/dev/mpl_examples/pylab_examples/filledmarker_demo_02.hires.png deleted file mode 100644 index acdb3a40ed5..00000000000 Binary files a/dev/mpl_examples/pylab_examples/filledmarker_demo_02.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/filledmarker_demo_02.pdf b/dev/mpl_examples/pylab_examples/filledmarker_demo_02.pdf deleted file mode 100644 index 96a00f9199d..00000000000 Binary files a/dev/mpl_examples/pylab_examples/filledmarker_demo_02.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/filledmarker_demo_02.png b/dev/mpl_examples/pylab_examples/filledmarker_demo_02.png deleted file mode 100644 index dad8d249f86..00000000000 Binary files a/dev/mpl_examples/pylab_examples/filledmarker_demo_02.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/filledmarker_demo_03.hires.png b/dev/mpl_examples/pylab_examples/filledmarker_demo_03.hires.png deleted file mode 100644 index 983ee37e465..00000000000 Binary files a/dev/mpl_examples/pylab_examples/filledmarker_demo_03.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/filledmarker_demo_03.pdf b/dev/mpl_examples/pylab_examples/filledmarker_demo_03.pdf deleted file mode 100644 index 41f2d7d8239..00000000000 Binary files a/dev/mpl_examples/pylab_examples/filledmarker_demo_03.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/filledmarker_demo_03.png b/dev/mpl_examples/pylab_examples/filledmarker_demo_03.png deleted file mode 100644 index b1ae2202929..00000000000 Binary files a/dev/mpl_examples/pylab_examples/filledmarker_demo_03.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/filledmarker_demo_04.hires.png b/dev/mpl_examples/pylab_examples/filledmarker_demo_04.hires.png deleted file mode 100644 index abb5172cfab..00000000000 Binary files a/dev/mpl_examples/pylab_examples/filledmarker_demo_04.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/filledmarker_demo_04.pdf b/dev/mpl_examples/pylab_examples/filledmarker_demo_04.pdf deleted file mode 100644 index c81c065f0eb..00000000000 Binary files a/dev/mpl_examples/pylab_examples/filledmarker_demo_04.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/filledmarker_demo_04.png b/dev/mpl_examples/pylab_examples/filledmarker_demo_04.png deleted file mode 100644 index c96e48eed85..00000000000 Binary files a/dev/mpl_examples/pylab_examples/filledmarker_demo_04.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/filledmarker_demo_05.hires.png b/dev/mpl_examples/pylab_examples/filledmarker_demo_05.hires.png deleted file mode 100644 index bbde20b92af..00000000000 Binary files a/dev/mpl_examples/pylab_examples/filledmarker_demo_05.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/filledmarker_demo_05.pdf b/dev/mpl_examples/pylab_examples/filledmarker_demo_05.pdf deleted file mode 100644 index f772978e275..00000000000 Binary files a/dev/mpl_examples/pylab_examples/filledmarker_demo_05.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/filledmarker_demo_05.png b/dev/mpl_examples/pylab_examples/filledmarker_demo_05.png deleted file mode 100644 index ec1384f9122..00000000000 Binary files a/dev/mpl_examples/pylab_examples/filledmarker_demo_05.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/filledmarker_demo_06.hires.png b/dev/mpl_examples/pylab_examples/filledmarker_demo_06.hires.png deleted file mode 100644 index a57deff8e66..00000000000 Binary files a/dev/mpl_examples/pylab_examples/filledmarker_demo_06.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/filledmarker_demo_06.pdf b/dev/mpl_examples/pylab_examples/filledmarker_demo_06.pdf deleted file mode 100644 index f14b3c1e729..00000000000 Binary files a/dev/mpl_examples/pylab_examples/filledmarker_demo_06.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/filledmarker_demo_06.png b/dev/mpl_examples/pylab_examples/filledmarker_demo_06.png deleted file mode 100644 index 97d8dc631b6..00000000000 Binary files a/dev/mpl_examples/pylab_examples/filledmarker_demo_06.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/filledmarker_demo_07.hires.png b/dev/mpl_examples/pylab_examples/filledmarker_demo_07.hires.png deleted file mode 100644 index 84e1419209b..00000000000 Binary files a/dev/mpl_examples/pylab_examples/filledmarker_demo_07.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/filledmarker_demo_07.pdf b/dev/mpl_examples/pylab_examples/filledmarker_demo_07.pdf deleted file mode 100644 index 8f61f6309ad..00000000000 Binary files a/dev/mpl_examples/pylab_examples/filledmarker_demo_07.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/filledmarker_demo_07.png b/dev/mpl_examples/pylab_examples/filledmarker_demo_07.png deleted file mode 100644 index 1fdf767a7f2..00000000000 Binary files a/dev/mpl_examples/pylab_examples/filledmarker_demo_07.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/filledmarker_demo_08.hires.png b/dev/mpl_examples/pylab_examples/filledmarker_demo_08.hires.png deleted file mode 100644 index c71f5b6a774..00000000000 Binary files a/dev/mpl_examples/pylab_examples/filledmarker_demo_08.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/filledmarker_demo_08.pdf b/dev/mpl_examples/pylab_examples/filledmarker_demo_08.pdf deleted file mode 100644 index afd564db14f..00000000000 Binary files a/dev/mpl_examples/pylab_examples/filledmarker_demo_08.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/filledmarker_demo_08.png b/dev/mpl_examples/pylab_examples/filledmarker_demo_08.png deleted file mode 100644 index 010c4759dc4..00000000000 Binary files a/dev/mpl_examples/pylab_examples/filledmarker_demo_08.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/filledmarker_demo_09.hires.png b/dev/mpl_examples/pylab_examples/filledmarker_demo_09.hires.png deleted file mode 100644 index 200e201f318..00000000000 Binary files a/dev/mpl_examples/pylab_examples/filledmarker_demo_09.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/filledmarker_demo_09.pdf b/dev/mpl_examples/pylab_examples/filledmarker_demo_09.pdf deleted file mode 100644 index 11336aed911..00000000000 Binary files a/dev/mpl_examples/pylab_examples/filledmarker_demo_09.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/filledmarker_demo_09.png b/dev/mpl_examples/pylab_examples/filledmarker_demo_09.png deleted file mode 100644 index 9cd08778abe..00000000000 Binary files a/dev/mpl_examples/pylab_examples/filledmarker_demo_09.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/filledmarker_demo_10.hires.png b/dev/mpl_examples/pylab_examples/filledmarker_demo_10.hires.png deleted file mode 100644 index 0a4f76d65c4..00000000000 Binary files a/dev/mpl_examples/pylab_examples/filledmarker_demo_10.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/filledmarker_demo_10.pdf b/dev/mpl_examples/pylab_examples/filledmarker_demo_10.pdf deleted file mode 100644 index 6fbc4a027d5..00000000000 Binary files a/dev/mpl_examples/pylab_examples/filledmarker_demo_10.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/filledmarker_demo_10.png b/dev/mpl_examples/pylab_examples/filledmarker_demo_10.png deleted file mode 100644 index 7f4c9f1ff12..00000000000 Binary files a/dev/mpl_examples/pylab_examples/filledmarker_demo_10.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/filledmarker_demo_11.hires.png b/dev/mpl_examples/pylab_examples/filledmarker_demo_11.hires.png deleted file mode 100644 index f08524e9f5f..00000000000 Binary files a/dev/mpl_examples/pylab_examples/filledmarker_demo_11.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/filledmarker_demo_11.pdf b/dev/mpl_examples/pylab_examples/filledmarker_demo_11.pdf deleted file mode 100644 index d933b02e43b..00000000000 Binary files a/dev/mpl_examples/pylab_examples/filledmarker_demo_11.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/filledmarker_demo_11.png b/dev/mpl_examples/pylab_examples/filledmarker_demo_11.png deleted file mode 100644 index 3a2b2e5c5b4..00000000000 Binary files a/dev/mpl_examples/pylab_examples/filledmarker_demo_11.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/filledmarker_demo_12.hires.png b/dev/mpl_examples/pylab_examples/filledmarker_demo_12.hires.png deleted file mode 100644 index ca59d3a999d..00000000000 Binary files a/dev/mpl_examples/pylab_examples/filledmarker_demo_12.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/filledmarker_demo_12.pdf b/dev/mpl_examples/pylab_examples/filledmarker_demo_12.pdf deleted file mode 100644 index 6eaeb41ff5c..00000000000 Binary files a/dev/mpl_examples/pylab_examples/filledmarker_demo_12.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/filledmarker_demo_12.png b/dev/mpl_examples/pylab_examples/filledmarker_demo_12.png deleted file mode 100644 index b2455b463bd..00000000000 Binary files a/dev/mpl_examples/pylab_examples/filledmarker_demo_12.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/finance_demo.hires.png b/dev/mpl_examples/pylab_examples/finance_demo.hires.png deleted file mode 100644 index 214e9fa94f4..00000000000 Binary files a/dev/mpl_examples/pylab_examples/finance_demo.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/finance_demo.pdf b/dev/mpl_examples/pylab_examples/finance_demo.pdf deleted file mode 100644 index e06dab0faa2..00000000000 Binary files a/dev/mpl_examples/pylab_examples/finance_demo.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/finance_demo.png b/dev/mpl_examples/pylab_examples/finance_demo.png deleted file mode 100644 index 0e6e8cb8023..00000000000 Binary files a/dev/mpl_examples/pylab_examples/finance_demo.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/finance_demo.py b/dev/mpl_examples/pylab_examples/finance_demo.py deleted file mode 100644 index c14b750f8b0..00000000000 --- a/dev/mpl_examples/pylab_examples/finance_demo.py +++ /dev/null @@ -1,38 +0,0 @@ -#!/usr/bin/env python -from pylab import * -from matplotlib.dates import DateFormatter, WeekdayLocator, HourLocator, \ - DayLocator, MONDAY -from matplotlib.finance import quotes_historical_yahoo, candlestick,\ - plot_day_summary, candlestick2 - -# (Year, month, day) tuples suffice as args for quotes_historical_yahoo -date1 = ( 2004, 2, 1) -date2 = ( 2004, 4, 12 ) - - -mondays = WeekdayLocator(MONDAY) # major ticks on the mondays -alldays = DayLocator() # minor ticks on the days -weekFormatter = DateFormatter('%b %d') # e.g., Jan 12 -dayFormatter = DateFormatter('%d') # e.g., 12 - -quotes = quotes_historical_yahoo('INTC', date1, date2) -if len(quotes) == 0: - raise SystemExit - -fig = figure() -fig.subplots_adjust(bottom=0.2) -ax = fig.add_subplot(111) -ax.xaxis.set_major_locator(mondays) -ax.xaxis.set_minor_locator(alldays) -ax.xaxis.set_major_formatter(weekFormatter) -#ax.xaxis.set_minor_formatter(dayFormatter) - -#plot_day_summary(ax, quotes, ticksize=3) -candlestick(ax, quotes, width=0.6) - -ax.xaxis_date() -ax.autoscale_view() -setp( gca().get_xticklabels(), rotation=45, horizontalalignment='right') - -show() - diff --git a/dev/mpl_examples/pylab_examples/finance_work2.hires.png b/dev/mpl_examples/pylab_examples/finance_work2.hires.png deleted file mode 100644 index 57f2493b979..00000000000 Binary files a/dev/mpl_examples/pylab_examples/finance_work2.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/finance_work2.pdf b/dev/mpl_examples/pylab_examples/finance_work2.pdf deleted file mode 100644 index f4a805c9797..00000000000 Binary files a/dev/mpl_examples/pylab_examples/finance_work2.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/finance_work2.png b/dev/mpl_examples/pylab_examples/finance_work2.png deleted file mode 100644 index acfca347367..00000000000 Binary files a/dev/mpl_examples/pylab_examples/finance_work2.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/finance_work2.py b/dev/mpl_examples/pylab_examples/finance_work2.py deleted file mode 100644 index 0dc2f5f9826..00000000000 --- a/dev/mpl_examples/pylab_examples/finance_work2.py +++ /dev/null @@ -1,209 +0,0 @@ -import datetime -import numpy as np -import matplotlib.colors as colors -import matplotlib.finance as finance -import matplotlib.dates as mdates -import matplotlib.ticker as mticker -import matplotlib.mlab as mlab -import matplotlib.pyplot as plt -import matplotlib.font_manager as font_manager - - -startdate = datetime.date(2006,1,1) -today = enddate = datetime.date.today() -ticker = 'SPY' - - -fh = finance.fetch_historical_yahoo(ticker, startdate, enddate) -# a numpy record array with fields: date, open, high, low, close, volume, adj_close) - -r = mlab.csv2rec(fh); fh.close() -r.sort() - - -def moving_average(x, n, type='simple'): - """ - compute an n period moving average. - - type is 'simple' | 'exponential' - - """ - x = np.asarray(x) - if type=='simple': - weights = np.ones(n) - else: - weights = np.exp(np.linspace(-1., 0., n)) - - weights /= weights.sum() - - - a = np.convolve(x, weights, mode='full')[:len(x)] - a[:n] = a[n] - return a - -def relative_strength(prices, n=14): - """ - compute the n period relative strength indicator - http://stockcharts.com/school/doku.php?id=chart_school:glossary_r#relativestrengthindex - http://www.investopedia.com/terms/r/rsi.asp - """ - - deltas = np.diff(prices) - seed = deltas[:n+1] - up = seed[seed>=0].sum()/n - down = -seed[seed<0].sum()/n - rs = up/down - rsi = np.zeros_like(prices) - rsi[:n] = 100. - 100./(1.+rs) - - for i in range(n, len(prices)): - delta = deltas[i-1] # cause the diff is 1 shorter - - if delta>0: - upval = delta - downval = 0. - else: - upval = 0. - downval = -delta - - up = (up*(n-1) + upval)/n - down = (down*(n-1) + downval)/n - - rs = up/down - rsi[i] = 100. - 100./(1.+rs) - - return rsi - -def moving_average_convergence(x, nslow=26, nfast=12): - """ - compute the MACD (Moving Average Convergence/Divergence) using a fast and slow exponential moving avg' - return value is emaslow, emafast, macd which are len(x) arrays - """ - emaslow = moving_average(x, nslow, type='exponential') - emafast = moving_average(x, nfast, type='exponential') - return emaslow, emafast, emafast - emaslow - - -plt.rc('axes', grid=True) -plt.rc('grid', color='0.75', linestyle='-', linewidth=0.5) - -textsize = 9 -left, width = 0.1, 0.8 -rect1 = [left, 0.7, width, 0.2] -rect2 = [left, 0.3, width, 0.4] -rect3 = [left, 0.1, width, 0.2] - - -fig = plt.figure(facecolor='white') -axescolor = '#f6f6f6' # the axes background color - -ax1 = fig.add_axes(rect1, axisbg=axescolor) #left, bottom, width, height -ax2 = fig.add_axes(rect2, axisbg=axescolor, sharex=ax1) -ax2t = ax2.twinx() -ax3 = fig.add_axes(rect3, axisbg=axescolor, sharex=ax1) - - - -### plot the relative strength indicator -prices = r.adj_close -rsi = relative_strength(prices) -fillcolor = 'darkgoldenrod' - -ax1.plot(r.date, rsi, color=fillcolor) -ax1.axhline(70, color=fillcolor) -ax1.axhline(30, color=fillcolor) -ax1.fill_between(r.date, rsi, 70, where=(rsi>=70), facecolor=fillcolor, edgecolor=fillcolor) -ax1.fill_between(r.date, rsi, 30, where=(rsi<=30), facecolor=fillcolor, edgecolor=fillcolor) -ax1.text(0.6, 0.9, '>70 = overbought', va='top', transform=ax1.transAxes, fontsize=textsize) -ax1.text(0.6, 0.1, '<30 = oversold', transform=ax1.transAxes, fontsize=textsize) -ax1.set_ylim(0, 100) -ax1.set_yticks([30,70]) -ax1.text(0.025, 0.95, 'RSI (14)', va='top', transform=ax1.transAxes, fontsize=textsize) -ax1.set_title('%s daily'%ticker) - -### plot the price and volume data -dx = r.adj_close - r.close -low = r.low + dx -high = r.high + dx - -deltas = np.zeros_like(prices) -deltas[1:] = np.diff(prices) -up = deltas>0 -ax2.vlines(r.date[up], low[up], high[up], color='black', label='_nolegend_') -ax2.vlines(r.date[~up], low[~up], high[~up], color='black', label='_nolegend_') -ma20 = moving_average(prices, 20, type='simple') -ma200 = moving_average(prices, 200, type='simple') - -linema20, = ax2.plot(r.date, ma20, color='blue', lw=2, label='MA (20)') -linema200, = ax2.plot(r.date, ma200, color='red', lw=2, label='MA (200)') - - -last = r[-1] -s = '%s O:%1.2f H:%1.2f L:%1.2f C:%1.2f, V:%1.1fM Chg:%+1.2f' % ( - today.strftime('%d-%b-%Y'), - last.open, last.high, - last.low, last.close, - last.volume*1e-6, - last.close-last.open ) -t4 = ax2.text(0.3, 0.9, s, transform=ax2.transAxes, fontsize=textsize) - -props = font_manager.FontProperties(size=10) -leg = ax2.legend(loc='center left', shadow=True, fancybox=True, prop=props) -leg.get_frame().set_alpha(0.5) - - -volume = (r.close*r.volume)/1e6 # dollar volume in millions -vmax = volume.max() -poly = ax2t.fill_between(r.date, volume, 0, label='Volume', facecolor=fillcolor, edgecolor=fillcolor) -ax2t.set_ylim(0, 5*vmax) -ax2t.set_yticks([]) - - -### compute the MACD indicator -fillcolor = 'darkslategrey' -nslow = 26 -nfast = 12 -nema = 9 -emaslow, emafast, macd = moving_average_convergence(prices, nslow=nslow, nfast=nfast) -ema9 = moving_average(macd, nema, type='exponential') -ax3.plot(r.date, macd, color='black', lw=2) -ax3.plot(r.date, ema9, color='blue', lw=1) -ax3.fill_between(r.date, macd-ema9, 0, alpha=0.5, facecolor=fillcolor, edgecolor=fillcolor) - - -ax3.text(0.025, 0.95, 'MACD (%d, %d, %d)'%(nfast, nslow, nema), va='top', - transform=ax3.transAxes, fontsize=textsize) - -#ax3.set_yticks([]) -# turn off upper axis tick labels, rotate the lower ones, etc -for ax in ax1, ax2, ax2t, ax3: - if ax!=ax3: - for label in ax.get_xticklabels(): - label.set_visible(False) - else: - for label in ax.get_xticklabels(): - label.set_rotation(30) - label.set_horizontalalignment('right') - - ax.fmt_xdata = mdates.DateFormatter('%Y-%m-%d') - - - -class MyLocator(mticker.MaxNLocator): - def __init__(self, *args, **kwargs): - mticker.MaxNLocator.__init__(self, *args, **kwargs) - - def __call__(self, *args, **kwargs): - return mticker.MaxNLocator.__call__(self, *args, **kwargs) - -# at most 5 ticks, pruning the upper and lower so they don't overlap -# with other ticks -#ax2.yaxis.set_major_locator(mticker.MaxNLocator(5, prune='both')) -#ax3.yaxis.set_major_locator(mticker.MaxNLocator(5, prune='both')) - -ax2.yaxis.set_major_locator(MyLocator(5, prune='both')) -ax3.yaxis.set_major_locator(MyLocator(5, prune='both')) - -plt.show() - - diff --git a/dev/mpl_examples/pylab_examples/findobj_demo.hires.png b/dev/mpl_examples/pylab_examples/findobj_demo.hires.png deleted file mode 100644 index 87444817583..00000000000 Binary files a/dev/mpl_examples/pylab_examples/findobj_demo.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/findobj_demo.pdf b/dev/mpl_examples/pylab_examples/findobj_demo.pdf deleted file mode 100644 index a39789f2f8f..00000000000 Binary files a/dev/mpl_examples/pylab_examples/findobj_demo.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/findobj_demo.png b/dev/mpl_examples/pylab_examples/findobj_demo.png deleted file mode 100644 index d51de397375..00000000000 Binary files a/dev/mpl_examples/pylab_examples/findobj_demo.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/findobj_demo.py b/dev/mpl_examples/pylab_examples/findobj_demo.py deleted file mode 100644 index 73e61f783bd..00000000000 --- a/dev/mpl_examples/pylab_examples/findobj_demo.py +++ /dev/null @@ -1,37 +0,0 @@ -""" -Recursively find all objects that match some criteria -""" -import numpy as np -import matplotlib.pyplot as plt -import matplotlib.text as text - -a = np.arange(0,3,.02) -b = np.arange(0,3,.02) -c = np.exp(a) -d = c[::-1] - -fig = plt.figure() -ax = fig.add_subplot(111) -plt.plot(a,c,'k--',a,d,'k:',a,c+d,'k') -plt.legend(('Model length', 'Data length', 'Total message length'), - 'upper center', shadow=True) -plt.ylim([-1,20]) -plt.grid(False) -plt.xlabel('Model complexity --->') -plt.ylabel('Message length --->') -plt.title('Minimum Message Length') - -# match on arbitrary function -def myfunc(x): - return hasattr(x, 'set_color') and not hasattr(x, 'set_facecolor') - -for o in fig.findobj(myfunc): - o.set_color('blue') - -# match on class instances -for o in fig.findobj(text.Text): - o.set_fontstyle('italic') - - - -plt.show() diff --git a/dev/mpl_examples/pylab_examples/fonts_demo.hires.png b/dev/mpl_examples/pylab_examples/fonts_demo.hires.png deleted file mode 100644 index d5dce381520..00000000000 Binary files a/dev/mpl_examples/pylab_examples/fonts_demo.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/fonts_demo.pdf b/dev/mpl_examples/pylab_examples/fonts_demo.pdf deleted file mode 100644 index 72bc53be45a..00000000000 Binary files a/dev/mpl_examples/pylab_examples/fonts_demo.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/fonts_demo.png b/dev/mpl_examples/pylab_examples/fonts_demo.png deleted file mode 100644 index c08bde145c7..00000000000 Binary files a/dev/mpl_examples/pylab_examples/fonts_demo.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/fonts_demo.py b/dev/mpl_examples/pylab_examples/fonts_demo.py deleted file mode 100644 index 562fb7f171e..00000000000 --- a/dev/mpl_examples/pylab_examples/fonts_demo.py +++ /dev/null @@ -1,115 +0,0 @@ -#!/usr/bin/env python -""" -Show how to set custom font properties. - -For interactive users, you can also use kwargs to the text command, -which requires less typing. See examples/fonts_demo_kw.py -""" -from matplotlib.font_manager import FontProperties -from pylab import * - -subplot(111, axisbg='w') - -font0 = FontProperties() -alignment = {'horizontalalignment':'center', 'verticalalignment':'baseline'} -### Show family options - -family = ['serif', 'sans-serif', 'cursive', 'fantasy', 'monospace'] - -font1 = font0.copy() -font1.set_size('large') - -t = text(-0.8, 0.9, 'family', fontproperties=font1, - **alignment) - -yp = [0.7, 0.5, 0.3, 0.1, -0.1, -0.3, -0.5] - -for k in range(5): - font = font0.copy() - font.set_family(family[k]) - if k == 2: - font.set_name('Script MT') - t = text(-0.8, yp[k], family[k], fontproperties=font, - **alignment) - -### Show style options - -style = ['normal', 'italic', 'oblique'] - -t = text(-0.4, 0.9, 'style', fontproperties=font1, - **alignment) - -for k in range(3): - font = font0.copy() - font.set_family('sans-serif') - font.set_style(style[k]) - t = text(-0.4, yp[k], style[k], fontproperties=font, - **alignment) - -### Show variant options - -variant= ['normal', 'small-caps'] - -t = text(0.0, 0.9, 'variant', fontproperties=font1, - **alignment) - -for k in range(2): - font = font0.copy() - font.set_family('serif') - font.set_variant(variant[k]) - t = text( 0.0, yp[k], variant[k], fontproperties=font, - **alignment) - -### Show weight options - -weight = ['light', 'normal', 'medium', 'semibold', 'bold', 'heavy', 'black'] - -t = text( 0.4, 0.9, 'weight', fontproperties=font1, - **alignment) - -for k in range(7): - font = font0.copy() - font.set_weight(weight[k]) - t = text( 0.4, yp[k], weight[k], fontproperties=font, - **alignment) - -### Show size options - -size = ['xx-small', 'x-small', 'small', 'medium', 'large', - 'x-large', 'xx-large'] - -t = text( 0.8, 0.9, 'size', fontproperties=font1, - **alignment) - -for k in range(7): - font = font0.copy() - font.set_size(size[k]) - t = text( 0.8, yp[k], size[k], fontproperties=font, - **alignment) - -### Show bold italic - -font = font0.copy() -font.set_style('italic') -font.set_weight('bold') -font.set_size('x-small') -t = text(0, 0.1, 'bold italic', fontproperties=font, - **alignment) - -font = font0.copy() -font.set_style('italic') -font.set_weight('bold') -font.set_size('medium') -t = text(0, 0.2, 'bold italic', fontproperties=font, - **alignment) - -font = font0.copy() -font.set_style('italic') -font.set_weight('bold') -font.set_size('x-large') -t = text(0, 0.3, 'bold italic', fontproperties=font, - **alignment) - -axis([-1,1,0,1]) - -show() diff --git a/dev/mpl_examples/pylab_examples/fonts_demo_kw.hires.png b/dev/mpl_examples/pylab_examples/fonts_demo_kw.hires.png deleted file mode 100644 index bf6fa47c9a2..00000000000 Binary files a/dev/mpl_examples/pylab_examples/fonts_demo_kw.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/fonts_demo_kw.pdf b/dev/mpl_examples/pylab_examples/fonts_demo_kw.pdf deleted file mode 100644 index ab7e74df571..00000000000 Binary files a/dev/mpl_examples/pylab_examples/fonts_demo_kw.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/fonts_demo_kw.png b/dev/mpl_examples/pylab_examples/fonts_demo_kw.png deleted file mode 100644 index fc8f0238afc..00000000000 Binary files a/dev/mpl_examples/pylab_examples/fonts_demo_kw.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/fonts_demo_kw.py b/dev/mpl_examples/pylab_examples/fonts_demo_kw.py deleted file mode 100644 index 1ff331ff476..00000000000 --- a/dev/mpl_examples/pylab_examples/fonts_demo_kw.py +++ /dev/null @@ -1,84 +0,0 @@ -#!/usr/bin/env python -""" -Same as fonts_demo using kwargs. If you prefer a more pythonic, OO -style of coding, see examples/fonts_demo.py. - -""" -from matplotlib.font_manager import FontProperties -from pylab import * - -subplot(111, axisbg='w') -alignment = {'horizontalalignment':'center', 'verticalalignment':'baseline'} -### Show family options - -family = ['serif', 'sans-serif', 'cursive', 'fantasy', 'monospace'] - -t = text(-0.8, 0.9, 'family', size='large', **alignment) - -yp = [0.7, 0.5, 0.3, 0.1, -0.1, -0.3, -0.5] - -for k in range(5): - if k == 2: - t = text(-0.8, yp[k], family[k], family=family[k], - name='Script MT', **alignment) - else: - t = text(-0.8, yp[k], family[k], family=family[k], **alignment) - -### Show style options - -style = ['normal', 'italic', 'oblique'] - -t = text(-0.4, 0.9, 'style', **alignment) - -for k in range(3): - t = text(-0.4, yp[k], style[k], family='sans-serif', style=style[k], - **alignment) - -### Show variant options - -variant= ['normal', 'small-caps'] - -t = text(0.0, 0.9, 'variant', **alignment) - -for k in range(2): - t = text( 0.0, yp[k], variant[k], family='serif', variant=variant[k], - **alignment) - -### Show weight options - -weight = ['light', 'normal', 'medium', 'semibold', 'bold', 'heavy', 'black'] - -t = text( 0.4, 0.9, 'weight', **alignment) - -for k in range(7): - t = text( 0.4, yp[k], weight[k], weight=weight[k], - **alignment) - -### Show size options - -size = ['xx-small', 'x-small', 'small', 'medium', 'large', - 'x-large', 'xx-large'] - -t = text( 0.8, 0.9, 'size', **alignment) - -for k in range(7): - t = text( 0.8, yp[k], size[k], size=size[k], - **alignment) - -x = 0 -### Show bold italic -t = text(x, 0.1, 'bold italic', style='italic', - weight='bold', size='x-small', - **alignment) - -t = text(x, 0.2, 'bold italic', - style = 'italic', weight='bold', size='medium', - **alignment) - -t = text(x, 0.3, 'bold italic', - style='italic', weight='bold', size='x-large', - **alignment) - -axis([-1, 1, 0, 1]) - -show() diff --git a/dev/mpl_examples/pylab_examples/ganged_plots.hires.png b/dev/mpl_examples/pylab_examples/ganged_plots.hires.png deleted file mode 100644 index 09351917723..00000000000 Binary files a/dev/mpl_examples/pylab_examples/ganged_plots.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/ganged_plots.pdf b/dev/mpl_examples/pylab_examples/ganged_plots.pdf deleted file mode 100644 index 57ad1d206e5..00000000000 Binary files a/dev/mpl_examples/pylab_examples/ganged_plots.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/ganged_plots.png b/dev/mpl_examples/pylab_examples/ganged_plots.png deleted file mode 100644 index 43f61840e7b..00000000000 Binary files a/dev/mpl_examples/pylab_examples/ganged_plots.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/ganged_plots.py b/dev/mpl_examples/pylab_examples/ganged_plots.py deleted file mode 100644 index 6e65010b7ae..00000000000 --- a/dev/mpl_examples/pylab_examples/ganged_plots.py +++ /dev/null @@ -1,45 +0,0 @@ -#!/usr/bin/env python -""" -To create plots that share a common axes (visually) you can set the -hspace between the subplots close to zero (do not use zero itself). -Normally you'll want to turn off the tick labels on all but one of the -axes. - -In this example the plots share a common xaxis but you can follow the -same logic to supply a common y axis. -""" -from pylab import * - -t = arange(0.0, 2.0, 0.01) - -s1 = sin(2*pi*t) -s2 = exp(-t) -s3 = s1*s2 - -# axes rect in relative 0,1 coords left, bottom, width, height. Turn -# off xtick labels on all but the lower plot - - -f = figure() -subplots_adjust(hspace=0.001) - - -ax1 = subplot(311) -ax1.plot(t,s1) -yticks(arange(-0.9, 1.0, 0.4)) -ylim(-1,1) - -ax2 = subplot(312, sharex=ax1) -ax2.plot(t,s2) -yticks(arange(0.1, 1.0, 0.2)) -ylim(0,1) - -ax3 = subplot(313, sharex=ax1) -ax3.plot(t,s3) -yticks(arange(-0.9, 1.0, 0.4)) -ylim(-1,1) - -xticklabels = ax1.get_xticklabels()+ax2.get_xticklabels() -setp(xticklabels, visible=False) - -show() diff --git a/dev/mpl_examples/pylab_examples/geo_demo.hires.png b/dev/mpl_examples/pylab_examples/geo_demo.hires.png deleted file mode 100644 index d783010154f..00000000000 Binary files a/dev/mpl_examples/pylab_examples/geo_demo.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/geo_demo.pdf b/dev/mpl_examples/pylab_examples/geo_demo.pdf deleted file mode 100644 index 9248d15dfc2..00000000000 Binary files a/dev/mpl_examples/pylab_examples/geo_demo.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/geo_demo.png b/dev/mpl_examples/pylab_examples/geo_demo.png deleted file mode 100644 index 91918381500..00000000000 Binary files a/dev/mpl_examples/pylab_examples/geo_demo.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/geo_demo.py b/dev/mpl_examples/pylab_examples/geo_demo.py deleted file mode 100644 index d38b0e9cbff..00000000000 --- a/dev/mpl_examples/pylab_examples/geo_demo.py +++ /dev/null @@ -1,22 +0,0 @@ -import numpy as np -#np.seterr("raise") - -from pylab import * - -subplot(221, projection="aitoff") -title("Aitoff") -grid(True) - -subplot(222, projection="hammer") -title("Hammer") -grid(True) - -subplot(223, projection="lambert") -title("Lambert") -grid(True) - -subplot(224, projection="mollweide") -title("Mollweide") -grid(True) - -show() diff --git a/dev/mpl_examples/pylab_examples/gradient_bar.hires.png b/dev/mpl_examples/pylab_examples/gradient_bar.hires.png deleted file mode 100644 index 188957e2648..00000000000 Binary files a/dev/mpl_examples/pylab_examples/gradient_bar.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/gradient_bar.pdf b/dev/mpl_examples/pylab_examples/gradient_bar.pdf deleted file mode 100644 index b7ec7e28e71..00000000000 Binary files a/dev/mpl_examples/pylab_examples/gradient_bar.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/gradient_bar.png b/dev/mpl_examples/pylab_examples/gradient_bar.png deleted file mode 100644 index f2a119b9607..00000000000 Binary files a/dev/mpl_examples/pylab_examples/gradient_bar.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/gradient_bar.py b/dev/mpl_examples/pylab_examples/gradient_bar.py deleted file mode 100644 index 9133a89c59b..00000000000 --- a/dev/mpl_examples/pylab_examples/gradient_bar.py +++ /dev/null @@ -1,28 +0,0 @@ -from matplotlib.pyplot import figure, show, cm -from numpy import arange -from numpy.random import rand - -def gbar(ax, x, y, width=0.5, bottom=0): - X = [[.6, .6],[.7,.7]] - for left,top in zip(x, y): - right = left+width - ax.imshow(X, interpolation='bicubic', cmap=cm.Blues, - extent=(left, right, bottom, top), alpha=1) - -fig = figure() - -xmin, xmax = xlim = 0,10 -ymin, ymax = ylim = 0,1 -ax = fig.add_subplot(111, xlim=xlim, ylim=ylim, - autoscale_on=False) -X = [[.6, .6],[.7,.7]] - -ax.imshow(X, interpolation='bicubic', cmap=cm.copper, - extent=(xmin, xmax, ymin, ymax), alpha=1) - -N = 10 -x = arange(N)+0.25 -y = rand(N) -gbar(ax, x, y, width=0.7) -ax.set_aspect('auto') -show() diff --git a/dev/mpl_examples/pylab_examples/griddata_demo.py b/dev/mpl_examples/pylab_examples/griddata_demo.py deleted file mode 100644 index 5c11be137d8..00000000000 --- a/dev/mpl_examples/pylab_examples/griddata_demo.py +++ /dev/null @@ -1,41 +0,0 @@ -from numpy.random import uniform, seed -from matplotlib.mlab import griddata -import matplotlib.pyplot as plt -import numpy as np -# make up data. -#npts = int(raw_input('enter # of random points to plot:')) -seed(0) -npts = 200 -x = uniform(-2,2,npts) -y = uniform(-2,2,npts) -z = x*np.exp(-x**2-y**2) -# define grid. -xi = np.linspace(-2.1,2.1,100) -yi = np.linspace(-2.1,2.1,200) -# grid the data. -zi = griddata(x,y,z,xi,yi,interp='linear') -# contour the gridded data, plotting dots at the nonuniform data points. -CS = plt.contour(xi,yi,zi,15,linewidths=0.5,colors='k') -CS = plt.contourf(xi,yi,zi,15,cmap=plt.cm.rainbow, - vmax=abs(zi).max(), vmin=-abs(zi).max()) -plt.colorbar() # draw colorbar -# plot data points. -plt.scatter(x,y,marker='o',c='b',s=5,zorder=10) -plt.xlim(-2,2) -plt.ylim(-2,2) -plt.title('griddata test (%d points)' % npts) -plt.show() - -# test case that scikits.delaunay fails on, but natgrid passes.. -#data = np.array([[-1, -1], [-1, 0], [-1, 1], -# [ 0, -1], [ 0, 0], [ 0, 1], -# [ 1, -1 - np.finfo(np.float_).eps], [ 1, 0], [ 1, 1], -# ]) -#x = data[:,0] -#y = data[:,1] -#z = x*np.exp(-x**2-y**2) -## define grid. -#xi = np.linspace(-1.1,1.1,100) -#yi = np.linspace(-1.1,1.1,100) -## grid the data. -#zi = griddata(x,y,z,xi,yi) diff --git a/dev/mpl_examples/pylab_examples/griddata_demo_00_00.hires.png b/dev/mpl_examples/pylab_examples/griddata_demo_00_00.hires.png deleted file mode 100644 index 30b47580666..00000000000 Binary files a/dev/mpl_examples/pylab_examples/griddata_demo_00_00.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/griddata_demo_00_00.pdf b/dev/mpl_examples/pylab_examples/griddata_demo_00_00.pdf deleted file mode 100644 index 535502fe0bd..00000000000 Binary files a/dev/mpl_examples/pylab_examples/griddata_demo_00_00.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/griddata_demo_00_00.png b/dev/mpl_examples/pylab_examples/griddata_demo_00_00.png deleted file mode 100644 index 093eb94091c..00000000000 Binary files a/dev/mpl_examples/pylab_examples/griddata_demo_00_00.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/hatch_demo.hires.png b/dev/mpl_examples/pylab_examples/hatch_demo.hires.png deleted file mode 100644 index fecb41c1a5b..00000000000 Binary files a/dev/mpl_examples/pylab_examples/hatch_demo.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/hatch_demo.pdf b/dev/mpl_examples/pylab_examples/hatch_demo.pdf deleted file mode 100644 index 25a40c75e49..00000000000 Binary files a/dev/mpl_examples/pylab_examples/hatch_demo.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/hatch_demo.png b/dev/mpl_examples/pylab_examples/hatch_demo.png deleted file mode 100644 index 83c9bb3d38d..00000000000 Binary files a/dev/mpl_examples/pylab_examples/hatch_demo.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/hatch_demo.py b/dev/mpl_examples/pylab_examples/hatch_demo.py deleted file mode 100644 index 05a72975f47..00000000000 --- a/dev/mpl_examples/pylab_examples/hatch_demo.py +++ /dev/null @@ -1,31 +0,0 @@ -""" -Hatching (pattern filled polygons) is supported currently in the PS, -PDF, SVG and Agg backends only. -""" -import matplotlib.pyplot as plt -from matplotlib.patches import Ellipse, Polygon - -fig = plt.figure() -ax1 = fig.add_subplot(131) -ax1.bar(range(1,5), range(1,5), color='red', edgecolor='black', hatch="/") -ax1.bar(range(1,5), [6] * 4, bottom=range(1,5), color='blue', edgecolor='black', hatch='//') -ax1.set_xticks([1.5,2.5,3.5,4.5]) - -ax2 = fig.add_subplot(132) -bars = ax2.bar(range(1,5), range(1,5), color='yellow', ecolor='black') + \ - ax2.bar(range(1, 5), [6] * 4, bottom=range(1,5), color='green', ecolor='black') -ax2.set_xticks([1.5,2.5,3.5,4.5]) - -patterns = ('-', '+', 'x', '\\', '*', 'o', 'O', '.') -for bar, pattern in zip(bars, patterns): - bar.set_hatch(pattern) - -ax3 = fig.add_subplot(133) -ax3.fill([1,3,3,1],[1,1,2,2], fill=False, hatch='\\') -ax3.add_patch(Ellipse((4,1.5), 4, 0.5, fill=False, hatch='*')) -ax3.add_patch(Polygon([[0,0],[4,1.1],[6,2.5],[2,1.4]], closed=True, - fill=False, hatch='/')) -ax3.set_xlim((0,6)) -ax3.set_ylim((0,2.5)) - -plt.show() diff --git a/dev/mpl_examples/pylab_examples/hexbin_demo.hires.png b/dev/mpl_examples/pylab_examples/hexbin_demo.hires.png deleted file mode 100644 index 688e2675a4b..00000000000 Binary files a/dev/mpl_examples/pylab_examples/hexbin_demo.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/hexbin_demo.pdf b/dev/mpl_examples/pylab_examples/hexbin_demo.pdf deleted file mode 100644 index 4ddd742bcd8..00000000000 Binary files a/dev/mpl_examples/pylab_examples/hexbin_demo.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/hexbin_demo.png b/dev/mpl_examples/pylab_examples/hexbin_demo.png deleted file mode 100644 index 4c8fedac21a..00000000000 Binary files a/dev/mpl_examples/pylab_examples/hexbin_demo.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/hexbin_demo.py b/dev/mpl_examples/pylab_examples/hexbin_demo.py deleted file mode 100644 index 04f0e073bb0..00000000000 --- a/dev/mpl_examples/pylab_examples/hexbin_demo.py +++ /dev/null @@ -1,35 +0,0 @@ -""" -hexbin is an axes method or pyplot function that is essentially -a pcolor of a 2-D histogram with hexagonal cells. It can be -much more informative than a scatter plot; in the first subplot -below, try substituting 'scatter' for 'hexbin'. -""" - -import numpy as np -import matplotlib.pyplot as plt - -np.random.seed(0) -n = 100000 -x = np.random.standard_normal(n) -y = 2.0 + 3.0 * x + 4.0 * np.random.standard_normal(n) -xmin = x.min() -xmax = x.max() -ymin = y.min() -ymax = y.max() - -plt.subplots_adjust(hspace=0.5) -plt.subplot(121) -plt.hexbin(x,y, cmap=plt.cm.YlOrRd_r) -plt.axis([xmin, xmax, ymin, ymax]) -plt.title("Hexagon binning") -cb = plt.colorbar() -cb.set_label('counts') - -plt.subplot(122) -plt.hexbin(x,y,bins='log', cmap=plt.cm.YlOrRd_r) -plt.axis([xmin, xmax, ymin, ymax]) -plt.title("With a log color scale") -cb = plt.colorbar() -cb.set_label('log10(N)') - -plt.show() diff --git a/dev/mpl_examples/pylab_examples/hexbin_demo2.hires.png b/dev/mpl_examples/pylab_examples/hexbin_demo2.hires.png deleted file mode 100644 index 3573048a7e7..00000000000 Binary files a/dev/mpl_examples/pylab_examples/hexbin_demo2.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/hexbin_demo2.pdf b/dev/mpl_examples/pylab_examples/hexbin_demo2.pdf deleted file mode 100644 index 222f4eec0b5..00000000000 Binary files a/dev/mpl_examples/pylab_examples/hexbin_demo2.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/hexbin_demo2.png b/dev/mpl_examples/pylab_examples/hexbin_demo2.png deleted file mode 100644 index c272c84c90b..00000000000 Binary files a/dev/mpl_examples/pylab_examples/hexbin_demo2.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/hexbin_demo2.py b/dev/mpl_examples/pylab_examples/hexbin_demo2.py deleted file mode 100644 index 8f6a0c5ac26..00000000000 --- a/dev/mpl_examples/pylab_examples/hexbin_demo2.py +++ /dev/null @@ -1,56 +0,0 @@ -""" -hexbin is an axes method or pyplot function that is essentially a -pcolor of a 2-D histogram with hexagonal cells. -""" - -import numpy as np -import matplotlib.pyplot as plt -import matplotlib.mlab as mlab - -delta = 0.025 -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 - -x = X.ravel() -y = Y.ravel() -z = Z.ravel() - -if 1: - # make some points 20 times more common than others, but same mean - xcond = (-1 < x) & (x < 1) - ycond = (-2 < y) & (y < 0) - cond = xcond & ycond - xnew = x[cond] - ynew = y[cond] - znew = z[cond] - for i in range(20): - x = np.hstack((x,xnew)) - y = np.hstack((y,ynew)) - z = np.hstack((z,znew)) - -xmin = x.min() -xmax = x.max() -ymin = y.min() -ymax = y.max() - -gridsize=30 - -plt.subplot(211) -plt.hexbin(x,y, C=z, gridsize=gridsize, marginals=True, cmap=plt.cm.RdBu, - vmax=abs(z).max(), vmin=-abs(z).max()) -plt.axis([xmin, xmax, ymin, ymax]) -cb = plt.colorbar() -cb.set_label('mean value') - - -plt.subplot(212) -plt.hexbin(x,y, gridsize=gridsize, cmap=plt.cm.Blues_r) -plt.axis([xmin, xmax, ymin, ymax]) -cb = plt.colorbar() -cb.set_label('N observations') - -plt.show() - diff --git a/dev/mpl_examples/pylab_examples/hist2d_demo.hires.png b/dev/mpl_examples/pylab_examples/hist2d_demo.hires.png deleted file mode 100644 index 59ae5cdbec4..00000000000 Binary files a/dev/mpl_examples/pylab_examples/hist2d_demo.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/hist2d_demo.pdf b/dev/mpl_examples/pylab_examples/hist2d_demo.pdf deleted file mode 100644 index d70c9967a75..00000000000 Binary files a/dev/mpl_examples/pylab_examples/hist2d_demo.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/hist2d_demo.png b/dev/mpl_examples/pylab_examples/hist2d_demo.png deleted file mode 100644 index 7a3a772462b..00000000000 Binary files a/dev/mpl_examples/pylab_examples/hist2d_demo.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/hist2d_demo.py b/dev/mpl_examples/pylab_examples/hist2d_demo.py deleted file mode 100644 index cc7661df0ed..00000000000 --- a/dev/mpl_examples/pylab_examples/hist2d_demo.py +++ /dev/null @@ -1,7 +0,0 @@ -from pylab import * -x = randn(1000) -y = randn(1000)+5 - -#normal distribution center at x=0 and y=5 -hist2d(x,y,bins=40) -show() diff --git a/dev/mpl_examples/pylab_examples/hist2d_log_demo.hires.png b/dev/mpl_examples/pylab_examples/hist2d_log_demo.hires.png deleted file mode 100644 index 95b867586d0..00000000000 Binary files a/dev/mpl_examples/pylab_examples/hist2d_log_demo.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/hist2d_log_demo.pdf b/dev/mpl_examples/pylab_examples/hist2d_log_demo.pdf deleted file mode 100644 index a5ef48bfdc8..00000000000 Binary files a/dev/mpl_examples/pylab_examples/hist2d_log_demo.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/hist2d_log_demo.png b/dev/mpl_examples/pylab_examples/hist2d_log_demo.png deleted file mode 100644 index 8f1835adc92..00000000000 Binary files a/dev/mpl_examples/pylab_examples/hist2d_log_demo.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/hist2d_log_demo.py b/dev/mpl_examples/pylab_examples/hist2d_log_demo.py deleted file mode 100644 index b1cd09de055..00000000000 --- a/dev/mpl_examples/pylab_examples/hist2d_log_demo.py +++ /dev/null @@ -1,10 +0,0 @@ -from matplotlib.colors import LogNorm -from pylab import * - -#normal distribution center at x=0 and y=5 -x = randn(100000) -y = randn(100000)+5 - -hist2d(x, y, bins=40, norm=LogNorm()) -colorbar() -show() diff --git a/dev/mpl_examples/pylab_examples/hist_colormapped.hires.png b/dev/mpl_examples/pylab_examples/hist_colormapped.hires.png deleted file mode 100644 index c7e38321660..00000000000 Binary files a/dev/mpl_examples/pylab_examples/hist_colormapped.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/hist_colormapped.pdf b/dev/mpl_examples/pylab_examples/hist_colormapped.pdf deleted file mode 100644 index 630b915cba9..00000000000 Binary files a/dev/mpl_examples/pylab_examples/hist_colormapped.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/hist_colormapped.png b/dev/mpl_examples/pylab_examples/hist_colormapped.png deleted file mode 100644 index 641bf302e5a..00000000000 Binary files a/dev/mpl_examples/pylab_examples/hist_colormapped.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/hist_colormapped.py b/dev/mpl_examples/pylab_examples/hist_colormapped.py deleted file mode 100644 index cce35e889fd..00000000000 --- a/dev/mpl_examples/pylab_examples/hist_colormapped.py +++ /dev/null @@ -1,24 +0,0 @@ -import numpy as n -from pylab import figure, show -import matplotlib.cm as cm -import matplotlib.colors as colors - -fig = figure() -ax = fig.add_subplot(111) -Ntotal = 1000 -N, bins, patches = ax.hist(n.random.rand(Ntotal), 20) - -#I'll color code by height, but you could use any scalar - - -# we need to normalize the data to 0..1 for the full -# range of the colormap -fracs = N.astype(float)/N.max() -norm = colors.normalize(fracs.min(), fracs.max()) - -for thisfrac, thispatch in zip(fracs, patches): - color = cm.jet(norm(thisfrac)) - thispatch.set_facecolor(color) - - -show() diff --git a/dev/mpl_examples/pylab_examples/histogram_demo.hires.png b/dev/mpl_examples/pylab_examples/histogram_demo.hires.png deleted file mode 100644 index 0cc74478234..00000000000 Binary files a/dev/mpl_examples/pylab_examples/histogram_demo.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/histogram_demo.pdf b/dev/mpl_examples/pylab_examples/histogram_demo.pdf deleted file mode 100644 index 8892209531e..00000000000 Binary files a/dev/mpl_examples/pylab_examples/histogram_demo.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/histogram_demo.png b/dev/mpl_examples/pylab_examples/histogram_demo.png deleted file mode 100644 index 2037cd58bac..00000000000 Binary files a/dev/mpl_examples/pylab_examples/histogram_demo.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/histogram_demo.py b/dev/mpl_examples/pylab_examples/histogram_demo.py deleted file mode 100644 index 00919f78ea6..00000000000 --- a/dev/mpl_examples/pylab_examples/histogram_demo.py +++ /dev/null @@ -1,22 +0,0 @@ -#!/usr/bin/env python -import numpy as np -import matplotlib.mlab as mlab -import matplotlib.pyplot as plt - -mu, sigma = 100, 15 -x = mu + sigma*np.random.randn(10000) - -# the histogram of the data -n, bins, patches = plt.hist(x, 50, normed=1, facecolor='green', alpha=0.75) - -# add a 'best fit' line -y = mlab.normpdf( bins, mu, sigma) -l = plt.plot(bins, y, 'r--', linewidth=1) - -plt.xlabel('Smarts') -plt.ylabel('Probability') -plt.title(r'$\mathrm{Histogram\ of\ IQ:}\ \mu=100,\ \sigma=15$') -plt.axis([40, 160, 0, 0.03]) -plt.grid(True) - -plt.show() diff --git a/dev/mpl_examples/pylab_examples/histogram_demo_extended.py b/dev/mpl_examples/pylab_examples/histogram_demo_extended.py deleted file mode 100644 index bd262007edd..00000000000 --- a/dev/mpl_examples/pylab_examples/histogram_demo_extended.py +++ /dev/null @@ -1,122 +0,0 @@ -#!/usr/bin/env python -import numpy as np -import pylab as P - -# -# The hist() function now has a lot more options -# - -# -# first create a single histogram -# -mu, sigma = 200, 25 -x = mu + sigma*P.randn(10000) - -# the histogram of the data with histtype='step' -n, bins, patches = P.hist(x, 50, normed=1, histtype='stepfilled') -P.setp(patches, 'facecolor', 'g', 'alpha', 0.75) - -# add a line showing the expected distribution -y = P.normpdf( bins, mu, sigma) -l = P.plot(bins, y, 'k--', linewidth=1.5) - - -# -# create a histogram by providing the bin edges (unequally spaced) -# -P.figure() - -bins = [100,125,150,160,170,180,190,200,210,220,230,240,250,275,300] -# the histogram of the data with histtype='step' -n, bins, patches = P.hist(x, bins, normed=1, histtype='bar', rwidth=0.8) - -# -# now we create a cumulative histogram of the data -# -P.figure() - -n, bins, patches = P.hist(x, 50, normed=1, histtype='step', cumulative=True) - -# add a line showing the expected distribution -y = P.normpdf( bins, mu, sigma).cumsum() -y /= y[-1] -l = P.plot(bins, y, 'k--', linewidth=1.5) - -# create a second data-set with a smaller standard deviation -sigma2 = 15. -x = mu + sigma2*P.randn(10000) - -n, bins, patches = P.hist(x, bins=bins, normed=1, histtype='step', cumulative=True) - -# add a line showing the expected distribution -y = P.normpdf( bins, mu, sigma2).cumsum() -y /= y[-1] -l = P.plot(bins, y, 'r--', linewidth=1.5) - -# finally overplot a reverted cumulative histogram -n, bins, patches = P.hist(x, bins=bins, normed=1, - histtype='step', cumulative=-1) - - -P.grid(True) -P.ylim(0, 1.05) - - -# -# histogram has the ability to plot multiple data in parallel ... -# Note the new color kwarg, used to override the default, which -# uses the line color cycle. -# -P.figure() - -# create a new data-set -x = mu + sigma*P.randn(1000,3) - -n, bins, patches = P.hist(x, 10, normed=1, histtype='bar', - color=['crimson', 'burlywood', 'chartreuse'], - label=['Crimson', 'Burlywood', 'Chartreuse']) -P.legend() - -# -# ... or we can stack the data -# -P.figure() - -n, bins, patches = P.hist(x, 10, normed=1, histtype='bar', stacked=True) - -P.show() - -# -# we can also stack using the step histtype -# - -P.figure() - -n, bins, patches = P.hist(x, 10, histtype='step', stacked=True, fill=True) - -P.show() - -# -# finally: make a multiple-histogram of data-sets with different length -# -x0 = mu + sigma*P.randn(10000) -x1 = mu + sigma*P.randn(7000) -x2 = mu + sigma*P.randn(3000) - -# and exercise the weights option by arbitrarily giving the first half -# of each series only half the weight of the others: - -w0 = np.ones_like(x0) -w0[:len(x0)/2] = 0.5 -w1 = np.ones_like(x1) -w1[:len(x1)/2] = 0.5 -w2 = np.ones_like(x2) -w2[:len(x2)/2] = 0.5 - - - -P.figure() - -n, bins, patches = P.hist( [x0,x1,x2], 10, weights=[w0, w1, w2], histtype='bar') - -P.show() diff --git a/dev/mpl_examples/pylab_examples/histogram_demo_extended_00.hires.png b/dev/mpl_examples/pylab_examples/histogram_demo_extended_00.hires.png deleted file mode 100644 index b8960ec2754..00000000000 Binary files a/dev/mpl_examples/pylab_examples/histogram_demo_extended_00.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/histogram_demo_extended_00.pdf b/dev/mpl_examples/pylab_examples/histogram_demo_extended_00.pdf deleted file mode 100644 index 82a0bbb83af..00000000000 Binary files a/dev/mpl_examples/pylab_examples/histogram_demo_extended_00.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/histogram_demo_extended_00.png b/dev/mpl_examples/pylab_examples/histogram_demo_extended_00.png deleted file mode 100644 index aa8fa51d1c6..00000000000 Binary files a/dev/mpl_examples/pylab_examples/histogram_demo_extended_00.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/histogram_demo_extended_01.hires.png b/dev/mpl_examples/pylab_examples/histogram_demo_extended_01.hires.png deleted file mode 100644 index 0be6e2ea3d6..00000000000 Binary files a/dev/mpl_examples/pylab_examples/histogram_demo_extended_01.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/histogram_demo_extended_01.pdf b/dev/mpl_examples/pylab_examples/histogram_demo_extended_01.pdf deleted file mode 100644 index 9877406034b..00000000000 Binary files a/dev/mpl_examples/pylab_examples/histogram_demo_extended_01.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/histogram_demo_extended_01.png b/dev/mpl_examples/pylab_examples/histogram_demo_extended_01.png deleted file mode 100644 index 49a1c2a475f..00000000000 Binary files a/dev/mpl_examples/pylab_examples/histogram_demo_extended_01.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/histogram_demo_extended_02.hires.png b/dev/mpl_examples/pylab_examples/histogram_demo_extended_02.hires.png deleted file mode 100644 index 0dda7475baf..00000000000 Binary files a/dev/mpl_examples/pylab_examples/histogram_demo_extended_02.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/histogram_demo_extended_02.pdf b/dev/mpl_examples/pylab_examples/histogram_demo_extended_02.pdf deleted file mode 100644 index 6a2375ff72f..00000000000 Binary files a/dev/mpl_examples/pylab_examples/histogram_demo_extended_02.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/histogram_demo_extended_02.png b/dev/mpl_examples/pylab_examples/histogram_demo_extended_02.png deleted file mode 100644 index e486b1c56c0..00000000000 Binary files a/dev/mpl_examples/pylab_examples/histogram_demo_extended_02.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/histogram_demo_extended_03.hires.png b/dev/mpl_examples/pylab_examples/histogram_demo_extended_03.hires.png deleted file mode 100644 index 51c0de3fe26..00000000000 Binary files a/dev/mpl_examples/pylab_examples/histogram_demo_extended_03.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/histogram_demo_extended_03.pdf b/dev/mpl_examples/pylab_examples/histogram_demo_extended_03.pdf deleted file mode 100644 index 8d976d26e41..00000000000 Binary files a/dev/mpl_examples/pylab_examples/histogram_demo_extended_03.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/histogram_demo_extended_03.png b/dev/mpl_examples/pylab_examples/histogram_demo_extended_03.png deleted file mode 100644 index 5a432ea88c2..00000000000 Binary files a/dev/mpl_examples/pylab_examples/histogram_demo_extended_03.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/histogram_demo_extended_04.hires.png b/dev/mpl_examples/pylab_examples/histogram_demo_extended_04.hires.png deleted file mode 100644 index 539143ee79e..00000000000 Binary files a/dev/mpl_examples/pylab_examples/histogram_demo_extended_04.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/histogram_demo_extended_04.pdf b/dev/mpl_examples/pylab_examples/histogram_demo_extended_04.pdf deleted file mode 100644 index a64afec35fc..00000000000 Binary files a/dev/mpl_examples/pylab_examples/histogram_demo_extended_04.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/histogram_demo_extended_04.png b/dev/mpl_examples/pylab_examples/histogram_demo_extended_04.png deleted file mode 100644 index 8a1657493aa..00000000000 Binary files a/dev/mpl_examples/pylab_examples/histogram_demo_extended_04.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/histogram_demo_extended_05.hires.png b/dev/mpl_examples/pylab_examples/histogram_demo_extended_05.hires.png deleted file mode 100644 index a9dc5a27dcb..00000000000 Binary files a/dev/mpl_examples/pylab_examples/histogram_demo_extended_05.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/histogram_demo_extended_05.pdf b/dev/mpl_examples/pylab_examples/histogram_demo_extended_05.pdf deleted file mode 100644 index 006699a45b4..00000000000 Binary files a/dev/mpl_examples/pylab_examples/histogram_demo_extended_05.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/histogram_demo_extended_05.png b/dev/mpl_examples/pylab_examples/histogram_demo_extended_05.png deleted file mode 100644 index 04dd094ac5a..00000000000 Binary files a/dev/mpl_examples/pylab_examples/histogram_demo_extended_05.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/histogram_demo_extended_06.hires.png b/dev/mpl_examples/pylab_examples/histogram_demo_extended_06.hires.png deleted file mode 100644 index 6c577287de9..00000000000 Binary files a/dev/mpl_examples/pylab_examples/histogram_demo_extended_06.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/histogram_demo_extended_06.pdf b/dev/mpl_examples/pylab_examples/histogram_demo_extended_06.pdf deleted file mode 100644 index 1ac41a3723e..00000000000 Binary files a/dev/mpl_examples/pylab_examples/histogram_demo_extended_06.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/histogram_demo_extended_06.png b/dev/mpl_examples/pylab_examples/histogram_demo_extended_06.png deleted file mode 100644 index fd8e1c94c0d..00000000000 Binary files a/dev/mpl_examples/pylab_examples/histogram_demo_extended_06.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/histogram_percent_demo.hires.png b/dev/mpl_examples/pylab_examples/histogram_percent_demo.hires.png deleted file mode 100644 index 6923ff9e1b7..00000000000 Binary files a/dev/mpl_examples/pylab_examples/histogram_percent_demo.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/histogram_percent_demo.pdf b/dev/mpl_examples/pylab_examples/histogram_percent_demo.pdf deleted file mode 100644 index 35e4e56aca9..00000000000 Binary files a/dev/mpl_examples/pylab_examples/histogram_percent_demo.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/histogram_percent_demo.png b/dev/mpl_examples/pylab_examples/histogram_percent_demo.png deleted file mode 100644 index 9d49bb4c051..00000000000 Binary files a/dev/mpl_examples/pylab_examples/histogram_percent_demo.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/histogram_percent_demo.py b/dev/mpl_examples/pylab_examples/histogram_percent_demo.py deleted file mode 100644 index 46d93f9d1dd..00000000000 --- a/dev/mpl_examples/pylab_examples/histogram_percent_demo.py +++ /dev/null @@ -1,29 +0,0 @@ -import matplotlib -from numpy.random import randn -import matplotlib.pyplot as plt -from matplotlib.ticker import FuncFormatter - -def to_percent(y, position): - # Ignore the passed in position. This has the effect of scaling the default - # tick locations. - s = str(100 * y) - - # The percent symbol needs escaping in latex - if matplotlib.rcParams['text.usetex'] == True: - return s + r'$\%$' - else: - return s + '%' - -x = randn(5000) - -# Make a normed histogram. It'll be multiplied by 100 later. -plt.hist(x, bins=50, normed=True) - -# Create the formatter using the function to_percent. This multiplies all the -# default labels by 100, making them all percentages -formatter = FuncFormatter(to_percent) - -# Set the formatter -plt.gca().yaxis.set_major_formatter(formatter) - -plt.show() diff --git a/dev/mpl_examples/pylab_examples/hline_demo.hires.png b/dev/mpl_examples/pylab_examples/hline_demo.hires.png deleted file mode 100644 index d9ebf5a5588..00000000000 Binary files a/dev/mpl_examples/pylab_examples/hline_demo.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/hline_demo.pdf b/dev/mpl_examples/pylab_examples/hline_demo.pdf deleted file mode 100644 index 58bcd945303..00000000000 Binary files a/dev/mpl_examples/pylab_examples/hline_demo.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/hline_demo.png b/dev/mpl_examples/pylab_examples/hline_demo.png deleted file mode 100644 index 87856f4485e..00000000000 Binary files a/dev/mpl_examples/pylab_examples/hline_demo.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/hline_demo.py b/dev/mpl_examples/pylab_examples/hline_demo.py deleted file mode 100644 index 8d02cca3e8f..00000000000 --- a/dev/mpl_examples/pylab_examples/hline_demo.py +++ /dev/null @@ -1,23 +0,0 @@ -#!/usr/bin/env python -import numpy as np -import matplotlib.pyplot as plt - -def f(t): - s1 = np.sin(2*np.pi*t) - e1 = np.exp(-t) - return np.absolute((s1*e1))+.05 - - -t = np.arange(0.0, 5.0, 0.1) -s = f(t) -nse = np.random.normal(0.0, 0.3, t.shape) * s - - -plt.plot(s+nse, t, 'b^') -plt.hlines(t, [0], s, lw=2) -plt.xlabel('time (s)') -plt.title('Comparison of model with data') - -plt.xlim(xmin=0) -plt.show() - diff --git a/dev/mpl_examples/pylab_examples/image_clip_path.hires.png b/dev/mpl_examples/pylab_examples/image_clip_path.hires.png deleted file mode 100644 index 152f0bce69a..00000000000 Binary files a/dev/mpl_examples/pylab_examples/image_clip_path.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/image_clip_path.pdf b/dev/mpl_examples/pylab_examples/image_clip_path.pdf deleted file mode 100644 index 05bace6b324..00000000000 Binary files a/dev/mpl_examples/pylab_examples/image_clip_path.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/image_clip_path.png b/dev/mpl_examples/pylab_examples/image_clip_path.png deleted file mode 100644 index cd493f488ae..00000000000 Binary files a/dev/mpl_examples/pylab_examples/image_clip_path.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/image_clip_path.py b/dev/mpl_examples/pylab_examples/image_clip_path.py deleted file mode 100644 index 64d4354e7ce..00000000000 --- a/dev/mpl_examples/pylab_examples/image_clip_path.py +++ /dev/null @@ -1,26 +0,0 @@ -#!/usr/bin/env python -import numpy as np -import matplotlib.cm as cm -import matplotlib.mlab as mlab -import matplotlib.pyplot as plt -from matplotlib.path import Path -from matplotlib.patches import PathPatch - -delta = 0.025 -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 - -path = Path([[0, 1], [1, 0], [0, -1], [-1, 0], [0, 1]]) -patch = PathPatch(path, facecolor='none') -plt.gca().add_patch(patch) - -im = plt.imshow(Z, interpolation='bilinear', cmap=cm.gray, - origin='lower', extent=[-3,3,-3,3], - clip_path=patch, clip_on=True) -im.set_clip_path(patch) - -plt.show() - diff --git a/dev/mpl_examples/pylab_examples/image_demo.hires.png b/dev/mpl_examples/pylab_examples/image_demo.hires.png deleted file mode 100644 index 0a92b01033d..00000000000 Binary files a/dev/mpl_examples/pylab_examples/image_demo.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/image_demo.pdf b/dev/mpl_examples/pylab_examples/image_demo.pdf deleted file mode 100644 index 2e5b0cad2ab..00000000000 Binary files a/dev/mpl_examples/pylab_examples/image_demo.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/image_demo.png b/dev/mpl_examples/pylab_examples/image_demo.png deleted file mode 100644 index d0f0dcce77c..00000000000 Binary files a/dev/mpl_examples/pylab_examples/image_demo.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/image_demo.py b/dev/mpl_examples/pylab_examples/image_demo.py deleted file mode 100644 index f931b910457..00000000000 --- a/dev/mpl_examples/pylab_examples/image_demo.py +++ /dev/null @@ -1,19 +0,0 @@ -#!/usr/bin/env python -import numpy as np -import matplotlib.cm as cm -import matplotlib.mlab as mlab -import matplotlib.pyplot as plt - -delta = 0.025 -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 - -im = plt.imshow(Z, interpolation='bilinear', cmap=cm.RdYlGn, - origin='lower', extent=[-3,3,-3,3], - vmax=abs(Z).max(), vmin=-abs(Z).max()) - -plt.show() - diff --git a/dev/mpl_examples/pylab_examples/image_demo2.hires.png b/dev/mpl_examples/pylab_examples/image_demo2.hires.png deleted file mode 100644 index 0632e40cb04..00000000000 Binary files a/dev/mpl_examples/pylab_examples/image_demo2.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/image_demo2.pdf b/dev/mpl_examples/pylab_examples/image_demo2.pdf deleted file mode 100644 index c934b7b07be..00000000000 Binary files a/dev/mpl_examples/pylab_examples/image_demo2.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/image_demo2.png b/dev/mpl_examples/pylab_examples/image_demo2.png deleted file mode 100644 index d52d6bd0186..00000000000 Binary files a/dev/mpl_examples/pylab_examples/image_demo2.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/image_demo2.py b/dev/mpl_examples/pylab_examples/image_demo2.py deleted file mode 100644 index 8f0722ef9ec..00000000000 --- a/dev/mpl_examples/pylab_examples/image_demo2.py +++ /dev/null @@ -1,36 +0,0 @@ -#!/usr/bin/env python - -from __future__ import print_function -from pylab import * -import matplotlib.cbook as cbook - -w, h = 512, 512 - -datafile = cbook.get_sample_data('ct.raw.gz', asfileobj=True) -s = datafile.read() -A = fromstring(s, uint16).astype(float) -A *= 1.0/max(A) -A.shape = w, h - -extent = (0, 25, 0, 25) -im = imshow(A, cmap=cm.hot, origin='upper', extent=extent) - -markers = [(15.9, 14.5), (16.8, 15)] -x,y = zip(*markers) -plot(x, y, 'o') -#axis([0,25,0,25]) - - - -#axis('off') -title('CT density') - -if 0: - x = asum(A,0) - subplot(212) - bar(arange(w), x) - xlim(0,h-1) - ylabel('density') - setp(gca(), 'xticklabels', []) - -show() diff --git a/dev/mpl_examples/pylab_examples/image_demo3.hires.png b/dev/mpl_examples/pylab_examples/image_demo3.hires.png deleted file mode 100644 index 66fbf7ca3d3..00000000000 Binary files a/dev/mpl_examples/pylab_examples/image_demo3.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/image_demo3.pdf b/dev/mpl_examples/pylab_examples/image_demo3.pdf deleted file mode 100644 index 5db6170467b..00000000000 Binary files a/dev/mpl_examples/pylab_examples/image_demo3.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/image_demo3.png b/dev/mpl_examples/pylab_examples/image_demo3.png deleted file mode 100644 index b333140df48..00000000000 Binary files a/dev/mpl_examples/pylab_examples/image_demo3.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/image_demo3.py b/dev/mpl_examples/pylab_examples/image_demo3.py deleted file mode 100644 index a469b48cf79..00000000000 --- a/dev/mpl_examples/pylab_examples/image_demo3.py +++ /dev/null @@ -1,21 +0,0 @@ -#!/usr/bin/env python -from pylab import * -try: - from PIL import Image -except ImportError: - raise SystemExit("PIL must be installed to run this example") - -import matplotlib.cbook as cbook - -datafile = cbook.get_sample_data('lena.jpg') -lena = Image.open(datafile) -dpi = rcParams['figure.dpi'] -figsize = lena.size[0]/dpi, lena.size[1]/dpi - -figure(figsize=figsize) -ax = axes([0,0,1,1], frameon=False) -ax.set_axis_off() -im = imshow(lena) - -show() - diff --git a/dev/mpl_examples/pylab_examples/image_interp.py b/dev/mpl_examples/pylab_examples/image_interp.py deleted file mode 100644 index 8f9b9b13044..00000000000 --- a/dev/mpl_examples/pylab_examples/image_interp.py +++ /dev/null @@ -1,63 +0,0 @@ -#!/usr/bin/env python -""" -The same (small) array, interpolated with three different -interpolation methods. - -The center of the pixel at A[i,j] is plotted at i+0.5, i+0.5. If you -are using interpolation='nearest', the region bounded by (i,j) and -(i+1,j+1) will have the same color. If you are using interpolation, -the pixel center will have the same color as it does with nearest, but -other pixels will be interpolated between the neighboring pixels. - -Earlier versions of matplotlib (<0.63) tried to hide the edge effects -from you by setting the view limits so that they would not be visible. -A recent bugfix in antigrain, and a new implementation in the -matplotlib._image module which takes advantage of this fix, no longer -makes this necessary. To prevent edge effects, when doing -interpolation, the matplotlib._image module now pads the input array -with identical pixels around the edge. e.g., if you have a 5x5 array -with colors a-y as below - - - a b c d e - f g h i j - k l m n o - p q r s t - u v w x y - -the _image module creates the padded array, - - a a b c d e e - a a b c d e e - f f g h i j j - k k l m n o o - p p q r s t t - o u v w x y y - o u v w x y y - -does the interpolation/resizing, and then extracts the central region. -This allows you to plot the full range of your array w/o edge effects, -and for example to layer multiple images of different sizes over one -another with different interpolation methods - see -examples/layer_images.py. It also implies a performance hit, as this -new temporary, padded array must be created. Sophisticated -interpolation also implies a performance hit, so if you need maximal -performance or have very large images, interpolation='nearest' is -suggested. - -""" -from pylab import * -A = rand(5,5) -figure(1) -imshow(A, interpolation='nearest') -grid(True) - -figure(2) -imshow(A, interpolation='bilinear') -grid(True) - -figure(3) -imshow(A, interpolation='bicubic') -grid(True) - -show() diff --git a/dev/mpl_examples/pylab_examples/image_interp_00.hires.png b/dev/mpl_examples/pylab_examples/image_interp_00.hires.png deleted file mode 100644 index 1e382c0383c..00000000000 Binary files a/dev/mpl_examples/pylab_examples/image_interp_00.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/image_interp_00.pdf b/dev/mpl_examples/pylab_examples/image_interp_00.pdf deleted file mode 100644 index 96c9b6faeb3..00000000000 Binary files a/dev/mpl_examples/pylab_examples/image_interp_00.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/image_interp_00.png b/dev/mpl_examples/pylab_examples/image_interp_00.png deleted file mode 100644 index 8264188e785..00000000000 Binary files a/dev/mpl_examples/pylab_examples/image_interp_00.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/image_interp_01.hires.png b/dev/mpl_examples/pylab_examples/image_interp_01.hires.png deleted file mode 100644 index 9a15e4bd093..00000000000 Binary files a/dev/mpl_examples/pylab_examples/image_interp_01.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/image_interp_01.pdf b/dev/mpl_examples/pylab_examples/image_interp_01.pdf deleted file mode 100644 index f7cf2971698..00000000000 Binary files a/dev/mpl_examples/pylab_examples/image_interp_01.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/image_interp_01.png b/dev/mpl_examples/pylab_examples/image_interp_01.png deleted file mode 100644 index 7ac008c253f..00000000000 Binary files a/dev/mpl_examples/pylab_examples/image_interp_01.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/image_interp_02.hires.png b/dev/mpl_examples/pylab_examples/image_interp_02.hires.png deleted file mode 100644 index c79ea8ee7fa..00000000000 Binary files a/dev/mpl_examples/pylab_examples/image_interp_02.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/image_interp_02.pdf b/dev/mpl_examples/pylab_examples/image_interp_02.pdf deleted file mode 100644 index d2fea202487..00000000000 Binary files a/dev/mpl_examples/pylab_examples/image_interp_02.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/image_interp_02.png b/dev/mpl_examples/pylab_examples/image_interp_02.png deleted file mode 100644 index 70469368b1d..00000000000 Binary files a/dev/mpl_examples/pylab_examples/image_interp_02.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/image_masked.hires.png b/dev/mpl_examples/pylab_examples/image_masked.hires.png deleted file mode 100644 index 6c8bdeec691..00000000000 Binary files a/dev/mpl_examples/pylab_examples/image_masked.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/image_masked.pdf b/dev/mpl_examples/pylab_examples/image_masked.pdf deleted file mode 100644 index 883984aeb5b..00000000000 Binary files a/dev/mpl_examples/pylab_examples/image_masked.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/image_masked.png b/dev/mpl_examples/pylab_examples/image_masked.png deleted file mode 100644 index f1e60a3fa57..00000000000 Binary files a/dev/mpl_examples/pylab_examples/image_masked.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/image_masked.py b/dev/mpl_examples/pylab_examples/image_masked.py deleted file mode 100644 index 0a5e2599531..00000000000 --- a/dev/mpl_examples/pylab_examples/image_masked.py +++ /dev/null @@ -1,55 +0,0 @@ -#!/usr/bin/env python -'''imshow with masked array input and out-of-range colors. - - The second subplot illustrates the use of BoundaryNorm to - get a filled contour effect. -''' - -from pylab import * -from numpy import ma -import matplotlib.colors as colors - -delta = 0.025 -x = y = arange(-3.0, 3.0, delta) -X, Y = meshgrid(x, y) -Z1 = bivariate_normal(X, Y, 1.0, 1.0, 0.0, 0.0) -Z2 = bivariate_normal(X, Y, 1.5, 0.5, 1, 1) -Z = 10 * (Z2-Z1) # difference of Gaussians - -# Set up a colormap: -palette = cm.gray -palette.set_over('r', 1.0) -palette.set_under('g', 1.0) -palette.set_bad('b', 1.0) -# Alternatively, we could use -# palette.set_bad(alpha = 0.0) -# to make the bad region transparent. This is the default. -# If you comment out all the palette.set* lines, you will see -# all the defaults; under and over will be colored with the -# first and last colors in the palette, respectively. -Zm = ma.masked_where(Z > 1.2, Z) - -# By setting vmin and vmax in the norm, we establish the -# range to which the regular palette color scale is applied. -# Anything above that range is colored based on palette.set_over, etc. - -subplot(1,2,1) -im = imshow(Zm, interpolation='bilinear', - cmap=palette, - norm = colors.Normalize(vmin = -1.0, vmax = 1.0, clip = False), - origin='lower', extent=[-3,3,-3,3]) -title('Green=low, Red=high, Blue=bad') -colorbar(im, extend='both', orientation='horizontal', shrink=0.8) - -subplot(1,2,2) -im = imshow(Zm, interpolation='nearest', - cmap=palette, - norm = colors.BoundaryNorm([-1, -0.5, -0.2, 0, 0.2, 0.5, 1], - ncolors=256, clip = False), - origin='lower', extent=[-3,3,-3,3]) -title('With BoundaryNorm') -colorbar(im, extend='both', spacing='proportional', - orientation='horizontal', shrink=0.8) - -show() - diff --git a/dev/mpl_examples/pylab_examples/image_nonuniform.hires.png b/dev/mpl_examples/pylab_examples/image_nonuniform.hires.png deleted file mode 100644 index 2deaa4480bb..00000000000 Binary files a/dev/mpl_examples/pylab_examples/image_nonuniform.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/image_nonuniform.pdf b/dev/mpl_examples/pylab_examples/image_nonuniform.pdf deleted file mode 100644 index 136c085e702..00000000000 Binary files a/dev/mpl_examples/pylab_examples/image_nonuniform.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/image_nonuniform.png b/dev/mpl_examples/pylab_examples/image_nonuniform.png deleted file mode 100644 index 6018efaccb0..00000000000 Binary files a/dev/mpl_examples/pylab_examples/image_nonuniform.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/image_nonuniform.py b/dev/mpl_examples/pylab_examples/image_nonuniform.py deleted file mode 100644 index 74d72f6ae46..00000000000 --- a/dev/mpl_examples/pylab_examples/image_nonuniform.py +++ /dev/null @@ -1,60 +0,0 @@ -''' -This illustrates the NonUniformImage class, which still needs -an axes method interface; either a separate interface, or a -generalization of imshow. -''' - -from matplotlib.pyplot import figure, show -import numpy as np -from matplotlib.image import NonUniformImage -from matplotlib import cm - -interp='nearest' - -x = np.linspace(-4, 4, 9) -x2 = x**3 -y = np.linspace(-4, 4, 9) -#print 'Size %d points' % (len(x) * len(y)) -z = np.sqrt(x[np.newaxis,:]**2 + y[:,np.newaxis]**2) - -fig = figure() -fig.suptitle('NonUniformImage class') -ax = fig.add_subplot(221) -im = NonUniformImage(ax, interpolation=interp, extent=(-4,4,-4,4), - cmap=cm.Purples) -im.set_data(x, y, z) -ax.images.append(im) -ax.set_xlim(-4,4) -ax.set_ylim(-4,4) -ax.set_title(interp) - -ax = fig.add_subplot(222) -im = NonUniformImage(ax, interpolation=interp, extent=(-64,64,-4,4), - cmap=cm.Purples) -im.set_data(x2, y, z) -ax.images.append(im) -ax.set_xlim(-64,64) -ax.set_ylim(-4,4) -ax.set_title(interp) - -interp = 'bilinear' - -ax = fig.add_subplot(223) -im = NonUniformImage(ax, interpolation=interp, extent=(-4,4,-4,4), - cmap=cm.Purples) -im.set_data(x, y, z) -ax.images.append(im) -ax.set_xlim(-4,4) -ax.set_ylim(-4,4) -ax.set_title(interp) - -ax = fig.add_subplot(224) -im = NonUniformImage(ax, interpolation=interp, extent=(-64,64,-4,4), - cmap=cm.Purples) -im.set_data(x2, y, z) -ax.images.append(im) -ax.set_xlim(-64,64) -ax.set_ylim(-4,4) -ax.set_title(interp) - -show() diff --git a/dev/mpl_examples/pylab_examples/image_origin.hires.png b/dev/mpl_examples/pylab_examples/image_origin.hires.png deleted file mode 100644 index 828d925f479..00000000000 Binary files a/dev/mpl_examples/pylab_examples/image_origin.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/image_origin.pdf b/dev/mpl_examples/pylab_examples/image_origin.pdf deleted file mode 100644 index ec3a7d4c4bf..00000000000 Binary files a/dev/mpl_examples/pylab_examples/image_origin.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/image_origin.png b/dev/mpl_examples/pylab_examples/image_origin.png deleted file mode 100644 index d72b49c752e..00000000000 Binary files a/dev/mpl_examples/pylab_examples/image_origin.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/image_origin.py b/dev/mpl_examples/pylab_examples/image_origin.py deleted file mode 100644 index 43500f6a2d5..00000000000 --- a/dev/mpl_examples/pylab_examples/image_origin.py +++ /dev/null @@ -1,24 +0,0 @@ -#!/usr/bin/env python -""" -You can specify whether images should be plotted with the array origin -x[0,0] in the upper left or upper right by using the origin parameter. -You can also control the default be setting image.origin in your -matplotlibrc file; see http://matplotlib.org/matplotlibrc -""" -from pylab import * - -x = arange(100.0); x.shape = 10,10 - -interp = 'bilinear'; -#interp = 'nearest'; -lim = -2,11,-2,6 -subplot(211, axisbg='g') -title('blue should be up') -imshow(x, origin='upper', interpolation=interp) -#axis(lim) - -subplot(212, axisbg='y') -title('blue should be down') -imshow(x, origin='lower', interpolation=interp) -#axis(lim) -show() diff --git a/dev/mpl_examples/pylab_examples/image_slices_viewer.hires.png b/dev/mpl_examples/pylab_examples/image_slices_viewer.hires.png deleted file mode 100644 index 350eaaf8c6d..00000000000 Binary files a/dev/mpl_examples/pylab_examples/image_slices_viewer.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/image_slices_viewer.pdf b/dev/mpl_examples/pylab_examples/image_slices_viewer.pdf deleted file mode 100644 index 92e53b7ad00..00000000000 Binary files a/dev/mpl_examples/pylab_examples/image_slices_viewer.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/image_slices_viewer.png b/dev/mpl_examples/pylab_examples/image_slices_viewer.png deleted file mode 100644 index 92922e70792..00000000000 Binary files a/dev/mpl_examples/pylab_examples/image_slices_viewer.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/image_slices_viewer.py b/dev/mpl_examples/pylab_examples/image_slices_viewer.py deleted file mode 100644 index e0987d1a2cf..00000000000 --- a/dev/mpl_examples/pylab_examples/image_slices_viewer.py +++ /dev/null @@ -1,46 +0,0 @@ -from __future__ import print_function -import numpy -from matplotlib.pyplot import figure, show - - - - -class IndexTracker: - def __init__(self, ax, X): - self.ax = ax - ax.set_title('use scroll wheel to navigate images') - - self.X = X - rows,cols,self.slices = X.shape - self.ind = self.slices/2 - - self.im = ax.imshow(self.X[:,:,self.ind]) - self.update() - - def onscroll(self, event): - print ("%s %s" % (event.button, event.step)) - if event.button=='up': - self.ind = numpy.clip(self.ind+1, 0, self.slices-1) - else: - self.ind = numpy.clip(self.ind-1, 0, self.slices-1) - - - self.update() - - def update(self): - self.im.set_data(self.X[:,:,self.ind]) - ax.set_ylabel('slice %s'%self.ind) - self.im.axes.figure.canvas.draw() - - -fig = figure() -ax = fig.add_subplot(111) - -X = numpy.random.rand(20,20,40) - -tracker = IndexTracker(ax, X) - - - -fig.canvas.mpl_connect('scroll_event', tracker.onscroll) -show() diff --git a/dev/mpl_examples/pylab_examples/integral_demo.hires.png b/dev/mpl_examples/pylab_examples/integral_demo.hires.png deleted file mode 100644 index 6c6cda4afdb..00000000000 Binary files a/dev/mpl_examples/pylab_examples/integral_demo.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/integral_demo.pdf b/dev/mpl_examples/pylab_examples/integral_demo.pdf deleted file mode 100644 index 19e45bc316b..00000000000 Binary files a/dev/mpl_examples/pylab_examples/integral_demo.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/integral_demo.png b/dev/mpl_examples/pylab_examples/integral_demo.png deleted file mode 100644 index 1b4dd8408fe..00000000000 Binary files a/dev/mpl_examples/pylab_examples/integral_demo.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/integral_demo.py b/dev/mpl_examples/pylab_examples/integral_demo.py deleted file mode 100644 index 436482ce189..00000000000 --- a/dev/mpl_examples/pylab_examples/integral_demo.py +++ /dev/null @@ -1,34 +0,0 @@ -#!/usr/bin/env python - -# implement the example graphs/integral from pyx -from pylab import * -from matplotlib.patches import Polygon - -def func(x): - return (x-3)*(x-5)*(x-7)+85 - -ax = subplot(111) - -a, b = 2, 9 # integral area -x = arange(0, 10, 0.01) -y = func(x) -plot(x, y, linewidth=1) - -# make the shaded region -ix = arange(a, b, 0.01) -iy = func(ix) -verts = [(a,0)] + list(zip(ix,iy)) + [(b,0)] -poly = Polygon(verts, facecolor='0.8', edgecolor='k') -ax.add_patch(poly) - -text(0.5 * (a + b), 30, - r"$\int_a^b f(x)\mathrm{d}x$", horizontalalignment='center', - fontsize=20) - -axis([0,10, 0, 180]) -figtext(0.9, 0.05, 'x') -figtext(0.1, 0.9, 'y') -ax.set_xticks((a,b)) -ax.set_xticklabels(('a','b')) -ax.set_yticks([]) -show() diff --git a/dev/mpl_examples/pylab_examples/interp_demo.hires.png b/dev/mpl_examples/pylab_examples/interp_demo.hires.png deleted file mode 100644 index 561ade59b8e..00000000000 Binary files a/dev/mpl_examples/pylab_examples/interp_demo.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/interp_demo.pdf b/dev/mpl_examples/pylab_examples/interp_demo.pdf deleted file mode 100644 index 06e94e216cf..00000000000 Binary files a/dev/mpl_examples/pylab_examples/interp_demo.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/interp_demo.png b/dev/mpl_examples/pylab_examples/interp_demo.png deleted file mode 100644 index 1bb87a7af71..00000000000 Binary files a/dev/mpl_examples/pylab_examples/interp_demo.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/interp_demo.py b/dev/mpl_examples/pylab_examples/interp_demo.py deleted file mode 100644 index 0f7375475d1..00000000000 --- a/dev/mpl_examples/pylab_examples/interp_demo.py +++ /dev/null @@ -1,14 +0,0 @@ -from matplotlib.pyplot import figure, show -from numpy import pi, sin, linspace -from matplotlib.mlab import stineman_interp - -x = linspace(0,2*pi,20); -y = sin(x); yp = None -xi = linspace(x[0],x[-1],100); -yi = stineman_interp(xi,x,y,yp); - -fig = figure() -ax = fig.add_subplot(111) -ax.plot(x,y,'ro',xi,yi,'-b.') -show() - diff --git a/dev/mpl_examples/pylab_examples/invert_axes.hires.png b/dev/mpl_examples/pylab_examples/invert_axes.hires.png deleted file mode 100644 index 9817bb0047e..00000000000 Binary files a/dev/mpl_examples/pylab_examples/invert_axes.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/invert_axes.pdf b/dev/mpl_examples/pylab_examples/invert_axes.pdf deleted file mode 100644 index 78b9ca65051..00000000000 Binary files a/dev/mpl_examples/pylab_examples/invert_axes.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/invert_axes.png b/dev/mpl_examples/pylab_examples/invert_axes.png deleted file mode 100644 index 9abe69c0bf1..00000000000 Binary files a/dev/mpl_examples/pylab_examples/invert_axes.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/invert_axes.py b/dev/mpl_examples/pylab_examples/invert_axes.py deleted file mode 100644 index b8ae58d8b4c..00000000000 --- a/dev/mpl_examples/pylab_examples/invert_axes.py +++ /dev/null @@ -1,21 +0,0 @@ -#!/usr/bin/env python -""" - -You can use decreasing axes by flipping the normal order of the axis -limits - -""" -from pylab import * - -t = arange(0.01, 5.0, 0.01) -s = exp(-t) -plot(t, s) - -xlim(5,0) # decreasing time - -xlabel('decreasing time (s)') -ylabel('voltage (mV)') -title('Should be growing...') -grid(True) - -show() diff --git a/dev/mpl_examples/pylab_examples/layer_images.hires.png b/dev/mpl_examples/pylab_examples/layer_images.hires.png deleted file mode 100644 index 6b97a4f7615..00000000000 Binary files a/dev/mpl_examples/pylab_examples/layer_images.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/layer_images.pdf b/dev/mpl_examples/pylab_examples/layer_images.pdf deleted file mode 100644 index 037163f9901..00000000000 Binary files a/dev/mpl_examples/pylab_examples/layer_images.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/layer_images.png b/dev/mpl_examples/pylab_examples/layer_images.png deleted file mode 100644 index 9b0c99dfe36..00000000000 Binary files a/dev/mpl_examples/pylab_examples/layer_images.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/layer_images.py b/dev/mpl_examples/pylab_examples/layer_images.py deleted file mode 100644 index 8d50159aadb..00000000000 --- a/dev/mpl_examples/pylab_examples/layer_images.py +++ /dev/null @@ -1,43 +0,0 @@ -#!/usr/bin/env python -""" -Layer images above one another using alpha blending -""" -from __future__ import division -from pylab import * - -def func3(x,y): - return (1- x/2 + x**5 + y**3)*exp(-x**2-y**2) - -# make these smaller to increase the resolution -dx, dy = 0.05, 0.05 - -x = arange(-3.0, 3.0, dx) -y = arange(-3.0, 3.0, dy) -X,Y = meshgrid(x, y) - -# when layering multiple images, the images need to have the same -# extent. This does not mean they need to have the same shape, but -# they both need to render to the same coordinate system determined by -# xmin, xmax, ymin, ymax. Note if you use different interpolations -# for the images their apparent extent could be different due to -# interpolation edge effects - - -xmin, xmax, ymin, ymax = amin(x), amax(x), amin(y), amax(y) -extent = xmin, xmax, ymin, ymax -fig = plt.figure(frameon=False) - -Z1 = array(([0,1]*4 + [1,0]*4)*4); Z1.shape = 8,8 # chessboard -im1 = imshow(Z1, cmap=cm.gray, interpolation='nearest', - extent=extent) -hold(True) - -Z2 = func3(X, Y) - -im2 = imshow(Z2, cmap=cm.jet, alpha=.9, interpolation='bilinear', - extent=extent) -#axis([xmin, xmax, ymin, ymax]) - -show() - - diff --git a/dev/mpl_examples/pylab_examples/legend_auto.py b/dev/mpl_examples/pylab_examples/legend_auto.py deleted file mode 100644 index bcab13df337..00000000000 --- a/dev/mpl_examples/pylab_examples/legend_auto.py +++ /dev/null @@ -1,96 +0,0 @@ -""" -This file was written to test matplotlib's autolegend placement -algorithm, but shows lots of different ways to create legends so is -useful as a general examples - -Thanks to John Gill and Phil ?? for help at the matplotlib sprint at -pycon 2005 where the auto-legend support was written. -""" -from pylab import * -import sys - -rcParams['legend.loc'] = 'best' - -N = 100 -x = arange(N) - -def fig_1(): - figure(1) - t = arange(0, 40.0 * pi, 0.1) - l, = plot(t, 100*sin(t), 'r', label='sine') - legend(framealpha=0.5) - -def fig_2(): - figure(2) - plot(x, 'o', label='x=y') - legend() - -def fig_3(): - figure(3) - plot(x, -x, 'o', label='x= -y') - legend() - -def fig_4(): - figure(4) - plot(x, ones(len(x)), 'o', label='y=1') - plot(x, -ones(len(x)), 'o', label='y=-1') - legend() - -def fig_5(): - figure(5) - n, bins, patches = hist(randn(1000), 40, normed=1) - l, = plot(bins, normpdf(bins, 0.0, 1.0), 'r--', label='fit', linewidth=3) - legend([l, patches[0]], ['fit', 'hist']) - -def fig_6(): - figure(6) - plot(x, 50-x, 'o', label='y=1') - plot(x, x-50, 'o', label='y=-1') - legend() - -def fig_7(): - figure(7) - xx = x - (N/2.0) - plot(xx, (xx*xx)-1225, 'bo', label='$y=x^2$') - plot(xx, 25*xx, 'go', label='$y=25x$') - plot(xx, -25*xx, 'mo', label='$y=-25x$') - legend() - -def fig_8(): - figure(8) - b1 = bar(x, x, color='m') - b2 = bar(x, x[::-1], color='g') - legend([b1[0], b2[0]], ['up', 'down']) - -def fig_9(): - figure(9) - b1 = bar(x, -x) - b2 = bar(x, -x[::-1], color='r') - legend([b1[0], b2[0]], ['down', 'up']) - -def fig_10(): - figure(10) - b1 = bar(x, x, bottom=-100, color='m') - b2 = bar(x, x[::-1], bottom=-100, color='g') - b3 = bar(x, -x, bottom=100) - b4 = bar(x, -x[::-1], bottom=100, color='r') - legend([b1[0], b2[0], b3[0], b4[0]], ['bottom right', 'bottom left', - 'top left', 'top right']) - -if __name__ == '__main__': - nfigs = 10 - figures = [] - for f in sys.argv[1:]: - try: - figures.append(int(f)) - except ValueError: - pass - if len(figures) == 0: - figures = range(1, nfigs+1) - - for fig in figures: - fn_name = "fig_%d" % fig - fn = globals()[fn_name] - fn() - - show() diff --git a/dev/mpl_examples/pylab_examples/legend_auto_00.hires.png b/dev/mpl_examples/pylab_examples/legend_auto_00.hires.png deleted file mode 100644 index aa21852183f..00000000000 Binary files a/dev/mpl_examples/pylab_examples/legend_auto_00.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/legend_auto_00.pdf b/dev/mpl_examples/pylab_examples/legend_auto_00.pdf deleted file mode 100644 index 20d576a61a4..00000000000 Binary files a/dev/mpl_examples/pylab_examples/legend_auto_00.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/legend_auto_00.png b/dev/mpl_examples/pylab_examples/legend_auto_00.png deleted file mode 100644 index f7d4580df20..00000000000 Binary files a/dev/mpl_examples/pylab_examples/legend_auto_00.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/legend_auto_01.hires.png b/dev/mpl_examples/pylab_examples/legend_auto_01.hires.png deleted file mode 100644 index 3a35389252b..00000000000 Binary files a/dev/mpl_examples/pylab_examples/legend_auto_01.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/legend_auto_01.pdf b/dev/mpl_examples/pylab_examples/legend_auto_01.pdf deleted file mode 100644 index 17a244508ba..00000000000 Binary files a/dev/mpl_examples/pylab_examples/legend_auto_01.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/legend_auto_01.png b/dev/mpl_examples/pylab_examples/legend_auto_01.png deleted file mode 100644 index 7890531fee4..00000000000 Binary files a/dev/mpl_examples/pylab_examples/legend_auto_01.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/legend_auto_02.hires.png b/dev/mpl_examples/pylab_examples/legend_auto_02.hires.png deleted file mode 100644 index d871817e65c..00000000000 Binary files a/dev/mpl_examples/pylab_examples/legend_auto_02.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/legend_auto_02.pdf b/dev/mpl_examples/pylab_examples/legend_auto_02.pdf deleted file mode 100644 index 0f9e2fac8fe..00000000000 Binary files a/dev/mpl_examples/pylab_examples/legend_auto_02.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/legend_auto_02.png b/dev/mpl_examples/pylab_examples/legend_auto_02.png deleted file mode 100644 index 353c76e4904..00000000000 Binary files a/dev/mpl_examples/pylab_examples/legend_auto_02.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/legend_auto_03.hires.png b/dev/mpl_examples/pylab_examples/legend_auto_03.hires.png deleted file mode 100644 index 781ac6d6fd9..00000000000 Binary files a/dev/mpl_examples/pylab_examples/legend_auto_03.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/legend_auto_03.pdf b/dev/mpl_examples/pylab_examples/legend_auto_03.pdf deleted file mode 100644 index fab18ca26ec..00000000000 Binary files a/dev/mpl_examples/pylab_examples/legend_auto_03.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/legend_auto_03.png b/dev/mpl_examples/pylab_examples/legend_auto_03.png deleted file mode 100644 index a18074a9555..00000000000 Binary files a/dev/mpl_examples/pylab_examples/legend_auto_03.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/legend_auto_04.hires.png b/dev/mpl_examples/pylab_examples/legend_auto_04.hires.png deleted file mode 100644 index bf48b677f63..00000000000 Binary files a/dev/mpl_examples/pylab_examples/legend_auto_04.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/legend_auto_04.pdf b/dev/mpl_examples/pylab_examples/legend_auto_04.pdf deleted file mode 100644 index fb9a433cf0c..00000000000 Binary files a/dev/mpl_examples/pylab_examples/legend_auto_04.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/legend_auto_04.png b/dev/mpl_examples/pylab_examples/legend_auto_04.png deleted file mode 100644 index b4cb8351b86..00000000000 Binary files a/dev/mpl_examples/pylab_examples/legend_auto_04.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/legend_auto_05.hires.png b/dev/mpl_examples/pylab_examples/legend_auto_05.hires.png deleted file mode 100644 index b4f06c88c41..00000000000 Binary files a/dev/mpl_examples/pylab_examples/legend_auto_05.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/legend_auto_05.pdf b/dev/mpl_examples/pylab_examples/legend_auto_05.pdf deleted file mode 100644 index 2872238d7a5..00000000000 Binary files a/dev/mpl_examples/pylab_examples/legend_auto_05.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/legend_auto_05.png b/dev/mpl_examples/pylab_examples/legend_auto_05.png deleted file mode 100644 index 120673b1b44..00000000000 Binary files a/dev/mpl_examples/pylab_examples/legend_auto_05.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/legend_auto_06.hires.png b/dev/mpl_examples/pylab_examples/legend_auto_06.hires.png deleted file mode 100644 index 908157cc2b0..00000000000 Binary files a/dev/mpl_examples/pylab_examples/legend_auto_06.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/legend_auto_06.pdf b/dev/mpl_examples/pylab_examples/legend_auto_06.pdf deleted file mode 100644 index a2cab1dd290..00000000000 Binary files a/dev/mpl_examples/pylab_examples/legend_auto_06.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/legend_auto_06.png b/dev/mpl_examples/pylab_examples/legend_auto_06.png deleted file mode 100644 index 9a44daf92ab..00000000000 Binary files a/dev/mpl_examples/pylab_examples/legend_auto_06.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/legend_auto_07.hires.png b/dev/mpl_examples/pylab_examples/legend_auto_07.hires.png deleted file mode 100644 index 20807d465a7..00000000000 Binary files a/dev/mpl_examples/pylab_examples/legend_auto_07.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/legend_auto_07.pdf b/dev/mpl_examples/pylab_examples/legend_auto_07.pdf deleted file mode 100644 index fadc900ef0c..00000000000 Binary files a/dev/mpl_examples/pylab_examples/legend_auto_07.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/legend_auto_07.png b/dev/mpl_examples/pylab_examples/legend_auto_07.png deleted file mode 100644 index aafd247ca88..00000000000 Binary files a/dev/mpl_examples/pylab_examples/legend_auto_07.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/legend_auto_08.hires.png b/dev/mpl_examples/pylab_examples/legend_auto_08.hires.png deleted file mode 100644 index ddefa245dd1..00000000000 Binary files a/dev/mpl_examples/pylab_examples/legend_auto_08.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/legend_auto_08.pdf b/dev/mpl_examples/pylab_examples/legend_auto_08.pdf deleted file mode 100644 index 18f38a90014..00000000000 Binary files a/dev/mpl_examples/pylab_examples/legend_auto_08.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/legend_auto_08.png b/dev/mpl_examples/pylab_examples/legend_auto_08.png deleted file mode 100644 index 61b0d11fce4..00000000000 Binary files a/dev/mpl_examples/pylab_examples/legend_auto_08.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/legend_auto_09.hires.png b/dev/mpl_examples/pylab_examples/legend_auto_09.hires.png deleted file mode 100644 index f78fe4e10eb..00000000000 Binary files a/dev/mpl_examples/pylab_examples/legend_auto_09.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/legend_auto_09.pdf b/dev/mpl_examples/pylab_examples/legend_auto_09.pdf deleted file mode 100644 index bfef85b9308..00000000000 Binary files a/dev/mpl_examples/pylab_examples/legend_auto_09.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/legend_auto_09.png b/dev/mpl_examples/pylab_examples/legend_auto_09.png deleted file mode 100644 index 89036808e98..00000000000 Binary files a/dev/mpl_examples/pylab_examples/legend_auto_09.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/legend_demo.hires.png b/dev/mpl_examples/pylab_examples/legend_demo.hires.png deleted file mode 100644 index c8bbd64c160..00000000000 Binary files a/dev/mpl_examples/pylab_examples/legend_demo.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/legend_demo.pdf b/dev/mpl_examples/pylab_examples/legend_demo.pdf deleted file mode 100644 index c978ddfdf23..00000000000 Binary files a/dev/mpl_examples/pylab_examples/legend_demo.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/legend_demo.png b/dev/mpl_examples/pylab_examples/legend_demo.png deleted file mode 100644 index ca9540f4027..00000000000 Binary files a/dev/mpl_examples/pylab_examples/legend_demo.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/legend_demo.py b/dev/mpl_examples/pylab_examples/legend_demo.py deleted file mode 100644 index 63f25a46bb2..00000000000 --- a/dev/mpl_examples/pylab_examples/legend_demo.py +++ /dev/null @@ -1,42 +0,0 @@ -""" -Demo of the legend function with a few features. - -In addition to the basic legend, this demo shows a few optional features: - - * Custom legend placement. - * A keyword argument to a drop-shadow. - * Setting the background color. - * Setting the font size. - * Setting the line width. -""" -import numpy as np -import matplotlib.pyplot as plt - - -# Example data -a = np.arange(0,3, .02) -b = np.arange(0,3, .02) -c = np.exp(a) -d = c[::-1] - -# Create plots with pre-defined labels. -# Alternatively, you can pass labels explicitly when calling `legend`. -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') - -# Now add the legend with some customizations. -legend = ax.legend(loc='upper center', shadow=True) - -# The frame is matplotlib.patches.Rectangle instance surrounding the legend. -frame = legend.get_frame() -frame.set_facecolor('0.90') - -# Set the fontsize -for label in legend.get_texts(): - label.set_fontsize('large') - -for label in legend.get_lines(): - label.set_linewidth(1.5) # the legend line width -plt.show() diff --git a/dev/mpl_examples/pylab_examples/legend_demo2.hires.png b/dev/mpl_examples/pylab_examples/legend_demo2.hires.png deleted file mode 100644 index 0ba91d801b4..00000000000 Binary files a/dev/mpl_examples/pylab_examples/legend_demo2.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/legend_demo2.pdf b/dev/mpl_examples/pylab_examples/legend_demo2.pdf deleted file mode 100644 index 8e671823990..00000000000 Binary files a/dev/mpl_examples/pylab_examples/legend_demo2.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/legend_demo2.png b/dev/mpl_examples/pylab_examples/legend_demo2.png deleted file mode 100644 index cd74fe1a84a..00000000000 Binary files a/dev/mpl_examples/pylab_examples/legend_demo2.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/legend_demo2.py b/dev/mpl_examples/pylab_examples/legend_demo2.py deleted file mode 100644 index f1209eea920..00000000000 --- a/dev/mpl_examples/pylab_examples/legend_demo2.py +++ /dev/null @@ -1,23 +0,0 @@ -# Make a legend for specific lines. -import matplotlib.pyplot as plt -import numpy as np - - -t1 = np.arange(0.0, 2.0, 0.1) -t2 = np.arange(0.0, 2.0, 0.01) - -# note that plot returns a list of lines. The "l1, = plot" usage -# extracts the first element of the list into l1 using tuple -# unpacking. So l1 is a Line2D instance, not a sequence of lines -l1, = plt.plot(t2, np.exp(-t2)) -l2, l3 = plt.plot(t2, np.sin(2 * np.pi * t2), '--go', t1, np.log(1 + t1), '.') -l4, = plt.plot(t2, np.exp(-t2) * np.sin(2 * np.pi * t2), 'rs-.') - -plt.legend( (l2, l4), ('oscillatory', 'damped'), 'upper right', shadow=True) -plt.xlabel('time') -plt.ylabel('volts') -plt.title('Damped oscillation') -plt.show() - - - diff --git a/dev/mpl_examples/pylab_examples/legend_demo3.hires.png b/dev/mpl_examples/pylab_examples/legend_demo3.hires.png deleted file mode 100644 index 37beee8972b..00000000000 Binary files a/dev/mpl_examples/pylab_examples/legend_demo3.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/legend_demo3.pdf b/dev/mpl_examples/pylab_examples/legend_demo3.pdf deleted file mode 100644 index ba9e8db8f58..00000000000 Binary files a/dev/mpl_examples/pylab_examples/legend_demo3.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/legend_demo3.png b/dev/mpl_examples/pylab_examples/legend_demo3.png deleted file mode 100644 index e8fd3019395..00000000000 Binary files a/dev/mpl_examples/pylab_examples/legend_demo3.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/legend_demo3.py b/dev/mpl_examples/pylab_examples/legend_demo3.py deleted file mode 100644 index 77e2e0f9902..00000000000 --- a/dev/mpl_examples/pylab_examples/legend_demo3.py +++ /dev/null @@ -1,33 +0,0 @@ -#!/usr/bin/env python -import matplotlib -matplotlib.rcParams['legend.fancybox'] = True -import matplotlib.pyplot as plt -import numpy as np - -def myplot(ax): - t1 = np.arange(0.0, 1.0, 0.1) - for n in [1, 2, 3, 4]: - ax.plot(t1, t1**n, label="n=%d"%(n,)) - -ax1 = plt.subplot(3,1,1) -ax1.plot([1], label="multi\nline") -ax1.plot([1], label="$2^{2^2}$") -ax1.plot([1], label=r"$\frac{1}{2}\pi$") -ax1.legend(loc=1, ncol=3, shadow=True) - -ax2 = plt.subplot(3,1,2) -myplot(ax2) -ax2.legend(loc="center left", bbox_to_anchor=[0.5, 0.5], - ncol=2, shadow=True, title="Legend") -ax2.get_legend().get_title().set_color("red") - -ax3 = plt.subplot(3,1,3) -myplot(ax3) -ax3.legend(shadow=True, fancybox=True) - - -plt.draw() -plt.show() - - - diff --git a/dev/mpl_examples/pylab_examples/legend_demo4.hires.png b/dev/mpl_examples/pylab_examples/legend_demo4.hires.png deleted file mode 100644 index 27fffff5c8b..00000000000 Binary files a/dev/mpl_examples/pylab_examples/legend_demo4.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/legend_demo4.pdf b/dev/mpl_examples/pylab_examples/legend_demo4.pdf deleted file mode 100644 index 07a1a6f6189..00000000000 Binary files a/dev/mpl_examples/pylab_examples/legend_demo4.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/legend_demo4.png b/dev/mpl_examples/pylab_examples/legend_demo4.png deleted file mode 100644 index 852845ca7b3..00000000000 Binary files a/dev/mpl_examples/pylab_examples/legend_demo4.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/legend_demo4.py b/dev/mpl_examples/pylab_examples/legend_demo4.py deleted file mode 100644 index b3adb1b9bc3..00000000000 --- a/dev/mpl_examples/pylab_examples/legend_demo4.py +++ /dev/null @@ -1,31 +0,0 @@ -import matplotlib.pyplot as plt - -ax = plt.subplot(311) - -b1 = ax.bar([0, 1, 2], [0.2, 0.3, 0.1], width=0.4, - label="Bar 1", align="center") - -b2 = ax.bar([0.5, 1.5, 2.5], [0.3, 0.2, 0.2], color="red", width=0.4, - label="Bar 2", align="center") - -ax.legend() - -ax = plt.subplot(312) - -err1 = ax.errorbar([0, 1, 2], [2, 3, 1], xerr=0.4, fmt="s", - label="test 1") -err2 = ax.errorbar([0, 1, 2], [3, 2, 4], yerr=0.3, fmt="o", - label="test 2") -err3 = ax.errorbar([0, 1, 2], [1, 1, 3], xerr=0.4, yerr=0.3, fmt="^", - label="test 3") - -ax.legend() - -ax = plt.subplot(313) - -ll = ax.stem([0.3, 1.5, 2.7], [1, 3.6, 2.7], label="stem test") - -ax.legend() - -plt.show() - diff --git a/dev/mpl_examples/pylab_examples/legend_demo_custom_handler.hires.png b/dev/mpl_examples/pylab_examples/legend_demo_custom_handler.hires.png deleted file mode 100644 index d3d774b088b..00000000000 Binary files a/dev/mpl_examples/pylab_examples/legend_demo_custom_handler.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/legend_demo_custom_handler.pdf b/dev/mpl_examples/pylab_examples/legend_demo_custom_handler.pdf deleted file mode 100644 index 249088b5088..00000000000 Binary files a/dev/mpl_examples/pylab_examples/legend_demo_custom_handler.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/legend_demo_custom_handler.png b/dev/mpl_examples/pylab_examples/legend_demo_custom_handler.png deleted file mode 100644 index c6e89c1d6e8..00000000000 Binary files a/dev/mpl_examples/pylab_examples/legend_demo_custom_handler.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/legend_demo_custom_handler.py b/dev/mpl_examples/pylab_examples/legend_demo_custom_handler.py deleted file mode 100644 index 4d5e9e59def..00000000000 --- a/dev/mpl_examples/pylab_examples/legend_demo_custom_handler.py +++ /dev/null @@ -1,30 +0,0 @@ -import matplotlib.pyplot as plt -import numpy as np - -ax = plt.subplot(111, aspect=1) -x, y = np.random.randn(2, 20) -#[1.1, 2, 2.8], [1.1, 2, 1.8] -l1, = ax.plot(x,y, "k+", mew=3, ms=12) -l2, = ax.plot(x,y, "w+", mew=1, ms=10) - -import matplotlib.patches as mpatches -c = mpatches.Circle((0, 0), 1, fc="g", ec="r", lw=3) -ax.add_patch(c) - - - -from matplotlib.legend_handler import HandlerPatch - -def make_legend_ellipse(legend, orig_handle, - xdescent, ydescent, - width, height, fontsize): - p = mpatches.Ellipse(xy=(0.5*width-0.5*xdescent, 0.5*height-0.5*ydescent), - width = width+xdescent, height=(height+ydescent)) - - return p - -plt.legend([c, (l1, l2)], ["Label 1", "Label 2"], - handler_map={mpatches.Circle:HandlerPatch(patch_func=make_legend_ellipse), - }) - -plt.show() diff --git a/dev/mpl_examples/pylab_examples/legend_scatter.hires.png b/dev/mpl_examples/pylab_examples/legend_scatter.hires.png deleted file mode 100644 index f2b6067b14b..00000000000 Binary files a/dev/mpl_examples/pylab_examples/legend_scatter.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/legend_scatter.pdf b/dev/mpl_examples/pylab_examples/legend_scatter.pdf deleted file mode 100644 index 296cedfc52b..00000000000 Binary files a/dev/mpl_examples/pylab_examples/legend_scatter.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/legend_scatter.png b/dev/mpl_examples/pylab_examples/legend_scatter.png deleted file mode 100644 index 3220b041c41..00000000000 Binary files a/dev/mpl_examples/pylab_examples/legend_scatter.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/legend_scatter.py b/dev/mpl_examples/pylab_examples/legend_scatter.py deleted file mode 100644 index 81eb32e37b4..00000000000 --- a/dev/mpl_examples/pylab_examples/legend_scatter.py +++ /dev/null @@ -1,21 +0,0 @@ -#!/usr/bin/env python -from pylab import * - -N=1000 - -props = dict( alpha=0.5, edgecolors='none' ) - -handles = [] -colours = ['red', 'green', 'blue', 'magenta', 'cyan', 'yellow'] -colours = ['red', 'green', 'blue'] -for colour in colours: - x, y = rand(2,N) - s = 400.0 * rand(N) - handles.append(scatter(x, y, c=colour, s=s, **props)) - -legend(handles, colours) -grid(True) - -show() - - diff --git a/dev/mpl_examples/pylab_examples/legend_translucent.hires.png b/dev/mpl_examples/pylab_examples/legend_translucent.hires.png deleted file mode 100644 index 11efac103af..00000000000 Binary files a/dev/mpl_examples/pylab_examples/legend_translucent.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/legend_translucent.pdf b/dev/mpl_examples/pylab_examples/legend_translucent.pdf deleted file mode 100644 index 179d4f17d99..00000000000 Binary files a/dev/mpl_examples/pylab_examples/legend_translucent.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/legend_translucent.png b/dev/mpl_examples/pylab_examples/legend_translucent.png deleted file mode 100644 index 1118c5bf0f2..00000000000 Binary files a/dev/mpl_examples/pylab_examples/legend_translucent.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/legend_translucent.py b/dev/mpl_examples/pylab_examples/legend_translucent.py deleted file mode 100644 index 577b0f96cfe..00000000000 --- a/dev/mpl_examples/pylab_examples/legend_translucent.py +++ /dev/null @@ -1,18 +0,0 @@ -#!/usr/bin/python -# -# Show how to add a translucent legend - -# import pyplot module -import matplotlib.pyplot as plt - -# draw 2 crossing lines -plt.plot([0,1], label='going up') -plt.plot([1,0], label='going down') - -# add the legend in the middle of the plot -leg = plt.legend(fancybox=True, loc='center') -# set the alpha value of the legend: it will be translucent -leg.get_frame().set_alpha(0.5) - -# show the plot -plt.show() diff --git a/dev/mpl_examples/pylab_examples/line_collection.hires.png b/dev/mpl_examples/pylab_examples/line_collection.hires.png deleted file mode 100644 index 787e508b8b9..00000000000 Binary files a/dev/mpl_examples/pylab_examples/line_collection.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/line_collection.pdf b/dev/mpl_examples/pylab_examples/line_collection.pdf deleted file mode 100644 index 2a7b8e784f5..00000000000 Binary files a/dev/mpl_examples/pylab_examples/line_collection.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/line_collection.png b/dev/mpl_examples/pylab_examples/line_collection.png deleted file mode 100644 index 415f82c22e7..00000000000 Binary files a/dev/mpl_examples/pylab_examples/line_collection.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/line_collection.py b/dev/mpl_examples/pylab_examples/line_collection.py deleted file mode 100644 index 716d6d4a4c7..00000000000 --- a/dev/mpl_examples/pylab_examples/line_collection.py +++ /dev/null @@ -1,42 +0,0 @@ -import matplotlib.pyplot as plt -from matplotlib.collections import LineCollection -from matplotlib.colors import colorConverter - -import numpy as np - -# In order to efficiently plot many lines in a single set of axes, -# Matplotlib has the ability to add the lines all at once. Here is a -# simple example showing how it is done. - -x = np.arange(100) -# Here are many sets of y to plot vs x -ys = x[:50, np.newaxis] + x[np.newaxis, :] - -segs = np.zeros((50, 100, 2), float) -segs[:,:,1] = ys -segs[:,:,0] = x - -# Mask some values to test masked array support: -segs = np.ma.masked_where((segs > 50) & (segs < 60), segs) - -# We need to set the plot limits. -ax = plt.axes() -ax.set_xlim(x.min(), x.max()) -ax.set_ylim(ys.min(), ys.max()) - -# colors is sequence of rgba tuples -# linestyle is a string or dash tuple. Legal string values are -# solid|dashed|dashdot|dotted. The dash tuple is (offset, onoffseq) -# where onoffseq is an even length tuple of on and off ink in points. -# If linestyle is omitted, 'solid' is used -# See matplotlib.collections.LineCollection for more information -line_segments = LineCollection(segs, - linewidths = (0.5,1,1.5,2), - colors = [colorConverter.to_rgba(i) \ - for i in ('b','g','r','c','m','y','k')], - linestyle = 'solid') -ax.add_collection(line_segments) -ax.set_title('Line collection with masked arrays') -plt.show() - - diff --git a/dev/mpl_examples/pylab_examples/line_collection2.hires.png b/dev/mpl_examples/pylab_examples/line_collection2.hires.png deleted file mode 100644 index 684d9ece0fc..00000000000 Binary files a/dev/mpl_examples/pylab_examples/line_collection2.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/line_collection2.pdf b/dev/mpl_examples/pylab_examples/line_collection2.pdf deleted file mode 100644 index 1758059723b..00000000000 Binary files a/dev/mpl_examples/pylab_examples/line_collection2.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/line_collection2.png b/dev/mpl_examples/pylab_examples/line_collection2.png deleted file mode 100644 index 9f16e9709b3..00000000000 Binary files a/dev/mpl_examples/pylab_examples/line_collection2.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/line_collection2.py b/dev/mpl_examples/pylab_examples/line_collection2.py deleted file mode 100644 index 1bd3970986e..00000000000 --- a/dev/mpl_examples/pylab_examples/line_collection2.py +++ /dev/null @@ -1,34 +0,0 @@ -from pylab import * -from matplotlib.collections import LineCollection - -# In order to efficiently plot many lines in a single set of axes, -# Matplotlib has the ability to add the lines all at once. Here is a -# simple example showing how it is done. - -N = 50 -x = arange(N) -# Here are many sets of y to plot vs x -ys = [x+i for i in x] - -# We need to set the plot limits, they will not autoscale -ax = axes() -ax.set_xlim((amin(x),amax(x))) -ax.set_ylim((amin(amin(ys)),amax(amax(ys)))) - -# colors is sequence of rgba tuples -# linestyle is a string or dash tuple. Legal string values are -# solid|dashed|dashdot|dotted. The dash tuple is (offset, onoffseq) -# where onoffseq is an even length tuple of on and off ink in points. -# If linestyle is omitted, 'solid' is used -# See matplotlib.collections.LineCollection for more information -line_segments = LineCollection([list(zip(x,y)) for y in ys], # Make a sequence of x,y pairs - linewidths = (0.5,1,1.5,2), - linestyles = 'solid') -line_segments.set_array(x) -ax.add_collection(line_segments) -fig = gcf() -axcb = fig.colorbar(line_segments) -axcb.set_label('Line Number') -ax.set_title('Line Collection with mapped colors') -sci(line_segments) # This allows interactive changing of the colormap. -show() diff --git a/dev/mpl_examples/pylab_examples/line_styles.hires.png b/dev/mpl_examples/pylab_examples/line_styles.hires.png deleted file mode 100644 index c769bc445be..00000000000 Binary files a/dev/mpl_examples/pylab_examples/line_styles.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/line_styles.pdf b/dev/mpl_examples/pylab_examples/line_styles.pdf deleted file mode 100644 index bdbc238f5ef..00000000000 Binary files a/dev/mpl_examples/pylab_examples/line_styles.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/line_styles.png b/dev/mpl_examples/pylab_examples/line_styles.png deleted file mode 100644 index 68e21c9ee11..00000000000 Binary files a/dev/mpl_examples/pylab_examples/line_styles.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/line_styles.py b/dev/mpl_examples/pylab_examples/line_styles.py deleted file mode 100644 index fdde90ee41a..00000000000 --- a/dev/mpl_examples/pylab_examples/line_styles.py +++ /dev/null @@ -1,45 +0,0 @@ -#!/usr/bin/env python -# This should probably be replaced with a demo that shows all -# line and marker types in a single panel, with labels. - -import matplotlib.pyplot as plt -from matplotlib.lines import Line2D -import numpy as np - -t = np.arange(0.0, 1.0, 0.1) -s = np.sin(2*np.pi*t) -linestyles = ['_', '-', '--', ':'] -markers = [] -for m in Line2D.markers: - try: - if len(m) == 1 and m != ' ': - markers.append(m) - except TypeError: - pass - -styles = markers + [ - r'$\lambda$', - r'$\bowtie$', - r'$\circlearrowleft$', - r'$\clubsuit$', - r'$\checkmark$'] - -colors = ('b', 'g', 'r', 'c', 'm', 'y', 'k') - -plt.figure(figsize=(8,8)) - -axisNum = 0 -for row in range(6): - for col in range(5): - axisNum += 1 - ax = plt.subplot(6, 5, axisNum) - color = colors[axisNum % len(colors)] - if axisNum < len(linestyles): - plt.plot(t, s, linestyles[axisNum], color=color, markersize=10) - else: - style = styles[(axisNum - len(linestyles)) % len(styles)] - plt.plot(t, s, linestyle='None', marker=style, color=color, markersize=10) - ax.set_yticklabels([]) - ax.set_xticklabels([]) - -plt.show() diff --git a/dev/mpl_examples/pylab_examples/load_converter.hires.png b/dev/mpl_examples/pylab_examples/load_converter.hires.png deleted file mode 100644 index b04a2d8aeab..00000000000 Binary files a/dev/mpl_examples/pylab_examples/load_converter.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/load_converter.pdf b/dev/mpl_examples/pylab_examples/load_converter.pdf deleted file mode 100644 index efe0e05779a..00000000000 Binary files a/dev/mpl_examples/pylab_examples/load_converter.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/load_converter.png b/dev/mpl_examples/pylab_examples/load_converter.png deleted file mode 100644 index c97e91867be..00000000000 Binary files a/dev/mpl_examples/pylab_examples/load_converter.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/load_converter.py b/dev/mpl_examples/pylab_examples/load_converter.py deleted file mode 100644 index cf8125029b5..00000000000 --- a/dev/mpl_examples/pylab_examples/load_converter.py +++ /dev/null @@ -1,20 +0,0 @@ -from __future__ import print_function -from matplotlib.dates import strpdate2num -#from matplotlib.mlab import load -import numpy as np -from pylab import figure, show -import matplotlib.cbook as cbook - -datafile = cbook.get_sample_data('msft.csv', asfileobj=False) -print('loading', datafile) - -dates, closes = np.loadtxt( - datafile, delimiter=',', - converters={0:strpdate2num('%d-%b-%y')}, - skiprows=1, usecols=(0,2), unpack=True) - -fig = figure() -ax = fig.add_subplot(111) -ax.plot_date(dates, closes, '-') -fig.autofmt_xdate() -show() diff --git a/dev/mpl_examples/pylab_examples/loadrec.hires.png b/dev/mpl_examples/pylab_examples/loadrec.hires.png deleted file mode 100644 index 6fee906f167..00000000000 Binary files a/dev/mpl_examples/pylab_examples/loadrec.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/loadrec.pdf b/dev/mpl_examples/pylab_examples/loadrec.pdf deleted file mode 100644 index 53c260588f4..00000000000 Binary files a/dev/mpl_examples/pylab_examples/loadrec.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/loadrec.png b/dev/mpl_examples/pylab_examples/loadrec.png deleted file mode 100644 index 93e819edd2e..00000000000 Binary files a/dev/mpl_examples/pylab_examples/loadrec.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/loadrec.py b/dev/mpl_examples/pylab_examples/loadrec.py deleted file mode 100644 index 2f01662cefb..00000000000 --- a/dev/mpl_examples/pylab_examples/loadrec.py +++ /dev/null @@ -1,23 +0,0 @@ -from __future__ import print_function -from matplotlib import mlab -from pylab import figure, show -import matplotlib.cbook as cbook - -datafile = cbook.get_sample_data('msft.csv', asfileobj=False) -print('loading', datafile) -a = mlab.csv2rec(datafile) -a.sort() -print(a.dtype) - -fig = figure() -ax = fig.add_subplot(111) -ax.plot(a.date, a.adj_close, '-') -fig.autofmt_xdate() - -# if you have xlwt installed, you can output excel -try: - import mpl_toolkits.exceltools as exceltools - exceltools.rec2excel(a, 'test.xls') -except ImportError: - pass -show() diff --git a/dev/mpl_examples/pylab_examples/log_bar.hires.png b/dev/mpl_examples/pylab_examples/log_bar.hires.png deleted file mode 100644 index a09de7e3977..00000000000 Binary files a/dev/mpl_examples/pylab_examples/log_bar.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/log_bar.pdf b/dev/mpl_examples/pylab_examples/log_bar.pdf deleted file mode 100644 index d5e4913038f..00000000000 Binary files a/dev/mpl_examples/pylab_examples/log_bar.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/log_bar.png b/dev/mpl_examples/pylab_examples/log_bar.png deleted file mode 100644 index c88e863774b..00000000000 Binary files a/dev/mpl_examples/pylab_examples/log_bar.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/log_bar.py b/dev/mpl_examples/pylab_examples/log_bar.py deleted file mode 100644 index feabfaed0b4..00000000000 --- a/dev/mpl_examples/pylab_examples/log_bar.py +++ /dev/null @@ -1,25 +0,0 @@ -#!/usr/bin/env python - -from matplotlib import pylab - -data = ((3,1000), (10,3), (100,30), (500, 800), (50,1)) - -pylab.xlabel("FOO") -pylab.ylabel("FOO") -pylab.title("Testing") -pylab.gca().set_yscale('log') - -dim = len(data[0]) -w = 0.75 -dimw = w / dim - -x = pylab.arange(len(data)) -for i in range(len(data[0])) : - y = [d[i] for d in data] - b = pylab.bar(x + i * dimw, y, dimw, bottom=0.001) -pylab.gca().set_xticks(x + w / 2) -pylab.gca().set_ylim( (0.001,1000)) - -pylab.show() - - diff --git a/dev/mpl_examples/pylab_examples/log_demo.hires.png b/dev/mpl_examples/pylab_examples/log_demo.hires.png deleted file mode 100644 index be2527abb0e..00000000000 Binary files a/dev/mpl_examples/pylab_examples/log_demo.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/log_demo.pdf b/dev/mpl_examples/pylab_examples/log_demo.pdf deleted file mode 100644 index 7c729ac35fa..00000000000 Binary files a/dev/mpl_examples/pylab_examples/log_demo.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/log_demo.png b/dev/mpl_examples/pylab_examples/log_demo.png deleted file mode 100644 index e89ab3af938..00000000000 Binary files a/dev/mpl_examples/pylab_examples/log_demo.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/log_demo.py b/dev/mpl_examples/pylab_examples/log_demo.py deleted file mode 100644 index b5f2a03bb13..00000000000 --- a/dev/mpl_examples/pylab_examples/log_demo.py +++ /dev/null @@ -1,38 +0,0 @@ - -import numpy as np -import matplotlib.pyplot as plt - -plt.subplots_adjust(hspace=0.4) -t = np.arange(0.01, 20.0, 0.01) - -# log y axis -plt.subplot(221) -plt.semilogy(t, np.exp(-t/5.0)) -plt.title('semilogy') -plt.grid(True) - -# log x axis -plt.subplot(222) -plt.semilogx(t, np.sin(2*np.pi*t)) -plt.title('semilogx') -plt.grid(True) - -# log x and y axis -plt.subplot(223) -plt.loglog(t, 20*np.exp(-t/10.0), basex=2) -plt.grid(True) -plt.title('loglog base 4 on x') - -# with errorbars: clip non-positive values -ax = plt.subplot(224) -ax.set_xscale("log", nonposx='clip') -ax.set_yscale("log", nonposy='clip') - -x = 10.0**np.linspace(0.0, 2.0, 20) -y = x**2.0 -plt.errorbar(x, y, xerr=0.1*x, yerr=5.0+0.75*y) -ax.set_ylim(ymin=0.1) -ax.set_title('Errorbars go negative') - - -plt.show() diff --git a/dev/mpl_examples/pylab_examples/log_test.hires.png b/dev/mpl_examples/pylab_examples/log_test.hires.png deleted file mode 100644 index 0d7fb6720cb..00000000000 Binary files a/dev/mpl_examples/pylab_examples/log_test.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/log_test.pdf b/dev/mpl_examples/pylab_examples/log_test.pdf deleted file mode 100644 index f20ec589f02..00000000000 Binary files a/dev/mpl_examples/pylab_examples/log_test.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/log_test.png b/dev/mpl_examples/pylab_examples/log_test.png deleted file mode 100644 index 46522348d27..00000000000 Binary files a/dev/mpl_examples/pylab_examples/log_test.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/log_test.py b/dev/mpl_examples/pylab_examples/log_test.py deleted file mode 100644 index 55d9cc75323..00000000000 --- a/dev/mpl_examples/pylab_examples/log_test.py +++ /dev/null @@ -1,10 +0,0 @@ -#!/usr/bin/env python -from pylab import * - -dt = 0.01 -t = arange(dt, 20.0, dt) - -semilogx(t, exp(-t/5.0)) -grid(True) - -show() diff --git a/dev/mpl_examples/pylab_examples/logo.hires.png b/dev/mpl_examples/pylab_examples/logo.hires.png deleted file mode 100644 index cca752b875d..00000000000 Binary files a/dev/mpl_examples/pylab_examples/logo.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/logo.pdf b/dev/mpl_examples/pylab_examples/logo.pdf deleted file mode 100644 index c78f06ebf8b..00000000000 Binary files a/dev/mpl_examples/pylab_examples/logo.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/logo.png b/dev/mpl_examples/pylab_examples/logo.png deleted file mode 100644 index 39b81db3e49..00000000000 Binary files a/dev/mpl_examples/pylab_examples/logo.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/logo.py b/dev/mpl_examples/pylab_examples/logo.py deleted file mode 100644 index ae62ee5d964..00000000000 --- a/dev/mpl_examples/pylab_examples/logo.py +++ /dev/null @@ -1,28 +0,0 @@ -#!/usr/bin/env python -# This file generates the matplotlib web page logo - -from __future__ import print_function -from pylab import * -import matplotlib.cbook as cbook - -# convert data to mV -datafile = cbook.get_sample_data('membrane.dat', asfileobj=False) -print('loading', datafile) - -x = 1000*0.1*fromstring(file(datafile, 'rb').read(), float32) -# 0.0005 is the sample interval -t = 0.0005*arange(len(x)) -figure(1, figsize=(7,1), dpi=100) -ax = subplot(111, axisbg='y') -plot(t, x) -text(0.5, 0.5,'matplotlib', color='r', - fontsize=40, fontname='Courier', - horizontalalignment='center', - verticalalignment='center', - transform = ax.transAxes, - ) -axis([1, 1.72,-60, 10]) -setp(gca(), 'xticklabels', []) -setp(gca(), 'yticklabels', []) - -show() diff --git a/dev/mpl_examples/pylab_examples/major_minor_demo1.hires.png b/dev/mpl_examples/pylab_examples/major_minor_demo1.hires.png deleted file mode 100644 index f03c8103550..00000000000 Binary files a/dev/mpl_examples/pylab_examples/major_minor_demo1.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/major_minor_demo1.pdf b/dev/mpl_examples/pylab_examples/major_minor_demo1.pdf deleted file mode 100644 index 99a125007a7..00000000000 Binary files a/dev/mpl_examples/pylab_examples/major_minor_demo1.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/major_minor_demo1.png b/dev/mpl_examples/pylab_examples/major_minor_demo1.png deleted file mode 100644 index 8baf1f53e73..00000000000 Binary files a/dev/mpl_examples/pylab_examples/major_minor_demo1.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/major_minor_demo1.py b/dev/mpl_examples/pylab_examples/major_minor_demo1.py deleted file mode 100644 index 81090b065d7..00000000000 --- a/dev/mpl_examples/pylab_examples/major_minor_demo1.py +++ /dev/null @@ -1,53 +0,0 @@ -#!/usr/bin/env python -""" -Demonstrate how to use major and minor tickers. - -The two relevant userland classes are Locators and Formatters. -Locators determine where the ticks are and formatters control the -formatting of ticks. - -Minor ticks are off by default (NullLocator and NullFormatter). You -can turn minor ticks on w/o labels by setting the minor locator. You -can also turn labeling on for the minor ticker by setting the minor -formatter - -Make a plot with major ticks that are multiples of 20 and minor ticks -that are multiples of 5. Label major ticks with %d formatting but -don't label minor ticks - -The MultipleLocator ticker class is used to place ticks on multiples of -some base. The FormatStrFormatter uses a string format string (eg -'%d' or '%1.2f' or '%1.1f cm' ) to format the tick - -The pylab interface grid command changes the grid settings of the -major ticks of the y and y axis together. If you want to control the -grid of the minor ticks for a given axis, use for example - - ax.xaxis.grid(True, which='minor') - -Note, you should not use the same locator between different Axis -because the locator stores references to the Axis data and view limits - -""" - -from pylab import * -from matplotlib.ticker import MultipleLocator, FormatStrFormatter - -majorLocator = MultipleLocator(20) -majorFormatter = FormatStrFormatter('%d') -minorLocator = MultipleLocator(5) - - -t = arange(0.0, 100.0, 0.1) -s = sin(0.1*pi*t)*exp(-t*0.01) - -ax = subplot(111) -plot(t,s) - -ax.xaxis.set_major_locator(majorLocator) -ax.xaxis.set_major_formatter(majorFormatter) - -#for the minor ticks, use no labels; default NullFormatter -ax.xaxis.set_minor_locator(minorLocator) - -show() diff --git a/dev/mpl_examples/pylab_examples/major_minor_demo2.hires.png b/dev/mpl_examples/pylab_examples/major_minor_demo2.hires.png deleted file mode 100644 index e284baf661b..00000000000 Binary files a/dev/mpl_examples/pylab_examples/major_minor_demo2.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/major_minor_demo2.pdf b/dev/mpl_examples/pylab_examples/major_minor_demo2.pdf deleted file mode 100644 index 493bd7219c1..00000000000 Binary files a/dev/mpl_examples/pylab_examples/major_minor_demo2.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/major_minor_demo2.png b/dev/mpl_examples/pylab_examples/major_minor_demo2.png deleted file mode 100644 index 064890cc83d..00000000000 Binary files a/dev/mpl_examples/pylab_examples/major_minor_demo2.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/major_minor_demo2.py b/dev/mpl_examples/pylab_examples/major_minor_demo2.py deleted file mode 100644 index eaeed688ac8..00000000000 --- a/dev/mpl_examples/pylab_examples/major_minor_demo2.py +++ /dev/null @@ -1,34 +0,0 @@ -#!/usr/bin/env python -""" -Automatic tick selection for major and minor ticks. - -Use interactive pan and zoom to see how the tick intervals -change. There will be either 4 or 5 minor tick intervals -per major interval, depending on the major interval. -""" - -import numpy as np -import matplotlib.pyplot as plt -from matplotlib.ticker import AutoMinorLocator - -# One can supply an argument to AutoMinorLocator to -# specify a fixed number of minor intervals per major interval, e.g.: -# minorLocator = AutoMinorLocator(2) -# would lead to a single minor tick between major ticks. - -minorLocator = AutoMinorLocator() - - -t = np.arange(0.0, 100.0, 0.01) -s = np.sin(2*np.pi*t)*np.exp(-t*0.01) - -ax = plt.subplot(111) -plt.plot(t,s) - -ax.xaxis.set_minor_locator(minorLocator) - -plt.tick_params(which='both', width=2) -plt.tick_params(which='major', length=7) -plt.tick_params(which='minor', length=4, color='r') - -plt.show() diff --git a/dev/mpl_examples/pylab_examples/manual_axis.hires.png b/dev/mpl_examples/pylab_examples/manual_axis.hires.png deleted file mode 100644 index ed92adaf0a9..00000000000 Binary files a/dev/mpl_examples/pylab_examples/manual_axis.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/manual_axis.pdf b/dev/mpl_examples/pylab_examples/manual_axis.pdf deleted file mode 100644 index bfe5ca29b93..00000000000 Binary files a/dev/mpl_examples/pylab_examples/manual_axis.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/manual_axis.png b/dev/mpl_examples/pylab_examples/manual_axis.png deleted file mode 100644 index 57ededbd10d..00000000000 Binary files a/dev/mpl_examples/pylab_examples/manual_axis.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/manual_axis.py b/dev/mpl_examples/pylab_examples/manual_axis.py deleted file mode 100644 index 0ef2a9bd41f..00000000000 --- a/dev/mpl_examples/pylab_examples/manual_axis.py +++ /dev/null @@ -1,57 +0,0 @@ -""" -The techniques here are no longer required with the new support for -spines in matplotlib -- see -http://matplotlib.org/examples/pylab_examples/spine_placement_demo.html. - -This example should be considered deprecated and is left just for demo -purposes for folks wanting to make a pseudo-axis - -""" - -import numpy as np -from pylab import figure, show -import matplotlib.lines as lines - -def make_xaxis(ax, yloc, offset=0.05, **props): - xmin, xmax = ax.get_xlim() - locs = [loc for loc in ax.xaxis.get_majorticklocs() - if loc>=xmin and loc<=xmax] - tickline, = ax.plot(locs, [yloc]*len(locs),linestyle='', - marker=lines.TICKDOWN, **props) - axline, = ax.plot([xmin, xmax], [yloc, yloc], **props) - tickline.set_clip_on(False) - axline.set_clip_on(False) - for loc in locs: - ax.text(loc, yloc-offset, '%1.1f'%loc, - horizontalalignment='center', - verticalalignment='top') - -def make_yaxis(ax, xloc=0, offset=0.05, **props): - ymin, ymax = ax.get_ylim() - locs = [loc for loc in ax.yaxis.get_majorticklocs() - if loc>=ymin and loc<=ymax] - tickline, = ax.plot([xloc]*len(locs), locs, linestyle='', - marker=lines.TICKLEFT, **props) - axline, = ax.plot([xloc, xloc], [ymin, ymax], **props) - tickline.set_clip_on(False) - axline.set_clip_on(False) - - for loc in locs: - ax.text(xloc-offset, loc, '%1.1f'%loc, - verticalalignment='center', - horizontalalignment='right') - - -props = dict(color='black', linewidth=2, markeredgewidth=2) -x = np.arange(200.) -y = np.sin(2*np.pi*x/200.) + np.random.rand(200)-0.5 -fig = figure(facecolor='white') -ax = fig.add_subplot(111, frame_on=False) -ax.axison = False -ax.plot(x, y, 'd', markersize=8, markerfacecolor='blue') -ax.set_xlim(0, 200) -ax.set_ylim(-1.5, 1.5) -make_xaxis(ax, 0, offset=0.1, **props) -make_yaxis(ax, 0, offset=5, **props) - -show() diff --git a/dev/mpl_examples/pylab_examples/marker_path.hires.png b/dev/mpl_examples/pylab_examples/marker_path.hires.png deleted file mode 100644 index 62f11f90538..00000000000 Binary files a/dev/mpl_examples/pylab_examples/marker_path.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/marker_path.pdf b/dev/mpl_examples/pylab_examples/marker_path.pdf deleted file mode 100644 index 24157c0cdd9..00000000000 Binary files a/dev/mpl_examples/pylab_examples/marker_path.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/marker_path.png b/dev/mpl_examples/pylab_examples/marker_path.png deleted file mode 100644 index 77d5c96870e..00000000000 Binary files a/dev/mpl_examples/pylab_examples/marker_path.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/marker_path.py b/dev/mpl_examples/pylab_examples/marker_path.py deleted file mode 100644 index ac18d133513..00000000000 --- a/dev/mpl_examples/pylab_examples/marker_path.py +++ /dev/null @@ -1,16 +0,0 @@ -import matplotlib.pyplot as plt -import matplotlib.path as mpath -import numpy as np - - -star = mpath.Path.unit_regular_star(6) -circle = mpath.Path.unit_circle() -# concatenate the circle with an internal cutout of the star -verts = np.concatenate([circle.vertices, star.vertices[::-1, ...]]) -codes = np.concatenate([circle.codes, star.codes]) -cut_star = mpath.Path(verts, codes) - - -plt.plot(np.arange(10)**2, '--r', marker=cut_star, markersize=15) - -plt.show() diff --git a/dev/mpl_examples/pylab_examples/masked_demo.hires.png b/dev/mpl_examples/pylab_examples/masked_demo.hires.png deleted file mode 100644 index 3a18579d316..00000000000 Binary files a/dev/mpl_examples/pylab_examples/masked_demo.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/masked_demo.pdf b/dev/mpl_examples/pylab_examples/masked_demo.pdf deleted file mode 100644 index f06855494e6..00000000000 Binary files a/dev/mpl_examples/pylab_examples/masked_demo.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/masked_demo.png b/dev/mpl_examples/pylab_examples/masked_demo.png deleted file mode 100644 index c5229cc31b8..00000000000 Binary files a/dev/mpl_examples/pylab_examples/masked_demo.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/masked_demo.py b/dev/mpl_examples/pylab_examples/masked_demo.py deleted file mode 100644 index 66dda5a5082..00000000000 --- a/dev/mpl_examples/pylab_examples/masked_demo.py +++ /dev/null @@ -1,26 +0,0 @@ -#!/usr/bin/env python -''' -Plot lines with points masked out. - -This would typically be used with gappy data, to -break the line at the data gaps. -''' - -from pylab import * - -x = ma.arange(0, 2*pi, 0.02) -y = ma.sin(x) -y1 = sin(2*x) -y2 = sin(3*x) -ym1 = ma.masked_where(y1 > 0.5, y1) -ym2 = ma.masked_where(y2 < -0.5, y2) - -lines = plot(x, y, 'r', x, ym1, 'g', x, ym2, 'bo') -setp(lines[0], linewidth = 4) -setp(lines[1], linewidth = 2) -setp(lines[2], markersize = 10) - -legend( ('No mask', 'Masked if > 0.5', 'Masked if < -0.5') , - loc = 'upper right') -title('Masked line demo') -show() diff --git a/dev/mpl_examples/pylab_examples/mathtext_demo.hires.png b/dev/mpl_examples/pylab_examples/mathtext_demo.hires.png deleted file mode 100644 index 705a6961db1..00000000000 Binary files a/dev/mpl_examples/pylab_examples/mathtext_demo.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/mathtext_demo.pdf b/dev/mpl_examples/pylab_examples/mathtext_demo.pdf deleted file mode 100644 index 9a43bfaf624..00000000000 Binary files a/dev/mpl_examples/pylab_examples/mathtext_demo.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/mathtext_demo.png b/dev/mpl_examples/pylab_examples/mathtext_demo.png deleted file mode 100644 index 6cc4ea3bf2a..00000000000 Binary files a/dev/mpl_examples/pylab_examples/mathtext_demo.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/mathtext_demo.py b/dev/mpl_examples/pylab_examples/mathtext_demo.py deleted file mode 100644 index 232e5df1fc7..00000000000 --- a/dev/mpl_examples/pylab_examples/mathtext_demo.py +++ /dev/null @@ -1,29 +0,0 @@ -#!/usr/bin/env python -""" -Use matplotlib's internal LaTeX parser and layout engine. For true -latex rendering, see the text.usetex option -""" -import numpy as np -from matplotlib.pyplot import figure, show - -fig = figure() -fig.subplots_adjust(bottom=0.2) - -ax = fig.add_subplot(111, axisbg='y') -ax.plot([1,2,3], 'r') -x = np.arange(0.0, 3.0, 0.1) - -ax.grid(True) -ax.set_xlabel(r'$\Delta_i^j$', fontsize=20) -ax.set_ylabel(r'$\Delta_{i+1}^j$', fontsize=20) -tex = r'$\mathcal{R}\prod_{i=\alpha_{i+1}}^\infty a_i\sin(2 \pi f x_i)$' - -ax.text(1, 1.6, tex, fontsize=20, va='bottom') - -ax.legend([r"$\sqrt{x^2}$"]) - -ax.set_title(r'$\Delta_i^j \hspace{0.4} \mathrm{versus} \hspace{0.4} \Delta_{i+1}^j$', fontsize=20) - - -show() - diff --git a/dev/mpl_examples/pylab_examples/mathtext_examples.hires.png b/dev/mpl_examples/pylab_examples/mathtext_examples.hires.png deleted file mode 100644 index 6ea0c5a07eb..00000000000 Binary files a/dev/mpl_examples/pylab_examples/mathtext_examples.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/mathtext_examples.pdf b/dev/mpl_examples/pylab_examples/mathtext_examples.pdf deleted file mode 100644 index d02bbf6f5fe..00000000000 Binary files a/dev/mpl_examples/pylab_examples/mathtext_examples.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/mathtext_examples.png b/dev/mpl_examples/pylab_examples/mathtext_examples.png deleted file mode 100644 index f04f2c8486f..00000000000 Binary files a/dev/mpl_examples/pylab_examples/mathtext_examples.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/mathtext_examples.py b/dev/mpl_examples/pylab_examples/mathtext_examples.py deleted file mode 100644 index d71c47fb50b..00000000000 --- a/dev/mpl_examples/pylab_examples/mathtext_examples.py +++ /dev/null @@ -1,96 +0,0 @@ -#!/usr/bin/env python - -from __future__ import print_function - -import os, sys, re - -import gc - -stests = [ - r'$a+b+\dots+\dot{s}+\ldots$', - r'$x \doteq y$', - r'\$100.00 $\alpha \_$', - r'$\frac{\$100.00}{y}$', - r'$x y$', - r'$x+y\ x=y\ x 0xffff: -# stests.append(ur'$\mathrm{\ue0f2 \U0001D538}$') - - -from pylab import * - -def doall(): - tests = stests - - figure(figsize=(8, (len(tests) * 1) + 2)) - plot([0, 0], 'r') - grid(False) - axis([0, 3, -len(tests), 0]) - yticks(arange(len(tests)) * -1) - for i, s in enumerate(tests): - print (i, s) - text(0.1, -i, s, fontsize=20) - - #savefig('mathtext_examples') - #close('all') - show() - -if '--latex' in sys.argv: - fd = open("mathtext_examples.ltx", "w") - fd.write("\\documentclass{article}\n") - fd.write("\\begin{document}\n") - fd.write("\\begin{enumerate}\n") - - for i, s in enumerate(stests): - s = re.sub(r"(? 0: - a.set_xticklabels([]) - # Make some fake data with a range that varies - # somewhat from one plot to the next. - data =((1+i+j)/10.0)*rand(10,20)*1e-6 - dd = ravel(data) - # Manually find the min and max of all colors for - # use in setting the color scale. - vmin = min(vmin, amin(dd)) - vmax = max(vmax, amax(dd)) - images.append(a.imshow(data, cmap=cmap)) - - ax.append(a) - -# Set the first image as the master, with all the others -# observing it for changes in cmap or norm. - -class ImageFollower: - 'update image in response to changes in clim or cmap on another image' - def __init__(self, follower): - self.follower = follower - def __call__(self, leader): - self.follower.set_cmap(leader.get_cmap()) - self.follower.set_clim(leader.get_clim()) - -norm = colors.Normalize(vmin=vmin, vmax=vmax) -for i, im in enumerate(images): - im.set_norm(norm) - if i > 0: - images[0].callbacksSM.connect('changed', ImageFollower(im)) - -# The colorbar is also based on this master image. -fig.colorbar(images[0], cax, orientation='horizontal') - -# We need the following only if we want to run this interactively and -# modify the colormap: - -axes(ax[0]) # Return the current axes to the first one, -sci(images[0]) # because the current image must be in current axes. - -show() - - - - - - diff --git a/dev/mpl_examples/pylab_examples/multicolored_line.py b/dev/mpl_examples/pylab_examples/multicolored_line.py deleted file mode 100644 index 85f7a40923d..00000000000 --- a/dev/mpl_examples/pylab_examples/multicolored_line.py +++ /dev/null @@ -1,53 +0,0 @@ -#!/usr/bin/env python -''' -Color parts of a line based on its properties, e.g., slope. -''' -import numpy as np -import matplotlib.pyplot as plt -from matplotlib.collections import LineCollection -from matplotlib.colors import ListedColormap, BoundaryNorm - -x = np.linspace(0, 3 * np.pi, 500) -y = np.sin(x) -z = np.cos(0.5 * (x[:-1] + x[1:])) # first derivative - -# Create a colormap for red, green and blue and a norm to color -# f' < -0.5 red, f' > 0.5 blue, and the rest green -cmap = ListedColormap(['r', 'g', 'b']) -norm = BoundaryNorm([-1, -0.5, 0.5, 1], cmap.N) - -# Create a set of line segments so that we can color them individually -# This creates the points as a N x 1 x 2 array so that we can stack points -# together easily to get the segments. The segments array for line collection -# needs to be numlines x points per line x 2 (x and y) -points = np.array([x, y]).T.reshape(-1, 1, 2) -segments = np.concatenate([points[:-1], points[1:]], axis=1) - -# Create the line collection object, setting the colormapping parameters. -# Have to set the actual values used for colormapping separately. -lc = LineCollection(segments, cmap=cmap, norm=norm) -lc.set_array(z) -lc.set_linewidth(3) - -fig1 = plt.figure() -plt.gca().add_collection(lc) -plt.xlim(x.min(), x.max()) -plt.ylim(-1.1, 1.1) - -# Now do a second plot coloring the curve using a continuous colormap -t = np.linspace(0, 10, 200) -x = np.cos(np.pi * t) -y = np.sin(t) -points = np.array([x, y]).T.reshape(-1, 1, 2) -segments = np.concatenate([points[:-1], points[1:]], axis=1) - -lc = LineCollection(segments, cmap=plt.get_cmap('copper'), - norm=plt.Normalize(0, 10)) -lc.set_array(t) -lc.set_linewidth(3) - -fig2 = plt.figure() -plt.gca().add_collection(lc) -plt.xlim(-1, 1) -plt.ylim(-1, 1) -plt.show() diff --git a/dev/mpl_examples/pylab_examples/multicolored_line_00.hires.png b/dev/mpl_examples/pylab_examples/multicolored_line_00.hires.png deleted file mode 100644 index fd224dc6e79..00000000000 Binary files a/dev/mpl_examples/pylab_examples/multicolored_line_00.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/multicolored_line_00.pdf b/dev/mpl_examples/pylab_examples/multicolored_line_00.pdf deleted file mode 100644 index 22657ff5ef4..00000000000 Binary files a/dev/mpl_examples/pylab_examples/multicolored_line_00.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/multicolored_line_00.png b/dev/mpl_examples/pylab_examples/multicolored_line_00.png deleted file mode 100644 index 6603e33e39f..00000000000 Binary files a/dev/mpl_examples/pylab_examples/multicolored_line_00.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/multicolored_line_01.hires.png b/dev/mpl_examples/pylab_examples/multicolored_line_01.hires.png deleted file mode 100644 index c33f20e50ff..00000000000 Binary files a/dev/mpl_examples/pylab_examples/multicolored_line_01.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/multicolored_line_01.pdf b/dev/mpl_examples/pylab_examples/multicolored_line_01.pdf deleted file mode 100644 index bf3bbbb9847..00000000000 Binary files a/dev/mpl_examples/pylab_examples/multicolored_line_01.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/multicolored_line_01.png b/dev/mpl_examples/pylab_examples/multicolored_line_01.png deleted file mode 100644 index bc31d90ec42..00000000000 Binary files a/dev/mpl_examples/pylab_examples/multicolored_line_01.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/multiline.hires.png b/dev/mpl_examples/pylab_examples/multiline.hires.png deleted file mode 100644 index f416c28df8e..00000000000 Binary files a/dev/mpl_examples/pylab_examples/multiline.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/multiline.pdf b/dev/mpl_examples/pylab_examples/multiline.pdf deleted file mode 100644 index ef13f2a7e8b..00000000000 Binary files a/dev/mpl_examples/pylab_examples/multiline.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/multiline.png b/dev/mpl_examples/pylab_examples/multiline.png deleted file mode 100644 index 8924a722032..00000000000 Binary files a/dev/mpl_examples/pylab_examples/multiline.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/multiline.py b/dev/mpl_examples/pylab_examples/multiline.py deleted file mode 100644 index f5e62e8dd5d..00000000000 --- a/dev/mpl_examples/pylab_examples/multiline.py +++ /dev/null @@ -1,46 +0,0 @@ -#!/usr/bin/env python -from pylab import * -#from matplotlib.pyplot import * -#from numpy import arange - -if 1: - figure(figsize=(7, 4)) - ax = subplot(121) - ax.set_aspect(1) - plot(arange(10)) - xlabel('this is a xlabel\n(with newlines!)') - ylabel('this is vertical\ntest', multialignment='center') - #ylabel('this is another!') - text(2, 7,'this is\nyet another test', - rotation=45, - horizontalalignment = 'center', - verticalalignment = 'top', - multialignment = 'center') - - grid(True) - - - - subplot(122) - - text(0.29, 0.7, "Mat\nTTp\n123", size=18, - va="baseline", ha="right", multialignment="left", - bbox=dict(fc="none")) - - text(0.34, 0.7, "Mag\nTTT\n123", size=18, - va="baseline", ha="left", multialignment="left", - bbox=dict(fc="none")) - - text(0.95, 0.7, "Mag\nTTT$^{A^A}$\n123", size=18, - va="baseline", ha="right", multialignment="left", - bbox=dict(fc="none")) - - xticks([0.2, 0.4, 0.6, 0.8, 1.], - ["Jan\n2009","Feb\n2009","Mar\n2009", "Apr\n2009", "May\n2009"]) - - axhline(0.7) - title("test line spacing for multiline text") - -subplots_adjust(bottom=0.25, top=0.8) -draw() -show() diff --git a/dev/mpl_examples/pylab_examples/multipage_pdf.py b/dev/mpl_examples/pylab_examples/multipage_pdf.py deleted file mode 100644 index 9f385da877c..00000000000 --- a/dev/mpl_examples/pylab_examples/multipage_pdf.py +++ /dev/null @@ -1,43 +0,0 @@ -# This is a demo of creating a pdf file with several pages. - -import datetime -import numpy as np -import matplotlib -from matplotlib.backends.backend_pdf import PdfPages -from pylab import * - -# Create the PdfPages object to which we will save the pages: -pdf = PdfPages('multipage_pdf.pdf') - -figure(figsize=(3,3)) -plot(range(7), [3,1,4,1,5,9,2], 'r-o') -title('Page One') -savefig(pdf, format='pdf') # note the format='pdf' argument! -close() - -rc('text', usetex=True) -figure(figsize=(8,6)) -x = np.arange(0,5,0.1) -plot(x, np.sin(x), 'b-') -title('Page Two') -pdf.savefig() # here's another way - or you could do pdf.savefig(1) -close() - -rc('text', usetex=False) -fig=figure(figsize=(4,5)) -plot(x, x*x, 'ko') -title('Page Three') -pdf.savefig(fig) # or you can pass a Figure object to pdf.savefig -close() - -# We can also set the file's metadata via the PdfPages object: -d = pdf.infodict() -d['Title'] = 'Multipage PDF Example' -d['Author'] = u'Jouni K. Sepp\xe4nen' -d['Subject'] = 'How to create a multipage pdf file and set its metadata' -d['Keywords'] = 'PdfPages multipage keywords author title subject' -d['CreationDate'] = datetime.datetime(2009,11,13) -d['ModDate'] = datetime.datetime.today() - -# Remember to close the object - otherwise the file will not be usable -pdf.close() diff --git a/dev/mpl_examples/pylab_examples/multiple_figs_demo.py b/dev/mpl_examples/pylab_examples/multiple_figs_demo.py deleted file mode 100644 index ebd288021a5..00000000000 --- a/dev/mpl_examples/pylab_examples/multiple_figs_demo.py +++ /dev/null @@ -1,29 +0,0 @@ -#!/usr/bin/env python -# Working with multiple figure windows and subplots -from pylab import * - -t = arange(0.0, 2.0, 0.01) -s1 = sin(2*pi*t) -s2 = sin(4*pi*t) - -figure(1) -subplot(211) -plot(t,s1) -subplot(212) -plot(t,2*s1) - -figure(2) -plot(t,s2) - -# now switch back to figure 1 and make some changes -figure(1) -subplot(211) -plot(t,s2, 'gs') -setp(gca(), 'xticklabels', []) - -figure(1) -savefig('fig1') -figure(2) -savefig('fig2') - -show() diff --git a/dev/mpl_examples/pylab_examples/multiple_figs_demo_00.hires.png b/dev/mpl_examples/pylab_examples/multiple_figs_demo_00.hires.png deleted file mode 100644 index 9749e64a957..00000000000 Binary files a/dev/mpl_examples/pylab_examples/multiple_figs_demo_00.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/multiple_figs_demo_00.pdf b/dev/mpl_examples/pylab_examples/multiple_figs_demo_00.pdf deleted file mode 100644 index 56b955af2db..00000000000 Binary files a/dev/mpl_examples/pylab_examples/multiple_figs_demo_00.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/multiple_figs_demo_00.png b/dev/mpl_examples/pylab_examples/multiple_figs_demo_00.png deleted file mode 100644 index 4e2d241e76b..00000000000 Binary files a/dev/mpl_examples/pylab_examples/multiple_figs_demo_00.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/multiple_figs_demo_01.hires.png b/dev/mpl_examples/pylab_examples/multiple_figs_demo_01.hires.png deleted file mode 100644 index 4023e8dfc98..00000000000 Binary files a/dev/mpl_examples/pylab_examples/multiple_figs_demo_01.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/multiple_figs_demo_01.pdf b/dev/mpl_examples/pylab_examples/multiple_figs_demo_01.pdf deleted file mode 100644 index 51449fada12..00000000000 Binary files a/dev/mpl_examples/pylab_examples/multiple_figs_demo_01.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/multiple_figs_demo_01.png b/dev/mpl_examples/pylab_examples/multiple_figs_demo_01.png deleted file mode 100644 index fbe6fcdf78c..00000000000 Binary files a/dev/mpl_examples/pylab_examples/multiple_figs_demo_01.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/multiple_yaxis_with_spines.hires.png b/dev/mpl_examples/pylab_examples/multiple_yaxis_with_spines.hires.png deleted file mode 100644 index 885e7d7f534..00000000000 Binary files a/dev/mpl_examples/pylab_examples/multiple_yaxis_with_spines.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/multiple_yaxis_with_spines.pdf b/dev/mpl_examples/pylab_examples/multiple_yaxis_with_spines.pdf deleted file mode 100644 index 8f536b5777e..00000000000 Binary files a/dev/mpl_examples/pylab_examples/multiple_yaxis_with_spines.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/multiple_yaxis_with_spines.png b/dev/mpl_examples/pylab_examples/multiple_yaxis_with_spines.png deleted file mode 100644 index 4cc6811d63f..00000000000 Binary files a/dev/mpl_examples/pylab_examples/multiple_yaxis_with_spines.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/multiple_yaxis_with_spines.py b/dev/mpl_examples/pylab_examples/multiple_yaxis_with_spines.py deleted file mode 100644 index a0051246b20..00000000000 --- a/dev/mpl_examples/pylab_examples/multiple_yaxis_with_spines.py +++ /dev/null @@ -1,54 +0,0 @@ -import matplotlib.pyplot as plt - -def make_patch_spines_invisible(ax): - ax.set_frame_on(True) - ax.patch.set_visible(False) - for sp in ax.spines.itervalues(): - sp.set_visible(False) - -fig = plt.figure() -fig.subplots_adjust(right=0.75) - -host = fig.add_subplot(111) -par1 = host.twinx() -par2 = host.twinx() - -# Offset the right spine of par2. The ticks and label have already been -# placed on the right by twinx above. -par2.spines["right"].set_position(("axes", 1.2)) -# Having been created by twinx, par2 has its frame off, so the line of its -# detached spine is invisible. First, activate the frame but make the patch -# and spines invisible. -make_patch_spines_invisible(par2) -# Second, show the right spine. -par2.spines["right"].set_visible(True) - -p1, = host.plot([0, 1, 2], [0, 1, 2], "b-", label="Density") -p2, = par1.plot([0, 1, 2], [0, 3, 2], "r-", label="Temperature") -p3, = par2.plot([0, 1, 2], [50, 30, 15], "g-", label="Velocity") - -host.set_xlim(0, 2) -host.set_ylim(0, 2) -par1.set_ylim(0, 4) -par2.set_ylim(1, 65) - -host.set_xlabel("Distance") -host.set_ylabel("Density") -par1.set_ylabel("Temperature") -par2.set_ylabel("Velocity") - -host.yaxis.label.set_color(p1.get_color()) -par1.yaxis.label.set_color(p2.get_color()) -par2.yaxis.label.set_color(p3.get_color()) - -tkw = dict(size=4, width=1.5) -host.tick_params(axis='y', colors=p1.get_color(), **tkw) -par1.tick_params(axis='y', colors=p2.get_color(), **tkw) -par2.tick_params(axis='y', colors=p3.get_color(), **tkw) -host.tick_params(axis='x', **tkw) - -lines = [p1, p2, p3] - -host.legend(lines, [l.get_label() for l in lines]) - -plt.show() diff --git a/dev/mpl_examples/pylab_examples/nan_test.hires.png b/dev/mpl_examples/pylab_examples/nan_test.hires.png deleted file mode 100644 index 85074f080df..00000000000 Binary files a/dev/mpl_examples/pylab_examples/nan_test.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/nan_test.pdf b/dev/mpl_examples/pylab_examples/nan_test.pdf deleted file mode 100644 index cad00a65b7a..00000000000 Binary files a/dev/mpl_examples/pylab_examples/nan_test.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/nan_test.png b/dev/mpl_examples/pylab_examples/nan_test.png deleted file mode 100644 index 983061c8096..00000000000 Binary files a/dev/mpl_examples/pylab_examples/nan_test.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/nan_test.py b/dev/mpl_examples/pylab_examples/nan_test.py deleted file mode 100644 index cc5c0bf90bb..00000000000 --- a/dev/mpl_examples/pylab_examples/nan_test.py +++ /dev/null @@ -1,31 +0,0 @@ -#!/usr/bin/env python -""" -Example: simple line plots with NaNs inserted. -""" -from pylab import * -import numpy as np - -t = arange(0.0, 1.0+0.01, 0.01) -s = cos(2*2*pi*t) -t[41:60] = NaN -#t[50:60] = np.inf - -subplot(2,1,1) -plot(t, s, '-', lw=2) - -xlabel('time (s)') -ylabel('voltage (mV)') -title('A sine wave with a gap of NaNs between 0.4 and 0.6') -grid(True) - -subplot(2,1,2) -t[0] = NaN -t[-1] = NaN -plot(t, s, '-', lw=2) -title('Also with NaN in first and last point') - -xlabel('time (s)') -ylabel('more nans') -grid(True) - -show() diff --git a/dev/mpl_examples/pylab_examples/newscalarformatter_demo.py b/dev/mpl_examples/pylab_examples/newscalarformatter_demo.py deleted file mode 100644 index e2d0209b166..00000000000 --- a/dev/mpl_examples/pylab_examples/newscalarformatter_demo.py +++ /dev/null @@ -1,88 +0,0 @@ -#!/usr/bin/env python -# Demonstrating the improvements and options of the proposed new ScalarFormatter -from pylab import * -from matplotlib.ticker import OldScalarFormatter - -x=frange(0,1,.01) -f=figure(figsize=(6,6)) -f.text(0.5,0.975,'The old formatter',horizontalalignment='center',verticalalignment='top') -subplot(221) -plot(x*1e5+1e10,x*1e-10+1e-5) -gca().xaxis.set_major_formatter(OldScalarFormatter()) -gca().yaxis.set_major_formatter(OldScalarFormatter()) -subplot(222) -plot(x*1e5,x*1e-4) -gca().xaxis.set_major_formatter(OldScalarFormatter()) -gca().yaxis.set_major_formatter(OldScalarFormatter()) -subplot(223) -plot(-x*1e5-1e10,-x*1e-5-1e-10) -gca().xaxis.set_major_formatter(OldScalarFormatter()) -gca().yaxis.set_major_formatter(OldScalarFormatter()) -subplot(224) -plot(-x*1e5,-x*1e-4) -gca().xaxis.set_major_formatter(OldScalarFormatter()) -gca().yaxis.set_major_formatter(OldScalarFormatter()) - -x=frange(0,1,.01) -f=figure(figsize=(6,6)) -f.text(0.5,0.975,'The new formatter, default settings',horizontalalignment='center', - verticalalignment='top') -subplot(221) -plot(x*1e5+1e10,x*1e-10+1e-5) -gca().xaxis.set_major_formatter(ScalarFormatter()) -gca().yaxis.set_major_formatter(ScalarFormatter()) -subplot(222) -plot(x*1e5,x*1e-4) -gca().xaxis.set_major_formatter(ScalarFormatter()) -gca().yaxis.set_major_formatter(ScalarFormatter()) -subplot(223) -plot(-x*1e5-1e10,-x*1e-5-1e-10) -gca().xaxis.set_major_formatter(ScalarFormatter()) -gca().yaxis.set_major_formatter(ScalarFormatter()) -subplot(224) -plot(-x*1e5,-x*1e-4) -gca().xaxis.set_major_formatter(ScalarFormatter()) -gca().yaxis.set_major_formatter(ScalarFormatter()) - -x=frange(0,1,.01) -f=figure(figsize=(6,6)) -f.text(0.5,0.975,'The new formatter, no numerical offset',horizontalalignment='center', - verticalalignment='top') -subplot(221) -plot(x*1e5+1e10,x*1e-10+1e-5) -gca().xaxis.set_major_formatter(ScalarFormatter(useOffset=False)) -gca().yaxis.set_major_formatter(ScalarFormatter(useOffset=False)) -subplot(222) -plot(x*1e5,x*1e-4) -gca().xaxis.set_major_formatter(ScalarFormatter(useOffset=False)) -gca().yaxis.set_major_formatter(ScalarFormatter(useOffset=False)) -subplot(223) -plot(-x*1e5-1e10,-x*1e-5-1e-10) -gca().xaxis.set_major_formatter(ScalarFormatter(useOffset=False)) -gca().yaxis.set_major_formatter(ScalarFormatter(useOffset=False)) -subplot(224) -plot(-x*1e5,-x*1e-4) -gca().xaxis.set_major_formatter(ScalarFormatter(useOffset=False)) -gca().yaxis.set_major_formatter(ScalarFormatter(useOffset=False)) - -x=frange(0,1,.01) -f=figure(figsize=(6,6)) -f.text(0.5,0.975,'The new formatter, with mathtext',horizontalalignment='center', - verticalalignment='top') -subplot(221) -plot(x*1e5+1e10,x*1e-10+1e-5) -gca().xaxis.set_major_formatter(ScalarFormatter(useMathText=True)) -gca().yaxis.set_major_formatter(ScalarFormatter(useMathText=True)) -subplot(222) -plot(x*1e5,x*1e-4) -gca().xaxis.set_major_formatter(ScalarFormatter(useMathText=True)) -gca().yaxis.set_major_formatter(ScalarFormatter(useMathText=True)) -subplot(223) -plot(-x*1e5-1e10,-x*1e-5-1e-10) -gca().xaxis.set_major_formatter(ScalarFormatter(useMathText=True)) -gca().yaxis.set_major_formatter(ScalarFormatter(useMathText=True)) -subplot(224) -plot(-x*1e5,-x*1e-4) -gca().xaxis.set_major_formatter(ScalarFormatter(useMathText=True)) -gca().yaxis.set_major_formatter(ScalarFormatter(useMathText=True)) -show() diff --git a/dev/mpl_examples/pylab_examples/newscalarformatter_demo_00.hires.png b/dev/mpl_examples/pylab_examples/newscalarformatter_demo_00.hires.png deleted file mode 100644 index c7aa54b6ffd..00000000000 Binary files a/dev/mpl_examples/pylab_examples/newscalarformatter_demo_00.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/newscalarformatter_demo_00.pdf b/dev/mpl_examples/pylab_examples/newscalarformatter_demo_00.pdf deleted file mode 100644 index 9a9269ca9a7..00000000000 Binary files a/dev/mpl_examples/pylab_examples/newscalarformatter_demo_00.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/newscalarformatter_demo_00.png b/dev/mpl_examples/pylab_examples/newscalarformatter_demo_00.png deleted file mode 100644 index 1837be4b971..00000000000 Binary files a/dev/mpl_examples/pylab_examples/newscalarformatter_demo_00.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/newscalarformatter_demo_01.hires.png b/dev/mpl_examples/pylab_examples/newscalarformatter_demo_01.hires.png deleted file mode 100644 index 15bc486d19a..00000000000 Binary files a/dev/mpl_examples/pylab_examples/newscalarformatter_demo_01.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/newscalarformatter_demo_01.pdf b/dev/mpl_examples/pylab_examples/newscalarformatter_demo_01.pdf deleted file mode 100644 index 21e41986150..00000000000 Binary files a/dev/mpl_examples/pylab_examples/newscalarformatter_demo_01.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/newscalarformatter_demo_01.png b/dev/mpl_examples/pylab_examples/newscalarformatter_demo_01.png deleted file mode 100644 index 3b22f9ba718..00000000000 Binary files a/dev/mpl_examples/pylab_examples/newscalarformatter_demo_01.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/newscalarformatter_demo_02.hires.png b/dev/mpl_examples/pylab_examples/newscalarformatter_demo_02.hires.png deleted file mode 100644 index 2f470c65712..00000000000 Binary files a/dev/mpl_examples/pylab_examples/newscalarformatter_demo_02.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/newscalarformatter_demo_02.pdf b/dev/mpl_examples/pylab_examples/newscalarformatter_demo_02.pdf deleted file mode 100644 index e038635b12e..00000000000 Binary files a/dev/mpl_examples/pylab_examples/newscalarformatter_demo_02.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/newscalarformatter_demo_02.png b/dev/mpl_examples/pylab_examples/newscalarformatter_demo_02.png deleted file mode 100644 index 6cd955be7b1..00000000000 Binary files a/dev/mpl_examples/pylab_examples/newscalarformatter_demo_02.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/newscalarformatter_demo_03.hires.png b/dev/mpl_examples/pylab_examples/newscalarformatter_demo_03.hires.png deleted file mode 100644 index 474cafc1818..00000000000 Binary files a/dev/mpl_examples/pylab_examples/newscalarformatter_demo_03.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/newscalarformatter_demo_03.pdf b/dev/mpl_examples/pylab_examples/newscalarformatter_demo_03.pdf deleted file mode 100644 index 05233e492bc..00000000000 Binary files a/dev/mpl_examples/pylab_examples/newscalarformatter_demo_03.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/newscalarformatter_demo_03.png b/dev/mpl_examples/pylab_examples/newscalarformatter_demo_03.png deleted file mode 100644 index 986c0bc2bf4..00000000000 Binary files a/dev/mpl_examples/pylab_examples/newscalarformatter_demo_03.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/patheffect_demo.hires.png b/dev/mpl_examples/pylab_examples/patheffect_demo.hires.png deleted file mode 100644 index 464ebe17c37..00000000000 Binary files a/dev/mpl_examples/pylab_examples/patheffect_demo.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/patheffect_demo.pdf b/dev/mpl_examples/pylab_examples/patheffect_demo.pdf deleted file mode 100644 index c9f1623109e..00000000000 Binary files a/dev/mpl_examples/pylab_examples/patheffect_demo.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/patheffect_demo.png b/dev/mpl_examples/pylab_examples/patheffect_demo.png deleted file mode 100644 index 1551774c439..00000000000 Binary files a/dev/mpl_examples/pylab_examples/patheffect_demo.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/patheffect_demo.py b/dev/mpl_examples/pylab_examples/patheffect_demo.py deleted file mode 100644 index 665b9dc8fcc..00000000000 --- a/dev/mpl_examples/pylab_examples/patheffect_demo.py +++ /dev/null @@ -1,37 +0,0 @@ -import matplotlib.pyplot as plt -import matplotlib.patheffects as PathEffects -import numpy as np - -if 1: - plt.figure(1, figsize=(8,3)) - ax1 = plt.subplot(131) - ax1.imshow([[1,2],[2,3]]) - txt = ax1.annotate("test", (1., 1.), (0., 0), - arrowprops=dict(arrowstyle="->", - connectionstyle="angle3", lw=2), - size=20, ha="center") - - txt.set_path_effects([PathEffects.withStroke(linewidth=3, - foreground="w")]) - txt.arrow_patch.set_path_effects([PathEffects.Stroke(linewidth=5, - foreground="w"), - PathEffects.Normal()]) - - ax2 = plt.subplot(132) - arr = np.arange(25).reshape((5,5)) - ax2.imshow(arr) - cntr = ax2.contour(arr, colors="k") - clbls = ax2.clabel(cntr, fmt="%2.0f", use_clabeltext=True) - plt.setp(clbls, - path_effects=[PathEffects.withStroke(linewidth=3, - foreground="w")]) - - - # shadow as a path effect - ax3 = plt.subplot(133) - p1, = ax3.plot([0, 1], [0, 1]) - leg = ax3.legend([p1], ["Line 1"], fancybox=True, loc=2) - leg.legendPatch.set_path_effects([PathEffects.withSimplePatchShadow()]) - - plt.show() - diff --git a/dev/mpl_examples/pylab_examples/pcolor_demo.hires.png b/dev/mpl_examples/pylab_examples/pcolor_demo.hires.png deleted file mode 100644 index 0482d9e442c..00000000000 Binary files a/dev/mpl_examples/pylab_examples/pcolor_demo.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/pcolor_demo.pdf b/dev/mpl_examples/pylab_examples/pcolor_demo.pdf deleted file mode 100644 index 2cf98e70e5b..00000000000 Binary files a/dev/mpl_examples/pylab_examples/pcolor_demo.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/pcolor_demo.png b/dev/mpl_examples/pylab_examples/pcolor_demo.png deleted file mode 100644 index 0eac9431af3..00000000000 Binary files a/dev/mpl_examples/pylab_examples/pcolor_demo.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/pcolor_demo.py b/dev/mpl_examples/pylab_examples/pcolor_demo.py deleted file mode 100644 index 4a1639c03c4..00000000000 --- a/dev/mpl_examples/pylab_examples/pcolor_demo.py +++ /dev/null @@ -1,57 +0,0 @@ -""" -Demonstrates similarities between pcolor, pcolormesh, imshow and pcolorfast -for drawing quadrilateral grids. - -""" -import matplotlib.pyplot as plt -import numpy as np - -# make these smaller to increase the resolution -dx, dy = 0.15, 0.05 - -# generate 2 2d grids for the x & y bounds -y, x = np.mgrid[slice(-3, 3 + dy, dy), - slice(-3, 3 + dx, dx)] -z = (1 - x / 2. + x ** 5 + y ** 3) * np.exp(-x ** 2 - y ** 2) -# x and y are bounds, so z should be the value *inside* those bounds. -# Therefore, remove the last value from the z array. -z = z[:-1, :-1] -z_min, z_max = -np.abs(z).max(), np.abs(z).max() - - - -plt.subplot(2, 2, 1) -plt.pcolor(x, y, z, cmap='RdBu', vmin=z_min, vmax=z_max) -plt.title('pcolor') -# set the limits of the plot to the limits of the data -plt.axis([x.min(), x.max(), y.min(), y.max()]) -plt.colorbar() - - - -plt.subplot(2, 2, 2) -plt.pcolormesh(x, y, z, cmap='RdBu', vmin=z_min, vmax=z_max) -plt.title('pcolormesh') -# set the limits of the plot to the limits of the data -plt.axis([x.min(), x.max(), y.min(), y.max()]) -plt.colorbar() - - - -plt.subplot(2, 2, 3) -plt.imshow(z, cmap='RdBu', vmin=z_min, vmax=z_max, - extent=[x.min(), x.max(), y.min(), y.max()], - interpolation='nearest', origin='lower') -plt.title('image (interp. nearest)') -plt.colorbar() - - - -ax = plt.subplot(2, 2, 4) -ax.pcolorfast(x, y, z, cmap='RdBu', vmin=z_min, vmax=z_max) -plt.title('pcolorfast') -plt.colorbar() - - - -plt.show() \ No newline at end of file diff --git a/dev/mpl_examples/pylab_examples/pcolor_demo2.hires.png b/dev/mpl_examples/pylab_examples/pcolor_demo2.hires.png deleted file mode 100644 index 544591dc532..00000000000 Binary files a/dev/mpl_examples/pylab_examples/pcolor_demo2.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/pcolor_demo2.pdf b/dev/mpl_examples/pylab_examples/pcolor_demo2.pdf deleted file mode 100644 index 66680cbab11..00000000000 Binary files a/dev/mpl_examples/pylab_examples/pcolor_demo2.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/pcolor_demo2.png b/dev/mpl_examples/pylab_examples/pcolor_demo2.png deleted file mode 100644 index e54f7e727fb..00000000000 Binary files a/dev/mpl_examples/pylab_examples/pcolor_demo2.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/pcolor_demo2.py b/dev/mpl_examples/pylab_examples/pcolor_demo2.py deleted file mode 100644 index f5ae2c9fa3e..00000000000 --- a/dev/mpl_examples/pylab_examples/pcolor_demo2.py +++ /dev/null @@ -1,31 +0,0 @@ -#!/usr/bin/env python -""" -See pcolor_demo2 for a much faster way of generating pcolor plots -""" -from __future__ import division -from pylab import * - -def func3(x,y): - return (1- x/2 + x**5 + y**3)*exp(-x**2-y**2) - - -# make these smaller to increase the resolution -dx, dy = 0.05, 0.05 - -x = arange(-3.0, 3.0, dx) -y = arange(-3.0, 3.0, dy) -X,Y = meshgrid(x, y) - -Z = func3(X, Y) - - -ax = subplot(111) -im = imshow(Z, cmap=cm.RdBu, vmax=abs(Z).max(), vmin=-abs(Z).max()) -#im.set_interpolation('nearest') -#im.set_interpolation('bicubic') -im.set_interpolation('bilinear') -#ax.set_image_extent(-3, 3, -3, 3) - -show() - - diff --git a/dev/mpl_examples/pylab_examples/pcolor_log.hires.png b/dev/mpl_examples/pylab_examples/pcolor_log.hires.png deleted file mode 100644 index 7e71f6e1423..00000000000 Binary files a/dev/mpl_examples/pylab_examples/pcolor_log.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/pcolor_log.pdf b/dev/mpl_examples/pylab_examples/pcolor_log.pdf deleted file mode 100644 index 000a3b67d68..00000000000 Binary files a/dev/mpl_examples/pylab_examples/pcolor_log.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/pcolor_log.png b/dev/mpl_examples/pylab_examples/pcolor_log.png deleted file mode 100644 index 2eba1802c2f..00000000000 Binary files a/dev/mpl_examples/pylab_examples/pcolor_log.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/pcolor_log.py b/dev/mpl_examples/pylab_examples/pcolor_log.py deleted file mode 100644 index 84f831bca17..00000000000 --- a/dev/mpl_examples/pylab_examples/pcolor_log.py +++ /dev/null @@ -1,25 +0,0 @@ -import matplotlib.pyplot as plt -from matplotlib.colors import LogNorm -import numpy as np -from matplotlib.mlab import bivariate_normal - - -N = 100 -X, Y = np.mgrid[-3:3:complex(0, N), -2:2:complex(0, N)] - -# A low hump with a spike coming out of the top right. -# Needs to have z/colour axis on a log scale so we see both hump and spike. -# linear scale only shows the spike. -Z1 = bivariate_normal(X, Y, 0.1, 0.2, 1.0, 1.0) + 0.1 * bivariate_normal(X, Y, 1.0, 1.0, 0.0, 0.0) - -plt.subplot(2,1,1) -plt.pcolor(X, Y, Z1, norm=LogNorm(vmin=Z1.min(), vmax=Z1.max()), cmap='PuBu_r') -plt.colorbar() - -plt.subplot(2,1,2) -plt.pcolor(X, Y, Z1, cmap='PuBu_r') -plt.colorbar() - - -plt.show() - diff --git a/dev/mpl_examples/pylab_examples/pcolor_small.hires.png b/dev/mpl_examples/pylab_examples/pcolor_small.hires.png deleted file mode 100644 index 8792d513569..00000000000 Binary files a/dev/mpl_examples/pylab_examples/pcolor_small.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/pcolor_small.pdf b/dev/mpl_examples/pylab_examples/pcolor_small.pdf deleted file mode 100644 index 5fc8fdec3a0..00000000000 Binary files a/dev/mpl_examples/pylab_examples/pcolor_small.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/pcolor_small.png b/dev/mpl_examples/pylab_examples/pcolor_small.png deleted file mode 100644 index 47a6773fe63..00000000000 Binary files a/dev/mpl_examples/pylab_examples/pcolor_small.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/pcolor_small.py b/dev/mpl_examples/pylab_examples/pcolor_small.py deleted file mode 100644 index 3ecd09d8aea..00000000000 --- a/dev/mpl_examples/pylab_examples/pcolor_small.py +++ /dev/null @@ -1,14 +0,0 @@ -import matplotlib.pyplot as plt -from numpy.random import rand - -Z = rand(6,10) - -plt.subplot(2,1,1) -c = plt.pcolor(Z) -plt.title('default: no edges') - -plt.subplot(2,1,2) -c = plt.pcolor(Z, edgecolors='k', linewidths=4) -plt.title('thick edges') - -plt.show() diff --git a/dev/mpl_examples/pylab_examples/pie_demo.hires.png b/dev/mpl_examples/pylab_examples/pie_demo.hires.png deleted file mode 100644 index 4005a19d30a..00000000000 Binary files a/dev/mpl_examples/pylab_examples/pie_demo.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/pie_demo.pdf b/dev/mpl_examples/pylab_examples/pie_demo.pdf deleted file mode 100644 index 655b0ffa101..00000000000 Binary files a/dev/mpl_examples/pylab_examples/pie_demo.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/pie_demo.png b/dev/mpl_examples/pylab_examples/pie_demo.png deleted file mode 100644 index 47ae40a337f..00000000000 Binary files a/dev/mpl_examples/pylab_examples/pie_demo.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/pie_demo.py b/dev/mpl_examples/pylab_examples/pie_demo.py deleted file mode 100644 index 0b0e9a3b8a7..00000000000 --- a/dev/mpl_examples/pylab_examples/pie_demo.py +++ /dev/null @@ -1,30 +0,0 @@ -""" -Make a pie chart - see -http://matplotlib.sf.net/matplotlib.pylab.html#-pie for the docstring. - -This example shows a basic pie chart with labels optional features, -like autolabeling the percentage, offsetting a slice with "explode", -adding a shadow, and changing the starting angle. - -""" -from pylab import * - -# make a square figure and axes -figure(1, figsize=(6,6)) -ax = axes([0.1, 0.1, 0.8, 0.8]) - -# The slices will be ordered and plotted counter-clockwise. -labels = 'Frogs', 'Hogs', 'Dogs', 'Logs' -fracs = [15, 30, 45, 10] -explode=(0, 0.05, 0, 0) - -pie(fracs, explode=explode, labels=labels, - autopct='%1.1f%%', shadow=True, startangle=90) - # The default startangle is 0, which would start - # the Frogs slice on the x-axis. With startangle=90, - # everything is rotated counter-clockwise by 90 degrees, - # so the plotting starts on the positive y-axis. - -title('Raining Hogs and Dogs', bbox={'facecolor':'0.8', 'pad':5}) - -show() diff --git a/dev/mpl_examples/pylab_examples/pie_demo2.hires.png b/dev/mpl_examples/pylab_examples/pie_demo2.hires.png deleted file mode 100644 index e2be51e4706..00000000000 Binary files a/dev/mpl_examples/pylab_examples/pie_demo2.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/pie_demo2.pdf b/dev/mpl_examples/pylab_examples/pie_demo2.pdf deleted file mode 100644 index 3d4a08051f3..00000000000 Binary files a/dev/mpl_examples/pylab_examples/pie_demo2.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/pie_demo2.png b/dev/mpl_examples/pylab_examples/pie_demo2.png deleted file mode 100644 index 61d32dc277f..00000000000 Binary files a/dev/mpl_examples/pylab_examples/pie_demo2.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/pie_demo2.py b/dev/mpl_examples/pylab_examples/pie_demo2.py deleted file mode 100644 index c3cd16fcb37..00000000000 --- a/dev/mpl_examples/pylab_examples/pie_demo2.py +++ /dev/null @@ -1,58 +0,0 @@ -""" -Make a pie charts of varying size - see -http://matplotlib.org/api/pyplot_api.html#matplotlib.pyplot.pie for the docstring. - -This example shows a basic pie charts with labels optional features, -like autolabeling the percentage, offsetting a slice with "explode" -and adding a shadow, in different sizes. - -""" -import matplotlib.pyplot as plt -from matplotlib.gridspec import GridSpec - -# Some data - -labels = 'Frogs', 'Hogs', 'Dogs', 'Logs' -fracs = [15, 30, 45, 10] - -explode=(0, 0.05, 0, 0) - -# Make square figures and axes - -the_grid = GridSpec(2, 2) - -plt.subplot(the_grid[0, 0], aspect=1) - -plt.pie(fracs, labels=labels, autopct='%1.1f%%', shadow=True) - -plt.subplot(the_grid[0, 1], aspect=1) - -plt.pie(fracs, explode=explode, labels=labels, autopct='%.0f%%', shadow=True) - -plt.subplot(the_grid[1, 0], aspect=1) - -patches, texts, autotexts = plt.pie(fracs, labels=labels, - autopct='%.0f%%', - shadow=True, radius=0.5) - -# Make the labels on the small plot easier to read. -for t in texts: - t.set_size('smaller') -for t in autotexts: - t.set_size('x-small') -autotexts[0].set_color('y') - -plt.subplot(the_grid[1, 1], aspect=1) - -patches, texts, autotexts = plt.pie(fracs, explode=explode, - labels=labels, autopct='%.0f%%', - shadow=False, radius=0.5) - # Turn off shadow for tiny plot - # with exploded slice. -for t in texts: - t.set_size('smaller') -for t in autotexts: - t.set_size('x-small') -autotexts[0].set_color('y') - -plt.show() diff --git a/dev/mpl_examples/pylab_examples/plotfile_demo.py b/dev/mpl_examples/pylab_examples/plotfile_demo.py deleted file mode 100644 index 04b94665c16..00000000000 --- a/dev/mpl_examples/pylab_examples/plotfile_demo.py +++ /dev/null @@ -1,37 +0,0 @@ -from pylab import plotfile, show, gca -import matplotlib.cbook as cbook - -fname = cbook.get_sample_data('msft.csv', asfileobj=False) -fname2 = cbook.get_sample_data('data_x_x2_x3.csv', asfileobj=False) - -# test 1; use ints -plotfile(fname, (0,5,6)) - -# test 2; use names -plotfile(fname, ('date', 'volume', 'adj_close')) - -# test 3; use semilogy for volume -plotfile(fname, ('date', 'volume', 'adj_close'), plotfuncs={'volume': 'semilogy'}) - -# test 4; use semilogy for volume -plotfile(fname, (0,5,6), plotfuncs={5:'semilogy'}) - -#test 5; single subplot -plotfile(fname, ('date', 'open', 'high', 'low', 'close'), subplots=False) - -# test 6; labeling, if no names in csv-file -plotfile(fname2, cols=(0,1,2), delimiter=' ', - names=['$x$', '$f(x)=x^2$', '$f(x)=x^3$']) - -# test 7; more than one file per figure--illustrated here with a single file -plotfile(fname2, cols=(0, 1), delimiter=' ') -plotfile(fname2, cols=(0, 2), newfig=False, delimiter=' ') # use current figure -gca().set_xlabel(r'$x$') -gca().set_ylabel(r'$f(x) = x^2, x^3$') - -# test 8; use bar for volume -plotfile(fname, (0,5,6), plotfuncs={5:'bar'}) - -show() - - diff --git a/dev/mpl_examples/pylab_examples/plotfile_demo_00.hires.png b/dev/mpl_examples/pylab_examples/plotfile_demo_00.hires.png deleted file mode 100644 index 02faff34bf5..00000000000 Binary files a/dev/mpl_examples/pylab_examples/plotfile_demo_00.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/plotfile_demo_00.pdf b/dev/mpl_examples/pylab_examples/plotfile_demo_00.pdf deleted file mode 100644 index 9df120bed5a..00000000000 Binary files a/dev/mpl_examples/pylab_examples/plotfile_demo_00.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/plotfile_demo_00.png b/dev/mpl_examples/pylab_examples/plotfile_demo_00.png deleted file mode 100644 index 419fed952d1..00000000000 Binary files a/dev/mpl_examples/pylab_examples/plotfile_demo_00.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/plotfile_demo_01.hires.png b/dev/mpl_examples/pylab_examples/plotfile_demo_01.hires.png deleted file mode 100644 index 02faff34bf5..00000000000 Binary files a/dev/mpl_examples/pylab_examples/plotfile_demo_01.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/plotfile_demo_01.pdf b/dev/mpl_examples/pylab_examples/plotfile_demo_01.pdf deleted file mode 100644 index 9df120bed5a..00000000000 Binary files a/dev/mpl_examples/pylab_examples/plotfile_demo_01.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/plotfile_demo_01.png b/dev/mpl_examples/pylab_examples/plotfile_demo_01.png deleted file mode 100644 index 419fed952d1..00000000000 Binary files a/dev/mpl_examples/pylab_examples/plotfile_demo_01.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/plotfile_demo_02.hires.png b/dev/mpl_examples/pylab_examples/plotfile_demo_02.hires.png deleted file mode 100644 index 0a937b68b06..00000000000 Binary files a/dev/mpl_examples/pylab_examples/plotfile_demo_02.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/plotfile_demo_02.pdf b/dev/mpl_examples/pylab_examples/plotfile_demo_02.pdf deleted file mode 100644 index 7c3a6679d5f..00000000000 Binary files a/dev/mpl_examples/pylab_examples/plotfile_demo_02.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/plotfile_demo_02.png b/dev/mpl_examples/pylab_examples/plotfile_demo_02.png deleted file mode 100644 index 9c9ecf18ce0..00000000000 Binary files a/dev/mpl_examples/pylab_examples/plotfile_demo_02.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/plotfile_demo_03.hires.png b/dev/mpl_examples/pylab_examples/plotfile_demo_03.hires.png deleted file mode 100644 index 0a937b68b06..00000000000 Binary files a/dev/mpl_examples/pylab_examples/plotfile_demo_03.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/plotfile_demo_03.pdf b/dev/mpl_examples/pylab_examples/plotfile_demo_03.pdf deleted file mode 100644 index 6b73bc45978..00000000000 Binary files a/dev/mpl_examples/pylab_examples/plotfile_demo_03.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/plotfile_demo_03.png b/dev/mpl_examples/pylab_examples/plotfile_demo_03.png deleted file mode 100644 index 9c9ecf18ce0..00000000000 Binary files a/dev/mpl_examples/pylab_examples/plotfile_demo_03.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/plotfile_demo_04.hires.png b/dev/mpl_examples/pylab_examples/plotfile_demo_04.hires.png deleted file mode 100644 index a37ac0f57be..00000000000 Binary files a/dev/mpl_examples/pylab_examples/plotfile_demo_04.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/plotfile_demo_04.pdf b/dev/mpl_examples/pylab_examples/plotfile_demo_04.pdf deleted file mode 100644 index 3047ccdedb6..00000000000 Binary files a/dev/mpl_examples/pylab_examples/plotfile_demo_04.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/plotfile_demo_04.png b/dev/mpl_examples/pylab_examples/plotfile_demo_04.png deleted file mode 100644 index 00138da79ec..00000000000 Binary files a/dev/mpl_examples/pylab_examples/plotfile_demo_04.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/plotfile_demo_05.hires.png b/dev/mpl_examples/pylab_examples/plotfile_demo_05.hires.png deleted file mode 100644 index 32b3f0fcbb2..00000000000 Binary files a/dev/mpl_examples/pylab_examples/plotfile_demo_05.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/plotfile_demo_05.pdf b/dev/mpl_examples/pylab_examples/plotfile_demo_05.pdf deleted file mode 100644 index 77e73571703..00000000000 Binary files a/dev/mpl_examples/pylab_examples/plotfile_demo_05.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/plotfile_demo_05.png b/dev/mpl_examples/pylab_examples/plotfile_demo_05.png deleted file mode 100644 index e1fde25b956..00000000000 Binary files a/dev/mpl_examples/pylab_examples/plotfile_demo_05.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/plotfile_demo_06.hires.png b/dev/mpl_examples/pylab_examples/plotfile_demo_06.hires.png deleted file mode 100644 index 2304d8a3f07..00000000000 Binary files a/dev/mpl_examples/pylab_examples/plotfile_demo_06.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/plotfile_demo_06.pdf b/dev/mpl_examples/pylab_examples/plotfile_demo_06.pdf deleted file mode 100644 index f1ad7c6472a..00000000000 Binary files a/dev/mpl_examples/pylab_examples/plotfile_demo_06.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/plotfile_demo_06.png b/dev/mpl_examples/pylab_examples/plotfile_demo_06.png deleted file mode 100644 index fd43dd773f5..00000000000 Binary files a/dev/mpl_examples/pylab_examples/plotfile_demo_06.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/plotfile_demo_07.hires.png b/dev/mpl_examples/pylab_examples/plotfile_demo_07.hires.png deleted file mode 100644 index f5f0af840ac..00000000000 Binary files a/dev/mpl_examples/pylab_examples/plotfile_demo_07.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/plotfile_demo_07.pdf b/dev/mpl_examples/pylab_examples/plotfile_demo_07.pdf deleted file mode 100644 index cc2a959c73e..00000000000 Binary files a/dev/mpl_examples/pylab_examples/plotfile_demo_07.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/plotfile_demo_07.png b/dev/mpl_examples/pylab_examples/plotfile_demo_07.png deleted file mode 100644 index 6fb77949528..00000000000 Binary files a/dev/mpl_examples/pylab_examples/plotfile_demo_07.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/polar_bar.hires.png b/dev/mpl_examples/pylab_examples/polar_bar.hires.png deleted file mode 100644 index 06eade2759a..00000000000 Binary files a/dev/mpl_examples/pylab_examples/polar_bar.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/polar_bar.pdf b/dev/mpl_examples/pylab_examples/polar_bar.pdf deleted file mode 100644 index de9ab1d4cb7..00000000000 Binary files a/dev/mpl_examples/pylab_examples/polar_bar.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/polar_bar.png b/dev/mpl_examples/pylab_examples/polar_bar.png deleted file mode 100644 index 2121c6017d5..00000000000 Binary files a/dev/mpl_examples/pylab_examples/polar_bar.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/polar_bar.py b/dev/mpl_examples/pylab_examples/polar_bar.py deleted file mode 100644 index 14d8d7de0b4..00000000000 --- a/dev/mpl_examples/pylab_examples/polar_bar.py +++ /dev/null @@ -1,21 +0,0 @@ -#!/usr/bin/env python - -import numpy as np -import matplotlib.cm as cm -from matplotlib.pyplot import figure, show, rc - - -# force square figure and square axes looks better for polar, IMO -fig = figure(figsize=(8,8)) -ax = fig.add_axes([0.1, 0.1, 0.8, 0.8], polar=True) - -N = 20 -theta = np.arange(0.0, 2*np.pi, 2*np.pi/N) -radii = 10*np.random.rand(N) -width = np.pi/4*np.random.rand(N) -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.5) - -show() diff --git a/dev/mpl_examples/pylab_examples/polar_demo.hires.png b/dev/mpl_examples/pylab_examples/polar_demo.hires.png deleted file mode 100644 index 533b34b5820..00000000000 Binary files a/dev/mpl_examples/pylab_examples/polar_demo.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/polar_demo.pdf b/dev/mpl_examples/pylab_examples/polar_demo.pdf deleted file mode 100644 index 407388d3882..00000000000 Binary files a/dev/mpl_examples/pylab_examples/polar_demo.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/polar_demo.png b/dev/mpl_examples/pylab_examples/polar_demo.png deleted file mode 100644 index 4cf50f4845b..00000000000 Binary files a/dev/mpl_examples/pylab_examples/polar_demo.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/polar_demo.py b/dev/mpl_examples/pylab_examples/polar_demo.py deleted file mode 100644 index 3127cb55fde..00000000000 --- a/dev/mpl_examples/pylab_examples/polar_demo.py +++ /dev/null @@ -1,17 +0,0 @@ -""" -Demo of a line plot on a polar axis. -""" -import numpy as np -import matplotlib.pyplot as plt - - -r = np.arange(0, 3.0, 0.01) -theta = 2 * np.pi * r - -ax = plt.subplot(111, polar=True) -ax.plot(theta, r, color='r', linewidth=3) -ax.set_rmax(2.0) -ax.grid(True) - -ax.set_title("A line plot on a polar axis", va='bottom') -plt.show() diff --git a/dev/mpl_examples/pylab_examples/polar_legend.hires.png b/dev/mpl_examples/pylab_examples/polar_legend.hires.png deleted file mode 100644 index ed942bf2f1f..00000000000 Binary files a/dev/mpl_examples/pylab_examples/polar_legend.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/polar_legend.pdf b/dev/mpl_examples/pylab_examples/polar_legend.pdf deleted file mode 100644 index e90a8d73450..00000000000 Binary files a/dev/mpl_examples/pylab_examples/polar_legend.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/polar_legend.png b/dev/mpl_examples/pylab_examples/polar_legend.png deleted file mode 100644 index fdfec7494d3..00000000000 Binary files a/dev/mpl_examples/pylab_examples/polar_legend.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/polar_legend.py b/dev/mpl_examples/pylab_examples/polar_legend.py deleted file mode 100644 index 12bf5dd653e..00000000000 --- a/dev/mpl_examples/pylab_examples/polar_legend.py +++ /dev/null @@ -1,21 +0,0 @@ -#!/usr/bin/env python - -import numpy as np -from matplotlib.pyplot import figure, show, rc - -# radar green, solid grid lines -rc('grid', color='#316931', linewidth=1, linestyle='-') -rc('xtick', labelsize=15) -rc('ytick', labelsize=15) - -# force square figure and square axes looks better for polar, IMO -fig = figure(figsize=(8,8)) -ax = fig.add_axes([0.1, 0.1, 0.8, 0.8], polar=True, axisbg='#d5de9c') - -r = np.arange(0, 3.0, 0.01) -theta = 2*np.pi*r -ax.plot(theta, r, color='#ee8d18', lw=3, label='a line') -ax.plot(0.5*theta, r, color='blue', ls='--', lw=3, label='another line') -ax.legend() - -show() diff --git a/dev/mpl_examples/pylab_examples/polar_scatter.hires.png b/dev/mpl_examples/pylab_examples/polar_scatter.hires.png deleted file mode 100644 index f0c0ffa82f6..00000000000 Binary files a/dev/mpl_examples/pylab_examples/polar_scatter.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/polar_scatter.pdf b/dev/mpl_examples/pylab_examples/polar_scatter.pdf deleted file mode 100644 index 388ff0beac7..00000000000 Binary files a/dev/mpl_examples/pylab_examples/polar_scatter.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/polar_scatter.png b/dev/mpl_examples/pylab_examples/polar_scatter.png deleted file mode 100644 index 3d54dfaf133..00000000000 Binary files a/dev/mpl_examples/pylab_examples/polar_scatter.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/polar_scatter.py b/dev/mpl_examples/pylab_examples/polar_scatter.py deleted file mode 100644 index 196f6e84729..00000000000 --- a/dev/mpl_examples/pylab_examples/polar_scatter.py +++ /dev/null @@ -1,17 +0,0 @@ -#!/usr/bin/env python -# a polar scatter plot; size increases radially in this example and -# color increases with angle (just to verify the symbols are being -# scattered correctly). In a real example, this would be wasting -# dimensionality of the plot -from pylab import * - -N = 150 -r = 2*rand(N) -theta = 2*pi*rand(N) -area = 200*r**2*rand(N) -colors = theta -ax = subplot(111, polar=True) -c = scatter(theta, r, c=colors, s=area, cmap=cm.hsv) -c.set_alpha(0.75) - -show() diff --git a/dev/mpl_examples/pylab_examples/poormans_contour.hires.png b/dev/mpl_examples/pylab_examples/poormans_contour.hires.png deleted file mode 100644 index 1ac7d5f0b04..00000000000 Binary files a/dev/mpl_examples/pylab_examples/poormans_contour.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/poormans_contour.pdf b/dev/mpl_examples/pylab_examples/poormans_contour.pdf deleted file mode 100644 index ae4ed4ea45a..00000000000 Binary files a/dev/mpl_examples/pylab_examples/poormans_contour.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/poormans_contour.png b/dev/mpl_examples/pylab_examples/poormans_contour.png deleted file mode 100644 index 7924a91411e..00000000000 Binary files a/dev/mpl_examples/pylab_examples/poormans_contour.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/poormans_contour.py b/dev/mpl_examples/pylab_examples/poormans_contour.py deleted file mode 100644 index 5a518e1a696..00000000000 --- a/dev/mpl_examples/pylab_examples/poormans_contour.py +++ /dev/null @@ -1,29 +0,0 @@ -#!/usr/bin/env python -""" -Use a pcolor or imshow with a custom colormap to make a contour plot. - -Since this example was initially written, a proper contour routine was -added to matplotlib - see contour_demo.py and -http://matplotlib.sf.net/matplotlib.pylab.html#-contour. -""" - -from pylab import * - - -delta = 0.01 -x = arange(-3.0, 3.0, delta) -y = arange(-3.0, 3.0, delta) -X,Y = meshgrid(x, y) -Z1 = bivariate_normal(X, Y, 1.0, 1.0, 0.0, 0.0) -Z2 = bivariate_normal(X, Y, 1.5, 0.5, 1, 1) -Z = Z2 - Z1 # difference of Gaussians - -cmap = cm.get_cmap('PiYG', 11) # 11 discrete colors - -im = imshow(Z, cmap=cmap, interpolation='bilinear', - vmax=abs(Z).max(), vmin=-abs(Z).max()) -axis('off') -colorbar() - -show() - diff --git a/dev/mpl_examples/pylab_examples/psd_demo.hires.png b/dev/mpl_examples/pylab_examples/psd_demo.hires.png deleted file mode 100644 index 084bc8cfd5f..00000000000 Binary files a/dev/mpl_examples/pylab_examples/psd_demo.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/psd_demo.pdf b/dev/mpl_examples/pylab_examples/psd_demo.pdf deleted file mode 100644 index 92685ab2322..00000000000 Binary files a/dev/mpl_examples/pylab_examples/psd_demo.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/psd_demo.png b/dev/mpl_examples/pylab_examples/psd_demo.png deleted file mode 100644 index 7e25581cc62..00000000000 Binary files a/dev/mpl_examples/pylab_examples/psd_demo.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/psd_demo.py b/dev/mpl_examples/pylab_examples/psd_demo.py deleted file mode 100644 index d0a0521885f..00000000000 --- a/dev/mpl_examples/pylab_examples/psd_demo.py +++ /dev/null @@ -1,36 +0,0 @@ -#!/usr/bin/env python -# python - -from pylab import * - -dt = 0.01 -t = arange(0,10,dt) -nse = randn(len(t)) -r = exp(-t/0.05) - -cnse = convolve(nse, r)*dt -cnse = cnse[:len(t)] -s = 0.1*sin(2*pi*t) + cnse - -subplot(211) -plot(t,s) -subplot(212) -psd(s, 512, 1/dt) - -show() -""" -% compare with MATLAB -dt = 0.01; -t = [0:dt:10]; -nse = randn(size(t)); -r = exp(-t/0.05); -cnse = conv(nse, r)*dt; -cnse = cnse(1:length(t)); -s = 0.1*sin(2*pi*t) + cnse; - -subplot(211) -plot(t,s) -subplot(212) -psd(s, 512, 1/dt) - -""" diff --git a/dev/mpl_examples/pylab_examples/psd_demo2.hires.png b/dev/mpl_examples/pylab_examples/psd_demo2.hires.png deleted file mode 100644 index dea66d365ea..00000000000 Binary files a/dev/mpl_examples/pylab_examples/psd_demo2.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/psd_demo2.pdf b/dev/mpl_examples/pylab_examples/psd_demo2.pdf deleted file mode 100644 index b1df5ad9d1a..00000000000 Binary files a/dev/mpl_examples/pylab_examples/psd_demo2.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/psd_demo2.png b/dev/mpl_examples/pylab_examples/psd_demo2.png deleted file mode 100644 index 3f20e5f9775..00000000000 Binary files a/dev/mpl_examples/pylab_examples/psd_demo2.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/psd_demo2.py b/dev/mpl_examples/pylab_examples/psd_demo2.py deleted file mode 100644 index 08d452b84fc..00000000000 --- a/dev/mpl_examples/pylab_examples/psd_demo2.py +++ /dev/null @@ -1,42 +0,0 @@ -#This example shows the effects of some of the different PSD parameters -import numpy as np -import matplotlib.pyplot as plt - -dt = np.pi / 100. -fs = 1. / dt -t = np.arange(0, 8, dt) -y = 10. * np.sin(2 * np.pi * 4 * t) + 5. * np.sin(2 * np.pi * 4.25 * t) -y = y + np.random.randn(*t.shape) - -#Plot the raw time series -fig = plt.figure() -fig.subplots_adjust(hspace=0.45, wspace=0.3) -ax = fig.add_subplot(2, 1, 1) -ax.plot(t, y) - -#Plot the PSD with different amounts of zero padding. This uses the entire -#time series at once -ax2 = fig.add_subplot(2, 3, 4) -ax2.psd(y, NFFT=len(t), pad_to=len(t), Fs=fs) -ax2.psd(y, NFFT=len(t), pad_to=len(t)*2, Fs=fs) -ax2.psd(y, NFFT=len(t), pad_to=len(t)*4, Fs=fs) -plt.title('zero padding') - -#Plot the PSD with different block sizes, Zero pad to the length of the original -#data sequence. -ax3 = fig.add_subplot(2, 3, 5, sharex=ax2, sharey=ax2) -ax3.psd(y, NFFT=len(t), pad_to=len(t), Fs=fs) -ax3.psd(y, NFFT=len(t)//2, pad_to=len(t), Fs=fs) -ax3.psd(y, NFFT=len(t)//4, pad_to=len(t), Fs=fs) -ax3.set_ylabel('') -plt.title('block size') - -#Plot the PSD with different amounts of overlap between blocks -ax4 = fig.add_subplot(2, 3, 6, sharex=ax2, sharey=ax2) -ax4.psd(y, NFFT=len(t)//2, pad_to=len(t), noverlap=0, Fs=fs) -ax4.psd(y, NFFT=len(t)//2, pad_to=len(t), noverlap=int(0.05*len(t)/2.), Fs=fs) -ax4.psd(y, NFFT=len(t)//2, pad_to=len(t), noverlap=int(0.2*len(t)/2.), Fs=fs) -ax4.set_ylabel('') -plt.title('overlap') - -plt.show() diff --git a/dev/mpl_examples/pylab_examples/psd_demo3.hires.png b/dev/mpl_examples/pylab_examples/psd_demo3.hires.png deleted file mode 100644 index 832e06534f4..00000000000 Binary files a/dev/mpl_examples/pylab_examples/psd_demo3.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/psd_demo3.pdf b/dev/mpl_examples/pylab_examples/psd_demo3.pdf deleted file mode 100644 index 7d8c19881f2..00000000000 Binary files a/dev/mpl_examples/pylab_examples/psd_demo3.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/psd_demo3.png b/dev/mpl_examples/pylab_examples/psd_demo3.png deleted file mode 100644 index 67b36e336cb..00000000000 Binary files a/dev/mpl_examples/pylab_examples/psd_demo3.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/psd_demo3.py b/dev/mpl_examples/pylab_examples/psd_demo3.py deleted file mode 100644 index ca9abb4282f..00000000000 --- a/dev/mpl_examples/pylab_examples/psd_demo3.py +++ /dev/null @@ -1,36 +0,0 @@ -#This is a ported version of a MATLAB example from the signal processing -#toolbox that showed some difference at one time between Matplotlib's and -#MATLAB's scaling of the PSD. - -import numpy as np -import matplotlib.pyplot as plt -import matplotlib.mlab as mlab - -fs = 1000 -t = np.linspace(0, 0.3, 301) -A = np.array([2, 8]).reshape(-1, 1) -f = np.array([150, 140]).reshape(-1, 1) -xn = (A * np.sin(2 * np.pi * f * t)).sum(axis=0) + 5 * np.random.randn(*t.shape) - -yticks = np.arange(-50, 30, 10) -xticks = np.arange(0,550,100) -plt.subplots_adjust(hspace=0.45, wspace=0.3) -plt.subplot(1,2,1) - -plt.psd(xn, NFFT=301, Fs=fs, window=mlab.window_none, pad_to=1024, - scale_by_freq=True) -plt.title('Periodogram') -plt.yticks(yticks) -plt.xticks(xticks) -plt.grid(True) - -plt.subplot(1,2,2) -plt.psd(xn, NFFT=150, Fs=fs, window=mlab.window_none, noverlap=75, pad_to=512, - scale_by_freq=True) -plt.title('Welch') -plt.xticks(xticks) -plt.yticks(yticks) -plt.ylabel('') -plt.grid(True) - -plt.show() diff --git a/dev/mpl_examples/pylab_examples/psd_demo_complex.hires.png b/dev/mpl_examples/pylab_examples/psd_demo_complex.hires.png deleted file mode 100644 index 42e47b89d96..00000000000 Binary files a/dev/mpl_examples/pylab_examples/psd_demo_complex.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/psd_demo_complex.pdf b/dev/mpl_examples/pylab_examples/psd_demo_complex.pdf deleted file mode 100644 index 3a7dc295e72..00000000000 Binary files a/dev/mpl_examples/pylab_examples/psd_demo_complex.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/psd_demo_complex.png b/dev/mpl_examples/pylab_examples/psd_demo_complex.png deleted file mode 100644 index 14e94475f41..00000000000 Binary files a/dev/mpl_examples/pylab_examples/psd_demo_complex.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/psd_demo_complex.py b/dev/mpl_examples/pylab_examples/psd_demo_complex.py deleted file mode 100644 index 73b204e88c2..00000000000 --- a/dev/mpl_examples/pylab_examples/psd_demo_complex.py +++ /dev/null @@ -1,38 +0,0 @@ -#This is a ported version of a MATLAB example from the signal processing -#toolbox that showed some difference at one time between Matplotlib's and -#MATLAB's scaling of the PSD. This differs from psd_demo3.py in that -#this uses a complex signal, so we can see that complex PSD's work properly -import numpy as np -import matplotlib.pyplot as plt -import matplotlib.mlab as mlab - -fs = 1000 -t = np.linspace(0, 0.3, 301) -A = np.array([2, 8]).reshape(-1, 1) -f = np.array([150, 140]).reshape(-1, 1) -xn = (A * np.exp(2j * np.pi * f * t)).sum(axis=0) + 5 * np.random.randn(*t.shape) - -yticks = np.arange(-50, 30, 10) -xticks = np.arange(-500,550,100) -plt.subplots_adjust(hspace=0.45, wspace=0.3) -ax = plt.subplot(1, 2, 1) - -plt.psd(xn, NFFT=301, Fs=fs, window=mlab.window_none, pad_to=1024, - scale_by_freq=True) -plt.title('Periodogram') -plt.yticks(yticks) -plt.xticks(xticks) -plt.grid(True) -plt.xlim(-500, 500) - -plt.subplot(1, 2, 2, sharex=ax, sharey=ax) -plt.psd(xn, NFFT=150, Fs=fs, window=mlab.window_none, noverlap=75, pad_to=512, - scale_by_freq=True) -plt.title('Welch') -plt.xticks(xticks) -plt.yticks(yticks) -plt.ylabel('') -plt.grid(True) -plt.xlim(-500, 500) - -plt.show() diff --git a/dev/mpl_examples/pylab_examples/pythonic_matplotlib.hires.png b/dev/mpl_examples/pylab_examples/pythonic_matplotlib.hires.png deleted file mode 100644 index b7afdf89292..00000000000 Binary files a/dev/mpl_examples/pylab_examples/pythonic_matplotlib.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/pythonic_matplotlib.pdf b/dev/mpl_examples/pylab_examples/pythonic_matplotlib.pdf deleted file mode 100644 index 5e9924a9b28..00000000000 Binary files a/dev/mpl_examples/pylab_examples/pythonic_matplotlib.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/pythonic_matplotlib.png b/dev/mpl_examples/pylab_examples/pythonic_matplotlib.png deleted file mode 100644 index 924d52cc719..00000000000 Binary files a/dev/mpl_examples/pylab_examples/pythonic_matplotlib.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/pythonic_matplotlib.py b/dev/mpl_examples/pylab_examples/pythonic_matplotlib.py deleted file mode 100644 index 16e82207011..00000000000 --- a/dev/mpl_examples/pylab_examples/pythonic_matplotlib.py +++ /dev/null @@ -1,82 +0,0 @@ -#!/usr/bin/env python -""" -Some people prefer to write more pythonic, object oriented, code -rather than use the pylab interface to matplotlib. This example shows -you how. - -Unless you are an application developer, I recommend using part of the -pylab interface, particularly the figure, close, subplot, axes, and -show commands. These hide a lot of complexity from you that you don't -need to see in normal figure creation, like instantiating DPI -instances, managing the bounding boxes of the figure elements, -creating and reaslizing GUI windows and embedding figures in them. - - -If you are an application developer and want to embed matplotlib in -your application, follow the lead of examples/embedding_in_wx.py, -examples/embedding_in_gtk.py or examples/embedding_in_tk.py. In this -case you will want to control the creation of all your figures, -embedding them in application windows, etc. - -If you are a web application developer, you may want to use the -example in webapp_demo.py, which shows how to use the backend agg -figure canvase directly, with none of the globals (current figure, -current axes) that are present in the pylab interface. Note that -there is no reason why the pylab interface won't work for web -application developers, however. - -If you see an example in the examples dir written in pylab interface, -and you want to emulate that using the true python method calls, there -is an easy mapping. Many of those examples use 'set' to control -figure properties. Here's how to map those commands onto instance -methods - -The syntax of set is - - setp(object or sequence, somestring, attribute) - -if called with an object, set calls - - object.set_somestring(attribute) - -if called with a sequence, set does - - for object in sequence: - object.set_somestring(attribute) - -So for your example, if a is your axes object, you can do - - a.set_xticklabels([]) - a.set_yticklabels([]) - a.set_xticks([]) - a.set_yticks([]) -""" - - -from pylab import figure, show -from numpy import arange, sin, pi - -t = arange(0.0, 1.0, 0.01) - -fig = figure(1) - -ax1 = fig.add_subplot(211) -ax1.plot(t, sin(2*pi*t)) -ax1.grid(True) -ax1.set_ylim( (-2,2) ) -ax1.set_ylabel('1 Hz') -ax1.set_title('A sine wave or two') - -for label in ax1.get_xticklabels(): - label.set_color('r') - - -ax2 = fig.add_subplot(212) -ax2.plot(t, sin(2*2*pi*t)) -ax2.grid(True) -ax2.set_ylim( (-2,2) ) -l = ax2.set_xlabel('Hi mom') -l.set_color('g') -l.set_fontsize('large') - -show() diff --git a/dev/mpl_examples/pylab_examples/quadmesh_demo.hires.png b/dev/mpl_examples/pylab_examples/quadmesh_demo.hires.png deleted file mode 100644 index 19b82f39ecb..00000000000 Binary files a/dev/mpl_examples/pylab_examples/quadmesh_demo.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/quadmesh_demo.pdf b/dev/mpl_examples/pylab_examples/quadmesh_demo.pdf deleted file mode 100644 index 17ef28fe994..00000000000 Binary files a/dev/mpl_examples/pylab_examples/quadmesh_demo.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/quadmesh_demo.png b/dev/mpl_examples/pylab_examples/quadmesh_demo.png deleted file mode 100644 index e7704213259..00000000000 Binary files a/dev/mpl_examples/pylab_examples/quadmesh_demo.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/quadmesh_demo.py b/dev/mpl_examples/pylab_examples/quadmesh_demo.py deleted file mode 100644 index 6b8e63d2bec..00000000000 --- a/dev/mpl_examples/pylab_examples/quadmesh_demo.py +++ /dev/null @@ -1,45 +0,0 @@ -#!/usr/bin/env python -""" -pcolormesh uses a QuadMesh, a faster generalization of pcolor, but -with some restrictions. - -This demo illustrates a bug in quadmesh with masked data. -""" - -import numpy as np -from matplotlib.pyplot import figure, show, savefig -from matplotlib import cm, colors -from numpy import ma - -n = 12 -x = np.linspace(-1.5,1.5,n) -y = np.linspace(-1.5,1.5,n*2) -X,Y = np.meshgrid(x,y); -Qx = np.cos(Y) - np.cos(X) -Qz = np.sin(Y) + np.sin(X) -Qx = (Qx + 1.1) -Z = np.sqrt(X**2 + Y**2)/5; -Z = (Z - Z.min()) / (Z.max() - Z.min()) - -# The color array can include masked values: -Zm = ma.masked_where(np.fabs(Qz) < 0.5*np.amax(Qz), Z) - - -fig = figure() -ax = fig.add_subplot(121) -ax.set_axis_bgcolor("#bdb76b") -ax.pcolormesh(Qx,Qz,Z, shading='gouraud') -ax.set_title('Without masked values') - -ax = fig.add_subplot(122) -ax.set_axis_bgcolor("#bdb76b") -# You can control the color of the masked region: -#cmap = cm.jet -#cmap.set_bad('r', 1.0) -#ax.pcolormesh(Qx,Qz,Zm, cmap=cmap) -# Or use the default, which is transparent: -col = ax.pcolormesh(Qx,Qz,Zm,shading='gouraud') -ax.set_title('With masked values') - - -show() diff --git a/dev/mpl_examples/pylab_examples/quiver_demo.py b/dev/mpl_examples/pylab_examples/quiver_demo.py deleted file mode 100644 index f8c28d96c5f..00000000000 --- a/dev/mpl_examples/pylab_examples/quiver_demo.py +++ /dev/null @@ -1,84 +0,0 @@ -''' -Demonstration of quiver and quiverkey functions. This is using the -new version coming from the code in quiver.py. - -Known problem: the plot autoscaling does not take into account -the arrows, so those on the boundaries are often out of the picture. -This is *not* an easy problem to solve in a perfectly general way. -The workaround is to manually expand the axes. - -''' -from pylab import * -from numpy import ma - -X,Y = meshgrid( arange(0,2*pi,.2),arange(0,2*pi,.2) ) -U = cos(X) -V = sin(Y) - -#1 -figure() -Q = quiver( U, V) -qk = quiverkey(Q, 0.5, 0.92, 2, r'$2 \frac{m}{s}$', labelpos='W', - fontproperties={'weight': 'bold'}) -l,r,b,t = axis() -dx, dy = r-l, t-b -axis([l-0.05*dx, r+0.05*dx, b-0.05*dy, t+0.05*dy]) - -title('Minimal arguments, no kwargs') - -#2 -figure() -Q = quiver( X, Y, U, V, units='width') -qk = quiverkey(Q, 0.9, 0.95, 2, r'$2 \frac{m}{s}$', - labelpos='E', - coordinates='figure', - fontproperties={'weight': 'bold'}) -axis([-1, 7, -1, 7]) -title('scales with plot width, not view') - -#3 -figure() -Q = quiver( X[::3, ::3], Y[::3, ::3], U[::3, ::3], V[::3, ::3], - pivot='mid', color='r', units='inches' ) -qk = quiverkey(Q, 0.5, 0.03, 1, r'$1 \frac{m}{s}$', fontproperties={'weight': 'bold'}) -plot( X[::3, ::3], Y[::3, ::3], 'k.') -axis([-1, 7, -1, 7]) -title("pivot='mid'; every third arrow; units='inches'") - -#4 -figure() -M = sqrt(pow(U, 2) + pow(V, 2)) -Q = quiver( X, Y, U, V, M, units='x', pivot='tip', width=0.022, scale=1/0.15) -qk = quiverkey(Q, 0.9, 1.05, 1, r'$1 \frac{m}{s}$', - labelpos='E', - fontproperties={'weight': 'bold'}) -plot(X, Y, 'k.') -axis([-1, 7, -1, 7]) -title("scales with x view; pivot='tip'") - -#5 -figure() -Q = quiver( X[::3, ::3], Y[::3, ::3], U[::3, ::3], V[::3, ::3], - color='r', units='x', - linewidths=(2,), edgecolors=('k'), headaxislength=5 ) -qk = quiverkey(Q, 0.5, 0.03, 1, r'$1 \frac{m}{s}$', fontproperties={'weight': 'bold'}) -axis([-1, 7, -1, 7]) -title("triangular head; scale with x view; black edges") - -#6 -figure() -M = zeros(U.shape, dtype='bool') -M[U.shape[0]/3:2*U.shape[0]/3,U.shape[1]/3:2*U.shape[1]/3] = True -U = ma.masked_array(U, mask=M) -V = ma.masked_array(V, mask=M) -Q = quiver( U, V) -qk = quiverkey(Q, 0.5, 0.92, 2, r'$2 \frac{m}{s}$', labelpos='W', - fontproperties={'weight': 'bold'}) -l,r,b,t = axis() -dx, dy = r-l, t-b -axis([l-0.05*dx, r+0.05*dx, b-0.05*dy, t+0.05*dy]) -title('Minimal arguments, no kwargs - masked values') - - -show() - diff --git a/dev/mpl_examples/pylab_examples/quiver_demo_00.hires.png b/dev/mpl_examples/pylab_examples/quiver_demo_00.hires.png deleted file mode 100644 index 6fe24beb2f3..00000000000 Binary files a/dev/mpl_examples/pylab_examples/quiver_demo_00.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/quiver_demo_00.pdf b/dev/mpl_examples/pylab_examples/quiver_demo_00.pdf deleted file mode 100644 index 3f8d7076d83..00000000000 Binary files a/dev/mpl_examples/pylab_examples/quiver_demo_00.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/quiver_demo_00.png b/dev/mpl_examples/pylab_examples/quiver_demo_00.png deleted file mode 100644 index e72806d913d..00000000000 Binary files a/dev/mpl_examples/pylab_examples/quiver_demo_00.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/quiver_demo_01.hires.png b/dev/mpl_examples/pylab_examples/quiver_demo_01.hires.png deleted file mode 100644 index 7be8e8cbca1..00000000000 Binary files a/dev/mpl_examples/pylab_examples/quiver_demo_01.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/quiver_demo_01.pdf b/dev/mpl_examples/pylab_examples/quiver_demo_01.pdf deleted file mode 100644 index f406b5d2930..00000000000 Binary files a/dev/mpl_examples/pylab_examples/quiver_demo_01.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/quiver_demo_01.png b/dev/mpl_examples/pylab_examples/quiver_demo_01.png deleted file mode 100644 index 4a5b96079d9..00000000000 Binary files a/dev/mpl_examples/pylab_examples/quiver_demo_01.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/quiver_demo_02.hires.png b/dev/mpl_examples/pylab_examples/quiver_demo_02.hires.png deleted file mode 100644 index 1f9e60c3def..00000000000 Binary files a/dev/mpl_examples/pylab_examples/quiver_demo_02.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/quiver_demo_02.pdf b/dev/mpl_examples/pylab_examples/quiver_demo_02.pdf deleted file mode 100644 index 2f9caf7a408..00000000000 Binary files a/dev/mpl_examples/pylab_examples/quiver_demo_02.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/quiver_demo_02.png b/dev/mpl_examples/pylab_examples/quiver_demo_02.png deleted file mode 100644 index 56f1981f199..00000000000 Binary files a/dev/mpl_examples/pylab_examples/quiver_demo_02.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/quiver_demo_03.hires.png b/dev/mpl_examples/pylab_examples/quiver_demo_03.hires.png deleted file mode 100644 index d6bb71c89f5..00000000000 Binary files a/dev/mpl_examples/pylab_examples/quiver_demo_03.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/quiver_demo_03.pdf b/dev/mpl_examples/pylab_examples/quiver_demo_03.pdf deleted file mode 100644 index 08969952082..00000000000 Binary files a/dev/mpl_examples/pylab_examples/quiver_demo_03.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/quiver_demo_03.png b/dev/mpl_examples/pylab_examples/quiver_demo_03.png deleted file mode 100644 index b5f527a6fdd..00000000000 Binary files a/dev/mpl_examples/pylab_examples/quiver_demo_03.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/quiver_demo_04.hires.png b/dev/mpl_examples/pylab_examples/quiver_demo_04.hires.png deleted file mode 100644 index 02048a65e19..00000000000 Binary files a/dev/mpl_examples/pylab_examples/quiver_demo_04.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/quiver_demo_04.pdf b/dev/mpl_examples/pylab_examples/quiver_demo_04.pdf deleted file mode 100644 index 10d56981d10..00000000000 Binary files a/dev/mpl_examples/pylab_examples/quiver_demo_04.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/quiver_demo_04.png b/dev/mpl_examples/pylab_examples/quiver_demo_04.png deleted file mode 100644 index 73c86b8e68f..00000000000 Binary files a/dev/mpl_examples/pylab_examples/quiver_demo_04.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/quiver_demo_05.hires.png b/dev/mpl_examples/pylab_examples/quiver_demo_05.hires.png deleted file mode 100644 index 0eee6f57e04..00000000000 Binary files a/dev/mpl_examples/pylab_examples/quiver_demo_05.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/quiver_demo_05.pdf b/dev/mpl_examples/pylab_examples/quiver_demo_05.pdf deleted file mode 100644 index bf58f9e3583..00000000000 Binary files a/dev/mpl_examples/pylab_examples/quiver_demo_05.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/quiver_demo_05.png b/dev/mpl_examples/pylab_examples/quiver_demo_05.png deleted file mode 100644 index 14b3deeecc7..00000000000 Binary files a/dev/mpl_examples/pylab_examples/quiver_demo_05.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/scatter_custom_symbol.hires.png b/dev/mpl_examples/pylab_examples/scatter_custom_symbol.hires.png deleted file mode 100644 index a8b1353c842..00000000000 Binary files a/dev/mpl_examples/pylab_examples/scatter_custom_symbol.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/scatter_custom_symbol.pdf b/dev/mpl_examples/pylab_examples/scatter_custom_symbol.pdf deleted file mode 100644 index ae068c08c5a..00000000000 Binary files a/dev/mpl_examples/pylab_examples/scatter_custom_symbol.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/scatter_custom_symbol.png b/dev/mpl_examples/pylab_examples/scatter_custom_symbol.png deleted file mode 100644 index 2964c9fee16..00000000000 Binary files a/dev/mpl_examples/pylab_examples/scatter_custom_symbol.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/scatter_custom_symbol.py b/dev/mpl_examples/pylab_examples/scatter_custom_symbol.py deleted file mode 100644 index 602e2a97d2f..00000000000 --- a/dev/mpl_examples/pylab_examples/scatter_custom_symbol.py +++ /dev/null @@ -1,18 +0,0 @@ -from matplotlib.pyplot import figure, show -from numpy import arange, pi, cos, sin, pi -from numpy.random import rand - -# unit area ellipse -rx, ry = 3., 1. -area = rx * ry * pi -theta = arange(0, 2*pi+0.01, 0.1) -verts = list(zip(rx/area*cos(theta), ry/area*sin(theta))) - -x,y,s,c = rand(4, 30) -s*= 10**2. - -fig = figure() -ax = fig.add_subplot(111) -ax.scatter(x,y,s,c,marker=None,verts =verts) - -show() diff --git a/dev/mpl_examples/pylab_examples/scatter_demo.hires.png b/dev/mpl_examples/pylab_examples/scatter_demo.hires.png deleted file mode 100644 index ac8a2d2e5cc..00000000000 Binary files a/dev/mpl_examples/pylab_examples/scatter_demo.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/scatter_demo.pdf b/dev/mpl_examples/pylab_examples/scatter_demo.pdf deleted file mode 100644 index f2dd9f3d234..00000000000 Binary files a/dev/mpl_examples/pylab_examples/scatter_demo.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/scatter_demo.png b/dev/mpl_examples/pylab_examples/scatter_demo.png deleted file mode 100644 index 609d3824c9f..00000000000 Binary files a/dev/mpl_examples/pylab_examples/scatter_demo.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/scatter_demo.py b/dev/mpl_examples/pylab_examples/scatter_demo.py deleted file mode 100644 index 3adf52b1dd1..00000000000 --- a/dev/mpl_examples/pylab_examples/scatter_demo.py +++ /dev/null @@ -1,10 +0,0 @@ -#!/usr/bin/env python -from pylab import * - -N = 30 -x = 0.9*rand(N) -y = 0.9*rand(N) -area = pi*(10 * rand(N))**2 # 0 to 10 point radiuses -scatter(x,y,s=area, marker='^', c='r') - -show() diff --git a/dev/mpl_examples/pylab_examples/scatter_demo2.hires.png b/dev/mpl_examples/pylab_examples/scatter_demo2.hires.png deleted file mode 100644 index e07cfee18ae..00000000000 Binary files a/dev/mpl_examples/pylab_examples/scatter_demo2.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/scatter_demo2.pdf b/dev/mpl_examples/pylab_examples/scatter_demo2.pdf deleted file mode 100644 index 31c5e098e12..00000000000 Binary files a/dev/mpl_examples/pylab_examples/scatter_demo2.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/scatter_demo2.png b/dev/mpl_examples/pylab_examples/scatter_demo2.png deleted file mode 100644 index bff28e89cae..00000000000 Binary files a/dev/mpl_examples/pylab_examples/scatter_demo2.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/scatter_demo2.py b/dev/mpl_examples/pylab_examples/scatter_demo2.py deleted file mode 100644 index 6eb9e18a192..00000000000 --- a/dev/mpl_examples/pylab_examples/scatter_demo2.py +++ /dev/null @@ -1,35 +0,0 @@ -""" -Demo of scatter plot with varying marker colors and sizes. -""" -import numpy as np -import matplotlib.pyplot as plt -import matplotlib.cbook as cbook - -# 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') -price_data = np.load(datafile).view(np.recarray) -price_data = price_data[-250:] # get the most recent 250 trading days - -delta1 = np.diff(price_data.adj_close)/price_data.adj_close[:-1] - -# Marker size in units of points^2 -volume = (15 * price_data.volume[:-2] / price_data.volume[0])**2 -close = 0.003 * price_data.close[:-2] / 0.003 * price_data.open[:-2] - -fig, ax = plt.subplots() -ax.scatter(delta1[:-1], delta1[1:], c=close, s=volume, alpha=0.5) - -ax.set_xlabel(r'$\Delta_i$', fontsize=20) -ax.set_ylabel(r'$\Delta_{i+1}$', fontsize=20) -ax.set_title('Volume and percent change') - -ax.grid(True) -fig.tight_layout() - -plt.show() - - - diff --git a/dev/mpl_examples/pylab_examples/scatter_hist.hires.png b/dev/mpl_examples/pylab_examples/scatter_hist.hires.png deleted file mode 100644 index 416d40c2f17..00000000000 Binary files a/dev/mpl_examples/pylab_examples/scatter_hist.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/scatter_hist.pdf b/dev/mpl_examples/pylab_examples/scatter_hist.pdf deleted file mode 100644 index ef65759f84c..00000000000 Binary files a/dev/mpl_examples/pylab_examples/scatter_hist.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/scatter_hist.png b/dev/mpl_examples/pylab_examples/scatter_hist.png deleted file mode 100644 index b6406cc6495..00000000000 Binary files a/dev/mpl_examples/pylab_examples/scatter_hist.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/scatter_hist.py b/dev/mpl_examples/pylab_examples/scatter_hist.py deleted file mode 100644 index 39636738c16..00000000000 --- a/dev/mpl_examples/pylab_examples/scatter_hist.py +++ /dev/null @@ -1,49 +0,0 @@ -import numpy as np -import matplotlib.pyplot as plt -from matplotlib.ticker import NullFormatter - -# the random data -x = np.random.randn(1000) -y = np.random.randn(1000) - -nullfmt = NullFormatter() # no labels - -# definitions for the axes -left, width = 0.1, 0.65 -bottom, height = 0.1, 0.65 -bottom_h = left_h = left+width+0.02 - -rect_scatter = [left, bottom, width, height] -rect_histx = [left, bottom_h, width, 0.2] -rect_histy = [left_h, bottom, 0.2, height] - -# start with a rectangular Figure -plt.figure(1, figsize=(8,8)) - -axScatter = plt.axes(rect_scatter) -axHistx = plt.axes(rect_histx) -axHisty = plt.axes(rect_histy) - -# no labels -axHistx.xaxis.set_major_formatter(nullfmt) -axHisty.yaxis.set_major_formatter(nullfmt) - -# the scatter plot: -axScatter.scatter(x, y) - -# 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 - -axScatter.set_xlim( (-lim, lim) ) -axScatter.set_ylim( (-lim, lim) ) - -bins = np.arange(-lim, lim + binwidth, binwidth) -axHistx.hist(x, bins=bins) -axHisty.hist(y, bins=bins, orientation='horizontal') - -axHistx.set_xlim( axScatter.get_xlim() ) -axHisty.set_ylim( axScatter.get_ylim() ) - -plt.show() diff --git a/dev/mpl_examples/pylab_examples/scatter_masked.hires.png b/dev/mpl_examples/pylab_examples/scatter_masked.hires.png deleted file mode 100644 index 4416b7d533a..00000000000 Binary files a/dev/mpl_examples/pylab_examples/scatter_masked.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/scatter_masked.pdf b/dev/mpl_examples/pylab_examples/scatter_masked.pdf deleted file mode 100644 index 90d752927c9..00000000000 Binary files a/dev/mpl_examples/pylab_examples/scatter_masked.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/scatter_masked.png b/dev/mpl_examples/pylab_examples/scatter_masked.png deleted file mode 100644 index 62fc3071a93..00000000000 Binary files a/dev/mpl_examples/pylab_examples/scatter_masked.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/scatter_masked.py b/dev/mpl_examples/pylab_examples/scatter_masked.py deleted file mode 100644 index c3e3123df74..00000000000 --- a/dev/mpl_examples/pylab_examples/scatter_masked.py +++ /dev/null @@ -1,19 +0,0 @@ -#!/usr/bin/env python -from pylab import * - -N = 100 -r0 = 0.6 -x = 0.9*rand(N) -y = 0.9*rand(N) -area = pi*(10 * rand(N))**2 # 0 to 10 point radiuses -c = sqrt(area) -r = sqrt(x*x+y*y) -area1 = ma.masked_where(r < r0, area) -area2 = ma.masked_where(r >= r0, area) -scatter(x,y,s=area1, marker='^', c=c, hold='on') -scatter(x,y,s=area2, marker='o', c=c) -# Show the boundary between the regions: -theta = arange(0, pi/2, 0.01) -plot(r0*cos(theta), r0*sin(theta)) - -show() diff --git a/dev/mpl_examples/pylab_examples/scatter_star_poly.hires.png b/dev/mpl_examples/pylab_examples/scatter_star_poly.hires.png deleted file mode 100644 index 6c7b4952e3f..00000000000 Binary files a/dev/mpl_examples/pylab_examples/scatter_star_poly.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/scatter_star_poly.pdf b/dev/mpl_examples/pylab_examples/scatter_star_poly.pdf deleted file mode 100644 index e6a7f860e95..00000000000 Binary files a/dev/mpl_examples/pylab_examples/scatter_star_poly.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/scatter_star_poly.png b/dev/mpl_examples/pylab_examples/scatter_star_poly.png deleted file mode 100644 index e18b339e0c6..00000000000 Binary files a/dev/mpl_examples/pylab_examples/scatter_star_poly.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/scatter_star_poly.py b/dev/mpl_examples/pylab_examples/scatter_star_poly.py deleted file mode 100644 index a3b5831808b..00000000000 --- a/dev/mpl_examples/pylab_examples/scatter_star_poly.py +++ /dev/null @@ -1,30 +0,0 @@ -import numpy as np -import matplotlib.pyplot as plt - - -x = np.random.rand(10) -y = np.random.rand(10) -z = np.sqrt(x**2 + y**2) - -plt.subplot(321) -plt.scatter(x,y,s=80, c=z, marker=">") - -plt.subplot(322) -plt.scatter(x,y,s=80, c=z, marker=(5,0)) - -verts = list(zip([-1.,1.,1.,-1.],[-1.,-1.,1.,-1.])) -plt.subplot(323) -plt.scatter(x,y,s=80, c=z, marker=(verts,0)) -# equivalent: -#plt.scatter(x,y,s=80, c=z, marker=None, verts=verts) - -plt.subplot(324) -plt.scatter(x,y,s=80, c=z, marker=(5,1)) - -plt.subplot(325) -plt.scatter(x,y,s=80, c=z, marker='+') - -plt.subplot(326) -plt.scatter(x,y,s=80, c=z, marker=(5,2)) - -plt.show() diff --git a/dev/mpl_examples/pylab_examples/scatter_symbol.hires.png b/dev/mpl_examples/pylab_examples/scatter_symbol.hires.png deleted file mode 100644 index 739f5826e7a..00000000000 Binary files a/dev/mpl_examples/pylab_examples/scatter_symbol.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/scatter_symbol.pdf b/dev/mpl_examples/pylab_examples/scatter_symbol.pdf deleted file mode 100644 index 04f5c247799..00000000000 Binary files a/dev/mpl_examples/pylab_examples/scatter_symbol.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/scatter_symbol.png b/dev/mpl_examples/pylab_examples/scatter_symbol.png deleted file mode 100644 index 1d090a6d1d0..00000000000 Binary files a/dev/mpl_examples/pylab_examples/scatter_symbol.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/scatter_symbol.py b/dev/mpl_examples/pylab_examples/scatter_symbol.py deleted file mode 100644 index bc805afbed0..00000000000 --- a/dev/mpl_examples/pylab_examples/scatter_symbol.py +++ /dev/null @@ -1,14 +0,0 @@ -from matplotlib import pyplot as plt -import numpy as np -import matplotlib - -x = np.arange(0.0, 50.0, 2.0) -y = x ** 1.3 + np.random.rand(*x.shape) * 30.0 -s = np.random.rand(*x.shape) * 800 + 500 - -plt.scatter(x, y, s, c="g", alpha=0.5, marker=r'$\clubsuit$', - label="Luck") -plt.xlabel("Leprechauns") -plt.ylabel("Gold") -plt.legend(loc=2) -plt.show() diff --git a/dev/mpl_examples/pylab_examples/set_and_get.hires.png b/dev/mpl_examples/pylab_examples/set_and_get.hires.png deleted file mode 100644 index 844eb45787e..00000000000 Binary files a/dev/mpl_examples/pylab_examples/set_and_get.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/set_and_get.pdf b/dev/mpl_examples/pylab_examples/set_and_get.pdf deleted file mode 100644 index de7970681df..00000000000 Binary files a/dev/mpl_examples/pylab_examples/set_and_get.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/set_and_get.png b/dev/mpl_examples/pylab_examples/set_and_get.png deleted file mode 100644 index cbaa8a130ad..00000000000 Binary files a/dev/mpl_examples/pylab_examples/set_and_get.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/set_and_get.py b/dev/mpl_examples/pylab_examples/set_and_get.py deleted file mode 100644 index 45d92095bce..00000000000 --- a/dev/mpl_examples/pylab_examples/set_and_get.py +++ /dev/null @@ -1,97 +0,0 @@ -""" - -MATLAB and pylab allow you to use setp and get to set and get -object properties, as well as to do introspection on the object - -set - To set the linestyle of a line to be dashed, you can do - - >>> line, = plot([1,2,3]) - >>> setp(line, linestyle='--') - - If you want to know the valid types of arguments, you can provide the - name of the property you want to set without a value - - >>> setp(line, 'linestyle') - linestyle: [ '-' | '--' | '-.' | ':' | 'steps' | 'None' ] - - If you want to see all the properties that can be set, and their - possible values, you can do - - >>> setp(line) - - set operates on a single instance or a list of instances. If you are - in query mode introspecting the possible values, only the first - instance in the sequence is used. When actually setting values, all - the instances will be set. e.g., suppose you have a list of two lines, - the following will make both lines thicker and red - - >>> x = arange(0,1.0,0.01) - >>> y1 = sin(2*pi*x) - >>> y2 = sin(4*pi*x) - >>> lines = plot(x, y1, x, y2) - >>> setp(lines, linewidth=2, color='r') - - -get: - - get returns the value of a given attribute. You can use get to query - the value of a single attribute - - >>> getp(line, 'linewidth') - 0.5 - - or all the attribute/value pairs - - >>> getp(line) - aa = True - alpha = 1.0 - antialiased = True - c = b - clip_on = True - color = b - ... long listing skipped ... - -Aliases: - - To reduce keystrokes in interactive mode, a number of properties - have short aliases, eg 'lw' for 'linewidth' and 'mec' for - 'markeredgecolor'. When calling set or get in introspection mode, - these properties will be listed as 'fullname or aliasname', as in - - - - -""" - -from __future__ import print_function -from pylab import * - - -x = arange(0,1.0,0.01) -y1 = sin(2*pi*x) -y2 = sin(4*pi*x) -lines = plot(x, y1, x, y2) -l1, l2 = lines -setp(lines, linestyle='--') # set both to dashed -setp(l1, linewidth=2, color='r') # line1 is thick and red -setp(l2, linewidth=1, color='g') # line2 is thicker and green - - -print ('Line setters') -setp(l1) -print ('Line getters') -getp(l1) - -print ('Rectangle setters') -setp(gca().patch) -print ('Rectangle getters') -getp(gca().patch) - -t = title('Hi mom') -print ('Text setters') -setp(t) -print ('Text getters') -getp(t) - -show() diff --git a/dev/mpl_examples/pylab_examples/shading_example.hires.png b/dev/mpl_examples/pylab_examples/shading_example.hires.png deleted file mode 100644 index 685fffe75d2..00000000000 Binary files a/dev/mpl_examples/pylab_examples/shading_example.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/shading_example.pdf b/dev/mpl_examples/pylab_examples/shading_example.pdf deleted file mode 100644 index a74beb6f810..00000000000 Binary files a/dev/mpl_examples/pylab_examples/shading_example.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/shading_example.png b/dev/mpl_examples/pylab_examples/shading_example.png deleted file mode 100644 index 76f24772314..00000000000 Binary files a/dev/mpl_examples/pylab_examples/shading_example.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/shading_example.py b/dev/mpl_examples/pylab_examples/shading_example.py deleted file mode 100644 index c71395e33d5..00000000000 --- a/dev/mpl_examples/pylab_examples/shading_example.py +++ /dev/null @@ -1,28 +0,0 @@ -import numpy as np -import matplotlib.pyplot as plt -from matplotlib.colors import LightSource - -# example showing how to make shaded relief plots -# like Mathematica -# (http://reference.wolfram.com/mathematica/ref/ReliefPlot.html) -# or Generic Mapping Tools -# (http://gmt.soest.hawaii.edu/gmt/doc/gmt/html/GMT_Docs/node145.html) - -# test data -X,Y=np.mgrid[-5:5:0.05,-5:5:0.05] -Z=np.sqrt(X**2+Y**2)+np.sin(X**2+Y**2) -# create light source object. -ls = LightSource(azdeg=0,altdeg=65) -# shade data, creating an rgb array. -rgb = ls.shade(Z,plt.cm.copper) -# plot un-shaded and shaded images. -plt.figure(figsize=(12,5)) -plt.subplot(121) -plt.imshow(Z,cmap=plt.cm.copper) -plt.title('imshow') -plt.xticks([]); plt.yticks([]) -plt.subplot(122) -plt.imshow(rgb) -plt.title('imshow with shading') -plt.xticks([]); plt.yticks([]) -plt.show() diff --git a/dev/mpl_examples/pylab_examples/shared_axis_demo.hires.png b/dev/mpl_examples/pylab_examples/shared_axis_demo.hires.png deleted file mode 100644 index e9dfd904b24..00000000000 Binary files a/dev/mpl_examples/pylab_examples/shared_axis_demo.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/shared_axis_demo.pdf b/dev/mpl_examples/pylab_examples/shared_axis_demo.pdf deleted file mode 100644 index fc7c51cdeac..00000000000 Binary files a/dev/mpl_examples/pylab_examples/shared_axis_demo.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/shared_axis_demo.png b/dev/mpl_examples/pylab_examples/shared_axis_demo.png deleted file mode 100644 index 74f3f3dc7db..00000000000 Binary files a/dev/mpl_examples/pylab_examples/shared_axis_demo.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/shared_axis_demo.py b/dev/mpl_examples/pylab_examples/shared_axis_demo.py deleted file mode 100644 index c432552489e..00000000000 --- a/dev/mpl_examples/pylab_examples/shared_axis_demo.py +++ /dev/null @@ -1,52 +0,0 @@ -""" -You can share the x or y axis limits for one axis with another by -passing an axes instance as a sharex or sharey kwarg. - -Changing the axis limits on one axes will be reflected automatically -in the other, and vice-versa, so when you navigate with the toolbar -the axes will follow each other on their shared axes. Ditto for -changes in the axis scaling (eg log vs linear). However, it is -possible to have differences in tick labeling, eg you can selectively -turn off the tick labels on one axes. - -The example below shows how to customize the tick labels on the -various axes. Shared axes share the tick locator, tick formatter, -view limits, and transformation (eg log, linear). But the ticklabels -themselves do not share properties. This is a feature and not a bug, -because you may want to make the tick labels smaller on the upper -axes, eg in the example below. - -If you want to turn off the ticklabels for a given axes (eg on -subplot(211) or subplot(212), you cannot do the standard trick - - setp(ax2, xticklabels=[]) - -because this changes the tick Formatter, which is shared among all -axes. But you can alter the visibility of the labels, which is a -property - - setp( ax2.get_xticklabels(), visible=False) - - -""" -from pylab import * - -t = arange(0.01, 5.0, 0.01) -s1 = sin(2*pi*t) -s2 = exp(-t) -s3 = sin(4*pi*t) -ax1 = subplot(311) -plot(t,s1) -setp( ax1.get_xticklabels(), fontsize=6) - -## share x only -ax2 = subplot(312, sharex=ax1) -plot(t, s2) -# make these tick labels invisible -setp( ax2.get_xticklabels(), visible=False) - -# share x and y -ax3 = subplot(313, sharex=ax1, sharey=ax1) -plot(t, s3) -xlim(0.01,5.0) -show() diff --git a/dev/mpl_examples/pylab_examples/show_colormaps.hires.png b/dev/mpl_examples/pylab_examples/show_colormaps.hires.png deleted file mode 100644 index 62de63e7d4d..00000000000 Binary files a/dev/mpl_examples/pylab_examples/show_colormaps.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/show_colormaps.pdf b/dev/mpl_examples/pylab_examples/show_colormaps.pdf deleted file mode 100644 index 9bbc9837647..00000000000 Binary files a/dev/mpl_examples/pylab_examples/show_colormaps.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/show_colormaps.png b/dev/mpl_examples/pylab_examples/show_colormaps.png deleted file mode 100644 index 26707cf6722..00000000000 Binary files a/dev/mpl_examples/pylab_examples/show_colormaps.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/show_colormaps.py b/dev/mpl_examples/pylab_examples/show_colormaps.py deleted file mode 100644 index 0146a93c07e..00000000000 --- a/dev/mpl_examples/pylab_examples/show_colormaps.py +++ /dev/null @@ -1,25 +0,0 @@ -# This example comes from the Cookbook on www.scipy.org. According to the -# history, Andrew Straw did the conversion from an old page, but it is -# unclear who the original author is. -import numpy as np -import matplotlib.pyplot as plt - -a = np.linspace(0, 1, 256).reshape(1,-1) -a = np.vstack((a,a)) - -# Get a list of the colormaps in matplotlib. Ignore the ones that end with -# '_r' because these are simply reversed versions of ones that don't end -# with '_r' -maps = sorted(m for m in plt.cm.datad if not m.endswith("_r")) -nmaps = len(maps) + 1 - -fig = plt.figure(figsize=(5,10)) -fig.subplots_adjust(top=0.99, bottom=0.01, left=0.2, right=0.99) -for i,m in enumerate(maps): - ax = plt.subplot(nmaps, 1, i+1) - plt.axis("off") - plt.imshow(a, aspect='auto', cmap=plt.get_cmap(m), origin='lower') - pos = list(ax.get_position().bounds) - fig.text(pos[0] - 0.01, pos[1], m, fontsize=10, horizontalalignment='right') - -plt.show() diff --git a/dev/mpl_examples/pylab_examples/simple_plot.hires.png b/dev/mpl_examples/pylab_examples/simple_plot.hires.png deleted file mode 100644 index 0223b92f64f..00000000000 Binary files a/dev/mpl_examples/pylab_examples/simple_plot.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/simple_plot.pdf b/dev/mpl_examples/pylab_examples/simple_plot.pdf deleted file mode 100644 index e16760a6ed7..00000000000 Binary files a/dev/mpl_examples/pylab_examples/simple_plot.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/simple_plot.png b/dev/mpl_examples/pylab_examples/simple_plot.png deleted file mode 100644 index 73856a283c8..00000000000 Binary files a/dev/mpl_examples/pylab_examples/simple_plot.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/simple_plot.py b/dev/mpl_examples/pylab_examples/simple_plot.py deleted file mode 100644 index 972a6d78a6e..00000000000 --- a/dev/mpl_examples/pylab_examples/simple_plot.py +++ /dev/null @@ -1,12 +0,0 @@ -from pylab import * - -t = arange(0.0, 2.0, 0.01) -s = sin(2*pi*t) -plot(t, s, linewidth=1.0) - -xlabel('time (s)') -ylabel('voltage (mV)') -title('About as simple as it gets, folks') -grid(True) -savefig("test.png") -show() diff --git a/dev/mpl_examples/pylab_examples/specgram_demo.hires.png b/dev/mpl_examples/pylab_examples/specgram_demo.hires.png deleted file mode 100644 index e9bb64c27bb..00000000000 Binary files a/dev/mpl_examples/pylab_examples/specgram_demo.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/specgram_demo.pdf b/dev/mpl_examples/pylab_examples/specgram_demo.pdf deleted file mode 100644 index da4a068600e..00000000000 Binary files a/dev/mpl_examples/pylab_examples/specgram_demo.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/specgram_demo.png b/dev/mpl_examples/pylab_examples/specgram_demo.png deleted file mode 100644 index 18ee49b8a36..00000000000 Binary files a/dev/mpl_examples/pylab_examples/specgram_demo.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/specgram_demo.py b/dev/mpl_examples/pylab_examples/specgram_demo.py deleted file mode 100644 index 70c1a650dd4..00000000000 --- a/dev/mpl_examples/pylab_examples/specgram_demo.py +++ /dev/null @@ -1,30 +0,0 @@ -#!/usr/bin/env python -from pylab import * - -dt = 0.0005 -t = arange(0.0, 20.0, dt) -s1 = sin(2*pi*100*t) -s2 = 2*sin(2*pi*400*t) - -# create a transient "chirp" -mask = where(logical_and(t>10, t<12), 1.0, 0.0) -s2 = s2 * mask - -# add some noise into the mix -nse = 0.01*randn(len(t)) - -x = s1 + s2 + nse # the signal -NFFT = 1024 # the length of the windowing segments -Fs = int(1.0/dt) # the sampling frequency - -# Pxx is the segments x freqs array of instantaneous power, freqs is -# the frequency vector, bins are the centers of the time bins in which -# the power is computed, and im is the matplotlib.image.AxesImage -# instance - -ax1 = subplot(211) -plot(t, x) -subplot(212, sharex=ax1) -Pxx, freqs, bins, im = specgram(x, NFFT=NFFT, Fs=Fs, noverlap=900, - cmap=cm.gist_heat) -show() diff --git a/dev/mpl_examples/pylab_examples/spine_placement_demo.py b/dev/mpl_examples/pylab_examples/spine_placement_demo.py deleted file mode 100644 index 42f925371c4..00000000000 --- a/dev/mpl_examples/pylab_examples/spine_placement_demo.py +++ /dev/null @@ -1,100 +0,0 @@ -import numpy as np -import matplotlib.pyplot as plt - - -fig = plt.figure() -x = np.linspace(-np.pi,np.pi,100) -y = 2*np.sin(x) - -ax = fig.add_subplot(2,2,1) -ax.set_title('centered spines') -ax.plot(x,y) -ax.spines['left'].set_position('center') -ax.spines['right'].set_color('none') -ax.spines['bottom'].set_position('center') -ax.spines['top'].set_color('none') -ax.spines['left'].set_smart_bounds(True) -ax.spines['bottom'].set_smart_bounds(True) -ax.xaxis.set_ticks_position('bottom') -ax.yaxis.set_ticks_position('left') - -ax = fig.add_subplot(2,2,2) -ax.set_title('zeroed spines') -ax.plot(x,y) -ax.spines['left'].set_position('zero') -ax.spines['right'].set_color('none') -ax.spines['bottom'].set_position('zero') -ax.spines['top'].set_color('none') -ax.spines['left'].set_smart_bounds(True) -ax.spines['bottom'].set_smart_bounds(True) -ax.xaxis.set_ticks_position('bottom') -ax.yaxis.set_ticks_position('left') - -ax = fig.add_subplot(2,2,3) -ax.set_title('spines at axes (0.6, 0.1)') -ax.plot(x,y) -ax.spines['left'].set_position(('axes',0.6)) -ax.spines['right'].set_color('none') -ax.spines['bottom'].set_position(('axes',0.1)) -ax.spines['top'].set_color('none') -ax.spines['left'].set_smart_bounds(True) -ax.spines['bottom'].set_smart_bounds(True) -ax.xaxis.set_ticks_position('bottom') -ax.yaxis.set_ticks_position('left') - -ax = fig.add_subplot(2,2,4) -ax.set_title('spines at data (1,2)') -ax.plot(x,y) -ax.spines['left'].set_position(('data',1)) -ax.spines['right'].set_color('none') -ax.spines['bottom'].set_position(('data',2)) -ax.spines['top'].set_color('none') -ax.spines['left'].set_smart_bounds(True) -ax.spines['bottom'].set_smart_bounds(True) -ax.xaxis.set_ticks_position('bottom') -ax.yaxis.set_ticks_position('left') -# ---------------------------------------------------- - -def adjust_spines(ax,spines): - for loc, spine in ax.spines.items(): - if loc in spines: - spine.set_position(('outward',10)) # outward by 10 points - spine.set_smart_bounds(True) - else: - spine.set_color('none') # don't draw spine - - # turn off ticks where there is no spine - if 'left' in spines: - ax.yaxis.set_ticks_position('left') - else: - # no yaxis ticks - ax.yaxis.set_ticks([]) - - if 'bottom' in spines: - ax.xaxis.set_ticks_position('bottom') - else: - # no xaxis ticks - ax.xaxis.set_ticks([]) - -fig = plt.figure() - -x = np.linspace(0,2*np.pi,100) -y = 2*np.sin(x) - -ax = fig.add_subplot(2,2,1) -ax.plot(x,y) -adjust_spines(ax,['left']) - -ax = fig.add_subplot(2,2,2) -ax.plot(x,y) -adjust_spines(ax,[]) - -ax = fig.add_subplot(2,2,3) -ax.plot(x,y) -adjust_spines(ax,['left','bottom']) - -ax = fig.add_subplot(2,2,4) -ax.plot(x,y) -adjust_spines(ax,['bottom']) - -plt.show() diff --git a/dev/mpl_examples/pylab_examples/spine_placement_demo_00.hires.png b/dev/mpl_examples/pylab_examples/spine_placement_demo_00.hires.png deleted file mode 100644 index 0eb9507b893..00000000000 Binary files a/dev/mpl_examples/pylab_examples/spine_placement_demo_00.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/spine_placement_demo_00.pdf b/dev/mpl_examples/pylab_examples/spine_placement_demo_00.pdf deleted file mode 100644 index 22b7a415412..00000000000 Binary files a/dev/mpl_examples/pylab_examples/spine_placement_demo_00.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/spine_placement_demo_00.png b/dev/mpl_examples/pylab_examples/spine_placement_demo_00.png deleted file mode 100644 index 38d0d43e927..00000000000 Binary files a/dev/mpl_examples/pylab_examples/spine_placement_demo_00.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/spine_placement_demo_01.hires.png b/dev/mpl_examples/pylab_examples/spine_placement_demo_01.hires.png deleted file mode 100644 index 58522ee7b49..00000000000 Binary files a/dev/mpl_examples/pylab_examples/spine_placement_demo_01.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/spine_placement_demo_01.pdf b/dev/mpl_examples/pylab_examples/spine_placement_demo_01.pdf deleted file mode 100644 index fdd03a94042..00000000000 Binary files a/dev/mpl_examples/pylab_examples/spine_placement_demo_01.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/spine_placement_demo_01.png b/dev/mpl_examples/pylab_examples/spine_placement_demo_01.png deleted file mode 100644 index 9625e4c3092..00000000000 Binary files a/dev/mpl_examples/pylab_examples/spine_placement_demo_01.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/spine_placement_demo_02.hires.png b/dev/mpl_examples/pylab_examples/spine_placement_demo_02.hires.png deleted file mode 100644 index 111bead2ffb..00000000000 Binary files a/dev/mpl_examples/pylab_examples/spine_placement_demo_02.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/spine_placement_demo_02.pdf b/dev/mpl_examples/pylab_examples/spine_placement_demo_02.pdf deleted file mode 100644 index 2eb037c6237..00000000000 Binary files a/dev/mpl_examples/pylab_examples/spine_placement_demo_02.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/spine_placement_demo_02.png b/dev/mpl_examples/pylab_examples/spine_placement_demo_02.png deleted file mode 100644 index dd0a721e1b5..00000000000 Binary files a/dev/mpl_examples/pylab_examples/spine_placement_demo_02.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/spine_placement_demo_03.hires.png b/dev/mpl_examples/pylab_examples/spine_placement_demo_03.hires.png deleted file mode 100644 index 6b3cde59bd4..00000000000 Binary files a/dev/mpl_examples/pylab_examples/spine_placement_demo_03.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/spine_placement_demo_03.pdf b/dev/mpl_examples/pylab_examples/spine_placement_demo_03.pdf deleted file mode 100644 index d19089ed921..00000000000 Binary files a/dev/mpl_examples/pylab_examples/spine_placement_demo_03.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/spine_placement_demo_03.png b/dev/mpl_examples/pylab_examples/spine_placement_demo_03.png deleted file mode 100644 index 1e99f531180..00000000000 Binary files a/dev/mpl_examples/pylab_examples/spine_placement_demo_03.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/spy_demos.hires.png b/dev/mpl_examples/pylab_examples/spy_demos.hires.png deleted file mode 100644 index c7e24be3b1c..00000000000 Binary files a/dev/mpl_examples/pylab_examples/spy_demos.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/spy_demos.pdf b/dev/mpl_examples/pylab_examples/spy_demos.pdf deleted file mode 100644 index d38416e8560..00000000000 Binary files a/dev/mpl_examples/pylab_examples/spy_demos.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/spy_demos.png b/dev/mpl_examples/pylab_examples/spy_demos.png deleted file mode 100644 index 4127d246e83..00000000000 Binary files a/dev/mpl_examples/pylab_examples/spy_demos.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/spy_demos.py b/dev/mpl_examples/pylab_examples/spy_demos.py deleted file mode 100644 index 72192359911..00000000000 --- a/dev/mpl_examples/pylab_examples/spy_demos.py +++ /dev/null @@ -1,24 +0,0 @@ -""" -Plot the sparsity pattern of arrays -""" - -from matplotlib.pyplot import figure, show -import numpy - -fig = figure() -ax1 = fig.add_subplot(221) -ax2 = fig.add_subplot(222) -ax3 = fig.add_subplot(223) -ax4 = fig.add_subplot(224) - -x = numpy.random.randn(20,20) -x[5] = 0. -x[:,12] = 0. - -ax1.spy(x, markersize=5) -ax2.spy(x, precision=0.1, markersize=5) - -ax3.spy(x) -ax4.spy(x, precision=0.1) - -show() diff --git a/dev/mpl_examples/pylab_examples/stackplot_demo.py b/dev/mpl_examples/pylab_examples/stackplot_demo.py deleted file mode 100644 index 0148dd8430a..00000000000 --- a/dev/mpl_examples/pylab_examples/stackplot_demo.py +++ /dev/null @@ -1,18 +0,0 @@ -import numpy as np -from matplotlib import pyplot as plt - -fnx = lambda : np.random.randint(5, 50, 10) -y = np.row_stack((fnx(), fnx(), fnx())) -x = np.arange(10) - -y1, y2, y3 = fnx(), fnx(), fnx() - -fig = plt.figure() -ax = fig.add_subplot(111) -ax.stackplot(x, y) -plt.show() - -fig = plt.figure() -ax = fig.add_subplot(111) -ax.stackplot(x, y1, y2, y3) -plt.show() diff --git a/dev/mpl_examples/pylab_examples/stackplot_demo2.hires.png b/dev/mpl_examples/pylab_examples/stackplot_demo2.hires.png deleted file mode 100644 index a9b97377357..00000000000 Binary files a/dev/mpl_examples/pylab_examples/stackplot_demo2.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/stackplot_demo2.pdf b/dev/mpl_examples/pylab_examples/stackplot_demo2.pdf deleted file mode 100644 index 782590abab2..00000000000 Binary files a/dev/mpl_examples/pylab_examples/stackplot_demo2.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/stackplot_demo2.png b/dev/mpl_examples/pylab_examples/stackplot_demo2.png deleted file mode 100644 index 0da5cb7dc00..00000000000 Binary files a/dev/mpl_examples/pylab_examples/stackplot_demo2.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/stackplot_demo2.py b/dev/mpl_examples/pylab_examples/stackplot_demo2.py deleted file mode 100644 index f3b2eefcce0..00000000000 --- a/dev/mpl_examples/pylab_examples/stackplot_demo2.py +++ /dev/null @@ -1,26 +0,0 @@ -import numpy as np -import matplotlib.pyplot as plt - -np.random.seed(0) -def layers(n, m): - """ - Return *n* random Gaussian mixtures, each of length *m*. - """ - def bump(a): - x = 1 / (.1 + np.random.random()) - y = 2 * np.random.random() - .5 - z = 10 / (.1 + np.random.random()) - for i in range(m): - w = (i / float(m) - y) * z - a[i] += x * np.exp(-w * w) - a = np.zeros((m, n)) - for i in range(n): - for j in range(5): - bump(a[:, i]) - return a - -d = layers(3, 100) - -plt.subplots() -plt.stackplot(range(100), d.T, baseline='wiggle') -plt.show() diff --git a/dev/mpl_examples/pylab_examples/stackplot_demo_00_00.hires.png b/dev/mpl_examples/pylab_examples/stackplot_demo_00_00.hires.png deleted file mode 100644 index b16036f4186..00000000000 Binary files a/dev/mpl_examples/pylab_examples/stackplot_demo_00_00.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/stackplot_demo_00_00.pdf b/dev/mpl_examples/pylab_examples/stackplot_demo_00_00.pdf deleted file mode 100644 index d3b92683d47..00000000000 Binary files a/dev/mpl_examples/pylab_examples/stackplot_demo_00_00.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/stackplot_demo_00_00.png b/dev/mpl_examples/pylab_examples/stackplot_demo_00_00.png deleted file mode 100644 index 7a9962cc152..00000000000 Binary files a/dev/mpl_examples/pylab_examples/stackplot_demo_00_00.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/stackplot_demo_01_00.hires.png b/dev/mpl_examples/pylab_examples/stackplot_demo_01_00.hires.png deleted file mode 100644 index e74ade6d0d9..00000000000 Binary files a/dev/mpl_examples/pylab_examples/stackplot_demo_01_00.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/stackplot_demo_01_00.pdf b/dev/mpl_examples/pylab_examples/stackplot_demo_01_00.pdf deleted file mode 100644 index ee1cfaf24f4..00000000000 Binary files a/dev/mpl_examples/pylab_examples/stackplot_demo_01_00.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/stackplot_demo_01_00.png b/dev/mpl_examples/pylab_examples/stackplot_demo_01_00.png deleted file mode 100644 index 5bb139833f8..00000000000 Binary files a/dev/mpl_examples/pylab_examples/stackplot_demo_01_00.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/stem_plot.hires.png b/dev/mpl_examples/pylab_examples/stem_plot.hires.png deleted file mode 100644 index 5bc39330be5..00000000000 Binary files a/dev/mpl_examples/pylab_examples/stem_plot.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/stem_plot.pdf b/dev/mpl_examples/pylab_examples/stem_plot.pdf deleted file mode 100644 index 25bca89f465..00000000000 Binary files a/dev/mpl_examples/pylab_examples/stem_plot.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/stem_plot.png b/dev/mpl_examples/pylab_examples/stem_plot.png deleted file mode 100644 index e3a67fd173f..00000000000 Binary files a/dev/mpl_examples/pylab_examples/stem_plot.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/stem_plot.py b/dev/mpl_examples/pylab_examples/stem_plot.py deleted file mode 100644 index 11d4e2a59c7..00000000000 --- a/dev/mpl_examples/pylab_examples/stem_plot.py +++ /dev/null @@ -1,9 +0,0 @@ -#!/usr/bin/env python -from pylab import * - -x = linspace(0.1, 2*pi, 10) -markerline, stemlines, baseline = stem(x, cos(x), '-.') -setp(markerline, 'markerfacecolor', 'b') -setp(baseline, 'color','r', 'linewidth', 2) - -show() diff --git a/dev/mpl_examples/pylab_examples/step_demo.hires.png b/dev/mpl_examples/pylab_examples/step_demo.hires.png deleted file mode 100644 index 56cb2c427b0..00000000000 Binary files a/dev/mpl_examples/pylab_examples/step_demo.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/step_demo.pdf b/dev/mpl_examples/pylab_examples/step_demo.pdf deleted file mode 100644 index 1b6ef5a7a18..00000000000 Binary files a/dev/mpl_examples/pylab_examples/step_demo.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/step_demo.png b/dev/mpl_examples/pylab_examples/step_demo.png deleted file mode 100644 index 01a08d687fe..00000000000 Binary files a/dev/mpl_examples/pylab_examples/step_demo.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/step_demo.py b/dev/mpl_examples/pylab_examples/step_demo.py deleted file mode 100644 index a6cae14abeb..00000000000 --- a/dev/mpl_examples/pylab_examples/step_demo.py +++ /dev/null @@ -1,26 +0,0 @@ -import numpy as np -from numpy import ma -from matplotlib.pyplot import step, legend, xlim, ylim, show - -x = np.arange(1, 7, 0.4) -y0 = np.sin(x) -y = y0.copy() + 2.5 - -step(x, y, label='pre (default)') - -y -= 0.5 -step(x, y, where='mid', label='mid') - -y -= 0.5 -step(x, y, where='post', label='post') - -y = ma.masked_where((y0>-0.15)&(y0<0.15), y - 0.5) -step(x,y, label='masked (pre)') - -legend() - -xlim(0, 7) -ylim(-0.5, 4) - -show() - diff --git a/dev/mpl_examples/pylab_examples/stix_fonts_demo.hires.png b/dev/mpl_examples/pylab_examples/stix_fonts_demo.hires.png deleted file mode 100644 index 3c03e69ffac..00000000000 Binary files a/dev/mpl_examples/pylab_examples/stix_fonts_demo.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/stix_fonts_demo.pdf b/dev/mpl_examples/pylab_examples/stix_fonts_demo.pdf deleted file mode 100644 index ec8f8444929..00000000000 Binary files a/dev/mpl_examples/pylab_examples/stix_fonts_demo.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/stix_fonts_demo.png b/dev/mpl_examples/pylab_examples/stix_fonts_demo.png deleted file mode 100644 index e6dc3c023d6..00000000000 Binary files a/dev/mpl_examples/pylab_examples/stix_fonts_demo.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/stix_fonts_demo.py b/dev/mpl_examples/pylab_examples/stix_fonts_demo.py deleted file mode 100644 index 00aec826a95..00000000000 --- a/dev/mpl_examples/pylab_examples/stix_fonts_demo.py +++ /dev/null @@ -1,57 +0,0 @@ -#!/usr/bin/env python - -from __future__ import unicode_literals - -import os, sys, re - -import gc - -stests = [ - r'$\mathcircled{123} \mathrm{\mathcircled{123}} \mathbf{\mathcircled{123}}$', - r'$\mathsf{Sans \Omega} \mathrm{\mathsf{Sans \Omega}} \mathbf{\mathsf{Sans \Omega}}$', - r'$\mathtt{Monospace}$', - r'$\mathcal{CALLIGRAPHIC}$', - r'$\mathbb{Blackboard \pi}$', - r'$\mathrm{\mathbb{Blackboard \pi}}$', - r'$\mathbf{\mathbb{Blackboard \pi}}$', - r'$\mathfrak{Fraktur} \mathbf{\mathfrak{Fraktur}}$', - r'$\mathscr{Script}$'] - -if sys.maxunicode > 0xffff: - s = r'Direct Unicode: $\u23ce \mathrm{\ue0f2 \U0001D538}$' - -from pylab import * - -def doall(): - tests = stests - - figure(figsize=(8, (len(tests) * 1) + 2)) - plot([0, 0], 'r') - grid(False) - axis([0, 3, -len(tests), 0]) - yticks(arange(len(tests)) * -1) - for i, s in enumerate(tests): - #print (i, s.encode("ascii", "backslashreplace")) - text(0.1, -i, s, fontsize=32) - - savefig('stix_fonts_example') - #close('all') - show() - -if '--latex' in sys.argv: - fd = open("stix_fonts_examples.ltx", "w") - fd.write("\\documentclass{article}\n") - fd.write("\\begin{document}\n") - fd.write("\\begin{enumerate}\n") - - for i, s in enumerate(stests): - s = re.sub(r"(?3 might result in a very high number of triangles - # for the refine mesh: new triangles numbering = (4**subdiv)*ntri - -init_mask_frac = 0.0 # Float > 0. adjusting the proportion of - # (invalid) initial triangles which will be masked - # out. Enter 0 for no mask. - -min_circle_ratio = .01 # Minimum circle ratio - border triangles with circle - # ratio below this will be masked if they touch a - # border. Suggested value 0.01 ; Use -1 to keep - # all triangles. - -# Random points -random_gen = np.random.mtrand.RandomState(seed=127260) -x_test = random_gen.uniform(-1., 1., size=n_test) -y_test = random_gen.uniform(-1., 1., size=n_test) -z_test = experiment_res(x_test, y_test) - -# meshing with Delaunay triangulation -tri = Triangulation(x_test, y_test) -ntri = tri.triangles.shape[0] - -# Some invalid data are masked out -mask_init = np.zeros(ntri, dtype=np.bool) -masked_tri = random_gen.randint(0, ntri, int(ntri*init_mask_frac)) -mask_init[masked_tri] = True -tri.set_mask(mask_init) - - -#----------------------------------------------------------------------------- -# Improving the triangulation before high-res plots: removing flat triangles -#----------------------------------------------------------------------------- -# masking badly shaped triangles at the border of the triangular mesh. -mask = TriAnalyzer(tri).get_flat_tri_mask(min_circle_ratio) -tri.set_mask(mask) - -# refining the data -refiner = UniformTriRefiner(tri) -tri_refi, z_test_refi = refiner.refine_field(z_test, subdiv=subdiv) - -# analytical 'results' for comparison -z_expected = experiment_res(tri_refi.x, tri_refi.y) - -# for the demo: loading the 'flat' triangles for plot -flat_tri = Triangulation(x_test, y_test) -flat_tri.set_mask(~mask) - - -#----------------------------------------------------------------------------- -# Now the plots -#----------------------------------------------------------------------------- -# User options for plots -plot_tri = True # plot of the base triangulation -plot_masked_tri = True # plot of the excessively flat excluded triangles -plot_refi_tri = False # plot of the refined triangulation -plot_expected = False # plot of the analytical function values for comparison - - -# Graphical options for tricontouring -levels = np.arange(0., 1., 0.025) -cmap = cm.get_cmap(name='Blues', lut=None) - -plt.figure() -plt.gca().set_aspect('equal') -plt.title("Filtering a Delaunay mesh\n" + - "(application to high-resolution tricontouring)") - -# 1) plot of the refined (computed) data countours: -plt.tricontour(tri_refi, z_test_refi, levels=levels, cmap=cmap, - linewidths=[2.0, 0.5, 1.0, 0.5]) -# 2) plot of the expected (analytical) data countours (dashed): -if plot_expected: - plt.tricontour(tri_refi, z_expected, levels=levels, cmap=cmap, - linestyles='--') -# 3) plot of the fine mesh on which interpolation was done: -if plot_refi_tri: - plt.triplot(tri_refi, color='0.97') -# 4) plot of the initial 'coarse' mesh: -if plot_tri: - plt.triplot(tri, color='0.7') -# 4) plot of the unvalidated triangles from naive Delaunay Triangulation: -if plot_masked_tri: - plt.triplot(flat_tri, color='red') - -plt.show() diff --git a/dev/mpl_examples/pylab_examples/tricontour_smooth_user.hires.png b/dev/mpl_examples/pylab_examples/tricontour_smooth_user.hires.png deleted file mode 100644 index 0c5ae639b7f..00000000000 Binary files a/dev/mpl_examples/pylab_examples/tricontour_smooth_user.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/tricontour_smooth_user.pdf b/dev/mpl_examples/pylab_examples/tricontour_smooth_user.pdf deleted file mode 100644 index 4f77c99739f..00000000000 Binary files a/dev/mpl_examples/pylab_examples/tricontour_smooth_user.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/tricontour_smooth_user.png b/dev/mpl_examples/pylab_examples/tricontour_smooth_user.png deleted file mode 100644 index bd9e2b576fa..00000000000 Binary files a/dev/mpl_examples/pylab_examples/tricontour_smooth_user.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/tricontour_smooth_user.py b/dev/mpl_examples/pylab_examples/tricontour_smooth_user.py deleted file mode 100644 index 33551956aa2..00000000000 --- a/dev/mpl_examples/pylab_examples/tricontour_smooth_user.py +++ /dev/null @@ -1,76 +0,0 @@ -""" -Demonstrates high-resolution tricontouring on user-defined triangular grids -with matplotlib.tri.UniformTriRefiner -""" -from matplotlib.tri import Triangulation, UniformTriRefiner -import matplotlib.pyplot as plt -import matplotlib.cm as cm -import numpy as np -import math - - -#----------------------------------------------------------------------------- -# Analytical test function -#----------------------------------------------------------------------------- -def function_z(x, y): - """ A function of 2 variables """ - r1 = np.sqrt((0.5-x)**2 + (0.5-y)**2) - theta1 = np.arctan2(0.5-x, 0.5-y) - r2 = np.sqrt((-x-0.2)**2 + (-y-0.2)**2) - theta2 = np.arctan2(-x-0.2, -y-0.2) - z = -(2*(np.exp((r1/10)**2)-1)*30. * np.cos(7.*theta1) + - (np.exp((r2/10)**2)-1)*30. * np.cos(11.*theta2) + - 0.7*(x**2 + y**2)) - return (np.max(z)-z)/(np.max(z)-np.min(z)) - -#----------------------------------------------------------------------------- -# Creating a Triangulation -#----------------------------------------------------------------------------- -# First create the x and y coordinates of the points. -n_angles = 20 -n_radii = 10 -min_radius = 0.15 -radii = np.linspace(min_radius, 0.95, n_radii) - -angles = np.linspace(0, 2*math.pi, n_angles, endpoint=False) -angles = np.repeat(angles[..., np.newaxis], n_radii, axis=1) -angles[:, 1::2] += math.pi/n_angles - -x = (radii*np.cos(angles)).flatten() -y = (radii*np.sin(angles)).flatten() -z = function_z(x, y) - -# Now create the Triangulation. -# (Creating a Triangulation without specifying the triangles results in the -# Delaunay triangulation of the points.) -triang = Triangulation(x, y) - -# Mask off unwanted triangles. -xmid = x[triang.triangles].mean(axis=1) -ymid = y[triang.triangles].mean(axis=1) -mask = np.where(xmid*xmid + ymid*ymid < min_radius*min_radius, 1, 0) -triang.set_mask(mask) - -#----------------------------------------------------------------------------- -# Refine data -#----------------------------------------------------------------------------- -refiner = UniformTriRefiner(triang) -tri_refi, z_test_refi = refiner.refine_field(z, subdiv=3) - -#----------------------------------------------------------------------------- -# Plot the triangulation and the high-res iso-contours -#----------------------------------------------------------------------------- -plt.figure() -plt.gca().set_aspect('equal') -plt.triplot(triang, lw=0.5, color='white') - -levels = np.arange(0., 1., 0.025) -cmap = cm.get_cmap(name='terrain', lut=None) -plt.tricontourf(tri_refi, z_test_refi, levels=levels, cmap=cmap) -plt.tricontour(tri_refi, z_test_refi, levels=levels, - colors=['0.25', '0.5', '0.5', '0.5', '0.5'], - linewidths=[1.0, 0.5, 0.5, 0.5, 0.5]) - -plt.title("High-resolution tricontouring") - -plt.show() diff --git a/dev/mpl_examples/pylab_examples/tricontour_vs_griddata.hires.png b/dev/mpl_examples/pylab_examples/tricontour_vs_griddata.hires.png deleted file mode 100644 index 185bd1706e9..00000000000 Binary files a/dev/mpl_examples/pylab_examples/tricontour_vs_griddata.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/tricontour_vs_griddata.pdf b/dev/mpl_examples/pylab_examples/tricontour_vs_griddata.pdf deleted file mode 100644 index c4a6028a6c5..00000000000 Binary files a/dev/mpl_examples/pylab_examples/tricontour_vs_griddata.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/tricontour_vs_griddata.png b/dev/mpl_examples/pylab_examples/tricontour_vs_griddata.png deleted file mode 100644 index 83fa6b80ea2..00000000000 Binary files a/dev/mpl_examples/pylab_examples/tricontour_vs_griddata.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/tricontour_vs_griddata.py b/dev/mpl_examples/pylab_examples/tricontour_vs_griddata.py deleted file mode 100644 index a30b23dca76..00000000000 --- a/dev/mpl_examples/pylab_examples/tricontour_vs_griddata.py +++ /dev/null @@ -1,50 +0,0 @@ -""" -Comparison of griddata and tricontour for an unstructured triangular grid. -""" -from __future__ import print_function -import matplotlib.pyplot as plt -import matplotlib.tri as tri -import numpy as np -from numpy.random import uniform, seed -from matplotlib.mlab import griddata -import time - -seed(0) -npts = 200 -ngridx = 100 -ngridy = 200 -x = uniform(-2,2,npts) -y = uniform(-2,2,npts) -z = x*np.exp(-x**2-y**2) - -# griddata and contour. -start = time.clock() -plt.subplot(211) -xi = np.linspace(-2.1,2.1,ngridx) -yi = np.linspace(-2.1,2.1,ngridy) -zi = griddata(x,y,z,xi,yi,interp='linear') -plt.contour(xi,yi,zi,15,linewidths=0.5,colors='k') -plt.contourf(xi,yi,zi,15,cmap=plt.cm.rainbow, - norm=plt.normalize(vmax=abs(zi).max(), vmin=-abs(zi).max())) -plt.colorbar() # draw colorbar -plt.plot(x, y, 'ko', ms=3) -plt.xlim(-2,2) -plt.ylim(-2,2) -plt.title('griddata and contour (%d points, %d grid points)' % (npts, ngridx*ngridy)) -print ('griddata and contour seconds: %f' % (time.clock() - start)) - -# tricontour. -start = time.clock() -plt.subplot(212) -triang = tri.Triangulation(x, y) -plt.tricontour(x, y, z, 15, linewidths=0.5, colors='k') -plt.tricontourf(x, y, z, 15, cmap=plt.cm.rainbow, - norm=plt.normalize(vmax=abs(zi).max(), vmin=-abs(zi).max())) -plt.colorbar() -plt.plot(x, y, 'ko', ms=3) -plt.xlim(-2,2) -plt.ylim(-2,2) -plt.title('tricontour (%d points)' % npts) -print ('tricontour seconds: %f' % (time.clock() - start)) - -plt.show() diff --git a/dev/mpl_examples/pylab_examples/trigradient_demo.hires.png b/dev/mpl_examples/pylab_examples/trigradient_demo.hires.png deleted file mode 100644 index c4b94645c32..00000000000 Binary files a/dev/mpl_examples/pylab_examples/trigradient_demo.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/trigradient_demo.pdf b/dev/mpl_examples/pylab_examples/trigradient_demo.pdf deleted file mode 100644 index 5b7e9d333da..00000000000 Binary files a/dev/mpl_examples/pylab_examples/trigradient_demo.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/trigradient_demo.png b/dev/mpl_examples/pylab_examples/trigradient_demo.png deleted file mode 100644 index a825473180e..00000000000 Binary files a/dev/mpl_examples/pylab_examples/trigradient_demo.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/trigradient_demo.py b/dev/mpl_examples/pylab_examples/trigradient_demo.py deleted file mode 100644 index c8967b5397b..00000000000 --- a/dev/mpl_examples/pylab_examples/trigradient_demo.py +++ /dev/null @@ -1,81 +0,0 @@ -""" -Demonstrates computation of gradient with matplotlib.tri.CubicTriInterpolator. -""" -from matplotlib.tri import Triangulation, UniformTriRefiner,\ - CubicTriInterpolator -import matplotlib.pyplot as plt -import matplotlib.cm as cm -import numpy as np -import math - - -#----------------------------------------------------------------------------- -# Electrical potential of a dipole -#----------------------------------------------------------------------------- -def dipole_potential(x, y): - """ The electric dipole potential V """ - r_sq = x**2 + y**2 - theta = np.arctan2(y, x) - z = np.cos(theta)/r_sq - return (np.max(z)-z) / (np.max(z)-np.min(z)) - - -#----------------------------------------------------------------------------- -# Creating a Triangulation -#----------------------------------------------------------------------------- -# First create the x and y coordinates of the points. -n_angles = 30 -n_radii = 10 -min_radius = 0.2 -radii = np.linspace(min_radius, 0.95, n_radii) - -angles = np.linspace(0, 2*math.pi, n_angles, endpoint=False) -angles = np.repeat(angles[..., np.newaxis], n_radii, axis=1) -angles[:, 1::2] += math.pi/n_angles - -x = (radii*np.cos(angles)).flatten() -y = (radii*np.sin(angles)).flatten() -V = dipole_potential(x, y) - -# Create the Triangulation; no triangles specified so Delaunay triangulation -# created. -triang = Triangulation(x, y) - -# Mask off unwanted triangles. -xmid = x[triang.triangles].mean(axis=1) -ymid = y[triang.triangles].mean(axis=1) -mask = np.where(xmid*xmid + ymid*ymid < min_radius*min_radius, 1, 0) -triang.set_mask(mask) - -#----------------------------------------------------------------------------- -# Refine data - interpolates the electrical potential V -#----------------------------------------------------------------------------- -refiner = UniformTriRefiner(triang) -tri_refi, z_test_refi = refiner.refine_field(V, subdiv=3) - -#----------------------------------------------------------------------------- -# Computes the electrical field (Ex, Ey) as gradient of electrical potential -#----------------------------------------------------------------------------- -tci = CubicTriInterpolator(triang, -V) -# Gradient requested here at the mesh nodes but could be anywhere else: -(Ex, Ey) = tci.gradient(triang.x, triang.y) -E_norm = np.sqrt(Ex**2 + Ey**2) - -#----------------------------------------------------------------------------- -# Plot the triangulation, the potential iso-contours and the vector field -#----------------------------------------------------------------------------- -plt.figure() -plt.gca().set_aspect('equal') -plt.triplot(triang, color='0.8') - -levels = np.arange(0., 1., 0.01) -cmap = cm.get_cmap(name='hot', lut=None) -plt.tricontour(tri_refi, z_test_refi, levels=levels, cmap=cmap, - linewidths=[2.0, 1.0, 1.0, 1.0]) -# Plots direction of the electrical vector field -plt.quiver(triang.x, triang.y, Ex/E_norm, Ey/E_norm, - units='xy', scale=10., zorder=3, color='blue', - width=0.007, headwidth=3., headlength=4.) - -plt.title('Gradient plot: an electrical dipole') -plt.show() diff --git a/dev/mpl_examples/pylab_examples/triinterp_demo.hires.png b/dev/mpl_examples/pylab_examples/triinterp_demo.hires.png deleted file mode 100644 index 4c338a39b7e..00000000000 Binary files a/dev/mpl_examples/pylab_examples/triinterp_demo.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/triinterp_demo.pdf b/dev/mpl_examples/pylab_examples/triinterp_demo.pdf deleted file mode 100644 index dfffca68c01..00000000000 Binary files a/dev/mpl_examples/pylab_examples/triinterp_demo.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/triinterp_demo.png b/dev/mpl_examples/pylab_examples/triinterp_demo.png deleted file mode 100644 index edd774e6f33..00000000000 Binary files a/dev/mpl_examples/pylab_examples/triinterp_demo.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/triinterp_demo.py b/dev/mpl_examples/pylab_examples/triinterp_demo.py deleted file mode 100644 index 70fac4ebf56..00000000000 --- a/dev/mpl_examples/pylab_examples/triinterp_demo.py +++ /dev/null @@ -1,57 +0,0 @@ -""" -Interpolation from triangular grid to quad grid. -""" -import matplotlib.pyplot as plt -import matplotlib.tri as mtri -import numpy as np - -# Create triangulation. -x = np.asarray([0, 1, 2, 3, 0.5, 1.5, 2.5, 1, 2, 1.5]) -y = np.asarray([0, 0, 0, 0, 1.0, 1.0, 1.0, 2, 2, 3.0]) -triangles = [[0, 1, 4], [1, 2, 5], [2, 3, 6], [1, 5, 4], [2, 6, 5], [4, 5, 7], - [5, 6, 8], [5, 8, 7], [7, 8, 9]] -triang = mtri.Triangulation(x, y, triangles) - -# Interpolate to regularly-spaced quad grid. -z = np.cos(1.5*x)*np.cos(1.5*y) -xi, yi = np.meshgrid(np.linspace(0, 3, 20), np.linspace(0, 3, 20)) - -interp_lin = mtri.LinearTriInterpolator(triang, z) -zi_lin = interp_lin(xi, yi) - -interp_cubic_geom = mtri.CubicTriInterpolator(triang, z, kind='geom') -zi_cubic_geom = interp_cubic_geom(xi, yi) - -interp_cubic_min_E = mtri.CubicTriInterpolator(triang, z, kind='min_E') -zi_cubic_min_E = interp_cubic_min_E(xi, yi) - - -# Plot the triangulation. -plt.subplot(221) -plt.tricontourf(triang, z) -plt.triplot(triang, 'ko-') -plt.title('Triangular grid') - -# Plot linear interpolation to quad grid. -plt.subplot(222) -plt.contourf(xi, yi, zi_lin) -plt.plot(xi, yi, 'k-', alpha=0.5) -plt.plot(xi.T, yi.T, 'k-', alpha=0.5) -plt.title("Linear interpolation") - -# Plot cubic interpolation to quad grid, kind=geom -plt.subplot(223) -plt.contourf(xi, yi, zi_cubic_geom) -plt.plot(xi, yi, 'k-', alpha=0.5) -plt.plot(xi.T, yi.T, 'k-', alpha=0.5) -plt.title("Cubic interpolation,\nkind='geom'") - -# Plot cubic interpolation to quad grid, kind=min_E -plt.subplot(224) -plt.contourf(xi, yi, zi_cubic_min_E) -plt.plot(xi, yi, 'k-', alpha=0.5) -plt.plot(xi.T, yi.T, 'k-', alpha=0.5) -plt.title("Cubic interpolation,\nkind='min_E'") - -plt.tight_layout() -plt.show() diff --git a/dev/mpl_examples/pylab_examples/tripcolor_demo.py b/dev/mpl_examples/pylab_examples/tripcolor_demo.py deleted file mode 100644 index f97910af7d8..00000000000 --- a/dev/mpl_examples/pylab_examples/tripcolor_demo.py +++ /dev/null @@ -1,110 +0,0 @@ -""" -Pseudocolor plots of unstructured triangular grids. -""" -import matplotlib.pyplot as plt -import matplotlib.tri as tri -import numpy as np -import math - -# Creating a Triangulation without specifying the triangles results in the -# Delaunay triangulation of the points. - -# First create the x and y coordinates of the points. -n_angles = 36 -n_radii = 8 -min_radius = 0.25 -radii = np.linspace(min_radius, 0.95, n_radii) - -angles = np.linspace(0, 2*math.pi, n_angles, endpoint=False) -angles = np.repeat(angles[...,np.newaxis], n_radii, axis=1) -angles[:,1::2] += math.pi/n_angles - -x = (radii*np.cos(angles)).flatten() -y = (radii*np.sin(angles)).flatten() -z = (np.cos(radii)*np.cos(angles*3.0)).flatten() - -# Create the Triangulation; no triangles so Delaunay triangulation created. -triang = tri.Triangulation(x, y) - -# Mask off unwanted triangles. -xmid = x[triang.triangles].mean(axis=1) -ymid = y[triang.triangles].mean(axis=1) -mask = np.where(xmid*xmid + ymid*ymid < min_radius*min_radius, 1, 0) -triang.set_mask(mask) - -# tripcolor plot. -plt.figure() -plt.gca().set_aspect('equal') -plt.tripcolor(triang, z, shading='flat', cmap=plt.cm.rainbow) -plt.colorbar() -plt.title('tripcolor of Delaunay triangulation, flat shading') - -# Illustrate Gouraud shading. -plt.figure() -plt.gca().set_aspect('equal') -plt.tripcolor(triang, z, shading='gouraud', cmap=plt.cm.rainbow) -plt.colorbar() -plt.title('tripcolor of Delaunay triangulation, gouraud shading') - - -# You can specify your own triangulation rather than perform a Delaunay -# triangulation of the points, where each triangle is given by the indices of -# the three points that make up the triangle, ordered in either a clockwise or -# anticlockwise manner. - -xy = np.asarray([ - [-0.101,0.872],[-0.080,0.883],[-0.069,0.888],[-0.054,0.890],[-0.045,0.897], - [-0.057,0.895],[-0.073,0.900],[-0.087,0.898],[-0.090,0.904],[-0.069,0.907], - [-0.069,0.921],[-0.080,0.919],[-0.073,0.928],[-0.052,0.930],[-0.048,0.942], - [-0.062,0.949],[-0.054,0.958],[-0.069,0.954],[-0.087,0.952],[-0.087,0.959], - [-0.080,0.966],[-0.085,0.973],[-0.087,0.965],[-0.097,0.965],[-0.097,0.975], - [-0.092,0.984],[-0.101,0.980],[-0.108,0.980],[-0.104,0.987],[-0.102,0.993], - [-0.115,1.001],[-0.099,0.996],[-0.101,1.007],[-0.090,1.010],[-0.087,1.021], - [-0.069,1.021],[-0.052,1.022],[-0.052,1.017],[-0.069,1.010],[-0.064,1.005], - [-0.048,1.005],[-0.031,1.005],[-0.031,0.996],[-0.040,0.987],[-0.045,0.980], - [-0.052,0.975],[-0.040,0.973],[-0.026,0.968],[-0.020,0.954],[-0.006,0.947], - [ 0.003,0.935],[ 0.006,0.926],[ 0.005,0.921],[ 0.022,0.923],[ 0.033,0.912], - [ 0.029,0.905],[ 0.017,0.900],[ 0.012,0.895],[ 0.027,0.893],[ 0.019,0.886], - [ 0.001,0.883],[-0.012,0.884],[-0.029,0.883],[-0.038,0.879],[-0.057,0.881], - [-0.062,0.876],[-0.078,0.876],[-0.087,0.872],[-0.030,0.907],[-0.007,0.905], - [-0.057,0.916],[-0.025,0.933],[-0.077,0.990],[-0.059,0.993] ]) -x = xy[:,0]*180/3.14159 -y = xy[:,1]*180/3.14159 - -triangles = np.asarray([ - [67,66, 1],[65, 2,66],[ 1,66, 2],[64, 2,65],[63, 3,64],[60,59,57], - [ 2,64, 3],[ 3,63, 4],[ 0,67, 1],[62, 4,63],[57,59,56],[59,58,56], - [61,60,69],[57,69,60],[ 4,62,68],[ 6, 5, 9],[61,68,62],[69,68,61], - [ 9, 5,70],[ 6, 8, 7],[ 4,70, 5],[ 8, 6, 9],[56,69,57],[69,56,52], - [70,10, 9],[54,53,55],[56,55,53],[68,70, 4],[52,56,53],[11,10,12], - [69,71,68],[68,13,70],[10,70,13],[51,50,52],[13,68,71],[52,71,69], - [12,10,13],[71,52,50],[71,14,13],[50,49,71],[49,48,71],[14,16,15], - [14,71,48],[17,19,18],[17,20,19],[48,16,14],[48,47,16],[47,46,16], - [16,46,45],[23,22,24],[21,24,22],[17,16,45],[20,17,45],[21,25,24], - [27,26,28],[20,72,21],[25,21,72],[45,72,20],[25,28,26],[44,73,45], - [72,45,73],[28,25,29],[29,25,31],[43,73,44],[73,43,40],[72,73,39], - [72,31,25],[42,40,43],[31,30,29],[39,73,40],[42,41,40],[72,33,31], - [32,31,33],[39,38,72],[33,72,38],[33,38,34],[37,35,38],[34,38,35], - [35,37,36] ]) - -xmid = x[triangles].mean(axis=1) -ymid = y[triangles].mean(axis=1) -x0 = -5 -y0 = 52 -zfaces = np.exp(-0.01*( (xmid-x0)*(xmid-x0) + (ymid-y0)*(ymid-y0) )) - -# Rather than create a Triangulation object, can simply pass x, y and triangles -# arrays to tripcolor directly. It would be better to use a Triangulation object -# if the same triangulation was to be used more than once to save duplicated -# calculations. -# Can specify one color value per face rather than one per point by using the -# facecolors kwarg. -plt.figure() -plt.gca().set_aspect('equal') -plt.tripcolor(x, y, triangles, facecolors=zfaces, edgecolors='k') -plt.colorbar() -plt.title('tripcolor of user-specified triangulation') -plt.xlabel('Longitude (degrees)') -plt.ylabel('Latitude (degrees)') - -plt.show() diff --git a/dev/mpl_examples/pylab_examples/tripcolor_demo_00.hires.png b/dev/mpl_examples/pylab_examples/tripcolor_demo_00.hires.png deleted file mode 100644 index c3c2180f4c8..00000000000 Binary files a/dev/mpl_examples/pylab_examples/tripcolor_demo_00.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/tripcolor_demo_00.pdf b/dev/mpl_examples/pylab_examples/tripcolor_demo_00.pdf deleted file mode 100644 index 85d0ab39f44..00000000000 Binary files a/dev/mpl_examples/pylab_examples/tripcolor_demo_00.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/tripcolor_demo_00.png b/dev/mpl_examples/pylab_examples/tripcolor_demo_00.png deleted file mode 100644 index 196b5d4a215..00000000000 Binary files a/dev/mpl_examples/pylab_examples/tripcolor_demo_00.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/tripcolor_demo_01.hires.png b/dev/mpl_examples/pylab_examples/tripcolor_demo_01.hires.png deleted file mode 100644 index ced192083f0..00000000000 Binary files a/dev/mpl_examples/pylab_examples/tripcolor_demo_01.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/tripcolor_demo_01.pdf b/dev/mpl_examples/pylab_examples/tripcolor_demo_01.pdf deleted file mode 100644 index f262fa5f48c..00000000000 Binary files a/dev/mpl_examples/pylab_examples/tripcolor_demo_01.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/tripcolor_demo_01.png b/dev/mpl_examples/pylab_examples/tripcolor_demo_01.png deleted file mode 100644 index 99cf023e915..00000000000 Binary files a/dev/mpl_examples/pylab_examples/tripcolor_demo_01.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/tripcolor_demo_02.hires.png b/dev/mpl_examples/pylab_examples/tripcolor_demo_02.hires.png deleted file mode 100644 index e12cf1879f8..00000000000 Binary files a/dev/mpl_examples/pylab_examples/tripcolor_demo_02.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/tripcolor_demo_02.pdf b/dev/mpl_examples/pylab_examples/tripcolor_demo_02.pdf deleted file mode 100644 index 7ed18cb67d3..00000000000 Binary files a/dev/mpl_examples/pylab_examples/tripcolor_demo_02.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/tripcolor_demo_02.png b/dev/mpl_examples/pylab_examples/tripcolor_demo_02.png deleted file mode 100644 index 25f972c6fb2..00000000000 Binary files a/dev/mpl_examples/pylab_examples/tripcolor_demo_02.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/triplot_demo.py b/dev/mpl_examples/pylab_examples/triplot_demo.py deleted file mode 100644 index 0b68959b884..00000000000 --- a/dev/mpl_examples/pylab_examples/triplot_demo.py +++ /dev/null @@ -1,92 +0,0 @@ -""" -Creating and plotting unstructured triangular grids. -""" -import matplotlib.pyplot as plt -import matplotlib.tri as tri -import numpy as np -import math - -# Creating a Triangulation without specifying the triangles results in the -# Delaunay triangulation of the points. - -# First create the x and y coordinates of the points. -n_angles = 36 -n_radii = 8 -min_radius = 0.25 -radii = np.linspace(min_radius, 0.95, n_radii) - -angles = np.linspace(0, 2*math.pi, n_angles, endpoint=False) -angles = np.repeat(angles[...,np.newaxis], n_radii, axis=1) -angles[:,1::2] += math.pi/n_angles - -x = (radii*np.cos(angles)).flatten() -y = (radii*np.sin(angles)).flatten() - -# Create the Triangulation; no triangles so Delaunay triangulation created. -triang = tri.Triangulation(x, y) - -# Mask off unwanted triangles. -xmid = x[triang.triangles].mean(axis=1) -ymid = y[triang.triangles].mean(axis=1) -mask = np.where(xmid*xmid + ymid*ymid < min_radius*min_radius, 1, 0) -triang.set_mask(mask) - -# Plot the triangulation. -plt.figure() -plt.gca().set_aspect('equal') -plt.triplot(triang, 'bo-') -plt.title('triplot of Delaunay triangulation') - - -# You can specify your own triangulation rather than perform a Delaunay -# triangulation of the points, where each triangle is given by the indices of -# the three points that make up the triangle, ordered in either a clockwise or -# anticlockwise manner. - -xy = np.asarray([ - [-0.101,0.872],[-0.080,0.883],[-0.069,0.888],[-0.054,0.890],[-0.045,0.897], - [-0.057,0.895],[-0.073,0.900],[-0.087,0.898],[-0.090,0.904],[-0.069,0.907], - [-0.069,0.921],[-0.080,0.919],[-0.073,0.928],[-0.052,0.930],[-0.048,0.942], - [-0.062,0.949],[-0.054,0.958],[-0.069,0.954],[-0.087,0.952],[-0.087,0.959], - [-0.080,0.966],[-0.085,0.973],[-0.087,0.965],[-0.097,0.965],[-0.097,0.975], - [-0.092,0.984],[-0.101,0.980],[-0.108,0.980],[-0.104,0.987],[-0.102,0.993], - [-0.115,1.001],[-0.099,0.996],[-0.101,1.007],[-0.090,1.010],[-0.087,1.021], - [-0.069,1.021],[-0.052,1.022],[-0.052,1.017],[-0.069,1.010],[-0.064,1.005], - [-0.048,1.005],[-0.031,1.005],[-0.031,0.996],[-0.040,0.987],[-0.045,0.980], - [-0.052,0.975],[-0.040,0.973],[-0.026,0.968],[-0.020,0.954],[-0.006,0.947], - [ 0.003,0.935],[ 0.006,0.926],[ 0.005,0.921],[ 0.022,0.923],[ 0.033,0.912], - [ 0.029,0.905],[ 0.017,0.900],[ 0.012,0.895],[ 0.027,0.893],[ 0.019,0.886], - [ 0.001,0.883],[-0.012,0.884],[-0.029,0.883],[-0.038,0.879],[-0.057,0.881], - [-0.062,0.876],[-0.078,0.876],[-0.087,0.872],[-0.030,0.907],[-0.007,0.905], - [-0.057,0.916],[-0.025,0.933],[-0.077,0.990],[-0.059,0.993] ]) -x = xy[:,0]*180/3.14159 -y = xy[:,1]*180/3.14159 - -triangles = np.asarray([ - [67,66, 1],[65, 2,66],[ 1,66, 2],[64, 2,65],[63, 3,64],[60,59,57], - [ 2,64, 3],[ 3,63, 4],[ 0,67, 1],[62, 4,63],[57,59,56],[59,58,56], - [61,60,69],[57,69,60],[ 4,62,68],[ 6, 5, 9],[61,68,62],[69,68,61], - [ 9, 5,70],[ 6, 8, 7],[ 4,70, 5],[ 8, 6, 9],[56,69,57],[69,56,52], - [70,10, 9],[54,53,55],[56,55,53],[68,70, 4],[52,56,53],[11,10,12], - [69,71,68],[68,13,70],[10,70,13],[51,50,52],[13,68,71],[52,71,69], - [12,10,13],[71,52,50],[71,14,13],[50,49,71],[49,48,71],[14,16,15], - [14,71,48],[17,19,18],[17,20,19],[48,16,14],[48,47,16],[47,46,16], - [16,46,45],[23,22,24],[21,24,22],[17,16,45],[20,17,45],[21,25,24], - [27,26,28],[20,72,21],[25,21,72],[45,72,20],[25,28,26],[44,73,45], - [72,45,73],[28,25,29],[29,25,31],[43,73,44],[73,43,40],[72,73,39], - [72,31,25],[42,40,43],[31,30,29],[39,73,40],[42,41,40],[72,33,31], - [32,31,33],[39,38,72],[33,72,38],[33,38,34],[37,35,38],[34,38,35], - [35,37,36] ]) - -# Rather than create a Triangulation object, can simply pass x, y and triangles -# arrays to triplot directly. It would be better to use a Triangulation object -# if the same triangulation was to be used more than once to save duplicated -# calculations. -plt.figure() -plt.gca().set_aspect('equal') -plt.triplot(x, y, triangles, 'go-') -plt.title('triplot of user-specified triangulation') -plt.xlabel('Longitude (degrees)') -plt.ylabel('Latitude (degrees)') - -plt.show() diff --git a/dev/mpl_examples/pylab_examples/triplot_demo_00.hires.png b/dev/mpl_examples/pylab_examples/triplot_demo_00.hires.png deleted file mode 100644 index a20953fb662..00000000000 Binary files a/dev/mpl_examples/pylab_examples/triplot_demo_00.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/triplot_demo_00.pdf b/dev/mpl_examples/pylab_examples/triplot_demo_00.pdf deleted file mode 100644 index e40eb87d452..00000000000 Binary files a/dev/mpl_examples/pylab_examples/triplot_demo_00.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/triplot_demo_00.png b/dev/mpl_examples/pylab_examples/triplot_demo_00.png deleted file mode 100644 index 08100a5e41f..00000000000 Binary files a/dev/mpl_examples/pylab_examples/triplot_demo_00.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/triplot_demo_01.hires.png b/dev/mpl_examples/pylab_examples/triplot_demo_01.hires.png deleted file mode 100644 index 6a7d73a44e4..00000000000 Binary files a/dev/mpl_examples/pylab_examples/triplot_demo_01.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/triplot_demo_01.pdf b/dev/mpl_examples/pylab_examples/triplot_demo_01.pdf deleted file mode 100644 index 8186f5a55ed..00000000000 Binary files a/dev/mpl_examples/pylab_examples/triplot_demo_01.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/triplot_demo_01.png b/dev/mpl_examples/pylab_examples/triplot_demo_01.png deleted file mode 100644 index 88b1aafbfc3..00000000000 Binary files a/dev/mpl_examples/pylab_examples/triplot_demo_01.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/unicode_demo.hires.png b/dev/mpl_examples/pylab_examples/unicode_demo.hires.png deleted file mode 100644 index 08068325f44..00000000000 Binary files a/dev/mpl_examples/pylab_examples/unicode_demo.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/unicode_demo.pdf b/dev/mpl_examples/pylab_examples/unicode_demo.pdf deleted file mode 100644 index 34f880984bf..00000000000 Binary files a/dev/mpl_examples/pylab_examples/unicode_demo.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/unicode_demo.png b/dev/mpl_examples/pylab_examples/unicode_demo.png deleted file mode 100644 index 897b12e2638..00000000000 Binary files a/dev/mpl_examples/pylab_examples/unicode_demo.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/unicode_demo.py b/dev/mpl_examples/pylab_examples/unicode_demo.py deleted file mode 100644 index bba623482a2..00000000000 --- a/dev/mpl_examples/pylab_examples/unicode_demo.py +++ /dev/null @@ -1,15 +0,0 @@ -#!/usr/bin/python -# -*- coding: utf-8 -*- - -from __future__ import unicode_literals - -import pylab - -pylab.plot([1, 2, 4]) -pylab.title('Développés et fabriqués') -pylab.xlabel("réactivité nous permettent d'être sélectionnés et adoptés") -pylab.ylabel('André was here!') -pylab.text( 0.5, 2.5, 'Institut für Festkörperphysik', rotation=45) -pylab.text( 1, 1.5, 'AVA (check kerning)') - -pylab.show() diff --git a/dev/mpl_examples/pylab_examples/usetex_baseline_test.hires.png b/dev/mpl_examples/pylab_examples/usetex_baseline_test.hires.png deleted file mode 100644 index 8bcbe13faa2..00000000000 Binary files a/dev/mpl_examples/pylab_examples/usetex_baseline_test.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/usetex_baseline_test.pdf b/dev/mpl_examples/pylab_examples/usetex_baseline_test.pdf deleted file mode 100644 index f8ba782996b..00000000000 Binary files a/dev/mpl_examples/pylab_examples/usetex_baseline_test.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/usetex_baseline_test.png b/dev/mpl_examples/pylab_examples/usetex_baseline_test.png deleted file mode 100644 index fd110c9d1ea..00000000000 Binary files a/dev/mpl_examples/pylab_examples/usetex_baseline_test.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/usetex_baseline_test.py b/dev/mpl_examples/pylab_examples/usetex_baseline_test.py deleted file mode 100644 index 45273d9483e..00000000000 --- a/dev/mpl_examples/pylab_examples/usetex_baseline_test.py +++ /dev/null @@ -1,80 +0,0 @@ - -import matplotlib -import matplotlib.pyplot as plt -import matplotlib.axes as maxes - -from matplotlib import rcParams -rcParams['text.usetex']=True -rcParams['text.latex.unicode']=True - -class Axes(maxes.Axes): - """ - A hackish way to simultaneously draw texts w/ usetex=True and - usetex=False in the same figure. It does not work in the ps backend. - """ - def __init__(self, *kl, **kw): - self.usetex = kw.pop("usetex", "False") - self.preview = kw.pop("preview", "False") - - maxes.Axes.__init__(self, *kl, **kw) - - def draw(self, renderer): - usetex = plt.rcParams["text.usetex"] - preview = plt.rcParams["text.latex.preview"] - plt.rcParams["text.usetex"] = self.usetex - plt.rcParams["text.latex.preview"] = self.preview - - maxes.Axes.draw(self, renderer) - - plt.rcParams["text.usetex"] = usetex - plt.rcParams["text.latex.preview"] = preview - -Subplot = maxes.subplot_class_factory(Axes) - - -def test_window_extent(ax, usetex, preview): - - va = "baseline" - ax.xaxis.set_visible(False) - ax.yaxis.set_visible(False) - - - #t = ax.text(0., 0., r"mlp", va="baseline", size=150) - text_kw = dict(va=va, - size=50, - bbox=dict(pad=0., ec="k", fc="none")) - - - test_strings = ["lg", r"$\frac{1}{2}\pi$", - r"$p^{3^A}$", r"$p_{3_2}$"] - - ax.axvline(0, color="r") - - for i, s in enumerate(test_strings): - - ax.axhline(i, color="r") - ax.text(0., 3-i, s, **text_kw) - - ax.set_xlim(-0.1,1.1) - ax.set_ylim(-.8,3.9) - - - ax.set_title("usetex=%s\npreview=%s" % (str(usetex), str(preview))) - - - -F = plt.figure(figsize=(2.*3,6.5)) - -for i, usetex, preview in [[0, False, False], - [1, True, False], - [2, True, True]]: - ax = Subplot(F, 1, 3, i+1, usetex=usetex, preview=preview) - F.add_subplot(ax) - F.subplots_adjust(top=0.85) - - test_window_extent(ax, usetex=usetex, preview=preview) - - -plt.draw() -plt.show() - diff --git a/dev/mpl_examples/pylab_examples/usetex_demo.hires.png b/dev/mpl_examples/pylab_examples/usetex_demo.hires.png deleted file mode 100644 index c5932067f50..00000000000 Binary files a/dev/mpl_examples/pylab_examples/usetex_demo.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/usetex_demo.pdf b/dev/mpl_examples/pylab_examples/usetex_demo.pdf deleted file mode 100644 index 8271463e94e..00000000000 Binary files a/dev/mpl_examples/pylab_examples/usetex_demo.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/usetex_demo.png b/dev/mpl_examples/pylab_examples/usetex_demo.png deleted file mode 100644 index 61b76c38c73..00000000000 Binary files a/dev/mpl_examples/pylab_examples/usetex_demo.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/usetex_demo.py b/dev/mpl_examples/pylab_examples/usetex_demo.py deleted file mode 100644 index 049f1b7ec95..00000000000 --- a/dev/mpl_examples/pylab_examples/usetex_demo.py +++ /dev/null @@ -1,63 +0,0 @@ -import matplotlib -matplotlib.rc('text', usetex = True) -import pylab -import numpy as np - -## interface tracking profiles -N = 500 -delta = 0.6 -X = -1 + 2. * np.arange(N) / (N - 1) -pylab.plot(X, (1 - np.tanh(4. * X / delta)) / 2, ## phase field tanh profiles - X, (X + 1) / 2, ## level set distance function - X, (1.4 + np.tanh(4. * X / delta)) / 4, ## composition profile - X, X < 0, 'k--', ## sharp interface - linewidth = 5) - -## legend -pylab.legend((r'phase field', r'level set', r'composition', r'sharp interface'), shadow = True, loc = (0.01, 0.55)) - -ltext = pylab.gca().get_legend().get_texts() -pylab.setp(ltext[0], fontsize = 20, color = 'b') -pylab.setp(ltext[1], fontsize = 20, color = 'g') -pylab.setp(ltext[2], fontsize = 20, color = 'r') -pylab.setp(ltext[3], fontsize = 20, color = 'k') - -## the arrow -height = 0.1 -offset = 0.02 -pylab.plot((-delta / 2., delta / 2), (height, height), 'k', linewidth = 2) -pylab.plot((-delta / 2, -delta / 2 + offset * 2), (height, height - offset), 'k', linewidth = 2) -pylab.plot((-delta / 2, -delta / 2 + offset * 2), (height, height + offset), 'k', linewidth = 2) -pylab.plot((delta / 2, delta / 2 - offset * 2), (height, height - offset), 'k', linewidth = 2) -pylab.plot((delta / 2, delta / 2 - offset * 2), (height, height + offset), 'k', linewidth = 2) -pylab.text(-0.06, height - 0.06, r'$\delta$', {'color' : 'k', 'fontsize' : 24}) - -## X-axis label -pylab.xticks((-1, 0, 1), ('-1', '0', '1'), color = 'k', size = 20) - -## Left Y-axis labels -pylab.ylabel(r'\bf{phase field} $\phi$', {'color' : 'b', - 'fontsize' : 20 }) -pylab.yticks((0, 0.5, 1), ('0', '.5', '1'), color = 'k', size = 20) - -## Right Y-axis labels -pylab.text(1.05, 0.5, r"\bf{level set} $\phi$", {'color' : 'g', 'fontsize' : 20}, - horizontalalignment = 'left', - verticalalignment = 'center', - rotation = 90, - clip_on = False) -pylab.text(1.01, -0.02, "-1", {'color' : 'k', 'fontsize' : 20}) -pylab.text(1.01, 0.98, "1", {'color' : 'k', 'fontsize' : 20}) -pylab.text(1.01, 0.48, "0", {'color' : 'k', 'fontsize' : 20}) - -## level set equations -pylab.text(0.1, 0.85, r'$|\nabla\phi| = 1,$ \newline $ \frac{\partial \phi}{\partial t} + U|\nabla \phi| = 0$', {'color' : 'g', 'fontsize' : 20}) - -## phase field equations -pylab.text(0.2, 0.15, r'$\mathcal{F} = \int f\left( \phi, c \right) dV,$ \newline $ \frac{ \partial \phi } { \partial t } = -M_{ \phi } \frac{ \delta \mathcal{F} } { \delta \phi }$', {'color' : 'b', 'fontsize' : 20}) - -## these went wrong in pdf in a previous version -pylab.text(-.9,.42,r'gamma: $\gamma$', {'color': 'r', 'fontsize': 20}) -pylab.text(-.9,.36,r'Omega: $\Omega$', {'color': 'b', 'fontsize': 20}) - -pylab.show() diff --git a/dev/mpl_examples/pylab_examples/usetex_fonteffects.hires.png b/dev/mpl_examples/pylab_examples/usetex_fonteffects.hires.png deleted file mode 100644 index 2196cd6fdd0..00000000000 Binary files a/dev/mpl_examples/pylab_examples/usetex_fonteffects.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/usetex_fonteffects.pdf b/dev/mpl_examples/pylab_examples/usetex_fonteffects.pdf deleted file mode 100644 index fd6fa1ee11c..00000000000 Binary files a/dev/mpl_examples/pylab_examples/usetex_fonteffects.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/usetex_fonteffects.png b/dev/mpl_examples/pylab_examples/usetex_fonteffects.png deleted file mode 100644 index 4db49aa12f5..00000000000 Binary files a/dev/mpl_examples/pylab_examples/usetex_fonteffects.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/usetex_fonteffects.py b/dev/mpl_examples/pylab_examples/usetex_fonteffects.py deleted file mode 100644 index aeffe7875b9..00000000000 --- a/dev/mpl_examples/pylab_examples/usetex_fonteffects.py +++ /dev/null @@ -1,22 +0,0 @@ -# This script demonstrates that font effects specified in your pdftex.map -# are now supported in pdf usetex. - -import matplotlib -matplotlib.rc('text', usetex=True) -import pylab - -def setfont(font): - return r'\font\a %s at 14pt\a ' % font - -for y, font, text in zip(range(5), - ['ptmr8r', 'ptmri8r', 'ptmro8r', 'ptmr8rn', 'ptmrr8re'], - ['Nimbus Roman No9 L ' + x for x in - ['', 'Italics (real italics for comparison)', - '(slanted)', '(condensed)', '(extended)']]): - pylab.text(0, y, setfont(font) + text) - -pylab.ylim(-1, 5) -pylab.xlim(-0.2, 0.6) -pylab.setp(pylab.gca(), frame_on=False, xticks=(), yticks=()) -pylab.title('Usetex font effects') -pylab.savefig('usetex_fonteffects.pdf') diff --git a/dev/mpl_examples/pylab_examples/vertical_ticklabels.hires.png b/dev/mpl_examples/pylab_examples/vertical_ticklabels.hires.png deleted file mode 100644 index faac77caf92..00000000000 Binary files a/dev/mpl_examples/pylab_examples/vertical_ticklabels.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/vertical_ticklabels.pdf b/dev/mpl_examples/pylab_examples/vertical_ticklabels.pdf deleted file mode 100644 index 5e2e8abf619..00000000000 Binary files a/dev/mpl_examples/pylab_examples/vertical_ticklabels.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/vertical_ticklabels.png b/dev/mpl_examples/pylab_examples/vertical_ticklabels.png deleted file mode 100644 index 80fc858def4..00000000000 Binary files a/dev/mpl_examples/pylab_examples/vertical_ticklabels.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/vertical_ticklabels.py b/dev/mpl_examples/pylab_examples/vertical_ticklabels.py deleted file mode 100644 index 2416a785bfc..00000000000 --- a/dev/mpl_examples/pylab_examples/vertical_ticklabels.py +++ /dev/null @@ -1,7 +0,0 @@ -#!/usr/bin/env python -from pylab import * - -plot([1,2,3,4], [1,4,9,16]) -locs, labels = xticks([1,2,3,4], ['Frogs', 'Hogs', 'Bogs', 'Slogs']) -setp(labels, 'rotation', 'vertical') -show() diff --git a/dev/mpl_examples/pylab_examples/vline_demo.hires.png b/dev/mpl_examples/pylab_examples/vline_demo.hires.png deleted file mode 100644 index 4783eec9ca9..00000000000 Binary files a/dev/mpl_examples/pylab_examples/vline_demo.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/vline_demo.pdf b/dev/mpl_examples/pylab_examples/vline_demo.pdf deleted file mode 100644 index 3255bc89ef4..00000000000 Binary files a/dev/mpl_examples/pylab_examples/vline_demo.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/vline_demo.png b/dev/mpl_examples/pylab_examples/vline_demo.png deleted file mode 100644 index f475fde55c9..00000000000 Binary files a/dev/mpl_examples/pylab_examples/vline_demo.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/vline_demo.py b/dev/mpl_examples/pylab_examples/vline_demo.py deleted file mode 100644 index 98b512f50ae..00000000000 --- a/dev/mpl_examples/pylab_examples/vline_demo.py +++ /dev/null @@ -1,21 +0,0 @@ -#!/usr/bin/env python -from matplotlib.pyplot import * -from numpy import sin, exp, absolute, pi, arange -from numpy.random import normal - -def f(t): - s1 = sin(2*pi*t) - e1 = exp(-t) - return absolute((s1*e1))+.05 - - -t = arange(0.0, 5.0, 0.1) -s = f(t) -nse = normal(0.0, 0.3, t.shape) * s - -plot(t, s+nse, 'b^') -vlines(t, [0], s) -xlabel('time (s)') -title('Comparison of model with data') -show() - diff --git a/dev/mpl_examples/pylab_examples/vline_hline_demo.hires.png b/dev/mpl_examples/pylab_examples/vline_hline_demo.hires.png deleted file mode 100644 index b00aa4a1797..00000000000 Binary files a/dev/mpl_examples/pylab_examples/vline_hline_demo.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/vline_hline_demo.pdf b/dev/mpl_examples/pylab_examples/vline_hline_demo.pdf deleted file mode 100644 index ac37c8d070c..00000000000 Binary files a/dev/mpl_examples/pylab_examples/vline_hline_demo.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/vline_hline_demo.png b/dev/mpl_examples/pylab_examples/vline_hline_demo.png deleted file mode 100644 index 5bc62098e5e..00000000000 Binary files a/dev/mpl_examples/pylab_examples/vline_hline_demo.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/vline_hline_demo.py b/dev/mpl_examples/pylab_examples/vline_hline_demo.py deleted file mode 100644 index fe85582a527..00000000000 --- a/dev/mpl_examples/pylab_examples/vline_hline_demo.py +++ /dev/null @@ -1,36 +0,0 @@ -#!/usr/bin/env python - -""" -Small demonstration of the hlines and vlines plots. -""" - -from matplotlib import pyplot as plt -from numpy import sin, exp, absolute, pi, arange -from numpy.random import normal - - -def f(t): - s1 = sin(2 * pi * t) - e1 = exp(-t) - return absolute((s1 * e1)) + .05 - - -t = arange(0.0, 5.0, 0.1) -s = f(t) -nse = normal(0.0, 0.3, t.shape) * s - -fig = plt.figure(figsize=(12, 6)) -vax = fig.add_subplot(121) -hax = fig.add_subplot(122) - -vax.plot(t, s + nse, 'b^') -vax.vlines(t, [0], s) -vax.set_xlabel('time (s)') -vax.set_title('Vertical lines demo') - -hax.plot(s + nse, t, 'b^') -hax.hlines(t, [0], s, lw=2) -hax.set_xlabel('time (s)') -hax.set_title('Horizontal lines demo') - -plt.show() diff --git a/dev/mpl_examples/pylab_examples/xcorr_demo.hires.png b/dev/mpl_examples/pylab_examples/xcorr_demo.hires.png deleted file mode 100644 index 195b3816e74..00000000000 Binary files a/dev/mpl_examples/pylab_examples/xcorr_demo.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/xcorr_demo.pdf b/dev/mpl_examples/pylab_examples/xcorr_demo.pdf deleted file mode 100644 index c7917aa6281..00000000000 Binary files a/dev/mpl_examples/pylab_examples/xcorr_demo.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/xcorr_demo.png b/dev/mpl_examples/pylab_examples/xcorr_demo.png deleted file mode 100644 index 63ff9901695..00000000000 Binary files a/dev/mpl_examples/pylab_examples/xcorr_demo.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/xcorr_demo.py b/dev/mpl_examples/pylab_examples/xcorr_demo.py deleted file mode 100644 index d21357137b5..00000000000 --- a/dev/mpl_examples/pylab_examples/xcorr_demo.py +++ /dev/null @@ -1,17 +0,0 @@ -import matplotlib.pyplot as plt -import numpy as np - -x,y = np.random.randn(2,100) -fig = plt.figure() -ax1 = fig.add_subplot(211) -ax1.xcorr(x, y, usevlines=True, maxlags=50, normed=True, lw=2) -ax1.grid(True) -ax1.axhline(0, color='black', lw=2) - -ax2 = fig.add_subplot(212, sharex=ax1) -ax2.acorr(x, usevlines=True, normed=True, maxlags=50, lw=2) -ax2.grid(True) -ax2.axhline(0, color='black', lw=2) - -plt.show() - diff --git a/dev/mpl_examples/pylab_examples/zorder_demo.py b/dev/mpl_examples/pylab_examples/zorder_demo.py deleted file mode 100644 index 2fdbdd6f5d1..00000000000 --- a/dev/mpl_examples/pylab_examples/zorder_demo.py +++ /dev/null @@ -1,44 +0,0 @@ -#!/usr/bin/env python -""" -The default drawing order for axes is patches, lines, text. This -order is determined by the zorder attribute. The following defaults -are set - -Artist Z-order -Patch / PatchCollection 1 -Line2D / LineCollection 2 -Text 3 - -You can change the order for individual artists by setting the zorder. Any -individual plot() call can set a value for the zorder of that particular item. - -In the fist subplot below, the lines are drawn above the patch -collection from the scatter, which is the default. - -In the subplot below, the order is reversed. - -The second figure shows how to control the zorder of individual lines. -""" - -from pylab import * -x = rand(20); y = rand(20) - -subplot(211) -plot(x, y, 'r', lw=3) -scatter(x,y,s=120) - -subplot(212) -plot(x, y, 'r', zorder=1, lw=3) -scatter(x,y,s=120, zorder=2) - -# A new figure, with individually ordered items -x=frange(0,2*pi,npts=100) -figure() -plot(x,sin(x),linewidth=10, color='black',label='zorder=10',zorder = 10) # on top -plot(x,cos(1.3*x),linewidth=10, color='red', label='zorder=1',zorder = 1) # bottom -plot(x,sin(2.1*x),linewidth=10, color='green', label='zorder=3',zorder = 3) -axhline(0,linewidth=10, color='blue', label='zorder=2',zorder = 2) -l = legend() -l.set_zorder(20) # put the legend on top - -show() diff --git a/dev/mpl_examples/pylab_examples/zorder_demo_00.hires.png b/dev/mpl_examples/pylab_examples/zorder_demo_00.hires.png deleted file mode 100644 index b94cfe87134..00000000000 Binary files a/dev/mpl_examples/pylab_examples/zorder_demo_00.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/zorder_demo_00.pdf b/dev/mpl_examples/pylab_examples/zorder_demo_00.pdf deleted file mode 100644 index f5a7ffeeba7..00000000000 Binary files a/dev/mpl_examples/pylab_examples/zorder_demo_00.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/zorder_demo_00.png b/dev/mpl_examples/pylab_examples/zorder_demo_00.png deleted file mode 100644 index 181ebfad94f..00000000000 Binary files a/dev/mpl_examples/pylab_examples/zorder_demo_00.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/zorder_demo_01.hires.png b/dev/mpl_examples/pylab_examples/zorder_demo_01.hires.png deleted file mode 100644 index 03302d645a2..00000000000 Binary files a/dev/mpl_examples/pylab_examples/zorder_demo_01.hires.png and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/zorder_demo_01.pdf b/dev/mpl_examples/pylab_examples/zorder_demo_01.pdf deleted file mode 100644 index 4490392a049..00000000000 Binary files a/dev/mpl_examples/pylab_examples/zorder_demo_01.pdf and /dev/null differ diff --git a/dev/mpl_examples/pylab_examples/zorder_demo_01.png b/dev/mpl_examples/pylab_examples/zorder_demo_01.png deleted file mode 100644 index cef85caee16..00000000000 Binary files a/dev/mpl_examples/pylab_examples/zorder_demo_01.png and /dev/null differ diff --git a/dev/mpl_examples/shapes_and_collections/artist_reference.py b/dev/mpl_examples/shapes_and_collections/artist_reference.py deleted file mode 100644 index a9016de5894..00000000000 --- a/dev/mpl_examples/shapes_and_collections/artist_reference.py +++ /dev/null @@ -1,104 +0,0 @@ -""" -Reference for matplotlib artists - -This example displays several of matplotlib's graphics primitives (artists) -drawn using matplotlib API. A full list of artists and the documentation is -available at http://matplotlib.org/api/artist_api.html. - -Copyright (c) 2010, Bartosz Telenczuk -BSD License -""" -import matplotlib.pyplot as plt; plt.rcdefaults() -from mpltools import style; style.use('gallery') - -import numpy as np -import matplotlib.pyplot as plt -import matplotlib.path as mpath -import matplotlib.lines as mlines -import matplotlib.patches as mpatches -from matplotlib.collections import PatchCollection - - -def label(xy, text): - y = xy[1] - 0.15 # shift y-value for label so that it's below the artist - plt.text(xy[0], y, text, ha="center", family='sans-serif', size=14) - - -fig, ax = plt.subplots() -# create 3x3 grid to plot the artists -grid = np.mgrid[0.2:0.8:3j, 0.2:0.8:3j].reshape(2, -1).T - -patches = [] - -# add a circle -circle = mpatches.Circle(grid[0], 0.1,ec="none") -patches.append(circle) -label(grid[0], "Circle") - -# add a rectangle -rect = mpatches.Rectangle(grid[1] - [0.025, 0.05], 0.05, 0.1, ec="none") -patches.append(rect) -label(grid[1], "Rectangle") - -# add a wedge -wedge = mpatches.Wedge(grid[2], 0.1, 30, 270, ec="none") -patches.append(wedge) -label(grid[2], "Wedge") - -# add a Polygon -polygon = mpatches.RegularPolygon(grid[3], 5, 0.1) -patches.append(polygon) -label(grid[3], "Polygon") - -#add an ellipse -ellipse = mpatches.Ellipse(grid[4], 0.2, 0.1) -patches.append(ellipse) -label(grid[4], "Ellipse") - -#add an arrow -arrow = mpatches.Arrow(grid[5, 0]-0.05, grid[5, 1]-0.05, 0.1, 0.1, width=0.1) -patches.append(arrow) -label(grid[5], "Arrow") - -# add a path patch -Path = mpath.Path -path_data = [ - (Path.MOVETO, [ 0.018, -0.11 ]), - (Path.CURVE4, [-0.031, -0.051]), - (Path.CURVE4, [-0.115, 0.073]), - (Path.CURVE4, [-0.03 , 0.073]), - (Path.LINETO, [-0.011, 0.039]), - (Path.CURVE4, [ 0.043, 0.121]), - (Path.CURVE4, [ 0.075, -0.005]), - (Path.CURVE4, [ 0.035, -0.027]), - (Path.CLOSEPOLY, [0.018, -0.11]) - ] -codes, verts = zip(*path_data) -path = mpath.Path(verts + grid[6], codes) -patch = mpatches.PathPatch(path) -patches.append(patch) -label(grid[6], "PathPatch") - -# add a fancy box -fancybox = mpatches.FancyBboxPatch( - grid[7] - [0.025, 0.05], 0.05, 0.1, - boxstyle=mpatches.BoxStyle("Round", pad=0.02)) -patches.append(fancybox) -label(grid[7], "FancyBoxPatch") - -# add a line -x,y = np.array([[-0.06, 0.0, 0.1], [0.05, -0.05, 0.05]]) -line = mlines.Line2D(x + grid[8, 0], y + grid[8, 1], lw=5., alpha=0.3) -label(grid[8], "Line2D") - -colors = np.linspace(0, 1, len(patches)) -collection = PatchCollection(patches, cmap=plt.cm.hsv, alpha=0.3) -collection.set_array(np.array(colors)) -ax.add_collection(collection) -ax.add_line(line) - -plt.subplots_adjust(left=0, right=1, bottom=0, top=1) -plt.axis('equal') -plt.axis('off') - -plt.show() diff --git a/dev/mpl_examples/shapes_and_collections/path_patch_demo.hires.png b/dev/mpl_examples/shapes_and_collections/path_patch_demo.hires.png deleted file mode 100644 index c037445cc4b..00000000000 Binary files a/dev/mpl_examples/shapes_and_collections/path_patch_demo.hires.png and /dev/null differ diff --git a/dev/mpl_examples/shapes_and_collections/path_patch_demo.pdf b/dev/mpl_examples/shapes_and_collections/path_patch_demo.pdf deleted file mode 100644 index 76db266b556..00000000000 Binary files a/dev/mpl_examples/shapes_and_collections/path_patch_demo.pdf and /dev/null differ diff --git a/dev/mpl_examples/shapes_and_collections/path_patch_demo.png b/dev/mpl_examples/shapes_and_collections/path_patch_demo.png deleted file mode 100644 index 759babdca13..00000000000 Binary files a/dev/mpl_examples/shapes_and_collections/path_patch_demo.png and /dev/null differ diff --git a/dev/mpl_examples/shapes_and_collections/path_patch_demo.py b/dev/mpl_examples/shapes_and_collections/path_patch_demo.py deleted file mode 100644 index fb0c8aa4759..00000000000 --- a/dev/mpl_examples/shapes_and_collections/path_patch_demo.py +++ /dev/null @@ -1,34 +0,0 @@ -""" -Demo of a PathPatch object. -""" -import matplotlib.path as mpath -import matplotlib.patches as mpatches -import matplotlib.pyplot as plt - - -fig, ax = plt.subplots() - -Path = mpath.Path -path_data = [ - (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(*path_data) -path = mpath.Path(verts, codes) -patch = mpatches.PathPatch(path, facecolor='r', alpha=0.5) -ax.add_patch(patch) - -# plot control points and connecting lines -x, y = zip(*path.vertices) -line, = ax.plot(x, y, 'go-') - -ax.grid() -ax.axis('equal') -plt.show() diff --git a/dev/mpl_examples/shapes_and_collections/scatter_demo.hires.png b/dev/mpl_examples/shapes_and_collections/scatter_demo.hires.png deleted file mode 100644 index 20f0e8b4efb..00000000000 Binary files a/dev/mpl_examples/shapes_and_collections/scatter_demo.hires.png and /dev/null differ diff --git a/dev/mpl_examples/shapes_and_collections/scatter_demo.pdf b/dev/mpl_examples/shapes_and_collections/scatter_demo.pdf deleted file mode 100644 index 11bb1d84cf4..00000000000 Binary files a/dev/mpl_examples/shapes_and_collections/scatter_demo.pdf and /dev/null differ diff --git a/dev/mpl_examples/shapes_and_collections/scatter_demo.png b/dev/mpl_examples/shapes_and_collections/scatter_demo.png deleted file mode 100644 index 35f71e8b9d4..00000000000 Binary files a/dev/mpl_examples/shapes_and_collections/scatter_demo.png and /dev/null differ diff --git a/dev/mpl_examples/shapes_and_collections/scatter_demo.py b/dev/mpl_examples/shapes_and_collections/scatter_demo.py deleted file mode 100644 index 317b647ce94..00000000000 --- a/dev/mpl_examples/shapes_and_collections/scatter_demo.py +++ /dev/null @@ -1,14 +0,0 @@ -""" -Simple demo of a scatter plot. -""" -import numpy as np -import matplotlib.pyplot as plt - - -N = 50 -x = np.random.rand(N) -y = np.random.rand(N) -area = np.pi * (15 * np.random.rand(N))**2 # 0 to 15 point radiuses - -plt.scatter(x, y, s=area, alpha=0.5) -plt.show() diff --git a/dev/mpl_examples/showcase/integral_demo.hires.png b/dev/mpl_examples/showcase/integral_demo.hires.png deleted file mode 100644 index 96a85196279..00000000000 Binary files a/dev/mpl_examples/showcase/integral_demo.hires.png and /dev/null differ diff --git a/dev/mpl_examples/showcase/integral_demo.pdf b/dev/mpl_examples/showcase/integral_demo.pdf deleted file mode 100644 index 1177bcc65b2..00000000000 Binary files a/dev/mpl_examples/showcase/integral_demo.pdf and /dev/null differ diff --git a/dev/mpl_examples/showcase/integral_demo.png b/dev/mpl_examples/showcase/integral_demo.png deleted file mode 100644 index 9500bf9bc42..00000000000 Binary files a/dev/mpl_examples/showcase/integral_demo.png and /dev/null differ diff --git a/dev/mpl_examples/showcase/integral_demo.py b/dev/mpl_examples/showcase/integral_demo.py deleted file mode 100644 index d55f551fab8..00000000000 --- a/dev/mpl_examples/showcase/integral_demo.py +++ /dev/null @@ -1,51 +0,0 @@ -""" -Plot demonstrating the integral as the area under a curve. - -Although this is a simple example, it demonstrates some important tweaks: - - * A simple line plot with custom color and line width. - * A shaded region created using a Polygon patch. - * A text label with mathtext rendering. - * figtext calls to label the x- and y-axes. - * Use of axis spines to hide the top and right spines. - * Custom tick placement and labels. -""" -import numpy as np -import matplotlib.pyplot as plt -from matplotlib.patches import Polygon - - -def func(x): - return (x - 3) * (x - 5) * (x - 7) + 85 - - -a, b = 2, 9 # integral limits -x = np.linspace(0, 10) -y = func(x) - -fig, ax = plt.subplots() -plt.plot(x, y, 'r', linewidth=2) -plt.ylim(ymin=0) - -# Make the shaded region -ix = np.linspace(a, b) -iy = func(ix) -verts = [(a, 0)] + list(zip(ix, iy)) + [(b, 0)] -poly = Polygon(verts, facecolor='0.9', edgecolor='0.5') -ax.add_patch(poly) - -plt.text(0.5 * (a + b), 30, r"$\int_a^b f(x)\mathrm{d}x$", - horizontalalignment='center', fontsize=20) - -plt.figtext(0.9, 0.05, '$x$') -plt.figtext(0.1, 0.9, '$y$') - -ax.spines['right'].set_visible(False) -ax.spines['top'].set_visible(False) -ax.xaxis.set_ticks_position('bottom') - -ax.set_xticks((a, b)) -ax.set_xticklabels(('$a$', '$b$')) -ax.set_yticks([]) - -plt.show() diff --git a/dev/mpl_examples/specialty_plots/hinton_demo.hires.png b/dev/mpl_examples/specialty_plots/hinton_demo.hires.png deleted file mode 100644 index 177fcf2afc6..00000000000 Binary files a/dev/mpl_examples/specialty_plots/hinton_demo.hires.png and /dev/null differ diff --git a/dev/mpl_examples/specialty_plots/hinton_demo.pdf b/dev/mpl_examples/specialty_plots/hinton_demo.pdf deleted file mode 100644 index fdddd784cd0..00000000000 Binary files a/dev/mpl_examples/specialty_plots/hinton_demo.pdf and /dev/null differ diff --git a/dev/mpl_examples/specialty_plots/hinton_demo.png b/dev/mpl_examples/specialty_plots/hinton_demo.png deleted file mode 100644 index 5c07fb1b5e4..00000000000 Binary files a/dev/mpl_examples/specialty_plots/hinton_demo.png and /dev/null differ diff --git a/dev/mpl_examples/specialty_plots/hinton_demo.py b/dev/mpl_examples/specialty_plots/hinton_demo.py deleted file mode 100644 index 201b321283c..00000000000 --- a/dev/mpl_examples/specialty_plots/hinton_demo.py +++ /dev/null @@ -1,41 +0,0 @@ -""" -Demo of a function to create Hinton diagrams. - -Hinton diagrams are useful for visualizing the values of a 2D array (e.g. -a weight matrix): Positive and negative values are represented by white and -black squares, respectively, and the size of each square represents the -magnitude of each value. - -Initial idea from David Warde-Farley on the SciPy Cookbook -""" -import numpy as np -import matplotlib.pyplot as plt - - -def hinton(matrix, max_weight=None, ax=None): - """Draw Hinton diagram for visualizing a weight matrix.""" - ax = ax if ax is not None else plt.gca() - - if not max_weight: - max_weight = 2**np.ceil(np.log(np.abs(matrix).max())/np.log(2)) - - ax.patch.set_facecolor('gray') - ax.set_aspect('equal', 'box') - ax.xaxis.set_major_locator(plt.NullLocator()) - ax.yaxis.set_major_locator(plt.NullLocator()) - - for (x,y),w in np.ndenumerate(matrix): - color = 'white' if w > 0 else 'black' - size = np.sqrt(np.abs(w)) - rect = plt.Rectangle([x - size / 2, y - size / 2], size, size, - facecolor=color, edgecolor=color) - ax.add_patch(rect) - - ax.autoscale_view() - ax.invert_yaxis() - - -if __name__ == '__main__': - hinton(np.random.rand(20, 20) - 0.5) - plt.show() - diff --git a/dev/mpl_examples/statistics/errorbar_demo.hires.png b/dev/mpl_examples/statistics/errorbar_demo.hires.png deleted file mode 100644 index 83cc829577f..00000000000 Binary files a/dev/mpl_examples/statistics/errorbar_demo.hires.png and /dev/null differ diff --git a/dev/mpl_examples/statistics/errorbar_demo.pdf b/dev/mpl_examples/statistics/errorbar_demo.pdf deleted file mode 100644 index 47bb38d9287..00000000000 Binary files a/dev/mpl_examples/statistics/errorbar_demo.pdf and /dev/null differ diff --git a/dev/mpl_examples/statistics/errorbar_demo.png b/dev/mpl_examples/statistics/errorbar_demo.png deleted file mode 100644 index 0eb79e89675..00000000000 Binary files a/dev/mpl_examples/statistics/errorbar_demo.png and /dev/null differ diff --git a/dev/mpl_examples/statistics/errorbar_demo.py b/dev/mpl_examples/statistics/errorbar_demo.py deleted file mode 100644 index 4801f46a821..00000000000 --- a/dev/mpl_examples/statistics/errorbar_demo.py +++ /dev/null @@ -1,13 +0,0 @@ -""" -Demo of the errorbar function. -""" -import numpy as np -import matplotlib.pyplot as plt - -# example data -x = np.arange(0.1, 4, 0.5) -y = np.exp(-x) - -plt.errorbar(x, y, xerr=0.2, yerr=0.4) -plt.show() - diff --git a/dev/mpl_examples/statistics/errorbar_demo_features.hires.png b/dev/mpl_examples/statistics/errorbar_demo_features.hires.png deleted file mode 100644 index 6bdc6c6671b..00000000000 Binary files a/dev/mpl_examples/statistics/errorbar_demo_features.hires.png and /dev/null differ diff --git a/dev/mpl_examples/statistics/errorbar_demo_features.pdf b/dev/mpl_examples/statistics/errorbar_demo_features.pdf deleted file mode 100644 index b113dc68115..00000000000 Binary files a/dev/mpl_examples/statistics/errorbar_demo_features.pdf and /dev/null differ diff --git a/dev/mpl_examples/statistics/errorbar_demo_features.png b/dev/mpl_examples/statistics/errorbar_demo_features.png deleted file mode 100644 index f3f48f90bc1..00000000000 Binary files a/dev/mpl_examples/statistics/errorbar_demo_features.png and /dev/null differ diff --git a/dev/mpl_examples/statistics/errorbar_demo_features.py b/dev/mpl_examples/statistics/errorbar_demo_features.py deleted file mode 100644 index 2252d1fb4a8..00000000000 --- a/dev/mpl_examples/statistics/errorbar_demo_features.py +++ /dev/null @@ -1,39 +0,0 @@ -""" -Demo of errorbar function with different ways of specifying error bars. - -Errors can be specified as a constant value (as shown in `errorbar_demo.py`), -or as demonstrated in this example, they can be specified by an N x 1 or 2 x N, -where N is the number of data points. - -N x 1: - Error varies for each point, but the error values are symmetric (i.e. the - lower and upper values are equal). - -2 x N: - Error varies for each point, and the lower and upper limits (in that order) - are different (asymmetric case) - -In addition, this example demonstrates how to use log scale with errorbar. -""" -import numpy as np -import matplotlib.pyplot as plt - -# example data -x = np.arange(0.1, 4, 0.5) -y = np.exp(-x) -# example error bar values that vary with x-position -error = 0.1 + 0.2 * x -# error bar values w/ different -/+ errors -lower_error = 0.4 * error -upper_error = error -asymmetric_error = [lower_error, upper_error] - -fig, (ax0, ax1) = plt.subplots(nrows=2, sharex=True) -ax0.errorbar(x, y, yerr=error, fmt='-o') -ax0.set_title('variable, symmetric error') - -ax1.errorbar(x, y, xerr=asymmetric_error, fmt='o') -ax1.set_title('variable, asymmetric error') -ax1.set_yscale('log') -plt.show() - diff --git a/dev/mpl_examples/statistics/histogram_demo_features.hires.png b/dev/mpl_examples/statistics/histogram_demo_features.hires.png deleted file mode 100644 index 37697becdff..00000000000 Binary files a/dev/mpl_examples/statistics/histogram_demo_features.hires.png and /dev/null differ diff --git a/dev/mpl_examples/statistics/histogram_demo_features.pdf b/dev/mpl_examples/statistics/histogram_demo_features.pdf deleted file mode 100644 index 985eaf08441..00000000000 Binary files a/dev/mpl_examples/statistics/histogram_demo_features.pdf and /dev/null differ diff --git a/dev/mpl_examples/statistics/histogram_demo_features.png b/dev/mpl_examples/statistics/histogram_demo_features.png deleted file mode 100644 index 25f12bab274..00000000000 Binary files a/dev/mpl_examples/statistics/histogram_demo_features.png and /dev/null differ diff --git a/dev/mpl_examples/statistics/histogram_demo_features.py b/dev/mpl_examples/statistics/histogram_demo_features.py deleted file mode 100644 index 299f9bfeb70..00000000000 --- a/dev/mpl_examples/statistics/histogram_demo_features.py +++ /dev/null @@ -1,35 +0,0 @@ -""" -Demo of the histogram (hist) function with a few features. - -In addition to the basic histogram, this demo shows a few optional features: - - * Setting the number of data bins - * The ``normed`` flag, which normalizes bin heights so that the integral of - the histogram is 1. The resulting histogram is a probability density. - * Setting the face color of the bars - * Setting the opacity (alpha value). - -""" -import numpy as np -import matplotlib.mlab as mlab -import matplotlib.pyplot as plt - - -# example data -mu = 100 # mean of distribution -sigma = 15 # standard deviation of distribution -x = mu + sigma * np.random.randn(10000) - -num_bins = 50 -# the histogram of the data -n, bins, patches = plt.hist(x, num_bins, normed=1, facecolor='green', alpha=0.5) -# add a 'best fit' line -y = mlab.normpdf(bins, mu, sigma) -plt.plot(bins, y, 'r--') -plt.xlabel('Smarts') -plt.ylabel('Probability') -plt.title(r'Histogram of IQ: $\mu=100$, $\sigma=15$') - -# Tweak spacing to prevent clipping of ylabel -plt.subplots_adjust(left=0.15) -plt.show() diff --git a/dev/mpl_examples/subplots_axes_and_figures/subplot_demo.hires.png b/dev/mpl_examples/subplots_axes_and_figures/subplot_demo.hires.png deleted file mode 100644 index eaeac122fb0..00000000000 Binary files a/dev/mpl_examples/subplots_axes_and_figures/subplot_demo.hires.png and /dev/null differ diff --git a/dev/mpl_examples/subplots_axes_and_figures/subplot_demo.pdf b/dev/mpl_examples/subplots_axes_and_figures/subplot_demo.pdf deleted file mode 100644 index 6bf726dfa9a..00000000000 Binary files a/dev/mpl_examples/subplots_axes_and_figures/subplot_demo.pdf and /dev/null differ diff --git a/dev/mpl_examples/subplots_axes_and_figures/subplot_demo.png b/dev/mpl_examples/subplots_axes_and_figures/subplot_demo.png deleted file mode 100644 index fa2f4fa00dd..00000000000 Binary files a/dev/mpl_examples/subplots_axes_and_figures/subplot_demo.png and /dev/null differ diff --git a/dev/mpl_examples/subplots_axes_and_figures/subplot_demo.py b/dev/mpl_examples/subplots_axes_and_figures/subplot_demo.py deleted file mode 100644 index b90b53d899e..00000000000 --- a/dev/mpl_examples/subplots_axes_and_figures/subplot_demo.py +++ /dev/null @@ -1,24 +0,0 @@ -""" -Simple demo with multiple subplots. -""" -import numpy as np -import matplotlib.pyplot as plt - - -x1 = np.linspace(0.0, 5.0) -x2 = np.linspace(0.0, 2.0) - -y1 = np.cos(2 * np.pi * x1) * np.exp(-x1) -y2 = np.cos(2 * np.pi * x2) - -plt.subplot(2, 1, 1) -plt.plot(x1, y1, 'yo-') -plt.title('A tale of 2 subplots') -plt.ylabel('Damped oscillation') - -plt.subplot(2, 1, 2) -plt.plot(x2, y2, 'r.-') -plt.xlabel('time (s)') -plt.ylabel('Undamped') - -plt.show() diff --git a/dev/mpl_examples/text_labels_and_annotations/text_demo_fontdict.hires.png b/dev/mpl_examples/text_labels_and_annotations/text_demo_fontdict.hires.png deleted file mode 100644 index fbe637ccc13..00000000000 Binary files a/dev/mpl_examples/text_labels_and_annotations/text_demo_fontdict.hires.png and /dev/null differ diff --git a/dev/mpl_examples/text_labels_and_annotations/text_demo_fontdict.pdf b/dev/mpl_examples/text_labels_and_annotations/text_demo_fontdict.pdf deleted file mode 100644 index a0950481274..00000000000 Binary files a/dev/mpl_examples/text_labels_and_annotations/text_demo_fontdict.pdf and /dev/null differ diff --git a/dev/mpl_examples/text_labels_and_annotations/text_demo_fontdict.png b/dev/mpl_examples/text_labels_and_annotations/text_demo_fontdict.png deleted file mode 100644 index fe3756d2b1c..00000000000 Binary files a/dev/mpl_examples/text_labels_and_annotations/text_demo_fontdict.png and /dev/null differ diff --git a/dev/mpl_examples/text_labels_and_annotations/text_demo_fontdict.py b/dev/mpl_examples/text_labels_and_annotations/text_demo_fontdict.py deleted file mode 100644 index a0dcf3f48d3..00000000000 --- a/dev/mpl_examples/text_labels_and_annotations/text_demo_fontdict.py +++ /dev/null @@ -1,25 +0,0 @@ -""" -Demo using fontdict to control style of text and labels. -""" -import numpy as np -import matplotlib.pyplot as plt - - -font = {'family' : 'serif', - 'color' : 'darkred', - 'weight' : 'normal', - 'size' : 16, - } - -x = np.linspace(0.0, 5.0, 100) -y = np.cos(2 * np.pi * x) * np.exp(-x) - -plt.plot(x, y, 'k') -plt.title('Damped exponential decay', fontdict=font) -plt.text(2, 0.65, r'$\cos(2 \pi t) \exp(-t)$', fontdict=font) -plt.xlabel('time (s)', fontdict=font) -plt.ylabel('voltage (mV)', fontdict=font) - -# Tweak spacing to prevent clipping of ylabel -plt.subplots_adjust(left=0.15) -plt.show() diff --git a/dev/mpl_examples/text_labels_and_annotations/unicode_demo.hires.png b/dev/mpl_examples/text_labels_and_annotations/unicode_demo.hires.png deleted file mode 100644 index b9eee4963c5..00000000000 Binary files a/dev/mpl_examples/text_labels_and_annotations/unicode_demo.hires.png and /dev/null differ diff --git a/dev/mpl_examples/text_labels_and_annotations/unicode_demo.pdf b/dev/mpl_examples/text_labels_and_annotations/unicode_demo.pdf deleted file mode 100644 index cb606f5579a..00000000000 Binary files a/dev/mpl_examples/text_labels_and_annotations/unicode_demo.pdf and /dev/null differ diff --git a/dev/mpl_examples/text_labels_and_annotations/unicode_demo.png b/dev/mpl_examples/text_labels_and_annotations/unicode_demo.png deleted file mode 100644 index 8429b925595..00000000000 Binary files a/dev/mpl_examples/text_labels_and_annotations/unicode_demo.png and /dev/null differ diff --git a/dev/mpl_examples/text_labels_and_annotations/unicode_demo.py b/dev/mpl_examples/text_labels_and_annotations/unicode_demo.py deleted file mode 100644 index 295b3c4aa5f..00000000000 --- a/dev/mpl_examples/text_labels_and_annotations/unicode_demo.py +++ /dev/null @@ -1,16 +0,0 @@ -# -*- coding: utf-8 -*- -""" -Demo of unicode support in text and labels. -""" -from __future__ import unicode_literals - -import matplotlib.pyplot as plt - - -plt.title('Développés et fabriqués') -plt.xlabel("réactivité nous permettent d'être sélectionnés et adoptés") -plt.ylabel('André was here!') -plt.text( 0.2, 0.8, 'Institut für Festkörperphysik', rotation=45) -plt.text( 0.4, 0.2, 'AVA (check kerning)') - -plt.show() diff --git a/dev/mpl_examples/ticks_and_spines/spines_demo.hires.png b/dev/mpl_examples/ticks_and_spines/spines_demo.hires.png deleted file mode 100644 index 3239df19eb2..00000000000 Binary files a/dev/mpl_examples/ticks_and_spines/spines_demo.hires.png and /dev/null differ diff --git a/dev/mpl_examples/ticks_and_spines/spines_demo.pdf b/dev/mpl_examples/ticks_and_spines/spines_demo.pdf deleted file mode 100644 index d4b86e6d8d4..00000000000 Binary files a/dev/mpl_examples/ticks_and_spines/spines_demo.pdf and /dev/null differ diff --git a/dev/mpl_examples/ticks_and_spines/spines_demo.png b/dev/mpl_examples/ticks_and_spines/spines_demo.png deleted file mode 100644 index 137793de10a..00000000000 Binary files a/dev/mpl_examples/ticks_and_spines/spines_demo.png and /dev/null differ diff --git a/dev/mpl_examples/ticks_and_spines/spines_demo.py b/dev/mpl_examples/ticks_and_spines/spines_demo.py deleted file mode 100644 index a720131e845..00000000000 --- a/dev/mpl_examples/ticks_and_spines/spines_demo.py +++ /dev/null @@ -1,31 +0,0 @@ -""" -Basic demo of axis spines. - -This demo compares a normal axes, with spines on all four sides, and an axes -with spines only on the left and bottom. -""" -import numpy as np -import matplotlib.pyplot as plt - - -x = np.linspace(0, 2 * np.pi, 100) -y = 2 * np.sin(x) - -fig, (ax0, ax1) = plt.subplots(nrows=2) - -ax0.plot(x, y) -ax0.set_title('normal spines') - -ax1.plot(x, y) -ax1.set_title('bottom-left spines') - -# Hide the right and top spines -ax1.spines['right'].set_visible(False) -ax1.spines['top'].set_visible(False) -# Only show ticks on the left and bottom spines -ax1.yaxis.set_ticks_position('left') -ax1.xaxis.set_ticks_position('bottom') - -# Tweak spacing between subplots to prevent labels from overlapping -plt.subplots_adjust(hspace=0.5) -plt.show() diff --git a/dev/mpl_examples/ticks_and_spines/spines_demo_bounds.hires.png b/dev/mpl_examples/ticks_and_spines/spines_demo_bounds.hires.png deleted file mode 100644 index 3fd57b87d89..00000000000 Binary files a/dev/mpl_examples/ticks_and_spines/spines_demo_bounds.hires.png and /dev/null differ diff --git a/dev/mpl_examples/ticks_and_spines/spines_demo_bounds.pdf b/dev/mpl_examples/ticks_and_spines/spines_demo_bounds.pdf deleted file mode 100644 index bbec3be2369..00000000000 Binary files a/dev/mpl_examples/ticks_and_spines/spines_demo_bounds.pdf and /dev/null differ diff --git a/dev/mpl_examples/ticks_and_spines/spines_demo_bounds.png b/dev/mpl_examples/ticks_and_spines/spines_demo_bounds.png deleted file mode 100644 index 9710b6fe25d..00000000000 Binary files a/dev/mpl_examples/ticks_and_spines/spines_demo_bounds.png and /dev/null differ diff --git a/dev/mpl_examples/ticks_and_spines/spines_demo_bounds.py b/dev/mpl_examples/ticks_and_spines/spines_demo_bounds.py deleted file mode 100644 index 9db2591abca..00000000000 --- a/dev/mpl_examples/ticks_and_spines/spines_demo_bounds.py +++ /dev/null @@ -1,32 +0,0 @@ -""" -Demo of spines using custom bounds to limit the extent of the spine. -""" -import numpy as np -import matplotlib.pyplot as plt - - -x = np.linspace(0, 2*np.pi, 50) -y = np.sin(x) -y2 = y + 0.1 * np.random.normal(size=x.shape) - -fig, ax = plt.subplots() -ax.plot(x, y, 'k--') -ax.plot(x, y2, 'ro') - -# set ticks and tick labels -ax.set_xlim((0, 2*np.pi)) -ax.set_xticks([0, np.pi, 2*np.pi]) -ax.set_xticklabels(['0', '$\pi$','2$\pi$']) -ax.set_ylim((-1.5, 1.5)) -ax.set_yticks([-1, 0, 1]) - -# Only draw spine between the y-ticks -ax.spines['left'].set_bounds(-1, 1) -# Hide the right and top spines -ax.spines['right'].set_visible(False) -ax.spines['top'].set_visible(False) -# Only show ticks on the left and bottom spines -ax.yaxis.set_ticks_position('left') -ax.xaxis.set_ticks_position('bottom') - -plt.show() diff --git a/dev/mpl_examples/ticks_and_spines/spines_demo_dropped.hires.png b/dev/mpl_examples/ticks_and_spines/spines_demo_dropped.hires.png deleted file mode 100644 index 238a208265f..00000000000 Binary files a/dev/mpl_examples/ticks_and_spines/spines_demo_dropped.hires.png and /dev/null differ diff --git a/dev/mpl_examples/ticks_and_spines/spines_demo_dropped.pdf b/dev/mpl_examples/ticks_and_spines/spines_demo_dropped.pdf deleted file mode 100644 index efd80dd362a..00000000000 Binary files a/dev/mpl_examples/ticks_and_spines/spines_demo_dropped.pdf and /dev/null differ diff --git a/dev/mpl_examples/ticks_and_spines/spines_demo_dropped.png b/dev/mpl_examples/ticks_and_spines/spines_demo_dropped.png deleted file mode 100644 index 5eacf48dc13..00000000000 Binary files a/dev/mpl_examples/ticks_and_spines/spines_demo_dropped.png and /dev/null differ diff --git a/dev/mpl_examples/ticks_and_spines/spines_demo_dropped.py b/dev/mpl_examples/ticks_and_spines/spines_demo_dropped.py deleted file mode 100644 index 1a11e8f58f5..00000000000 --- a/dev/mpl_examples/ticks_and_spines/spines_demo_dropped.py +++ /dev/null @@ -1,24 +0,0 @@ -""" -Demo of spines offset from the axes (a.k.a. "dropped spines"). -""" -import numpy as np -import matplotlib.pyplot as plt - - -fig, ax = plt.subplots() - -image = np.random.uniform(size=(10, 10)) -ax.imshow(image, cmap=plt.cm.gray, interpolation='nearest') -ax.set_title('dropped spines') - -# Move left and bottom spines outward by 10 points -ax.spines['left'].set_position(('outward', 10)) -ax.spines['bottom'].set_position(('outward', 10)) -# Hide the right and top spines -ax.spines['right'].set_visible(False) -ax.spines['top'].set_visible(False) -# Only show ticks on the left and bottom spines -ax.yaxis.set_ticks_position('left') -ax.xaxis.set_ticks_position('bottom') - -plt.show() diff --git a/dev/mpl_examples/ticks_and_spines/ticklabels_demo_rotation.hires.png b/dev/mpl_examples/ticks_and_spines/ticklabels_demo_rotation.hires.png deleted file mode 100644 index 34eac7b2f83..00000000000 Binary files a/dev/mpl_examples/ticks_and_spines/ticklabels_demo_rotation.hires.png and /dev/null differ diff --git a/dev/mpl_examples/ticks_and_spines/ticklabels_demo_rotation.pdf b/dev/mpl_examples/ticks_and_spines/ticklabels_demo_rotation.pdf deleted file mode 100644 index c07c73d873b..00000000000 Binary files a/dev/mpl_examples/ticks_and_spines/ticklabels_demo_rotation.pdf and /dev/null differ diff --git a/dev/mpl_examples/ticks_and_spines/ticklabels_demo_rotation.png b/dev/mpl_examples/ticks_and_spines/ticklabels_demo_rotation.png deleted file mode 100644 index d304559c68f..00000000000 Binary files a/dev/mpl_examples/ticks_and_spines/ticklabels_demo_rotation.png and /dev/null differ diff --git a/dev/mpl_examples/ticks_and_spines/ticklabels_demo_rotation.py b/dev/mpl_examples/ticks_and_spines/ticklabels_demo_rotation.py deleted file mode 100644 index 9c1c49b2e4d..00000000000 --- a/dev/mpl_examples/ticks_and_spines/ticklabels_demo_rotation.py +++ /dev/null @@ -1,18 +0,0 @@ -""" -Demo of custom tick-labels with user-defined rotation. -""" -import matplotlib.pyplot as plt - - -x = [1, 2, 3, 4] -y = [1, 4, 9, 6] -labels = ['Frogs', 'Hogs', 'Bogs', 'Slogs'] - -plt.plot(x, y, 'ro') -# You can specify a rotation for the tick labels in degrees or with keywords. -plt.xticks(x, labels, rotation='vertical') -# Pad margins so that markers don't get clipped by the axes -plt.margins(0.2) -# Tweak spacing to prevent clipping of tick-labels -plt.subplots_adjust(bottom=0.15) -plt.show() diff --git a/dev/mpl_examples/units/annotate_with_units.hires.png b/dev/mpl_examples/units/annotate_with_units.hires.png deleted file mode 100644 index edfc20f96fe..00000000000 Binary files a/dev/mpl_examples/units/annotate_with_units.hires.png and /dev/null differ diff --git a/dev/mpl_examples/units/annotate_with_units.pdf b/dev/mpl_examples/units/annotate_with_units.pdf deleted file mode 100644 index 6ca1f6516f4..00000000000 Binary files a/dev/mpl_examples/units/annotate_with_units.pdf and /dev/null differ diff --git a/dev/mpl_examples/units/annotate_with_units.png b/dev/mpl_examples/units/annotate_with_units.png deleted file mode 100644 index 70d0a2fd8cb..00000000000 Binary files a/dev/mpl_examples/units/annotate_with_units.png and /dev/null differ diff --git a/dev/mpl_examples/units/annotate_with_units.py b/dev/mpl_examples/units/annotate_with_units.py deleted file mode 100644 index deb06f37829..00000000000 --- a/dev/mpl_examples/units/annotate_with_units.py +++ /dev/null @@ -1,26 +0,0 @@ -import matplotlib.pyplot as plt -from basic_units import cm - -fig = plt.figure() -ax = fig.add_subplot(111) - - -ax.annotate( "Note 01", [0.5*cm, 0.5*cm] ) - -# xy and text both unitized -ax.annotate('local max', xy=(3*cm, 1*cm), xycoords='data', - xytext=(0.8*cm, 0.95*cm), textcoords='data', - arrowprops=dict(facecolor='black', shrink=0.05), - horizontalalignment='right', verticalalignment='top') - -# mixing units w/ nonunits -ax.annotate('local max', xy=(3*cm, 1*cm), xycoords='data', - xytext=(0.8, 0.95), textcoords='axes fraction', - arrowprops=dict(facecolor='black', shrink=0.05), - horizontalalignment='right', verticalalignment='top') - - -ax.set_xlim(0*cm, 4*cm) -ax.set_ylim(0*cm, 4*cm) -plt.show() - diff --git a/dev/mpl_examples/units/artist_tests.hires.png b/dev/mpl_examples/units/artist_tests.hires.png deleted file mode 100644 index 70d1c7aa73b..00000000000 Binary files a/dev/mpl_examples/units/artist_tests.hires.png and /dev/null differ diff --git a/dev/mpl_examples/units/artist_tests.pdf b/dev/mpl_examples/units/artist_tests.pdf deleted file mode 100644 index 9b320364751..00000000000 Binary files a/dev/mpl_examples/units/artist_tests.pdf and /dev/null differ diff --git a/dev/mpl_examples/units/artist_tests.png b/dev/mpl_examples/units/artist_tests.png deleted file mode 100644 index c28fb6655c3..00000000000 Binary files a/dev/mpl_examples/units/artist_tests.png and /dev/null differ diff --git a/dev/mpl_examples/units/artist_tests.py b/dev/mpl_examples/units/artist_tests.py deleted file mode 100644 index aa88496085f..00000000000 --- a/dev/mpl_examples/units/artist_tests.py +++ /dev/null @@ -1,55 +0,0 @@ -""" -Test unit support with each of the matplotlib primitive artist types - -The axes handles unit conversions and the artists keep a pointer to -their axes parent, so you must init the artists with the axes instance -if you want to initialize them with unit data, or else they will not -know how to convert the units to scalars -""" -import random -import matplotlib.lines as lines -import matplotlib.patches as patches -import matplotlib.text as text -import matplotlib.collections as collections -import matplotlib.units as units - -from basic_units import cm, inch -import numpy as np -from matplotlib.pyplot import figure, show - -fig = figure() -ax = fig.add_subplot(111) -ax.xaxis.set_units(cm) -ax.yaxis.set_units(cm) - -if 0: - # test a line collection - # Not supported at present. - verts = [] - for i in range(10): - # a random line segment in inches - verts.append(zip(*inch*10*np.random.rand(2, random.randint(2,15)))) - lc = collections.LineCollection(verts, axes=ax) - ax.add_collection(lc) - -# test a plain-ol-line -line = lines.Line2D([0*cm, 1.5*cm], [0*cm, 2.5*cm], lw=2, color='black', axes=ax) -ax.add_line(line) - -if 0: - # test a patch - # Not supported at present. - rect = patches.Rectangle( (1*cm, 1*cm), width=5*cm, height=2*cm, alpha=0.2, axes=ax) - ax.add_patch(rect) - - -t = text.Text(3*cm, 2.5*cm, 'text label', ha='left', va='bottom', axes=ax) -ax.add_artist(t) - -ax.set_xlim(-1*cm, 10*cm) -ax.set_ylim(-1*cm, 10*cm) -#ax.xaxis.set_units(inch) -ax.grid(True) -ax.set_title("Artists with units") -show() - diff --git a/dev/mpl_examples/units/bar_demo2.hires.png b/dev/mpl_examples/units/bar_demo2.hires.png deleted file mode 100644 index ee76b3e9d22..00000000000 Binary files a/dev/mpl_examples/units/bar_demo2.hires.png and /dev/null differ diff --git a/dev/mpl_examples/units/bar_demo2.pdf b/dev/mpl_examples/units/bar_demo2.pdf deleted file mode 100644 index 9b3b44e5f3d..00000000000 Binary files a/dev/mpl_examples/units/bar_demo2.pdf and /dev/null differ diff --git a/dev/mpl_examples/units/bar_demo2.png b/dev/mpl_examples/units/bar_demo2.png deleted file mode 100644 index ca2a42621ef..00000000000 Binary files a/dev/mpl_examples/units/bar_demo2.png and /dev/null differ diff --git a/dev/mpl_examples/units/bar_demo2.py b/dev/mpl_examples/units/bar_demo2.py deleted file mode 100644 index 06109b110fb..00000000000 --- a/dev/mpl_examples/units/bar_demo2.py +++ /dev/null @@ -1,36 +0,0 @@ -""" -plot using a variety of cm vs inches conversions. The example shows -how default unit instrospection works (ax1), how various keywords can -be used to set the x and y units to override the defaults (ax2, ax3, -ax4) and how one can set the xlimits using scalars (ax3, current units -assumed) or units (conversions applied to get the numbers to current -units) - -""" -import numpy as np -from basic_units import cm, inch -import matplotlib.pyplot as plt - - -cms = cm *np.arange(0, 10, 2) -bottom=0*cm -width=0.8*cm - -fig = plt.figure() - -ax1 = fig.add_subplot(2,2,1) -ax1.bar(cms, cms, bottom=bottom) - -ax2 = fig.add_subplot(2,2,2) -ax2.bar(cms, cms, bottom=bottom, width=width, xunits=cm, yunits=inch) - -ax3 = fig.add_subplot(2,2,3) -ax3.bar(cms, cms, bottom=bottom, width=width, xunits=inch, yunits=cm) -ax3.set_xlim(2, 6) # scalars are interpreted in current units - -ax4 = fig.add_subplot(2,2,4) -ax4.bar(cms, cms, bottom=bottom, width=width, xunits=inch, yunits=inch) -#fig.savefig('simple_conversion_plot.png') -ax4.set_xlim(2*cm, 6*cm) # cm are converted to inches - -plt.show() diff --git a/dev/mpl_examples/units/bar_unit_demo.hires.png b/dev/mpl_examples/units/bar_unit_demo.hires.png deleted file mode 100644 index 70ff171cfa1..00000000000 Binary files a/dev/mpl_examples/units/bar_unit_demo.hires.png and /dev/null differ diff --git a/dev/mpl_examples/units/bar_unit_demo.pdf b/dev/mpl_examples/units/bar_unit_demo.pdf deleted file mode 100644 index 742824c74ef..00000000000 Binary files a/dev/mpl_examples/units/bar_unit_demo.pdf and /dev/null differ diff --git a/dev/mpl_examples/units/bar_unit_demo.png b/dev/mpl_examples/units/bar_unit_demo.png deleted file mode 100644 index 0a9b1701cf3..00000000000 Binary files a/dev/mpl_examples/units/bar_unit_demo.png and /dev/null differ diff --git a/dev/mpl_examples/units/bar_unit_demo.py b/dev/mpl_examples/units/bar_unit_demo.py deleted file mode 100644 index 9d5a1175cd4..00000000000 --- a/dev/mpl_examples/units/bar_unit_demo.py +++ /dev/null @@ -1,32 +0,0 @@ -#!/usr/bin/env python -import numpy as np -from basic_units import cm, inch -import matplotlib.pyplot as plt - - -N = 5 -menMeans = (150*cm, 160*cm, 146*cm, 172*cm, 155*cm) -menStd = ( 20*cm, 30*cm, 32*cm, 10*cm, 20*cm) - -fig = plt.figure() -ax = fig.add_subplot(111) - -ind = np.arange(N) # the x locations for the groups -width = 0.35 # the width of the bars -p1 = ax.bar(ind, menMeans, width, color='r', bottom=0*cm, yerr=menStd) - - -womenMeans = (145*cm, 149*cm, 172*cm, 165*cm, 200*cm) -womenStd = (30*cm, 25*cm, 20*cm, 31*cm, 22*cm) -p2 = ax.bar(ind+width, womenMeans, width, color='y', bottom=0*cm, yerr=womenStd) - -ax.set_title('Scores by group and gender') -ax.set_xticks(ind+width) -ax.set_xticklabels( ('G1', 'G2', 'G3', 'G4', 'G5') ) - -ax.legend( (p1[0], p2[0]), ('Men', 'Women') ) -ax.yaxis.set_units(inch) -ax.autoscale_view() - -#plt.savefig('barchart_demo') -plt.show() diff --git a/dev/mpl_examples/units/basic_units.py b/dev/mpl_examples/units/basic_units.py deleted file mode 100644 index a4742f1b2f9..00000000000 --- a/dev/mpl_examples/units/basic_units.py +++ /dev/null @@ -1,371 +0,0 @@ -import math - -import numpy as np - -import matplotlib.units as units -import matplotlib.ticker as ticker -from matplotlib.axes import Axes -from matplotlib.cbook import iterable - - -class ProxyDelegate(object): - def __init__(self, fn_name, proxy_type): - self.proxy_type = proxy_type - self.fn_name = fn_name - - def __get__(self, obj, objtype=None): - return self.proxy_type(self.fn_name, obj) - - -class TaggedValueMeta (type): - def __init__(cls, name, bases, dict): - for fn_name in cls._proxies.keys(): - try: - dummy = getattr(cls, fn_name) - except AttributeError: - setattr(cls, fn_name, - ProxyDelegate(fn_name, cls._proxies[fn_name])) - - -class PassThroughProxy(object): - def __init__(self, fn_name, obj): - self.fn_name = fn_name - self.target = obj.proxy_target - - def __call__(self, *args): - fn = getattr(self.target, self.fn_name) - ret = fn(*args) - return ret - - -class ConvertArgsProxy(PassThroughProxy): - def __init__(self, fn_name, obj): - PassThroughProxy.__init__(self, fn_name, obj) - self.unit = obj.unit - - def __call__(self, *args): - converted_args = [] - for a in args: - try: - converted_args.append(a.convert_to(self.unit)) - except AttributeError: - converted_args.append(TaggedValue(a, self.unit)) - converted_args = tuple([c.get_value() for c in converted_args]) - return PassThroughProxy.__call__(self, *converted_args) - - -class ConvertReturnProxy(PassThroughProxy): - def __init__(self, fn_name, obj): - PassThroughProxy.__init__(self, fn_name, obj) - self.unit = obj.unit - - def __call__(self, *args): - ret = PassThroughProxy.__call__(self, *args) - if (type(ret) == type(NotImplemented)): - return NotImplemented - return TaggedValue(ret, self.unit) - - -class ConvertAllProxy(PassThroughProxy): - def __init__(self, fn_name, obj): - PassThroughProxy.__init__(self, fn_name, obj) - self.unit = obj.unit - - def __call__(self, *args): - converted_args = [] - arg_units = [self.unit] - for a in args: - if hasattr(a, 'get_unit') and not hasattr(a, 'convert_to'): - # if this arg has a unit type but no conversion ability, - # this operation is prohibited - return NotImplemented - - if hasattr(a, 'convert_to'): - try: - a = a.convert_to(self.unit) - except: - pass - arg_units.append(a.get_unit()) - converted_args.append(a.get_value()) - else: - converted_args.append(a) - if hasattr(a, 'get_unit'): - arg_units.append(a.get_unit()) - else: - arg_units.append(None) - converted_args = tuple(converted_args) - ret = PassThroughProxy.__call__(self, *converted_args) - if (type(ret) == type(NotImplemented)): - return NotImplemented - ret_unit = unit_resolver(self.fn_name, arg_units) - if (ret_unit == NotImplemented): - return NotImplemented - return TaggedValue(ret, ret_unit) - - -class _TaggedValue(object): - - _proxies = {'__add__': ConvertAllProxy, - '__sub__': ConvertAllProxy, - '__mul__': ConvertAllProxy, - '__rmul__': ConvertAllProxy, - '__cmp__': ConvertAllProxy, - '__lt__': ConvertAllProxy, - '__gt__': ConvertAllProxy, - '__len__': PassThroughProxy} - - def __new__(cls, value, unit): - # generate a new subclass for value - value_class = type(value) - try: - subcls = type('TaggedValue_of_%s' % (value_class.__name__), - tuple([cls, value_class]), - {}) - if subcls not in units.registry: - units.registry[subcls] = basicConverter - return object.__new__(subcls, value, unit) - except TypeError: - if cls not in units.registry: - units.registry[cls] = basicConverter - return object.__new__(cls, value, unit) - - def __init__(self, value, unit): - self.value = value - self.unit = unit - self.proxy_target = self.value - - def __getattribute__(self, name): - if (name.startswith('__')): - return object.__getattribute__(self, name) - variable = object.__getattribute__(self, 'value') - if (hasattr(variable, name) and name not in self.__class__.__dict__): - return getattr(variable, name) - return object.__getattribute__(self, name) - - def __array__(self, t=None, context=None): - if t is not None: - return np.asarray(self.value).astype(t) - else: - return np.asarray(self.value, 'O') - - def __array_wrap__(self, array, context): - return TaggedValue(array, self.unit) - - def __repr__(self): - return 'TaggedValue(' + repr(self.value) + ', ' + repr(self.unit) + ')' - - def __str__(self): - return str(self.value) + ' in ' + str(self.unit) - - def __len__(self): - return len(self.value) - - def __iter__(self): - class IteratorProxy(object): - def __init__(self, iter, unit): - self.iter = iter - self.unit = unit - - def __next__(self): - value = next(self.iter) - return TaggedValue(value, self.unit) - next = __next__ # for Python 2 - return IteratorProxy(iter(self.value), self.unit) - - def get_compressed_copy(self, mask): - new_value = np.ma.masked_array(self.value, mask=mask).compressed() - return TaggedValue(new_value, self.unit) - - def convert_to(self, unit): - if (unit == self.unit or not unit): - return self - new_value = self.unit.convert_value_to(self.value, unit) - return TaggedValue(new_value, unit) - - def get_value(self): - return self.value - - def get_unit(self): - return self.unit - - -TaggedValue = TaggedValueMeta('TaggedValue', (_TaggedValue, ), {}) - - -class BasicUnit(object): - def __init__(self, name, fullname=None): - self.name = name - if fullname is None: - fullname = name - self.fullname = fullname - self.conversions = dict() - - def __repr__(self): - return 'BasicUnit(%s)'%self.name - - def __str__(self): - return self.fullname - - def __call__(self, value): - return TaggedValue(value, self) - - def __mul__(self, rhs): - value = rhs - unit = self - if hasattr(rhs, 'get_unit'): - value = rhs.get_value() - unit = rhs.get_unit() - unit = unit_resolver('__mul__', (self, unit)) - if (unit == NotImplemented): - return NotImplemented - return TaggedValue(value, unit) - - def __rmul__(self, lhs): - return self*lhs - - def __array_wrap__(self, array, context): - return TaggedValue(array, self) - - def __array__(self, t=None, context=None): - ret = np.array([1]) - if t is not None: - return ret.astype(t) - else: - return ret - - def add_conversion_factor(self, unit, factor): - def convert(x): - return x*factor - self.conversions[unit] = convert - - def add_conversion_fn(self, unit, fn): - self.conversions[unit] = fn - - def get_conversion_fn(self, unit): - return self.conversions[unit] - - def convert_value_to(self, value, unit): - conversion_fn = self.conversions[unit] - ret = conversion_fn(value) - return ret - - def get_unit(self): - return self - - -class UnitResolver(object): - def addition_rule(self, units): - for unit_1, unit_2 in zip(units[:-1], units[1:]): - if (unit_1 != unit_2): - return NotImplemented - return units[0] - - def multiplication_rule(self, units): - non_null = [u for u in units if u] - if (len(non_null) > 1): - return NotImplemented - return non_null[0] - - op_dict = { - '__mul__': multiplication_rule, - '__rmul__': multiplication_rule, - '__add__': addition_rule, - '__radd__': addition_rule, - '__sub__': addition_rule, - '__rsub__': addition_rule} - - def __call__(self, operation, units): - if (operation not in self.op_dict): - return NotImplemented - - return self.op_dict[operation](self, units) - - -unit_resolver = UnitResolver() - -cm = BasicUnit('cm', 'centimeters') -inch = BasicUnit('inch', 'inches') -inch.add_conversion_factor(cm, 2.54) -cm.add_conversion_factor(inch, 1/2.54) - -radians = BasicUnit('rad', 'radians') -degrees = BasicUnit('deg', 'degrees') -radians.add_conversion_factor(degrees, 180.0/np.pi) -degrees.add_conversion_factor(radians, np.pi/180.0) - -secs = BasicUnit('s', 'seconds') -hertz = BasicUnit('Hz', 'Hertz') -minutes = BasicUnit('min', 'minutes') - -secs.add_conversion_fn(hertz, lambda x: 1./x) -secs.add_conversion_factor(minutes, 1/60.0) - - -# radians formatting -def rad_fn(x, pos=None): - n = int((x / np.pi) * 2.0 + 0.25) - if n == 0: - return '0' - elif n == 1: - return r'$\pi/2$' - elif n == 2: - return r'$\pi$' - elif n % 2 == 0: - return r'$%s\pi$' % (n/2,) - else: - return r'$%s\pi/2$' % (n,) - - -class BasicUnitConverter(units.ConversionInterface): - - @staticmethod - def axisinfo(unit, axis): - 'return AxisInfo instance for x and unit' - - if unit==radians: - return units.AxisInfo( - majloc=ticker.MultipleLocator(base=np.pi/2), - majfmt=ticker.FuncFormatter(rad_fn), - label=unit.fullname, - ) - elif unit==degrees: - return units.AxisInfo( - majloc=ticker.AutoLocator(), - majfmt=ticker.FormatStrFormatter(r'$%i^\circ$'), - label=unit.fullname, - ) - elif unit is not None: - if hasattr(unit, 'fullname'): - return units.AxisInfo(label=unit.fullname) - elif hasattr(unit, 'unit'): - return units.AxisInfo(label=unit.unit.fullname) - return None - - @staticmethod - def convert(val, unit, axis): - if units.ConversionInterface.is_numlike(val): - return val - if iterable(val): - return [thisval.convert_to(unit).get_value() for thisval in val] - else: - return val.convert_to(unit).get_value() - - @staticmethod - def default_units(x, axis): - 'return the default unit for x or None' - if iterable(x): - for thisx in x: - return thisx.unit - return x.unit - - -def cos(x): - if iterable(x): - return [math.cos(val.convert_to(radians).get_value()) for val in x] - else: - return math.cos(x.convert_to(radians).get_value()) - - -basicConverter = BasicUnitConverter() -units.registry[BasicUnit] = basicConverter -units.registry[TaggedValue] = basicConverter diff --git a/dev/mpl_examples/units/ellipse_with_units.py b/dev/mpl_examples/units/ellipse_with_units.py deleted file mode 100644 index ab522b92ac0..00000000000 --- a/dev/mpl_examples/units/ellipse_with_units.py +++ /dev/null @@ -1,70 +0,0 @@ -""" -Compare the ellipse generated with arcs versus a polygonal approximation -""" -from basic_units import cm -import numpy as np -from matplotlib import patches -import matplotlib.pyplot as plt - - -xcenter, ycenter = 0.38*cm, 0.52*cm -#xcenter, ycenter = 0., 0. -width, height = 1e-1*cm, 3e-1*cm -angle = -30 - -theta = np.arange(0.0, 360.0, 1.0)*np.pi/180.0 -x = 0.5 * width * np.cos(theta) -y = 0.5 * height * np.sin(theta) - -rtheta = angle*np.pi/180. -R = np.array([ - [np.cos(rtheta), -np.sin(rtheta)], - [np.sin(rtheta), np.cos(rtheta)], - ]) - - -x, y = np.dot(R, np.array([x, y])) -x += xcenter -y += ycenter - -fig = plt.figure() -ax = fig.add_subplot(211, aspect='auto') -ax.fill(x, y, alpha=0.2, facecolor='yellow', edgecolor='yellow', linewidth=1, zorder=1) - -e1 = patches.Ellipse((xcenter, ycenter), width, height, - angle=angle, linewidth=2, fill=False, zorder=2) - -ax.add_patch(e1) - -ax = fig.add_subplot(212, aspect='equal') -ax.fill(x, y, alpha=0.2, facecolor='green', edgecolor='green', zorder=1) -e2 = patches.Ellipse((xcenter, ycenter), width, height, - angle=angle, linewidth=2, fill=False, zorder=2) - - -ax.add_patch(e2) - -#fig.savefig('ellipse_compare.png') -fig.savefig('ellipse_compare') - -fig = plt.figure() -ax = fig.add_subplot(211, aspect='auto') -ax.fill(x, y, alpha=0.2, facecolor='yellow', edgecolor='yellow', linewidth=1, zorder=1) - -e1 = patches.Arc((xcenter, ycenter), width, height, - angle=angle, linewidth=2, fill=False, zorder=2) - -ax.add_patch(e1) - -ax = fig.add_subplot(212, aspect='equal') -ax.fill(x, y, alpha=0.2, facecolor='green', edgecolor='green', zorder=1) -e2 = patches.Arc((xcenter, ycenter), width, height, - angle=angle, linewidth=2, fill=False, zorder=2) - - -ax.add_patch(e2) - -#fig.savefig('arc_compare.png') -fig.savefig('arc_compare') - -plt.show() diff --git a/dev/mpl_examples/units/ellipse_with_units_00.hires.png b/dev/mpl_examples/units/ellipse_with_units_00.hires.png deleted file mode 100644 index b920434e4fa..00000000000 Binary files a/dev/mpl_examples/units/ellipse_with_units_00.hires.png and /dev/null differ diff --git a/dev/mpl_examples/units/ellipse_with_units_00.pdf b/dev/mpl_examples/units/ellipse_with_units_00.pdf deleted file mode 100644 index a27faecb177..00000000000 Binary files a/dev/mpl_examples/units/ellipse_with_units_00.pdf and /dev/null differ diff --git a/dev/mpl_examples/units/ellipse_with_units_00.png b/dev/mpl_examples/units/ellipse_with_units_00.png deleted file mode 100644 index a0ecb1336f1..00000000000 Binary files a/dev/mpl_examples/units/ellipse_with_units_00.png and /dev/null differ diff --git a/dev/mpl_examples/units/ellipse_with_units_01.hires.png b/dev/mpl_examples/units/ellipse_with_units_01.hires.png deleted file mode 100644 index 3d6bca1d3cf..00000000000 Binary files a/dev/mpl_examples/units/ellipse_with_units_01.hires.png and /dev/null differ diff --git a/dev/mpl_examples/units/ellipse_with_units_01.pdf b/dev/mpl_examples/units/ellipse_with_units_01.pdf deleted file mode 100644 index 67e2cc19b47..00000000000 Binary files a/dev/mpl_examples/units/ellipse_with_units_01.pdf and /dev/null differ diff --git a/dev/mpl_examples/units/ellipse_with_units_01.png b/dev/mpl_examples/units/ellipse_with_units_01.png deleted file mode 100644 index 11b59543b91..00000000000 Binary files a/dev/mpl_examples/units/ellipse_with_units_01.png and /dev/null differ diff --git a/dev/mpl_examples/units/evans_test.hires.png b/dev/mpl_examples/units/evans_test.hires.png deleted file mode 100644 index 7e1ef15c42a..00000000000 Binary files a/dev/mpl_examples/units/evans_test.hires.png and /dev/null differ diff --git a/dev/mpl_examples/units/evans_test.pdf b/dev/mpl_examples/units/evans_test.pdf deleted file mode 100644 index b2a4c0f6f33..00000000000 Binary files a/dev/mpl_examples/units/evans_test.pdf and /dev/null differ diff --git a/dev/mpl_examples/units/evans_test.png b/dev/mpl_examples/units/evans_test.png deleted file mode 100644 index a3169b4068b..00000000000 Binary files a/dev/mpl_examples/units/evans_test.png and /dev/null differ diff --git a/dev/mpl_examples/units/evans_test.py b/dev/mpl_examples/units/evans_test.py deleted file mode 100644 index 61527825231..00000000000 --- a/dev/mpl_examples/units/evans_test.py +++ /dev/null @@ -1,91 +0,0 @@ -""" -A mockup "Foo" units class which supports -conversion and different tick formatting depending on the "unit". -Here the "unit" is just a scalar conversion factor, but this example shows mpl is -entirely agnostic to what kind of units client packages use -""" -from matplotlib.cbook import iterable -import matplotlib.units as units -import matplotlib.ticker as ticker -import matplotlib.pyplot as plt - - -class Foo: - def __init__( self, val, unit=1.0 ): - self.unit = unit - self._val = val * unit - - def value( self, unit ): - if unit is None: unit = self.unit - return self._val / unit - -class FooConverter: - - @staticmethod - def axisinfo(unit, axis): - 'return the Foo AxisInfo' - if unit==1.0 or unit==2.0: - return units.AxisInfo( - majloc = ticker.IndexLocator( 8, 0 ), - majfmt = ticker.FormatStrFormatter("VAL: %s"), - label='foo', - ) - - else: - return None - - @staticmethod - def convert(obj, unit, axis): - """ - convert obj using unit. If obj is a sequence, return the - converted sequence - """ - if units.ConversionInterface.is_numlike(obj): - return obj - - if iterable(obj): - return [o.value(unit) for o in obj] - else: - return obj.value(unit) - - @staticmethod - def default_units(x, axis): - 'return the default unit for x or None' - if iterable(x): - for thisx in x: - return thisx.unit - else: - return x.unit - -units.registry[Foo] = FooConverter() - -# create some Foos -x = [] -for val in range( 0, 50, 2 ): - x.append( Foo( val, 1.0 ) ) - -# and some arbitrary y data -y = [i for i in range( len(x) ) ] - - -# plot specifying units -fig = plt.figure() -fig.suptitle("Custom units") -fig.subplots_adjust(bottom=0.2) -ax = fig.add_subplot(1,2,2) -ax.plot( x, y, 'o', xunits=2.0 ) -for label in ax.get_xticklabels(): - label.set_rotation(30) - label.set_ha('right') -ax.set_title("xunits = 2.0") - - -# plot without specifying units; will use the None branch for axisinfo -ax = fig.add_subplot(1,2,1) -ax.plot( x, y ) # uses default units -ax.set_title('default units') -for label in ax.get_xticklabels(): - label.set_rotation(30) - label.set_ha('right') - -plt.show() diff --git a/dev/mpl_examples/units/radian_demo.hires.png b/dev/mpl_examples/units/radian_demo.hires.png deleted file mode 100644 index c03e394da63..00000000000 Binary files a/dev/mpl_examples/units/radian_demo.hires.png and /dev/null differ diff --git a/dev/mpl_examples/units/radian_demo.pdf b/dev/mpl_examples/units/radian_demo.pdf deleted file mode 100644 index f213779dd95..00000000000 Binary files a/dev/mpl_examples/units/radian_demo.pdf and /dev/null differ diff --git a/dev/mpl_examples/units/radian_demo.png b/dev/mpl_examples/units/radian_demo.png deleted file mode 100644 index f70252c9cee..00000000000 Binary files a/dev/mpl_examples/units/radian_demo.png and /dev/null differ diff --git a/dev/mpl_examples/units/radian_demo.py b/dev/mpl_examples/units/radian_demo.py deleted file mode 100644 index 3eeca931e75..00000000000 --- a/dev/mpl_examples/units/radian_demo.py +++ /dev/null @@ -1,21 +0,0 @@ -""" -Plot with radians from the basic_units mockup example package -This example shows how the unit class can determine the tick locating, -formatting and axis labeling. -""" -import numpy as np -from basic_units import radians, degrees, cos -from matplotlib.pyplot import figure, show - -x = [val*radians for val in np.arange(0, 15, 0.01)] - -fig = figure() -fig.subplots_adjust(hspace=0.3) - -ax = fig.add_subplot(211) -line1, = ax.plot(x, cos(x), xunits=radians) - -ax = fig.add_subplot(212) -line2, = ax.plot(x, cos(x), xunits=degrees) - -show() diff --git a/dev/mpl_examples/units/units_sample.hires.png b/dev/mpl_examples/units/units_sample.hires.png deleted file mode 100644 index 5d6dbdba679..00000000000 Binary files a/dev/mpl_examples/units/units_sample.hires.png and /dev/null differ diff --git a/dev/mpl_examples/units/units_sample.pdf b/dev/mpl_examples/units/units_sample.pdf deleted file mode 100644 index 8c0d5fd9b1e..00000000000 Binary files a/dev/mpl_examples/units/units_sample.pdf and /dev/null differ diff --git a/dev/mpl_examples/units/units_sample.png b/dev/mpl_examples/units/units_sample.png deleted file mode 100644 index 83bcbd540ac..00000000000 Binary files a/dev/mpl_examples/units/units_sample.png and /dev/null differ diff --git a/dev/mpl_examples/units/units_sample.py b/dev/mpl_examples/units/units_sample.py deleted file mode 100644 index 8b47e8fb6be..00000000000 --- a/dev/mpl_examples/units/units_sample.py +++ /dev/null @@ -1,33 +0,0 @@ -""" -plot using a variety of cm vs inches conversions. The example shows -how default unit instrospection works (ax1), how various keywords can -be used to set the x and y units to override the defaults (ax2, ax3, -ax4) and how one can set the xlimits using scalars (ax3, current units -assumed) or units (conversions applied to get the numbers to current -units) - -""" -from basic_units import cm, inch -import matplotlib.pyplot as plt -import numpy - -cms = cm *numpy.arange(0, 10, 2) - -fig = plt.figure() - -ax1 = fig.add_subplot(2,2,1) -ax1.plot(cms, cms) - -ax2 = fig.add_subplot(2,2,2) -ax2.plot(cms, cms, xunits=cm, yunits=inch) - -ax3 = fig.add_subplot(2,2,3) -ax3.plot(cms, cms, xunits=inch, yunits=cm) -ax3.set_xlim(3, 6) # scalars are interpreted in current units - -ax4 = fig.add_subplot(2,2,4) -ax4.plot(cms, cms, xunits=inch, yunits=inch) -#fig.savefig('simple_conversion_plot.png') -ax4.set_xlim(3*cm, 6*cm) # cm are converted to inches - -plt.show() diff --git a/dev/mpl_examples/units/units_scatter.hires.png b/dev/mpl_examples/units/units_scatter.hires.png deleted file mode 100644 index 5cfe6029b1c..00000000000 Binary files a/dev/mpl_examples/units/units_scatter.hires.png and /dev/null differ diff --git a/dev/mpl_examples/units/units_scatter.pdf b/dev/mpl_examples/units/units_scatter.pdf deleted file mode 100644 index e154f50b2ec..00000000000 Binary files a/dev/mpl_examples/units/units_scatter.pdf and /dev/null differ diff --git a/dev/mpl_examples/units/units_scatter.png b/dev/mpl_examples/units/units_scatter.png deleted file mode 100644 index ec56eab6e7b..00000000000 Binary files a/dev/mpl_examples/units/units_scatter.png and /dev/null differ diff --git a/dev/mpl_examples/units/units_scatter.py b/dev/mpl_examples/units/units_scatter.py deleted file mode 100644 index 41d2541e948..00000000000 --- a/dev/mpl_examples/units/units_scatter.py +++ /dev/null @@ -1,37 +0,0 @@ -""" -Demonstrate unit handling - -basic_units is a mockup of a true units package used for testing -purposed, which illustrates the basic interface that a units package -must provide to matplotlib. - -The example below shows support for unit conversions over masked -arrays. -""" -import numpy as np -from basic_units import secs, hertz, minutes -from matplotlib.pylab import figure, show - -# create masked array - - -xsecs = secs*np.ma.MaskedArray((1,2,3,4,5,6,7,8), (1,0,1,0,0,0,1,0), np.float) -#xsecs = secs*np.arange(1,10.) - -fig = figure() -ax1 = fig.add_subplot(3,1,1) -ax1.scatter(xsecs, xsecs) -#ax1.set_ylabel('seconds') -ax1.axis([0,10,0,10]) - -ax2 = fig.add_subplot(3,1,2, sharex=ax1) -ax2.scatter(xsecs, xsecs, yunits=hertz) -ax2.axis([0,10,0,1]) - -ax3 = fig.add_subplot(3,1,3, sharex=ax1) -ax3.scatter(xsecs, xsecs, yunits=hertz) -ax3.yaxis.set_units(minutes) -ax3.axis([0,10,0,1]) - -show() - diff --git a/dev/mpl_examples/widgets/cursor.hires.png b/dev/mpl_examples/widgets/cursor.hires.png deleted file mode 100644 index 5098bb7824f..00000000000 Binary files a/dev/mpl_examples/widgets/cursor.hires.png and /dev/null differ diff --git a/dev/mpl_examples/widgets/cursor.pdf b/dev/mpl_examples/widgets/cursor.pdf deleted file mode 100644 index 3a8d28efc4a..00000000000 Binary files a/dev/mpl_examples/widgets/cursor.pdf and /dev/null differ diff --git a/dev/mpl_examples/widgets/cursor.png b/dev/mpl_examples/widgets/cursor.png deleted file mode 100644 index a4fa08b0726..00000000000 Binary files a/dev/mpl_examples/widgets/cursor.png and /dev/null differ diff --git a/dev/mpl_examples/widgets/cursor.py b/dev/mpl_examples/widgets/cursor.py deleted file mode 100644 index 0e5d30e141e..00000000000 --- a/dev/mpl_examples/widgets/cursor.py +++ /dev/null @@ -1,19 +0,0 @@ -#!/usr/bin/env python - -from matplotlib.widgets import Cursor -import numpy as np -import matplotlib.pyplot as plt - - -fig = plt.figure(figsize=(8, 6)) -ax = fig.add_subplot(111, axisbg='#FFFFCC') - -x, y = 4*(np.random.rand(2, 100)-.5) -ax.plot(x, y, 'o') -ax.set_xlim(-2, 2) -ax.set_ylim(-2, 2) - -# set useblit = True on gtkagg for enhanced performance -cursor = Cursor(ax, useblit=True, color='red', linewidth=2 ) - -plt.show() diff --git a/dev/mpl_examples/widgets/slider_demo.hires.png b/dev/mpl_examples/widgets/slider_demo.hires.png deleted file mode 100644 index 00235a900ff..00000000000 Binary files a/dev/mpl_examples/widgets/slider_demo.hires.png and /dev/null differ diff --git a/dev/mpl_examples/widgets/slider_demo.pdf b/dev/mpl_examples/widgets/slider_demo.pdf deleted file mode 100644 index ab90ce3797a..00000000000 Binary files a/dev/mpl_examples/widgets/slider_demo.pdf and /dev/null differ diff --git a/dev/mpl_examples/widgets/slider_demo.png b/dev/mpl_examples/widgets/slider_demo.png deleted file mode 100644 index 110c98a9040..00000000000 Binary files a/dev/mpl_examples/widgets/slider_demo.png and /dev/null differ diff --git a/dev/mpl_examples/widgets/slider_demo.py b/dev/mpl_examples/widgets/slider_demo.py deleted file mode 100644 index 04c222a5673..00000000000 --- a/dev/mpl_examples/widgets/slider_demo.py +++ /dev/null @@ -1,44 +0,0 @@ -import numpy as np -import matplotlib.pyplot as plt -from matplotlib.widgets import Slider, Button, RadioButtons - -fig = plt.figure() -ax = fig.add_subplot(111) -plt.subplots_adjust(left=0.25, bottom=0.25) -t = np.arange(0.0, 1.0, 0.001) -a0 = 5 -f0 = 3 -s = a0*np.sin(2*np.pi*f0*t) -l, = plt.plot(t,s, lw=2, color='red') -plt.axis([0, 1, -10, 10]) - -axcolor = 'lightgoldenrodyellow' -axfreq = plt.axes([0.25, 0.1, 0.65, 0.03], axisbg=axcolor) -axamp = plt.axes([0.25, 0.15, 0.65, 0.03], axisbg=axcolor) - -sfreq = Slider(axfreq, 'Freq', 0.1, 30.0, valinit=f0) -samp = Slider(axamp, 'Amp', 0.1, 10.0, valinit=a0) - -def update(val): - amp = samp.val - freq = sfreq.val - l.set_ydata(amp*np.sin(2*np.pi*freq*t)) - fig.canvas.draw_idle() -sfreq.on_changed(update) -samp.on_changed(update) - -resetax = plt.axes([0.8, 0.025, 0.1, 0.04]) -button = Button(resetax, 'Reset', color=axcolor, hovercolor='0.975') -def reset(event): - sfreq.reset() - samp.reset() -button.on_clicked(reset) - -rax = plt.axes([0.025, 0.5, 0.15, 0.15], axisbg=axcolor) -radio = RadioButtons(rax, ('red', 'blue', 'green'), active=0) -def colorfunc(label): - l.set_color(label) - fig.canvas.draw_idle() -radio.on_clicked(colorfunc) - -plt.show() diff --git a/dev/mpl_toolkits/axes_grid/api/axes_divider_api.html b/dev/mpl_toolkits/axes_grid/api/axes_divider_api.html deleted file mode 100644 index 07eb4eb4787..00000000000 --- a/dev/mpl_toolkits/axes_grid/api/axes_divider_api.html +++ /dev/null @@ -1,596 +0,0 @@ - - - - - - - - mpl_toolkits.axes_grid.axes_divider — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      Previous topic

      -

      mpl_toolkits.axes_grid.axes_size

      -

      Next topic

      -

      mpl_toolkits.axes_grid.axes_grid

      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      mpl_toolkits.axes_grid.axes_divider

      -
      -
      -class mpl_toolkits.axes_grid.axes_divider.Divider(fig, pos, horizontal, vertical, aspect=None, anchor='C')
      -

      This is the class that is used calculates the axes position. It -divides the given rectangular area into several -sub-rectangles. You initialize the divider by setting the -horizontal and vertical lists of sizes -(mpl_toolkits.axes_grid.axes_size) that the division will -be based on. You then use the new_locator method to create a -callable object that can be used to as the axes_locator of the -axes.

      - --- - - - -
      Parameters:
        -
      • fig – matplotlib figure
      • -
      • pos – position (tuple of 4 floats) of the rectangle that -will be divided.
      • -
      • horizontal – list of sizes -(axes_size) -for horizontal division
      • -
      • vertical – list of sizes -(axes_size) -for vertical division
      • -
      • aspect – if True, the overall rectangular area is reduced -so that the relative part of the horizontal and -vertical scales have same scale.
      • -
      • anchor – Determine how the reduced rectangle is placed -when aspect is True.
      • -
      -
      -
      -
      -add_auto_adjustable_area(use_axes, pad=0.1, adjust_dirs=['left', 'right', 'bottom', 'top'])
      -
      - -
      -
      -append_size(position, size)
      -
      - -
      -
      -get_anchor()
      -

      return the anchor

      -
      - -
      -
      -get_aspect()
      -

      return aspect

      -
      - -
      -
      -get_horizontal()
      -

      return horizontal sizes

      -
      - -
      -
      -get_horizontal_sizes(renderer)
      -
      - -
      -
      -get_locator()
      -
      - -
      -
      -get_position()
      -

      return the position of the rectangle.

      -
      - -
      -
      -get_position_runtime(ax, renderer)
      -
      - -
      -
      -get_vertical()
      -

      return vertical sizes

      -
      - -
      -
      -get_vertical_sizes(renderer)
      -
      - -
      -
      -get_vsize_hsize()
      -
      - -
      -
      -locate(nx, ny, nx1=None, ny1=None, axes=None, renderer=None)
      -
      --- - - - -
      Parameters:
        -
      • nx1 (nx,) – Integers specifying the column-position of the -cell. When nx1 is None, a single nx-th column is -specified. Otherwise location of columns spanning between nx -to nx1 (but excluding nx1-th column) is specified.
      • -
      • ny1 (ny,) – same as nx and nx1, but for row positions.
      • -
      -
      -
      - -
      -
      -new_locator(nx, ny, nx1=None, ny1=None)
      -

      returns a new locator -(mpl_toolkits.axes_grid.axes_divider.AxesLocator) for -specified cell.

      - --- - - - -
      Parameters:
        -
      • nx1 (nx,) – Integers specifying the column-position of the -cell. When nx1 is None, a single nx-th column is -specified. Otherwise location of columns spanning between nx -to nx1 (but excluding nx1-th column) is specified.
      • -
      • ny1 (ny,) – same as nx and nx1, but for row positions.
      • -
      -
      -
      - -
      -
      -set_anchor(anchor)
      -
      --- - - - -
      Parameters:anchor

      anchor position

      - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      valuedescription
      ‘C’Center
      ‘SW’bottom left
      ‘S’bottom
      ‘SE’bottom right
      ‘E’right
      ‘NE’top right
      ‘N’top
      ‘NW’top left
      ‘W’left
      -
      -
      - -
      -
      -set_aspect(aspect=False)
      -
      --- - - - -
      Parameters:anchor – True or False
      -
      - -
      -
      -set_horizontal(h)
      -
      --- - - - -
      Parameters:horizontal – list of sizes -(axes_size) -for horizontal division
      -

      .

      -
      - -
      -
      -set_locator(_locator)
      -
      - -
      -
      -set_position(pos)
      -

      set the position of the rectangle.

      - --- - - - -
      Parameters:pos – position (tuple of 4 floats) of the rectangle that -will be divided.
      -
      - -
      -
      -set_vertical(v)
      -
      --- - - - -
      Parameters:horizontal – list of sizes -(axes_size) -for horizontal division
      -

      .

      -
      - -
      - -
      -
      -class mpl_toolkits.axes_grid.axes_divider.AxesLocator(axes_divider, nx, ny, nx1=None, ny1=None)
      -

      A simple callable object, initialized with AxesDivider class, -returns the position and size of the given cell.

      - --- - - - -
      Parameters:
        -
      • axes_divider – An instance of AxesDivider class.
      • -
      • nx1 (nx,) – Integers specifying the column-position of the -cell. When nx1 is None, a single nx-th column is -specified. Otherwise location of columns spanning between nx -to nx1 (but excluding nx1-th column) is is specified.
      • -
      • ny1 (ny,) – same as nx and nx1, but for row positions.
      • -
      -
      -
      -
      -get_subplotspec()
      -
      - -
      - -
      -
      -class mpl_toolkits.axes_grid.axes_divider.SubplotDivider(fig, *args, **kwargs)
      -

      The Divider class whose rectangle area is specified as a subplot geometry.

      -

      fig is a matplotlib.figure.Figure instance.

      -

      args is the tuple (numRows, numCols, plotNum), where -the array of subplots in the figure has dimensions numRows, -numCols, and where plotNum is the number of the subplot -being created. plotNum starts at 1 in the upper left -corner and increases to the right.

      -

      If numRows <= numCols <= plotNum < 10, args can be the -decimal integer numRows * 100 + numCols * 10 + plotNum.

      -
      -
      -change_geometry(numrows, numcols, num)
      -

      change subplot geometry, e.g., from 1,1,1 to 2,2,3

      -
      - -
      -
      -get_geometry()
      -

      get the subplot geometry, eg 2,2,3

      -
      - -
      -
      -get_position()
      -

      return the bounds of the subplot box

      -
      - -
      -
      -get_subplotspec()
      -

      get the SubplotSpec instance

      -
      - -
      -
      -set_subplotspec(subplotspec)
      -

      set the SubplotSpec instance

      -
      - -
      -
      -update_params()
      -

      update the subplot position from fig.subplotpars

      -
      - -
      - -
      -
      -class mpl_toolkits.axes_grid.axes_divider.AxesDivider(axes, xref=None, yref=None)
      -

      Divider based on the pre-existing axes.

      - --- - - - -
      Parameters:axes – axes
      -
      -
      -append_axes(position, size, pad=None, add_to_figure=True, **kwargs)
      -

      create an axes at the given position with the same height -(or width) of the main axes.

      -
      -
      -
      position
      -
      [“left”|”right”|”bottom”|”top”]
      -
      -

      size and pad should be axes_grid.axes_size compatible.

      -
      -
      - -
      -
      -new_horizontal(size, pad=None, pack_start=False, **kwargs)
      -

      Add a new axes on the right (or left) side of the main axes.

      - --- - - - -
      Parameters:
        -
      • size – A width of the axes. A axes_size -instance or if float or string is given, from_any -function is used to create one, with ref_size set to AxesX instance -of the current axes.
      • -
      • pad – pad between the axes. It takes same argument as size.
      • -
      • pack_start – If False, the new axes is appended at the end -of the list, i.e., it became the right-most axes. If True, it is -inserted at the start of the list, and becomes the left-most axes.
      • -
      -
      -

      All extra keywords arguments are passed to the created axes. -If axes_class is given, the new axes will be created as an -instance of the given class. Otherwise, the same class of the -main axes will be used.

      -
      - -
      -
      -new_vertical(size, pad=None, pack_start=False, **kwargs)
      -

      Add a new axes on the top (or bottom) side of the main axes.

      - --- - - - -
      Parameters:
        -
      • size – A height of the axes. A axes_size -instance or if float or string is given, from_any -function is used to create one, with ref_size set to AxesX instance -of the current axes.
      • -
      • pad – pad between the axes. It takes same argument as size.
      • -
      • pack_start – If False, the new axes is appended at the end -of the list, i.e., it became the top-most axes. If True, it is -inserted at the start of the list, and becomes the bottom-most axes.
      • -
      -
      -

      All extra keywords arguments are passed to the created axes. -If axes_class is given, the new axes will be created as an -instance of the given class. Otherwise, the same class of the -main axes will be used.

      -
      - -
      - -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/mpl_toolkits/axes_grid/api/axes_grid_api.html b/dev/mpl_toolkits/axes_grid/api/axes_grid_api.html deleted file mode 100644 index f5bbea8375c..00000000000 --- a/dev/mpl_toolkits/axes_grid/api/axes_grid_api.html +++ /dev/null @@ -1,314 +0,0 @@ - - - - - - - - mpl_toolkits.axes_grid.axes_grid — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      Previous topic

      -

      mpl_toolkits.axes_grid.axes_divider

      -

      Next topic

      -

      mpl_toolkits.axes_grid.axis_artist

      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      mpl_toolkits.axes_grid.axes_grid

      -
      -
      -class mpl_toolkits.axes_grid.axes_grid.Grid(fig, rect, nrows_ncols, ngrids=None, direction='row', axes_pad=0.02, add_all=True, share_all=False, share_x=True, share_y=True, label_mode='L', axes_class=None)
      -

      Build an Grid instance with a grid nrows*ncols -Axes in -Figure fig with -rect=[left, bottom, width, height] (in -Figure coordinates) or -the subplot position code (e.g., “121”).

      -

      Optional keyword arguments:

      -
      -
      ----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      KeywordDefaultDescription
      direction“row”[ “row” | “column” ]
      axes_pad0.02float| pad between axes given in inches
      add_allTrue[ True | False ]
      share_allFalse[ True | False ]
      share_xTrue[ True | False ]
      share_yTrue[ True | False ]
      label_mode“L”[ “L” | “1” | “all” ]
      axes_classNonea type object which must be a subclass -of Axes
      -
      -
      - -
      -
      -class mpl_toolkits.axes_grid.axes_grid.ImageGrid(fig, rect, nrows_ncols, ngrids=None, direction='row', axes_pad=0.02, add_all=True, share_all=False, aspect=True, label_mode='L', cbar_mode=None, cbar_location='right', cbar_pad=None, cbar_size='5%', cbar_set_cax=True, axes_class=None)
      -

      Build an ImageGrid instance with a grid nrows*ncols -Axes in -Figure fig with -rect=[left, bottom, width, height] (in -Figure coordinates) or -the subplot position code (e.g., “121”).

      -

      Optional keyword arguments:

      -
      -
      ----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      KeywordDefaultDescription
      direction“row”[ “row” | “column” ]
      axes_pad0.02float| pad between axes given in inches
      add_allTrue[ True | False ]
      share_allFalse[ True | False ]
      aspectTrue[ True | False ]
      label_mode“L”[ “L” | “1” | “all” ]
      cbar_modeNone[ “each” | “single” | “edge” ]
      cbar_location“right”[ “left” | “right” | “bottom” | “top” ]
      cbar_padNone 
      cbar_size“5%” 
      cbar_set_caxTrue[ True | False ]
      axes_classNonea type object which must be a subclass -of Axes
      -
      -
      -
      cbar_set_cax : if True, each axes in the grid has a cax
      -
      attribute that is bind to associated cbar_axes.
      -
      -
      - -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/mpl_toolkits/axes_grid/api/axes_size_api.html b/dev/mpl_toolkits/axes_grid/api/axes_size_api.html deleted file mode 100644 index c73828563ee..00000000000 --- a/dev/mpl_toolkits/axes_grid/api/axes_size_api.html +++ /dev/null @@ -1,238 +0,0 @@ - - - - - - - - mpl_toolkits.axes_grid.axes_size — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      Previous topic

      -

      The Matplotlib AxesGrid Toolkit API

      -

      Next topic

      -

      mpl_toolkits.axes_grid.axes_divider

      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      mpl_toolkits.axes_grid.axes_size

      -
      -
      -class mpl_toolkits.axes_grid.axes_size.Fixed(fixed_size)
      -

      Simple fixed size with absolute part = fixed_size and relative part = 0

      -
      - -
      -
      -class mpl_toolkits.axes_grid.axes_size.Scaled(scalable_size)
      -

      Simple scaled(?) size with absolute part = 0 and relative part = scalable_size

      -
      - -
      -
      -class mpl_toolkits.axes_grid.axes_size.AxesX(axes, aspect=1.0)
      -

      Scaled size whose relative part corresponds to the data width -of the axes multiplied by the aspect.

      -
      - -
      -
      -class mpl_toolkits.axes_grid.axes_size.AxesY(axes, aspect=1.0)
      -

      Scaled size whose relative part corresponds to the data height -of the axes multiplied by the aspect.

      -
      - -
      -
      -class mpl_toolkits.axes_grid.axes_size.MaxWidth(artist_list)
      -

      Size whose absolute part is the largest width of -the given artist_list.

      -
      - -
      -
      -class mpl_toolkits.axes_grid.axes_size.MaxHeight(artist_list)
      -

      Size whose absolute part is the largest height of -the given artist_list.

      -
      - -
      -
      -class mpl_toolkits.axes_grid.axes_size.Fraction(fraction, ref_size)
      -

      An instance whose size is a fraction of the ref_size.

      -
      >>> s = Fraction(0.3, AxesX(ax))
      -
      -
      -
      - -
      -
      -class mpl_toolkits.axes_grid.axes_size.Padded(size, pad)
      -

      Return a instance where the absolute part of size is -increase by the amount of pad.

      -
      - -
      -
      -mpl_toolkits.axes_grid.axes_size.from_any(size, fraction_ref=None)
      -

      Creates Fixed unit when the first argument is a float, or a -Fraction unit if that is a string that ends with %. The second -argument is only meaningful when Fraction unit is created.:

      -
      >>> a = Size.from_any(1.2) # => Size.Fixed(1.2)
      ->>> Size.from_any("50%", a) # => Size.Fraction(0.5, a)
      -
      -
      -
      - -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/mpl_toolkits/axes_grid/api/axis_artist_api.html b/dev/mpl_toolkits/axes_grid/api/axis_artist_api.html deleted file mode 100644 index c1858c02f4b..00000000000 --- a/dev/mpl_toolkits/axes_grid/api/axis_artist_api.html +++ /dev/null @@ -1,535 +0,0 @@ - - - - - - - - mpl_toolkits.axes_grid.axis_artist — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      Previous topic

      -

      mpl_toolkits.axes_grid.axes_grid

      -

      Next topic

      -

      mplot3d

      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      mpl_toolkits.axes_grid.axis_artist

      -
      -
      -class mpl_toolkits.axes_grid.axis_artist.AxisArtist(axes, helper, offset=None, axis_direction='bottom', **kw)
      -

      An artist which draws axis (a line along which the n-th axes coord -is constant) line, ticks, ticklabels, and axis label.

      -

      axes : axes -helper : an AxisArtistHelper instance.

      -
      -
      -LABELPAD
      -
      - -
      -
      -ZORDER = 2.5
      -
      - -
      -
      -draw(artist, renderer, *args, **kwargs)
      -

      Draw the axis lines, tick lines and labels

      -
      - -
      -
      -get_axisline_style()
      -

      return the current axisline style.

      -
      - -
      -
      -get_helper()
      -

      Return axis artist helper instance.

      -
      - -
      -
      -get_tightbbox(renderer)
      -
      - -
      -
      -get_transform()
      -
      - -
      -
      -invert_ticklabel_direction()
      -
      - -
      -
      -set_axis_direction(axis_direction)
      -

      Adjust the direction, text angle, text alignment of -ticklabels, labels following the matplotlib convention for -the rectangle axes.

      -

      The axis_direction must be one of [left, right, bottom, -top].

      - ------- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      propertyleftbottomrighttop
      ticklabels location“-““+”“+”“-“
      axislabel location“-““+”“+”“-“
      ticklabels angle900-90180
      ticklabel vacenterbaselinecenterbaseline
      ticklabel harightcenterrightcenter
      axislabel angle18000180
      axislabel vacentertopcenterbottom
      axislabel harightcenterrightcenter
      -

      Note that the direction “+” and “-” are relative to the direction of -the increasing coordinate. Also, the text angles are actually -relative to (90 + angle of the direction to the ticklabel), -which gives 0 for bottom axis.

      -
      - -
      -
      -set_axislabel_direction(label_direction)
      -

      Adjust the direction of the axislabel.

      -
      -
      ACCEPTS: [ “+” | “-” ]
      -

      Note that the label_direction ‘+’ and ‘-‘ are relative to the -direction of the increasing coordinate.

      -
      - -
      -
      -set_axisline_style(axisline_style=None, **kw)
      -

      Set the axisline style.

      -
      -
      axisline_style can be a string with axisline style name with optional
      -

      comma-separated attributes. Alternatively, the attrs can -be provided as keywords.

      -

      set_arrowstyle(“->,size=1.5”) -set_arrowstyle(“->”, size=1.5)

      -
      -
      -

      Old attrs simply are forgotten.

      -

      Without argument (or with arrowstyle=None), return -available styles as a list of strings.

      -
      - -
      -
      -set_label(s)
      -
      - -
      -
      -set_ticklabel_direction(tick_direction)
      -

      Adjust the direction of the ticklabel.

      -
      -
      ACCEPTS: [ “+” | “-” ]
      -

      Note that the label_direction ‘+’ and ‘-‘ are relative to the -direction of the increasing coordinate.

      -
      - -
      -
      -toggle(all=None, ticks=None, ticklabels=None, label=None)
      -

      Toggle visibility of ticks, ticklabels, and (axis) label. -To turn all off,

      -
      axis.toggle(all=False)
      -
      -
      -

      To turn all off but ticks on

      -
      axis.toggle(all=False, ticks=True)
      -
      -
      -

      To turn all on but (axis) label off

      -
      axis.toggle(all=True, label=False))
      -
      -
      - -
      - -
      -
      -class mpl_toolkits.axes_grid.axis_artist.Ticks(ticksize, tick_out=False, **kwargs)
      -

      Ticks are derived from Line2D, and note that ticks themselves -are markers. Thus, you should use set_mec, set_mew, etc.

      -

      To change the tick size (length), you need to use -set_ticksize. To change the direction of the ticks (ticks are -in opposite direction of ticklabels by default), use -set_tick_out(False).

      -
      -
      -get_tick_out()
      -

      Return True if the tick will be rotated by 180 degree.

      -
      - -
      -
      -get_ticksize()
      -

      Return length of the ticks in points.

      -
      - -
      -
      -set_tick_out(b)
      -

      set True if tick need to be rotated by 180 degree.

      -
      - -
      -
      -set_ticksize(ticksize)
      -

      set length of the ticks in points.

      -
      - -
      - -
      -
      -class mpl_toolkits.axes_grid.axis_artist.AxisLabel(*kl, **kwargs)
      -

      Axis Label. Derived from Text. The position of the text is updated -in the fly, so changing text position has no effect. Otherwise, the -properties can be changed as a normal Text.

      -

      To change the pad between ticklabels and axis label, use set_pad.

      -
      -
      -get_pad()
      -

      return pad in points. See set_pad for more details.

      -
      - -
      -
      -set_axis_direction(d)
      -

      Adjust the text angle and text alignment of axis label -according to the matplotlib convention.

      - ------- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      propertyleftbottomrighttop
      axislabel angle18000180
      axislabel vacentertopcenterbottom
      axislabel harightcenterrightcenter
      -

      Note that the text angles are actually relative to (90 + angle -of the direction to the ticklabel), which gives 0 for bottom -axis.

      -
      - -
      -
      -set_pad(pad)
      -

      Set the pad in points. Note that the actual pad will be the -sum of the internal pad and the external pad (that are set -automatically by the AxisArtist), and it only set the internal -pad

      -
      - -
      - -
      -
      -class mpl_toolkits.axes_grid.axis_artist.TickLabels(**kwargs)
      -

      Tick Labels. While derived from Text, this single artist draws all -ticklabels. As in AxisLabel, the position of the text is updated -in the fly, so changing text position has no effect. Otherwise, -the properties can be changed as a normal Text. Unlike the -ticklabels of the mainline matplotlib, properties of single -ticklabel alone cannot modified.

      -

      To change the pad between ticks and ticklabels, use set_pad.

      -
      -
      -get_texts_widths_heights_descents(renderer)
      -

      return a list of width, height, descent for ticklabels.

      -
      - -
      -
      -set_axis_direction(label_direction)
      -

      Adjust the text angle and text alignment of ticklabels -according to the matplotlib convention.

      -

      The label_direction must be one of [left, right, bottom, -top].

      - ------- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      propertyleftbottomrighttop
      ticklabels angle900-90180
      ticklabel vacenterbaselinecenterbaseline
      ticklabel harightcenterrightcenter
      -

      Note that the text angles are actually relative to (90 + angle -of the direction to the ticklabel), which gives 0 for bottom -axis.

      -
      - -
      - -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/mpl_toolkits/axes_grid/api/index.html b/dev/mpl_toolkits/axes_grid/api/index.html deleted file mode 100644 index 5b541b9be58..00000000000 --- a/dev/mpl_toolkits/axes_grid/api/index.html +++ /dev/null @@ -1,186 +0,0 @@ - - - - - - - - The Matplotlib AxesGrid Toolkit API — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      Previous topic

      -

      AXISARTIST namespace

      -

      Next topic

      -

      mpl_toolkits.axes_grid.axes_size

      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      The Matplotlib AxesGrid Toolkit API

      - --- - - - - - -
      Release:1.3.x
      Date:May 21, 2013
      - -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/mpl_toolkits/axes_grid/examples/demo_axes_grid.hires.png b/dev/mpl_toolkits/axes_grid/examples/demo_axes_grid.hires.png deleted file mode 100644 index b6755c77ea9..00000000000 Binary files a/dev/mpl_toolkits/axes_grid/examples/demo_axes_grid.hires.png and /dev/null differ diff --git a/dev/mpl_toolkits/axes_grid/examples/demo_axes_grid.pdf b/dev/mpl_toolkits/axes_grid/examples/demo_axes_grid.pdf deleted file mode 100644 index ccb44c61d83..00000000000 Binary files a/dev/mpl_toolkits/axes_grid/examples/demo_axes_grid.pdf and /dev/null differ diff --git a/dev/mpl_toolkits/axes_grid/examples/demo_axes_grid.png b/dev/mpl_toolkits/axes_grid/examples/demo_axes_grid.png deleted file mode 100644 index 377fb1269ea..00000000000 Binary files a/dev/mpl_toolkits/axes_grid/examples/demo_axes_grid.png and /dev/null differ diff --git a/dev/mpl_toolkits/axes_grid/examples/demo_axes_grid.py b/dev/mpl_toolkits/axes_grid/examples/demo_axes_grid.py deleted file mode 100644 index d28f50efbd4..00000000000 --- a/dev/mpl_toolkits/axes_grid/examples/demo_axes_grid.py +++ /dev/null @@ -1,99 +0,0 @@ -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, 131, # similar to subplot(131) - 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, 132, # similar to subplot(132) - 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(F, 133, # similar to subplot(122) - 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]) - - - -if 1: - F = plt.figure(1, (5.5, 2.5)) - - F.subplots_adjust(left=0.05, right=0.98) - - demo_simple_grid(F) - demo_grid_with_single_cbar(F) - demo_grid_with_each_cbar(F) - - plt.draw() - plt.show() - diff --git a/dev/mpl_toolkits/axes_grid/examples/demo_curvelinear_grid.hires.png b/dev/mpl_toolkits/axes_grid/examples/demo_curvelinear_grid.hires.png deleted file mode 100644 index bd53f91490f..00000000000 Binary files a/dev/mpl_toolkits/axes_grid/examples/demo_curvelinear_grid.hires.png and /dev/null differ diff --git a/dev/mpl_toolkits/axes_grid/examples/demo_curvelinear_grid.pdf b/dev/mpl_toolkits/axes_grid/examples/demo_curvelinear_grid.pdf deleted file mode 100644 index 1841b5ba119..00000000000 Binary files a/dev/mpl_toolkits/axes_grid/examples/demo_curvelinear_grid.pdf and /dev/null differ diff --git a/dev/mpl_toolkits/axes_grid/examples/demo_curvelinear_grid.png b/dev/mpl_toolkits/axes_grid/examples/demo_curvelinear_grid.png deleted file mode 100644 index 490d7849657..00000000000 Binary files a/dev/mpl_toolkits/axes_grid/examples/demo_curvelinear_grid.png and /dev/null differ diff --git a/dev/mpl_toolkits/axes_grid/examples/demo_curvelinear_grid.py b/dev/mpl_toolkits/axes_grid/examples/demo_curvelinear_grid.py deleted file mode 100644 index 1a738b50d71..00000000000 --- a/dev/mpl_toolkits/axes_grid/examples/demo_curvelinear_grid.py +++ /dev/null @@ -1,133 +0,0 @@ -import numpy as np -#from matplotlib.path import Path - -import matplotlib.pyplot as plt -import matplotlib.cbook as cbook - -from mpl_toolkits.axisartist.grid_helper_curvelinear import GridHelperCurveLinear -from mpl_toolkits.axisartist import Subplot - -from mpl_toolkits.axisartist import SubplotHost, \ - ParasiteAxesAuxTrans - - -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() - - - diff --git a/dev/mpl_toolkits/axes_grid/examples/demo_floating_axes.hires.png b/dev/mpl_toolkits/axes_grid/examples/demo_floating_axes.hires.png deleted file mode 100644 index 4dcc235a8a9..00000000000 Binary files a/dev/mpl_toolkits/axes_grid/examples/demo_floating_axes.hires.png and /dev/null differ diff --git a/dev/mpl_toolkits/axes_grid/examples/demo_floating_axes.pdf b/dev/mpl_toolkits/axes_grid/examples/demo_floating_axes.pdf deleted file mode 100644 index edf57d5df05..00000000000 Binary files a/dev/mpl_toolkits/axes_grid/examples/demo_floating_axes.pdf and /dev/null differ diff --git a/dev/mpl_toolkits/axes_grid/examples/demo_floating_axes.png b/dev/mpl_toolkits/axes_grid/examples/demo_floating_axes.png deleted file mode 100644 index 667457dac02..00000000000 Binary files a/dev/mpl_toolkits/axes_grid/examples/demo_floating_axes.png and /dev/null differ diff --git a/dev/mpl_toolkits/axes_grid/examples/demo_floating_axes.py b/dev/mpl_toolkits/axes_grid/examples/demo_floating_axes.py deleted file mode 100644 index 4ffb9ead058..00000000000 --- a/dev/mpl_toolkits/axes_grid/examples/demo_floating_axes.py +++ /dev/null @@ -1,157 +0,0 @@ -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 - -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_scale = Affine2D().scale(np.pi/180., 1.) - - 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 - - - -if 1: - import matplotlib.pyplot as plt - fig = plt.figure(1, figsize=(8, 4)) - fig.subplots_adjust(wspace=0.3, left=0.05, right=0.95) - - ax1, aux_ax2 = setup_axes1(fig, 131) - aux_ax2.bar([0, 1, 2, 3], [3, 2, 1, 3]) - - #theta = np.random.rand(10) #*.5*np.pi - #radius = np.random.rand(10) #+1. - #aux_ax1.scatter(theta, radius) - - - 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() - diff --git a/dev/mpl_toolkits/axes_grid/examples/demo_floating_axis.hires.png b/dev/mpl_toolkits/axes_grid/examples/demo_floating_axis.hires.png deleted file mode 100644 index d8773051e17..00000000000 Binary files a/dev/mpl_toolkits/axes_grid/examples/demo_floating_axis.hires.png and /dev/null differ diff --git a/dev/mpl_toolkits/axes_grid/examples/demo_floating_axis.pdf b/dev/mpl_toolkits/axes_grid/examples/demo_floating_axis.pdf deleted file mode 100644 index 91cf61cacba..00000000000 Binary files a/dev/mpl_toolkits/axes_grid/examples/demo_floating_axis.pdf and /dev/null differ diff --git a/dev/mpl_toolkits/axes_grid/examples/demo_floating_axis.png b/dev/mpl_toolkits/axes_grid/examples/demo_floating_axis.png deleted file mode 100644 index a19c9599b92..00000000000 Binary files a/dev/mpl_toolkits/axes_grid/examples/demo_floating_axis.png and /dev/null differ diff --git a/dev/mpl_toolkits/axes_grid/examples/demo_floating_axis.py b/dev/mpl_toolkits/axes_grid/examples/demo_floating_axis.py deleted file mode 100644 index bc8dea6b272..00000000000 --- a/dev/mpl_toolkits/axes_grid/examples/demo_floating_axis.py +++ /dev/null @@ -1,71 +0,0 @@ -""" -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() - - diff --git a/dev/mpl_toolkits/axes_grid/examples/demo_parasite_axes2.py b/dev/mpl_toolkits/axes_grid/examples/demo_parasite_axes2.py deleted file mode 100644 index 2f73bb084cc..00000000000 --- a/dev/mpl_toolkits/axes_grid/examples/demo_parasite_axes2.py +++ /dev/null @@ -1,47 +0,0 @@ -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") diff --git a/dev/mpl_toolkits/axes_grid/examples/demo_parasite_axes2_00_00.hires.png b/dev/mpl_toolkits/axes_grid/examples/demo_parasite_axes2_00_00.hires.png deleted file mode 100644 index 21c0dc073ef..00000000000 Binary files a/dev/mpl_toolkits/axes_grid/examples/demo_parasite_axes2_00_00.hires.png and /dev/null differ diff --git a/dev/mpl_toolkits/axes_grid/examples/demo_parasite_axes2_00_00.pdf b/dev/mpl_toolkits/axes_grid/examples/demo_parasite_axes2_00_00.pdf deleted file mode 100644 index 96a88f09a06..00000000000 Binary files a/dev/mpl_toolkits/axes_grid/examples/demo_parasite_axes2_00_00.pdf and /dev/null differ diff --git a/dev/mpl_toolkits/axes_grid/examples/demo_parasite_axes2_00_00.png b/dev/mpl_toolkits/axes_grid/examples/demo_parasite_axes2_00_00.png deleted file mode 100644 index 1e2f2c2b4a2..00000000000 Binary files a/dev/mpl_toolkits/axes_grid/examples/demo_parasite_axes2_00_00.png and /dev/null differ diff --git a/dev/mpl_toolkits/axes_grid/examples/inset_locator_demo.hires.png b/dev/mpl_toolkits/axes_grid/examples/inset_locator_demo.hires.png deleted file mode 100644 index 7452c005133..00000000000 Binary files a/dev/mpl_toolkits/axes_grid/examples/inset_locator_demo.hires.png and /dev/null differ diff --git a/dev/mpl_toolkits/axes_grid/examples/inset_locator_demo.pdf b/dev/mpl_toolkits/axes_grid/examples/inset_locator_demo.pdf deleted file mode 100644 index aaea32456de..00000000000 Binary files a/dev/mpl_toolkits/axes_grid/examples/inset_locator_demo.pdf and /dev/null differ diff --git a/dev/mpl_toolkits/axes_grid/examples/inset_locator_demo.png b/dev/mpl_toolkits/axes_grid/examples/inset_locator_demo.png deleted file mode 100644 index 9f13f2e4a31..00000000000 Binary files a/dev/mpl_toolkits/axes_grid/examples/inset_locator_demo.png and /dev/null differ diff --git a/dev/mpl_toolkits/axes_grid/examples/inset_locator_demo.py b/dev/mpl_toolkits/axes_grid/examples/inset_locator_demo.py deleted file mode 100644 index 9dfe0024feb..00000000000 --- a/dev/mpl_toolkits/axes_grid/examples/inset_locator_demo.py +++ /dev/null @@ -1,45 +0,0 @@ -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 = plt.figure(1, [5.5, 3]) - -# first subplot -ax = fig.add_subplot(1,2,1) -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 -ax = fig.add_subplot(1,2,2) -ax.set_aspect(1.) - -axins = zoomed_inset_axes(ax, 0.5, loc=1) # zoom = 0.5 - -plt.xticks(visible=False) -plt.yticks(visible=False) - -add_sizebar(ax, 0.5) -add_sizebar(axins, 0.5) - -plt.draw() -plt.show() diff --git a/dev/mpl_toolkits/axes_grid/examples/inset_locator_demo2.hires.png b/dev/mpl_toolkits/axes_grid/examples/inset_locator_demo2.hires.png deleted file mode 100644 index ce10cc7e3a8..00000000000 Binary files a/dev/mpl_toolkits/axes_grid/examples/inset_locator_demo2.hires.png and /dev/null differ diff --git a/dev/mpl_toolkits/axes_grid/examples/inset_locator_demo2.pdf b/dev/mpl_toolkits/axes_grid/examples/inset_locator_demo2.pdf deleted file mode 100644 index 4ade31d0856..00000000000 Binary files a/dev/mpl_toolkits/axes_grid/examples/inset_locator_demo2.pdf and /dev/null differ diff --git a/dev/mpl_toolkits/axes_grid/examples/inset_locator_demo2.png b/dev/mpl_toolkits/axes_grid/examples/inset_locator_demo2.png deleted file mode 100644 index 53739e339bb..00000000000 Binary files a/dev/mpl_toolkits/axes_grid/examples/inset_locator_demo2.png and /dev/null differ diff --git a/dev/mpl_toolkits/axes_grid/examples/inset_locator_demo2.py b/dev/mpl_toolkits/axes_grid/examples/inset_locator_demo2.py deleted file mode 100644 index a4e08be3493..00000000000 --- a/dev/mpl_toolkits/axes_grid/examples/inset_locator_demo2.py +++ /dev/null @@ -1,48 +0,0 @@ -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 = plt.figure(1, [5,4]) -ax = fig.add_subplot(111) - -# 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() - diff --git a/dev/mpl_toolkits/axes_grid/examples/parasite_simple2.hires.png b/dev/mpl_toolkits/axes_grid/examples/parasite_simple2.hires.png deleted file mode 100644 index 1c0ec0788ab..00000000000 Binary files a/dev/mpl_toolkits/axes_grid/examples/parasite_simple2.hires.png and /dev/null differ diff --git a/dev/mpl_toolkits/axes_grid/examples/parasite_simple2.pdf b/dev/mpl_toolkits/axes_grid/examples/parasite_simple2.pdf deleted file mode 100644 index 226a53826d9..00000000000 Binary files a/dev/mpl_toolkits/axes_grid/examples/parasite_simple2.pdf and /dev/null differ diff --git a/dev/mpl_toolkits/axes_grid/examples/parasite_simple2.png b/dev/mpl_toolkits/axes_grid/examples/parasite_simple2.png deleted file mode 100644 index bfea70ae42a..00000000000 Binary files a/dev/mpl_toolkits/axes_grid/examples/parasite_simple2.png and /dev/null differ diff --git a/dev/mpl_toolkits/axes_grid/examples/parasite_simple2.py b/dev/mpl_toolkits/axes_grid/examples/parasite_simple2.py deleted file mode 100644 index 136ffd2912b..00000000000 --- a/dev/mpl_toolkits/axes_grid/examples/parasite_simple2.py +++ /dev/null @@ -1,42 +0,0 @@ -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("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() diff --git a/dev/mpl_toolkits/axes_grid/examples/scatter_hist.hires.png b/dev/mpl_toolkits/axes_grid/examples/scatter_hist.hires.png deleted file mode 100644 index b57c25a4fe9..00000000000 Binary files a/dev/mpl_toolkits/axes_grid/examples/scatter_hist.hires.png and /dev/null differ diff --git a/dev/mpl_toolkits/axes_grid/examples/scatter_hist.pdf b/dev/mpl_toolkits/axes_grid/examples/scatter_hist.pdf deleted file mode 100644 index c3984c569e3..00000000000 Binary files a/dev/mpl_toolkits/axes_grid/examples/scatter_hist.pdf and /dev/null differ diff --git a/dev/mpl_toolkits/axes_grid/examples/scatter_hist.png b/dev/mpl_toolkits/axes_grid/examples/scatter_hist.png deleted file mode 100644 index 08c30989f1a..00000000000 Binary files a/dev/mpl_toolkits/axes_grid/examples/scatter_hist.png and /dev/null differ diff --git a/dev/mpl_toolkits/axes_grid/examples/scatter_hist.py b/dev/mpl_toolkits/axes_grid/examples/scatter_hist.py deleted file mode 100644 index b846704e0e7..00000000000 --- a/dev/mpl_toolkits/axes_grid/examples/scatter_hist.py +++ /dev/null @@ -1,53 +0,0 @@ -import numpy as np -import matplotlib.pyplot as plt - -# the random data -x = np.random.randn(1000) -y = np.random.randn(1000) - - -fig = plt.figure(1, figsize=(5.5,5.5)) - -from mpl_toolkits.axes_grid1 import make_axes_locatable - -# the scatter plot: -axScatter = plt.subplot(111) -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() diff --git a/dev/mpl_toolkits/axes_grid/examples/simple_anchored_artists.hires.png b/dev/mpl_toolkits/axes_grid/examples/simple_anchored_artists.hires.png deleted file mode 100644 index a05178702fc..00000000000 Binary files a/dev/mpl_toolkits/axes_grid/examples/simple_anchored_artists.hires.png and /dev/null differ diff --git a/dev/mpl_toolkits/axes_grid/examples/simple_anchored_artists.pdf b/dev/mpl_toolkits/axes_grid/examples/simple_anchored_artists.pdf deleted file mode 100644 index c072c8ce612..00000000000 Binary files a/dev/mpl_toolkits/axes_grid/examples/simple_anchored_artists.pdf and /dev/null differ diff --git a/dev/mpl_toolkits/axes_grid/examples/simple_anchored_artists.png b/dev/mpl_toolkits/axes_grid/examples/simple_anchored_artists.png deleted file mode 100644 index 28e27973e35..00000000000 Binary files a/dev/mpl_toolkits/axes_grid/examples/simple_anchored_artists.png and /dev/null differ diff --git a/dev/mpl_toolkits/axes_grid/examples/simple_anchored_artists.py b/dev/mpl_toolkits/axes_grid/examples/simple_anchored_artists.py deleted file mode 100644 index 8853534d23b..00000000000 --- a/dev/mpl_toolkits/axes_grid/examples/simple_anchored_artists.py +++ /dev/null @@ -1,61 +0,0 @@ -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() - - diff --git a/dev/mpl_toolkits/axes_grid/examples/simple_axesgrid.hires.png b/dev/mpl_toolkits/axes_grid/examples/simple_axesgrid.hires.png deleted file mode 100644 index 82b12457aa4..00000000000 Binary files a/dev/mpl_toolkits/axes_grid/examples/simple_axesgrid.hires.png and /dev/null differ diff --git a/dev/mpl_toolkits/axes_grid/examples/simple_axesgrid.pdf b/dev/mpl_toolkits/axes_grid/examples/simple_axesgrid.pdf deleted file mode 100644 index a5cf8ab3af9..00000000000 Binary files a/dev/mpl_toolkits/axes_grid/examples/simple_axesgrid.pdf and /dev/null differ diff --git a/dev/mpl_toolkits/axes_grid/examples/simple_axesgrid.png b/dev/mpl_toolkits/axes_grid/examples/simple_axesgrid.png deleted file mode 100644 index 1beeaf6af9e..00000000000 Binary files a/dev/mpl_toolkits/axes_grid/examples/simple_axesgrid.png and /dev/null differ diff --git a/dev/mpl_toolkits/axes_grid/examples/simple_axesgrid.py b/dev/mpl_toolkits/axes_grid/examples/simple_axesgrid.py deleted file mode 100644 index 5038b4eee0b..00000000000 --- a/dev/mpl_toolkits/axes_grid/examples/simple_axesgrid.py +++ /dev/null @@ -1,17 +0,0 @@ -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() diff --git a/dev/mpl_toolkits/axes_grid/examples/simple_axesgrid2.hires.png b/dev/mpl_toolkits/axes_grid/examples/simple_axesgrid2.hires.png deleted file mode 100644 index c7f96647825..00000000000 Binary files a/dev/mpl_toolkits/axes_grid/examples/simple_axesgrid2.hires.png and /dev/null differ diff --git a/dev/mpl_toolkits/axes_grid/examples/simple_axesgrid2.pdf b/dev/mpl_toolkits/axes_grid/examples/simple_axesgrid2.pdf deleted file mode 100644 index 7eb34500924..00000000000 Binary files a/dev/mpl_toolkits/axes_grid/examples/simple_axesgrid2.pdf and /dev/null differ diff --git a/dev/mpl_toolkits/axes_grid/examples/simple_axesgrid2.png b/dev/mpl_toolkits/axes_grid/examples/simple_axesgrid2.png deleted file mode 100644 index 3efc6a415a8..00000000000 Binary files a/dev/mpl_toolkits/axes_grid/examples/simple_axesgrid2.png and /dev/null differ diff --git a/dev/mpl_toolkits/axes_grid/examples/simple_axesgrid2.py b/dev/mpl_toolkits/axes_grid/examples/simple_axesgrid2.py deleted file mode 100644 index efd7fb45a9b..00000000000 --- a/dev/mpl_toolkits/axes_grid/examples/simple_axesgrid2.py +++ /dev/null @@ -1,31 +0,0 @@ -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() diff --git a/dev/mpl_toolkits/axes_grid/examples/simple_axisline4.hires.png b/dev/mpl_toolkits/axes_grid/examples/simple_axisline4.hires.png deleted file mode 100644 index 9f4fa6c0901..00000000000 Binary files a/dev/mpl_toolkits/axes_grid/examples/simple_axisline4.hires.png and /dev/null differ diff --git a/dev/mpl_toolkits/axes_grid/examples/simple_axisline4.pdf b/dev/mpl_toolkits/axes_grid/examples/simple_axisline4.pdf deleted file mode 100644 index 28e0098380a..00000000000 Binary files a/dev/mpl_toolkits/axes_grid/examples/simple_axisline4.pdf and /dev/null differ diff --git a/dev/mpl_toolkits/axes_grid/examples/simple_axisline4.png b/dev/mpl_toolkits/axes_grid/examples/simple_axisline4.png deleted file mode 100644 index 693519f1c4b..00000000000 Binary files a/dev/mpl_toolkits/axes_grid/examples/simple_axisline4.png and /dev/null differ diff --git a/dev/mpl_toolkits/axes_grid/examples/simple_axisline4.py b/dev/mpl_toolkits/axes_grid/examples/simple_axisline4.py deleted file mode 100644 index 3b2c675666b..00000000000 --- a/dev/mpl_toolkits/axes_grid/examples/simple_axisline4.py +++ /dev/null @@ -1,19 +0,0 @@ -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() - diff --git a/dev/mpl_toolkits/axes_grid/figures/axis_direction_demo_step01.hires.png b/dev/mpl_toolkits/axes_grid/figures/axis_direction_demo_step01.hires.png deleted file mode 100644 index 8508f1cc30c..00000000000 Binary files a/dev/mpl_toolkits/axes_grid/figures/axis_direction_demo_step01.hires.png and /dev/null differ diff --git a/dev/mpl_toolkits/axes_grid/figures/axis_direction_demo_step01.pdf b/dev/mpl_toolkits/axes_grid/figures/axis_direction_demo_step01.pdf deleted file mode 100644 index 7471b69524d..00000000000 Binary files a/dev/mpl_toolkits/axes_grid/figures/axis_direction_demo_step01.pdf and /dev/null differ diff --git a/dev/mpl_toolkits/axes_grid/figures/axis_direction_demo_step01.png b/dev/mpl_toolkits/axes_grid/figures/axis_direction_demo_step01.png deleted file mode 100644 index cad9c683212..00000000000 Binary files a/dev/mpl_toolkits/axes_grid/figures/axis_direction_demo_step01.png and /dev/null differ diff --git a/dev/mpl_toolkits/axes_grid/figures/axis_direction_demo_step01.py b/dev/mpl_toolkits/axes_grid/figures/axis_direction_demo_step01.py deleted file mode 100644 index 3ff931baa5c..00000000000 --- a/dev/mpl_toolkits/axes_grid/figures/axis_direction_demo_step01.py +++ /dev/null @@ -1,25 +0,0 @@ -import matplotlib.pyplot as plt -import mpl_toolkits.axisartist as axisartist - -def setup_axes(fig, rect): - ax = axisartist.Subplot(fig, rect) - fig.add_axes(ax) - - ax.set_ylim(-0.1, 1.5) - ax.set_yticks([0, 1]) - - ax.axis[:].set_visible(False) - - ax.axis["x"] = ax.new_floating_axis(1, 0.5) - ax.axis["x"].set_axisline_style("->", size=1.5) - - return ax - -fig = plt.figure(figsize=(3,2.5)) -fig.subplots_adjust(top=0.8) -ax1 = setup_axes(fig, "111") - -ax1.axis["x"].set_axis_direction("left") - - -plt.show() diff --git a/dev/mpl_toolkits/axes_grid/figures/axis_direction_demo_step02.hires.png b/dev/mpl_toolkits/axes_grid/figures/axis_direction_demo_step02.hires.png deleted file mode 100644 index 998895cf9ab..00000000000 Binary files a/dev/mpl_toolkits/axes_grid/figures/axis_direction_demo_step02.hires.png and /dev/null differ diff --git a/dev/mpl_toolkits/axes_grid/figures/axis_direction_demo_step02.pdf b/dev/mpl_toolkits/axes_grid/figures/axis_direction_demo_step02.pdf deleted file mode 100644 index 1b1cc13da6b..00000000000 Binary files a/dev/mpl_toolkits/axes_grid/figures/axis_direction_demo_step02.pdf and /dev/null differ diff --git a/dev/mpl_toolkits/axes_grid/figures/axis_direction_demo_step02.png b/dev/mpl_toolkits/axes_grid/figures/axis_direction_demo_step02.png deleted file mode 100644 index 6b7a0c29d7a..00000000000 Binary files a/dev/mpl_toolkits/axes_grid/figures/axis_direction_demo_step02.png and /dev/null differ diff --git a/dev/mpl_toolkits/axes_grid/figures/axis_direction_demo_step02.py b/dev/mpl_toolkits/axes_grid/figures/axis_direction_demo_step02.py deleted file mode 100644 index bddedcea73d..00000000000 --- a/dev/mpl_toolkits/axes_grid/figures/axis_direction_demo_step02.py +++ /dev/null @@ -1,36 +0,0 @@ -import matplotlib.pyplot as plt -import mpl_toolkits.axisartist as axisartist - -def setup_axes(fig, rect): - ax = axisartist.Subplot(fig, rect) - fig.add_axes(ax) - - ax.set_ylim(-0.1, 1.5) - ax.set_yticks([0, 1]) - - #ax.axis[:].toggle(all=False) - #ax.axis[:].line.set_visible(False) - ax.axis[:].set_visible(False) - - ax.axis["x"] = ax.new_floating_axis(1, 0.5) - ax.axis["x"].set_axisline_style("->", size=1.5) - - return ax - -fig = plt.figure(figsize=(6,2.5)) -fig.subplots_adjust(bottom=0.2, top=0.8) - -ax1 = setup_axes(fig, "121") -ax1.axis["x"].set_ticklabel_direction("+") -ax1.annotate("ticklabel direction=$+$", (0.5, 0), xycoords="axes fraction", - xytext=(0, -10), textcoords="offset points", - va="top", ha="center") - -ax2 = setup_axes(fig, "122") -ax2.axis["x"].set_ticklabel_direction("-") -ax2.annotate("ticklabel direction=$-$", (0.5, 0), xycoords="axes fraction", - xytext=(0, -10), textcoords="offset points", - va="top", ha="center") - - -plt.show() diff --git a/dev/mpl_toolkits/axes_grid/figures/axis_direction_demo_step03.hires.png b/dev/mpl_toolkits/axes_grid/figures/axis_direction_demo_step03.hires.png deleted file mode 100644 index a1a34553daf..00000000000 Binary files a/dev/mpl_toolkits/axes_grid/figures/axis_direction_demo_step03.hires.png and /dev/null differ diff --git a/dev/mpl_toolkits/axes_grid/figures/axis_direction_demo_step03.pdf b/dev/mpl_toolkits/axes_grid/figures/axis_direction_demo_step03.pdf deleted file mode 100644 index 612fe37255c..00000000000 Binary files a/dev/mpl_toolkits/axes_grid/figures/axis_direction_demo_step03.pdf and /dev/null differ diff --git a/dev/mpl_toolkits/axes_grid/figures/axis_direction_demo_step03.png b/dev/mpl_toolkits/axes_grid/figures/axis_direction_demo_step03.png deleted file mode 100644 index 82f8431e46d..00000000000 Binary files a/dev/mpl_toolkits/axes_grid/figures/axis_direction_demo_step03.png and /dev/null differ diff --git a/dev/mpl_toolkits/axes_grid/figures/axis_direction_demo_step03.py b/dev/mpl_toolkits/axes_grid/figures/axis_direction_demo_step03.py deleted file mode 100644 index 69963d22ee6..00000000000 --- a/dev/mpl_toolkits/axes_grid/figures/axis_direction_demo_step03.py +++ /dev/null @@ -1,40 +0,0 @@ -import matplotlib.pyplot as plt -import mpl_toolkits.axisartist as axisartist - -def setup_axes(fig, rect): - ax = axisartist.Subplot(fig, rect) - fig.add_axes(ax) - - ax.set_ylim(-0.1, 1.5) - ax.set_yticks([0, 1]) - - #ax.axis[:].toggle(all=False) - #ax.axis[:].line.set_visible(False) - ax.axis[:].set_visible(False) - - ax.axis["x"] = ax.new_floating_axis(1, 0.5) - ax.axis["x"].set_axisline_style("->", size=1.5) - - return ax - -fig = plt.figure(figsize=(6,2.5)) -fig.subplots_adjust(bottom=0.2, top=0.8) - -ax1 = setup_axes(fig, "121") -ax1.axis["x"].label.set_text("Label") -ax1.axis["x"].toggle(ticklabels=False) -ax1.axis["x"].set_axislabel_direction("+") -ax1.annotate("label direction=$+$", (0.5, 0), xycoords="axes fraction", - xytext=(0, -10), textcoords="offset points", - va="top", ha="center") - -ax2 = setup_axes(fig, "122") -ax2.axis["x"].label.set_text("Label") -ax2.axis["x"].toggle(ticklabels=False) -ax2.axis["x"].set_axislabel_direction("-") -ax2.annotate("label direction=$-$", (0.5, 0), xycoords="axes fraction", - xytext=(0, -10), textcoords="offset points", - va="top", ha="center") - - -plt.show() diff --git a/dev/mpl_toolkits/axes_grid/figures/axis_direction_demo_step04.hires.png b/dev/mpl_toolkits/axes_grid/figures/axis_direction_demo_step04.hires.png deleted file mode 100644 index c9925000bf2..00000000000 Binary files a/dev/mpl_toolkits/axes_grid/figures/axis_direction_demo_step04.hires.png and /dev/null differ diff --git a/dev/mpl_toolkits/axes_grid/figures/axis_direction_demo_step04.pdf b/dev/mpl_toolkits/axes_grid/figures/axis_direction_demo_step04.pdf deleted file mode 100644 index 2feb2811163..00000000000 Binary files a/dev/mpl_toolkits/axes_grid/figures/axis_direction_demo_step04.pdf and /dev/null differ diff --git a/dev/mpl_toolkits/axes_grid/figures/axis_direction_demo_step04.png b/dev/mpl_toolkits/axes_grid/figures/axis_direction_demo_step04.png deleted file mode 100644 index 83ea62c1edf..00000000000 Binary files a/dev/mpl_toolkits/axes_grid/figures/axis_direction_demo_step04.png and /dev/null differ diff --git a/dev/mpl_toolkits/axes_grid/figures/axis_direction_demo_step04.py b/dev/mpl_toolkits/axes_grid/figures/axis_direction_demo_step04.py deleted file mode 100644 index 2b5bf867393..00000000000 --- a/dev/mpl_toolkits/axes_grid/figures/axis_direction_demo_step04.py +++ /dev/null @@ -1,54 +0,0 @@ -import matplotlib.pyplot as plt -import mpl_toolkits.axisartist as axisartist - -def setup_axes(fig, rect): - ax = axisartist.Subplot(fig, rect) - fig.add_axes(ax) - - ax.set_ylim(-0.1, 1.5) - ax.set_yticks([0, 1]) - - ax.axis[:].set_visible(False) - - ax.axis["x1"] = ax.new_floating_axis(1, 0.3) - ax.axis["x1"].set_axisline_style("->", size=1.5) - - ax.axis["x2"] = ax.new_floating_axis(1, 0.7) - ax.axis["x2"].set_axisline_style("->", size=1.5) - - return ax - -fig = plt.figure(figsize=(6,2.5)) -fig.subplots_adjust(bottom=0.2, top=0.8) - -ax1 = setup_axes(fig, "121") -ax1.axis["x1"].label.set_text("rotation=0") -ax1.axis["x1"].toggle(ticklabels=False) - -ax1.axis["x2"].label.set_text("rotation=10") -ax1.axis["x2"].label.set_rotation(10) -ax1.axis["x2"].toggle(ticklabels=False) - -ax1.annotate("label direction=$+$", (0.5, 0), xycoords="axes fraction", - xytext=(0, -10), textcoords="offset points", - va="top", ha="center") - -ax2 = setup_axes(fig, "122") - -ax2.axis["x1"].set_axislabel_direction("-") -ax2.axis["x2"].set_axislabel_direction("-") - -ax2.axis["x1"].label.set_text("rotation=0") -ax2.axis["x1"].toggle(ticklabels=False) - -ax2.axis["x2"].label.set_text("rotation=10") -ax2.axis["x2"].label.set_rotation(10) -ax2.axis["x2"].toggle(ticklabels=False) - - -ax2.annotate("label direction=$-$", (0.5, 0), xycoords="axes fraction", - xytext=(0, -10), textcoords="offset points", - va="top", ha="center") - - -plt.show() diff --git a/dev/mpl_toolkits/axes_grid/figures/demo_axis_direction.hires.png b/dev/mpl_toolkits/axes_grid/figures/demo_axis_direction.hires.png deleted file mode 100644 index ebb73d17c5b..00000000000 Binary files a/dev/mpl_toolkits/axes_grid/figures/demo_axis_direction.hires.png and /dev/null differ diff --git a/dev/mpl_toolkits/axes_grid/figures/demo_axis_direction.pdf b/dev/mpl_toolkits/axes_grid/figures/demo_axis_direction.pdf deleted file mode 100644 index 8167130d892..00000000000 Binary files a/dev/mpl_toolkits/axes_grid/figures/demo_axis_direction.pdf and /dev/null differ diff --git a/dev/mpl_toolkits/axes_grid/figures/demo_axis_direction.png b/dev/mpl_toolkits/axes_grid/figures/demo_axis_direction.png deleted file mode 100644 index c2b580dff3d..00000000000 Binary files a/dev/mpl_toolkits/axes_grid/figures/demo_axis_direction.png and /dev/null differ diff --git a/dev/mpl_toolkits/axes_grid/figures/demo_axis_direction.py b/dev/mpl_toolkits/axes_grid/figures/demo_axis_direction.py deleted file mode 100644 index a198b0b1959..00000000000 --- a/dev/mpl_toolkits/axes_grid/figures/demo_axis_direction.py +++ /dev/null @@ -1,98 +0,0 @@ - - -import numpy as np -import mpl_toolkits.axisartist.angle_helper as angle_helper -import mpl_toolkits.axisartist.grid_finder as grid_finder -from matplotlib.projections import PolarAxes -from matplotlib.transforms import Affine2D - -import mpl_toolkits.axisartist as axisartist - -from mpl_toolkits.axisartist.grid_helper_curvelinear import GridHelperCurveLinear - - -def setup_axes(fig, rect): - """ - polar projection, but in a rectangular box. - """ - - # 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) - grid_locator2 = grid_finder.MaxNLocator(5) - - tick_formatter1 = angle_helper.FormatterDMS() - - grid_helper = GridHelperCurveLinear(tr, - extreme_finder=extreme_finder, - grid_locator1=grid_locator1, - grid_locator2=grid_locator2, - tick_formatter1=tick_formatter1 - ) - - - ax1 = axisartist.Subplot(fig, rect, grid_helper=grid_helper) - ax1.axis[:].toggle(ticklabels=False) - - fig.add_subplot(ax1) - - ax1.set_aspect(1.) - ax1.set_xlim(-5, 12) - ax1.set_ylim(-5, 10) - - #ax1.grid(True) - - return ax1 - - -def add_floating_axis1(ax1): - ax1.axis["lat"] = axis = ax1.new_floating_axis(0, 30) - axis.label.set_text(r"$\theta = 30^{\circ}$") - axis.label.set_visible(True) - - return axis - - -def add_floating_axis2(ax1): - ax1.axis["lon"] = axis = ax1.new_floating_axis(1, 6) - axis.label.set_text(r"$r = 6$") - axis.label.set_visible(True) - - return axis - - -import matplotlib.pyplot as plt -fig = plt.figure(1, figsize=(8, 4.)) -fig.clf() -fig.subplots_adjust(left=0.01, right=0.99, bottom=0.01, top=0.99, - wspace=0.01, hspace=0.01) - -for i, d in enumerate(["bottom", "left", "top", "right"]): - ax1 = setup_axes(fig, rect=241++i) - axis = add_floating_axis1(ax1) - axis.set_axis_direction(d) - ax1.annotate(d, (0, 1), (5, -5), - xycoords="axes fraction", textcoords="offset points", - va="top", ha="left") - -for i, d in enumerate(["bottom", "left", "top", "right"]): - ax1 = setup_axes(fig, rect=245++i) - axis = add_floating_axis2(ax1) - axis.set_axis_direction(d) - ax1.annotate(d, (0, 1), (5, -5), - xycoords="axes fraction", textcoords="offset points", - va="top", ha="left") - - - -plt.show() - - diff --git a/dev/mpl_toolkits/axes_grid/figures/demo_ticklabel_alignment.hires.png b/dev/mpl_toolkits/axes_grid/figures/demo_ticklabel_alignment.hires.png deleted file mode 100644 index 5106d5958ba..00000000000 Binary files a/dev/mpl_toolkits/axes_grid/figures/demo_ticklabel_alignment.hires.png and /dev/null differ diff --git a/dev/mpl_toolkits/axes_grid/figures/demo_ticklabel_alignment.pdf b/dev/mpl_toolkits/axes_grid/figures/demo_ticklabel_alignment.pdf deleted file mode 100644 index 4bcc56b856c..00000000000 Binary files a/dev/mpl_toolkits/axes_grid/figures/demo_ticklabel_alignment.pdf and /dev/null differ diff --git a/dev/mpl_toolkits/axes_grid/figures/demo_ticklabel_alignment.png b/dev/mpl_toolkits/axes_grid/figures/demo_ticklabel_alignment.png deleted file mode 100644 index 3201870550b..00000000000 Binary files a/dev/mpl_toolkits/axes_grid/figures/demo_ticklabel_alignment.png and /dev/null differ diff --git a/dev/mpl_toolkits/axes_grid/figures/demo_ticklabel_alignment.py b/dev/mpl_toolkits/axes_grid/figures/demo_ticklabel_alignment.py deleted file mode 100644 index 78f81ad47df..00000000000 --- a/dev/mpl_toolkits/axes_grid/figures/demo_ticklabel_alignment.py +++ /dev/null @@ -1,38 +0,0 @@ - - -import matplotlib.pyplot as plt -import mpl_toolkits.axisartist as axisartist - - -def setup_axes(fig, rect): - - ax = axisartist.Subplot(fig, rect) - fig.add_subplot(ax) - - ax.set_yticks([0.2, 0.8]) - ax.set_yticklabels(["short", "loooong"]) - ax.set_xticks([0.2, 0.8]) - ax.set_xticklabels([r"$\frac{1}{2}\pi$", r"$\pi$"]) - - return ax - -fig = plt.figure(1, figsize=(3, 5)) -fig.subplots_adjust(left=0.5, hspace=0.7) - - - -ax = setup_axes(fig, 311) -ax.set_ylabel("ha=right") -ax.set_xlabel("va=baseline") - -ax = setup_axes(fig, 312) -ax.axis["left"].major_ticklabels.set_ha("center") -ax.axis["bottom"].major_ticklabels.set_va("top") -ax.set_ylabel("ha=center") -ax.set_xlabel("va=top") - -ax = setup_axes(fig, 313) -ax.axis["left"].major_ticklabels.set_ha("left") -ax.axis["bottom"].major_ticklabels.set_va("bottom") -ax.set_ylabel("ha=left") -ax.set_xlabel("va=bottom") diff --git a/dev/mpl_toolkits/axes_grid/figures/parasite_simple.hires.png b/dev/mpl_toolkits/axes_grid/figures/parasite_simple.hires.png deleted file mode 100644 index 169f339a69c..00000000000 Binary files a/dev/mpl_toolkits/axes_grid/figures/parasite_simple.hires.png and /dev/null differ diff --git a/dev/mpl_toolkits/axes_grid/figures/parasite_simple.pdf b/dev/mpl_toolkits/axes_grid/figures/parasite_simple.pdf deleted file mode 100644 index fbd0c477dd5..00000000000 Binary files a/dev/mpl_toolkits/axes_grid/figures/parasite_simple.pdf and /dev/null differ diff --git a/dev/mpl_toolkits/axes_grid/figures/parasite_simple.png b/dev/mpl_toolkits/axes_grid/figures/parasite_simple.png deleted file mode 100644 index 82ffaf21e3a..00000000000 Binary files a/dev/mpl_toolkits/axes_grid/figures/parasite_simple.png and /dev/null differ diff --git a/dev/mpl_toolkits/axes_grid/figures/parasite_simple.py b/dev/mpl_toolkits/axes_grid/figures/parasite_simple.py deleted file mode 100644 index c66d3c2ce30..00000000000 --- a/dev/mpl_toolkits/axes_grid/figures/parasite_simple.py +++ /dev/null @@ -1,24 +0,0 @@ -from mpl_toolkits.axes_grid1 import host_subplot -import matplotlib.pyplot as plt - -host = host_subplot(111) - -par = host.twinx() - -host.set_xlabel("Distance") -host.set_ylabel("Density") -par.set_ylabel("Temperature") - -p1, = host.plot([0, 1, 2], [0, 1, 2], label="Density") -p2, = par.plot([0, 1, 2], [0, 3, 2], label="Temperature") - -leg = plt.legend() - -host.yaxis.get_label().set_color(p1.get_color()) -leg.texts[0].set_color(p1.get_color()) - -par.yaxis.get_label().set_color(p2.get_color()) -leg.texts[1].set_color(p2.get_color()) - -plt.show() - diff --git a/dev/mpl_toolkits/axes_grid/figures/simple_axes_divider2.hires.png b/dev/mpl_toolkits/axes_grid/figures/simple_axes_divider2.hires.png deleted file mode 100644 index 60e397e6709..00000000000 Binary files a/dev/mpl_toolkits/axes_grid/figures/simple_axes_divider2.hires.png and /dev/null differ diff --git a/dev/mpl_toolkits/axes_grid/figures/simple_axes_divider2.pdf b/dev/mpl_toolkits/axes_grid/figures/simple_axes_divider2.pdf deleted file mode 100644 index 148b3e7815a..00000000000 Binary files a/dev/mpl_toolkits/axes_grid/figures/simple_axes_divider2.pdf and /dev/null differ diff --git a/dev/mpl_toolkits/axes_grid/figures/simple_axes_divider2.png b/dev/mpl_toolkits/axes_grid/figures/simple_axes_divider2.png deleted file mode 100644 index f942127bd00..00000000000 Binary files a/dev/mpl_toolkits/axes_grid/figures/simple_axes_divider2.png and /dev/null differ diff --git a/dev/mpl_toolkits/axes_grid/figures/simple_axes_divider2.py b/dev/mpl_toolkits/axes_grid/figures/simple_axes_divider2.py deleted file mode 100644 index 7b866c3c058..00000000000 --- a/dev/mpl_toolkits/axes_grid/figures/simple_axes_divider2.py +++ /dev/null @@ -1,29 +0,0 @@ -import mpl_toolkits.axes_grid.axes_size as Size -from mpl_toolkits.axes_grid import Divider -import matplotlib.pyplot as plt - -fig1 = plt.figure(1, (5.5, 4.)) - -# the rect parameter will be ignore as we will set axes_locator -rect = (0.1, 0.1, 0.8, 0.8) -ax = [fig1.add_axes(rect, label="%d"%i) for i in range(4)] - -horiz = [Size.Scaled(1.5), Size.Fixed(.5), Size.Scaled(1.), - Size.Scaled(.5)] - -vert = [Size.Scaled(1.), Size.Fixed(.5), Size.Scaled(1.5)] - -# divide the axes rectangle into grid whose size is specified by horiz * vert -divider = Divider(fig1, rect, horiz, vert, aspect=False) - -ax[0].set_axes_locator(divider.new_locator(nx=0, ny=0)) -ax[1].set_axes_locator(divider.new_locator(nx=0, ny=2)) -ax[2].set_axes_locator(divider.new_locator(nx=2, ny=2)) -ax[3].set_axes_locator(divider.new_locator(nx=2, nx1=4, ny=0)) - -for ax1 in ax: - plt.setp(ax1.get_xticklabels()+ax1.get_yticklabels(), - visible=False) - -plt.draw() -plt.show() diff --git a/dev/mpl_toolkits/axes_grid/figures/simple_axes_divider3.hires.png b/dev/mpl_toolkits/axes_grid/figures/simple_axes_divider3.hires.png deleted file mode 100644 index 7902a799849..00000000000 Binary files a/dev/mpl_toolkits/axes_grid/figures/simple_axes_divider3.hires.png and /dev/null differ diff --git a/dev/mpl_toolkits/axes_grid/figures/simple_axes_divider3.pdf b/dev/mpl_toolkits/axes_grid/figures/simple_axes_divider3.pdf deleted file mode 100644 index 97c5d6faa25..00000000000 Binary files a/dev/mpl_toolkits/axes_grid/figures/simple_axes_divider3.pdf and /dev/null differ diff --git a/dev/mpl_toolkits/axes_grid/figures/simple_axes_divider3.png b/dev/mpl_toolkits/axes_grid/figures/simple_axes_divider3.png deleted file mode 100644 index 001d067f9d6..00000000000 Binary files a/dev/mpl_toolkits/axes_grid/figures/simple_axes_divider3.png and /dev/null differ diff --git a/dev/mpl_toolkits/axes_grid/figures/simple_axes_divider3.py b/dev/mpl_toolkits/axes_grid/figures/simple_axes_divider3.py deleted file mode 100644 index 203bdd5068e..00000000000 --- a/dev/mpl_toolkits/axes_grid/figures/simple_axes_divider3.py +++ /dev/null @@ -1,38 +0,0 @@ -import mpl_toolkits.axes_grid.axes_size as Size -from mpl_toolkits.axes_grid import Divider -import matplotlib.pyplot as plt - - -fig1 = plt.figure(1, (5.5, 4)) - -# the rect parameter will be ignore as we will set axes_locator -rect = (0.1, 0.1, 0.8, 0.8) -ax = [fig1.add_axes(rect, label="%d"%i) for i in range(4)] - - -horiz = [Size.AxesX(ax[0]), Size.Fixed(.5), Size.AxesX(ax[1])] -vert = [Size.AxesY(ax[0]), Size.Fixed(.5), Size.AxesY(ax[2])] - -# divide the axes rectangle into grid whose size is specified by horiz * vert -divider = Divider(fig1, rect, horiz, vert, aspect=False) - - -ax[0].set_axes_locator(divider.new_locator(nx=0, ny=0)) -ax[1].set_axes_locator(divider.new_locator(nx=2, ny=0)) -ax[2].set_axes_locator(divider.new_locator(nx=0, ny=2)) -ax[3].set_axes_locator(divider.new_locator(nx=2, ny=2)) - -ax[0].set_xlim(0, 2) -ax[1].set_xlim(0, 1) - -ax[0].set_ylim(0, 1) -ax[2].set_ylim(0, 2) - -divider.set_aspect(1.) - -for ax1 in ax: - plt.setp(ax1.get_xticklabels()+ax1.get_yticklabels(), - visible=False) - -plt.draw() -plt.show() diff --git a/dev/mpl_toolkits/axes_grid/figures/simple_axis_direction01.hires.png b/dev/mpl_toolkits/axes_grid/figures/simple_axis_direction01.hires.png deleted file mode 100644 index cb531c30ff9..00000000000 Binary files a/dev/mpl_toolkits/axes_grid/figures/simple_axis_direction01.hires.png and /dev/null differ diff --git a/dev/mpl_toolkits/axes_grid/figures/simple_axis_direction01.pdf b/dev/mpl_toolkits/axes_grid/figures/simple_axis_direction01.pdf deleted file mode 100644 index 5f98f4b8899..00000000000 Binary files a/dev/mpl_toolkits/axes_grid/figures/simple_axis_direction01.pdf and /dev/null differ diff --git a/dev/mpl_toolkits/axes_grid/figures/simple_axis_direction01.png b/dev/mpl_toolkits/axes_grid/figures/simple_axis_direction01.png deleted file mode 100644 index 8af9d800bc0..00000000000 Binary files a/dev/mpl_toolkits/axes_grid/figures/simple_axis_direction01.png and /dev/null differ diff --git a/dev/mpl_toolkits/axes_grid/figures/simple_axis_direction01.py b/dev/mpl_toolkits/axes_grid/figures/simple_axis_direction01.py deleted file mode 100644 index d182d582694..00000000000 --- a/dev/mpl_toolkits/axes_grid/figures/simple_axis_direction01.py +++ /dev/null @@ -1,15 +0,0 @@ -import matplotlib.pyplot as plt -import mpl_toolkits.axisartist as axisartist - -fig = plt.figure(figsize=(4,2.5)) -ax1 = fig.add_subplot(axisartist.Subplot(fig, "111")) -fig.subplots_adjust(right=0.8) - -ax1.axis["left"].major_ticklabels.set_axis_direction("top") -ax1.axis["left"].label.set_text("Label") - -ax1.axis["right"].label.set_visible(True) -ax1.axis["right"].label.set_text("Label") -ax1.axis["right"].label.set_axis_direction("left") - -plt.show() diff --git a/dev/mpl_toolkits/axes_grid/figures/simple_axis_direction03.hires.png b/dev/mpl_toolkits/axes_grid/figures/simple_axis_direction03.hires.png deleted file mode 100644 index e25c0f11c17..00000000000 Binary files a/dev/mpl_toolkits/axes_grid/figures/simple_axis_direction03.hires.png and /dev/null differ diff --git a/dev/mpl_toolkits/axes_grid/figures/simple_axis_direction03.pdf b/dev/mpl_toolkits/axes_grid/figures/simple_axis_direction03.pdf deleted file mode 100644 index b3ca7640c9c..00000000000 Binary files a/dev/mpl_toolkits/axes_grid/figures/simple_axis_direction03.pdf and /dev/null differ diff --git a/dev/mpl_toolkits/axes_grid/figures/simple_axis_direction03.png b/dev/mpl_toolkits/axes_grid/figures/simple_axis_direction03.png deleted file mode 100644 index 684c9cac96c..00000000000 Binary files a/dev/mpl_toolkits/axes_grid/figures/simple_axis_direction03.png and /dev/null differ diff --git a/dev/mpl_toolkits/axes_grid/figures/simple_axis_direction03.py b/dev/mpl_toolkits/axes_grid/figures/simple_axis_direction03.py deleted file mode 100644 index 0cffb9ffe53..00000000000 --- a/dev/mpl_toolkits/axes_grid/figures/simple_axis_direction03.py +++ /dev/null @@ -1,31 +0,0 @@ - -import matplotlib.pyplot as plt -import mpl_toolkits.axisartist as axisartist - -def setup_axes(fig, rect): - ax = axisartist.Subplot(fig, rect) - fig.add_subplot(ax) - - ax.set_yticks([0.2, 0.8]) - ax.set_xticks([0.2, 0.8]) - - return ax - -fig = plt.figure(1, figsize=(5, 2)) -fig.subplots_adjust(wspace=0.4, bottom=0.3) - -ax1 = setup_axes(fig, "121") -ax1.set_xlabel("X-label") -ax1.set_ylabel("Y-label") - -ax1.axis[:].invert_ticklabel_direction() - -ax2 = setup_axes(fig, "122") -ax2.set_xlabel("X-label") -ax2.set_ylabel("Y-label") - -ax2.axis[:].major_ticks.set_tick_out(True) - -plt.show() - - diff --git a/dev/mpl_toolkits/axes_grid/figures/simple_axis_pad.hires.png b/dev/mpl_toolkits/axes_grid/figures/simple_axis_pad.hires.png deleted file mode 100644 index bb335207e90..00000000000 Binary files a/dev/mpl_toolkits/axes_grid/figures/simple_axis_pad.hires.png and /dev/null differ diff --git a/dev/mpl_toolkits/axes_grid/figures/simple_axis_pad.pdf b/dev/mpl_toolkits/axes_grid/figures/simple_axis_pad.pdf deleted file mode 100644 index 51e263731b9..00000000000 Binary files a/dev/mpl_toolkits/axes_grid/figures/simple_axis_pad.pdf and /dev/null differ diff --git a/dev/mpl_toolkits/axes_grid/figures/simple_axis_pad.png b/dev/mpl_toolkits/axes_grid/figures/simple_axis_pad.png deleted file mode 100644 index 8f3c7b49ad4..00000000000 Binary files a/dev/mpl_toolkits/axes_grid/figures/simple_axis_pad.png and /dev/null differ diff --git a/dev/mpl_toolkits/axes_grid/figures/simple_axis_pad.py b/dev/mpl_toolkits/axes_grid/figures/simple_axis_pad.py deleted file mode 100644 index bfbfb00b434..00000000000 --- a/dev/mpl_toolkits/axes_grid/figures/simple_axis_pad.py +++ /dev/null @@ -1,112 +0,0 @@ - - -import numpy as np -import mpl_toolkits.axisartist.angle_helper as angle_helper -import mpl_toolkits.axisartist.grid_finder as grid_finder -from matplotlib.projections import PolarAxes -from matplotlib.transforms import Affine2D - -import mpl_toolkits.axisartist as axisartist - -from mpl_toolkits.axisartist.grid_helper_curvelinear import GridHelperCurveLinear - - -def setup_axes(fig, rect): - """ - polar projection, but in a rectangular box. - """ - - # 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) - grid_locator2 = grid_finder.MaxNLocator(5) - - tick_formatter1 = angle_helper.FormatterDMS() - - grid_helper = GridHelperCurveLinear(tr, - extreme_finder=extreme_finder, - grid_locator1=grid_locator1, - grid_locator2=grid_locator2, - tick_formatter1=tick_formatter1 - ) - - - ax1 = axisartist.Subplot(fig, rect, grid_helper=grid_helper) - #ax1.axis[:].toggle(all=False) - ax1.axis[:].set_visible(False) - - fig.add_subplot(ax1) - - ax1.set_aspect(1.) - ax1.set_xlim(-5, 12) - ax1.set_ylim(-5, 10) - - #ax1.grid(True) - - return ax1 - - -def add_floating_axis1(ax1): - ax1.axis["lat"] = axis = ax1.new_floating_axis(0, 30) - axis.label.set_text(r"$\theta = 30^{\circ}$") - axis.label.set_visible(True) - - return axis - - -def add_floating_axis2(ax1): - ax1.axis["lon"] = axis = ax1.new_floating_axis(1, 6) - axis.label.set_text(r"$r = 6$") - axis.label.set_visible(True) - - return axis - - -import matplotlib.pyplot as plt -fig = plt.figure(1, figsize=(9, 3.)) -fig.clf() -fig.subplots_adjust(left=0.01, right=0.99, bottom=0.01, top=0.99, - wspace=0.01, hspace=0.01) - - -def ann(ax1, d): - if plt.rcParams["text.usetex"]: - d = d.replace("_", r"\_") - - ax1.annotate(d, (0.5, 1), (5, -5), - xycoords="axes fraction", textcoords="offset points", - va="top", ha="center") - -ax1 = setup_axes(fig, rect=141) -axis = add_floating_axis1(ax1) -ann(ax1, r"default") - -ax1 = setup_axes(fig, rect=142) -axis = add_floating_axis1(ax1) -axis.major_ticklabels.set_pad(10) -ann(ax1, r"ticklabels.set_pad(10)") - -ax1 = setup_axes(fig, rect=143) -axis = add_floating_axis1(ax1) -axis.label.set_pad(20) -ann(ax1, r"label.set_pad(20)") - -ax1 = setup_axes(fig, rect=144) -axis = add_floating_axis1(ax1) -axis.major_ticks.set_tick_out(True) -ann(ax1, "ticks.set_tick_out(True)") - - -#ax1.axis["bottom"].toggle(all=True) - -plt.show() - - diff --git a/dev/mpl_toolkits/axes_grid/figures/simple_axisartist1.hires.png b/dev/mpl_toolkits/axes_grid/figures/simple_axisartist1.hires.png deleted file mode 100644 index cd9cebb7745..00000000000 Binary files a/dev/mpl_toolkits/axes_grid/figures/simple_axisartist1.hires.png and /dev/null differ diff --git a/dev/mpl_toolkits/axes_grid/figures/simple_axisartist1.pdf b/dev/mpl_toolkits/axes_grid/figures/simple_axisartist1.pdf deleted file mode 100644 index 9440157183d..00000000000 Binary files a/dev/mpl_toolkits/axes_grid/figures/simple_axisartist1.pdf and /dev/null differ diff --git a/dev/mpl_toolkits/axes_grid/figures/simple_axisartist1.png b/dev/mpl_toolkits/axes_grid/figures/simple_axisartist1.png deleted file mode 100644 index bc1b8fd258f..00000000000 Binary files a/dev/mpl_toolkits/axes_grid/figures/simple_axisartist1.png and /dev/null differ diff --git a/dev/mpl_toolkits/axes_grid/figures/simple_axisartist1.py b/dev/mpl_toolkits/axes_grid/figures/simple_axisartist1.py deleted file mode 100644 index 6093ea205b6..00000000000 --- a/dev/mpl_toolkits/axes_grid/figures/simple_axisartist1.py +++ /dev/null @@ -1,22 +0,0 @@ -import matplotlib.pyplot as plt -import mpl_toolkits.axisartist as AA - -fig = plt.figure(1) -fig.subplots_adjust(right=0.85) -ax = AA.Subplot(fig, 1, 1, 1) -fig.add_subplot(ax) - -# make some axis invisible -ax.axis["bottom", "top", "right"].set_visible(False) - -# make an new axis along the first axis axis (x-axis) which pass -# throught y=0. -ax.axis["y=0"] = ax.new_floating_axis(nth_coord=0, value=0, - axis_direction="bottom") -ax.axis["y=0"].toggle(all=True) -ax.axis["y=0"].label.set_text("y = 0") - -ax.set_ylim(-2, 4) - -plt.show() - diff --git a/dev/mpl_toolkits/axes_grid/figures/simple_axisline3.hires.png b/dev/mpl_toolkits/axes_grid/figures/simple_axisline3.hires.png deleted file mode 100644 index 05bb928b19a..00000000000 Binary files a/dev/mpl_toolkits/axes_grid/figures/simple_axisline3.hires.png and /dev/null differ diff --git a/dev/mpl_toolkits/axes_grid/figures/simple_axisline3.pdf b/dev/mpl_toolkits/axes_grid/figures/simple_axisline3.pdf deleted file mode 100644 index 806fdfea9f3..00000000000 Binary files a/dev/mpl_toolkits/axes_grid/figures/simple_axisline3.pdf and /dev/null differ diff --git a/dev/mpl_toolkits/axes_grid/figures/simple_axisline3.png b/dev/mpl_toolkits/axes_grid/figures/simple_axisline3.png deleted file mode 100644 index 5c8f33c7eae..00000000000 Binary files a/dev/mpl_toolkits/axes_grid/figures/simple_axisline3.png and /dev/null differ diff --git a/dev/mpl_toolkits/axes_grid/figures/simple_axisline3.py b/dev/mpl_toolkits/axes_grid/figures/simple_axisline3.py deleted file mode 100644 index 68d42677cd5..00000000000 --- a/dev/mpl_toolkits/axes_grid/figures/simple_axisline3.py +++ /dev/null @@ -1,13 +0,0 @@ -import matplotlib.pyplot as plt -from mpl_toolkits.axes_grid.axislines import Subplot - -fig = plt.figure(1, (3,3)) - -ax = Subplot(fig, 111) -fig.add_subplot(ax) - -ax.axis["right"].set_visible(False) -ax.axis["top"].set_visible(False) - -plt.show() - diff --git a/dev/mpl_toolkits/axes_grid/figures/simple_colorbar.hires.png b/dev/mpl_toolkits/axes_grid/figures/simple_colorbar.hires.png deleted file mode 100644 index 8f815225ecc..00000000000 Binary files a/dev/mpl_toolkits/axes_grid/figures/simple_colorbar.hires.png and /dev/null differ diff --git a/dev/mpl_toolkits/axes_grid/figures/simple_colorbar.pdf b/dev/mpl_toolkits/axes_grid/figures/simple_colorbar.pdf deleted file mode 100644 index 6caad72bf21..00000000000 Binary files a/dev/mpl_toolkits/axes_grid/figures/simple_colorbar.pdf and /dev/null differ diff --git a/dev/mpl_toolkits/axes_grid/figures/simple_colorbar.png b/dev/mpl_toolkits/axes_grid/figures/simple_colorbar.png deleted file mode 100644 index 605852236c7..00000000000 Binary files a/dev/mpl_toolkits/axes_grid/figures/simple_colorbar.png and /dev/null differ diff --git a/dev/mpl_toolkits/axes_grid/figures/simple_colorbar.py b/dev/mpl_toolkits/axes_grid/figures/simple_colorbar.py deleted file mode 100644 index c2f67d9a16e..00000000000 --- a/dev/mpl_toolkits/axes_grid/figures/simple_colorbar.py +++ /dev/null @@ -1,14 +0,0 @@ -import matplotlib.pyplot as plt -from mpl_toolkits.axes_grid1 import make_axes_locatable -import numpy as np - -ax = plt.subplot(111) -im = ax.imshow(np.arange(100).reshape((10,10))) - -# create an axes on the right side of ax. The width of cax will be 5% -# of ax and the padding between cax and ax will be fixed at 0.05 inch. -divider = make_axes_locatable(ax) -cax = divider.append_axes("right", size="5%", pad=0.05) - -plt.colorbar(im, cax=cax) - diff --git a/dev/mpl_toolkits/axes_grid/figures/simple_rgb.hires.png b/dev/mpl_toolkits/axes_grid/figures/simple_rgb.hires.png deleted file mode 100644 index 7a1a25bf179..00000000000 Binary files a/dev/mpl_toolkits/axes_grid/figures/simple_rgb.hires.png and /dev/null differ diff --git a/dev/mpl_toolkits/axes_grid/figures/simple_rgb.pdf b/dev/mpl_toolkits/axes_grid/figures/simple_rgb.pdf deleted file mode 100644 index 3b7d00bd1dc..00000000000 Binary files a/dev/mpl_toolkits/axes_grid/figures/simple_rgb.pdf and /dev/null differ diff --git a/dev/mpl_toolkits/axes_grid/figures/simple_rgb.png b/dev/mpl_toolkits/axes_grid/figures/simple_rgb.png deleted file mode 100644 index 5f33f38a236..00000000000 Binary files a/dev/mpl_toolkits/axes_grid/figures/simple_rgb.png and /dev/null differ diff --git a/dev/mpl_toolkits/axes_grid/figures/simple_rgb.py b/dev/mpl_toolkits/axes_grid/figures/simple_rgb.py deleted file mode 100644 index 14379d3b9d4..00000000000 --- a/dev/mpl_toolkits/axes_grid/figures/simple_rgb.py +++ /dev/null @@ -1,38 +0,0 @@ -import matplotlib.pyplot as plt - -from mpl_toolkits.axes_grid1.axes_rgb import RGBAxes - -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 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 - - -fig = plt.figure(1) -ax = RGBAxes(fig, [0.1, 0.1, 0.8, 0.8]) - -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) - - -plt.draw() -plt.show() diff --git a/dev/mpl_toolkits/axes_grid/index.html b/dev/mpl_toolkits/axes_grid/index.html deleted file mode 100644 index ada78e10dab..00000000000 --- a/dev/mpl_toolkits/axes_grid/index.html +++ /dev/null @@ -1,211 +0,0 @@ - - - - - - - - Matplotlib AxesGrid Toolkit — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      Previous topic

      -

      Toolkits

      -

      Next topic

      -

      Overview of AxesGrid toolkit

      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      Matplotlib AxesGrid Toolkit

      -

      The matplotlib AxesGrid toolkit is a collection of helper classes to -ease displaying multiple images in matplotlib. While the aspect -parameter in matplotlib adjust the position of the single axes, -AxesGrid toolkit provides a framework to adjust the position of -multiple axes according to their aspects.

      -../../_images/demo_axes_grid1.png -
      -

      Note

      -

      AxesGrid toolkit has been a part of matplotlib since v -0.99. Originally, the toolkit had a single namespace of -axes_grid. In more recent version (since svn r8226), the toolkit -has divided into two separate namespace (axes_grid1 and axisartist). -While axes_grid namespace is maintained for the backward compatibility, -use of axes_grid1 and axisartist is recommended.

      -
      -
      -

      Warning

      -

      axes_grid and axisartist (but not axes_grid1) uses -a custom Axes class (derived from the mpl’s original Axes class). -As a side effect, some commands (mostly tick-related) do not work. -Use axes_grid1 to avoid this, or see how things are different in -axes_grid and axisartist (LINK needed)

      -
      - -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/mpl_toolkits/axes_grid/users/axes_divider.html b/dev/mpl_toolkits/axes_grid/users/axes_divider.html deleted file mode 100644 index fda11f14b2e..00000000000 --- a/dev/mpl_toolkits/axes_grid/users/axes_divider.html +++ /dev/null @@ -1,341 +0,0 @@ - - - - - - - - AxesDivider — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      Previous topic

      -

      The Matplotlib AxesGrid Toolkit User’s Guide

      -

      Next topic

      -

      AXISARTIST namespace

      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      AxesDivider

      -

      The axes_divider module provide helper classes to adjust the axes -positions of set of images in the drawing time.

      -
        -
      • axes_size provides a classes of -units that the size of each axes will be determined. For example, -you can specify a fixed size
      • -
      • Divider this is the class -that is used calculates the axes position. It divides the given -rectangular area into several areas. You initialize the divider by -setting the horizontal and vertical list of sizes that the division -will be based on. You then use the new_locator method, whose return -value is a callable object that can be used to set the axes_locator -of the axes.
      • -
      -

      You first initialize the divider by specifying its grids, i.e., -horizontal and vertical.

      -

      for example,:

      -
      rect = [0.2, 0.2, 0.6, 0.6]
      -horiz=[h0, h1, h2, h3]
      -vert=[v0, v1, v2]
      -divider = Divider(fig, rect, horiz, vert)
      -
      -
      -

      where, rect is a bounds of the box that will be divided and h0,..h3, -v0,..v2 need to be an instance of classes in the -axes_size. They have get_size method -that returns a tuple of two floats. The first float is the relative -size, and the second float is the absolute size. Consider a following -grid.

      - ------ - - - - - - - - - - - - - - - - - -
      v0   
      v1   
      h0,v2h1h2h3
      -
        -
      • v0 => 0, 2
      • -
      • v1 => 2, 0
      • -
      • v2 => 3, 0
      • -
      -

      The height of the bottom row is always 2 (axes_divider internally -assumes that the unit is inch). The first and the second rows with -height ratio of 2:3. For example, if the total height of the grid 6, -then the first and second row will each occupy 2/(2+3) and 3/(2+3) of -(6-1) inches. The widths of columns (horiz) will be similarly -determined. When aspect ratio is set, the total height (or width) will -be adjusted accordingly.

      -

      The mpl_toolkits.axes_grid.axes_size contains several classes -that can be used to set the horizontal and vertical configurations. For -example, for the vertical configuration above will be:

      -
      from mpl_toolkits.axes_grid.axes_size import Fixed, Scaled
      -vert = [Fixed(2), Scaled(2), Scaled(3)]
      -
      -
      -

      After you set up the divider object, then you create a locator -instance which will be given to the axes.:

      -
      locator = divider.new_locator(nx=0, ny=1)
      -ax.set_axes_locator(locator)
      -
      -
      -

      The return value of the new_locator method is a instance of the -AxesLocator class. It is a callable object that returns the -location and size of the cell at the first column and the second row. -You may create a locator that spans over multiple cells.:

      -
      locator = divider.new_locator(nx=0, nx=2, ny=1)
      -
      -
      -

      The above locator, when called, will return the position and size of -the cells spanning the first and second column and the first row. You -may consider it as [0:2, 1].

      -

      See the example,

      -
      import mpl_toolkits.axes_grid.axes_size as Size
      -from mpl_toolkits.axes_grid import Divider
      -import matplotlib.pyplot as plt
      -
      -fig1 = plt.figure(1, (5.5, 4.))
      -
      -# the rect parameter will be ignore as we will set axes_locator
      -rect = (0.1, 0.1, 0.8, 0.8)
      -ax = [fig1.add_axes(rect, label="%d"%i) for i in range(4)]
      -
      -horiz = [Size.Scaled(1.5), Size.Fixed(.5), Size.Scaled(1.),
      -         Size.Scaled(.5)]
      -
      -vert = [Size.Scaled(1.), Size.Fixed(.5), Size.Scaled(1.5)]
      -
      -# divide the axes rectangle into grid whose size is specified by horiz * vert
      -divider = Divider(fig1, rect, horiz, vert, aspect=False)
      -
      -ax[0].set_axes_locator(divider.new_locator(nx=0, ny=0))
      -ax[1].set_axes_locator(divider.new_locator(nx=0, ny=2))
      -ax[2].set_axes_locator(divider.new_locator(nx=2, ny=2))
      -ax[3].set_axes_locator(divider.new_locator(nx=2, nx1=4, ny=0))
      -
      -for ax1 in ax:
      -    plt.setp(ax1.get_xticklabels()+ax1.get_yticklabels(),
      -             visible=False)
      -
      -plt.draw()
      -plt.show()
      -
      -
      -

      (Source code, png, hires.png, pdf)

      -
      -../../../_images/simple_axes_divider2.png -
      -

      You can adjust the size of the each axes according to their x or y -data limits (AxesX and AxesY), similar to the axes aspect parameter.

      -
      import mpl_toolkits.axes_grid.axes_size as Size
      -from mpl_toolkits.axes_grid import Divider
      -import matplotlib.pyplot as plt
      -
      -
      -fig1 = plt.figure(1, (5.5, 4))
      -
      -# the rect parameter will be ignore as we will set axes_locator
      -rect = (0.1, 0.1, 0.8, 0.8)
      -ax = [fig1.add_axes(rect, label="%d"%i) for i in range(4)]
      -
      -
      -horiz = [Size.AxesX(ax[0]), Size.Fixed(.5), Size.AxesX(ax[1])]
      -vert = [Size.AxesY(ax[0]), Size.Fixed(.5), Size.AxesY(ax[2])]
      -
      -# divide the axes rectangle into grid whose size is specified by horiz * vert
      -divider = Divider(fig1, rect, horiz, vert, aspect=False)
      -
      -
      -ax[0].set_axes_locator(divider.new_locator(nx=0, ny=0))
      -ax[1].set_axes_locator(divider.new_locator(nx=2, ny=0))
      -ax[2].set_axes_locator(divider.new_locator(nx=0, ny=2))
      -ax[3].set_axes_locator(divider.new_locator(nx=2, ny=2))
      -
      -ax[0].set_xlim(0, 2)
      -ax[1].set_xlim(0, 1)
      -
      -ax[0].set_ylim(0, 1)
      -ax[2].set_ylim(0, 2)
      -
      -divider.set_aspect(1.)
      -
      -for ax1 in ax:
      -    plt.setp(ax1.get_xticklabels()+ax1.get_yticklabels(),
      -             visible=False)
      -
      -plt.draw()
      -plt.show()
      -
      -
      -

      (Source code, png, hires.png, pdf)

      -
      -../../../_images/simple_axes_divider3.png -
      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/mpl_toolkits/axes_grid/users/axisartist.html b/dev/mpl_toolkits/axes_grid/users/axisartist.html deleted file mode 100644 index 71476a4c054..00000000000 --- a/dev/mpl_toolkits/axes_grid/users/axisartist.html +++ /dev/null @@ -1,734 +0,0 @@ - - - - - - - - AXISARTIST namespace — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      Table Of Contents

      - - -

      Previous topic

      -

      AxesDivider

      -

      Next topic

      -

      The Matplotlib AxesGrid Toolkit API

      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      AXISARTIST namespace

      -

      The AxisArtist namespace includes a derived Axes implementation. The -biggest difference is that the artists responsible to draw axis line, -ticks, ticklabel and axis labels are separated out from the mpl’s Axis -class, which are much more than artists in the original mpl. This -change was strongly motivated to support curvilinear grid. Here are a -few things that mpl_tootlkits.axisartist.Axes is different from original -Axes from mpl.

      -
        -
      • Axis elements (axis line(spine), ticks, ticklabel and axis labels) -are drawn by a AxisArtist instance. Unlike Axis, left, right, top -and bottom axis are drawn by separate artists. And each of them may -have different tick location and different tick labels.
      • -
      • gridlines are drawn by a Gridlines instance. The change was -motivated that in curvilinear coordinate, a gridline may not cross -axis-lines (i.e., no associated ticks). In the original Axes class, -gridlines are tied to ticks.
      • -
      • ticklines can be rotated if necessary (i.e, along the gridlines)
      • -
      -

      In summary, all these changes was to support

      -
        -
      • a curvilinear grid.
      • -
      • a floating axis
      • -
      -

      (Source code, png, hires.png, pdf)

      -
      -../../../_images/demo_floating_axis1.png -
      -

      mpl_toolkits.axisartist.Axes class defines a axis attribute, which -is a dictionary of AxisArtist instances. By default, the dictionary -has 4 AxisArtist instances, responsible for drawing of left, right, -bottom and top axis.

      -

      xaxis and yaxis attributes are still available, however they are set -to not visible. As separate artists are used for rendering axis, some -axis-related method in mpl may have no effect. -In addition to AxisArtist instances, the mpl_toolkits.axisartist.Axes will -have gridlines attribute (Gridlines), which obviously draws grid -lines.

      -

      In both AxisArtist and Gridlines, the calculation of tick and grid -location is delegated to an instance of GridHelper class. -mpl_toolkits.axisartist.Axes class uses GridHelperRectlinear as a grid -helper. The GridHelperRectlinear class is a wrapper around the xaxis -and yaxis of mpl’s original Axes, and it was meant to work as the -way how mpl’s original axes works. For example, tick location changes -using set_ticks method and etc. should work as expected. But change in -artist properties (e.g., color) will not work in general, although -some effort has been made so that some often-change attributes (color, -etc.) are respected.

      -
      -

      AxisArtist

      -

      AxisArtist can be considered as a container artist with following -attributes which will draw ticks, labels, etc.

      -
      -
        -
      • line
      • -
      • major_ticks, major_ticklabels
      • -
      • minor_ticks, minor_ticklabels
      • -
      • offsetText
      • -
      • label
      • -
      -
      -
      -

      line

      -

      Derived from Line2d class. Responsible for drawing a spinal(?) line.

      -
      -
      -

      major_ticks, minor_ticks

      -

      Derived from Line2d class. Note that ticks are markers.

      -
      -
      -

      major_ticklabels, minor_ticklabels

      -

      Derived from Text. Note that it is not a list of Text artist, but a -single artist (similar to a collection).

      -
      -
      -

      axislabel

      -

      Derived from Text.

      -
      -
      -

      Default AxisArtists

      -

      By default, following for axis artists are defined.:

      -
      ax.axis["left"], ax.axis["bottom"], ax.axis["right"], ax.axis["top"]
      -
      -
      -

      The ticklabels and axislabel of the top and the right axis are set to -not visible.

      -

      For example, if you want to change the color attributes of -major_ticklabels of the bottom x-axis

      -
      ax.axis["bottom"].major_ticklabels.set_color("b")
      -
      -
      -

      Similarly, to make ticklabels invisible

      -
      ax.axis["bottom"].major_ticklabels.set_visible(False)
      -
      -
      -

      AxisAritst provides a helper method to control the visibility of ticks, -ticklabels, and label. To make ticklabel invisible,

      -
      ax.axis["bottom"].toggle(ticklabels=False)
      -
      -
      -

      To make all of ticks, ticklabels, and (axis) label invisible

      -
      ax.axis["bottom"].toggle(all=False)
      -
      -
      -

      To turn all off but ticks on

      -
      ax.axis["bottom"].toggle(all=False, ticks=True)
      -
      -
      -

      To turn all on but (axis) label off

      -
      ax.axis["bottom"].toggle(all=True, label=False))
      -
      -

      ax.axis’s __getitem__ method can take multiple axis names. For -example, to turn ticklabels of “top” and “right” axis on,

      -
      ax.axis["top","right"].toggle(ticklabels=True))
      -
      -

      Note that ‘ax.axis[“top”,”right”]’ returns a simple proxy object that translate above code to something like below.

      -
      for n in ["top","right"]:
      -  ax.axis[n].toggle(ticklabels=True))
      -
      -

      So, any return values in the for loop are ignored. And you should not -use it anything more than a simple method.

      -

      Like the list indexing ”:” means all items, i.e.,

      -
      ax.axis[:].major_ticks.set_color("r")
      -
      -
      -

      changes tick color in all axis.

      -
      -
      -
      -

      HowTo

      -
        -
      1. Changing tick locations and label.
      2. -
      -
      -

      Same as the original mpl’s axes.:

      -
      ax.set_xticks([1,2,3])
      -
      -
      -
      -
        -
      1. Changing axis properties like color, etc.
      2. -
      -
      -

      Change the properties of appropriate artists. For example, to change -the color of the ticklabels:

      -
      ax.axis["left"].major_ticklabels.set_color("r")
      -
      -
      -
      -
        -
      1. To change the attributes of multiple axis:

        -
        ax.axis["left","bottom"].major_ticklabels.set_color("r")
        -
        -
        -

        or to change the attributes of all axis:

        -
        ax.axis[:].major_ticklabels.set_color("r")
        -
        -
        -
      2. -
      3. -
        To change the tick size (length), you need to use
        -

        axis.major_ticks.set_ticksize method. To change the direction of -the ticks (ticks are in opposite direction of ticklabels by -default), use axis.major_ticks.set_tick_out method.

        -

        To change the pad between ticks and ticklabels, use -axis.major_ticklabels.set_pad method.

        -

        To change the pad between ticklabels and axis label, -axis.label.set_pad method.

        -
        -
        -
      4. -
      -
      -
      -

      Rotation and Alignment of TickLabels

      -

      This is also quite different from the original mpl and can be -confusing. When you want to rotate the ticklabels, first consider -using “set_axis_direction” method.

      -
      ax1.axis["left"].major_ticklabels.set_axis_direction("top")
      -ax1.axis["right"].label.set_axis_direction("left")
      -
      -
      -

      (Source code, png, hires.png, pdf)

      -
      -../../../_images/simple_axis_direction01.png -
      -

      The parameter for set_axis_direction is one of [“left”, “right”, -“bottom”, “top”].

      -

      You must understand some underlying concept of directions.

      -
      -
        -
      1. There is a reference direction which is defined as the direction -of the axis line with increasing coordinate. For example, the -reference direction of the left x-axis is from bottom to top.
      2. -
      -
      -

      (Source code, png, hires.png, pdf)

      -
      -../../../_images/axis_direction_demo_step01.png -
      -

      The direction, text angle, and alignments of the ticks, ticklabels and -axis-label is determined with respect to the reference direction

      -
      -
        -
      1. ticklabel_direction is either the right-hand side (+) of the -reference direction or the left-hand side (-).
      2. -
      -
      -
      -
        -
      1. same for the label_direction
      2. -
      -
      -
      -
        -
      1. ticks are by default drawn toward the opposite direction of the ticklabels.
      2. -
      3. text rotation of ticklabels and label is determined in reference -to the ticklabel_direction or label_direction, -respectively. The rotation of ticklabels and label is anchored.
      4. -
      -
      -
      -
      -

      On the other hand, there is a concept of “axis_direction”. This is a -default setting of above properties for each, “bottom”, “left”, “top”, -and “right” axis.

      -
      -
      -------- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      ??leftbottomrighttop
      axislabeldirection‘-‘‘+’‘+’‘-‘
      axislabelrotation18000180
      axislabelvacentertopcenterbottom
      axislabelharightcenterrightcenter
      ticklabeldirection‘-‘‘+’‘+’‘-‘
      ticklabelsrotation900-90180
      ticklabelharightcenterrightcenter
      ticklabelvacenterbaselinecenterbaseline
      -
      -

      And, ‘set_axis_direction(“top”)’ means to adjust the text rotation -etc, for settings suitable for “top” axis. The concept of axis -direction can be more clear with curved axis.

      -

      (Source code, png, hires.png, pdf)

      -
      -../../../_images/demo_axis_direction.png -
      -

      The axis_direction can be adjusted in the AxisArtist level, or in the -level of its child arists, i.e., ticks, ticklabels, and axis-label.

      -
      ax1.axis["left"].set_axis_direction("top")
      -
      -
      -

      changes axis_direction of all the associated artist with the “left” -axis, while

      -
      ax1.axis["left"].major_ticklabels.set_axis_direction("top")
      -
      -
      -

      changes the axis_direction of only the major_ticklabels. Note that -set_axis_direction in the AxisArtist level changes the -ticklabel_direction and label_direction, while changing the -axis_direction of ticks, ticklabels, and axis-label does not affect -them.

      -

      If you want to make ticks outward and ticklabels inside the axes, -use invert_ticklabel_direction method.

      -
      ax.axis[:].invert_ticklabel_direction()
      -
      -
      -

      A related method is “set_tick_out”. It makes ticks outward (as a -matter of fact, it makes ticks toward the opposite direction of the -default direction).

      -
      ax.axis[:].major_ticks.set_tick_out(True)
      -
      -
      -

      (Source code, png, hires.png, pdf)

      -
      -../../../_images/simple_axis_direction03.png -
      -

      So, in summary,

      -
      -
        -
      • -
        AxisArtist’s methods
        -
          -
        • set_axis_direction : “left”, “right”, “bottom”, or “top”
        • -
        • set_ticklabel_direction : “+” or “-“
        • -
        • set_axislabel_direction : “+” or “-“
        • -
        • invert_ticklabel_direction
        • -
        -
        -
        -
      • -
      • -
        Ticks’ methods (major_ticks and minor_ticks)
        -
          -
        • set_tick_out : True or False
        • -
        • set_ticksize : size in points
        • -
        -
        -
        -
      • -
      • -
        TickLabels’ methods (major_ticklabels and minor_ticklabels)
        -
          -
        • set_axis_direction : “left”, “right”, “bottom”, or “top”
        • -
        • set_rotation : angle with respect to the reference direction
        • -
        • set_ha and set_va : see below
        • -
        -
        -
        -
      • -
      • -
        AxisLabels’ methods (label)
        -
          -
        • set_axis_direction : “left”, “right”, “bottom”, or “top”
        • -
        • set_rotation : angle with respect to the reference direction
        • -
        • set_ha and set_va
        • -
        -
        -
        -
      • -
      -
      -
      -

      Adjusting ticklabels alignment

      -

      Alignment of TickLabels are treated specially. See below

      -

      (Source code, png, hires.png, pdf)

      -
      -../../../_images/demo_ticklabel_alignment.png -
      -
      -
      -

      Adjusting pad

      -

      To change the pad between ticks and ticklabels

      -
      ax.axis["left"].major_ticklabels.set_pad(10)
      -
      -
      -

      Or ticklabels and axis-label

      -
      ax.axis["left"].label.set_pad(10)
      -
      -
      -

      (Source code, png, hires.png, pdf)

      -
      -../../../_images/simple_axis_pad.png -
      -
      -
      -
      -

      GridHelper

      -

      To actually define a curvilinear coordinate, you have to use your own -grid helper. A generalised version of grid helper class is supplied -and this class should suffice in most of cases. A user may provide -two functions which defines a transformation (and its inverse pair) -from the curved coordinate to (rectilinear) image coordinate. Note that -while ticks and grids are drawn for curved coordinate, the data -transform of the axes itself (ax.transData) is still rectilinear -(image) coordinate.

      -
      from  mpl_toolkits.axisartist.grid_helper_curvelinear \
      -     import GridHelperCurveLinear
      -from mpl_toolkits.axisartist import Subplot
      -
      -# from curved coordinate to rectlinear coordinate.
      -def tr(x, y):
      -    x, y = np.asarray(x), np.asarray(y)
      -    return x, y-x
      -
      -# from rectlinear coordinate to curved coordinate.
      -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, 1, 1, grid_helper=grid_helper)
      -
      -fig.add_subplot(ax1)
      -
      -
      -

      You may use matplotlib’s Transform instance instead (but a -inverse transformation must be defined). Often, coordinate range in a -curved coordinate system may have a limited range, or may have -cycles. In those cases, a more customized version of grid helper is -required.

      -
      import  mpl_toolkits.axisartist.angle_helper as angle_helper
      -
      -# PolarAxes.PolarTransform takes radian. However, we want our coordinate
      -# system in degree
      -tr = Affine2D().scale(np.pi/180., 1.) + PolarAxes.PolarTransform()
      -
      -
      -# extreme finder :  find a range of coordinate.
      -# 20, 20 : number of sampling points along x, y direction
      -# The first coordinate (longitude, but theta in polar)
      -#   has a cycle of 360 degree.
      -# The second coordinate (latitude, but radius in polar)  has a minimum of 0
      -extreme_finder = angle_helper.ExtremeFinderCycle(20, 20,
      -                                                 lon_cycle = 360,
      -                                                 lat_cycle = None,
      -                                                 lon_minmax = None,
      -                                                 lat_minmax = (0, np.inf),
      -                                                 )
      -
      -# Find a grid values appropriate for the coordinate (degree,
      -# minute, second). The argument is a approximate number of grids.
      -grid_locator1 = angle_helper.LocatorDMS(12)
      -
      -# 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).
      -tick_formatter1 = angle_helper.FormatterDMS()
      -
      -grid_helper = GridHelperCurveLinear(tr,
      -                                    extreme_finder=extreme_finder,
      -                                    grid_locator1=grid_locator1,
      -                                    tick_formatter1=tick_formatter1
      -                                    )
      -
      -
      -

      Again, the transData of the axes is still a rectilinear coordinate -(image coordinate). You may manually do conversion between two -coordinates, or you may use Parasite Axes for convenience.:

      -
      ax1 = SubplotHost(fig, 1, 2, 2, grid_helper=grid_helper)
      -
      -# 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)
      -
      -
      -

      (Source code, png, hires.png, pdf)

      -
      -../../../_images/demo_curvelinear_grid1.png -
      -
      -
      -

      FloatingAxis

      -

      A floating axis is an axis one of whose data coordinate is fixed, i.e, -its location is not fixed in Axes coordinate but changes as axes data -limits changes. A floating axis can be created using -new_floating_axis method. However, it is your responsibility that -the resulting AxisArtist is properly added to the axes. A recommended -way is to add it as an item of Axes’s axis attribute.:

      -
      # floating axis whose first (index starts from 0) 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)
      -
      -
      -

      See the first example of this page.

      -
      -
      -

      Current Limitations and TODO’s

      -

      The code need more refinement. Here is a incomplete list of issues and TODO’s

      -
        -
      • No easy way to support a user customized tick location (for -curvilinear grid). A new Locator class needs to be created.
      • -
      • FloatingAxis may have coordinate limits, e.g., a floating axis of x -= 0, but y only spans from 0 to 1.
      • -
      • The location of axislabel of FloatingAxis needs to be optionally -given as a coordinate value. ex, a floating axis of x=0 with label at y=1
      • -
      -
      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/mpl_toolkits/axes_grid/users/index.html b/dev/mpl_toolkits/axes_grid/users/index.html deleted file mode 100644 index b0b3ebdd0fa..00000000000 --- a/dev/mpl_toolkits/axes_grid/users/index.html +++ /dev/null @@ -1,203 +0,0 @@ - - - - - - - - The Matplotlib AxesGrid Toolkit User’s Guide — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      Previous topic

      -

      Overview of AxesGrid toolkit

      -

      Next topic

      -

      AxesDivider

      -

      This Page

      - - - -
      -
      - - - - - - \ No newline at end of file diff --git a/dev/mpl_toolkits/axes_grid/users/overview.html b/dev/mpl_toolkits/axes_grid/users/overview.html deleted file mode 100644 index 0882cdf4fb5..00000000000 --- a/dev/mpl_toolkits/axes_grid/users/overview.html +++ /dev/null @@ -1,937 +0,0 @@ - - - - - - - - Overview of AxesGrid toolkit — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - - - -
      -
      -
      -
      - -
      -

      Overview of AxesGrid toolkit

      -
      -

      What is AxesGrid toolkit?

      -

      The matplotlib AxesGrid toolkit is a collection of helper classes, -mainly to ease displaying (multiple) images in matplotlib.

      -
      -

      Note

      -

      AxesGrid toolkit has been a part of matplotlib since v -0.99. Originally, the toolkit had a single namespace of -axes_grid. In more recent version (since svn r8226), the toolkit -has divided into two separate namespace (axes_grid1 and axisartist). -While axes_grid namespace is maintained for the backward compatibility, -use of axes_grid1 and axisartist is recommended.

      -
      -
      -

      Warning

      -

      axes_grid and axisartist (but not axes_grid1) uses -a custom Axes class (derived from the mpl’s original Axes class). -As a side effect, some commands (mostly tick-related) do not work. -Use axes_grid1 to avoid this, or see how things are different in -axes_grid and axisartist (LINK needed)

      -
      -

      AxesGrid toolkit has two namespaces (axes_grid1 and axisartist). -axisartist contains custom Axes class that is meant to support for -curvilinear grids (e.g., the world coordinate system in astronomy). -Unlike mpl’s original Axes class which uses Axes.xaxis and Axes.yaxis -to draw ticks, ticklines and etc., Axes in axisartist uses special -artist (AxisArtist) which can handle tick, ticklines and etc. for -curved coordinate systems.

      -

      (Source code, png, hires.png, pdf)

      -
      -../../../_images/demo_floating_axis1.png -
      -

      Since it uses a special artists, some mpl commands that work on -Axes.xaxis and Axes.yaxis may not work. See LINK for more detail.

      -

      axes_grid1 is a collection of helper classes to ease displaying -(multiple) images with matplotlib. In matplotlib, the axes location -(and size) is specified in the normalized figure coordinates, which -may not be ideal for displaying images that needs to have a given -aspect ratio. For example, it helps you to have a colorbar whose -height always matches that of the image. ImageGrid, RGB Axes and -AxesDivider are helper classes that deals with adjusting the -location of (multiple) Axes. They provides a framework to adjust the -position of multiple axes at the drawing time. ParasiteAxes -provides twinx(or twiny)-like features so that you can plot different -data (e.g., different y-scale) in a same Axes. AnchoredArtists -includes custom artists which are placed at some anchored position, -like the legend.

      -

      (Source code, png, hires.png, pdf)

      -
      -../../../_images/demo_axes_grid3.png -
      -
      -
      -

      AXES_GRID1

      -
      -

      ImageGrid

      -

      A class that creates a grid of Axes. In matplotlib, the axes location -(and size) is specified in the normalized figure coordinates. This may -not be ideal for images that needs to be displayed with a given aspect -ratio. For example, displaying images of a same size with some fixed -padding between them cannot be easily done in matplotlib. ImageGrid is -used in such case.

      -
      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()
      -
      -
      -

      (Source code, png, hires.png, pdf)

      -
      -../../../_images/simple_axesgrid1.png -
      -
        -
      • The position of each axes is determined at the drawing time (see -AxesDivider), so that the size of the entire grid fits in the -given rectangle (like the aspect of axes). Note that in this example, -the paddings between axes are fixed even if you changes the figure -size.

        -
      • -
      • axes in the same column has a same axes width (in figure -coordinate), and similarly, axes in the same row has a same -height. The widths (height) of the axes in the same row (column) are -scaled according to their view limits (xlim or ylim).

        -
        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()
        -
        -
        -

        (Source code, png, hires.png, pdf)

        -
        -../../../_images/simple_axesgrid21.png -
        -
      • -
      • xaxis are shared among axes in a same column. Similarly, yaxis are -shared among axes in a same row. Therefore, changing axis properties -(view limits, tick location, etc. either by plot commands or using -your mouse in interactive backends) of one axes will affect all -other shared axes.

        -
      • -
      -

      When initialized, ImageGrid creates given number (ngrids or ncols * -nrows if ngrids is None) of Axes instances. A sequence-like -interface is provided to access the individual Axes instances (e.g., -grid[0] is the first Axes in the grid. See below for the order of -axes).

      -

      AxesGrid takes following arguments,

      -
      -
      ----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      NameDefaultDescription
      fig  
      rect  
      nrows_ncols number of rows and cols. e.g., (2,2)
      ngridsNonenumber of grids. nrows x ncols if None
      direction“row”increasing direction of axes number. [row|column]
      axes_pad0.02pad between axes in inches
      add_allTrueAdd axes to figures if True
      share_allFalsexaxis & yaxis of all axes are shared if True
      aspectTrueaspect of axes
      label_mode“L”location of tick labels thaw will be displayed. -“1” (only the lower left axes), -“L” (left most and bottom most axes), -or “all”.
      cbar_modeNone[None|single|each]
      cbar_location“right”[right|top]
      cbar_padNonepad between image axes and colorbar axes
      cbar_size“5%”size of the colorbar
      axes_classNone 
      -
      -
      rect
      -
      specifies the location of the grid. You can either specify -coordinates of the rectangle to be used (e.g., (0.1, 0.1, 0.8, 0.8) -as in the Axes), or the subplot-like position (e.g., “121”).
      -
      direction
      -
      means the increasing direction of the axes number.
      -
      aspect
      -
      By default (False), widths and heights of axes in the grid are -scaled independently. If True, they are scaled according to their -data limits (similar to aspect parameter in mpl).
      -
      share_all
      -
      if True, xaxis and yaxis of all axes are shared.
      -
      direction
      -

      direction of increasing axes number. For “row”,

      -
      -
      ---- - - - - - - - - -
      grid[0]grid[1]
      grid[2]grid[3]
      -
      -

      For “column”,

      -
      -
      ---- - - - - - - - - -
      grid[0]grid[2]
      grid[1]grid[3]
      -
      -
      -
      -
      -

      You can also create a colorbar (or colorbars). You can have colorbar -for each axes (cbar_mode=”each”), or you can have a single colorbar -for the grid (cbar_mode=”single”). The colorbar can be placed on your -right, or top. The axes for each colorbar is stored as a cbar_axes -attribute.

      -

      The examples below show what you can do with AxesGrid.

      -

      (Source code, png, hires.png, pdf)

      -
      -../../../_images/demo_axes_grid3.png -
      -
      -
      -

      AxesDivider

      -

      Behind the scene, the ImageGrid class and the RGBAxes class utilize the -AxesDivider class, whose role is to calculate the location of the axes -at drawing time. While a more about the AxesDivider is (will be) -explained in (yet to be written) AxesDividerGuide, direct use of the -AxesDivider class will not be necessary for most users. The -axes_divider module provides a helper function make_axes_locatable, -which can be useful. It takes a existing axes instance and create a -divider for it.

      -
      ax = subplot(1,1,1)
      -divider = make_axes_locatable(ax)
      -
      -
      -

      make_axes_locatable returns an instance of the AxesLocator class, -derived from the Locator. It provides append_axes method that -creates a new axes on the given side of (“top”, “right”, “bottom” and -“left”) of the original axes.

      -
      -
      -

      colorbar whose height (or width) in sync with the master axes

      -
      import matplotlib.pyplot as plt
      -from mpl_toolkits.axes_grid1 import make_axes_locatable
      -import numpy as np
      -
      -ax = plt.subplot(111)
      -im = ax.imshow(np.arange(100).reshape((10,10)))
      -
      -# create an axes on the right side of ax. The width of cax will be 5%
      -# of ax and the padding between cax and ax will be fixed at 0.05 inch.
      -divider = make_axes_locatable(ax)
      -cax = divider.append_axes("right", size="5%", pad=0.05)
      -
      -plt.colorbar(im, cax=cax)
      -
      -
      -

      (Source code, png, hires.png, pdf)

      -
      -../../../_images/simple_colorbar.png -
      -
      -

      scatter_hist.py with AxesDivider

      -

      The “scatter_hist.py” example in mpl can be rewritten using -make_axes_locatable.

      -
      axScatter = subplot(111)
      -axScatter.scatter(x, y)
      -axScatter.set_aspect(1.)
      -
      -# create new axes on the right and on the top of the current axes.
      -divider = make_axes_locatable(axScatter)
      -axHistx = divider.append_axes("top", size=1.2, pad=0.1, sharex=axScatter)
      -axHisty = divider.append_axes("right", size=1.2, pad=0.1, sharey=axScatter)
      -
      -# the scatter plot:
      -# histograms
      -bins = np.arange(-lim, lim + binwidth, binwidth)
      -axHistx.hist(x, bins=bins)
      -axHisty.hist(y, bins=bins, orientation='horizontal')
      -
      -
      -

      See the full source code below.

      -

      (Source code)

      -

      The scatter_hist using the AxesDivider has some advantage over the -original scatter_hist.py in mpl. For example, you can set the aspect -ratio of the scatter plot, even with the x-axis or y-axis is shared -accordingly.

      -
      -
      -
      -

      ParasiteAxes

      -

      The ParasiteAxes is an axes whose location is identical to its host -axes. The location is adjusted in the drawing time, thus it works even -if the host change its location (e.g., images).

      -

      In most cases, you first create a host axes, which provides a few -method that can be used to create parasite axes. They are twinx, -twiny (which are similar to twinx and twiny in the matplotlib) and -twin. twin takes an arbitrary transformation that maps between the -data coordinates of the host axes and the parasite axes. draw -method of the parasite axes are never called. Instead, host axes -collects artists in parasite axes and draw them as if they belong to -the host axes, i.e., artists in parasite axes are merged to those of -the host axes and then drawn according to their zorder. The host and -parasite axes modifies some of the axes behavior. For example, color -cycle for plot lines are shared between host and parasites. Also, the -legend command in host, creates a legend that includes lines in the -parasite axes. To create a host axes, you may use host_suplot or -host_axes command.

      -
      -

      Example 1. twinx

      -
      from mpl_toolkits.axes_grid1 import host_subplot
      -import matplotlib.pyplot as plt
      -
      -host = host_subplot(111)
      -
      -par = host.twinx()
      -
      -host.set_xlabel("Distance")
      -host.set_ylabel("Density")
      -par.set_ylabel("Temperature")
      -
      -p1, = host.plot([0, 1, 2], [0, 1, 2], label="Density")
      -p2, = par.plot([0, 1, 2], [0, 3, 2], label="Temperature")
      -
      -leg = plt.legend()
      -
      -host.yaxis.get_label().set_color(p1.get_color())
      -leg.texts[0].set_color(p1.get_color())
      -
      -par.yaxis.get_label().set_color(p2.get_color())
      -leg.texts[1].set_color(p2.get_color())
      -
      -plt.show()
      -
      -
      -

      (Source code, png, hires.png, pdf)

      -
      -../../../_images/parasite_simple.png -
      -
      -
      -

      Example 2. twin

      -

      twin without a transform argument treat the parasite axes to have a -same data transform as the host. This can be useful when you want the -top(or right)-axis to have different tick-locations, tick-labels, or -tick-formatter for bottom(or left)-axis.

      -
      ax2 = ax.twin() # now, 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$"])
      -
      -
      -

      (Source code, png, hires.png, pdf)

      -
      -../../../_images/simple_axisline41.png -
      -

      A more sophisticated example using twin. Note that if you change the -x-limit in the host axes, the x-limit of the parasite axes will change -accordingly.

      -

      (Source code, png, hires.png, pdf)

      -
      -../../../_images/parasite_simple21.png -
      -
      -
      -
      -

      AnchoredArtists

      -

      It’s a collection of artists whose location is anchored to the (axes) -bbox, like the legend. It is derived from OffsetBox in mpl, and -artist need to be drawn in the canvas coordinate. But, there is a -limited support for an arbitrary transform. For example, the ellipse -in the example below will have width and height in the data -coordinate.

      -
      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()
      -
      -
      -

      (Source code, png, hires.png, pdf)

      -
      -../../../_images/simple_anchored_artists1.png -
      -
      -
      -

      InsetLocator

      -

      mpl_toolkits.axes_grid.inset_locator provides helper classes -and functions to place your (inset) axes at the anchored position of -the parent axes, similarly to AnchoredArtist.

      -

      Using mpl_toolkits.axes_grid.inset_locator.inset_axes(), you -can have inset axes whose size is either fixed, or a fixed proportion -of the parent axes. For example,:

      -
      inset_axes = inset_axes(parent_axes,
      -                        width="30%", # width = 30% of parent_bbox
      -                        height=1., # height : 1 inch
      -                        loc=3)
      -
      -
      -

      creates an inset axes whose width is 30% of the parent axes and whose -height is fixed at 1 inch.

      -

      You may creates your inset whose size is determined so that the data -scale of the inset axes to be that of the parent axes multiplied by -some factor. For example,

      -
      inset_axes = zoomed_inset_axes(ax,
      -                               0.5, # zoom = 0.5
      -                               loc=1)
      -
      -
      -

      creates an inset axes whose data scale is half of the parent axes. -Here is complete examples.

      -

      (Source code, png, hires.png, pdf)

      -
      -../../../_images/inset_locator_demo1.png -
      -

      For example, zoomed_inset_axes() can be used when you want the -inset represents the zoom-up of the small portion in the parent axes. -And mpl_toolkits/axes_grid/inset_locator provides a helper -function mark_inset() to mark the location of the area -represented by the inset axes.

      -
      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 = plt.figure(1, [5,4])
      -ax = fig.add_subplot(111)
      -
      -# 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()
      -
      -
      -

      (Source code, png, hires.png, pdf)

      -
      -../../../_images/inset_locator_demo21.png -
      -
      -

      RGB Axes

      -

      RGBAxes is a helper class to conveniently show RGB composite -images. Like ImageGrid, the location of axes are adjusted so that the -area occupied by them fits in a given rectangle. Also, the xaxis and -yaxis of each axes are shared.

      -
      from mpl_toolkits.axes_grid1.axes_rgb import RGBAxes
      -
      -fig = plt.figure(1)
      -ax = RGBAxes(fig, [0.1, 0.1, 0.8, 0.8])
      -
      -r, g, b = get_rgb() # r,g,b are 2-d images
      -ax.imshow_rgb(r, g, b,
      -              origin="lower", interpolation="nearest")
      -
      -
      -

      (Source code, png, hires.png, pdf)

      -
      -../../../_images/simple_rgb.png -
      -
      -
      -
      -
      -

      AXISARTIST

      -
      -

      AxisArtist

      -

      AxisArtist module provides a custom (and very experimental) Axes -class, where each axis (left, right, top and bottom) have a separate -artist associated which is responsible to draw axis-line, ticks, -ticklabels, label. Also, you can create your own axis, which can pass -through a fixed position in the axes coordinate, or a fixed position -in the data coordinate (i.e., the axis floats around when viewlimit -changes).

      -

      The axes class, by default, have its xaxis and yaxis invisible, and -has 4 additional artists which are responsible to draw axis in -“left”,”right”,”bottom” and “top”. They are accessed as -ax.axis[“left”], ax.axis[“right”], and so on, i.e., ax.axis is a -dictionary that contains artists (note that ax.axis is still a -callable methods and it behaves as an original Axes.axis method in -mpl).

      -

      To create an axes,

      -
      import mpl_toolkits.axisartist as AA
      -fig = plt.figure(1)
      -ax = AA.Axes(fig, [0.1, 0.1, 0.8, 0.8])
      -fig.add_axes(ax)
      -
      -
      -

      or to create a subplot

      -
      ax = AA.Subplot(fig, 111)
      -fig.add_subplot(ax)
      -
      -
      -

      For example, you can hide the right, and top axis by

      -
      ax.axis["right"].set_visible(False)
      -ax.axis["top"].set_visible(False)
      -
      -
      -

      (Source code, png, hires.png, pdf)

      -
      -../../../_images/simple_axisline3.png -
      -

      It is also possible to add an extra axis. For example, you may have an -horizontal axis at y=0 (in data coordinate).

      -
      ax.axis["y=0"] = ax.new_floating_axis(nth_coord=0, value=0)
      -
      -
      -
      import matplotlib.pyplot as plt
      -import mpl_toolkits.axisartist as AA
      -
      -fig = plt.figure(1)
      -fig.subplots_adjust(right=0.85)
      -ax = AA.Subplot(fig, 1, 1, 1)
      -fig.add_subplot(ax)
      -
      -# make some axis invisible
      -ax.axis["bottom", "top", "right"].set_visible(False)
      -
      -# make an new axis along the first axis axis (x-axis) which pass
      -# throught y=0.
      -ax.axis["y=0"] = ax.new_floating_axis(nth_coord=0, value=0,
      -                                      axis_direction="bottom")
      -ax.axis["y=0"].toggle(all=True)
      -ax.axis["y=0"].label.set_text("y = 0")
      -
      -ax.set_ylim(-2, 4)
      -
      -plt.show()
      -
      -
      -

      (Source code, png, hires.png, pdf)

      -
      -../../../_images/simple_axisartist1.png -
      -

      Or a fixed axis with some offset

      -
      # make new (right-side) yaxis, but wth some offset
      -ax.axis["right2"] = ax.new_fixed_axis(loc="right",
      -                                      offset=(20, 0))
      -
      -
      -
      -

      AxisArtist with ParasiteAxes

      -

      Most commands in the axes_grid1 toolkit can take a axes_class keyword -argument, and the commands creates an axes of the given class. For example, -to create a host subplot with axisartist.Axes,

      -
      import mpl_tookits.axisartist as AA
      -from mpl_toolkits.axes_grid1 import host_subplot
      -
      -host = host_subplot(111, axes_class=AA.Axes)
      -
      -
      -

      Here is an example that uses parasiteAxes.

      -

      (Source code, png, hires.png, pdf)

      -
      -../../../_images/demo_parasite_axes2_00_001.png -
      -

      ()

      -
      -
      -
      -

      Curvilinear Grid

      -

      The motivation behind the AxisArtist module is to support curvilinear grid -and ticks.

      -

      (Source code, png, hires.png, pdf)

      -
      -../../../_images/demo_floating_axis1.png -
      -

      See AXISARTIST namespace for more details.

      -
      -
      -

      Floating Axes

      -

      This also support a Floating Axes whose outer axis are defined as -floating axis.

      -

      (Source code, png, hires.png, pdf)

      -
      -../../../_images/demo_floating_axes1.png -
      -
      -
      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/mpl_toolkits/index.html b/dev/mpl_toolkits/index.html deleted file mode 100644 index 759d5409b94..00000000000 --- a/dev/mpl_toolkits/index.html +++ /dev/null @@ -1,240 +0,0 @@ - - - - - - - - Toolkits — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      Table Of Contents

      - - -

      Previous topic

      -

      Adding new scales and projections to matplotlib

      -

      Next topic

      -

      Matplotlib AxesGrid Toolkit

      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -
      -
      -

      Toolkits

      - --- - - - - - -
      Release:1.3.x
      Date:May 21, 2013
      -

      Toolkits are collections of application-specific functions that extend matplotlib.

      -
      -

      Basemap (Not distributed with matplotlib)

      -

      Plots data on map projections, with continental and political -boundaries, see basemap -docs.

      -http://matplotlib.org/basemap/_images/contour1.png -
      -
      -

      Cartopy (Not distributed with matplotlib)

      -

      An alternative mapping library written for matplotlib v1.2 and beyond. -Cartopy builds on top of -matplotlib to provide object oriented map projection definitions and close -integration with Shapely for powerful yet easy-to-use vector data processing -tools. An example plot from the -Cartopy gallery:

      -http://scitools.org.uk/cartopy/docs/latest/_images/hurricane_katrina_01_00.png -
      -
      -

      GTK Tools

      -

      mpl_toolkits.gtktools provides some utilities for working with GTK. -This toolkit ships with matplotlib, but requires pygtk.

      -
      -
      -

      Excel Tools

      -

      mpl_toolkits.exceltools provides some utilities for working with -Excel. This toolkit ships with matplotlib, but requires -xlwt

      -
      -
      -

      Natgrid (Not distributed with matplotlib)

      -

      mpl_toolkits.natgrid is an interface to natgrid C library for gridding -irregularly spaced data. This requires a separate installation of the -natgrid toolkit from the sourceforge download -page.

      -
      -
      -

      mplot3d

      -

      mpl_toolkits.mplot3d provides some basic 3D plotting (scatter, surf, -line, mesh) tools. Not the fastest or feature complete 3D library out -there, but ships with matplotlib and thus may be a lighter weight -solution for some use cases.

      -_images/contourf3d_demo21.png -
      -
      -

      AxesGrid

      -

      The matplotlib AxesGrid toolkit is a collection of helper classes to -ease displaying multiple images in matplotlib. The AxesGrid toolkit is -distributed with matplotlib source.

      -../_images/demo_axes_grid4.png -
      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/mpl_toolkits/mplot3d/api.html b/dev/mpl_toolkits/mplot3d/api.html deleted file mode 100644 index d16712270c9..00000000000 --- a/dev/mpl_toolkits/mplot3d/api.html +++ /dev/null @@ -1,2498 +0,0 @@ - - - - - - - - mplot3d API — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      Table Of Contents

      - - -

      Previous topic

      -

      mplot3d tutorial

      -

      Next topic

      -

      mplot3d FAQ

      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      mplot3d API

      -
      -

      Contents

      - -
      -
      -

      axes3d

      -
      -

      Note

      -

      Significant effort went into bringing axes3d to feature-parity with -regular axes objects for version 1.1.0. However, more work remains. -Please report any functions that do not behave as expected as a bug. -In addition, help and patches would be greatly appreciated!

      -
      -

      Module containing Axes3D, an object which can plot 3D objects on a -2D matplotlib figure.

      -
      -
      -class mpl_toolkits.mplot3d.axes3d.Axes3D(fig, rect=None, *args, **kwargs)
      -

      Bases: matplotlib.axes.Axes

      -

      3D axes object.

      -
      -
      -add_collection3d(col, zs=0, zdir='z')
      -

      Add a 3D collection object to the plot.

      -

      2D collection types are converted to a 3D version by -modifying the object and adding z coordinate information.

      -
      -
      Supported are:
      -
        -
      • PolyCollection
      • -
      • LineColleciton
      • -
      • PatchCollection
      • -
      -
      -
      -
      - -
      -
      -add_contour_set(cset, extend3d=False, stride=5, zdir='z', offset=None)
      -
      - -
      -
      -add_contourf_set(cset, zdir='z', offset=None)
      -
      - -
      -
      -auto_scale_xyz(X, Y, Z=None, had_data=None)
      -
      - -
      -
      -autoscale(enable=True, axis='both', tight=None)
      -

      Convenience method for simple axis view autoscaling. -See matplotlib.axes.Axes.autoscale() for full explanation. -Note that this function behaves the same, but for all -three axes. Therfore, ‘z’ can be passed for axis, -and ‘both’ applies to all three axes.

      -
      -

      New in version 1.1.0: This function was added, but not tested. Please report any bugs.

      -
      -
      - -
      -
      -autoscale_view(tight=None, scalex=True, scaley=True, scalez=True)
      -

      Autoscale the view limits using the data limits. -See matplotlib.axes.Axes.autoscale_view() for documentation. -Note that this function applies to the 3D axes, and as such -adds the scalez to the function arguments.

      -
      -

      Changed in version 1.1.0: Function signature was changed to better match the 2D version. -tight is now explicitly a kwarg and placed first.

      -
      -
      -

      Changed in version 1.2.1: This is now fully functional.

      -
      -
      - -
      -
      -bar(left, height, zs=0, zdir='z', *args, **kwargs)
      -

      Add 2D bar(s).

      - ---- - - - - - - - - - - - - - - - - - - - -
      ArgumentDescription
      leftThe x coordinates of the left sides of the bars.
      heightThe height of the bars.
      zsZ coordinate of bars, if one value is specified -they will all be placed at the same z.
      zdirWhich direction to use as z (‘x’, ‘y’ or ‘z’) -when plotting a 2D set.
      -

      Keyword arguments are passed onto bar().

      -

      Returns a Patch3DCollection

      -
      - -
      -
      -bar3d(x, y, z, dx, dy, dz, color='b', zsort='average', *args, **kwargs)
      -

      Generate a 3D bar, or multiple bars.

      -

      When generating multiple bars, x, y, z have to be arrays. -dx, dy, dz can be arrays or scalars.

      -

      color can be:

      -
      -
        -
      • A single color value, to color all bars the same color.
      • -
      • An array of colors of length N bars, to color each bar -independently.
      • -
      • An array of colors of length 6, to color the faces of the -bars similarly.
      • -
      • An array of colors of length 6 * N bars, to color each face -independently.
      • -
      -

      When coloring the faces of the boxes specifically, this is -the order of the coloring:

      -
      -
        -
      1. -Z (bottom of box)
      2. -
      3. +Z (top of box)
      4. -
      5. -Y
      6. -
      7. +Y
      8. -
      9. -X
      10. -
      11. +X
      12. -
      -
      -
      -

      Keyword arguments are passed onto -Poly3DCollection()

      -
      - -
      -
      -can_pan()
      -

      Return True if this axes supports the pan/zoom button functionality.

      -

      3D axes objects do not use the pan/zoom button.

      -
      - -
      -
      -can_zoom()
      -

      Return True if this axes supports the zoom box button functionality.

      -

      3D axes objects do not use the zoom box button.

      -
      - -
      -
      -cla()
      -

      Clear axes

      -
      - -
      -
      -clabel(*args, **kwargs)
      -

      This function is currently not implemented for 3D axes. -Returns None.

      -
      - -
      -
      -contour(X, Y, Z, *args, **kwargs)
      -

      Create a 3D contour plot.

      - ---- - - - - - - - - - - - - - - - - - - - - - - - - - -
      ArgumentDescription
      X, Y,Data values as numpy.arrays
      Z 
      extend3dWhether to extend contour in 3D (default: False)
      strideStride (step size) for extending contour
      zdirThe direction to use: x, y or z (default)
      offsetIf specified plot a projection of the contour -lines on this position in plane normal to zdir
      -

      The positional and other keyword arguments are passed on to -contour()

      -

      Returns a contour

      -
      - -
      -
      -contour3D(X, Y, Z, *args, **kwargs)
      -

      Create a 3D contour plot.

      - ---- - - - - - - - - - - - - - - - - - - - - - - - - - -
      ArgumentDescription
      X, Y,Data values as numpy.arrays
      Z 
      extend3dWhether to extend contour in 3D (default: False)
      strideStride (step size) for extending contour
      zdirThe direction to use: x, y or z (default)
      offsetIf specified plot a projection of the contour -lines on this position in plane normal to zdir
      -

      The positional and other keyword arguments are passed on to -contour()

      -

      Returns a contour

      -
      - -
      -
      -contourf(X, Y, Z, *args, **kwargs)
      -

      Create a 3D contourf plot.

      - ---- - - - - - - - - - - - - - - - - - - - -
      ArgumentDescription
      X, Y,Data values as numpy.arrays
      Z 
      zdirThe direction to use: x, y or z (default)
      offsetIf specified plot a projection of the filled contour -on this position in plane normal to zdir
      -

      The positional and keyword arguments are passed on to -contourf()

      -

      Returns a contourf

      -
      -

      Changed in version 1.1.0: The zdir and offset kwargs were added.

      -
      -
      - -
      -
      -contourf3D(X, Y, Z, *args, **kwargs)
      -

      Create a 3D contourf plot.

      - ---- - - - - - - - - - - - - - - - - - - - -
      ArgumentDescription
      X, Y,Data values as numpy.arrays
      Z 
      zdirThe direction to use: x, y or z (default)
      offsetIf specified plot a projection of the filled contour -on this position in plane normal to zdir
      -

      The positional and keyword arguments are passed on to -contourf()

      -

      Returns a contourf

      -
      -

      Changed in version 1.1.0: The zdir and offset kwargs were added.

      -
      -
      - -
      -
      -convert_zunits(z)
      -

      For artists in an axes, if the zaxis has units support, -convert z using zaxis unit type

      -
      -

      New in version 1.2.1.

      -
      -
      - -
      -
      -disable_mouse_rotation()
      -

      Disable mouse button callbacks.

      -
      - -
      -
      -draw(renderer)
      -
      - -
      -
      -format_coord(xd, yd)
      -

      Given the 2D view coordinates attempt to guess a 3D coordinate. -Looks for the nearest edge to the point and then assumes that -the point is at the same z location as the nearest point on the edge.

      -
      - -
      -
      -format_zdata(z)
      -

      Return z string formatted. This function will use the -fmt_zdata attribute if it is callable, else will fall -back on the zaxis major formatter

      -
      - -
      -
      -get_autoscale_on()
      -

      Get whether autoscaling is applied for all axes on plot commands

      -
      -

      New in version 1.1.0: This function was added, but not tested. Please report any bugs.

      -
      -
      - -
      -
      -get_autoscalez_on()
      -

      Get whether autoscaling for the z-axis is applied on plot commands

      -
      -

      New in version 1.1.0: This function was added, but not tested. Please report any bugs.

      -
      -
      - -
      -
      -get_axis_position()
      -
      - -
      -
      -get_axisbelow()
      -

      Get whether axis below is true or not.

      -

      For axes3d objects, this will always be True

      -
      -

      New in version 1.1.0: This function was added for completeness.

      -
      -
      - -
      -
      -get_children()
      -
      - -
      -
      -get_frame_on()
      -

      Get whether the 3D axes panels are drawn

      -
      -

      New in version 1.1.0.

      -
      -
      - -
      -
      -get_proj()
      -

      Create the projection matrix from the current viewing position.

      -

      elev stores the elevation angle in the z plane -azim stores the azimuth angle in the x,y plane

      -

      dist is the distance of the eye viewing point from the object -point.

      -
      - -
      -
      -get_w_lims()
      -

      Get 3D world limits.

      -
      - -
      -
      -get_xlim()
      -

      Get the x-axis range [left, right]

      -
      -

      Changed in version 1.1.0: This function now correctly refers to the 3D x-limits

      -
      -
      - -
      -
      -get_xlim3d()
      -

      Get the x-axis range [left, right]

      -
      -

      Changed in version 1.1.0: This function now correctly refers to the 3D x-limits

      -
      -
      - -
      -
      -get_ylim()
      -

      Get the y-axis range [bottom, top]

      -
      -

      Changed in version 1.1.0: This function now correctly refers to the 3D y-limits.

      -
      -
      - -
      -
      -get_ylim3d()
      -

      Get the y-axis range [bottom, top]

      -
      -

      Changed in version 1.1.0: This function now correctly refers to the 3D y-limits.

      -
      -
      - -
      -
      -get_zbound()
      -

      Returns the z-axis numerical bounds where:

      -
      lowerBound < upperBound
      -
      -
      -
      -

      New in version 1.1.0: This function was added, but not tested. Please report any bugs.

      -
      -
      - -
      -
      -get_zlabel()
      -

      Get the z-label text string.

      -
      -

      New in version 1.1.0: This function was added, but not tested. Please report any bugs.

      -
      -
      - -
      -
      -get_zlim()
      -

      Get 3D z limits.

      -
      - -
      -
      -get_zlim3d()
      -

      Get 3D z limits.

      -
      - -
      -
      -get_zmajorticklabels()
      -

      Get the ztick labels as a list of Text instances

      -
      -

      New in version 1.1.0.

      -
      -
      - -
      -
      -get_zminorticklabels()
      -

      Get the ztick labels as a list of Text instances

      -
      -

      Note

      -

      Minor ticks are not supported. This function was added -only for completeness.

      -
      -
      -

      New in version 1.1.0.

      -
      -
      - -
      -
      -get_zscale()
      -
      - -
      -
      -get_zticklabels(minor=False)
      -

      Get ztick labels as a list of Text instances. -See matplotlib.axes.Axes.get_yticklabels() for more details.

      -
      -

      Note

      -

      Minor ticks are not supported.

      -
      -
      -

      New in version 1.1.0.

      -
      -
      - -
      -
      -get_zticklines()
      -

      Get ztick lines as a list of Line2D instances. -Note that this function is provided merely for completeness. -These lines are re-calculated as the display changes.

      -
      -

      New in version 1.1.0.

      -
      -
      - -
      -
      -get_zticks(minor=False)
      -

      Return the z ticks as a list of locations -See matplotlib.axes.Axes.get_yticks() for more details.

      -
      -

      Note

      -

      Minor ticks are not supported.

      -
      -
      -

      New in version 1.1.0.

      -
      -
      - -
      -
      -grid(b=True, **kwargs)
      -

      Set / unset 3D grid.

      -
      -

      Note

      -

      Currently, this function does not behave the same as -matplotlib.axes.Axes.grid(), but it is intended to -eventually support that behavior.

      -
      -
      -

      Changed in version 1.1.0: This function was changed, but not tested. Please report any bugs.

      -
      -
      - -
      -
      -have_units()
      -

      Return True if units are set on the x, y, or z axes

      -
      - -
      -
      -invert_zaxis()
      -

      Invert the z-axis.

      -
      -

      New in version 1.1.0: This function was added, but not tested. Please report any bugs.

      -
      -
      - -
      -
      -locator_params(axis='both', tight=None, **kwargs)
      -

      Convenience method for controlling tick locators.

      -

      See matplotlib.axes.Axes.locator_params() for full -documentation Note that this is for Axes3D objects, -therefore, setting axis to ‘both’ will result in the -parameters being set for all three axes. Also, axis -can also take a value of ‘z’ to apply parameters to the -z axis.

      -
      -

      New in version 1.1.0: This function was added, but not tested. Please report any bugs.

      -
      -
      - -
      -
      -margins(*args, **kw)
      -

      Convenience method to set or retrieve autoscaling margins.

      -
      -
      signatures::
      -
      margins()
      -
      -

      returns xmargin, ymargin, zmargin

      -
      margins(margin)
      -
      -margins(xmargin, ymargin, zmargin)
      -
      -margins(x=xmargin, y=ymargin, z=zmargin)
      -
      -margins(..., tight=False)
      -
      -
      -

      All forms above set the xmargin, ymargin and zmargin -parameters. All keyword parameters are optional. A single argument -specifies xmargin, ymargin and zmargin. The tight parameter -is passed to autoscale_view(), which is executed after -a margin is changed; the default here is True, on the -assumption that when margins are specified, no additional -padding to match tick marks is usually desired. Setting -tight to None will preserve the previous setting.

      -

      Specifying any margin changes only the autoscaling; for example, -if xmargin is not None, then xmargin times the X data -interval will be added to each end of that interval before -it is used in autoscaling.

      -
      -

      New in version 1.1.0: This function was added, but not tested. Please report any bugs.

      -
      -
      - -
      -
      -mouse_init(rotate_btn=1, zoom_btn=3)
      -

      Initializes mouse button callbacks to enable 3D rotation of -the axes. Also optionally sets the mouse buttons for 3D rotation -and zooming.

      - ---- - - - - - - - - - - - - - -
      ArgumentDescription
      rotate_btnThe integer or list of integers specifying which mouse -button or buttons to use for 3D rotation of the axes. -Default = 1.
      zoom_btnThe integer or list of integers specifying which mouse -button or buttons to use to zoom the 3D axes. -Default = 3.
      -
      - -
      -
      -name = '3d'
      -
      - -
      -
      -plot(xs, ys, *args, **kwargs)
      -

      Plot 2D or 3D data.

      - ---- - - - - - - - - - - - - - - - - -
      ArgumentDescription
      xs, ysX, y coordinates of vertices
      zsz value(s), either one for all points or one for -each point.
      zdirWhich direction to use as z (‘x’, ‘y’ or ‘z’) -when plotting a 2D set.
      -

      Other arguments are passed on to -plot()

      -
      - -
      -
      -plot3D(xs, ys, *args, **kwargs)
      -

      Plot 2D or 3D data.

      - ---- - - - - - - - - - - - - - - - - -
      ArgumentDescription
      xs, ysX, y coordinates of vertices
      zsz value(s), either one for all points or one for -each point.
      zdirWhich direction to use as z (‘x’, ‘y’ or ‘z’) -when plotting a 2D set.
      -

      Other arguments are passed on to -plot()

      -
      - -
      -
      -plot_surface(X, Y, Z, *args, **kwargs)
      -

      Create a surface plot.

      -

      By default it will be colored in shades of a solid color, -but it also supports color mapping by supplying the cmap -argument.

      - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      ArgumentDescription
      X, Y, ZData values as 2D arrays
      rstrideArray row stride (step size)
      cstrideArray column stride (step size)
      colorColor of the surface patches
      cmapA colormap for the surface patches.
      facecolorsFace colors for the individual patches
      normAn instance of Normalize to map values to colors
      vminMinimum value to map
      vmaxMaximum value to map
      shadeWhether to shade the facecolors
      -

      Other arguments are passed on to -Poly3DCollection

      -
      - -
      -
      -plot_trisurf(*args, **kwargs)
      -
      ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      ArgumentDescription
      X, Y, ZData values as 1D arrays
      colorColor of the surface patches
      cmapA colormap for the surface patches.
      normAn instance of Normalize to map values to colors
      vminMinimum value to map
      vmaxMaximum value to map
      shadeWhether to shade the facecolors
      -

      The (optional) triangulation can be specified in one of two ways; -either:

      -
      plot_trisurf(triangulation, ...)
      -
      -
      -

      where triangulation is a Triangulation -object, or:

      -
      plot_trisurf(X, Y, ...)
      -plot_trisurf(X, Y, triangles, ...)
      -plot_trisurf(X, Y, triangles=triangles, ...)
      -
      -
      -

      in which case a Triangulation object will be created. See -Triangulation for a explanation of -these possibilities.

      -

      The remaining arguments are:

      -
      plot_trisurf(..., Z)
      -
      -
      -

      where Z is the array of values to contour, one per point -in the triangulation.

      -

      Other arguments are passed on to -Poly3DCollection

      -

      Examples:

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/trisurf3d_demo1.png -
      -

      (Source code)

      -
      -../../_images/trisurf3d_demo2_001.png -

      (png, hires.png, pdf)

      -
      -
      -../../_images/trisurf3d_demo2_011.png -

      (png, hires.png, pdf)

      -
      -
      -

      New in version 1.2.0: This plotting function was added for the v1.2.0 release.

      -
      -
      - -
      -
      -plot_wireframe(X, Y, Z, *args, **kwargs)
      -

      Plot a 3D wireframe.

      - ---- - - - - - - - - - - - - - - - - - - - -
      ArgumentDescription
      X, Y,Data values as 2D arrays
      Z 
      rstrideArray row stride (step size)
      cstrideArray column stride (step size)
      -

      Keyword arguments are passed on to -LineCollection.

      -

      Returns a Line3DCollection

      -
      - -
      -
      -scatter(xs, ys, zs=0, zdir='z', s=20, c='b', *args, **kwargs)
      -

      Create a scatter plot.

      - ---- - - - - - - - - - - - - - - - - - - - - - - -
      ArgumentDescription
      xs, ysPositions of data points.
      zsEither an array of the same length as xs and -ys or a single value to place all points in -the same plane. Default is 0.
      zdirWhich direction to use as z (‘x’, ‘y’ or ‘z’) -when plotting a 2D set.
      ssize in points^2. It is a scalar or an array of the same -length as x and y.
      ca color. c can be a single color format string, or a -sequence of color specifications of length N, or a -sequence of N numbers to be mapped to colors using the -cmap and norm specified via kwargs (see below). Note -that c should not be a single numeric RGB or RGBA -sequence because that is indistinguishable from an array -of values to be colormapped. c can be a 2-D array in -which the rows are RGB or RGBA, however.
      -

      Keyword arguments are passed on to -scatter().

      -

      Returns a Patch3DCollection

      -
      - -
      -
      -scatter3D(xs, ys, zs=0, zdir='z', s=20, c='b', *args, **kwargs)
      -

      Create a scatter plot.

      - ---- - - - - - - - - - - - - - - - - - - - - - - -
      ArgumentDescription
      xs, ysPositions of data points.
      zsEither an array of the same length as xs and -ys or a single value to place all points in -the same plane. Default is 0.
      zdirWhich direction to use as z (‘x’, ‘y’ or ‘z’) -when plotting a 2D set.
      ssize in points^2. It is a scalar or an array of the same -length as x and y.
      ca color. c can be a single color format string, or a -sequence of color specifications of length N, or a -sequence of N numbers to be mapped to colors using the -cmap and norm specified via kwargs (see below). Note -that c should not be a single numeric RGB or RGBA -sequence because that is indistinguishable from an array -of values to be colormapped. c can be a 2-D array in -which the rows are RGB or RGBA, however.
      -

      Keyword arguments are passed on to -scatter().

      -

      Returns a Patch3DCollection

      -
      - -
      -
      -set_autoscale_on(b)
      -

      Set whether autoscaling is applied on plot commands

      -

      accepts: [ True | False ]

      -
      -

      New in version 1.1.0: This function was added, but not tested. Please report any bugs.

      -
      -
      - -
      -
      -set_autoscalez_on(b)
      -

      Set whether autoscaling for the z-axis is applied on plot commands

      -

      accepts: [ True | False ]

      -
      -

      New in version 1.1.0: This function was added, but not tested. Please report any bugs.

      -
      -
      - -
      -
      -set_axis_off()
      -
      - -
      -
      -set_axis_on()
      -
      - -
      -
      -set_axisbelow(b)
      -

      Set whether the axis ticks and gridlines are above or below -most artists

      -

      For axes3d objects, this will ignore any settings and just use True

      -

      ACCEPTS: [ True | False ]

      -
      -

      New in version 1.1.0: This function was added for completeness.

      -
      -
      - -
      -
      -set_frame_on(b)
      -

      Set whether the 3D axes panels are drawn

      -

      ACCEPTS: [ True | False ]

      -
      -

      New in version 1.1.0.

      -
      -
      - -
      -
      -set_title(label, fontdict=None, loc='center', **kwargs)
      -

      Set a title for the axes.

      -

      Set one of the three available axes titles. The available titles -are positioned above the axes in the center, flush with the left -edge, and flush with the right edge.

      - --- - - - - - - - - -
      Parameters :

      label : str

      -
      -

      Text to use for the title

      -
      -

      fontdict : dict

      -
      -

      A dictionary controlling the appearance of the title text, -the default fontdict is: -{‘fontsize’: rcParams[‘axes.titlesize’],

      -
      -

      ‘verticalalignment’: ‘baseline’, -‘horizontalalignment’: loc}

      -
      -
      -

      loc : {‘center’, ‘left’, ‘right’}, str, optional

      -
      -

      Which title to set, defaults to ‘center’

      -
      -
      Returns :

      text : Text

      -
      -

      The matplotlib text instance representing the title

      -
      -
      Other Parameters:
       

      Other keyword arguments are text properties, see :

      -

      :class:`~matplotlib.text.Text` for a list of valid text :

      -

      properties. :

      -
      -
      - -
      -
      -set_top_view()
      -
      - -
      -
      -set_xlim(left=None, right=None, emit=True, auto=False, **kw)
      -

      Set 3D x limits.

      -

      See matplotlib.axes.Axes.set_xlim() for full documentation.

      -
      - -
      -
      -set_xlim3d(left=None, right=None, emit=True, auto=False, **kw)
      -

      Set 3D x limits.

      -

      See matplotlib.axes.Axes.set_xlim() for full documentation.

      -
      - -
      -
      -set_xscale(value, **kwargs)
      -

      Call signature:

      -
      set_xscale(value)
      -
      -
      -

      Set the scaling of the x-axis: ‘linear’ | ‘log’ | ‘symlog’

      -

      ACCEPTS: [‘linear’ | ‘log’ | ‘symlog’]

      -

      Different kwargs are accepted, depending on the scale: -‘linear’

      -
      -

      ‘log’

      -
      -
      -
      basex/basey:
      -
      The base of the logarithm
      -
      nonposx/nonposy: [‘mask’ | ‘clip’ ]
      -
      non-positive values in x or y can be masked as -invalid, or clipped to a very small positive number
      -
      subsx/subsy:
      -

      Where to place the subticks between each major tick. -Should be a sequence of integers. For example, in a log10 -scale: [2, 3, 4, 5, 6, 7, 8, 9]

      -

      will place 8 logarithmically spaced minor ticks between -each major tick.

      -
      -
      -
      -

      ‘symlog’

      -
      -
      -
      basex/basey:
      -
      The base of the logarithm
      -
      linthreshx/linthreshy:
      -
      The range (-x, x) within which the plot is linear (to -avoid having the plot go to infinity around zero).
      -
      subsx/subsy:
      -

      Where to place the subticks between each major tick. -Should be a sequence of integers. For example, in a log10 -scale: [2, 3, 4, 5, 6, 7, 8, 9]

      -

      will place 8 logarithmically spaced minor ticks between -each major tick.

      -
      -
      linscalex/linscaley:
      -
      This allows the linear range (-linthresh to linthresh) -to be stretched relative to the logarithmic range. Its -value is the number of decades to use for each half of the -linear range. For example, when linscale == 1.0 (the -default), the space used for the positive and negative -halves of the linear range will be equal to one decade in -the logarithmic range.
      -
      -
      -

      New in version 1.1.0: This function was added, but not tested. Please report any bugs.

      -
      -
      -
      -
      - -
      -
      -set_ylim(bottom=None, top=None, emit=True, auto=False, **kw)
      -

      Set 3D y limits.

      -

      See matplotlib.axes.Axes.set_ylim() for full documentation.

      -
      - -
      -
      -set_ylim3d(bottom=None, top=None, emit=True, auto=False, **kw)
      -

      Set 3D y limits.

      -

      See matplotlib.axes.Axes.set_ylim() for full documentation.

      -
      - -
      -
      -set_yscale(value, **kwargs)
      -

      Call signature:

      -
      set_yscale(value)
      -
      -
      -

      Set the scaling of the y-axis: ‘linear’ | ‘log’ | ‘symlog’

      -

      ACCEPTS: [‘linear’ | ‘log’ | ‘symlog’]

      -

      Different kwargs are accepted, depending on the scale: -‘linear’

      -
      -

      ‘log’

      -
      -
      -
      basex/basey:
      -
      The base of the logarithm
      -
      nonposx/nonposy: [‘mask’ | ‘clip’ ]
      -
      non-positive values in x or y can be masked as -invalid, or clipped to a very small positive number
      -
      subsx/subsy:
      -

      Where to place the subticks between each major tick. -Should be a sequence of integers. For example, in a log10 -scale: [2, 3, 4, 5, 6, 7, 8, 9]

      -

      will place 8 logarithmically spaced minor ticks between -each major tick.

      -
      -
      -
      -

      ‘symlog’

      -
      -
      -
      basex/basey:
      -
      The base of the logarithm
      -
      linthreshx/linthreshy:
      -
      The range (-x, x) within which the plot is linear (to -avoid having the plot go to infinity around zero).
      -
      subsx/subsy:
      -

      Where to place the subticks between each major tick. -Should be a sequence of integers. For example, in a log10 -scale: [2, 3, 4, 5, 6, 7, 8, 9]

      -

      will place 8 logarithmically spaced minor ticks between -each major tick.

      -
      -
      linscalex/linscaley:
      -
      This allows the linear range (-linthresh to linthresh) -to be stretched relative to the logarithmic range. Its -value is the number of decades to use for each half of the -linear range. For example, when linscale == 1.0 (the -default), the space used for the positive and negative -halves of the linear range will be equal to one decade in -the logarithmic range.
      -
      -
      -

      New in version 1.1.0: This function was added, but not tested. Please report any bugs.

      -
      -
      -
      -
      - -
      -
      -set_zbound(lower=None, upper=None)
      -

      Set the lower and upper numerical bounds of the z-axis. -This method will honor axes inversion regardless of parameter order. -It will not change the _autoscaleZon attribute.

      -
      -

      New in version 1.1.0: This function was added, but not tested. Please report any bugs.

      -
      -
      - -
      -
      -set_zlabel(zlabel, fontdict=None, labelpad=None, **kwargs)
      -

      Set zlabel. See doc for set_ylabel() for description.

      -
      -

      Note

      -

      Currently, labelpad does not have an effect on the labels.

      -
      -
      - -
      -
      -set_zlim(bottom=None, top=None, emit=True, auto=False, **kw)
      -

      Set 3D z limits.

      -

      See matplotlib.axes.Axes.set_ylim() for full documentation

      -
      - -
      -
      -set_zlim3d(bottom=None, top=None, emit=True, auto=False, **kw)
      -

      Set 3D z limits.

      -

      See matplotlib.axes.Axes.set_ylim() for full documentation

      -
      - -
      -
      -set_zmargin(m)
      -

      Set padding of Z data limits prior to autoscaling.

      -

      m times the data interval will be added to each -end of that interval before it is used in autoscaling.

      -

      accepts: float in range 0 to 1

      -
      -

      New in version 1.1.0: This function was added, but not tested. Please report any bugs.

      -
      -
      - -
      -
      -set_zscale(value, **kwargs)
      -

      call signature:

      -
      set_zscale(value)
      -
      -
      -

      Set the scaling of the z-axis: ‘linear’ | ‘log’ | ‘symlog’

      -

      ACCEPTS: [‘linear’ | ‘log’ | ‘symlog’]

      -

      Different kwargs are accepted, depending on the scale: -‘linear’

      -
      -

      ‘log’

      -
      -
      -
      basex/basey:
      -
      The base of the logarithm
      -
      nonposx/nonposy: [‘mask’ | ‘clip’ ]
      -
      non-positive values in x or y can be masked as -invalid, or clipped to a very small positive number
      -
      subsx/subsy:
      -

      Where to place the subticks between each major tick. -Should be a sequence of integers. For example, in a log10 -scale: [2, 3, 4, 5, 6, 7, 8, 9]

      -

      will place 8 logarithmically spaced minor ticks between -each major tick.

      -
      -
      -
      -

      ‘symlog’

      -
      -
      -
      basex/basey:
      -
      The base of the logarithm
      -
      linthreshx/linthreshy:
      -
      The range (-x, x) within which the plot is linear (to -avoid having the plot go to infinity around zero).
      -
      subsx/subsy:
      -

      Where to place the subticks between each major tick. -Should be a sequence of integers. For example, in a log10 -scale: [2, 3, 4, 5, 6, 7, 8, 9]

      -

      will place 8 logarithmically spaced minor ticks between -each major tick.

      -
      -
      linscalex/linscaley:
      -
      This allows the linear range (-linthresh to linthresh) -to be stretched relative to the logarithmic range. Its -value is the number of decades to use for each half of the -linear range. For example, when linscale == 1.0 (the -default), the space used for the positive and negative -halves of the linear range will be equal to one decade in -the logarithmic range.
      -
      -
      -
      -
      -

      Note

      -

      Currently, Axes3D objects only supports linear scales. -Other scales may or may not work, and support for these -is improving with each release.

      -
      -
      -

      New in version 1.1.0: This function was added, but not tested. Please report any bugs.

      -
      -
      - -
      -
      -set_zticklabels(*args, **kwargs)
      -

      Set z-axis tick labels. -See matplotlib.axes.Axes.set_yticklabels() for more details.

      -
      -

      Note

      -

      Minor ticks are not supported by Axes3D objects.

      -
      -
      -

      New in version 1.1.0.

      -
      -
      - -
      -
      -set_zticks(*args, **kwargs)
      -

      Set z-axis tick locations. -See matplotlib.axes.Axes.set_yticks() for more details.

      -
      -

      Note

      -

      Minor ticks are not supported.

      -
      -
      -

      New in version 1.1.0.

      -
      -
      - -
      -
      -text(x, y, z, s, zdir=None, **kwargs)
      -

      Add text to the plot. kwargs will be passed on to Axes.text, -except for the zdir keyword, which sets the direction to be -used as the z direction.

      -
      - -
      -
      -text2D(x, y, s, fontdict=None, withdash=False, **kwargs)
      -

      Add text to the axes.

      -

      Add text in string s to axis at location x, y, data -coordinates.

      - --- - - - - - - -
      Parameters :

      s : string

      -
      -

      text

      -
      -

      x, y : scalars

      -
      -

      data coordinates

      -
      -

      fontdict : dictionary, optional, default: None

      -
      -

      A dictionary to override the default text properties. If fontdict -is None, the defaults are determined by your rc parameters.

      -
      -

      withdash : boolean, optional, default: False

      -
      -

      Creates a TextWithDash instance instead of a -Text instance.

      -
      -
      Other Parameters:
       

      kwargs : Text properties.

      -
      -

      Examples

      -

      Individual keyword arguments can be used to override any given -parameter:

      -
      >>> text(x, y, s, fontsize=12)
      -
      -
      -

      The default transform specifies that text is in data coords, -alternatively, you can specify text in axis coords (0,0 is -lower-left and 1,1 is upper-right). The example below places -text in the center of the axes:

      -
      >>> text(0.5, 0.5,'matplotlib', horizontalalignment='center',
      ->>>      verticalalignment='center',
      ->>>      transform = ax.transAxes)
      -
      -
      -

      You can put a rectangular box around the text instance (e.g., to -set a background color) by using the keyword bbox. bbox is -a dictionary of Rectangle -properties. For example:

      -
      >>> text(x, y, s, bbox=dict(facecolor='red', alpha=0.5))
      -
      -
      -
      - -
      -
      -text3D(x, y, z, s, zdir=None, **kwargs)
      -

      Add text to the plot. kwargs will be passed on to Axes.text, -except for the zdir keyword, which sets the direction to be -used as the z direction.

      -
      - -
      -
      -tick_params(axis='both', **kwargs)
      -

      Convenience method for changing the appearance of ticks and -tick labels.

      -

      See matplotlib.axes.Axes.tick_params() for more complete -documentation.

      -

      The only difference is that setting axis to ‘both’ will -mean that the settings are applied to all three axes. Also, -the axis parameter also accepts a value of ‘z’, which -would mean to apply to only the z-axis.

      -

      Also, because of how Axes3D objects are drawn very differently -from regular 2D axes, some of these settings may have -ambiguous meaning. For simplicity, the ‘z’ axis will -accept settings as if it was like the ‘y’ axis.

      -
      -

      Note

      -

      While this function is currently implemented, the core part -of the Axes3D object may ignore some of these settings. -Future releases will fix this. Priority will be given to -those who file bugs.

      -
      -
      -

      New in version 1.1.0: This function was added, but not tested. Please report any bugs.

      -
      -
      - -
      -
      -ticklabel_format(**kwargs)
      -

      Convenience method for manipulating the ScalarFormatter -used by default for linear axes in Axed3D objects.

      -

      See matplotlib.axes.Axes.ticklabel_format() for full -documentation. Note that this version applies to all three -axes of the Axes3D object. Therefore, the axis argument -will also accept a value of ‘z’ and the value of ‘both’ will -apply to all three axes.

      -
      -

      New in version 1.1.0: This function was added, but not tested. Please report any bugs.

      -
      -
      - -
      -
      -tricontour(X, Y, Z, *args, **kwargs)
      -

      Create a 3D contour plot.

      - ---- - - - - - - - - - - - - - - - - - - - - - - - - - -
      ArgumentDescription
      X, Y,Data values as numpy.arrays
      Z 
      extend3dWhether to extend contour in 3D (default: False)
      strideStride (step size) for extending contour
      zdirThe direction to use: x, y or z (default)
      offsetIf specified plot a projection of the contour -lines on this position in plane normal to zdir
      -

      Other keyword arguments are passed on to -tricontour()

      -

      Returns a contour

      -
      -

      New in version 1.1.0.

      -
      -
      - -
      -
      -tricontourf(X, Y, Z, offset=None, zdir='z', *args, **kwargs)
      -

      Create a 3D contourf plot.

      - ---- - - - - - - - - - - - - - - - - - - - -
      ArgumentDescription
      X, Y,Data values as numpy.arrays
      Z 
      zdirThe direction to use: x, y or z (default)
      offsetIf specified plot a projection of the contour -lines on this position in plane normal to zdir
      -

      Other keyword arguments are passed on to -tricontour()

      -

      Returns a contour

      -
      -

      New in version 1.1.0.

      -
      -
      - -
      -
      -tunit_cube(vals=None, M=None)
      -
      - -
      -
      -tunit_edges(vals=None, M=None)
      -
      - -
      -
      -unit_cube(vals=None)
      -
      - -
      -
      -update_datalim(xys, **kwargs)
      -
      - -
      -
      -view_init(elev=None, azim=None)
      -

      Set the elevation and azimuth of the axes.

      -

      This can be used to rotate the axes programatically.

      -

      ‘elev’ stores the elevation angle in the z plane. -‘azim’ stores the azimuth angle in the x,y plane.

      -

      if elev or azim are None (default), then the initial value -is used which was specified in the Axes3D constructor.

      -
      - -
      -
      -zaxis_date(tz=None)
      -

      Sets up z-axis ticks and labels that treat the z data as dates.

      -

      tz is a timezone string or tzinfo instance. -Defaults to rc value.

      -
      -

      Note

      -

      This function is merely provided for completeness. -Axes3D objects do not officially support dates for ticks, -and so this may or may not work as expected.

      -
      -
      -

      New in version 1.1.0: This function was added, but not tested. Please report any bugs.

      -
      -
      - -
      -
      -zaxis_inverted()
      -

      Returns True if the z-axis is inverted.

      -
      -

      New in version 1.1.0: This function was added, but not tested. Please report any bugs.

      -
      -
      - -
      - -
      -
      -mpl_toolkits.mplot3d.axes3d.get_test_data(delta=0.05)
      -

      Return a tuple X, Y, Z with a test data set.

      -
      - -
      -
      -mpl_toolkits.mplot3d.axes3d.unit_bbox()
      -
      - -
      -
      -

      axis3d

      -
      -

      Note

      -

      Historically, axis3d has suffered from having hard-coded constants -controlling the look and feel of the 3D plot. This precluded user -level adjustments such as label spacing, font colors and panel colors. -For version 1.1.0, these constants have been consolidated into a single -private member dictionary, self._axinfo, for the axis object. This is -intended only as a stop-gap measure to allow user-level customization, -but it is not intended to be permanent.

      -
      -
      -
      -class mpl_toolkits.mplot3d.axis3d.Axis(adir, v_intervalx, d_intervalx, axes, *args, **kwargs)
      -

      Bases: matplotlib.axis.XAxis

      -
      -
      -draw(renderer)
      -
      - -
      -
      -draw_pane(renderer)
      -
      - -
      -
      -get_major_ticks(numticks=None)
      -
      - -
      -
      -get_rotate_label(text)
      -
      - -
      -
      -get_tick_positions()
      -
      - -
      -
      -get_tightbbox(renderer)
      -
      - -
      -
      -get_view_interval()
      -

      return the Interval instance for this 3d axis view limits

      -
      - -
      -
      -init3d()
      -
      - -
      -
      -set_pane_color(color)
      -

      Set pane color to a RGBA tuple

      -
      - -
      -
      -set_pane_pos(xys)
      -
      - -
      -
      -set_rotate_label(val)
      -

      Whether to rotate the axis label: True, False or None. -If set to None the label will be rotated if longer than 4 chars.

      -
      - -
      -
      -set_view_interval(vmin, vmax, ignore=False)
      -
      - -
      - -
      -
      -class mpl_toolkits.mplot3d.axis3d.XAxis(adir, v_intervalx, d_intervalx, axes, *args, **kwargs)
      -

      Bases: mpl_toolkits.mplot3d.axis3d.Axis

      -
      -
      -get_data_interval()
      -

      return the Interval instance for this axis data limits

      -
      - -
      - -
      -
      -class mpl_toolkits.mplot3d.axis3d.YAxis(adir, v_intervalx, d_intervalx, axes, *args, **kwargs)
      -

      Bases: mpl_toolkits.mplot3d.axis3d.Axis

      -
      -
      -get_data_interval()
      -

      return the Interval instance for this axis data limits

      -
      - -
      - -
      -
      -class mpl_toolkits.mplot3d.axis3d.ZAxis(adir, v_intervalx, d_intervalx, axes, *args, **kwargs)
      -

      Bases: mpl_toolkits.mplot3d.axis3d.Axis

      -
      -
      -get_data_interval()
      -

      return the Interval instance for this axis data limits

      -
      - -
      - -
      -
      -mpl_toolkits.mplot3d.axis3d.get_flip_min_max(coord, index, mins, maxs)
      -
      - -
      -
      -mpl_toolkits.mplot3d.axis3d.move_from_center(coord, centers, deltas, axmask=(True, True, True))
      -

      Return a coordinate that is moved by “deltas” away from the center.

      -
      - -
      -
      -mpl_toolkits.mplot3d.axis3d.tick_update_position(tick, tickxs, tickys, labelpos)
      -

      Update tick line and label position and style.

      -
      - -
      -
      -

      art3d

      -

      Module containing 3D artist code and functions to convert 2D -artists into 3D versions which can be added to an Axes3D.

      -
      -
      -class mpl_toolkits.mplot3d.art3d.Line3D(xs, ys, zs, *args, **kwargs)
      -

      Bases: matplotlib.lines.Line2D

      -

      3D line object.

      -

      Keyword arguments are passed onto Line2D().

      -
      -
      -draw(renderer)
      -
      - -
      -
      -set_3d_properties(zs=0, zdir='z')
      -
      - -
      - -
      -
      -class mpl_toolkits.mplot3d.art3d.Line3DCollection(segments, *args, **kwargs)
      -

      Bases: matplotlib.collections.LineCollection

      -

      A collection of 3D lines.

      -

      Keyword arguments are passed onto LineCollection().

      -
      -
      -do_3d_projection(renderer)
      -

      Project the points according to renderer matrix.

      -
      - -
      -
      -draw(renderer, project=False)
      -
      - -
      -
      -set_segments(segments)
      -

      Set 3D segments

      -
      - -
      -
      -set_sort_zpos(val)
      -

      Set the position to use for z-sorting.

      -
      - -
      - -
      -
      -class mpl_toolkits.mplot3d.art3d.Patch3D(*args, **kwargs)
      -

      Bases: matplotlib.patches.Patch

      -

      3D patch object.

      -
      -
      -do_3d_projection(renderer)
      -
      - -
      -
      -draw(renderer)
      -
      - -
      -
      -get_facecolor()
      -
      - -
      -
      -get_path()
      -
      - -
      -
      -set_3d_properties(verts, zs=0, zdir='z')
      -
      - -
      - -
      -
      -class mpl_toolkits.mplot3d.art3d.Patch3DCollection(*args, **kwargs)
      -

      Bases: matplotlib.collections.PatchCollection

      -

      A collection of 3D patches.

      -
      -
      -do_3d_projection(renderer)
      -
      - -
      -
      -draw(renderer)
      -
      - -
      -
      -set_3d_properties(zs, zdir)
      -
      - -
      -
      -set_sort_zpos(val)
      -

      Set the position to use for z-sorting.

      -
      - -
      - -
      -
      -class mpl_toolkits.mplot3d.art3d.PathPatch3D(path, **kwargs)
      -

      Bases: mpl_toolkits.mplot3d.art3d.Patch3D

      -

      3D PathPatch object.

      -
      -
      -do_3d_projection(renderer)
      -
      - -
      -
      -set_3d_properties(path, zs=0, zdir='z')
      -
      - -
      - -
      -
      -class mpl_toolkits.mplot3d.art3d.Poly3DCollection(verts, *args, **kwargs)
      -

      Bases: matplotlib.collections.PolyCollection

      -

      A collection of 3D polygons.

      -

      Create a Poly3DCollection.

      -

      verts should contain 3D coordinates.

      -

      Keyword arguments: -zsort, see set_zsort for options.

      -

      Note that this class does a bit of magic with the _facecolors -and _edgecolors properties.

      -
      -
      -do_3d_projection(renderer)
      -

      Perform the 3D projection for this object.

      -
      - -
      -
      -draw(renderer)
      -
      - -
      -
      -get_edgecolor()
      -
      - -
      -
      -get_edgecolors()
      -
      - -
      -
      -get_facecolor()
      -
      - -
      -
      -get_facecolors()
      -
      - -
      -
      -get_vector(segments3d)
      -

      Optimize points for projection

      -
      - -
      -
      -set_3d_properties()
      -
      - -
      -
      -set_edgecolor(colors)
      -
      - -
      -
      -set_edgecolors(colors)
      -
      - -
      -
      -set_facecolor(colors)
      -
      - -
      -
      -set_facecolors(colors)
      -
      - -
      -
      -set_sort_zpos(val)
      -

      Set the position to use for z-sorting.

      -
      - -
      -
      -set_verts(verts, closed=True)
      -

      Set 3D vertices.

      -
      - -
      -
      -set_zsort(zsort)
      -
      -
      Set z-sorting behaviour:
      -
      boolean: if True use default ‘average’ -string: ‘average’, ‘min’ or ‘max’
      -
      -
      - -
      - -
      -
      -class mpl_toolkits.mplot3d.art3d.Text3D(x=0, y=0, z=0, text='', zdir='z', **kwargs)
      -

      Bases: matplotlib.text.Text

      -

      Text object with 3D position and (in the future) direction.

      -

      x, y, z Position of text -text Text string to display -zdir Direction of text

      -

      Keyword arguments are passed onto Text().

      -
      -
      -draw(renderer)
      -
      - -
      -
      -set_3d_properties(z=0, zdir='z')
      -
      - -
      - -
      -
      -mpl_toolkits.mplot3d.art3d.get_colors(c, num)
      -

      Stretch the color argument to provide the required number num

      -
      - -
      -
      -mpl_toolkits.mplot3d.art3d.get_dir_vector(zdir)
      -
      - -
      -
      -mpl_toolkits.mplot3d.art3d.get_patch_verts(patch)
      -

      Return a list of vertices for the path of a patch.

      -
      - -
      -
      -mpl_toolkits.mplot3d.art3d.iscolor(c)
      -
      - -
      -
      -mpl_toolkits.mplot3d.art3d.juggle_axes(xs, ys, zs, zdir)
      -

      Reorder coordinates so that 2D xs, ys can be plotted in the plane -orthogonal to zdir. zdir is normally x, y or z. However, if zdir -starts with a ‘-‘ it is interpreted as a compensation for rotate_axes.

      -
      - -
      -
      -mpl_toolkits.mplot3d.art3d.line_2d_to_3d(line, zs=0, zdir='z')
      -

      Convert a 2D line to 3D.

      -
      - -
      -
      -mpl_toolkits.mplot3d.art3d.line_collection_2d_to_3d(col, zs=0, zdir='z')
      -

      Convert a LineCollection to a Line3DCollection object.

      -
      - -
      -
      -mpl_toolkits.mplot3d.art3d.norm_angle(a)
      -

      Return angle between -180 and +180

      -
      - -
      -
      -mpl_toolkits.mplot3d.art3d.norm_text_angle(a)
      -

      Return angle between -90 and +90

      -
      - -
      -
      -mpl_toolkits.mplot3d.art3d.patch_2d_to_3d(patch, z=0, zdir='z')
      -

      Convert a Patch to a Patch3D object.

      -
      - -
      -
      -mpl_toolkits.mplot3d.art3d.patch_collection_2d_to_3d(col, zs=0, zdir='z')
      -

      Convert a PatchCollection to a Patch3DCollection object.

      -
      - -
      -
      -mpl_toolkits.mplot3d.art3d.path_to_3d_segment(path, zs=0, zdir='z')
      -

      Convert a path to a 3D segment.

      -
      - -
      -
      -mpl_toolkits.mplot3d.art3d.pathpatch_2d_to_3d(pathpatch, z=0, zdir='z')
      -

      Convert a PathPatch to a PathPatch3D object.

      -
      - -
      -
      -mpl_toolkits.mplot3d.art3d.paths_to_3d_segments(paths, zs=0, zdir='z')
      -

      Convert paths from a collection object to 3D segments.

      -
      - -
      -
      -mpl_toolkits.mplot3d.art3d.poly_collection_2d_to_3d(col, zs=0, zdir='z')
      -

      Convert a PolyCollection to a Poly3DCollection object.

      -
      - -
      -
      -mpl_toolkits.mplot3d.art3d.rotate_axes(xs, ys, zs, zdir)
      -

      Reorder coordinates so that the axes are rotated with zdir along -the original z axis. Prepending the axis with a ‘-‘ does the -inverse transform, so zdir can be x, -x, y, -y, z or -z

      -
      - -
      -
      -mpl_toolkits.mplot3d.art3d.text_2d_to_3d(obj, z=0, zdir='z')
      -

      Convert a Text to a Text3D object.

      -
      - -
      -
      -mpl_toolkits.mplot3d.art3d.zalpha(colors, zs)
      -

      Modify the alphas of the color list according to depth

      -
      - -
      -
      -

      proj3d

      -

      Various transforms used for by the 3D code

      -
      -
      -mpl_toolkits.mplot3d.proj3d.inv_transform(xs, ys, zs, M)
      -
      - -
      -
      -mpl_toolkits.mplot3d.proj3d.line2d(p0, p1)
      -

      Return 2D equation of line in the form ax+by+c = 0

      -
      - -
      -
      -mpl_toolkits.mplot3d.proj3d.line2d_dist(l, p)
      -

      Distance from line to point -line is a tuple of coefficients a,b,c

      -
      - -
      -
      -mpl_toolkits.mplot3d.proj3d.line2d_seg_dist(p1, p2, p0)
      -

      distance(s) from line defined by p1 - p2 to point(s) p0

      -

      p0[0] = x(s) -p0[1] = y(s)

      -

      intersection point p = p1 + u*(p2-p1) -and intersection point lies within segment if u is between 0 and 1

      -
      - -
      -
      -mpl_toolkits.mplot3d.proj3d.mod(v)
      -

      3d vector length

      -
      - -
      -
      -mpl_toolkits.mplot3d.proj3d.persp_transformation(zfront, zback)
      -
      - -
      -
      -mpl_toolkits.mplot3d.proj3d.proj_points(points, M)
      -
      - -
      -
      -mpl_toolkits.mplot3d.proj3d.proj_trans_clip_points(points, M)
      -
      - -
      -
      -mpl_toolkits.mplot3d.proj3d.proj_trans_points(points, M)
      -
      - -
      -
      -mpl_toolkits.mplot3d.proj3d.proj_transform(xs, ys, zs, M)
      -

      Transform the points by the projection matrix

      -
      - -
      -
      -mpl_toolkits.mplot3d.proj3d.proj_transform_clip(xs, ys, zs, M)
      -

      Transform the points by the projection matrix -and return the clipping result -returns txs,tys,tzs,tis

      -
      - -
      -
      -mpl_toolkits.mplot3d.proj3d.proj_transform_vec(vec, M)
      -
      - -
      -
      -mpl_toolkits.mplot3d.proj3d.proj_transform_vec_clip(vec, M)
      -
      - -
      -
      -mpl_toolkits.mplot3d.proj3d.rot_x(V, alpha)
      -
      - -
      -
      -mpl_toolkits.mplot3d.proj3d.test_lines_dists()
      -
      - -
      -
      -mpl_toolkits.mplot3d.proj3d.test_proj()
      -
      - -
      -
      -mpl_toolkits.mplot3d.proj3d.test_proj_draw_axes(M, s=1)
      -
      - -
      -
      -mpl_toolkits.mplot3d.proj3d.test_proj_make_M(E=None)
      -
      - -
      -
      -mpl_toolkits.mplot3d.proj3d.test_rot()
      -
      - -
      -
      -mpl_toolkits.mplot3d.proj3d.test_world()
      -
      - -
      -
      -mpl_toolkits.mplot3d.proj3d.transform(xs, ys, zs, M)
      -

      Transform the points by the projection matrix

      -
      - -
      -
      -mpl_toolkits.mplot3d.proj3d.vec_pad_ones(xs, ys, zs)
      -
      - -
      -
      -mpl_toolkits.mplot3d.proj3d.view_transformation(E, R, V)
      -
      - -
      -
      -mpl_toolkits.mplot3d.proj3d.world_transformation(xmin, xmax, ymin, ymax, zmin, zmax)
      -
      - -
      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/mpl_toolkits/mplot3d/faq.html b/dev/mpl_toolkits/mplot3d/faq.html deleted file mode 100644 index 54585c79e13..00000000000 --- a/dev/mpl_toolkits/mplot3d/faq.html +++ /dev/null @@ -1,218 +0,0 @@ - - - - - - - - mplot3d FAQ — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      Table Of Contents

      - - -

      Previous topic

      -

      mplot3d API

      -

      Next topic

      -

      The Matplotlib API

      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      mplot3d FAQ

      -
      -

      How is mplot3d different from MayaVi?

      -

      MayaVi2 -is a very powerful and featureful 3D graphing library. For advanced -3D scenes and excellent rendering capabilities, it is highly recomended to -use MayaVi2.

      -

      mplot3d was intended to allow users to create simple 3D graphs with the same -“look-and-feel” as matplotlib’s 2D plots. Furthermore, users can use the same -toolkit that they are already familiar with to generate both their 2D and 3D -plots.

      -
      -
      -

      My 3D plot doesn’t look right at certain viewing angles

      -

      This is probably the most commonly reported issue with mplot3d. The problem -is that – from some viewing angles – a 3D object would appear in front -of another object, even though it is physically behind it. This can result in -plots that do not look “physically correct.”

      -

      Unfortunately, while some work is being done to reduce the occurance of this -artifact, it is currently an intractable problem, and can not be fully solved -until matplotlib supports 3D graphics rendering at its core.

      -

      The problem occurs due to the reduction of 3D data down to 2D + z-order -scalar. A single value represents the 3rd dimension for all parts of 3D -objects in a collection. Therefore, when the bounding boxes of two collections -intersect, it becomes possible for this artifact to occur. Furthermore, the -intersection of two 3D objects (such as polygons or patches) can not be -rendered properly in matplotlib’s 2D rendering engine.

      -

      This problem will likely not be solved until OpenGL support is added to all of -the backends (patches are greatly welcomed). Until then, if you need complex -3D scenes, we recommend using -MayaVi.

      -
      -
      -

      I don’t like how the 3D plot is laid out, how do I change that?

      -

      Historically, mplot3d has suffered from a hard-coding of parameters used -to control visuals such as label spacing, tick length, and grid line width. -Work is being done to eliminate this issue. For matplotlib v1.1.0, there is -a semi-official manner to modify these parameters. See the note in the -axis3d section of the mplot3d API documentation for -more information.

      -
      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/mpl_toolkits/mplot3d/index.html b/dev/mpl_toolkits/mplot3d/index.html deleted file mode 100644 index 5d560ecce14..00000000000 --- a/dev/mpl_toolkits/mplot3d/index.html +++ /dev/null @@ -1,221 +0,0 @@ - - - - - - - - mplot3d — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      Table Of Contents

      - - -

      Previous topic

      -

      mpl_toolkits.axes_grid.axis_artist

      -

      Next topic

      -

      mplot3d tutorial

      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      mplot3d

      -
      -

      Matplotlib mplot3d toolkit

      -

      The mplot3d toolkit adds simple 3D plotting capabilities to matplotlib by -supplying an axes object that can create a 2D projection of a 3D scene. -The resulting graph will have the same look and feel as regular 2D plots.

      -../../_images/demo_mplot3d.png -

      The interactive backends also provide the ability to rotate and zoom -the 3D scene. One can rotate the 3D scene by simply clicking-and-dragging -the scene. Zooming is done by right-clicking the scene and dragging the -mouse up and down. Note that one does not use the zoom button like one -would use for regular 2D plots.

      - -
      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/mpl_toolkits/mplot3d/tutorial.html b/dev/mpl_toolkits/mplot3d/tutorial.html deleted file mode 100644 index b249147648b..00000000000 --- a/dev/mpl_toolkits/mplot3d/tutorial.html +++ /dev/null @@ -1,737 +0,0 @@ - - - - - - - - mplot3d tutorial — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      Table Of Contents

      - - -

      Previous topic

      -

      mplot3d

      -

      Next topic

      -

      mplot3d API

      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      mplot3d tutorial

      - -
      -

      Getting started

      -

      An Axes3D object is created just like any other axes using -the projection=‘3d’ keyword. -Create a new matplotlib.figure.Figure and -add a new axes to it of type Axes3D:

      -
      import matplotlib.pyplot as plt
      -from mpl_toolkits.mplot3d import Axes3D
      -fig = plt.figure()
      -ax = fig.add_subplot(111, projection='3d')
      -
      -
      -
      -

      New in version 1.0.0: This approach is the preferred method of creating a 3D axes.

      -
      -
      -

      Note

      -

      Prior to version 1.0.0, the method of creating a 3D axes was -different. For those using older versions of matplotlib, change -ax = fig.add_subplot(111, projection='3d') -to ax = Axes3D(fig).

      -
      -
      -
      -

      Line plots

      -
      -
      -Axes3D.plot(xs, ys, *args, **kwargs)
      -

      Plot 2D or 3D data.

      - ---- - - - - - - - - - - - - - - - - -
      ArgumentDescription
      xs, ysX, y coordinates of vertices
      zsz value(s), either one for all points or one for -each point.
      zdirWhich direction to use as z (‘x’, ‘y’ or ‘z’) -when plotting a 2D set.
      -

      Other arguments are passed on to -plot()

      -
      - -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/lines3d_demo1.png -
      -
      -
      -

      Scatter plots

      -
      -
      -Axes3D.scatter(xs, ys, zs=0, zdir='z', s=20, c='b', *args, **kwargs)
      -

      Create a scatter plot.

      - ---- - - - - - - - - - - - - - - - - - - - - - - -
      ArgumentDescription
      xs, ysPositions of data points.
      zsEither an array of the same length as xs and -ys or a single value to place all points in -the same plane. Default is 0.
      zdirWhich direction to use as z (‘x’, ‘y’ or ‘z’) -when plotting a 2D set.
      ssize in points^2. It is a scalar or an array of the same -length as x and y.
      ca color. c can be a single color format string, or a -sequence of color specifications of length N, or a -sequence of N numbers to be mapped to colors using the -cmap and norm specified via kwargs (see below). Note -that c should not be a single numeric RGB or RGBA -sequence because that is indistinguishable from an array -of values to be colormapped. c can be a 2-D array in -which the rows are RGB or RGBA, however.
      -

      Keyword arguments are passed on to -scatter().

      -

      Returns a Patch3DCollection

      -
      - -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/scatter3d_demo1.png -
      -
      -
      -

      Wireframe plots

      -
      -
      -Axes3D.plot_wireframe(X, Y, Z, *args, **kwargs)
      -

      Plot a 3D wireframe.

      - ---- - - - - - - - - - - - - - - - - - - - -
      ArgumentDescription
      X, Y,Data values as 2D arrays
      Z 
      rstrideArray row stride (step size)
      cstrideArray column stride (step size)
      -

      Keyword arguments are passed on to -LineCollection.

      -

      Returns a Line3DCollection

      -
      - -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/wire3d_demo1.png -
      -
      -
      -

      Surface plots

      -
      -
      -Axes3D.plot_surface(X, Y, Z, *args, **kwargs)
      -

      Create a surface plot.

      -

      By default it will be colored in shades of a solid color, -but it also supports color mapping by supplying the cmap -argument.

      - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      ArgumentDescription
      X, Y, ZData values as 2D arrays
      rstrideArray row stride (step size)
      cstrideArray column stride (step size)
      colorColor of the surface patches
      cmapA colormap for the surface patches.
      facecolorsFace colors for the individual patches
      normAn instance of Normalize to map values to colors
      vminMinimum value to map
      vmaxMaximum value to map
      shadeWhether to shade the facecolors
      -

      Other arguments are passed on to -Poly3DCollection

      -
      - -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/surface3d_demo1.png -
      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/surface3d_demo21.png -
      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/surface3d_demo3.png -
      -
      -
      -

      Tri-Surface plots

      -
      -
      -Axes3D.plot_trisurf(*args, **kwargs)
      -
      ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      ArgumentDescription
      X, Y, ZData values as 1D arrays
      colorColor of the surface patches
      cmapA colormap for the surface patches.
      normAn instance of Normalize to map values to colors
      vminMinimum value to map
      vmaxMaximum value to map
      shadeWhether to shade the facecolors
      -

      The (optional) triangulation can be specified in one of two ways; -either:

      -
      plot_trisurf(triangulation, ...)
      -
      -
      -

      where triangulation is a Triangulation -object, or:

      -
      plot_trisurf(X, Y, ...)
      -plot_trisurf(X, Y, triangles, ...)
      -plot_trisurf(X, Y, triangles=triangles, ...)
      -
      -
      -

      in which case a Triangulation object will be created. See -Triangulation for a explanation of -these possibilities.

      -

      The remaining arguments are:

      -
      plot_trisurf(..., Z)
      -
      -
      -

      where Z is the array of values to contour, one per point -in the triangulation.

      -

      Other arguments are passed on to -Poly3DCollection

      -

      Examples:

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/trisurf3d_demo1.png -
      -

      (Source code)

      -
      -../../_images/trisurf3d_demo2_001.png -

      (png, hires.png, pdf)

      -
      -
      -../../_images/trisurf3d_demo2_011.png -

      (png, hires.png, pdf)

      -
      -
      -

      New in version 1.2.0: This plotting function was added for the v1.2.0 release.

      -
      -
      - -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/trisurf3d_demo1.png -
      -
      -
      -

      Contour plots

      -
      -
      -Axes3D.contour(X, Y, Z, *args, **kwargs)
      -

      Create a 3D contour plot.

      - ---- - - - - - - - - - - - - - - - - - - - - - - - - - -
      ArgumentDescription
      X, Y,Data values as numpy.arrays
      Z 
      extend3dWhether to extend contour in 3D (default: False)
      strideStride (step size) for extending contour
      zdirThe direction to use: x, y or z (default)
      offsetIf specified plot a projection of the contour -lines on this position in plane normal to zdir
      -

      The positional and other keyword arguments are passed on to -contour()

      -

      Returns a contour

      -
      - -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/contour3d_demo1.png -
      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/contour3d_demo2.png -
      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/contour3d_demo31.png -
      -
      -
      -

      Filled contour plots

      -
      -
      -Axes3D.contourf(X, Y, Z, *args, **kwargs)
      -

      Create a 3D contourf plot.

      - ---- - - - - - - - - - - - - - - - - - - - -
      ArgumentDescription
      X, Y,Data values as numpy.arrays
      Z 
      zdirThe direction to use: x, y or z (default)
      offsetIf specified plot a projection of the filled contour -on this position in plane normal to zdir
      -

      The positional and keyword arguments are passed on to -contourf()

      -

      Returns a contourf

      -
      -

      Changed in version 1.1.0: The zdir and offset kwargs were added.

      -
      -
      - -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/contourf3d_demo1.png -
      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/contourf3d_demo21.png -
      -
      -

      New in version 1.1.0: The feature demoed in the second contourf3d example was enabled as a -result of a bugfix for version 1.1.0.

      -
      -
      -
      -

      Polygon plots

      -
      -
      -Axes3D.add_collection3d(col, zs=0, zdir='z')
      -

      Add a 3D collection object to the plot.

      -

      2D collection types are converted to a 3D version by -modifying the object and adding z coordinate information.

      -
      -
      Supported are:
      -
        -
      • PolyCollection
      • -
      • LineColleciton
      • -
      • PatchCollection
      • -
      -
      -
      -
      - -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/polys3d_demo1.png -
      -
      -
      -

      Bar plots

      -
      -
      -Axes3D.bar(left, height, zs=0, zdir='z', *args, **kwargs)
      -

      Add 2D bar(s).

      - ---- - - - - - - - - - - - - - - - - - - - -
      ArgumentDescription
      leftThe x coordinates of the left sides of the bars.
      heightThe height of the bars.
      zsZ coordinate of bars, if one value is specified -they will all be placed at the same z.
      zdirWhich direction to use as z (‘x’, ‘y’ or ‘z’) -when plotting a 2D set.
      -

      Keyword arguments are passed onto bar().

      -

      Returns a Patch3DCollection

      -
      - -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/bars3d_demo1.png -
      -
      -
      -

      2D plots in 3D

      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/2dcollections3d_demo1.png -
      -
      -
      -

      Text

      -
      -
      -Axes3D.text(x, y, z, s, zdir=None, **kwargs)
      -

      Add text to the plot. kwargs will be passed on to Axes.text, -except for the zdir keyword, which sets the direction to be -used as the z direction.

      -
      - -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/text3d_demo1.png -
      -
      -
      -

      Subplotting

      -

      Having multiple 3D plots in a single figure is the same -as it is for 2D plots. Also, you can have both 2D and 3D plots -in the same figure.

      -
      -

      New in version 1.0.0: Subplotting 3D plots was added in v1.0.0. Earlier version can not -do this.

      -
      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/subplot3d_demo1.png -
      -

      (Source code, png, hires.png, pdf)

      -
      -../../_images/mixed_subplots_demo1.png -
      -
      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/objects.inv b/dev/objects.inv deleted file mode 100644 index 40f55057ab2..00000000000 Binary files a/dev/objects.inv and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/api/thumbnails/artist_demo.png b/dev/plot_directive/mpl_examples/api/thumbnails/artist_demo.png deleted file mode 100644 index 54c5fda1325..00000000000 Binary files a/dev/plot_directive/mpl_examples/api/thumbnails/artist_demo.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/api/thumbnails/barchart_demo.png b/dev/plot_directive/mpl_examples/api/thumbnails/barchart_demo.png deleted file mode 100644 index 7e7ad0300fd..00000000000 Binary files a/dev/plot_directive/mpl_examples/api/thumbnails/barchart_demo.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/api/thumbnails/bbox_intersect.png b/dev/plot_directive/mpl_examples/api/thumbnails/bbox_intersect.png deleted file mode 100644 index 051b1abc64e..00000000000 Binary files a/dev/plot_directive/mpl_examples/api/thumbnails/bbox_intersect.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/api/thumbnails/clippath_demo.png b/dev/plot_directive/mpl_examples/api/thumbnails/clippath_demo.png deleted file mode 100644 index 43dc19b9ef1..00000000000 Binary files a/dev/plot_directive/mpl_examples/api/thumbnails/clippath_demo.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/api/thumbnails/collections_demo.png b/dev/plot_directive/mpl_examples/api/thumbnails/collections_demo.png deleted file mode 100644 index a4d5bf61331..00000000000 Binary files a/dev/plot_directive/mpl_examples/api/thumbnails/collections_demo.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/api/thumbnails/color_cycle.png b/dev/plot_directive/mpl_examples/api/thumbnails/color_cycle.png deleted file mode 100644 index 3daf7478535..00000000000 Binary files a/dev/plot_directive/mpl_examples/api/thumbnails/color_cycle.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/api/thumbnails/colorbar_only.png b/dev/plot_directive/mpl_examples/api/thumbnails/colorbar_only.png deleted file mode 100644 index 47b85b0364a..00000000000 Binary files a/dev/plot_directive/mpl_examples/api/thumbnails/colorbar_only.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/api/thumbnails/compound_path.png b/dev/plot_directive/mpl_examples/api/thumbnails/compound_path.png deleted file mode 100644 index 56112e2f823..00000000000 Binary files a/dev/plot_directive/mpl_examples/api/thumbnails/compound_path.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/api/thumbnails/custom_projection_example.png b/dev/plot_directive/mpl_examples/api/thumbnails/custom_projection_example.png deleted file mode 100644 index 708258b0ca6..00000000000 Binary files a/dev/plot_directive/mpl_examples/api/thumbnails/custom_projection_example.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/api/thumbnails/custom_scale_example.png b/dev/plot_directive/mpl_examples/api/thumbnails/custom_scale_example.png deleted file mode 100644 index 424ac382a4e..00000000000 Binary files a/dev/plot_directive/mpl_examples/api/thumbnails/custom_scale_example.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/api/thumbnails/date_demo.png b/dev/plot_directive/mpl_examples/api/thumbnails/date_demo.png deleted file mode 100644 index 56e53561ae5..00000000000 Binary files a/dev/plot_directive/mpl_examples/api/thumbnails/date_demo.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/api/thumbnails/date_index_formatter_00.png b/dev/plot_directive/mpl_examples/api/thumbnails/date_index_formatter_00.png deleted file mode 100644 index 80c5e3a4cec..00000000000 Binary files a/dev/plot_directive/mpl_examples/api/thumbnails/date_index_formatter_00.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/api/thumbnails/date_index_formatter_01.png b/dev/plot_directive/mpl_examples/api/thumbnails/date_index_formatter_01.png deleted file mode 100644 index 7c90128d911..00000000000 Binary files a/dev/plot_directive/mpl_examples/api/thumbnails/date_index_formatter_01.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/api/thumbnails/demo_affine_image_00_00.png b/dev/plot_directive/mpl_examples/api/thumbnails/demo_affine_image_00_00.png deleted file mode 100644 index ed3f14ff251..00000000000 Binary files a/dev/plot_directive/mpl_examples/api/thumbnails/demo_affine_image_00_00.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/api/thumbnails/donut_demo.png b/dev/plot_directive/mpl_examples/api/thumbnails/donut_demo.png deleted file mode 100644 index 4d7b8100933..00000000000 Binary files a/dev/plot_directive/mpl_examples/api/thumbnails/donut_demo.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/api/thumbnails/engineering_formatter.png b/dev/plot_directive/mpl_examples/api/thumbnails/engineering_formatter.png deleted file mode 100644 index 7ce24a4f7c2..00000000000 Binary files a/dev/plot_directive/mpl_examples/api/thumbnails/engineering_formatter.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/api/thumbnails/fahrenheit_celsius_scales.png b/dev/plot_directive/mpl_examples/api/thumbnails/fahrenheit_celsius_scales.png deleted file mode 100644 index d0f985ded88..00000000000 Binary files a/dev/plot_directive/mpl_examples/api/thumbnails/fahrenheit_celsius_scales.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/api/thumbnails/hinton_demo.png b/dev/plot_directive/mpl_examples/api/thumbnails/hinton_demo.png deleted file mode 100644 index 7b29ce1522e..00000000000 Binary files a/dev/plot_directive/mpl_examples/api/thumbnails/hinton_demo.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/api/thumbnails/histogram_demo.png b/dev/plot_directive/mpl_examples/api/thumbnails/histogram_demo.png deleted file mode 100644 index 80b115a4bfb..00000000000 Binary files a/dev/plot_directive/mpl_examples/api/thumbnails/histogram_demo.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/api/thumbnails/histogram_path_demo.png b/dev/plot_directive/mpl_examples/api/thumbnails/histogram_path_demo.png deleted file mode 100644 index 9674d9587de..00000000000 Binary files a/dev/plot_directive/mpl_examples/api/thumbnails/histogram_path_demo.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/api/thumbnails/image_zcoord.png b/dev/plot_directive/mpl_examples/api/thumbnails/image_zcoord.png deleted file mode 100644 index 45721ef981c..00000000000 Binary files a/dev/plot_directive/mpl_examples/api/thumbnails/image_zcoord.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/api/thumbnails/joinstyle.png b/dev/plot_directive/mpl_examples/api/thumbnails/joinstyle.png deleted file mode 100644 index c159f789010..00000000000 Binary files a/dev/plot_directive/mpl_examples/api/thumbnails/joinstyle.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/api/thumbnails/legend_demo.png b/dev/plot_directive/mpl_examples/api/thumbnails/legend_demo.png deleted file mode 100644 index a4b0be96ba6..00000000000 Binary files a/dev/plot_directive/mpl_examples/api/thumbnails/legend_demo.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/api/thumbnails/line_with_text.png b/dev/plot_directive/mpl_examples/api/thumbnails/line_with_text.png deleted file mode 100644 index eb71a40caa3..00000000000 Binary files a/dev/plot_directive/mpl_examples/api/thumbnails/line_with_text.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/api/thumbnails/logo2.png b/dev/plot_directive/mpl_examples/api/thumbnails/logo2.png deleted file mode 100644 index 832a7f471e5..00000000000 Binary files a/dev/plot_directive/mpl_examples/api/thumbnails/logo2.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/api/thumbnails/mathtext_asarray.png b/dev/plot_directive/mpl_examples/api/thumbnails/mathtext_asarray.png deleted file mode 100644 index ba06684829b..00000000000 Binary files a/dev/plot_directive/mpl_examples/api/thumbnails/mathtext_asarray.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/api/thumbnails/patch_collection.png b/dev/plot_directive/mpl_examples/api/thumbnails/patch_collection.png deleted file mode 100644 index 457bafc5c74..00000000000 Binary files a/dev/plot_directive/mpl_examples/api/thumbnails/patch_collection.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/api/thumbnails/path_patch_demo.png b/dev/plot_directive/mpl_examples/api/thumbnails/path_patch_demo.png deleted file mode 100644 index b870707e0ac..00000000000 Binary files a/dev/plot_directive/mpl_examples/api/thumbnails/path_patch_demo.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/api/thumbnails/quad_bezier.png b/dev/plot_directive/mpl_examples/api/thumbnails/quad_bezier.png deleted file mode 100644 index 930a6106afe..00000000000 Binary files a/dev/plot_directive/mpl_examples/api/thumbnails/quad_bezier.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/api/thumbnails/radar_chart.png b/dev/plot_directive/mpl_examples/api/thumbnails/radar_chart.png deleted file mode 100644 index ff3bbc54c0f..00000000000 Binary files a/dev/plot_directive/mpl_examples/api/thumbnails/radar_chart.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/api/thumbnails/sankey_demo_basics_00.png b/dev/plot_directive/mpl_examples/api/thumbnails/sankey_demo_basics_00.png deleted file mode 100644 index d1e4a7e699c..00000000000 Binary files a/dev/plot_directive/mpl_examples/api/thumbnails/sankey_demo_basics_00.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/api/thumbnails/sankey_demo_basics_01.png b/dev/plot_directive/mpl_examples/api/thumbnails/sankey_demo_basics_01.png deleted file mode 100644 index 570bfba22a1..00000000000 Binary files a/dev/plot_directive/mpl_examples/api/thumbnails/sankey_demo_basics_01.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/api/thumbnails/sankey_demo_basics_02.png b/dev/plot_directive/mpl_examples/api/thumbnails/sankey_demo_basics_02.png deleted file mode 100644 index 9da5de6dce7..00000000000 Binary files a/dev/plot_directive/mpl_examples/api/thumbnails/sankey_demo_basics_02.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/api/thumbnails/sankey_demo_links.png b/dev/plot_directive/mpl_examples/api/thumbnails/sankey_demo_links.png deleted file mode 100644 index cb61bbf512f..00000000000 Binary files a/dev/plot_directive/mpl_examples/api/thumbnails/sankey_demo_links.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/api/thumbnails/sankey_demo_old.png b/dev/plot_directive/mpl_examples/api/thumbnails/sankey_demo_old.png deleted file mode 100644 index 7508e5ea00b..00000000000 Binary files a/dev/plot_directive/mpl_examples/api/thumbnails/sankey_demo_old.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/api/thumbnails/sankey_demo_rankine.png b/dev/plot_directive/mpl_examples/api/thumbnails/sankey_demo_rankine.png deleted file mode 100644 index e4241f7f54a..00000000000 Binary files a/dev/plot_directive/mpl_examples/api/thumbnails/sankey_demo_rankine.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/api/thumbnails/scatter_piecharts.png b/dev/plot_directive/mpl_examples/api/thumbnails/scatter_piecharts.png deleted file mode 100644 index 7e2be91f731..00000000000 Binary files a/dev/plot_directive/mpl_examples/api/thumbnails/scatter_piecharts.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/api/thumbnails/span_regions.png b/dev/plot_directive/mpl_examples/api/thumbnails/span_regions.png deleted file mode 100644 index 4e81aea5f40..00000000000 Binary files a/dev/plot_directive/mpl_examples/api/thumbnails/span_regions.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/api/thumbnails/two_scales.png b/dev/plot_directive/mpl_examples/api/thumbnails/two_scales.png deleted file mode 100644 index f5a97091527..00000000000 Binary files a/dev/plot_directive/mpl_examples/api/thumbnails/two_scales.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/api/thumbnails/unicode_minus.png b/dev/plot_directive/mpl_examples/api/thumbnails/unicode_minus.png deleted file mode 100644 index a464bd4e403..00000000000 Binary files a/dev/plot_directive/mpl_examples/api/thumbnails/unicode_minus.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/api/thumbnails/watermark_image.png b/dev/plot_directive/mpl_examples/api/thumbnails/watermark_image.png deleted file mode 100644 index 4b4d599d485..00000000000 Binary files a/dev/plot_directive/mpl_examples/api/thumbnails/watermark_image.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/api/thumbnails/watermark_text.png b/dev/plot_directive/mpl_examples/api/thumbnails/watermark_text.png deleted file mode 100644 index 8a53b469fbe..00000000000 Binary files a/dev/plot_directive/mpl_examples/api/thumbnails/watermark_text.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/axes_grid/thumbnails/demo_axes_divider_01_00.png b/dev/plot_directive/mpl_examples/axes_grid/thumbnails/demo_axes_divider_01_00.png deleted file mode 100644 index f1d8805fc48..00000000000 Binary files a/dev/plot_directive/mpl_examples/axes_grid/thumbnails/demo_axes_divider_01_00.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/axes_grid/thumbnails/demo_axes_grid.png b/dev/plot_directive/mpl_examples/axes_grid/thumbnails/demo_axes_grid.png deleted file mode 100644 index a5c2e4b8621..00000000000 Binary files a/dev/plot_directive/mpl_examples/axes_grid/thumbnails/demo_axes_grid.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/axes_grid/thumbnails/demo_axes_grid2.png b/dev/plot_directive/mpl_examples/axes_grid/thumbnails/demo_axes_grid2.png deleted file mode 100644 index aaacbe89a71..00000000000 Binary files a/dev/plot_directive/mpl_examples/axes_grid/thumbnails/demo_axes_grid2.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/axes_grid/thumbnails/demo_axes_hbox_divider.png b/dev/plot_directive/mpl_examples/axes_grid/thumbnails/demo_axes_hbox_divider.png deleted file mode 100644 index 79984257775..00000000000 Binary files a/dev/plot_directive/mpl_examples/axes_grid/thumbnails/demo_axes_hbox_divider.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/axes_grid/thumbnails/demo_axes_rgb_00.png b/dev/plot_directive/mpl_examples/axes_grid/thumbnails/demo_axes_rgb_00.png deleted file mode 100644 index 77ceb2990b5..00000000000 Binary files a/dev/plot_directive/mpl_examples/axes_grid/thumbnails/demo_axes_rgb_00.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/axes_grid/thumbnails/demo_axes_rgb_01.png b/dev/plot_directive/mpl_examples/axes_grid/thumbnails/demo_axes_rgb_01.png deleted file mode 100644 index bd6116ab0bf..00000000000 Binary files a/dev/plot_directive/mpl_examples/axes_grid/thumbnails/demo_axes_rgb_01.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/axes_grid/thumbnails/demo_axisline_style.png b/dev/plot_directive/mpl_examples/axes_grid/thumbnails/demo_axisline_style.png deleted file mode 100644 index 1ec00767f4a..00000000000 Binary files a/dev/plot_directive/mpl_examples/axes_grid/thumbnails/demo_axisline_style.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/axes_grid/thumbnails/demo_colorbar_with_inset_locator.png b/dev/plot_directive/mpl_examples/axes_grid/thumbnails/demo_colorbar_with_inset_locator.png deleted file mode 100644 index 0267dfc113a..00000000000 Binary files a/dev/plot_directive/mpl_examples/axes_grid/thumbnails/demo_colorbar_with_inset_locator.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/axes_grid/thumbnails/demo_curvelinear_grid.png b/dev/plot_directive/mpl_examples/axes_grid/thumbnails/demo_curvelinear_grid.png deleted file mode 100644 index 1a486973772..00000000000 Binary files a/dev/plot_directive/mpl_examples/axes_grid/thumbnails/demo_curvelinear_grid.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/axes_grid/thumbnails/demo_curvelinear_grid2.png b/dev/plot_directive/mpl_examples/axes_grid/thumbnails/demo_curvelinear_grid2.png deleted file mode 100644 index 084e6f7b1fb..00000000000 Binary files a/dev/plot_directive/mpl_examples/axes_grid/thumbnails/demo_curvelinear_grid2.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/axes_grid/thumbnails/demo_edge_colorbar.png b/dev/plot_directive/mpl_examples/axes_grid/thumbnails/demo_edge_colorbar.png deleted file mode 100644 index c47214d0363..00000000000 Binary files a/dev/plot_directive/mpl_examples/axes_grid/thumbnails/demo_edge_colorbar.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/axes_grid/thumbnails/demo_floating_axes.png b/dev/plot_directive/mpl_examples/axes_grid/thumbnails/demo_floating_axes.png deleted file mode 100644 index af90638c1ba..00000000000 Binary files a/dev/plot_directive/mpl_examples/axes_grid/thumbnails/demo_floating_axes.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/axes_grid/thumbnails/demo_floating_axis.png b/dev/plot_directive/mpl_examples/axes_grid/thumbnails/demo_floating_axis.png deleted file mode 100644 index 598b6336a22..00000000000 Binary files a/dev/plot_directive/mpl_examples/axes_grid/thumbnails/demo_floating_axis.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/axes_grid/thumbnails/demo_parasite_axes2_00_00.png b/dev/plot_directive/mpl_examples/axes_grid/thumbnails/demo_parasite_axes2_00_00.png deleted file mode 100644 index b7c99220e53..00000000000 Binary files a/dev/plot_directive/mpl_examples/axes_grid/thumbnails/demo_parasite_axes2_00_00.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/axes_grid/thumbnails/inset_locator_demo.png b/dev/plot_directive/mpl_examples/axes_grid/thumbnails/inset_locator_demo.png deleted file mode 100644 index 731078a7ab2..00000000000 Binary files a/dev/plot_directive/mpl_examples/axes_grid/thumbnails/inset_locator_demo.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/axes_grid/thumbnails/inset_locator_demo2.png b/dev/plot_directive/mpl_examples/axes_grid/thumbnails/inset_locator_demo2.png deleted file mode 100644 index b4ee3ef6014..00000000000 Binary files a/dev/plot_directive/mpl_examples/axes_grid/thumbnails/inset_locator_demo2.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/axes_grid/thumbnails/make_room_for_ylabel_using_axesgrid_00.png b/dev/plot_directive/mpl_examples/axes_grid/thumbnails/make_room_for_ylabel_using_axesgrid_00.png deleted file mode 100644 index 24fa2ffbaba..00000000000 Binary files a/dev/plot_directive/mpl_examples/axes_grid/thumbnails/make_room_for_ylabel_using_axesgrid_00.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/axes_grid/thumbnails/make_room_for_ylabel_using_axesgrid_01.png b/dev/plot_directive/mpl_examples/axes_grid/thumbnails/make_room_for_ylabel_using_axesgrid_01.png deleted file mode 100644 index ba744c605af..00000000000 Binary files a/dev/plot_directive/mpl_examples/axes_grid/thumbnails/make_room_for_ylabel_using_axesgrid_01.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/axes_grid/thumbnails/make_room_for_ylabel_using_axesgrid_02.png b/dev/plot_directive/mpl_examples/axes_grid/thumbnails/make_room_for_ylabel_using_axesgrid_02.png deleted file mode 100644 index 3be3173f99a..00000000000 Binary files a/dev/plot_directive/mpl_examples/axes_grid/thumbnails/make_room_for_ylabel_using_axesgrid_02.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/axes_grid/thumbnails/parasite_simple2.png b/dev/plot_directive/mpl_examples/axes_grid/thumbnails/parasite_simple2.png deleted file mode 100644 index 2727cc41a06..00000000000 Binary files a/dev/plot_directive/mpl_examples/axes_grid/thumbnails/parasite_simple2.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/axes_grid/thumbnails/scatter_hist.png b/dev/plot_directive/mpl_examples/axes_grid/thumbnails/scatter_hist.png deleted file mode 100644 index 97ec2a4b54d..00000000000 Binary files a/dev/plot_directive/mpl_examples/axes_grid/thumbnails/scatter_hist.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/axes_grid/thumbnails/simple_anchored_artists.png b/dev/plot_directive/mpl_examples/axes_grid/thumbnails/simple_anchored_artists.png deleted file mode 100644 index ad5b0a91d75..00000000000 Binary files a/dev/plot_directive/mpl_examples/axes_grid/thumbnails/simple_anchored_artists.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/axes_grid/thumbnails/simple_axesgrid.png b/dev/plot_directive/mpl_examples/axes_grid/thumbnails/simple_axesgrid.png deleted file mode 100644 index 2ba3cefbf07..00000000000 Binary files a/dev/plot_directive/mpl_examples/axes_grid/thumbnails/simple_axesgrid.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/axes_grid/thumbnails/simple_axesgrid2.png b/dev/plot_directive/mpl_examples/axes_grid/thumbnails/simple_axesgrid2.png deleted file mode 100644 index ef8142a4191..00000000000 Binary files a/dev/plot_directive/mpl_examples/axes_grid/thumbnails/simple_axesgrid2.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/axes_grid/thumbnails/simple_axisline4.png b/dev/plot_directive/mpl_examples/axes_grid/thumbnails/simple_axisline4.png deleted file mode 100644 index 39a8978230a..00000000000 Binary files a/dev/plot_directive/mpl_examples/axes_grid/thumbnails/simple_axisline4.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/color/thumbnails/color_cycle_demo.png b/dev/plot_directive/mpl_examples/color/thumbnails/color_cycle_demo.png deleted file mode 100644 index 5c98342cc4e..00000000000 Binary files a/dev/plot_directive/mpl_examples/color/thumbnails/color_cycle_demo.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/color/thumbnails/colormaps_reference_00.png b/dev/plot_directive/mpl_examples/color/thumbnails/colormaps_reference_00.png deleted file mode 100644 index 3a7a81bf906..00000000000 Binary files a/dev/plot_directive/mpl_examples/color/thumbnails/colormaps_reference_00.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/color/thumbnails/colormaps_reference_01.png b/dev/plot_directive/mpl_examples/color/thumbnails/colormaps_reference_01.png deleted file mode 100644 index 17da48c4b84..00000000000 Binary files a/dev/plot_directive/mpl_examples/color/thumbnails/colormaps_reference_01.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/color/thumbnails/colormaps_reference_02.png b/dev/plot_directive/mpl_examples/color/thumbnails/colormaps_reference_02.png deleted file mode 100644 index 26eade07b9f..00000000000 Binary files a/dev/plot_directive/mpl_examples/color/thumbnails/colormaps_reference_02.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/color/thumbnails/colormaps_reference_03.png b/dev/plot_directive/mpl_examples/color/thumbnails/colormaps_reference_03.png deleted file mode 100644 index 74a3b96a1fb..00000000000 Binary files a/dev/plot_directive/mpl_examples/color/thumbnails/colormaps_reference_03.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/color/thumbnails/colormaps_reference_04.png b/dev/plot_directive/mpl_examples/color/thumbnails/colormaps_reference_04.png deleted file mode 100644 index 3c9b3640d8f..00000000000 Binary files a/dev/plot_directive/mpl_examples/color/thumbnails/colormaps_reference_04.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/images_contours_and_fields/thumbnails/image_demo.png b/dev/plot_directive/mpl_examples/images_contours_and_fields/thumbnails/image_demo.png deleted file mode 100644 index 66a40076db5..00000000000 Binary files a/dev/plot_directive/mpl_examples/images_contours_and_fields/thumbnails/image_demo.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/images_contours_and_fields/thumbnails/image_demo_clip_path.png b/dev/plot_directive/mpl_examples/images_contours_and_fields/thumbnails/image_demo_clip_path.png deleted file mode 100644 index 0d7043c0964..00000000000 Binary files a/dev/plot_directive/mpl_examples/images_contours_and_fields/thumbnails/image_demo_clip_path.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/images_contours_and_fields/thumbnails/pcolormesh_levels.png b/dev/plot_directive/mpl_examples/images_contours_and_fields/thumbnails/pcolormesh_levels.png deleted file mode 100644 index 588fdf7baa2..00000000000 Binary files a/dev/plot_directive/mpl_examples/images_contours_and_fields/thumbnails/pcolormesh_levels.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/images_contours_and_fields/thumbnails/streamplot_demo_features_00.png b/dev/plot_directive/mpl_examples/images_contours_and_fields/thumbnails/streamplot_demo_features_00.png deleted file mode 100644 index 882329227d7..00000000000 Binary files a/dev/plot_directive/mpl_examples/images_contours_and_fields/thumbnails/streamplot_demo_features_00.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/images_contours_and_fields/thumbnails/streamplot_demo_features_01.png b/dev/plot_directive/mpl_examples/images_contours_and_fields/thumbnails/streamplot_demo_features_01.png deleted file mode 100644 index f40757017b8..00000000000 Binary files a/dev/plot_directive/mpl_examples/images_contours_and_fields/thumbnails/streamplot_demo_features_01.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/images_contours_and_fields/thumbnails/streamplot_demo_masking.png b/dev/plot_directive/mpl_examples/images_contours_and_fields/thumbnails/streamplot_demo_masking.png deleted file mode 100644 index 5cbcb077a95..00000000000 Binary files a/dev/plot_directive/mpl_examples/images_contours_and_fields/thumbnails/streamplot_demo_masking.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/lines_bars_and_markers/thumbnails/fill_demo.png b/dev/plot_directive/mpl_examples/lines_bars_and_markers/thumbnails/fill_demo.png deleted file mode 100644 index 6ae6e2b3a4f..00000000000 Binary files a/dev/plot_directive/mpl_examples/lines_bars_and_markers/thumbnails/fill_demo.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/lines_bars_and_markers/thumbnails/fill_demo_features.png b/dev/plot_directive/mpl_examples/lines_bars_and_markers/thumbnails/fill_demo_features.png deleted file mode 100644 index 506b73cae8b..00000000000 Binary files a/dev/plot_directive/mpl_examples/lines_bars_and_markers/thumbnails/fill_demo_features.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/lines_bars_and_markers/thumbnails/line_demo_dash_control.png b/dev/plot_directive/mpl_examples/lines_bars_and_markers/thumbnails/line_demo_dash_control.png deleted file mode 100644 index b921f17be47..00000000000 Binary files a/dev/plot_directive/mpl_examples/lines_bars_and_markers/thumbnails/line_demo_dash_control.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/mplot3d/thumbnails/2dcollections3d_demo.png b/dev/plot_directive/mpl_examples/mplot3d/thumbnails/2dcollections3d_demo.png deleted file mode 100644 index 27ec85a2907..00000000000 Binary files a/dev/plot_directive/mpl_examples/mplot3d/thumbnails/2dcollections3d_demo.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/mplot3d/thumbnails/bars3d_demo.png b/dev/plot_directive/mpl_examples/mplot3d/thumbnails/bars3d_demo.png deleted file mode 100644 index dbfd36d80a4..00000000000 Binary files a/dev/plot_directive/mpl_examples/mplot3d/thumbnails/bars3d_demo.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/mplot3d/thumbnails/contour3d_demo.png b/dev/plot_directive/mpl_examples/mplot3d/thumbnails/contour3d_demo.png deleted file mode 100644 index aac290c2f7c..00000000000 Binary files a/dev/plot_directive/mpl_examples/mplot3d/thumbnails/contour3d_demo.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/mplot3d/thumbnails/contour3d_demo2.png b/dev/plot_directive/mpl_examples/mplot3d/thumbnails/contour3d_demo2.png deleted file mode 100644 index d10da96b13c..00000000000 Binary files a/dev/plot_directive/mpl_examples/mplot3d/thumbnails/contour3d_demo2.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/mplot3d/thumbnails/contour3d_demo3.png b/dev/plot_directive/mpl_examples/mplot3d/thumbnails/contour3d_demo3.png deleted file mode 100644 index fcb14a28143..00000000000 Binary files a/dev/plot_directive/mpl_examples/mplot3d/thumbnails/contour3d_demo3.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/mplot3d/thumbnails/contourf3d_demo.png b/dev/plot_directive/mpl_examples/mplot3d/thumbnails/contourf3d_demo.png deleted file mode 100644 index 913a6192164..00000000000 Binary files a/dev/plot_directive/mpl_examples/mplot3d/thumbnails/contourf3d_demo.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/mplot3d/thumbnails/contourf3d_demo2.png b/dev/plot_directive/mpl_examples/mplot3d/thumbnails/contourf3d_demo2.png deleted file mode 100644 index d21cbc6edca..00000000000 Binary files a/dev/plot_directive/mpl_examples/mplot3d/thumbnails/contourf3d_demo2.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/mplot3d/thumbnails/hist3d_demo.png b/dev/plot_directive/mpl_examples/mplot3d/thumbnails/hist3d_demo.png deleted file mode 100644 index abf00401c38..00000000000 Binary files a/dev/plot_directive/mpl_examples/mplot3d/thumbnails/hist3d_demo.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/mplot3d/thumbnails/lines3d_demo.png b/dev/plot_directive/mpl_examples/mplot3d/thumbnails/lines3d_demo.png deleted file mode 100644 index 0ce69cc3464..00000000000 Binary files a/dev/plot_directive/mpl_examples/mplot3d/thumbnails/lines3d_demo.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/mplot3d/thumbnails/lorenz_attractor.png b/dev/plot_directive/mpl_examples/mplot3d/thumbnails/lorenz_attractor.png deleted file mode 100644 index bd331063884..00000000000 Binary files a/dev/plot_directive/mpl_examples/mplot3d/thumbnails/lorenz_attractor.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/mplot3d/thumbnails/mixed_subplots_demo.png b/dev/plot_directive/mpl_examples/mplot3d/thumbnails/mixed_subplots_demo.png deleted file mode 100644 index b882fcfeebf..00000000000 Binary files a/dev/plot_directive/mpl_examples/mplot3d/thumbnails/mixed_subplots_demo.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/mplot3d/thumbnails/offset_demo.png b/dev/plot_directive/mpl_examples/mplot3d/thumbnails/offset_demo.png deleted file mode 100644 index ed9e8f87cb9..00000000000 Binary files a/dev/plot_directive/mpl_examples/mplot3d/thumbnails/offset_demo.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/mplot3d/thumbnails/pathpatch3d_demo.png b/dev/plot_directive/mpl_examples/mplot3d/thumbnails/pathpatch3d_demo.png deleted file mode 100644 index 0b64c3f6250..00000000000 Binary files a/dev/plot_directive/mpl_examples/mplot3d/thumbnails/pathpatch3d_demo.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/mplot3d/thumbnails/polys3d_demo.png b/dev/plot_directive/mpl_examples/mplot3d/thumbnails/polys3d_demo.png deleted file mode 100644 index c87062df8be..00000000000 Binary files a/dev/plot_directive/mpl_examples/mplot3d/thumbnails/polys3d_demo.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/mplot3d/thumbnails/rotate_axes3d_demo.png b/dev/plot_directive/mpl_examples/mplot3d/thumbnails/rotate_axes3d_demo.png deleted file mode 100644 index a7c25dbcfa3..00000000000 Binary files a/dev/plot_directive/mpl_examples/mplot3d/thumbnails/rotate_axes3d_demo.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/mplot3d/thumbnails/scatter3d_demo.png b/dev/plot_directive/mpl_examples/mplot3d/thumbnails/scatter3d_demo.png deleted file mode 100644 index 016efb78e6b..00000000000 Binary files a/dev/plot_directive/mpl_examples/mplot3d/thumbnails/scatter3d_demo.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/mplot3d/thumbnails/subplot3d_demo.png b/dev/plot_directive/mpl_examples/mplot3d/thumbnails/subplot3d_demo.png deleted file mode 100644 index c6211df3859..00000000000 Binary files a/dev/plot_directive/mpl_examples/mplot3d/thumbnails/subplot3d_demo.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/mplot3d/thumbnails/surface3d_demo.png b/dev/plot_directive/mpl_examples/mplot3d/thumbnails/surface3d_demo.png deleted file mode 100644 index a58292fe9ac..00000000000 Binary files a/dev/plot_directive/mpl_examples/mplot3d/thumbnails/surface3d_demo.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/mplot3d/thumbnails/surface3d_demo2.png b/dev/plot_directive/mpl_examples/mplot3d/thumbnails/surface3d_demo2.png deleted file mode 100644 index 7f6986c1038..00000000000 Binary files a/dev/plot_directive/mpl_examples/mplot3d/thumbnails/surface3d_demo2.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/mplot3d/thumbnails/surface3d_demo3.png b/dev/plot_directive/mpl_examples/mplot3d/thumbnails/surface3d_demo3.png deleted file mode 100644 index dff16d630ce..00000000000 Binary files a/dev/plot_directive/mpl_examples/mplot3d/thumbnails/surface3d_demo3.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/mplot3d/thumbnails/surface3d_radial_demo.png b/dev/plot_directive/mpl_examples/mplot3d/thumbnails/surface3d_radial_demo.png deleted file mode 100644 index 6a1e0efc5c9..00000000000 Binary files a/dev/plot_directive/mpl_examples/mplot3d/thumbnails/surface3d_radial_demo.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/mplot3d/thumbnails/text3d_demo.png b/dev/plot_directive/mpl_examples/mplot3d/thumbnails/text3d_demo.png deleted file mode 100644 index 410d482b82e..00000000000 Binary files a/dev/plot_directive/mpl_examples/mplot3d/thumbnails/text3d_demo.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/mplot3d/thumbnails/trisurf3d_demo.png b/dev/plot_directive/mpl_examples/mplot3d/thumbnails/trisurf3d_demo.png deleted file mode 100644 index ca4b9e4b4a5..00000000000 Binary files a/dev/plot_directive/mpl_examples/mplot3d/thumbnails/trisurf3d_demo.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/mplot3d/thumbnails/trisurf3d_demo2_00.png b/dev/plot_directive/mpl_examples/mplot3d/thumbnails/trisurf3d_demo2_00.png deleted file mode 100644 index 3206c76a279..00000000000 Binary files a/dev/plot_directive/mpl_examples/mplot3d/thumbnails/trisurf3d_demo2_00.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/mplot3d/thumbnails/trisurf3d_demo2_01.png b/dev/plot_directive/mpl_examples/mplot3d/thumbnails/trisurf3d_demo2_01.png deleted file mode 100644 index 21d1325c2e7..00000000000 Binary files a/dev/plot_directive/mpl_examples/mplot3d/thumbnails/trisurf3d_demo2_01.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/mplot3d/thumbnails/wire3d_animation_demo.png b/dev/plot_directive/mpl_examples/mplot3d/thumbnails/wire3d_animation_demo.png deleted file mode 100644 index 3c2aa654921..00000000000 Binary files a/dev/plot_directive/mpl_examples/mplot3d/thumbnails/wire3d_animation_demo.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/mplot3d/thumbnails/wire3d_demo.png b/dev/plot_directive/mpl_examples/mplot3d/thumbnails/wire3d_demo.png deleted file mode 100644 index 8f0d75640c0..00000000000 Binary files a/dev/plot_directive/mpl_examples/mplot3d/thumbnails/wire3d_demo.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pie_and_polar_charts/thumbnails/pie_demo_features.png b/dev/plot_directive/mpl_examples/pie_and_polar_charts/thumbnails/pie_demo_features.png deleted file mode 100644 index 10240b48527..00000000000 Binary files a/dev/plot_directive/mpl_examples/pie_and_polar_charts/thumbnails/pie_demo_features.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pie_and_polar_charts/thumbnails/polar_bar_demo.png b/dev/plot_directive/mpl_examples/pie_and_polar_charts/thumbnails/polar_bar_demo.png deleted file mode 100644 index bd6b0a5e309..00000000000 Binary files a/dev/plot_directive/mpl_examples/pie_and_polar_charts/thumbnails/polar_bar_demo.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pie_and_polar_charts/thumbnails/polar_scatter_demo.png b/dev/plot_directive/mpl_examples/pie_and_polar_charts/thumbnails/polar_scatter_demo.png deleted file mode 100644 index 912347d88c6..00000000000 Binary files a/dev/plot_directive/mpl_examples/pie_and_polar_charts/thumbnails/polar_scatter_demo.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/accented_text.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/accented_text.png deleted file mode 100644 index b8ea24b34eb..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/accented_text.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/agg_buffer_to_array_00.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/agg_buffer_to_array_00.png deleted file mode 100644 index c11c4bff85a..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/agg_buffer_to_array_00.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/agg_buffer_to_array_01.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/agg_buffer_to_array_01.png deleted file mode 100644 index fa5fcdf23e2..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/agg_buffer_to_array_01.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/alignment_test.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/alignment_test.png deleted file mode 100644 index 57f19751956..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/alignment_test.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/anchored_artists.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/anchored_artists.png deleted file mode 100644 index a7ae4d6fe69..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/anchored_artists.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/animation_demo.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/animation_demo.png deleted file mode 100644 index 6f38d904295..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/animation_demo.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/annotation_demo2_00.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/annotation_demo2_00.png deleted file mode 100644 index 9a614e6d32f..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/annotation_demo2_00.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/annotation_demo2_01.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/annotation_demo2_01.png deleted file mode 100644 index 703c4ad462b..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/annotation_demo2_01.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/annotation_demo3.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/annotation_demo3.png deleted file mode 100644 index 192b06db402..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/annotation_demo3.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/annotation_demo_00.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/annotation_demo_00.png deleted file mode 100644 index 337d1efffba..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/annotation_demo_00.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/annotation_demo_01.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/annotation_demo_01.png deleted file mode 100644 index 8a49d356b41..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/annotation_demo_01.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/annotation_demo_02.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/annotation_demo_02.png deleted file mode 100644 index b2676cb972b..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/annotation_demo_02.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/anscombe.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/anscombe.png deleted file mode 100644 index fbcb03829bc..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/anscombe.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/arctest.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/arctest.png deleted file mode 100644 index 3a4acaee29f..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/arctest.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/arrow_demo.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/arrow_demo.png deleted file mode 100644 index 04d591f9c67..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/arrow_demo.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/arrow_simple_demo.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/arrow_simple_demo.png deleted file mode 100644 index ad249fbd15a..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/arrow_simple_demo.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/aspect_loglog.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/aspect_loglog.png deleted file mode 100644 index 06f1e80a017..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/aspect_loglog.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/axes_demo.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/axes_demo.png deleted file mode 100644 index 658131ee458..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/axes_demo.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/axes_props.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/axes_props.png deleted file mode 100644 index 5f437851c31..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/axes_props.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/axes_zoom_effect.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/axes_zoom_effect.png deleted file mode 100644 index 1359ed8194f..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/axes_zoom_effect.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/axhspan_demo.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/axhspan_demo.png deleted file mode 100644 index a1b06f61ae2..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/axhspan_demo.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/axis_equal_demo.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/axis_equal_demo.png deleted file mode 100644 index 05350cb63fe..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/axis_equal_demo.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/bar_stacked.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/bar_stacked.png deleted file mode 100644 index 2abb58c2929..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/bar_stacked.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/barb_demo_00.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/barb_demo_00.png deleted file mode 100644 index 09e63dd4b64..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/barb_demo_00.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/barb_demo_01.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/barb_demo_01.png deleted file mode 100644 index 02fd2aed7eb..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/barb_demo_01.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/barchart_demo.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/barchart_demo.png deleted file mode 100644 index d7aab12ed4b..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/barchart_demo.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/barchart_demo2.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/barchart_demo2.png deleted file mode 100644 index 197169eea59..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/barchart_demo2.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/barcode_demo.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/barcode_demo.png deleted file mode 100644 index 3e6171429f1..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/barcode_demo.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/barh_demo_00.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/barh_demo_00.png deleted file mode 100644 index ac046fc56c2..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/barh_demo_00.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/barh_demo_01.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/barh_demo_01.png deleted file mode 100644 index 3b829489de5..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/barh_demo_01.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/boxplot_demo2.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/boxplot_demo2.png deleted file mode 100644 index 16fa7dec572..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/boxplot_demo2.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/boxplot_demo3.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/boxplot_demo3.png deleted file mode 100644 index cdcda97aeb6..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/boxplot_demo3.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/boxplot_demo_00.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/boxplot_demo_00.png deleted file mode 100644 index 18604b92ece..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/boxplot_demo_00.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/boxplot_demo_01.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/boxplot_demo_01.png deleted file mode 100644 index 466d42271c9..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/boxplot_demo_01.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/boxplot_demo_02.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/boxplot_demo_02.png deleted file mode 100644 index 9b50ac9dc2d..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/boxplot_demo_02.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/boxplot_demo_03.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/boxplot_demo_03.png deleted file mode 100644 index 78ffddedbbd..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/boxplot_demo_03.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/boxplot_demo_04.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/boxplot_demo_04.png deleted file mode 100644 index 1c52f489240..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/boxplot_demo_04.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/boxplot_demo_05.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/boxplot_demo_05.png deleted file mode 100644 index 63116e85ebd..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/boxplot_demo_05.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/boxplot_demo_06.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/boxplot_demo_06.png deleted file mode 100644 index a61a47ef3b6..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/boxplot_demo_06.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/break.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/break.png deleted file mode 100644 index d412798e29a..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/break.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/broken_axis.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/broken_axis.png deleted file mode 100644 index 07af6e48de2..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/broken_axis.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/broken_barh.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/broken_barh.png deleted file mode 100644 index 8aaa50c3fdb..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/broken_barh.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/centered_ticklabels.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/centered_ticklabels.png deleted file mode 100644 index 622eac28b3a..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/centered_ticklabels.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/clippedline.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/clippedline.png deleted file mode 100644 index 260d37ae4f6..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/clippedline.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/cohere_demo.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/cohere_demo.png deleted file mode 100644 index 3b2c3148738..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/cohere_demo.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/color_by_yvalue.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/color_by_yvalue.png deleted file mode 100644 index d600d308cae..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/color_by_yvalue.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/color_demo.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/color_demo.png deleted file mode 100644 index 867b6176be6..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/color_demo.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/colorbar_tick_labelling_demo_00.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/colorbar_tick_labelling_demo_00.png deleted file mode 100644 index 94d13157eb7..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/colorbar_tick_labelling_demo_00.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/colorbar_tick_labelling_demo_01.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/colorbar_tick_labelling_demo_01.png deleted file mode 100644 index 27d7c49318d..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/colorbar_tick_labelling_demo_01.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/contour_demo_00.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/contour_demo_00.png deleted file mode 100644 index f7141fa0301..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/contour_demo_00.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/contour_demo_01.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/contour_demo_01.png deleted file mode 100644 index 4116633df9f..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/contour_demo_01.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/contour_demo_02.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/contour_demo_02.png deleted file mode 100644 index 2173294b4ce..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/contour_demo_02.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/contour_demo_03.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/contour_demo_03.png deleted file mode 100644 index 8edd1377b13..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/contour_demo_03.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/contour_demo_04.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/contour_demo_04.png deleted file mode 100644 index 983783763b7..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/contour_demo_04.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/contour_demo_05.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/contour_demo_05.png deleted file mode 100644 index 953b7b662b5..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/contour_demo_05.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/contour_image.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/contour_image.png deleted file mode 100644 index 0073678c1bf..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/contour_image.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/contour_label_demo_00.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/contour_label_demo_00.png deleted file mode 100644 index 33bb6439b10..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/contour_label_demo_00.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/contour_label_demo_01.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/contour_label_demo_01.png deleted file mode 100644 index cbf0a9a296b..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/contour_label_demo_01.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/contour_label_demo_02.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/contour_label_demo_02.png deleted file mode 100644 index c517f7d7247..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/contour_label_demo_02.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/contourf_demo_00.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/contourf_demo_00.png deleted file mode 100644 index b722968ab7c..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/contourf_demo_00.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/contourf_demo_01.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/contourf_demo_01.png deleted file mode 100644 index 0706cd540c7..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/contourf_demo_01.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/contourf_demo_02.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/contourf_demo_02.png deleted file mode 100644 index 0367e6b19b9..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/contourf_demo_02.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/contourf_hatching_00.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/contourf_hatching_00.png deleted file mode 100644 index 8ad6a93cc4a..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/contourf_hatching_00.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/contourf_hatching_01.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/contourf_hatching_01.png deleted file mode 100644 index 7a83f6028f4..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/contourf_hatching_01.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/contourf_log.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/contourf_log.png deleted file mode 100644 index a7861be5ec2..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/contourf_log.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/coords_demo.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/coords_demo.png deleted file mode 100644 index 497b469532d..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/coords_demo.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/coords_report.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/coords_report.png deleted file mode 100644 index d95b624a3ed..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/coords_report.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/csd_demo.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/csd_demo.png deleted file mode 100644 index 4a11db718ad..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/csd_demo.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/custom_cmap.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/custom_cmap.png deleted file mode 100644 index a56f50aa18d..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/custom_cmap.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/custom_figure_class.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/custom_figure_class.png deleted file mode 100644 index b1e17888077..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/custom_figure_class.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/custom_ticker1.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/custom_ticker1.png deleted file mode 100644 index 17562d182cf..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/custom_ticker1.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/customize_rc.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/customize_rc.png deleted file mode 100644 index e43c0104152..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/customize_rc.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/dannys_example.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/dannys_example.png deleted file mode 100644 index f9678a38ac0..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/dannys_example.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/dash_control.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/dash_control.png deleted file mode 100644 index 4c697050209..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/dash_control.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/dashpointlabel.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/dashpointlabel.png deleted file mode 100644 index 870a001b7f6..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/dashpointlabel.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/date_demo1.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/date_demo1.png deleted file mode 100644 index 1beb1e17b83..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/date_demo1.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/date_demo2.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/date_demo2.png deleted file mode 100644 index a99204d5ce6..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/date_demo2.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/date_demo_convert.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/date_demo_convert.png deleted file mode 100644 index 8bd62dd44bc..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/date_demo_convert.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/date_demo_rrule.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/date_demo_rrule.png deleted file mode 100644 index 9804f5fd830..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/date_demo_rrule.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/date_index_formatter.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/date_index_formatter.png deleted file mode 100644 index 20ccfb85808..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/date_index_formatter.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/demo_agg_filter.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/demo_agg_filter.png deleted file mode 100644 index 30a3b4f6fce..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/demo_agg_filter.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/demo_annotation_box.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/demo_annotation_box.png deleted file mode 100644 index ce018d7849f..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/demo_annotation_box.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/demo_bboximage.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/demo_bboximage.png deleted file mode 100644 index 59e24d5650b..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/demo_bboximage.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/demo_ribbon_box.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/demo_ribbon_box.png deleted file mode 100644 index 04fda568082..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/demo_ribbon_box.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/demo_text_path.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/demo_text_path.png deleted file mode 100644 index 6fc9ce44673..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/demo_text_path.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/demo_text_rotation_mode.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/demo_text_rotation_mode.png deleted file mode 100644 index 73b374b68ec..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/demo_text_rotation_mode.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/demo_tight_layout_00_00.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/demo_tight_layout_00_00.png deleted file mode 100644 index e84c26fa025..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/demo_tight_layout_00_00.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/demo_tight_layout_00_01.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/demo_tight_layout_00_01.png deleted file mode 100644 index a32b7837c3d..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/demo_tight_layout_00_01.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/demo_tight_layout_00_02.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/demo_tight_layout_00_02.png deleted file mode 100644 index 2109f85976d..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/demo_tight_layout_00_02.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/demo_tight_layout_00_03.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/demo_tight_layout_00_03.png deleted file mode 100644 index 97a306fec3f..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/demo_tight_layout_00_03.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/demo_tight_layout_00_04.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/demo_tight_layout_00_04.png deleted file mode 100644 index e746e3b93f2..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/demo_tight_layout_00_04.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/demo_tight_layout_00_05.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/demo_tight_layout_00_05.png deleted file mode 100644 index 778afaf6add..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/demo_tight_layout_00_05.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/demo_tight_layout_00_06.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/demo_tight_layout_00_06.png deleted file mode 100644 index 2f71d4a1085..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/demo_tight_layout_00_06.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/demo_tight_layout_01_00.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/demo_tight_layout_01_00.png deleted file mode 100644 index 7f9289486ea..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/demo_tight_layout_01_00.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/dolphin.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/dolphin.png deleted file mode 100644 index b191816ce63..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/dolphin.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/ellipse_collection.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/ellipse_collection.png deleted file mode 100644 index 08883bb648f..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/ellipse_collection.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/ellipse_demo.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/ellipse_demo.png deleted file mode 100644 index c1d32713bd0..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/ellipse_demo.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/ellipse_rotated.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/ellipse_rotated.png deleted file mode 100644 index 3f3d0b4a311..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/ellipse_rotated.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/equal_aspect_ratio.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/equal_aspect_ratio.png deleted file mode 100644 index f33cd621729..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/equal_aspect_ratio.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/errorbar_demo_00.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/errorbar_demo_00.png deleted file mode 100644 index 694aad67f51..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/errorbar_demo_00.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/errorbar_demo_01.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/errorbar_demo_01.png deleted file mode 100644 index 7be6b61e712..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/errorbar_demo_01.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/errorbar_limits_00.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/errorbar_limits_00.png deleted file mode 100644 index 37e5317af98..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/errorbar_limits_00.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/errorbar_limits_01.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/errorbar_limits_01.png deleted file mode 100644 index 37adf1e2256..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/errorbar_limits_01.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/errorbar_subsample.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/errorbar_subsample.png deleted file mode 100644 index 0bb333a52bb..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/errorbar_subsample.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/eventcollection_demo.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/eventcollection_demo.png deleted file mode 100644 index 97da6a775da..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/eventcollection_demo.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/eventplot_demo.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/eventplot_demo.png deleted file mode 100644 index f9dc2f2962b..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/eventplot_demo.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/fancyarrow_demo.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/fancyarrow_demo.png deleted file mode 100644 index 234354f67ca..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/fancyarrow_demo.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/fancybox_demo2.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/fancybox_demo2.png deleted file mode 100644 index 8c6567a26fd..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/fancybox_demo2.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/fancybox_demo_01_00.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/fancybox_demo_01_00.png deleted file mode 100644 index c38420ac96c..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/fancybox_demo_01_00.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/fancytextbox_demo.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/fancytextbox_demo.png deleted file mode 100644 index fd85f3c8d25..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/fancytextbox_demo.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/figimage_demo.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/figimage_demo.png deleted file mode 100644 index 6474b0b7288..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/figimage_demo.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/figlegend_demo.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/figlegend_demo.png deleted file mode 100644 index fb5604fe40d..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/figlegend_demo.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/figure_title.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/figure_title.png deleted file mode 100644 index 6bdda4a4ddc..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/figure_title.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/fill_between_demo_00.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/fill_between_demo_00.png deleted file mode 100644 index 43434ecf228..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/fill_between_demo_00.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/fill_between_demo_01.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/fill_between_demo_01.png deleted file mode 100644 index 9c0b95d6914..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/fill_between_demo_01.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/fill_between_demo_02.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/fill_between_demo_02.png deleted file mode 100644 index f1534d77b57..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/fill_between_demo_02.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/fill_betweenx_demo_00.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/fill_betweenx_demo_00.png deleted file mode 100644 index b016840413c..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/fill_betweenx_demo_00.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/fill_betweenx_demo_01.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/fill_betweenx_demo_01.png deleted file mode 100644 index 2ef794ded09..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/fill_betweenx_demo_01.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/fill_demo.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/fill_demo.png deleted file mode 100644 index 46e2085c48f..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/fill_demo.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/fill_demo2.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/fill_demo2.png deleted file mode 100644 index 6d5f31a1611..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/fill_demo2.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/fill_spiral.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/fill_spiral.png deleted file mode 100644 index dd8050009ce..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/fill_spiral.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/filledmarker_demo_00.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/filledmarker_demo_00.png deleted file mode 100644 index 9fa72569d2a..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/filledmarker_demo_00.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/filledmarker_demo_01.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/filledmarker_demo_01.png deleted file mode 100644 index 6dc40e38cf6..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/filledmarker_demo_01.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/filledmarker_demo_02.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/filledmarker_demo_02.png deleted file mode 100644 index 64f3e3a9070..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/filledmarker_demo_02.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/filledmarker_demo_03.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/filledmarker_demo_03.png deleted file mode 100644 index 30d5c31c82c..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/filledmarker_demo_03.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/filledmarker_demo_04.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/filledmarker_demo_04.png deleted file mode 100644 index 26117780f12..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/filledmarker_demo_04.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/filledmarker_demo_05.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/filledmarker_demo_05.png deleted file mode 100644 index f91ded9b80c..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/filledmarker_demo_05.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/filledmarker_demo_06.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/filledmarker_demo_06.png deleted file mode 100644 index 9a4fb95c72f..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/filledmarker_demo_06.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/filledmarker_demo_07.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/filledmarker_demo_07.png deleted file mode 100644 index ca469bc4d1a..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/filledmarker_demo_07.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/filledmarker_demo_08.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/filledmarker_demo_08.png deleted file mode 100644 index 90801abb901..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/filledmarker_demo_08.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/filledmarker_demo_09.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/filledmarker_demo_09.png deleted file mode 100644 index b4a35193845..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/filledmarker_demo_09.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/filledmarker_demo_10.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/filledmarker_demo_10.png deleted file mode 100644 index 3c71b554463..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/filledmarker_demo_10.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/filledmarker_demo_11.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/filledmarker_demo_11.png deleted file mode 100644 index aba21290b74..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/filledmarker_demo_11.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/filledmarker_demo_12.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/filledmarker_demo_12.png deleted file mode 100644 index 35608b2630d..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/filledmarker_demo_12.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/finance_demo.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/finance_demo.png deleted file mode 100644 index 012c315eaf8..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/finance_demo.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/finance_work2.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/finance_work2.png deleted file mode 100644 index b83ea6ba4c4..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/finance_work2.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/findobj_demo.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/findobj_demo.png deleted file mode 100644 index 9b1fdde1ca9..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/findobj_demo.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/fonts_demo.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/fonts_demo.png deleted file mode 100644 index 464f8d4a25a..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/fonts_demo.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/fonts_demo_kw.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/fonts_demo_kw.png deleted file mode 100644 index 30b6d763759..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/fonts_demo_kw.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/ganged_plots.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/ganged_plots.png deleted file mode 100644 index 3503e2c529c..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/ganged_plots.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/geo_demo.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/geo_demo.png deleted file mode 100644 index 5a36829d61c..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/geo_demo.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/gradient_bar.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/gradient_bar.png deleted file mode 100644 index bf0189e9ab9..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/gradient_bar.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/griddata_demo_00_00.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/griddata_demo_00_00.png deleted file mode 100644 index 999d900baf9..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/griddata_demo_00_00.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/hatch_demo.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/hatch_demo.png deleted file mode 100644 index def82828341..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/hatch_demo.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/hexbin_demo.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/hexbin_demo.png deleted file mode 100644 index 9ab2c4e57f2..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/hexbin_demo.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/hexbin_demo2.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/hexbin_demo2.png deleted file mode 100644 index 84780127496..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/hexbin_demo2.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/hist2d_demo.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/hist2d_demo.png deleted file mode 100644 index 19ed4aab3cd..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/hist2d_demo.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/hist2d_log_demo.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/hist2d_log_demo.png deleted file mode 100644 index 00777b7ce33..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/hist2d_log_demo.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/hist_colormapped.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/hist_colormapped.png deleted file mode 100644 index 746c1e8a1c9..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/hist_colormapped.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/histogram_demo.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/histogram_demo.png deleted file mode 100644 index eb9ec52bb7f..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/histogram_demo.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/histogram_demo_extended_00.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/histogram_demo_extended_00.png deleted file mode 100644 index 0f7a6dd335d..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/histogram_demo_extended_00.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/histogram_demo_extended_01.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/histogram_demo_extended_01.png deleted file mode 100644 index 5e242590ecb..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/histogram_demo_extended_01.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/histogram_demo_extended_02.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/histogram_demo_extended_02.png deleted file mode 100644 index afa9df2cc10..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/histogram_demo_extended_02.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/histogram_demo_extended_03.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/histogram_demo_extended_03.png deleted file mode 100644 index 21d832871a3..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/histogram_demo_extended_03.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/histogram_demo_extended_04.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/histogram_demo_extended_04.png deleted file mode 100644 index 5e9b9f182d1..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/histogram_demo_extended_04.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/histogram_demo_extended_05.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/histogram_demo_extended_05.png deleted file mode 100644 index cc4943133cc..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/histogram_demo_extended_05.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/histogram_demo_extended_06.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/histogram_demo_extended_06.png deleted file mode 100644 index bbaa23354e0..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/histogram_demo_extended_06.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/histogram_percent_demo.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/histogram_percent_demo.png deleted file mode 100644 index ac9984bb3c7..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/histogram_percent_demo.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/hline_demo.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/hline_demo.png deleted file mode 100644 index 9bd66d12316..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/hline_demo.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/image_clip_path.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/image_clip_path.png deleted file mode 100644 index d63655ca9cd..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/image_clip_path.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/image_demo.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/image_demo.png deleted file mode 100644 index 6cea935eb99..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/image_demo.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/image_demo2.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/image_demo2.png deleted file mode 100644 index 519336aee28..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/image_demo2.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/image_demo3.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/image_demo3.png deleted file mode 100644 index 1898ce8631b..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/image_demo3.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/image_interp_00.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/image_interp_00.png deleted file mode 100644 index d964b927261..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/image_interp_00.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/image_interp_01.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/image_interp_01.png deleted file mode 100644 index 2ef9a26203b..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/image_interp_01.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/image_interp_02.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/image_interp_02.png deleted file mode 100644 index 180c3b13218..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/image_interp_02.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/image_masked.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/image_masked.png deleted file mode 100644 index caee5a0399e..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/image_masked.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/image_nonuniform.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/image_nonuniform.png deleted file mode 100644 index 66b209406ca..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/image_nonuniform.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/image_origin.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/image_origin.png deleted file mode 100644 index 338a4366031..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/image_origin.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/image_slices_viewer.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/image_slices_viewer.png deleted file mode 100644 index 8342bdd920b..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/image_slices_viewer.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/integral_demo.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/integral_demo.png deleted file mode 100644 index f0cf910afed..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/integral_demo.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/interp_demo.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/interp_demo.png deleted file mode 100644 index 3099441a928..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/interp_demo.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/invert_axes.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/invert_axes.png deleted file mode 100644 index 65f39327b1b..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/invert_axes.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/layer_images.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/layer_images.png deleted file mode 100644 index d837a5935cf..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/layer_images.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/legend_auto_00.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/legend_auto_00.png deleted file mode 100644 index afbd2a67407..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/legend_auto_00.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/legend_auto_01.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/legend_auto_01.png deleted file mode 100644 index 206f6fae6ae..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/legend_auto_01.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/legend_auto_02.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/legend_auto_02.png deleted file mode 100644 index 640c2839681..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/legend_auto_02.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/legend_auto_03.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/legend_auto_03.png deleted file mode 100644 index 4f482ee9797..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/legend_auto_03.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/legend_auto_04.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/legend_auto_04.png deleted file mode 100644 index 5196073f86a..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/legend_auto_04.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/legend_auto_05.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/legend_auto_05.png deleted file mode 100644 index c2b0834779b..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/legend_auto_05.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/legend_auto_06.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/legend_auto_06.png deleted file mode 100644 index d086d6e1c2d..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/legend_auto_06.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/legend_auto_07.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/legend_auto_07.png deleted file mode 100644 index 5f91323284c..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/legend_auto_07.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/legend_auto_08.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/legend_auto_08.png deleted file mode 100644 index 38c1aac238f..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/legend_auto_08.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/legend_auto_09.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/legend_auto_09.png deleted file mode 100644 index 9c5741a82b0..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/legend_auto_09.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/legend_demo.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/legend_demo.png deleted file mode 100644 index a4b0be96ba6..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/legend_demo.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/legend_demo2.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/legend_demo2.png deleted file mode 100644 index b2bdf885388..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/legend_demo2.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/legend_demo3.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/legend_demo3.png deleted file mode 100644 index 70fe596c8eb..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/legend_demo3.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/legend_demo4.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/legend_demo4.png deleted file mode 100644 index 6ffaaca8fa6..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/legend_demo4.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/legend_demo_custom_handler.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/legend_demo_custom_handler.png deleted file mode 100644 index b9f0148c7e4..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/legend_demo_custom_handler.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/legend_scatter.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/legend_scatter.png deleted file mode 100644 index 7fd78947662..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/legend_scatter.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/legend_translucent.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/legend_translucent.png deleted file mode 100644 index c1dd1feddc5..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/legend_translucent.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/line_collection.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/line_collection.png deleted file mode 100644 index cff5a613d1c..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/line_collection.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/line_collection2.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/line_collection2.png deleted file mode 100644 index 364ce36c7ae..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/line_collection2.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/line_styles.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/line_styles.png deleted file mode 100644 index bcc9a42b9f0..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/line_styles.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/load_converter.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/load_converter.png deleted file mode 100644 index 23860d9a783..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/load_converter.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/loadrec.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/loadrec.png deleted file mode 100644 index c779c434427..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/loadrec.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/log_bar.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/log_bar.png deleted file mode 100644 index 336456e6b2a..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/log_bar.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/log_demo.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/log_demo.png deleted file mode 100644 index eef26e4191e..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/log_demo.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/log_test.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/log_test.png deleted file mode 100644 index 3d7938e34ee..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/log_test.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/logo.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/logo.png deleted file mode 100644 index 4ddf54e9adc..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/logo.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/major_minor_demo1.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/major_minor_demo1.png deleted file mode 100644 index e2dbdda2fca..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/major_minor_demo1.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/major_minor_demo2.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/major_minor_demo2.png deleted file mode 100644 index 204dbc00cce..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/major_minor_demo2.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/manual_axis.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/manual_axis.png deleted file mode 100644 index 933c45fde4c..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/manual_axis.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/marker_path.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/marker_path.png deleted file mode 100644 index 0d44d1d5226..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/marker_path.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/masked_demo.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/masked_demo.png deleted file mode 100644 index 2bd0c4fa31d..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/masked_demo.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/mathtext_demo.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/mathtext_demo.png deleted file mode 100644 index 539bc2d95fc..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/mathtext_demo.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/matshow_00.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/matshow_00.png deleted file mode 100644 index b1f2319c000..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/matshow_00.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/matshow_01.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/matshow_01.png deleted file mode 100644 index 246b6366bcd..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/matshow_01.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/matshow_04.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/matshow_04.png deleted file mode 100644 index 220f4c6df49..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/matshow_04.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/mri_demo.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/mri_demo.png deleted file mode 100644 index d553b83bb84..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/mri_demo.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/mri_with_eeg.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/mri_with_eeg.png deleted file mode 100644 index a4c66d01443..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/mri_with_eeg.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/multi_image.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/multi_image.png deleted file mode 100644 index 1e1e81aea86..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/multi_image.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/multicolored_line_00.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/multicolored_line_00.png deleted file mode 100644 index 3498ffecf5f..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/multicolored_line_00.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/multicolored_line_01.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/multicolored_line_01.png deleted file mode 100644 index 30ab1c3e744..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/multicolored_line_01.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/multiline.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/multiline.png deleted file mode 100644 index 0b9fa562bdd..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/multiline.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/multiple_figs_demo_00.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/multiple_figs_demo_00.png deleted file mode 100644 index 71d5f6b7e11..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/multiple_figs_demo_00.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/multiple_figs_demo_01.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/multiple_figs_demo_01.png deleted file mode 100644 index d41fd6a68eb..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/multiple_figs_demo_01.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/multiple_yaxis_with_spines.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/multiple_yaxis_with_spines.png deleted file mode 100644 index 51fd790f58c..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/multiple_yaxis_with_spines.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/nan_test.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/nan_test.png deleted file mode 100644 index 6c0f58b21df..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/nan_test.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/newscalarformatter_demo_00.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/newscalarformatter_demo_00.png deleted file mode 100644 index 5a49eaa52e1..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/newscalarformatter_demo_00.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/newscalarformatter_demo_01.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/newscalarformatter_demo_01.png deleted file mode 100644 index 2bbeb404787..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/newscalarformatter_demo_01.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/newscalarformatter_demo_02.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/newscalarformatter_demo_02.png deleted file mode 100644 index 7b4c9f3136e..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/newscalarformatter_demo_02.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/newscalarformatter_demo_03.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/newscalarformatter_demo_03.png deleted file mode 100644 index 70e52a2f29a..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/newscalarformatter_demo_03.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/patheffect_demo.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/patheffect_demo.png deleted file mode 100644 index 981d94c1550..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/patheffect_demo.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/pcolor_demo.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/pcolor_demo.png deleted file mode 100644 index 826bfb9fed2..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/pcolor_demo.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/pcolor_demo2.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/pcolor_demo2.png deleted file mode 100644 index 65eeaa1b6d7..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/pcolor_demo2.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/pcolor_log.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/pcolor_log.png deleted file mode 100644 index 9d474c10db9..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/pcolor_log.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/pcolor_small.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/pcolor_small.png deleted file mode 100644 index ada514f528f..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/pcolor_small.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/pie_demo.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/pie_demo.png deleted file mode 100644 index a9d15385d92..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/pie_demo.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/pie_demo2.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/pie_demo2.png deleted file mode 100644 index 1f6b5113284..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/pie_demo2.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/plotfile_demo_00.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/plotfile_demo_00.png deleted file mode 100644 index 60e9ae3600f..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/plotfile_demo_00.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/plotfile_demo_01.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/plotfile_demo_01.png deleted file mode 100644 index 60e9ae3600f..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/plotfile_demo_01.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/plotfile_demo_02.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/plotfile_demo_02.png deleted file mode 100644 index f95353672fe..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/plotfile_demo_02.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/plotfile_demo_03.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/plotfile_demo_03.png deleted file mode 100644 index f95353672fe..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/plotfile_demo_03.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/plotfile_demo_04.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/plotfile_demo_04.png deleted file mode 100644 index 9693953b157..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/plotfile_demo_04.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/plotfile_demo_05.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/plotfile_demo_05.png deleted file mode 100644 index b08283d9395..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/plotfile_demo_05.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/plotfile_demo_06.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/plotfile_demo_06.png deleted file mode 100644 index e97af3ff910..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/plotfile_demo_06.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/plotfile_demo_07.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/plotfile_demo_07.png deleted file mode 100644 index df9138e1085..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/plotfile_demo_07.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/polar_bar.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/polar_bar.png deleted file mode 100644 index 2745a2fa7dc..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/polar_bar.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/polar_demo.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/polar_demo.png deleted file mode 100644 index 93c4b32ff2a..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/polar_demo.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/polar_legend.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/polar_legend.png deleted file mode 100644 index 3433372b657..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/polar_legend.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/polar_scatter.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/polar_scatter.png deleted file mode 100644 index 6d4b1734a5b..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/polar_scatter.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/poormans_contour.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/poormans_contour.png deleted file mode 100644 index 2414d83317b..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/poormans_contour.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/psd_demo.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/psd_demo.png deleted file mode 100644 index bb6f28612af..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/psd_demo.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/psd_demo2.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/psd_demo2.png deleted file mode 100644 index c910150ffa2..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/psd_demo2.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/psd_demo3.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/psd_demo3.png deleted file mode 100644 index 46173c4758e..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/psd_demo3.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/psd_demo_complex.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/psd_demo_complex.png deleted file mode 100644 index 0ccd731dc1a..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/psd_demo_complex.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/pythonic_matplotlib.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/pythonic_matplotlib.png deleted file mode 100644 index 901de7ad7de..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/pythonic_matplotlib.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/quadmesh_demo.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/quadmesh_demo.png deleted file mode 100644 index b0a4ae6a7a6..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/quadmesh_demo.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/quiver_demo_00.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/quiver_demo_00.png deleted file mode 100644 index d1cae0be016..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/quiver_demo_00.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/quiver_demo_01.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/quiver_demo_01.png deleted file mode 100644 index 3f5531785ba..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/quiver_demo_01.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/quiver_demo_02.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/quiver_demo_02.png deleted file mode 100644 index 9c9c5380060..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/quiver_demo_02.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/quiver_demo_03.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/quiver_demo_03.png deleted file mode 100644 index 7c794e805c7..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/quiver_demo_03.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/quiver_demo_04.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/quiver_demo_04.png deleted file mode 100644 index b27692de489..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/quiver_demo_04.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/quiver_demo_05.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/quiver_demo_05.png deleted file mode 100644 index a556b0c95e6..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/quiver_demo_05.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/scatter_custom_symbol.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/scatter_custom_symbol.png deleted file mode 100644 index b9cfbacd588..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/scatter_custom_symbol.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/scatter_demo.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/scatter_demo.png deleted file mode 100644 index e516583ee64..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/scatter_demo.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/scatter_demo2.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/scatter_demo2.png deleted file mode 100644 index 370c98cbd19..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/scatter_demo2.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/scatter_hist.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/scatter_hist.png deleted file mode 100644 index dfc7b9fd19c..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/scatter_hist.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/scatter_masked.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/scatter_masked.png deleted file mode 100644 index 30752eb9538..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/scatter_masked.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/scatter_star_poly.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/scatter_star_poly.png deleted file mode 100644 index f0a82e5adbe..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/scatter_star_poly.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/scatter_symbol.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/scatter_symbol.png deleted file mode 100644 index 2adc6efa34e..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/scatter_symbol.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/set_and_get.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/set_and_get.png deleted file mode 100644 index 2732b47f8c8..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/set_and_get.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/shading_example.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/shading_example.png deleted file mode 100644 index 09bcdedddca..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/shading_example.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/shared_axis_demo.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/shared_axis_demo.png deleted file mode 100644 index 7e15861061d..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/shared_axis_demo.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/show_colormaps.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/show_colormaps.png deleted file mode 100644 index e4ffddac8a3..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/show_colormaps.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/simple_plot.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/simple_plot.png deleted file mode 100644 index 3b48c39f614..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/simple_plot.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/specgram_demo.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/specgram_demo.png deleted file mode 100644 index c401ca72bc2..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/specgram_demo.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/spine_placement_demo_00.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/spine_placement_demo_00.png deleted file mode 100644 index 76e1b7e8ba4..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/spine_placement_demo_00.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/spine_placement_demo_01.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/spine_placement_demo_01.png deleted file mode 100644 index 5336aa8e4f6..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/spine_placement_demo_01.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/spine_placement_demo_02.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/spine_placement_demo_02.png deleted file mode 100644 index 0ea145a8330..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/spine_placement_demo_02.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/spine_placement_demo_03.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/spine_placement_demo_03.png deleted file mode 100644 index 95c7cb67317..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/spine_placement_demo_03.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/spy_demos.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/spy_demos.png deleted file mode 100644 index 12a9f1d63e5..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/spy_demos.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/stackplot_demo2.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/stackplot_demo2.png deleted file mode 100644 index 0108b677430..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/stackplot_demo2.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/stackplot_demo_00_00.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/stackplot_demo_00_00.png deleted file mode 100644 index b454bb403bb..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/stackplot_demo_00_00.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/stackplot_demo_01_00.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/stackplot_demo_01_00.png deleted file mode 100644 index 648b2ee6976..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/stackplot_demo_01_00.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/stem_plot.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/stem_plot.png deleted file mode 100644 index cddbf8e4e39..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/stem_plot.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/step_demo.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/step_demo.png deleted file mode 100644 index a5c3fc4a67d..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/step_demo.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/stix_fonts_demo.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/stix_fonts_demo.png deleted file mode 100644 index b052fe5b060..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/stix_fonts_demo.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/stock_demo.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/stock_demo.png deleted file mode 100644 index 371be4ba845..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/stock_demo.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/streamplot_demo_00.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/streamplot_demo_00.png deleted file mode 100644 index 59423bda0d1..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/streamplot_demo_00.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/streamplot_demo_01.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/streamplot_demo_01.png deleted file mode 100644 index 2add937aa35..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/streamplot_demo_01.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/streamplot_with_mask.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/streamplot_with_mask.png deleted file mode 100644 index b92a0d30153..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/streamplot_with_mask.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/subplot_demo.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/subplot_demo.png deleted file mode 100644 index 90acb024d1c..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/subplot_demo.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/subplot_toolbar_00.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/subplot_toolbar_00.png deleted file mode 100644 index 908650f637f..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/subplot_toolbar_00.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/subplot_toolbar_01.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/subplot_toolbar_01.png deleted file mode 100644 index 69aadbea519..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/subplot_toolbar_01.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/subplots_adjust.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/subplots_adjust.png deleted file mode 100644 index 64d9ec8c321..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/subplots_adjust.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/subplots_demo_00.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/subplots_demo_00.png deleted file mode 100644 index b31dc598930..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/subplots_demo_00.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/subplots_demo_01.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/subplots_demo_01.png deleted file mode 100644 index 01a1ab1e869..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/subplots_demo_01.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/subplots_demo_02.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/subplots_demo_02.png deleted file mode 100644 index 1fc6dcbe3ed..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/subplots_demo_02.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/subplots_demo_03.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/subplots_demo_03.png deleted file mode 100644 index 29870487fc0..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/subplots_demo_03.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/subplots_demo_04.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/subplots_demo_04.png deleted file mode 100644 index b10d554c2f7..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/subplots_demo_04.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/subplots_demo_05.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/subplots_demo_05.png deleted file mode 100644 index 10f77ca9b77..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/subplots_demo_05.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/subplots_demo_06.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/subplots_demo_06.png deleted file mode 100644 index 5a48cf59494..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/subplots_demo_06.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/symlog_demo.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/symlog_demo.png deleted file mode 100644 index 56c7cd0b21d..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/symlog_demo.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/table_demo.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/table_demo.png deleted file mode 100644 index 0f3cfcb2ef9..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/table_demo.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/tex_demo.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/tex_demo.png deleted file mode 100644 index c3ad50ec41c..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/tex_demo.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/tex_unicode_demo.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/tex_unicode_demo.png deleted file mode 100644 index 50f8b2fae71..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/tex_unicode_demo.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/text_handles.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/text_handles.png deleted file mode 100644 index 3a0c7649c41..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/text_handles.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/text_rotation.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/text_rotation.png deleted file mode 100644 index a8fdd36e1ae..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/text_rotation.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/text_rotation_relative_to_line.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/text_rotation_relative_to_line.png deleted file mode 100644 index 4f6445241db..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/text_rotation_relative_to_line.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/text_themes.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/text_themes.png deleted file mode 100644 index 67c89822e6f..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/text_themes.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/titles_demo.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/titles_demo.png deleted file mode 100644 index 936c58c4c0d..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/titles_demo.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/to_numeric.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/to_numeric.png deleted file mode 100644 index e7449c95c7f..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/to_numeric.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/toggle_images.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/toggle_images.png deleted file mode 100644 index c46e16fd8cc..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/toggle_images.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/transoffset.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/transoffset.png deleted file mode 100644 index 4c5e597cc31..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/transoffset.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/tricontour_demo_00.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/tricontour_demo_00.png deleted file mode 100644 index feefe03f5fb..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/tricontour_demo_00.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/tricontour_demo_01.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/tricontour_demo_01.png deleted file mode 100644 index bb950a42345..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/tricontour_demo_01.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/tricontour_smooth_delaunay.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/tricontour_smooth_delaunay.png deleted file mode 100644 index 60a91c9462f..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/tricontour_smooth_delaunay.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/tricontour_smooth_user.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/tricontour_smooth_user.png deleted file mode 100644 index db5282ad9bb..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/tricontour_smooth_user.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/tricontour_vs_griddata.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/tricontour_vs_griddata.png deleted file mode 100644 index 51eea9d6a43..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/tricontour_vs_griddata.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/trigradient_demo.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/trigradient_demo.png deleted file mode 100644 index 210597d6d3a..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/trigradient_demo.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/triinterp_demo.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/triinterp_demo.png deleted file mode 100644 index c868b9699d8..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/triinterp_demo.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/tripcolor_demo_00.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/tripcolor_demo_00.png deleted file mode 100644 index afc2535c2b1..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/tripcolor_demo_00.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/tripcolor_demo_01.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/tripcolor_demo_01.png deleted file mode 100644 index fbd18dbd8fb..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/tripcolor_demo_01.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/tripcolor_demo_02.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/tripcolor_demo_02.png deleted file mode 100644 index ef1d21aaeb4..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/tripcolor_demo_02.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/triplot_demo_00.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/triplot_demo_00.png deleted file mode 100644 index 1ecea5deca3..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/triplot_demo_00.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/triplot_demo_01.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/triplot_demo_01.png deleted file mode 100644 index a8098a11a77..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/triplot_demo_01.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/unicode_demo.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/unicode_demo.png deleted file mode 100644 index a474903da8a..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/unicode_demo.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/usetex_baseline_test.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/usetex_baseline_test.png deleted file mode 100644 index d8dc936b513..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/usetex_baseline_test.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/usetex_demo.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/usetex_demo.png deleted file mode 100644 index 4d57104e536..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/usetex_demo.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/usetex_fonteffects.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/usetex_fonteffects.png deleted file mode 100644 index 7baf4fd646d..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/usetex_fonteffects.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/vertical_ticklabels.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/vertical_ticklabels.png deleted file mode 100644 index e29cff1046a..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/vertical_ticklabels.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/vline_demo.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/vline_demo.png deleted file mode 100644 index 4ccc4509364..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/vline_demo.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/vline_hline_demo.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/vline_hline_demo.png deleted file mode 100644 index e9d545206ae..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/vline_hline_demo.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/xcorr_demo.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/xcorr_demo.png deleted file mode 100644 index 92e3b599567..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/xcorr_demo.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/zorder_demo_00.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/zorder_demo_00.png deleted file mode 100644 index f8dc5577ea9..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/zorder_demo_00.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/zorder_demo_01.png b/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/zorder_demo_01.png deleted file mode 100644 index 0d855405d5e..00000000000 Binary files a/dev/plot_directive/mpl_examples/pylab_examples/thumbnails/zorder_demo_01.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/shapes_and_collections/thumbnails/path_patch_demo.png b/dev/plot_directive/mpl_examples/shapes_and_collections/thumbnails/path_patch_demo.png deleted file mode 100644 index fc8079a5ec7..00000000000 Binary files a/dev/plot_directive/mpl_examples/shapes_and_collections/thumbnails/path_patch_demo.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/shapes_and_collections/thumbnails/scatter_demo.png b/dev/plot_directive/mpl_examples/shapes_and_collections/thumbnails/scatter_demo.png deleted file mode 100644 index d3194ee7969..00000000000 Binary files a/dev/plot_directive/mpl_examples/shapes_and_collections/thumbnails/scatter_demo.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/showcase/thumbnails/integral_demo.png b/dev/plot_directive/mpl_examples/showcase/thumbnails/integral_demo.png deleted file mode 100644 index 128cb762a3f..00000000000 Binary files a/dev/plot_directive/mpl_examples/showcase/thumbnails/integral_demo.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/specialty_plots/thumbnails/hinton_demo.png b/dev/plot_directive/mpl_examples/specialty_plots/thumbnails/hinton_demo.png deleted file mode 100644 index ce5b46481f0..00000000000 Binary files a/dev/plot_directive/mpl_examples/specialty_plots/thumbnails/hinton_demo.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/statistics/thumbnails/errorbar_demo.png b/dev/plot_directive/mpl_examples/statistics/thumbnails/errorbar_demo.png deleted file mode 100644 index d531070f6a5..00000000000 Binary files a/dev/plot_directive/mpl_examples/statistics/thumbnails/errorbar_demo.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/statistics/thumbnails/errorbar_demo_features.png b/dev/plot_directive/mpl_examples/statistics/thumbnails/errorbar_demo_features.png deleted file mode 100644 index 6f372ab5e60..00000000000 Binary files a/dev/plot_directive/mpl_examples/statistics/thumbnails/errorbar_demo_features.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/statistics/thumbnails/histogram_demo_features.png b/dev/plot_directive/mpl_examples/statistics/thumbnails/histogram_demo_features.png deleted file mode 100644 index b2774272afa..00000000000 Binary files a/dev/plot_directive/mpl_examples/statistics/thumbnails/histogram_demo_features.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/subplots_axes_and_figures/thumbnails/subplot_demo.png b/dev/plot_directive/mpl_examples/subplots_axes_and_figures/thumbnails/subplot_demo.png deleted file mode 100644 index 95d496ecebe..00000000000 Binary files a/dev/plot_directive/mpl_examples/subplots_axes_and_figures/thumbnails/subplot_demo.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/text_labels_and_annotations/thumbnails/text_demo_fontdict.png b/dev/plot_directive/mpl_examples/text_labels_and_annotations/thumbnails/text_demo_fontdict.png deleted file mode 100644 index b86af26777b..00000000000 Binary files a/dev/plot_directive/mpl_examples/text_labels_and_annotations/thumbnails/text_demo_fontdict.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/text_labels_and_annotations/thumbnails/unicode_demo.png b/dev/plot_directive/mpl_examples/text_labels_and_annotations/thumbnails/unicode_demo.png deleted file mode 100644 index 12895efd419..00000000000 Binary files a/dev/plot_directive/mpl_examples/text_labels_and_annotations/thumbnails/unicode_demo.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/ticks_and_spines/thumbnails/spines_demo.png b/dev/plot_directive/mpl_examples/ticks_and_spines/thumbnails/spines_demo.png deleted file mode 100644 index 2b3cc18a00d..00000000000 Binary files a/dev/plot_directive/mpl_examples/ticks_and_spines/thumbnails/spines_demo.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/ticks_and_spines/thumbnails/spines_demo_bounds.png b/dev/plot_directive/mpl_examples/ticks_and_spines/thumbnails/spines_demo_bounds.png deleted file mode 100644 index 20eddb667d5..00000000000 Binary files a/dev/plot_directive/mpl_examples/ticks_and_spines/thumbnails/spines_demo_bounds.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/ticks_and_spines/thumbnails/spines_demo_dropped.png b/dev/plot_directive/mpl_examples/ticks_and_spines/thumbnails/spines_demo_dropped.png deleted file mode 100644 index 5bc4d35ee46..00000000000 Binary files a/dev/plot_directive/mpl_examples/ticks_and_spines/thumbnails/spines_demo_dropped.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/ticks_and_spines/thumbnails/ticklabels_demo_rotation.png b/dev/plot_directive/mpl_examples/ticks_and_spines/thumbnails/ticklabels_demo_rotation.png deleted file mode 100644 index 02d21a71100..00000000000 Binary files a/dev/plot_directive/mpl_examples/ticks_and_spines/thumbnails/ticklabels_demo_rotation.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/widgets/thumbnails/cursor.png b/dev/plot_directive/mpl_examples/widgets/thumbnails/cursor.png deleted file mode 100644 index 05e53cebbe5..00000000000 Binary files a/dev/plot_directive/mpl_examples/widgets/thumbnails/cursor.png and /dev/null differ diff --git a/dev/plot_directive/mpl_examples/widgets/thumbnails/slider_demo.png b/dev/plot_directive/mpl_examples/widgets/thumbnails/slider_demo.png deleted file mode 100644 index 1771f82424d..00000000000 Binary files a/dev/plot_directive/mpl_examples/widgets/thumbnails/slider_demo.png and /dev/null differ diff --git a/dev/py-modindex.html b/dev/py-modindex.html deleted file mode 100644 index 5df50a3f9a3..00000000000 --- a/dev/py-modindex.html +++ /dev/null @@ -1,397 +0,0 @@ - - - - - - - - Python Module Index — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      - - -
      -
      - -
      -
      -
      -
      - - -

      Python Module Index

      - -
      - m -
      - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
       
      - m
      - matplotlib -
          - matplotlib.afm -
          - matplotlib.animation -
          - matplotlib.artist -
          - matplotlib.axes -
          - matplotlib.axis -
          - matplotlib.backend_bases -
          - matplotlib.backends.backend_pdf -
          - matplotlib.backends.backend_qt4agg -
          - matplotlib.backends.backend_wxagg -
          - matplotlib.cbook -
          - matplotlib.cm -
          - matplotlib.collections -
          - matplotlib.colorbar -
          - matplotlib.colors -
          - matplotlib.dates -
          - matplotlib.dviread -
          - matplotlib.figure -
          - matplotlib.font_manager -
          - matplotlib.fontconfig_pattern -
          - matplotlib.gridspec -
          - matplotlib.legend -
          - matplotlib.lines -
          - matplotlib.markers -
          - matplotlib.mathtext -
          - matplotlib.mlab -
          - matplotlib.patches -
          - matplotlib.path -
          - matplotlib.projections -
          - matplotlib.projections.polar -
          - matplotlib.pyplot -
          - matplotlib.sankey -
          - matplotlib.scale -
          - matplotlib.sphinxext.plot_directive -
          - matplotlib.spines -
          - matplotlib.text -
          - matplotlib.ticker -
          - matplotlib.tight_layout -
          - matplotlib.transforms -
          - matplotlib.tri -
          - matplotlib.type1font -
          - matplotlib.units -
          - matplotlib.widgets -
      - mpl_toolkits -
          - mpl_toolkits.axes_grid.axes_size -
          - mpl_toolkits.mplot3d.art3d -
          - mpl_toolkits.mplot3d.axes3d -
          - mpl_toolkits.mplot3d.axis3d -
          - mpl_toolkits.mplot3d.proj3d -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/pyplots/README b/dev/pyplots/README deleted file mode 100644 index 464d7067e6f..00000000000 --- a/dev/pyplots/README +++ /dev/null @@ -1,10 +0,0 @@ -Please add a line to this file for any additional requirements necessary to -generate a new figure. - -tex_demo.py and tex_unicode_demo.py: - latex - dvipng - - -plotmap.py: - basemap toolkit diff --git a/dev/pyplots/align_ylabels.py b/dev/pyplots/align_ylabels.py deleted file mode 100644 index 1241c183629..00000000000 --- a/dev/pyplots/align_ylabels.py +++ /dev/null @@ -1,35 +0,0 @@ -import numpy as np -import matplotlib.pyplot as plt - -box = dict(facecolor='yellow', pad=5, alpha=0.2) - -fig = plt.figure() -fig.subplots_adjust(left=0.2, wspace=0.6) - - -ax1 = fig.add_subplot(221) -ax1.plot(2000*np.random.rand(10)) -ax1.set_title('ylabels not aligned') -ax1.set_ylabel('misaligned 1', bbox=box) -ax1.set_ylim(0, 2000) -ax3 = fig.add_subplot(223) -ax3.set_ylabel('misaligned 2',bbox=box) -ax3.plot(np.random.rand(10)) - - -labelx = -0.3 # axes coords - -ax2 = fig.add_subplot(222) -ax2.set_title('ylabels aligned') -ax2.plot(2000*np.random.rand(10)) -ax2.set_ylabel('aligned 1', bbox=box) -ax2.yaxis.set_label_coords(labelx, 0.5) -ax2.set_ylim(0, 2000) - -ax4 = fig.add_subplot(224) -ax4.plot(np.random.rand(10)) -ax4.set_ylabel('aligned 2', bbox=box) -ax4.yaxis.set_label_coords(labelx, 0.5) - - -plt.show() diff --git a/dev/pyplots/annotate_transform.py b/dev/pyplots/annotate_transform.py deleted file mode 100644 index 1d39970e3f5..00000000000 --- a/dev/pyplots/annotate_transform.py +++ /dev/null @@ -1,34 +0,0 @@ -import numpy as np -import matplotlib.pyplot as plt - -x = np.arange(0, 10, 0.005) -y = np.exp(-x/2.) * np.sin(2*np.pi*x) - -fig = plt.figure() -ax = fig.add_subplot(111) -ax.plot(x, y) -ax.set_xlim(0, 10) -ax.set_ylim(-1, 1) - -xdata, ydata = 5, 0 -xdisplay, ydisplay = ax.transData.transform((xdata, ydata)) - -bbox = dict(boxstyle="round", fc="0.8") -arrowprops = dict( - arrowstyle = "->", - connectionstyle = "angle,angleA=0,angleB=90,rad=10") - -offset = 72 -ax.annotate('data = (%.1f, %.1f)'%(xdata, ydata), - (xdata, ydata), xytext=(-2*offset, offset), textcoords='offset points', - bbox=bbox, arrowprops=arrowprops) - - -disp = ax.annotate('display = (%.1f, %.1f)'%(xdisplay, ydisplay), - (xdisplay, ydisplay), xytext=(0.5*offset, -offset), - xycoords='figure pixels', - textcoords='offset points', - bbox=bbox, arrowprops=arrowprops) - - -plt.show() diff --git a/dev/pyplots/annotation_basic.py b/dev/pyplots/annotation_basic.py deleted file mode 100644 index 846afd7b901..00000000000 --- a/dev/pyplots/annotation_basic.py +++ /dev/null @@ -1,16 +0,0 @@ -import numpy as np -import matplotlib.pyplot as plt - -fig = plt.figure() -ax = fig.add_subplot(111) - -t = np.arange(0.0, 5.0, 0.01) -s = np.cos(2*np.pi*t) -line, = ax.plot(t, s, lw=2) - -ax.annotate('local max', xy=(2, 1), xytext=(3, 1.5), - arrowprops=dict(facecolor='black', shrink=0.05), - ) - -ax.set_ylim(-2,2) -plt.show() diff --git a/dev/pyplots/annotation_polar.py b/dev/pyplots/annotation_polar.py deleted file mode 100644 index 9eba8cfe0d7..00000000000 --- a/dev/pyplots/annotation_polar.py +++ /dev/null @@ -1,21 +0,0 @@ -import numpy as np -import matplotlib.pyplot as plt - -fig = plt.figure() -ax = fig.add_subplot(111, polar=True) -r = np.arange(0,1,0.001) -theta = 2*2*np.pi*r -line, = ax.plot(theta, r, color='#ee8d18', lw=3) - -ind = 800 -thisr, thistheta = r[ind], theta[ind] -ax.plot([thistheta], [thisr], 'o') -ax.annotate('a polar annotation', - xy=(thistheta, thisr), # theta, radius - xytext=(0.05, 0.05), # fraction, fraction - textcoords='figure fraction', - arrowprops=dict(facecolor='black', shrink=0.05), - horizontalalignment='left', - verticalalignment='bottom', - ) -plt.show() diff --git a/dev/pyplots/auto_subplots_adjust.py b/dev/pyplots/auto_subplots_adjust.py deleted file mode 100644 index ca7f04144be..00000000000 --- a/dev/pyplots/auto_subplots_adjust.py +++ /dev/null @@ -1,30 +0,0 @@ -import matplotlib.pyplot as plt -import matplotlib.transforms as mtransforms -fig = plt.figure() -ax = fig.add_subplot(111) -ax.plot(range(10)) -ax.set_yticks((2,5,7)) -labels = ax.set_yticklabels(('really, really, really', 'long', 'labels')) - -def on_draw(event): - bboxes = [] - for label in labels: - bbox = label.get_window_extent() - # the figure transform goes from relative coords->pixels and we - # want the inverse of that - bboxi = bbox.inverse_transformed(fig.transFigure) - bboxes.append(bboxi) - - # this is the bbox that bounds all the bboxes, again in relative - # figure coords - bbox = mtransforms.Bbox.union(bboxes) - if fig.subplotpars.left < bbox.width: - # we need to move it over - fig.subplots_adjust(left=1.1*bbox.width) # pad a little - fig.canvas.draw() - return False - -fig.canvas.mpl_connect('draw_event', on_draw) - -plt.show() - diff --git a/dev/pyplots/boxplot_demo.py b/dev/pyplots/boxplot_demo.py deleted file mode 100644 index b5b46f2f1eb..00000000000 --- a/dev/pyplots/boxplot_demo.py +++ /dev/null @@ -1,65 +0,0 @@ -#!/usr/bin/python - -# -# Example boxplot code -# - -from pylab import * - -# fake up some data -spread= rand(50) * 100 -center = ones(25) * 50 -flier_high = rand(10) * 100 + 100 -flier_low = rand(10) * -100 -data =concatenate((spread, center, flier_high, flier_low), 0) - -# basic plot -boxplot(data) -#savefig('box1') - -# notched plot -figure() -boxplot(data,1) -#savefig('box2') - -# change outlier point symbols -figure() -boxplot(data,0,'gD') -#savefig('box3') - -# don't show outlier points -figure() -boxplot(data,0,'') -#savefig('box4') - -# horizontal boxes -figure() -boxplot(data,0,'rs',0) -#savefig('box5') - -# change whisker length -figure() -boxplot(data,0,'rs',0,0.75) -#savefig('box6') - -# fake up some more data -spread= rand(50) * 100 -center = ones(25) * 40 -flier_high = rand(10) * 100 + 100 -flier_low = rand(10) * -100 -d2 = concatenate( (spread, center, flier_high, flier_low), 0 ) -data.shape = (-1, 1) -d2.shape = (-1, 1) -#data = concatenate( (data, d2), 1 ) -# Making a 2-D array only works if all the columns are the -# same length. If they are not, then use a list instead. -# This is actually more efficient because boxplot converts -# a 2-D array into a list of vectors internally anyway. -data = [data, d2, d2[::2,0]] -# multiple box plots on one figure -figure() -boxplot(data) -#savefig('box7') - -show() - diff --git a/dev/pyplots/compound_path_demo.py b/dev/pyplots/compound_path_demo.py deleted file mode 100644 index 06f32ffcbf4..00000000000 --- a/dev/pyplots/compound_path_demo.py +++ /dev/null @@ -1,42 +0,0 @@ -import numpy as np - -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) - -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()) - -plt.show() diff --git a/dev/pyplots/dollar_ticks.py b/dev/pyplots/dollar_ticks.py deleted file mode 100644 index c54b17b91b7..00000000000 --- a/dev/pyplots/dollar_ticks.py +++ /dev/null @@ -1,17 +0,0 @@ -import numpy as np -import matplotlib.pyplot as plt -import matplotlib.ticker as ticker - -fig = plt.figure() -ax = fig.add_subplot(111) -ax.plot(100*np.random.rand(20)) - -formatter = ticker.FormatStrFormatter('$%1.2f') -ax.yaxis.set_major_formatter(formatter) - -for tick in ax.yaxis.get_major_ticks(): - tick.label1On = False - tick.label2On = True - tick.label2.set_color('green') - - diff --git a/dev/pyplots/fig_axes_customize_simple.py b/dev/pyplots/fig_axes_customize_simple.py deleted file mode 100644 index 797cd3389a7..00000000000 --- a/dev/pyplots/fig_axes_customize_simple.py +++ /dev/null @@ -1,27 +0,0 @@ -import numpy as np -import matplotlib.pyplot as plt - -# plt.figure creates a matplotlib.figure.Figure instance -fig = plt.figure() -rect = fig.patch # a rectangle instance -rect.set_facecolor('lightgoldenrodyellow') - -ax1 = fig.add_axes([0.1, 0.3, 0.4, 0.4]) -rect = ax1.patch -rect.set_facecolor('lightslategray') - - -for label in ax1.xaxis.get_ticklabels(): - # label is a Text instance - label.set_color('red') - label.set_rotation(45) - label.set_fontsize(16) - -for line in ax1.yaxis.get_ticklines(): - # line is a Line2D instance - line.set_color('green') - line.set_markersize(25) - line.set_markeredgewidth(3) - - - diff --git a/dev/pyplots/fig_axes_labels_simple.py b/dev/pyplots/fig_axes_labels_simple.py deleted file mode 100644 index 7fd2c53a4f2..00000000000 --- a/dev/pyplots/fig_axes_labels_simple.py +++ /dev/null @@ -1,19 +0,0 @@ -import numpy as np -import matplotlib.pyplot as plt - -fig = plt.figure() -fig.subplots_adjust(top=0.8) -ax1 = fig.add_subplot(211) -ax1.set_ylabel('volts') -ax1.set_title('a sine wave') - -t = np.arange(0.0, 1.0, 0.01) -s = np.sin(2*np.pi*t) -line, = ax1.plot(t, s, color='blue', lw=2) - -ax2 = fig.add_axes([0.15, 0.1, 0.7, 0.3]) -n, bins, patches = ax2.hist(np.random.randn(1000), 50, - facecolor='yellow', edgecolor='yellow') -ax2.set_xlabel('time (s)') - - diff --git a/dev/pyplots/fig_x.py b/dev/pyplots/fig_x.py deleted file mode 100644 index 1ab41294942..00000000000 --- a/dev/pyplots/fig_x.py +++ /dev/null @@ -1,12 +0,0 @@ -import numpy as np -import matplotlib.pyplot as plt -import matplotlib.lines as lines -fig = plt.figure() - -l1 = lines.Line2D([0, 1], [0, 1], transform=fig.transFigure, figure=fig) - -l2 = lines.Line2D([0, 1], [1, 0], transform=fig.transFigure, figure=fig) - -fig.lines.extend([l1, l2]) - - diff --git a/dev/pyplots/make.py b/dev/pyplots/make.py deleted file mode 100755 index cc58688aa66..00000000000 --- a/dev/pyplots/make.py +++ /dev/null @@ -1,75 +0,0 @@ -#!/usr/bin/env python - -from __future__ import print_function -import sys, os, glob -import matplotlib -import IPython.Shell -#matplotlib.rcdefaults() -matplotlib.use('Agg') - -mplshell = IPython.Shell.MatplotlibShell('mpl') - -formats = [('png', 100), - ('hires.png', 200), - ('pdf', 72)] - -def figs(): - print('making figs') - import matplotlib.pyplot as plt - for fname in glob.glob('*.py'): - if fname.split('/')[-1] == __file__.split('/')[-1]: continue - basename, ext = os.path.splitext(fname) - imagefiles = dict([('%s.%s'%(basename, format), dpi) - for format, dpi in formats]) - all_exists = True - for imagefile in imagefiles: - if not os.path.exists(imagefile): - all_exists = False - break - - if all_exists: - print(' already have %s'%fname) - else: - print(' building %s'%fname) - plt.close('all') # we need to clear between runs - mplshell.magic_run(basename) - for imagefile, dpi in imagefiles.iteritems(): - # todo: this will get called even if the run script - # fails and exits, thus creating a stub pdf and png - # iles preventing them from getting built successfully - # later - plt.savefig(imagefile, dpi=dpi) - print('all figures made') - - -def clean(): - patterns = (['#*', '*~', '*pyc'] + - ['*.%s' % format for format, dpi in formats]) - for pattern in patterns: - for fname in glob.glob(pattern): - os.remove(fname) - print('all clean') - - - -def all(): - figs() - -funcd = {'figs':figs, - 'clean':clean, - 'all':all, - } - -if len(sys.argv)>1: - for arg in sys.argv[1:]: - func = funcd.get(arg) - if func is None: - raise SystemExit('Do not know how to handle %s; valid args are'%( - arg, funcd.keys())) - func() -else: - all() - - - - diff --git a/dev/pyplots/matplotlibrc b/dev/pyplots/matplotlibrc deleted file mode 100644 index 39de5454051..00000000000 --- a/dev/pyplots/matplotlibrc +++ /dev/null @@ -1,3 +0,0 @@ -# local matplotlibrc for generating image files in this directory -backend : Agg -figure.figsize : 6, 4 # figure size in inches diff --git a/dev/pyplots/plotmap.hires.png b/dev/pyplots/plotmap.hires.png deleted file mode 100644 index b1d0c35540a..00000000000 Binary files a/dev/pyplots/plotmap.hires.png and /dev/null differ diff --git a/dev/pyplots/plotmap.pdf b/dev/pyplots/plotmap.pdf deleted file mode 100644 index ad51edbb759..00000000000 Binary files a/dev/pyplots/plotmap.pdf and /dev/null differ diff --git a/dev/pyplots/plotmap.png b/dev/pyplots/plotmap.png deleted file mode 100644 index 5f33c425a33..00000000000 Binary files a/dev/pyplots/plotmap.png and /dev/null differ diff --git a/dev/pyplots/plotmap.py b/dev/pyplots/plotmap.py deleted file mode 100644 index 98a5d64bb13..00000000000 --- a/dev/pyplots/plotmap.py +++ /dev/null @@ -1,61 +0,0 @@ -import matplotlib.pyplot as plt -import numpy as np - -try: - from mpl_toolkits.basemap import Basemap - have_basemap = True -except ImportError: - have_basemap = False - - -def plotmap(): - # create figure - fig = plt.figure(figsize=(8,8)) - # set up orthographic map projection with - # perspective of satellite looking down at 50N, 100W. - # use low resolution coastlines. - map = Basemap(projection='ortho',lat_0=50,lon_0=-100,resolution='l') - # lat/lon coordinates of five cities. - lats=[40.02,32.73,38.55,48.25,17.29] - lons=[-105.16,-117.16,-77.00,-114.21,-88.10] - cities=['Boulder, CO','San Diego, CA', - 'Washington, DC','Whitefish, MT','Belize City, Belize'] - # compute the native map projection coordinates for cities. - xc,yc = map(lons,lats) - # make up some data on a regular lat/lon grid. - nlats = 73; nlons = 145; delta = 2.*np.pi/(nlons-1) - lats = (0.5*np.pi-delta*np.indices((nlats,nlons))[0,:,:]) - lons = (delta*np.indices((nlats,nlons))[1,:,:]) - wave = 0.75*(np.sin(2.*lats)**8*np.cos(4.*lons)) - mean = 0.5*np.cos(2.*lats)*((np.sin(2.*lats))**2 + 2.) - # compute native map projection coordinates of lat/lon grid. - # (convert lons and lats to degrees first) - x, y = map(lons*180./np.pi, lats*180./np.pi) - # draw map boundary - map.drawmapboundary(color="0.9") - # draw graticule (latitude and longitude grid lines) - map.drawmeridians(np.arange(0,360,30),color="0.9") - map.drawparallels(np.arange(-90,90,30),color="0.9") - # plot filled circles at the locations of the cities. - map.plot(xc,yc,'wo') - # plot the names of five cities. - for name,xpt,ypt in zip(cities,xc,yc): - plt.text(xpt+100000,ypt+100000,name,fontsize=9,color='w') - # contour data over the map. - cs = map.contour(x,y,wave+mean,15,linewidths=1.5) - # draw blue marble image in background. - # (downsample the image by 50% for speed) - map.bluemarble(scale=0.5) - -def plotempty(): - # create figure - fig = plt.figure(figsize=(8,8)) - fig.text(0.5, 0.5, "Sorry, could not import Basemap", - horizontalalignment='center') - -if have_basemap: - plotmap() -else: - plotempty() -plt.show() - diff --git a/dev/pyplots/pyplot_annotate.py b/dev/pyplots/pyplot_annotate.py deleted file mode 100644 index 88390ca7c07..00000000000 --- a/dev/pyplots/pyplot_annotate.py +++ /dev/null @@ -1,15 +0,0 @@ -import numpy as np -import matplotlib.pyplot as plt - -ax = plt.subplot(111) - -t = np.arange(0.0, 5.0, 0.01) -s = np.cos(2*np.pi*t) -line, = plt.plot(t, s, lw=2) - -plt.annotate('local max', xy=(2, 1), xytext=(3, 1.5), - arrowprops=dict(facecolor='black', shrink=0.05), - ) - -plt.ylim(-2,2) -plt.show() diff --git a/dev/pyplots/pyplot_formatstr.py b/dev/pyplots/pyplot_formatstr.py deleted file mode 100644 index 2c4f425da97..00000000000 --- a/dev/pyplots/pyplot_formatstr.py +++ /dev/null @@ -1,5 +0,0 @@ -import matplotlib.pyplot as plt -plt.plot([1,2,3,4], [1,4,9,16], 'ro') -plt.axis([0, 6, 0, 20]) - - diff --git a/dev/pyplots/pyplot_mathtext.py b/dev/pyplots/pyplot_mathtext.py deleted file mode 100644 index 9ee51eabd41..00000000000 --- a/dev/pyplots/pyplot_mathtext.py +++ /dev/null @@ -1,12 +0,0 @@ -import numpy as np -import matplotlib.pyplot as plt -t = np.arange(0.0, 2.0, 0.01) -s = np.sin(2*np.pi*t) - -plt.plot(t,s) -plt.title(r'$\alpha_i > \beta_i$', fontsize=20) -plt.text(1, -0.6, r'$\sum_{i=0}^\infty x_i$', fontsize=20) -plt.text(0.6, 0.6, r'$\mathcal{A}\mathrm{sin}(2 \omega t)$', - fontsize=20) -plt.xlabel('time (s)') -plt.ylabel('volts (mV)') diff --git a/dev/pyplots/pyplot_simple.py b/dev/pyplots/pyplot_simple.py deleted file mode 100644 index 46b9f225a97..00000000000 --- a/dev/pyplots/pyplot_simple.py +++ /dev/null @@ -1,4 +0,0 @@ -import matplotlib.pyplot as plt -plt.plot([1,2,3,4]) -plt.ylabel('some numbers') -plt.show() diff --git a/dev/pyplots/pyplot_text.py b/dev/pyplots/pyplot_text.py deleted file mode 100644 index 64f2441485b..00000000000 --- a/dev/pyplots/pyplot_text.py +++ /dev/null @@ -1,17 +0,0 @@ -import numpy as np -import matplotlib.pyplot as plt - -mu, sigma = 100, 15 -x = mu + sigma * np.random.randn(10000) - -# the histogram of the data -n, bins, patches = plt.hist(x, 50, normed=1, facecolor='g', alpha=0.75) - - -plt.xlabel('Smarts') -plt.ylabel('Probability') -plt.title('Histogram of IQ') -plt.text(60, .025, r'$\mu=100,\ \sigma=15$') -plt.axis([40, 160, 0, 0.03]) -plt.grid(True) - diff --git a/dev/pyplots/pyplot_three.py b/dev/pyplots/pyplot_three.py deleted file mode 100644 index ecb200e6b41..00000000000 --- a/dev/pyplots/pyplot_three.py +++ /dev/null @@ -1,9 +0,0 @@ -import numpy as np -import matplotlib.pyplot as plt - -# evenly sampled time at 200ms intervals -t = np.arange(0., 5., 0.2) - -# red dashes, blue squares and green triangles -plt.plot(t, t, 'r--', t, t**2, 'bs', t, t**3, 'g^') - diff --git a/dev/pyplots/pyplot_two_subplots.py b/dev/pyplots/pyplot_two_subplots.py deleted file mode 100644 index 2a1af9fec45..00000000000 --- a/dev/pyplots/pyplot_two_subplots.py +++ /dev/null @@ -1,16 +0,0 @@ -import numpy as np -import matplotlib.pyplot as plt - -def f(t): - return np.exp(-t) * np.cos(2*np.pi*t) - -t1 = np.arange(0.0, 5.0, 0.1) -t2 = np.arange(0.0, 5.0, 0.02) - -plt.figure(1) -plt.subplot(211) -plt.plot(t1, f(t1), 'bo', t2, f(t2), 'k') - -plt.subplot(212) -plt.plot(t2, np.cos(2*np.pi*t2), 'r--') - diff --git a/dev/pyplots/test.pdf b/dev/pyplots/test.pdf deleted file mode 100644 index f9daa6906da..00000000000 Binary files a/dev/pyplots/test.pdf and /dev/null differ diff --git a/dev/pyplots/tex_demo.hires.png b/dev/pyplots/tex_demo.hires.png deleted file mode 100644 index 61bb1188155..00000000000 Binary files a/dev/pyplots/tex_demo.hires.png and /dev/null differ diff --git a/dev/pyplots/tex_demo.pdf b/dev/pyplots/tex_demo.pdf deleted file mode 100644 index 4462d92c99a..00000000000 Binary files a/dev/pyplots/tex_demo.pdf and /dev/null differ diff --git a/dev/pyplots/tex_demo.png b/dev/pyplots/tex_demo.png deleted file mode 100644 index 2c2774f74af..00000000000 Binary files a/dev/pyplots/tex_demo.png and /dev/null differ diff --git a/dev/pyplots/tex_demo.py b/dev/pyplots/tex_demo.py deleted file mode 100644 index a5288d749d8..00000000000 --- a/dev/pyplots/tex_demo.py +++ /dev/null @@ -1,35 +0,0 @@ -""" -Demo of TeX rendering. - -You can use TeX to render all of your matplotlib text if the rc -parameter text.usetex is set. This works currently on the agg and ps -backends, and requires that you have tex and the other dependencies -described at http://matplotlib.sf.net/matplotlib.texmanager.html -properly installed on your system. The first time you run a script -you will see a lot of output from tex and associated tools. The next -time, the run may be silent, as a lot of the information is cached in -~/.tex.cache - -""" -import numpy as np -import matplotlib.pyplot as plt - - -# Example data -t = np.arange(0.0, 1.0 + 0.01, 0.01) -s = np.cos(4 * np.pi * t) + 2 - -plt.rc('text', usetex=True) -plt.rc('font', family='serif') -plt.plot(t, s) - -plt.xlabel(r'\textbf{time} (s)') -plt.ylabel(r'\textit{voltage} (mV)',fontsize=16) -plt.title(r"\TeX\ is Number " - r"$\displaystyle\sum_{n=1}^\infty\frac{-e^{i\pi}}{2^n}$!", - fontsize=16, color='gray') -# Make room for the ridiculously large title. -plt.subplots_adjust(top=0.8) - -plt.savefig('tex_demo') -plt.show() diff --git a/dev/pyplots/tex_unicode_demo.hires.png b/dev/pyplots/tex_unicode_demo.hires.png deleted file mode 100644 index 52fc6b248bc..00000000000 Binary files a/dev/pyplots/tex_unicode_demo.hires.png and /dev/null differ diff --git a/dev/pyplots/tex_unicode_demo.pdf b/dev/pyplots/tex_unicode_demo.pdf deleted file mode 100644 index c6e234d1d40..00000000000 Binary files a/dev/pyplots/tex_unicode_demo.pdf and /dev/null differ diff --git a/dev/pyplots/tex_unicode_demo.png b/dev/pyplots/tex_unicode_demo.png deleted file mode 100644 index db7e76dbebb..00000000000 Binary files a/dev/pyplots/tex_unicode_demo.png and /dev/null differ diff --git a/dev/pyplots/text_commands.py b/dev/pyplots/text_commands.py deleted file mode 100644 index 93b2fcd8030..00000000000 --- a/dev/pyplots/text_commands.py +++ /dev/null @@ -1,33 +0,0 @@ -# -*- coding: utf-8 -*- -import matplotlib.pyplot as plt - -fig = plt.figure() -fig.suptitle('bold figure suptitle', fontsize=14, fontweight='bold') - -ax = fig.add_subplot(111) -fig.subplots_adjust(top=0.85) -ax.set_title('axes title') - -ax.set_xlabel('xlabel') -ax.set_ylabel('ylabel') - -ax.text(3, 8, 'boxed italics text in data coords', style='italic', - bbox={'facecolor':'red', 'alpha':0.5, 'pad':10}) - -ax.text(2, 6, r'an equation: $E=mc^2$', fontsize=15) - -ax.text(3, 2, unicode('unicode: Institut f\374r Festk\366rperphysik', 'latin-1')) - -ax.text(0.95, 0.01, 'colored text in axes coords', - verticalalignment='bottom', horizontalalignment='right', - transform=ax.transAxes, - color='green', fontsize=15) - - -ax.plot([2], [1], 'o') -ax.annotate('annotate', xy=(2, 1), xytext=(3, 4), - arrowprops=dict(facecolor='black', shrink=0.05)) - -ax.axis([0, 10, 0, 10]) - -plt.show() diff --git a/dev/pyplots/text_layout.py b/dev/pyplots/text_layout.py deleted file mode 100644 index 860c20d2211..00000000000 --- a/dev/pyplots/text_layout.py +++ /dev/null @@ -1,77 +0,0 @@ -import matplotlib.pyplot as plt -import matplotlib.patches as patches - -# build a rectangle in axes coords -left, width = .25, .5 -bottom, height = .25, .5 -right = left + width -top = bottom + height - -fig = plt.figure() -ax = fig.add_axes([0,0,1,1]) - -# axes coordinates are 0,0 is bottom left and 1,1 is upper right -p = patches.Rectangle( - (left, bottom), width, height, - fill=False, transform=ax.transAxes, clip_on=False - ) - -ax.add_patch(p) - -ax.text(left, bottom, 'left top', - horizontalalignment='left', - verticalalignment='top', - transform=ax.transAxes) - -ax.text(left, bottom, 'left bottom', - horizontalalignment='left', - verticalalignment='bottom', - transform=ax.transAxes) - -ax.text(right, top, 'right bottom', - horizontalalignment='right', - verticalalignment='bottom', - transform=ax.transAxes) - -ax.text(right, top, 'right top', - horizontalalignment='right', - verticalalignment='top', - transform=ax.transAxes) - -ax.text(right, bottom, 'center top', - horizontalalignment='center', - verticalalignment='top', - transform=ax.transAxes) - -ax.text(left, 0.5*(bottom+top), 'right center', - horizontalalignment='right', - verticalalignment='center', - rotation='vertical', - transform=ax.transAxes) - -ax.text(left, 0.5*(bottom+top), 'left center', - horizontalalignment='left', - verticalalignment='center', - rotation='vertical', - transform=ax.transAxes) - -ax.text(0.5*(left+right), 0.5*(bottom+top), 'middle', - horizontalalignment='center', - verticalalignment='center', - fontsize=20, color='red', - transform=ax.transAxes) - -ax.text(right, 0.5*(bottom+top), 'centered', - horizontalalignment='center', - verticalalignment='center', - rotation='vertical', - transform=ax.transAxes) - -ax.text(left, top, 'rotated\nwith newlines', - horizontalalignment='center', - verticalalignment='center', - rotation=45, - transform=ax.transAxes) - -ax.set_axis_off() -plt.show() diff --git a/dev/pyplots/whats_new_1_subplot3d.py b/dev/pyplots/whats_new_1_subplot3d.py deleted file mode 100644 index 6644267370d..00000000000 --- a/dev/pyplots/whats_new_1_subplot3d.py +++ /dev/null @@ -1,31 +0,0 @@ -from mpl_toolkits.mplot3d.axes3d import Axes3D -from matplotlib import cm -#from matplotlib.ticker import LinearLocator, FixedLocator, FormatStrFormatter -import matplotlib.pyplot as plt -import numpy as np - -fig = plt.figure() - -ax = fig.add_subplot(1, 2, 1, projection='3d') -X = np.arange(-5, 5, 0.25) -Y = np.arange(-5, 5, 0.25) -X, Y = np.meshgrid(X, Y) -R = np.sqrt(X**2 + Y**2) -Z = np.sin(R) -surf = ax.plot_surface(X, Y, Z, rstride=1, cstride=1, cmap=cm.jet, - linewidth=0, antialiased=False) -ax.set_zlim3d(-1.01, 1.01) - -#ax.w_zaxis.set_major_locator(LinearLocator(10)) -#ax.w_zaxis.set_major_formatter(FormatStrFormatter('%.03f')) - -fig.colorbar(surf, shrink=0.5, aspect=5) - -from mpl_toolkits.mplot3d.axes3d import get_test_data -ax = fig.add_subplot(1, 2, 2, projection='3d') -X, Y, Z = get_test_data(0.05) -ax.plot_wireframe(X, Y, Z, rstride=10, cstride=10) - -plt.show() - -plt.savefig("test.pdf") diff --git a/dev/pyplots/whats_new_98_4_fancy.py b/dev/pyplots/whats_new_98_4_fancy.py deleted file mode 100644 index dc6c1d4c9fb..00000000000 --- a/dev/pyplots/whats_new_98_4_fancy.py +++ /dev/null @@ -1,54 +0,0 @@ -import matplotlib.patches as mpatch -import matplotlib.pyplot as plt - -figheight = 8 -fig = plt.figure(1, figsize=(9, figheight), dpi=80) -fontsize = 0.4 * fig.dpi - -def make_boxstyles(ax): - styles = mpatch.BoxStyle.get_styles() - - for i, (stylename, styleclass) in enumerate(styles.items()): - ax.text(0.5, (float(len(styles)) - 0.5 - i)/len(styles), stylename, - ha="center", - size=fontsize, - transform=ax.transAxes, - bbox=dict(boxstyle=stylename, fc="w", ec="k")) - -def make_arrowstyles(ax): - styles = mpatch.ArrowStyle.get_styles() - - ax.set_xlim(0, 4) - ax.set_ylim(0, figheight) - - for i, (stylename, styleclass) in enumerate(sorted(styles.items())): - y = (float(len(styles)) -0.25 - i) # /figheight - p = mpatch.Circle((3.2, y), 0.2, fc="w") - ax.add_patch(p) - - ax.annotate(stylename, (3.2, y), - (2., y), - #xycoords="figure fraction", textcoords="figure fraction", - ha="right", va="center", - size=fontsize, - arrowprops=dict(arrowstyle=stylename, - patchB=p, - shrinkA=5, - shrinkB=5, - fc="w", ec="k", - connectionstyle="arc3,rad=-0.05", - ), - bbox=dict(boxstyle="square", fc="w")) - - ax.xaxis.set_visible(False) - ax.yaxis.set_visible(False) - - -ax1 = fig.add_subplot(121, frameon=False, xticks=[], yticks=[]) -make_boxstyles(ax1) - -ax2 = fig.add_subplot(122, frameon=False, xticks=[], yticks=[]) -make_arrowstyles(ax2) - - -plt.show() diff --git a/dev/pyplots/whats_new_98_4_fill_between.py b/dev/pyplots/whats_new_98_4_fill_between.py deleted file mode 100644 index ea5f46d93de..00000000000 --- a/dev/pyplots/whats_new_98_4_fill_between.py +++ /dev/null @@ -1,17 +0,0 @@ -#!/usr/bin/env python -import matplotlib.mlab as mlab -from pylab import figure, show -import numpy as np - -x = np.arange(0.0, 2, 0.01) -y1 = np.sin(2*np.pi*x) -y2 = 1.2*np.sin(4*np.pi*x) - -fig = figure() -ax = fig.add_subplot(111) -ax.plot(x, y1, x, y2, color='black') -ax.fill_between(x, y1, y2, where=y2>y1, facecolor='green') -ax.fill_between(x, y1, y2, where=y2<=y1, facecolor='red') -ax.set_title('fill between where') - -show() diff --git a/dev/pyplots/whats_new_98_4_legend.py b/dev/pyplots/whats_new_98_4_legend.py deleted file mode 100644 index 2a806126f3c..00000000000 --- a/dev/pyplots/whats_new_98_4_legend.py +++ /dev/null @@ -1,18 +0,0 @@ -import matplotlib.pyplot as plt -import numpy as np -import matplotlib.pyplot as plt - - -ax = plt.subplot(111) -t1 = np.arange(0.0, 1.0, 0.01) -for n in [1, 2, 3, 4]: - plt.plot(t1, t1**n, label="n=%d"%(n,)) - -leg = plt.legend(loc='best', ncol=2, mode="expand", shadow=True, fancybox=True) -leg.get_frame().set_alpha(0.5) - - -plt.show() - - - diff --git a/dev/pyplots/whats_new_99_axes_grid.py b/dev/pyplots/whats_new_99_axes_grid.py deleted file mode 100644 index e3cb7fa4217..00000000000 --- a/dev/pyplots/whats_new_99_axes_grid.py +++ /dev/null @@ -1,47 +0,0 @@ -import numpy as np -import matplotlib.pyplot as plt -from mpl_toolkits.axes_grid.axes_rgb import RGBAxes - -def get_demo_image(): - # prepare image - delta = 0.5 - - extent = (-3,4,-4,3) - x = np.arange(-3.0, 4.001, delta) - y = np.arange(-4.0, 3.001, delta) - X, Y = np.meshgrid(x, y) - import matplotlib.mlab as mlab - 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 = (Z1 - Z2) * 10 - - return Z, extent - - - -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 - - -fig = plt.figure(1) -ax = RGBAxes(fig, [0.1, 0.1, 0.8, 0.8]) - -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) - - -plt.draw() -plt.show() diff --git a/dev/pyplots/whats_new_99_mplot3d.py b/dev/pyplots/whats_new_99_mplot3d.py deleted file mode 100644 index d3e22c9b58e..00000000000 --- a/dev/pyplots/whats_new_99_mplot3d.py +++ /dev/null @@ -1,17 +0,0 @@ -from mpl_toolkits.mplot3d import Axes3D -from matplotlib import cm -import pylab -import random -import numpy as np - -fig = pylab.figure() -ax = Axes3D(fig) -X = np.arange(-5, 5, 0.25) -Y = np.arange(-5, 5, 0.25) -X, Y = np.meshgrid(X, Y) -R = np.sqrt(X**2 + Y**2) -Z = np.sin(R) -ax.plot_surface(X, Y, Z, rstride=1, cstride=1, cmap=cm.jet) - -pylab.show() - diff --git a/dev/pyplots/whats_new_99_spines.py b/dev/pyplots/whats_new_99_spines.py deleted file mode 100644 index 1ee80a9e708..00000000000 --- a/dev/pyplots/whats_new_99_spines.py +++ /dev/null @@ -1,47 +0,0 @@ -import matplotlib.pyplot as plt -import numpy as np -from matplotlib.pyplot import show - - -def adjust_spines(ax,spines): - for loc, spine in ax.spines.iteritems(): - if loc in spines: - spine.set_position(('outward',10)) # outward by 10 points - else: - spine.set_color('none') # don't draw spine - - # turn off ticks where there is no spine - if 'left' in spines: - ax.yaxis.set_ticks_position('left') - else: - # no yaxis ticks - ax.yaxis.set_ticks([]) - - if 'bottom' in spines: - ax.xaxis.set_ticks_position('bottom') - else: - # no xaxis ticks - ax.xaxis.set_ticks([]) - -fig = plt.figure() - -x = np.linspace(0,2*np.pi,100) -y = 2*np.sin(x) - -ax = fig.add_subplot(2,2,1) -ax.plot(x,y) -adjust_spines(ax,['left']) - -ax = fig.add_subplot(2,2,2) -ax.plot(x,y) -adjust_spines(ax,[]) - -ax = fig.add_subplot(2,2,3) -ax.plot(x,y) -adjust_spines(ax,['left','bottom']) - -ax = fig.add_subplot(2,2,4) -ax.plot(x,y) -adjust_spines(ax,['bottom']) - -show() diff --git a/dev/search.html b/dev/search.html deleted file mode 100644 index 89efa07934c..00000000000 --- a/dev/search.html +++ /dev/null @@ -1,147 +0,0 @@ - - - - - - - - Search — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -
      -
      - -
      -
      -
      -
      - -

      Search

      -

      - From here you can search these documents. Enter your - search words into the box below and click "search". Note that the - search function will automatically search for all of the - words. Pages containing less words won't appear in the result - list. If you want to limit your search to working code examples, - include the keyword "codex" (mnemonic for code example) in your - search, e.g., "codex ellipse"; - see search examples. -

      -
      - - - -
      - -
      - -
      - -
      -
      -
      -
      -
      - - - - - - - \ No newline at end of file diff --git a/dev/searchindex.js b/dev/searchindex.js deleted file mode 100644 index 3a19fa18e0b..00000000000 --- a/dev/searchindex.js +++ /dev/null @@ -1 +0,0 @@ -Search.setIndex({envversion:42,terms:{offsetblur:388,orthogon:349,yellow:[140,305,442,347,348,5,181,385,114,452,497,54,566,499,245,68,293,294,346,490,340,589],four:[83,434,229,499,38,524,56,257,297,492,177,294,352,262,340,248],prefix:[83,38,297,423,7,579],fig2:[206,473,9,347,258,526,245,246,348,66],francesco:235,lessapprox:354,typeerror:[138,580,38,393,235,314],usepackag:[402,317],semitranspar:440,hedegaard:235,xunit:[397,294,272,5,80,24],offsetfrom:[356,214,248,581],digit:[294,498,566],bendat:[294,5,492],moviewrit:[461,579,66],zorder_demo:[216,200],figi:[472,347],lumin:[83,294,149,362,497,5,423],surface3d_demo:[200,538],fractal:240,code_map:259,radar_factori:177,showcas:200,autocrlf:199,factori:[83,499,312],"_render":248,get_all_figwin:83,fig_:280,del_:413,charter:402,sizehint:324,a9f3f3a50745:228,p_i:122,bitstream:[284,402,287],make_cub:146,fig1:[206,267,9,443,258,13,388,526,234,245,347,87,474,66],seper:[434,492],budget:70,span_selector:[143,200],second:[505,257,442,443,107,38,243,100,296,314,5,288,413,317,228,83,114,453,76,491,117,566,12,401,497,277,392,324,539,193,521,88,462,239,498,121,122,96,542,362,63,161,289,23,579,581,294,258,446,168,71,434,298,340,402,510,583,173],ngeq:354,draw_gouraud_triangl:297,axis_equal_demo:200,blended_transform_factori:[223,340,77,83,434],msysgit:313,mdate:[222,360,442],get_str_bbox_and_desc:541,demo_images_side_by_si:13,rarrow:[581,248],hull:[492,385],ylen:[71,307],simple_plot_fp:[216,200],set_xi:[182,235,248],ongo:439,widget:[149,294,576,21,418,297,83],audiolab:110,bbox_al:[235,83],error:[257,106,312,348,5,7,228,149,440,235,352,458,492,566,464,465,361,544,430,83,64,248,580,434,294,297],get_renderer_cach:5,here:[303,442,312,448,5,6,7,10,11,16,329,431,165,450,24,332,337,168,340,341,313,480,177,347,348,181,43,349,576,49,50,492,352,27,51,354,194,357,499,199,57,58,60,144,64,68,70,214,512,74,228,385,229,525,527,235,237,238,389,533,557,566,393,302,248,491,434,401,402,254,403,257,109,100,262,268,271,440,277,423,19,493,122,287,430,23,290,103,543,293,581,294,299,583],l2norm:492,leave_ax:[245,347],"_init_bbox_imag":438,p_2:122,p_1:122,mline:[99,409],strewn:312,everyon:228,insign:289,meshgrid:[373,88,476,5,181,414,416,129,322,392,17,37,462,575,394,294,246,161,64,547,291,167,503,71,334,563,298,307,212,583,173],as_list:149,autodateformatt:[294,5,74,168],get_width:[498,436,183,380,248],extreme_data:485,rceil:354,simple_timer_wx:[285,200],attractor:466,path_exist:393,sansserif:354,prepare_imag:161,svg_glyph:83,unix:[464,153,287,402,7,330],stern:497,nitrat:177,txt:[53,292,150,464,228,31,456,235,481,179,33,214],unit:[83,243,294,262,153,168,383,418,297,492,312,22,96,5,248,266],bf00bf:393,subpath:[263,289],cruft:[228,352],ltime:354,on_draw:[566,504,340,239],demo_text_rotation_mod:200,set_axis_off:[403,5,316,349,268],strike:543,fontkei:287,until:[144,257,179,5,317,83,525,566,235,277,328,92,573,122,379,149,248,580,294,168,297,402,586,214],notin:354,majfmt:[314,74,24],notif:[352,579],yahoo:[360,112,435,44],notic:[217,229,168,235,75,348,224,181,510],yoffset:[294,5,50,149,266],subplot_class_factori:[5,249],exce:[353,32],axins1:174,hole:[96,512],hold:[402,373,83,434,294,132,76,149,348,492,497,577,324,5,181,337,64,153],unpack:[228,502,294,442,536,524,492,277,348],accid:57,autoscaley_on:149,light_filt:161,generalis:401,conceptu:[294,353,144],otherax:294,count_overlap:[434,83],rework:[235,492,83],obliqu:[357,149,268,294,368,287,411,402,5,248],subplot2grid:[294,497,578],textsiz:222,cautiou:83,caution:38,want:[303,304,2,442,5,7,317,149,76,324,353,464,465,450,470,25,168,339,340,507,174,480,38,347,348,198,191,492,352,354,357,498,55,499,199,500,58,103,57,379,64,205,207,208,70,214,144,458,75,518,224,388,383,228,83,229,525,527,238,533,566,242,581,248,250,398,294,401,402,257,107,100,584,420,276,277,422,423,92,493,122,287,577,541,434,133,297,583],type1:[541,312],type3:402,api_chang:103,hof:83,hog:[587,184,424,388],gui_repaint:286,hoc:497,turn:[403,144,257,442,326,379,347,348,5,7,183,266,228,83,270,320,527,525,566,276,277,463,529,238,497,92,242,222,149,64,248,25,580,398,294,424,401,510],travel:492,hom:354,subplot1:341,classifi:235,subplot2:341,how:[304,1,141,312,5,6,363,10,11,320,456,156,470,167,335,339,475,31,42,288,498,492,352,357,198,499,55,57,529,60,361,58,64,67,68,360,229,213,510,74,514,458,518,380,223,382,80,83,386,524,525,86,243,238,389,557,91,92,393,544,248,549,397,398,103,177,491,111,112,265,368,272,562,565,275,276,421,19,493,126,577,521,214,293,541,294,584,586,137],hot:[290,403,497,294,41,235,392,64,423],ereleas:[92,573],w20:413,ffdab9:393,macosx10:7,farwel:235,perspect:[353,357],time_templ:413,wolfram:1,"r\u00e9activit\u00e9":165,cz0:405,cz1:405,updatingrect:240,decor:[442,248,277,352,348,470],diagram:[83,22],wrong:[282,492,235],extendfont:395,beauti:348,pbox:83,oninit:[334,335,339,341,380,449],linefe:235,reshap:[304,9,558,263,45,270,321,49,234,567,53,535,240,500,450,66,433,504,99,258,563,33,438],classmethod:[545,266,312,579,262],tricontour:[290,349,83,294,283,160,497,61,5,193],alias:[294,5,85,248],gridon:[348,235,383],wind:[294,5,260,497,246],origin:[525,450,555,257,481,38,259,243,41,491,357,168,347,179,5,181,7,146,383,266,500,334,414,83,492,46,297,248,235,567,352,155,96,238,87,423,533,89,497,468,353,240,465,392,499,57,122,584,402,493,433,429,121,247,149,161,550,64,65,19,349,434,167,346,476,294,401,300,477,212,33,214,438,73,173],approxeq:354,feedback:[257,341],xlim:[0,218,9,304,142,41,410,348,5,419,450,413,83,523,556,321,274,488,192,238,193,569,532,355,497,90,500,201,202,156,149,288,203,66,471,506,398,294,258,485,340],hitlist:[248,341],myfig:[566,70],auto_adjust_subplotpar:166,affect:[303,100,262,5,383,83,566,235,567,353,94,158,431,505,450,248,166,294,401,340,341,402],vyahhi:235,vari:[403,250,83,424,294,375,583,499,121,243,435,361,312,127,5,248,19],myfil:[257,579],iteratorproxi:314,fit:[403,380,224,449,149,116,153,525,566,492,96,280,120,498,529,286,450,433,166,334,335,168,339,294,209,402],fix:[439,144,443,446,312,577,349,527,13,525,275,12,234,235,323,530,566,357,353,493,199,57,581,544,83,450,248,549,294,401,402],set_path_effect:[481,53,161,248],unicode_liter:[165,465,76,525,543,170,544,324,82],fig:[0,2,139,305,513,306,307,443,316,309,310,373,311,3,36,546,5,6,145,146,147,451,584,149,441,453,190,151,319,152,320,76,78,455,322,155,324,156,17,567,459,463,466,158,21,550,218,412,473,450,509,162,24,471,472,332,333,166,169,29,337,178,475,334,510,447,340,32,171,33,34,355,194,175,343,176,38,42,405,315,348,181,43,183,44,349,185,490,46,187,48,189,49,191,492,352,12,494,502,14,342,37,574,196,197,54,198,55,56,500,58,60,361,201,63,385,203,204,205,470,284,67,68,360,504,208,71,210,211,508,429,214,73,371,505,174,217,144,375,377,220,75,378,519,223,232,80,226,83,386,231,84,65,480,233,234,236,535,582,529,238,539,579,390,557,442,239,91,92,240,457,93,94,95,394,433,396,555,365,248,268,325,520,250,391,397,399,99,110,346,400,564,401,177,553,255,104,256,257,106,356,347,108,259,100,261,435,558,408,111,112,263,413,27,367,415,114,115,270,272,436,117,452,566,403,585,488,278,280,119,569,422,120,195,123,286,370,576,242,126,222,329,289,578,129,522,369,293,294,131,417,498,296,215,134,297,298,384,586,438,589],set_act:[92,334,573],backend_class:297,hidden:[235,491,557,83],easier:[303,525,214,83,424,257,270,70,423,541,566,57,243,144,7,64,248,312],fil:312,proce:[581,248,122],slate:[332,239,134,294,482,109,50,302,519,23],rectangl:[150,443,434,198,482,39,109,557,312,262,348,5,383,266,83,523,420,271,120,187,525,190,50,349,326,14,566,460,357,497,91,92,240,242,294,149,450,517,248,23,332,68,293,166,476,29,99,498,346,134,297,402,214,302],get_xheight:[541,312],rcfont:317,fillcolor:222,jouni:[95,60,257,235,439],wedg:[355,214,294,99,440,581,235,262,5,494,248,354],silver:584,widetild:[354,62],repaint:341,semenkovich:235,stsci:[439,312],masked_wher:[372,416,130,11,132,274,544,17,173],accommod:92,arrow:[291,444,83,510,294,99,22,282,479,485,497,238,5,214,289,248],debug:[434,464,95,235,402,289,248,579],set_raster:[563,161,248],mdh:235,wxapp:334,convert_value_to:314,resum:566,"374r":412,spider:177,"20rai":492,whiz:334,test_rot:349,"_speedlimit":50,safe_isnan:492,unclos:262,dsu:[456,363],at2:[128,450],adapt:354,plot3d:349,dsd:257,dse:471,jpeg_qual:[402,297],tex_unicode_demo:[216,200,214],navig:[228,149,398,504,527,297,235,507,210,402,5,530,214,265],abramowitz:235,midpoint:[497,492],tricontour_vs_griddata:[216,200],toolitem:[421,297],element:[38,491,177,312,5,266,83,129,492,352,96,87,357,426,536,499,58,243,294,149,167,208,168,434,297,583],alert:566,useblit:[34,92,104,573,507],aspect_loglog:200,figheight:[474,267,149],setfocu:[324,504,76],sankey_demo_rankin:186,offsettextpad:383,confus:[144,257,168,95,297,401,235,497,83,214],clariti:[497,144,423],instruct:[533,207,57,50,299,313,262,7],mingw:228,wasn:510,mspine:525,"f\u00fcr":165,glyp:549,set_zticklabel:349,evolut:497,b95ce2094d189a89f80f5ae52a05b4ab7b41af47:492,get_buff:179,underlin:[541,549],master:[103,243],similarli:[349,83,294,443,395,525,581,401,144,348,5,450,383],rect3:222,rect2:222,rect1:222,listen:[297,362,439],fontext:287,get_minorticklin:383,geneva:402,bymonth:168,catrom:[294,5],tick2on:[348,383],max_val:485,q0x:492,q0y:492,cdata:[491,557],technic:[294,5,395,10,96],validcap:248,myfilt:388,eleg:221,tree:[228,357,207,434,153,388,491,557,492,312,352,103,7,87],project:[83,294,149,297,492,497,262,5,248,265],kelli:235,ahmet:235,cos_latitud:525,treeview:[483,390,382],mathtt:[82,83,354],maptlotlib:566,date_demo_rrul:200,aapl:[566,55,329,159,410,469,264,44],spectrum:[294,5,492,497],stock2:469,increment:[580,229,455,294,492,246,5],infring:224,test_fancyarrow:235,incompat:[103,235,544],inset_ax:[174,450,453],person:[533,199,352],cope:[335,339],"andr\u00e9":165,test_arrow_patch:235,bjornsson:492,get_path_in_displaycoord:248,subplotzero:131,picki:242,simplifi:[83,257,440,525,402,491,235,262,103,85],fmt_ydata:[5,112,157],set_frameon:149,shall:224,object:[541,579],print_bmp:297,microsecond:168,letter:[8,294,499,57,243,235,277,402,149,248,312],cl_xy:83,image_inlin:402,relicens:107,dummi:[314,83,182,499],place:[144,107,38,545,5,7,454,266,83,152,320,456,117,190,276,492,392,238,566,357,497,120,92,499,57,329,22,63,149,450,527,248,579,349,510,294,168,434,584,103,214,438,73],to_rgba_arrai:[83,499],keypress_demo:559,get_dpi_cor:248,mostli:[433,83,257,468,161,510,450],numtick:[527,349,383],"__str__":314,mcguir:439,set_vis:[4,442,63,100,42,36,316,450,226,319,12,13,50,234,405,19,196,54,92,56,222,577,161,203,248,249,471,433,131,589,475,101,401,474],newscalarformatter_demo:[216,200],transluc:[294,5,470,514],"0000ff":393,dx_data:239,labeldist:[294,5],meshwidth:[243,297,83],layout:[566,439,260,83,523,166,92,120,517,294,297,497,22,348,5,145,248,265,549],menu:[143,335,200,380,339],axcb:6,busi:[294,5,543],major_ticklabel:[471,481,101,100,405,203],qwidget:[324,504,76],tzinfo:[294,5,349,383,168],z_test:160,"_draw_lin":248,auxtransformbox:[438,150],set_xlim:[34,0,450,104,256,257,375,443,247,100,42,273,315,5,77,78,146,6,496,83,114,11,151,289,272,387,12,84,183,288,480,191,235,529,169,87,343,356,557,196,197,239,91,198,574,525,360,535,383,294,238,63,349,161,204,65,249,397,471,68,293,385,476,474,263,589,134,584,340,341,32,490,429,438,370],wide:[214,144,92,330,107,498,168,71,229,298,294,224,96,149,7,317],bakomafont:312,ceil:[460,416],p_fanci:247,circeq:354,subseteq:354,mpl_connect:[305,482,378,42,36,347,408,182,43,415,83,239,152,566,50,156,569,54,92,574,242,245,126,430,288,472,332,294,504,346,475,297,210,449,589],hsv_max_sat:[161,499],cursor_bullsey:449,add_collect:[197,11,198,258,99,93,503,235,156,5,6,494,569,205,532],closedmax:92,charcod:363,metadata:[218,9,294,60,66,579],respond:[92,5],default_param:527,fancybboxpath:248,fair:442,padi:346,check_upd:362,nonconst:492,mandatori:[294,297,149],result:[525,144,257,312,262,224,7,44,317,83,527,117,385,235,352,96,492,5,87,354,328,566,465,499,581,283,159,160,362,61,349,248,579,432,543,434,166,294,485,388,401,209,497,136,402,301,438,287],respons:[439,250,464,142,581,101,401,340,585,450,248,266],fail:[166,28,57,492,287,103],ttffontproperti:287,ypad_fract:33,hammer:[257,340,487,149,525],dkernpair:541,best:[303,257,442,107,492,5,7,266,83,235,529,280,497,566,493,286,294,379,149,334,168,434,297,340,209,402,510,287],sidebar:566,"_on_tim":[297,235],heterogen:243,wikipedia:[22,525,544,492,340,457,402,177],copyleft:107,figur:[541,579],emptor:492,alpha_oth:500,men:[428,436,178,568],schwarzkopf:96,extend:[439,556,257,395,348,5,181,317,83,489,10,270,561,117,235,392,492,539,353,499,121,160,64,259,149,289,248,349,294,416,339,173],detrend_linear:[294,5,492],extens:[149,294,168,297,287,96,83],navigationtoolbar:[83,504,337,351,235,126,507],extent:[373,476,343,259,41,262,5,146,383,266,414,83,13,65,565,566,392,450,196,481,240,242,581,505,94,577,161,64,248,433,434,167,294,300,477,212,173,201],wth:450,toler:[472,352,54,347,242,589,243,297,42,36,22,96,248],advertis:214,"w\u00fcrtz":[257,235],hashabl:[83,38,248],argur:579,manual_loc:392,piti:235,vbox:[390,83,257,504,337,351,312,126,421],logic:[25,257,442,93,108,235,223,492],box_align:[438,535],login:[228,214],browser:[557,54,257,38,337,491,330],preccurlyeq:354,numtest:498,rotate_deg:[476,434,405,259],pgf_with_rc_font:317,threshold_tim:240,"2nd":[566,294,320,498,100,235,348,492,587,383],setapi:470,diff:[10,566,199,57,435,222,588,44],limitedli:581,normpdf:[529,280,542,492,209],assum:[0,74,443,5,179,144,383,266,228,349,272,297,527,492,277,352,238,362,149,248,433,397,166,294,168,434,31,402],hms0d:168,duplic:[27,257,492,235,61,136,96,301,214],bootstrapindic:584,union:[434,235,566,83],navigationtoolbar2:[297,83],fri:382,on_kil:580,arrowtip:[294,5,248],much:[439,442,545,5,7,83,50,525,527,492,235,532,423,357,91,566,57,103,287,379,577,248,294,401,402,172],ylgn:[403,497],"__doc__":[465,214,525],linelength:[294,5,243,197,455],life:[566,38],numpyrecord:492,sawtooth:[581,499,248],fontspec:317,fourier_demo_wx:200,get_width_height:[324,297,83],ani:[303,403,439,74,248,257,442,107,224,38,243,545,492,312,558,5,144,7,347,383,413,266,500,228,83,268,434,440,153,117,49,544,235,277,278,493,96,238,317,354,423,566,357,352,120,92,464,499,199,57,122,95,402,550,315,121,218,22,379,149,521,162,525,579,349,68,207,581,169,353,208,168,583,519,294,297,401,340,103,214,438,370,287],"25x":280,pytz:[257,402,235,168,330],child:[150,434,121,122,498,297,401,96,5,438,248,266],"2n2":7,davi:257,emploi:330,set_titl:[442,36,5,6,145,584,11,151,319,152,455,457,17,466,158,333,470,24,472,473,337,178,340,341,507,34,35,175,343,483,42,347,181,183,44,349,187,498,351,352,522,197,54,198,56,58,361,205,67,367,210,508,223,382,496,524,235,529,390,391,566,93,242,247,365,249,177,403,106,108,409,263,412,266,562,436,463,569,571,427,123,125,126,222,288,578,433,294,435,563,589],plot_day_summari:231,yref:190,triangle_left:[294,5,248,448],euclidean:492,unix2do:228,pickabl:[248,242],toolkit:[574,83,107,121,492,7,265,330],maxdict:38,set_3d_properti:[367,349],"_annotationbas":[235,248],notimplementederror:[83,346,525],zoom_effect02:77,label_mod:[433,391,481,94,505,300,450,553],zoom_effect01:77,credit:[228,265],output_dim:[434,544,357,525],transpar:[357,149,83,294,485,583,360,233,492,362,5,112,17,248,173],process_projection_requir:[357,83],split:[83,197,391,257,465,434,456,259,122,294,233,492,395,469,96,179,5,522],get_zscal:349,lrcorner:354,rownum:382,get_tag_t:179,window_ext:348,fairli:[19,144,277,354],subtanti:492,undamp:[279,79,437],figurecanva:[380,347,348,83,271,562,76,351,235,324,390,21,125,126,149,248,333,335,337,339,297,504,449,507],refin:[290,524,257,283,160,401,235,96,156],parlanc:287,tune:[294,431,497,524,120],mathtextbackend:312,get_height_char:541,hsv_max_val:[161,499],set_agg_filt:[161,248],gzip:[492,38],unchang:[83,294,38,434,5,330],ordin:[83,168],xelatex:[118,530,235],previous:[83,434,257,337,121,122,294],sankey_demo_link:186,timedanim:[169,579],lognboot:584,ham:[294,5,492],easi:[291,83,10,428,566,499,168,58,475,421,13,352,96,214,541,287],pprint_sett:248,had:[83,91,257,353,468,450,7,541],hax:365,set_zlabel:[400,349,441,466,220,84,367,394,211,204,451],contains_path:262,east:357,hat:[570,354,62],tick_formatter2:405,tick_formatter1:[100,401,12,405],units_sampl:[350,200,465],quirk:566,preserv:[349,149,257,499,337,57,294,584,340,5,383],get_yticklin:[566,5,489],textwrap:38,fontdict:[349,149,294,235,497,103,5,383,81],set_axis_bgcolor:[5,17],shadow:[444,36,5,266,149,440,388,236,530,87,14,53,536,537,282,222,161,248,587,294,29,424,402,214,438],truetyp:[439,235,287,402,522,312,412,330],sqsubset:354,nvert:[385,68,293,205],labelarrai:346,path_effect:[53,357,149,294,235,22,545,5,248],double_pendulum:[214,413],nonredund:492,symmetricallogtransform:357,underli:[439,144,434,385,294,473,153,525,95,421,401,492,312,262,402,5,214,579],onreleas:[92,408,305],fancybox:[402,53,83,514,257,442,99,149,294,36,537,222,5,266],right:[326,444,448,5,316,7,161,149,319,320,13,155,329,22,450,24,471,166,474,485,33,480,481,177,349,188,190,191,352,566,356,357,196,498,56,360,201,62,63,203,576,67,68,214,501,403,517,383,226,83,524,231,387,525,526,238,89,391,91,92,240,94,244,248,99,434,101,401,553,255,256,107,395,100,261,405,262,266,416,114,584,536,463,280,19,120,281,282,123,505,222,20,289,580,130,293,294,131,297,438,583],old:[83,442,326,122,545,348,527,322,235,352,247,385,382,225,248,423],moran:217,crowd:532,get_clim:[250,362],axfreq:384,manuel:[257,462,555],amap:492,get_angl:541,"_axinfo":349,bottom:[443,312,448,5,316,145,584,149,319,326,471,22,450,24,25,332,166,335,336,337,178,339,490,340,33,174,35,482,177,346,347,348,349,190,352,356,357,196,198,499,56,360,201,385,203,68,208,501,403,374,517,222,383,226,83,523,524,231,525,86,235,238,260,239,91,566,242,581,244,302,248,550,391,99,251,434,401,402,553,255,384,257,109,100,405,412,266,268,272,436,273,277,463,568,280,19,184,120,427,123,429,94,430,521,289,578,23,433,293,294,131,297,583],xbound:149,namepf0:492,namepf1:492,"0x22f5488":[294,5],princip:492,subclass:[257,348,312,314,5,383,83,525,527,243,357,92,240,499,500,294,545,248,579,580,434,169,297,553],circ:[305,12,401,340,314,354],fof:492,condit:[580,108,492,352,223,224,494],foo:[336,38,94,95,62,402,24],dashrot:[375,248],badmask:83,sensibl:[83,257,168,294,5,137,214,412],stefan:235,gs2:[431,433,578],axistext:83,set_ec:[481,248,388],set_drawing_area:83,axes_row:391,emitt:[574,370],figurecanvaswx:[21,335],shirnka:581,slightli:[357,257,153,294,340,352,262,402,5],gtkliststor:390,despair:277,namepfn:492,coars:[96,160,543,492],downharpoonright:354,append_column:390,soc:566,plotfunc:[294,254],basenam:[324,233,465,76],an3:356,fontclass1:312,"_update_patch_transform":346,radar_chart:186,fontclass2:312,creativ:[492,462],tr_rotat:405,liberationsan:522,wrap:[497,297,83,38,579],"_size":247,stackrel:[312,354],embedding_in_wxagg:83,suffici:[257,525,297,96,248,470],support:[303,450,317,74,556,480,442,262,38,395,348,491,357,168,5,223,144,388,347,412,266,228,83,11,492,440,153,117,566,12,235,548,243,280,543,233,87,465,423,349,328,198,296,330,574,499,581,108,402,394,433,362,287,218,246,379,149,161,122,248,525,24,580,165,385,579,166,476,51,337,346,570,294,297,401,340,490,103,527,439,214,438,312],happi:88,avail:[303,205,257,326,313,5,224,7,317,228,83,229,248,235,277,579,354,423,357,92,581,286,543,287,149,85,549,349,294,99,133,334,401,340,402,214],width:[174,272,150,443,149,63,110,251,262,5,316,78,312,383,266,452,83,453,275,549,271,231,517,76,273,248,247,190,178,568,324,238,494,87,326,14,226,290,120,198,240,510,331,540,243,429,201,22,222,128,161,203,153,127,25,291,436,434,579,166,294,29,99,366,498,446,346,339,388,297,566,485,335,214,553,541,287],unit_rectangl:262,add_column:390,raise_:179,exec_kei:579,overhang:[294,5,248],lnsim:354,pyplot_api:424,full_screen_toggl:297,offer:[566,492],recommend:[303,214,144,566,294,581,328,543,58,348,297,401,468,218,96,5,450,7,497,433],refcount:235,flexible_false_trait:393,userland:[276,340],namedcolour:[449,335,380,339],type:[512,138,205,74,38,395,545,491,312,262,314,5,83,50,229,153,248,420,233,492,243,531,390,557,198,493,465,499,57,393,362,22,222,149,527,85,580,434,294,498,168,368,297,137,214,507],pgf_with_custom_preambl:317,histtyp:[294,5,542,235],rerun:352,sampl:[566,584,439,83,560,294,38,445,348,100,401,492,485,380,103,5,413,325],enter_figur:[245,347],z_expect:160,utc:[83,393,294,168,360,402,5,112],autoscal:[349,83,294,499,527,168,191,235,497,5,6,362],subtriangl:96,exist:[257,42,179,5,522,228,83,153,190,233,235,96,492,354,423,557,497,92,465,121,393,456,362,22,149,450,248,541,294,133,434,340,103,478],get_data_ratio:[5,357,525],set_zord:[566,248,563,521,388,87,161],get_rasterization_zord:5,mpl_disconnect:[332,83,294,152,297,347,43],longleftarrow:354,nx4:[83,499],nx1:[294,5,443,544,190],nx3:499,nx2:[434,525,262,38,248],adj_clos:[566,294,442,55,435,329,159,360,311,222,44,254],relax:566,cmbook:83,actor:3,keyut:566,flood:260,role:[450,214,144],crossov:[223,108],presum:492,roll:[353,161,347],set_url:[167,243,297,248],legitim:107,relat:[357,83,153,40,491,352,363,248],intend:[402,349,328,476,121,122,229,257,357,492,294,262,103,5,248],drawdc:21,asterisk:[243,448,262],intens:[402,393,257,440,294,492,16,302,324,5,532],intent:64,fmt_zdata:349,interval_contains_open:83,svgfont:402,movavg:492,"_draw_fram":169,cycl:[542,217,83,239,294,38,75,158,243,100,401,409,168,402,5,450,205,492],nxy:156,mpltool:[458,99,235,439],base_repr:492,geometr:[96,434,330],"_draw_dash_dot":248,time:[482,304,439,139,442,443,141,142,3,5,7,8,152,320,76,13,321,455,322,16,324,464,465,466,22,469,450,330,471,472,26,332,333,547,334,168,340,341,171,507,38,347,348,43,183,349,45,46,492,352,192,170,193,354,357,497,54,55,57,202,379,318,85,365,207,213,214,513,144,377,221,153,381,79,81,228,83,229,525,527,235,243,23,532,88,239,536,279,345,95,541,302,248,97,294,402,109,413,560,417,271,440,419,566,277,422,122,286,289,579,580,543,293,581,434,134,297,437],push:[533,228,357,10,580,498,375,38,57,297,340,312,493,179,248],linelengths2:455,linelengths1:455,mathrm:[82,83,442,485,394,62,529,145,354,226],osx:[335,228,491,313,339],doteq:[354,62],chain:[434,499,75,235,22,340],affine_transform:83,pie_demo:[465,388],formatterhm:405,choppydata:362,millisecond:[580,297,152,579],decid:[353,541,580,566,579],herebi:[229,224],decil:498,decim:[190,294,498,584,492,402,5],pen:[385,262],numerical_method:[257,83],celltext:[294,5,260,51],figwidth:149,vee:354,decis:83,metalogo:317,"_cached_im":429,colwidth:[294,5],strip_chart_demo:461,oversight:83,yerr:[471,571,428,18,106,178,492,294,436,361,235,540,568,5,488],randomst:[160,205],qvariant:402,rec_append_field:[492,44],pcolor_log:[216,200],get_dash_joinstyl:248,doku:222,setcentralwidget:[324,504,76],exact:[83,294,442,38,57,337,492,340,287,5,7],room:[360,260,83],weekformatt:231,draw_circle_patch:177,solver:[96,466],draw_regpoly_collect:83,score_famili:287,overid:581,unsupport:[257,402,566],quartil:[294,5],prevent:[38,405,81,83,525,235,323,357,184,92,56,158,581,286,287,544,430,433,434,334,209,402],value_unescap:287,minion:257,missmatch:235,compens:[247,349,83],mapmak:497,sign:[348,50,235,277,324,567,289,248,354,312],on_pick:297,sigv:439,get_major_formatt:[348,383],fixedloc:[527,544,405,525],lazili:83,gcface:83,contour3d_demo:200,"_howto":214,style_out:179,current:[0,217,74,248,326,262,38,142,312,5,179,144,563,7,383,266,228,83,190,434,272,153,85,49,527,492,96,156,566,533,357,497,120,92,57,58,243,362,121,545,149,287,203,205,318,250,397,166,167,329,133,168,294,297,490,438,583,254],ground:440,boost:[492,64],langl:354,get_fram:[83,514,29,50,36,442,222,5,14,266],autogener:[214,235],mencoderwrit:579,modif:[257,294,83,208],address:[103,257,566,235,199],ratio:[357,83,434,120,294,465,587,243,121,149,160,110,234,492,96,247,5,213,525,248,555],along:[512,304,257,326,544,100,5,228,349,492,243,357,158,22,127,83,450,248,434,294,297,401,340],gettoolbar:[334,286],pass_through:434,xpdf:[257,402,543],checksum:153,gauss_filt:161,queue:[492,576],digamma:354,commonli:[328,497,294,340,5,354],ourselv:340,mutation_s:[581,248],show_progress:38,takafumi:235,on_chang:[92,384],dtype:[566,291,442,307,240,499,263,492,565,160,450,235,246,429,311,161,264,146,65,532,423],prefer:[411,214,83,423,294,117,21,287,144,457,5,58,317],get_theta_offset:357,fake:[557,491,250,484,583],instal:[294,492,83,287,265],set_fillstyl:[248,448],demo_simple_imag:13,filter_func:[297,248],font_output:312,logo2:186,arrow_patch:53,give:[403,150,257,442,326,107,149,542,492,448,519,5,7,8,10,235,352,243,238,539,423,533,497,120,566,499,573,199,21,581,362,83,550,294,168,297,299,402,583],button_press_ev:[305,294,297,86,42,341,347,408,156,288,589,507],wood:177,strip_math:[297,38],get_dashpush:248,scope:[574,370,544],get_geometri:[5,120,190],divideontim:354,topical_softwar:[332,43,574,23],peopl:[294,5],inset_locator_demo2:135,enhanc:[34,303,439,104,442,21,297,235,379,423],ndenumer:460,visual:[25,460,144,442,353,106,499,57,584,177,497,22,328,375,248,532,423],appendix:492,"_base":[581,83,248],line3d:[349,235],get_boxstyl:248,line3a:169,easiest:[303,566,493],analyt:[160,492,442,283],useoffset:[294,5,527,429,225],nullfmt:273,descriptor:354,hline:[83,365,92,294,497,235,448,5,248,495],whatev:[107,153],draw_callback:[42,589],problemat:379,binedg:83,drawtyp:[92,573],stackexchang:317,button_bar_s:380,annotate_with_unit:[200,465],grab_mous:297,halldor:492,text_demo_fontdict:[200,359,465],trisurf3d_demo:[200,538],winter:[403,497,294,259,94,181],gridspecbas:120,get_ticks:326,ellipsecollect:[503,243,83],trianglelefteq:354,demibold:[357,149,294,287,5,248],hinting_factor:402,set_hatch:[243,490,297,510,248],parameter:166,atan:544,reserveobject:95,spot:485,checkbutton:[92,4],iter_seg:262,succ:354,add_collection3d:[211,349,117],date:[5,83,38,383],r2v:485,data:[1,139,9,544,445,142,542,312,5,149,455,392,96,156,24,17,463,18,329,159,160,22,469,162,163,472,332,510,29,336,168,31,32,171,478,577,38,484,177,485,315,181,182,44,46,498,492,14,355,356,357,497,197,54,198,55,477,499,57,360,361,362,500,203,205,66,68,504,208,367,449,209,508,214,370,74,150,375,377,517,519,223,525,383,83,229,527,524,526,86,236,529,238,539,23,532,390,260,90,91,92,240,242,482,95,243,302,246,545,248,250,458,424,434,103,403,256,106,108,109,110,262,112,239,271,535,584,273,276,278,422,19,283,287,222,128,579,290,292,130,293,294,435,134,297,586,137,438,583],max_weight:460,indexloc:[527,168,24],disable_interspersed_arg:465,uparrow:354,quadrant:495,get_daily_data:469,callabl:[580,349,149,268,581,257,443,347,242,122,190,297,357,492,294,22,545,5,450,248],artist_refer:200,ordinarili:499,zmax:[334,349],lighter:[402,439,561],axesimag:[560,294,242,121,347,348,5,85],beaumont:235,hastrait:393,"__future__":[513,373,139,233,525,544,377,415,141,76,109,311,3,546,179,111,264,43,500,475,382,363,23,417,229,271,116,86,456,420,50,322,16,324,408,193,87,531,532,543,88,332,239,55,465,573,242,482,159,393,421,124,245,62,502,445,82,289,97,163,580,549,165,41,334,504,30,346,422,378,134,31,170,210,171,478,507,302],flipi:[332,482,109,297,302,23],symlogx:486,gitignor:235,ttf:[83,95,287,363,522,51,549],histogram_demo_featur:200,rougon:[324,76],disconnect:[297,83,92,347,38,500,294,86,235,262],thumb:[233,10],titles_demo:[216,200],jim:[458,439,114],pythonpath:[103,402,7,133],fignum_exist:83,accented_text:200,gaussianfilt:161,markerlin:[294,5,308],sorter:38,answer:464,"_facecolor":349,filledmarker_demo:200,therebi:83,get_matrix:[434,357],"_autoscalexon":5,text_rotation_relative_to_lin:[216,200],unitresolv:314,didn:257,revert:[289,542,235],win32:[303,228,465,439,235,287,402,522],draw_fram:[50,177,266],quarter:340,joinstyl:[95,186],compil:[40,393,566,580],dfile:[532,163],gradient_bar:200,get_recursive_filelist:38,newval:382,sponsor:439,fontstretch:[294,5,357,149,248],update_unit:383,canvas:[324,297,76,58],hct:96,lyopc548:289,ptmbo8r:153,min_circle_ratio:[96,160],onpaint:[335,380,339],internet:112,formula:[248,413],orig_posit:485,"__builtins__":179,million:[222,548,157],seventh:462,"_kill":580,default_test_modul:352,fontsiz:[255,304,516,318,442,444,445,379,447,177,312,520,5,181,145,79,316,266,267,83,114,229,14,578,116,340,50,277,155,238,226,389,354,543,88,357,462,481,392,282,122,402,550,433,403,62,222,149,161,82,248,412,185,459,26,349,398,294,29,474,366,346,570,435,584,170,341,489,103,268,583],xerrcollect:83,"byte":[362,439,499,442],ntrianglelefteq:354,afmfontproperti:287,size_bar:150,stinkbug:[214,423],get_orient:243,gridline_interpolation_step:177,underline_thick:549,get_frameon:149,oper:[303,257,107,314,5,525,317,83,523,388,420,527,492,352,354,566,464,499,122,95,379,248,330,543,434,168,294,297,340],subplots_adjust:[216,403,482,109,19,177,405,145,149,45,46,231,387,321,419,192,571,497,239,498,94,158,200,302,63,161,23,25,332,294,505,584,33,172,583,501],onc:[303,144,442,312,348,5,6,228,149,11,46,525,492,352,96,357,566,95,402,61,379,579,294,434,297,299,136,103,301,214],inline_spac:[294,5],xlen:[71,307],new_loc:[190,443,234,13],submit:352,axesdivid:[190,468],usetex_demo:[216,200],open:[442,107,38,491,435,111,224,112,7,317,83,153,235,532,423,566,465,95,360,287,62,222,469,82,541,294,133,346,297,340,402,254],fillp:[95,235],p_wait:229,pdfpage:[83,566,95,60,294,149],breviti:584,b_and_h:429,fmt:[53,357,83,294,38,168,248,462,527,361,429,540,392,103,5,161,422,181,492],imshow:[174,403,439,1,242,257,481,343,508,259,433,41,373,558,577,348,5,146,450,334,414,83,386,417,319,402,13,564,565,49,234,235,567,323,119,532,423,566,194,53,89,497,300,92,240,505,392,499,94,252,244,250,121,149,161,64,65,163,478,531,473,167,504,286,583,476,294,210,477,212,509,137,214,438,215,173,201],get_fully_transformed_path:434,paramt:266,conveni:[402,349,83,434,10,257,401,492,294,357,235,312,144,348,5,450,525,497,248,354,317],transform_angl:[434,304],adjust_bbox_pdf:235,programat:349,verts1:243,artifact:[402,328,257,168,294,235,96,5],fancyarrowpatch:[294,5,214,248],test2:[247,155,492,122],yearloc:[360,112,83,168],set_history_button:297,yorig:0,arr_ada:292,ivanov:[50,235,439],get_agg_filt:248,iceberg:312,start_anim:[332,43],setattr:314,boxin:[434,83],figurecanvasqt:576,get_dashdirect:248,parse_arg:465,banner:[179,580],ttemplat:465,param1:357,onscrol:210,plot_pre_cod:214,typographi:340,sai:[83,499,57,340,352,235,583,507],minorloc:[275,276],san:[317,357,149,268,294,99,485,284,368,543,287,411,402,5,82,248,354,312],nicer:168,argument:[38,312,5,383,266,83,85,492,96,357,497,499,121,95,243,362,287,22,149,248,579,294,168,297],heck:541,ticklabel_direct:401,sat:[382,422],ax2:[34,442,108,127,100,261,405,347,223,77,496,526,490,524,46,578,272,320,563,13,232,455,498,234,537,396,348,566,356,53,19,54,92,240,242,58,123,581,245,222,473,450,539,397,25,431,433,67,294,398,476,296,169,101,401,369],ax3:[442,108,405,223,524,46,272,232,234,539,53,566,537,431,222,578,25,433,397,398,169,296,490,563],ax0:[361,56,158],ax1:[174,442,443,108,127,100,261,405,347,223,77,146,496,526,560,490,524,578,272,320,563,232,455,498,12,234,567,537,396,348,566,356,53,584,92,240,56,242,58,123,581,361,245,222,158,539,25,431,433,67,397,398,476,296,169,294,401,369],ax6:431,floatingsubplot:405,ax5:[431,578],image_mask:[200,83],destroi:[390,144,92,427,562,337,121,430,297,312,126,179,83,507],u0001d538:[82,62],maintain:[439,144,248,402,234,468,497,277,22,348,83,450,85],take:[74,257,442,38,100,312,262,348,5,83,440,153,110,190,191,235,277,352,323,96,492,531,423,357,566,493,465,499,57,122,581,543,362,242,544,349,450,527,248,291,433,469,294,337,168,401,340,137,214,371],ax_cb:13,noth:[580,149,92,38,40,294,297,448,544,5,181,527,248,507,579],disconnect_ev:[92,500],is_dash:248,configure_subplot:297,buffer:[95,83,294,38,482,21,473,492,312,347,179,5],compress:[38,402,492,314,330,579],bar_stack:200,abus:229,yearfirst:492,get_siz:[243,443,248,287],poly3dcollect:[349,117],pages:83,mpl_toolbar:504,withsimplepatchshadow:53,butterworth:257,textarea:[150,535],filemoviewrit:579,get_solid_capstyl:248,phil:[257,280,439,235],sale:492,plot_direct:235,imagebox:[292,535],dvifont:153,axi:[5,83,248],preambl:[402,118],get_figheight:149,transformedbbox:[434,33,77,429],set_zbound:349,syle:[491,549],ddag:354,luminos:423,atom:497,figure_canva:449,subprocess:[229,235,257,83,465],linestyl:[138,257,545,5,6,383,83,489,11,270,480,584,85,420,235,277,243,566,92,195,393,22,222,248,160,294,498,70,297,585,32,402,214],bright:[403,497],stackplot:[342,497,69,294,235,5],virtanen:235,properi:248,gridhelperrectlinear:401,"0x134acbcc":348,score_vari:287,xml:[557,334,388,491,87,507,330],slow:[294,50,379,31,492,222,5],slop:334,neuroimag:[440,497],mydata:103,activ:[439,144,384,257,42,5,112,228,149,10,235,390,92,573,57,95,63,577,543,294,337,339,297,402,511,589],otim:354,demo_rgb2:146,fespecularlight:388,pprint_val:527,get_name_char:[541,83],add_opt:465,subplot_loc:391,get_loc:[190,383,168],plot_masked_tri:160,set_varlabel:177,pncri8a:312,requir:[228,83,541,28,107,499,38,149,92,294,492,287,262,5,214,511,312],embedd:353,prime:[128,450,150,354],tikz:[235,317],backend_cairo:235,artist:579,longest_contiguous_on:492,borrow:[580,287,388],xmax:[34,373,480,312,262,315,77,349,134,525,492,277,5,495,201,83,547,549,434,294,172,507],warmli:493,where:[243,38,395,149,19,485,380,262,223,5,6,182,266,228,8,10,11,527,525,274,276,492,463,493,96,280,357,497,499,93,57,108,421,361,61,22,222,83,283,248,290,580,434,541,294,560,208,168,334,297,136,301,214,215,371,287],invert_xaxi:[5,235],scalable_s:446,the_grid:424,get_verticalalign:248,blit_tim:23,get_bbox:[50,248],mencoderfilewrit:579,outtext:289,signalsmooth:161,arglist:465,linewidth:[512,35,480,307,308,259,127,542,104,485,5,6,181,226,27,83,425,11,248,452,420,521,392,243,280,381,193,569,495,52,37,53,444,90,92,195,282,121,158,545,160,383,309,22,222,149,161,283,64,85,489,290,291,481,130,393,169,70,71,294,297,298,341],use_mrecord:[492,83],maxwidth:446,hrule:312,cumsum:[442,542],transprojectionaffin:340,murrai:235,colormapjet:[83,163],char_class:312,inputenc:[402,317],x22:217,streamlin:[497,257,440,565,294,127,5],spars:[83,257,294,492,96,5],longleftrightarrow:354,screen:[566,304,357,144,229,208,294,297,543,492,277,243,83,423,412,66],mscale:544,composite_transform_factori:434,gappi:[402,130],tick_out:326,finance_demo:[200,83],leftleftarrow:354,inax:[297,305,294,86,31,42,245,347,449,156,182,589],get_axes_loc:5,tdata:[574,370],msvcp71:303,set_ticks_posit:[174,196,463,319,56,525,352,383,226],clipbox:[5,248],mani:[303,439,144,257,107,38,518,262,348,5,6,7,228,83,10,11,440,153,525,566,456,235,277,352,492,539,354,423,497,353,465,58,95,393,544,248,330,541,294,434,214],checkrow:[294,492,83],"_get_lin":103,blueredalpha:583,yearli:[389,168],key_release_ev:[294,297,347],twin:[471,5,101],figtext:[497,294,584,177,412,226],anth:[100,401],tricontourf:[349,83,294,575,283,497,61,5,193],transx:83,white_glow:161,rec_edit_gtk_simpl:[200,534],"00bfbf":393,markerobject:95,stretch:[349,149,294,499,492,243,357,340,287,402,5,248,312],ncolor:[137,499,173],gridspecfromsubplotspec:[431,120],get_annotation_clip:248,bar_demo2:[200,465],setknob:341,gist:497,polygoncollect:348,thousand:[439,523],resolut:[373,177,5,181,266,83,492,96,330,283,160,149,248,579,494,434,294,297,340,477,402,137],drawstyl:[257,5,294,248],do_fonts:485,breve:[570,354,62],simple_axisline4:135,switch_orient:243,label_text_s:485,line_collection2:[216,200],colorbar:[5,83,362],xmajorformatt:527,mgrid:[1,99,220,188,565,477,127,137],dataind:[472,54,347],showfil:492,qvboxlayout:[324,504,76],canon:[348,434,144],policy_nev:390,blah:83,summar:[159,348,492,340],myapp:[334,380],offset_copi:[340,161,87,208],bigwedg:354,ascii:[214,297,492,457,82,330],"__init__":[0,2,305,38,314,110,42,338,380,347,179,449,228,83,239,464,271,589,150,76,525,50,16,352,335,324,156,422,390,357,210,54,240,465,574,500,482,96,286,429,302,544,222,161,248,249,24,580,250,393,169,504,346,339,334,31,586,341,32,171,103,581,214,438,370,507],barbcolor:[294,5,246],ssglue:312,line1a:169,radialloc:357,brainvisa:439,fewer:354,set_gamma:499,set_smart_bound:[545,383,463],binari:[403,228,83,294,107,492,497,215,579],yaxis_spac:525,inconsist:[235,83],pushup:498,damon:[257,439,235],xrcfile:334,rightout:492,subdomain:[294,5],offset_filt:161,set_label_text:383,bkblaqgryeorreviwh200:497,transformwrapp:434,utf8:214,artist_list:[161,446],hboxdivid:234,art3d:310,extern:[303,543,83,257,326,440,153,566,235,103,214],newstr:287,cmap_categori:403,shading_exampl:[216,200],invertedsymmetricallogtransform:235,clobber:235,connector:[257,248],"_reset":[50,83],dimension:[294,5,243,270],bigotim:354,summer:[294,403,497,94],triangles_arrai:297,rest:[357,83,257,258,566,297,103,144,214,248,423],r1postfix:492,valfmt:92,score_stretch:287,gdk:[402,390,144,580,393,262,179,507,330],"_clipon":83,idle_add:[332,239,417,574,377,48,43],set_va:[401,248],littl:[566,83,523,10,257,583,363,498,419,192,144,214,51,183,354],polar_legend:[216,200],subplotbas:[5,83,235],is_scalar:[499,38],tooth_siz:[581,248],get_dx_data:239,axisinfo:[314,83,74,24],rotate_around:434,skiprow:[294,492,83,502],xaxi:[174,480,486,410,5,348,111,112,525,146,383,226,83,527,319,231,320,276,273,454,275,191,234,352,450,389,566,460,19,196,463,239,198,55,56,329,360,429,349,161,203,248,249,25,294,474,498,422,401,340,225],around:[257,442,38,312,262,5,266,149,523,235,277,352,323,354,423,357,497,499,95,581,433,246,247,83,450,248,431,349,294,335,168,339,434,297,401,340,402],lockdraw:92,dark:[294,403,584,566,497],set_border_width:[390,125],pop:[2,144,544,38,379,50,177,312,235,103,83,569,249],world:[349,257,153,566,224,450],grid_help:[100,401,12,405,567],sum_:[318,543,170,438,354],exampleinfo:83,extgstat:95,dpi_scale_tran:[340,205],stationari:337,integ:[149,312,347,5,266,349,76,190,527,235,277,96,492,422,532,357,92,499,122,324,362,83,248,163,294,498,168,434,297,402],trirefin:96,can_pan:[5,357,349],"_static":214,on_select:346,manag:[303,439,139,257,347,109,3,262,7,228,83,10,417,576,235,277,352,421,390,357,497,353,58,95,286,287,430,149,289,248,470,579,21,543,293,294,134,297],lesssim:354,indmax:34,fix_minu:527,can_focu:507,yellowgreen:587,"256x256":[532,163],strogatz:492,get_affin:434,set_arrowstyl:[326,248],texttag:179,definit:[497,294,561,273,388,235,312,544,103,214,87],canvasfram:[449,335,380,339],evolv:354,exit:[580,149,134,229,271,427,76,482,109,294,380,324,23,465,302],leapdai:168,scalarp:38,selectfromcollect:500,notabl:[294,5,354],fullrecord:566,refer:[83,294,38,85,95,243,297,383,312,497,96,5,527,248],linema20:222,timeout:[88,149,580,294,38,76,297,324,378],power:[439,217,328,560,294,240,561,416,440,527,492,497,5],bivari:492,ration:[257,581,235],get_ticks_posit:383,reorder_child:[421,507],starttim:[271,16,302],standpoint:423,"__name__":[150,544,179,177,485,314,316,525,234,33,280,460,54,465,500,123,286,156,289,580,334,504,338,171,449,42],trianglerighteq:354,contour_manu:200,imsav:[294,235,83,497],rotate_axes3d_demo:[200,538],charnam:363,x_dot:466,neighbor:[83,257,492,287,323,96],act:[149,257,464,434,492,235,294,5],weight2:287,mean:[373,144,257,442,347,5,182,83,229,116,547,492,352,579,354,533,54,242,283,159,581,57,22,149,450,248,330,290,472,349,294,337,401,209,136,301,371,61],rebuild:[228,7,121],axhspan_demo:200,stemlin:[294,5,308],effici:[439,144,484,5,6,383,83,11,85,492,243,357,91,465,499,205,379,385,248,294,297,340],get_metr:312,path_data:[99,582],lessdot:354,font_class:312,pivot:[294,5,291,246],rightharpoondown:354,charli:[257,439,440],set_x:[50,248,346,347],test_simpl:352,tdrive:465,hex:[8,294,499,363,393,297,402,5],set_canvas_s:312,set_i:[50,248,346,347],set_l:[316,248],set_m:248,freesansboldobliqu:522,set_c:248,to_rgba:[11,211,499,362,312,155,156,205],eqcolon:354,labelspac:[83,294,149,177,402,5,266],patch_collect:186,bundl:[566,297,543],numsal:492,categor:[159,352],pick_event_demo2:559,viewport:[277,125],tripl:371,darken:[499,248],get_scale_doc:357,shallowcopi:83,get_fc:248,creat:[38,312,448,262,5,383,83,576,527,492,96,497,120,92,499,121,95,243,287,22,149,248,579,21,294,168,297],certain:[462,465,242,223,287,262,103,85],risingdotseq:354,testmeta:498,autopick:527,cleanup_path:262,googl:[303,167,442,440,235,214],get_data:[504,297,177,248],scale_by_freq:[45,5,492,294,321],abolish:83,arcsin:[354,525],collis:402,writabl:[133,312],is_unit:434,get_flat_tri_mask:[96,160],slant:[294,5,153,395,556],surfac:[432,349,294,499,462,566,492,5,27],rcparam:[481,149,491,447,409,5,316,317,349,23,563,235,457,243,280,266,354,462,239,120,392,241,537,284,286,543,287,83,85,249,579,433,294,168,297,170,402,214,438,583],isinf:492,fresh:144,artistinspector:[257,248],mask:[372,439,257,442,262,38,314,110,312,519,223,5,181,182,565,83,560,11,274,544,492,240,96,17,357,499,93,108,160,362,61,246,349,283,290,291,130,294,296,371,136,301,173],tricki:[217,68,293,566,379,7,354,317],mimic:38,mass:413,adam:235,cpp:[103,235],tokil:580,cpu:[439,183],scm:313,attrd:347,darkkhaki:584,progresscallback:492,consider:352,illustr:[442,343,108,348,488,347,223,181,44,151,525,50,277,392,96,539,17,354,462,566,93,242,543,245,64,205,250,208,296,583,524,103,301,214,73,173,254],sca:[294,149,348,83,497],histogram_tkagg:200,code:[38,312,262,5,265,266,83,153,248,527,492,243,357,92,21,96,22,149,85,294,168,297],refi_z:96,zoom_to_rect:297,onpick2:242,onpick1:242,colorbar_tick_labelling_demo:200,ft_face_flag_fast_glyph:549,scp:228,onpick4:242,unicode_saf:38,lognorm:[83,294,416,499,188,584,235,5,552],get_horizontalalign:248,xminorloc:527,"__cmp__":314,tail:[294,5,248,22],scratch:566,smile:354,introduc:[340,433,83,257,574,57,122,294,235,352,103,5,370],intc:[111,112,231,410,469],cynthia:497,normalis:[294,5],linthreshx:[294,5,357,349],moreland:497,varrho:354,candid:[379,228,235],linthreshi:[294,5,357,349,486],quantifi:497,atttribut:557,setfieldscount:449,strang:[294,235,426],strand:492,logformatterexpon:527,harri:[294,458],ungzip:38,use_clabeltext:[294,5,53],set_patch_circl:545,sand:402,adjust:[217,443,260,312,405,5,288,496,83,13,525,566,234,352,87,326,357,497,120,92,499,160,468,22,149,161,203,289,471,166,294],small:[257,38,149,177,411,348,5,412,349,268,584,235,323,243,492,354,357,498,402,287,83,450,248,365,434,294,424,367,368,297,103],ellipt:[440,357,248,262],surface3d_demo2:[200,538],krekel:38,quicker:237,contourf_hatch:200,supported_format:579,sync:83,past:[294,5,402,83,566],old_anim:200,pass:[138,2,74,248,243,257,442,544,38,363,348,492,311,312,347,314,5,181,525,228,83,229,76,117,190,527,235,277,352,529,280,14,566,402,357,90,92,241,499,242,95,60,286,550,362,61,22,149,450,85,19,579,580,331,349,434,398,510,294,29,469,168,367,334,297,341,136,103,301,214,370],hex2color:[393,499],hexbin_demo:200,label1on:[348,383],navigationtoolbar2tkagg:[430,427],figbg:83,richard:83,clock:[229,257,193,141],section:[294,499,95,492,103,5],delet:[83,294,38,149,5,579],abbrevi:[294,5,85],method:579,contrast:[92,5,294,423],"_marker":0,full:[144,106,107,38,312,448,347,5,7,317,349,470,235,278,323,492,22,494,357,497,566,121,541,246,222,450,248,434,294,99,485,334,402,214,583],cubehelix:[257,403,497],fancy_arrow:485,unmodifi:[566,493],num2epoch:168,figurecanvaswxagg:[334,335,338,339,21,286,341,380,449],custom_ticker1:200,toordin:168,inher:[257,497,330],get_masked_triangl:96,set_text:[83,54,391,481,12,31,401,405,586,450,248,413],ineffici:492,legend:[418,5,83,248,149],bboxconnectorpatch:77,startangl:[294,5,587],linear_algebra:83,bottom_h:273,prior:[217,83,294,38,75,117,349,144,22,103,5,510,248],blend_xy_sep_transform:83,pick:[439,110,518,36,262,348,5,265,83,527,492,243,87,566,242,284,248,294,168,297,32,137],action:[149,294,465,340,299,144,412],set_autoscale_on:[5,110,349,240],ginput:[88,149,257,294,297,124],diamet:[294,5,288,248],via:[144,38,347,348,5,7,317,228,149,268,117,351,235,352,570,402,19,465,499,57,60,121,125,379,349,294,168,297,103,214,583],shorthand:[545,492,133,570],rtheta:452,rgb_to_hsv:499,vim:199,c_3:485,emptyset:354,decrement:492,streamplot_demo_featur:572,select:[357,83,92,527,168,149,95,294,297,383,312,243,5,248],pick_event_demo:[559,83],rgbcmyk:205,is_sequence_of_str:38,stdout:[580,566,465,38,475,402,467,235,179],darkslategrai:[402,8],thisdat:159,minimumdesc:[150,535],legend_hanler_map:266,ncurv:205,clabel:[459,88,53,349,83,185,257,520,462,294,497,392,103,5,161,181],printer:[353,497,235,330],more:[357,149,83,294,499,38,527,383,545,96,297,243,492,287,262,103,5,214,248,541,266],evt_menu:380,set_fonts:[217,489,470,29,58,348,586,248,14],hundr:[103,294],uint8:[331,83,294,473,362,312,262,529,5,423],aleph:354,specout:388,sourcecod:214,cach:[579,318,228,543,83,464,434,133,499,439,168,492,287,262,402,5,7,478,248,312],int_a:226,set_snap:[297,248],endpoint:[290,27,83,283,385,294,19,262,251,158,434,301,492,61,497,136,5,182,248,371],update_default_handler_map:266,widehat:[354,62],stensitzki:[257,235],stretch1:287,"_adjust":5,stretch2:287,wkst:168,uncom:[335,562,126],passiv:297,axin:[174,450,65,453],axistextbas:83,prompt:[580,228,144,294,133,7,423],meaner:439,head_width:[479,83,294,485,581,5,248],registr:64,therfor:349,accept:[257,326,107,38,149,100,448,5,224,383,266,349,235,277,243,357,92,499,500,362,287,22,545,83,248,294,434,401,103,214],autumn:[403,497,294,220,94,127],hidetooltip:557,z_dot:466,huge:235,cohere_pair:492,negfill:312,simple_3danim:461,sfreq:384,"_xaxis_pretransform":525,voltag:[543,318,345,141,202,8,213,381,507,81],simpl:[228,83,28,493,96,499,527,57,149,294,297,492,168,22,103,5,248,287],unabl:[464,235],dencheva:439,variant:[357,149,268,294,107,368,287,411,402,5,248],plane:[349,294,499,117,96,5,27],develop:[497,357,83,85,265],wilei:[294,5,492],test_sub:169,pointlist:248,drawrectangl:576,circumst:[92,294,149],github:[214,83,265],countour:160,mencoderbas:579,pylab_setup:83,ith:[243,492],boxout:[434,83],itc:402,trade:[224,440,435,44,469],button_release_ev:[305,294,346,297,42,341,347,408,589],i386:[7,235],limit_range_for_scal:[357,383,544],scott:508,prev_pixel_offset:239,pane:[349,340],get_x:[436,248],signx:50,vlist:312,ylgnbu_r:394,formatformatstr:492,gerald:257,"_on_custom":339,html:[480,297,228,1,8,393,294,504,99,499,38,424,388,334,286,313,179,83,214,548,318],rapidli:403,evt_paint:[21,339],cross:[42,497,514,492,294,440,122,243,401,235,419,96,5,214,248,412,330],superflu:191,tri:[294,5,492,83,243],view_column:390,set_scientif:527,radio3:528,radio2:528,martelli:38,dzdx:96,dzdy:96,from_valu:434,exec_:[504,271,76],scatter_piechart:186,"_cm":[235,83],autofmt:168,custom_cmap:200,funciton:44,equilater:96,use_fontconfig:[235,287],get_l:248,get_m:248,troubleshoot:[40,265],"_transform":[235,83],achiev:[144,294,320,55,566,83],return_open:38,get_rgb:[297,146,450],iint:354,found:[303,304,257,38,312,262,5,7,317,83,229,235,277,492,266,354,111,353,499,122,287,294,168,402,214],hermit:[294,5],get_width_from_char_nam:541,monoton:[492,539,499,497],procedur:[357,294,133,160,492,5,7,85],realli:[566,164,169,168,434,492,57,64,507,312],zlabel:349,"_segment":83,finish:[88,217,294,493,22,75,566,171,5,510,579],numerix:[439,83],pixelpad:525,reduct:328,quiver_demo:[216,200],triplot_demo:[216,200],mpldeprec:38,research:[497,235],bubbl:[340,149,38],race:114,sparingli:214,recid:566,occurr:[7,287,168],proxi:[566,401,235,38,36],simple_anim_tkagg:[285,200],acorr:[294,5,83,497,396],wall:38,drag_zoom:297,config_axi:121,bumpeq:354,half_long:525,major:[303,439,440,74,257,107,19,168,111,348,144,112,383,228,83,231,527,275,276,235,243,5,402,357,498,329,360,349,248,294,70,584,103],interval_multipl:168,boxplu:354,seta_toolbar:335,get_yscal:5,set_sort_zpo:349,get_memori:183,number:[439,74,426,243,544,347,38,149,100,177,312,448,262,348,5,6,525,383,266,275,228,8,23,190,229,270,272,584,117,118,527,235,464,96,492,494,423,566,402,357,497,120,91,434,240,510,499,242,122,95,160,361,362,22,545,83,450,64,248,470,318,431,549,349,397,579,166,294,498,168,367,420,297,401,170,209,103,581,214,541],tangl:57,message_info:507,"_axes_loc":5,indistinguish:[294,5,349,117],spawnvp:229,devel:[464,228,214],guess:[402,349,83],jet:[403,373,558,316,83,386,417,235,278,243,27,17,423,497,239,286,294,149,494,334,569,251,476,402,73],exponenti:[439,584,492,154,222,81],rec_summar:[159,492],getpoint:248,capthick:[294,5,83,235],ion:[144,294,141,322,500,176,379,497,183],math_to_imag:312,artist_inst:83,point_in_path_collect:262,xit:[235,380,317],set_fontproperti:248,jen:[257,235],transaffin:525,relationship:224,no_norm:[83,499],"00ffff":499,ydate:[294,5],ydata:[374,305,110,42,347,315,182,31,86,528,5,277,421,156,54,92,574,573,242,288,248,294,589,134,297,341,449,370],autodateloc:[294,5,74,168],consult:[103,348,83,57],scatterplot:235,text2d:[349,441],regensburg:492,dvipdfm:153,set_complet:580,prebuilt:303,get_pickradiu:[243,248,383],aat:317,xdescent:[366,150],observatori:168,get_ticklabel:[348,383],figimage_demo:200,arrang:[294,5,581],backend_p:[235,312],nikolai:235,verts_i:243,comput:[257,442,107,312,262,179,5,525,347,44,317,83,560,440,419,566,492,192,354,423,533,357,353,199,96,222,385,248,330,290,472,543,160,294,434,340,341,402],axalpha:316,beforehand:205,get_autoscaley_on:5,packag:[28,492,83,312,497],dashlist:297,transproject:[340,525],process_imag:161,sell:107,fltk:[303,107,144,440,482,347,330],equival:[566,357,83,448,248,243,294,499,38,149,122,434,15,287,144,402,5,85],reasliz:58,apply_tickdir:383,self:[482,0,2,374,305,38,243,314,110,357,42,168,380,347,179,5,449,383,334,83,239,271,589,150,76,525,353,50,16,335,324,156,422,423,297,390,349,462,210,54,92,240,574,573,338,500,122,393,286,429,287,544,222,149,161,248,249,24,580,250,434,581,169,504,346,339,294,31,586,340,341,32,171,103,177,214,438,370,507,302],restore_region:[332,239,134,271,574,482,109,50,42,302,347,589,23],ngridx:193,also:[303,439,442,326,542,312,448,5,7,317,149,320,153,323,96,462,464,450,470,166,334,337,168,340,341,38,347,348,349,48,492,352,354,357,497,499,199,57,60,144,379,85,208,368,214,512,74,220,525,383,228,83,388,527,235,243,238,88,89,92,392,573,345,543,246,248,250,491,294,401,402,533,257,107,395,179,100,440,117,566,276,277,568,421,570,423,120,121,122,286,287,579,580,432,433,434,133,297],enter_notify_ev:297,ex2:123,ex3:123,ex1:123,prev_tim:239,date_demo1:200,date_demo2:200,brace:62,ngridi:193,pipelin:530,blackboard:[82,312,354],chanceri:[402,543],imshow_affin:476,plai:[174,566,50,584,423],inside_vertic:263,get_adjust:5,plan:[103,348,107],techniq:[109,271,16,302,23],tpg:391,experiment_r:160,asum:[41,83],"0x38431a0":168,maxunicod:[82,62],cover:[385,257,153,525,235,277,348,492,549],error_config:428,update_font:287,ext:[465,30,97],travisci:235,exp:[373,106,406,327,221,142,261,315,419,79,113,81,69,229,320,321,536,275,276,492,236,154,192,437,193,354,277,571,90,18,279,283,160,361,61,202,222,25,26,365,398,399,29,14,71,134,584,340,341,477,301,253],microsoft:[287,330],grab_focu:507,get_height_ratio:120,fancyarrow_demo:200,xticknam:584,gold:[393,587,344],xcode:235,on_mappable_chang:121,sigma1:442,affin:[357,83,476,525,434,297,235,262,348,340,248],sigma2:[442,542],impact:402,colloc:[294,5],indexerror:179,writer:[402,235,579,218,66],solut:[566,561,108,329,177,347,223,492,438,354,522],"_artist_list":161,plotnum:[5,190],imagemagickfilewrit:579,factor:[83,434,257,96,153,485,525,294,297,492,177,312,22,314,5,450,248,24],"_draw_steps_mid":248,parasiteaxesauxtran:[100,401],sigmai:492,precnsim:354,colorbrew:497,xpad_fract:33,get_left_right:83,cbar_ax:[450,505,94,553],mainten:[103,7,57],sigmax:492,liabl:224,noaa:439,"11557c":316,impuls:142,retreiv:38,coord:[442,326,38,149,42,347,5,112,383,349,268,527,31,412,86,27,532,566,242,360,83,517,248,157,25,294,485,339,449,297,340,402,589],acut:[570,354,62],ginput_manual_clabel:[200,392],"25x25":[294,5],deduc:[294,149,312],ftface_prop:200,set_dashlength:248,set:[74,38,312,448,5,383,266,83,85,527,492,96,357,497,120,92,499,199,57,95,243,362,121,545,149,248,579,21,294,168,297,103,214,287],sankei:[418,83],seq:[294,38,527,243,5,248],creator:38,set_cursor_prop:5,get_xscal:5,seg:[205,532,11],touch:160,see:[0,1,2,3,4,5,6,7,8,9,23,11,12,13,14,15,16,17,18,19,20,24,25,26,27,169,29,30,31,32,33,34,35,36,37,38,39,41,42,43,44,45,46,48,49,50,51,342,53,54,55,56,57,58,60,61,62,379,64,65,66,67,68,69,70,71,72,73,75,76,77,321,79,80,81,203,83,84,85,86,87,88,89,90,91,92,573,94,95,96,97,99,100,101,103,104,106,107,108,109,110,111,112,113,114,115,116,117,353,119,122,123,124,125,126,127,128,129,130,131,132,258,134,136,137,138,139,140,141,142,144,145,146,147,148,363,150,151,152,154,155,156,157,158,159,160,161,162,163,164,165,167,168,170,171,172,173,174,175,176,177,178,179,181,182,183,184,185,187,188,189,191,192,193,194,195,196,197,198,201,202,82,204,205,206,208,209,210,211,212,213,214,215,217,218,220,221,222,223,224,226,229,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255,256,257,259,261,263,264,266,267,270,271,272,273,274,275,276,277,278,279,280,281,282,283,284,286,287,288,289,290,291,292,293,294,296,297,298,299,300,301,302,303,304,305,306,307,308,309,310,311,312,313,314,315,316,317,318,319,320,78,322,323,324,325,326,327,328,329,331,332,333,334,335,336,338,339,340,341,52,343,344,345,346,347,348,349,351,352,354,355,356,358,360,361,149,365,366,367,368,369,370,371,372,373,374,375,377,378,63,380,381,382,383,384,386,387,388,389,390,391,392,393,394,105,396,397,398,399,400,401,402,403,405,406,409,410,411,412,413,414,415,416,417,419,420,421,422,423,424,425,426,427,428,429,430,433,434,435,436,437,438,439,440,441,442,443,444,445,542,447,448,449,450,451,452,453,454,455,456,457,458,459,460,462,463,464,465,466,467,468,469,470,471,472,473,474,475,476,477,478,479,480,481,482,483,484,485,486,487,488,489,490,491,492,493,494,495,496,497,498,499,500,501,502,503,504,505,506,507,508,509,510,512,513,514,516,517,518,519,520,521,522,523,524,525,526,527,528,529,539,531,532,533,260,535,536,537,540,295,543,544,545,546,547,548,549,550,552,555,556,557,558,408,560,561,562,563,564,565,566,567,568,569,570,571,93,574,575,225,577,578,579,580,581,582,583,584,585,586,587,589],sec:[543,498,296,492,168,544,314,170,354],anitialis:[294,5],cohere_demo:200,multicursor:[92,143,200,83],hbox:[257,312],set_boxstyl:[150,581,247,128,450,248],get_smart_bound:[545,383],topmost:120,subdiv:[290,160,96,283],clist:5,set_figheight:149,is_avail:579,set_unit:[198,178,248,296,383],attibut:297,signatur:[349,83,294,242,149,297,492,235,347,5,122,248],imagemagick:566,idle_ev:[297,378],ema9:222,javascript:[491,557],frame_prefix:579,get_seg:[243,235],incident:224,matthia:235,locally_modified_subplot_param:120,lower_error:361,total:[557,83,243,169,29,443,14,294,235,236,96,5,412,248,44,518],last:[257,107,345,5,7,228,83,566,492,235,260,498,55,499,329,362,222,149,289,205,434,133,294,477,137,583,173],opac:[251,105,428,491,485,209],hyperlink:200,numpydoc:[103,214,235],cumprod:44,get_anim:248,xlat:38,pdf:[0,1,2,5,6,8,11,12,13,15,17,18,20,21,22,24,25,494,29,30,32,33,35,37,39,41,45,46,342,53,56,58,60,61,62,63,64,65,67,69,70,71,72,73,75,77,78,79,80,81,502,84,86,89,90,91,92,93,94,95,101,106,108,100,111,112,113,114,115,116,119,259,123,127,128,129,130,131,132,258,136,137,138,140,142,145,146,147,148,149,514,151,153,154,155,396,157,158,160,161,163,164,165,476,485,170,172,173,174,175,177,181,185,187,188,189,191,192,193,194,196,197,198,201,202,82,204,205,206,208,209,210,211,212,213,214,215,217,220,221,222,223,226,228,231,232,236,238,279,241,244,246,247,248,249,250,424,252,253,254,255,256,395,261,262,263,265,267,270,272,452,275,276,463,280,281,282,283,505,287,521,289,290,291,294,296,563,298,300,301,304,306,308,309,310,311,312,316,318,319,320,321,322,323,96,327,329,331,336,178,52,343,344,345,251,352,14,355,356,358,360,361,365,366,368,371,372,373,375,381,571,386,387,389,391,392,394,105,397,398,400,403,406,409,410,411,414,416,419,420,422,184,425,426,195,428,429,435,436,437,438,441,444,445,542,447,451,274,453,455,457,459,460,462,278,465,466,454,471,473,474,490,477,479,480,481,484,486,487,488,489,492,27,495,496,498,55,501,83,503,506,508,509,510,150,516,517,176,523,524,525,234,243,532,260,535,536,537,540,295,544,546,547,548,325,552,555,556,405,560,297,564,565,567,568,570,19,575,225,577,578,582,584,585,586,587,583],whole:[228,149,434,166,257,442,120,583,383,294,243,144,525,248],load:[303,257,442,445,483,311,546,264,146,44,317,7,83,13,65,577,235,352,155,492,422,532,402,502,481,55,94,329,159,160,505,287,469,450,85,543,360,294,435,334,300,103],set_mutation_scal:248,sinh:[354,544],pendulum:[257,413],etre:[491,557,87,388],schedul:38,ubuntu:[303,7,235,313,543],get_dashlength:248,"__rsub__":314,bigve:354,figurecanvasgtk:[562,297,83,390,126],pycon:280,xax:[149,383],sine:[76,158,345,492,340,324,280,58],capsiz:[294,5,488],all_backends_set:465,devic:[353,153],implicit:[217,168],qtagg:[303,439,83,257,408,16,302,402,144,330],monthli:168,register_namespac:[491,557],fr_fr:402,fire:[439,257,242,297,235,347,379,5,248],infect:107,consequenti:224,clabl:161,func:[83,380,579,92,38,242,149,294,297,370,492,4,5,527,248,226],overbought:222,urcorn:354,weekdai:[159,483,382,168],formatd:[382,492],set_anim:[589,248,239,347],weighted_wiggl:[294,5],pressev:305,straight:[83,581,257,525,294,5],erron:235,histor:[349,385,153,168,328,214],formatt:[5,83,383,121],logtransform:357,blacktriangleleft:354,image_noscal:[402,235],circlearrowright:354,bowti:[138,354],real:[580,556,294,38,353,394,492,287,352,577,5,248],vol:566,owen:235,clientid:382,level0:[294,5],level1:[294,5],hover:[557,92,442,346,245,347],slidermin:92,vanish:347,nielsen:235,align_iter:38,irrelev:248,polartransform:[357,12,100,401,340,405],obsolet:[235,214,83,121],shorten:[294,5,199,248],x64:235,shorter:[222,5,294,235,248],funni:[493,543],decod:395,fancybox_demo:200,capstyl:[95,297],ft_style_flag_ital:549,royalblu:584,psf:[21,224,286,107,334],leveln:[294,5],atmosenv:177,mousedown:341,filename_or_obj:[297,312],stack:[542,439,260,149,294,258,38,118,297,235,312,497,568,5,527],recent:[228,435,40,313,323,7,44],draw_sizebar:[128,450],pickx:242,yminorloc:527,set_alpha:[566,506,83,514,243,481,442,348,297,121,78,72,50,251,36,211,222,316,248,470],pickl:[257,235,287],"_get_xy_displai":83,expens:[557,566,335,339,340,379,248],elev:[349,161,499],inverse_transform_bbox:83,academ:[492,144],a_3:485,itemgett:122,qapp:[324,76],reduce_c_funct:[294,5],max_text_s:485,"_autoscalezon":349,ha_list:391,update_lin:[513,332,239,9,367,3,23,66],stixsizex:312,hist2d_demo:200,set_theta1:248,input:[144,257,544,38,395,5,383,83,440,153,525,233,235,323,492,357,465,499,199,121,362,500,22,149,289,248,580,294,434,340,214,173],set_theta2:248,leave_notify_ev:297,cos_lin:271,float32:[423,499,445,246],datalim_to_dt:168,format:[95,85,83,248,294,499,38,121,149,21,297,492,362,168,22,5,579,312,153,287],font_manag:[5,297,83,248,149],intuit:[83,523],"__gt__":314,parameteris:[357,371],get_text_width_height_desc:297,ellipse_collect:200,a_i:[145,62],"75th":492,sgi:579,onmouseov:557,embedttf:95,"__array__":314,spine:[418,83],draw_cursor:297,to_rgb:[429,499,518,346],applicationwindow:[324,76],demo_tight_layout:200,swarrow:354,closedmin:92,boxx:584,encount:423,add_matplotlib_text:316,spring:[294,403,497,94],taggedvaluemeta:314,wxpython:[303,144,21,286,235,380,347,348,330],ncol:[578,433,149,120,294,106,474,537,122,33,127,5,450,553,266],sprint:280,pale:294,investopedia:222,chunksiz:402,step_demo:[216,200],x_n:214,process_valu:499,pie_nam:388,machin:[303,228,144,10,229,465,57,402,492,348],rc_file_default:[294,85],calculate_plane_coeffici:96,doteqdot:354,legend_demo3:[216,200],odot:354,agreement:530,get_zlabel:349,prerequisit:[303,214],cliprect:83,bfbf00:393,add_rgb_to_figur:146,fill_betweenx:[294,5,235,108,497],scalarmapp:[83,294,499,121,362,243,149,539,85],materi:[566,224,312,22],argsort:469,cmap:[403,512,1,386,476,343,220,259,41,373,558,520,5,181,117,394,508,27,334,414,149,185,560,417,204,319,402,84,188,565,235,567,392,243,459,539,494,17,532,37,362,90,426,429,477,499,121,283,160,244,250,239,94,301,127,349,161,64,172,163,290,549,193,547,583,167,99,416,258,286,215,72,294,298,371,497,270,212,33,137,438,73,173,201],stuart:[294,5],two_scal:[294,186],cmax:[294,5],colorado:[580,485],primarili:[353,122,312,262,243,5,85,548],irrit:348,yloc:[480,498],endors:224,intp:100,contributor:235,next:[303,144,374,442,75,179,409,312,314,5,318,54,229,456,421,497,239,566,55,57,543,379,83,330,580,250,294,434,297,402],usetex:[556,444,310,409,145,317,318,440,153,118,235,354,462,239,465,241,282,60,83,248,249,294,563,170,402,438],occupi:[550,166,294,443,120,431,238,5,450,248],span:5,lowerlimit:488,atran:262,textual:492,custom:[2,74,555,422,100,70,448,5,144,382,265,226,83,583,525,527,492,567,352,539,168,14,52,357,196,184,405,566,464,499,242,158,449,468,544,349,450,85,548,24,587,55,434,398,294,29,133,251,339,368,297,401,389,335,103,214,508],ci2:585,ci1:585,set_ydata:[513,139,374,377,482,378,109,3,519,384,271,48,50,528,390,239,302,248,23,332,31,162],suit:[566,402,440,229,107,257,352,353,214],rformatt:294,int_:[316,214],pctdistanc:[294,5],backend_qt4:576,linu:10,wxmac:380,link:[149,10,38,57,297,312,214],set_fontconfig_pattern:287,get_legend_handler_map:266,line:83,talli:[294,5],"125x6":348,auinotebook:338,cid:[332,92,38,378,294,297,42,347,156,43],simplif:[257,402,262],intim:574,getint:341,upperlabel:584,doc:[228,1,83,214,257,465,38,566,439,235,103,349,7,561],readlin:[179,469,580],set_render:83,impl:492,figcolor:316,parser:[83,346,277,155,145,312,354,287],chao:492,maxheight:446,"char":[349,485,541,235,312,51],loadtxt:[492,83,502],pick_ev:[472,83,54,294,242,297,36,347],set_width_ratio:120,gnuplot:[403,497],tuft:116,codex:[0,1,2,3,4,6,8,9,11,76,13,15,16,17,18,19,20,24,25,26,27,169,29,30,31,32,33,34,35,36,37,39,41,42,43,44,45,46,48,49,50,51,342,53,54,56,58,60,61,62,63,64,65,66,67,68,69,70,71,72,73,75,77,321,79,80,81,203,502,84,520,86,87,88,89,90,91,566,573,94,97,99,100,101,104,106,108,109,110,111,112,113,114,115,116,119,123,124,125,126,127,128,129,130,131,132,258,134,136,137,138,139,140,141,142,145,146,147,148,363,150,151,152,154,155,156,157,158,159,160,161,162,163,164,165,167,485,170,171,172,173,174,175,176,177,178,179,181,182,183,185,187,188,189,191,192,193,194,427,196,197,198,201,202,82,204,205,206,208,209,210,211,212,213,215,217,218,220,221,222,223,226,229,231,232,233,234,236,238,239,240,241,242,244,245,246,247,249,250,251,252,253,254,255,256,105,261,263,264,267,270,271,272,273,274,275,276,278,279,280,281,282,283,284,286,288,289,290,291,292,293,296,563,298,300,301,302,304,305,306,307,308,309,310,311,314,315,316,318,319,320,78,322,323,324,325,327,329,424,331,332,333,334,335,336,338,339,341,52,343,344,345,346,351,12,14,355,356,358,360,361,365,366,367,368,369,370,371,372,373,374,375,377,378,380,381,382,384,386,387,388,389,390,391,392,393,394,259,396,397,398,399,400,403,405,406,409,410,411,413,414,415,416,417,419,420,421,422,184,425,426,195,428,429,430,435,436,437,438,441,444,445,542,447,449,451,452,453,454,455,456,457,458,459,460,462,463,465,466,467,469,470,471,472,473,474,475,476,477,478,479,480,481,482,483,484,486,487,488,489,490,491,494,495,496,498,55,500,501,503,504,505,506,507,508,509,510,512,513,514,516,517,518,519,521,522,523,524,525,526,528,529,539,531,532,260,535,536,537,540,295,544,546,547,548,549,552,555,556,557,558,408,560,562,564,565,567,568,569,570,571,93,574,575,225,577,578,23,580,582,583,584,585,586,587,589],leftward:337,invalid:[357,349,434,294,465,160,235,5],codec:[402,579],wash_brush:83,mixedmoderender:297,setup_axes2:405,set_linewidth:[83,489,29,258,243,297,529,248,14],webapp_demo:[216,200,58],lucid:402,backend_svg:297,ylim_chang:[5,67,240,83],obligu:83,pubu_r:[416,188],longitud:[544,525,401,340,61,136,301],ago:[566,5],pdftocairo:317,lanc:235,algorithm:[439,433,434,294,38,168,412,367,280,492,287,262,96,5,248,354],trail:[103,402,235,498,462],agg:[255,303,144,257,243,312,262,218,318,490,229,576,566,235,529,5,353,465,58,21,393,467,473,248,470,330,331,543,333,476,66,294,402],mercator_project:544,set_markup:421,train:492,walker:442,colinear:96,stop_event_loop_default:297,findfont:287,is_opentype_cff_font:287,default_font_prop:312,extrapol:492,partial:[144,444,282,122,83,248,354],get_chars_in_lin:179,test_rotation_mod:391,dimlist:426,image_fil:[252,119],soften:442,tinaja:248,landscap:[294,297,149,423],beyon:[294,5],cmin:[294,5],contourf:[349,83,185,90,257,204,416,575,117,294,235,497,270,5,137,193,64,181],cython:103,iii:116,"_get_data_path":83,young:439,send:[257,493,38,353,312,171],draggable_legend:200,blackman:[294,5,492],sens:[83,107,168,525,96,224],draggabl:[356,292,266],propertiess:5,sent:347,deactiv:[92,573],unzip:[303,7],projection_factori:[357,83],gtk2:330,gtk3:[351,235,125],disast:260,add_lin:[512,0,83,348,169,99,574,121,198,586,42,235,103,5,181,370],recip:[580,530,38,265,347],qt4agg:[303,144,257,271,402,408,235,379,330],set_tooltip:421,magic:[380,349,85,10],mathit:[83,354],plotqu:555,axes_leave_ev:[294,297,245,347],parasite_ax:471,"try":[303,138,144,257,442,363,314,311,168,179,5,7,317,228,83,229,566,527,235,352,280,348,51,423,533,92,464,465,57,284,402,543,500,149,64,85,580,331,433,294,133,337,70,297,171,103,172],origlin:36,lightcor:587,set_capstyl:297,set_color:[384,387,545,348,316,146,161,83,489,320,205,528,236,463,243,87,352,239,566,537,58,63,450,289,248,424,401,586,510],evt:[415,334,271,152,50,339,286,557,16,302,341,266],edgecolor:[140,259,545,177,348,5,263,316,226,83,187,85,452,566,50,235,243,569,460,425,91,92,240,393,22,222,149,64,248,291,68,293,385,294,485,490,297,402,301,589],impli:[83,294,323,224,402,5,579,248,266],monospac:[357,149,268,294,248,284,368,50,543,287,411,402,5,82,85,354,317],natur:[107,492,312,354],current_key_ax:149,refi_tri:96,w_pad:[294,120,149,433,166],ishold:[294,5,497],video:[214,10,579],ymajorloc:527,odd:543,proxydeleg:314,index:[144,374,243,257,442,38,363,492,42,312,348,5,182,265,83,153,566,527,235,96,238,422,390,260,120,92,55,465,499,121,431,428,550,22,149,349,294,168,367,401,214,589],corrcoef:116,axes_rgb:[450,146],twini:[83,294,320,566,235,497,5,450],hlist:312,surmis:57,indec:235,axescolor:222,twinx:[498,67,83,294,387,320,222,566,497,63,5],tight_bbox_test:[200,407],inspect:[348,492,248],led:257,lee:[257,439,235],leg:[53,514,442,491,50,36,222,450],len:[0,138,307,445,142,542,314,5,451,50,375,156,329,159,24,472,336,485,33,474,34,480,343,38,42,347,179,46,191,492,192,494,51,357,54,499,55,500,62,82,64,68,71,211,214,215,374,458,75,383,385,229,231,527,233,243,389,88,260,391,91,92,242,95,393,99,346,103,403,259,348,111,112,263,113,267,129,560,419,566,413,568,280,569,422,122,222,289,580,293,294,585,586],leq:354,let:[442,100,312,347,348,5,229,440,352,392,421,423,19,122,431,103,64,248,581,434,491,294,340,402,214],lev:416,args_kei:579,evt_button:[334,380],rightthreetim:354,rtime:354,great:[334,353,566],mailinglist:235,artist_test:[200,465],technolog:21,handletextsep:[402,266],rdf:259,staticmethod:[83,434,545,262,314,74,24],defeat:[83,499],nrows_ncol:[433,391,166,481,94,564,505,300,450,553],patch_gradi:429,figuremanagerbas:[149,297,83],boxi:584,pf1:492,pf0:492,michiel:[257,439,235],convert_mesh_to_path:243,sgn:567,mynavigationtoolbar:339,gridlin:[357,349,489,294,498,525,402,100,401,177,567,497,348,5,383],zip:[303,403,555,441,556,375,316,38,41,42,36,347,314,181,7,6,226,228,182,385,115,584,498,15,278,481,494,462,391,198,242,122,429,201,451,289,205,99,582,208,251,367,490,297,211,177,589],commun:[103,10],doubl:[390,83,257,434,177,7,413],upgrad:[543,83,317],symmetricallogscal:357,get_cursor_prop:5,doubt:[103,527,83],aux_ax1:405,wxwidget:[334,353,144,330],aux_ax3:405,aux_ax2:405,pfa:[83,395],pfb:[83,395],rich:[144,330],get_nam:[248,287],src:[257,214,492],release_pan:297,lucida:[284,402],get_mutation_aspect:248,pfn:492,center_matrix:492,figurecanvasgtkagg:[562,337,507,126],reproduct:259,xfin:492,pythonista:348,get_window_titl:297,cumbersom:[491,83],bysecond:168,thin:[149,257,121,95,277,83],plot_apply_rcparam:214,xfit:116,get_axis_posit:349,mxdate:168,get_bbox_transform:83,mpeg4:229,process:[83,294,499,38,153,297,312,22,5,248,579],lock:[92,156,38,168,347],slim:458,rect_tip:557,high:[303,403,144,442,545,348,264,153,566,235,96,423,497,353,499,283,160,222,469,248,330,508,214,173,254],befor:[303,513,139,442,262,377,38,42,3,5,223,144,7,383,44,228,83,248,456,322,235,352,243,492,23,402,357,91,566,57,108,160,362,22,379,349,122,85,525,579,577,580,543,293,581,294,337,70,297,340,103,214,583,312],bend:96,current_line_bound:179,schemat:[294,5],get_tightbbox:[349,166,326,149,5,383],updatefig:[558,417],delai:[243,144,579],print_funct:[513,139,233,377,415,141,378,109,311,3,546,179,111,264,43,500,382,363,23,417,229,271,116,86,456,420,50,322,16,421,193,87,422,532,88,332,239,55,465,573,242,482,159,393,408,124,245,62,502,445,289,97,163,580,549,531,41,334,504,30,346,475,134,31,210,171,478,507,302],set_markeveri:248,test_contour_colorbar:235,api_exampl:294,get_lin:[5,266,14,36,29],get_lineoffset:243,help_menu:[324,76],delax:[294,348,149,497],get_tickloc:[348,383],everywher:[294,5],overridden:[580,83,581,294,527,525,434,297,402,5],singular:434,stop:[385,257,38,525,297,492,262,430,349,579],interactiveconsol:[179,580],lines1:512,lines0:512,lines2:512,loc2:[77,450,65],notebook:235,npy:[505,360,442,482,94,329,109,286,13,300,481,435,450,23,146,65,302],jonathon:[439,440],npt:[90,500,492,521,193,205],qtimer:[324,76],stddevinc:229,alloc:[324,5,16,294,302],essenti:[416,172,144,547],seriou:[492,235],counter:[257,587,523],figurebas:83,issu:[303,144,566,229,464,38,149,294,401,235,277,328,103,83,330,497,85,492,312],unaccept:543,allow:[439,144,257,442,107,38,243,177,485,262,5,6,317,228,83,420,440,525,353,235,277,352,323,96,492,23,341,52,357,328,92,499,121,284,402,286,287,545,349,330,543,434,294,337,168,367,334,297,566,299,497,103,423],pathcollect:[294,5,262,243,91],shapes_and_collect:200,markeredgewidth:[566,83,294,480,248,393,277,402,5,85],typecod:[492,83],move:[149,83,92,515,499,38,294,297,492,312,262,5],get_unit_gener:168,comma:[465,248,581,235,277,402,492,326],is_separ:[434,544,525],fontfamili:[294,5,357,149,248],bbox_artist:[297,248],chosen:[357,294,168,95,527,22,96,5,214,317],std_women:428,ninsid:263,infrastructur:[235,439,440,83,352],decai:81,filter_def:[87,388],decad:[357,349,294,499,527,5],therefor:[144,257,347,5,181,349,525,96,354,328,566,499,122,83,450,248,543,434,294,297,477,402,137],test_raster:563,figurecanvastkagg:[430,427],parabola:492,hurrican:[294,5],overal:[247,190,439,248,243],innermost:312,dock:235,tick_bottom:[19,320,383],facilit:[83,566,442,168,348,5,214,579],example_plot:[433,578],savefig_kwarg:[235,579],usetex_fonteffect:[216,200],fontangl:[541,83],multiprocess:[200,407],typo:235,anyth:[303,580,357,149,268,294,493,545,38,485,220,526,434,401,22,103,5,248,173],wdiff:199,kpc:471,triangle_down:[294,5,248,448],get_ha:248,beneath:[294,5,392],eclick:[92,573],subset:[83,153,395,160,287,352,181,248,354,312],frequenci:492,metafont:153,renderergtk:83,summary_funct:159,set_minor_loc:[360,231,276,527,329,275,191,111,112,525,383],meta:[498,297,242,347],polar_demo:[216,200],nsigma:[472,54,347],frac:[405,444,310,312,380,5,316,450,83,101,388,492,278,155,238,354,357,537,282,550,62,318,161,248,249,291,543,294,424,297,170,214,438],svgdocument:557,variabl:[83,371,92,106,262,38,491,283,159,229,297,361,177,294,314,62,103,5,214,265,312],dbin:[294,5],matrix:[331,349,426,294,460,434,492,235,497,243,5],contigu:[223,492,108],reload:[294,235,85],set_autoscaley_on:5,max_arrow_width:485,matric:[340,492,235,426],shut:580,figurecanvasqtagg:[324,504,271,76,576],num_fac:549,cleartext:395,surface_plot:235,copy_bbox_transform:83,unipolar:497,eventplot:[294,5,235,497,455],chartreus:[294,542,499],tick_direct:326,solid_joinstyl:[151,294,277,402,5,248],axespatch:[240,316,83],mdboom:312,unnam:83,area:[443,347,348,5,77,525,450,226,148,228,83,115,440,65,190,235,277,243,497,239,120,566,240,122,581,22,545,149,161,248,470,433,166,294,132,72,297],plot_contain:334,"_tickmark":383,datadisplaydownsampl:110,gtreqqless:354,length:[217,150,375,326,246,38,149,542,484,262,348,5,181,525,6,113,266,83,560,11,46,117,275,492,236,442,96,238,539,14,277,52,328,92,121,95,243,550,362,22,128,450,289,248,497,349,434,385,169,29,69,491,485,367,294,401,413,402,510],tickdir:383,add_dict:485,outsid:[303,544,312,262,5,263,181,317,83,271,153,235,96,492,354,357,566,499,362,125,22,248,433,294,340,341,402,214],viewinterv:83,timezon:[349,294,168,393,402,5,383,330],softwar:[439,497,334,107,168,287,352,224,7],get_test_data:[459,349,185,84,520,189,298,176,204],byweekdai:168,pathpatch3d:349,precapprox:354,scene:[432,328,360,277,144,112,450],"1e1":496,"1e3":496,"1e2":496,"1e5":[159,225,220],"1e4":527,"1e7":[159,157],"1e6":[222,159],set_zlim3d:[367,349,441,307,310,71,394,298,211,325],byhour:168,infstr:235,start:[357,83,92,499,38,153,294,297,492,262,96,5,527,248,579],licens:[28,21,541,492,214,265],system:[303,304,373,107,395,100,492,312,347,348,5,7,183,228,83,229,153,383,118,544,235,352,238,531,354,357,239,566,464,465,581,394,550,287,62,318,450,82,248,330,510,579,294,133,434,297,401,402,214],set_xbound:5,linebuild:347,termin:[510,149,257,442,171,48,294,235,224,402,144,7],licenc:224,iota:[354,62],tconfig:439,rect_histi:273,set_xlim3d:[349,441,310,367,211,325],accompani:[257,543],store_tru:465,azdeg:[1,499],rect_histx:273,mathtext_wx:[200,534],freetype2:[440,412],trans_angl:304,mappabl:[149,294,121,362,243,83],lavcopt:[229,566,531],ffmpeg_path:[402,579],format_zdata:349,affine2d:[471,83,476,12,259,310,434,100,401,405,262,586,525,205],radius:[148,132,470],stricter:235,terribl:[294,5,543],viewer:[294,492,440,149],partnership:224,clearli:[464,107],shrinkb:[355,294,474,581,5,248],lineprops_dialog_gtk:[200,534],offset_lin:492,stairstep:235,volcod:159,ft_face_flag_fixed_s:549,get_offset_text:383,ylim:[218,9,556,257,542,506,5,450,413,226,83,274,235,277,238,193,569,532,236,355,471,497,90,500,201,156,149,288,203,64,66,25,67,294,258,485,340,488],ylin:83,set_lw:[243,316,248],"adopt\u00e9":165,accuraci:[106,144,248],discret:[403,149,294,499,497,243,5,539,64,423],new_subplotspec:[294,120],button_release_callback:[42,589],ticker1:469,ticker2:469,githhub:57,nwelcom:580,scatter_class:83,unmasked_index_rang:38,segment:[257,347,38,149,177,262,5,349,560,205,235,392,96,492,239,198,499,581,243,83,248,385,434,258,294,297,583],enthought:[303,214,83,464,107,393,402,7],placement:[174,88,439,440,294,29,392,121,581,557,235,280,5,14,226],recursive_remov:38,contourf_demo:200,test_imag:235,triangle_up:[294,5,248,448],ymargin:[294,5,349,149,402],afmhot:[403,508,497],fact:[228,581,169,38,257,401,340,312,277],pbrain:440,clf:[355,88,149,391,356,229,481,535,12,13,294,100,429,277,247,497,146,567],bring:[257,235,107,83,349],rubric:214,stix_fonts_demo:[216,200],fontvari:[294,5,357,149,248],curlyeqsucc:354,trivial:[103,566],figuregtk:83,wxsizer:21,nois:[560,229,419,508,192,142],supoprt:74,hopp:235,nonuniformimag:[257,343,235],jan:[231,235,501,168],mtrand:160,axhspan:[497,257,442,294,340,5,495],score:[498,436,178,428,50,287,568],suppos:[144,420,294,499,583,334,286,96,5,7,248],y_i:[294,5],font_table_ttf:200,strongfocu:504,jae:[257,439,235],hope:83,get_yaxis_transform:[5,340,525],meant:[497,581,38,121,243,96,297,401,492,103,5,450,248],simple_msg:507,bluebook:297,satisfact:533,familiar:[348,328,214,144],accel:23,autom:[103,214],looparrowright:354,somehead:303,ffmpeg_arg:[402,579],leqslant:354,axis_direct:[326,401,450,405],capheight:83,subplot_spec:[431,120],stuff:[390,83,566,38,57,235,237,214],input_dim:[434,544,357,525],shrink_ord:312,bicub:[294,429,201,323,5,423],attribut:[481,326,38,348,491,557,312,448,262,179,5,576,383,500,83,229,153,248,420,492,96,357,120,92,464,242,58,159,421,362,121,247,149,450,85,95,349,469,581,294,70,521,297,401,341,553],sjoin:264,get_configdir:464,fill_between_demo:200,isnan:492,z_test_refi:[290,160,283],quickest:493,figure1:277,email:312,test_text:235,qt4:[303,439,144,257,76,235,402,330],ngrid:[450,553],qt3:[303,83,16,302,235,330],policy_automat:[179,390],tempfil:133,horiz:[31,235,443],pdfrepr:95,lengend:235,set_radiu:248,draw_path:[297,83],ramp:583,valgrind:465,etc:[579,74,120,83,294,166,121,149,95,243,297,492,383,168,497,103,5,576,248,266],eta:[354,62],label_minor:527,eth:354,theta2:[160,494,248,283,262],print_emf:297,forward_char:179,theta1:[160,494,248,283,262],month_nam:294,onclick:[408,491,347],varnoth:354,revamp:214,indici:248,distil:[402,543,235],tukei:[294,5],norm_flat:492,carbon:177,gtk_spreadsheet:200,draw_tex:297,solve_dpend:413,set_tzinfo:168,read_png:[429,292,235,438,535],filtered_text:161,darkslategrei:222,embed_char_path:491,trajectori:492,immedi:[144,294,121,524,235,57,262,83,214,85],drang:[294,5,191,389,168],gist_grai:[403,497],test_stackplot:235,threads_init:580,deliber:[533,492],togeth:[566,83,434,229,270,544,258,38,525,257,276,340,312,442,492,263],axes_divid:[123,234],graphicx:402,current_ax:573,get_facecolor:[349,500,149,243,156,248],laser:439,mlab2:83,get_hinting_typ:312,fullpath:465,ultra:[357,149,294,287,402,5,248],get_font_properti:248,harada:439,site:[303,439,83,566,464,312,402,7],get_xy_displai:83,is_color_lik:499,get_data2:504,archiv:[303,464,492,235],create_dummy_axi:[462,527,83],incom:492,imagemap:235,sitt:83,surprisingli:492,write_lin:179,cohort:498,spmatrix:[294,5],mutat:[247,434,248,581,383],"__getitem__":[401,507],rcparamet:257,insight:439,russel:[492,235,38],animation_blit_qt4:200,matthew:[257,235,57],pauli:235,vector_length:492,caligraphi:354,dedent:[465,214,38],phi:[151,444,282,158,394,322,312,62,214,354],expans:[294,5,248],drink:38,upon:[566,149,92,466,96,499,294,297,235,224,103,5,330,266],dai:[566,439,231,83,435,294,116,55,168,329,360,456,497,410,469,5,112,389],cbar_set_cax:553,lineoffsets2:455,lineoffsets1:455,php:[222,492,83],expand:[439,257,380,5,383,149,10,76,324,423,357,427,122,449,287,430,248,291,434,334,335,338,339,294,341,402],pseudocolor:[294,5,83,497,301],off:[403,317,242,144,379,243,257,442,326,517,41,491,42,312,36,347,348,5,6,525,63,383,44,266,228,83,11,402,320,276,248,566,50,235,277,463,529,492,119,51,532,52,290,19,497,92,57,283,123,393,61,301,222,149,527,64,205,163,25,580,398,294,99,424,297,401,136,252,177,510,588,589,371],ptmro8r:556,colour:[294,5,200],default_unit:[314,74,24],exampl:[74,38,262,5,265,83,153,527,492,243,357,92,499,96,22,149,248,579,166,294,168,297],command:[83,294,499,248,418,492,312,262,5,85,579],ecmascript:[491,557],ft_face_flag_external_stream:549,filesystem:566,jdh2358:541,appform:504,curlyeqprec:354,hexbin:[83,294,497,235,5,172,547],paus:[294,194,566,497,299],less:[357,149,434,368,92,544,220,395,294,527,492,340,22,243,5],n_radii:[290,27,283,61,136,301,182,371],xevents1:197,xevents2:197,annotation_demo:[200,83],archflag:7,demo_simple_grid:505,"__lt__":314,glue:312,dipol:290,web:[228,149,294,259,58,491,445,248,470],axessubplot:5,wed:382,makefil:[228,7,235],get_ticklin:[348,383],wep:257,rectilinear:[357,83,149,297,401,262,402,5,525,248],convert_path:579,css1:287,swirly_cmap:362,dashpointlabel:200,dest:465,elinewidth:[294,5],thicker:[294,420,248,70],piec:[497,294,464,499,38,566,340,5],five:[402,177,584,83,248],magnifi:297,numcolumn:442,password:[228,7,214],recurs:[566,294,38,160,287,96,312,248,236],recurr:83,mho:354,timerbas:297,resid:[402,214,248,287],gist_ncar:[403,497],filled01:512,stagger:205,unit_regular_asterisk:262,onetru:38,resiz:[257,149,347,5,83,417,525,235,323,330,423,121,21,286,469,579,331,473,334,294,297,340],npoint:[96,259],enddat:222,captur:[439,339],"12pt":402,daylight:330,flush:[580,349,257,465,20,475,294,297,235,402,5,248],dllindex:303,guarante:[83,334,335,338,339,434,527,492,57,96,7,64],ymax_i:334,glyph:[83,153,312,363,549,51,354,317],flat_tri:160,sqsupset:354,avoid:[303,144,257,38,491,5,317,349,153,235,96,354,357,497,566,499,57,95,581,468,218,379,83,450,64,470,543,294,434,297,214],projection_class:83,blurri:423,"_draw_noth":248,set_bbox_to_anchor:266,set_fontstyl:[566,236,248],pysimpleapp:[286,338],contact:[107,214],preload:7,mnemon:402,daleth:354,grid2:481,importerror:[580,331,465,311,171,7],set_clip_path:[83,305,259,383,297,212,119,438,248],symlink:[228,214,235],"_draw_dot":248,ylimit:5,start_raster:[161,297],nth_coord:450,minspan:92,stage:[228,297],sister:566,pypars:[303,439,235,287,312],mri_with_eeg:[216,200],chrome:402,cankil:339,onmov:[92,305],set_mark:[235,248,448],dcomposit:541,poly_below:492,assess:584,fancybox_demo2:200,hubert:235,waterfal:205,mere:[349,83,287,464],merg:[103,492,83],set_connectionstyl:248,relpo:[294,5,355,248,581],bump:[228,69],trigger:[439,434,257,574,220,294,297,245,347,379],overflowerror:580,"function":[149,83,499,38,121,248,297,362,168,448,243,5,579,312,85,383,287],interest:[303,516,357,566,525,50,19,412,423],set_horizont:[190,13],wdai:168,axesfram:83,from_ani:[190,446],corei:235,report_memori:[83,38],set_width:[248,346],pcolor_demo:[216,200],count:[385,294,481,440,168,378,434,177,42,287,96,5,172,248,589],baptist:439,shrunk:[434,581,248],weekdayloc:[111,231,168],mep10:235,garbl:491,lassoselector:[92,500],tini:[434,235,424],theta_offset:257,otherwis:[326,347,38,110,409,312,262,224,266,83,525,190,527,5,492,354,120,240,499,121,60,287,149,248,294,133,434,297],problem:[291,83,294,108,57,40,566,492,223,214],myformatt:422,"int":[444,282,38,141,110,177,314,5,316,83,239,560,46,273,498,529,280,579,422,354,566,90,393,240,499,581,160,429,62,363,161,203,248,386,331,55,68,293,385,294,208,168,334,436,254],inv:340,akin:337,outlabel:289,bdb76b:17,move_from_cent:349,ink:[523,11,294,541,297,277,243,5,6,248,312],ind:[374,38,42,347,183,149,297,492,568,243,238,569,422,390,54,566,55,242,159,500,156,161,248,472,550,178,436,210,589],dx_pixel:239,inf:[257,38,345,434,100,401,312,12,354,567],ing:[294,5,492],drag_pan:[5,297,525],inc:[353,585,85,54],nonetheless:[348,340],eastern:393,preinstal:303,lookup:[83,499,235,287,402,362,423,248,312],varieti:[550,268,272,242,412,277,347,248,397],getopt:580,majorformatt:276,quartz:257,maxlag:[294,5,83,396],"class":[83,383,541,5,248,579],plot_dat:[497,502,294,168,191,111,5,112,389],in2:388,is_alia:248,integral_demo:[227,200],get_ytick:[5,349],mondai:[111,231,168],rec_join_demo:[200,407],polycurv:248,wx2:[334,335,338,339],to_valu:434,rule:[10,294,168,297,312,103,5,389],bitmapfrombufferrgba:380,lift:[257,353,492,144],setsizepolici:[324,76],allpair:38,lineplot:[294,5],lastev:297,entropi:492,port_retri:402,untrust:257,text_path:[438,310],formatint:492,set_fontnam:248,transoffset:[216,503,200,243,156,569,205,532],zi_lin:575,upsid:235,xlolim:[294,5,488],oldest:38,lgpl:[224,107],halchenko:588,randomdist:584,edward:[116,466],slowest:5,spec:[83,294,499,57,22,545,5,248],publicdomain:259,ygridlin:489,"0x98719ec":442,colorconvertor:83,manim:218,somestr:58,upload:[228,214],figuremanagerwx:21,tunit_cub:349,correl:[294,5,497,330],unmanag:[334,286],math:[303,555,312,314,182,412,488,317,440,525,492,277,354,283,61,248,290,543,136,402,301,214],set_fontstretch:248,cmu:317,get_clip_on:248,ytext:[348,221],my_divid:234,speci:177,get_xaxis_text2_transform:[5,525],consequ:[294,149],tkstyle:248,update_from_data:434,get_stat:[183,312],set_default_color_cycl:[294,5,83],key_press_handler_id:297,xedg:[294,5,129],set_tick_param:383,bipolar:497,backend_driv:[200,228],value_class:314,topolog:243,set_markerfacecolor:248,crunch:492,xticklabel:[25,206,149,489,398,498,116,309,41,584,445,379,5],dash_joinstyl:[294,5,402,248,277],droettboom:[257,340,439,440,235],pygtk:[303,390,144,561,440,330],lneqq:354,nrightarrow:354,michal:235,insertsepar:324,reenabl:235,datetim:[303,439,74,83,442,360,152,38,168,329,60,191,456,435,222,111,112,389,330],keymap:[402,337],aka:[103,353,235,423],dynamic_image_wxagg:334,get_pick:248,w_i:[294,5],linearli:[497,229,499,434,294,262,5,583],mitchel:[294,5],silent_list:38,is_last_col:5,axeswidget:92,brg:[403,497],guievent:[297,347],fileobject:312,highli:[297,107,328],plot:[149,83,294,499,38,121,248,418,297,492,383,168,448,243,5,579,85,266],issue835:235,clough:96,init:[557,434,198,38,294,32,519,586,214,383,413],afterward:579,sizehandl:341,get_minor_tick:[348,383,329],unescap:248,linecolleciton:[349,83,117],labelattribut:83,callbackssm:250,indent:38,springer:248,semibold:[357,149,294,368,584,287,411,5,248],word:[523,566,38,57,199,262,179,181,214,583],get_vertical_stem_width:541,err:492,restor:[402,332,149,239,109,257,297,70,482,134,50,16,294,347,379,497,23,43,85,302],log_test:[216,200],work:[357,74,10,83,92,499,57,248,21,294,297,492,168,497,237,103,5,214,85,265,312],imagemagickwrit:579,axesbas:235,minloc:74,grover:257,numbox:584,could:[373,144,257,75,491,181,228,83,152,233,235,278,96,354,239,499,121,60,385,85,290,580,550,166,294,168,297,214,173],indmin:[34,54],get_rotation_mod:248,h_pad:[294,120,149,433,166],quiver:[290,291,83,257,440,439,294,235,497,5],arc3:[355,356,474,248,581],rpath:289,indic:[257,442,38,347,5,500,83,268,229,584,566,492,277,96,156,92,55,499,242,159,581,57,22,222,149,64,248,385,294,168,434,297,136,103,301,214,61],ylorrd:[403,497],logical_or:372,contourf3d_demo:200,set_offset_str:527,set_axisbelow:[566,5,316,349,584],david:[460,557,497,257,439,491,235],indip:289,indir:233,labelleft:[123,5,294],ordinari:[83,499,144],plot_numb:[294,380],enforc:[434,357,199],exception_to_str:38,rewind:566,verifi:[382,72,116,153],toggle_log_lineari:83,adir:349,faq:[566,214,265],recogn:[83,294,566,297,362,385],lai:348,rebas:235,after:[205,139,257,443,347,38,221,109,312,5,144,228,83,248,544,235,516,243,566,242,581,22,379,149,85,579,580,349,434,293,510,294,168,134,340,299,103,586,214,583],lab:492,psd_demo_complex:[216,200],lat:[12,401,525],lap:498,averag:[349,129,294,584,96,527,492,222,5],domin:107,datalim:[74,166,169,83,187,149,257,492,348,5,213,289,496],datalin:367,filequit:[324,76],opaqu:[294,5,357,149,248],greek:354,green:[403,140,108,247,557,518,223,5,412,384,385,114,555,187,452,420,528,277,155,348,195,497,93,392,499,379,521,64,68,293,294,258,583,71,490,209,589,173],legend_auto:[216,200],order:[512,0,439,38,347,348,5,6,525,263,44,266,83,523,11,229,383,235,96,492,328,566,499,581,284,243,361,287,202,22,149,450,289,470,95,349,510,294,133,587,521,434,297,497,136,402,301,214,61],dblclick:[408,297],set_clip_on:[480,77,438,248,517],bar_width:[428,260],diagnos:464,offici:[303,349,328,566,543,144,7],typewrit:[402,543,354],plot_color_gradi:403,flexibl:[543,83,491,243,317,522],blown:[38,423],background2:239,denver:177,update_datalim:[5,349],line_collection_2d_to_3d:349,mtransform:[471,476,247,566,544,223,586,161,87,585],wxversion:[334,335,338,339],showedg:83,them:[74,257,442,107,395,42,312,5,348,144,181,7,347,44,500,228,83,229,270,440,153,525,566,577,492,570,354,423,402,19,91,198,493,465,241,499,57,58,431,360,394,262,287,218,246,379,149,450,122,64,205,580,385,294,258,401,340,532,103,589,541],"0x15009ca4":348,thei:[403,525,373,107,38,243,40,247,484,312,262,5,181,7,6,83,205,198,527,234,492,352,323,96,22,566,533,19,92,499,545,160,361,383,246,222,577,64,248,580,510,541,294,434,297,103,214,583],safe:[442,38,57,492,493,235],subplothost:[471,100,401,12],"break":[83,22,38,200,42,171,522],bakoma:[440,312],bang:334,headwidth:[290,550,294,238,5,248],jinja2:228,to_png:[312,155],setvalu:[334,341],bread:347,changelog:[103,257,228,235],set_figsize_inch:83,end_group:312,scale_unit:[294,5],get_canvas_width_height:297,max_head_length:485,leqq:354,motion_notify_ev:[297,305,294,86,346,449,31,42,341,347,421,182,589],owner:92,looparrowleft:354,logn:584,logo:[216,200,316],rgba2:155,rgba1:155,network:[57,21,297,492,183,330],update_from_data_xi:[434,187],axes_zoom_effect:200,facil:[294,214,485,85,357],daniel:[257,235],zalpha:349,sprintf:527,print_cycl:38,append_posit:243,lib64:464,forth:[499,38,248,337],basefmt:[294,5],multilin:[216,200,248],ticks_and_spin:[200,465],log2:492,length_includes_head:[294,5,248,485],lovelac:235,standard:[303,440,257,442,347,542,312,262,348,5,385,229,116,235,352,243,492,354,357,580,566,499,402,467,362,287,379,330,472,543,398,541,294,133,434,297,209,103,214],nth:[110,168],fixm:[149,465,393,177,235,438],bboxconnector:77,contour3d:349,navigationtoolbar2gtk:126,row_stack:342,reconfigur:312,get_markers:248,rdylgn:[403,414,497],angl:[304,150,326,176,395,149,100,177,448,262,5,182,413,83,151,78,452,243,349,27,355,357,497,535,499,283,61,22,128,450,310,289,248,290,292,434,294,506,587,72,297,401,136,301,510,371],rgbax:[450,146],ptmr8rn:556,rcdefault:[497,294,458,99,70,402,85],nx3x2:297,share_x:553,nx3x4:297,mathttext:439,regress:[228,257,465,116,439,235,352],basemap:[107,265],updatedist:32,render:[303,0,439,373,144,326,491,312,448,348,5,145,383,266,83,190,576,118,235,97,352,353,530,317,354,277,226,328,120,92,330,581,423,95,243,429,545,149,161,248,249,318,21,331,349,166,294,346,434,297,401,566,497,402,586,214,438],liststor:[483,390,382],independ:[566,439,349,83,166,229,440,320,153,450,257,433,294,262,353,5,288,248],package_id:492,to_texstr:474,set_cursor:297,thick:[83,425,541,294,70,420,312,5,64,495,549],get_subplotspec:[5,190],cartesian:[357,294,394,340,238,348,5,27,248],nomin:[294,5,497],fully_contain:434,figimag:[149,294,546,497,155,33,73],oscilloscop:[574,370],byeaster:[389,168],john:[566,580,439,541,257,440,38,248,21,280,492,235,294,224,5,214,85],wxgtk:[380,330],animation_blit_wx:200,score_styl:287,has_invers:434,stix_fonts_exampl:82,target:[557,144,294,235,287,171,314,214,248,312],get_patch:[491,266],provid:[303,525,439,74,257,442,443,107,38,243,542,557,296,5,224,112,7,347,181,317,228,83,420,524,561,440,297,248,353,527,235,277,352,392,96,492,451,326,354,543,566,88,357,497,120,92,464,468,499,242,122,431,360,433,262,287,144,22,379,149,450,550,85,544,330,432,349,383,579,166,294,168,570,434,31,401,340,402,362,510,214,312],bbox_inch:[294,235,297,149,30],linearloc:[37,527,307],plotfil:[294,235,83,497,254],rgb2hex:499,iron:497,get_figur:[239,13,248],valid_onli:83,minut:[83,465,296,100,401,168,314],legendpatch:53,rects1:[428,161,436],rects2:[428,161,436],plot_container_panel:334,fold:83,xcenter:452,frontend:[353,144,439,83],pointsiz:153,get_ygridlin:[5,316,489],"__main__":[150,544,177,485,179,316,525,234,33,280,460,54,465,500,123,286,156,289,580,334,504,338,171,449,42],test_create_figur:352,numbered_bases_to_r:485,strength:222,"__new__":314,new_saved_frame_seq:579,latter:[581,257,121,243,297,96,248,423],unstack:[294,5],zeros_lik:[88,159,413,222,161,146,44],fname:[522,580,549,83,257,478,465,38,363,294,233,566,492,287,179,149,531,51,254],get_antialias:[297,248],ypo:129,add_inner_titl:481,usernam:[228,214,235],iceland:492,legibl:83,"0x7f9c6d8ae1e0":38,get_arrowstyl:248,phase:[497,239,444,282,177,492],grave:[570,354,62],barsabov:[294,5],getmaskarrai:38,push_stat:312,bracket:[248,354],set_multialign:248,thresh:544,left:[442,326,444,312,36,5,316,450,149,319,320,13,155,471,329,431,22,161,25,332,166,334,335,337,338,339,340,33,34,4,480,482,177,485,347,348,349,190,50,492,352,51,354,356,357,196,198,56,449,557,201,62,385,203,67,68,505,209,214,501,517,380,383,81,83,523,387,525,528,235,243,238,89,239,91,92,240,242,581,302,248,550,391,99,346,434,401,402,553,403,384,448,395,109,260,261,405,266,416,268,584,273,117,566,277,463,537,280,19,120,282,121,122,123,286,94,222,20,289,23,293,294,131,498,297,438,583],notion:294,inout:[294,5,402,235],triang:[290,575,283,61,136,301,193,371],opposit:[294,5,326,401,492],stepcnt:466,subtli:83,buildbot:[257,439,352],identifi:[257,499,491,159,434,297,294,579],prctile_rank:492,involv:[439,83,294,442,499,379,100,103,5],consolid:[349,352],xaxis_invert:5,facecolor:[34,217,256,248,480,307,309,108,75,39,348,542,177,223,5,263,182,412,226,500,83,114,555,187,584,117,452,566,235,277,442,243,156,569,495,402,460,581,91,92,240,93,238,242,545,393,433,259,22,222,149,550,85,349,68,293,385,294,582,346,297,340,209,211,212,301,438,589,507],format_ydata:[5,360],haven:7,colorconvert:[83,11,499,346,429,518,211,156,205],predecessor:83,get_vert:[190,83,248],fonts_demo_kw:[368,200],ax_stack:149,recs_join:[492,38],print_tif:297,float_to_rgba:393,likewis:[348,340,83],make_patch_spines_invis:63,get_render:166,new_figure_manag:[95,83,257,576,21,294],get_rot:[243,248],recalcul:[294,5],thin_diamond:[294,5,248,448],circlecollect:[243,122],set_ylim:[34,0,450,104,256,480,375,443,347,222,100,557,42,273,315,5,6,78,146,183,496,83,114,11,151,289,535,387,584,84,48,247,474,12,442,529,169,87,343,383,566,356,571,196,197,54,91,198,19,574,525,58,239,294,238,63,349,161,204,205,249,471,472,550,67,68,293,385,476,288,336,263,589,134,65,340,341,32,490,429,438,370,162],emf:[21,297,235],emb:[402,144,92,440,58,95,257,353,214,379,412],dvipnghack:[402,543],formatstrformatt:[37,527,348,276,314,24],illumin:499,cleanli:7,rung:492,p_bbox:247,septemb:228,steam:[353,217],commandlin:[235,579],bitrat:[402,579,66],minorticks_on:[294,5,497],register_scal:[357,544],pad_h:234,yaxis_stretch:525,circle_tip:557,pastel:[260,497,518],lon_minmax:[100,401,12,567],farlei:460,nbplot:171,py31:235,py33:352,xmax_i:334,languag:[497,353,395,348,144,330],set_ha:[401,248,24],drawn:[144,150,442,482,149,379,405,262,348,5,450,266,349,566,235,243,87,357,239,92,121,122,581,247,83,161,248,294,99,521,434,297,401,340,587],awai:[349,83,434,257,19,220,294,50,550,144,22,402,5,248,238],lasso:[92,156,500],theta_direct:257,accord:[0,326,349,523,88,294,443,402,581,122,247,491,468,96,324,5,450,289,248,423],"_box":150,xrang:[294,5,243,495,194],growfilt:161,gcedg:83,preprocessor:153,add_output:289,figurecanvasbas:[95,83,92,21,297,347],yaxis_invert:5,"_use_acceler":23,ssyr:257,nfig:280,rectangleselector:[92,573],howev:[303,304,144,257,38,149,100,312,5,348,224,525,349,117,492,238,566,57,58,581,22,83,122,550,398,294,168,434,401],py3k:[235,83],ncar:[497,492],window_len:161,com:[303,1,257,38,491,313,5,316,7,44,317,228,492,389,533,566,493,199,57,21,541,222,248,580,434,207,581,167,294,299,214],col:[138,349,386,294,17,38,242,117,524,210,450,51,205,254],prepca:492,bboxtransformto:[434,83,525],tone:[403,497],toni:[257,316,440,235,439],excess:[294,160,38,96],proj_transform_vec:349,definct:83,pylist_setitem:235,n2009:501,axisline_styl:326,wider:402,guid:[294,5,83,265,266],funcleft:92,masked_tri:160,updategeometri:[324,76],set_view_interv:[527,349,383],endolith:235,convolut:330,showsyntaxerror:580,stop_raster:[161,297],thereaft:527,fill_demo_featur:200,metacom:214,"__len__":314,widgetlock:[156,235],standard_norm:172,handler_map:[366,266,122],get_texmanag:297,johansson:235,ident:[149,434,243,229,240,323,581,492,431,257,294,481,340,277,497,246,348,5,450,248],properti:[255,395,326,221,243,491,347,348,5,383,266,526,83,489,420,584,248,455,118,577,353,238,530,566,402,357,497,91,92,242,58,393,550,121,22,545,149,450,122,85,470,549,349,434,398,581,294,329,258,485,367,368,297,401,103,214,287],diamondsuit:354,sourceforg:[464,228,492,83,561],aim:354,axed3d:349,mouse_add:[294,149],hist_patch:491,publicli:[224,383],aid:[257,498,584],test_figur:235,pathdata:589,multiple_replac:38,pastel2:[403,497],succeq:354,pastel1:[403,497],printabl:[357,149,268,294,497,22,545,5,248],conv:113,angle_help:[100,401,12,405,567],shrinka:[294,5,474,355,248],xobject:95,fourierdemofram:341,cond:[492,547],used_charact:312,hebrew:354,twardi:[439,440],subdiagram:[75,22],descent:[348,297,153,326],leftarrow:[354,62],perform:[34,303,439,104,458,262,224,83,320,566,5,323,96,492,423,194,357,353,464,61,379,349,248,579,294,133,434,136,402,301,287],curvea:248,th2:[304,413],th1:[304,413],thetagrid:[294,497],decibel:[294,5],u23c:[82,354,62],fontset:[402,354],wheel:[92,297,210,347],uninterrupt:38,"0xd378b0c":348,fragil:83,axes_class:[387,190,101,5,450,553],nic:[257,235],hang:[498,235],hand:[294,442,273,122,498,297,401,492,57,402,203],have_unit:[349,248,383],colcolour:[294,5,51],to_perc:241,pubu:[403,497],cid_down:408,customspac:312,fully_containsx:434,kept:[103,294,214,83,566],undesir:[223,566,108],scenario:177,draggableoffsetbox:266,thu:[382,561,423,294,326,38,122,243,353,433,277,96,5,450,203,85,19,312],wxagg:[303,513,144,334,335,574,339,449,286,235,3,380,402,83,408,23,341,330],whizbang:352,set_thetagrid:[357,177],fully_containsi:434,client:[257,566,83,24],thi:[303,0,439,2,139,138,442,443,445,142,545,3,448,314,5,6,7,317,149,152,320,153,321,455,456,323,324,156,330,17,326,328,353,464,465,466,158,21,160,468,218,22,450,378,470,533,24,25,331,27,166,169,29,337,168,339,167,31,170,341,32,335,581,173,312,516,480,343,38,484,42,485,347,179,334,181,349,45,46,589,187,383,190,191,492,352,340,451,354,580,402,357,304,498,499,199,57,56,60,361,362,500,144,379,318,58,64,85,525,68,207,360,208,524,72,209,214,511,215,371,287,505,513,373,74,377,220,75,76,430,380,223,224,382,79,80,226,228,83,523,50,229,204,556,527,205,526,385,235,237,529,238,531,512,517,88,557,239,91,92,392,241,573,94,95,96,543,105,544,247,248,548,549,250,398,583,440,99,424,434,401,532,103,177,510,403,555,243,257,133,108,395,348,491,405,262,462,112,271,116,584,117,565,566,585,277,421,280,14,422,423,501,19,493,574,121,122,286,242,127,577,288,329,550,579,522,431,291,433,130,293,541,294,258,73,521,297,298,299,497,586,587,588,561],encrypted_part:395,fancytextbox_demo:200,polar_bar_demo:[180,200],background:[403,482,109,42,347,348,5,43,83,440,525,498,50,16,349,14,566,357,239,92,574,302,222,149,248,23,332,294,29,134,297,532,402,589],photo:[423,330],get_default_bbox_extra_artist:[5,149],dolphin_path:259,x_po:485,onload:557,josh:[229,498,584,566],separabletransform:83,bar3d:[349,235,129],valign:[5,525],schwardt:257,scatter_star_poli:[216,200],can_zoom:[5,357,349,525],shoulder:[289,168,22],xrcctrl:334,measur:[349,294,499,492,96,5,266],discrep:22,xdate:[294,5],encumb:330,xdata:[305,110,42,347,348,315,182,31,86,5,277,421,156,422,197,54,92,573,242,288,248,294,134,297,341,449,589],grid_locator1:[100,401,12,405,567],grid_locator2:[567,405],eventcollect:[294,5,235,197,243],embedding_in_qt4_wtoolbar:200,specif:[85,144,107,439,517,312,179,5,525,228,83,229,561,117,527,352,357,497,536,499,158,581,362,287,22,349,248,579,580,294,168,434,297,298,299,402,214,583],hackish:249,deprec:[5,297,83,38,121],graviti:413,y_offset:260,localdir:465,linefmt:[294,5],ffmpegbas:579,node145:1,vagueri:492,spines_demo:[404,200],get_contain:248,gtkcairo:[439,144,562,393,126,402,83],percentag:[440,241,424,587,492,235,214],demo_rgb:146,hypot:[9,54,66],flatten:[290,27,129,423,270,38,283,492,61,136,301,182,371,287],means_women:428,unless:[580,214,144,248,83,294,581,120,337,121,122,434,297,235,348,5,58,149],drawabl:[579,576],sample_data_demo:[200,407],forcibl:297,set_foreground:297,set_bbox:248,destlinktyp:566,drop_shadow_lin:161,overcom:442,format_data_short:527,sample_data:[103,478,38,485],get_default_filetyp:297,plu:[303,149,268,294,442,527,168,297,340,312,448,5,587,248],plt:[138,1,139,305,513,306,307,443,544,310,409,373,3,4,546,218,316,188,146,450,150,317,148,318,9,453,11,151,319,152,320,12,13,321,455,15,322,16,155,156,369,543,226,459,460,462,18,567,568,466,419,20,431,160,332,239,161,162,24,471,472,165,547,510,167,29,474,30,178,475,476,447,340,14,32,171,573,33,172,478,34,342,479,35,374,36,194,175,481,176,344,508,39,19,42,251,405,315,348,181,182,43,44,184,522,185,555,490,45,46,187,491,48,189,49,50,537,492,392,352,192,169,494,354,52,37,53,357,196,197,54,498,477,55,56,500,252,361,61,63,385,203,204,205,525,66,284,565,67,68,360,503,457,69,451,524,71,72,209,211,212,214,73,371,512,174,217,144,193,514,458,377,220,75,378,127,519,77,388,81,83,386,229,387,84,65,528,235,236,535,234,396,582,87,88,260,442,90,91,536,240,241,93,94,581,394,433,245,246,247,365,248,249,325,520,550,391,397,283,583,399,99,110,346,400,564,101,566,103,177,454,253,255,104,256,105,257,106,356,347,584,259,100,557,261,558,268,408,263,412,413,27,367,414,267,114,366,270,441,272,496,563,273,117,452,275,403,585,329,277,463,279,421,119,423,571,424,425,281,575,122,123,428,505,415,429,540,586,222,128,158,289,578,129,290,292,293,294,131,258,295,435,370,134,436,298,437,300,136,384,301,137,587,438,589,495],xdata2:197,nonuniform:[5,90],set_matrix:434,xdata1:197,salli:294,posb:248,posa:248,option_scale_imag:297,mybbox2:77,repositori:103,mybbox1:77,post:[83,10,28,57,294,497,168,5,248],start_event_loop_default:297,set_famili:[368,248,287],sebastian:235,obj:[557,74,38,95,491,314,349,248,24],autominorloc:[275,527,235],autolegend:280,get_dashpad:248,nwarrow:354,"__mul__":314,horizon:[92,5,294],leprechaun:344,offsetbox2:438,smooth1d:161,xyt:[42,589],nwith:[268,517],xyz:[492,235,354,310],"float":[74,243,443,38,259,149,41,446,296,262,5,264,383,266,267,8,11,229,187,191,393,190,12,492,278,155,96,527,485,532,566,390,357,462,120,92,499,242,160,362,500,22,545,83,378,248,163,434,469,166,294,69,498,168,334,297,401,341,429,553,541],bound:[541,579],xya:[581,248],xyb:[581,248],vline:[83,365,92,294,492,235,497,448,222,5,248,495],multicolored_lin:[216,200],axes3d:[441,306,307,220,310,447,176,451,400,83,129,84,520,189,322,27,367,37,466,394,204,185,459,325,71,298,211,371],naturallogtransform:357,get_subplotspec_list:[235,166],xyo:205,nsupseteq:354,accordingli:[228,19,83,294,443,75,434,492,22,5,450,248],deal:[450,525,83,262],wai:[303,525,421,144,257,442,107,38,221,149,312,224,348,5,7,317,228,8,10,229,13,117,526,566,50,277,352,237,96,280,543,354,423,357,462,120,353,493,55,199,121,220,60,286,361,262,57,83,249,579,291,349,434,523,294,208,168,334,401,340,341,32,103,362,137,214,583,287],checkmark:[138,354],intersects_bbox:[257,262,39],wav:110,lowest:[294,5,181],xy1:[555,310],xy2:555,unknown_symbol:312,contour_demo:[200,83],kroneck:492,candlestick2:231,get_str_bbox:541,oldautoloc:527,"true":[303,525,140,9,442,326,444,141,310,542,312,4,5,316,145,449,450,317,584,149,150,23,190,486,50,13,321,456,16,323,324,396,348,543,462,574,160,309,22,161,162,471,472,332,333,547,169,29,485,339,476,170,341,32,171,581,507,34,35,577,36,481,38,41,19,42,251,315,179,334,488,349,489,490,45,48,536,49,12,351,492,352,335,192,340,494,354,566,402,53,357,497,54,198,499,199,58,60,361,362,501,202,63,318,85,66,487,360,208,70,71,72,212,225,213,214,370,371,287,512,373,514,375,378,379,380,519,223,381,520,383,83,523,524,387,205,527,235,236,243,238,579,88,390,239,502,92,537,241,93,242,345,96,433,302,246,545,248,249,550,391,346,434,401,103,177,253,553,104,405,556,257,106,406,347,109,100,435,558,262,111,112,413,266,114,417,271,563,419,420,276,277,463,14,482,571,424,573,195,282,121,505,576,94,222,128,289,544,268,580,291,292,393,294,131,498,296,134,297,300,137,587,438,589],offsetbox:[292,150,535,481,122,581,235,450,438,266],reset:[297,574,83,384,92,434,337,57,383,294,50,235,347,402,5,370],absent:[294,5,362],mtx:434,dash_dot:248,slope:[294,5,492,258],mathtextbackendp:312,inquir:402,labeltop:[294,5,19],unmerg:57,maximum:[349,83,434,527,92,499,38,149,117,257,294,357,485,168,22,5,549,341,312],pcolorfast:[294,5,235,477],stop_event_loop:297,list_font:287,xmln:[87,388],emit:[5,177,349,83],csvformat_factori:492,hotter:497,alongsid:[257,144],flat:[83,294,243,160,286,492,301,96,5,354],"abstract":[566,92,383,353,297,312,96,248],emaslow:222,postscript:[439,144,442,395,312,348,5,412,149,153,118,235,277,243,549,497,353,21,287,248,330,294,297,402],apply_aspect:5,natgrid:[492,265,90],face:[317,349,83,549,294,329,149,545,243,297,235,209,144,301,402,5,117,438,248,312],line2d:[0,138,442,326,38,517,42,347,348,5,383,266,83,85,536,198,235,277,566,357,92,574,242,122,586,149,521,248,349,169,99,294,297,401,103,409,214,370],"_quit":430,means_men:428,encrypt:395,nemec:492,elementtre:[491,557,87,388],tickleft:[480,393,248,448],test:[83,38,149,243,492,383,262,96,5,248,265],line2a:169,shrink:[37,550,149,114,294,392,121,412,581,298,277,238,5,181,423,312,248,173,256],realiti:95,getsizetupl:[335,286,380,339],rubberband:[297,235],fill_betweenx_demo:200,detox:352,omega:[82,282,354,62],im_r:146,draw_patch:177,abscissa:492,pacer:498,filled_mark:[409,248,448],kinds01:512,im_b:146,im_g:146,semilog:[571,497,294,440,5,214,254],indseq:42,locator_param:[433,349,83,294,234,497,5,181],axamp:384,concept:[40,156,7,83,10],alphast:95,macosx:[303,439,144,257,402,408,566,235,347,379,7,248],datum:[156,38],x_test:160,middl:[517,88,149,268,514,294,573,583,499,383,340,144,246,5,181,510,248,495],zone:[294,5,168],graph:[328,432,357,144,434,229,442,440,38,57,294,566,235,485,497,5,588],hump:[416,188],flash:144,pythonbrew:352,nearrow:354,linthresh:[294,5,349,499,357],colorbar_factori:121,rightmost:[294,5],text:83,isinst:242,brown:[179,497],demo_locatable_axes_hard:13,is_last_row:5,alignment_demo:83,patchlabel:[510,217,75,22],octob:168,hist_colormap:200,brows:54,is_overund:312,make_ax:121,set_messag:297,interp_cubic_geom:575,womenmean:[161,436,178,568],gui:[149,294,527,21,297,83,85],pyeval_restorethread:430,addact:76,setitem:38,bbox_imag:[33,438],gut:353,set_adjust:[5,83,496],slidermax:92,update_polygon:182,upper:[372,257,442,41,261,36,348,5,181,488,266,83,268,289,584,190,527,492,236,155,238,51,354,423,89,536,122,361,287,222,149,550,64,248,349,130,398,294,29,346,334,297,340,14,402,214,495],ezra:235,axes_loc:[5,443,149,190],htm:492,cosh:354,cost:[579,492,22],pushoff:434,colormap:[5,83],sharex:[442,108,223,5,560,524,46,321,526,106,396,19,92,361,222,450,203,25,398,294,296,369],stroke_width:262,uniform:[510,149,90,294,442,319,498,121,160,32,246,96,5,539,193,454],sharei:[526,398,294,46,321,123,524,442,5,450,203],appeal:[375,442],setattribut:[557,76],va_list:391,defici:353,gener:[579,357,83,248,243,294,499,38,121,149,96,297,492,168,262,103,5,527,312,153,287],coeffici:[294,5,181,349,96],all_backend:465,satisfi:[223,303,492],wahlstrand:439,set_figur:[5,248,346,586],g_3:485,tricontour_smooth_delaunai:[216,200],altdeg:[1,499],inangl:289,teacher:498,poulter:235,avconv_arg:[402,579],"_update_lin":42,plotter:[338,171],parse_opt:465,avconv:[402,235],weakref:38,trial:[294,149],behav:[349,83,257,337,168,294,492,362,144,262,243,5,450,248,354,543],set_drawstyl:248,triag:439,line_with_text:186,aliased_name_rest:248,regardless:[349,83,294,383,527,492,340,22,379,5,248],mobiu:371,extra:[144,107,347,5,181,149,419,190,235,192,492,539,422,354,423,357,242,95,543,287,450,248,579,433,294,297,402],set_axi:[527,168],ffmpegwrit:[218,579],nlyeardai:168,cnse:113,marker:[83,149,95,297,243,5,248,266],should:[303,138,85,144,248,175,525,326,246,38,395,545,348,357,312,262,179,5,7,383,266,334,228,83,480,152,276,117,190,191,235,352,237,96,492,353,354,423,566,563,89,497,91,92,499,199,57,122,21,402,257,433,121,202,22,379,149,527,289,576,544,579,580,349,220,434,581,476,133,286,168,294,297,401,340,299,32,477,103,137,214],num1:120,compositegenerictransform:[434,340],get_spine_transform:545,num2:120,patch_func:366,subvers:10,expoboot:584,set_weight:[368,248,287],live:[21,348,402,83],plot_working_directori:214,edit_recarrai:483,get_weight:[541,248,287],statictext:341,degreeformatt:[544,525],logarithm:[357,349,294,440,499,527,340,5],cax:[174,250,149,294,481,505,13,286,121,244,433,94,508,450,553],car:177,prepar:[228,450,257,481,57,224,161,214,65],cap:[357,83,268,541,294,149,368,287,411,402,5,248,354],focu:[402,235],rdgy:[403,497],graphit:317,can:[303,439,2,442,443,545,542,311,312,36,5,7,317,149,10,420,320,153,321,457,96,17,326,328,353,464,465,20,159,144,22,450,470,330,25,580,29,337,168,339,340,341,32,172,448,38,42,485,347,179,349,489,48,190,492,352,451,354,566,402,357,497,498,499,199,57,58,60,361,362,61,202,379,318,85,385,208,524,367,368,214,512,74,517,525,80,522,228,83,229,527,205,233,235,529,238,533,89,91,92,240,392,573,242,243,543,383,544,247,248,550,397,398,440,434,401,103,177,403,258,107,395,348,262,462,412,266,500,416,268,272,584,117,275,276,277,568,421,14,423,19,184,120,493,574,121,122,284,286,287,586,577,521,329,579,431,432,433,581,294,133,583,297,136,301,589],cal:[83,229,312,62,402,354],get_titl:[5,235,537,266],evt_siz:[21,341],spy:[83,257,232,294,497,222,5],complic:[303,144,83,583],nema:222,p107:297,topic:588,showbas:297,occur:[328,580,144,294,383,38,168,149,434,297,340,347,243,5,181,248,44],eqsim:354,texsystem:317,multipl:[512,373,38,105,542,484,312,223,5,383,83,191,50,492,352,323,276,357,92,279,465,108,159,149,527,248,206,250,294,168,297,437,214],withhead:492,write:[83,38,95,541,492,312,579],set_dashpush:248,edgewidth:[581,64],product:[228,294,107,492,235,224,402,5,22],sp1:146,dive:353,"__next__":314,lancast:[248,262],open_group:297,newlin:[268,444,282,248,235,501,517,412],viewlim:[559,110,83],randrang:400,explicit:[217,83,294,527,235,144,379,5,583,423],get_point:434,rather:[74,257,38,348,5,7,383,83,523,525,527,492,352,96,533,57,58,402,286,121,544,294,335,340,136,103,301,214,61],control_mask:179,michel:96,approx:354,labelwidth:346,ended:83,no9:[402,556],odeint:413,mdroe:312,still:[0,516,144,257,442,343,75,179,5,7,317,83,524,235,277,392,492,497,379,385,450,205,543,68,293,434,294,401,103],ieee:566,dynam:[492,297,83,527],draggablelegend:266,conjunct:[92,5,294],box_aspect:434,idleev:[513,297],contiguous_region:492,calligraph:[82,354],yaml:352,window:[525,139,76,109,491,313,179,5,382,522,228,83,560,45,562,153,321,351,492,324,390,557,497,240,58,21,421,286,287,125,126,430,149,288,248,206,473,293,294,335,339,134,297,341,449,510],avconvwrit:579,curli:570,ydata2:197,python_dateutil:303,m_0:316,non:[512,107,38,571,312,262,5,500,228,83,229,525,492,96,357,497,566,466,121,541,287,22,149,248,434,168,294,297,103,214],legend_scatt:[216,200],halv:[294,5,349,499,357],ymajorformatt:527,auto_delim:312,alist:214,x_transform:434,aesthet:[455,442,497],polygoninteractor:42,half:[349,83,294,246,499,485,583,402,542,357,262,348,5,450,248,495],nou:165,son:[294,5,492],discuss:[303,83,581,434,348,566,347,103,224],nor:[214,205],introduct:265,down:[144,514,408,347,179,5,382,228,50,235,280,89,328,22,222,580,432,207,294,337,297,340,583],ganged_plot:200,mathtext_to_wxbitmap:380,lanczo:[294,5],format_coord:[5,357,349,386,525],drop:[439,587,144,257,29,319,492,14,179,382,248,44],labelpad:[5,326,349,383],linspac:[403,525,516,555,306,343,308,105,447,177,518,558,260,182,147,81,83,45,270,152,575,321,49,322,492,352,279,193,17,52,88,571,196,463,90,240,573,56,158,394,301,61,246,222,318,283,205,325,290,27,169,99,416,258,251,524,294,437,226,32,136,33,253,131,371],kern:[165,83,541,492,312,549],in2p3:289,set_xdata:[31,248,239],jaggi:402,axesloc:[190,443,450],get_yminorticklabel:5,domain:[357,294,499,527,341,544,96,5,64],citat:235,replac:[138,257,491,312,179,7,83,527,492,235,566,465,499,199,121,362,287,385,248,330,434,474,294,340,583],gaussian:[414,462,69,167,392,229,508,142,476,492,294,347,212,5,161,388,87,547,173],backport:235,significantli:[439,83,257,464,75,412],year:[566,439,260,83,360,257,231,168,329,159,294,429,353,5,112],happen:[525,433,144,580,229,153,337,257,340,294,380,5,423,248,383,317],tri_left:[294,5,248,448],shown:[566,194,144,54,304,294,442,491,576,455,402,297,361,340,22,96,5,214,423],accomplish:[294,5],axislin:[131,326,567],dict_delal:38,space:541,poppler:543,oldval:382,rational:96,toggle_label:[481,505,94],handlebox:122,xzero:131,rec_join:[264,492,44],argv:[580,233,504,271,76,485,179,86,235,62,324,280,82,51,23],get_used_charact:312,telenczuk:99,reset_histori:179,carl:235,barab:248,care:[357,581,543,492,277,340,354],couldn:169,arnaud:235,qmenu:76,stylefunc:528,standardpsfont:312,spancoord:[92,573],custom_scale_exampl:357,fracvar:492,lambda:[342,138,390,211,562,337,310,159,492,354,380,126,314,483,382,507,62],blind:497,hpacker:581,directli:[218,257,38,243,100,312,262,348,5,412,317,228,83,229,85,235,277,529,492,423,357,566,499,199,57,58,402,286,61,545,248,470,543,294,524,434,297,401,136,121,301,73],message_format:507,yourself:[303,533,464,423,340,299,348,492,214,317],axarr:[257,524],ring:494,angular:[471,413],size:[306,443,444,310,446,312,5,316,584,149,453,319,153,13,455,323,156,326,460,21,160,22,450,454,166,169,29,474,485,339,341,335,33,481,343,38,177,346,348,349,46,426,190,492,14,355,53,357,196,498,499,402,501,63,85,70,368,214,150,221,380,525,383,81,83,205,527,234,235,243,391,566,581,246,247,248,249,549,250,99,424,294,401,449,555,110,411,113,266,267,72,563,117,569,120,281,282,286,415,287,222,128,288,579,434,435,297,585,587,438],attributenam:38,draw_artist:[332,149,239,109,271,574,482,134,50,42,302,347,5,589,23],sheet:[566,287,10],silent:[402,83,543,499,318],figaspect:[71,298,149],dayfirst:492,caught:297,get_mec:248,checker:362,cumul:[294,5,542,243],f_0:341,get_text_width:383,get_mew:248,frame:[218,442,141,545,177,3,380,347,5,266,83,23,229,320,49,235,531,14,566,21,449,286,245,63,149,579,334,29,338,339,294,341,32,335,402],friend:[257,83,153,395],validjoin:248,thaw:450,courier:[26,543,268,445,402,221,179],especi:[543,566,402,235,96,423],locationev:[297,347],test_lines_dist:349,mathworld:492,unichr_saf:312,bysetpo:168,quad:[294,5,575,62],savetxt:[492,83],simple_plot:[103,216,200,214,228],than:[439,254,144,257,581,544,108,395,243,100,347,223,5,7,383,83,523,153,543,525,353,527,235,352,493,96,492,539,423,566,533,357,92,464,510,499,57,38,402,286,433,362,121,22,149,287,58,64,248,330,349,547,385,294,335,168,434,297,401,340,136,103,301,172,214,541,61],png:[0,1,2,5,6,8,11,191,13,15,17,18,19,20,21,22,24,25,494,29,30,33,35,37,39,41,45,46,342,53,56,58,61,62,63,64,65,67,69,70,71,72,73,75,77,78,79,80,81,502,84,86,89,90,91,92,93,94,581,101,106,108,100,111,112,113,114,115,116,117,353,119,122,123,127,128,129,130,131,132,258,136,137,138,140,142,145,146,147,148,149,514,151,154,155,396,157,158,431,160,450,163,164,165,476,485,170,172,173,174,175,177,181,185,187,188,189,12,192,193,194,196,197,198,201,202,82,204,205,206,208,209,210,211,212,213,214,215,217,144,220,221,222,223,226,228,229,231,232,233,235,236,238,279,241,244,246,247,248,249,250,424,252,253,254,255,256,257,105,261,262,263,267,268,270,272,452,275,276,277,463,280,281,282,283,505,521,289,290,291,292,294,296,297,298,300,301,303,304,306,308,309,310,311,312,316,317,318,319,320,321,322,323,96,327,329,330,331,336,337,178,340,354,52,343,344,345,251,348,349,352,14,355,356,358,360,361,365,366,368,371,372,373,375,381,385,386,387,389,391,392,394,259,397,398,400,401,402,403,406,409,410,411,412,414,416,419,420,422,423,184,425,426,195,428,429,433,435,436,437,438,440,441,442,443,444,445,542,447,161,451,274,453,454,455,457,459,460,462,278,466,467,470,471,473,474,490,477,478,479,480,481,484,486,487,488,489,27,495,496,498,55,501,503,506,508,509,510,150,516,517,176,523,524,525,234,243,531,532,260,535,536,537,540,295,543,544,546,547,548,325,550,552,555,556,405,560,564,565,566,567,568,570,571,575,225,577,578,579,582,584,585,586,587,583],segments_intersect:492,f_g:316,f_j:62,rowloc:[294,5],bin_path:579,glue_typ:312,bboximag:[33,429,438],kludgi:341,xcorr:[83,294,566,497,396,5],analysi:[566,294,353,492,96,5],craig:235,"__getattribute__":314,anywher:[290,357,566,38,412,287,179,214,248],ticklabel:[357,149,398,391,326,121,329,100,405,508,5,525,383,489],deliv:492,hsieh:96,fontclassx:312,caus:[430,149,222,409,5,317,83,235,352,464,354,357,240,465,57,379,416,248,543,434,168,294,402],engin:[303,217,144,257,440,566,235,277,96,328,145,454,354,330],form:[107,312,448,5,179,224,525,349,524,205,492,96,354,497,499,95,243,83,248,580,581,434,504,294,297,103,510],prop_patch:77,satellit:440,geoffroi:257,begin:[88,83,580,92,464,402,337,95,294,50,352,62,179,5,263,82,248],importantli:[498,566,228,544],noplot:[522,88,26,531,218,167,467,141,470,284,31,124,518,526,333,214,51,183,97,66],test_proj:349,price:[442,440,329,159,360,492,410,222,469,112,382,44],valmax:92,rankin:217,finddir:38,cur_tim:239,wc3:439,renam:[235,83,493],on_idl:378,rescu:530,use_cmex:312,itemindex:38,copy_from_bbox:[332,239,134,271,574,482,109,50,42,302,347,589,23],get_xdata:[83,242,584,347,161,87,248],axlin:480,mro:122,aerosol:177,mri:532,gobject:[580,332,239,417,574,377,48,171,43],processpc:492,relative_strength:222,example_data:177,linedata:367,desript:235,handlestextsep:83,whatsnew:38,fifth:[462,510,289],fifti:367,ichart:44,onli:[303,442,326,446,312,5,7,149,319,153,455,96,464,465,466,158,431,450,166,167,542,168,490,340,516,38,484,42,347,348,497,349,188,50,492,352,354,566,194,357,196,499,56,57,103,362,379,64,205,208,214,144,378,519,224,525,383,228,83,229,388,527,235,243,238,87,533,239,92,510,541,543,544,248,549,250,398,294,401,402,257,106,107,491,266,416,268,420,277,423,19,121,122,284,505,287,579,580,433,581,434,583,297,299,587,588,589],left_h:273,ee8d18:[238,195,550],proportion:[337,22],withnew:498,im_titl:481,overwritten:[95,402,337],"0x34d2b18":492,set_xtick:[505,525,196,481,336,436,94,58,490,101,401,178,5,450,203,183,470,226],meteoroloci:492,shadow_transform:340,cannot:[522,83,398,257,326,100,401,235,22,450,214,317],get_fullnam:[541,83],buttons_ok:507,oiiint:354,textpath:[438,161,235,310],thumbnail:[257,233],tooltip_:557,wframe:322,get_minor_formatt:[348,383],subplots_demo:[216,200],keyev:[294,297,83,347],n123:501,lfloor:[155,354,62],"0x200f730":38,tgt_imag:161,unfil:[223,5,294,83,108],r_sq:290,"_close_lin":177,set_ylabel:[441,387,108,348,435,223,5,181,145,183,451,367,349,46,578,320,584,84,412,498,442,529,566,481,427,466,242,58,123,400,394,63,333,450,204,205,470,220,433,67,169,296,71,503,436,585,341,210,211,449,507,254],nonstandard:303,concern:[107,83,312,214],lost:[464,235,57],cohere_pairs_test:492,xetex:317,transmut:[257,581,248],clip_path:[357,149,268,305,294,545,348,277,22,212,5,248],figurecanvaspgf:317,less_equ:242,between:[403,304,85,144,564,248,525,326,108,527,491,19,312,262,223,5,419,383,266,584,83,275,45,46,76,321,455,190,191,492,352,323,324,485,512,276,566,357,196,239,120,92,477,499,56,57,158,95,192,505,121,518,22,149,450,329,64,65,579,25,580,349,166,294,132,168,583,345,434,297,401,497,96,577,510,553,287],"import":[0,1,2,3,4,6,7,8,9,11,12,13,15,16,17,18,19,20,24,25,26,27,169,29,30,31,32,33,34,35,36,37,38,39,41,42,43,44,45,46,48,49,50,51,342,53,54,56,57,58,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,321,79,80,81,203,83,84,85,86,87,88,89,90,91,92,573,94,581,97,99,100,101,103,104,106,107,108,109,110,111,112,113,114,115,116,117,119,123,124,125,126,127,128,129,130,131,132,133,134,136,137,138,139,140,141,142,218,145,146,147,148,363,150,151,152,154,155,156,157,158,159,160,161,162,163,164,165,167,485,170,171,172,173,174,175,176,177,178,179,181,182,183,184,185,187,188,189,191,192,193,194,195,196,197,198,201,202,82,204,205,206,208,209,210,211,212,213,214,215,217,144,220,221,222,223,226,229,231,232,233,234,235,236,238,239,240,241,242,244,245,246,247,248,249,250,251,252,253,254,255,256,258,105,261,262,263,264,267,270,271,272,273,274,275,276,278,279,280,281,282,283,284,286,287,288,289,290,291,292,293,294,296,563,298,300,301,302,304,305,306,307,308,309,310,311,314,315,316,318,319,320,78,322,323,324,325,327,329,331,332,333,334,335,336,338,339,341,52,343,344,345,346,347,348,351,352,14,355,356,357,358,360,361,365,366,367,368,369,370,371,372,373,374,375,377,378,380,381,382,384,386,387,388,389,390,391,392,393,394,259,396,397,398,399,400,401,402,403,405,406,409,410,411,413,414,415,416,417,419,420,421,422,424,425,426,427,428,429,430,431,435,436,437,438,439,441,443,444,445,542,447,449,450,451,452,453,454,455,456,457,458,459,460,462,463,464,465,466,467,469,470,471,472,473,474,475,476,477,478,479,480,481,482,483,484,486,487,488,489,490,491,492,494,495,496,498,55,500,501,502,503,504,505,506,507,508,509,510,511,512,513,514,516,517,518,519,520,521,522,523,524,525,526,528,529,539,531,532,260,535,536,537,540,541,295,544,546,547,548,549,550,552,555,556,557,558,408,560,562,564,565,566,567,568,569,570,571,93,574,575,225,577,578,23,580,582,583,584,585,586,587,589],lualatex:[118,530,235],"_as_mpl_ax":[357,83],vdot:354,filter:[566,294,388,160,297,492,5,161,87,248],radiu:[516,100,405,262,5,83,277,96,238,27,119,357,240,581,22,545,248,550,294,337,424,401,340],face_flag:549,set_data:[34,0,218,9,343,110,177,347,315,413,134,194,210,54,240,574,33,248,66,169,589,367,334,586,32,42,438,370],tight_bbox:235,yorick:497,mono:402,groupbi:[159,492],figurecanvasbackend:83,mont:439,tutori:[312,265],vvdash:354,progvers:[324,76],make_compound_path_from_poli:[262,91],c_over_c:312,april:492,curvilinear:[12,401],set_pad:[326,401,383],featur:[357,83,92,294,96,103,5,214],match_origin:243,markerstyl:[294,5,448],damag:224,caret:[294,5,83],clarif:235,strpdate2num:[502,168],invert:[357,349,239,83,434,544,525,340,235,5],curveab:248,invers:[357,349,83,434,499,525,566,401,235,544,5,248],dateloc:[294,5,168],odel:38,update_scalarmapp:243,rebuilt:228,eventplot_demo:200,carei:497,kdevelop4:235,onmouseout:557,emphas:497,logspac:[492,454],set_patchb:248,set_patcha:248,countless:[439,107],underline_posit:549,addtext:523,error_kw:[294,5,83,428],trick:[379,340,320,398,442],set_dashdirect:248,sliderhandl:341,id_exit:380,trianglex:297,set_axisline_styl:[131,326],markeredgewith:[294,5],henc:[144,83,294,499,38,168,243,277,96,5,248],worri:[581,277,525],toval:492,label_posit:485,scipi:[303,107,109,347,5,7,43,413,271,492,16,460,574,466,103,302,161,23,332,294,32,402],activecolor:92,eras:[83,121],"return":[440,305,442,443,446,3,314,5,316,146,450,149,9,69,13,322,154,324,156,24,326,567,462,465,466,159,160,22,412,469,161,162,157,472,26,332,166,169,335,474,168,339,476,31,340,341,32,171,581,507,312,481,38,42,338,315,179,334,181,183,44,349,120,48,536,49,50,492,566,357,497,54,498,55,499,360,362,379,385,283,64,65,66,67,504,366,505,71,449,370,371,287,513,373,74,221,378,518,380,519,77,525,79,383,226,83,386,229,524,527,235,236,243,485,88,390,239,580,92,240,241,242,482,95,96,544,545,365,248,548,549,250,399,110,346,400,434,401,103,177,405,556,257,347,395,348,100,558,262,190,112,263,413,266,367,417,116,117,420,277,422,426,493,574,121,122,286,429,94,222,577,288,289,579,290,431,293,393,294,134,297,585,300,589,541],texinfo:235,axespad:[402,83,266],freetyp:[303,402,51,312,330],get_bound:[179,545,83],quiverkei:[257,5,291,497,294],triangleq:354,returm:492,facenam:312,q2x:492,epoch:168,knuth:[439,354],document:[95,83,92,153,149,21,294,297,383,287,497,5,85,265,312],masionob:262,datepart:456,closest:[257,499],memleak_hawaii3:228,mouse_press_ev:297,someon:[92,50,248],orrd:[403,497],figuremanagerqt:576,mathcircl:[82,354],tradition:[294,5],minduka_present_blue_pack:429,fonts_object:312,ccw:[294,5,263,243],floor:416,from_ext:[434,77,429],demean:492,recach:[0,248],stixfont:312,assert_equ:352,handlerline2d:122,bitmap:[543,153,346,339,21,402,297,235,312,380,155,529,330,248,549],mayavi2:328,ps2:[179,580],ps1:[179,580],speed:[566,402,434,257,440,499,243,565,294,50,492,235,352,96,127,5],versu:[294,121,452,277,243,5,145],europ:402,suppresscomposit:[149,346],desktop:330,identif:[235,357,83],"_as_mpl_transform":235,treatment:585,versa:398,make_fig:470,add_callback:[297,152,42,248],xend:[240,110],simple_axesgrid:135,set_useoffset:527,psi:[354,62],frown:354,onscreen:576,read:[303,144,38,445,41,110,469,83,10,153,235,96,492,87,532,423,533,497,493,57,122,581,362,395,149,163,580,434,424,294,584],outermost:5,alignment_test:200,report_miss:465,psd:[566,83,45,46,321,294,492,497,5,113],demo_grid_with_single_cbar:505,process_select:248,ft_face_flag_fixed_width:549,passthroughproxi:314,amp:384,inconcist:235,autodoc:214,bbox_transmut:248,win32fontdirectori:287,feedbackknob:341,halign:[5,525],benefit:199,newid:[286,3,339],set_pickradiu:[243,248,383],cascad:[235,287],output:[525,144,257,544,38,311,312,179,5,7,412,317,228,83,229,289,153,248,566,456,235,277,352,492,579,357,497,353,464,499,199,57,159,22,149,64,85,318,95,543,434,476,70,294,402,214,588],downward:205,"14pt":556,get_default_s:287,pad_inch:[149,166,257,120,294,297,402],verbal:566,findobj:[294,566,497,236,248],arrow_demo:200,stockcursor:449,anomal:144,rrule:[389,168],ubyt:312,ytran:83,nonzero:[42,334,242,492,500,22,156,510,532],viral:107,kaiser:[294,5],trisurf:235,"_xaxis_transform":525,outtip:289,inside_poli:492,start_filt:[161,297],wheat:[442,413],sixth:462,radial:[357,497,294,72,177,5],printing_in_wx:235,mouse_stop:[294,149],fulli:[434,328,214,144,349],axes_demo:[294,200],"throw":[297,235],session:[144,294,340,348,214,511],comparison:[28,153,57],central:[214,497],greatli:[328,349,499,85],get_url:[243,297,248],usecol:[502,492],save_bg:239,get_minpo:383,degre:[304,405,257,442,326,100,448,262,314,5,80,413,83,268,151,525,243,357,184,499,61,544,149,248,294,506,434,297,401,136,402,301,587],tickformatt:74,cbar:[512,416,294,94,503,508,149,181],backup:7,processor:297,dvip:153,transformad:434,verton:[92,235],resampl:[149,294,497,262,559,5],hammer_project:525,thread_id:83,marker_path:[216,200,83,297],change_geometri:[5,190],coodin:383,yout:[492,317],your:[83,92,199,121,149,294,297,492,168,497,103,5,527,248,312],get_cmap:[290,403,250,83,294,270,583,258,94,283,160,362,558,33,137,64,181],loc:[174,514,257,387,444,344,260,177,312,36,5,383,266,149,150,453,320,527,480,50,235,463,442,280,51,389,14,566,53,357,497,120,481,537,282,20,581,222,128,450,122,65,349,130,294,29,168,409,510,438],log:[439,149,571,380,348,5,388,496,349,10,527,188,456,235,492,530,354,460,357,497,536,465,499,199,57,361,544,83,454,398,294,336,416,337,424,299,402,172,587],lod:[357,149,294,277,22,545,5,248],opengl:328,aren:[498,183,423],lon:[12,525],json:491,hertz:[314,296],lom:527,illeg:[294,543,492,341],cnse1:[192,419],cnse2:[192,419],low:[403,194,264,144,294,442,416,499,508,188,545,96,497,469,222,5,214,583,173,254],lot:[303,439,144,542,347,317,318,525,566,492,277,235,91,353,464,58,280,379,548,543,103,214],mutatedi:434,nonorm:[294,83,499,121,149],yerrcollect:83,line_styl:[216,200],oscil:[536,279,221,71,437,79],mutatedx:434,matplotlib_icon:[216,200],satur:[403,497,518],locatableax:13,podcast:439,"__get__":314,liminf:354,hire:[0,1,2,5,6,8,11,191,13,15,17,18,20,22,24,25,494,29,33,35,37,39,41,45,46,342,53,56,58,61,62,63,64,65,67,69,70,71,72,73,75,77,78,79,80,81,502,84,86,89,90,91,566,93,94,581,101,106,108,100,111,112,113,114,115,116,117,119,122,123,127,128,129,130,131,132,258,136,137,138,140,142,145,146,147,148,149,514,151,154,155,396,157,158,431,160,450,163,164,165,476,485,170,172,173,174,175,177,181,185,187,188,189,12,192,193,194,196,197,198,201,202,82,204,205,206,208,209,210,211,212,213,215,217,220,221,222,223,226,231,232,236,238,279,241,244,246,247,248,249,250,424,252,253,254,255,256,257,105,261,262,263,267,268,270,272,452,275,276,277,463,280,281,282,283,505,521,289,290,291,543,294,296,298,300,301,304,306,308,309,310,311,316,318,319,320,321,322,323,96,327,329,331,336,178,340,354,52,343,344,345,251,348,349,14,355,356,358,360,361,365,366,368,371,372,373,375,381,571,385,386,387,389,391,392,394,259,397,398,400,401,403,406,409,410,411,412,414,416,419,420,422,423,184,425,426,195,428,429,433,435,436,437,438,440,441,442,443,444,445,542,447,161,451,274,453,455,457,459,460,462,278,466,454,471,473,474,490,477,479,480,481,484,486,487,488,489,27,495,496,498,55,501,503,506,508,509,510,150,516,517,176,523,524,525,234,243,532,260,535,536,537,540,295,544,546,547,548,325,550,552,555,556,405,560,564,565,92,567,568,570,19,575,225,577,578,582,584,585,586,587,583],argmin:[589,54],"default":[2,326,544,142,542,312,448,314,5,7,149,152,392,96,157,17,464,465,158,22,24,166,335,168,339,173,38,177,485,182,44,492,352,495,357,497,55,499,57,362,144,64,85,457,208,70,508,510,74,383,522,228,83,229,525,527,243,238,89,391,92,241,242,393,246,545,248,397,434,504,553,262,264,266,272,274,566,276,425,120,493,121,284,286,225,287,126,430,521,289,579,214,294,133,297,299,587,583],plot_trisurf:[257,27,349,371,117],timer_id:286,get_sample_data:[439,442,38,445,483,41,311,546,382,146,264,502,13,235,481,119,422,532,535,55,94,329,159,360,505,429,469,450,65,163,103,292,334,478,435,300,252,438,254],leave_figur:[245,347],get_projection_class:357,patch3d:349,rasterization_zord:[149,83],todd:[257,439],decreas:[497,405,518,202,402,248,287],sliderlabel:341,ax_r:146,mathematica:1,carriag:498,prepend:[349,133],valid:[0,144,257,544,149,312,5,317,349,420,492,243,238,92,499,96,22,545,83,248,543,294,297,402],copyright:[334,99,76,21,541,286,324,224,354,579],surfacescal:388,get_yaxis_text1_transform:[5,525],shorthand_nam:434,you:[303,2,442,443,243,311,312,5,7,317,149,10,320,50,456,323,17,326,328,353,464,465,159,450,470,25,472,332,334,29,337,168,339,340,14,173,174,38,42,347,348,183,349,489,48,190,191,492,392,352,451,354,52,402,497,198,499,199,57,58,60,61,202,379,8,85,318,207,360,504,70,524,368,507,214,373,144,458,75,517,385,525,383,522,228,83,523,229,527,205,233,237,529,238,539,88,89,92,240,457,573,242,95,393,543,247,248,549,550,398,346,434,401,103,533,257,107,100,262,411,112,412,266,500,416,268,570,440,117,420,276,277,278,421,422,423,19,184,493,574,122,284,286,126,430,577,288,431,433,581,294,133,583,521,297,566,299,136,301,588,589],poor:[497,383,423],polar:[83,294,149,497,262,5,248],lowerbound:[5,349],registri:[314,74,287,24],is_writable_file_lik:[83,38],connect_bbox:77,"\u03c8":317,moving_average_converg:222,drift:75,docstr:[357,83,38,168,85,448,103,248],polynomi:96,peak:[294,5,423,492,334],reduc:[328,402,83,239,420,257,499,500,121,190,492,235,294,262,96,5,383],assert:[289,235,525],update_posit:[248,383],munro:497,stringd:382,axes_list:166,mercatorlatitudescal:544,ensureminim:[334,335,338,339],repar:324,cellcolour:[294,5,51],barh_demo:200,formatdatetim:492,xheight:[541,312],set_param:[294,5,527],autoscale_on:[355,0,149,88,500,201,238,156,288,569,413],mlp:249,month:[566,360,257,231,168,329,159,294,111,5,112],mp4:[579,218,9,169,49,402,214,413,66],anchoredellips:[128,450,150],deprecationwarn:38,nstep:442,w_zaxi:307,web_backend:235,ycopin:289,specularconst:388,"_curv":248,articl:[566,82,492,62],y_minu:492,set_bad:[499,181,17,173],axes_api:402,get_label_posit:383,vert:[443,177,448,348,5,226,349,115,584,198,15,492,243,156,354,566,92,500,295,385,289,248,68,293,294,99,582,31,211,42,589],head_slic:169,mpl:[83,74,294,499,38,168,248,545,297,362,312,22,103,5,85,383],axesgrid:[505,265,94,564],vera:[284,363,402,51,287],verb:83,mechan:[439,83,257,491,294,297,235,5],veri:[144,442,108,110,223,5,412,317,349,524,440,153,50,322,235,352,323,96,492,423,194,357,328,353,464,123,160,83,450,248,543,294,434,584,299,402,214],mouseinfo:341,histogram_demo_canvasagg:200,common:[347,348,149,10,525,235,277,243,530,422,423,357,497,566,199,96,83,547,330,25,550,581,434,133,294],postscript_nam:549,emul:[574,497,229,440,58,353,370],execute_lin:179,d_patch_:491,anam:248,getrealpathandstat:38,dimens:[38,312,262,5,149,190,492,243,235,539,357,328,121,529,96,362,544,581,434,367,294,340,402],textil:402,anchoreddrawingarea:[128,450,150,581],ltext:[444,282],width_ratio:[431,120],hovercolor:[92,384],unsightli:[294,5],polycollect:[349,83,91,294,117,235,211,243,5,122,205],byminut:168,findsystemfont:287,bilinear:[402,414,89,167,343,392,257,373,294,323,212,5,161,438,173,423],plot_pip:171,ntotal:278,update_norm:121,normalize_data:485,span_wher:[257,243,93],fancyarrow:[83,294,235,5,214,248],rgba:[545,349,83,11,294,499,149,117,21,393,297,235,243,5,6,579,362,423],get_glyph_nam:363,consecut:492,press_zoom:297,quantiz:[297,499],key_press_callback:[42,589],prop_lin:77,imshow_demo:465,bgcolor_rgb:346,svgwriter:235,trunk:[533,439,217,510,257,22,214],modifi:[144,257,326,107,38,337,491,5,348,224,317,83,386,229,76,117,235,324,357,328,566,57,95,421,543,247,349,450,248,250,581,294,208,434,297,170,402,214,583],pad_v:234,transform_path:[434,525,357,310],rgb2:161,ahead:566,popen:257,fpath:[465,522],amount:[566,149,239,581,294,46,446,383,545,434,297,492,312,442,402,5,248,579],add_ev:[179,390],doctest:214,set_gid:[557,491,388,297,87,248],formatperc:[382,492],jre:235,addmenu:76,"3e2":466,intermedi:[5,289,10],set_flag:507,put:[303,257,38,19,348,5,181,228,349,525,235,352,529,539,389,354,557,566,431,286,544,430,83,521,289,205,66,334,335,416,337,339,294],axison:480,vex:257,famili:[318,549,357,149,268,368,257,99,485,248,284,294,543,287,411,402,5,317,85,541,81],gnuplot2:[403,497],dangl:38,loc1a:77,loc1b:77,loadfram:334,spectrogram:[294,5,440,492,497],ongmongkolkul:235,taken:[580,357,83,581,294,499,243,543,235,277,179,5,77,214,354,579],toggl:[36,326,491,42,405,577,5,383,266,83,387,13,50,557,497,391,149,450,294,337,401,402,589],vec:[316,349,570,354,62],subplotspec:[294,5,120,190,166],get_from_args_and_kwarg:96,pzcmi8a:312,update_datalim_numerix:5,textcoord:[355,356,292,256,581,294,474,557,50,550,238,5,248,114],arg_to_rgb:83,broke:257,realistic_data:485,save_figur:297,filternorm:[294,5,429,83],ellipse_with_unit:[200,465],origxdata:110,set_point:434,daisi:22,histori:[179,580,297,57,10],get_bbox_patch:[356,248,581],num_glyph:549,nonsingular:[434,168],get_shared_x_ax:5,axislabel:326,yticklabel:[149,489,116,445,309,5],typograph:317,lightskyblu:587,templat:[303,228,465,393,402,214],set_xmargin:5,magenta:[497,140,294,499,498,5,181],axsrc:288,subtick:[294,5,357,349],rowspan:[294,431,433,578,120],tick1on:[348,383],anoth:[303,373,144,257,442,107,142,312,262,179,181,526,83,455,566,235,323,492,402,328,535,92,195,199,122,60,433,501,363,288,248,250,434,398,294,334,297,340,171,103,586,438,583],ledger:[294,402,149],snippet:[566,442,10],legend_el:270,softsurf:492,show_histori:179,textview:179,basicunit:314,igna:235,sharey_foreign:526,vdash:354,set_ticklabel:[383,121],normboot:584,bound1d:83,mindtrov:38,unlink:465,check_select:346,qtgui:[504,271,235,76],snazzier:442,view_limit:527,fig_aspect:434,bugn:[403,497],nchunk:[294,5,83],get_xbound:5,inlabel:289,egg:[566,7,312],help:[149,40,313,179,5,7,8,10,76,324,280,389,357,498,465,57,329,544,83,580,510,294,297,299,214],avconvfilewrit:579,fft:[294,5,492,83],held:[92,297],set_fc:248,hierarchi:144,variat:[583,352],scatterpoint:[149,257,294,235,402,5,266],paramet:[144,375,443,246,38,243,491,357,177,485,448,5,77,383,266,83,46,440,248,455,190,527,235,96,492,317,354,543,566,89,328,120,92,468,499,121,158,431,160,433,362,500,22,149,450,85,497,318,349,579,166,294,258,337,168,297,401,341,32,402,371],qmainwindow:[324,504,235,76],get_valu:314,miter:[151,294,297,277,402,5,248],segfault:235,markerfmt:[294,5],seealso:214,finer:[294,5,566,492],reliefplot:1,make_yaxi:480,set2:[403,497],plus_and_minus_sign:402,sentenc:181,set_solid_capstyl:248,identity_transform:83,date_demo_convert:200,set_linelength:243,rate_label:485,test_disconnect:86,"__version__":[303,229,464,525,7,289],sameer:257,elson:[257,439,235],mathscr:82,vcodec:[229,566,531],ticklabel2:383,radiat:497,bigcup:354,did:[439,83,541,257,498,353,379,423],radian:[357,83,434,248,243,100,401,405,544,314,525,80],transfigur:[348,566,267,340,122],subplots_axes_and_figur:200,set_dash_capstyl:248,trailer:95,get_horizontal_stem_width:541,inplac:[257,38],neil:235,ax_g:146,ax_b:146,get_majortickloc:[480,383],test_simplif:352,heavi:[357,149,268,368,257,499,525,294,492,287,411,353,5,214,248],paths_to_3d_seg:349,nless:354,pscoll:242,todo:[566,271,153,492,312,214,511,248],event:[218,374,305,243,38,378,483,408,42,3,36,577,179,5,182,43,183,265,266,382,83,86,383,455,566,50,351,492,421,156,569,297,380,197,54,92,574,573,121,482,21,402,286,242,125,126,430,149,288,248,579,472,332,294,504,449,346,339,475,334,31,210,335,384,589,507,245],upperlimit:488,trianal:96,robert:[492,235,171],publish:[353,566,235,330],start_pan:[5,525],writexref:95,relativestrengthindex:222,asp:222,set_height:[183,346,248],ast:354,mathtextbackendagg:312,team:[334,439],azim:349,scatleg:257,asb:[128,450,150,453],reason:[525,228,357,83,169,107,153,524,58,257,297,492,340,312,385,7,543],base:[303,439,74,248,243,257,133,443,107,38,395,153,545,314,571,312,448,224,179,5,525,347,383,266,500,228,83,9,431,191,576,190,50,235,352,96,238,543,330,485,354,276,566,357,497,120,92,466,499,57,95,160,550,492,262,121,518,22,379,149,527,85,97,66,21,250,579,541,294,353,258,168,434,297,349,341,32,402,362,137,214,173,287],textit:[318,543,170],recv:171,rect:[443,149,39,557,405,347,348,5,349,436,576,198,234,460,357,120,92,240,83,450,578,25,433,68,293,166,294,99,498,337,346,297,340,553],basi:[439,294,121,224,96,5],extreme_find:[100,401,12,567],handles2:122,launch:[294,497,337],veloc:[471,543,294,387,170,235,63,5,205,413],semilogx:[340,571,497,294,406,440,235,5,214],dhead:541,caption:214,set_yscal:[571,349,83,294,336,525,361,544,5,496],due:[328,373,83,169,38,149,294,584,19,492,96,5,413],set_markers:[348,566,248,329],non_nul:314,lifetim:434,lightgrei:584,assign:[557,83,294,159,491,492,235,243,5,248],arrow_h_offset:485,bars3d_demo:200,singleton:[492,235,287],moad:[257,439,440],obviou:[379,492,354],misc:[200,492],set_orient:243,placehold:585,bivariate_norm:[481,181,146,161,414,416,13,188,492,392,462,94,505,450,64,547,167,476,65,300,212,173],membran:445,miss:[83,465,38,235,246,492,423],pstest:[216,200],"__float__":462,kpsewhich:153,lstrip:[580,465],make_room_for_ylabel_using_axesgrid:135,dt2:168,dt1:168,scheme:[96,497,214,83],taggedvalu:314,tfm:153,adher:[257,149,544],get_frame_on:[5,349,266],axes_s:[190,234],mouseposit:573,coords_demo:[200,83],nch:429,getter:[257,348,214,248,420],nxm:[294,312],axesstack:149,closeopoli:187,inset_locator_demo:135,half_i:525,barlinecol:[294,5],std:[472,54,442,116,159,492,347],grew:353,ffmpeg:[402,579,218,66],blendedaffine2d:434,utopia:402,fitzsimon:259,my_backend:[103,402],str:[257,307,75,483,491,314,5,382,383,349,453,229,50,235,375,462,498,241,499,329,362,294,249,334,434,584,449,214],toward:[566,357,497,257,499,294,401,5],grei:[403,497,498,245,347,83],bbox_transform:[174,294,122,581,128,5,450,266],randomli:492,backend_pgf:[235,317],clippath:[235,438,83,383],stretched_imag:429,autohint:402,"null":[430,527,557,38],option:[38,312,448,262,5,383,266,83,153,492,96,357,120,92,499,243,362,287,22,149,248,579,294,297,103],lie:[257,96,287],unintend:[5,543,317],lib:[214,83,541,581,525,402,235,312,352,103,7],lim:[89,527,294,297,273,110,235,5,450,203,354],imagegrid:[481,564,391,300,553],set_linestyl:[489,297,528,243,214,64,248],onhilit:297,x_i:[294,492,62,5,145,354],useless:277,call_back:171,bbox_arg:356,mouseev:[83,54,294,242,149,297,383,347,243,5,248],varkappa:354,boxplot:[83,294,584,484,497,235,5,585],triangleleft:354,is_slant:312,find_tex_fil:153,setmax:341,mixtur:69,opentyp:[330,287,317],macd:222,rho:[316,354,62],maco:[235,330],alpha:[140,305,542,312,36,5,316,451,148,149,22,161,330,485,495,507,34,344,177,348,181,173,349,198,50,492,494,354,566,357,54,498,499,500,362,201,62,385,204,565,68,209,211,510,73,373,514,458,75,223,77,83,84,525,235,243,238,530,391,91,92,93,95,581,105,545,546,248,99,346,402,255,259,266,270,563,452,420,277,423,573,575,121,584,428,429,222,289,293,294,582,435,583,297,438,589],invert_ax:[216,200],ft_face_flag_scal:549,regularpolygon:[99,214,248],dash_offset:297,clear:[403,0,144,38,149,380,5,383,317,349,229,271,76,525,566,50,277,96,402,497,92,465,57,482,324,543,121,545,83,579,433,294,504,434,401,252],outsign:289,nsupset:354,clean:[439,38,109,519,7,228,83,10,566,50,235,352,96,23,197,239,92,464,465,57,482,302,248,579,332,134,340],blend:[373,149,294,434,297,5,530,248,354],developer_commit_histori:200,embedding_in_tk:[200,58],vrule:312,flicker:[334,286],get_path_collection_ext:262,button_bar:380,set_powerlimit:[257,527],"3x2":297,"3x3":[431,434,99],"3x4":297,kerning_unsc:363,newest:38,rightleftarrow:354,hypen:457,legend_pick:559,boxplot_demo:200,basedir:[303,233],pretti:[303,334,19,257,541,566,492,235],to_rgba_list:83,set_yticklabel:[138,349,114,566,58,123,508,5,532],ymd:456,broken_axi:200,yml:352,xlwt:[311,561,83],numpy_ext:235,palett:[497,173],"__file__":[464,233,7],get_hatch:[243,297,248],failbackend:465,nativ:[297,357,74,294,442,153,525,31,550,235,423,144,238,402,5,530,233,248,330],set_annotation_clip:248,troughout:491,host_subplot:[101,387,450],ym2:130,pgf_with_pdflatex:317,is_horizont:243,code_typ:[263,262],gnbu:[403,497],circle_ratio:96,numvertic:[248,262],xrced:334,macpython:[335,7,339],kienzl:439,set_bound:[196,240,527,545,83,248],close:[217,430,257,442,153,379,177,312,262,5,264,317,415,349,490,524,561,440,76,470,566,50,235,277,243,492,422,357,497,502,92,465,499,58,95,60,287,62,222,435,82,248,25,580,433,469,360,294,329,337,346,434,297,171,402,254],default_limit:74,paul:[439,50,235,412],deriv:[2,74,326,347,348,224,413,266,83,527,5,96,492,539,497,466,121,122,21,581,468,450,248,294,258,208,334,297,401],dateutil:[303,257,168,235,492,389,330],keypress:[475,577,507],particip:434,lastdigit:498,"72pt":287,"_check_xyz":235,isiknowledg:566,draw_rectangl:83,numer:[439,144,257,149,312,469,5,349,117,492,277,243,357,498,529,96,225,287,83,248,330,294,168],test_mathtext:[235,352],distinguish:[294,5,297,144,497],both:[303,525,373,144,256,257,442,448,347,38,243,247,19,177,430,262,348,5,77,117,181,228,83,420,229,270,440,486,76,188,455,275,191,235,277,392,324,492,539,357,328,566,427,499,577,96,550,383,388,222,149,527,64,248,349,434,294,416,524,334,297,401,340,341,497,103,173],delimit:[149,294,492,502,354,254],aggrender:297,interp_cubic_min_:575,trimesh:243,hbar:[294,5,354],subplot_toolbar:[216,200],jeff:[257,440],sin_lin:271,qpopupmenu:324,header:[303,294,95,492,103,317],te_process_ent:341,update_coord:248,"5e5":548,get_unit:[314,248,383],"5e6":[159,548],stamp:289,damp:[536,279,221,71,437,154,79,81],get_act:92,empti:[257,307,22,38,448,347,5,264,527,235,466,499,121,122,581,286,429,246,161,248,294,133,367,402,214],linecollect:[349,83,11,198,258,121,117,521,294,235,243,5,6,122,205,532],xytip:248,imag:[95,214,83,579,92,499,121,149,21,28,297,362,294,497,5,576,85,265,312],coordin:[174,304,128,373,150,525,326,450,517,100,19,262,223,5,576,383,266,83,386,523,86,117,566,12,492,392,96,238,357,239,120,92,242,283,243,394,61,545,149,288,248,290,291,349,166,294,208,485,434,297,401,136,301,553,371],update_bbox_position_s:248,makedir:233,enter_ax:[245,347],make_axes_locat:[123,450,203,13,433],look:[304,516,144,38,312,313,5,7,228,83,492,352,392,579,168,194,19,462,566,195,57,95,287,349,248,330,333,294,70,103,214,588,583],svg_filter_pi:[200,407],pchang:248,set_mew:[326,248],xaxis_d:[5,231],"while":[257,326,259,109,491,312,315,179,5,183,83,524,153,234,235,352,243,492,543,531,354,423,88,357,328,566,121,122,581,468,57,379,349,450,162,433,434,385,294,337,134,297,401,171,588,370],smart:[92,545,209,529,383,277],guido:[38,9],brokenbarhcollect:[294,5,93,243],set_mec:[326,146,248],loop:[218,239,294,240,297,110,401,83],pack:[430,427,585],interval_contain:83,jpl:439,readi:[580,228,57,10],binwidth:[450,203,273],get_default_filenam:297,readm:[303,214,235,57],herein:224,jpg:[21,235,297,144,330],biguplu:354,torvald:10,pm_to_km:471,quadrat:[385,257,581,492,262,248],meshheight:[243,297,83],gimp:[144,330],gs1:[431,433,578],gs0:431,sankey_demo_bas:186,fedora:[303,7,313],grant:[229,224,107],grab_fram:[218,579],belong:[121,491,96,450,248,266],rec_keep_field:492,webpag:228,elong:289,grand:[284,402],conflict:[257,402,83],npump:217,upuparrow:354,axzoom:288,imagin:588,optim:[439,83,166,434,297,492,312,262,96,349,248,579],has_focu:507,temporari:[357,434,297,235,323,579],dimw:336,polaraffin:357,set_clip_box:[238,248,506,78],dolphin_path2:259,alldon:379,older:[95,228,525,543,117],imageobject:95,without:[312,228,83,229,270,76,470,420,492,352,324,66,17,57,283,121,22,149,287,248,24,294,136,301,214,61],style_ital:179,curvearrowleft:354,"_path":[438,235],rec2exel:235,getapp:[513,23],jmath:354,trapezoidmaptrifind:[257,96],tick:[83,248,294,168,149,383,121,497,545,5,85],offsettext:[401,383],invert_zaxi:349,"0e7":548,glyphd:363,shortcut:[497,434,504,297,235,530,570,354],host_ax:450,armin:394,num1num2_list:166,subsequ:[566,357,434,294,158,96,287,348,5],mpl_toolkit:[174,564,441,306,307,220,310,483,100,447,311,84,405,176,77,382,146,451,367,83,129,453,234,387,13,520,189,12,322,492,567,481,459,27,37,391,466,94,123,400,394,128,203,204,65,185,471,325,131,505,71,101,298,300,211,371],bookman:[402,543],march:492,subplottool:[92,294,235],isub:38,game:[43,50,16,354],text3d_demo:[200,538],gbar:201,characterist:[584,525],frame_s:579,gist_stern:[403,497],success:[179,243,492,205,32],veebar:354,signal:[566,26,560,45,493,419,38,57,76,192,294,492,362,168,324,5,321],grid_helper_curvelinear:[100,401,567],pcolor_class:83,resolv:[294,5,492,83],elaps:465,manifest:[103,228],negative_linestyl:[294,5,402,392],popular:[566,153],eeg:[353,530,532],group_id:492,get_major_tick:[348,349,146,383],delete_masked_point:38,creation:579,some:[303,439,442,544,142,312,7,317,584,149,10,11,321,455,155,96,156,17,328,353,329,160,468,469,450,550,470,24,547,166,334,29,337,339,340,14,38,484,347,348,349,45,46,50,492,352,493,494,354,341,357,197,498,199,57,58,103,379,385,203,85,206,70,214,144,517,518,525,226,228,83,523,229,205,527,235,236,238,539,389,260,239,92,457,573,242,95,393,543,246,248,250,424,434,401,402,555,257,107,179,405,462,416,560,270,561,436,566,276,277,423,93,121,122,286,577,579,580,433,581,294,133,297,299,583],delta_1:[316,62],srcapp:566,output_arg:579,wxmsw:380,afeee:[294,499,8,392],mcgill:[294,5],set_linespac:248,slash:354,cgi:[566,470],lastd:456,run:[533,228,83,28,38,199,294,297,312,103,497,214,248,579],get_cpu:183,"_draw":83,stem:[83,541,257,308,540,122,294,235,497,5],sacrif:423,fancyboxpatch:[99,248],step:[257,442,38,542,262,5,7,413,466,83,229,117,274,420,527,528,235,277,96,492,194,497,464,499,393,394,349,248,543,207,581,294,491,168,367,297,340,210,214],gtkinterpret:580,hookleftarrow:354,delta_i:[145,435,62],subtract:[83,294,168,367,5,248],padai:50,faith:[493,57],trifinder_event_demo:559,"\u00eatre":165,set_theta_offset:357,fancybboxpatch:[247,581,99,214,248],shink:[294,5,248],incircl:96,optpars:[580,465],padax:50,idl:[144,574,377,38,48,378,297,235,379,7],get_xtick:5,monochromat:403,block:[566,382,149,257,46,500,294,297,492,235,144,5,214,64],onpress:[305,54,92,156,288,569],test_triinterp_colinear:235,fplot:235,xe4nen:60,within:[257,38,110,260,42,312,347,5,7,349,525,566,352,96,354,357,239,92,499,573,242,122,581,22,248,294,100,434,589],simple_anim:461,ensur:[332,149,23,83,294,482,500,109,357,16,302,144,214,43,579],pentagon:[294,448,243,5,569,248],is_string_lik:[257,393,235,38],"3_2":249,institut:[21,107,492,412,165],color_by_yvalu:200,backend_gtk3:351,system_monitor:[216,200,83],set_frame_on:[63,5,161,349,266],larri:38,mpldata:402,add_artist:[292,150,453,535,198,481,238,506,122,581,429,33,128,5,161,78,438,450],globstr:465,set_facecolor:[149,347,348,316,183,349,78,50,236,278,243,569,14,460,500,245,545,83,248,29,251,510,438],newer:[402,525,235,122],get_fontfamili:248,specialti:465,info:[332,83,239,109,294,271,498,482,393,95,134,297,302,352,8,23,312],bevel:[151,294,297,277,402,5,248],lettered_bases_to_r:485,keep_observ:149,majorloc:276,qquad:62,set_dash:[52,243,297,248],set_color_cycl:[5,83,158],utr:62,add_conversion_fn:314,get_depth:312,cellrenderertext:390,geqq:354,log2transform:357,similar:[257,481,443,5,77,564,83,525,353,492,423,497,120,92,121,431,581,505,94,450,289,248,294,401,340,299,300,477,402,137,214,287],inch:[443,312,347,314,5,564,149,453,272,13,525,234,235,243,485,198,505,450,203,579,291,397,294,208,178,297,340,402,553],math_str:312,get_navigate_mod:5,verait:549,doesn:[510,83,92,335,107,38,75,153,294,297,492,312,464,103,5,339,329],repres:[403,347,395,243,312,262,348,5,83,235,277,96,579,485,423,460,328,92,499,95,160,550,22,8,450,248,330,349,393,294,168,434,32],incomplet:[235,439,401,83,580],adjust_spin:463,datetime2:168,nttt:501,nttp:501,resize_ev:[294,297,235,347],windir:287,get_default_handler_map:266,polygon:[512,205,177,448,262,5,182,226,83,187,85,452,498,492,243,238,494,497,92,242,64,248,294,99,490,584,42,214],pronounc:[423,340,330],titl:[1,9,442,141,142,2,5,318,152,321,392,462,568,20,160,221,218,507,164,26,165,166,336,30,170,341,477,172,173,516,481,345,149,41,177,487,181,182,349,45,46,193,51,354,566,194,497,498,60,61,202,379,8,64,66,209,213,214,501,512,217,144,458,75,380,381,79,81,83,229,235,236,238,88,89,90,536,279,510,543,544,402,556,491,260,410,412,266,268,563,420,277,537,570,571,425,575,283,123,428,289,578,579,290,291,433,130,294,557,297,437,136,301,137,583],"_iter_collect":297,nan:[434,257,38,345,565,294,235,262,5,181,264],pre_interact:580,setenv:133,"_imag":[297,323],mouseclick:[573,242],ddot:[570,354,62],markeveri:[294,5,235,248,277],draw:[0,139,305,525,443,545,3,4,5,450,317,149,150,453,152,76,13,322,16,392,324,156,326,460,353,21,22,161,330,471,331,332,473,334,335,474,338,339,475,31,340,341,171,33,312,34,36,481,482,177,485,315,348,497,181,182,43,183,349,576,49,50,193,495,357,196,54,477,500,449,501,379,385,203,85,67,68,504,208,210,214,370,505,174,144,374,514,377,378,380,176,388,383,496,83,229,387,65,577,528,235,529,238,23,87,88,390,90,91,92,537,573,94,95,243,245,247,248,249,550,346,101,401,402,42,257,347,109,100,262,266,267,239,417,271,535,584,566,463,569,423,281,574,121,122,286,429,128,288,289,579,293,581,294,583,521,134,297,300,586,137,438,589,302],pylint:235,set_backgroundcolor:248,drag:[34,303,432,356,92,337,297,42,341,347,421,589,266],evan:[439,235],amplitud:[243,341,354],sigmaxi:492,lightgreen:409,get_grid_posit:120,svn:[439,10,257,456,468,450,370],soundex:38,window_han:[294,5,492],kpathsea:153,dvi:[95,543,83,153],unicodefont:312,svg:[303,439,144,257,442,309,337,491,312,5,228,149,490,563,388,566,235,352,243,87,557,353,465,21,393,248,330,543,167,30,294,297,402],svd:492,set_properti:[103,179,214],labels2:122,supseteqq:354,evenli:[294,55,499,525,566,527,177,277,5],depth:[83,10,434,153,346,383,312,380,5,161,289,205],get_majorticklin:383,graphicscontext:[297,83],unitfrac:317,"_pad":383,"__getattr__":179,get_yaxis_text2_transform:[5,525],benevol:38,compact:[5,287],interpolation_step:262,effort:[349,257,566,401,83,214],wizard:566,mathtext_backend:312,contour_imag:[200,392],hourloc:[191,231,83,168],func3:373,fly:[326,312,70,352],unverifi:248,rc_trait:[200,407],gnsim:354,regularpolycollect:[294,242,122,156,243,5,569,205],textwithdash:[439,349,294,248,5,214,85],wave:[340,345,58],get_width_ratio:120,skew:476,runnabl:580,avconvbas:579,on_press:[294,297,347],stepfil:[294,5,542,235],gender:[498,428,436,178,568],button:[42,380,5,149,525,86,421,88,357,92,427,57,200,242,430,288,334,335,339,294,297,299,210,589,507],michael:[257,340,439,440,235],ryan:[257,235],nleq:354,arc_compar:452,convolv:[419,192,222,161,142,113],hemispher:[294,5],picker:[472,357,83,268,54,294,347,242,149,545,297,383,277,22,348,5,248],pickev:[297,248,242,347],subplot_param:166,save_count:579,uniqu:[149,83,38],jump:[294,5,583,168],download:[303,228,561,395,235,313,402,492,7,265,423],yupper:[257,492],hspace:[19,177,145,80,83,45,46,321,571,120,566,56,158,431,62,149,25,433,294,524,402,172],percentil:[498,492],hstack:[503,263,547,532],axis_on:149,cell:[382,120,294,443,190,5,172,214,51,547],experiment:[439,433,83,257,499,337,153,294,12,287,402,5,450,85,354,312],coloneq:354,get_gid:[297,248,388],has_data:5,web_stat:235,minfrac:492,backslashreplac:82,scatteryoffset:[83,266],plot_process:171,set_default_font:83,randn:[34,303,218,442,419,142,542,348,321,113,83,560,45,46,273,232,50,492,277,457,529,280,358,91,241,122,192,396,379,385,203,205,68,293,366,491,340,209,508,552],becom:[144,462,229,121,525,431,190,492,312,328,214],accessor:348,redrawn:[248,347],niter:240,convert:[74,257,38,445,243,484,312,380,262,314,144,181,525,112,83,27,272,153,117,498,191,235,277,352,529,492,5,566,357,497,502,198,499,360,543,383,287,544,349,527,248,24,331,531,397,393,294,168,297,137,518],rc_context:[257,294,235,497],convers:[74,257,38,168,262,314,5,112,383,317,149,268,272,153,235,357,198,499,360,22,545,248,24,397,294,296,401],holger:38,origydata:110,withstrok:[481,53],autofmt_xd:[149,502,566,442,55,360,191,311,111,112,422,44],genr:579,affine2dbas:[434,357],converg:[222,32],comic_sans_m:522,numpoint:[149,257,122,294,402,5,266],hexagon:[83,294,497,5,172,547],chanc:[566,464],get_arrai:[294,5,362,242],msttcorefont:522,although:[303,433,144,353,557,440,541,527,401,177,341,352,347,348,83,522,226],imlim:[294,5],win:[390,139,126,562,337,483,351,492,125,347,382],is_gtk:380,mencoder_arg:[402,579],axes_column:391,"boolean":[144,442,38,149,347,348,5,383,266,349,268,492,96,357,92,242,243,362,22,545,83,378,248,579,294,168,297],round_to:525,lifton:[229,566],plot_include_sourc:214,underflow:492,cloud:352,encapsul:[543,21,297,262,96,330],labelcolor_rgb:346,set_styl:[368,248,287],set_default_weight:287,moving_averag:222,upper_error:361,tcag:485,mx2num:168,ownerdocu:557,get_label_text:383,xytext:[355,356,292,256,294,557,412,581,550,277,238,5,248,114],pwuertz:235,isax:402,"static":[74,499,168,243,287,262,96,312,248,266],retriev:[349,294,122,497,5,248],set_posit:[83,463,319,243,545,190,586,352,392,63,5,248],"2dcollections3d_demo":200,perceiv:497,hist2d:[497,358,294,235,5,552],ride:[294,5],donut:263,fill_spir:200,linearscal:357,cursor_prop:149,sankey_demo_old:186,volume_cod:159,addwidget:[324,504,76],meet:[566,423,242,347],control:[174,582,221,557,380,262,111,112,266,83,489,524,527,470,276,5,352,457,492,81,17,89,497,92,392,57,58,21,360,247,149,521,158,248,579,294,133,168,297,341,214],subplot_demo:[216,200],sudo:[303,7,313],src_imag:161,newdir:38,get_joinstyl:[297,448],tarbal:[303,228],repeat_delai:[49,579,9,66],makemappingarrai:499,rms_flat:492,gettmpdir:133,spine_typ:[545,177],arrow_sep:485,show_click:[294,149],pyqt:[324,303,402,144,330],narr:[566,214],set_xticklabel:[138,250,196,436,178,58,101,235,508,5,450,183,470,226],sourcegraph:388,finance_work2:200,units_scatt:[350,200,465],circular:[294,545,119],xybas:248,farg:[367,579,9,66],pssnf:402,get_kern:[363,312,549],new_figure_manager_given_figur:[21,95,576],numitem:346,add_auto_adjustable_area:[123,190],key_q:[324,76],"_init_axi":525,new_fixed_axi:[450,387],rwidth:[294,5,542],add_al:[481,450,553,300],overplot:[542,584],add_ax:[257,443,261,348,316,146,83,268,13,388,539,87,357,566,195,123,286,222,149,450,250,474,215],get_sett:248,style_bann:179,get_tick:469,popal:38,transformedpath:[434,297,83,262],your_github_user_nam:352,p1a:122,p1b:122,"02f":37,boxcolor:584,updatelin:239,showtraceback:580,register_project:[357,177,525],ttfdict_to_fnam:287,add_tabl:[294,5],init_plot_data:[334,286],prime_2u:[316,62],fwhm:471,markerscal:[294,5,402,149,266],subplot_kw:[294,524,500],vline_hline_demo:[216,200],downsampl:[294,5,110],consensu:103,pickle_load:287,itemproperti:346,refi_triangul:96,pixel:[144,257,347,482,42,312,448,262,348,5,525,83,386,205,566,86,323,238,579,423,92,240,573,242,122,581,550,149,161,64,248,330,433,473,294,297,340,402,586,589],ym1:130,unpaint:[294,5],get_figwidth:149,handl:[439,217,577,140,38,221,42,168,448,262,348,5,265,266,83,229,566,527,492,357,198,499,21,402,362,287,544,149,450,248,579,580,541,294,296,434,297,341,103,214,583,312],auto:[403,439,257,149,262,348,5,349,440,452,235,280,539,566,201,83,161,248,433,294,587,297,402,214,438,215],purd:[403,497],handi:[348,442],complete_lin:179,set_loc:[190,527],rightside_up:[294,5],print_pgf:297,set_lod:248,front:[328,557,235,470,262],pipong:559,slog:184,axis_nam:383,simple_conversion_plot:[272,397],somewher:[294,5,573,337,493],unevenli:499,weight_as_numb:287,nameerror:[235,51,500],prepackag:303,slide:[194,499],close_group:297,inverse_transform:[434,566,83],mode:[516,38,40,5,183,266,83,419,420,493,192,92,497,391,566,464,222,149,161,248,294,297,214],aspect_ratio:[581,248],errorcollect:83,figurecanvasgtk3agg:[351,125],draw_lin:83,upward:434,git:214,map:[525,1,556,257,38,36,5,6,117,266,83,561,440,153,248,527,235,96,492,354,357,497,566,499,122,95,243,362,149,450,58,85,580,349,294,168,340,402,33,214,583,371],chunk:[294,5],w10:413,histogram_demo_extend:200,mar:[440,501],parse_and_bind:580,funcformatt:[566,241,55,527,314,548],n_point:96,special:[439,100,312,262,348,224,317,149,526,527,5,96,492,522,354,357,462,498,499,57,362,545,83,450,543,434,294,297,401,340,497,402,214],axprop:215,influenc:248,dpend_html:413,asfileobj:[481,38,445,483,41,311,546,382,146,264,502,13,422,532,535,55,94,159,505,429,469,450,65,292,334,438,300,478,254],suitabl:[83,121,95,297,401,287,103,144,330],isfinit:38,hardwar:492,circlearrowleft:[138,354],maxnloc:[83,257,498,294,527,235,405,222,5,137],get_offset_transform:243,date2num:[74,83,294,168,360,191,5,112],watermark:[255,546],manipul:[349,257,122,334,297,235,287,353,5,423],backend_agg:[331,333,576,21,529,470],mpatch:[267,175,438,99,366,582,589,103,263,289,474],get_transformed_clip_path_and_affin:248,undu:352,usabl:[243,60,566,156],"_proxi":314,value_escap:287,svg_filter_lin:[200,407],unit_cub:349,upper_bound:442,set_xlabel:[441,387,220,63,223,5,145,412,451,400,114,320,84,578,498,235,475,442,529,348,522,566,481,427,466,329,123,394,108,365,450,58,204,205,433,333,169,435,367,503,584,585,341,211,449,507,254],unwant:[290,57,283,235,61,136,301,371],segreg:340,timer:[559,297,579],keep:[144,257,38,149,317,83,320,566,527,277,352,423,19,198,493,57,122,160,385,68,293,294,168,32,402,214],counterpart:[243,153,168],stride:[349,294,117,277,5,248],epoch2num:168,mkpg:7,ndim:492,clip_on:[444,357,149,268,420,476,22,282,238,545,257,294,19,277,33,212,5,348,248],parabl:10,christoph:[257,235],qualiti:[566,402,439,144,579,257,153,160,297,96,353,248,354,330],arctan2:[290,160,283],moviewriterregistri:579,get_zminorticklabel:349,clubsuit:[138,344,354],text_rot:[216,200],radarax:177,rec_edit_gtk_custom:[200,534],perfectli:[291,144],mkdir:[228,465,38],symlognorm:499,wrapper:[303,149,257,168,95,294,401,121,5,287,330,85,277],attach:[149,385,294,440,436,242,367,566,297,312,347,5,341],autolim:[5,205,248],get_w_lim:349,offset_from:581,"final":[566,228,74,434,257,493,107,499,584,395,95,334,542,340,22,348,289,266],miniexpect:235,rsh:354,rsi:222,filterunit:388,fuzzi:[103,262],set_markeredgecolor:248,test_pre_transform_plot:235,rotate_deg_around:434,rst:[103,228,214,235],exactli:[57,348,340,312,96,235],key_press_mask:[179,390,507],set_mfcalt:248,pick_handl:[242,347],photograph:[21,297,497,330],fontfil:287,ben:[257,440,235],cpython:352,arc:[355,440,452,581,262,316,214,248],patch_artist:[294,5],yevents2:197,bev:235,start_tim:[465,152,239],print_trait:393,rrightarrow:354,julian:168,py2:[580,7,83,312],yevents1:197,kellei:96,pyfil:465,rc_file:257,tabl:[439,144,363,312,348,5,44,83,235,96,530,51,423,260,497,499,95,362,385,294,337,402,214],need:[303,0,443,243,312,5,6,7,317,149,11,153,323,96,326,328,353,466,431,468,450,470,473,169,485,334,340,581,343,38,347,348,181,183,188,352,354,357,499,199,57,58,103,379,385,203,64,68,207,208,70,214,373,144,518,383,228,83,229,525,235,529,238,539,533,91,92,241,242,393,543,544,545,248,250,294,401,402,257,100,405,262,263,416,270,440,566,277,278,423,19,120,121,122,286,287,579,433,293,541,434,258,297,299],frameon:[373,83,150,453,581,294,481,474,149,473,491,234,128,402,5,450,438,266],border:[402,433,149,294,160,50,341,125,96,5,348,248,266],screw:566,ind1:[0,492],ind0:[0,492],expos:[83,239,92,320,149,257,235,74],pink_r:403,figlegend:[257,294,497,122],filesav:297,glyphind:[363,51],singl:[357,83,92,499,527,168,149,294,297,492,287,22,243,5,214,248,312],add_contain:5,galleri:[497,458,99,499,235,103,561],discov:493,stixsansfont:312,barb_demo:200,connected:38,mplayer:[229,566],deploi:[353,402],leftthreetim:354,monochrom:[294,5],inconveni:83,url:[566,533,357,83,294,57,149,545,297,235,22,243,5,388,87,248],tri_refi:[290,160,283],navajowhit:393,inde:566,snapshot:83,navigationtoolbar2wx:[335,338,21,286,380,449],get_ext:[476,248,239,262],constrain:[92,257,337,341],point_in_path:262,shrunk_to_aspect:434,set_pane_color:349,get_size_in_point:287,verbos:[510,83,464,235,352,402,181,7],flier_low:484,cellloc:[294,5,51],anywai:[484,492],tire:257,basei:[294,5,357,349],vartriangleright:354,won:[304,566,442,38,168,58,340,423],get_canva:21,basex:[294,5,357,349,571],discontinu:[96,499,583],mgd:257,restrict_dict:38,joint:[21,224,297,330],trans_data2:476,get_gridspec:120,return_al:120,navigationtoolbar2qt:576,triangl:[257,108,243,223,5,182,349,187,117,235,277,96,88,575,283,160,61,248,290,294,297,136,301,371],enabl:[566,85,349,149,352,248,83,294,242,117,402,297,235,287,36,347,348,5,205,579],grayscal:[8,83,294,426,149,393,297,497,402,5,423],convert_xunit:248,barchart_demo2:200,ypress:347,grai:[255,403,373,5,316,8,270,319,426,565,392,87,532,460,497,91,499,212,83,161,163,543,167,70,294,297,340,402,173],contain:[305,443,544,38,395,491,312,448,262,179,5,7,383,266,228,83,153,566,50,492,96,450,357,92,464,199,21,243,287,22,545,149,161,527,248,579,580,349,434,294,346,334,297,401,586,214],get_markeveri:248,grab:[303,218,92,257,297,492,287,473,579,478,44,423],ticklabels_demo_rot:[404,200,465],dpi:579,figlegend_demo:200,draw_path_collect:[297,83],legaci:214,ipnl:289,smooth:[257,160,96],rectangle_selector:[143,200],terrain:[403,497,283],add_polar_bar:316,kwlist:179,mfcalt:[294,5,248],statu:[497,10,92,493,199,57,525,294,297,346,379,5],lut:[290,283,160,362,402,583,423],correctli:[304,349,83,434,525,72,527,177,312,262,235,64,317],set_longitude_grid_end:525,frequencyslidergroup:341,tend:[303,544,357,499,423],gtrsim:354,state:[144,107,179,491,42,312,577,348,5,383,413,266,149,492,277,243,497,466,379,83,248,294,434,297,341,589],"__bases__":179,ma20:222,tens:83,neither:[149,294,121,5,181,205],log_demo:[216,200],spines_demo_bound:[404,200,465],merri:38,isavail:579,set_theta_zero_loc:[257,357],itertool:[409,239,75],creationd:60,ker:354,thank:[334,439,149,555,257,493,440,498,168,294,584,280,179,5,316,588,412,507],snaptocursor:31,rsum:159,admin:[352,57],trove:235,aqua:499,x22fundament:217,frombuff:473,ami:235,get_ybound:5,set_default_interv:383,print_p:297,solv:[291,328,566,464,7,330],get_horizont:190,billotei:257,sqcup:354,orig:[83,248,36],fill_empti:[294,5,246],quit:[257,482,109,7,229,271,440,76,566,235,324,354,423,239,353,427,500,302,430,23,332,346,134,401,402,583],fig_10:280,parasite_simple2:135,addition:[257,347,242,294,297,262,545,214,248,354],autolabel:[436,424],colleagu:439,treat:[349,83,294,401,57,434,357,362,277,262,5,450,383],exec_loop:324,limsup_:62,yournam:402,stixsan:[402,354],contourset:[512,83,294,121,149,5,181],test_al:247,otf:317,mathtextbackendpath:312,"_draw_steps_pr":248,csv2rec:[483,382,83,294,55,159,566,492,235,222,311,264,422,44],test_ax:235,check_button:200,backend_gtk3agg:[351,125],multiplication_rul:314,lightnen:388,glossari:[214,265],ispolar:83,ini:352,has_readlin:580,demo:[303,138,35,480,106,220,105,481,251,380,469,460,454,81,148,204,319,13,117,565,498,577,235,458,437,530,119,17,14,341,52,390,260,196,184,18,279,56,158,60,361,127,435,450,64,65,549,522,580,165,365,130,160,29,582,338,587,72,428,170,209,300,171,252,253],demi:[357,149,294,287,5,248],default_valu:492,megi:235,revis:[257,352,122],scienc:566,fourierdemowindow:341,valmin:92,insertitem:324,parti:[257,224,357,83],began:[353,434],listfil:38,sqrt:[1,442,88,106,343,246,220,42,312,5,181,145,316,229,525,565,15,322,307,17,354,37,460,242,283,160,62,127,290,291,294,132,485,71,298,589],assert_rais:235,polarax:[357,257,12,100,401,340,405,402,177],probabl:[303,138,257,142,312,348,5,584,149,229,440,527,50,492,277,529,328,493,574,121,21,543,294,485,339,297,340,209,402,214,370],get_bbox_to_anchor:266,legend_demo_custom_handl:[216,200],http:[303,1,257,38,259,109,491,492,177,313,347,5,525,43,44,334,83,271,388,480,50,235,413,352,457,16,87,389,566,89,353,574,466,57,286,543,302,544,222,318,161,557,248,548,23,580,332,434,167,504,99,424,294,340,299,402,214],version_info:[430,427],flipud:83,interrog:83,forgotten:[247,326,248],effect:[373,556,375,326,107,108,395,491,405,223,5,181,83,46,153,388,492,352,323,96,87,53,497,241,468,349,450,248,294,297,401,214,588,173],get_alt_path:448,is_math_text:[38,248],nation:497,distutil:[257,228],format_data:527,well:[74,257,107,5,348,144,7,317,228,83,76,525,420,527,235,237,324,492,354,566,353,199,57,581,262,287,246,149,64,248,579,543,434,169,133,294,341,103,362],fonttyp:[257,402,354],handlerpatch:[366,122],cbar_loc:[481,450,505,94,553],set_polici:[179,390],undefin:235,y_text:403,taller:[294,149],distanc:[444,19,42,312,347,5,383,349,387,492,485,88,357,54,282,242,541,287,63,83,450,248,471,164,434,168,294,297,402,589],darkolivegreen:179,unattract:566,distant:257,increasingli:144,markeredgecolor:[566,26,83,393,169,420,294,584,235,277,5,248],random_data:461,add_axobserv:149,nipy_spectr:[497,235],size1:287,size2:287,set_dash_joinstyl:248,onbang:334,outstream:38,multipage_pdf:[216,200],densiti:[83,294,41,229,387,297,419,127,257,243,492,209,497,262,63,5,450,248,532,567],tennei:235,outnam:492,required_group:312,howto:214,ntriangleright:354,sweep:248,update_titl:152,swirli:362,xmajorloc:527,loss:[260,294,492,224,5,289,330],share_al:[391,481,94,505,450,553],mathtext2:83,fernando:[580,439,149,10,257,442],ldflag:7,necessari:[144,442,491,312,348,5,525,383,317,83,271,470,526,50,352,323,96,357,543,430,149,450,64,85,579,510,434,294,401,103,214],lose:[229,50,19,235,38],had_data:349,page:[149,294,153,57,95,299,313,237,248,265],amd:235,revers:[403,580,260,83,294,289,38,122,492,235,497,5,521,64,205,44],psyr:312,get_linelength:243,set_default_locators_and_formatt:[357,544],get_prop_tup:[83,248],repeat:[257,347,177,262,5,182,83,235,243,27,19,499,283,315,61,248,579,290,68,294,584,299,136,301,371],on_kei:297,mistak:83,tick_top:[19,320,383],home:[228,214,83,464,133,199,38,402,297,235,299,179,7,337,312],arrow_param:485,peter:[257,235,38],fromrecord:492,librari:[303,580,522,557,144,566,257,561,133,153,259,353,492,235,423,402,328,7,85,330],separ:[144,257,343,107,177,348,5,412,83,268,561,440,320,525,492,352,243,539,326,402,357,566,465,57,122,393,468,500,544,450,64,248,580,581,294,258,485,434,297,401,340,103,214],"_timer_stop":297,overlap:[566,433,83,434,442,581,257,46,56,149,455,294,527,492,235,287,96,222,5,158],hangup:[118,214],draw_imag:[476,235,297,83],estim:[492,177],assert_i:235,overlai:[294,442,340],supsetneqq:354,encourag:[303,566,85],unit_1:314,"_tmp":[566,465,531,579],unit_2:314,set_rgrid:357,usag:[38,395,40,312,183,265,83,153,455,536,233,492,96,51,566,92,465,467,287,149,64,248,580,294,485,297,103],parasit:[100,401,450,405],showvert:[42,589],ndarrai:[362,294,38,492,235,5],offset:[205,480,326,444,220,492,312,262,5,6,525,450,83,11,289,319,387,84,117,527,235,243,156,530,87,485,532,355,356,357,239,535,282,238,500,158,581,260,22,63,149,161,204,248,292,294,569,557,208,424,587,503,297,586,349,225,510,438],bboxtransform:[434,83],triinterp_demo:[216,200],monetari:354,varepsilon:354,reintroduc:235,y_scale:485,is_wedg:262,freedom:83,triaboot:584,bigoplu:[354,62],set_text_prop:51,qsize:324,label2on:[348,383],baseline_imag:352,watermark_imag:186,y_edg:[294,5],cocoa:[439,144],curvefilledb:248,curvefilleda:248,d_intervalx:349,quadmesh_demo:[216,200],w3c:[287,412],get_pango_layout:83,highlightselect:248,get_aa:248,psname:153,inner:[294,431,492,22,5,264,248,44,423],get_ax:[348,149,248],palatino:[402,543],is_figure_set:248,offset_posit:[294,5,297,243],barprop:215,north:499,on_buttonclickme_click:507,triangular:[83,294,149,418,497,243,5,248],dpi_cor:248,subsup:312,gain:[257,492,382,289,44],spuriou:229,tick_param:[349,83,294,123,275,19,235,497,63,5,383],eas:[257,561,122,491,468,450],highest:[181,497,85,287],eat:38,eav:83,hemann:[498,584],interactive2:[200,534],set_attr:248,score_s:287,dmk:257,set_transform:[83,476,438,248,177,586,161,517,87,205],displai:[512,525,144,347,220,260,42,380,262,348,5,182,383,228,7,83,229,561,563,524,473,235,243,530,423,566,357,497,197,426,353,121,20,21,468,242,127,149,450,248,580,349,67,476,99,485,294,297,402,214,589],print_tiff:297,quad_bezi:186,limit:[0,516,74,304,525,443,527,153,110,19,312,5,6,382,77,488,226,83,11,76,273,383,526,276,492,323,324,494,194,357,196,197,91,92,240,361,362,202,544,288,203,64,248,398,294,100,168,434,297,497,477,137,214],image_thumbnail:200,nonperiod:466,monthloc:[360,111,112,168,329],generate_fontconfig_pattern:287,evalu:[83,294,38,492,352,179,5],vertexselector:[214,248],set_cmap:[250,83,294,235,497,243,362,583,423],erik:257,lasso_selector_demo:[143,200],safe_isinf:492,get_bg_bbox:239,eric:[257,439,235],add_input:289,axnext:374,get_minor_loc:[348,383],minim:[291,433,74,434,257,464,309,294,144,96,5,7,317],"2to3":235,make_axes_gridspec:121,get_mutation_scal:248,on_mot:347,futur:[349,83,581,257,133,38,294,100,401,235,287,497,402,5,543,423],rememb:[149,294,57,95,60,348,423],set_default:465,use_mathtext:402,setupext:[303,464,235],get_vertical_s:190,stat:[228,116,199,159,492,32,265],star:[120,257,294,295,177,448,262,243,5,248,354],set_solid_joinstyl:248,convert_yunit:248,set_mutation_aspect:248,stai:248,get_tick_out:326,handleheight:[402,270,266],sphinx:[566,439,214,235],connect_ev:92,clip_path_to_rect:[235,262],indirectli:83,"0x34d25f0":[294,5,492],extrap:492,portion:[19,149,294,297,312,103,450],klass:[179,38],arr1:234,make_heights_equ:234,"6pt":287,get_kern_dist_from_nam:541,mcdougal:[257,439,235],mpkg:7,mpkd:7,demand:[194,492],secondli:168,get_ymajorticklabel:5,cocoaagg:[402,408],whose:[144,434,120,229,443,446,13,190,12,401,492,294,405,5,214,438,248,312],set_ytick:[525,349,196,114,566,481,94,58,123,505,222,5,316,203,532,226],accur:[257,440,83,205,330],aui:338,tobia:235,count_contain:434,plottabl:83,swap:[434,83,405],xsec:296,horizontalspanselector:92,test_pickl:235,"0xd54b26c":348,evt_tool:339,"void":149,updatei:[434,5],newaxi:[290,194,27,11,503,343,283,429,61,532,136,301,182,371],arcco:[354,62],govern:7,dotplu:354,appar:[492,491,373,83,153],testrun:352,vast:348,bigodot:[354,62],register_backend:[297,317],vector:[144,257,149,484,5,412,349,560,561,440,235,277,96,492,497,353,21,246,127,83,248,330,290,434,294,297],get_vsize_hs:190,initialis:[21,286,357],nparallel:354,pathpatch3d_demo:[200,538],"_gen_axes_spin":[177,525],batch:[379,235,144],inset_loc:[174,453,65,581,77,450],"10x":492,"fabriqu\u00e9":165,q1y:492,q1x:492,even:[516,74,107,38,224,218,6,412,83,11,153,566,5,352,243,492,357,328,353,493,57,122,144,247,450,248,433,294,434,297],get_xlabel:5,texmanag:[297,543,235],neg:[403,257,395,149,571,312,5,383,349,527,235,392,238,354,460,357,497,566,499,492,22,545,83,64,248,550,294,416,168,434,297],altitud:499,axhisti:[450,203,273],reverse_dict:38,logformattermathtext:[527,462],autoscalex_on:149,"new":[85,395,312,262,5,265,83,576,492,96,497,92,499,121,95,243,362,287,22,149,248,579,21,294,168,297],net:[492,228,543,83],ever:[257,5,566,492,294],axhistx:[450,203,273],neq:354,getsiz:[334,341],med:[584,585],elimin:[328,416,294,96,5,27],zpo:129,test_whizbang:352,abov:[303,403,373,74,442,443,544,379,5,348,144,181,7,383,83,153,205,527,492,277,238,354,423,497,566,525,199,57,122,431,581,550,22,63,349,521,85,470,580,433,385,294,335,208,339,297,401,340,103,214,583,173],mec:[294,122,420,277,379,5,161,87,248],donoghu:[21,334,286,439],forum_id:83,met:[223,402,108],mew:[83,294,366,248,277,379,5,161,122,85],iter_tick:383,custom_projection_exampl:357,interpret:[347,179,5,266,349,229,272,85,498,492,530,566,120,92,465,242,95,581,362,22,149,248,330,580,397,166,294],luther:38,scatter_demo:[200,364],figurecanvassvg:235,jame:[439,235],callbackregistri:[5,83,38,149],permit:[144,259],ft2font:[83,312,287,363,51,549],demo_grid_with_each_cbar:505,mercat:544,multipledateloc:168,get_capstyl:[297,448],axisaritst:401,org:[525,480,38,259,109,491,492,177,347,179,7,43,318,271,388,50,235,352,457,16,87,89,574,466,286,557,302,544,161,548,23,332,334,504,99,424,340,402],welch:[45,5,492,294,321],test_my_bug:493,right2:450,get_snap:[297,248],fontsize1:312,fontsize2:312,bdsk:566,vartriangl:354,deviat:[472,497,229,442,116,542,492,209,347,248,330],call:[525,85,440,144,248,243,375,443,108,153,545,223,42,312,122,347,179,5,181,7,521,226,228,83,420,229,152,320,76,576,353,527,235,277,352,324,492,348,14,354,423,566,402,357,497,580,92,240,465,499,57,38,95,96,286,433,362,121,583,22,379,149,450,58,64,205,579,159,349,510,294,29,70,524,434,297,340,341,103,214,589,287],python25:402,fonts_demo:[200,522],armi:566,vcenter:312,calc:235,armb:[355,581,248],tell:[533,416,566,493,152,199,85],irregularli:[439,492,561],arma:[355,581,248],wart:442,multipleloc:[314,276,527,235,410],warp:525,warn:[566,402,580,149,527,257,416,563,38,581,179,297,492,235,312,103,83,214,85],"__iter__":314,hexbin_demo2:200,ward:460,texmf:153,webbrows:402,fontsizex:312,setup:[303,228,182,579,214,334,464,439,179,235,312,103,340,7,248,317],candlestick:[294,5,231,440],worth:[83,499,470,523,423],animation_blit_fltk:200,root:[228,440,257,427,38,430,439,235,352,103,492],trunklength:[217,22],defer:[379,566],unit_circle_righthalf:262,pprint_setters_rest:248,get_fontproperti:248,stop_filt:[161,297],buttonclickm:507,gimel:354,mymplcanva:[324,76],unichr:51,unsign:235,colorname_to_rgba:393,quot:[231,83,107,111,112,354],fontmanag:287,numarrai:[229,439,83,330],cdict3:583,cdict2:583,cdict1:583,config:[493,7,83,199,10],set_horizontalalign:[222,248,329],confid:[257,5,585,294],demo_agg_filt:200,unit_resolv:314,timedelta:[191,456,389,168],oscillatori:536,ovc:[229,566,531],"_image_skew_coordin":476,bang_button:334,get_formatd:[382,492],widtha:[581,248],attempt:[303,349,583,38,168,153,527,235,103,85],get_split_ind:38,"0x13695544":348,get_conversion_fn:314,"_cached_ni":429,scatter_profil:[216,200],txt_label:150,scatter_hist:135,fifo:492,privileg:7,keyboard:[149,294,504,297,235,402,5,530],myplot:537,pypirc:228,non_math:312,make_arrow_plot:485,code_to_run:580,set_tight_layout:149,isord:[541,83],ma200:222,larrow:[581,248],"1xn":[294,5],"__class__":[179,314],better:[439,144,442,312,405,349,525,492,106,96,235,195,493,237,57,61,83,205,543,434,136,301,214],sigma_i:[312,277,155],basicunitconvert:314,zi_cubic_min_:575,show_al:[390,562,337,351,492,125,126,179,382],get_pad_pixel:383,mxn:[294,5,83,149],type1cm:[402,543],mtext:[586,297],axcolor:[528,384],grammar:[439,312],sigma_2:[316,62],bupu:[403,260,497],wordier:144,styleclass:[474,267],"1x2":433,getvalu:[557,334,388,491,341,87],lorenz:466,cachedfont:312,went:[257,349,353,282],ntest:[83,501],oblig:107,side:[205,405,75,492,448,262,348,5,383,83,268,13,117,190,233,235,352,96,238,423,566,498,427,56,20,243,468,22,430,149,450,122,248,349,294,434,297,401,402],bone:[294,403,181,497,512],luck:344,anticlockwis:[512,357,61,136,96,301],ttffont:83,set_norm:[250,362],extract:[580,385,498,38,536,492,287,323,529],flier_high:484,gradient:[290,96,403,429],truth:248,content:[557,83,434,269,515,199,95,529,297,312,103,214,248],gtk_timeout:200,reader:[357,83],not_found_msg:229,"_slower":50,aliased_nam:248,surface3d_demo3:[200,538],"_remove_method":235,dreturn:159,linear:[149,348,5,525,349,90,575,188,527,235,96,492,193,357,497,239,466,499,57,545,83,471,398,294,416,337,340,402],mydynamicmplcanva:[324,76],situat:[303,581,294,434,312,5],infin:[357,349,83,294,499,492,544,5],infil:580,vstack:[403,33],lev_exp:416,markercolor:[294,5],figurewx:21,cell_text:260,get_alpha:[257,348,297,248],crashfix:235,convent:[83,294,326,566,22,103,5],print_svg:[297,235],new_horizont:[123,190,203,13],isi:566,iso:[290,96,283],isn:[566,525,235,352,22,510],"1e40":250,gellul:235,user:[357,149,248,83,294,499,38,527,153,96,297,287,262,103,5,214,85,265,266],matlotlib:464,"_faster":50,pcrr8a:312,"__add__":314,grade:498,get_ztick:[349,235],fill_between:[497,257,442,108,122,223,492,235,294,222,5],triangle_right:[294,5,248,448],thereof:224,get_properti:214,hook:[179,294,110,352,580],unlik:[326,312,262,5,317,83,492,243,357,497,120,92,499,121,431,581,544,450,248,330,434,294,401,103],jjl:257,hoon:[257,439,235],get_i:[498,248],show_popup:297,agre:[224,83],hood:[257,379,357,340,492],get_c:248,innercircl:262,sometim:[566,433,144,581,257,442,329,440,122,294,423,405,96,5,7,205,317],quarter_x:525,ptmri8r:556,pathinteractor:589,naiv:[160,492],namespac:[580,144,294,468,83,85],gym:498,lower:[34,372,442,259,492,348,5,181,146,450,488,266,334,228,83,268,270,440,248,527,235,567,392,243,238,354,402,89,54,481,240,465,414,122,393,505,361,294,222,149,161,550,64,65,25,349,434,581,167,416,289,476,297,300,477,212,33,214,73,173],gitconfig:199,hex_to_rgba:393,somewhat:[83,250,79,492],indexdateformatt:168,peculiar:525,scorelabel:498,silli:[340,8],discourag:103,keyword:[357,83,294,121,149,95,243,527,492,383,168,497,22,96,5,579,248,266],rankstr:498,evt_idl:[513,23],matter:[304,83,431,581,401,312,383,423],subplotspec_list:166,scale_transform:[357,83],set_subplotspec:[5,190],tellm:88,"_yaxis_transform":525,modern:[439,543,440,153,312,402,354,317],mind:[214,423],mine:541,compon:[83,385,257,583,294,492,235,497,5,205],csd_demo:200,convertargsproxi:314,seed:[197,90,69,442,455,160,585,222,172,193],seen:330,seem:[433,133,499,339,50,235,335,324,492,7],seek:566,minu:[257,442,294,527,492,457,402,5,64],rebuild_if_miss:287,memcheck:465,plotstyl:[294,5],get_fontext_synonym:287,changecursor:449,min_:[96,575],cell_chang:382,data1:455,data2:455,axisartisthelp:326,lasso_demo:559,shirnk:248,style_flag:549,stest:[82,62],get_posit:[403,83,120,13,545,190,392,243,5,248],matplotlibdata:83,regular:[257,38,149,312,448,262,348,5,317,349,205,492,243,235,354,357,566,287,83,248,432,294,402,173],current_s:271,unitless:74,point_:340,tradit:[294,5,497],simplic:[31,349,339],doi:[466,177],don:[403,525,74,484,177,312,262,5,181,7,383,83,289,50,388,566,276,492,463,422,19,184,498,493,465,573,57,58,286,287,246,222,149,527,64,248,207,294,299,103,42,214,589],parent_bbox:[174,450,453],dom:[87,388],datad:[33,362],alarm:352,ruben:439,dog:[587,424,388],doe:[303,525,439,373,144,257,442,262,38,312,5,179,224,7,347,383,83,523,440,153,388,353,235,352,323,492,543,27,354,423,566,402,357,92,574,432,121,58,21,393,433,362,287,544,379,149,122,64,248,249,330,291,349,579,166,294,335,416,498,168,339,434,401,340,103,214],get_help:[100,326],textcomp:402,setup_axes1:405,draw_arrow:485,setup_axes3:405,loadrec:[216,200,492],set_major_formatt:[348,111,112,383,231,276,273,525,527,389,37,566,241,55,329,360,429,544,454,548,422,191,225],dot:[83,294,57,149,545,297,312,22,243,5,248,579],foo_wrap:103,projectionregistri:357,looking_glass:559,keyval:179,kreveld:96,butt:[294,297,277,402,5,248],syntax:[580,317,543,83,294,570,337,58,95,235,287,402,214,248,354,312],init3d:349,get_dash:[243,297],test_world:349,custom_hamm:525,closeev:[324,297,235,76],acquir:[294,5,580,156],field2:492,explain:[566,493,450,235,10],field1:492,scatteroffset:[294,5,149],get_zlim:349,"__call__":[250,83,581,240,96,499,527,544,122,314,297,32,171,222,422,161,525,347,248],folder:[7,235,287],update_background:[92,574],nyet:501,view_transform:349,embedding_in_gtk3:200,embedding_in_gtk2:[200,83],infti:[214,318,543,170,62,316,145,438,354],pathpatch_2d_to_3d:[349,310],get_datalim:243,autolayout:[402,149],get_snap_threshold:448,"20or":492,bar:[450,150,106,41,542,178,405,5,316,183,451,83,114,272,436,525,458,243,280,570,355,260,497,498,568,242,428,361,94,128,161,248,548,549,432,349,540,294,336,491,251,490,297,209,215,254],dend:168,ioff:[294,379,144,497],nrect:[385,68,293],unicode_minu:186,bad:[83,38,235,341,246,181,173,317],convertreturnproxi:314,clippedlin:200,microscopi:497,limsup:354,rounding_s:[150,581,247,128,450,248],old_out:179,axis_d:383,datatyp:423,ainit:341,subject:[229,60,579,153,224],said:[257,312],prime_2:[316,62],bprev:374,tuple_to_rgba:393,"_patch":235,yaxis_d:5,segment_hit:248,invalu:439,simplest:[270,493,199,392],writer_test:218,mplot3d:[367,200,265],set_viewlim_mod:471,to_filehandl:38,were:[144,257,107,38,221,149,312,262,5,7,347,83,117,235,277,492,19,91,573,242,541,57,349,294,434,121,510],gcfderiv:83,price_data:435,markerprop:83,multipag:[566,60],detrend_non:[294,5,492],against:[303,257,353,498,153,294,566,235,352,103,5,7],fnx:342,uni:492,foral:[354,62],artist_pick:266,scroll_to_mark:179,format_xdata:[5,360],issubclass_saf:38,"_iter_collection_raw_path":297,height:[174,150,443,262,153,222,446,312,128,5,388,266,83,453,271,76,273,78,452,190,50,234,278,324,579,87,326,517,444,120,198,240,282,243,429,246,247,149,203,289,248,549,25,331,436,166,294,366,498,346,434,297,566,209,214,553,541],numdim:492,bbox_extra_artist:[294,235,297,149],formatstr:492,replace_lin:179,gneqq:354,recur:38,mapsto:354,numpi:[482,0,1,139,305,138,306,307,409,444,537,542,447,3,4,314,5,316,7,146,450,147,451,335,148,318,9,11,151,319,152,320,50,13,321,455,15,322,155,324,156,17,567,226,460,462,463,18,465,568,466,419,158,159,160,332,48,218,469,161,378,162,330,472,193,473,547,510,167,29,536,30,178,339,475,476,586,170,341,32,171,33,172,508,173,34,342,35,563,36,194,175,481,343,176,344,38,39,483,19,42,251,405,315,348,334,181,182,513,44,487,145,349,566,45,46,187,491,188,189,49,191,351,492,392,352,12,192,169,575,494,14,52,37,53,357,196,197,54,198,495,574,477,499,56,500,58,60,507,361,362,61,144,502,203,205,470,66,565,365,68,360,55,504,69,505,524,71,72,209,210,211,212,214,73,371,201,372,403,85,217,74,374,458,377,220,76,127,518,380,519,223,232,295,80,81,83,386,229,396,65,526,480,528,235,236,535,234,529,238,195,88,390,260,449,90,91,92,240,452,241,93,94,345,243,394,383,239,246,555,546,248,325,250,564,397,583,399,99,355,110,346,400,434,101,532,103,177,253,255,104,430,384,105,106,107,108,259,109,100,261,435,558,262,382,263,264,347,413,367,414,416,129,366,115,270,271,272,562,436,273,117,274,275,585,488,278,279,27,569,422,501,571,498,425,573,427,282,283,584,428,286,370,429,242,125,126,222,288,329,289,550,544,23,290,457,291,369,293,294,131,258,503,296,215,134,297,298,437,300,136,454,301,137,525,438,589,302],three:[83,294,499,57,297,492,362,312,262,96,5,214],ting:497,numpt:110,pie_and_polar_chart:[294,200],propto:354,basic:[174,439,107,105,484,296,7,523,561,492,243,539,14,462,499,56,96,550,577,248,510,294,29,424,587,584,209,586,214],get_xlim3d:349,ismath:297,"_faq":214,figurepatch:[316,83],suppress:[402,235,149,85],get_imag:[476,5,294],multithread:580,print_svgz:297,fixed_s:446,filterrad:[294,5,429,83],points_inside_poli:566,tanh:[444,282,354],fully_overlap:434,servic:[224,352,237],calcul:[144,555,257,443,177,5,525,383,349,85,190,235,96,492,423,566,121,61,149,450,248,330,294,168,297,401,136,301],neat:297,finder:[439,401],anchor:[83,434,391,294,121,149,190,401,5,450,525,438,248,266],setbitmap:380,seven:177,labelstr:346,"_set_lim_and_transform":525,test_mouseclick:559,peisach:235,kwarg:[0,85,2,248,243,257,481,326,544,38,310,545,542,19,177,312,411,5,77,576,146,181,266,83,368,76,117,190,527,235,324,492,539,485,357,497,120,92,429,121,122,95,96,301,362,287,22,222,149,550,289,205,525,579,21,291,349,383,434,398,393,476,416,338,294,297,586,341,103,33,214,438,583],tick1lin:[348,146,383,329],setfocuspolici:504,manual_axi:[216,200],sever:[83,294,499,153,85,103,497,248],precis:[517,83,434,257,442,149,232,294,584,492,5,382,248],"_edgecolor":349,ultrabold:268,receiv:[566,110,168,38,286,352,347],colorspec:402,make:[38,312,262,5,383,83,153,85,527,492,96,497,499,199,121,95,243,362,287,149,248,579,294,168,297,103,214],setupegg:[7,235],unit_regular_polygon:262,object_pick:83,longshort:[200,407],ynew:547,kit:[144,330],segments3d:349,rcnt:159,artistanim:[49,579,9,66],studi:[566,177],butter:347,setmainwidget:324,fourier:[294,5,492,341,330],lassomanag:156,ax4:[433,397,524,46,272,232,431,566,563,442,578],arg_unit:314,embedding_in_gtk:[200,83,58],set_label2:383,inherit:[120,294,545,297,243,5,248],qualit:[403,497,116,235],inward:545,quotes_historical_yahoo:[111,112,231,83],bar_unit_demo:[200,465],mystaticmplcanva:[324,76],bezier:[257,22,235,262,492,289,248],protocol:57,just:[303,403,144,555,533,257,442,38,109,19,177,312,448,347,179,5,7,228,83,23,134,229,271,440,117,49,50,492,277,237,348,579,341,566,88,357,353,240,574,57,482,541,493,302,22,379,349,289,24,480,332,434,207,294,498,70,524,72,584,585,340,299,32,103,423,588,583],yen:354,get_xaxis_text1_transform:[5,525],bandwidth:183,human:[248,423],"__dict__":[179,314,507],zoom_btn:349,coprod:354,whitak:[257,439,440],yet:[83,257,561,38,395,583,334,348,416,450,248,354,266],units_per_em:549,stock_demo:[216,200],"_nbin":[567,405],royal:584,get_children:[349,149,383,5,248,266],friedrich:257,macport:352,contourf3d_demo2:200,scalarformatt:[349,83,257,149,294,527,429,497,5,225],save:[218,9,482,141,491,388,413,83,229,248,49,233,492,529,531,87,557,497,239,199,500,95,60,61,149,85,470,66,579,169,30,346,294,297,136,103,301,214],opt:74,nexist:354,fortun:[379,566],fegaussianblur:[87,388],usetex_baseline_test:[216,200],recomend:328,"03_s1":471,errorbar_limit:200,datestr2num:492,bbox:[525,545,248,257,442,347,482,39,109,357,42,262,348,5,77,78,383,266,267,83,268,523,492,412,271,576,473,50,234,235,277,529,238,23,355,356,363,349,239,566,281,574,242,122,21,581,332,429,302,22,247,149,450,557,65,249,549,331,292,391,434,166,294,474,30,506,134,297,340,402,33,589,501],ylorbr:[403,497],legend_demo:186,spline16:[294,5],linux:[580,10,229,107,491,57,286,287,577,522,312],cbook:83,daemon:171,ymid:[290,283,61,136,301,182,371],lat_cycl:[100,401,12,567],manual:[83,294,121,149,527,57,5,214],add_sizebar:453,num_vertic:262,s1045:[532,163],secondloc:168,signal_autoconnect:507,ref_siz:[190,446],unnecessari:[434,235],barpath:[385,68,293,91],www:[303,257,109,491,347,179,5,43,413,271,388,16,87,557,574,286,294,222,161,248,23,332,434,334,167,402,214,302],translat:[434,38,310,401,340,405,243,586,137,525,413],labelright:[294,5],appenditem:380,interv:[9,257,442,445,558,519,348,111,383,413,83,49,152,275,527,235,277,492,539,5,389,497,92,499,315,149,162,66,580,349,434,579,169,168,583,367,294,297,585,32,362,214,370],interp:[89,90,343,492,477,193],maxim:[214,323],dead:[235,83,38],plot_rcparam:214,intern:[83,166,294,153,168,248,297,383,287,96,5,527,85],y_transform:434,tunit_edg:349,pbm:579,interf:57,interc:354,add_subplot:[0,2,139,305,513,306,442,310,311,3,36,546,315,145,146,147,451,584,149,453,151,152,320,76,13,78,455,322,457,324,396,17,459,463,574,329,412,473,450,162,24,471,472,332,333,510,169,335,337,178,339,475,334,340,341,32,171,507,34,355,175,343,176,177,347,348,43,44,490,46,187,48,189,498,191,351,492,352,12,494,502,342,357,197,54,198,55,58,360,201,63,385,205,470,67,68,504,71,210,508,369,370,371,174,217,144,375,377,75,378,380,519,223,80,384,83,386,524,231,232,526,480,236,529,238,390,557,239,91,92,240,93,242,394,245,246,555,365,248,249,550,397,399,110,400,401,449,255,104,256,257,108,100,409,405,111,112,263,413,114,115,271,272,562,436,117,452,566,585,567,278,569,422,427,284,125,126,430,288,289,578,129,522,433,293,294,131,296,134,65,298,586,589],set_und:[149,83,294,499,5,181,539,173],insensit:[440,499,85],get_xyz_wher:492,update_datalim_to_curr:492,aaaaaa:39,directoli:214,tracker:[257,464,83,210],recfactor:83,unbundl:235,hsepar:507,ellipse_demo:200,bold:[217,221,177,485,5,411,412,149,268,153,85,50,354,357,498,541,287,289,248,549,291,294,70,368,584,340,402,510],yminorformatt:527,insecur:257,burn:177,set_label_posit:383,arrowstyl:[355,356,53,292,474,535,257,326,581,294,5,214,248],get_data_interv:[348,349,383],animation_blit_qt:200,promot:[224,214],"super":[150,581,297,235,312,177],timerev:[271,16,302],simul:[144,68,293,442,205,160,497,183],set_shadow_typ:390,future_import:465,mcolor:[294,5],commit:[214,199],main_ax:316,psfrag:439,byattribut:38,major_minor_demo2:[216,200],orsai:439,alamito:566,major_minor_demo1:[216,200,360,527,111,112],nxutil:566,phi_:394,formerli:[257,5,83],lieu:92,rsize:423,imid:329,get_minorticklabel:383,leglin:36,editor:[103,492],fraction:[256,150,446,177,312,5,266,83,114,535,118,50,234,492,238,356,357,120,566,499,121,581,149,161,248,550,166,294,474,168,434,402,438],fork:57,prettili:257,min_text_s:485,forc:[144,108,223,262,348,5,83,85,566,235,392,492,462,92,195,499,121,103,379,149,161,248,580,294,168,497,402],reassign:527,on_custom:339,x_edg:[294,5],berg:96,rasterization_demo:[200,407],downdownarrow:354,err3:540,err2:540,err1:540,"25th":492,seq_xy_tup:83,bugfix:[303,439,57,117,235,323,103],numlin:258,minfmt:74,get_alias:248,update_figur:[324,76],flexible_true_trait:393,whisker:[497,294,584,484,5,585],unrel:83,segmentdata:499,gtktool:[483,561,382,83],mandlebrotdisplai:240,semicolon:541,yscale:[149,294,525,235,497,486,402,5],"5_mpkg":7,specgram:[566,83,560,257,440,294,492,235,497,5],rfloor:354,drive:465,get_top_bottom:83,fromstr:[331,445,41,492,529,469,532,163],tosi:235,quadcontourset:[294,5],get_line_count:179,ship:[303,543,353,561,153,393,566,277,324,7,354,312],set_latitude_grid:525,demo_ribbon_box:200,somenam:248,excel:[493,311,168,10,265],intanc:83,dashlength:[375,248],tr_scale:405,prompt_ps2:179,minspani:[92,573],sue:[294,548],matur:257,a10:[294,402,149],stringio:[557,566,388,491,235,87],subdivid:527,axisbelow:[402,149],fell:235,get_shared_y_ax:5,weekend:[566,55,422],subdivis:[294,5,527,96,160],montesano:235,furthermor:[328,122],pseudo:[480,497],current_histori:179,ignor:[303,257,443,107,38,448,262,5,383,44,149,525,385,235,352,492,422,532,92,465,241,573,122,362,287,22,349,248,68,293,166,294,434,563,401,341,402,438],daili:[442,168,159,222,422,44],noverlap:[560,45,46,321,294,492,5],get_bbox_char:541,skip:[22,168,339,565,420,492,262,422],make_xaxi:480,invent:270,get_text_height:383,horizontalalign:[256,480,444,445,517,177,5,411,412,226,149,114,231,50,238,357,498,282,550,225,501,349,248,268,250,294,208,368,584],mile:498,psd_demo2:[216,200],psd_demo3:[216,200],mutation_aspect:[247,5,294,248],get_demo_imag:[481,94,505,13,300,450,146,65],menubar:[324,76,380],hierarch:22,make_circl:263,depend:[303,144,149,5,7,228,318,275,527,235,352,96,492,24,354,423,566,357,92,574,466,541,543,545,83,204,248,330,349,294,353,133,337,168,434,297,402,438],yaarrow:[214,248],aspn:[580,38],osxinstalledfont:287,father:96,xlink:[87,388],yunit:[294,5,272,397,296],varpi:354,get_ec:248,swoop:235,puor:[403,497],editori:566,succnsim:354,get_offset_posit:243,string:[243,257,442,326,544,38,149,446,492,312,448,348,5,6,7,383,266,382,8,268,11,440,527,117,190,276,235,277,155,529,238,317,87,422,354,357,462,92,465,499,581,122,95,393,543,287,22,545,83,550,248,579,580,331,349,541,294,51,498,208,168,434,297,402,214],asymptot:[294,5],sankey5:235,proxy_typ:314,mencod:[229,402,531,566,579],add_posit:243,path_patch_demo:[200,364],addsimpletool:339,recache_alwai:248,dim:[426,240,336,367,492,354],ghostscript:[402,543,352,317],ntriangleleft:354,die:38,other_transform:434,showmessag:76,iter:[83,470,169,96,271,262,38,168,122,294,492,16,302,235,314,5,348,579,153,383,24],item:[38,485,380,5,267,83,456,463,243,51,465,581,287,62,363,521,82,248,579,294,474,346,401,103,583,312],get_hatch_path:297,div:354,dip:[289,22],round:[150,442,5,266,149,151,584,525,234,235,277,422,355,356,557,498,281,581,246,247,128,450,248,292,294,99,297,402],dir:[303,228,83,441,465,38,58,179,214,289,549],autoloc:[314,527],overhaul:439,rightarrowtail:354,fignum:[294,277,426],freesan:363,rappaport:497,image_comparison:352,get_minortickloc:383,lightsourc:[161,1,499],current_lin:179,get_window:[294,5,492],pyplot:[83,418,121,85,149,297,492,5,248],favour:[357,83],rub:566,errorbar_subsampl:200,imagefollow:250,v_intervalx:349,boxsiz:[334,335,338,339,286,341,380,449],dipole_potenti:290,daily_return:159,tangent:395,coincid:[257,5,294],framealpha:[294,5,280,235,266],xoffset:50,wait:[566,88,149,580,257,38,294,297],box:[541,579],writetrail:95,lastt:[574,370],shift:[340,239,434,99,158,498,297,235,312,347,5,263,214],bot:354,nextmov:289,boi:498,set_pub:70,broken_barh:[294,5,200,497],"__repr__":[314,393,462,38],extrem:[83,294,440,499,485,100,401,340,405,5,214],bog:184,ycond:547,bbox2:[434,77],vedur:492,bbox0:[33,429],bbox1:[434,77],xerr:[471,571,18,458,540,294,361,5,488],modul:[149,83,418,120,499,153,168,38,362,287,448,5,312,248,266],evaluat:179,yeardai:168,backtick:257,get_figlabel:[294,497],thistheta:[238,550],new_floating_axi:[100,401,450,12],leav:[566,580,83,229,493,465,583,55,168,248,294,297,57,144,402,5,181,205,245],locatordm:[100,401,12],zoomed_inset_ax:[450,65,453],autosummari:235,saddl:179,hist3d_demo:200,univers:[303,348,492,168],visit:[228,337],coords_report:200,perl:38,plot_basedir:214,cross_from_below:492,perp:354,adict:38,black:[256,480,442,108,222,177,346,411,223,5,263,412,149,114,368,151,270,85,198,277,243,238,499,569,423,460,357,497,348,92,240,93,393,287,396,247,385,161,248,291,550,169,498,70,521,294,584,32,490,402,312],allequ:38,checkout:[228,10,493,199,57,7],is_mac:380,dolphin:200,python:[0,1,2,3,4,6,8,9,11,12,13,15,16,17,18,19,20,22,24,25,26,27,169,29,30,31,32,33,34,35,36,37,38,39,41,42,43,44,45,46,48,49,50,51,342,53,54,56,58,60,61,62,63,64,65,66,67,68,69,70,71,72,73,75,76,77,321,79,80,81,203,83,84,85,86,87,88,89,90,91,566,573,94,95,97,99,100,101,103,104,106,107,108,109,110,111,112,113,114,115,116,119,123,124,125,126,127,128,129,130,131,132,133,134,136,137,138,139,140,141,142,145,146,147,148,149,150,151,152,154,155,156,157,158,159,160,161,162,163,164,165,167,168,170,171,172,173,174,175,176,177,178,179,181,182,183,184,185,187,188,189,191,192,193,194,195,196,197,198,201,202,82,204,205,206,208,209,210,211,212,213,214,215,217,218,220,221,222,223,226,228,229,231,232,233,234,236,238,239,240,241,242,244,245,246,247,248,249,250,251,252,253,254,255,256,258,105,261,262,263,264,265,267,270,271,272,273,274,275,276,278,279,280,281,282,283,284,286,288,289,290,291,292,293,294,296,563,298,300,301,302,304,305,306,307,308,309,310,311,312,314,315,316,318,319,320,78,322,323,324,325,327,329,331,332,333,334,335,336,338,339,341,52,343,344,345,346,351,352,14,355,356,358,360,361,363,365,366,367,368,369,370,371,372,373,374,375,377,378,380,381,382,384,386,387,388,389,390,391,392,393,394,259,396,397,398,399,400,403,405,406,409,410,411,413,414,415,416,417,419,420,421,422,424,425,426,427,428,429,430,435,436,437,438,441,444,445,542,447,449,451,452,453,454,455,456,457,458,459,460,462,463,465,466,467,469,470,471,472,473,474,475,476,477,478,479,480,481,482,483,484,485,486,487,488,489,490,491,492,494,495,496,497,498,55,500,501,502,503,504,505,506,507,508,509,510,512,513,514,516,517,518,519,520,521,522,523,524,525,526,528,529,539,531,532,260,535,536,537,540,541,295,544,546,547,548,549,552,555,556,557,558,408,560,562,564,565,567,568,569,570,571,93,574,575,225,577,578,23,580,582,583,584,585,586,587,589],bigtriangleup:354,specgram_demo:[216,200],examin:248,pad_point:5,temporarili:[257,379,228,83],bboxi:566,contourlabel:[103,83],scalar:[439,74,257,442,38,149,347,348,5,383,349,272,117,527,492,278,243,328,198,499,121,362,83,24,397,294,297,402],ondrink:38,somefil:[492,467,51],someobj:92,mplevent:[449,83],get_view_interv:[348,349,383],unavail:402,eegfil:532,nearest:[373,257,481,343,5,146,83,386,417,319,31,13,65,565,527,234,567,323,531,423,89,566,94,508,286,287,349,450,64,248,294,504,505,583,334,297,300,477,402,215,173],subseteqq:354,kenneth:497,crazi:392,subregion:239,scattertext:235,drawev:[566,297,347],"_init_toolbar":297,agenc:224,use_rmin:357,pink:[247,294,403,497],autoheightchar:312,wxagg_draw:286,attract:107,till:[257,235],allowfullscreen:[257,214],pure:[353,333,492,144,85],mathsf:[82,354],tile:[110,500],tild:[570,354,62],tolist:555,setmainfont:317,mat:501,path_to_3d_seg:349,max:[34,403,74,256,442,547,41,100,42,485,5,181,146,450,414,83,11,289,578,273,188,527,277,278,481,238,193,17,354,460,532,90,91,92,240,499,283,160,550,433,362,544,222,149,161,203,64,172,249,127,290,549,250,68,293,360,294,416,258,346,434,349,341,300,477,429,137,589,518],mathdefault:354,strokep:95,set_ymargin:5,mathtext_demo:[216,200],ffmpegfilewrit:579,mac:[543,257,335,339,235,7,330],mag:501,mai:[303,442,443,143,312,5,7,317,149,153,16,324,407,461,464,465,22,450,470,473,166,28,168,31,340,341,174,38,40,347,180,349,47,186,350,492,352,354,357,497,359,499,199,58,59,103,200,501,144,376,379,318,85,364,207,102,70,214,216,74,219,76,525,383,227,228,83,229,230,388,527,235,237,243,530,534,239,566,538,242,541,543,302,247,248,98,398,434,401,402,554,404,257,107,572,100,559,265,418,561,277,422,121,122,285,287,579,433,581,294,133,297,135],underscor:[294,214,492],"sepp\u00e4nen":[95,257,439,235],grow:[497,202,334,335,286,492,312,380,449,383],talt:380,invert_yaxi:[5,460],tricontour_demo:[216,200],ny2:429,"6th":[217,492],ny1:190,avant:[402,543],nsim:354,tale:[71,279,26,437],"switch":[206,19,83,527,294,106,465,491,168,243,297,235,497,493,402,492,423,85,317],hassan:96,tall:[71,92,298,149,294],talk:[348,340],navtoolbar:507,"5x5":323,cutoff:492,"_init":287,lsh:354,pointer:[92,442,491,198,297,235,493],equiv:[5,354],grout:235,menstd:[436,178,568],interspers:465,group:[257,38,491,312,179,5,83,297,85,492,568,159,428,22,161,248,330,21,294,178,436,402],monitor:183,set_fontweight:[217,289,248,510],mockup:[80,296,24],mail:[303,543,144,257,464,57,402,493,379,83],main:[294,297,492,312,22,96,5,214],get_clip_box:248,financi:[83,566,442,55,329,530,422],param1_valu:357,lceil:354,initi:[205,144,443,107,439,395,243,109,260,5,224,347,413,83,190,229,271,153,248,198,50,235,96,492,566,460,357,92,466,482,95,160,362,287,247,349,450,527,85,23,580,332,434,207,581,169,294,340,341,577,302],safari:402,boxdot:354,arrows:[294,5],benson:439,alltru:38,x11:[566,7,287,330],redraw:[513,144,377,482,109,3,347,334,83,271,31,50,497,566,139,286,302,379,23,332,294,134,297],attributeerror:[294,5,149,314,580],agil:498,"_draw_dash":248,bupu_r:244,continu:[566,580,83,379,239,92,465,539,258,159,257,456,235,32,96,144,348,51,248,497],redistribut:[107,492],use_blit:[292,266],baselin:[349,149,268,391,69,294,326,308,401,368,297,357,235,312,352,411,5,248,249,501],alpha2:161,uncolor:83,artifici:[294,5],stitch:229,"3rd":[498,111,328],gdfontpath:83,numvar:492,streamplot:[497,294,565,235,127,5,530],attrituteerror:235,correct:[328,304,357,149,83,257,289,38,57,294,492,235,312,352,402,5,214,64,248,354],set_label_coord:[566,383],zsort:[349,129],make_axes_area_auto_adjust:123,lag:[294,5],"_style":248,runtimeerror:[235,527,42,363],alpha_:[145,405,62],monthsfmt:111,spline36:[294,5,259],gumbboot:584,tricontourset:[294,5],place_cursor:179,pdffile:95,cm_fallback:312,badli:[160,492],frequenc:[83,560,257,168,294,492,341,5],stackplot_test_baselin:235,option_image_nocomposit:[297,149],nkind:575,widthb:[581,248],principl:[257,492],think:[566,493,337,57,340,379],frequent:[303,83,257,40,566,492,422],first:[303,439,442,443,446,312,5,7,451,149,453,152,320,153,96,462,464,22,450,470,542,168,340,172,173,174,345,337,42,347,348,44,349,536,50,492,352,12,566,498,55,499,57,362,61,63,318,203,85,385,208,71,214,371,144,75,525,83,229,205,527,243,533,390,92,240,38,581,543,246,248,250,283,434,401,402,177,555,257,258,262,266,420,277,121,122,505,287,577,288,289,579,290,510,294,133,297,298,136,301,583],"_init_draw":169,log10transform:357,axes_enter_ev:[294,297,245,347],"_scale":247,annotation_clip:[294,5,248],carri:[434,50,107,228],ones_lik:[542,129],xtran:83,handletextpad:[83,294,149,402,5,266],fast:[439,434,458,57,243,312,222,5,330,64,549],oppos:[294,5],workaround:[291,543,149,294,122,235],arch:7,get_xi:248,leftrightharpoon:354,demonstr:[217,556,220,75,378,491,380,226,416,229,320,388,276,351,235,451,87,464,158,160,361,225,125,246,283,205,290,291,365,581,167,296,71,477,510],daunt:[439,144],numob:492,unduli:96,shade_rgb:[161,499],stream_contain:[294,5],subplot:[357,83,166,92,120,121,149,294,297,461,492,497,5,214,85,265],pcompon:492,mplgithub:214,n_test:160,broadcast:235,prctile:492,max_arrow_length:485,get_fignum:[294,497,83],grace_hopp:[119,438,535],plotingrang:573,wire3d_animation_demo:[200,538],clike:491,newbackend:294,found_index:96,rb_patch:429,surrog:492,polys3d_demo:[200,538],bootstrap:[294,5,584,585],curveb:248,tickup:[393,248,448],dash:[52,439,11,294,442,392,243,420,545,160,297,566,235,277,22,402,5,6,64,248],properli:[543,318,257,321,122,297,401,235,312,402,328,7,44],set_pick:[242,36,248],usevlin:[294,5,83,396],cidpress:347,kevin:257,interactive_bk:465,squar:[38,448,262,5,388,492,277,421,354,460,391,566,281,195,581,243,247,248,160,294,474,424,96],value_incr:260,centimet:314,clbl:53,coordsa:[581,248],coordsb:[581,248],image_nonuniform:200,advis:224,sqrt2:525,interior:[257,294,181,149,539],yaxi:[480,63,273,348,5,146,383,83,319,13,525,566,527,234,548,352,450,460,196,463,239,198,178,241,56,225,222,349,161,203,248,249,294,474,296,584,401,340],channel:[566,440,257,442,330,107,294,429,423,546,402,5,214,266],evans_test:200,updownarrow:354,labelpo:[294,5,291,349],colorin:156,pain:439,normal:[304,450,266,9,442,326,492,312,411,5,383,81,83,268,229,527,117,385,235,277,278,481,96,349,539,193,532,53,357,196,358,120,499,56,121,58,581,433,362,287,202,149,161,122,64,248,66,25,250,365,434,166,294,552,258,368,584,585,340,209,402,137,510,583,173,410],track:[533,228,444,149,440,282,277,144,287],scatter3d_demo:[200,538],fill_:393,xuplim:[294,5,488],beta:[257,316,354,32,62],nfft:[560,45,46,321,294,492,5],pair:[403,38,312,448,262,348,5,6,149,116,85,420,492,277,354,497,122,95,428,287,22,248,541,294,485,434,297,401,371],beth:354,misconfigur:235,minspanx:[92,573],cl_cvalu:83,testnam:498,im_rgb:146,infodict:[95,60],typeset:[118,235,457,530,354,330],offsetimag:[292,535],to_numer:[216,200],filll:312,sigma:[472,83,229,442,347,542,340,209,62,529,492,161,312,354,277],gracefulli:442,offset_demo:[200,538],shot:297,inv_transform:349,show:[0,1,2,3,4,5,6,576,8,9,11,76,13,15,16,17,18,19,20,24,25,26,27,169,29,30,31,32,33,34,35,36,37,39,41,42,43,44,45,46,48,49,50,51,342,53,54,56,58,61,62,63,64,65,67,68,69,70,71,72,73,75,77,321,79,80,81,203,83,84,85,86,88,89,90,91,92,573,94,96,99,100,101,103,104,106,108,109,110,111,112,113,114,115,116,119,121,123,124,126,127,128,129,130,131,132,258,134,136,137,138,139,140,141,142,145,146,147,148,149,150,151,152,154,155,156,157,158,160,161,162,163,164,165,476,168,170,171,172,173,174,175,177,178,179,181,182,185,187,188,189,191,192,193,194,427,196,197,198,201,202,82,204,205,206,208,209,210,211,212,213,214,215,217,220,221,222,223,226,229,231,232,234,236,238,239,240,241,242,244,245,246,247,248,249,250,251,252,253,254,255,256,105,261,263,267,270,271,272,273,274,275,276,278,279,280,281,282,283,284,286,288,289,290,291,292,293,294,296,297,298,300,301,302,304,305,306,307,308,310,311,315,316,318,319,320,78,323,324,325,327,329,424,331,332,334,335,336,338,339,341,52,343,344,345,346,12,14,355,356,358,360,361,363,365,366,367,368,369,370,371,372,373,374,375,377,378,380,381,382,384,386,387,389,391,392,393,394,259,396,397,398,399,400,403,405,406,409,410,411,413,414,415,416,417,419,420,421,422,184,425,426,195,428,429,430,435,436,437,438,441,444,445,542,447,449,451,452,453,454,455,457,458,459,460,462,463,465,466,467,470,471,472,473,474,475,490,477,478,479,480,481,484,485,486,487,488,489,492,494,495,496,497,498,55,501,502,503,504,505,506,507,508,509,510,512,513,514,516,517,519,520,521,522,523,524,525,526,528,529,539,532,533,260,535,536,537,540,295,544,546,547,548,549,552,555,557,558,408,560,562,564,565,567,568,569,570,571,93,574,575,225,577,578,23,580,582,583,584,585,586,587,589],from_list:499,mouse_pop:[294,149],pathiter:262,threshold:[434,442,527,492,287,32,544,402],corner:[257,442,75,312,5,181,266,149,190,238,88,19,91,566,122,581,247,416,248,550,68,293,385,434,294,340],get_navig:5,get_image_magnif:297,set_fil:[248,287],dick:[294,458],enough:[566,433,353,248,498,235,277,340,312,205,287],triinterpol:96,uint16:[41,532,163],parametr:447,rigidli:103,dict:[34,128,74,140,480,442,268,38,395,492,36,5,314,218,382,146,412,256,267,83,114,524,153,248,566,456,234,235,277,481,243,238,579,405,355,356,53,357,391,535,92,281,465,242,122,19,541,550,415,500,246,63,149,450,527,85,249,66,292,581,294,474,485,557,297,349,33,438,215,507,501],helix:497,cidmot:347,zmargin:349,startswith:[314,456,465,522],geq:354,nearli:[566,492,499],variou:[303,440,257,149,312,380,348,5,349,268,524,272,85,455,235,566,464,379,83,248,397,398,167,294,363,214],get:[74,38,312,262,5,383,266,83,527,492,243,357,497,120,92,541,362,287,545,149,248,579,294,297,103],interp_lin:575,mung:492,repr:[257,314,38],secondari:[5,525],repl:287,make_compound_path:262,"_what":214,utf:[165,197,455,491,543,170,438,412,317],geo:[235,525],"37c959":[217,510],tocher:96,median:[403,257,442,498,159,294,584,585,235,5],yield:[83,294,38,168,370,340,312,315,5,214,162],summari:[418,492],wiki:[340,332,271,544,574,525,109,177,302,457,402,16,43,23],autocorrel:[294,5,497],scatter_demo2:[216,200],set_clip_rectangl:[297,83],assumpt:[294,5,349,235,262],seat:439,tick_left:[320,383],sean:83,testcas:465,calendar:[294,168],get_slant:287,"02_s1":471,wonder:[294,5,550,277],"__array_wrap__":314,date2:[83,231,191,111,112,389],enumer:[491,409,380,347,263,42,267,83,151,388,557,498,62,450,82,289,249,472,250,474,340,300,33,177],backend_qtagg:324,label:[138,441,444,141,542,447,36,314,5,316,584,149,150,320,50,485,392,471,462,329,22,161,470,24,25,165,166,29,30,168,510,341,4,481,344,177,346,497,489,383,498,12,226,14,357,196,198,56,58,360,63,203,64,85,284,366,70,508,214,217,74,514,220,525,80,81,83,387,388,527,528,539,87,389,195,88,390,260,391,92,537,241,242,545,248,325,250,398,399,99,424,400,254,384,491,409,405,266,270,436,273,274,276,421,280,422,19,184,120,493,427,282,121,123,428,505,540,222,128,521,158,289,578,199,292,294,297,586,587,583],xtext:[348,221],behind:[328,144,10,360,257,107,583,149,294,584,277,224,96,5,112,450,266],figuremanag:[235,83],pyrol:177,bboxtransformfrom:[434,83],matplotlibdeprecationwarn:[235,38],across:[584,83,294,465,527,526,498,297,177,287,497,96,5],campaign:257,character_cod:402,parent:[38,312,380,383,266,83,76,576,198,324,92,121,21,294,149,450,65,334,504,498,338,434,341,507],tup:[5,42,393,83],random_arrai:83,the_tabl:260,griddata_demo:200,"0x34d2398":[294,5,492],gregorian:[83,168],flist:465,tue:382,set_antialias:[243,297,248,277],contol:[294,5,248,339],freqeuent:492,resizeev:[297,347],tskip:465,improp:402,among:[439,450,398,121],fontnam:[26,357,149,268,83,294,153,445,95,312,5,51,248],undocu:235,fooconvert:24,colspan:[294,431,433,578,120],unittest:235,funcright:92,jeremi:[21,334,286,83,439],background1:239,cancel:[294,492,149],ultim:[324,5,357,76],literalinclud:214,multi_imag:[216,200],marc:235,viewlim_to_dt:168,offic:492,mark:[450,349,197,243,294,168,383,545,498,389,352,238,179,5,77,85],orthograph:440,curvatur:[96,248],nsavefig:465,squash:[442,235,497],bmp:[312,579],gs01:431,"_draw_steps_post":248,quad2cub:492,set_colorbar:362,those:[303,439,74,257,442,107,38,312,5,348,144,347,412,228,83,10,229,117,492,277,96,354,497,499,57,58,581,287,22,349,450,122,291,166,294,434,297,401,340,477,137,214],linear_spin:545,sound:110,kappa:[354,62],tostr:[492,38],cursiv:[357,149,268,294,368,543,287,411,402,5,248],tex_demo:[216,200],invok:[357,144,566,348,179,83],truetypefont:312,viewlimit:450,invoc:[235,83],margin:[349,83,184,166,257,294,497,22,402,5,547],isinteract:[294,379,497],to_polygon:262,key_release_mask:[390,507],destin:[402,465,573,38,248],strain:353,endswith:33,gcfbase:83,nreheat:217,zonal:205,axhlin:[501,497,391,257,93,223,31,492,340,294,396,222,5,521,249,495],par:450,lavc:[229,566,531],same:[442,312,5,7,161,149,10,320,153,547,323,96,328,22,450,25,485,340,341,174,38,484,168,348,349,489,190,492,192,354,357,497,499,57,117,64,205,66,208,61,373,144,220,83,526,527,243,238,539,87,566,392,573,95,581,433,544,247,248,249,549,434,401,402,262,411,116,297,419,92,276,277,570,423,19,121,287,577,289,579,432,543,294,584,136,301,583],scrolledwindow:[179,390,125],poly_between:492,pad:[150,481,326,446,128,5,146,383,266,83,391,453,46,535,13,564,190,50,234,492,323,355,557,497,184,239,120,566,121,123,505,247,149,161,203,248,249,292,523,166,294,99,70,434,297,553],pai:379,samp:384,pan:[566,340,357,349,257,442,402,337,544,525,275,297,235,347,348,5,527,383],kutta:492,ifram:[257,214],curvefilledab:248,oid:[491,248],scaledtransl:[434,340],hyam:[257,235],capabl:[303,432,543,144,83,353,439,168,328,330],jeffrei:439,improv:[402,439,349,83,573,239,464,434,133,499,122,160,235,392,96,149,161,225,243],leg_patch_:491,clip_gc:83,ft_face_flag_kern:549,get_scal:[348,383],update_from_path:434,markup:[229,257,491,214,354],get_ticklabel_ext:383,leftharpoonup:354,iiint:354,multicolumn:530,roughli:[294,5,439],pep7:103,execut:[566,580,349,144,229,465,133,149,257,297,543,294,5,214,248,317],get_xgridlin:[5,316,489],acceler:[413,23],left_margin:166,n_group:428,aspect:[403,525,506,5,182,149,13,78,452,234,492,243,238,37,357,391,121,247,83,248,471,294,474,366,424,434,298,213,587,438,215],monei:548,restore_background_shift:239,transform_non_affin:[434,544,357,83,525],isrgb:297,mxnx4:[294,5,149],param:[433,149,166,92,457,70,248,284,257,234,235,294,497,341,402,492,85,317],style_ps2:179,framebord:[257,214],style_ps1:179,raw_input:[500,90,171],missingv:38,vpacker:[581,150],ncong:354,moz:491,mtran:83,get_trifind:[96,182],loc1:[77,450,65],slantfont:395,searchsort:[34,0,31,159,83],temperatur:[63,497,450,387],grid:[83,166,294,120,418,492,497,243,5,383],mon:[382,168],mom:[421,333,58,420,2,379],mod:349,add_with_viewport:125,unit_poly_vert:177,"\u03bc_i":317,fontstyl:[357,83,268,294,149,5,248],stineman:492,blitqt:[271,16,302],nose:[257,235,352],uchicago:21,anti:[357,144,353,83,248,330],lines3d_demo:[200,538],thermodynam:217,hsv_min_val:[161,499],xymax:[203,273],mathtext_pars:380,plot_templ:214,sym2:312,sym1:312,dynamic_demo:83,centerlin:50,im1:[174,373,476,242,300,577,450,73],flush_ev:297,colorspac:499,setcolorspec:[324,16,302],recomput:[434,5,110,235,525],usemathtext:[527,225],getchildren:491,dynamic_image_gtkagg:200,asymp:354,bessel:[294,5],knife:566,pointbrows:54,matplotlibinterpret:580,broken:[439,19,83,114,566,465,235,215],on_click:[374,92,86,528,4,384],finlai:580,symx:312,"_bracket":248,single_shot:297,font_properti:[294,5,357,149,248],minimumsizehint:324,numdec:527,ametsoc:466,draw_quad_mesh:[297,83],schoolbook:[402,543],set_children:434,eval:179,activest:[580,38],symlog:[349,83,257,149,294,357,235,486,5],mari:548,xlator:38,strip:[179,456,465,121],to_mask:[312,346],get_solid_joinstyl:248,set_fontvari:248,spline:[385,440,581,262,243,248],set_minor_formatt:[527,231,383,544,329],handlertupl:122,complianc:235,rowkei:492,unapp:248,brute:[223,108],overwrit:235,"festk\u00f6rperphysik":165,sinclair:508,rmdir:465,rot_x:349,tickhelp:[527,168],add_toolbar:[335,380],gluespec:312,cbar_mod:[391,481,94,505,450,553],saturdai:168,gtk3cairo:[257,402,144],radio_button:[143,200],extendrect:[257,149,83,294,121],ax_upd:240,possibl:[144,405,442,107,38,348,100,557,177,312,448,5,179,224,181,525,317,228,83,268,10,420,440,297,117,118,527,235,96,492,357,328,566,499,57,95,541,262,287,149,450,248,349,398,294,434,31,401,340,103,214],linespac:[357,83,268,294,149,5,248],unusu:[294,149],hpack:312,format_d:[566,55],embed:[144,395,153,317,83,562,76,351,235,324,330,390,427,58,286,287,125,126,430,549,543,337,402,214],utiltii:579,transscal:[77,340],pyexceler:83,upperbound:[5,349],dist_point_to_seg:[492,42],mathtextbackendsvg:312,deep:[497,297,439,287],twoheadrightarrow:354,deem:224,file:[38,395,312,83,153,85,492,497,493,199,57,95,541,362,287,149,248,579,21,28,168,294,297,103,214],proport:[149,294,160,492,450,539,173],newfangl:92,figurecanvasclass:297,film:497,gist_gray_r:438,get_colour:518,d5de9c:195,field:[290,402,440,497,360,257,442,96,282,435,127,50,492,294,22,222,5,382,444,541,312],prism:[294,403,497],cleanup:[579,531,235,352,262],architectur:[303,439,83],gettabl:248,equal_aspect_ratio:200,calligraphi:354,condens:[217,149,556,294,38,395,357,287,402,5,248],sequenc:[205,74,38,262,5,6,383,266,83,11,46,527,117,455,420,191,492,277,568,243,238,317,357,497,536,499,121,58,95,543,362,545,149,450,550,248,24,349,579,294,168,434,297,340],phvr8a:312,vertex:[512,385,68,293,91,257,589,177,262,243,42,248],stackplot_demo2:[216,200],contourf3d:[349,204,117],suplorparam:120,atandard:492,versionad:[214,204],leebyron:[294,5],slidertexthandl:341,"01_s1":471,"01_s4":471,homog:91,gtrapprox:354,descript:[144,149,448,347,348,5,266,349,117,190,235,423,357,497,566,465,121,57,22,545,83,450,248,550,385,294,337,340,214,553,287],gs00:431,escap:[543,241,277,354,317],rect_scatt:273,unset:349,startind:[294,5,248,277],represent:[144,434,257,499,57,462,353,527,492,224],forget:[95,103,525],dollar:[548,348,312,222,248,354,277],"2_installing_git":313,tahoma:[284,522],set_label1:383,children:[434,498,248,150],ft_attach_fil:83,"_make_kei":83,rewrot:[439,83],blacktriangl:354,motion_notifi:182,strptime:38,rec2csv:492,ylabel:[444,344,345,221,142,41,410,486,5,181,419,79,381,81,8,523,45,321,501,236,568,192,437,532,260,497,536,279,282,242,428,383,141,202,544,149,318,26,165,294,336,30,229,170,209,136,301,213,61],test_simple_fail:352,cachenam:235,rdpu:[403,497],r12:485,r13:492,r10:485,r11:485,fals:[0,307,443,444,445,310,311,3,4,5,316,146,450,317,149,453,319,76,13,456,16,457,324,156,326,471,465,158,159,160,22,469,161,517,25,473,334,474,337,168,490,341,171,33,478,173,312,480,481,38,483,346,315,179,182,349,48,190,50,351,492,352,27,355,37,357,196,54,55,499,56,500,60,362,61,62,63,502,203,205,525,68,71,507,225,371,201,513,373,442,150,581,378,379,577,77,382,383,226,82,83,524,85,527,234,235,236,243,238,23,485,532,88,390,239,535,92,240,573,242,96,433,302,246,545,546,248,249,391,398,491,251,434,101,401,103,553,254,556,257,347,348,110,409,405,262,111,264,413,266,367,268,417,402,297,117,452,566,277,421,569,422,19,424,120,282,121,283,505,429,94,126,222,128,288,289,579,290,580,292,393,294,131,65,298,300,136,301,438,541],get_ylim3d:349,mpl_tookit:[450,492],varoquaux:235,test_proj_draw_ax:349,util:[581,257,561,38,294,235,287,402,450,7,44,579],get_lw:248,fall:[349,294,499,235,5,423],pre:[5,83,248],axis_api:402,stderr:[179,402],"20to":492,fallback_to_cm:[402,354],oneat:38,draw_ellips:[128,450],tick_valu:[257,137,527],hatch_demo:200,lambert:[487,149],get_somenam:248,strung:312,zero:[144,257,395,312,262,5,146,450,266,83,129,11,229,46,426,565,527,235,463,392,243,492,532,357,462,91,240,499,160,429,22,545,149,161,64,65,25,291,349,68,293,385,294,69,346,510,583],titles:[294,5,402,349],overlin:[312,354],further:[566,581,492,248,312],inv_tr:[100,401,567],text3d:[349,310],excit:577,abc:[492,354,62],pluss:[294,5],get_alt_transform:448,diag:485,zback:349,compund:187,abl:[498,83,257,335,133,199,339,353,566,235,312,243,7],onselect:[34,92,507,500],bracketa:248,bracketb:248,"public":[353,57,466,121,576,95,566,297,70,262,402,383],movement:[337,367,235,347,42,589],"3c0130":466,mycallback:382,get_patch_transform:[545,248],sophist:[431,450,440,168,323],geqslant:354,ggg:354,free:[439,144,566,38,121,541,57,348,224,248],pygobject:[235,351,144,125],npreview:249,xycoord:[355,356,292,256,535,294,474,581,234,238,5,550,438,248],valu:[442,443,544,545,312,448,314,5,6,146,317,149,11,153,547,455,96,17,460,328,466,431,160,22,469,450,24,168,340,341,32,477,258,174,38,177,485,348,181,349,190,492,352,354,566,357,497,498,499,500,103,361,362,144,64,85,209,214,370,372,74,514,383,83,386,229,525,527,235,243,238,539,389,260,391,92,95,541,543,105,246,247,248,548,550,99,491,434,401,402,403,257,106,395,100,405,262,266,416,268,584,117,565,420,277,423,571,120,574,121,122,287,222,521,289,579,580,291,510,581,294,133,297,301,137,583],search:[0,1,2,3,4,6,8,9,11,76,13,15,16,17,18,19,20,24,25,26,27,169,29,30,31,32,33,34,35,36,37,39,41,42,43,44,45,46,48,49,50,51,342,53,54,56,58,60,61,62,63,64,65,66,67,68,69,70,71,72,73,75,77,321,79,80,81,203,502,84,520,86,87,88,89,90,91,573,94,97,99,100,101,104,106,108,109,110,111,112,113,114,115,116,119,123,124,125,126,127,128,129,130,131,132,133,134,136,137,138,139,140,141,142,145,146,147,148,363,150,151,152,154,155,156,157,158,159,160,161,162,163,164,165,167,485,170,171,172,173,174,175,176,177,178,179,181,182,183,185,187,188,189,191,192,193,194,427,196,197,198,201,202,82,204,205,206,208,209,210,211,212,213,215,217,218,220,221,222,223,226,229,231,232,233,234,236,238,239,240,241,242,244,245,246,247,249,250,251,252,253,254,255,256,258,105,261,263,264,265,267,270,271,272,273,274,275,276,278,279,280,281,282,283,284,286,287,288,289,290,291,292,293,296,563,298,300,301,302,304,305,306,307,308,309,310,311,314,315,316,318,319,320,78,322,323,324,325,327,329,424,331,332,333,334,335,336,338,339,341,52,343,344,345,346,351,352,12,14,355,356,358,360,361,365,366,367,368,369,370,371,372,373,374,375,377,378,380,381,382,384,386,387,388,389,390,391,392,393,394,259,396,397,398,399,400,403,405,406,409,410,411,413,414,415,416,417,419,420,421,422,184,425,426,195,428,429,430,435,436,437,438,441,444,445,542,447,449,451,452,453,454,455,456,457,458,459,460,462,463,465,466,467,469,470,471,472,473,474,475,476,477,478,479,480,481,482,483,484,486,487,488,489,490,491,494,495,496,498,55,500,501,503,504,505,506,507,508,509,510,512,513,514,516,517,518,519,521,522,523,524,525,526,528,529,539,531,532,260,535,536,537,540,295,544,546,547,548,549,552,555,556,557,558,408,560,562,564,565,567,568,569,570,571,93,574,575,225,577,578,23,580,582,583,584,585,586,587,589],probid:248,indetermin:352,dropshadowfilt:161,setstatusbar:449,ft_face_flag_glyph_nam:549,codebas:144,l1norm:492,narrow:[294,402,235,312,354],wavread:110,add_contour_set:349,primit:[385,198,99,297,348,330],transit:[83,491,499,485,144],wire3d_demo:[200,538],ystart:240,establish:173,deg2rad:544,advantag:[144,294,353,287,218,323,5,450],distinct:357,liber:[580,522],mylin:586,ctrl:[324,402,297,76,337],tackl:439,two:[357,149,83,294,499,121,248,243,492,362,57,497,262,96,5,168,312],mathtextbackendcairo:312,leadsto:354,"_contain":248,is_fil:448,ylower:[257,492],get_linestyl:[243,297,248],set_markeredgewidth:[348,248],get_label:[383,348,388,63,586,450,122,87,248],diamond:[83,257,294,448,5,248,354],desir:[144,257,177,5,349,320,566,492,277,539,92,55,402,362,83,64,248,579,434,168,294,584,508,137],boxpolygon:584,norm_angl:349,frame_tim:23,ital:[566,357,149,268,556,294,221,412,368,236,411,402,5,549,248,354,287],settopwindow:[334,449,380],particular:[579,144,74,83,229,525,257,492,294,497,224,5,521,423,64,85,354,312],neurosci:[294,5],upsilon:[354,62],town:257,dictat:[557,38],none:[0,140,305,138,326,310,545,446,312,448,314,5,450,147,149,441,153,15,322,16,96,156,567,460,21,160,22,161,378,24,332,166,334,335,168,339,167,340,341,171,33,507,175,481,38,42,338,347,179,182,349,187,576,190,50,492,352,12,355,357,497,54,55,499,58,402,362,501,385,65,504,449,212,214,217,74,150,581,75,76,380,77,525,383,83,527,388,86,235,243,23,485,532,239,535,92,240,510,573,242,482,95,324,302,544,247,248,249,391,99,491,346,434,401,103,553,257,476,259,348,100,405,262,266,268,115,270,117,420,585,277,463,421,120,574,121,283,286,429,287,289,578,579,290,580,433,393,294,297,566,438,589,541],jdh:[257,224,286,83,465],hour:[191,168],derivs6:492,der:235,"_interpolation_step":[525,262],det:354,dev:[303,464,228,38],color_demo:200,remain:[349,83,434,385,257,583,499,38,117,294,340,544,96,5,337,248,220],paragraph:[107,235],del:[348,156,581],mplconfigdir:[133,235,464],dec:442,def:[0,2,139,305,525,310,3,4,314,315,316,146,450,9,453,69,151,152,76,13,470,322,16,548,154,324,156,157,567,460,462,465,466,159,160,221,469,161,162,24,472,26,332,169,335,474,338,339,475,476,31,341,32,171,507,34,577,36,480,481,38,42,485,405,347,179,334,182,43,183,48,49,50,492,352,12,234,574,54,498,55,500,360,201,62,63,82,65,66,67,68,504,366,505,70,71,449,210,214,370,513,373,74,374,150,377,75,378,430,518,380,519,77,382,79,226,83,386,523,388,86,528,236,87,88,390,239,92,240,241,573,94,482,393,245,544,247,365,248,249,250,283,399,99,110,346,400,401,103,177,403,384,556,109,100,558,408,112,263,413,367,415,391,417,271,116,436,566,277,463,537,421,280,569,422,426,427,122,123,286,429,242,126,222,128,288,289,578,23,290,580,433,293,581,294,134,297,585,300,586,438,589,302],usingtex:402,explod:[294,440,424,388,5,161,587],traceback:[580,7,235],zaxis_invert:349,contour3d_demo2:200,contour3d_demo3:200,share:[149,92,38,243,294,497,287,96,5,312],set_autoscalex_on:5,errorbar_demo:200,sphere:525,builddep:[303,7],set_rot:[470,348,401,222,248,24],explor:287,sharp:[257,444,282,354],add_math_background:316,frame_format:[402,579],whichev:499,analag:[294,5],rym:159,prod_:[145,62],csd:[83,257,419,294,492,497,5],comfort:294,dydx:413,csc:354,larsen:[294,5],kwdocd:214,stix:[402,440,312,354],lbwh_to_bbox:83,bboxbas:[581,294,122,434,5,266],csv:[483,382,502,566,55,435,159,360,492,311,469,235,264,422,44,254],css:[491,557,287],either:[439,144,257,442,343,395,243,491,177,312,348,5,7,383,317,83,117,275,527,492,277,352,96,451,423,566,465,581,122,95,402,362,61,149,450,64,248,470,579,349,541,294,168,434,297,401,340,136,103,301,287],regener:[240,228,499],lightslategrai:348,freefont:522,refine_field:[290,160,96,283],ff0000:393,rruleloc:[389,168],start_group:312,hardcopi:[566,144,257,353,297,402,412],is_miss:38,safezip:38,mislead:357,firefox3:388,impetu:439,cs4:181,alph:485,cs3:181,cs2:181,hlist_out:312,rotat:[304,217,405,375,326,22,220,75,310,177,448,5,83,523,231,584,492,243,569,389,444,357,184,391,566,281,282,360,501,246,222,149,517,248,165,434,476,485,294,297,587],rand:[255,104,144,140,305,480,442,344,259,484,405,347,348,5,78,521,451,500,148,83,129,115,425,157,546,48,526,566,15,475,278,323,243,156,494,458,389,9,370,460,19,210,54,426,198,574,242,400,244,250,201,586,379,149,288,162,97,66,472,470,531,248,294,569,132,251,339,367,72,297,340,32,211,577,509,215,386],set_label:[471,149,547,294,326,539,121,248,503,50,383,94,5,6,289,172],ffdead:393,radar:[195,177],setmenubar:380,through:[303,74,257,107,38,312,5,348,144,383,149,153,205,544,492,243,357,497,54,566,464,466,402,22,450,248,294,337,297,103,214],padx:346,locatorhm:405,suffer:[349,439,328,330],get_zmajorticklabel:349,arial:[402,235],idlelock:38,itervalu:63,set_axes_loc:[5,443,234,13],extra_anim:579,pysid:[402,235],pct:[294,5],blues_r:547,defaultfmt:168,pca:492,pcg:96,get_dash_capstyl:248,good:[403,144,257,442,19,313,181,412,522,83,10,566,354,423,357,353,464,199,57,95,103,287,62,205,433,70,340,402],pollut:177,pyqt4v2:257,rank:[498,492],compound:[530,262,187,91],detach:[63,257],scatter3d:[349,235],get_vari:[248,287],ludwig:257,btran:262,masked_great:[223,108],gist_rainbow:[403,497],easili:[450,83,294,466,258,434,50,235,144,96,5,530,423,85,330],token:[179,214],new_tim:[297,152],demo_locatable_axes_easi:13,clamp:[194,312],harm:497,interleav:354,unequ:[294,5,542],hard:[228,349,144,257,57,584,13,328,287],functop:92,idea:[460,257,439,57,566,341,577,181,522,423],drawid:152,connect:[450,217,533,22,38,75,483,348,110,177,577,179,5,77,382,112,83,562,76,507,248,526,566,86,351,324,238,297,390,92,240,573,121,421,286,242,125,126,545,149,288,65,250,67,581,294,582,544,475,31,341,42,510,371],fist:521,drawin:248,energi:[96,22],thing:[303,525,439,144,442,491,312,405,348,5,7,83,10,153,85,492,277,354,423,19,462,493,286,468,450,550,248,580,433,434,294,297,401,103,214],orient:[174,217,144,257,481,220,75,177,405,5,383,149,561,273,248,455,235,277,392,243,539,197,353,94,58,286,121,22,450,203,64,85,330,250,294,297,508,510,173],overrrid:297,get_ylim:[349,67,480,273,5,205],get_zticklin:349,rec2csv_bad_shap:235,setsiz:[334,335,338,339,286,341,380,449],processplott:171,perri:439,verbatim:[380,354],asarrai:[88,567,575,492,314,100,401,42,61,518,136,222,301,161,589,423],byitem:38,foreground:[179,297,53,248,481],dvipng:[402,543,277,317],assist:144,offsetx:161,"\u044f":317,mmm:263,companion:85,offseti:161,numcol:[390,386,190,492,277,5],omit:[11,294,248,527,6,214,205],perman:[402,566,349,500],copper:[403,1,497,294,258,201],dayloc:[191,231,168],oserror:[229,235,83],stretch_ord:312,transform_point:[434,239],displaystyl:[318,543,170,438,310],is_first_col:5,set_tick_out:[326,401],get_markeredgecolor:248,smaller:[373,149,268,398,477,92,434,499,153,424,294,542,287,262,402,5,137,527,312],done:[439,144,257,107,312,348,5,6,525,112,228,83,11,229,576,527,492,237,243,88,357,328,566,466,499,57,95,160,493,362,450,248,580,432,433,360,294,168,297,171,103,214,583],par2:[63,387],par1:[63,387],set_pane_po:349,mistakenli:57,metic:541,reinier:[257,439,440],figzoom:288,burlywood:[294,542,499],"5th":[106,527,492,389,168],smoother:[248,347],datalimit:340,least:[580,433,144,334,335,338,339,235,492,7,423],global_match:179,player:50,paint:[439,83,271,339,21,348],family2:287,statement:[402,214,235],colnam:382,fifobuff:492,onremov:297,ydescent:[366,150],pari:402,"_filter":161,drain:439,pars:[83,294,465,153,491,541,456,235,287,380,5,312],bartosz:99,binom:[312,354],update_tick:121,contrari:[294,5],texttran:586,"18e":492,gotten:297,horizont:[34,174,150,304,442,443,149,484,312,380,5,83,114,440,273,455,190,234,235,392,243,238,539,549,458,566,357,497,92,121,122,508,492,22,128,450,203,289,248,268,250,365,541,294,329,434,584,340,341,402,507,215,173],close_ev:[294,297],stylenam:[474,267],wxcursor_demo:[31,534,200],leftout:[264,492],"58b1fa":217,kerning_unfit:363,cimrman:171,depth2:155,get_tick_posit:349,parmar:38,srcform:579,get_iter_at_lin:179,align_cent:341,mountain:497,zaxi:[37,349],conectiva:389,built:[228,214,83,541,294,499,492,179,357,235,497,96,103,362,530,7],window_focu:402,click:[303,483,491,42,36,347,408,5,7,228,382,149,566,86,421,299,88,390,54,92,573,57,243,124,242,577,288,472,432,294,133,337,339,340,341,423],build:[566,228,83,91,294,498,76,168,517,103,233,492,42,312,352,324,5,214,51],kendal:[294,5],medianx:584,distribut:[144,107,259,153,542,312,7,265,228,229,76,455,492,352,324,358,566,464,330,580,584,209,32,103,552],y_po:[458,485],listedcolormap:[497,83,294,258,499,5,539],previou:[566,580,228,214,144,239,54,83,257,282,294,297,349,235,5,7,64,374],chart:[260,385,555,294,458,498,424,388,428,177,497,348,5,530,587],mediani:584,most:[303,403,439,144,257,442,107,38,491,312,313,347,348,5,112,7,44,228,83,153,190,527,492,243,354,423,402,19,328,566,464,499,95,360,543,287,222,149,450,85,330,349,581,294,133,168,435,297,401,340,497,103,214,583],labelonlybas:527,charl:[439,440],bbox_prop:581,ret_unit:314,rec_drop_field:492,figurecanvasagg:[331,333,76,576,21,529,324,470],set_dashpad:248,azimuth:[349,357,499],weigh:[294,5],xstart:[240,110],baseclass:499,sector:494,persp_transform:349,curveto:385,carefulli:[379,352],get_stretched_imag:429,finv:354,tripcolor_demo:[216,200],particularli:[303,512,149,257,58,294,566,340,83,422],reus:[340,297,107,235,339],bnext:374,density_i:[294,5],rrulewrapp:[389,168],connectionstyl:[355,356,53,292,535,257,474,581,294,5,214,248],transdata:[304,150,175,223,100,405,348,5,77,383,83,453,525,567,243,156,119,569,356,239,503,581,429,128,450,205,476,208,434,401,340],"_drawn_artist":169,pnpoli:566,fontconfig:[402,287,354],"_ind":[42,589],"_parse_composit":541,simple_linear_interpol:[100,492,38],"_matlab_help":83,unus:[95,492,235],ccode:[363,51],zaxis_d:349,express:[118,312,352,224,530,214,423],evt_text_ent:341,sparsiti:[294,5,497,232],output_dtype_nam:159,get_autoscalex_on:5,gladehandl:507,clabeltext:[294,5],itslef:[294,5],new_file_nam:57,from_bound:[434,33,83,39],multiplex:179,numstep:[527,383],set_zlim:[37,349,220,84,204,371],streamplotset:[294,5],stem_plot:[216,200],todat:[456,38],vinc:248,printout:86,nonposx:[357,349,83,294,571,5],qpoint:324,lion:[439,235],reserv:[566,149,294,95,402,103,224,383],"085e18":471,table_demo:[216,200],nonposi:[357,349,83,294,571,5],setmathfont:317,expert:[21,566,297,330],misalign:566,someth:[304,312,347,7,228,83,525,353,50,492,243,533,566,493,573,57,242,248,434,401,402,214],addsepar:76,test_imread_pil_uint16:235,smallest:[294,5,527,464],columnspac:[83,294,149,402,5,266],cutout:295,experi:[144,353,160,177,243,340],altern:[303,439,144,326,107,149,312,5,181,7,317,349,561,235,352,96,492,14,557,566,499,287,83,248,543,294,29,416,584,173],popup:[294,297],verticalalign:[256,480,442,444,445,517,177,5,411,412,349,114,50,238,357,498,282,225,501,149,248,268,550,294,208,368,341],appreci:349,complement:[257,294,440,149,354],ipython:[303,439,214,144,294,442,107,235,348,83,530,7,85,423],iki:95,unit_regular_star:[295,262],purpl:[355,403,497,343,499,110,238],rectprop:[34,92,248,507],popul:[442,492,287],varsigma:354,get_fontconfig_pattern:287,arrowprop:[355,356,53,292,83,114,535,294,474,412,581,550,277,238,5,248,256],text_labels_and_annot:[200,465],alon:[294,326,224,434,262,5,465],get_patch_vert:349,fileext:287,set_path:243,float_:[492,90],latitud:[544,525,401,340,61,136,301],simpli:[74,257,326,557,347,348,5,181,7,83,440,470,527,492,352,422,357,566,499,57,122,61,22,247,149,248,19,579,432,294,136,301,214,438],add_observ:83,point:[545,312,448,5,6,148,149,11,319,153,547,96,156,160,161,470,472,27,334,168,31,52,175,343,38,484,42,182,492,193,355,356,357,497,197,54,498,499,57,361,362,61,8,205,367,214,371,512,150,223,383,522,228,83,523,525,527,243,238,87,88,390,557,90,535,92,240,573,242,345,394,246,247,248,110,294,103,177,555,533,582,108,100,262,266,500,239,463,569,19,493,121,283,288,289,290,292,130,434,132,258,435,583,297,136,301,137,438,589],instanti:[83,353,499,121,58,21,160,297,340,22,96,385,348,510],missingd:492,rad:[355,356,292,535,474,581,314,248,413],andal:402,is_numlik:[314,74,38,24],downval:222,ioerror:580,windowssystem32:303,zeta:[354,62],throughout:[257,439,268],backend:[5,297,83,248],axscatt:[450,203,273],poly_editor:559,is_transform_set:[235,248],bgcolor:346,empty_lik:161,axes_grid1:[174,471,453,391,481,387,505,94,564,123,101,468,13,300,234,128,77,203,146,65],lon_cycl:[100,401,12,567],call_axes_loc:5,convert_zunit:349,radii:[290,182,27,294,251,283,357,61,136,96,301,316,494,371],ngener:217,"_aspect":[247,5],exercis:[103,106,542,492],shadow_etched_in:390,svg_line:83,unnecessarili:235,gap:[566,217,149,130,257,55,345,294,22,349,422,114],my_proj_nam:357,understand:[144,581,353,153,379,401,340,347,103,492,7,423],host_suplot:450,repetit:[497,491,499],rai:497,blacksquar:354,solid:[312,5,6,349,11,117,498,277,392,243,566,195,121,22,545,149,64,248,294,70,297,402],bill:[114,548,470],xextent:[294,5],unifi:83,nprec:354,fun:[421,116,221],mbox:438,head_len:169,manner:[96,301,328,61,136],propag:[229,289,235],datafil:[483,382,502,360,442,55,435,159,41,311,445,546,469,264,422],donothing_callback:492,centr:235,currentvers:287,transform_path_non_affin:[434,357,525],blocking_input:235,itself:[144,107,38,100,312,348,5,266,385,76,525,567,324,357,92,121,122,581,247,25,166,294,491,334,297,401,214],cento:235,centuri:[294,5,402,543],routin:[357,166,434,492,312,248],rightarrow:354,myloc:222,gtkagg:[34,303,104,144,377,408,179,43,228,83,417,562,48,353,235,421,88,390,239,92,574,393,126,379,330,580,332,399,171,402],vbr:235,lbl:289,bluered3:583,bluered2:583,bluered1:583,interp_demo:[216,200],thetaformatt:357,redraw_in_fram:5,sym:[294,584,585,235,312,5],moment:83,cstride:[37,349,322,306,307,220,84,117,71,394,298,176,189,204],tstate:430,image_interp:200,travers:[294,5,312],task:[297,214,357],entri:[303,257,109,5,382,43,266,149,271,153,16,243,23,390,499,122,402,362,302,22,248,579,332,294,103,214,583],convert_to_valu:83,parenthes:[235,354],get_markerfacecoloralt:248,finalize_offset:266,swiss:566,spend:[348,566],fallingdotseq:354,explan:[349,257,574,117,294,5,588],animate_decay_tk_blit:200,izip:83,pylab:[0,1,2,3,4,5,6,7,8,9,11,12,13,15,16,17,18,19,20,24,25,26,27,169,29,30,31,32,33,34,35,36,37,39,40,41,42,43,44,45,46,48,49,50,51,342,53,54,56,58,60,61,62,63,64,65,66,67,68,69,70,71,72,73,75,76,77,321,79,80,81,203,83,84,85,86,87,88,89,90,91,92,573,94,97,99,100,101,103,104,106,108,109,110,111,112,113,114,115,116,119,123,124,125,126,127,128,129,130,131,132,258,134,136,137,138,139,140,141,142,145,146,147,148,149,150,151,152,154,155,156,157,158,159,160,161,162,163,164,165,167,485,170,171,172,173,174,175,176,177,178,179,181,182,183,185,187,188,189,191,192,193,194,195,196,197,198,201,202,82,204,205,206,208,209,210,211,212,213,215,217,218,220,221,222,223,226,229,231,232,233,234,236,238,239,240,241,242,244,245,246,247,249,250,251,252,253,254,255,256,105,261,263,264,267,270,271,272,273,274,275,276,278,279,280,281,282,283,284,286,288,289,290,291,292,293,294,296,563,298,300,301,302,304,305,306,307,308,309,310,311,314,315,316,318,319,320,78,322,323,324,325,327,329,424,331,332,333,334,335,336,338,339,341,52,343,344,345,346,351,14,355,356,358,360,361,363,365,366,367,368,369,370,371,372,373,374,375,377,378,380,381,382,384,386,387,388,389,390,391,392,393,394,259,396,397,398,399,400,403,405,406,409,410,411,413,414,415,416,417,419,420,421,422,184,425,426,427,428,429,430,435,436,437,438,441,444,445,542,447,449,451,452,453,454,455,456,457,458,459,460,462,463,465,466,467,469,470,471,472,473,474,475,476,477,478,479,480,481,482,483,484,486,487,488,489,490,491,492,494,495,496,497,498,55,500,501,502,503,504,505,506,507,508,509,510,512,513,514,516,517,518,519,520,521,522,523,524,525,526,528,529,539,531,532,260,535,536,537,540,295,544,546,547,548,549,552,555,556,557,558,408,560,562,564,565,566,567,568,569,570,571,93,574,575,225,577,578,23,580,582,583,584,585,586,587,589],obscur:[566,320,354],cursor_demo:200,shape:[373,564,248,257,307,344,243,41,357,177,485,448,577,348,5,181,525,146,450,83,386,45,46,561,321,565,473,235,529,492,330,532,89,196,91,92,240,465,499,331,242,160,429,544,469,161,65,163,291,365,434,581,294,346,73,334,484,210,96,215],maxt:[574,370],dash_styl:375,detrend_mean:[294,5,492],cut:[19,429,312],cur:557,"_round_to":525,cup:354,rgx:393,restructuredtext:235,pncb8a:312,arrow_arg:356,rgb:[403,331,1,149,83,294,499,339,393,297,362,518,529,5,161,429,146],tri_up:[294,5,248,448],realloc:473,snap:[357,149,257,262,297,545,294,31,235,22,402,5,248],set_contain:248,easter:[389,168],approxim:[403,440,294,22,452,401,492,262,96,5,248],test_backend_pgf:235,bin:[138,440,139,140,304,308,141,142,542,5,145,8,151,320,76,507,455,548,154,323,324,157,17,327,462,465,568,331,20,467,309,469,450,470,163,25,164,26,332,333,167,335,336,178,339,475,476,31,170,191,172,173,34,345,41,484,485,486,179,334,181,43,183,489,49,50,351,492,192,51,195,497,197,358,58,360,501,202,62,385,82,64,205,206,365,68,208,368,209,212,509,213,373,514,221,517,518,223,79,521,203,83,523,229,231,86,529,531,389,532,88,390,89,239,91,392,241,242,97,549,250,552,104,257,258,406,348,491,410,558,411,408,111,112,113,414,129,560,417,116,562,273,419,275,276,277,278,537,280,570,426,427,286,225,125,126,430,577,445,289,580,543,130,293,294,132,133,436,583],oslash:354,quadric:[294,5],big:[19,294,566,235,312,379,5,354],get_linewidth:[243,297,83,248],mpl_exampl:[214,235],mattern:257,bia:83,pylab_exampl:[294,200,214,492,527],"3kpc":471,image_clip_path:200,maxc:518,bit:[303,217,100,312,405,347,5,317,349,235,392,96,492,163,532,423,19,464,248,579,294,401,340,214],lessgtr:354,allign:235,semi:[328,357,149,294,527,340,287,402,5,248],gtkinterpreterconsol:179,get_supported_filetypes_group:297,often:[525,291,357,149,581,257,464,107,55,38,433,566,401,340,423,497,348,83,7,492,330],u00b0:[544,543,170,525],wip:235,back:[144,442,38,347,348,5,349,584,235,243,423,357,92,493,499,379,248,206,294,335,337,339,297,340,402,583],get_fonts:248,mirror:[510,83],matshow:[216,5,200,497,294],server:[334,286],onmove_callback:92,"_xaxis_text1_transform":525,monoxid:177,all_ax:402,scale:[83,294,499,153,121,149,243,297,492,362,168,497,22,96,5,527,248,265,312],mousemot:341,set_graylevel:297,per:[566,349,149,579,492,294,347,258,524,117,275,297,301,235,312,262,402,5,423,413,254],cast:10,substitut:[172,38],mathemat:[303,144,423,118,312,530,214,330],larg:[439,257,221,243,491,177,411,5,7,412,83,268,229,566,50,492,323,96,354,357,391,91,353,573,499,58,402,362,287,149,64,248,543,434,385,294,29,368,14,103,214],ticklabel_format:[349,83,257,294,235,497,5],reproduc:[224,235,497,464],get_capheight:541,intial:83,fltkagg:[303,439,144,482,393,402,330],patient:354,axmask:349,yannick:[257,289,235],from:[38,312,262,5,576,383,266,83,153,85,527,492,96,357,497,120,92,499,199,121,95,243,362,287,22,545,149,248,579,21,166,294,168,297,103,214,541],linscal:[294,5,349,499,357],impos:96,whats_new:[103,235],xcorr_demo:[216,200],gmt_doc:1,constraint:341,preclud:349,figureclass:[294,2],goodi:543,bakan:235,tick_update_posit:349,predat:385,sulfat:177,gouraud:[294,297,301,243,5,17],daishi:439,tiff:[144,21,297,235,330,579],nse:[365,560,113],keystrok:420,frog:[491,587,184,424,388],framer:579,updat:[357,83,120,92,243,121,149,294,297,492,383,57,497,262,103,5,287,214,248,266],nsubseteq:354,get_xmajorticklabel:5,drawon:92,inclus:[353,499,76,402,177,324,235,248],dpi_chang:149,fill_demo:200,draw_poly_patch:177,bodi:[294,5],subsi:[294,5,357,349],ipath:525,annotation_demo3:200,annotation_demo2:200,includ:[303,403,439,74,257,107,224,38,492,312,5,348,144,347,412,317,228,83,229,440,153,248,527,235,352,243,156,27,17,423,357,120,566,464,499,57,122,95,402,286,543,121,149,450,550,85,330,21,433,434,579,166,294,168,334,297,401,103,214,541,287],forward:[580,149,581,38,168,337,402,297,57,348],dolphin_patch2:259,lielen:[257,439,440],ulcorn:354,subsx:[294,5,357,349],preferspeedovermemori:492,scale_factor:96,reorgan:[103,257,228,214,235],ascend:[0,549],gauss:161,get_aspect:[5,190],serif:[318,357,149,268,294,99,485,284,368,543,287,411,402,5,317,312,248,354,81],get_uselocal:527,hsv_to_rgb:499,ns0:491,"32cjc6v0ozi":[257,214],frame1:341,arrow_simple_demo:200,sdk:[7,235],concaten:[258,525,295,484,177,277,263,289,327],jonathan:235,vmin:[481,149,5,117,383,414,83,188,527,235,539,193,357,90,92,499,362,544,349,450,64,547,250,294,168,400,434,300,477,173],symlog_demo:[216,200],pie_demo2:[216,200],adequ:257,unit_circl:[295,262],curv:[257,442,105,447,262,5,525,226,385,440,205,235,243,492,497,197,92,158,22,450,289,248,330,434,258,294,297,401],set_wrap_mod:179,"_timer_set_interv":297,constant:[349,326,168,492,361,340,287,83,382,549],mouseup:341,xticklin:489,min_radiu:[290,283,61,136,301,182,371],transi:83,journal:[96,466,492,340,566],nbin:[433,83,257,294,527,234,5,137,181],scatter_mask:[216,200],set_lineoffset:243,fontmap:312,set_cent:248,startdat:222,sequenti:[403,497],tofloat:38,llcorner:354,imshow_rgb:[450,146],b10:[294,402,149],old_siz:271,tempdir:235,labelbottom:[294,5],asymmetr:361,defaultcolor:83,lena:235,contourf_log:200,set_ticklabel_direct:[326,401],xmlresourc:334,trans1:77,trans2:77,z_min:477,linerc:393,sftp:228,tradeoff:402,drawing_area:581,evt_tim:[286,3],doublebarwedg:354,ellipse_compar:452,jason:235,queri:[294,144,83,248,420],default_bbox_extra_artist:235,ellips:[439,150,516,262,78,83,115,525,452,243,238,530,355,566,581,128,450,248,99,366,506,490,214],classic:[402,393,83,97,126],dashlen:375,rates_to_bas:485,eggert:[257,235],privat:[107,349],midsid:96,sensit:[297,144],elsewher:[402,83],box_color:429,points_in_path:262,becam:190,motion_notify_callback:[42,589],surface3d_radial_demo:[200,538],themeriv:[294,5],fatal:430,get_window_ext:[83,566,240,429,149,581,235,33,243,5,438,248,266],clip_end:83,random:[305,442,5,451,148,9,69,319,76,321,455,15,457,324,156,460,160,218,162,472,494,339,475,340,32,171,172,34,480,344,39,347,348,454,45,46,48,498,50,492,192,193,342,196,197,54,198,500,201,203,205,470,66,365,68,366,367,72,209,210,211,508,370,144,458,385,386,232,526,529,389,390,90,91,566,241,242,243,396,546,248,325,250,251,400,402,255,104,259,491,405,239,115,273,419,277,278,569,19,425,426,574,122,429,577,288,578,129,293,294,215,584,585,586],simple_anim_gtk:[285,200],mlab:[418,5,83,38],sage:[257,439,107],mous:[34,42,408,5,182,383,266,349,31,288,421,88,357,92,573,242,243,245,149,450,248,432,294,297,589],volum:[566,294,442,440,435,159,360,222,469,254],lnapprox:354,implicitli:[294,144,510,83,38],font_properties_demo:83,math_parse_s_ft2font_svg:83,tran:[83,434,248,95,297,340,262,223,492,77,310,205],knight:485,choppi:362,geograph:[357,525],formatmillion:[382,492],get_stretch:[248,287],setwindowtitl:76,stddev:[229,472,340,347],leg_text_:491,arang:[482,0,139,9,138,307,444,316,141,142,3,36,5,6,145,450,451,452,8,11,320,76,321,154,392,324,327,543,462,18,160,309,161,25,26,332,547,167,29,336,178,339,476,31,170,341,32,191,33,173,34,355,35,4,37,480,344,38,41,42,486,348,334,181,183,488,489,566,45,46,536,50,351,492,335,192,340,354,342,194,53,195,498,55,58,60,361,201,202,62,203,64,66,206,365,503,504,208,506,71,507,413,211,212,213,214,73,501,372,513,373,144,374,458,377,221,378,380,519,223,381,79,80,555,82,83,523,229,86,528,236,238,532,89,442,239,535,92,537,93,345,234,433,302,544,248,548,550,397,398,399,564,101,449,409,384,106,406,108,109,110,260,261,263,264,113,414,416,560,115,271,272,562,563,273,419,274,275,276,277,568,280,14,422,571,417,427,282,283,584,428,286,124,429,125,126,430,445,23,290,291,369,130,294,132,295,296,420,436,298,567,438,583,495],use_ax:[123,190],"_pylab_help":83,vboxmain:507,crop:544,subsuperclust:312,cron:511,do_kern:312,result_imag:352,print_stdout:[216,200],dropshadow:[87,388],append:[403,138,140,9,343,38,314,100,177,518,380,347,179,315,316,44,498,27,190,49,50,492,352,280,348,494,569,532,566,390,260,497,198,465,171,574,250,62,469,289,205,24,531,510,66,99,133,491,346,134,584,401,211,103,214,370],pycairo:144,chicago:402,resembl:497,han:[294,5,161,492],gist_yarg:[403,497],access:[257,262,347,348,224,383,83,85,527,351,492,421,423,92,493,581,125,450,248,549,331,434,299,402,586],"1fm":[222,548,157],clipboard:235,fontconfigpatternpars:287,ginput_demo:200,floating_ax:405,loglog:[294,5,571,497,440],norm_text_angl:349,conf:[439,214,235],"50th":492,movie_demo:[285,200],closur:75,extremefindercycl:[100,401,12,567],stretch_factor:429,xnew:547,avconv_path:[402,579],anchoredtext:[128,450,581,150,481],vertic:[512,304,439,448,260,442,443,347,508,259,39,492,177,312,380,262,5,263,525,266,83,268,434,589,187,117,455,190,234,235,582,243,238,494,566,357,497,197,92,184,121,449,286,501,22,247,149,517,289,248,549,349,365,68,293,385,294,335,498,295,338,339,334,297,341,32,402,42,215,541],bode:492,sinc:[303,403,439,257,38,312,262,348,5,112,44,228,83,114,320,456,525,566,191,492,277,352,243,543,354,423,357,92,493,499,360,468,362,287,544,379,450,527,248,580,510,294,168,434,31,340,341,214],talent:257,sqcap:354,levypdf:492,make_rgb_ax:146,resurrect:83,r8226:[450,468],line3dcollect:[349,117],axisbg:[34,528,89,8,384,83,294,195,149,142,368,104,309,411,222,5,445,145],implement:[439,74,38,378,492,312,262,5,266,83,153,525,235,352,323,96,156,168,357,91,566,581,21,243,287,126,430,349,248,580,541,294,504,346,434,297,401,402],honor:[5,349],configur:[83,294,153,297,103,527,85],namen:492,"_sre":168,colors1:455,foundat:10,gatewai:566,divmod:[33,51],crimson:542,toggle_imag:[216,200],colortupl:307,tailor:237,ztick:349,chg:222,chi:[354,62],dashpad:248,websit:[228,144,566,235,103,214],chr:51,charcoal:402,celsiu:67,trait:[348,393,439,214,83],numrow:[390,386,442,190,492,277,5,532],ff5555:217,iid:584,subplotpar:[566,5,120,149,190],"transient":560,name2:541,name0:492,name1:[541,492],amundson:439,hilbol:235,account:[83,294,57,149,492,262,96,5,214,383],tkagg:[303,402,228,574,139,293,393,257,427,439,109,408,235,430,379,144],scalabl:[543,144,353,21,297,287,402,549,330],alia:[83,248,294,499,199,38,492,287,262,243,5,85,354,312],get_theta_direct:357,callbacksm:362,set_patch_lin:545,obvious:401,mathtextbackendpdf:312,fetch:[533,478,57],aliv:38,autowidthchar:312,sdist:228,xmin:[34,373,480,312,262,315,77,349,134,525,492,277,243,5,495,201,247,83,547,549,434,294,172,507],return_fold:38,anchoredauxtransformbox:581,serial:[149,352],get_tight_layout_figur:166,gca:[512,304,231,144,441,88,307,309,444,220,149,39,41,357,556,485,486,348,182,450,83,185,64,116,84,520,420,235,277,392,27,517,37,460,241,497,466,211,282,122,160,408,225,61,544,128,445,283,204,489,290,206,325,433,294,336,258,212,338,150,447,136,103,301,254],get_subplot_param:120,gcc:[464,107,235],gcd:354,nipi:[440,57],filepath:312,gci:[294,497],line4:50,line3:[169,5,50,149,294],line2:[34,149,294,420,92,378,169,50,277,36,243,5,80],line1:[149,420,92,378,169,294,277,36,243,5,80],line0:243,slanted_font:395,get_drawstyl:248,get_data_path:[363,51,549],yzero:131,stock:[469,440,329],path_intersects_path:262,gentoo:543,rec_groupby_demo:[200,407],add_axi:83,nequiv:354,inst:50,physik:492,redund:497,philosophi:[257,353],append_ax:[190,450,203,433],physic:[550,328,434,465,22,492,340,312,238,5,248,413],bind:[580,83,257,427,589,430,297,42,3,380,126,402,449,553,341],sit:214,pinnau:235,correspond:[38,149,446,312,36,262,348,5,383,317,8,491,492,96,539,266,354,357,497,498,499,57,122,243,362,287,22,545,83,248,579,581,294,208,434],get_path:[349,242,589,545,243,448,247,83,248],convert_mesh_to_triangl:243,linen:243,set_ma:248,fallback:[297,287,312],mainfram:334,scatter_symbol:[216,200],six:[235,287],bymonthdai:[111,168,329],robitail:235,report:[386,566,465,38,40,456,449,527,157],cflag:7,productcod:492,toolbox:[45,492,321],bunch:[83,68,293,91,294,442,465,38,492,385],set_size_inch:[149,83,485],std_men:428,youtub:[257,214],datemin:360,subplot_tool:[294,509,19,497],nonfunct:235,tstart:[332,139,239,109,271,417,377,482,134,322,16,302,43,97,23],print_rgb:235,dag:354,greater:[83,434,385,92,499,168,294,527,22,5,539,248,423],bolder:402,xgridlin:489,line_lstrip:465,get_pad:[161,383,326],dat:[445,367,492,103,469,532],mention:[348,543,235],overkil:38,pango:179,targetfig:[92,294],gamari:235,recarrai:[442,435,159,360,492,264],num2dat:[83,294,168,360,191,5,112],upharpoonleft:354,fetch_historical_yahoo:222,februari:168,scrollbar:125,cdict4:583,webagg:[402,235,470],disregard:235,myfigur:2,downharpoonleft:354,x_isdata:[257,434,83],fig_2:280,fig_3:280,num_fixed_s:549,fig_1:280,fig_6:280,fig_7:280,fig_4:280,fig_5:280,intellig:[257,527,168],fig_8:280,fig_9:280,slider_demo:[143,200],mathtext_asarrai:186,wade:303,rightleftharpoon:354,evt_slid:341,miktex:[543,235,153,317],matt:235,outlier:[294,5,484,83,19],hammertransform:525,ret:[103,179,465,235,314],gohlk:[257,235],rel:[144,443,38,446,557,177,485,348,5,266,149,268,190,235,96,492,326,566,357,498,499,431,287,222,349,248,25,294,208,168,434,340,402,214],bbox_patch1:77,rec:[382,264,492,44],bbox_patch2:77,ref:[7,1,492,214],reg:85,red:[34,403,104,144,140,441,175,108,223,537,518,36,347,179,5,181,412,384,149,114,555,490,151,584,420,528,492,277,155,156,348,495,497,92,499,93,242,122,160,245,222,349,521,248,268,540,169,258,476,294,507,402,586,583,173],ulpath:289,clarifi:235,bwr:[403,497],frang:[225,521,492],insid:[357,149,434,477,294,262,498,263,576,21,160,492,312,22,96,5,137,248,470,266],get_xminorticklabel:5,text_param:485,f6f6f6:222,eqslantgtr:354,setstatustext:449,standalon:[464,539,171],bewar:402,zapf:[402,543],set_somestr:58,releas:[418,83,28,107,92,297,294,5,265],apt:[303,7,352,313],dmax:[527,532,168],bleed:228,ymax:[349,83,294,442,480,93,525,434,373,357,201,262,243,5,172,549,312,547,277],date_support:465,set_clim:[294,362,250,235,423],bussonni:235,reset_posit:5,navigation_toolbar:[504,214],n_row:260,onoffseq:[243,6,11],plotter_pip:171,retain:[83,257,107,294,224,5,347],south:499,simple_anchored_artist:135,pgf:[21,297,235,317],handier:38,suffix:[498,214,287],third:[291,357,83,257,395,583,462,294,362,277,224,5,539,510,289,205],overshoot:248,uplu:354,spy_demo:[216,200],r2postfix:492,bracketab:248,suffic:[303,231,57,401],mencoder_path:[402,579],swept:[294,5,248],ps2ep:402,compliant:[257,439,412],messag:[402,228,566,29,57,339,360,297,235,236,352,493,324,112,510,14],fahrenheit:67,get_current_fig_manag:[331,83,417,294,109,134,421],outdir:233,triplot:[290,83,294,575,283,160,235,497,136,5,182],get_ind_under_point:[42,589],menmean:[161,436,178,568],mpath:[175,99,582,295,263,589],watermark_text:186,scikit:[110,90],artist_api:[402,99],pg7:532,data2ax:83,pg5:532,pg3:532,get_transformed_points_and_affin:434,get_clip_path:[297,83,248],set_font_properti:248,ratcliff:257,vlist_out:312,pg9:532,"2_y":62,rotate_ax:349,slack:518,xmargin:[294,5,349,149,402],yend:240,structur:[303,83,353,38,492,348],charact:[549,357,83,294,38,153,95,541,297,492,235,312,347,402,5,543,214,51,570,354,317],num:[95,549,349,83,9,294,442,38,491,576,21,190,297,492,5,78,367,371,66],vbar:[294,5],resturctur:214,basepath:312,ntri:[96,160],darkorchid4:179,have:[403,85,373,577,313,248,107,243,545,100,19,177,312,36,262,5,181,525,383,570,500,228,83,416,10,293,229,434,116,153,188,420,233,234,492,567,352,323,96,579,422,341,533,357,405,91,92,493,499,57,329,469,362,242,22,63,149,527,205,318,580,68,207,166,476,335,398,258,544,339,294,297,170,299,171,103,311,214,583,287],mathfont_stix_14_test:235,tidi:235,paramiko:228,glossary_r:222,get_position_runtim:190,mio:492,min:[34,74,442,547,100,485,314,5,181,83,11,578,426,188,498,527,278,481,349,17,354,532,91,92,240,499,283,160,433,362,544,149,450,289,172,290,250,68,293,360,294,416,258,168,434,341,300,477,137],mpl_connnect:297,mid:[291,294,274,5,248,354],rdylbu:[403,497],mix:[144,256,560,257,71,235,340,161,248],builtin:[83,38],get_vector:349,kaplan:257,nse1:[192,419],mit:107,clippath_tran:83,writelin:465,set_ticks:[326,401],awar:[303,74,168,277,379,312],curve4:[385,99,582,259,262,289,589],barcode_demo:200,pathclippedimagepatch:438,curve3:[175,385,289,262],get_axis_bgcolor:5,eight:[153,248],sfd:363,dashdirect:[375,248],ef0000:421,homogen:[330,499,38,248],request:[5,83,312,576],rotation_mod:[357,149,391,294,5,248],spines_axes_posit:352,databas:[353,168,330],occasion:[7,85],hardcor:299,axvspan:[497,257,442,294,340,5,495],thicken:392,backsimeq:354,leftarrowtail:354,compile_command:580,urllib:[235,44],empir:[442,485],dateconvert:[74,168],visibl:[4,443,100,557,42,36,577,348,5,450,83,268,453,524,13,65,235,277,323,326,354,357,54,92,22,545,149,161,203,248,25,398,294,491,475,401,589],area1:132,area2:132,setter:[257,420,277,348,214,248],n_level:270,animation_demo:200,pos_2:92,epilog:465,pos_1:92,eventpress:573,oppressor:544,addpag:338,precsim:354,nopen:217,get_transform:[357,83,438,326,589,383,243,42,448,544,348,235,161,87,248],lower_bound:442,set_markerfacecoloralt:248,regularli:[575,91],multiple_yaxis_with_spin:[216,200],increas:[373,257,326,446,518,5,83,229,205,190,235,277,352,243,492,539,357,497,426,240,499,122,450,248,579,433,434,294,72,401,477,402,137,583],photographi:423,dirti:[229,214],dashpush:[375,248],organ:83,max_advance_height:549,approach:[557,144,434,466,117,566,287,262,83,422,354],get_fillstyl:[248,448],integr:[83,294,297,492,96,5],ttfpath:83,get_end_it:179,shapiro:217,get_plot_command:294,apolog:83,subplot_list:166,backend_gtk:[399,562,390,83,126],athlon:492,twosid:[294,5,492],pattern:[144,490,294,38,121,232,402,243,497,287,262,103,5,248],boundari:[291,581,149,83,476,442,561,132,499,121,545,257,294,539,243,5,181,248,312],picklabl:235,"0x134cca84":348,distractor:50,use_gridspec:[294,433,149],set_zsort:349,progress:[303,403,543,497,566,493,297,492],print_jpg:297,time_text:413,lorenz_attractor:[200,538],patholog:492,agg_filt:[357,149,294,22,545,5,248],harcopi:257,get_projection_nam:357,"2pi":357,outer:[294,122,431,306,492,5,450,264,248],mrecord:492,"1000th":153,wiggl:[294,5,69],proj_point:349,plugin:352,funcwspac:92,mpg:[566,531],equal:[525,516,38,100,557,42,262,5,182,149,78,452,234,492,243,238,460,357,499,283,160,361,61,289,290,434,294,99,582,506,169,136,301,213,587],instanc:[74,257,442,443,262,198,527,545,314,446,312,448,5,179,144,112,576,347,383,266,326,83,268,560,420,431,120,320,191,117,536,190,86,235,236,469,243,586,348,522,389,14,277,566,357,497,91,92,240,499,121,58,95,360,550,433,362,287,22,412,149,450,122,248,544,66,579,21,349,398,166,294,29,208,168,434,297,401,340,341,402,581,137,553],equat:[349,444,282,525,277,380,96,412,330],highland:497,periodogram:[45,5,492,294,321],strftime:[439,566,55,168,222,422],comment:[214,83,23,294,335,271,416,492,109,332,16,302,380,235,402,218,7,43,205,173,579],guidelin:[235,144],set_charmap:363,angle3:[355,581,53,248],arguement:235,clickabl:248,test_str:249,flagcolor:[294,5,246],insepar:340,rectreeview:382,tickright:[393,248,448],gradat:423,anomali:[181,362],updatex:[434,5],darren:[439,257,464,440,76,235],axisnum:138,legend_demo2:[216,200],legend_demo4:[216,200],electr:290,calledprocesserror:229,switch_backend:[294,297,497,85,331],set_mask:[290,283,160,61,136,96,301,182,371],anglea:[355,581,292,248,535],angleb:[355,581,292,248,535],exp_saf:492,carvello:439,style_err:179,boundarynorm:[499,258,235,137,539,173],nonexclus:224,get_aux_ax:405,is_scalar_or_str:38,cot:354,determinist:466,multi:[566,580,369,92,537,158,95,257,235,492,122],refine_triangul:96,plain:[566,74,198,257,527,294,379,5,354],get_compressed_copi:314,majloc:[314,74,24],get_dashrot:248,splitx:434,rectangular:[566,349,83,523,294,443,320,12,273,149,190,100,277,5],defin:[555,243,100,557,177,448,262,179,5,525,450,266,83,85,527,492,548,96,14,567,88,357,462,184,90,92,242,283,21,393,544,545,149,288,64,248,470,349,294,29,133,491,70,434,297,401,577,42,137,214,583],vspace:433,quak:260,hkey_current_us:287,eintr:257,"__sub__":314,subplot3d_demo:[200,538],spliti:434,pixels_per_inch:[297,83],johnni:498,helper:[83,38,168,297,312,5,248,266],almost:[303,402,257,168,294,96,5],darkgoldenrod:222,contrain:38,datainterv:83,pathpatch_chang:589,substanti:439,caplin:[294,5,83],figureimag:[294,348,149,85,346],inspector:[214,248],shared_axis_across_figur:[216,200],bbox_to_anchor:[174,149,294,537,122,581,128,5,450,266],addition_rul:314,poll_draw:171,quadrupl:83,oint:[354,62],set3:[403,497],errorbar_demo_featur:200,fill:[512,22,38,105,517,545,542,177,312,262,223,5,181,83,229,289,584,205,452,492,243,327,88,497,92,427,121,108,95,393,362,246,430,149,161,64,248,432,349,294,490,297,253,173],infer:[214,83],engformatt:454,listdir:465,psnfss:543,cubic:[385,257,22,575,235,262,96,492,248],lleftarrow:354,column_nam:492,never:[294,499,297,312,22,402,5,450,583],canva:[139,305,312,36,315,576,149,152,76,324,156,21,473,450,472,331,332,333,167,335,337,338,339,475,334,341,171,507,3,34,482,42,347,348,182,43,48,50,351,574,54,498,500,379,67,504,210,369,370,513,144,377,378,380,83,86,235,529,390,239,92,240,242,95,581,245,248,346,294,384,109,110,408,266,415,417,271,562,584,566,5,569,427,286,125,126,430,128,288,23,293,434,134,297,589,302],set_:[257,5,235,294],center:[2,305,326,444,445,312,5,316,584,149,150,323,329,22,29,474,485,340,33,480,484,177,348,183,349,190,50,492,352,51,14,355,356,53,357,497,358,498,501,385,64,208,368,225,514,458,220,517,226,83,523,525,234,235,236,243,238,563,391,92,537,540,581,545,248,250,99,294,401,552,403,257,409,262,408,411,263,266,267,268,560,440,297,463,281,282,122,429,222,288,20,289,434,436,137],neural:[294,5,492],keyboardinterrupt:465,builder:228,versatil:277,thought:[229,83],fecomposit:388,setp:[116,556,257,443,308,221,142,41,542,177,83,489,524,231,13,420,50,277,154,392,389,88,53,444,497,498,282,58,362,309,445,203,64,248,25,206,26,130,398,294,584,585,341,214],setq:214,choos:[303,403,214,83,434,107,168,118,527,550,32,402,149,7,354,423],con:[581,144],usual:[303,403,257,577,348,5,181,7,317,228,349,153,492,352,96,522,121,21,243,57,379,385,248,581,294,208,297,402,214,287],test1:[247,492,122],summaryfunc:[159,492],test3:[247,492],lossi:330,test4:247,deltax:347,cbar_pad:[481,450,505,94,553],"s\u00e9lectionn\u00e9":165,settabl:[248,277],doall:[82,62],deltai:347,systemat:491,get_axisline_styl:326,wether:573,adv:549,shared_axis_demo:[216,294,200],plot_row:390,tight:[349,149,166,294,30,566,297,235,402,5,530,248,265,579],rgbface:[235,297,83],binomi:118,textbf:[318,543,170],kerning_default:363,add:[303,9,542,5,6,7,161,149,10,11,392,22,450,470,334,29,337,338,339,340,354,335,42,485,347,348,181,44,349,190,50,351,492,352,14,341,357,497,197,498,499,57,103,362,385,66,209,508,214,511,217,144,514,75,380,382,83,525,235,529,533,390,260,92,243,248,99,294,401,449,177,257,179,491,557,263,412,560,440,562,584,117,566,277,421,569,168,423,493,121,122,286,125,126,579,432,510,581,434,133,436],ada:[292,150,581,235,252,128,450,478],adj:294,ravel:[88,250,503,485,492,181,547,532],match:[38,100,312,179,5,7,383,266,349,320,578,527,236,352,402,357,566,240,499,121,122,393,287,83,450,248,433,294,168,476,401,103,508],gmt:1,delta1:435,royalti:224,set_hov:346,draw_poly_collect:83,onpick:[472,347,54,36,248],realiz:[380,334,335,338,339,286,32],cntr:53,heer:[257,439,440],insert:[421,166,434,335,449,345,388,339,190,491,557,42,312,262,179,348,214,87,518],like:[516,1,144,405,533,107,38,168,448,5,7,312,228,83,229,153,248,498,50,492,96,238,566,297,497,424,580,92,464,499,199,57,58,159,393,242,545,149,450,205,470,330,95,349,510,294,70,334,31,401,341,103,214,588,583,287],set_ov:[149,83,294,499,5,181,539,173],test_transform:235,interrupt:114,delaunai:[290,90,283,160,492,235,61,136,96,301,371],get_autoscale_on:[5,349],edit:[294,199,96,103,5,214],arr_lena:535,"_yaxis_text1_transform":525,tri_right:[294,5,248,448],stackplot_demo:[216,200],soft:402,render_glyph:312,svg_tooltip:[200,534],hail:[324,260,76],hair:566,set_siz:[83,481,424,368,287,438,248],convex:[243,492,385],proper:[471,439,332,149,23,91,169,312,457,482,229,109,177,492,16,294,22,5,527,43,302],kilobit:579,proxy_target:314,tmp:507,numobserv:492,setlayout:504,is_closed_polygon:492,demo_bboximag:200,trap:217,aliasnam:420,gen_randlin:367,mystyl:581,slight:[235,161,87],host:[440,387,352,237,63,450,214,85],simplex:235,"0xffff":[82,62],tail_width:[355,581,248],cmrmap:[403,497,371],get_raster:248,simpler:[235,580,499,38,248],actual:[144,257,326,348,484,312,179,5,83,229,153,420,492,566,92,240,465,573,199,57,287,544,64,248,579,294,258,434,297,401,214],dayformatt:231,spoke_label:177,glade:507,dialoglineprop:399,discard:[294,499,38,57,5,423],xwidth:[294,5,243],set_offset:[243,569,50,83],rad_fn:314,brokenhbarcollect:257,update_bruteforc:121,annotationbbox:[292,438,535],get_legend_handl:266,easy_instal:[303,7,235],dataset:[472,83,229,116,294,347,5],wdestructiveclos:324,set_transient_for:507,image_origin:200,leverag:257,embedding_in_qt4:200,pictur:[291,523,317],ft_face_flag_horizont:549,papertyp:[294,149],cid_up:408,bigcap:354,biggest:401,amplitudeslidergroup:341,log10:[357,349,294,416,402,5,172,454],glib:248,unexpect:83,keyerror:235,tmpfile_nam:465,tollerud:257,inlin:[459,525,462,185,294,520,392,103,5,161,214,317],buf:473,bug:[439,144,257,482,109,83,235,352,493,349,17,566,464,57,433,302,149,23,332,398,294,103],wise:[257,492,263,499],supper:372,wish:[294,5,566,352],flip:[294,5,86,235,202],get_yaxi:5,trapezoid:96,set_clos:248,pil:[566,331,92,439,257,233,235,294,529,5,423],pim:257,convert_unit:383,draw_if_interact:[103,144,83],dure:[434,581,294,379,527,235,341,247,5,214],"_tmp_":465,pie:[83,555,294,465,424,388,497,5,530,587,161],pop_stat:312,pip:[303,228,235,352],dawson:[257,235],log_bas:527,log_bar:[216,200],oplu:354,consum:[103,96,38,262],grid_spec:[294,235,149,121,166],oac:[229,566,531],collabel:[294,5,260,51],detail:[83,294,168,149,96,297,492,312,262,103,5,214,248,266],virtual:[153,312],lesseqgtr:354,xscale:[149,294,525,402,497,486,348,5],get_default_weight:287,goir:235,streamplot_demo_mask:572,py2ex:566,kluyver:235,astronomi:450,errorbar:[471,439,571,83,18,106,540,122,294,436,361,235,497,568,348,5,488],mpl_tootlkit:401,get_markerfacecolor:248,seismic:[403,497],colorbar_class:83,patch_2d_to_3d:349,accidenti:235,lolim:[294,5,488],ababab:8,nrow:[403,433,120,294,106,474,56,158,361,33,578,5,450,553],get_all_fig_manag:83,statusbar:[324,449,76],juggle_ax:349,ellipse4:248,init_mask_frac:160,cookbook:[580,460,271,38,109,16,302,347,402,161,583],mytransform:83,labelsep:[294,5,402,83,266],get_text:[29,444,282,491,242,50,177,179,248,14,266],view_init:[349,176],test_bbox_inches_tight:235,sleev:353,srcauth:566,sleep:[294,88,297,171],objectboundingbox:388,feoffset:388,blacktriangledown:354,sci:[294,5,6,250,497],longitude_cap:525,verdana:[284,402],concret:[96,83],under:[257,107,42,347,182,226,228,83,235,352,492,539,354,357,92,499,121,21,286,287,379,334,337,297,340,589,173],trisurf3d_demo2:[200,538],merchant:224,everi:[303,243,257,106,347,337,110,5,348,111,112,412,228,83,402,76,525,527,492,277,392,324,389,297,462,566,57,360,379,161,248,533,579,291,294,208,168,31,103,214,438],quantil:492,toolfig:92,vastli:38,draw_arc:83,new_vert:[190,203],stddeviat:[87,388],jack:235,upstream:[493,57,10],quantit:[294,5],backend_tkagg:[430,427],isdir:[233,465],school:[222,498],gcf:[164,83,194,294,535,485,122,235,277,497,408,429,6,182,341],ominu:354,fontweight:[357,149,268,294,485,412,50,340,5,248],x86_64:312,plot_angl:151,zlib:303,runcod:580,destapp:566,endposit:92,direct:[357,83,92,499,248,294,527,492,383,312,497,96,103,5,85],raise_if_exce:527,onpick3:242,reorder:349,issubclass:38,animation_blit_tk:200,"4x4":431,permett:165,blue:[403,140,480,442,348,557,518,36,179,5,384,114,555,151,440,566,528,277,155,156,195,236,89,497,91,92,392,499,160,201,22,222,521,290,294,258,346,490,584,340,495,402,583,173],hide:[228,557,196,524,319,56,58,431,584,19,235,323,450,226],simplify_threshold:402,introspect:[83,294,383,420,214,248],ff00ff:402,filled12:512,blur:[87,388],get_charmap:[83,363,51,549],symmetr:[357,83,257,499,294,527,361,5],scr:498,liberti:103,solid_capstyl:[294,5,402,248,277],zach:235,smooth2d:161,maskedarrai:296,studio:235,binding_id:86,calcuat:166,path:[83,418,38,149,95,297,383,287,448,243,5,579,248,312],nslow:222,"__version__numpy__":235,get_result:312,pathpatchgon:589,specialty_plot:200,forum:83,prognam:[324,76],anymor:[83,312,423],midwai:527,slidertext:341,nonguiexcept:297,clear_temp:[235,413,579],xybox:[292,535],xminorformatt:527,axes_pad:[433,481,94,564,505,300,450,553],portabl:[21,297,144,330],signifi:[492,277],straw:[257,334,439,440],rstride:[37,349,322,306,307,220,84,117,71,394,298,176,189,204],blackbodi:497,bashrc:133,hzfunc:528,"_shadow":[87,388],dolphin_patch:259,ymin:[373,480,442,312,262,5,226,349,525,277,243,495,571,93,201,247,83,547,549,294,434,172],random_integ:584,describ:[512,144,312,228,318,527,492,237,96,566,464,581,287,83,248,549,543,294,504,168,434,297,103,214],would:[144,220,75,379,557,223,5,181,466,228,83,229,525,275,277,323,96,354,566,357,328,353,464,465,499,57,38,61,544,108,149,470,432,349,130,385,294,587,136,301,214,588,583],plot_html_show_format:214,pixel_offset:239,turquois:294,spike:[294,5,416,188],beta_i:354,preview:249,get_width_char:[541,83],unicode_demo:[200,359,465],colorbarpatch:121,convert_to:314,"__author__":[580,491,289],qobject:[324,16,76,302],moin:389,must:[217,74,248,257,326,107,38,177,296,5,543,144,525,317,228,83,527,205,198,456,235,352,323,96,492,539,354,423,88,357,362,92,499,121,243,433,262,500,544,149,85,577,580,331,250,581,294,168,583,434,297,401,402,42,214,438,553,312],join:[297,580,151,465,38,229,233,235,354,179,492,51,248,44],backend_fallback:402,norm:[9,481,142,542,492,5,117,83,188,235,277,278,529,280,539,193,429,241,499,121,243,362,396,149,64,66,250,294,416,258,584,349,209,33,137,552,438,173],update_from:[83,589,42,243,161,87,248],"3adnf":466,overrid:[38,149,542,177,312,5,334,525,349,272,85,527,235,492,357,566,286,544,83,248,157,397,294,434,297,402,586,214],inkscap:[257,352,388],cong:354,remove_callback:[297,248],x_scale:485,animation_blit_gtk:200,extend_posit:243,enc:153,end:[144,257,442,38,149,446,262,179,5,349,470,190,527,235,352,96,492,539,423,566,499,500,95,62,379,83,82,248,330,385,294,586,583],straightforward:557,test_proj_make_m:349,enh:[235,57],heartsuit:354,jochen:439,basic_unit:[198,200,272,256,178],minorticks_off:[294,5,497],env:[138,139,140,304,308,309,142,542,145,8,151,320,76,455,548,154,323,324,157,17,327,462,465,26,20,467,141,469,470,163,25,164,331,332,333,334,335,336,178,339,475,167,31,170,191,173,34,345,41,485,486,179,181,43,183,489,49,50,351,192,51,195,197,58,360,501,202,62,82,64,205,206,365,208,368,507,212,509,213,373,221,517,518,223,79,521,83,523,231,86,529,531,389,532,88,390,89,239,537,392,242,97,549,250,104,476,406,491,410,558,411,408,111,112,113,414,560,417,116,562,419,275,276,568,570,426,427,286,225,125,126,430,577,445,289,580,543,130,132,258,436,583],numrect:91,ancestor:[434,214],conf_interv:[294,5,585],get_data_ratio_log:5,startposit:92,animation_blit_gtk2:200,mess:235,xdelta:240,hexagon1:[294,5,248,448],hexagon2:[294,5,248,448],closepoli:[385,68,293,91,175,582,99,187,581,262,589],geometri:[402,83,166,353,120,431,190,144,96,5,248,330],mesh:[290,439,497,160,257,561,243,294,96,5],circumscrib:[243,177],parallel:[497,294,542,235,352,262,5,248,354],legend_handler_map:[5,266],openclipart:259,amin:[250,83,116,142,373,42,6],incorrectli:235,barstack:[257,5,235,294],exclud:[190,271,160,297,181,214,465],patent:330,get_net:183,environ:[580,465,352,265],"_gen_axes_patch":[177,525],incorpor:[257,224,277,395],enter:[149,90,294,465,57,160,297,245,171,5],exclus:353,ycenter:452,composit:[149,434,444,282,38,297,340,450],num_var:177,agg_buffer_to_arrai:200,over:[439,243,257,442,443,347,108,142,348,296,405,262,223,5,182,412,584,83,229,153,470,353,235,323,96,492,539,354,423,566,88,557,497,92,392,499,121,122,159,421,362,242,450,248,579,294,337,346,524,297,340,583,173,245],updatestatusbar:449,orang:[255,403,497,75,546,348,385],becaus:[303,144,257,107,108,348,484,223,5,181,7,412,83,229,64,153,117,566,276,492,277,354,423,497,353,510,466,94,541,505,543,121,22,379,349,527,289,248,470,250,473,398,385,294,297,340,214,583],jpeg:[257,21,297,235,402,579,330],affinebas:434,boxtim:354,london:248,set_data_interv:[527,383],"_svg":352,toggle_hist:491,starpolygoncollect:243,zoom_window:559,axis_bgcolor:149,waltman:235,ima:[532,163],shadow2:438,shadow1:438,img:[214,423],font0:368,font1:[368,312],font2:312,stineman_interp:[492,147],cla:[566,357,349,54,294,525,545,235,277,497,103,5,531,383],imo:195,customize_rc:200,boxminu:354,urlretriev:44,fade:500,comprehens:237,hammerax:525,clr:498,descend:549,visualis:497,containsi:434,patch3dcollect:[349,117],containsx:434,nline:537,waitforbuttonpress:[294,88,297,149],fontx:312,choic:[303,83,294,107,199,402,497,224,96,5,7,578,354],alex:[439,38],tricontour_smooth_us:[216,200],mpl_color:[294,5],leftharpoondown:354,isvector:[235,492,83],im3:[450,300,242],im2:[373,476,242,300,577,450,73],im4:242,each:[443,542,312,5,451,149,69,153,455,456,96,460,464,465,158,159,22,469,450,330,166,337,168,481,38,347,348,349,49,492,27,354,61,357,197,198,499,500,361,57,379,385,64,68,208,524,214,287,512,144,388,228,83,229,525,243,539,92,242,581,433,248,398,434,401,402,553,257,491,262,263,266,584,117,566,277,423,19,122,505,94,579,431,543,293,294,498,297,136,301,583],lastind:54,prohibit:314,pdflatex:[257,317,82,235,62],update_download:228,patch_dict:177,line_select_callback:573,ribbonboximag:429,tip:[291,550,10,294,22,557,277,238,5,510,289,248,19],mainpanel:334,get_fontconfig_font:287,pubugn:[403,497],depress:297,pyfltk:[303,144,330],goe:[303,357,144,83,294,499,583,566,125,402,5,7,248],newli:[257,239],textstr:442,cmbright:317,got:[257,83,248,485],memorymonitor:38,set_height_ratio:120,fred:[470,548],basefilt:161,znew:547,autoreleasepool:235,freq:[374,560,294,168,492,5,384],puzzl:229,data_help:200,local:[294,153,57,287,103,5],blendedgenerictransform:434,toolbar2:[402,393,439],rais:[257,377,38,177,312,111,487,5,112,83,231,456,525,233,235,485,239,566,465,500,393,362,544,149,527,580,331,332,294,346,297,341,42],onto:[83,92,499,38,58,257,297,492,312,22,103,349,348,117,248],mathbb:[82,354],fantasi:[357,149,268,294,368,287,411,402,5,248],rang:[138,307,443,141,5,8,69,151,76,78,323,324,156,466,20,218,450,24,547,169,336,168,490,171,173,34,481,38,39,42,347,181,183,349,49,492,494,51,357,198,499,60,362,149,205,367,368,287,144,375,75,176,77,83,229,525,527,235,243,531,532,390,260,92,240,242,393,544,248,250,294,401,402,556,110,411,111,564,566,278,280,570,426,505,94,222,103,434,584,585,583],soest:1,mathbf:[82,354],backend_gtkcairo:[562,126],rec2excel:[311,492,83],puck:50,assingn:491,restrict:[566,144,229,107,76,434,324,17],alreadi:[303,144,257,38,395,312,5,7,83,248,566,497,352,493,328,498,464,57,122,581,286,362,63,149,85,294,337,168,434,297,340,510],subplotparam:[149,120],primari:[83,353,499,352,379,144],rowcolour:[294,5,260,51],tox:[28,103],rewritten:[257,450,83],top:[149,83,418,120,499,38,383,297,312,448,5,248],pkgconfig:7,tok:312,toi:[492,525],too:[88,149,434,541,92,525,392,486,248,257,50,235,294,340,179,238,348,214,85,354,341],tol:352,tom:[257,294,440,458],toc:214,get_famili:[248,287],consol:[179,303,86,566],ticklin:[489,480,401,348,450,383],tricolor:439,tool:[1,107,7,265,228,83,10,584,566,492,352,96,330,497,92,465,500,318,579,294,297,103,214],setuptool:[7,83],took:465,family_nam:549,dtype_nam:159,western:402,get_zbound:349,set_interpol:423,exceltool:[235,561,83,311],"0xb7d8fec":442,release_mous:297,load_convert:[216,200,492],expr:179,buffer_rgba:473,get_sibl:38,predefiend:297,transformnod:[434,235],expo:584,tranpar:[243,248],light_filter_pi:161,admonit:103,"_ribbonbox":429,rotate_btn:349,fashion:[348,83],tripcolor:[83,294,235,61,497,301,5,371],ran:516,new_frame_seq:[169,579],ram:492,"__radd__":314,raw:[103,317,543,579,472,294,46,76,21,41,297,235,277,448,347,324,5,348,214,354,312],invertedpolartransform:357,rightrightarrow:354,ldot:[354,62],rax:[528,384,4],get_ylabel:5,axesi:[443,234,446,13],get_zticklabel:[349,235],axesa:[581,248],axesb:[581,248],maxw:346,as_rgba_str:380,axesx:[190,443,234,446,13],maxh:346,maxi:525,ribbon:235,travi:[28,103],thoma:[257,439,235],thoroughli:433,juli:[492,168],maxd:242,plenti:[214,423],though:[328,83,294,107,566,312,156,402,5,214],glob:[233,465],gnapprox:354,deleg:[401,357,312,248,122],preset:[527,548],ra0:405,ra1:405,bsd:[21,28,492,541],set_stretch:[248,287],glow:161,mathtextbackendbitmap:312,bbbbbb:388,flow:[217,497,294,466,75,22,5,510],ylorrd_r:172,transax:[174,441,83,442,445,517,222,177,347,223,5,77,525,316,413,266,349,268,563,383,235,19,54,581,247,128,450,412,472,294,339,31,340,341,33],trianalyz:[257,160,96],suptitl:[149,442,294,106,343,583,71,235,245,347,497,79,412,24],axes1:[149,338],axes2:[149,338],get_useoffset:527,labelx:566,get_fontweight:248,labelr:51,labels:[294,195,70,402,5,316,383],oldfangl:92,density_x:[294,5],ontim:286,radio:[92,528,384],qstring:402,radic:[118,312],labelc:51,absolut:[365,294,443,527,168,431,434,446,492,235,287,485,5,289,248],funchspac:92,florent:[324,76],yearsfmt:[360,112],normalcolor:[324,16,302],caswel:235,label1:[149,294,329,348,5,383],label2:[294,5,348,149,383],label3:[294,5,149],watch:32,fluid:497,get_tight_layout:149,thisind:[566,55],conversion_fn:314,byteord:235,draw_line_collect:83,twice:[149,294,57,71,298,405,348,5],draw_ev:[332,239,294,152,482,574,566,297,42,347,43,589],oc1:177,oc3:177,oc2:177,get_legend_handles_label:[5,235,122],layer_imag:[216,200,323],dashrightarrow:354,line_2d_to_3d:349,get_unicode_index:312,hasn:[257,348],contains_branch_seper:434,wm_titl:[430,427],logloc:[462,527,416],corrupt:235,compute_initial_figur:[324,76],nse2:[192,419],chart_school:222,interactor:[42,589],hopefulli:[334,566,122],mcelrath:235,prgn:[403,497,64],mux:492,"_linestyl":0,prune:[222,527],button_press_mask:[390,507],mui:492,lightfilt:161,update_ax2:67,formatbool:492,misspel:492,metz:[257,462,555],weak:[38,347],backgroundcolor:[357,149,268,294,584,5,248],ybound:149,y_test:160,mu1:442,rightward:337,mu2:442,spanselector:[34,92,507],rfind:179,facet:[294,5,235],padded_src:161,get_paths_ext:262,reposit:121,sre_pattern:168,huard:[491,557,235],ribbonbox:429,kwd:[38,579],recliststor:382,get_dir_vector:349,panel:[138,349,334,240,133,338,340,380,246,7],lineto:[512,385,68,293,91,582,99,187,259,581,262,263,289,589],qt4_editor:235,nonsens:181,cohorts:498,infinit:[240,110],fontproperti:[291,250,149,268,294,79,312,368,297,357,287,411,222,5,522,51,248,266],barb_incr:[294,5,246],been:[439,257,544,379,312,36,348,5,7,317,228,83,456,525,566,50,492,243,119,543,353,464,499,57,122,545,468,362,22,63,149,450,85,580,349,294,434,297,401,340,214,583],accumul:[294,5,149],spread:484,mult:549,fraction_ref:446,quickli:[294,303,228,353,464],load_char:[363,83,549],py3:235,head_length:[479,294,485,581,5,248],pong_qt:559,xxx:205,rectlinear:401,objtyp:314,conta:235,update_datalim_bound:5,mcerlean:580,nonuniformli:492,counterclockwis:[294,5,357,248],weren:510,gumbel:584,get_fontstretch:248,brewer:497,boxtransmuterbas:248,gtrdot:354,keyval_from_nam:179,print_png:[297,470],cubictriinterpol:[257,290,575,96],mutation_scal:[247,5,294,248],utliz:239,scalebas:[357,544],figure_leave_ev:[294,297,245,347],sourcealpha:388,on_releas:347,suggest:[439,83,257,57,160,235,294,323,462,299],mayb:[402,341],get_two_stock_data:[469,410],complex:[566,357,328,169,240,58,321,294,492,236,22,5,7,188],complet:[74,40,312,262,179,5,83,527,492,96,566,465,499,95,243,248,579,580,541,434,168,297,103,214],rdbu:[403,497,547,477],longmapsto:354,whenver:297,plus_sign:457,set_window_titl:[498,297,584],invertedmercatorlatitudetransform:544,ocean:[403,5,497,205],dviread:83,diverg:[222,403,497,57],everyth:[303,214,83,352,239,566,442,465,482,587,379,297,19,144,347,348,5,539,7,583,266],setbackgroundcolour:[449,335,380,339],joon:[257,439,235],set_dpi:149,byweekno:168,savefig:[556,309,491,178,381,317,83,229,272,387,563,388,452,235,531,87,557,497,566,465,242,95,60,467,543,429,62,379,149,82,85,318,206,433,397,579,476,17,30,70,294,297,170,402],path_to_polygon:257,cape:257,get_height:[498,436,248,380],ell:[506,354,78],arctest:200,svg_element:83,logformat:235,els:[0,430,380,138,544,38,39,314,485,36,411,179,5,263,182,383,522,83,386,574,271,527,525,498,50,463,421,156,51,310,566,194,460,241,462,54,580,198,493,465,427,57,393,408,362,242,62,222,149,161,82,289,248,24,290,478,349,294,335,337,346,339,363,585,341,210,171,402,214,438,370,302],ffffff:393,expon:[527,492],gang:[439,527],systemexit:[580,331,332,239,465,231,377,456,233,111,112],"_cgaffinetransformident":235,ffd700:393,get_size_inch:[149,83],axis_off:149,init_func:[579,214,413,32,519],apart:312,ditto:[83,398,294,337,5,383],verts0:243,arbitrari:[38,348,312,179,5,412,266,440,566,492,277,96,236,533,357,462,92,545,243,246,379,577,450,24,550,581,434,337,168,294,297,585],yarik:588,ob_refcnt:235,zoom:[0,110,19,5,77,383,349,453,525,288,275,527,566,88,357,535,92,240,544,450,65,432,292,294,297],wxfigur:286,leftrightarrow:354,figurecanvaspdf:95,boushlei:235,bang_count:334,test_categori:352,circlepolygon:[214,248],get_yticklabel:[349,489,524,442,443,320,13,5,316,203],extendfrac:[149,257,121,294,83,539],radiobutton:[92,528,384],mishandl:235,puckdisp:50,indirect:95,successfulli:235,filteredartistlist:161,pincu:235,axesdividerguid:450,transform_affin:[434,357],markerfacecolor:[566,26,83,294,480,308,470,71,393,42,277,154,235,5,248,589],totalh:346,mpimg:[214,235,423],borderpad:[174,83,150,453,257,481,149,294,128,402,5,450,438,266],core:[349,257,199,525,566,313,103,328],khaki:584,tightbbox:5,on_key_press:504,whi:[294,5,584],lineartriinterpol:[257,96,575],hsv:[403,497,294,99,499,72],nimbu:[402,556],wirefram:[432,349],chapter:[214,83,354],mcol:103,contains_point:[156,92,500,262,5,248],meth:[149,527,93],py27:352,py26:352,key_press_ev:[430,54,92,504,347,573,297,577,475,294,50,42,126,179,235,569,589,507],surround:[523,294,29,14,177,277,442,5,354],unfortun:[566,7,328,122],sepp:60,produc:[75,312,5,412,83,153,492,243,235,354,497,214,464,499,402,248,330,543,294,508,510,370],unrespons:144,rectagl:[294,5],clickbbox:83,cbar_siz:[481,450,505,94,553],set_autoscalez_on:349,regist:[85,74,38,310,177,5,383,317,228,83,525,492,357,497,353,121,581,362,544,545,64,248,579,294,297,583],encod:[214,499,153,491,297,312,82],basecas:177,ppm:579,appropri:[566,214,144,294,401,168,431,498,100,357,312,262,103,5,7,422,19],createfontlist:287,"_hold":103,storag:[257,262],variant2:287,proj_trans_point:349,handlerlinecollect:122,pyc:464,frustrat:[566,83],gist_earth:[403,497],ngtr:354,gif:[235,330],reli:[96,439,214,83],gid:[357,149,294,22,297,171,545,5,248],qtcore:[504,271,76],get_edgecolor:[243,349,149,248],"_xaxis_text2_transform":525,buttonpress:507,medium:[357,149,489,294,508,221,368,584,177,287,411,402,5,248],altogeth:[566,352,525],epsilon:[83,347,242,589,42,62,248,354],pp1:175,hear:[566,153],gtk3agg:[402,235,144],round4:[355,581,248],moveto:[512,385,68,293,91,175,582,99,187,259,581,262,263,289,589],set_hover_prop:346,attr:[326,122,581,297,492,179,586,248],mtri:[575,371],donald:354,set_ybound:5,text_handl:[216,200],path_cod:259,fundament:579,patch_collection_2d_to_3d:349,set_ylim3d:[349,441,310,367,211,325],increamt:294,trim:[527,235],mollweid:[487,235,149],darkr:81,storer:257,arbitrarili:[542,354],indx:31,kaufman:235,backend_macosx:235,labix:492,poly_collection_2d_to_3d:349,perez:[580,439,149,10,257,442],caretleft:[248,448],check:[303,257,482,433,109,312,4,347,5,7,266,500,228,83,23,229,566,235,493,492,317,92,464,465,573,57,122,95,581,332,362,302,544,379,289,248,579,580,165,294,30,346,434,103],assembl:96,documentclass:[82,62],set_measur:83,get_legend:[5,50,444,282,537],byyeardai:168,papers:402,max_advance_width:549,tif:[21,297],register_cmap:[294,497,362,583],node:[290,96,434,312],print_raw:297,spine_placement_demo:[216,480,200],phoenix:440,circular_spin:[545,525],cnt:[332,293,239,109,271,417,482,134,50,16,302,315,43,23],tickloc:[74,532],consid:[303,439,144,257,443,107,179,5,317,149,480,492,277,266,354,497,493,122,550,248,433,166,434,294,297,401,340,103,583],sql:492,put_label:289,uniformli:[294,5,527,96],set_joinstyl:297,ydelta:240,faster:[439,83,434,50,92,464,91,38,257,31,492,235,294,347,243,5,17,532],nucleu:312,figsiz:[34,138,1,257,62,390,259,208,100,104,177,485,405,5,77,316,317,203,83,562,76,273,388,566,12,351,567,324,539,531,51,355,402,53,195,391,498,427,529,60,543,225,309,125,126,430,149,161,82,249,318,433,365,581,294,445,337,338,339,71,584,298,170,217,583,507,501],yaxis_text_bas:525,uplim:[294,5,488],add_patch:[305,175,259,39,42,348,5,77,182,263,226,83,268,187,388,452,355,460,557,517,91,198,240,247,385,310,289,68,293,474,366,582,490,584,340,212,589],all_cod:263,asymmetric_error:361,rob:485,focus:[348,439],snip:277,webkit:491,signific:[403,349,434,107,566,492,83],lll:354,get_dpi:149,compani:107,row:[138,257,481,443,38,348,5,83,386,190,524,578,117,49,492,243,51,390,260,120,566,499,94,431,505,22,349,450,248,166,294,337,583,434,210,214,553],llpath:289,readabl:[103,434,248],turbin:217,ultralight:[357,149,268,294,287,5,248],get_topmost_subplotspec:120,adjust_dir:[123,190],graphicscontextbas:297,invertedhammertransform:525,filetyp:[21,235,297,144],sourc:[357,83,243,92,96,262,499,395,149,21,294,492,22,103,5,214,248,265],earli:[442,439,107],gridhelpercurvelinear:[100,401,12,405,567],clip_to_bbox:262,triangul:[290,439,193,349,283,492,257,575,117,160,294,301,235,61,136,96,5,182,243,371],subplotdivid:[190,13],demodata:[483,382],feasibl:7,"7rc":235,add_idl:482,runsourc:[179,580],cyan:[497,140,294,499,581,5,181,451],axistextwx:83,cool:[403,512,250,497,294,19,539],fraktur:[82,354],tri_down:[294,5,248,448],level:[149,83,418,499,38,121,297,287,5,248,312],embedding_in_gtk3_panzoom:200,patheffect_demo:[216,200],mticker:[222,257],hawaii:1,rmedian:159,dep:[303,7],pkg_config_path:7,crosshair:31,quick:[229,257,580,402,493],erroreveri:[294,5,106],clear_part:395,slower:[372,543],"366rperphysik":412,trend:[294,5,492],current_prompt:179,useafm:402,uselocal:[294,5,527],rho_1:[316,62],magnif:257,asteriskpolygoncollect:243,patheffect:[481,53,161,248],port:[439,83,45,321,257,50,235,402],identitytransform:[357,83,434,581,243,438],spectral:[403,497,257,419,294,492,235,5,371,423],new_ax:92,lat_minmax:[100,401,12,567],holin:235,backepsilon:354,cyclic:[243,497,83,312],bboxpatch:77,set_slant:287,bboxtransformtomaxonli:434,autosub:[294,5,83],draw_point:83,colorbarbas:[294,149,539,83,121],create_mark:179,learn:[566,340,10,237],flip_barb:[294,5,246],x_2888:62,witch:248,compositeaffine2d:434,change_plot:380,toolbar:[442,380,5,83,527,351,235,421,92,427,393,286,126,430,23,398,334,335,337,338,339,449,297,402,507],onchangeplot:380,fakebootstrapp:585,pack_start:[390,83,337,190,351,126,421,507],wakeupidl:23,reimplement:257,overriden:[294,149],get_vis:[36,589,475,50,42,4,577,248],path_in_path:262,weird:[294,5],deg:[314,289,354,75,22],decript:248,key_ev:179,nmax:[492,38],semant:[214,83],succsim:354,dashdot:[11,294,545,297,22,243,5,6,248],nmap:33,tweak:[226,184,56,158,235,209,352,379,81,312],m_1m_2:316,alpha_2:[316,62],main_quit:[580,390,239,562,337,483,351,125,126,179,382,507],style_nam:549,anikeviciu:235,everyerror:[294,5],file_exist:393,projector:423,memori:[228,257,38,95,439,235,277,492,183,312],get_connectionstyl:248,drevicko:235,rec2gtk:[492,83],helvetica:[402,543,268,221,287],proj_stack_kei:357,rcfile:235,get_xydata:248,set_rmax:[316,35],criteria:[402,566,236,242,347],msg:[297,312,507],eqcirc:354,hinton:460,prev:374,selectfont:95,connectionstly:248,get_clip_rectangl:297,plug:574,minuteloc:168,use_local:[294,5,402],combo:382,y_isdata:[257,434,83],alpha_i:354,pathpatch:[175,259,310,5,263,349,187,91,22,385,289,248,214,68,293,294,99,582,212,510,438,589],prototyp:378,vmax:[481,149,5,117,383,414,83,527,188,50,235,567,539,193,357,90,92,499,362,544,222,349,450,64,547,250,294,168,400,434,300,477,173],ventur:224,arg:[0,2,545,248,525,326,38,243,483,109,492,177,312,558,262,179,5,576,383,266,382,83,417,231,76,117,190,527,235,277,314,324,238,23,354,357,239,580,92,465,211,499,574,122,95,96,550,429,222,149,85,548,579,21,332,434,294,134,297,349,341,171,103,586,214],transforms_unit:83,fuction:248,stockchart:222,minimum:[257,149,5,349,153,117,235,236,492,357,92,499,21,160,22,83,248,434,168,294,401,341],set_axis_on:[5,349],umlaut:570,purpos:[498,83,229,499,153,168,149,455,480,566,340,296,224,144,181,214,341,312],patchcollect:[349,99,491,242,117,297,121,347,243,521,494],stream:[439,144,294,38,95,127,235,179,5],backslash:[277,354],stroke:[294,5,53,248,262],"_draw_solid":248,verlag:248,blue_red1:583,alwai:[257,443,347,38,243,19,312,262,5,383,228,349,527,492,96,357,242,103,287,544,83,450,248,294,337,434,297,340,402],poly_chang:42,blue_red2:583,brbg:[403,497],z_max:477,pycxx:[103,303,235],anyon:57,fourth:[462,510,289],xlim_chang:[5,110,83,240],rmean:159,get_color:[349,387,243,63,450,248],minpo:[357,544],pdftex:[83,153,395,556],findobj_demo:200,"0xd3f0b2c":348,pypi:28,clone:[207,57,10,493],xtick:[1,556,257,444,75,142,217,485,348,5,316,383,83,453,45,116,321,497,568,392,532,260,462,184,498,195,282,242,428,501,149,450,289,85,548,25,523,294,70,65,402,510,215],set_arrai:[417,334,99,258,346,503,286,362,558,243,429,6,494],user_interfac:200,mixin:[362,85],interconnect:581,contour_label_demo:200,meteorolog:[294,5,492],get_bbox_font:541,practic:[83,38,168,199,379,330],preceq:354,array_lik:[294,5,448,96],mathtextwarn:312,inform:[303,525,74,257,347,545,348,312,313,5,179,111,181,7,6,266,83,11,229,117,566,527,235,352,492,354,423,402,328,498,464,499,242,95,360,543,287,22,379,318,248,112,579,349,166,294,168,297,170,103,172,214],preced:[294,492,362,277,354],combin:[214,144,442,294,270,440,297,234,262,243,5,137,7,64,248,579],handlelen:[402,83,266],figuremanagerqtagg:576,peachpuff:393,simple_group:312,superscript:118,ppc:[303,7],render_rect_fil:312,anticip:83,cxx_extens:235,midnight:179,anchoredsizebar:[128,450,150,453],mixed_subplots_demo:[200,538],disable_mouse_rot:349,figure_enter_ev:[294,297,245,347],knownfailureif:352,loc2b:77,mainli:[303,363,434,527,450,248],marker_tran:[297,83],cdict:[499,583],streamgraph:[294,5],vtk:[353,7],gtk:[144,377,378,483,179,382,43,265,83,417,562,48,351,492,421,390,239,574,393,125,126,330,580,332,335,339,511,507],shdow:87,platform:[303,228,214,83,257,335,330,439,339,527,235,277,522,464,465,577,7,412,287],my_handl:122,splitext:465,fn_name:[314,280],get_sized_alternatives_for_symbol:312,contains_branch:[434,83],pyos_inputhook:257,axvlin:[340,497,391,257,294,31,235,495,32,5,249],line_ani:[367,9,66],underneath:[128,450,150],test_xelatex:235,zi_cubic_geom:575,bernad:96,term:[144,257,492,497,222,224,214],name:[38,395,312,5,83,153,248,492,357,497,92,499,95,541,362,287,149,85,579,294,297,103],realist:[485,330],opera:402,propnam:248,tkinter:[144,353,427,430,235,347,379],efefef:[393,316,499],individu:[218,257,442,107,491,5,224,450,349,524,117,455,492,243,549,88,566,545,521,248,579,294,258,168],"0x34d2410":492,set_figwidth:149,is_first_row:5,get_xaxis_transform:[5,340,525],referenc:[214,38,153],profit:421,astyp:[41,278,155,314,532,163],profil:[332,139,239,134,377,444,282,482,109,177,302,16,205,23],nofig:214,mincnt:[294,5],rgbcmykw:499,proj_trans_clip_point:349,navigationtoolbar2qtagg:[504,576],simeq:354,migrat:83,brett:[235,57],font_fmaily_rc:522,get_ydata:[83,242,584,347,161,87,248],outside_vertic:263,resetax:384,qmessagebox:[324,76],lastdir:507,n_angl:[290,27,283,61,136,301,182,371],raster:[357,83,294,563,149,545,297,543,312,144,22,402,5,248,412,330],intext:289,synchron:544,motion:[92,471,297,337,347],get_styl:[474,267,248,287],proj_transform_clip:349,get_radiu:248,yum:[303,7,352,313],widow:235,rrulebas:168,yourselv:348,redhat:[303,7],arrai:[149,83,499,38,383,297,362,312,243,5,248],borderaxespad:[83,294,149,402,5,122,266],ax2t:222,thislin:[297,242,347],oftentim:[294,5,248],set_major_loc:[37,460,527,498,307,231,276,329,360,191,389,544,222,111,112,525,383,410],predefin:[92,581],given:[74,248,257,284,443,262,38,100,492,312,5,348,144,383,266,83,268,420,229,431,527,576,190,276,235,567,243,238,579,87,422,580,357,497,120,465,510,499,121,122,95,581,446,362,61,22,385,149,450,205,386,21,349,398,166,294,208,168,583,434,297,401,136,402,301,214,438,553,287],ian:[257,439,235],initialvalu:341,associ:[257,312,5,224,266,318,527,235,492,357,120,329,581,362,287,22,545,149,450,248,543,166,294,401,402,510,553],relativedelta:168,anderson:179,assort:243,is_frame_lik:545,circl:[516,555,305,243,259,310,557,177,448,262,348,5,181,450,385,150,440,525,566,492,277,96,119,354,357,535,92,122,160,295,246,545,128,288,248,494,581,294,99,366,587,340,402,214,474],dynamic_upd:297,white:[403,480,380,347,348,5,316,149,419,566,235,192,423,460,497,498,499,122,449,245,222,161,283,294,335,346,339,584,402],ispower2:492,hoverprop:346,hue:497,barwedg:354,drawstylekei:248,proj_transform_vec_clip:349,copi:[357,83,199,57,576,21,297,287,262,243,5,248,312],axes_llc:[505,94],specifi:[512,242,74,248,243,257,581,443,347,527,149,357,177,312,262,579,5,181,525,383,266,8,523,275,492,120,153,117,190,385,235,277,352,392,96,238,539,317,354,543,52,89,497,184,426,92,464,465,510,499,121,158,431,508,550,361,61,544,545,83,450,122,64,85,24,290,349,283,166,294,208,168,556,433,434,297,566,340,136,402,301,214,541,287],pyqt4:[144,504,271,76,235,402],liaupunov:492,enclos:[294,383,312,354,262],necessarili:[297,83,57],pricemin:442,serv:[297,144,439],denot:[257,240,312,96],lman:156,evt_enter_window:449,pirsquar:50,hagedorn:257,cidreleas:347,posix:83,posit:[255,403,205,243,442,443,347,38,337,571,177,312,262,5,383,326,83,268,492,297,117,455,190,385,585,235,277,392,96,238,422,566,460,357,497,239,120,92,241,499,121,421,550,361,22,545,149,450,527,289,248,548,549,349,166,294,498,208,168,367,434,31,468,485,586,587,553],seri:[52,403,83,10,54,472,566,46,347,55,542,122,297,262,385,422,588,205],auto_scale_xyz:349,nleftrightarrow:354,invert_ticklabel_direct:[326,401],pro:[497,144,10],head:[566,291,510,83,169,22,294,550,492,238,5,214,248],subroutin:153,xy3:555,"_locat":190,binary_repr:492,shtml:303,techniqu:[332,239,91,480,38,347,96,43,248],chessboard:373,datapath:402,github_stat:[228,235],ideal:[403,294,5,450,214,248],include_self:[294,248],"20segment":492,surf:[37,307,561,220,71,298],closer:[83,335,499,339,312,248],sure:[566,340,228,543,83,334,464,107,38,57,199,508,235,341,352,103,149,7,248,317],multipli:[26,250,83,395,399,241,168,71,446,340,221,154,348,450,79,485],clearer:[96,523],an1:[356,581],an2:[356,581],orig_handl:[366,266,122],set_ev:507,gumb:584,icon:[228,214,235,297,309],latex:[228,145,83,214,229,439,241,38,317,21,118,297,170,249,62,402,530,82,248,354,277],color_list:403,later:[303,257,38,312,348,83,492,352,235,87,423,92,241,122,581,247,248,543,434,346,294,297,340,214,511],heat:217,quantiti:[149,294,492,22,5,510],runtim:[402,439,235,38],mathfrak:[82,354],piyg:[403,137,497],recipi:57,original_imag:429,tron:235,cheat:[566,10],spacek:[257,235],op_dict:314,tkw:63,permiss:[229,224,107,235],hack:[580,83,493,57,177,312,214],pelson:235,vpack:312,datemax:360,explicitli:[144,257,5,181,525,522,349,205,277,243,14,580,566,121,122,431,22,83,248,548,284,433,434,29,294,340,214,583],id_eat:38,written:[439,257,38,83,229,561,92,50,492,353,280,354,566,58,95,450,85,579,21,297,171,103],multiscal:439,analyz:[96,224],nadia:439,key_press:[179,50,297],get_xaxi:5,eventson:92,backspac:[294,5,402,149,337],set_aspect:[150,443,100,5,263,450,496,83,453,501,525,190,12,460,557,566,283,160,61,247,128,161,203,289,290,169,563,340,136,301,213,201],lighten:[499,388],nell:235,getid:[334,380],signi:50,crude:294,settoolbar:[335,380,339],ssh:[299,57],downarrow:354,theta:[35,257,447,177,405,223,5,316,115,205,452,12,238,354,327,357,497,195,62,248,290,550,434,294,132,251,72,563,401,340,42],should_simplifi:262,set_anchor:[5,83,190],"_tkcanva":[430,427],reveal:[179,83],get_zord:[340,161,87,248,388],dramat:317,anchored_artist:[128,200,453],register_axi:[545,525],text_kw:249,sep:[128,450,150,507,453],test_pdflatex:235,fillstyl:[294,5,409,248,448],tripcontour:439,dynamic_image_wxagg2:200,multialign:[357,149,268,294,50,501,5,248],detect:[334,235],kei:[439,577,442,38,314,492,177,312,347,179,5,44,266,500,83,268,525,50,235,238,51,485,88,497,54,92,569,573,242,122,95,402,287,126,430,149,248,579,550,581,294,504,337,168,475,297,340,299,103,42,589,507],hist:[303,442,142,542,348,5,83,129,440,273,235,277,278,529,280,532,423,497,241,379,385,450,203,294,491,340,209],getattr:314,ft_style_flag_bold:549,draw_pan:349,navigationtoolbar2gtk3:351,rgrid:[294,497,177],mathtext_exampl:[216,200],negfil:312,ln2:492,detrend:[294,5,492],plotfile_demo:[216,200],dmin:[527,532,168],operatornam:312,text_2d_to_3d:349,come:[303,144,257,5,7,83,10,188,566,492,235,423,498,493,499,416,248,291,543,68,293,294,337,475],patches0:[294,5],patches1:[294,5],"_style_list":581,pcolormesh_level:572,region:[34,257,442,108,348,347,223,5,181,226,83,576,565,492,323,243,17,532,423,240,499,21,149,450,64,248,294,132,337,65,340,93,214,173],tostring_rgb:[529,331],lineoffset:[294,5,243,455],fontenc:317,gains1:44,plot_format:214,get_valid_valu:248,gtk_version:580,rescal:[96,297,214,423],pow:[151,291],inspir:492,period:[222,464,297,566,580],draw_idl:[513,384,240,297,500,48,110,156,248],duti:[83,312],pole:525,colon:[352,57],subsampl:[294,5,527,248,106],set_ext:[240,346],nicola:439,poll:171,bigcirc:354,poli:[92,222,226,42,211],trigradient_demo:[216,200],coupl:[402,442,543,423],rlcomplet:[179,580],formatterdm:[100,401,12],inverse_xy_tup:83,new_gc:297,addit:[303,439,144,257,107,105,312,347,348,5,181,7,383,317,228,83,440,14,566,235,243,492,354,357,92,499,242,402,361,149,450,248,579,349,294,29,168,587,297,401,340,209,103,214],valueerror:[500,580,83,544,235,485,393,362,341,280,177],succapprox:354,fmt_xdata:[222,5,191,112,442],tria:584,andrew:[566,439,257,440,168,334,235],zdir:[325,349,441,257,84,310,211,117,204,451],print_figur:[83,167,576,21,297,235,333],baseband:[294,5],andrea:235,taggedvalue_of_:314,hasattr:[179,314,566,236,341],"case":[304,74,248,257,442,38,433,177,5,348,144,7,383,586,228,83,239,229,561,187,117,526,566,385,235,277,352,96,492,354,357,90,580,498,499,57,58,95,243,361,362,287,544,149,450,550,85,525,431,349,166,294,434,297,401,340,103,581,214],shaft:[294,5,217],onesid:[294,5,492],qt_api:402,alldai:231,zorder:[326,545,557,405,348,5,161,266,83,268,383,452,235,277,243,87,357,90,566,429,22,247,149,450,248,290,294,521,563,340,583],draw_al:121,imgdata:566,goog:[360,435,44,442],nabla:[316,444,282,354],demo_bottom_cbar:94,handlelength:[83,257,149,294,402,5,266],get_fontvari:248,ue0f2:[82,62],backsim:354,abcdef:38,bitmapbutton:380,qapplic:[504,271,76,16,302,324],author:[439,557,541,566,107,95,60,235],plot_expect:160,mouse_mov:[31,297],ecolor:[294,5,490,428],supports_blit:297,set_nam:[368,248,287],eventu:[349,83],test_spines_axes_posit:352,week:168,screenshot:[530,265],set_default_handler_map:266,get_path_effect:248,nest:[88,38,544],less_simple_linear_interpol:492,driver:465,antialias:[545,37,83,393,294,307,402,243,248,71,353,297,298,277,22,348,5,420,85,412],convertallproxi:314,"_timer_set_single_shot":297,embedding_in_qt:200,searchindex:235,thisval:314,family_unescap:287,get_mfc:248,justifi:[510,268,22],ax_background:271,relief:[1,499],get_celld:51,leadingspac:248,model:[390,29,14,493,177,236,347,354,312],style2:287,style1:287,coolwarm:[403,37,497,185,257,84,520,298,508,459,204],conform:[103,38],when:[403,0,516,373,74,248,525,544,38,40,545,110,557,42,312,262,179,5,576,266,228,83,229,153,48,420,527,492,352,323,96,422,14,566,357,497,580,92,55,499,199,57,95,243,493,362,121,246,247,149,85,579,472,510,67,434,398,294,29,473,133,208,168,334,297,341,103,586,214,588,589,287],get_horizontal_s:190,labelcolor:[294,485,346,402,5,383],all_on_max:485,kill:[580,144,277],polish:439,blow:423,function_z:283,hint:[21,312,262],except:[138,144,257,38,363,314,492,42,312,179,5,263,83,229,153,117,455,235,96,280,51,566,465,500,581,349,85,580,331,294,297,171,103,311,214,589],blog:[38,57],"_val":24,dmacosx:257,imgplot:[214,423],sfnt:549,rsizearr:423,geo_demo:200,gitk:57,"0x92a6b6c":442,pylab_with_gtk:[200,534],whitespac:[149,294,199,38,95,402,492,235,103,5,214,354,266],cdot:[316,341,354],scale_factori:357,searrow:354,ptmrr8re:556,reset_buff:179,e_norm:290,connectionpatch:[581,214,248],formatobj:492,freez:[260,235],rsync:228,slice:[557,294,38,424,431,491,210,477,5,137,587,423],report_all_miss:465,"2xn":[294,5],legal:[149,11,92,499,229,294,402,5,6,248],intract:328,moor:439,dashleftarrow:354,zface:301,mathcal:[82,83,444,282,341,62,145,354],thisfrac:278,porter:[257,439,440],"3b2":466,dark2:[403,497],scilimit:[257,5,235,294],scatter_custom_symbol:[216,200],garbag:[38,347],unmask:[294,5,38,96],masked_demo:[216,200],immut:[434,262],earlier:[566,439,83,257,168,122,294,491,323,5,117],gregori:[257,439,440],stand:[566,439,257,168,541,312],"2x2":[433,434,94,564,505,450],add_to_figur:190,hookrightarrow:354,"_get_current_fig_manag":83,dyamic:527,emafast:222,gari:439,trademark:[353,224,85],gard:[402,543],lastli:498,triangledown:354,drawingarea:[390,83,150,535,427,562,337,351,125,126,430,507],compos:434,spinal:401,weakkeydictionari:235,formatthousand:492,giuca:235,setpar:[504,76],messagedialog:507,checkabl:235,image_slices_view:200,strictli:[357,416],getverticalalign:248,unam:[229,464],outdat:317,tupl:[512,205,243,257,443,38,395,149,312,448,262,314,5,6,525,383,266,8,11,231,248,536,190,235,277,96,492,485,357,92,499,581,122,393,550,22,545,83,64,85,579,349,541,294,168,339,297,585,402,214,583],relim:[5,248],regard:235,jun:566,amongst:[294,448],eventhandl:305,padbi:50,slowdown:235,longer:[566,304,439,349,83,257,270,480,323,38,526,294,235,312,246,5,510],notat:[294,545,527,492,238,402,5],bullet:354,demo_annotation_box:200,chaplin:439,qtconsol:235,taylor:[439,440],antigrain:[303,144,294,566,323,5],cbi:392,leftrightsquigarrow:354,numsid:[243,262,448,91],cut_loc:429,strongli:[303,401],max_head_width:485,stock1:469,encompass:[348,354],set_tick:[401,383,121,463],incorrect:[580,166,294,335,339,286,492,235,5],moddat:60,logscal:[340,357,235],ylgnbu:[403,497],add_check:362,idiom:[103,442],get_axisbelow:[5,349],main_widget:[324,76],autotext:[294,5,424],mark_inset:[450,65],emptybarb:[294,5,246],symbol:[62,38,484,312,448,5,488,266,83,525,118,527,235,357,241,544,149,97,580,294,72,402],get_fontstyl:248,dashv:354,cb2:539,cb3:539,cb1:539,gridsiz:[294,5,547],dashd:297,backward:[402,83,257,168,149,367,294,468,448,103,5,450,122,248],directori:[533,228,214,83,207,465,107,133,38,57,199,40,360,233,287,352,103,435,7],imagedir:233,to_str:83,potenti:[290,303,144,294,149,492,235,340,96,5],disp:50,all:[138,312,448,5,6,149,11,76,13,455,392,324,465,158,160,221,22,161,25,334,168,341,171,173,481,38,484,179,181,576,50,492,352,27,357,497,499,56,500,58,360,362,57,62,318,82,85,505,214,287,75,223,383,228,83,524,387,527,525,233,236,243,88,92,241,242,96,248,549,250,398,294,103,403,533,106,107,108,491,262,112,263,266,420,570,426,493,121,286,94,579,580,434,297],ydata1:197,parent_ax:450,pth:7,lack:[257,5,83,144,149],barebon:566,rowlabel:[294,5,260,51],ala:8,spacecraft:440,abil:[432,144,11,257,542,492,235,314,83,6],longest_on:492,follow:[312,262,5,383,83,248,527,492,96,357,497,92,199,57,121,22,149,85,294,168,297,103,214],alt:[297,214,248],disk:470,ptr:482,abid:566,"1xnm":[294,5],press_pan:297,aaron:235,program:[144,92,465,133,76,294,235,324,353,85],"_nolegend_":[222,5,50,294],linearsegmentedcolormap:[362,499,583,497],far:[580,19,566,378,433,492,354],line_demo_dash_control:[200,219],fat:7,lyapunov:492,print:[303,139,442,141,311,3,5,7,363,456,322,16,348,464,465,159,467,445,332,334,30,475,31,171,478,507,343,38,347,179,43,576,50,492,193,566,194,497,498,55,500,62,502,82,504,210,513,375,377,378,382,83,229,86,388,233,235,531,87,532,88,239,92,573,242,482,95,393,245,546,97,549,346,257,395,109,408,111,264,415,417,271,116,420,421,422,124,126,430,527,289,23,580,294,134,297,302],ytick:[1,556,257,458,444,75,142,217,348,5,316,383,83,453,45,116,321,497,568,392,532,260,462,498,195,282,62,149,450,82,289,85,25,523,294,30,485,65,402,510,215],worst:297,difficult:[257,303,214,38,352],failur:[257,402,465,235,352],fab:[203,17,205,273],ticker:[5,83,383],instrospect:[272,397],allow_raster:248,set_aa:248,ribbon_box:429,list:[303,439,443,312,448,5,6,7,317,149,420,76,15,392,324,326,464,465,159,22,450,166,341,38,484,42,347,348,181,349,49,492,352,51,566,357,497,498,499,57,103,144,379,385,85,211,214,512,74,382,383,226,228,83,205,527,235,243,539,536,96,248,99,294,401,402,403,555,257,179,262,190,266,115,564,92,277,423,120,493,121,122,284,287,289,579,580,543,434,133,297],subscript:118,embedding_in_tk2:200,"_timer_start":297,hepler:235,ten:294,difficulti:353,lightgoldenrodyellow:[348,528,384],ted:[439,470],tee:179,tex:[228,83,353,439,107,153,570,118,297,170,312,402,318,530,145,438,248,354],rate:[217,485],pressur:[294,5],design:[548,525,439,83,523,92,38,153,257,294,566,492,287,497,353,5,316,330,354,312],"_parse_kern_pair":541,tickx:349,what:[40,312,36,265,584,228,83,229,152,153,205,566,492,324,579,533,19,498,464,57,541,247,248,24,166,133,168,297,341,214],nonlinear:[340,492,83],sub:[149,434,294,22,190,527,287,62,96,83,450,82,65,354,312],sun:[382,422],sum:[83,45,326,321,294,492,518,22,222,5,161,510,289,354],brief:224,suh:297,ticki:349,version:[525,107,38,395,40,491,312,179,5,7,228,83,45,76,321,566,527,492,352,323,324,357,497,92,282,57,287,291,434,294,335,339,367,229,297,103,214,583],ozon:177,intersect:[349,328,294,434,492,262,5,248,44],sup:[294,5,354],hcenter:312,ringbuff:38,themselv:[303,83,398,434,326,525,297,492,340,312,74],trifind:[96,182],sharex_foreign:526,behaviour:[83,527,286,235,349,214],shouldn:[353,235,271,566,83],add_conversion_factor:314,create_model:390,solari:[235,287],subplotanim:169,freebsd10:235,optionn:235,headaxislength:[294,5,291],naval:168,tick1:525,tick2:525,ref_coord:248,derivativework:259,nosetest:352,yourdomain:[493,199],colorout:156,gns_ank:235,magnitud:[257,5,460,294,22],todai:[222,60,456,458],whiz_button:334,clip_box:[357,149,268,294,545,277,22,348,5,248],layer:[373,74,69,294,297,323,348,5],filenam:[95,83,580,229,38,395,153,21,257,294,492,235,287,402,149,579,297,312],xpress:347,hist_:491,matplotlibanim:[332,43,23],get_major_loc:[348,383],xorig:0,pprint_gett:248,dannys_exampl:200,proceed:248,converterd:[483,382,492],date1:[83,231,191,111,112,389],rightsquigarrow:354,coverag:[103,465,235,352,317],curvearrowright:354,imath:[354,62],hurrai:[510,289],minor:[439,440,74,257,486,348,5,112,383,349,231,527,525,275,276,235,243,111,357,497,121,329,360,83,294,402],rk4:492,distances_along_curv:492,showtooltip:557,ywidth:[294,5,243],flag:[303,403,38,5,228,83,85,392,354,497,464,57,103,493,362,246,379,149,248,543,294,297,209,402,214],stick:312,userwarn:38,known:[149,28,107,294,492,312,448,96,214,85],max_length:492,squish:354,valuabl:[439,144],antialis:[294,5,402,277],outlin:[294,5,566,385,22],viewvalu:235,recast:462,autoscale_non:[362,499],caveat:[492,144],nxycoord:356,legend_transluc:[216,200],fepointlight:388,arist:401,print_jpeg:297,ann:355,iscolor:349,quadmesh:[294,5,17,243,235],get_rotate_label:349,pong:50,embedding_wx2:380,cours:[83,10,294,464,199,434,492,277,103,5],goal:[257,439,83,525],divid:[403,433,294,353,443,499,121,583,123,190,468,492,13,96,5,450,203,485],get_numsid:243,colors_arrai:297,dcmetric:541,psd_demo:[216,200],divis:[373,443,346,190,235,465,532],set_zmargin:349,plot_refi_tri:160,distro:[229,214],griddata:[492,193,235,90],ginsburg:235,resourc:237,y_plu:492,yedg:[294,5,129],"_pdf":352,set_dpi_cor:248,reflect:[83,398,294,440,434,297,235,341,5],catalog:317,"_text":481,curlywedg:354,"short":[149,420,257,442,121,294,527,354,44,299],womenstd:[436,178,568],footer:235,postfix:[303,492,44],festk:412,ambigu:[349,580,492,83,330],plot_wirefram:[349,117,189,322,235,176,298],callback:[374,38,149,110,347,5,382,182,349,235,156,557,92,240,242,83,248,579,580,67,294,297,341],set_zscal:349,shade:[1,8,442,83,257,93,499,117,294,297,349,235,518,497,301,243,5,260,17,226],head_starts_at_zero:[294,5,248,485],mailarch:83,is_file_lik:83,float64:492,get_iter_at_line_offset:179,writeinfodict:95,get_xlim:[0,349,480,273,134,5,348,315],set_val:92,underrepres:83,mission:440,xcond:547,reconnect:235,vlaue:248,slidergroup:341,style:[357,83,294,153,149,545,297,287,448,243,5,248,312],ax_pm:471,"__wxmac__":[335,339],angle_tick:405,flannaghan:[257,440],fontpath:287,anchoredoffsetbox:[438,150],frame_info:579,might:[566,83,434,229,499,153,57,199,160,257,492,362,294,352,96,5,7,87,388,317],alter:[294,340,83,500,398],wouldn:[83,221,525],setfont:556,subsetneq:354,filemoviewritt:235,schellart:257,get_backend:[408,85],largest:[294,5,446,492,527],hunter:[566,439,257,38,21,541,235,224,214,85],hslash:354,framework:[566,334,439,144,434,257,525,340,294,468,235,544,103,83,450,7,330],getelementbyid:[491,557],bigger:70,"2012d":257,bacground:239,embedding_in_wx:[334,58],refresh:[493,527,144,380,168],demo_right_cbar:94,compris:[340,287],algorithm_0102:492,translimit:[77,340],unicod:[439,165,317,118,527,357,170,354,457,402,82,412,249,312],ellipse_rot:200,truncat:[294,499,525,297,5,64],outputstream:179,weight:[257,221,542,177,518,5,411,412,81,149,268,561,85,235,96,492,460,357,498,541,287,222,248,291,294,70,368,584,402],needless:566,mng:531,expect:[566,402,349,83,434,229,464,542,168,247,160,257,401,235,294,352,324,5,527,379,330],stabl:[257,228,235],slave:221,ax_bbox_list:166,set_edgecolor:[349,294,545,243,149,316,248],barcod:215,points_to_pixel:[297,83],get_convert:74,footnot:[214,497],health:177,set_ztick:349,"_slow_":492,benjamin:439,napprox:354,advanc:[357,83,312],differ:[579,357,83,248,166,294,527,38,121,153,243,297,492,57,497,96,5,214,312,168,287],navigationtoolbar2wxagg:[21,339],vartriangleleft:354,succnapprox:354,thread:[580,83,38],linema200:222,caretdown:[248,448],perhap:[107,153,543],test_window_ext:249,circuit:510,setcursor:449,find_al:257,ttfdict:287,append_s:190,feed:[492,122],notifi:[580,92,297,362,347,5],fixedformatt:527,feel:[432,349,566,57,341,328,330],famou:107,label_out:5,textctrl:341,unvalid:160,dejavu:[312,317],construct:[83,385,294,393,491,348,5,579],stdlib:38,blank:[294,402,566,149,38],imagemagickbas:579,print_pdf:297,fanci:[355,439,550,99,581,235,247,530,248],circumcircl:96,gpl:[107,543],script:[144,556,257,491,557,312,411,7,228,83,489,229,470,235,277,352,492,549,423,88,357,566,464,465,500,402,379,318,82,85,330,580,543,294,368,103,214,583],interact:[516,218,357,42,6,525,183,265,149,368,86,420,275,50,392,88,390,534,497,92,393,200,527,85,250,434,334,70,294,297,341,214],key_press_handl:[430,504,297,126],pm3d:497,"0x19a95710":348,data_gen:[134,162,315],colect:235,stori:257,"_autoscaleyon":5,get_fil:[248,287],store:[83,262,38,491,312,347,348,349,229,527,85,276,235,492,579,390,92,360,287,149,450,248,330,580,294,133,435,434,297,402],is_win:380,prompt_ps1:179,cut_star:295,curvelinear_test2:[100,12],curvelinear_test1:[100,567],wa_deleteonclos:76,tickdown:[480,393,248,448],froehl:235,illegal_:168,set_theta_direct:357,kind:[512,402,357,83,434,167,583,575,38,168,149,294,566,423,96,103,5,348,266,248,24],celementtre:[87,388],whenev:[340,144,92,38,121,589,434,297,42,103,149,362,248,354],remot:[533,57,10,493],remov:[38,378,40,262,5,383,228,83,527,498,50,322,492,392,96,531,88,357,462,92,465,57,160,121,544,149,248,294,297,497,477,103,137],get_mark:[248,448],performac:492,print_rgba:297,dann:235,axisartist:[326,387,101,100,468,405,12],"1rc1":228,axes_prop:200,cleaner:[50,83,341],sarahan:257,font_manager_api:402,atmospher:497,igor:497,headlength:[290,5,294],all_transform:[297,83],marbl:440,axes_proj_class:357,bound2d:[83,383],widgetswrapp:507,xref:[95,190],nleftarrow:354,randint:[342,198,76,160,50,324,569],height_ratio:[431,120],span_region:186,violat:214,wallclock:141,set_size_request:[179,492,507,125],offsetfilt:161,"15x15":[481,94,505,13,300,450,146,65],legend_handl:[366,266,122],gill:[294,5,439,280],copin:[257,289,235],nabout:229,unsur:317,reach:[294,297,149,38],frame_on:[480,149,556],jsw:257,ntrianglerighteq:354,win32installedfont:287,sandro:235,selector:[92,248,500],amax:[250,83,334,116,142,373,6,17,205],maxtick:[527,168],appear:[304,357,83,229,335,557,262,38,339,294,492,383,312,497,22,96,5,510,248],set_default_s:[390,562,337,351,125,126],x11r6:303,datetime1:168,destruct:566,nan_test:[216,200],part:[525,395,257,442,347,259,446,5,224,419,228,349,440,187,153,85,190,456,235,192,423,566,357,328,197,353,58,468,141,246,450,248,330,68,293,294,258,168,434,214],get_class_memb:179,notch:[294,5,584,484,585],optionpars:465,attr_match:179,ridicul:543,plotfigur:286,nth_coord_tick:100,miller:439,shrink_factor:[581,248],valinit:[92,384],grace:235,scroll_ev:[294,297,210,347],set_offset_posit:[243,383],moser:394,sanalyt:492,mdehoon:257,hit:[83,347,242,589,42,277,323,379,248],new_mask:96,pong_gtk:559,financ:[83,231,235,222,111,112,44],draw_rubberband:297,world_transform:349,fastest:[5,561],navigate_mod:149,coth:354,ie9:491,figure_titl:200,set_rules_hint:390,frame_format_str:235,statist:200,set_navig:5,delta_:[145,435],wrote:[229,257,439,566],fftsurr:492,arr:[53,433,535,294,499,429,492,438],art:330,dump:[491,473,287],heavili:357,invis:[149,398,402,401,235,63,450,203],mutabl:[434,235],plotnotebook:338,barb:[294,5,497,246],bare:153,usyd:413,jdhunter:[21,402,464],arm:[498,248],fontentri:287,fullscreen:[402,337],simultan:249,reset_tick:383,set_vert:[243,190,349,235,13],mintick:168,ca7900:309,pep8:[103,235],nontrivi:153,vec_pad_on:349,linelen:95,latin:[412,354],get_grid_help:[12,387],autolayout_valid:235,eeefff:[294,499],set_ax:[586,248],sole:169,pickradiu:[294,248,277,243,5,383],imp:235,outfil:[233,465,579],eponym:144,longrightarrow:354,hacki:235,set_rotate_label:349,disclaim:224,gray_r:[497,567],license:224,nvdash:354,roman:[357,149,556,294,541,584,543,287,402,5,248,354],package_data:[103,83],context:[149,257,353,294,297,235,314,497,214,354,579],nonunit:256,lrpath:289,speciesi:177,flier:[294,5,584,585],tgt:161,safe_masked_invalid:38,residu:465,tga:579,timeout_add:[580,171,43,48],draggablerectangl:347,scale_tran:[434,340],nfast:222,wokr:248,bigtriangledown:354,swf:566,comic:[402,317],gen_galleri:235,ftimag:[312,380],strategi:[324,16,302],mpl_:214,"200m":277,converted_arg:314,cartopi:265,ncolumn:[294,5],matplotlibrc:[89,83,248,214,294,464,510,168,149,566,297,287,144,457,103,5,7,85],get_texts_widths_heights_desc:326,tight_layout:[294,418,149,497,120],seachl:235,stolen:[294,149],frozen:434,depth1:155,pitchfork:354,urpath:289,dashstyl:[235,248],figtitl:[250,2],behavior:[144,257,149,379,5,317,349,205,492,457,235,497,566,581,545,83,450,248,579,543,294,168,297],"_set_font":83,line_collect:[216,200],hatch:[294,270,22,121,243,545,490,297,235,262,348,5,248],measuredangl:354,end_pan:[5,525],is_grai:499,eqslantless:354,demot:214,rid:[88,83,57],illinoi:21,cmyk:158,get_xticklin:[566,5,489],"775x0":348,fallback_to_default:287,movi:[214,218,229,66,531,579],get_xticklabel:[25,489,398,524,443,231,242,58,348,584,329,222,5,316,203,389,24],transform_path_affin:[434,357],cset:[459,349,185,84,520,204],"7ghz":492,lengthb:[581,248],lengtha:248,line2d_dist:349,in_ax:5,higher:[543,144,257,442,70,492,402,579],x86:303,painless:19,wherea:[144,492,83,354,168],numpoli:262,draw_mark:[235,297,83],select_region:297,varpropto:354,bartlett:[294,5,492],robust:[492,235],avgsal:492,subpackag:85,eventcollection_demo:200,particul:177,machineri:[348,312],framedata:169,length2:362,searchabl:[566,543],linecol:[294,5],rgby:158,ancillari:235,platforminfo:380,process_text_arg:83,macintosh:[353,379],propos:[160,228,497,225],intervald:168,intervali:[434,83],writeobject:95,collabor:[439,57],press:[34,42,347,149,50,235,569,92,573,242,500,126,430,577,288,294,504,337,475,297,340,171,589,507],gains2:44,linemark:393,intervalx:[434,110,83],northern:[294,5],masked_arrai:[314,291,246],continent:561,eldorado:498,window_non:[45,5,492,294,321],"_load_bitmap":339,theoret:[492,32],usermedian:[294,5,585],msft:[469,311,422,502,254],draw_bbox:[247,248],figureframewxagg:21,euler:402,svgz:[21,297,30],boxplot_demo3:200,boxplot_demo2:200,anscomb:200,numberoftimestep:229,"_bbox_patch":235,plotpanel:334,sizer:[334,335,338,339,286,341,380,449],rossum:38,nsubset:354,collect:579,yaarow:[294,5,248],aux_tran:471,tmpfile:465,bfd1d4:[309,22],set_and_get:[216,200],gtrless:354,formatfloat:492,reder:[87,388],"1st":[294,168,498,100,492,348,289,383],convert_arg:579,global:[297,417,566,493,199,491,58,402,12,235,312,558,262,179,280,23,85,354,549],understood:[103,144],unspecifi:492,logical_and:560,text_them:221,upval:222,surpris:[257,83,499],isown:92,is_dropsub:312,affili:228,t_i:62,"512mb":492,prop:[128,140,150,480,442,395,42,312,347,5,266,83,268,523,481,243,522,357,242,581,287,222,149,450,248,294,346,297,438,589],waveform:[229,341],prec:354,prog:[324,465],bin_boundari:[527,235],leftmost:[294,5,287],prod:[354,62],prob:32,toggle_el:491,martin:[257,235],perpendicular:248,hatchpattern:262,yrang:[294,5,495,243],squeez:[294,248],andi:259,utf8x:317,insert_with_tag:179,zfront:349,transpos:[417,294,158,286,492,235,5,161],med2:585,med1:585,dialog:[257,402,235,337,507],t_3:485,rangl:354,succcurlyeq:354,gamma:[499,282,455,492,62,354],file2:469,file1:469,subplotnum:[472,347],emphasi:[214,64],greenfield:439,set_mfc:248,indextrack:210,set_rasterization_zord:[5,563,83],logformatt:527,johnh:[303,379],mathregular:354,lineprop:[92,83],announc:28,synonym:[294,5,149,287],get_tk_widget:[430,427],mouse_init:349,xpo:129,dstart:168,xpm:339,fontprop:95,fledg:357,question:[40,303,492,464,317],"long":[439,257,38,75,5,79,44,149,229,525,420,50,492,277,352,354,19,566,121,123,248,164,294,30,485,169,402],adjac:[294,120,149,166],handler:[439,305,574,297,121,339,21,286,235,183,266],arithmet:388,prettier:38,test_single_d:235,figureframewx:21,myfunc:[566,236],repeatedli:579,bore:[194,107],radian_demo:[350,200,465],oldcol:322,"1e38":83,fulltick:330,conversioninterfac:[74,83,294,168,314,5,24],delta:[476,262,110,485,347,5,181,414,349,191,492,392,389,354,444,462,282,62,222,161,64,547,506,294,168,167,212,173],upright:354,set_navigate_mod:5,fileo:402,pncr8a:312,row1:[294,5],row2:[294,5],seterr:[487,465],consist:[566,357,83,385,257,208,243,294,492,235,22,96,5,214,383],caller:5,todatetim:38,do_3d_project:349,instantan:560,arakaki:235,highlight:[228,54,257,442,500,498,297,340,402,182,248],welcom:[179,303,328,379],configobj:83,enlarg:161,hash:[228,149],get_underline_thick:[541,312],set_dashrot:248,sepia:497,chartdirector:440,colorfunc:[528,384],ft_face_flag_multiple_mast:549,"b\u00e9zier":[530,248],graham:235,rainbow:[403,301,193,497,90],meanwhil:433,grp:38,grouper:[5,38],nick:235,raini:116,mxnx3:[294,5,83,149],weight1:287,mymovi:579,waittim:38,supseteq:354,kamal:96,nice:[566,88,10,166,257,442,199,57,329,353,527,177,273,493,340,181,203,412,518],dale:[257,439,440,235,76],contains_open:83,dalk:[566,439,168],finit:[96,38],chirp:560,meaning:[446,527],itemlist:243,meaninc:229,set_axis_direct:[326,401,405],err_tol:334,aitoff:[487,149,525],rightharpoonup:354,pythonic_matplotlib:[216,200],vice:[243,398],mask_init:160,nasa:440,matfil:492,scroll:[125,92,297,492,210,347],edg:[373,108,542,223,5,525,228,83,388,527,323,96,357,425,120,498,94,243,22,545,149,64,248,291,166,294,434,297,371],zmin:349,lowland:497,steve:439,tooltip:[421,557],edu:[580,1,485,21,312,413],get_proj:349,simon:[257,235],event_sourc:579,pickle_dump:287,newfig:[294,254],open_in_brows:402,breach:224,wmv2:[566,531],varianc:492,light_sourc:161,sizes_i:243,set_axislabel_direct:[326,401],hopper:235,interpol:[373,481,343,108,259,262,223,5,525,146,450,508,334,414,83,386,417,319,13,248,565,234,235,567,323,96,492,531,402,89,566,575,392,499,94,160,286,429,201,161,64,65,290,434,167,504,505,583,476,294,300,477,212,214,438,215,173],graphic:[144,312,348,317,149,440,470,566,235,88,328,353,57,21,160,379,248,330,294,99,297,340,402],stackoverflow:464,allowed_metadata:579,relev:[579,38,122,96,276,492,103,348,527,423],thispatch:278,y_dot:466,figsrc:288,gdmodul:83,cset2:64,cset3:64,cset1:64,get_flip_min_max:349,fink:303,master_transform:[297,83,262],specularexpon:388,get_autoscalez_on:349,maxsiz:38,dealt:312,tick2lin:[348,146,383,329],"89818e":248,pleas:[303,257,312,577,5,7,317,228,83,492,352,493,96,497,566,464,57,103,124,349,543,294,299,402,214],caretright:[248,448],arctan:[544,354,525],postambl:153,cfg:[303,228,439],simple_idle_wx:[285,200],figurecanvasp:297,kington:235,longest:492,fullnam:[314,420,248],folk:[480,213,8,381,141],compat:[83,121,149,21,541,297,448,5,511,248],compar:[452,385,257,442,465,38,57,56,367,584,492,235,352,5,113],mainlin:326,fine:[524,108,168,40,160,223,5],find:[38,100,312,36,5,522,83,153,85,233,492,236,237,96,485,497,493,242,284,57,544,527,248,580,250,294,133,168,434,299,287],hourli:168,txt_buffer:179,pyint:580,ticksiz:[326,231],rec2txt:[159,264,492],copy_properti:[297,83],on_key_ev:[430,126],backprim:354,data_clip:393,chose:499,scale_class:357,onerasebackground:[334,286],type1font:[551,83],figurecanvasgtkcairo:[562,126],plot_function1:214,family_escap:287,get_path_ext:262,larger:[433,83,294,499,434,543,287,262,402,5,85,312],oversold:222,print_ep:297,typic:[566,580,144,130,92,499,153,121,149,229,340,294,22,103,5,348,7,362,248,423],boilerpl:[103,257,235,442,334],pxy:[294,5,492],pxx:[294,5,492,560],kwdoc:[214,248],heart:277,apr:[303,379,501],appli:[243,262,5,383,83,272,525,492,96,87,199,57,160,22,149,248,103,349,397,434,294,297,402,214,173],app:[566,83,257,504,271,449,338,339,334,286,16,302,380,335,324,235,7,379,341],set_vari:[368,248,287],scalex:[103,5,214,349,294],keyval_nam:179,scalez:349,volt:[536,566,333,354],scalei:[103,5,214,349,294],get_clos:248,fed:566,pie_demo_featur:[180,200],feb:501,usa:566,overmar:96,fem:96,file_menu:[324,76],varphi:354,few:[144,257,106,38,105,312,348,440,353,14,423,88,426,566,581,127,450,433,29,587,297,401,209,214],usr:[303,138,139,140,304,308,309,142,542,7,8,151,320,153,455,548,154,323,324,157,17,327,462,465,331,20,467,141,469,517,470,163,25,164,26,332,333,167,335,336,178,339,475,476,31,170,191,173,34,345,41,484,485,486,179,334,181,43,183,145,489,49,50,351,192,51,195,197,58,360,501,202,62,363,82,64,205,206,365,208,368,507,212,509,213,373,514,221,76,518,223,79,521,522,523,229,231,86,529,531,389,532,88,390,89,239,537,392,242,97,549,250,491,402,104,406,110,410,558,411,408,111,112,113,414,560,417,116,562,419,275,276,568,570,426,427,286,225,125,126,430,577,445,289,580,543,130,132,258,436,583],pathlength:[510,217,22],tick_right:[320,383,13],sort:[0,38,222,311,312,264,44,7,363,456,492,51,88,197,566,465,55,122,159,379,349,248,294,474,434,31,33],gardelein:235,setcapt:324,impress:[83,499],eventreleas:573,mpl_with_glad:[200,534,83],rabbit:491,get_offset:[243,527,83,500],dtstart:168,draw_circl:[128,450],women:[428,436,178,568],annoy:530,darwinport:303,labelheight:346,critic:[464,492],masked_u:246,annoi:[402,277],endian:235,test_contain:235,finfo:90,filehandl:[402,287],proof:[156,248],tau:[354,62],tar:303,deepcopi:[434,83],psfont:[83,153],get_sparse_matrix:492,path_editor:559,xmid:[290,283,61,136,301,182,371],tag:[228,566,464,491,21,297,235,383,330],proprietari:[107,312],tab:[580,133,492,103,5,214,51],barh:[83,294,458,498,50,497,5],polar_scatter_demo:[294,180,200],tan:[50,289,354,544],overbar:570,rcsetup:[402,465,235],minlength:[294,5],ax_km:471,hsv_min_sat:[161,499],brian:[257,580],subdirectori:[303,133,287,352,103,214],instead:[144,257,38,491,484,177,262,5,181,7,317,83,205,235,277,457,492,532,497,239,566,493,392,499,57,108,95,121,22,379,149,450,122,248,349,294,434,401,287],panic:57,sin:[0,1,139,138,306,307,309,447,3,36,315,145,147,452,8,420,151,320,76,442,324,17,327,158,25,332,169,335,485,339,334,31,340,495,507,34,516,4,480,482,42,486,348,182,183,488,489,45,46,536,49,50,351,492,352,192,27,354,52,37,196,56,58,60,61,62,205,206,365,71,214,371,372,513,144,374,377,221,378,380,519,223,381,555,524,525,86,528,239,92,93,394,302,248,325,398,101,449,177,253,384,105,108,259,109,261,558,263,113,560,115,270,271,562,419,274,275,276,413,463,280,571,417,573,427,283,286,124,125,126,430,521,23,290,291,369,130,294,131,132,258,134,563,298,136,301,137,583],sim:354,xmlid:[491,557,87,388],numsampl:[492,532],tack:498,blacktriangleright:354,colors2:455,light:[403,1,149,268,294,411,499,38,221,388,368,584,357,497,287,22,5,248],interet:5,psfontsmap:153,freebsd:235,histogram_percent_demo:200,ttext:221,get_transformed_path_and_affin:434,boxcoord:[584,292,438,535],elif:[500,314,393,569,465,242,310,179,42,341,4,103,289,485,522],ouput:74,autopct:[294,5,587,424,388],get_fontnam:[541,248],nsucc:354,oldscalarformatt:225,"d\u00e9velopp\u00e9":165,own:[83,541,92,527,168,243,297,57,103,214,312],overful:312,push_curr:297,superior:492,set1:[403,497],additionn:235,lum_img:423,nheater:217,flex:498,practicl:217,multimap:354,crash:[257,235,10],sqsubseteq:354,texnam:153,extra_arg:579,picewis:248,gwversion:566,successor:[492,330],diagon:[304,19,497,426,243,248],linscalex:[294,5,357,349],dynamic_collect:[243,200],supsetneq:354,pcolor_smal:[216,200],string_width_height:541,set_seg:[243,349],linscalei:[294,5,357,349],polit:561,backend_templ:235,proj_class_kwarg:357,genfrac:312,new_im:161,gehrck:235,greyscal:497,annot:[256,357,5,263,265,83,114,85,50,234,238,355,356,53,557,497,429,248,292,294,474,214],our:[303,74,100,347,348,181,265,228,385,10,525,352,237,530,423,533,19,462,91,566,240,21,544,68,293,334,401,103,137],add_buttonbar:380,matrix_from_valu:434,line_seg:[6,11],score_weight:287,out:[525,205,107,38,491,312,380,179,5,181,7,383,228,83,561,188,498,527,492,392,96,485,566,19,462,91,92,464,499,57,95,160,467,500,22,545,149,289,85,544,291,55,130,541,294,335,416,168,297,401,493,173],throught:450,lesseqqgtr:354,backend_wx:[335,339,21,286,380,449],quadrilater:[439,497,294,477,243,5],labelweight:[257,402],categori:[403,164,497,38],texliv:[543,153,317],geom:[96,575],clockwis:[512,357,83,257,499,61,136,301,587,248],draw_qouraud_triangl:243,ft_face_flag_sfnt:549,return_tri_index:96,onwhiz:334,indexformatt:527,dictionari:[303,74,442,38,395,363,492,347,179,5,266,83,248,235,238,357,462,120,92,499,242,122,95,550,362,121,149,450,85,579,349,166,294,168,401,402,214,287],hzdict:528,van:[96,235,38],philip:[257,235],backend_pdf:83,suplotspec:120,attent:214,ltx:[82,62],levi:492,"4th":[294,492,168],withdash:[103,5,349,294,375],transfer:[21,312,22],draw_text:[257,128,297,450],xlimit:[348,0,272,397,5],design_s:153,isbn:395,handle_clos:415,spadesuit:354,echo:[7,133],nullloc:[276,527,460,525],get_markeredgewidth:248,subcl:314,"28typographi":340,prioriti:[402,439,349,248,287],aux_ax:405,unknown:[357,149,294,485,383,177,22,545,5,248],macosx_deployment_target:7,accent:[403,118,497,312,570],appl:[402,7,44,329],simple_axesgrid2:135,qsizepolici:[324,76],mathwork:[353,85],"\u03bb":317,plot_tri:160,shell:[303,402,149,580,353,133,348,566,287,103,144,530,7,265],supset:354,lightgrn:51,gtreqless:354,infty_0:62,slider:[92,530,235,341,384],diminish:464,set_verticalalign:248,"_tkagg":235,"_parse_head":541,vartheta:354,richer:[144,347],tekpool:434,check_output:[235,83],xlabel:[144,9,458,344,345,141,142,410,348,5,181,419,79,381,81,8,268,229,412,566,236,192,437,317,149,354,277,318,221,532,497,536,279,428,543,61,202,544,379,83,66,26,165,166,294,336,570,170,209,136,301,213,501],"15e7":471,caretup:[248,448],emmett:[257,235],line_pick:242,set_uselocal:527,clip:[0,150,571,312,405,262,348,5,383,81,349,525,235,238,119,423,357,184,54,566,55,499,121,581,83,161,248,19,433,294,485,297,209,210,508,137,438,173],favorit:[530,265],myproject:357,blit:[9,347,482,109,42,558,519,315,413,23,271,576,49,50,235,579,239,92,574,573,21,302,66,332,169,589,367,134,297,32,214,370],coher:[83,257,229,294,492,497,192,5,419],disjoint:38,share_i:553,clim:[294,5,250,497,194],ffffcc:[34,104],automat:[0,217,38,149,262,5,181,228,83,525,275,527,492,352,96,357,497,57,220,121,544,416,579,471,580,510,67,398,294,434,103,214],my_new_fil:57,den2:413,den1:413,xrc:334,outward:[545,319,401,83,463],analog:[238,550,337,525],which:[544,542,312,448,5,149,320,153,455,323,96,17,465,160,22,469,470,24,166,168,341,32,173,343,38,486,44,50,492,352,566,357,497,498,55,499,199,57,58,60,362,85,208,368,209,214,511,371,74,388,383,228,83,525,527,529,238,539,87,532,557,239,92,240,457,242,243,246,247,248,398,491,294,103,107,395,100,262,266,560,270,116,584,275,276,19,120,121,284,222,521,579,580,434,133,296,297,137,587],precnapprox:354,segemnt:243,ncsa:497,clash:83,who:[228,349,83,581,257,493,107,199,168,470,566,297,357,277,5,439,248,354],"1e10":225,nblit:23,errorfil:235,spines_demo_drop:[404,200],"_macosx":235,patcha:[355,356,294,581,5,248],patchb:[355,356,294,474,581,5,248],histogram:[294,5,492,83,497],why:[28,493,57],links_per_sid:75,patch_:557,roundtooth:[581,248],autoscale_view:[460,349,83,294,231,187,178,503,111,348,5,112,214,205],lines_bars_and_mark:200,pipe:[579,171],deni:235,nmid:354,is_interact:144,determin:[373,144,257,443,347,38,545,312,262,348,5,80,83,229,527,273,383,190,276,492,352,357,120,566,464,499,57,581,242,544,247,149,450,203,248,579,349,294,133,485,521,434,297,401,402,214,371],button_press_callback:[42,589],"_yaxis_text2_transform":525,mainloop:[566,580,334,335,427,297,338,339,430,286,341,380,379,449],syntaxerror:580,polylin:[385,262],chri:235,"__rmul__":314,chicken:566,overflow:235,figuremanagerbackend:83,locat:[83,248,120,294,38,168,149,297,383,121,497,5,312,85,266],figure_api:402,restructur:[566,214],triangleright:354,get_data_transform:248,voss:439,cube:497,contribut:[294,107,485,434,168,508,5],parse_afm:541,svg_histogram:[200,534],libpng:303,notimpl:314,prmari:121,line2d_seg_dist:349,bigstar:354,lossless:330,unstructur:[83,257,294,301,497,61,136,96,5,193],partit:527,outangl:289,menuitem:[380,346],get_supported_filetyp:297,hinton_demo:200,view:[34,0,144,110,19,435,179,5,264,383,349,527,276,323,357,497,91,566,240,57,360,83,450,248,291,398,294,100,168,297],modulo:498,knowledg:[581,144],loc2a:77,troubl:[103,416,7,409],"10e6":159,violet:497,imread:[214,83,294,546,252,497,119,478,423],windowmain:507,multiple_figs_demo:[216,200],gmail:[541,316,214,491],image_demo2:200,entranc:257,dlg:399,wspace:[566,402,149,120,45,46,321,431,294,177,405,192,419,583],spectiv:92,dll:[303,235],lastdat:456,mercatorlatitudetransform:544,chemic:177,wtype_toplevel:324,gist_heat:[403,497,560],maxval:394,"03d":[229,566,531],job:[442,107,511],entir:[83,385,294,46,337,525,21,434,297,262,149,450,248,354,24],joe:235,webapp:[214,470],x_text:403,jon:179,barrett:[439,412],test_bas:352,norbert:492,doprint:393,color_cycl:[83,239,294,149,158,402,5],get_widget:507,grain:[566,144,294,168,353,5,330],leftsquigarrow:354,didact:340,mtconsol:580,returnpxx:492,get_anchor:[5,190],dash_capstyl:[294,5,402,248,277],cmap_list:403,cxx:235,cxy:[192,5,492,294,419],hyphen:[257,402,527,214],toint:38,arriv:[294,5],chmod:38,walk:[367,442],walt:235,respect:[304,257,348,5,266,149,353,235,96,238,354,566,460,197,92,499,581,83,248,294,337,401,340,402,173],x_y:62,padbx:50,check_cal:229,bbc:167,hist2d_log_demo:200,grid_find:[567,405],sqsupseteq:354,tjoraand:439,besid:214,fprime:492,olson:330,"0rc2":235,"0rc1":[228,235],interactiveinterpret:179,nullformatt:[276,527,273,329],hdot:217,mike:235,path_length:492,presenc:257,axprev:374,untrack:57,get_gridlin:[348,383],x_2:62,data_x_x2_x3:254,paintev:576,funcanim:[579,68,9,169,370,367,558,32,519,315,214,162,413,66],present:[423,580,83,74,248,198,262,168,149,257,297,177,294,144,235,402,5,58,215,354,317],pad_to:[45,46,321,257,492,294,5],align:[150,458,75,517,177,5,411,383,149,523,368,584,238,498,540,329,360,22,83,248,68,293,294,434,297,214],cursor:[297,83,92,200,491,31,449,5,182,549],custom_figure_class:200,wild:[107,550],observ:[250,92,294,492,5,547],plot_surfac:[37,349,306,307,220,84,117,71,394,298,235,204],ft_face_flag_vert:549,customiz:144,set_top_view:349,leakag:287,xloc:[480,498],create_main_fram:504,get_kern_dist:541,motiv:[224,450,401],avi:[229,566],lightweight:38,avg:222,ava:165,uniti:243,toggle_selector:[92,573],f0init:341,member:[349,434,544,38,121,243,348,235,312,262,179],remove_nan:262,plotlin:[294,5],getp:[489,420,257,294,348,214,248],curlyve:354,vaquero:566,"0x2718f50":38,mri_demo:[216,200],octagon:[248,448],figmanag:83,student:498,histogram2d:129,convert_path_to_polygon:262,fname2:254,markerfacecoloralt:[294,5,409,248],draw_polygon:83,english:[294,5],subsetneqq:354,patchrc:393,main_fram:504,mfc:[255,294,122,586,277,546,379,5,161,248],get_zlim3d:349,update_param:[5,190],numdist:584,panchor:[294,149,121],obtain:[83,38,40,160,492,287,248],end_tim:465,tcl:[303,330],demo_text_path:200,pythonx:7,tci:290,variant1:287,boldital:522,new_valu:314,head_angl:[510,22],now:[0,439,440,144,533,257,106,544,108,348,542,19,556,518,347,223,5,181,44,83,527,229,578,152,153,273,525,566,12,235,352,323,421,14,423,88,532,442,239,91,92,493,392,199,57,122,160,286,242,385,379,349,450,203,85,206,473,207,283,294,29,258,334,584,340,299,214,583],altcolor:409,set_xscal:[357,349,294,525,571,340,544,5,454,496],jare:439,bufferio:235,book:[357,149,10,294,287,313,96,5,248],tsyu80:316,knob:[92,341],jython:352,on_mov:[86,346],usedistil:[402,543],agnost:24,im_ani:[9,66],xypoint:238,id_drink:38,wxpanel:21,get_majorticklabel:383,know:[74,442,312,348,334,83,229,153,205,420,527,353,566,19,198,465,287,544,577,248,543,434,294,297,340,214],dateformatt:[294,442,231,168,329,360,191,111,222,5,112,389],redesign:353,render_filled_rect:312,python3:235,python2:[83,464,465,235,312,402,7],cshrc:133,metafil:[21,297],size_max:38,cross_from_abov:492,get_familynam:[541,83],datapoint:[294,5,385],pcolormesh:[83,294,30,563,235,497,477,5,137,17],extend3d:[520,349,117],release_zoom:297,centered_ticklabel:200,smiddl:372,suppli:[25,432,349,83,294,242,117,275,401,383,347,5,248,492],mathtextpars:[380,312,346,155],pariti:[257,349],"export":[257,133,388,235,7,317],smoothli:[403,499],treeviewcolumn:390,test_clip:352,proj_transform:349,mainquit:332,drawedg:[294,149,121],unit_bbox:349,lead:[402,439,83,499,38,58,275,96,383],minshaft:[294,5],leak:[465,228,235,38],set_scal:383,basicconvert:314,dictformatt:405,markers:[480,138,130,393,151,409,232,294,295,566,235,277,154,402,5,248,470,585],leap:168,stock_left:339,leader:250,load_xxx:83,twoheadleftarrow:354,investig:533,num_bin:209,upharpoonright:354,torfbolt:235,"enum":297,embedding_in_wx5:200,embedding_in_wx4:200,sphericalangl:354,embedding_in_wx3:200,embedding_in_wx2:200,offsettran:[297,83,262],q2y:492,rare:[433,149,38,340,348,144],funcbottom:92,column:[439,257,443,149,484,177,348,5,44,266,83,524,117,190,492,243,390,260,120,566,94,122,431,360,505,349,450,158,166,294,337,435,434,340,214,553],rec_groupbi:[159,492],fudg:50,rsigma:159,orig_label:485,drop_shadow_patch:161,random_sampl:239,datamanag:390,disabl:[580,543,349,23,257,242,525,297,19,235,347,402,5,579,248,317],lemburg:168,bradlei:235,outset:91,"_update_transscal":525,portrait:[294,297,149],set_canva:149,circledr:354,"__builtin__":179,warranti:224,"_taggedvalu":314,cmr10:549,add_contourf_set:349,head_with:248,automag:214,get_default_font:83,nuke:235,navigationtoolbar2gtkagg:[337,507,126],val:[402,260,149,384,92,499,38,485,248,462,393,527,383,469,314,349,289,80,24],thisi:[34,413],propert:83,texstr:312,spiral:205,boxstyl:[355,356,267,474,391,281,99,557,292,247,234,214,248],bblai:235,vax:365,thisr:[238,550],font_index:200,cairo:[439,144,465,393,235,312,402,83,330],"var":[491,557,507],thisx:[34,314,413,24],uniformtrirefin:[257,160,96,290,283],get_va:248,offset_transform:262,respositori:352,revcmap:362,yticklin:489,"_png":[429,292,235,438,535],reformat:566,dist:[492,349,153],made:[439,144,257,38,262,224,83,525,92,235,493,243,19,497,566,464,287,248,543,334,294,297,401,103],get_mfcalt:248,temp:[402,235],nwalker:442,whether:[38,5,383,266,149,85,492,392,243,89,92,242,96,544,545,248,579,580,434,168,294,297,214],scientif:[403,439,497,294,107,168,402,527,566,103,5,412,330],distract:[50,584],retool:235,record:38,below:[303,304,450,248,257,442,544,38,296,448,347,348,5,181,7,383,44,228,83,440,117,492,277,323,96,238,87,354,423,402,239,566,55,242,122,284,160,550,287,22,412,349,161,205,431,433,398,385,294,99,168,521,434,401,340,103,581,172,507,312],intersects_path:[257,262],again:[433,149,239,510,566,199,401,235,103,83,7,423],blissett:38,subax:294,matplotlib_fnam:402,meaningless:[431,38],"1x1":294,mutual:312,arrow_transmut:248,percent:[550,294,241,435,248,492,235,238,5,183],inset:[174,450,65,142],other:[38,312,262,5,383,83,85,492,96,357,497,92,95,243,362,287,22,149,248,579,541,294,168,297,103,214],bool:[566,291,92,240,565,160,492,294,262,5,214,579],versionchang:214,jointyp:[264,492,44],random_gen:160,dash_list:297,arr2:234,junk:346,text_patch:438,nturbin:217,samplemat:426,debian:[257,303,7,313],start_event_loop:297,"100j":[127,565],pringl:27,experienc:[83,317],extended_font:395,fig_kw:294,ptmr8a:541,set_longitude_grid:525,reliabl:38,piersol:[294,5,492],make_legend_ellips:366,set_rotation_mod:248,ptmr8r:556,label_direct:[326,401]},objtypes:{"0":"std:envvar","1":"py:module","2":"py:method","3":"py:class","4":"py:function","5":"py:attribute","6":"py:staticmethod","7":"py:classmethod","8":"py:exception","9":"np:module","10":"np:method","11":"np:class","12":"np:function","13":"np:attribute","14":"np:staticmethod","15":"np:classmethod","16":"np:exception"},objnames:{"0":["std","envvar","environment variable"],"1":["py","module","Python module"],"2":["py","method","Python method"],"3":["py","class","Python class"],"4":["py","function","Python function"],"5":["py","attribute","Python attribute"],"6":["py","staticmethod","Python static method"],"7":["py","classmethod","Python class method"],"8":["py","exception","Python exception"],"9":["np","module","Python module"],"10":["np","method","Python method"],"11":["np","class","Python class"],"12":["np","function","Python function"],"13":["np","attribute","Python attribute"],"14":["np","staticmethod","Python static method"],"15":["np","classmethod","Python class method"],"16":["np","exception","Python exception"]},filenames:["examples/pylab_examples/clippedline","examples/pylab_examples/shading_example","examples/pylab_examples/custom_figure_class","examples/old_animation/simple_timer_wx","examples/widgets/check_buttons","api/axes_api","examples/pylab_examples/line_collection2","faq/installing_faq","examples/pylab_examples/color_demo","examples/animation/basic_example","devel/gitwash/git_resources","examples/pylab_examples/line_collection","examples/axes_grid/demo_floating_axis","examples/axes_grid/demo_axes_divider","examples/api/legend_demo","examples/pylab_examples/scatter_star_poly","examples/event_handling/pong_qt","examples/pylab_examples/quadmesh_demo","examples/statistics/errorbar_demo","examples/pylab_examples/broken_axis","examples/pylab_examples/titles_demo","api/backend_wxagg_api","api/sankey_api","examples/old_animation/animation_blit_wx","examples/units/evans_test","examples/pylab_examples/ganged_plots","examples/pylab_examples/pstest","examples/mplot3d/trisurf3d_demo","devel/index","examples/pylab_examples/legend_demo","examples/misc/tight_bbox_test","examples/pylab_examples/cursor_demo","examples/animation/bayes_update","examples/pylab_examples/demo_bboximage","examples/widgets/span_selector","examples/pylab_examples/polar_demo","examples/event_handling/legend_picking","examples/mplot3d/surface3d_demo","api/cbook_api","examples/api/bbox_intersect","faq/index","examples/pylab_examples/image_demo2","examples/event_handling/poly_editor","examples/event_handling/pong_gtk","examples/misc/longshort","examples/pylab_examples/psd_demo3","examples/pylab_examples/psd_demo2","examples/specialty_plots/index","examples/old_animation/gtk_timeout","examples/animation/dynamic_image2","examples/event_handling/pipong","examples/pylab_examples/font_table_ttf","examples/lines_bars_and_markers/line_demo_dash_control","examples/pylab_examples/patheffect_demo","examples/event_handling/data_browser","examples/api/date_index_formatter","examples/ticks_and_spines/spines_demo","devel/gitwash/development_workflow","examples/pylab_examples/pythonic_matplotlib","examples/color/index","examples/pylab_examples/multipage_pdf","examples/pylab_examples/tricontour_demo","examples/pylab_examples/mathtext_examples","examples/pylab_examples/multiple_yaxis_with_spines","examples/pylab_examples/contour_image","examples/axes_grid/inset_locator_demo2","examples/animation/basic_example_writer","examples/api/fahrenheit_celsius_scales","examples/animation/histogram","examples/pylab_examples/stackplot_demo2","examples/pylab_examples/customize_rc","examples/mplot3d/mixed_subplots_demo","examples/pie_and_polar_charts/polar_scatter_demo","examples/pylab_examples/figimage_demo","api/units_api","examples/api/sankey_demo_links","examples/user_interfaces/embedding_in_qt4","examples/pylab_examples/axes_zoom_effect","examples/pylab_examples/ellipse_demo","examples/pylab_examples/figure_title","examples/units/radian_demo","examples/text_labels_and_annotations/text_demo_fontdict","examples/pylab_examples/stix_fonts_demo","api/api_changes","examples/mplot3d/contour3d_demo3","api/matplotlib_configuration_api","examples/pylab_examples/coords_demo","examples/misc/svg_filter_line","examples/pylab_examples/ginput_manual_clabel","examples/pylab_examples/image_origin","examples/pylab_examples/griddata_demo","examples/api/histogram_path_demo","api/widgets_api","examples/api/span_regions","examples/axes_grid/demo_edge_colorbar","api/backend_pdf_api","api/tri_api","examples/pylab_examples/scatter_profile","mpl_toolkits/axes_grid/users/index","examples/shapes_and_collections/artist_reference","examples/axes_grid/demo_curvelinear_grid","examples/axes_grid/simple_axisline4","examples/statistics/index","devel/coding_guide","examples/widgets/cursor","examples/lines_bars_and_markers/fill_demo_features","examples/pylab_examples/errorbar_subsample","devel/license","examples/pylab_examples/fill_betweenx_demo","examples/old_animation/animation_blit_tk","examples/event_handling/resample","examples/pylab_examples/date_demo2","examples/pylab_examples/date_demo1","examples/pylab_examples/psd_demo","examples/pylab_examples/broken_barh","examples/pylab_examples/scatter_custom_symbol","examples/pylab_examples/anscombe","mpl_toolkits/mplot3d/tutorial","users/index_text","examples/images_contours_and_fields/image_demo_clip_path","api/gridspec_api","api/colorbar_api","users/legend_guide","examples/axes_grid/make_room_for_ylabel_using_axesgrid","examples/pylab_examples/ginput_demo","examples/user_interfaces/embedding_in_gtk3","examples/user_interfaces/embedding_in_gtk2","examples/images_contours_and_fields/streamplot_demo_features","examples/axes_grid/simple_anchored_artists","examples/mplot3d/hist3d_demo","examples/pylab_examples/masked_demo","examples/axes_grid/demo_axisline_style","examples/pylab_examples/scatter_masked","faq/environment_variables_faq","examples/old_animation/animate_decay_tk_blit","examples/axes_grid/index","examples/pylab_examples/triplot_demo","examples/images_contours_and_fields/pcolormesh_levels","examples/pylab_examples/line_styles","examples/old_animation/simple_anim_tkagg","examples/pylab_examples/legend_scatter","examples/pylab_examples/simple_plot_fps","examples/pylab_examples/axes_demo","examples/widgets/index","faq/usage_faq","examples/pylab_examples/mathtext_demo","examples/axes_grid/demo_axes_rgb","examples/pylab_examples/interp_demo","examples/shapes_and_collections/scatter_demo","api/figure_api","examples/pylab_examples/anchored_artists","examples/api/joinstyle","examples/event_handling/timers","api/dviread","examples/pylab_examples/arctest","examples/api/mathtext_asarray","examples/event_handling/lasso_demo","examples/pylab_examples/coords_report","examples/color/color_cycle_demo","examples/misc/rec_groupby_demo","examples/pylab_examples/tricontour_smooth_delaunay","examples/pylab_examples/demo_agg_filter","examples/animation/random_data","examples/pylab_examples/mri_demo","examples/pylab_examples/break","examples/text_labels_and_annotations/unicode_demo","api/tight_layout_api","examples/pylab_examples/hyperlinks","api/dates_api","examples/animation/subplots","examples/pylab_examples/tex_unicode_demo","examples/misc/multiprocess","examples/pylab_examples/hexbin_demo","examples/pylab_examples/image_masked","examples/axes_grid/demo_colorbar_with_inset_locator","examples/api/quad_bezier","examples/mplot3d/rotate_axes3d_demo","examples/api/radar_chart","examples/units/bar_unit_demo","examples/user_interfaces/interactive2","examples/pie_and_polar_charts/index","examples/pylab_examples/contourf_demo","examples/event_handling/trifinder_event_demo","examples/pylab_examples/system_monitor","examples/ticks_and_spines/ticklabels_demo_rotation","examples/mplot3d/contourf3d_demo","examples/api/index","examples/api/compound_path","examples/pylab_examples/pcolor_log","examples/mplot3d/wire3d_demo","mpl_toolkits/axes_grid/api/axes_divider_api","examples/pylab_examples/date_demo_convert","examples/pylab_examples/cohere_demo","examples/pylab_examples/tricontour_vs_griddata","examples/pylab_examples/animation_demo","examples/pylab_examples/polar_legend","examples/ticks_and_spines/spines_demo_bounds","examples/pylab_examples/eventcollection_demo","examples/units/artist_tests","devel/gitwash/configure_git","examples/index","examples/pylab_examples/gradient_bar","examples/pylab_examples/invert_axes","examples/axes_grid/scatter_hist","examples/mplot3d/contourf3d_demo2","examples/api/collections_demo","examples/pylab_examples/multiple_figs_demo","devel/gitwash/following_latest","examples/pylab_examples/transoffset","examples/statistics/histogram_demo_features","examples/pylab_examples/image_slices_viewer","examples/mplot3d/polys3d_demo","examples/pylab_examples/image_clip_path","examples/pylab_examples/equal_aspect_ratio","devel/documenting_mpl","examples/pylab_examples/barcode_demo","examples/pylab_examples/index","examples/api/sankey_demo_rankine","examples/animation/moviewriter","examples/lines_bars_and_markers/index","examples/mplot3d/offset_demo","examples/pylab_examples/text_handles","examples/pylab_examples/finance_work2","examples/pylab_examples/fill_between_demo","users/license","examples/pylab_examples/newscalarformatter_demo","examples/showcase/integral_demo","examples/showcase/index","devel/release_guide","examples/old_animation/movie_demo","examples/tests/index","examples/pylab_examples/finance_demo","examples/pylab_examples/spy_demos","examples/misc/image_thumbnail","examples/axes_grid/demo_axes_hbox_divider","users/github_stats","examples/pylab_examples/findobj_demo","devel/gitwash/git_intro","examples/pylab_examples/annotation_demo","examples/old_animation/animation_blit_gtk2","examples/event_handling/viewlims","examples/pylab_examples/histogram_percent_demo","examples/event_handling/pick_event_demo","api/collections_api","examples/pylab_examples/subplots_adjust","examples/event_handling/figure_axes_enter_leave","examples/pylab_examples/barb_demo","examples/pylab_examples/fancybox_demo","api/artist_api","examples/pylab_examples/usetex_baseline_test","examples/pylab_examples/multi_image","examples/pie_and_polar_charts/polar_bar_demo","examples/images_contours_and_fields/image_demo","examples/lines_bars_and_markers/fill_demo","examples/pylab_examples/plotfile_demo","examples/api/watermark_text","examples/units/annotate_with_units","users/whats_new","examples/pylab_examples/multicolored_line","examples/pylab_examples/dolphin","examples/pylab_examples/table_demo","examples/pylab_examples/figlegend_demo","api/path_api","examples/api/donut_demo","examples/misc/rec_join_demo","contents","api/legend_api","examples/pylab_examples/fancybox_demo2","users/text_props","devel/gitwash/git_development","examples/pylab_examples/contourf_hatching","examples/old_animation/animation_blit_qt4","examples/units/bar_demo2","examples/pylab_examples/scatter_hist","examples/pylab_examples/step_demo","examples/pylab_examples/major_minor_demo2","examples/pylab_examples/major_minor_demo1","users/pyplot_tutorial","examples/pylab_examples/hist_colormapped","examples/subplots_axes_and_figures/subplot_demo","examples/pylab_examples/legend_auto","examples/pylab_examples/fancytextbox_demo","examples/pylab_examples/usetex_demo","examples/pylab_examples/tricontour_smooth_user","examples/api/font_family_rc","examples/old_animation/index","examples/old_animation/dynamic_image_wxagg2","api/font_manager_api","examples/event_handling/zoom_window","examples/api/sankey_demo_old","examples/pylab_examples/trigradient_demo","examples/pylab_examples/quiver_demo","examples/old_animation/draggable_legend","examples/old_animation/histogram_tkagg","api/pyplot_api","examples/pylab_examples/marker_path","examples/units/units_scatter","api/backend_bases_api","examples/mplot3d/subplot3d_demo","devel/gitwash/forking_hell","examples/axes_grid/simple_axesgrid2","examples/pylab_examples/tripcolor_demo","examples/old_animation/animation_blit_qt","users/installing","examples/pylab_examples/text_rotation_relative_to_line","examples/event_handling/looking_glass","examples/mplot3d/surface3d_demo2","examples/mplot3d/surface3d_demo3","examples/pylab_examples/stem_plot","examples/pylab_examples/matplotlib_icon","examples/mplot3d/pathpatch3d_demo","examples/pylab_examples/loadrec","api/mathtext_api","devel/gitwash/git_install","examples/units/basic_units","examples/animation/animate_decay","examples/api/logo2","users/pgf","examples/pylab_examples/tex_demo","examples/ticks_and_spines/spines_demo_dropped","examples/api/two_scales","examples/pylab_examples/psd_demo_complex","examples/mplot3d/wire3d_animation_demo","examples/pylab_examples/image_interp","examples/user_interfaces/embedding_in_qt","examples/mplot3d/2dcollections3d_demo","mpl_toolkits/axes_grid/api/axis_artist_api","examples/pylab_examples/fill_spiral","mpl_toolkits/mplot3d/faq","examples/pylab_examples/centered_ticklabels","glossary/index","examples/pylab_examples/to_numeric","examples/old_animation/animation_blit_gtk","examples/api/agg_oo","examples/user_interfaces/embedding_in_wx3","examples/user_interfaces/embedding_in_wx2","examples/pylab_examples/log_bar","users/navigation_toolbar","examples/user_interfaces/embedding_in_wx5","examples/user_interfaces/embedding_in_wx4","users/transforms_tutorial","examples/user_interfaces/fourier_demo_wx","examples/pylab_examples/stackplot_demo","examples/pylab_examples/image_nonuniform","examples/pylab_examples/scatter_symbol","examples/pylab_examples/nan_test","examples/widgets/menu","users/event_handling","users/artists","mpl_toolkits/mplot3d/api","examples/units/index","examples/user_interfaces/embedding_in_gtk3_panzoom","devel/testing","users/intro","users/mathtext","examples/pylab_examples/annotation_demo2","examples/pylab_examples/annotation_demo3","devel/add_new_projection","examples/pylab_examples/hist2d_demo","examples/text_labels_and_annotations/index","examples/api/date_demo","examples/statistics/errorbar_demo_features","api/cm_api","examples/misc/font_indexing","examples/shapes_and_collections/index","examples/pylab_examples/vline_hline_demo","examples/pylab_examples/legend_demo_custom_handler","examples/animation/simple_3danim","examples/pylab_examples/fonts_demo","examples/widgets/multicursor","examples/animation/strip_chart_demo","examples/mplot3d/trisurf3d_demo2","examples/pylab_examples/color_by_yvalue","examples/pylab_examples/layer_images","examples/widgets/buttons","examples/pylab_examples/dashpointlabel","examples/subplots_axes_and_figures/index","examples/old_animation/simple_anim_gtk","examples/event_handling/idle_and_timeout","users/shell","examples/user_interfaces/mathtext_wx","examples/pylab_examples/simple_plot","examples/user_interfaces/rec_edit_gtk_custom","api/axis_api","examples/widgets/slider_demo","users/path_tutorial","examples/api/image_zcoord","examples/axes_grid/demo_parasite_axes2","examples/misc/svg_filter_pie","examples/pylab_examples/date_demo_rrule","examples/user_interfaces/gtk_spreadsheet","examples/pylab_examples/demo_text_rotation_mode","examples/pylab_examples/contour_demo","examples/misc/rc_traits","examples/mplot3d/surface3d_radial_demo","api/type1font","examples/pylab_examples/xcorr_demo","examples/units/units_sample","examples/pylab_examples/shared_axis_demo","examples/user_interfaces/lineprops_dialog_gtk","examples/mplot3d/scatter3d_demo","mpl_toolkits/axes_grid/users/axisartist","users/customizing","examples/color/colormaps_reference","examples/ticks_and_spines/index","examples/axes_grid/demo_floating_axes","examples/pylab_examples/log_test","examples/misc/index","examples/event_handling/test_mouseclicks","examples/pylab_examples/filledmarker_demo","examples/pylab_examples/stock_demo","examples/pylab_examples/fonts_demo_kw","users/text_intro","examples/animation/double_pendulum_animated","examples/pylab_examples/image_demo","examples/event_handling/close_event","examples/pylab_examples/contourf_log","examples/old_animation/dynamic_image_gtkagg","api/index","examples/pylab_examples/csd_demo","examples/pylab_examples/set_and_get","examples/user_interfaces/pylab_with_gtk","examples/pylab_examples/date_index_formatter","users/image_tutorial","examples/pylab_examples/pie_demo2","examples/pylab_examples/pcolor_small","examples/pylab_examples/matshow","examples/user_interfaces/embedding_in_tk2","examples/pylab_examples/barchart_demo","examples/pylab_examples/demo_ribbon_box","examples/user_interfaces/embedding_in_tk","users/gridspec","mpl_toolkits/mplot3d/index","users/tight_layout_guide","devel/transformations","examples/pylab_examples/scatter_demo2","examples/api/barchart_demo","examples/pylab_examples/subplot_demo","examples/pylab_examples/demo_text_path","users/credits","users/screenshots","examples/mplot3d/text3d_demo","users/recipes","mpl_toolkits/axes_grid/users/axes_divider","examples/pylab_examples/dannys_example","examples/pylab_examples/logo","mpl_toolkits/axes_grid/api/axes_size_api","examples/mplot3d/lines3d_demo","api/markers_api","examples/user_interfaces/wxcursor_demo","mpl_toolkits/axes_grid/users/overview","examples/mplot3d/bars3d_demo","examples/units/ellipse_with_units","examples/axes_grid/inset_locator_demo","examples/api/engineering_formatter","examples/pylab_examples/eventplot_demo","examples/misc/developer_commit_history","examples/api/unicode_minus","examples/lines_bars_and_markers/barh_demo","examples/mplot3d/contour3d_demo","examples/specialty_plots/hinton_demo","examples/animation/index","examples/pylab_examples/contour_label_demo","examples/pylab_examples/spine_placement_demo","faq/troubleshooting_faq","examples/tests/backend_driver","examples/mplot3d/lorenz_attractor","examples/pylab_examples/print_stdout","mpl_toolkits/axes_grid/index","examples/pylab_examples/data_helper","examples/pylab_examples/webapp_demo","examples/axes_grid/parasite_simple2","examples/event_handling/pick_event_demo2","examples/pylab_examples/agg_buffer_to_array","examples/pylab_examples/fancyarrow_demo","examples/event_handling/keypress_demo","examples/api/demo_affine_image","examples/pylab_examples/pcolor_demo","examples/misc/sample_data_demo","examples/pylab_examples/arrow_simple_demo","examples/pylab_examples/manual_axis","examples/axes_grid/demo_axes_grid2","examples/old_animation/animation_blit_fltk","examples/user_interfaces/rec_edit_gtk_simple","examples/pylab_examples/boxplot_demo","examples/pylab_examples/arrow_demo","examples/pylab_examples/symlog_demo","examples/pylab_examples/geo_demo","examples/pylab_examples/errorbar_limits","examples/pylab_examples/axes_props","examples/pylab_examples/hatch_demo","examples/user_interfaces/svg_histogram","api/mlab_api","devel/gitwash/patching","examples/api/patch_collection","examples/pylab_examples/axhspan_demo","examples/pylab_examples/aspect_loglog","api/pyplot_summary","examples/pylab_examples/barchart_demo2","api/colors_api","examples/widgets/lasso_selector_demo","examples/pylab_examples/multiline","examples/pylab_examples/load_converter","examples/pylab_examples/ellipse_collection","examples/user_interfaces/embedding_in_qt4_wtoolbar","examples/axes_grid/demo_axes_grid","examples/pylab_examples/ellipse_rotated","examples/user_interfaces/mpl_with_glade","examples/pylab_examples/colorbar_tick_labelling_demo","examples/pylab_examples/subplot_toolbar","examples/api/sankey_demo_basics","api/backend_gtkagg_api","examples/misc/contour_manual","examples/old_animation/simple_idle_wx","examples/pylab_examples/legend_translucent","devel/gitwash/index","examples/pylab_examples/axis_equal_demo","examples/pylab_examples/alignment_test","examples/pylab_examples/colours","examples/animation/simple_anim","examples/mplot3d/contour3d_demo2","examples/pylab_examples/zorder_demo","examples/api/font_file","examples/pylab_examples/text_rotation","examples/pylab_examples/subplots_demo","examples/api/custom_projection_example","examples/pylab_examples/shared_axis_across_figures","api/ticker_api","examples/widgets/radio_buttons","examples/user_interfaces/histogram_demo_canvasagg","users/index","examples/pylab_examples/movie_demo","examples/pylab_examples/mri_with_eeg","devel/gitwash/set_up_fork","examples/user_interfaces/index","examples/pylab_examples/demo_annotation_box","examples/pylab_examples/legend_demo2","examples/pylab_examples/legend_demo3","examples/mplot3d/index","examples/api/colorbar_only","examples/pylab_examples/legend_demo4","api/afm_api","examples/pylab_examples/histogram_demo_extended","users/usetex","examples/api/custom_scale_example","api/spines_api","examples/api/watermark_image","examples/pylab_examples/hexbin_demo2","examples/pylab_examples/custom_ticker1","examples/misc/ftface_props","users/annotations_intro","api/index_backend_api","examples/pylab_examples/hist2d_log_demo","mpl_toolkits/axes_grid/api/axes_grid_api","mpl_toolkits/axes_grid/api/index","examples/api/scatter_piecharts","examples/pylab_examples/usetex_fonteffects","examples/user_interfaces/svg_tooltip","examples/animation/dynamic_image","examples/event_handling/index","examples/pylab_examples/specgram_demo","mpl_toolkits/index","examples/user_interfaces/embedding_in_gtk","examples/misc/rasterization_demo","examples/axes_grid/simple_axesgrid","examples/images_contours_and_fields/streamplot_demo_masking","faq/howto_faq","examples/axes_grid/demo_curvelinear_grid2","examples/pylab_examples/bar_stacked","examples/old_animation/dynamic_collection","examples/pylab_examples/accented_text","examples/pylab_examples/log_demo","examples/images_contours_and_fields/index","examples/widgets/rectangle_selector","examples/old_animation/strip_chart_demo","examples/pylab_examples/triinterp_demo","api/backend_qt4agg_api","examples/pylab_examples/toggle_images","examples/pylab_examples/demo_tight_layout","api/animation_api","examples/user_interfaces/interactive","users/annotations_guide","examples/shapes_and_collections/path_patch_demo","examples/pylab_examples/custom_cmap","examples/pylab_examples/boxplot_demo2","examples/pylab_examples/boxplot_demo3","examples/api/line_with_text","examples/pie_and_polar_charts/pie_demo_features","devel/gitwash/dot2_dot3","examples/event_handling/path_editor"],titles:["pylab_examples example code: clippedline.py","pylab_examples example code: shading_example.py","pylab_examples example code: custom_figure_class.py","old_animation example code: simple_timer_wx.py","widgets example code: check_buttons.py","axes","pylab_examples example code: line_collection2.py","Installation","pylab_examples example code: color_demo.py","animation example code: basic_example.py","git resources","pylab_examples example code: line_collection.py","axes_grid example code: demo_floating_axis.py","axes_grid example code: demo_axes_divider.py","api example code: legend_demo.py","pylab_examples example code: scatter_star_poly.py","event_handling example code: pong_qt.py","pylab_examples example code: quadmesh_demo.py","statistics example code: errorbar_demo.py","pylab_examples example code: broken_axis.py","pylab_examples example code: titles_demo.py","matplotlib.backends.backend_wxagg","sankey","old_animation example code: animation_blit_wx.py","units example code: evans_test.py","pylab_examples example code: ganged_plots.py","pylab_examples example code: pstest.py","mplot3d example code: trisurf3d_demo.py","The Matplotlib Developers’ Guide","pylab_examples example code: legend_demo.py","misc example code: tight_bbox_test.py","pylab_examples example code: cursor_demo.py","animation example code: bayes_update.py","pylab_examples example code: demo_bboximage.py","widgets example code: span_selector.py","pylab_examples example code: polar_demo.py","event_handling example code: legend_picking.py","mplot3d example code: surface3d_demo.py","cbook","api example code: bbox_intersect.py","The Matplotlib FAQ","pylab_examples example code: image_demo2.py","event_handling example code: poly_editor.py","event_handling example code: pong_gtk.py","misc example code: longshort.py","pylab_examples example code: psd_demo3.py","pylab_examples example code: psd_demo2.py","specialty_plots Examples","old_animation example code: gtk_timeout.py","animation example code: dynamic_image2.py","event_handling example code: pipong.py","pylab_examples example code: font_table_ttf.py","lines_bars_and_markers example code: line_demo_dash_control.py","pylab_examples example code: patheffect_demo.py","event_handling example code: data_browser.py","api example code: date_index_formatter.py","ticks_and_spines example code: spines_demo.py","Development workflow","pylab_examples example code: pythonic_matplotlib.py","color Examples","pylab_examples example code: multipage_pdf.py","pylab_examples example code: tricontour_demo.py","pylab_examples example code: mathtext_examples.py","pylab_examples example code: multiple_yaxis_with_spines.py","pylab_examples example code: contour_image.py","axes_grid example code: inset_locator_demo2.py","animation example code: basic_example_writer.py","api example code: fahrenheit_celsius_scales.py","animation example code: histogram.py","pylab_examples example code: stackplot_demo2.py","pylab_examples example code: customize_rc.py","mplot3d example code: mixed_subplots_demo.py","pie_and_polar_charts example code: polar_scatter_demo.py","pylab_examples example code: figimage_demo.py","units","api example code: sankey_demo_links.py","user_interfaces example code: embedding_in_qt4.py","pylab_examples example code: axes_zoom_effect.py","pylab_examples example code: ellipse_demo.py","pylab_examples example code: figure_title.py","units example code: radian_demo.py","text_labels_and_annotations example code: text_demo_fontdict.py","pylab_examples example code: stix_fonts_demo.py","API Changes","mplot3d example code: contour3d_demo3.py","The top level matplotlib module","pylab_examples example code: coords_demo.py","misc example code: svg_filter_line.py","pylab_examples example code: ginput_manual_clabel.py","pylab_examples example code: image_origin.py","pylab_examples example code: griddata_demo.py","api example code: histogram_path_demo.py","widgets","api example code: span_regions.py","axes_grid example code: demo_edge_colorbar.py","matplotlib.backends.backend_pdf","triangular grids","pylab_examples example code: scatter_profile.py","The Matplotlib AxesGrid Toolkit User’s Guide","shapes_and_collections example code: artist_reference.py","axes_grid example code: demo_curvelinear_grid.py","axes_grid example code: simple_axisline4.py","statistics Examples","Coding guide","widgets example code: cursor.py","lines_bars_and_markers example code: fill_demo_features.py","pylab_examples example code: errorbar_subsample.py","Licenses","pylab_examples example code: fill_betweenx_demo.py","old_animation example code: animation_blit_tk.py","event_handling example code: resample.py","pylab_examples example code: date_demo2.py","pylab_examples example code: date_demo1.py","pylab_examples example code: psd_demo.py","pylab_examples example code: broken_barh.py","pylab_examples example code: scatter_custom_symbol.py","pylab_examples example code: anscombe.py","mplot3d tutorial","Working with text","images_contours_and_fields example code: image_demo_clip_path.py","gridspec","colorbar","Legend guide","axes_grid example code: make_room_for_ylabel_using_axesgrid.py","pylab_examples example code: ginput_demo.py","user_interfaces example code: embedding_in_gtk3.py","user_interfaces example code: embedding_in_gtk2.py","images_contours_and_fields example code: streamplot_demo_features.py","axes_grid example code: simple_anchored_artists.py","mplot3d example code: hist3d_demo.py","pylab_examples example code: masked_demo.py","axes_grid example code: demo_axisline_style.py","pylab_examples example code: scatter_masked.py","Environment Variables","old_animation example code: animate_decay_tk_blit.py","axes_grid Examples","pylab_examples example code: triplot_demo.py","images_contours_and_fields example code: pcolormesh_levels.py","pylab_examples example code: line_styles.py","old_animation example code: simple_anim_tkagg.py","pylab_examples example code: legend_scatter.py","pylab_examples example code: simple_plot_fps.py","pylab_examples example code: axes_demo.py","widgets Examples","Usage","pylab_examples example code: mathtext_demo.py","axes_grid example code: demo_axes_rgb.py","pylab_examples example code: interp_demo.py","shapes_and_collections example code: scatter_demo.py","figure","pylab_examples example code: anchored_artists.py","api example code: joinstyle.py","event_handling example code: timers.py","matplotlib.dviread","pylab_examples example code: arctest.py","api example code: mathtext_asarray.py","event_handling example code: lasso_demo.py","pylab_examples example code: coords_report.py","color example code: color_cycle_demo.py","misc example code: rec_groupby_demo.py","pylab_examples example code: tricontour_smooth_delaunay.py","pylab_examples example code: demo_agg_filter.py","animation example code: random_data.py","pylab_examples example code: mri_demo.py","pylab_examples example code: break.py","text_labels_and_annotations example code: unicode_demo.py","tight_layout","pylab_examples example code: hyperlinks.py","dates","animation example code: subplots.py","pylab_examples example code: tex_unicode_demo.py","misc example code: multiprocess.py","pylab_examples example code: hexbin_demo.py","pylab_examples example code: image_masked.py","axes_grid example code: demo_colorbar_with_inset_locator.py","api example code: quad_bezier.py","mplot3d example code: rotate_axes3d_demo.py","api example code: radar_chart.py","units example code: bar_unit_demo.py","user_interfaces example code: interactive2.py","pie_and_polar_charts Examples","pylab_examples example code: contourf_demo.py","event_handling example code: trifinder_event_demo.py","pylab_examples example code: system_monitor.py","ticks_and_spines example code: ticklabels_demo_rotation.py","mplot3d example code: contourf3d_demo.py","api Examples","api example code: compound_path.py","pylab_examples example code: pcolor_log.py","mplot3d example code: wire3d_demo.py","mpl_toolkits.axes_grid.axes_divider","pylab_examples example code: date_demo_convert.py","pylab_examples example code: cohere_demo.py","pylab_examples example code: tricontour_vs_griddata.py","pylab_examples example code: animation_demo.py","pylab_examples example code: polar_legend.py","ticks_and_spines example code: spines_demo_bounds.py","pylab_examples example code: eventcollection_demo.py","units example code: artist_tests.py","Configure git","Matplotlib Examples","pylab_examples example code: gradient_bar.py","pylab_examples example code: invert_axes.py","axes_grid example code: scatter_hist.py","mplot3d example code: contourf3d_demo2.py","api example code: collections_demo.py","pylab_examples example code: multiple_figs_demo.py","Following the latest source","pylab_examples example code: transoffset.py","statistics example code: histogram_demo_features.py","pylab_examples example code: image_slices_viewer.py","mplot3d example code: polys3d_demo.py","pylab_examples example code: image_clip_path.py","pylab_examples example code: equal_aspect_ratio.py","Documenting matplotlib","pylab_examples example code: barcode_demo.py","pylab_examples Examples","api example code: sankey_demo_rankine.py","animation example code: moviewriter.py","lines_bars_and_markers Examples","mplot3d example code: offset_demo.py","pylab_examples example code: text_handles.py","pylab_examples example code: finance_work2.py","pylab_examples example code: fill_between_demo.py","License","pylab_examples example code: newscalarformatter_demo.py","showcase example code: integral_demo.py","showcase Examples","Doing a matplotlib release","old_animation example code: movie_demo.py","tests Examples","pylab_examples example code: finance_demo.py","pylab_examples example code: spy_demos.py","misc example code: image_thumbnail.py","axes_grid example code: demo_axes_hbox_divider.py","Github stats","pylab_examples example code: findobj_demo.py","Introduction","pylab_examples example code: annotation_demo.py","old_animation example code: animation_blit_gtk2.py","event_handling example code: viewlims.py","pylab_examples example code: histogram_percent_demo.py","event_handling example code: pick_event_demo.py","collections","pylab_examples example code: subplots_adjust.py","event_handling example code: figure_axes_enter_leave.py","pylab_examples example code: barb_demo.py","pylab_examples example code: fancybox_demo.py","artists","pylab_examples example code: usetex_baseline_test.py","pylab_examples example code: multi_image.py","pie_and_polar_charts example code: polar_bar_demo.py","images_contours_and_fields example code: image_demo.py","lines_bars_and_markers example code: fill_demo.py","pylab_examples example code: plotfile_demo.py","api example code: watermark_text.py","units example code: annotate_with_units.py","What’s new in matplotlib","pylab_examples example code: multicolored_line.py","pylab_examples example code: dolphin.py","pylab_examples example code: table_demo.py","pylab_examples example code: figlegend_demo.py","path","api example code: donut_demo.py","misc example code: rec_join_demo.py","Overview","legend","pylab_examples example code: fancybox_demo2.py","Text properties and layout","Git for development","pylab_examples example code: contourf_hatching.py","old_animation example code: animation_blit_qt4.py","units example code: bar_demo2.py","pylab_examples example code: scatter_hist.py","pylab_examples example code: step_demo.py","pylab_examples example code: major_minor_demo2.py","pylab_examples example code: major_minor_demo1.py","Pyplot tutorial","pylab_examples example code: hist_colormapped.py","subplots_axes_and_figures example code: subplot_demo.py","pylab_examples example code: legend_auto.py","pylab_examples example code: fancytextbox_demo.py","pylab_examples example code: usetex_demo.py","pylab_examples example code: tricontour_smooth_user.py","api example code: font_family_rc.py","old_animation Examples","old_animation example code: dynamic_image_wxagg2.py","font_manager","event_handling example code: zoom_window.py","api example code: sankey_demo_old.py","pylab_examples example code: trigradient_demo.py","pylab_examples example code: quiver_demo.py","old_animation example code: draggable_legend.py","old_animation example code: histogram_tkagg.py","pyplot","pylab_examples example code: marker_path.py","units example code: units_scatter.py","matplotlib.backend_bases","mplot3d example code: subplot3d_demo.py","Making your own copy (fork) of matplotlib","axes_grid example code: simple_axesgrid2.py","pylab_examples example code: tripcolor_demo.py","old_animation example code: animation_blit_qt.py","Installing","pylab_examples example code: text_rotation_relative_to_line.py","event_handling example code: looking_glass.py","mplot3d example code: surface3d_demo2.py","mplot3d example code: surface3d_demo3.py","pylab_examples example code: stem_plot.py","pylab_examples example code: matplotlib_icon.py","mplot3d example code: pathpatch3d_demo.py","pylab_examples example code: loadrec.py","mathtext","Install git","units example code: basic_units.py","animation example code: animate_decay.py","api example code: logo2.py","Typesetting With XeLaTeX/LuaLaTeX","pylab_examples example code: tex_demo.py","ticks_and_spines example code: spines_demo_dropped.py","api example code: two_scales.py","pylab_examples example code: psd_demo_complex.py","mplot3d example code: wire3d_animation_demo.py","pylab_examples example code: image_interp.py","user_interfaces example code: embedding_in_qt.py","mplot3d example code: 2dcollections3d_demo.py","mpl_toolkits.axes_grid.axis_artist","pylab_examples example code: fill_spiral.py","mplot3d FAQ","pylab_examples example code: centered_ticklabels.py","Glossary","pylab_examples example code: to_numeric.py","old_animation example code: animation_blit_gtk.py","api example code: agg_oo.py","user_interfaces example code: embedding_in_wx3.py","user_interfaces example code: embedding_in_wx2.py","pylab_examples example code: log_bar.py","Interactive navigation","user_interfaces example code: embedding_in_wx5.py","user_interfaces example code: embedding_in_wx4.py","Transformations Tutorial","user_interfaces example code: fourier_demo_wx.py","pylab_examples example code: stackplot_demo.py","pylab_examples example code: image_nonuniform.py","pylab_examples example code: scatter_symbol.py","pylab_examples example code: nan_test.py","widgets example code: menu.py","Event handling and picking","Artist tutorial","mplot3d API","units Examples","user_interfaces example code: embedding_in_gtk3_panzoom.py","Testing","Introduction","Writing mathematical expressions","pylab_examples example code: annotation_demo2.py","pylab_examples example code: annotation_demo3.py","Adding new scales and projections to matplotlib","pylab_examples example code: hist2d_demo.py","text_labels_and_annotations Examples","api example code: date_demo.py","statistics example code: errorbar_demo_features.py","cm (colormap)","misc example code: font_indexing.py","shapes_and_collections Examples","pylab_examples example code: vline_hline_demo.py","pylab_examples example code: legend_demo_custom_handler.py","animation example code: simple_3danim.py","pylab_examples example code: fonts_demo.py","widgets example code: multicursor.py","animation example code: strip_chart_demo.py","mplot3d example code: trisurf3d_demo2.py","pylab_examples example code: color_by_yvalue.py","pylab_examples example code: layer_images.py","widgets example code: buttons.py","pylab_examples example code: dashpointlabel.py","subplots_axes_and_figures Examples","old_animation example code: simple_anim_gtk.py","event_handling example code: idle_and_timeout.py","Using matplotlib in a python shell","user_interfaces example code: mathtext_wx.py","pylab_examples example code: simple_plot.py","user_interfaces example code: rec_edit_gtk_custom.py","axis","widgets example code: slider_demo.py","Path Tutorial","api example code: image_zcoord.py","axes_grid example code: demo_parasite_axes2.py","misc example code: svg_filter_pie.py","pylab_examples example code: date_demo_rrule.py","user_interfaces example code: gtk_spreadsheet.py","pylab_examples example code: demo_text_rotation_mode.py","pylab_examples example code: contour_demo.py","misc example code: rc_traits.py","mplot3d example code: surface3d_radial_demo.py","matplotlib.type1font","pylab_examples example code: xcorr_demo.py","units example code: units_sample.py","pylab_examples example code: shared_axis_demo.py","user_interfaces example code: lineprops_dialog_gtk.py","mplot3d example code: scatter3d_demo.py","AXISARTIST namespace","Customizing matplotlib","color example code: colormaps_reference.py","ticks_and_spines Examples","axes_grid example code: demo_floating_axes.py","pylab_examples example code: log_test.py","misc Examples","event_handling example code: test_mouseclicks.py","pylab_examples example code: filledmarker_demo.py","pylab_examples example code: stock_demo.py","pylab_examples example code: fonts_demo_kw.py","Text introduction","animation example code: double_pendulum_animated.py","pylab_examples example code: image_demo.py","event_handling example code: close_event.py","pylab_examples example code: contourf_log.py","old_animation example code: dynamic_image_gtkagg.py","The Matplotlib API","pylab_examples example code: csd_demo.py","pylab_examples example code: set_and_get.py","user_interfaces example code: pylab_with_gtk.py","pylab_examples example code: date_index_formatter.py","Image tutorial","pylab_examples example code: pie_demo2.py","pylab_examples example code: pcolor_small.py","pylab_examples example code: matshow.py","user_interfaces example code: embedding_in_tk2.py","pylab_examples example code: barchart_demo.py","pylab_examples example code: demo_ribbon_box.py","user_interfaces example code: embedding_in_tk.py","Customizing Location of Subplot Using GridSpec","mplot3d","Tight Layout guide","Working with transformations","pylab_examples example code: scatter_demo2.py","api example code: barchart_demo.py","pylab_examples example code: subplot_demo.py","pylab_examples example code: demo_text_path.py","Credits","Screenshots","mplot3d example code: text3d_demo.py","Our Favorite Recipes","AxesDivider","pylab_examples example code: dannys_example.py","pylab_examples example code: logo.py","mpl_toolkits.axes_grid.axes_size","mplot3d example code: lines3d_demo.py","matplotlib.markers","user_interfaces example code: wxcursor_demo.py","Overview of AxesGrid toolkit","mplot3d example code: bars3d_demo.py","units example code: ellipse_with_units.py","axes_grid example code: inset_locator_demo.py","api example code: engineering_formatter.py","pylab_examples example code: eventplot_demo.py","misc example code: developer_commit_history.py","api example code: unicode_minus.py","lines_bars_and_markers example code: barh_demo.py","mplot3d example code: contour3d_demo.py","specialty_plots example code: hinton_demo.py","animation Examples","pylab_examples example code: contour_label_demo.py","pylab_examples example code: spine_placement_demo.py","Troubleshooting","tests example code: backend_driver.py","mplot3d example code: lorenz_attractor.py","pylab_examples example code: print_stdout.py","Matplotlib AxesGrid Toolkit","pylab_examples example code: data_helper.py","pylab_examples example code: webapp_demo.py","axes_grid example code: parasite_simple2.py","event_handling example code: pick_event_demo2.py","pylab_examples example code: agg_buffer_to_array.py","pylab_examples example code: fancyarrow_demo.py","event_handling example code: keypress_demo.py","api example code: demo_affine_image.py","pylab_examples example code: pcolor_demo.py","misc example code: sample_data_demo.py","pylab_examples example code: arrow_simple_demo.py","pylab_examples example code: manual_axis.py","axes_grid example code: demo_axes_grid2.py","old_animation example code: animation_blit_fltk.py","user_interfaces example code: rec_edit_gtk_simple.py","pylab_examples example code: boxplot_demo.py","pylab_examples example code: arrow_demo.py","pylab_examples example code: symlog_demo.py","pylab_examples example code: geo_demo.py","pylab_examples example code: errorbar_limits.py","pylab_examples example code: axes_props.py","pylab_examples example code: hatch_demo.py","user_interfaces example code: svg_histogram.py","mlab","Making a patch","api example code: patch_collection.py","pylab_examples example code: axhspan_demo.py","pylab_examples example code: aspect_loglog.py","Plotting commands summary","pylab_examples example code: barchart_demo2.py","colors","widgets example code: lasso_selector_demo.py","pylab_examples example code: multiline.py","pylab_examples example code: load_converter.py","pylab_examples example code: ellipse_collection.py","user_interfaces example code: embedding_in_qt4_wtoolbar.py","axes_grid example code: demo_axes_grid.py","pylab_examples example code: ellipse_rotated.py","user_interfaces example code: mpl_with_glade.py","pylab_examples example code: colorbar_tick_labelling_demo.py","pylab_examples example code: subplot_toolbar.py","api example code: sankey_demo_basics.py","matplotlib.backends.backend_gtkagg","misc example code: contour_manual.py","old_animation example code: simple_idle_wx.py","pylab_examples example code: legend_translucent.py","Working with matplotlib source code","pylab_examples example code: axis_equal_demo.py","pylab_examples example code: alignment_test.py","pylab_examples example code: colours.py","animation example code: simple_anim.py","mplot3d example code: contour3d_demo2.py","pylab_examples example code: zorder_demo.py","api example code: font_file.py","pylab_examples example code: text_rotation.py","pylab_examples example code: subplots_demo.py","api example code: custom_projection_example.py","pylab_examples example code: shared_axis_across_figures.py","ticker","widgets example code: radio_buttons.py","user_interfaces example code: histogram_demo_canvasagg.py","User’s Guide","pylab_examples example code: movie_demo.py","pylab_examples example code: mri_with_eeg.py","Set up your fork","user_interfaces Examples","pylab_examples example code: demo_annotation_box.py","pylab_examples example code: legend_demo2.py","pylab_examples example code: legend_demo3.py","mplot3d Examples","api example code: colorbar_only.py","pylab_examples example code: legend_demo4.py","afm (Adobe Font Metrics interface)","pylab_examples example code: histogram_demo_extended.py","Text rendering With LaTeX","api example code: custom_scale_example.py","spines","api example code: watermark_image.py","pylab_examples example code: hexbin_demo2.py","pylab_examples example code: custom_ticker1.py","misc example code: ftface_props.py","Annotating text","backends","pylab_examples example code: hist2d_log_demo.py","mpl_toolkits.axes_grid.axes_grid","The Matplotlib AxesGrid Toolkit API","api example code: scatter_piecharts.py","pylab_examples example code: usetex_fonteffects.py","user_interfaces example code: svg_tooltip.py","animation example code: dynamic_image.py","event_handling Examples","pylab_examples example code: specgram_demo.py","Toolkits","user_interfaces example code: embedding_in_gtk.py","misc example code: rasterization_demo.py","axes_grid example code: simple_axesgrid.py","images_contours_and_fields example code: streamplot_demo_masking.py","How-To","axes_grid example code: demo_curvelinear_grid2.py","pylab_examples example code: bar_stacked.py","old_animation example code: dynamic_collection.py","pylab_examples example code: accented_text.py","pylab_examples example code: log_demo.py","images_contours_and_fields Examples","widgets example code: rectangle_selector.py","old_animation example code: strip_chart_demo.py","pylab_examples example code: triinterp_demo.py","matplotlib.backends.backend_qt4agg","pylab_examples example code: toggle_images.py","pylab_examples example code: demo_tight_layout.py","animation","user_interfaces example code: interactive.py","Annotating Axes","shapes_and_collections example code: path_patch_demo.py","pylab_examples example code: custom_cmap.py","pylab_examples example code: boxplot_demo2.py","pylab_examples example code: boxplot_demo3.py","api example code: line_with_text.py","pie_and_polar_charts example code: pie_demo_features.py","Two and three dots in difference specs","event_handling example code: path_editor.py"],objects:{"":{PYTHONPATH:[133,0,1,"-"],HOME:[133,0,1,"-"],MPLCONFIGDIR:[133,0,1,"-"],matplotlib:[85,9,1,""],PATH:[133,0,1,"-"]},"matplotlib.transforms.TransformedPath":{get_transformed_points_and_affine:[434,10,1,""],get_transformed_path_and_affine:[434,10,1,""],get_fully_transformed_path:[434,10,1,""]},"matplotlib.artist.Artist":{get_clip_on:[248,10,1,""],set:[248,10,1,""],set_clip_on:[248,10,1,""],findobj:[248,10,1,""],convert_yunits:[248,10,1,""],remove_callback:[248,10,1,""],set_label:[248,10,1,""],get_picker:[248,10,1,""],get_rasterized:[248,10,1,""],get_figure:[248,10,1,""],draw:[248,10,1,""],get_contains:[248,10,1,""],contains:[248,10,1,""],convert_xunits:[248,10,1,""],set_agg_filter:[248,10,1,""],set_picker:[248,10,1,""],add_callback:[248,10,1,""],update_from:[248,10,1,""],have_units:[248,10,1,""],get_snap:[248,10,1,""],hitlist:[248,10,1,""],get_children:[248,10,1,""],properties:[248,10,1,""],set_animated:[248,10,1,""],get_agg_filter:[248,10,1,""],set_contains:[248,10,1,""],set_axes:[248,10,1,""],pchanged:[248,10,1,""],get_gid:[248,10,1,""],is_figure_set:[248,10,1,""],is_transform_set:[248,10,1,""],get_transformed_clip_path_and_affine:[248,10,1,""],get_label:[248,10,1,""],set_clip_box:[248,10,1,""],set_zorder:[248,10,1,""],get_transform:[248,10,1,""],set_clip_path:[248,10,1,""],get_clip_box:[248,10,1,""],get_visible:[248,10,1,""],update:[248,10,1,""],set_lod:[248,10,1,""],get_clip_path:[248,10,1,""],get_animated:[248,10,1,""],get_alpha:[248,10,1,""],aname:[248,13,1,""],set_snap:[248,10,1,""],set_figure:[248,10,1,""],get_zorder:[248,10,1,""],get_axes:[248,10,1,""],set_alpha:[248,10,1,""],get_url:[248,10,1,""],get_window_extent:[248,10,1,""],set_transform:[248,10,1,""],remove:[248,10,1,""],set_visible:[248,10,1,""],zorder:[248,13,1,""],set_url:[248,10,1,""],set_gid:[248,10,1,""],pick:[248,10,1,""],pickable:[248,10,1,""],set_rasterized:[248,10,1,""]},"matplotlib.animation.FFMpegFileWriter":{supported_formats:[579,13,1,""]},"matplotlib.afm.AFM":{get_horizontal_stem_width:[541,10,1,""],get_kern_dist_from_name:[541,10,1,""],get_weight:[541,10,1,""],get_bbox_char:[541,10,1,""],get_vertical_stem_width:[541,10,1,""],get_height_char:[541,10,1,""],string_width_height:[541,10,1,""],get_fontname:[541,10,1,""],get_angle:[541,10,1,""],get_str_bbox:[541,10,1,""],get_xheight:[541,10,1,""],get_width_from_char_name:[541,10,1,""],get_kern_dist:[541,10,1,""],get_underline_thickness:[541,10,1,""],get_name_char:[541,10,1,""],get_str_bbox_and_descent:[541,10,1,""],get_familyname:[541,10,1,""],get_fullname:[541,10,1,""],get_width_char:[541,10,1,""],get_capheight:[541,10,1,""]},"matplotlib.figure.AxesStack":{get:[149,10,1,""],remove:[149,10,1,""],add:[149,10,1,""],as_list:[149,10,1,""],bubble:[149,10,1,""],current_key_axes:[149,10,1,""]},"matplotlib.mathtext.MathtextBackendAgg":{get_results:[312,10,1,""],render_rect_filled:[312,10,1,""],render_glyph:[312,10,1,""],get_hinting_type:[312,10,1,""],set_canvas_size:[312,10,1,""]},"matplotlib.mathtext.StandardPsFonts":{basepath:[312,13,1,""],get_kern:[312,10,1,""],fontmap:[312,13,1,""],get_underline_thickness:[312,10,1,""],get_xheight:[312,10,1,""]},"matplotlib.animation.FFMpegBase":{exec_key:[579,13,1,""],output_args:[579,13,1,""],args_key:[579,13,1,""]},"matplotlib.transforms.TransformWrapper":{frozen:[434,10,1,""],set:[434,10,1,""]},"matplotlib.axis.YTick":{update_position:[383,10,1,""],apply_tickdir:[383,10,1,""],get_view_interval:[383,10,1,""]},"matplotlib.collections.TriMesh":{get_paths:[243,10,1,""],draw:[243,10,1,""],set_paths:[243,10,1,""],convert_mesh_to_paths:[243,14,1,""]},"matplotlib.patches.ConnectionStyle.Bar":{connect:[248,10,1,""]},"matplotlib.backend_bases.RendererBase":{get_image_magnification:[297,10,1,""],get_texmanager:[297,10,1,""],flipy:[297,10,1,""],draw_gouraud_triangles:[297,10,1,""],stop_rasterizing:[297,10,1,""],stop_filter:[297,10,1,""],draw_image:[297,10,1,""],points_to_pixels:[297,10,1,""],draw_tex:[297,10,1,""],draw_path_collection:[297,10,1,""],start_rasterizing:[297,10,1,""],strip_math:[297,10,1,""],new_gc:[297,10,1,""],option_scale_image:[297,10,1,""],start_filter:[297,10,1,""],option_image_nocomposite:[297,10,1,""],draw_quad_mesh:[297,10,1,""],open_group:[297,10,1,""],draw_path:[297,10,1,""],close_group:[297,10,1,""],draw_gouraud_triangle:[297,10,1,""],get_canvas_width_height:[297,10,1,""],draw_text:[297,10,1,""],draw_markers:[297,10,1,""],get_text_width_height_descent:[297,10,1,""]},"mpl_toolkits.mplot3d.art3d.Poly3DCollection":{get_edgecolor:[349,10,1,""],get_facecolor:[349,10,1,""],draw:[349,10,1,""],set_3d_properties:[349,10,1,""],set_edgecolor:[349,10,1,""],set_edgecolors:[349,10,1,""],do_3d_projection:[349,10,1,""],set_sort_zpos:[349,10,1,""],set_verts:[349,10,1,""],set_zsort:[349,10,1,""],set_facecolor:[349,10,1,""],set_facecolors:[349,10,1,""],get_vector:[349,10,1,""],get_edgecolors:[349,10,1,""],get_facecolors:[349,10,1,""]},"matplotlib.backend_bases":{IdleEvent:[297,11,1,""],FigureCanvasBase:[297,11,1,""],register_backend:[297,12,1,""],KeyEvent:[297,11,1,""],PickEvent:[297,11,1,""],NavigationToolbar2:[297,11,1,""],FigureManagerBase:[297,11,1,""],key_press_handler:[297,12,1,""],CloseEvent:[297,11,1,""],TimerBase:[297,11,1,""],GraphicsContextBase:[297,11,1,""],RendererBase:[297,11,1,""],LocationEvent:[297,11,1,""],ShowBase:[297,11,1,""],Cursors:[297,11,1,""],MouseEvent:[297,11,1,""],DrawEvent:[297,11,1,""],NonGuiException:[297,16,1,""],ResizeEvent:[297,11,1,""],Event:[297,11,1,""]},"matplotlib.backends.backend_wxagg.FigureCanvasWxAgg":{filetypes:[21,13,1,""],draw:[21,10,1,""],print_figure:[21,10,1,""],blit:[21,10,1,""]},"matplotlib.colors":{Normalize:[499,11,1,""],LightSource:[499,11,1,""],LogNorm:[499,11,1,""],Colormap:[499,11,1,""],ListedColormap:[499,11,1,""],ColorConverter:[499,11,1,""],makeMappingArray:[499,12,1,""],NoNorm:[499,11,1,""],no_norm:[499,13,1,""],rgb_to_hsv:[499,12,1,""],SymLogNorm:[499,11,1,""],normalize:[499,13,1,""],BoundaryNorm:[499,11,1,""],hsv_to_rgb:[499,12,1,""],hex2color:[499,12,1,""],rgb2hex:[499,12,1,""],LinearSegmentedColormap:[499,11,1,""],is_color_like:[499,12,1,""]},"matplotlib.spines.Spine":{draw:[545,10,1,""],linear_spine:[545,15,1,""],circular_spine:[545,15,1,""],get_position:[545,10,1,""],get_patch_transform:[545,10,1,""],set_bounds:[545,10,1,""],get_spine_transform:[545,10,1,""],set_patch_line:[545,10,1,""],cla:[545,10,1,""],get_path:[545,10,1,""],register_axis:[545,10,1,""],is_frame_like:[545,10,1,""],set_patch_circle:[545,10,1,""],set_color:[545,10,1,""],set_position:[545,10,1,""],get_bounds:[545,10,1,""],get_smart_bounds:[545,10,1,""],set_smart_bounds:[545,10,1,""]},"matplotlib.colors.Normalize":{autoscale_None:[499,10,1,""],scaled:[499,10,1,""],inverse:[499,10,1,""],autoscale:[499,10,1,""],process_value:[499,14,1,""]},"mpl_toolkits.mplot3d.axis3d.ZAxis":{get_data_interval:[349,10,1,""]},"matplotlib.mathtext.Rule":{render:[312,10,1,""]},"matplotlib.mathtext.MathTextParser":{parse:[312,10,1,""],to_mask:[312,10,1,""],to_rgba:[312,10,1,""],get_depth:[312,10,1,""],to_png:[312,10,1,""]},"matplotlib.tri.Triangulation":{calculate_plane_coefficients:[96,10,1,""],set_mask:[96,10,1,""],get_trifinder:[96,10,1,""],get_masked_triangles:[96,10,1,""],get_from_args_and_kwargs:[96,14,1,""]},"matplotlib.collections.QuadMesh":{draw:[243,10,1,""],convert_mesh_to_paths:[243,14,1,""],get_paths:[243,10,1,""],get_datalim:[243,10,1,""],set_paths:[243,10,1,""],convert_mesh_to_triangles:[243,10,1,""]},"matplotlib.tri.LinearTriInterpolator":{gradient:[96,10,1,""],"__call__":[96,10,1,""]},"matplotlib.transforms.TransformedBbox":{get_points:[434,10,1,""]},"matplotlib.colorbar.Colorbar":{add_lines:[121,10,1,""],update_normal:[121,10,1,""],on_mappable_changed:[121,10,1,""],update_bruteforce:[121,10,1,""]},"matplotlib.transforms.BboxBase":{shrunk_to_aspect:[434,10,1,""],rotated:[434,10,1,""],extents:[434,13,1,""],height:[434,13,1,""],padded:[434,10,1,""],intervalx:[434,13,1,""],intervaly:[434,13,1,""],y1:[434,13,1,""],y0:[434,13,1,""],ymin:[434,13,1,""],count_contains:[434,10,1,""],size:[434,13,1,""],xmin:[434,13,1,""],intersection:[434,14,1,""],ymax:[434,13,1,""],min:[434,13,1,""],union:[434,14,1,""],contains:[434,10,1,""],width:[434,13,1,""],transformed:[434,10,1,""],is_unit:[434,10,1,""],corners:[434,10,1,""],overlaps:[434,10,1,""],xmax:[434,13,1,""],max:[434,13,1,""],p0:[434,13,1,""],fully_overlaps:[434,10,1,""],fully_contains:[434,10,1,""],p1:[434,13,1,""],containsx:[434,10,1,""],containsy:[434,10,1,""],x0:[434,13,1,""],x1:[434,13,1,""],anchored:[434,10,1,""],fully_containsy:[434,10,1,""],fully_containsx:[434,10,1,""],frozen:[434,10,1,""],shrunk:[434,10,1,""],expanded:[434,10,1,""],bounds:[434,13,1,""],splitx:[434,10,1,""],splity:[434,10,1,""],count_overlaps:[434,10,1,""],inverse_transformed:[434,10,1,""],translated:[434,10,1,""]},"matplotlib.widgets.LassoSelector":{ignore:[92,10,1,""],onpress:[92,10,1,""],update_background:[92,10,1,""],onmove:[92,10,1,""],onrelease:[92,10,1,""]},"matplotlib.gridspec":{SubplotSpec:[120,11,1,""],GridSpecFromSubplotSpec:[120,11,1,""],GridSpecBase:[120,11,1,""],GridSpec:[120,11,1,""]},"matplotlib.dates.DateLocator":{nonsingular:[168,10,1,""],viewlim_to_dt:[168,10,1,""],datalim_to_dt:[168,10,1,""],hms0d:[168,13,1,""],set_tzinfo:[168,10,1,""]},"matplotlib.patches.ArrowStyle.Fancy":{transmute:[248,10,1,""]},"matplotlib.axis":{YAxis:[383,11,1,""],XTick:[383,11,1,""],YTick:[383,11,1,""],XAxis:[383,11,1,""],Tick:[383,11,1,""],Ticker:[383,11,1,""],Axis:[383,11,1,""]},"matplotlib.text":{Text:[248,11,1,""],TextWithDash:[248,11,1,""],OffsetFrom:[248,11,1,""],get_rotation:[248,12,1,""],Annotation:[248,11,1,""]},"matplotlib.scale.ScaleBase":{get_transform:[357,10,1,""],set_default_locators_and_formatters:[357,10,1,""],limit_range_for_scale:[357,10,1,""]},"matplotlib.spines":{Spine:[545,11,1,""]},"matplotlib.ticker.MultipleLocator":{view_limits:[527,10,1,""],tick_values:[527,10,1,""]},"matplotlib.widgets.Lasso":{onmove:[92,10,1,""],onrelease:[92,10,1,""]},"matplotlib.font_manager.FontManager":{get_default_size:[287,14,1,""],update_fonts:[287,10,1,""],score_variant:[287,10,1,""],set_default_weight:[287,10,1,""],score_size:[287,10,1,""],score_stretch:[287,10,1,""],score_style:[287,10,1,""],score_family:[287,10,1,""],get_default_weight:[287,10,1,""],score_weight:[287,10,1,""],findfont:[287,10,1,""]},"matplotlib.patches.ConnectionStyle.Angle3":{connect:[248,10,1,""]},"mpl_toolkits.axes_grid.axis_artist.Ticks":{get_tick_out:[326,10,1,""],set_ticksize:[326,10,1,""],set_tick_out:[326,10,1,""],get_ticksize:[326,10,1,""]},"matplotlib.backend_bases.FigureCanvasBase":{print_emf:[297,10,1,""],flush_events:[297,10,1,""],get_default_filetype:[297,10,1,""],print_jpeg:[297,10,1,""],print_png:[297,10,1,""],scroll_event:[297,10,1,""],key_press_event:[297,10,1,""],close_event:[297,10,1,""],print_raw:[297,10,1,""],blit:[297,10,1,""],print_pdf:[297,10,1,""],mpl_disconnect:[297,10,1,""],release_mouse:[297,10,1,""],button_release_event:[297,10,1,""],motion_notify_event:[297,10,1,""],resize_event:[297,10,1,""],get_window_title:[297,10,1,""],draw_event:[297,10,1,""],supports_blit:[297,13,1,""],print_figure:[297,10,1,""],start_event_loop:[297,10,1,""],print_jpg:[297,10,1,""],events:[297,13,1,""],button_press_event:[297,10,1,""],draw:[297,10,1,""],get_supported_filetypes_grouped:[297,10,1,""],print_tif:[297,10,1,""],onRemove:[297,10,1,""],get_width_height:[297,10,1,""],switch_backends:[297,10,1,""],print_bmp:[297,10,1,""],new_timer:[297,10,1,""],print_pgf:[297,10,1,""],print_svgz:[297,10,1,""],print_eps:[297,10,1,""],get_supported_filetypes:[297,10,1,""],mpl_connect:[297,10,1,""],resize:[297,10,1,""],start_event_loop_default:[297,10,1,""],pick_event:[297,10,1,""],print_ps:[297,10,1,""],grab_mouse:[297,10,1,""],leave_notify_event:[297,10,1,""],print_svg:[297,10,1,""],draw_cursor:[297,10,1,""],print_tiff:[297,10,1,""],print_rgba:[297,10,1,""],enter_notify_event:[297,10,1,""],stop_event_loop:[297,10,1,""],onHilite:[297,10,1,""],key_release_event:[297,10,1,""],set_window_title:[297,10,1,""],get_default_filename:[297,10,1,""],stop_event_loop_default:[297,10,1,""],filetypes:[297,13,1,""],idle_event:[297,10,1,""],draw_idle:[297,10,1,""],pick:[297,10,1,""]},"matplotlib.figure.Figure":{axes:[149,13,1,""],show:[149,10,1,""],savefig:[149,10,1,""],text:[149,10,1,""],sca:[149,10,1,""],set_size_inches:[149,10,1,""],set_figwidth:[149,10,1,""],figimage:[149,10,1,""],set_dpi:[149,10,1,""],get_tightbbox:[149,10,1,""],get_dpi:[149,10,1,""],gca:[149,10,1,""],set_tight_layout:[149,10,1,""],hold:[149,10,1,""],set_edgecolor:[149,10,1,""],suptitle:[149,10,1,""],clf:[149,10,1,""],contains:[149,10,1,""],get_children:[149,10,1,""],tight_layout:[149,10,1,""],subplots_adjust:[149,10,1,""],set_figheight:[149,10,1,""],delaxes:[149,10,1,""],autofmt_xdate:[149,10,1,""],get_edgecolor:[149,10,1,""],add_subplot:[149,10,1,""],draw:[149,10,1,""],add_axobserver:[149,10,1,""],get_figwidth:[149,10,1,""],set_frameon:[149,10,1,""],get_size_inches:[149,10,1,""],get_tight_layout:[149,10,1,""],set_canvas:[149,10,1,""],draw_artist:[149,10,1,""],legend:[149,10,1,""],waitforbuttonpress:[149,10,1,""],get_facecolor:[149,10,1,""],add_axes:[149,10,1,""],get_axes:[149,10,1,""],get_default_bbox_extra_artists:[149,10,1,""],clear:[149,10,1,""],get_window_extent:[149,10,1,""],colorbar:[149,10,1,""],set_facecolor:[149,10,1,""],get_frameon:[149,10,1,""],ginput:[149,10,1,""],dpi:[149,13,1,""],get_figheight:[149,10,1,""]},"matplotlib.cm.ScalarMappable":{autoscale_None:[362,10,1,""],get_cmap:[362,10,1,""],to_rgba:[362,10,1,""],autoscale:[362,10,1,""],get_clim:[362,10,1,""],changed:[362,10,1,""],get_array:[362,10,1,""],check_update:[362,10,1,""],add_checker:[362,10,1,""],set_array:[362,10,1,""],set_cmap:[362,10,1,""],set_norm:[362,10,1,""],set_clim:[362,10,1,""],set_colorbar:[362,10,1,""]},"matplotlib.ticker.AutoMinorLocator":{tick_values:[527,10,1,""]},"matplotlib.projections.polar.PolarAxes.InvertedPolarTransform":{transform_non_affine:[357,10,1,""],inverted:[357,10,1,""]},"matplotlib.patches.YAArrow":{getpoints:[248,10,1,""],get_patch_transform:[248,10,1,""],get_path:[248,10,1,""]},"matplotlib.patches":{Polygon:[248,11,1,""],draw_bbox:[248,12,1,""],FancyBboxPatch:[248,11,1,""],BoxStyle:[248,11,1,""],Circle:[248,11,1,""],Rectangle:[248,11,1,""],ConnectionStyle:[248,11,1,""],ArrowStyle:[248,11,1,""],bbox_artist:[248,12,1,""],RegularPolygon:[248,11,1,""],FancyArrowPatch:[248,11,1,""],Shadow:[248,11,1,""],CirclePolygon:[248,11,1,""],YAArrow:[248,11,1,""],ConnectionPatch:[248,11,1,""],Patch:[248,11,1,""],PathPatch:[248,11,1,""],Arrow:[248,11,1,""],Wedge:[248,11,1,""],Arc:[248,11,1,""],FancyArrow:[248,11,1,""],Ellipse:[248,11,1,""]},"matplotlib.widgets.Button":{on_clicked:[92,10,1,""],disconnect:[92,10,1,""]},"matplotlib.transforms.BlendedGenericTransform":{frozen:[434,10,1,""],get_affine:[434,10,1,""],transform_non_affine:[434,10,1,""],inverted:[434,10,1,""]},"matplotlib.mathtext.GlueSpec":{copy:[312,10,1,""],factory:[312,15,1,""]},"matplotlib.axes.SubplotBase":{set_subplotspec:[5,10,1,""],change_geometry:[5,10,1,""],update_params:[5,10,1,""],label_outer:[5,10,1,""],get_geometry:[5,10,1,""],is_first_col:[5,10,1,""],is_last_row:[5,10,1,""],is_last_col:[5,10,1,""],get_subplotspec:[5,10,1,""],is_first_row:[5,10,1,""]},"matplotlib.afm":{AFM:[541,11,1,""],parse_afm:[541,12,1,""]},"matplotlib.patches.Polygon":{set_closed:[248,10,1,""],get_path:[248,10,1,""],set_xy:[248,10,1,""],xy:[248,13,1,""],get_closed:[248,10,1,""],get_xy:[248,10,1,""]},"matplotlib.colors.ColorConverter":{cache:[499,13,1,""],colors:[499,13,1,""],to_rgba:[499,10,1,""],to_rgb:[499,10,1,""],to_rgba_array:[499,10,1,""]},"matplotlib.mathtext.Vlist":{vpack:[312,10,1,""]},"mpl_toolkits.mplot3d.art3d.Line3DCollection":{set_segments:[349,10,1,""],draw:[349,10,1,""],set_sort_zpos:[349,10,1,""],do_3d_projection:[349,10,1,""]},"matplotlib.projections.polar.PolarAxes.PolarTransform":{transform_path_non_affine:[357,10,1,""],transform_non_affine:[357,10,1,""],inverted:[357,10,1,""]},"matplotlib.backends":{backend_wxagg:[21,9,1,""],backend_qt4agg:[576,9,1,""],backend_pdf:[95,9,1,""]},"mpl_toolkits.mplot3d.art3d.Patch3DCollection":{do_3d_projection:[349,10,1,""],draw:[349,10,1,""],set_sort_zpos:[349,10,1,""],set_3d_properties:[349,10,1,""]},"matplotlib.transforms.Transform":{contains_branch:[434,10,1,""],input_dims:[434,13,1,""],transform_path_affine:[434,10,1,""],transform_point:[434,10,1,""],is_separable:[434,13,1,""],transform:[434,10,1,""],transform_affine:[434,10,1,""],inverted:[434,10,1,""],has_inverse:[434,13,1,""],transform_path:[434,10,1,""],depth:[434,13,1,""],get_affine:[434,10,1,""],transform_non_affine:[434,10,1,""],transform_angles:[434,10,1,""],output_dims:[434,13,1,""],transform_path_non_affine:[434,10,1,""],get_matrix:[434,10,1,""],contains_branch_seperately:[434,10,1,""]},"matplotlib.backend_bases.Cursors":{SELECT_REGION:[297,13,1,""],MOVE:[297,13,1,""],POINTER:[297,13,1,""],HAND:[297,13,1,""]},"mpl_toolkits.mplot3d.axis3d.YAxis":{get_data_interval:[349,10,1,""]},"matplotlib.text.OffsetFrom":{get_unit:[248,10,1,""],set_unit:[248,10,1,""]},"matplotlib.collections.PathCollection":{get_paths:[243,10,1,""],get_sizes:[243,10,1,""],set_paths:[243,10,1,""],draw:[243,10,1,""]},"matplotlib.patches.Wedge":{set_width:[248,10,1,""],get_path:[248,10,1,""],set_radius:[248,10,1,""],set_theta1:[248,10,1,""],set_theta2:[248,10,1,""],set_center:[248,10,1,""]},"matplotlib.backend_bases.TimerBase":{single_shot:[297,13,1,""],interval:[297,13,1,""],stop:[297,10,1,""],remove_callback:[297,10,1,""],start:[297,10,1,""],add_callback:[297,10,1,""]},"matplotlib.tight_layout":{get_tight_layout_figure:[166,12,1,""],auto_adjust_subplotpars:[166,12,1,""],get_renderer:[166,12,1,""],get_subplotspec_list:[166,12,1,""]},"matplotlib.ticker.LogLocator":{view_limits:[527,10,1,""],base:[527,10,1,""],subs:[527,10,1,""],tick_values:[527,10,1,""]},"matplotlib.patches.Circle":{set_radius:[248,10,1,""],radius:[248,13,1,""],get_radius:[248,10,1,""]},"matplotlib.scale":{LogScale:[357,11,1,""],SymmetricalLogScale:[357,11,1,""],get_scale_docs:[357,12,1,""],ScaleBase:[357,11,1,""],scale_factory:[357,12,1,""],LinearScale:[357,11,1,""],register_scale:[357,12,1,""]},"matplotlib.patches.Rectangle":{set_x:[248,10,1,""],set_xy:[248,10,1,""],get_x:[248,10,1,""],get_y:[248,10,1,""],set_y:[248,10,1,""],get_patch_transform:[248,10,1,""],set_bounds:[248,10,1,""],contains:[248,10,1,""],get_path:[248,10,1,""],get_height:[248,10,1,""],get_bbox:[248,10,1,""],xy:[248,13,1,""],get_width:[248,10,1,""],set_height:[248,10,1,""],get_xy:[248,10,1,""],set_width:[248,10,1,""]},"matplotlib.transforms.BboxTransformTo":{get_matrix:[434,10,1,""]},"matplotlib.backend_bases.NavigationToolbar2":{set_history_buttons:[297,10,1,""],release_pan:[297,10,1,""],draw_rubberband:[297,10,1,""],set_cursor:[297,10,1,""],home:[297,10,1,""],drag_pan:[297,10,1,""],toolitems:[297,13,1,""],press_pan:[297,10,1,""],mouse_move:[297,10,1,""],forward:[297,10,1,""],press_zoom:[297,10,1,""],pan:[297,10,1,""],draw:[297,10,1,""],update:[297,10,1,""],back:[297,10,1,""],push_current:[297,10,1,""],press:[297,10,1,""],save_figure:[297,10,1,""],drag_zoom:[297,10,1,""],zoom:[297,10,1,""],set_message:[297,10,1,""],release:[297,10,1,""],release_zoom:[297,10,1,""],dynamic_update:[297,10,1,""]},"matplotlib.path":{get_path_collection_extents:[262,12,1,""],path_intersects_path:[262,12,1,""],point_in_path_collection:[262,12,1,""],points_in_path:[262,12,1,""],get_path_extents:[262,12,1,""],convert_path_to_polygons:[262,12,1,""],Path:[262,11,1,""],cleanup_path:[262,12,1,""],path_in_path:[262,12,1,""],clip_path_to_rect:[262,12,1,""],get_paths_extents:[262,12,1,""],point_in_path:[262,12,1,""]},"matplotlib.mathtext.Hlist":{kern:[312,10,1,""],hpack:[312,10,1,""]},"matplotlib.patches.BoxStyle.LArrow":{transmute:[248,10,1,""]},"matplotlib.collections.CircleCollection":{get_sizes:[243,10,1,""],draw:[243,10,1,""]},"matplotlib.mathtext.Box":{grow:[312,10,1,""],render:[312,10,1,""],shrink:[312,10,1,""]},"matplotlib.gridspec.SubplotSpec":{get_geometry:[120,10,1,""],get_gridspec:[120,10,1,""],get_topmost_subplotspec:[120,10,1,""],get_position:[120,10,1,""]},"matplotlib.font_manager":{ttfFontProperty:[287,12,1,""],findfont:[287,12,1,""],FontManager:[287,11,1,""],list_fonts:[287,12,1,""],pickle_load:[287,12,1,""],pickle_dump:[287,12,1,""],get_fontext_synonyms:[287,12,1,""],win32FontDirectory:[287,12,1,""],FontEntry:[287,11,1,""],createFontList:[287,12,1,""],FontProperties:[287,11,1,""],OSXInstalledFonts:[287,12,1,""],win32InstalledFonts:[287,12,1,""],get_fontconfig_fonts:[287,12,1,""],weight_as_number:[287,12,1,""],findSystemFonts:[287,12,1,""],afmFontProperty:[287,12,1,""],ttfdict_to_fnames:[287,12,1,""],is_opentype_cff_font:[287,12,1,""]},"mpl_toolkits.mplot3d.axis3d.Axis":{set_view_interval:[349,10,1,""],draw:[349,10,1,""],set_rotate_label:[349,10,1,""],set_pane_pos:[349,10,1,""],set_pane_color:[349,10,1,""],draw_pane:[349,10,1,""],init3d:[349,10,1,""],get_tick_positions:[349,10,1,""],get_view_interval:[349,10,1,""],get_major_ticks:[349,10,1,""],get_rotate_label:[349,10,1,""],get_tightbbox:[349,10,1,""]},"matplotlib.patches.ArrowStyle":{CurveFilledAB:[248,11,1,""],CurveFilledA:[248,11,1,""],Wedge:[248,11,1,""],Simple:[248,11,1,""],BracketAB:[248,11,1,""],CurveAB:[248,11,1,""],Curve:[248,11,1,""],Fancy:[248,11,1,""],CurveFilledB:[248,11,1,""],BracketA:[248,11,1,""],BracketB:[248,11,1,""],BarAB:[248,11,1,""],CurveA:[248,11,1,""],CurveB:[248,11,1,""]},"matplotlib.backend_bases.LocationEvent":{lastevent:[297,13,1,""],ydata:[297,13,1,""],xdata:[297,13,1,""],y:[297,13,1,""],x:[297,13,1,""],inaxes:[297,13,1,""]},"matplotlib.mathtext.List":{grow:[312,10,1,""],shrink:[312,10,1,""]},"matplotlib.transforms.TransformNode":{frozen:[434,10,1,""],invalidate:[434,10,1,""],set_children:[434,10,1,""],pass_through:[434,13,1,""]},"matplotlib.collections.PolyCollection":{set_verts:[243,10,1,""],draw:[243,10,1,""],set_paths:[243,10,1,""]},"matplotlib.units.Registry":{get_converter:[74,10,1,""]},"matplotlib.figure":{AxesStack:[149,11,1,""],SubplotParams:[149,11,1,""],Figure:[149,11,1,""],figaspect:[149,12,1,""]},"matplotlib.axis.YAxis":{set_view_interval:[383,10,1,""],contains:[383,10,1,""],set_default_intervals:[383,10,1,""],set_ticks_position:[383,10,1,""],get_minpos:[383,10,1,""],get_data_interval:[383,10,1,""],get_text_widths:[383,10,1,""],set_offset_position:[383,10,1,""],set_data_interval:[383,10,1,""],set_label_position:[383,10,1,""],axis_name:[383,13,1,""],get_label_position:[383,10,1,""],tick_left:[383,10,1,""],get_ticks_position:[383,10,1,""],tick_right:[383,10,1,""],get_view_interval:[383,10,1,""]},"matplotlib.ticker.Locator":{autoscale:[527,10,1,""],zoom:[527,10,1,""],refresh:[527,10,1,""],tick_values:[527,10,1,""],MAXTICKS:[527,13,1,""],view_limits:[527,10,1,""],raise_if_exceeds:[527,10,1,""],pan:[527,10,1,""]},"matplotlib.dates.RRuleLocator":{get_unit_generic:[168,14,1,""],autoscale:[168,10,1,""]},"matplotlib.fontconfig_pattern.FontconfigPatternParser":{parse:[287,10,1,""]},"mpl_toolkits.axes_grid.axis_artist":{TickLabels:[326,11,1,""],AxisLabel:[326,11,1,""],Ticks:[326,11,1,""],AxisArtist:[326,11,1,""]},"mpl_toolkits.mplot3d.art3d.Text3D":{draw:[349,10,1,""],set_3d_properties:[349,10,1,""]},"matplotlib.mathtext.TruetypeFonts":{destroy:[312,10,1,""],CachedFont:[312,11,1,""],get_underline_thickness:[312,10,1,""],get_kern:[312,10,1,""],get_xheight:[312,10,1,""]},"matplotlib.mathtext.MathtextBackendPath":{get_results:[312,10,1,""],render_rect_filled:[312,10,1,""],render_glyph:[312,10,1,""]},"matplotlib.transforms.CompositeGenericTransform":{frozen:[434,10,1,""],transform_non_affine:[434,10,1,""],inverted:[434,10,1,""],get_affine:[434,10,1,""],transform_affine:[434,10,1,""],transform_path_non_affine:[434,10,1,""]},"matplotlib.transforms.CompositeAffine2D":{get_matrix:[434,10,1,""]},"matplotlib.animation":{AVConvWriter:[579,11,1,""],FFMpegBase:[579,11,1,""],AVConvFileWriter:[579,11,1,""],FileMovieWriter:[579,11,1,""],TimedAnimation:[579,11,1,""],MencoderBase:[579,11,1,""],FFMpegWriter:[579,11,1,""],ImageMagickBase:[579,11,1,""],FFMpegFileWriter:[579,11,1,""],FuncAnimation:[579,11,1,""],AVConvBase:[579,11,1,""],Animation:[579,11,1,""],ImageMagickWriter:[579,11,1,""],ArtistAnimation:[579,11,1,""],MencoderWriter:[579,11,1,""],ImageMagickFileWriter:[579,11,1,""],MovieWriter:[579,11,1,""],MencoderFileWriter:[579,11,1,""],MovieWriterRegistry:[579,11,1,""]},"matplotlib.patches.RegularPolygon":{orientation:[248,13,1,""],get_patch_transform:[248,10,1,""],get_path:[248,10,1,""],xy:[248,13,1,""],radius:[248,13,1,""],numvertices:[248,13,1,""]},"matplotlib.lines":{Line2D:[248,11,1,""],segment_hits:[248,12,1,""],VertexSelector:[248,11,1,""]},"matplotlib.patches.ConnectionStyle.Arc":{connect:[248,10,1,""]},"matplotlib.widgets.MultiCursor":{clear:[92,10,1,""],onmove:[92,10,1,""]},"matplotlib.collections.Collection":{get_datalim:[243,10,1,""],get_offset_position:[243,10,1,""],get_pickradius:[243,10,1,""],set_linestyles:[243,10,1,""],get_offsets:[243,10,1,""],set_offset_position:[243,10,1,""],set_edgecolors:[243,10,1,""],set_paths:[243,10,1,""],set_offsets:[243,10,1,""],set_lw:[243,10,1,""],set_edgecolor:[243,10,1,""],set_antialiaseds:[243,10,1,""],get_linestyle:[243,10,1,""],contains:[243,10,1,""],set_urls:[243,10,1,""],get_urls:[243,10,1,""],set_facecolors:[243,10,1,""],set_hatch:[243,10,1,""],get_edgecolor:[243,10,1,""],set_dashes:[243,10,1,""],draw:[243,10,1,""],set_linewidth:[243,10,1,""],get_paths:[243,10,1,""],get_linestyles:[243,10,1,""],get_linewidth:[243,10,1,""],get_offset_transform:[243,10,1,""],set_pickradius:[243,10,1,""],set_antialiased:[243,10,1,""],get_hatch:[243,10,1,""],set_facecolor:[243,10,1,""],update_scalarmappable:[243,10,1,""],get_edgecolors:[243,10,1,""],set_linewidths:[243,10,1,""],set_linestyle:[243,10,1,""],get_dashes:[243,10,1,""],get_facecolor:[243,10,1,""],set_alpha:[243,10,1,""],get_linewidths:[243,10,1,""],get_window_extent:[243,10,1,""],update_from:[243,10,1,""],get_transforms:[243,10,1,""],set_color:[243,10,1,""],get_facecolors:[243,10,1,""]},"mpl_toolkits.mplot3d.art3d":{line_2d_to_3d:[349,12,1,""],iscolor:[349,12,1,""],get_patch_verts:[349,12,1,""],path_to_3d_segment:[349,12,1,""],poly_collection_2d_to_3d:[349,12,1,""],Line3D:[349,11,1,""],Poly3DCollection:[349,11,1,""],Line3DCollection:[349,11,1,""],PathPatch3D:[349,11,1,""],line_collection_2d_to_3d:[349,12,1,""],zalpha:[349,12,1,""],Patch3D:[349,11,1,""],paths_to_3d_segments:[349,12,1,""],pathpatch_2d_to_3d:[349,12,1,""],rotate_axes:[349,12,1,""],get_dir_vector:[349,12,1,""],text_2d_to_3d:[349,12,1,""],norm_text_angle:[349,12,1,""],Text3D:[349,11,1,""],patch_2d_to_3d:[349,12,1,""],get_colors:[349,12,1,""],norm_angle:[349,12,1,""],patch_collection_2d_to_3d:[349,12,1,""],Patch3DCollection:[349,11,1,""],juggle_axes:[349,12,1,""]},"matplotlib.gridspec.GridSpecBase":{get_subplot_params:[120,10,1,""],get_geometry:[120,10,1,""],set_height_ratios:[120,10,1,""],get_height_ratios:[120,10,1,""],set_width_ratios:[120,10,1,""],get_width_ratios:[120,10,1,""],get_grid_positions:[120,10,1,""],new_subplotspec:[120,10,1,""]},"matplotlib.mathtext.MathtextBackendBitmap":{get_results:[312,10,1,""]},"mpl_toolkits.mplot3d.proj3d":{inv_transform:[349,12,1,""],proj_transform_vec:[349,12,1,""],view_transformation:[349,12,1,""],test_world:[349,12,1,""],line2d:[349,12,1,""],proj_trans_clip_points:[349,12,1,""],proj_transform:[349,12,1,""],test_proj:[349,12,1,""],transform:[349,12,1,""],world_transformation:[349,12,1,""],proj_trans_points:[349,12,1,""],proj_points:[349,12,1,""],test_rot:[349,12,1,""],rot_x:[349,12,1,""],line2d_dist:[349,12,1,""],persp_transformation:[349,12,1,""],proj_transform_vec_clip:[349,12,1,""],test_proj_make_M:[349,12,1,""],line2d_seg_dist:[349,12,1,""],mod:[349,12,1,""],vec_pad_ones:[349,12,1,""],test_lines_dists:[349,12,1,""],proj_transform_clip:[349,12,1,""],test_proj_draw_axes:[349,12,1,""]},"matplotlib.backends.backend_pdf.PdfFile":{fontName:[95,10,1,""],embedTTF:[95,10,1,""],writeInfoDict:[95,10,1,""],writeTrailer:[95,10,1,""],markerObject:[95,10,1,""],reserveObject:[95,10,1,""],imageObject:[95,10,1,""],alphaState:[95,10,1,""],writeXref:[95,10,1,""]},"mpl_toolkits.axes_grid.axes_divider.SubplotDivider":{set_subplotspec:[190,10,1,""],change_geometry:[190,10,1,""],update_params:[190,10,1,""],get_position:[190,10,1,""],get_geometry:[190,10,1,""],get_subplotspec:[190,10,1,""]},"matplotlib.transforms.Affine2DBase":{to_values:[434,10,1,""],transform_point:[434,10,1,""],transform_affine:[434,10,1,""],inverted:[434,10,1,""],frozen:[434,10,1,""],matrix_from_values:[434,14,1,""]},"matplotlib.backends.backend_pdf.PdfPages":{savefig:[95,10,1,""],close:[95,10,1,""],infodict:[95,10,1,""]},"matplotlib.backends.backend_qt4agg.FigureCanvasQTAgg":{drawRectangle:[576,10,1,""],draw:[576,10,1,""],print_figure:[576,10,1,""],blit:[576,10,1,""],paintEvent:[576,10,1,""]},"matplotlib.sphinxext":{plot_directive:[214,9,1,""]},"matplotlib.patches.BoxStyle.Roundtooth":{transmute:[248,10,1,""]},"matplotlib.collections.PatchCollection":{set_paths:[243,10,1,""]},"matplotlib.patches.Arc":{draw:[248,10,1,""]},"matplotlib.patches.ConnectionStyle.Angle":{connect:[248,10,1,""]},"matplotlib.mathtext.MathtextBackendPdf":{get_results:[312,10,1,""],render_rect_filled:[312,10,1,""],render_glyph:[312,10,1,""]},"matplotlib.patches.BoxStyle.RArrow":{transmute:[248,10,1,""]},"matplotlib.axis.Axis":{draw:[383,10,1,""],set_view_interval:[383,10,1,""],get_pickradius:[383,10,1,""],get_units:[383,10,1,""],set_scale:[383,10,1,""],get_major_locator:[383,10,1,""],set_major_formatter:[383,10,1,""],get_ticklabel_extents:[383,10,1,""],get_ticklabels:[383,10,1,""],get_view_interval:[383,10,1,""],set_label_coords:[383,10,1,""],get_tightbbox:[383,10,1,""],set_tick_params:[383,10,1,""],get_offset_text:[383,10,1,""],set_smart_bounds:[383,10,1,""],get_minorticklabels:[383,10,1,""],get_minor_locator:[383,10,1,""],get_majorticklines:[383,10,1,""],set_minor_locator:[383,10,1,""],set_units:[383,10,1,""],get_scale:[383,10,1,""],have_units:[383,10,1,""],cla:[383,10,1,""],get_children:[383,10,1,""],set_data_interval:[383,10,1,""],reset_ticks:[383,10,1,""],get_minorticklocs:[383,10,1,""],pan:[383,10,1,""],get_majorticklocs:[383,10,1,""],set_label_text:[383,10,1,""],get_label:[383,10,1,""],update_units:[383,10,1,""],set_default_intervals:[383,10,1,""],get_label_text:[383,10,1,""],set_ticks:[383,10,1,""],get_transform:[383,10,1,""],set_clip_path:[383,10,1,""],get_smart_bounds:[383,10,1,""],get_data_interval:[383,10,1,""],set_pickradius:[383,10,1,""],iter_ticks:[383,10,1,""],get_ticklines:[383,10,1,""],get_major_ticks:[383,10,1,""],get_gridlines:[383,10,1,""],set_major_locator:[383,10,1,""],OFFSETTEXTPAD:[383,13,1,""],convert_units:[383,10,1,""],get_majorticklabels:[383,10,1,""],get_minorticklines:[383,10,1,""],get_ticklocs:[383,10,1,""],get_minor_ticks:[383,10,1,""],zoom:[383,10,1,""],axis_date:[383,10,1,""],limit_range_for_scale:[383,10,1,""],get_major_formatter:[383,10,1,""],set_ticklabels:[383,10,1,""],grid:[383,10,1,""],get_minor_formatter:[383,10,1,""],set_minor_formatter:[383,10,1,""]},"matplotlib.animation.MencoderBase":{allowed_metadata:[579,13,1,""],exec_key:[579,13,1,""],output_args:[579,13,1,""],args_key:[579,13,1,""]},"matplotlib.patches.ArrowStyle.Simple":{transmute:[248,10,1,""]},"matplotlib.cbook":{safe_masked_invalid:[38,12,1,""],Timeout:[38,11,1,""],Grouper:[38,11,1,""],toint:[38,11,1,""],get_recursive_filelist:[38,12,1,""],delete_masked_points:[38,12,1,""],popall:[38,12,1,""],maxdict:[38,11,1,""],mplDeprecation:[38,13,1,""],pieces:[38,12,1,""],flatten:[38,12,1,""],unicode_safe:[38,12,1,""],wrap:[38,12,1,""],Scheduler:[38,11,1,""],is_string_like:[38,12,1,""],iterable:[38,12,1,""],report_memory:[38,12,1,""],issubclass_safe:[38,12,1,""],unique:[38,12,1,""],CallbackRegistry:[38,11,1,""],tofloat:[38,11,1,""],Sorter:[38,11,1,""],alltrue:[38,12,1,""],safezip:[38,12,1,""],listFiles:[38,12,1,""],strip_math:[38,12,1,""],is_scalar:[38,12,1,""],MemoryMonitor:[38,11,1,""],Stack:[38,11,1,""],simple_linear_interpolation:[38,12,1,""],exception_to_str:[38,12,1,""],dedent:[38,12,1,""],todate:[38,11,1,""],todatetime:[38,11,1,""],MatplotlibDeprecationWarning:[38,16,1,""],unmasked_index_ranges:[38,12,1,""],print_cycles:[38,12,1,""],recursive_remove:[38,12,1,""],restrict_dict:[38,12,1,""],is_math_text:[38,12,1,""],Idle:[38,11,1,""],mkdirs:[38,12,1,""],RingBuffer:[38,11,1,""],finddir:[38,12,1,""],is_numlike:[38,12,1,""],allequal:[38,12,1,""],is_scalar_or_string:[38,12,1,""],is_sequence_of_strings:[38,12,1,""],soundex:[38,12,1,""],get_sample_data:[38,12,1,""],converter:[38,11,1,""],get_split_ind:[38,12,1,""],silent_list:[38,11,1,""],dict_delall:[38,12,1,""],tostr:[38,11,1,""],is_writable_file_like:[38,12,1,""],align_iterators:[38,12,1,""],allpairs:[38,12,1,""],to_filehandle:[38,12,1,""],reverse_dict:[38,12,1,""],Xlator:[38,11,1,""],onetrue:[38,12,1,""],Null:[38,11,1,""],GetRealpathAndStat:[38,11,1,""],Bunch:[38,11,1,""]},"matplotlib.mathtext.Ship":{clamp:[312,14,1,""],hlist_out:[312,10,1,""],vlist_out:[312,10,1,""]},"matplotlib.sankey.Sankey":{add:[22,10,1,""],finish:[22,10,1,""]},"matplotlib.scale.SymmetricalLogScale":{get_transform:[357,10,1,""],set_default_locators_and_formatters:[357,10,1,""]},"matplotlib.mlab.FormatString":{tostr:[492,10,1,""]},"matplotlib.widgets.RectangleSelector":{set_active:[92,10,1,""],update:[92,10,1,""],ignore:[92,10,1,""],release:[92,10,1,""],get_active:[92,10,1,""],press:[92,10,1,""],onmove:[92,10,1,""],update_background:[92,10,1,""]},"mpl_toolkits.axes_grid.axis_artist.TickLabels":{set_axis_direction:[326,10,1,""],get_texts_widths_heights_descents:[326,10,1,""]},matplotlib:{dviread:[153,9,1,""],figure:[149,9,1,""],text:[248,9,1,""],rcdefaults:[85,12,1,""],colors:[499,9,1,""],sankey:[22,9,1,""],font_manager:[287,9,1,""],axis:[383,9,1,""],projections:[357,9,1,""],afm:[541,9,1,""],cm:[362,9,1,""],scale:[357,9,1,""],patches:[248,9,1,""],backend_bases:[297,9,1,""],pyplot:[294,9,1,""],axes:[5,9,1,""],transforms:[434,9,1,""],markers:[448,9,1,""],tight_layout:[166,9,1,""],animation:[579,9,1,""],collections:[243,9,1,""],rc:[85,12,1,""],units:[74,9,1,""],gridspec:[120,9,1,""],mlab:[492,9,1,""],use:[85,12,1,""],widgets:[92,9,1,""],fontconfig_pattern:[287,9,1,""],mathtext:[312,9,1,""],path:[262,9,1,""],ticker:[527,9,1,""],legend:[266,9,1,""],tri:[96,9,1,""],cbook:[38,9,1,""],dates:[168,9,1,""],artist:[248,9,1,""],lines:[248,9,1,""],colorbar:[121,9,1,""],spines:[545,9,1,""],type1font:[395,9,1,""]},"matplotlib.transforms.BboxTransform":{get_matrix:[434,10,1,""]},"matplotlib.patches.BoxStyle.Square":{transmute:[248,10,1,""]},"matplotlib.artist.ArtistInspector":{is_alias:[248,10,1,""],pprint_setters_rest:[248,10,1,""],findobj:[248,10,1,""],aliased_name:[248,10,1,""],get_aliases:[248,10,1,""],pprint_setters:[248,10,1,""],get_setters:[248,10,1,""],aliased_name_rest:[248,10,1,""],pprint_getters:[248,10,1,""],get_valid_values:[248,10,1,""],properties:[248,10,1,""]},"matplotlib.colors.NoNorm":{inverse:[499,10,1,""]},"matplotlib.colors.BoundaryNorm":{inverse:[499,10,1,""]},"matplotlib.cbook.Scheduler":{stop:[38,10,1,""],id:[38,13,1,""],idlelock:[38,13,1,""]},"matplotlib.cbook.Stack":{clear:[38,10,1,""],back:[38,10,1,""],remove:[38,10,1,""],forward:[38,10,1,""],push:[38,10,1,""],home:[38,10,1,""],bubble:[38,10,1,""],empty:[38,10,1,""]},"matplotlib.widgets.AxesWidget":{ignore:[92,10,1,""],connect_event:[92,10,1,""],disconnect_events:[92,10,1,""]},"mpl_toolkits.mplot3d.Axes3D":{contourf:[117,10,1,""],plot:[117,10,1,""],bar:[117,10,1,""],text:[117,10,1,""],scatter:[117,10,1,""],plot_trisurf:[117,10,1,""],add_collection3d:[117,10,1,""],plot_wireframe:[117,10,1,""],contour:[117,10,1,""],plot_surface:[117,10,1,""]},"matplotlib.collections.EllipseCollection":{draw:[243,10,1,""]},"matplotlib.mathtext.MathtextBackend":{get_results:[312,10,1,""],render_filled_rect:[312,10,1,""],render_glyph:[312,10,1,""],get_hinting_type:[312,10,1,""],set_canvas_size:[312,10,1,""]},"matplotlib.backends.backend_wxagg":{FigureCanvasWxAgg:[21,11,1,""],new_figure_manager:[21,12,1,""],new_figure_manager_given_figure:[21,12,1,""],NavigationToolbar2WxAgg:[21,11,1,""],FigureFrameWxAgg:[21,11,1,""]},"matplotlib.legend.DraggableLegend":{finalize_offset:[266,10,1,""],artist_picker:[266,10,1,""]},"matplotlib.patches.ConnectionStyle.Arc3":{connect:[248,10,1,""]},"matplotlib.widgets.Cursor":{clear:[92,10,1,""],onmove:[92,10,1,""]},"mpl_toolkits.axes_grid.axis_artist.AxisLabel":{set_axis_direction:[326,10,1,""],set_pad:[326,10,1,""],get_pad:[326,10,1,""]},"matplotlib.transforms.BboxTransformFrom":{get_matrix:[434,10,1,""]},"matplotlib.mathtext.StixFonts":{get_sized_alternatives_for_symbol:[312,10,1,""],cm_fallback:[312,13,1,""],use_cmex:[312,13,1,""]},"matplotlib.tri":{CubicTriInterpolator:[96,11,1,""],LinearTriInterpolator:[96,11,1,""],Triangulation:[96,11,1,""],TriFinder:[96,11,1,""],TrapezoidMapTriFinder:[96,11,1,""],UniformTriRefiner:[96,11,1,""],TriRefiner:[96,11,1,""],TriAnalyzer:[96,11,1,""],TriInterpolator:[96,11,1,""]},"matplotlib.colorbar":{ColorbarBase:[121,11,1,""],ColorbarPatch:[121,11,1,""],Colorbar:[121,11,1,""],make_axes_gridspec:[121,12,1,""],make_axes:[121,12,1,""],colorbar_factory:[121,12,1,""]},"matplotlib.figure.SubplotParams":{update:[149,10,1,""]},"matplotlib.mlab.FormatDate":{fromstr:[492,10,1,""],toval:[492,10,1,""]},"matplotlib.backends.backend_wxagg.NavigationToolbar2WxAgg":{get_canvas:[21,10,1,""]},"matplotlib.type1font.Type1Font":{parts:[395,13,1,""],transform:[395,10,1,""],prop:[395,13,1,""]},"matplotlib.projections":{polar:[357,9,1,""],process_projection_requirements:[357,12,1,""],ProjectionRegistry:[357,11,1,""],get_projection_names:[357,12,1,""],projection_factory:[357,12,1,""],get_projection_class:[357,12,1,""]},"matplotlib.backends.backend_wxagg.FigureFrameWxAgg":{get_canvas:[21,10,1,""]},"matplotlib.animation.AVConvBase":{exec_key:[579,13,1,""],args_key:[579,13,1,""]},"matplotlib.gridspec.GridSpec":{get_subplot_params:[120,10,1,""],tight_layout:[120,10,1,""],locally_modified_subplot_params:[120,10,1,""],update:[120,10,1,""]},"matplotlib.cbook.MemoryMonitor":{report:[38,10,1,""],plot:[38,10,1,""],clear:[38,10,1,""],xy:[38,10,1,""]},"matplotlib.tri.TrapezoidMapTriFinder":{"__call__":[96,10,1,""]},"matplotlib.text.Annotation":{set_figure:[248,10,1,""],draw:[248,10,1,""],contains:[248,10,1,""],update_bbox_position_size:[248,10,1,""],update_positions:[248,10,1,""]},"matplotlib.projections.polar.InvertedPolarTransform":{transform_non_affine:[357,10,1,""],inverted:[357,10,1,""]},"matplotlib.collections":{PathCollection:[243,11,1,""],CircleCollection:[243,11,1,""],RegularPolyCollection:[243,11,1,""],PolyCollection:[243,11,1,""],PatchCollection:[243,11,1,""],Collection:[243,11,1,""],StarPolygonCollection:[243,11,1,""],LineCollection:[243,11,1,""],EventCollection:[243,11,1,""],BrokenBarHCollection:[243,11,1,""],QuadMesh:[243,11,1,""],TriMesh:[243,11,1,""],AsteriskPolygonCollection:[243,11,1,""],EllipseCollection:[243,11,1,""]},"matplotlib.backend_bases.ShowBase":{mainloop:[297,10,1,""]},"matplotlib.colors.SymLogNorm":{autoscale_None:[499,10,1,""],inverse:[499,10,1,""],autoscale:[499,10,1,""]},"matplotlib.ticker.LogFormatter":{pprint_val:[527,10,1,""],format_data_short:[527,10,1,""],format_data:[527,10,1,""],base:[527,10,1,""],label_minor:[527,10,1,""]},"matplotlib.colors.LogNorm":{autoscale_None:[499,10,1,""],inverse:[499,10,1,""],autoscale:[499,10,1,""]},"matplotlib.widgets.RadioButtons":{on_clicked:[92,10,1,""],disconnect:[92,10,1,""]},"matplotlib.dviread.Encoding":{encoding:[153,13,1,""]},"matplotlib.lines.VertexSelector":{onpick:[248,10,1,""],process_selected:[248,10,1,""]},"matplotlib.path.Path":{wedge:[262,15,1,""],code_type:[262,13,1,""],unit_circle_righthalf:[262,15,1,""],intersects_bbox:[262,10,1,""],STOP:[262,13,1,""],make_compound_path:[262,15,1,""],iter_segments:[262,10,1,""],arc:[262,15,1,""],unit_rectangle:[262,15,1,""],MOVETO:[262,13,1,""],CURVE4:[262,13,1,""],CURVE3:[262,13,1,""],unit_circle:[262,15,1,""],unit_regular_polygon:[262,15,1,""],contains_path:[262,10,1,""],hatch:[262,15,1,""],contains_points:[262,10,1,""],transformed:[262,10,1,""],NUM_VERTICES:[262,13,1,""],clip_to_bbox:[262,10,1,""],make_compound_path_from_polys:[262,15,1,""],get_extents:[262,10,1,""],unit_regular_star:[262,15,1,""],to_polygons:[262,10,1,""],contains_point:[262,10,1,""],LINETO:[262,13,1,""],interpolated:[262,10,1,""],unit_regular_asterisk:[262,15,1,""],intersects_path:[262,10,1,""],CLOSEPOLY:[262,13,1,""]},"matplotlib.mathtext.MathtextBackendPs":{get_results:[312,10,1,""],render_rect_filled:[312,10,1,""],render_glyph:[312,10,1,""]},"matplotlib.axis.Ticker":{locator:[383,13,1,""],formatter:[383,13,1,""]},"matplotlib.collections.RegularPolyCollection":{get_sizes:[243,10,1,""],draw:[243,10,1,""],get_numsides:[243,10,1,""],get_rotation:[243,10,1,""]},"matplotlib.widgets":{HorizontalSpanSelector:[92,11,1,""],Widget:[92,11,1,""],RectangleSelector:[92,11,1,""],SubplotTool:[92,11,1,""],Button:[92,11,1,""],SpanSelector:[92,11,1,""],LockDraw:[92,11,1,""],Cursor:[92,11,1,""],Slider:[92,11,1,""],CheckButtons:[92,11,1,""],RadioButtons:[92,11,1,""],AxesWidget:[92,11,1,""],LassoSelector:[92,11,1,""],MultiCursor:[92,11,1,""],Lasso:[92,11,1,""]},"matplotlib.cbook.Idle":{waittime:[38,13,1,""],run:[38,10,1,""]},"matplotlib.mathtext.Parser.State":{copy:[312,10,1,""],font:[312,13,1,""]},"matplotlib.patches.FancyArrowPatch":{get_connectionstyle:[248,10,1,""],get_dpi_cor:[248,10,1,""],get_arrowstyle:[248,10,1,""],set_connectionstyle:[248,10,1,""],set_mutation_scale:[248,10,1,""],set_mutation_aspect:[248,10,1,""],draw:[248,10,1,""],get_path:[248,10,1,""],get_mutation_scale:[248,10,1,""],get_mutation_aspect:[248,10,1,""],set_dpi_cor:[248,10,1,""],get_path_in_displaycoord:[248,10,1,""],set_patchB:[248,10,1,""],set_patchA:[248,10,1,""],set_positions:[248,10,1,""],set_arrowstyle:[248,10,1,""]},"matplotlib.text.Text":{set_multialignment:[248,10,1,""],get_fontweight:[248,10,1,""],get_font_properties:[248,10,1,""],get_fontstretch:[248,10,1,""],set_path_effects:[248,10,1,""],get_text:[248,10,1,""],get_stretch:[248,10,1,""],get_va:[248,10,1,""],set_fontproperties:[248,10,1,""],set_size:[248,10,1,""],set_fontsize:[248,10,1,""],get_prop_tup:[248,10,1,""],get_ha:[248,10,1,""],get_variant:[248,10,1,""],set_font_properties:[248,10,1,""],set_position:[248,10,1,""],update_from:[248,10,1,""],get_horizontalalignment:[248,10,1,""],set_x:[248,10,1,""],set_y:[248,10,1,""],set_bbox:[248,10,1,""],set_weight:[248,10,1,""],get_fontvariant:[248,10,1,""],contains:[248,10,1,""],set_fontvariant:[248,10,1,""],get_verticalalignment:[248,10,1,""],get_fontstyle:[248,10,1,""],get_size:[248,10,1,""],get_path_effects:[248,10,1,""],get_rotation:[248,10,1,""],set_ha:[248,10,1,""],get_window_extent:[248,10,1,""],get_color:[248,10,1,""],get_fontproperties:[248,10,1,""],draw:[248,10,1,""],set_style:[248,10,1,""],get_rotation_mode:[248,10,1,""],get_weight:[248,10,1,""],get_position:[248,10,1,""],get_style:[248,10,1,""],get_fontfamily:[248,10,1,""],set_backgroundcolor:[248,10,1,""],update_bbox_position_size:[248,10,1,""],is_math_text:[248,14,1,""],set_fontstyle:[248,10,1,""],set_horizontalalignment:[248,10,1,""],set_rotation_mode:[248,10,1,""],set_text:[248,10,1,""],set_stretch:[248,10,1,""],set_fontname:[248,10,1,""],set_rotation:[248,10,1,""],set_name:[248,10,1,""],get_fontsize:[248,10,1,""],set_va:[248,10,1,""],set_variant:[248,10,1,""],cached:[248,13,1,""],get_fontname:[248,10,1,""],set_fontweight:[248,10,1,""],set_linespacing:[248,10,1,""],get_name:[248,10,1,""],set_verticalalignment:[248,10,1,""],set_family:[248,10,1,""],get_family:[248,10,1,""],get_bbox_patch:[248,10,1,""],zorder:[248,13,1,""],set_ma:[248,10,1,""],set_fontstretch:[248,10,1,""],set_color:[248,10,1,""]},"matplotlib.legend":{DraggableLegend:[266,11,1,""],Legend:[266,11,1,""]},"matplotlib.patches.Arrow":{get_patch_transform:[248,10,1,""],get_path:[248,10,1,""]},"matplotlib.colorbar.ColorbarBase":{update_ticks:[121,10,1,""],set_ticks:[121,10,1,""],set_alpha:[121,10,1,""],add_lines:[121,10,1,""],set_label:[121,10,1,""],config_axis:[121,10,1,""],set_ticklabels:[121,10,1,""],draw_all:[121,10,1,""]},"matplotlib.widgets.Slider":{on_changed:[92,10,1,""],reset:[92,10,1,""],set_val:[92,10,1,""],disconnect:[92,10,1,""]},"matplotlib.ticker.MaxNLocator":{view_limits:[527,10,1,""],default_params:[527,13,1,""],set_params:[527,10,1,""],bin_boundaries:[527,10,1,""],tick_values:[527,10,1,""]},"matplotlib.mathtext.Kern":{shrink:[312,10,1,""],depth:[312,13,1,""],grow:[312,10,1,""],height:[312,13,1,""]},"matplotlib.mathtext.Node":{get_kerning:[312,10,1,""],shrink:[312,10,1,""],render:[312,10,1,""],grow:[312,10,1,""]},"matplotlib.units":{ConversionInterface:[74,11,1,""],AxisInfo:[74,11,1,""],Registry:[74,11,1,""]},"matplotlib.animation.MovieWriterRegistry":{is_available:[579,10,1,""],register:[579,10,1,""],list:[579,10,1,""]},"mpl_toolkits.mplot3d.art3d.PathPatch3D":{do_3d_projection:[349,10,1,""],set_3d_properties:[349,10,1,""]},"matplotlib.cbook.converter":{is_missing:[38,10,1,""]},"matplotlib.widgets.CheckButtons":{on_clicked:[92,10,1,""],disconnect:[92,10,1,""]},"matplotlib.transforms.ScaledTranslation":{get_matrix:[434,10,1,""]},"matplotlib.backends.backend_pdf":{Stream:[95,11,1,""],new_figure_manager:[95,12,1,""],new_figure_manager_given_figure:[95,12,1,""],Reference:[95,11,1,""],PdfPages:[95,11,1,""],Operator:[95,11,1,""],FigureCanvasPdf:[95,11,1,""],Name:[95,11,1,""],fill:[95,12,1,""],pdfRepr:[95,12,1,""],PdfFile:[95,11,1,""]},"matplotlib.transforms.IdentityTransform":{transform_path_affine:[434,10,1,""],frozen:[434,10,1,""],transform:[434,10,1,""],transform_non_affine:[434,10,1,""],inverted:[434,10,1,""],transform_path:[434,10,1,""],get_affine:[434,10,1,""],transform_affine:[434,10,1,""],transform_path_non_affine:[434,10,1,""],get_matrix:[434,10,1,""]},"matplotlib.mlab":{dist:[492,12,1,""],FormatInt:[492,11,1,""],window_none:[492,12,1,""],entropy:[492,12,1,""],contiguous_regions:[492,12,1,""],find:[492,12,1,""],detrend_mean:[492,12,1,""],frange:[492,12,1,""],bivariate_normal:[492,12,1,""],stineman_interp:[492,12,1,""],rec2csv:[492,12,1,""],center_matrix:[492,12,1,""],save:[492,12,1,""],psd:[492,12,1,""],vector_lengths:[492,12,1,""],FIFOBuffer:[492,11,1,""],window_hanning:[492,12,1,""],longest_contiguous_ones:[492,12,1,""],rec_summarize:[492,12,1,""],dist_point_to_segment:[492,12,1,""],offset_line:[492,12,1,""],fftsurr:[492,12,1,""],poly_below:[492,12,1,""],isvector:[492,12,1,""],FormatFloat:[492,11,1,""],prctile:[492,12,1,""],FormatObj:[492,11,1,""],amap:[492,12,1,""],PCA:[492,11,1,""],less_simple_linear_interpolation:[492,12,1,""],safe_isnan:[492,12,1,""],get_xyz_where:[492,12,1,""],inside_poly:[492,12,1,""],is_closed_polygon:[492,12,1,""],cohere_pairs:[492,12,1,""],rec2txt:[492,12,1,""],log2:[492,12,1,""],FormatBool:[492,11,1,""],rec_join:[492,12,1,""],logspace:[492,12,1,""],detrend_linear:[492,12,1,""],detrend:[492,12,1,""],l2norm:[492,12,1,""],levypdf:[492,12,1,""],l1norm:[492,12,1,""],rec_groupby:[492,12,1,""],rec_drop_fields:[492,12,1,""],prepca:[492,12,1,""],load:[492,12,1,""],FormatFormatStr:[492,11,1,""],exp_safe:[492,12,1,""],FormatDatetime:[492,11,1,""],norm_flat:[492,12,1,""],cohere:[492,12,1,""],normpdf:[492,12,1,""],cross_from_below:[492,12,1,""],FormatThousands:[492,11,1,""],FormatDate:[492,11,1,""],slopes:[492,12,1,""],ispower2:[492,12,1,""],rk4:[492,12,1,""],longest_ones:[492,12,1,""],path_length:[492,12,1,""],specgram:[492,12,1,""],detrend_none:[492,12,1,""],liaupunov:[492,12,1,""],cross_from_above:[492,12,1,""],csv2rec:[492,12,1,""],prctile_rank:[492,12,1,""],recs_join:[492,12,1,""],segments_intersect:[492,12,1,""],rec_append_fields:[492,12,1,""],csvformat_factory:[492,12,1,""],donothing_callback:[492,12,1,""],get_sparse_matrix:[492,12,1,""],FormatString:[492,11,1,""],FormatMillions:[492,11,1,""],safe_isinf:[492,12,1,""],rms_flat:[492,12,1,""],binary_repr:[492,12,1,""],csd:[492,12,1,""],poly_between:[492,12,1,""],griddata:[492,12,1,""],rec_keep_fields:[492,12,1,""],get_formatd:[492,12,1,""],distances_along_curve:[492,12,1,""],FormatPercent:[492,11,1,""],identity:[492,12,1,""],movavg:[492,12,1,""],quad2cubic:[492,12,1,""],base_repr:[492,12,1,""],demean:[492,12,1,""]},"matplotlib.lines.Line2D":{get_data:[248,10,1,""],get_dash_capstyle:[248,10,1,""],get_xdata:[248,10,1,""],set_mfc:[248,10,1,""],set_markeredgewidth:[248,10,1,""],get_pickradius:[248,10,1,""],set_markersize:[248,10,1,""],get_ls:[248,10,1,""],get_lw:[248,10,1,""],recache_always:[248,10,1,""],get_markeredgecolor:[248,10,1,""],get_linewidth:[248,10,1,""],get_markeredgewidth:[248,10,1,""],set_drawstyle:[248,10,1,""],get_color:[248,10,1,""],get_aa:[248,10,1,""],get_c:[248,10,1,""],get_markersize:[248,10,1,""],set_lw:[248,10,1,""],get_window_extent:[248,10,1,""],get_solid_capstyle:[248,10,1,""],set_ls:[248,10,1,""],set_pickradius:[248,10,1,""],set_fillstyle:[248,10,1,""],contains:[248,10,1,""],get_solid_joinstyle:[248,10,1,""],markers:[248,13,1,""],get_mec:[248,10,1,""],get_xydata:[248,10,1,""],get_linestyle:[248,10,1,""],set_markevery:[248,10,1,""],set_ydata:[248,10,1,""],get_antialiased:[248,10,1,""],set_axes:[248,10,1,""],set_xdata:[248,10,1,""],get_mew:[248,10,1,""],is_dashed:[248,10,1,""],set_markerfacecolor:[248,10,1,""],set_dashes:[248,10,1,""],draw:[248,10,1,""],get_marker:[248,10,1,""],set_linewidth:[248,10,1,""],set_picker:[248,10,1,""],get_ms:[248,10,1,""],filled_markers:[248,13,1,""],set_markeredgecolor:[248,10,1,""],set_antialiased:[248,10,1,""],set_markerfacecoloralt:[248,10,1,""],set_marker:[248,10,1,""],get_ydata:[248,10,1,""],set_aa:[248,10,1,""],get_markerfacecolor:[248,10,1,""],validJoin:[248,13,1,""],set_data:[248,10,1,""],get_mfcalt:[248,10,1,""],set_solid_joinstyle:[248,10,1,""],set_linestyle:[248,10,1,""],drawStyles:[248,13,1,""],set_dash_joinstyle:[248,10,1,""],set_mfcalt:[248,10,1,""],get_dash_joinstyle:[248,10,1,""],recache:[248,10,1,""],set_ms:[248,10,1,""],lineStyles:[248,13,1,""],get_markevery:[248,10,1,""],set_c:[248,10,1,""],get_mfc:[248,10,1,""],fillStyles:[248,13,1,""],set_transform:[248,10,1,""],get_path:[248,10,1,""],set_mew:[248,10,1,""],drawStyleKeys:[248,13,1,""],update_from:[248,10,1,""],get_markerfacecoloralt:[248,10,1,""],zorder:[248,13,1,""],get_fillstyle:[248,10,1,""],set_dash_capstyle:[248,10,1,""],set_color:[248,10,1,""],set_mec:[248,10,1,""],set_solid_capstyle:[248,10,1,""],validCap:[248,13,1,""],get_drawstyle:[248,10,1,""]},"mpl_toolkits.mplot3d.axis3d":{YAxis:[349,11,1,""],get_flip_min_max:[349,12,1,""],ZAxis:[349,11,1,""],tick_update_position:[349,12,1,""],XAxis:[349,11,1,""],move_from_center:[349,12,1,""],Axis:[349,11,1,""]},"matplotlib.cbook.Sorter":{sort:[38,10,1,""],byItem:[38,10,1,""],byAttribute:[38,10,1,""]},"mpl_toolkits.axes_grid.axes_divider.AxesDivider":{new_horizontal:[190,10,1,""],new_vertical:[190,10,1,""],append_axes:[190,10,1,""]},"matplotlib.backends.backend_qt4agg":{NavigationToolbar2QTAgg:[576,11,1,""],new_figure_manager:[576,12,1,""],FigureCanvasQTAgg:[576,11,1,""],new_figure_manager_given_figure:[576,12,1,""],FigureManagerQTAgg:[576,11,1,""]},"matplotlib.colors.Colormap":{is_gray:[499,10,1,""],set_over:[499,10,1,""],set_under:[499,10,1,""],set_bad:[499,10,1,""]},"matplotlib.collections.EventCollection":{get_positions:[243,10,1,""],extend_positions:[243,10,1,""],set_lineoffset:[243,10,1,""],switch_orientation:[243,10,1,""],get_orientation:[243,10,1,""],set_positions:[243,10,1,""],get_linewidth:[243,10,1,""],get_linelength:[243,10,1,""],get_lineoffset:[243,10,1,""],get_linestyle:[243,10,1,""],is_horizontal:[243,10,1,""],append_positions:[243,10,1,""],add_positions:[243,10,1,""],set_linelength:[243,10,1,""],set_orientation:[243,10,1,""],get_color:[243,10,1,""]},"matplotlib.patches.BoxStyle":{Square:[248,11,1,""],Sawtooth:[248,11,1,""],Roundtooth:[248,11,1,""],RArrow:[248,11,1,""],LArrow:[248,11,1,""],Round4:[248,11,1,""],Round:[248,11,1,""]},"matplotlib.collections.BrokenBarHCollection":{span_where:[243,14,1,""]},"matplotlib.colors.LinearSegmentedColormap":{from_list:[499,14,1,""],set_gamma:[499,10,1,""]},"matplotlib.ticker.Formatter":{format_data_short:[527,10,1,""],locs:[527,13,1,""],fix_minus:[527,10,1,""],get_offset:[527,10,1,""],set_locs:[527,10,1,""],format_data:[527,10,1,""]},"matplotlib.mathtext.UnicodeFonts":{get_sized_alternatives_for_symbol:[312,10,1,""],use_cmex:[312,13,1,""]},"matplotlib.dates":{MinuteLocator:[168,11,1,""],num2date:[168,12,1,""],AutoDateLocator:[168,11,1,""],rrule:[168,11,1,""],DayLocator:[168,11,1,""],WeekdayLocator:[168,11,1,""],AutoDateFormatter:[168,11,1,""],DateLocator:[168,11,1,""],YearLocator:[168,11,1,""],RRuleLocator:[168,11,1,""],weeks:[168,12,1,""],SecondLocator:[168,11,1,""],date2num:[168,12,1,""],seconds:[168,12,1,""],num2epoch:[168,12,1,""],drange:[168,12,1,""],hours:[168,12,1,""],mx2num:[168,12,1,""],relativedelta:[168,11,1,""],IndexDateFormatter:[168,11,1,""],DateFormatter:[168,11,1,""],MonthLocator:[168,11,1,""],HourLocator:[168,11,1,""],epoch2num:[168,12,1,""],minutes:[168,12,1,""]},"matplotlib.dviread.Tfm":{width:[153,13,1,""],depth:[153,13,1,""],checksum:[153,13,1,""],design_size:[153,13,1,""],height:[153,13,1,""]},"matplotlib.mlab.FormatObj":{tostr:[492,10,1,""],fromstr:[492,10,1,""],toval:[492,10,1,""]},"matplotlib.ticker.ScalarFormatter":{set_useOffset:[527,10,1,""],set_powerlimits:[527,10,1,""],get_useLocale:[527,10,1,""],set_locs:[527,10,1,""],useOffset:[527,13,1,""],format_data_short:[527,10,1,""],set_useLocale:[527,10,1,""],fix_minus:[527,10,1,""],useLocale:[527,13,1,""],pprint_val:[527,10,1,""],get_offset:[527,10,1,""],get_useOffset:[527,10,1,""],set_scientific:[527,10,1,""],format_data:[527,10,1,""]},"matplotlib.mathtext.MathtextBackendCairo":{get_results:[312,10,1,""],render_rect_filled:[312,10,1,""],render_glyph:[312,10,1,""]},"matplotlib.axis.XTick":{update_position:[383,10,1,""],apply_tickdir:[383,10,1,""],get_view_interval:[383,10,1,""]},"matplotlib.tri.CubicTriInterpolator":{gradient:[96,10,1,""],"__call__":[96,10,1,""]},"matplotlib.axes":{Subplot:[5,13,1,""],subplot_class_factory:[5,12,1,""],SubplotBase:[5,11,1,""],Axes:[5,11,1,""]},"matplotlib.cbook.RingBuffer":{append:[38,10,1,""],get:[38,10,1,""]},"matplotlib.backend_bases.GraphicsContextBase":{restore:[297,10,1,""],get_joinstyle:[297,10,1,""],set_foreground:[297,10,1,""],get_gid:[297,10,1,""],get_dashes:[297,10,1,""],get_snap:[297,10,1,""],set_graylevel:[297,10,1,""],dashd:[297,13,1,""],get_linestyle:[297,10,1,""],set_clip_rectangle:[297,10,1,""],set_hatch:[297,10,1,""],set_dashes:[297,10,1,""],set_linewidth:[297,10,1,""],get_antialiased:[297,10,1,""],get_linewidth:[297,10,1,""],set_clip_path:[297,10,1,""],set_antialiased:[297,10,1,""],get_hatch:[297,10,1,""],get_clip_path:[297,10,1,""],set_joinstyle:[297,10,1,""],get_alpha:[297,10,1,""],set_linestyle:[297,10,1,""],copy_properties:[297,10,1,""],set_snap:[297,10,1,""],set_alpha:[297,10,1,""],get_url:[297,10,1,""],set_capstyle:[297,10,1,""],get_capstyle:[297,10,1,""],set_url:[297,10,1,""],set_gid:[297,10,1,""],get_rgb:[297,10,1,""],get_hatch_path:[297,10,1,""],get_clip_rectangle:[297,10,1,""]},"matplotlib.axis.Tick":{draw:[383,10,1,""],apply_tickdir:[383,10,1,""],get_pad_pixels:[383,10,1,""],contains:[383,10,1,""],set_clip_path:[383,10,1,""],set_label2:[383,10,1,""],set_label1:[383,10,1,""],get_pad:[383,10,1,""],set_pad:[383,10,1,""],get_loc:[383,10,1,""],get_children:[383,10,1,""],set_label:[383,10,1,""],get_view_interval:[383,10,1,""]},"matplotlib.patches.BoxStyle.Round":{transmute:[248,10,1,""]},"matplotlib.cbook.CallbackRegistry":{process:[38,10,1,""],disconnect:[38,10,1,""],connect:[38,10,1,""]},"matplotlib.artist":{get:[248,12,1,""],allow_rasterization:[248,12,1,""],Artist:[248,11,1,""],kwdoc:[248,12,1,""],setp:[248,12,1,""],getp:[248,12,1,""],ArtistInspector:[248,11,1,""]},"matplotlib.patches.PathPatch":{get_path:[248,10,1,""]},"matplotlib.type1font":{Type1Font:[395,11,1,""]},"mpl_toolkits.mplot3d":{axes3d:[349,9,1,""],proj3d:[349,9,1,""],art3d:[349,9,1,""],axis3d:[349,9,1,""]},"matplotlib.transforms.BlendedAffine2D":{get_matrix:[434,10,1,""]},"matplotlib.sankey":{Sankey:[22,11,1,""]},"matplotlib.cbook.Xlator":{xlat:[38,10,1,""]},"matplotlib.widgets.SubplotTool":{funcbottom:[92,10,1,""],funchspace:[92,10,1,""],funcleft:[92,10,1,""],functop:[92,10,1,""],funcright:[92,10,1,""],funcwspace:[92,10,1,""]},"matplotlib.markers":{MarkerStyle:[448,11,1,""]},"matplotlib.text.TextWithDash":{set_x:[248,10,1,""],set_y:[248,10,1,""],draw:[248,10,1,""],get_window_extent:[248,10,1,""],set_figure:[248,10,1,""],get_position:[248,10,1,""],update_coords:[248,10,1,""],set_dashlength:[248,10,1,""],get_dashpad:[248,10,1,""],get_dashpush:[248,10,1,""],set_transform:[248,10,1,""],get_dashlength:[248,10,1,""],set_dashpad:[248,10,1,""],get_dashrotation:[248,10,1,""],get_prop_tup:[248,10,1,""],get_dashdirection:[248,10,1,""],get_figure:[248,10,1,""],set_dashdirection:[248,10,1,""],set_position:[248,10,1,""],set_dashpush:[248,10,1,""],set_dashrotation:[248,10,1,""]},"mpl_toolkits.axes_grid.axes_divider.AxesLocator":{get_subplotspec:[190,10,1,""]},"matplotlib.tri.TriAnalyzer":{circle_ratios:[96,10,1,""],get_flat_tri_mask:[96,10,1,""],scale_factors:[96,13,1,""]},"matplotlib.transforms.Affine2D":{set:[434,10,1,""],set_matrix:[434,10,1,""],rotate_deg:[434,10,1,""],clear:[434,10,1,""],scale:[434,10,1,""],identity:[434,14,1,""],rotate_deg_around:[434,10,1,""],from_values:[434,14,1,""],translate:[434,10,1,""],rotate:[434,10,1,""],get_matrix:[434,10,1,""],rotate_around:[434,10,1,""]},"matplotlib.animation.ImageMagickBase":{delay:[579,13,1,""],exec_key:[579,13,1,""],output_args:[579,13,1,""],args_key:[579,13,1,""]},"matplotlib.dates.AutoDateLocator":{get_locator:[168,10,1,""],set_axis:[168,10,1,""],autoscale:[168,10,1,""],refresh:[168,10,1,""]},"matplotlib.transforms.AffineBase":{transform_path_affine:[434,10,1,""],transform_path:[434,10,1,""],transform:[434,10,1,""],transform_affine:[434,10,1,""],get_affine:[434,10,1,""],transform_non_affine:[434,10,1,""],transform_path_non_affine:[434,10,1,""]},"matplotlib.transforms":{BlendedAffine2D:[434,11,1,""],TransformedBbox:[434,11,1,""],BboxTransform:[434,11,1,""],blended_transform_factory:[434,12,1,""],BlendedGenericTransform:[434,11,1,""],TransformedPath:[434,11,1,""],IdentityTransform:[434,11,1,""],BboxTransformTo:[434,11,1,""],TransformNode:[434,11,1,""],Bbox:[434,11,1,""],CompositeGenericTransform:[434,11,1,""],Transform:[434,11,1,""],TransformWrapper:[434,11,1,""],BboxTransformFrom:[434,11,1,""],composite_transform_factory:[434,12,1,""],BboxBase:[434,11,1,""],AffineBase:[434,11,1,""],Affine2D:[434,11,1,""],Affine2DBase:[434,11,1,""],nonsingular:[434,12,1,""],CompositeAffine2D:[434,11,1,""],ScaledTranslation:[434,11,1,""]},"matplotlib.backends.backend_pdf.Stream":{write:[95,10,1,""],end:[95,10,1,""]},"matplotlib.mathtext.Parser":{subsuper:[312,10,1,""],stackrel:[312,10,1,""],c_over_c:[312,10,1,""],push_state:[312,10,1,""],parse:[312,10,1,""],State:[312,11,1,""],math_string:[312,10,1,""],font:[312,10,1,""],non_math:[312,10,1,""],is_dropsub:[312,10,1,""],group:[312,10,1,""],space:[312,10,1,""],accent:[312,10,1,""],sqrt:[312,10,1,""],pop_state:[312,10,1,""],main:[312,10,1,""],math:[312,10,1,""],"function":[312,10,1,""],unknown_symbol:[312,10,1,""],frac:[312,10,1,""],required_group:[312,10,1,""],symbol:[312,10,1,""],auto_delim:[312,10,1,""],end_group:[312,10,1,""],customspace:[312,10,1,""],get_state:[312,10,1,""],binom:[312,10,1,""],start_group:[312,10,1,""],operatorname:[312,10,1,""],overline:[312,10,1,""],is_slanted:[312,10,1,""],is_overunder:[312,10,1,""],genfrac:[312,10,1,""],simple_group:[312,10,1,""]},"mpl_toolkits.axes_grid":{axes_size:[446,9,1,""]},"matplotlib.ticker.NullLocator":{tick_values:[527,10,1,""]},"mpl_toolkits.mplot3d.art3d.Patch3D":{get_facecolor:[349,10,1,""],do_3d_projection:[349,10,1,""],draw:[349,10,1,""],set_3d_properties:[349,10,1,""],get_path:[349,10,1,""]},"matplotlib.mlab.FormatFloat":{fromstr:[492,10,1,""],toval:[492,10,1,""]},"matplotlib.projections.polar.PolarAxes":{can_zoom:[357,10,1,""],set_rgrids:[357,10,1,""],InvertedPolarTransform:[357,11,1,""],PolarTransform:[357,11,1,""],set_theta_offset:[357,10,1,""],ThetaFormatter:[357,11,1,""],set_thetagrids:[357,10,1,""],format_coord:[357,10,1,""],get_theta_offset:[357,10,1,""],RadialLocator:[357,11,1,""],get_theta_direction:[357,10,1,""],set_theta_zero_location:[357,10,1,""],set_theta_direction:[357,10,1,""],can_pan:[357,10,1,""],PolarAffine:[357,11,1,""],get_data_ratio:[357,10,1,""]},"matplotlib.mlab.FormatDatetime":{fromstr:[492,10,1,""]},"matplotlib.animation.MovieWriter":{finish:[579,10,1,""],saving:[579,10,1,""],grab_frame:[579,10,1,""],setup:[579,10,1,""],cleanup:[579,10,1,""],frame_size:[579,13,1,""],isAvailable:[579,15,1,""],bin_path:[579,15,1,""]},"matplotlib.widgets.Widget":{eventson:[92,13,1,""],drawon:[92,13,1,""]},"mpl_toolkits.axes_grid.axes_divider":{Divider:[190,11,1,""],AxesLocator:[190,11,1,""],SubplotDivider:[190,11,1,""],AxesDivider:[190,11,1,""]},"matplotlib.colors.LightSource":{shade:[499,10,1,""],shade_rgb:[499,10,1,""]},"matplotlib.animation.MencoderFileWriter":{supported_formats:[579,13,1,""]},"mpl_toolkits.mplot3d.axes3d.Axes3D":{set_zscale:[349,10,1,""],set_zbound:[349,10,1,""],get_zlim3d:[349,10,1,""],text:[349,10,1,""],set_xscale:[349,10,1,""],get_autoscalez_on:[349,10,1,""],view_init:[349,10,1,""],get_proj:[349,10,1,""],contourf:[349,10,1,""],get_zminorticklabels:[349,10,1,""],cla:[349,10,1,""],get_children:[349,10,1,""],update_datalim:[349,10,1,""],set_zlabel:[349,10,1,""],set_frame_on:[349,10,1,""],get_xlim:[349,10,1,""],tunit_edges:[349,10,1,""],can_zoom:[349,10,1,""],set_xlim:[349,10,1,""],get_ylim3d:[349,10,1,""],grid:[349,10,1,""],set_yscale:[349,10,1,""],zaxis_inverted:[349,10,1,""],bar:[349,10,1,""],name:[349,13,1,""],unit_cube:[349,10,1,""],get_axis_position:[349,10,1,""],get_autoscale_on:[349,10,1,""],can_pan:[349,10,1,""],set_zlim:[349,10,1,""],set_zticklabels:[349,10,1,""],tricontourf:[349,10,1,""],plot_trisurf:[349,10,1,""],plot3D:[349,10,1,""],margins:[349,10,1,""],contour:[349,10,1,""],get_ylim:[349,10,1,""],autoscale:[349,10,1,""],zaxis_date:[349,10,1,""],get_zmajorticklabels:[349,10,1,""],text3D:[349,10,1,""],set_zmargin:[349,10,1,""],get_zlabel:[349,10,1,""],set_title:[349,10,1,""],convert_zunits:[349,10,1,""],invert_zaxis:[349,10,1,""],get_zticklines:[349,10,1,""],set_axisbelow:[349,10,1,""],set_ylim3d:[349,10,1,""],have_units:[349,10,1,""],contour3D:[349,10,1,""],set_autoscale_on:[349,10,1,""],get_zscale:[349,10,1,""],add_contour_set:[349,10,1,""],get_zticklabels:[349,10,1,""],add_contourf_set:[349,10,1,""],set_zlim3d:[349,10,1,""],set_ylim:[349,10,1,""],ticklabel_format:[349,10,1,""],plot:[349,10,1,""],tick_params:[349,10,1,""],mouse_init:[349,10,1,""],plot_surface:[349,10,1,""],set_axis_off:[349,10,1,""],clabel:[349,10,1,""],get_xlim3d:[349,10,1,""],get_frame_on:[349,10,1,""],text2D:[349,10,1,""],get_zlim:[349,10,1,""],set_zticks:[349,10,1,""],set_xlim3d:[349,10,1,""],get_w_lims:[349,10,1,""],get_zbound:[349,10,1,""],locator_params:[349,10,1,""],plot_wireframe:[349,10,1,""],format_zdata:[349,10,1,""],set_axis_on:[349,10,1,""],get_zticks:[349,10,1,""],scatter:[349,10,1,""],auto_scale_xyz:[349,10,1,""],set_top_view:[349,10,1,""],disable_mouse_rotation:[349,10,1,""],autoscale_view:[349,10,1,""],scatter3D:[349,10,1,""],get_axisbelow:[349,10,1,""],bar3d:[349,10,1,""],set_autoscalez_on:[349,10,1,""],draw:[349,10,1,""],format_coord:[349,10,1,""],tunit_cube:[349,10,1,""],add_collection3d:[349,10,1,""],tricontour:[349,10,1,""],contourf3D:[349,10,1,""]},"matplotlib.markers.MarkerStyle":{set_fillstyle:[448,10,1,""],get_marker:[448,10,1,""],get_transform:[448,10,1,""],filled_markers:[448,13,1,""],fillstyles:[448,13,1,""],markers:[448,13,1,""],get_snap_threshold:[448,10,1,""],get_alt_transform:[448,10,1,""],get_capstyle:[448,10,1,""],get_fillstyle:[448,10,1,""],get_joinstyle:[448,10,1,""],get_alt_path:[448,10,1,""],get_path:[448,10,1,""],set_marker:[448,10,1,""],is_filled:[448,10,1,""]},"matplotlib.patches.ConnectionStyle":{Angle:[248,11,1,""],Arc:[248,11,1,""],Bar:[248,11,1,""],Angle3:[248,11,1,""],Arc3:[248,11,1,""]},"matplotlib.mathtext.Fonts":{get_results:[312,10,1,""],get_sized_alternatives_for_symbol:[312,10,1,""],set_canvas_size:[312,10,1,""],get_kern:[312,10,1,""],get_used_characters:[312,10,1,""],get_xheight:[312,10,1,""],render_glyph:[312,10,1,""],get_metrics:[312,10,1,""],destroy:[312,10,1,""],render_rect_filled:[312,10,1,""],get_underline_thickness:[312,10,1,""]},"matplotlib.projections.polar.PolarAxes.PolarAffine":{get_matrix:[357,10,1,""]},"matplotlib.mlab.FIFOBuffer":{add:[492,10,1,""],register:[492,10,1,""],last:[492,10,1,""],asarrays:[492,10,1,""],update_datalim_to_current:[492,10,1,""]},"matplotlib.patches.Ellipse":{get_patch_transform:[248,10,1,""],contains:[248,10,1,""],get_path:[248,10,1,""]},"matplotlib.patches.Shadow":{get_patch_transform:[248,10,1,""],draw:[248,10,1,""],get_path:[248,10,1,""]},"matplotlib.cbook.Timeout":{run:[38,10,1,""]},"matplotlib.dviread.Dvi":{close:[153,10,1,""]},"mpl_toolkits.axes_grid.axes_grid":{ImageGrid:[553,11,1,""],Grid:[553,11,1,""]},"matplotlib.units.ConversionInterface":{convert:[74,14,1,""],axisinfo:[74,14,1,""],is_numlike:[74,14,1,""],default_units:[74,14,1,""]},"matplotlib.mathtext.MathtextBackendSvg":{get_results:[312,10,1,""],render_rect_filled:[312,10,1,""],render_glyph:[312,10,1,""]},"matplotlib.cm":{get_cmap:[362,12,1,""],ScalarMappable:[362,11,1,""],revcmap:[362,12,1,""],register_cmap:[362,12,1,""]},"matplotlib.ticker.IndexLocator":{tick_values:[527,10,1,""]},"matplotlib.mlab.FormatBool":{fromstr:[492,10,1,""],toval:[492,10,1,""]},"matplotlib.scale.LinearScale":{get_transform:[357,10,1,""],set_default_locators_and_formatters:[357,10,1,""]},"matplotlib.dates.YearLocator":{autoscale:[168,10,1,""]},"matplotlib.mathtext.Char":{get_kerning:[312,10,1,""],is_slanted:[312,10,1,""],grow:[312,10,1,""],render:[312,10,1,""],shrink:[312,10,1,""]},"mpl_toolkits.axes_grid.axes_size":{Padded:[446,11,1,""],MaxWidth:[446,11,1,""],AxesX:[446,11,1,""],MaxHeight:[446,11,1,""],Scaled:[446,11,1,""],AxesY:[446,11,1,""],Fraction:[446,11,1,""],Fixed:[446,11,1,""],from_any:[446,12,1,""]},"matplotlib.dates.DateFormatter":{illegal_s:[168,13,1,""],strftime:[168,10,1,""],set_tzinfo:[168,10,1,""]},"matplotlib.gridspec.GridSpecFromSubplotSpec":{get_subplot_params:[120,10,1,""],get_topmost_subplotspec:[120,10,1,""]},"matplotlib.patches.Patch":{set_path_effects:[248,10,1,""],set_fill:[248,10,1,""],get_ls:[248,10,1,""],get_lw:[248,10,1,""],set_fc:[248,10,1,""],fill:[248,13,1,""],set_lw:[248,10,1,""],get_verts:[248,10,1,""],set_ls:[248,10,1,""],get_linestyle:[248,10,1,""],contains:[248,10,1,""],get_aa:[248,10,1,""],get_ec:[248,10,1,""],get_patch_transform:[248,10,1,""],get_fill:[248,10,1,""],set_hatch:[248,10,1,""],get_data_transform:[248,10,1,""],get_edgecolor:[248,10,1,""],draw:[248,10,1,""],set_linewidth:[248,10,1,""],get_transform:[248,10,1,""],get_antialiased:[248,10,1,""],get_linewidth:[248,10,1,""],set_antialiased:[248,10,1,""],get_hatch:[248,10,1,""],get_extents:[248,10,1,""],set_aa:[248,10,1,""],set_facecolor:[248,10,1,""],set_edgecolor:[248,10,1,""],set_linestyle:[248,10,1,""],get_facecolor:[248,10,1,""],contains_point:[248,10,1,""],set_alpha:[248,10,1,""],set_ec:[248,10,1,""],get_window_extent:[248,10,1,""],get_path:[248,10,1,""],update_from:[248,10,1,""],zorder:[248,13,1,""],get_fc:[248,10,1,""],set_color:[248,10,1,""],get_path_effects:[248,10,1,""]},"mpl_toolkits.mplot3d.axis3d.XAxis":{get_data_interval:[349,10,1,""]},"matplotlib.mathtext.Accent":{shrink:[312,10,1,""],render:[312,10,1,""],grow:[312,10,1,""]},"matplotlib.patches.ConnectionPatch":{draw:[248,10,1,""],set_annotation_clip:[248,10,1,""],get_annotation_clip:[248,10,1,""],get_path_in_displaycoord:[248,10,1,""]},"matplotlib.mlab.FormatInt":{tostr:[492,10,1,""],fromstr:[492,10,1,""],toval:[492,10,1,""]},"matplotlib.axis.XAxis":{set_view_interval:[383,10,1,""],get_minpos:[383,10,1,""],get_text_heights:[383,10,1,""],set_default_intervals:[383,10,1,""],set_ticks_position:[383,10,1,""],contains:[383,10,1,""],get_data_interval:[383,10,1,""],set_data_interval:[383,10,1,""],set_label_position:[383,10,1,""],axis_name:[383,13,1,""],tick_top:[383,10,1,""],tick_bottom:[383,10,1,""],get_view_interval:[383,10,1,""],get_ticks_position:[383,10,1,""],get_label_position:[383,10,1,""]},"matplotlib.mlab.FormatFormatStr":{tostr:[492,10,1,""]},"matplotlib.projections.polar":{PolarTransform:[357,11,1,""],ThetaFormatter:[357,11,1,""],RadialLocator:[357,11,1,""],PolarAxes:[357,11,1,""],InvertedPolarTransform:[357,11,1,""],PolarAffine:[357,11,1,""]},"matplotlib.transforms.Bbox":{set_points:[434,10,1,""],set:[434,10,1,""],from_bounds:[434,14,1,""],get_points:[434,10,1,""],ignore:[434,10,1,""],mutated:[434,10,1,""],mutatedx:[434,10,1,""],mutatedy:[434,10,1,""],unit:[434,14,1,""],update_from_data_xy:[434,10,1,""],update_from_data:[434,10,1,""],update_from_path:[434,10,1,""],from_extents:[434,14,1,""]},"matplotlib.dviread.DviFont":{texname:[153,13,1,""],widths:[153,13,1,""],size:[153,13,1,""]},"mpl_toolkits.mplot3d.art3d.Line3D":{draw:[349,10,1,""],set_3d_properties:[349,10,1,""]},"matplotlib.pyplot":{summer:[294,12,1,""],hexbin:[294,12,1,""],xlim:[294,12,1,""],show:[294,12,1,""],savefig:[294,12,1,""],text:[294,12,1,""],over:[294,12,1,""],sca:[294,12,1,""],get_plot_commands:[294,12,1,""],stackplot:[294,12,1,""],sci:[294,12,1,""],contourf:[294,12,1,""],pause:[294,12,1,""],disconnect:[294,12,1,""],title:[294,12,1,""],clf:[294,12,1,""],cla:[294,12,1,""],axhspan:[294,12,1,""],subplot_tool:[294,12,1,""],ylabel:[294,12,1,""],cool:[294,12,1,""],plotfile:[294,12,1,""],suptitle:[294,12,1,""],thetagrids:[294,12,1,""],psd:[294,12,1,""],grid:[294,12,1,""],quiverkey:[294,12,1,""],waitforbuttonpress:[294,12,1,""],gray:[294,12,1,""],bar:[294,12,1,""],plot_date:[294,12,1,""],ioff:[294,12,1,""],colors:[294,12,1,""],pcolormesh:[294,12,1,""],twiny:[294,12,1,""],arrow:[294,12,1,""],bone:[294,12,1,""],polar:[294,12,1,""],spring:[294,12,1,""],minorticks_on:[294,12,1,""],rcdefaults:[294,12,1,""],connect:[294,12,1,""],imread:[294,12,1,""],barh:[294,12,1,""],margins:[294,12,1,""],contour:[294,12,1,""],spectral:[294,12,1,""],autoscale:[294,12,1,""],axes:[294,12,1,""],streamplot:[294,12,1,""],hist:[294,12,1,""],rc:[294,12,1,""],axvline:[294,12,1,""],plotting:[497,12,1,""],loglog:[294,12,1,""],twinx:[294,12,1,""],imsave:[294,12,1,""],acorr:[294,12,1,""],stem:[294,12,1,""],step:[294,12,1,""],hsv:[294,12,1,""],rgrids:[294,12,1,""],legend:[294,12,1,""],switch_backend:[294,12,1,""],box:[294,12,1,""],fill_betweenx:[294,12,1,""],semilogx:[294,12,1,""],semilogy:[294,12,1,""],hot:[294,12,1,""],broken_barh:[294,12,1,""],yticks:[294,12,1,""],eventplot:[294,12,1,""],get_current_fig_manager:[294,12,1,""],ginput:[294,12,1,""],copper:[294,12,1,""],subplots_adjust:[294,12,1,""],fill_between:[294,12,1,""],annotate:[294,12,1,""],figtext:[294,12,1,""],figimage:[294,12,1,""],tricontourf:[294,12,1,""],table:[294,12,1,""],cohere:[294,12,1,""],ticklabel_format:[294,12,1,""],plot:[294,12,1,""],jet:[294,12,1,""],imshow:[294,12,1,""],axhline:[294,12,1,""],tick_params:[294,12,1,""],xticks:[294,12,1,""],pcolor:[294,12,1,""],triplot:[294,12,1,""],subplot:[294,12,1,""],vlines:[294,12,1,""],get_fignums:[294,12,1,""],hlines:[294,12,1,""],findobj:[294,12,1,""],flag:[294,12,1,""],locator_params:[294,12,1,""],hold:[294,12,1,""],tight_layout:[294,12,1,""],ishold:[294,12,1,""],hist2d:[294,12,1,""],clabel:[294,12,1,""],colorbar:[294,12,1,""],xlabel:[294,12,1,""],rc_context:[294,12,1,""],scatter:[294,12,1,""],xcorr:[294,12,1,""],spy:[294,12,1,""],quiver:[294,12,1,""],figure:[294,12,1,""],yscale:[294,12,1,""],specgram:[294,12,1,""],pie:[294,12,1,""],autumn:[294,12,1,""],isinteractive:[294,12,1,""],set_cmap:[294,12,1,""],close:[294,12,1,""],clim:[294,12,1,""],matshow:[294,12,1,""],axis:[294,12,1,""],gca:[294,12,1,""],winter:[294,12,1,""],gcf:[294,12,1,""],gci:[294,12,1,""],csd:[294,12,1,""],ylim:[294,12,1,""],figlegend:[294,12,1,""],prism:[294,12,1,""],minorticks_off:[294,12,1,""],get_figlabels:[294,12,1,""],xscale:[294,12,1,""],tripcolor:[294,12,1,""],fill:[294,12,1,""],boxplot:[294,12,1,""],pink:[294,12,1,""],draw:[294,12,1,""],errorbar:[294,12,1,""],ion:[294,12,1,""],colormaps:[497,12,1,""],delaxes:[294,12,1,""],subplot2grid:[294,12,1,""],tricontour:[294,12,1,""],subplots:[294,12,1,""],barbs:[294,12,1,""],setp:[294,12,1,""],axvspan:[294,12,1,""]},"matplotlib.cbook.Grouper":{get_siblings:[38,10,1,""],join:[38,10,1,""],joined:[38,10,1,""],clean:[38,10,1,""]},"matplotlib.mathtext.Glue":{shrink:[312,10,1,""],grow:[312,10,1,""]},"matplotlib.projections.polar.PolarTransform":{transform_path_non_affine:[357,10,1,""],transform_non_affine:[357,10,1,""],inverted:[357,10,1,""]},"matplotlib.tri.UniformTriRefiner":{refine_field:[96,10,1,""],refine_triangulation:[96,10,1,""]},"matplotlib.animation.FileMovieWriter":{setup:[579,10,1,""],frame_format:[579,13,1,""],cleanup:[579,10,1,""],finish:[579,10,1,""]},"matplotlib.ticker.FixedLocator":{tick_values:[527,10,1,""]},"matplotlib.collections.LineCollection":{get_colors:[243,10,1,""],color:[243,10,1,""],get_segments:[243,10,1,""],set_verts:[243,10,1,""],set_segments:[243,10,1,""],set_paths:[243,10,1,""],set_color:[243,10,1,""],get_color:[243,10,1,""]},"matplotlib.font_manager.FontProperties":{set_file:[287,10,1,""],set_size:[287,10,1,""],get_variant:[287,10,1,""],get_slant:[287,10,1,""],get_stretch:[287,10,1,""],get_family:[287,10,1,""],get_size:[287,10,1,""],set_weight:[287,10,1,""],set_slant:[287,10,1,""],set_style:[287,10,1,""],get_weight:[287,10,1,""],get_style:[287,10,1,""],set_fontconfig_pattern:[287,10,1,""],copy:[287,10,1,""],set_stretch:[287,10,1,""],set_name:[287,10,1,""],set_variant:[287,10,1,""],get_size_in_points:[287,10,1,""],get_name:[287,10,1,""],set_family:[287,10,1,""],get_fontconfig_pattern:[287,10,1,""],get_file:[287,10,1,""]},"matplotlib.widgets.LockDraw":{release:[92,10,1,""],available:[92,10,1,""],isowner:[92,10,1,""],locked:[92,10,1,""]},"matplotlib.projections.ProjectionRegistry":{register:[357,10,1,""],get_projection_class:[357,10,1,""],get_projection_names:[357,10,1,""]},"mpl_toolkits.axes_grid.axis_artist.AxisArtist":{draw:[326,10,1,""],get_transform:[326,10,1,""],LABELPAD:[326,13,1,""],set_label:[326,10,1,""],set_axislabel_direction:[326,10,1,""],toggle:[326,10,1,""],ZORDER:[326,13,1,""],set_axisline_style:[326,10,1,""],invert_ticklabel_direction:[326,10,1,""],get_helper:[326,10,1,""],set_axis_direction:[326,10,1,""],get_tightbbox:[326,10,1,""],get_axisline_style:[326,10,1,""],set_ticklabel_direction:[326,10,1,""]},"matplotlib.animation.Animation":{new_frame_seq:[579,10,1,""],save:[579,10,1,""],new_saved_frame_seq:[579,10,1,""]},"mpl_toolkits.mplot3d.axes3d":{Axes3D:[349,11,1,""],get_test_data:[349,12,1,""],unit_bbox:[349,12,1,""]},"matplotlib.legend.Legend":{get_frame_on:[266,10,1,""],get_title:[266,10,1,""],get_lines:[266,10,1,""],get_default_handler_map:[266,15,1,""],contains:[266,10,1,""],get_children:[266,10,1,""],set_bbox_to_anchor:[266,10,1,""],get_legend_handler:[266,14,1,""],set_frame_on:[266,10,1,""],get_bbox_to_anchor:[266,10,1,""],get_patches:[266,10,1,""],draw:[266,10,1,""],set_default_handler_map:[266,15,1,""],get_texts:[266,10,1,""],set_title:[266,10,1,""],codes:[266,13,1,""],get_frame:[266,10,1,""],get_legend_handler_map:[266,10,1,""],draw_frame:[266,10,1,""],update_default_handler_map:[266,15,1,""],get_window_extent:[266,10,1,""],draggable:[266,10,1,""],zorder:[266,13,1,""]},"matplotlib.ticker.TickHelper":{set_view_interval:[527,10,1,""],set_bounds:[527,10,1,""],set_data_interval:[527,10,1,""],create_dummy_axis:[527,10,1,""],set_axis:[527,10,1,""],axis:[527,13,1,""]},"matplotlib.widgets.SpanSelector":{update:[92,10,1,""],ignore:[92,10,1,""],release:[92,10,1,""],new_axes:[92,10,1,""],press:[92,10,1,""],onmove:[92,10,1,""],update_background:[92,10,1,""]},"mpl_toolkits.axes_grid.axes_divider.Divider":{locate:[190,10,1,""],get_vsize_hsize:[190,10,1,""],get_anchor:[190,10,1,""],set_horizontal:[190,10,1,""],get_position:[190,10,1,""],get_horizontal_sizes:[190,10,1,""],set_aspect:[190,10,1,""],set_locator:[190,10,1,""],get_aspect:[190,10,1,""],add_auto_adjustable_area:[190,10,1,""],get_vertical_sizes:[190,10,1,""],get_locator:[190,10,1,""],get_position_runtime:[190,10,1,""],new_locator:[190,10,1,""],get_vertical:[190,10,1,""],get_horizontal:[190,10,1,""],set_position:[190,10,1,""],set_vertical:[190,10,1,""],set_anchor:[190,10,1,""],append_size:[190,10,1,""]},"matplotlib.backend_bases.FigureManagerBase":{show:[297,10,1,""],key_press_handler_id:[297,13,1,""],full_screen_toggle:[297,10,1,""],get_window_title:[297,10,1,""],key_press:[297,10,1,""],show_popup:[297,10,1,""],set_window_title:[297,10,1,""],destroy:[297,10,1,""],resize:[297,10,1,""]},"matplotlib.mlab.PCA":{project:[492,10,1,""],center:[492,10,1,""]},"matplotlib.ticker.FixedFormatter":{get_offset:[527,10,1,""],set_offset_string:[527,10,1,""]},"matplotlib.animation.ImageMagickFileWriter":{supported_formats:[579,13,1,""]},"matplotlib.fontconfig_pattern":{generate_fontconfig_pattern:[287,12,1,""],family_escape:[287,12,1,""],value_unescape:[287,12,1,""],value_escape:[287,12,1,""],FontconfigPatternParser:[287,11,1,""],family_unescape:[287,12,1,""]},"matplotlib.mathtext":{AutoHeightChar:[312,11,1,""],MathtextBackendSvg:[312,11,1,""],NegFill:[312,11,1,""],Hrule:[312,11,1,""],NegFil:[312,11,1,""],MathtextBackendPdf:[312,11,1,""],get_unicode_index:[312,12,1,""],HCentered:[312,11,1,""],MathtextBackendCairo:[312,11,1,""],math_to_image:[312,12,1,""],VCentered:[312,11,1,""],StixFonts:[312,11,1,""],Fil:[312,11,1,""],Node:[312,11,1,""],TruetypeFonts:[312,11,1,""],MathtextBackendPs:[312,11,1,""],NegFilll:[312,11,1,""],MathTextParser:[312,11,1,""],MathtextBackendAgg:[312,11,1,""],StandardPsFonts:[312,11,1,""],MathtextBackendBitmap:[312,11,1,""],MathtextBackendPath:[312,11,1,""],Hlist:[312,11,1,""],AutoWidthChar:[312,11,1,""],Vlist:[312,11,1,""],BakomaFonts:[312,11,1,""],Box:[312,11,1,""],MathTextWarning:[312,16,1,""],StixSansFonts:[312,11,1,""],Accent:[312,11,1,""],GlueSpec:[312,11,1,""],Fonts:[312,11,1,""],List:[312,11,1,""],Rule:[312,11,1,""],Kern:[312,11,1,""],Vbox:[312,11,1,""],Error:[312,12,1,""],Filll:[312,11,1,""],unichr_safe:[312,12,1,""],MathtextBackend:[312,11,1,""],SsGlue:[312,11,1,""],Vrule:[312,11,1,""],Parser:[312,11,1,""],Char:[312,11,1,""],SubSuperCluster:[312,11,1,""],UnicodeFonts:[312,11,1,""],Fill:[312,11,1,""],Ship:[312,11,1,""],Glue:[312,11,1,""],Hbox:[312,11,1,""]},"matplotlib.patches.FancyBboxPatch":{set_x:[248,10,1,""],set_y:[248,10,1,""],set_height:[248,10,1,""],get_y:[248,10,1,""],set_mutation_scale:[248,10,1,""],set_boxstyle:[248,10,1,""],set_bounds:[248,10,1,""],get_path:[248,10,1,""],get_height:[248,10,1,""],get_bbox:[248,10,1,""],get_mutation_scale:[248,10,1,""],get_mutation_aspect:[248,10,1,""],get_x:[248,10,1,""],get_width:[248,10,1,""],set_width:[248,10,1,""],set_mutation_aspect:[248,10,1,""],get_boxstyle:[248,10,1,""]},"matplotlib.patches.BoxStyle.Round4":{transmute:[248,10,1,""]},"matplotlib.projections.polar.PolarAffine":{get_matrix:[357,10,1,""]},"matplotlib.animation.FuncAnimation":{new_frame_seq:[579,10,1,""],new_saved_frame_seq:[579,10,1,""]},"matplotlib.patches.BoxStyle.Sawtooth":{transmute:[248,10,1,""]},"matplotlib.scale.LogScale":{get_transform:[357,10,1,""],set_default_locators_and_formatters:[357,10,1,""],limit_range_for_scale:[357,10,1,""]},"matplotlib.ticker":{LogFormatter:[527,11,1,""],ScalarFormatter:[527,11,1,""],NullFormatter:[527,11,1,""],MultipleLocator:[527,11,1,""],FormatStrFormatter:[527,11,1,""],FixedLocator:[527,11,1,""],TickHelper:[527,11,1,""],NullLocator:[527,11,1,""],MaxNLocator:[527,11,1,""],IndexLocator:[527,11,1,""],LogFormatterExponent:[527,11,1,""],Locator:[527,11,1,""],LogLocator:[527,11,1,""],LinearLocator:[527,11,1,""],LogFormatterMathtext:[527,11,1,""],AutoLocator:[527,11,1,""],Formatter:[527,11,1,""],FixedFormatter:[527,11,1,""],FuncFormatter:[527,11,1,""],AutoMinorLocator:[527,11,1,""]},"matplotlib.patches.ArrowStyle.Wedge":{transmute:[248,10,1,""]},"matplotlib.dviread":{Tfm:[153,11,1,""],Dvi:[153,11,1,""],Vf:[153,11,1,""],Encoding:[153,11,1,""],PsfontsMap:[153,11,1,""],DviFont:[153,11,1,""],find_tex_file:[153,12,1,""]},"matplotlib.backend_bases.MouseEvent":{button:[297,13,1,""],step:[297,13,1,""],ydata:[297,13,1,""],xdata:[297,13,1,""],y:[297,13,1,""],x:[297,13,1,""],inaxes:[297,13,1,""],dblclick:[297,13,1,""]},"matplotlib.ticker.LinearLocator":{view_limits:[527,10,1,""],tick_values:[527,10,1,""]},"matplotlib.mathtext.BakomaFonts":{alias:[312,13,1,""],get_sized_alternatives_for_symbol:[312,10,1,""],target:[312,13,1,""]},"matplotlib.axes.Axes":{get_xticks:[5,10,1,""],hexbin:[5,10,1,""],drag_pan:[5,10,1,""],text:[5,10,1,""],get_ybound:[5,10,1,""],set_xscale:[5,10,1,""],get_yaxis:[5,10,1,""],stackplot:[5,10,1,""],get_yaxis_text2_transform:[5,10,1,""],invert_yaxis:[5,10,1,""],invert_xaxis:[5,10,1,""],has_data:[5,10,1,""],contourf:[5,10,1,""],add_collection:[5,10,1,""],format_ydata:[5,10,1,""],cla:[5,10,1,""],get_children:[5,10,1,""],update_datalim:[5,10,1,""],set_frame_on:[5,10,1,""],hlines:[5,10,1,""],get_yaxis_transform:[5,10,1,""],can_zoom:[5,10,1,""],set_xlim:[5,10,1,""],set_xticklabels:[5,10,1,""],set_aspect:[5,10,1,""],psd:[5,10,1,""],get_xaxis_text1_transform:[5,10,1,""],get_yminorticklabels:[5,10,1,""],grid:[5,10,1,""],set_xbound:[5,10,1,""],quiverkey:[5,10,1,""],set_axis_bgcolor:[5,10,1,""],set_yscale:[5,10,1,""],set_ymargin:[5,10,1,""],get_navigate:[5,10,1,""],set_anchor:[5,10,1,""],name:[5,13,1,""],bar:[5,10,1,""],plot_date:[5,10,1,""],get_default_bbox_extra_artists:[5,10,1,""],get_autoscalex_on:[5,10,1,""],get_autoscale_on:[5,10,1,""],add_table:[5,10,1,""],pcolormesh:[5,10,1,""],can_pan:[5,10,1,""],arrow:[5,10,1,""],get_xmajorticklabels:[5,10,1,""],minorticks_on:[5,10,1,""],draw:[5,10,1,""],ishold:[5,10,1,""],set_ylabel:[5,10,1,""],table:[5,10,1,""],xaxis_date:[5,10,1,""],barh:[5,10,1,""],matshow:[5,10,1,""],get_axes_locator:[5,10,1,""],get_xticklabels:[5,10,1,""],contour:[5,10,1,""],get_legend_handles_labels:[5,10,1,""],yaxis_inverted:[5,10,1,""],get_ylim:[5,10,1,""],get_xlabel:[5,10,1,""],get_xaxis_transform:[5,10,1,""],get_images:[5,10,1,""],set_rasterization_zorder:[5,10,1,""],streamplot:[5,10,1,""],hist:[5,10,1,""],set_autoscaley_on:[5,10,1,""],set_ylim:[5,10,1,""],redraw_in_frame:[5,10,1,""],start_pan:[5,10,1,""],axvline:[5,10,1,""],loglog:[5,10,1,""],twinx:[5,10,1,""],set_yticklabels:[5,10,1,""],set_axes_locator:[5,10,1,""],acorr:[5,10,1,""],set_color_cycle:[5,10,1,""],stem:[5,10,1,""],set_title:[5,10,1,""],eventplot:[5,10,1,""],set_navigate_mode:[5,10,1,""],get_frame:[5,10,1,""],legend:[5,10,1,""],yaxis_date:[5,10,1,""],contains_point:[5,10,1,""],get_xscale:[5,10,1,""],vlines:[5,10,1,""],get_legend:[5,10,1,""],semilogx:[5,10,1,""],plot:[5,10,1,""],set_axisbelow:[5,10,1,""],set_xlabel:[5,10,1,""],broken_barh:[5,10,1,""],pick:[5,10,1,""],get_adjustable:[5,10,1,""],set_autoscale_on:[5,10,1,""],add_line:[5,10,1,""],get_anchor:[5,10,1,""],imshow:[5,10,1,""],step:[5,10,1,""],format_xdata:[5,10,1,""],axhline:[5,10,1,""],fill_between:[5,10,1,""],get_xaxis_text2_transform:[5,10,1,""],twiny:[5,10,1,""],annotate:[5,10,1,""],get_shared_x_axes:[5,10,1,""],tricontourf:[5,10,1,""],get_lines:[5,10,1,""],cohere:[5,10,1,""],get_cursor_props:[5,10,1,""],ticklabel_format:[5,10,1,""],get_navigate_mode:[5,10,1,""],get_xaxis:[5,10,1,""],set_xticks:[5,10,1,""],get_yticklabels:[5,10,1,""],contains:[5,10,1,""],get_yscale:[5,10,1,""],axhspan:[5,10,1,""],tick_params:[5,10,1,""],set_axis_off:[5,10,1,""],set_yticks:[5,10,1,""],pcolor:[5,10,1,""],clabel:[5,10,1,""],get_frame_on:[5,10,1,""],get_xminorticklabels:[5,10,1,""],add_artist:[5,10,1,""],update_datalim_numerix:[5,10,1,""],relim:[5,10,1,""],format_coord:[5,10,1,""],reset_position:[5,10,1,""],get_yticklines:[5,10,1,""],get_autoscaley_on:[5,10,1,""],locator_params:[5,10,1,""],hold:[5,10,1,""],set_figure:[5,10,1,""],get_shared_y_axes:[5,10,1,""],xaxis_inverted:[5,10,1,""],hist2d:[5,10,1,""],get_window_extent:[5,10,1,""],set_ybound:[5,10,1,""],triplot:[5,10,1,""],pcolorfast:[5,10,1,""],set_cursor_props:[5,10,1,""],set_axis_on:[5,10,1,""],scatter:[5,10,1,""],xcorr:[5,10,1,""],set_adjustable:[5,10,1,""],spy:[5,10,1,""],quiver:[5,10,1,""],get_xticklines:[5,10,1,""],set_navigate:[5,10,1,""],tripcolor:[5,10,1,""],end_pan:[5,10,1,""],specgram:[5,10,1,""],pie:[5,10,1,""],get_title:[5,10,1,""],semilogy:[5,10,1,""],apply_aspect:[5,10,1,""],get_data_ratio:[5,10,1,""],set_xmargin:[5,10,1,""],get_tightbbox:[5,10,1,""],set_position:[5,10,1,""],margins:[5,10,1,""],fill:[5,10,1,""],get_ylabel:[5,10,1,""],get_aspect:[5,10,1,""],get_yticks:[5,10,1,""],csd:[5,10,1,""],set_autoscalex_on:[5,10,1,""],get_axisbelow:[5,10,1,""],minorticks_off:[5,10,1,""],get_ygridlines:[5,10,1,""],get_yaxis_text1_transform:[5,10,1,""],axis:[5,10,1,""],boxplot:[5,10,1,""],get_data_ratio_log:[5,10,1,""],get_position:[5,10,1,""],in_axes:[5,10,1,""],errorbar:[5,10,1,""],fill_betweenx:[5,10,1,""],get_xlim:[5,10,1,""],get_axis_bgcolor:[5,10,1,""],add_container:[5,10,1,""],get_xbound:[5,10,1,""],get_xgridlines:[5,10,1,""],autoscale:[5,10,1,""],draw_artist:[5,10,1,""],get_renderer_cache:[5,10,1,""],tricontour:[5,10,1,""],get_rasterization_zorder:[5,10,1,""],clear:[5,10,1,""],autoscale_view:[5,10,1,""],barbs:[5,10,1,""],get_ymajorticklabels:[5,10,1,""],update_datalim_bounds:[5,10,1,""],axvspan:[5,10,1,""],add_patch:[5,10,1,""]}},titleterms:{osx:[303,7],all:566,code:[0,1,2,3,4,6,8,9,11,76,13,15,16,17,18,19,20,24,25,26,27,169,29,30,31,32,33,34,35,36,37,39,41,42,43,44,45,46,48,49,50,51,342,53,54,56,57,58,60,61,62,63,64,65,66,67,68,69,70,71,72,73,75,77,321,79,80,81,203,502,84,520,86,87,88,89,90,91,573,94,97,99,100,101,103,104,106,108,109,110,111,112,113,114,115,116,119,123,124,125,126,127,128,129,130,131,132,258,134,136,137,138,139,140,141,142,144,145,146,147,148,363,150,151,152,154,155,156,157,158,159,160,161,162,163,164,165,167,485,170,171,172,173,174,175,176,177,178,179,181,182,183,185,187,188,189,191,192,193,194,427,196,197,198,201,202,82,204,205,206,207,208,209,210,211,212,213,215,217,218,220,221,222,223,226,229,231,232,233,234,236,238,239,240,241,242,244,245,246,247,249,250,251,252,253,254,255,256,105,261,263,264,267,270,271,272,273,274,275,276,278,279,280,281,282,283,284,286,288,289,290,291,292,293,296,563,298,300,301,302,304,305,306,307,308,309,310,311,314,315,316,318,319,320,78,322,323,324,325,327,329,424,331,332,333,334,335,336,338,339,341,52,343,344,345,346,351,12,14,355,356,358,360,361,365,366,367,368,369,370,371,372,373,374,375,377,378,380,381,382,384,386,387,388,389,390,391,392,393,394,259,396,397,398,399,400,403,405,406,409,410,411,413,414,415,416,417,419,420,421,422,184,425,426,195,428,429,430,435,436,437,438,441,444,445,542,447,449,451,452,453,454,455,456,457,458,459,460,462,463,465,466,467,469,470,471,472,473,474,475,476,477,478,479,480,481,482,483,484,486,487,488,489,490,491,494,495,496,498,55,500,501,503,504,505,506,507,508,509,510,512,513,514,515,516,517,518,519,521,522,523,524,525,526,528,529,539,531,532,260,535,536,537,540,295,544,546,547,548,549,552,555,556,557,558,408,560,562,564,565,567,568,569,570,571,93,574,575,225,577,578,23,580,582,583,584,585,586,587,589],donut_demo:263,edg:566,skip:566,when:7,histogram_tkagg:293,concept:144,psd_demo2:46,psd_demo3:45,pathpatch3d_demo:310,follow:207,image_zcoord:386,locat:[257,464,122,431,581,527],whose:450,depend:257,basic_example_writ:66,graph:257,draggable_legend:292,topic:581,contour_imag:64,matlab:[492,83],ylabel:566,surface3d_radial_demo:394,strip_chart_demo:[574,370],draggabl:347,spec:588,file:[402,566,228],sourc:[303,7,515,207],rc_trait:393,moviewrit:218,mlab:492,mpl:214,line_demo_dash_control:52,demo_floating_ax:405,mous:347,faq:[40,328],pcolor_log:188,scatter_profil:97,upstream:533,surface3d_demo:37,hist_colormap:278,ticker:[527,168],customize_rc:70,histogram_demo_canvasagg:529,recip:442,level:85,showcas:[227,226],gui:92,patheffect_demo:53,axes_zoom_effect:77,adjust:[431,401,122],transoffset:208,idle_and_timeout:378,rendererbas:83,properti:[268,277],svg_filter_lin:87,histogram_path_demo:91,direct:214,tex:[440,317],span_selector:34,axes_prop:489,old_anim:[513,285,292,139,293,239,134,229,271,417,377,482,574,48,109,286,332,3,23,569,302],axis_equal_demo:516,animation_blit_tk:109,hexbin_demo:172,span_region:93,integr:57,compat:[107,492],cursor:104,what:[257,450,144,122],colorbar_tick_labelling_demo:508,demo_axes_hbox_divid:234,contour3d_demo:459,section:214,advanc:[581,10],grid:[257,96,450],current:401,delet:57,version:464,backend_driv:465,"new":[103,257,357,352,57],ginput_demo:124,method:83,errorbar_subsampl:106,simple_plot_fp:141,widget:[34,104,374,92,573,346,143,528,500,4,369,384],full:257,caveat:433,figure_axes_enter_leav:245,masked_demo:130,gener:[303,566,214,144],sophist:257,matplotlib:[74,554,248,257,262,224,38,395,40,545,312,448,5,144,7,383,266,228,83,418,561,153,576,566,527,492,352,96,357,120,92,464,499,121,95,243,200,468,362,287,22,379,149,85,579,21,432,98,434,515,166,28,168,294,297,299,402,214,511,541],axes_grid:[174,481,326,100,405,146,453,387,13,564,190,12,234,567,94,123,505,128,203,65,471,131,446,101,135,300,553],tricontour_smooth_delaunai:160,path:[440,385,262],custom_projection_exampl:525,legend:[257,442,266,440,122],interpret:379,fill_demo_featur:105,box:[257,442,83,581],search:566,scatter_demo:148,bayes_upd:32,artist_test:198,branch:[103,228,57],credit:439,broken_barh:114,pick:347,chang:[328,83,57],line_with_text:586,legend_demo4:540,axis3d:349,repositori:[533,57],pick_event_demo:242,appli:423,modul:[85,352],offset:340,wire3d_demo:189,releas:[257,228],api:[255,217,555,175,187,75,39,177,546,316,525,263,522,83,386,151,186,320,454,155,539,494,14,357,91,55,457,93,284,360,544,333,289,205,349,67,476,418,436,586,510,554],marker:[257,448],instal:[103,303,7,313,464],streamplot_demo_featur:127,post:228,select:103,anchored_artist:150,logo2:316,plot:[328,257,440,122,566,117,497,214,423],from:[303,493,7,328,57],wirefram:117,hist3d_demo:129,subplot2grid:431,two:588,contour3d_demo2:520,handler:122,call:257,demo_text_rotation_mod:391,fonts_demo:368,demo:440,type:[257,566],start:[214,117],more:[257,57],subplotspec:431,unicode_demo:165,python:[257,379,7],peopl:57,inset_locator_demo2:65,multiple_yaxis_with_spin:63,demo_affine_imag:476,enhanc:257,specgram_demo:560,examin:423,trisurf3d_demo2:371,known:[257,352],contour_manu:512,demo_colorbar_with_inset_loc:174,test_mouseclick:408,mri_with_eeg:532,annoy:442,errorbar_demo:18,account:299,room:566,"2dcollections3d_demo":325,ellipse_with_unit:452,log_test:406,work:[434,118,515,277],annot:[257,581,550,277],color_demo:8,fill_spir:327,can:257,sankey_demo_old:289,animation_blit_fltk:482,legend_transluc:514,scatter:[440,83,117],local:207,control:[257,379,566,277],subplot_demo:[279,437],process:103,contour3d_demo3:84,dolphin:259,share:[442,57],annotate_with_unit:256,path_editor:589,compound_path:187,liter:[95,553,326,153,395,576,21,190,297,448,446,511,85],explor:57,onlin:10,text_demo_fontdict:81,animation_blit_gtk:332,afm:541,trisurf3d_demo:27,multipl:[257,566,277,122],csh:133,backend_gtkagg:511,simple_3danim:367,get:[464,214,207,117],psd_demo:113,write:[103,352,354],how:[566,328,7,144],run:352,lasso_selector_demo:500,finance_work2:222,dynamic_collect:569,simpl:[433,440,352,347],updat:[257,379,228,207],demo_agg_filt:161,axesgrid:[450,468,98,561,554],backend_bas:[297,83],tcsh:133,pypi:228,clone:533,arrow_simple_demo:479,mayavi:328,mathtext_demo:145,diagram:[257,214],psd_demo_complex:321,user_interfac:[483,491,557,380,179,382,562,76,351,335,529,390,534,427,421,125,126,430,580,399,504,338,339,334,341,324,449,507],date:[566,442,440,168,57],usetex_demo:282,data:[566,340,423],date_index_formatt:[55,422],toggle_imag:577,central:57,viewlim:240,github:[235,299,57],tricontour_demo:61,interpol:[257,423],movie_demo:[229,531],dynamic_image_wxagg2:286,element:566,issu:257,alias:199,collections_demo:205,environ:133,enter:347,histogram_percent_demo:241,artist_refer:99,legend_auto:280,order:122,scatter_symbol:344,bars3d_demo:451,help:464,contourf_log:416,scatter_hist:[450,203,273],move:[566,493],mixed_subplots_demo:71,backend_wxagg:21,animation_blit_qt4:271,keyboard:337,multiple_figs_demo:206,zoom_window:288,vari:431,dynam:[402,214],histogram_demo_featur:209,style:[103,144],vline_hline_demo:365,titles_demo:20,basic_unit:314,fix:[257,442],gtk:561,clickabl:566,better:257,hist2d_log_demo:552,complex:[431,581,122],main:57,line_collection2:6,accented_text:570,tri:[257,96,117],non:144,anim:[579,461,218,68,9,169,370,367,49,257,558,32,519,315,214,162,413,66],legend_scatt:140,thei:144,basic_exampl:9,financi:440,contourf_demo:181,evans_test:24,rectangl:[257,347],bound:[257,83],"break":164,scatter_piechart:555,filledmarker_demo:409,date_demo_convert:191,custom_cmap:583,usetex_fonteffect:556,major_minor_demo1:276,pipong:50,text_rotation_relative_to_lin:304,introduct:[353,412,237],multiprocess:171,ganged_plot:25,name:[214,199],tricontour_smooth_us:283,pcolor_smal:425,units_scatt:296,troubleshoot:[464,543,317],easili:442,mode:144,arrow:[257,581],embedding_in_gtk3_panzoom:351,rec_groupby_demo:159,unicod:543,ellipse_rot:506,button:374,joinstyl:151,compil:7,marker_path:295,gradient_bar:201,multicolored_lin:258,slider_demo:384,mathtext_asarrai:155,demo_annotation_box:535,fraction:354,"static":214,connect:347,resourc:10,beyond:83,todo:401,ticks_and_spin:[404,319,196,56,184],out:328,variabl:133,stackplot_demo2:69,rcparam:257,triplot_demo:136,animation_blit_gtk2:239,space:83,streamplot:[257,440],minor_tick:401,content:[144,257,464,133,117,566,349,7],laid:328,gtk_timeout:48,size:431,jpeg_qual:257,surface3d_demo3:307,surface3d_demo2:306,multilin:501,tex_unicode_demo:170,proxi:122,insid:566,workflow:[57,10],image_demo_clip_path:119,tox:352,tricontour_vs_griddata:193,git:[10,269,464,199,313,7],eventplot:257,simple_timer_wx:3,embedding_in_tk2:427,ask:57,backend_pdf:95,bash:133,custom_ticker1:548,data_help:469,angl:328,ftface_prop:549,axislabel:401,latest:207,timer:152,sankey_demo_rankin:217,recov:57,length:257,place:[442,581],agg_oo:333,custom_scale_exampl:544,summari:[497,144,57,10],basemap:[561,440],licens:[224,107],simple_anchored_artist:128,pgf:257,softwar:257,rang:423,render:[440,543],subplots_adjust:244,arrai:[492,423],misc:[512,563,407,363,478,30,388,159,393,233,456,171,264,87,44,549],number:354,email:199,instruct:303,set:[257,402,133,299,533],submit:566,axesdivid:[443,450],spy_demo:232,quiver_demo:291,pstest:26,fanci:[257,442],text_rot:523,differ:[588,328],mathtext:[83,312],rec_edit_gtk_custom:382,top:85,accent:354,system:317,annotation_demo2:355,master:[450,57],make_room_for_ylabel_using_axesgrid:123,superscript:354,font_index:363,mri_demo:163,pcolor:83,cite:566,subplot:[566,169,442,440,117,431,257],gridspec:[431,433,120],axes_s:446,option:[214,543],watermark_text:255,fahrenheit_celsius_scal:67,travi:352,tool:561,copi:[299,207],eventcollection_demo:197,annotation_demo:238,animation_blit_wx:23,colorbar_onli:539,slider:440,image_clip_path:212,legend_demo_custom_handl:366,simple_plot:381,inset_locator_demo:453,major_ticklabel:401,date_demo:360,mathtext_wx:380,font_family_rc:284,scheme:423,keyword:103,unicode_minu:457,load_convert:502,bbox_inch:257,remov:[257,7],triplot:257,project:357,close_ev:415,axisartist:[450,401],wxcursor_demo:449,posit:257,font_fil:522,colour:518,polys3d_demo:211,print_stdout:467,pre:[303,95,553,326,153,395,576,21,190,297,448,446,511,85],"function":[103,257,492],date_demo_rrul:389,tripcolor:257,aspect_loglog:496,argument:[103,257],ticklabel:401,csd_demo:419,packag:[303,228],shell:379,line_collect:11,lineprops_dialog_gtk:399,tabl:[257,440],django:566,marathon:257,longshort:44,built:303,image_mask:173,imagegrid:450,demo_axes_grid2:481,contour:[257,83,117],note:[7,83],namespac:401,exampl:[0,1,2,3,4,6,8,9,11,76,13,14,15,16,17,18,19,20,24,25,26,27,169,29,30,31,32,33,34,35,36,37,39,41,42,43,44,45,46,47,48,49,50,51,342,53,54,56,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,75,77,321,79,80,81,203,502,84,520,86,87,88,89,90,91,566,573,94,97,99,100,101,102,103,104,106,108,109,110,111,112,113,114,115,116,119,123,124,125,126,127,128,129,130,131,132,258,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,363,150,151,152,154,155,156,157,158,159,160,161,162,163,164,165,167,485,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,191,192,193,194,195,196,197,198,200,201,202,82,204,205,206,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,226,227,229,230,231,232,233,234,236,238,239,240,241,242,244,245,246,247,249,250,251,252,253,254,255,256,105,260,261,263,264,267,270,271,272,273,274,275,276,278,279,280,281,282,283,284,285,286,288,289,290,291,292,293,296,563,298,300,301,302,304,305,306,307,308,309,310,311,314,315,316,318,319,320,78,322,323,324,325,327,329,331,332,333,334,335,336,338,339,341,52,343,344,345,346,347,350,351,12,354,355,356,358,359,360,361,364,365,366,367,368,369,370,371,372,373,374,375,376,377,378,380,381,382,384,385,386,387,388,389,390,391,392,393,394,259,396,397,398,399,400,403,404,405,406,407,408,409,410,411,413,414,415,416,417,419,420,421,422,424,425,426,427,428,429,430,431,433,435,436,437,438,441,444,445,542,447,449,450,451,452,453,454,455,456,457,458,459,460,461,462,463,465,466,467,469,470,471,472,473,474,475,476,477,478,479,480,481,482,483,484,486,487,488,489,490,491,494,495,496,498,55,500,501,503,504,505,506,507,508,509,510,512,513,514,516,517,518,519,521,522,523,524,525,526,528,529,539,531,532,534,535,536,537,538,540,295,544,546,547,548,549,552,555,556,557,558,559,560,562,564,565,567,568,569,570,571,572,93,574,575,225,577,578,23,580,582,583,584,585,586,587,589],mpl_toolkit:[190,446,326,553],which:7,event_handl:[305,378,559,110,42,36,408,182,43,415,152,50,16,156,54,240,242,245,288,472,475,589],date_demo1:112,date_demo2:111,embedding_in_qt4_wtoolbar:504,demo_axes_grid:505,noth:7,singl:57,polar_scatter_demo:72,lasso_demo:156,coords_demo:86,distribut:561,stem_plot:308,subplots_axes_and_figur:[279,376],scatter3d_demo:400,barcode_demo:215,object:[348,566,83,347],chart:440,demo_parasite_axes2:387,triangular:[257,96],barb_demo:246,bar_stack:568,image_demo:[252,414],bsd:107,alpha:442,pyqt4:257,backend_qt4agg:576,why:107,checklist:103,appear:566,demo_axisline_styl:131,radar_chart:177,don:328,rescu:379,request:103,dynamic_image_gtkagg:417,typeset:317,nan_test:345,to_numer:331,ymargin:257,loadrec:311,left:257,preambl:317,pyplot:[103,294,144,277],dot:588,offset_demo:220,fancyarrow_demo:474,embedding_in_tk:430,show:[257,566,7],text:[543,268,581,257,442,117,118,550,277,412,248],connectorpatch:581,newscalarformatter_demo:225,path_patch_demo:582,tripcolor_demo:301,stackplot:257,bbox_intersect:39,stix_fonts_demo:82,radic:354,font:[541,354,317],fine:7,find:[257,566],rotat:[257,401],contourf_hatch:270,cell:431,legend_pick:36,ratio:566,animation_demo:194,menu:346,configur:[566,214,199,299],apach:566,contourf3d_demo:185,about:83,font_table_ttf:51,mpl_with_glad:507,demo_axes_divid:13,broken_axi:19,ksh:133,pylab:144,fonts_demo_kw:411,contribut:566,pong_gtk:43,insetloc:450,embedding_in_gtk3:125,embedding_in_gtk2:126,repo:[533,57],nativ:[257,440],report:7,subscript:354,requir:[303,352],layout:[257,431,433,268],figure_titl:79,tikz:257,bar:[440,117],organ:214,artist:[348,581,83,248,122],engineering_formatt:454,barchart_demo:[428,436],barchart_demo2:498,wire3d_animation_demo:322,ginput_manual_clabel:88,common:442,contain:[348,122],subplots_demo:524,twinx:450,where:566,hinton_demo:460,dpi:83,figlegend_demo:261,autosc:83,demo_curvelinear_grid2:567,sankei:[257,22],layer_imag:373,scatter_demo2:435,rectangle_selector:573,startup:423,tight_bbox_test:30,ticklabels_demo_rot:184,pylab_exampl:[0,1,140,138,308,141,142,542,2,311,6,145,147,508,8,150,11,321,455,15,249,154,323,396,381,157,17,327,444,462,463,19,568,331,20,160,467,309,469,161,470,163,25,164,26,473,167,29,336,485,570,490,31,170,477,33,172,474,173,355,479,35,548,356,480,343,344,345,225,41,484,486,487,181,183,488,489,45,46,188,191,192,193,51,495,342,194,53,304,197,358,498,575,58,60,61,202,62,63,318,82,64,206,365,503,69,208,70,368,210,212,509,213,215,201,216,373,514,375,516,221,517,518,223,77,78,79,521,496,502,523,524,231,372,232,526,86,236,238,531,389,532,88,89,90,535,536,392,241,540,244,246,247,547,97,250,391,398,506,424,409,552,254,366,556,106,406,108,259,260,261,410,411,111,112,113,414,267,416,114,560,115,270,116,273,419,274,275,276,278,537,280,422,501,571,425,426,281,195,282,283,428,124,429,222,577,445,329,578,290,291,130,132,258,295,435,73,420,584,585,437,136,301,438,583],emac:214,fail:352,statist:[18,102,361,209],pie_demo2:424,table_demo:260,cohere_demo:192,multicursor:369,lorenz_attractor:466,image_demo2:41,linewidth:566,correctli:257,quad_bezi:175,pattern:257,review:57,picklabl:257,label:[257,566],hist:257,figur:[149,257,566,277,348,83,214],between:[257,442,581],"import":423,lualatex:317,paramet:257,log_demo:571,across:566,spines_demo_bound:196,attribut:347,mathtext_exampl:[440,62],mplot3d:[441,257,307,220,310,447,176,520,451,71,349,185,561,440,84,117,189,306,322,27,325,37,328,538,466,394,204,129,459,432,400,298,211,371],fill_between_demo:223,shared_axis_demo:398,sankey_demo_link:75,parasiteax:450,griddata_demo:90,svg_histogram:491,figimage_demo:73,zorder_demo:521,html5:257,ipython:[257,379],finance_demo:231,problem:[464,7],miscellan:492,demo_floating_axi:12,accident:57,pcolormesh_level:137,extens:[103,257],subplot3d_demo:298,text_labels_and_annot:[165,359,81],fontconfig_pattern:287,plotfile_demo:254,etc:214,tutori:[385,10,117,340,277,348,423],pdf:566,ellips:440,subplot_toolbar:509,point:566,color:[403,83,257,499,158,59,423],overview:[533,493,199,57,313,450,265],format:[527,214],height:450,sync:450,twin:450,linux:[7,133],carpentri:257,gtk_spreadsheet:390,backend:[95,144,257,576,21,551,103,511],rec_edit_gtk_simpl:483,vertic:257,multi_imag:250,poly_editor:42,patch:[566,493,83,248],numpi:423,window:[303,566,7,133],legend_demo3:537,much:257,axes_grid1:450,basic:[431,412],multipage_pdf:60,pick_event_demo2:472,eventplot_demo:455,quickli:257,histogram:[440,68],cartopi:561,adob:541,pong_qt:16,imag:[257,566,352,423],hist2d_demo:358,coordin:[581,340],dynamic_image2:49,matplotlibrc:[257,402],axes_divid:190,specialty_plot:[47,460],simple_axisline4:101,tight_layout:166,xmargin:257,minor_ticklabel:401,scatter_star_poli:15,look:328,svg_filter_pi:388,check_button:4,align:[257,566,401],hyperlink:167,tex_demo:318,formatt:168,defin:581,custom_figure_class:2,glossari:330,coords_report:157,images_contours_and_field:[572,565,252,127,137,119],anchor:[257,581],type1font:395,image_slices_view:210,have:566,helper:[214,492],centr:257,metric:541,"b\u00e9zier":385,toolkit:[432,98,257,561,468,450,554],hexbin_demo2:547,equal:566,"default":[257,401],colorbar:[257,450,433,121],sever:57,shared_axis_across_figur:526,sankey_demo_bas:510,develop:[28,103,269,57,493],boxplot_demo3:585,anchoredartist:450,perform:257,make:[566,493,299,57],boxplot_demo2:584,same:257,binari:7,pysid:257,html:566,pad:401,fancybox_demo:247,zope:566,errorbar_demo_featur:361,document:[228,357,257,566,103,214],histogram_demo_extend:542,complet:7,geo_demo:487,screenshot:440,font_manag:287,nest:431,simple_anim_tkagg:139,effect:[581,340],art3d:349,initi:257,demo_axes_rgb:146,improv:257,canva:257,build:[303,7],stack:354,recent:464,image_interp:323,pseudocolor:423,embedding_in_qt:324,embedding_in_gtk:562,inherit:214,dviread:153,without:[257,566],command:[497,412,423],multicolumn:122,choos:317,programm:83,epd:7,fancytextbox_demo:281,polar_bar_demo:251,bar_unit_demo:178,invert_ax:202,savefig:257,animate_decay_tk_blit:134,compound:385,obtain:464,cursor_demo:31,demo_text_path:438,xelatex:317,floatingaxi:401,aspect:566,random_data:162,colormaps_refer:403,manual_axi:480,web:566,stock_demo:410,simple_idle_wx:513,easi:[257,7],hint:103,boxplot_demo:484,arctest:154,shortcut:337,rgb:450,polar_legend:195,contourf3d_demo2:204,exercis:347,fourier_demo_wx:341,save:[257,566],simple_axesgrid:564,image_nonuniform:343,applic:[566,83],units_sampl:397,usetex_baseline_test:249,dashpointlabel:375,transpar:[257,442,566],handl:347,hatch:257,alignment_test:517,psd:257,errorbar_limit:488,anscomb:116,background:257,text3d_demo:441,shadow:340,tick:[348,566,527],ellipse_collect:503,pylab_with_gtk:421,axis_artist:326,cbook:38,eventcollect:257,legend_demo:[29,14],like:328,specif:[423,317],deprec:492,spine:[257,545],docutil:[95,553,326,153,395,576,21,190,297,448,446,511,85],arbitrari:257,manual:[257,303,10],zoom:581,boxplot:257,edit:57,demo_tight_layout:578,eeg:440,stackplot_demo:342,dynamic_imag:558,page:10,demo_edge_colorbar:94,right:[257,328],set_and_get:420,spines_demo:56,polar:[357,440],interact:[379,580,144,337],radian_demo:80,pipelin:340,intern:214,major_tick:401,sampl:402,animate_decai:315,matshow:426,server:566,axhspan_demo:495,sample_data_demo:478,guid:[433,98,28,122,103,530],pythonic_matplotlib:58,collect:[257,243,83],step_demo:274,hangup:543,mathemat:[277,354],leav:347,unit:[452,74,256,397,198,272,296,350,178,314,80,24],rectangular:257,demo_bboximag:33,trigradient_demo:290,fill_betweenx_demo:108,refer:[214,423],simple_anim_gtk:377,ellipse_demo:78,colormap:362,scatter_custom_symbol:115,view:[442,328],usag:144,agreement:224,embedding_in_wx5:338,embedding_in_wx4:339,animation_blit_qt:302,embedding_in_wx3:334,embedding_in_wx2:335,dannys_exampl:444,axes_demo:142,triinterp_demo:575,lines3d_demo:447,contour_label_demo:462,matplotlib_icon:309,howto:[566,401],comparison:352,xcorr_demo:396,trifinder_event_demo:182,parasite_simple2:471,face:257,centered_ticklabel:329,spines_demo_drop:319,rotate_axes3d_demo:176,side:257,data_brows:54,integral_demo:226,findobj_demo:236,constructor:83,two_scal:320,commit:57,pie_demo_featur:587,shapes_and_collect:[148,99,582,364],own:299,logo:445,"float":450,major_minor_demo2:275,watermark_imag:546,automat:566,three:588,clippedlin:0,fancybox_demo2:267,looking_glass:305,simple_anim:519,axes3d:349,announc:228,image_origin:89,your:[348,533,299,57],usetex:543,merg:[199,57],color_cycle_demo:158,quadmesh_demo:17,embedding_in_qt4:76,span:[95,553,326,153,395,576,21,190,297,448,446,511,85],log:440,fill_demo:253,color_by_yvalu:372,system_monitor:183,support:257,transform:[434,340,83],boxstyl:581,custom:[581,122,431,402,348,354,317],width:450,annotation_demo3:356,pie_and_polar_chart:[72,587,251,180],interfac:[257,541,83],editor:199,lot:257,double_pendulum_anim:413,gridhelp:401,hatch_demo:490,favorit:442,fork:[533,299],tight:[257,433],proj3d:349,creation:83,contour_demo:392,latex:543,patch_collect:494,agg_buffer_to_arrai:473,line_styl:138,arrow_demo:485,navig:337,neutral:92,rasterization_demo:563,link:533,tick_param:257,placement:257,line:[277,401,248,117],radio_button:528,bar_demo2:272,pcolor_demo:477,pull:103,interactive2:179,curvilinear:450,possibl:543,whether:566,bugfix:257,displai:122,symlog_demo:486,text_handl:221,record:492,limit:[442,401],image_thumbnail:233,polar_demo:35,embed:257,numerix:257,svg_tooltip:557,featur:[257,57],creat:[442,357,340,299,352],item:122,certain:[566,328],pie:440,doesn:328,movi:566,postscript:543,implement:122,natgrid:561,our:442,ship:257,lines_bars_and_mark:[52,458,253,219,105],scatter_mask:132,fill:[257,442,440,117],demo_ribbon_box:429,log_bar:336,polygon:[566,117],shading_exampl:1,titl:257,user:[530,98,199],excel:561,detail:[533,313,199,57,493],refactor:83,event:347,axesgrid1:433,binomi:354,other:[257,379,57],rememb:257,test:[228,566,465,352,103,230],baselin:257,equal_aspect_ratio:213,stat:235,relat:144,streamplot_demo_mask:565,webapp_demo:470,spine_placement_demo:463,symbol:354,docstr:214,surfac:[257,117],express:[277,354],"class":[95,553,257,326,153,395,576,21,190,297,448,446,511,85],scale:[257,566,357,423],resampl:110,amplitud:257,interp_demo:147,demo_curvelinear_grid:100,rec_join_demo:264,stai:57,axi:[257,348,566,383,442],legend_demo2:536,directori:[257,464],blend:340,developer_commit_histori:456,keypress_demo:475,depth:566,simple_axesgrid2:300,barh_demo:458}}) \ No newline at end of file diff --git a/dev/users/annotations_guide.html b/dev/users/annotations_guide.html deleted file mode 100644 index 0d3fe02d824..00000000000 --- a/dev/users/annotations_guide.html +++ /dev/null @@ -1,783 +0,0 @@ - - - - - - - - Annotating Axes — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      Table Of Contents

      - - -

      Previous topic

      -

      Path Tutorial

      -

      Next topic

      -

      Our Favorite Recipes

      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      Annotating Axes

      -

      Do not proceed unless you already have read Annotating text, -text() and -annotate()!

      -
      -

      Annotating with Text with Box

      -

      Let’s start with a simple example.

      -

      (Source code, png, hires.png, pdf)

      -
      -../_images/annotate_text_arrow.png -
      -

      The text() function in the pyplot module (or -text method of the Axes class) takes bbox keyword argument, and when -given, a box around the text is drawn.

      -
      bbox_props = dict(boxstyle="rarrow,pad=0.3", fc="cyan", ec="b", lw=2)
      -t = ax.text(0, 0, "Direction", ha="center", va="center", rotation=45,
      -            size=15,
      -            bbox=bbox_props)
      -
      -
      -

      The patch object associated with the text can be accessed by:

      -
      bb = t.get_bbox_patch()
      -
      -
      -

      The return value is an instance of FancyBboxPatch and the patch -properties like facecolor, edgewidth, etc. can be accessed and -modified as usual. To change the shape of the box, use set_boxstyle -method.

      -
      bb.set_boxstyle("rarrow", pad=0.6)
      -
      -
      -

      The arguments are the name of the box style with its attributes as -keyword arguments. Currently, following box styles are implemented.

      -
      -
      ----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      ClassNameAttrs
      LArrowlarrowpad=0.3
      RArrowrarrowpad=0.3
      Roundroundpad=0.3,rounding_size=None
      Round4round4pad=0.3,rounding_size=None
      Roundtoothroundtoothpad=0.3,tooth_size=None
      Sawtoothsawtoothpad=0.3,tooth_size=None
      Squaresquarepad=0.3
      -
      -

      (Source code, png, hires.png, pdf)

      -
      -../_images/fancybox_demo22.png -
      -

      Note that the attributes arguments can be specified within the style -name with separating comma (this form can be used as “boxstyle” value -of bbox argument when initializing the text instance)

      -
      bb.set_boxstyle("rarrow,pad=0.6")
      -
      -
      -
      -
      -

      Annotating with Arrow

      -

      The annotate() function in the pyplot module -(or annotate method of the Axes class) is used to draw an arrow -connecting two points on the plot.

      -
      ax.annotate("Annotation",
      -            xy=(x1, y1), xycoords='data',
      -            xytext=(x2, y2), textcoords='offset points',
      -            )
      -
      -
      -

      This annotates a point at xy in the given coordinate (xycoords) -with the text at xytext given in textcoords. Often, the -annotated point is specified in the data coordinate and the annotating -text in offset points. -See annotate() for available coordinate systems.

      -

      An arrow connecting two point (xy & xytext) can be optionally drawn by -specifying the arrowprops argument. To draw only an arrow, use -empty string as the first argument.

      -
      ax.annotate("",
      -            xy=(0.2, 0.2), xycoords='data',
      -            xytext=(0.8, 0.8), textcoords='data',
      -            arrowprops=dict(arrowstyle="->",
      -                            connectionstyle="arc3"),
      -            )
      -
      -
      -

      (Source code, png, hires.png, pdf)

      -
      -../_images/annotate_simple01.png -
      -

      The arrow drawing takes a few steps.

      -
        -
      1. a connecting path between two points are created. This is -controlled by connectionstyle key value.
      2. -
      3. If patch object is given (patchA & patchB), the path is clipped to -avoid the patch.
      4. -
      5. The path is further shrunk by given amount of pixels (shirnkA -& shrinkB)
      6. -
      7. The path is transmuted to arrow patch, which is controlled by the -arrowstyle key value.
      8. -
      -

      (Source code, png, hires.png, pdf)

      -
      -../_images/annotate_explain.png -
      -

      The creation of the connecting path between two points is controlled by -connectionstyle key and following styles are available.

      -
      -
      ---- - - - - - - - - - - - - - - - - - - - - - - -
      NameAttrs
      angleangleA=90,angleB=0,rad=0.0
      angle3angleA=90,angleB=0
      arcangleA=0,angleB=0,armA=None,armB=None,rad=0.0
      arc3rad=0.0
      bararmA=0.0,armB=0.0,fraction=0.3,angle=None
      -
      -

      Note that “3” in angle3 and arc3 is meant to indicate that the -resulting path is a quadratic spline segment (three control -points). As will be discussed below, some arrow style option only can -be used when the connecting path is a quadratic spline.

      -

      The behavior of each connection style is (limitedly) demonstrated in the -example below. (Warning : The behavior of the bar style is currently not -well defined, it may be changed in the future).

      -

      (Source code, png, hires.png, pdf)

      -
      -../_images/connectionstyle_demo.png -
      -

      The connecting path (after clipping and shrinking) is then mutated to -an arrow patch, according to the given arrowstyle.

      -
      -
      ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      NameAttrs
      -None
      ->head_length=0.4,head_width=0.2
      -[widthB=1.0,lengthB=0.2,angleB=None
      |-|widthA=1.0,widthB=1.0
      -|>head_length=0.4,head_width=0.2
      <-head_length=0.4,head_width=0.2
      <->head_length=0.4,head_width=0.2
      <|-head_length=0.4,head_width=0.2
      <|-|>head_length=0.4,head_width=0.2
      fancyhead_length=0.4,head_width=0.4,tail_width=0.4
      simplehead_length=0.5,head_width=0.5,tail_width=0.2
      wedgetail_width=0.3,shrink_factor=0.5
      -
      -

      (Source code, png, hires.png, pdf)

      -
      -../_images/fancyarrow_demo2.png -
      -

      Some arrowstyles only work with connection style that generates a -quadratic-spline segment. They are fancy, simple, and wedge. -For these arrow styles, you must use “angle3” or “arc3” connection -style.

      -

      If the annotation string is given, the patchA is set to the bbox patch -of the text by default.

      -

      (Source code, png, hires.png, pdf)

      -
      -../_images/annotate_simple02.png -
      -

      As in the text command, a box around the text can be drawn using -the bbox argument.

      -

      (Source code, png, hires.png, pdf)

      -
      -../_images/annotate_simple03.png -
      -

      By default, the starting point is set to the center of the text -extent. This can be adjusted with relpos key value. The values -are normalized to the extent of the text. For example, (0,0) means -lower-left corner and (1,1) means top-right.

      -

      (Source code, png, hires.png, pdf)

      -
      -../_images/annotate_simple04.png -
      -
      -
      -

      Placing Artist at the anchored location of the Axes

      -

      There are class of artist that can be placed at the anchored location -of the Axes. A common example is the legend. This type of artists can -be created by using the OffsetBox class. A few predefined classes are -available in mpl_toolkits.axes_grid.anchored_artists.

      -
      from mpl_toolkits.axes_grid.anchored_artists import AnchoredText
      -at = AnchoredText("Figure 1a",
      -                  prop=dict(size=8), frameon=True,
      -                  loc=2,
      -                  )
      -at.patch.set_boxstyle("round,pad=0.,rounding_size=0.2")
      -ax.add_artist(at)
      -
      -
      -

      (Source code, png, hires.png, pdf)

      -
      -../_images/anchored_box01.png -
      -

      The loc keyword has same meaning as in the legend command.

      -

      A simple application is when the size of the artist (or collection of -artists) is known in pixel size during the time of creation. For -example, If you want to draw a circle with fixed size of 20 pixel x 20 -pixel (radius = 10 pixel), you can utilize -AnchoredDrawingArea. The instance is created with a size of the -drawing area (in pixel). And user can add arbitrary artist to the -drawing area. Note that the extents of the artists that are added to -the drawing area has nothing to do with the placement of the drawing -area itself. The initial size only matters.

      -
      from mpl_toolkits.axes_grid.anchored_artists import AnchoredDrawingArea
      -
      -ada = AnchoredDrawingArea(20, 20, 0, 0,
      -                          loc=1, pad=0., frameon=False)
      -p1 = Circle((10, 10), 10)
      -ada.drawing_area.add_artist(p1)
      -p2 = Circle((30, 10), 5, fc="r")
      -ada.drawing_area.add_artist(p2)
      -
      -
      -

      The artists that are added to the drawing area should not have -transform set (they will be overridden) and the dimension of those -artists are interpreted as a pixel coordinate, i.e., the radius of the -circles in above example are 10 pixel and 5 pixel, respectively.

      -

      (Source code, png, hires.png, pdf)

      -
      -../_images/anchored_box02.png -
      -

      Sometimes, you want to your artists scale with data coordinate (or -other coordinate than canvas pixel). You can use -AnchoredAuxTransformBox class. This is similar to -AnchoredDrawingArea except that the extent of the artist is -determined during the drawing time respecting the specified transform.

      -
      from mpl_toolkits.axes_grid.anchored_artists import AnchoredAuxTransformBox
      -
      -box = AnchoredAuxTransformBox(ax.transData, loc=2)
      -el = Ellipse((0,0), width=0.1, height=0.4, angle=30) # in data coordinates!
      -box.drawing_area.add_artist(el)
      -
      -
      -

      The ellipse in the above example will have width and height -corresponds to 0.1 and 0.4 in data coordinate and will be -automatically scaled when the view limits of the axes change.

      -

      (Source code, png, hires.png, pdf)

      -
      -../_images/anchored_box03.png -
      -

      As in the legend, the bbox_to_anchor argument can be set. Using the -HPacker and VPacker, you can have an arrangement(?) of artist as in the -legend (as a matter of fact, this is how the legend is created).

      -

      (Source code, png, hires.png, pdf)

      -
      -../_images/anchored_box04.png -
      -

      Note that unlike the legend, the bbox_transform is set -to IdentityTransform by default.

      -
      -
      -

      Using Complex Coordinate with Annotation

      -

      The Annotation in matplotlib support several types of coordinate as -described in Annotating text. For an advanced user who wants -more control, it supports a few other options.

      -
      -
        -
      1. Transform instance. For example,

        -
        ax.annotate("Test", xy=(0.5, 0.5), xycoords=ax.transAxes)
        -
        -
        -

        is identical to

        -
        ax.annotate("Test", xy=(0.5, 0.5), xycoords="axes fraction")
        -
        -
        -

        With this, you can annotate a point in other axes.

        -
        ax1, ax2 = subplot(121), subplot(122)
        -ax2.annotate("Test", xy=(0.5, 0.5), xycoords=ax1.transData,
        -             xytext=(0.5, 0.5), textcoords=ax2.transData,
        -             arrowprops=dict(arrowstyle="->"))
        -
        -
        -
      2. -
      3. Artist instance. The xy value (or -xytext) is interpreted as a fractional coordinate of the bbox -(return value of get_window_extent) of the artist.

        -
        an1 = ax.annotate("Test 1", xy=(0.5, 0.5), xycoords="data",
        -                  va="center", ha="center",
        -                  bbox=dict(boxstyle="round", fc="w"))
        -an2 = ax.annotate("Test 2", xy=(1, 0.5), xycoords=an1, # (1,0.5) of the an1's bbox
        -                  xytext=(30,0), textcoords="offset points",
        -                  va="center", ha="left",
        -                  bbox=dict(boxstyle="round", fc="w"),
        -                  arrowprops=dict(arrowstyle="->"))
        -
        -
        -

        (Source code, png, hires.png, pdf)

        -
        -../_images/annotate_simple_coord01.png -
        -

        Note that it is your responsibility that the extent of the -coordinate artist (an1 in above example) is determined before an2 -gets drawn. In most cases, it means that an2 needs to be drawn -later than an1.

        -
      4. -
      5. A callable object that returns an instance of either -BboxBase or -Transform. If a transform is -returned, it is same as 1 and if bbox is returned, it is same -as 2. The callable object should take a single argument of -renderer instance. For example, following two commands give -identical results

        -
        an2 = ax.annotate("Test 2", xy=(1, 0.5), xycoords=an1,
        -                  xytext=(30,0), textcoords="offset points")
        -an2 = ax.annotate("Test 2", xy=(1, 0.5), xycoords=an1.get_window_extent,
        -                  xytext=(30,0), textcoords="offset points")
        -
        -
        -
      6. -
      7. A tuple of two coordinate specification. The first item is for -x-coordinate and the second is for y-coordinate. For example,

        -
        annotate("Test", xy=(0.5, 1), xycoords=("data", "axes fraction"))
        -
        -
        -

        0.5 is in data coordinate, and 1 is in normalized axes coordinate. -You may use an artist or transform as with a tuple. For example,

        -
        import matplotlib.pyplot as plt
        -
        -plt.figure(figsize=(3,2))
        -ax=plt.axes([0.1, 0.1, 0.8, 0.7])
        -an1 = ax.annotate("Test 1", xy=(0.5, 0.5), xycoords="data",
        -                  va="center", ha="center",
        -                  bbox=dict(boxstyle="round", fc="w"))
        -
        -an2 = ax.annotate("Test 2", xy=(0.5, 1.), xycoords=an1,
        -                  xytext=(0.5,1.1), textcoords=(an1, "axes fraction"),
        -                  va="bottom", ha="center",
        -                  bbox=dict(boxstyle="round", fc="w"),
        -                  arrowprops=dict(arrowstyle="->"))
        -plt.show()
        -
        -
        -

        (Source code, png, hires.png, pdf)

        -
        -../_images/annotate_simple_coord02.png -
        -
      8. -
      9. Sometimes, you want your annotation with some “offset points”, but -not from the annotated point but from other -point. OffsetFrom is a helper class for such -case.

        -
        import matplotlib.pyplot as plt
        -
        -plt.figure(figsize=(3,2))
        -ax=plt.axes([0.1, 0.1, 0.8, 0.7])
        -an1 = ax.annotate("Test 1", xy=(0.5, 0.5), xycoords="data",
        -                  va="center", ha="center",
        -                  bbox=dict(boxstyle="round", fc="w"))
        -
        -from matplotlib.text import OffsetFrom
        -offset_from = OffsetFrom(an1, (0.5, 0))
        -an2 = ax.annotate("Test 2", xy=(0.1, 0.1), xycoords="data",
        -                  xytext=(0, -10), textcoords=offset_from,
        -                  # xytext is offset points from "xy=(0.5, 0), xycoords=an1"
        -                  va="top", ha="center",
        -                  bbox=dict(boxstyle="round", fc="w"),
        -                  arrowprops=dict(arrowstyle="->"))
        -plt.show()
        -
        -
        -

        (Source code, png, hires.png, pdf)

        -
        -../_images/annotate_simple_coord03.png -
        -

        You may take a look at this example pylab_examples example code: annotation_demo3.py.

        -
      10. -
      -
      -
      -
      -

      Using ConnectorPatch

      -

      The ConnectorPatch is like an annotation without a text. While the -annotate function is recommended in most of situation, the -ConnectorPatch is useful when you want to connect points in different -axes.

      -
      from matplotlib.patches import ConnectionPatch
      -xy = (0.2, 0.2)
      -con = ConnectionPatch(xyA=xy, xyB=xy, coordsA="data", coordsB="data",
      -                      axesA=ax1, axesB=ax2)
      -ax2.add_artist(con)
      -
      -
      -

      The above code connects point xy in data coordinate of ax1 to -point xy int data coordinate of ax2. Here is a simple example.

      -

      (Source code, png, hires.png, pdf)

      -
      -../_images/connect_simple01.png -
      -

      While the ConnectorPatch instance can be added to any axes, but you -may want it to be added to the axes in the latter (?) of the axes -drawing order to prevent overlap (?) by other axes.

      -
      -

      Advanced Topics

      -
      -
      -
      -

      Zoom effect between Axes

      -

      mpl_toolkits.axes_grid.inset_locator defines some patch classes useful -for interconnect two axes. Understanding the code requires some -knowledge of how mpl’s transform works. But, utilizing it will be -straight forward.

      -

      (Source code, png, hires.png, pdf)

      -
      -../_images/axes_zoom_effect1.png -
      -
      -
      -

      Define Custom BoxStyle

      -

      You can use a custom box style. The value for the boxstyle can be a -callable object in following forms.:

      -
      def __call__(self, x0, y0, width, height, mutation_size,
      -             aspect_ratio=1.):
      -    """
      -    Given the location and size of the box, return the path of
      -    the box around it.
      -
      -      - *x0*, *y0*, *width*, *height* : location and size of the box
      -      - *mutation_size* : a reference scale for the mutation.
      -      - *aspect_ratio* : aspect-ration for the mutation.
      -    """
      -    path = ...
      -    return path
      -
      -
      -

      Here is a complete example.

      -

      (Source code, png, hires.png, pdf)

      -
      -../_images/custom_boxstyle01.png -
      -

      However, it is recommended that you derive from the -matplotlib.patches.BoxStyle._Base as demonstrated below.

      -
      from matplotlib.path import Path
      -from matplotlib.patches import BoxStyle
      -import matplotlib.pyplot as plt
      -
      -# we may derive from matplotlib.patches.BoxStyle._Base class.
      -# You need to overide transmute method in this case.
      -
      -class MyStyle(BoxStyle._Base):
      -    """
      -    A simple box.
      -    """
      -
      -    def __init__(self, pad=0.3):
      -        """
      -        The arguments need to be floating numbers and need to have
      -        default values.
      -
      -         *pad*
      -            amount of padding
      -        """
      -
      -        self.pad = pad
      -        super(MyStyle, self).__init__()
      -
      -    def transmute(self, x0, y0, width, height, mutation_size):
      -        """
      -        Given the location and size of the box, return the path of
      -        the box around it.
      -
      -         - *x0*, *y0*, *width*, *height* : location and size of the box
      -         - *mutation_size* : a reference scale for the mutation.
      -
      -        Often, the *mutation_size* is the font size of the text.
      -        You don't need to worry about the rotation as it is
      -        automatically taken care of.
      -        """
      -
      -        # padding
      -        pad = mutation_size * self.pad
      -
      -        # width and height with padding added.
      -        width, height = width + 2.*pad, \
      -                        height + 2.*pad,
      -
      -        # boundary of the padded box
      -        x0, y0 = x0-pad, y0-pad,
      -        x1, y1 = x0+width, y0 + height
      -
      -        cp = [(x0, y0),
      -              (x1, y0), (x1, y1), (x0, y1),
      -              (x0-pad, (y0+y1)/2.), (x0, y0),
      -              (x0, y0)]
      -
      -        com = [Path.MOVETO,
      -               Path.LINETO, Path.LINETO, Path.LINETO,
      -               Path.LINETO, Path.LINETO,
      -               Path.CLOSEPOLY]
      -
      -        path = Path(cp, com)
      -
      -        return path
      -
      -
      -# register the custom style
      -BoxStyle._style_list["angled"] = MyStyle
      -
      -plt.figure(1, figsize=(3,3))
      -ax = plt.subplot(111)
      -ax.text(0.5, 0.5, "Test", size=30, va="center", ha="center", rotation=30,
      -        bbox=dict(boxstyle="angled,pad=0.5", alpha=0.2))
      -
      -del BoxStyle._style_list["angled"]
      -
      -plt.show()
      -
      -
      -

      (Source code, png, hires.png, pdf)

      -
      -../_images/custom_boxstyle02.png -
      -

      Similarly, you can define custom ConnectionStyle and custom ArrowStyle. -See the source code of lib/matplotlib/patches.py and check -how each style class is defined.

      -
      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/users/annotations_intro.html b/dev/users/annotations_intro.html deleted file mode 100644 index 64fa32484f5..00000000000 --- a/dev/users/annotations_intro.html +++ /dev/null @@ -1,322 +0,0 @@ - - - - - - - - Annotating text — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      Previous topic

      -

      Text rendering With LaTeX

      -

      Next topic

      -

      Image tutorial

      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      Annotating text

      -

      For a more detailed introduction to annotations, see -Annotating Axes.

      -

      The uses of the basic text() command above -place text at an arbitrary position on the Axes. A common use case of -text is to annotate some feature of the plot, and the -annotate() method provides helper functionality -to make annotations easy. In an annotation, there are two points to -consider: the location being annotated represented by the argument -xy and the location of the text xytext. Both of these -arguments are (x,y) tuples.

      -
      import numpy as np
      -import matplotlib.pyplot as plt
      -
      -fig = plt.figure()
      -ax = fig.add_subplot(111)
      -
      -t = np.arange(0.0, 5.0, 0.01)
      -s = np.cos(2*np.pi*t)
      -line, = ax.plot(t, s, lw=2)
      -
      -ax.annotate('local max', xy=(2, 1), xytext=(3, 1.5),
      -            arrowprops=dict(facecolor='black', shrink=0.05),
      -            )
      -
      -ax.set_ylim(-2,2)
      -plt.show()
      -
      -
      -

      (Source code, png, hires.png, pdf)

      -
      -../_images/annotation_basic.png -
      -

      In this example, both the xy (arrow tip) and xytext locations -(text location) are in data coordinates. There are a variety of other -coordinate systems one can choose – you can specify the coordinate -system of xy and xytext with one of the following strings for -xycoords and textcoords (default is ‘data’)

      - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      argumentcoordinate system
      ‘figure points’points from the lower left corner of the figure
      ‘figure pixels’pixels from the lower left corner of the figure
      ‘figure fraction’0,0 is lower left of figure and 1,1 is upper right
      ‘axes points’points from lower left corner of axes
      ‘axes pixels’pixels from lower left corner of axes
      ‘axes fraction’0,0 is lower left of axes and 1,1 is upper right
      ‘data’use the axes data coordinate system
      -

      For example to place the text coordinates in fractional axes -coordinates, one could do:

      -
      ax.annotate('local max', xy=(3, 1),  xycoords='data',
      -            xytext=(0.8, 0.95), textcoords='axes fraction',
      -            arrowprops=dict(facecolor='black', shrink=0.05),
      -            horizontalalignment='right', verticalalignment='top',
      -            )
      -
      -
      -

      For physical coordinate systems (points or pixels) the origin is the -(bottom, left) of the figure or axes. If the value is negative, -however, the origin is from the (right, top) of the figure or axes, -analogous to negative indexing of sequences.

      -

      Optionally, you can specify arrow properties which draws an arrow -from the text to the annotated point by giving a dictionary of arrow -properties in the optional keyword argument arrowprops.

      - ---- - - - - - - - - - - - - - - - - - - - - - - -
      arrowprops keydescription
      widththe width of the arrow in points
      fracthe fraction of the arrow length occupied by the head
      headwidththe width of the base of the arrow head in points
      shrinkmove the tip and base some percent away from -the annotated point and text
      **kwargsany key for matplotlib.patches.Polygon, -e.g., facecolor
      -

      In the example below, the xy point is in native coordinates -(xycoords defaults to ‘data’). For a polar axes, this is in -(theta, radius) space. The text in this example is placed in the -fractional figure coordinate system. matplotlib.text.Text -keyword args like horizontalalignment, verticalalignment and -fontsize are passed from the `~matplotlib.Axes.annotate` to the -``Text instance

      -
      import numpy as np
      -import matplotlib.pyplot as plt
      -
      -fig = plt.figure()
      -ax = fig.add_subplot(111, polar=True)
      -r = np.arange(0,1,0.001)
      -theta = 2*2*np.pi*r
      -line, = ax.plot(theta, r, color='#ee8d18', lw=3)
      -
      -ind = 800
      -thisr, thistheta = r[ind], theta[ind]
      -ax.plot([thistheta], [thisr], 'o')
      -ax.annotate('a polar annotation',
      -            xy=(thistheta, thisr),  # theta, radius
      -            xytext=(0.05, 0.05),    # fraction, fraction
      -            textcoords='figure fraction',
      -            arrowprops=dict(facecolor='black', shrink=0.05),
      -            horizontalalignment='left',
      -            verticalalignment='bottom',
      -            )
      -plt.show()
      -
      -
      -

      (Source code, png, hires.png, pdf)

      -
      -../_images/annotation_polar.png -
      -

      For more on all the wild and wonderful things you can do with -annotations, including fancy arrows, see Annotating Axes -and pylab_examples example code: annotation_demo.py.

      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/users/artists.html b/dev/users/artists.html deleted file mode 100644 index f73329192e3..00000000000 --- a/dev/users/artists.html +++ /dev/null @@ -1,967 +0,0 @@ - - - - - - - - Artist tutorial — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      Table Of Contents

      - - -

      Previous topic

      -

      Image tutorial

      -

      Next topic

      -

      Customizing Location of Subplot Using GridSpec

      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      Artist tutorial

      -

      There are three layers to the matplotlib API. The -matplotlib.backend_bases.FigureCanvas is the area onto which -the figure is drawn, the matplotlib.backend_bases.Renderer is -the object which knows how to draw on the -FigureCanvas, and the -matplotlib.artist.Artist is the object that knows how to use -a renderer to paint onto the canvas. The -FigureCanvas and -Renderer handle all the details of -talking to user interface toolkits like wxPython or drawing languages like PostScript®, and -the Artist handles all the high level constructs like representing -and laying out the figure, text, and lines. The typical user will -spend 95% of his time working with the Artists.

      -

      There are two types of Artists: primitives and containers. The primitives -represent the standard graphical objects we want to paint onto our canvas: -Line2D, Rectangle, -Text, AxesImage, etc., and -the containers are places to put them (Axis, -Axes and Figure). The -standard use is to create a Figure instance, use -the Figure to create one or more Axes or -Subplot instances, and use the Axes instance -helper methods to create the primitives. In the example below, we create a -Figure instance using matplotlib.pyplot.figure(), which is a -convenience method for instantiating Figure instances and connecting them -with your user interface or drawing toolkit FigureCanvas. As we will -discuss below, this is not necessary – you can work directly with PostScript, -PDF Gtk+, or wxPython FigureCanvas instances, instantiate your Figures -directly and connect them yourselves – but since we are focusing here on the -Artist API we’ll let pyplot handle some of those details -for us:

      -
      import matplotlib.pyplot as plt
      -fig = plt.figure()
      -ax = fig.add_subplot(2,1,1) # two rows, one column, first plot
      -
      -
      -

      The Axes is probably the most important -class in the matplotlib API, and the one you will be working with most -of the time. This is because the Axes is the plotting area into -which most of the objects go, and the Axes has many special helper -methods (plot(), -text(), -hist(), -imshow()) to create the most common -graphics primitives (Line2D, -Text, -Rectangle, -Image, respectively). These helper methods -will take your data (e.g., numpy arrays and strings) and create -primitive Artist instances as needed (e.g., Line2D), add them to -the relevant containers, and draw them when requested. Most of you -are probably familiar with the Subplot, -which is just a special case of an Axes that lives on a regular -rows by columns grid of Subplot instances. If you want to create -an Axes at an arbitrary location, simply use the -add_axes() method which takes a list -of [left, bottom, width, height] values in 0-1 relative figure -coordinates:

      -
      fig2 = plt.figure()
      -ax2 = fig2.add_axes([0.15, 0.1, 0.7, 0.3])
      -
      -
      -

      Continuing with our example:

      -
      import numpy as np
      -t = np.arange(0.0, 1.0, 0.01)
      -s = np.sin(2*np.pi*t)
      -line, = ax.plot(t, s, color='blue', lw=2)
      -
      -
      -

      In this example, ax is the Axes instance created by the -fig.add_subplot call above (remember Subplot is just a -subclass of Axes) and when you call ax.plot, it creates a -Line2D instance and adds it to the Axes.lines list. In the interactive ipython session below, you can see that the -Axes.lines list is length one and contains the same line that was -returned by the line, = ax.plot... call:

      -
      In [101]: ax.lines[0]
      -Out[101]: <matplotlib.lines.Line2D instance at 0x19a95710>
      -
      -In [102]: line
      -Out[102]: <matplotlib.lines.Line2D instance at 0x19a95710>
      -
      -
      -

      If you make subsequent calls to ax.plot (and the hold state is “on” -which is the default) then additional lines will be added to the list. -You can remove lines later simply by calling the list methods; either -of these will work:

      -
      del ax.lines[0]
      -ax.lines.remove(line)  # one or the other, not both!
      -
      -
      -

      The Axes also has helper methods to configure and decorate the x-axis -and y-axis tick, tick labels and axis labels:

      -
      xtext = ax.set_xlabel('my xdata') # returns a Text instance
      -ytext = ax.set_ylabel('my xdata')
      -
      -
      -

      When you call ax.set_xlabel, -it passes the information on the Text -instance of the XAxis. Each Axes -instance contains an XAxis and a -YAxis instance, which handle the layout and -drawing of the ticks, tick labels and axis labels.

      -

      Try creating the figure below.

      -

      (Source code, png, hires.png, pdf)

      -
      -../_images/fig_axes_labels_simple.png -
      -
      -

      Customizing your objects

      -

      Every element in the figure is represented by a matplotlib -Artist, and each has an extensive list of -properties to configure its appearance. The figure itself contains a -Rectangle exactly the size of the figure, -which you can use to set the background color and transparency of the -figures. Likewise, each Axes bounding box -(the standard white box with black edges in the typical matplotlib -plot, has a Rectangle instance that determines the color, -transparency, and other properties of the Axes. These instances are -stored as member variables Figure.patch and Axes.patch (“Patch” is a name inherited from -MATLAB, and is a 2D “patch” of color on the figure, e.g., rectangles, -circles and polygons). Every matplotlib Artist has the following -properties

      - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      PropertyDescription
      alphaThe transparency - a scalar from 0-1
      animatedA boolean that is used to facilitate animated drawing
      axesThe axes that the Artist lives in, possibly None
      clip_boxThe bounding box that clips the Artist
      clip_onWhether clipping is enabled
      clip_pathThe path the artist is clipped to
      containsA picking function to test whether the artist contains the pick point
      figureThe figure instance the artist lives in, possibly None
      labelA text label (e.g., for auto-labeling)
      pickerA python object that controls object picking
      transformThe transformation
      visibleA boolean whether the artist should be drawn
      zorderA number which determines the drawing order
      -

      Each of the properties is accessed with an old-fashioned setter or -getter (yes we know this irritates Pythonistas and we plan to support -direct access via properties or traits but it hasn’t been done yet). -For example, to multiply the current alpha by a half:

      -
      a = o.get_alpha()
      -o.set_alpha(0.5*a)
      -
      -
      -

      If you want to set a number of properties at once, you can also use -the set method with keyword arguments. For example:

      -
      o.set(alpha=0.5, zorder=2)
      -
      -
      -

      If you are working interactively at the python shell, a handy way to -inspect the Artist properties is to use the -matplotlib.artist.getp() function (simply -getp() in pylab), which lists the properties -and their values. This works for classes derived from Artist as -well, e.g., Figure and Rectangle. Here are the Figure rectangle -properties mentioned above:

      -
      In [149]: matplotlib.artist.getp(fig.patch)
      -    alpha = 1.0
      -    animated = False
      -    antialiased or aa = True
      -    axes = None
      -    clip_box = None
      -    clip_on = False
      -    clip_path = None
      -    contains = None
      -    edgecolor or ec = w
      -    facecolor or fc = 0.75
      -    figure = Figure(8.125x6.125)
      -    fill = 1
      -    hatch = None
      -    height = 1
      -    label =
      -    linewidth or lw = 1.0
      -    picker = None
      -    transform = <Affine object at 0x134cca84>
      -    verts = ((0, 0), (0, 1), (1, 1), (1, 0))
      -    visible = True
      -    width = 1
      -    window_extent = <Bbox object at 0x134acbcc>
      -    x = 0
      -    y = 0
      -    zorder = 1
      -
      -
      -

      The docstrings for all of the classes also contain the Artist -properties, so you can consult the interactive “help” or the -artists for a listing of properties for a given object.

      -
      -
      -

      Object containers

      -

      Now that we know how to inspect and set the properties of a given -object we want to configure, we need to now how to get at that object. -As mentioned in the introduction, there are two kinds of objects: -primitives and containers. The primitives are usually the things you -want to configure (the font of a Text -instance, the width of a Line2D) although -the containers also have some properties as well – for example the -Axes Artist is a -container that contains many of the primitives in your plot, but it -also has properties like the xscale to control whether the xaxis -is ‘linear’ or ‘log’. In this section we’ll review where the various -container objects store the Artists that you want to get at.

      -
      -
      -

      Figure container

      -

      The top level container Artist is the -matplotlib.figure.Figure, and it contains everything in the -figure. The background of the figure is a -Rectangle which is stored in -Figure.patch. As -you add subplots (add_subplot()) and -axes (add_axes()) to the figure -these will be appended to the Figure.axes. These are also returned by the -methods that create them:

      -
      In [156]: fig = plt.figure()
      -
      -In [157]: ax1 = fig.add_subplot(211)
      -
      -In [158]: ax2 = fig.add_axes([0.1, 0.1, 0.7, 0.3])
      -
      -In [159]: ax1
      -Out[159]: <matplotlib.axes.Subplot instance at 0xd54b26c>
      -
      -In [160]: print fig.axes
      -[<matplotlib.axes.Subplot instance at 0xd54b26c>, <matplotlib.axes.Axes instance at 0xd3f0b2c>]
      -
      -
      -

      Because the figure maintains the concept of the “current axes” (see -Figure.gca and -Figure.sca) to support the -pylab/pyplot state machine, you should not insert or remove axes -directly from the axes list, but rather use the -add_subplot() and -add_axes() methods to insert, and the -delaxes() method to delete. You are -free however, to iterate over the list of axes or index into it to get -access to Axes instances you want to customize. Here is an -example which turns all the axes grids on:

      -
      for ax in fig.axes:
      -    ax.grid(True)
      -
      -
      -

      The figure also has its own text, lines, patches and images, which you -can use to add primitives directly. The default coordinate system for -the Figure will simply be in pixels (which is not usually what you -want) but you can control this by setting the transform property of -the Artist you are adding to the figure.

      -

      More useful is “figure coordinates” where (0, 0) is the bottom-left of -the figure and (1, 1) is the top-right of the figure which you can -obtain by setting the Artist transform to fig.transFigure:

      -
      In [191]: fig = plt.figure()
      -
      -In [192]: l1 = matplotlib.lines.Line2D([0, 1], [0, 1],
      -           transform=fig.transFigure, figure=fig)
      -
      -In [193]: l2 = matplotlib.lines.Line2D([0, 1], [1, 0],
      -           transform=fig.transFigure, figure=fig)
      -
      -In [194]: fig.lines.extend([l1, l2])
      -
      -In [195]: fig.canvas.draw()
      -
      -
      -

      (Source code, png, hires.png, pdf)

      -
      -../_images/fig_x.png -
      -

      Here is a summary of the Artists the figure contains

      - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      Figure attributeDescription
      axesA list of Axes instances (includes Subplot)
      patchThe Rectangle background
      imagesA list of FigureImages patches - useful for raw pixel display
      legendsA list of Figure Legend instances (different from Axes.legends)
      linesA list of Figure Line2D instances (rarely used, see Axes.lines)
      patchesA list of Figure patches (rarely used, see Axes.patches)
      textsA list Figure Text instances
      -
      -
      -

      Axes container

      -

      The matplotlib.axes.Axes is the center of the matplotlib -universe – it contains the vast majority of all the Artists used -in a figure with many helper methods to create and add these -Artists to itself, as well as helper methods to access and -customize the Artists it contains. Like the -Figure, it contains a -Patch -patch which is a -Rectangle for Cartesian coordinates and a -Circle for polar coordinates; this patch -determines the shape, background and border of the plotting region:

      -
      ax = fig.add_subplot(111)
      -rect = ax.patch  # a Rectangle instance
      -rect.set_facecolor('green')
      -
      -
      -

      When you call a plotting method, e.g., the canonical -plot() and pass in arrays or lists of -values, the method will create a matplotlib.lines.Line2D() -instance, update the line with all the Line2D properties passed as -keyword arguments, add the line to the Axes.lines container, and returns it to you:

      -
      In [213]: x, y = np.random.rand(2, 100)
      -
      -In [214]: line, = ax.plot(x, y, '-', color='blue', linewidth=2)
      -
      -
      -

      plot returns a list of lines because you can pass in multiple x, y -pairs to plot, and we are unpacking the first element of the length -one list into the line variable. The line has been added to the -Axes.lines list:

      -
      In [229]: print ax.lines
      -[<matplotlib.lines.Line2D instance at 0xd378b0c>]
      -
      -
      -

      Similarly, methods that create patches, like -bar() creates a list of rectangles, will -add the patches to the Axes.patches list:

      -
      In [233]: n, bins, rectangles = ax.hist(np.random.randn(1000), 50, facecolor='yellow')
      -
      -In [234]: rectangles
      -Out[234]: <a list of 50 Patch objects>
      -
      -In [235]: print len(ax.patches)
      -
      -
      -

      You should not add objects directly to the Axes.lines or -Axes.patches lists unless you know exactly what you are doing, -because the Axes needs to do a few things when it creates and adds -an object. It sets the figure and axes property of the Artist, as -well as the default Axes transformation (unless a transformation -is set). It also inspects the data contained in the Artist to -update the data structures controlling auto-scaling, so that the view -limits can be adjusted to contain the plotted data. You can, -nonetheless, create objects yourself and add them directly to the -Axes using helper methods like -add_line() and -add_patch(). Here is an annotated -interactive session illustrating what is going on:

      -
      In [261]: fig = plt.figure()
      -
      -In [262]: ax = fig.add_subplot(111)
      -
      -# create a rectangle instance
      -In [263]: rect = matplotlib.patches.Rectangle( (1,1), width=5, height=12)
      -
      -# by default the axes instance is None
      -In [264]: print rect.get_axes()
      -None
      -
      -# and the transformation instance is set to the "identity transform"
      -In [265]: print rect.get_transform()
      -<Affine object at 0x13695544>
      -
      -# now we add the Rectangle to the Axes
      -In [266]: ax.add_patch(rect)
      -
      -# and notice that the ax.add_patch method has set the axes
      -# instance
      -In [267]: print rect.get_axes()
      -Axes(0.125,0.1;0.775x0.8)
      -
      -# and the transformation has been set too
      -In [268]: print rect.get_transform()
      -<Affine object at 0x15009ca4>
      -
      -# the default axes transformation is ax.transData
      -In [269]: print ax.transData
      -<Affine object at 0x15009ca4>
      -
      -# notice that the xlimits of the Axes have not been changed
      -In [270]: print ax.get_xlim()
      -(0.0, 1.0)
      -
      -# but the data limits have been updated to encompass the rectangle
      -In [271]: print ax.dataLim.bounds
      -(1.0, 1.0, 5.0, 12.0)
      -
      -# we can manually invoke the auto-scaling machinery
      -In [272]: ax.autoscale_view()
      -
      -# and now the xlim are updated to encompass the rectangle
      -In [273]: print ax.get_xlim()
      -(1.0, 6.0)
      -
      -# we have to manually force a figure draw
      -In [274]: ax.figure.canvas.draw()
      -
      -
      -

      There are many, many Axes helper methods for creating primitive -Artists and adding them to their respective containers. The table -below summarizes a small sampling of them, the kinds of Artist they -create, and where they store them

      - ----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      Helper methodArtistContainer
      ax.annotate - text annotationsAnnotateax.texts
      ax.bar - bar chartsRectangleax.patches
      ax.errorbar - error bar plotsLine2D and Rectangleax.lines and ax.patches
      ax.fill - shared areaPolygonax.patches
      ax.hist - histogramsRectangleax.patches
      ax.imshow - image dataAxesImageax.images
      ax.legend - axes legendsLegendax.legends
      ax.plot - xy plotsLine2Dax.lines
      ax.scatter - scatter chartsPolygonCollectionax.collections
      ax.text - textTextax.texts
      -

      In addition to all of these Artists, the Axes contains two -important Artist containers: the XAxis -and YAxis, which handle the drawing of the -ticks and labels. These are stored as instance variables -xaxis and -yaxis. The XAxis and YAxis -containers will be detailed below, but note that the Axes contains -many helper methods which forward calls on to the -Axis instances so you often do not need to -work with them directly unless you want to. For example, you can set -the font size of the XAxis ticklabels using the Axes helper -method:

      -
      for label in ax.get_xticklabels():
      -    label.set_color('orange')
      -
      -
      -

      Below is a summary of the Artists that the Axes contains

      - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      Axes attributeDescription
      artistsA list of Artist instances
      patchRectangle instance for Axes background
      collectionsA list of Collection instances
      imagesA list of AxesImage
      legendsA list of Legend instances
      linesA list of Line2D instances
      patchesA list of Patch instances
      textsA list of Text instances
      xaxismatplotlib.axis.XAxis instance
      yaxismatplotlib.axis.YAxis instance
      -
      -
      -

      Axis containers

      -

      The matplotlib.axis.Axis instances handle the drawing of the -tick lines, the grid lines, the tick labels and the axis label. You -can configure the left and right ticks separately for the y-axis, and -the upper and lower ticks separately for the x-axis. The Axis -also stores the data and view intervals used in auto-scaling, panning -and zooming, as well as the Locator and -Formatter instances which control where -the ticks are placed and how they are represented as strings.

      -

      Each Axis object contains a label attribute -(this is what pylab modifies in calls to -xlabel() and ylabel()) as well -as a list of major and minor ticks. The ticks are -XTick and YTick instances, -which contain the actual line and text primitives that render the ticks and -ticklabels. Because the ticks are dynamically created as needed (e.g., when -panning and zooming), you should access the lists of major and minor ticks -through their accessor methods get_major_ticks() -and get_minor_ticks(). Although the ticks contain -all the primitives and will be covered below, the Axis methods contain -accessor methods to return the tick lines, tick labels, tick locations etc.:

      -
      In [285]: axis = ax.xaxis
      -
      -In [286]: axis.get_ticklocs()
      -Out[286]: array([ 0.,  1.,  2.,  3.,  4.,  5.,  6.,  7.,  8.,  9.])
      -
      -In [287]: axis.get_ticklabels()
      -Out[287]: <a list of 10 Text major ticklabel objects>
      -
      -# note there are twice as many ticklines as labels because by
      -#  default there are tick lines at the top and bottom but only tick
      -#  labels below the xaxis; this can be customized
      -In [288]: axis.get_ticklines()
      -Out[288]: <a list of 20 Line2D ticklines objects>
      -
      -# by default you get the major ticks back
      -In [291]: axis.get_ticklines()
      -Out[291]: <a list of 20 Line2D ticklines objects>
      -
      -# but you can also ask for the minor ticks
      -In [292]: axis.get_ticklines(minor=True)
      -Out[292]: <a list of 0 Line2D ticklines objects>
      -
      -
      -

      Here is a summary of some of the useful accessor methods of the Axis -(these have corresponding setters where useful, such as -set_major_formatter)

      - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      Accessor methodDescription
      get_scaleThe scale of the axis, eg ‘log’ or ‘linear’
      get_view_intervalThe interval instance of the axis view limits
      get_data_intervalThe interval instance of the axis data limits
      get_gridlinesA list of grid lines for the Axis
      get_labelThe axis label - a Text instance
      get_ticklabelsA list of Text instances - keyword minor=True|False
      get_ticklinesA list of Line2D instances - keyword minor=True|False
      get_ticklocsA list of Tick locations - keyword minor=True|False
      get_major_locatorThe matplotlib.ticker.Locator instance for major ticks
      get_major_formatterThe matplotlib.ticker.Formatter instance for major ticks
      get_minor_locatorThe matplotlib.ticker.Locator instance for minor ticks
      get_minor_formatterThe matplotlib.ticker.Formatter instance for minor ticks
      get_major_ticksA list of Tick instances for major ticks
      get_minor_ticksA list of Tick instances for minor ticks
      gridTurn the grid on or off for the major or minor ticks
      -

      Here is an example, not recommended for its beauty, which customizes -the axes and tick properties

      -
      import numpy as np
      -import matplotlib.pyplot as plt
      -
      -# plt.figure creates a matplotlib.figure.Figure instance
      -fig = plt.figure()
      -rect = fig.patch # a rectangle instance
      -rect.set_facecolor('lightgoldenrodyellow')
      -
      -ax1 = fig.add_axes([0.1, 0.3, 0.4, 0.4])
      -rect = ax1.patch
      -rect.set_facecolor('lightslategray')
      -
      -
      -for label in ax1.xaxis.get_ticklabels():
      -    # label is a Text instance
      -    label.set_color('red')
      -    label.set_rotation(45)
      -    label.set_fontsize(16)
      -
      -for line in ax1.yaxis.get_ticklines():
      -    # line is a Line2D instance
      -    line.set_color('green')
      -    line.set_markersize(25)
      -    line.set_markeredgewidth(3)
      -
      -
      -

      (Source code, png, hires.png, pdf)

      -
      -../_images/fig_axes_customize_simple.png -
      -
      -
      -

      Tick containers

      -

      The matplotlib.axis.Tick is the final container object in our -descent from the Figure to the -Axes to the Axis -to the Tick. The Tick contains the tick -and grid line instances, as well as the label instances for the upper -and lower ticks. Each of these is accessible directly as an attribute -of the Tick. In addition, there are boolean variables that determine -whether the upper labels and ticks are on for the x-axis and whether -the right labels and ticks are on for the y-axis.

      - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      Tick attributeDescription
      tick1lineLine2D instance
      tick2lineLine2D instance
      gridlineLine2D instance
      label1Text instance
      label2Text instance
      gridOnboolean which determines whether to draw the tickline
      tick1Onboolean which determines whether to draw the 1st tickline
      tick2Onboolean which determines whether to draw the 2nd tickline
      label1Onboolean which determines whether to draw tick label
      label2Onboolean which determines whether to draw tick label
      -

      Here is an example which sets the formatter for the right side ticks with -dollar signs and colors them green on the right side of the yaxis

      -
      import numpy as np
      -import matplotlib.pyplot as plt
      -import matplotlib.ticker as ticker
      -
      -fig = plt.figure()
      -ax = fig.add_subplot(111)
      -ax.plot(100*np.random.rand(20))
      -
      -formatter = ticker.FormatStrFormatter('$%1.2f')
      -ax.yaxis.set_major_formatter(formatter)
      -
      -for tick in ax.yaxis.get_major_ticks():
      -    tick.label1On = False
      -    tick.label2On = True
      -    tick.label2.set_color('green')
      -
      -
      -

      (Source code, png, hires.png, pdf)

      -
      -../_images/dollar_ticks.png -
      -
      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/users/credits.html b/dev/users/credits.html deleted file mode 100644 index ffe5213a296..00000000000 --- a/dev/users/credits.html +++ /dev/null @@ -1,334 +0,0 @@ - - - - - - - - Credits — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      Previous topic

      -

      License

      -

      Next topic

      -

      The Matplotlib FAQ

      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      Credits

      -

      matplotlib was written by John Hunter and is now developed and -maintained by a number of active developers. -The current lead developer of matplotlib is Michael Droettboom.

      -

      Special thanks to those who have made valuable contributions (roughly -in order of first contribution by date). Any list like this is bound -to be incomplete and can’t capture the thousands and thousands of -contributions over the years from these and others:

      -
      -
      Jeremy O’Donoghue
      -
      wrote the wx backend
      -
      Andrew Straw
      -
      Provided much of the log scaling architecture, the fill command, PIL -support for imshow, and provided many examples. He also wrote the -support for dropped axis spines and the buildbot unit testing infrastructure -which triggers the JPL/James Evans platform specific builds and -regression test image comparisons from svn matplotlib across -platforms on svn commits.
      -
      Charles Twardy
      -
      provided the impetus code for the legend class and has made -countless bug reports and suggestions for improvement.
      -
      Gary Ruben
      -
      made many enhancements to errorbar to support x and y -errorbar plots, and added a number of new marker types to plot.
      -
      John Gill
      -
      wrote the table class and examples, helped with support for -auto-legend placement, and added support for legending scatter -plots.
      -
      David Moore
      -
      wrote the paint backend (no longer used)
      -
      Todd Miller
      -
      supported by STSCI contributed the TkAgg -backend and the numerix module, which allows matplotlib to work with -either numeric or numarray. He also ported image support to the -postscript backend, with much pain and suffering.
      -
      Paul Barrett
      -
      supported by STSCI overhauled font -management to provide an improved, free-standing, platform -independent font manager with a WC3 compliant font finder and cache -mechanism and ported truetype and mathtext to PS.
      -
      Perry Greenfield
      -
      supported by STSCI overhauled and -modernized the goals and priorities page, implemented an improved -colormap framework, and has provided many suggestions and a lot of -insight to the overall design and organization of matplotlib.
      -
      Jared Wahlstrand
      -
      wrote the initial SVG backend.
      -
      Steve Chaplin
      -
      served as the GTK maintainer and wrote the Cairo and -GTKCairo backends.
      -
      Jim Benson
      -
      provided the patch to handle vertical mathttext.
      -
      Gregory Lielens
      -
      provided the FltkAgg backend and several patches for the frontend, -including contributions to toolbar2, and support for log ticking -with alternate bases and major and minor log ticking.
      -
      -

      Darren Dale

      -
      -
      did the work to do mathtext exponential labeling for log plots, -added improved support for scalar formatting, and did the lions -share of the psfrag -LaTeX support for postscript. He has made substantial contributions -to extending and maintaining the PS and Qt backends, and wrote the -site.cfg and matplotlib.conf build and runtime configuration -support. He setup the infrastructure for the sphinx documentation -that powers the mpl docs.
      -
      -
      Paul Mcguire
      -
      provided the pyparsing module on which mathtext relies, and made a -number of optimizations to the matplotlib mathtext grammar.
      -
      Fernando Perez
      -
      has provided numerous bug reports and patches for cleaning up -backend imports and expanding pylab functionality, and provided -matplotlib support in the pylab mode for ipython. He also provided the -matshow() command, and wrote TConfig, which -is the basis for the experimental traited mpl configuration.
      -
      Andrew Dalke
      -
      of Dalke Scientific Software contributed the -strftime formatting code to handle years earlier than 1900.
      -
      Jochen Voss
      -
      served as PS backend maintainer and has contributed several -bugfixes.
      -
      -

      Nadia Dencheva

      -
      -
      supported by STSCI provided the contouring and -contour labeling code.
      -
      -
      Baptiste Carvello
      -
      provided the key ideas in a patch for proper -shared axes support that underlies ganged plots and multiscale -plots.
      -
      Jeffrey Whitaker
      -
      at NOAA wrote the -Basemap (Not distributed with matplotlib) toolkit
      -
      Sigve Tjoraand, Ted Drain, James Evans
      -
      and colleagues at the JPL collaborated -on the QtAgg backend and sponsored development of a number of -features including custom unit types, datetime support, scale free -ellipses, broken bar plots and more. The JPL team wrote the unit -testing image comparison infrastructure -for regression test image comparisons.
      -
      James Amundson
      -
      did the initial work porting the qt backend to qt4
      -
      Eric Firing
      -
      has contributed significantly to contouring, masked -array, pcolor, image and quiver support, in addition to ongoing -support and enhancements in performance, design and code quality in -most aspects of matplotlib.
      -
      Daishi Harada
      -
      added support for “Dashed Text”. See dashpointlabel.py and -TextWithDash.
      -
      Nicolas Young
      -
      added support for byte images to imshow, which are -more efficient in CPU and memory, and added support for irregularly -sampled images.
      -
      The brainvisa Orsay team and Fernando Perez
      -
      added Qt support to ipython in pylab mode.
      -
      Charlie Moad
      -
      contributed work to matplotlib’s Cocoa support and has done a lot of work on the OSX and win32 binary releases.
      -
      Jouni K. Seppänen
      -
      wrote the PDF backend and contributed numerous -fixes to the code, to tex support and to the get_sample_data handler
      -
      Paul Kienzle
      -
      improved the picking infrastructure for interactive plots, and with -Alex Mont contributed fast rendering code for quadrilateral meshes.
      -
      Michael Droettboom
      -
      supported by STSCI wrote the enhanced -mathtext support, implementing Knuth’s box layout algorithms, saving -to file-like objects across backends, and is responsible for -numerous bug-fixes, much better font and unicode support, and -feature and performance enhancements across the matplotlib code -base. He also rewrote the transformation infrastructure to support -custom projections and scales.
      -
      John Porter, Jonathon Taylor and Reinier Heeres
      -
      John Porter wrote the mplot3d module for basic 3D plotting in -matplotlib, and Jonathon Taylor and Reinier Heeres ported it to the -refactored transform trunk.
      -
      Jae-Joon Lee
      -
      Implemented fancy arrows and boxes, rewrote the legend -support to handle multiple columns and fancy text boxes, wrote the -axes grid toolkit, and has made numerous contributions to the code -and documentation
      -
      Paul Ivanov
      -
      Has worked on getting matplotlib integrated better with other tools, -such as Sage and IPython, and getting the test infrastructure -faster, lighter and meaner. Listen to his podcast.
      -
      Tony Yu
      -
      Has been involved in matplotlib since the early days, and recently -has contributed stream plotting among many other improvements. He -is the author of mpltools.
      -
      Michiel de Hoon
      -
      Wrote and maintains the macosx backend.
      -
      Ian Thomas
      -
      Contributed, among other things, the triangulation (tricolor and -tripcontour) methods.
      -
      Benjamin Root
      -
      Has significantly improved the capabilities of the 3D plotting. He -has improved matplotlib’s documentation and code quality throughout, -and does invaluable triaging of pull requests and bugs.
      -
      Phil Elson
      -
      Fixed some deep-seated bugs in the transforms framework, and has -been laser-focused on improving polish throughout matplotlib, -tackling things that have been considered to large and daunting for -a long time.
      -
      Damon McDougall
      -
      Added triangulated 3D surfaces and stack plots to matplotlib.
      -
      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/users/customizing.html b/dev/users/customizing.html deleted file mode 100644 index ddee172cc70..00000000000 --- a/dev/users/customizing.html +++ /dev/null @@ -1,695 +0,0 @@ - - - - - - - - Customizing matplotlib — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      Table Of Contents

      - - -

      Previous topic

      -

      Interactive navigation

      -

      Next topic

      -

      Using matplotlib in a python shell

      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      Customizing matplotlib

      -
      -

      The matplotlibrc file

      -

      matplotlib uses matplotlibrc configuration files to customize all kinds -of properties, which we call rc settings or rc parameters. You can control -the defaults of almost every property in matplotlib: figure size and dpi, line -width, color and style, axes, axis and grid properties, text and font -properties and so on. matplotlib looks for matplotlibrc in three -locations, in the following order:

      -
        -
      1. matplotlibrc in the current working directory, usually used for -specific customizations that you do not want to apply elsewhere.
      2. -
      3. .matplotlib/matplotlibrc, for the user’s default customizations. See -.matplotlib directory location.
      4. -
      5. INSTALL/matplotlib/mpl-data/matplotlibrc, where INSTALL -is something like /usr/lib/python2.5/site-packages on Linux, and -maybe C:\Python25\Lib\site-packages on Windows. Every time you -install matplotlib, this file will be overwritten, so if you want your -customizations to be saved, please move this file to your .matplotlib -directory.
      6. -
      -

      To display where the currently active matplotlibrc file was -loaded from, one can do the following:

      -
      >>> import matplotlib
      ->>> matplotlib.matplotlib_fname()
      -'/home/foo/.matplotlib/matplotlibrc'
      -
      -
      -

      See below for a sample matplotlibrc file.

      -
      -
      -

      Dynamic rc settings

      -

      You can also dynamically change the default rc settings in a python script or -interactively from the python shell. All of the rc settings are stored in a -dictionary-like variable called matplotlib.rcParams, which is global to -the matplotlib package. rcParams can be modified directly, for example:

      -
      import matplotlib as mpl
      -mpl.rcParams['lines.linewidth'] = 2
      -mpl.rcParams['lines.color'] = 'r'
      -
      -
      -

      Matplotlib also provides a couple of convenience functions for modifying rc -settings. The matplotlib.rc() command can be used to modify multiple -settings in a single group at once, using keyword arguments:

      -
      import matplotlib as mpl
      -mpl.rc('lines', linewidth=2, color='r')
      -
      -
      -

      There matplotlib.rcdefaults() command will restore the standard -matplotlib default settings.

      -

      There is some degree of validation when setting the values of rcParams, see -matplotlib.rcsetup for details.

      -
      -

      A sample matplotlibrc file

      -(download)
      ### MATPLOTLIBRC FORMAT
      -
      -# This is a sample matplotlib configuration file - you can find a copy
      -# of it on your system in
      -# site-packages/matplotlib/mpl-data/matplotlibrc.  If you edit it
      -# there, please note that it will be overwritten in your next install.
      -# If you want to keep a permanent local copy that will not be
      -# overwritten, place it in HOME/.matplotlib/matplotlibrc (unix/linux
      -# like systems) and C:\Documents and Settings\yourname\.matplotlib
      -# (win32 systems).
      -#
      -# This file is best viewed in a editor which supports python mode
      -# syntax highlighting. Blank lines, or lines starting with a comment
      -# symbol, are ignored, as are trailing comments.  Other lines must
      -# have the format
      -#    key : val # optional comment
      -#
      -# Colors: for the color values below, you can either use - a
      -# matplotlib color string, such as r, k, or b - an rgb tuple, such as
      -# (1.0, 0.5, 0.0) - a hex string, such as ff00ff or #ff00ff - a scalar
      -# grayscale intensity such as 0.75 - a legal html color name, eg red,
      -# blue, darkslategray
      -
      -#### CONFIGURATION BEGINS HERE
      -
      -# the default backend; one of GTK GTKAgg GTKCairo GTK3Agg GTK3Cairo
      -# CocoaAgg FltkAgg MacOSX QtAgg Qt4Agg TkAgg WX WXAgg Agg Cairo GDK PS
      -# PDF SVG Template
      -# You can also deploy your own backend outside of matplotlib by
      -# referring to the module name (which must be in the PYTHONPATH) as
      -# 'module://my_backend'
      -backend      : qt4agg
      -
      -# If you are using the Qt4Agg backend, you can choose here
      -# to use the PyQt4 bindings or the newer PySide bindings to
      -# the underlying Qt4 toolkit.
      -#backend.qt4 : PyQt4        # PyQt4 | PySide
      -
      -# Note that this can be overridden by the environment variable
      -# QT_API used by Enthought Tool Suite (ETS); valid values are
      -# "pyqt" and "pyside".  The "pyqt" setting has the side effect of
      -# forcing the use of Version 2 API for QString and QVariant.
      -
      -# The port to use for the web server in the WebAgg backend.
      -# webagg.port : 8888
      -
      -# If webagg.port is unavailable, a number of other random ports will
      -# be tried until one that is available is found.
      -# webagg.port_retries : 50
      -
      -# When True, open the webbrowser to the plot that is shown
      -# webagg.open_in_browser : True
      -
      -# if you are running pyplot inside a GUI and your backend choice
      -# conflicts, we will automatically try to find a compatible one for
      -# you if backend_fallback is True
      -#backend_fallback: True
      -
      -#interactive  : False
      -#toolbar      : toolbar2   # None | toolbar2  ("classic" is deprecated)
      -#timezone     : UTC        # a pytz timezone string, eg US/Central or Europe/Paris
      -
      -# Where your matplotlib data lives if you installed to a non-default
      -# location.  This is where the matplotlib fonts, bitmaps, etc reside
      -#datapath : /home/jdhunter/mpldata
      -
      -
      -### LINES
      -# See http://matplotlib.org/api/artist_api.html#module-matplotlib.lines for more
      -# information on line properties.
      -#lines.linewidth   : 1.0     # line width in points
      -#lines.linestyle   : -       # solid line
      -#lines.color       : blue    # has no affect on plot(); see axes.color_cycle
      -#lines.marker      : None    # the default marker
      -#lines.markeredgewidth  : 0.5     # the line width around the marker symbol
      -#lines.markersize  : 6            # markersize, in points
      -#lines.dash_joinstyle : miter        # miter|round|bevel
      -#lines.dash_capstyle : butt          # butt|round|projecting
      -#lines.solid_joinstyle : miter       # miter|round|bevel
      -#lines.solid_capstyle : projecting   # butt|round|projecting
      -#lines.antialiased : True         # render lines in antialised (no jaggies)
      -
      -### PATCHES
      -# Patches are graphical objects that fill 2D space, like polygons or
      -# circles.  See
      -# http://matplotlib.org/api/artist_api.html#module-matplotlib.patches
      -# information on patch properties
      -#patch.linewidth        : 1.0     # edge width in points
      -#patch.facecolor        : blue
      -#patch.edgecolor        : black
      -#patch.antialiased      : True    # render patches in antialised (no jaggies)
      -
      -### FONT
      -#
      -# font properties used by text.Text.  See
      -# http://matplotlib.org/api/font_manager_api.html for more
      -# information on font properties.  The 6 font properties used for font
      -# matching are given below with their default values.
      -#
      -# The font.family property has five values: 'serif' (e.g., Times),
      -# 'sans-serif' (e.g., Helvetica), 'cursive' (e.g., Zapf-Chancery),
      -# 'fantasy' (e.g., Western), and 'monospace' (e.g., Courier).  Each of
      -# these font families has a default list of font names in decreasing
      -# order of priority associated with them.
      -#
      -# The font.style property has three values: normal (or roman), italic
      -# or oblique.  The oblique style will be used for italic, if it is not
      -# present.
      -#
      -# The font.variant property has two values: normal or small-caps.  For
      -# TrueType fonts, which are scalable fonts, small-caps is equivalent
      -# to using a font size of 'smaller', or about 83% of the current font
      -# size.
      -#
      -# The font.weight property has effectively 13 values: normal, bold,
      -# bolder, lighter, 100, 200, 300, ..., 900.  Normal is the same as
      -# 400, and bold is 700.  bolder and lighter are relative values with
      -# respect to the current weight.
      -#
      -# The font.stretch property has 11 values: ultra-condensed,
      -# extra-condensed, condensed, semi-condensed, normal, semi-expanded,
      -# expanded, extra-expanded, ultra-expanded, wider, and narrower.  This
      -# property is not currently implemented.
      -#
      -# The font.size property is the default font size for text, given in pts.
      -# 12pt is the standard value.
      -#
      -#font.family         : sans-serif
      -#font.style          : normal
      -#font.variant        : normal
      -#font.weight         : medium
      -#font.stretch        : normal
      -# note that font.size controls default text sizes.  To configure
      -# special text sizes tick labels, axes, labels, title, etc, see the rc
      -# settings for axes and ticks. Special text sizes can be defined
      -# relative to font.size, using the following values: xx-small, x-small,
      -# small, medium, large, x-large, xx-large, larger, or smaller
      -#font.size           : 12.0
      -#font.serif          : Bitstream Vera Serif, New Century Schoolbook, Century Schoolbook L, Utopia, ITC Bookman, Bookman, Nimbus Roman No9 L, Times New Roman, Times, Palatino, Charter, serif
      -#font.sans-serif     : Bitstream Vera Sans, Lucida Grande, Verdana, Geneva, Lucid, Arial, Helvetica, Avant Garde, sans-serif
      -#font.cursive        : Apple Chancery, Textile, Zapf Chancery, Sand, cursive
      -#font.fantasy        : Comic Sans MS, Chicago, Charcoal, Impact, Western, fantasy
      -#font.monospace      : Bitstream Vera Sans Mono, Andale Mono, Nimbus Mono L, Courier New, Courier, Fixed, Terminal, monospace
      -
      -### TEXT
      -# text properties used by text.Text.  See
      -# http://matplotlib.org/api/artist_api.html#module-matplotlib.text for more
      -# information on text properties
      -
      -#text.color          : black
      -
      -### LaTeX customizations. See http://www.scipy.org/Wiki/Cookbook/Matplotlib/UsingTex
      -#text.usetex         : False  # use latex for all text handling. The following fonts
      -                              # are supported through the usual rc parameter settings:
      -                              # new century schoolbook, bookman, times, palatino,
      -                              # zapf chancery, charter, serif, sans-serif, helvetica,
      -                              # avant garde, courier, monospace, computer modern roman,
      -                              # computer modern sans serif, computer modern typewriter
      -                              # If another font is desired which can loaded using the
      -                              # LaTeX \usepackage command, please inquire at the
      -                              # matplotlib mailing list
      -#text.latex.unicode : False # use "ucs" and "inputenc" LaTeX packages for handling
      -                            # unicode strings.
      -#text.latex.preamble :  # IMPROPER USE OF THIS FEATURE WILL LEAD TO LATEX FAILURES
      -                            # AND IS THEREFORE UNSUPPORTED. PLEASE DO NOT ASK FOR HELP
      -                            # IF THIS FEATURE DOES NOT DO WHAT YOU EXPECT IT TO.
      -                            # preamble is a comma separated list of LaTeX statements
      -                            # that are included in the LaTeX document preamble.
      -                            # An example:
      -                            # text.latex.preamble : \usepackage{bm},\usepackage{euler}
      -                            # The following packages are always loaded with usetex, so
      -                            # beware of package collisions: color, geometry, graphicx,
      -                            # type1cm, textcomp. Adobe Postscript (PSSNFS) font packages
      -                            # may also be loaded, depending on your font settings
      -
      -#text.dvipnghack : None      # some versions of dvipng don't handle alpha
      -                             # channel properly.  Use True to correct
      -                             # and flush ~/.matplotlib/tex.cache
      -                             # before testing and False to force
      -                             # correction off.  None will try and
      -                             # guess based on your dvipng version
      -
      -#text.hinting : 'auto' # May be one of the following:
      -                       #   'none': Perform no hinting
      -                       #   'auto': Use freetype's autohinter
      -                       #   'native': Use the hinting information in the
      -                       #             font file, if available, and if your
      -                       #             freetype library supports it
      -                       #   'either': Use the native hinting information,
      -                       #             or the autohinter if none is available.
      -                       # For backward compatibility, this value may also be
      -                       # True === 'auto' or False === 'none'.
      -text.hinting_factor : 8 # Specifies the amount of softness for hinting in the
      -                         # horizontal direction.  A value of 1 will hint to full
      -                         # pixels.  A value of 2 will hint to half pixels etc.
      -
      -#text.antialiased : True # If True (default), the text will be antialiased.
      -                         # This only affects the Agg backend.
      -
      -# The following settings allow you to select the fonts in math mode.
      -# They map from a TeX font name to a fontconfig font pattern.
      -# These settings are only used if mathtext.fontset is 'custom'.
      -# Note that this "custom" mode is unsupported and may go away in the
      -# future.
      -#mathtext.cal : cursive
      -#mathtext.rm  : serif
      -#mathtext.tt  : monospace
      -#mathtext.it  : serif:italic
      -#mathtext.bf  : serif:bold
      -#mathtext.sf  : sans
      -#mathtext.fontset : cm # Should be 'cm' (Computer Modern), 'stix',
      -                       # 'stixsans' or 'custom'
      -#mathtext.fallback_to_cm : True  # When True, use symbols from the Computer Modern
      -                                 # fonts when a symbol can not be found in one of
      -                                 # the custom math fonts.
      -
      -#mathtext.default : it # The default font to use for math.
      -                       # Can be any of the LaTeX font names, including
      -                       # the special name "regular" for the same font
      -                       # used in regular text.
      -
      -### AXES
      -# default face and edge color, default tick sizes,
      -# default fontsizes for ticklabels, and so on.  See
      -# http://matplotlib.org/api/axes_api.html#module-matplotlib.axes
      -#axes.hold           : True    # whether to clear the axes by default on
      -#axes.facecolor      : white   # axes background color
      -#axes.edgecolor      : black   # axes edge color
      -#axes.linewidth      : 1.0     # edge linewidth
      -#axes.grid           : False   # display grid or not
      -#axes.titlesize      : large   # fontsize of the axes title
      -#axes.labelsize      : medium  # fontsize of the x any y labels
      -#axes.labelweight    : normal  # weight of the x and y labels
      -#axes.labelcolor     : black
      -#axes.axisbelow      : False   # whether axis gridlines and ticks are below
      -                              # the axes elements (lines, text, etc)
      -#axes.formatter.limits : -7, 7 # use scientific notation if log10
      -                               # of the axis range is smaller than the
      -                               # first or larger than the second
      -#axes.formatter.use_locale : False # When True, format tick labels
      -                                   # according to the user's locale.
      -                                   # For example, use ',' as a decimal
      -                                   # separator in the fr_FR locale.
      -#axes.formatter.use_mathtext : False # When True, use mathtext for scientific
      -                                     # notation.
      -#axes.unicode_minus  : True    # use unicode for the minus symbol
      -                               # rather than hyphen.  See
      -                               # http://en.wikipedia.org/wiki/Plus_and_minus_signs#Character_codes
      -#axes.color_cycle    : b, g, r, c, m, y, k  # color cycle for plot lines
      -                                            # as list of string colorspecs:
      -                                            # single letter, long name, or
      -                                            # web-style hex
      -#axes.xmargin        : 0  # x margin.  See `axes.Axes.margins`
      -#axes.ymargin        : 0  # y margin See `axes.Axes.margins`
      -
      -#polaraxes.grid      : True    # display grid on polar axes
      -#axes3d.grid         : True    # display grid on 3d axes
      -
      -### TICKS
      -# see http://matplotlib.org/api/axis_api.html#matplotlib.axis.Tick
      -#xtick.major.size     : 4      # major tick size in points
      -#xtick.minor.size     : 2      # minor tick size in points
      -#xtick.major.width    : 0.5    # major tick width in points
      -#xtick.minor.width    : 0.5    # minor tick width in points
      -#xtick.major.pad      : 4      # distance to major tick label in points
      -#xtick.minor.pad      : 4      # distance to the minor tick label in points
      -#xtick.color          : k      # color of the tick labels
      -#xtick.labelsize      : medium # fontsize of the tick labels
      -#xtick.direction      : in     # direction: in, out, or inout
      -
      -#ytick.major.size     : 4      # major tick size in points
      -#ytick.minor.size     : 2      # minor tick size in points
      -#ytick.major.width    : 0.5    # major tick width in points
      -#ytick.minor.width    : 0.5    # minor tick width in points
      -#ytick.major.pad      : 4      # distance to major tick label in points
      -#ytick.minor.pad      : 4      # distance to the minor tick label in points
      -#ytick.color          : k      # color of the tick labels
      -#ytick.labelsize      : medium # fontsize of the tick labels
      -#ytick.direction      : in     # direction: in, out, or inout
      -
      -
      -### GRIDS
      -#grid.color       :   black   # grid color
      -#grid.linestyle   :   :       # dotted
      -#grid.linewidth   :   0.5     # in points
      -#grid.alpha       :   1.0     # transparency, between 0.0 and 1.0
      -
      -### Legend
      -#legend.fancybox      : False  # if True, use a rounded box for the
      -                               # legend, else a rectangle
      -#legend.isaxes        : True
      -#legend.numpoints     : 2      # the number of points in the legend line
      -#legend.fontsize      : large
      -#legend.pad           : 0.0    # deprecated; the fractional whitespace inside the legend border
      -#legend.borderpad     : 0.5    # border whitespace in fontsize units
      -#legend.markerscale   : 1.0    # the relative size of legend markers vs. original
      -# the following dimensions are in axes coords
      -#legend.labelsep      : 0.010  # deprecated; the vertical space between the legend entries
      -#legend.labelspacing  : 0.5    # the vertical space between the legend entries in fraction of fontsize
      -#legend.handlelen     : 0.05   # deprecated; the length of the legend lines
      -#legend.handlelength  : 2.     # the length of the legend lines in fraction of fontsize
      -#legend.handleheight  : 0.7     # the height of the legend handle in fraction of fontsize
      -#legend.handletextsep : 0.02   # deprecated; the space between the legend line and legend text
      -#legend.handletextpad : 0.8    # the space between the legend line and legend text in fraction of fontsize
      -#legend.axespad       : 0.02   # deprecated; the border between the axes and legend edge
      -#legend.borderaxespad : 0.5   # the border between the axes and legend edge in fraction of fontsize
      -#legend.columnspacing : 2.    # the border between the axes and legend edge in fraction of fontsize
      -#legend.shadow        : False
      -#legend.frameon       : True   # whether or not to draw a frame around legend
      -#legend.scatterpoints : 3 # number of scatter points
      -
      -### FIGURE
      -# See http://matplotlib.org/api/figure_api.html#matplotlib.figure.Figure
      -#figure.figsize   : 8, 6    # figure size in inches
      -#figure.dpi       : 80      # figure dots per inch
      -#figure.facecolor : 0.75    # figure facecolor; 0.75 is scalar gray
      -#figure.edgecolor : white   # figure edgecolor
      -#figure.autolayout : False  # When True, automatically adjust subplot
      -                            # parameters to make the plot fit the figure
      -
      -# The figure subplot parameters.  All dimensions are a fraction of the
      -# figure width or height
      -#figure.subplot.left    : 0.125  # the left side of the subplots of the figure
      -#figure.subplot.right   : 0.9    # the right side of the subplots of the figure
      -#figure.subplot.bottom  : 0.1    # the bottom of the subplots of the figure
      -#figure.subplot.top     : 0.9    # the top of the subplots of the figure
      -#figure.subplot.wspace  : 0.2    # the amount of width reserved for blank space between subplots
      -#figure.subplot.hspace  : 0.2    # the amount of height reserved for white space between subplots
      -
      -### IMAGES
      -#image.aspect : equal             # equal | auto | a number
      -#image.interpolation  : bilinear  # see help(imshow) for options
      -#image.cmap   : jet               # gray | jet etc...
      -#image.lut    : 256               # the size of the colormap lookup table
      -#image.origin : upper             # lower | upper
      -#image.resample  : False
      -
      -### CONTOUR PLOTS
      -#contour.negative_linestyle :  dashed # dashed | solid
      -
      -### Agg rendering
      -### Warning: experimental, 2008/10/10
      -#agg.path.chunksize : 0           # 0 to disable; values in the range
      -                                  # 10000 to 100000 can improve speed slightly
      -                                  # and prevent an Agg rendering failure
      -                                  # when plotting very large data sets,
      -                                  # especially if they are very gappy.
      -                                  # It may cause minor artifacts, though.
      -                                  # A value of 20000 is probably a good
      -                                  # starting point.
      -### SAVING FIGURES
      -#path.simplify : True   # When True, simplify paths by removing "invisible"
      -                        # points to reduce file size and increase rendering
      -                        # speed
      -#path.simplify_threshold : 0.1  # The threshold of similarity below which
      -                                # vertices will be removed in the simplification
      -                                # process
      -#path.snap : True # When True, rectilinear axis-aligned paths will be snapped to
      -                  # the nearest pixel when certain criteria are met.  When False,
      -                  # paths will never be snapped.
      -
      -# the default savefig params can be different from the display params
      -# e.g., you may want a higher resolution, or to make the figure
      -# background white
      -#savefig.dpi         : 100      # figure dots per inch
      -#savefig.facecolor   : white    # figure facecolor when saving
      -#savefig.edgecolor   : white    # figure edgecolor when saving
      -#savefig.format      : png      # png, ps, pdf, svg
      -#savefig.bbox        : standard # 'tight' or 'standard'.
      -#savefig.pad_inches  : 0.1      # Padding to be used when bbox is set to 'tight'
      -#savefig.jpeg_quality: 95       # when a jpeg is saved, the default quality parameter.
      -#savefig.directory   : ~        # default directory in savefig dialog box,
      -                                # leave empty to always use current working directory
      -
      -# tk backend params
      -#tk.window_focus   : False    # Maintain shell focus for TkAgg
      -
      -# ps backend params
      -#ps.papersize      : letter   # auto, letter, legal, ledger, A0-A10, B0-B10
      -#ps.useafm         : False    # use of afm fonts, results in small files
      -#ps.usedistiller   : False    # can be: None, ghostscript or xpdf
      -                                          # Experimental: may produce smaller files.
      -                                          # xpdf intended for production of publication quality files,
      -                                          # but requires ghostscript, xpdf and ps2eps
      -#ps.distiller.res  : 6000      # dpi
      -#ps.fonttype       : 3         # Output Type 3 (Type3) or Type 42 (TrueType)
      -
      -# pdf backend params
      -#pdf.compression   : 6 # integer from 0 to 9
      -                       # 0 disables compression (good for debugging)
      -#pdf.fonttype       : 3         # Output Type 3 (Type3) or Type 42 (TrueType)
      -
      -# svg backend params
      -#svg.image_inline : True       # write raster image data directly into the svg file
      -#svg.image_noscale : False     # suppress scaling of raster data embedded in SVG
      -#svg.fonttype : 'path'         # How to handle SVG fonts:
      -#    'none': Assume fonts are installed on the machine where the SVG will be viewed.
      -#    'path': Embed characters as paths -- supported by most SVG renderers
      -#    'svgfont': Embed characters as SVG fonts -- supported only by Chrome,
      -#               Opera and Safari
      -
      -# docstring params
      -#docstring.hardcopy = False  # set this when you want to generate hardcopy docstring
      -
      -# Set the verbose flags.  This controls how much information
      -# matplotlib gives you at runtime and where it goes.  The verbosity
      -# levels are: silent, helpful, debug, debug-annoying.  Any level is
      -# inclusive of all the levels below it.  If your setting is "debug",
      -# you'll get all the debug and helpful messages.  When submitting
      -# problems to the mailing-list, please set verbose to "helpful" or "debug"
      -# and paste the output into your report.
      -#
      -# The "fileo" gives the destination for any calls to verbose.report.
      -# These objects can a filename, or a filehandle like sys.stdout.
      -#
      -# You can override the rc default verbosity from the command line by
      -# giving the flags --verbose-LEVEL where LEVEL is one of the legal
      -# levels, eg --verbose-helpful.
      -#
      -# You can access the verbose instance in your code
      -#   from matplotlib import verbose.
      -#verbose.level  : silent      # one of silent, helpful, debug, debug-annoying
      -#verbose.fileo  : sys.stdout  # a log filename, sys.stdout or sys.stderr
      -
      -# Event keys to interact with figures/plots via keyboard.
      -# Customize these settings according to your needs.
      -# Leave the field(s) empty if you don't need a key-map. (i.e., fullscreen : '')
      -
      -#keymap.fullscreen : f               # toggling
      -#keymap.home : h, r, home            # home or reset mnemonic
      -#keymap.back : left, c, backspace    # forward / backward keys to enable
      -#keymap.forward : right, v           #   left handed quick navigation
      -#keymap.pan : p                      # pan mnemonic
      -#keymap.zoom : o                     # zoom mnemonic
      -#keymap.save : s                     # saving current figure
      -#keymap.quit : ctrl+w                # close the current figure
      -#keymap.grid : g                     # switching on/off a grid in current axes
      -#keymap.yscale : l                   # toggle scaling of y-axes ('log'/'linear')
      -#keymap.xscale : L, k                # toggle scaling of x-axes ('log'/'linear')
      -#keymap.all_axes : a                 # enable all axes
      -
      -# Control location of examples data files
      -#examples.directory : ''   # directory to look in for custom installation
      -
      -###ANIMATION settings
      -#animation.writer : ffmpeg         # MovieWriter 'backend' to use
      -#animation.codec : mp4             # Codec to use for writing movie
      -#animation.bitrate: -1             # Controls size/quality tradeoff for movie.
      -                                   # -1 implies let utility auto-determine
      -#animation.frame_format: 'png'     # Controls frame format used by temp files
      -#animation.ffmpeg_path: 'ffmpeg'   # Path to ffmpeg binary. Without full path
      -                                   # $PATH is searched
      -#animation.ffmpeg_args: ''         # Additional arguments to pass to ffmpeg
      -#animation.avconv_path: 'avconv'   # Path to avconv binary. Without full path
      -                                   # $PATH is searched
      -#animation.avconv_args: ''         # Additional arguments to pass to avconv
      -#animation.mencoder_path: 'mencoder'
      -                                   # Path to mencoder binary. Without full path
      -                                   # $PATH is searched
      -#animation.mencoder_args: ''       # Additional arguments to pass to mencoder
      -
      -
      -
      -
      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/users/event_handling.html b/dev/users/event_handling.html deleted file mode 100644 index ae812d65b1a..00000000000 --- a/dev/users/event_handling.html +++ /dev/null @@ -1,751 +0,0 @@ - - - - - - - - Event handling and picking — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      Table Of Contents

      - - -

      Previous topic

      -

      Legend guide

      -

      Next topic

      -

      Transformations Tutorial

      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      Event handling and picking

      -

      matplotlib works with 6 user interface toolkits (wxpython, tkinter, -qt, gtk, fltk and macosx) and in order to support features like interactive -panning and zooming of figures, it is helpful to the developers to -have an API for interacting with the figure via key presses and mouse -movements that is “GUI neutral” so we don’t have to repeat a lot of -code across the different user interfaces. Although the event -handling API is GUI neutral, it is based on the GTK model, which was -the first user interface matplotlib supported. The events that are -triggered are also a bit richer vis-a-vis matplotlib than standard GUI -events, including information like which matplotlib.axes.Axes -the event occurred in. The events also understand the matplotlib -coordinate system, and report event locations in both pixel and data -coordinates.

      -
      -

      Event connections

      -

      To receive events, you need to write a callback function and then -connect your function to the event manager, which is part of the -FigureCanvasBase. Here is a simple -example that prints the location of the mouse click and which button -was pressed:

      -
      fig = plt.figure()
      -ax = fig.add_subplot(111)
      -ax.plot(np.random.rand(10))
      -
      -def onclick(event):
      -    print 'button=%d, x=%d, y=%d, xdata=%f, ydata=%f'%(
      -        event.button, event.x, event.y, event.xdata, event.ydata)
      -
      -cid = fig.canvas.mpl_connect('button_press_event', onclick)
      -
      -
      -

      The FigureCanvas method -mpl_connect() returns -a connection id which is simply an integer. When you want to -disconnect the callback, just call:

      -
      fig.canvas.mpl_disconnect(cid)
      -
      -
      -
      -

      Note

      -

      The canvas retains only weak references to the callbacks. Therefore -if a callback is a method of a class instance, you need to retain -a reference to that instance. Otherwise the instance will be -garbage-collected and the callback will vanish.

      -
      -

      Here are the events that you can connect to, the class instances that -are sent back to you when the event occurs, and the event descriptions

      - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      Event nameClass and description
      ‘button_press_event’MouseEvent - mouse button is pressed
      ‘button_release_event’MouseEvent - mouse button is released
      ‘draw_event’DrawEvent - canvas draw
      ‘key_press_event’KeyEvent - key is pressed
      ‘key_release_event’KeyEvent - key is released
      ‘motion_notify_event’MouseEvent - mouse motion
      ‘pick_event’PickEvent - an object in the canvas is selected
      ‘resize_event’ResizeEvent - figure canvas is resized
      ‘scroll_event’MouseEvent - mouse scroll wheel is rolled
      ‘figure_enter_event’LocationEvent - mouse enters a new figure
      ‘figure_leave_event’LocationEvent - mouse leaves a figure
      ‘axes_enter_event’LocationEvent - mouse enters a new axes
      ‘axes_leave_event’LocationEvent - mouse leaves an axes
      -
      -
      -

      Event attributes

      -

      All matplotlib events inherit from the base class -matplotlib.backend_bases.Event, which store the attributes:

      -
      -
      -
      name
      -
      the event name
      -
      canvas
      -
      the FigureCanvas instance generating the event
      -
      guiEvent
      -
      the GUI event that triggered the matplotlib event
      -
      -
      -

      The most common events that are the bread and butter of event handling -are key press/release events and mouse press/release and movement -events. The KeyEvent and -MouseEvent classes that handle -these events are both derived from the LocationEvent, which has the -following attributes

      -
      -
      -
      x
      -
      x position - pixels from left of canvas
      -
      y
      -
      y position - pixels from bottom of canvas
      -
      inaxes
      -
      the Axes instance if mouse is over axes
      -
      xdata
      -
      x coord of mouse in data coords
      -
      ydata
      -
      y coord of mouse in data coords
      -
      -
      -

      Let’s look a simple example of a canvas, where a simple line segment -is created every time a mouse is pressed:

      -
      from matplotlib import pyplot as plt
      -
      -class LineBuilder:
      -    def __init__(self, line):
      -        self.line = line
      -        self.xs = list(line.get_xdata())
      -        self.ys = list(line.get_ydata())
      -        self.cid = line.figure.canvas.mpl_connect('button_press_event', self)
      -
      -    def __call__(self, event):
      -        print 'click', event
      -        if event.inaxes!=self.line.axes: return
      -        self.xs.append(event.xdata)
      -        self.ys.append(event.ydata)
      -        self.line.set_data(self.xs, self.ys)
      -        self.line.figure.canvas.draw()
      -
      -fig = plt.figure()
      -ax = fig.add_subplot(111)
      -ax.set_title('click to build line segments')
      -line, = ax.plot([0], [0])  # empty line
      -linebuilder = LineBuilder(line)
      -
      -plt.show()
      -
      -
      -

      The MouseEvent that we just used is a -LocationEvent, so we have access to -the data and pixel coordinates in event.x and event.xdata. In -addition to the LocationEvent attributes, it has

      -
      -
      -
      button
      -
      button pressed None, 1, 2, 3, ‘up’, ‘down’ (up and down are used for scroll events)
      -
      key
      -
      the key pressed: None, any character, ‘shift’, ‘win’, or ‘control’
      -
      -
      -
      -

      Draggable rectangle exercise

      -

      Write draggable rectangle class that is initialized with a -Rectangle instance but will move its x,y -location when dragged. Hint: you will need to store the original -xy location of the rectangle which is stored as rect.xy and -connect to the press, motion and release mouse events. When the mouse -is pressed, check to see if the click occurs over your rectangle (see -matplotlib.patches.Rectangle.contains()) and if it does, store -the rectangle xy and the location of the mouse click in data coords. -In the motion event callback, compute the deltax and deltay of the -mouse movement, and add those deltas to the origin of the rectangle -you stored. The redraw the figure. On the button release event, just -reset all the button press data you stored as None.

      -

      Here is the solution:

      -
      import numpy as np
      -import matplotlib.pyplot as plt
      -
      -class DraggableRectangle:
      -    def __init__(self, rect):
      -        self.rect = rect
      -        self.press = None
      -
      -    def connect(self):
      -        'connect to all the events we need'
      -        self.cidpress = self.rect.figure.canvas.mpl_connect(
      -            'button_press_event', self.on_press)
      -        self.cidrelease = self.rect.figure.canvas.mpl_connect(
      -            'button_release_event', self.on_release)
      -        self.cidmotion = self.rect.figure.canvas.mpl_connect(
      -            'motion_notify_event', self.on_motion)
      -
      -    def on_press(self, event):
      -        'on button press we will see if the mouse is over us and store some data'
      -        if event.inaxes != self.rect.axes: return
      -
      -        contains, attrd = self.rect.contains(event)
      -        if not contains: return
      -        print 'event contains', self.rect.xy
      -        x0, y0 = self.rect.xy
      -        self.press = x0, y0, event.xdata, event.ydata
      -
      -    def on_motion(self, event):
      -        'on motion we will move the rect if the mouse is over us'
      -        if self.press is None: return
      -        if event.inaxes != self.rect.axes: return
      -        x0, y0, xpress, ypress = self.press
      -        dx = event.xdata - xpress
      -        dy = event.ydata - ypress
      -        #print 'x0=%f, xpress=%f, event.xdata=%f, dx=%f, x0+dx=%f'%(x0, xpress, event.xdata, dx, x0+dx)
      -        self.rect.set_x(x0+dx)
      -        self.rect.set_y(y0+dy)
      -
      -        self.rect.figure.canvas.draw()
      -
      -
      -    def on_release(self, event):
      -        'on release we reset the press data'
      -        self.press = None
      -        self.rect.figure.canvas.draw()
      -
      -    def disconnect(self):
      -        'disconnect all the stored connection ids'
      -        self.rect.figure.canvas.mpl_disconnect(self.cidpress)
      -        self.rect.figure.canvas.mpl_disconnect(self.cidrelease)
      -        self.rect.figure.canvas.mpl_disconnect(self.cidmotion)
      -
      -fig = plt.figure()
      -ax = fig.add_subplot(111)
      -rects = ax.bar(range(10), 20*np.random.rand(10))
      -drs = []
      -for rect in rects:
      -    dr = DraggableRectangle(rect)
      -    dr.connect()
      -    drs.append(dr)
      -
      -plt.show()
      -
      -
      -

      Extra credit: use the animation blit techniques discussed in the -animations recipe to make the -animated drawing faster and smoother.

      -

      Extra credit solution:

      -
      # draggable rectangle with the animation blit techniques; see
      -# http://www.scipy.org/Cookbook/Matplotlib/Animations
      -import numpy as np
      -import matplotlib.pyplot as plt
      -
      -class DraggableRectangle:
      -    lock = None  # only one can be animated at a time
      -    def __init__(self, rect):
      -        self.rect = rect
      -        self.press = None
      -        self.background = None
      -
      -    def connect(self):
      -        'connect to all the events we need'
      -        self.cidpress = self.rect.figure.canvas.mpl_connect(
      -            'button_press_event', self.on_press)
      -        self.cidrelease = self.rect.figure.canvas.mpl_connect(
      -            'button_release_event', self.on_release)
      -        self.cidmotion = self.rect.figure.canvas.mpl_connect(
      -            'motion_notify_event', self.on_motion)
      -
      -    def on_press(self, event):
      -        'on button press we will see if the mouse is over us and store some data'
      -        if event.inaxes != self.rect.axes: return
      -        if DraggableRectangle.lock is not None: return
      -        contains, attrd = self.rect.contains(event)
      -        if not contains: return
      -        print 'event contains', self.rect.xy
      -        x0, y0 = self.rect.xy
      -        self.press = x0, y0, event.xdata, event.ydata
      -        DraggableRectangle.lock = self
      -
      -        # draw everything but the selected rectangle and store the pixel buffer
      -        canvas = self.rect.figure.canvas
      -        axes = self.rect.axes
      -        self.rect.set_animated(True)
      -        canvas.draw()
      -        self.background = canvas.copy_from_bbox(self.rect.axes.bbox)
      -
      -        # now redraw just the rectangle
      -        axes.draw_artist(self.rect)
      -
      -        # and blit just the redrawn area
      -        canvas.blit(axes.bbox)
      -
      -    def on_motion(self, event):
      -        'on motion we will move the rect if the mouse is over us'
      -        if DraggableRectangle.lock is not self:
      -            return
      -        if event.inaxes != self.rect.axes: return
      -        x0, y0, xpress, ypress = self.press
      -        dx = event.xdata - xpress
      -        dy = event.ydata - ypress
      -        self.rect.set_x(x0+dx)
      -        self.rect.set_y(y0+dy)
      -
      -        canvas = self.rect.figure.canvas
      -        axes = self.rect.axes
      -        # restore the background region
      -        canvas.restore_region(self.background)
      -
      -        # redraw just the current rectangle
      -        axes.draw_artist(self.rect)
      -
      -        # blit just the redrawn area
      -        canvas.blit(axes.bbox)
      -
      -    def on_release(self, event):
      -        'on release we reset the press data'
      -        if DraggableRectangle.lock is not self:
      -            return
      -
      -        self.press = None
      -        DraggableRectangle.lock = None
      -
      -        # turn off the rect animation property and reset the background
      -        self.rect.set_animated(False)
      -        self.background = None
      -
      -        # redraw the full figure
      -        self.rect.figure.canvas.draw()
      -
      -    def disconnect(self):
      -        'disconnect all the stored connection ids'
      -        self.rect.figure.canvas.mpl_disconnect(self.cidpress)
      -        self.rect.figure.canvas.mpl_disconnect(self.cidrelease)
      -        self.rect.figure.canvas.mpl_disconnect(self.cidmotion)
      -
      -fig = plt.figure()
      -ax = fig.add_subplot(111)
      -rects = ax.bar(range(10), 20*np.random.rand(10))
      -drs = []
      -for rect in rects:
      -    dr = DraggableRectangle(rect)
      -    dr.connect()
      -    drs.append(dr)
      -
      -plt.show()
      -
      -
      -
      -
      -
      -

      Mouse enter and leave

      -

      If you want to be notified when the mouse enters or leaves a figure or -axes, you can connect to the figure/axes enter/leave events. Here is -a simple example that changes the colors of the axes and figure -background that the mouse is over:

      -
      """
      -Illustrate the figure and axes enter and leave events by changing the
      -frame colors on enter and leave
      -"""
      -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 = plt.figure()
      -fig1.suptitle('mouse hover over figure or axes to trigger events')
      -ax1 = fig1.add_subplot(211)
      -ax2 = fig1.add_subplot(212)
      -
      -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 = plt.figure()
      -fig2.suptitle('mouse hover over figure or axes to trigger events')
      -ax1 = fig2.add_subplot(211)
      -ax2 = fig2.add_subplot(212)
      -
      -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()
      -
      -
      -
      -
      -

      Object picking

      -

      You can enable picking by setting the picker property of an -Artist (eg a matplotlib -Line2D, Text, -Patch, Polygon, -AxesImage, etc...)

      -

      There are a variety of meanings of the picker property:

      -
      -
      -
      None
      -
      picking is disabled for this artist (default)
      -
      boolean
      -
      if True then picking will be enabled and the artist will fire a -pick event if the mouse event is over the artist
      -
      float
      -
      if picker is a number it is interpreted as an epsilon tolerance in -points and the the artist will fire off an event if its data is -within epsilon of the mouse event. For some artists like lines -and patch collections, the artist may provide additional data to -the pick event that is generated, eg the indices of the data -within epsilon of the pick event.
      -
      function
      -
      if picker is callable, it is a user supplied function which -determines whether the artist is hit by the mouse event. The -signature is hit, props = picker(artist, mouseevent) to -determine the hit test. If the mouse event is over the artist, -return hit=True and props is a dictionary of properties you -want added to the PickEvent -attributes
      -
      -
      -

      After you have enabled an artist for picking by setting the picker -property, you need to connect to the figure canvas pick_event to get -pick callbacks on mouse press events. e.g.:

      -
      def pick_handler(event):
      -    mouseevent = event.mouseevent
      -    artist = event.artist
      -    # now do something with this...
      -
      -
      -

      The PickEvent which is passed to -your callback is always fired with two attributes:

      -
      -
      -
      mouseevent the mouse event that generate the pick event. The
      -
      mouse event in turn has attributes like x and y (the -coords in display space, eg pixels from left, bottom) and xdata, -ydata (the coords in data space). Additionally, you can get -information about which buttons were pressed, which keys were -pressed, which Axes the mouse is over, -etc. See matplotlib.backend_bases.MouseEvent for -details.
      -
      artist
      -
      the Artist that generated the pick -event.
      -
      -
      -

      Additionally, certain artists like Line2D -and PatchCollection may attach -additional meta data like the indices into the data that meet the -picker criteria (eg all the points in the line that are within the -specified epsilon tolerance)

      -
      -

      Simple picking example

      -

      In the example below, we set the line picker property to a scalar, so -it represents a tolerance in points (72 points per inch). The onpick -callback function will be called when the pick event it within the -tolerance distance from the line, and has the indices of the data -vertices that are within the pick distance tolerance. Our onpick -callback function simply prints the data that are under the pick -location. Different matplotlib Artists can attach different data to -the PickEvent. For example, Line2D attaches the ind property, -which are the indices into the line data under the pick point. See -pick() for details on the PickEvent -properties of the line. Here is the code:

      -
      import numpy as np
      -import matplotlib.pyplot as plt
      -
      -fig = plt.figure()
      -ax = fig.add_subplot(111)
      -ax.set_title('click on points')
      -
      -line, = ax.plot(np.random.rand(100), 'o', picker=5)  # 5 points tolerance
      -
      -def onpick(event):
      -    thisline = event.artist
      -    xdata = thisline.get_xdata()
      -    ydata = thisline.get_ydata()
      -    ind = event.ind
      -    print 'onpick points:', zip(xdata[ind], ydata[ind])
      -
      -fig.canvas.mpl_connect('pick_event', onpick)
      -
      -plt.show()
      -
      -
      -
      -
      -

      Picking exercise

      -

      Create a data set of 100 arrays of 1000 Gaussian random numbers and -compute the sample mean and standard deviation of each of them (hint: -numpy arrays have a mean and std method) and make a xy marker plot of -the 100 means vs the 100 standard deviations. Connect the line -created by the plot command to the pick event, and plot the original -time series of the data that generated the clicked on points. If more -than one point is within the tolerance of the clicked on point, you -can use multiple subplots to plot the multiple time series.

      -

      Exercise solution:

      -
      """
      -compute the mean and stddev of 100 data sets and plot mean vs stddev.
      -When you click on one of the mu, sigma points, plot the raw data from
      -the dataset that generated the mean and stddev
      -"""
      -import numpy as np
      -import matplotlib.pyplot as plt
      -
      -X = np.random.rand(100, 1000)
      -xs = np.mean(X, axis=1)
      -ys = np.std(X, axis=1)
      -
      -fig = plt.figure()
      -ax = fig.add_subplot(111)
      -ax.set_title('click on point to plot time series')
      -line, = ax.plot(xs, ys, 'o', picker=5)  # 5 points tolerance
      -
      -
      -def onpick(event):
      -
      -    if event.artist!=line: return True
      -
      -    N = len(event.ind)
      -    if not N: return True
      -
      -
      -    figi = plt.figure()
      -    for subplotnum, dataind in enumerate(event.ind):
      -        ax = figi.add_subplot(N,1,subplotnum+1)
      -        ax.plot(X[dataind])
      -        ax.text(0.05, 0.9, 'mu=%1.3f\nsigma=%1.3f'%(xs[dataind], ys[dataind]),
      -                transform=ax.transAxes, va='top')
      -        ax.set_ylim(-0.5, 1.5)
      -    figi.show()
      -    return True
      -
      -fig.canvas.mpl_connect('pick_event', onpick)
      -
      -plt.show()
      -
      -
      -
      -
      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/users/github_stats.html b/dev/users/github_stats.html deleted file mode 100644 index 1b1fa73b930..00000000000 --- a/dev/users/github_stats.html +++ /dev/null @@ -1,1495 +0,0 @@ - - - - - - - - Github stats — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      Previous topic

      -

      What’s new in matplotlib

      -

      Next topic

      -

      License

      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      Github stats

      -

      GitHub stats for 2012/06/30 - 2013/03/26 (tag: v1.1.1)

      -

      These lists are automatically generated, and may be incomplete or contain duplicates.

      -

      The following 90 authors contributed 1618 commits.

      -
        -
      • Aaron Boushley
      • -
      • Adam Ginsburg
      • -
      • Ahmet Bakan
      • -
      • Amy
      • -
      • Andreas Hilboll
      • -
      • Andrew Dawson
      • -
      • Arnaud Gardelein
      • -
      • Ben Gamari
      • -
      • Ben Root
      • -
      • Bradley M. Froehle
      • -
      • Brett Graham
      • -
      • Bussonnier Matthias
      • -
        1. -
        2. Gohlke
        3. -
        -
      • -
      • Carl Michal
      • -
      • Chris Beaumont
      • -
      • Christoph Dann
      • -
      • Christoph Gohlke
      • -
      • Corey Farwell
      • -
      • Craig M
      • -
      • Craig Tenney
      • -
      • Damon McDougall
      • -
      • Daniel Hyams
      • -
      • Darren Dale
      • -
      • David Huard
      • -
      • Eric Firing
      • -
      • Ezra Peisach
      • -
      • Francesco Montesano
      • -
      • Gellule Xg
      • -
      • Graham Poulter
      • -
      • Hubert Holin
      • -
      • Ian Thomas
      • -
      • Ignas Anikevicius (gns_ank)
      • -
      • Jack (aka Daniel) Kelly
      • -
      • Jack Kelly
      • -
      • Jae-Joon Lee
      • -
      • James R. Evans
      • -
      • Jan-Philip Gehrcke
      • -
      • Jason Grout
      • -
      • Jens H. Nielsen
      • -
      • Jens Hedegaard Nielsen
      • -
      • Joe Kington
      • -
      • John Hunter
      • -
      • Jonathan Waltman
      • -
      • Jouni K. Seppänen
      • -
      • Lance Hepler
      • -
      • Marc Abramowitz
      • -
      • Martin Spacek
      • -
      • Matt Giuca
      • -
      • Matthew Emmett
      • -
      • Matthias BUSSONNIER
      • -
      • Michael Droettboom
      • -
      • Michiel de Hoon
      • -
      • Mike Kaufman
      • -
      • Neil
      • -
      • Nelle Varoquaux
      • -
      • Nic Eggert
      • -
      • Nick Semenkovich
      • -
      • Nikolay Vyahhi
      • -
      • Paul Ivanov
      • -
      • Pauli Virtanen
      • -
      • Peter Würtz
      • -
      • Phil Elson
      • -
      • Piti Ongmongkolkul
      • -
      • Robert Johansson
      • -
      • Russell Owen
      • -
      • Ryan Dale
      • -
      • Ryan May
      • -
      • Sandro Tosi
      • -
      • Sebastian Pinnau
      • -
      • Simon Cross
      • -
      • Stefan van der Walt
      • -
      • Takafumi Arakaki
      • -
      • Thomas A Caswell
      • -
      • Thomas Kluyver
      • -
      • Thomas Robitaille
      • -
      • Till Stensitzki
      • -
      • Tobias Hoppe
      • -
      • Tobias Megies
      • -
      • Tony S Yu
      • -
      • Zach Pincus
      • -
      • bblay
      • -
      • bev-a-tron
      • -
      • drevicko
      • -
      • endolith
      • -
      • goir
      • -
      • mcelrath
      • -
      • pelson
      • -
      • pwuertz
      • -
      • torfbolt
      • -
      • vbr
      • -
      -

      We closed a total of 1222 issues, 435 pull requests and 787 regular issues; -this is the full list (generated with the script -tools/github_stats.py):

      -

      Pull Requests (435):

      -
        -
      • PR #1796: axes.grid lines using lines.marker settings?
      • -
      • PR #1846: Fix the clippath renderering so that it uses no-clip unsigned chars
      • -
      • PR #1853: fill_betweenx signature fixed
      • -
      • PR #1854: BF - prevent a TypeError for lists of vertices
      • -
      • PR #1843: test_backend_pgf: TypeError
      • -
      • PR #1848: add flushing of stdout to update on key event
      • -
      • PR #1802: Step linestyle
      • -
      • PR #1127: Change spectral to nipy_spectral, update docs, leave aliases
      • -
      • PR #1804: MEP10 - documentation improvements on set_xlabel and text of axes.py
      • -
      • PR #1764: Make loc come after fontdict in set_title. Closes #1759
      • -
      • PR #1825: Work around missing subprocess members on Google App Engine
      • -
      • PR #1826: backend_ps: Do not write to a temporary file unless using an external distiller
      • -
      • PR #1827: MEP10 - documentation improvements on many common plots: scatter plots, ...
      • -
      • PR #1834: finance: Fixed making directories for explicit cachename
      • -
      • PR #1832: BF - correct return type for Axes.get_title
      • -
      • PR #1803: Markers module: PEP8 fixes and MEP10 documentation fixes
      • -
      • PR #1795: MEP10 - refactored hlines and vlines documentation
      • -
      • PR #1822: Improved triinterp_demo pylab example
      • -
      • PR #1811: MultiCursor with additionnal optionnal horizontal bar
      • -
      • PR #1817: Improved test_triinterp_colinear
      • -
      • PR #1799: Corrupt/invalid PDF and EPS files when saving a logscaled plot made with negative values
      • -
      • PR #1800: Agg snapping fixes (for the last time...?) :)
      • -
      • PR #1786: Cubic interpolation for triangular grids
      • -
      • PR #1808: DOC: typo, break lines >80 char, add link to cmaps list
      • -
      • PR #1801: Add .directory files to .gitignore
      • -
      • PR #1724: Re-write stacked step histogram
      • -
      • PR #1790: Fixes problem raised in #1431 (`get_transform` should not affect `is_transform_set`)
      • -
      • PR #1779: Bug in postscript backend in Python 3
      • -
      • PR #1797: PEP8 on colors module
      • -
      • PR #1291: Fix image comparison
      • -
      • PR #1791: Symbol not found: _CGAffineTransformIdentity on MacOS 10.6
      • -
      • PR #1794: Fix for #1792
      • -
      • PR #1454: Retool the setup.py infrastructure
      • -
      • PR #1785: Fix test_bbox_inches_tight
      • -
      • PR #1784: Attempt to fix Travis “permission denied” error for Python 3
      • -
      • PR #1775: Issue #1763
      • -
      • PR #1615: Offset is empty with usetex when offset is equal to 1
      • -
      • PR #1778: Fix clip_path_to_rect, add convenience method on Path object for it
      • -
      • PR #1669: Add EventCollection and eventplot
      • -
      • PR #1725: Fix compiler warnings
      • -
      • PR #1756: Remove broken printing_in_wx.py example.
      • -
      • PR #1762: Make cbook safe to import while removing duplicate is_string_like;
      • -
      • PR #1252: Properly passing on horiz-/vertOn to Cursor()
      • -
      • PR #1686: Fix lost ticks
      • -
      • PR #1640: Fix bugs in legend positioning with loc=’best’
      • -
      • PR #1687: Update lib/matplotlib/backends/backend_cairo.py
      • -
      • PR #1760: Improved the subplot function documentation and fixed the autogeneration from boilerplate.
      • -
      • PR #1716: PEP8 fixes on the figure module
      • -
      • PR #1643: Clean up code in cbook
      • -
      • PR #1755: Update examples/pylab_examples/histogram_demo_extended.py
      • -
      • PR #1497: Fix for empty collection check in axes.add_collection
      • -
      • PR #1685: Add default savefig directory
      • -
      • PR #1698: Fix bug updating WeakKeyDictionary during iteration
      • -
      • PR #1743: slight tweak to the documentation of errorbar
      • -
      • PR #1748: Typo in “Annotation” docstring.
      • -
      • PR #1750: Name missmatch in filetypes.rgba and print_rgb of backend_bases.py
      • -
      • PR #1722: Fix sign of infstr in exceltools.rec2exel
      • -
      • PR #1726: stackplot_test_baseline has different results on 32-bit and 64-bit platforms
      • -
      • PR #1577: PEP8 fixes on the line module
      • -
      • PR #1728: Macosx backend: tweak to coordinates position
      • -
      • PR #1718: Fix set dashes for line collections
      • -
      • PR #1721: rcParams.keys() is not Python 3 compatible
      • -
      • PR #1699: Enable to switch off the removal of comments in csv2rec.
      • -
      • PR #1710: Mixing Arial with mathtext on Windows 8 fails
      • -
      • PR #1705: Qt closeevent fixes for v1.2.x
      • -
      • PR #1671: Feature stack base
      • -
      • PR #1684: Fix hist for log=True and histtype=’step’
      • -
      • PR #1708: Fix breaking doc build
      • -
      • PR #1644: NF - Left and right side axes titles
      • -
      • PR #1666: Fix USE_FONTCONFIG=True mode
      • -
      • PR #1691: Fix svg flipping (again)
      • -
      • PR #1695: Alpha kwarg fix
      • -
      • PR #1696: Fixed doc dependency on numpy_ext.numpydoc
      • -
      • PR #1665: MEP10: adding numpydoc and activating autosummary
      • -
      • PR #1660: Explain that matplotlib must be built before the HTML documentation
      • -
      • PR #1694: fixes Issue #1693
      • -
      • PR #1682: Fixed the expected output from test_arrow_patches.test_fancyarrow.
      • -
      • PR #1663: Fix suptitle
      • -
      • PR #1675: fix “alpha” kwarg in errorbar plot
      • -
      • PR #1678: added QtGui.QMainWindow.closeEvent() to make sure the close event
      • -
      • PR #1674: Fix SVG flip when svg.image_noscale is True
      • -
      • PR #1680: Ignore lib/dateutil
      • -
      • PR #1626: Add framealpha argument for legend
      • -
      • PR #1642: remove import new from cbook.py
      • -
      • PR #1534: Make rc_context available via pyplot interface
      • -
      • PR #1672: Nuke Travis python 3.1 testing
      • -
      • PR #1670: Deprecate mpl
      • -
      • PR #1635: Recompute Wedge path after change of attributes.
      • -
      • PR #1498: use QMainWindow.closeEvent for close events
      • -
      • PR #1617: Legend: Also calc the bbox of the legend when the frame is not drawn. (1.2.x)
      • -
      • PR #1585: Fix Qt canvas resize_event
      • -
      • PR #1611: change handling of legend labels which are None
      • -
      • PR #1657: Add EventCollection and eventplot
      • -
      • PR #1641: PEP8 fixes on the rcsetup module
      • -
      • PR #1650: _png.read_png crashes on Python 3 with urllib.request object
      • -
      • PR #1568: removed deprecated methods from the axes module.
      • -
      • PR #1589: Fix shifted ylabels (Issue #1571)
      • -
      • PR #1634: add scatterpoints to rcParam
      • -
      • PR #1654: added explicit ‘zorder’ kwarg to Colection and LineCollection.
      • -
      • PR #1653: Fix #570 - Reversing a 3d axis should now work properly.
      • -
      • PR #1651: WebAgg: pylab compatibility
      • -
      • PR #1505: Issue 1504: changed how draw handles alpha in markerfacecolor
      • -
      • PR #1655: add get_segments method to collections.LineCollection
      • -
      • PR #1652: Ignore kdevelop4 project files
      • -
      • PR #1613: Using a stricter check to see if Python was installed as a framework.
      • -
      • PR #1599: Ada Lovelace and Grace Murray Hopper images in place of Lena
      • -
      • PR #1582: Linear tri interpolator
      • -
      • PR #1637: change cbook to relative import
      • -
      • PR #1618: Mplot3d/crashfixes
      • -
      • PR #1636: hexbin log scale is broken in matplotlib 1.2.0
      • -
      • PR #1624: implemented inverse transform for Mollweide axes
      • -
      • PR #1630: A disconnected callback cannot be reconnected
      • -
      • PR #1139: Make Axes.stem take at least one argument.
      • -
      • PR #1426: WebAgg backend
      • -
      • PR #1606: Document the C/C++ code guidelines
      • -
      • PR #1628: Fix errorbar zorder v1.2
      • -
      • PR #1620: Fix bug in _AnnotationBase
      • -
      • PR #1587: Mac OS X 10.5 needs an autoreleasepool here to avoid memory leaks. Newer...
      • -
      • PR #1597: new MatplotlibDeprecationWarning class (against master)
      • -
      • PR #1596: new MatplotlibDeprecationWarning class (against 1.2.x)
      • -
      • PR #1532: CXX/Python2/cxx_extensions.cxx:1320: Assertion `ob_refcnt == 0’
      • -
      • PR #1604: Make font_manager ignore KeyErrors for bad fonts
      • -
      • PR #1605: Change printed -> pretty-printed
      • -
      • PR #1557: inverting an axis shouldn’t affect the autoscaling setting
      • -
      • PR #1603: ylim=0.0 is not well handled in polar plots
      • -
      • PR #1583: Crash with text.usetex=True and plt.annotate
      • -
      • PR #1602: Fixed typos in docs (squashed version of #1600)
      • -
      • PR #1592: Fix a syntax error in examples (movie_demo.py)
      • -
      • PR #1590: Positional argument specifiers are required by Python 2.6
      • -
      • PR #1579: Updated custom_projection_example.py to work with v1.2 and newer
      • -
      • PR #1578: Fixed blitting in Gtk3Agg backend
      • -
      • PR #1573: fix issue #1572 caused by PR #1081
      • -
      • PR #1562: Mac OS X Backend: Removing clip that is no longer needed
      • -
      • PR #1574: Improvements to Sankey class
      • -
      • PR #1536: ENH: add AVConv movie writer for animations
      • -
      • PR #1570: PEP8 fixes on the tests of the dates module
      • -
      • PR #1569: FIX Removes code that does work from the axes module
      • -
      • PR #1531: fix rendering slowdown with big invisible lines (issue #1256)
      • -
      • PR #1398: PEP8 fixes on dates.py
      • -
      • PR #1564: PEP8-compliance on axes.py (patch 4 / 4)
      • -
      • PR #1559: Workaround for QT cursor bug in dock areas
      • -
      • PR #1560: Remove python2.5 support from texmanager.py
      • -
      • PR #1555: Geo projections getting clobbered by 2to3 when used when python3
      • -
      • PR #1477: alternate fix for issue #997
      • -
      • PR #1522: PEP8-compliance on axes.py (patch 3 / 4)
      • -
      • PR #1550: PEP8 fixes on the module texmanager
      • -
      • PR #1289: Autoscaling and limits in mplot3d.
      • -
      • PR #1551: PEP8 fixes on the spines module
      • -
      • PR #1537: Fix savefig.extension == “auto”
      • -
      • PR #1297: pyplot.plotfile. gridon option added with default from rcParam.
      • -
      • PR #1538: Remove unnecessary clip from Cairo backend; squashed commit
      • -
      • PR #1544: str.format() doesn’t work on python 2.6
      • -
      • PR #1549: Add citation page to website
      • -
      • PR #1514: Fix streamplot when color argument has NaNs
      • -
      • PR #1081: Propagate mpl.text.Text instances to the backends and fix documentation
      • -
      • PR #1533: ENH: raise a more informative error
      • -
      • PR #1540: Changed mailinglist archive link.
      • -
      • PR #1493: check ret == False in Timer._on_timer
      • -
      • PR #1523: DOC: github ribbon does not cover up index link
      • -
      • PR #1515: set_cmap should not require an active image
      • -
      • PR #1489: Documentation update for specgram
      • -
      • PR #1527: fix 2 html color names
      • -
      • PR #1524: Make README.txt consistent reStructuredText
      • -
      • PR #1525: pgf: documentation enhancements
      • -
      • PR #1510: pgf: documentation enhancements
      • -
      • PR #1512: Reorganize the developer docs
      • -
      • PR #1518: PEP8 compliance on the delaunay module
      • -
      • PR #1357: PEP8 fixes on text.py
      • -
      • PR #1469: PEP8-compliance on axes.py (patch 2 / 4)
      • -
      • PR #1470: Add test and test-coverage to Makefile
      • -
      • PR #1442: Add savefig_kwargs to Animation.save() method
      • -
      • PR #1503: DOC: ‘inout’ option for tick_params direction
      • -
      • PR #1494: Added sphinx documentation for Triangulation
      • -
      • PR #1480: Remove dead code in patches
      • -
      • PR #1496: Correct scatter docstring
      • -
      • PR #1472: FIX extra comma in Sankey.add
      • -
      • PR #1471: Improved checking logic of _check_xyz in contour.py
      • -
      • PR #1491: Reintroduce examples.directory rc parameter
      • -
      • PR #1405: Add angle kwarg to patches.Rectangle
      • -
      • PR #1278: Make arrow docstring mention data transform
      • -
      • PR #1355: Add sym-log normalization.
      • -
      • PR #1474: use an imagemap for the “fork me on github” ribbon
      • -
      • PR #1485: Fix leak of gc’s in gtkagg backend
      • -
      • PR #1374: PEP8 fixes on widgets.py
      • -
      • PR #1379: PEP8 fixes on quiver.py
      • -
      • PR #1399: PEP8 fixes on patches
      • -
      • PR #1395: PEP8 fixes on contour.py
      • -
      • PR #1464: PEP8-compliance on axes.py (patch 1 / 4)
      • -
      • PR #1400: PEP8 fixes on offsetbox.py
      • -
      • PR #1463: Document the Gtk3 backends
      • -
      • PR #1397: PEP8 fixes on sankey.py
      • -
      • PR #1396: PEP8 fixes on colors
      • -
      • PR #1394: PEP8 fixes on _cm.py
      • -
      • PR #1456: pgf: documentation fixes
      • -
      • PR #1450: Colorbar edges are different in PDF backend
      • -
      • PR #1453: Remove John Hunter’s email from mpl docstring
      • -
      • PR #1437: agg_buffer_to_array.py crashes
      • -
      • PR #1445: JRE - Modified ‘use’ so that it will only warn if the requested backend ...
      • -
      • PR #1439: Remove all mention of make.osx in README.osx
      • -
      • PR #1434: C++11 narrowing conversions
      • -
      • PR #1449: removed setup.py print statement.
      • -
      • PR #1420: Join bbox_extra_artists and bbox_inches
      • -
      • PR #1444: Colorbar edges are different in PDF backend
      • -
      • PR #1436: Exception message improvement.
      • -
      • PR #1431: Fixed transform=None behaviour on Artists.
      • -
      • PR #1430: Add trove classifiers to setup.py
      • -
      • PR #1427: Fix AttrituteError for .lower on tuple of strings
      • -
      • PR #1425: Rebase of #1418 on v1.2.x
      • -
      • PR #1411: Fix transparent markers in PDF backend. Closes #1410
      • -
      • PR #1416: backend_pdf: optional rgbFace arg in fillp replaces code in draw_markers. Closes #1410
      • -
      • PR #1414: Fix scilimits docstring in ticklabel_format
      • -
      • PR #1314: Range bug fix for pcolor and pcolormesh
      • -
      • PR #1323: Work around a huge memory leak in PySide on Python 3
      • -
      • PR #1409: Make table.py use BBox.union over bbox_all
      • -
      • PR #1387: Make setupegg symlink correct dateutil library
      • -
      • PR #1404: PySide segfaults immediately on Linux
      • -
      • PR #1406: Fix bug when stacking histograms with non-integer weights (v1.2.x branch)
      • -
      • PR #1403: Improve “Report a problem” to “Getting help”
      • -
      • PR #1380: Fix svg writer for StringIO objects
      • -
      • PR #1388: Deprecate original NavigationToolbar
      • -
      • PR #1389: Remove unused autolayout_validator() from rcsetup
      • -
      • PR #1390: Fix bad commandline handling
      • -
      • PR #1229: NF - option to make colorbar extensions rectangles
      • -
      • PR #1375: PEP8 fixes on textpath.py
      • -
      • PR #1392: Fix by Yannick Copin for hist autoscaling bug; closes issue #841
      • -
      • PR #1376: PEP8 fixes on table.py
      • -
      • PR #1384: PEP8 fixes on hatch.py
      • -
      • PR #1382: PEP8 fixes on container.py
      • -
      • PR #1378: PEP8 fixes on stackplot.py
      • -
      • PR #1358: PEP8 fixes on ticker.py
      • -
      • PR #1377: PEP8 fixes on streamplot.py
      • -
      • PR #1352: PEP8 fixes on legend.py
      • -
      • PR #1348: PEP8 fixes on scale.py
      • -
      • PR #1367: Fix typo in transforms.py
      • -
      • PR #1345: PEP8 fixes on backend_bases.py
      • -
      • PR #1365: FIX - travis-ci is failing
      • -
      • PR #1351: PEP8 fixes on transforms.py
      • -
      • PR #1349: PEP8 fixes on type1font.py
      • -
      • PR #1360: PEP8 fixes on tight_layout.py
      • -
      • PR #1359: PEP8 fixes on tight_bbox.py
      • -
      • PR #1362: fixed lognorm clip behavior
      • -
      • PR #1350: PEP8 fixes on units.py
      • -
      • PR #1353: docstring: direct pcolor users to pcolormesh; fix pcolorfast docstring
      • -
      • PR #1333: PEP8 fixes on collections.py
      • -
      • PR #1336: PEP8 fixes to colorbar.py
      • -
      • PR #1347: Remove nonfunctioning cbook.isvector
      • -
      • PR #1327: plt.subplots: Set the visibility of the offset text to false on the shared axes.
      • -
      • PR #1335: PEP8 fixes on cbook.py
      • -
      • PR #1334: PEP8 fixes on blocking_input.py
      • -
      • PR #1332: PEP8 fixes on cm.py
      • -
      • PR #1322: Update Mac build process. Fixes #751
      • -
      • PR #1337: ENH: allow animations to be saved as animated GIFs
      • -
      • PR #1340: fix drawing error of fancyarrow of simple style (v1.2.x)
      • -
      • PR #1330: Tiny (but serious) bugfixes in image.py
      • -
      • PR #1298: Update trisurf to support custom triangulations
      • -
      • PR #1286: backend_pgf: improve handling of temporary directories
      • -
      • PR #1316: very high negative zorder breaks vector graphic rendering
      • -
      • PR #1283: Fix tripcolor with shading=’faceted’
      • -
      • PR #1320: Cursor widget now uses widgetlock; closes Issue #156
      • -
      • PR #1315: Add documentation of colorbar issue #1188 to colorbar documentation.
      • -
      • PR #1307: Marker not round with markersize=3
      • -
      • PR #1285: Hide Tk root window until later
      • -
      • PR #1305: Fix pointer syntax error
      • -
      • PR #1294: Update lib/mpl_toolkits/mplot3d/axes3d.py
      • -
      • PR #1300: Pcolormesh and colorbar documentation.
      • -
      • PR #1296: Make Container._remove_method call correctly
      • -
      • PR #1293: Fixed to contour to support the _as_mpl_transform api.
      • -
      • PR #1284: Fix Image Tutorial: plt.imshow instead of mpimg.imshow.
      • -
      • PR #1282: Use file open modes required by csv module
      • -
      • PR #1247: Log axvline
      • -
      • PR #1265: Fixed pre-transform limit calculation bug for contour sets.
      • -
      • PR #1275: backend_pgf: Custom dashstyles and inconcistency with other backends
      • -
      • PR #1272: Fix Objective-C 2.0 error with gcc-4.0
      • -
      • PR #1277: Fixed bug in MaxNLocator.bin_boundaries
      • -
      • PR #1273: Handled baseline image folder identification for non matplotlib projects...
      • -
      • PR #1230: Fix dpi issue for bitmaps on the OS X backend
      • -
      • PR #1251: backend_pgf. Enable custom dashstyles in the pgf backend
      • -
      • PR #1264: Re-added the matplotlib.dates import on axes
      • -
      • PR #1271: Set axis limits in test_stackplot
      • -
      • PR #1269: Fix typo in docstring
      • -
      • PR #1260: Fix BoundaryNorm interpolation with numpy 1.7rc.
      • -
      • PR #1261: Update six.py to version 1.2
      • -
      • PR #1255: Fix test_pickle test.
      • -
      • PR #1152: checkable pan/zoom buttons for QT NavigationToolbar
      • -
      • PR #1243: Broken doc links
      • -
      • PR #1242: Doc tidy up.
      • -
      • PR #1224: Imsave alpha
      • -
      • PR #1241: backend_pgf: fix parsing of CR+LF newlines
      • -
      • PR #1233: Fix mri_demo.py fails with mpl 1.2.0rc1
      • -
      • PR #1239: Fix matplotlib.testing.util.MiniExpect.expect hangs on Windows
      • -
      • PR #1240: backend_pgf: fix parsing of CR+LF newlines
      • -
      • PR #1236: Fix poly_editor.py on Python 3
      • -
      • PR #1232: Enable dynamic updating for the OS X backend
      • -
      • PR #1234: Fix 2to3 and packaging of dateutil
      • -
      • PR #1217: PEP8 fixes on the axis module
      • -
      • PR #1176: Reverted a previous change to artist transform setting. Fixes legend bug.
      • -
      • PR #1231: fix Typesetting in plot() docstring
      • -
      • PR #1215: PEP8 on lib/matplotlib.afm.py
      • -
      • PR #1216: PEP8 fixes on the animation module
      • -
      • PR #1208: FAIL: matplotlib.tests.test_text.test_contains.test
      • -
      • PR #1209: Pass linewidth to Mac context properly
      • -
      • PR #847: Add stacked kwarg to hist and implement stacked hists for step histtype
      • -
      • PR #1228: backend_pgf: pep8 edits
      • -
      • PR #1226: Add dpi kwarg to PIL image.save method for TIFF file.
      • -
      • PR #1222: Don’t try to order the contours of TrueType fonts
      • -
      • PR #1166: PEP8 compliance on colors.py
      • -
      • PR #1225: Added deprecation notices for Qt3-based backends.
      • -
      • PR #1190: Update documentation regarding lines.color
      • -
      • PR #1202: refactored grid_spec.tight_layout and fixed #1055
      • -
      • PR #1221: revert PR #1125 and #1201
      • -
      • PR #1220: Figure.show: clarify docstring and error message
      • -
      • PR #1167: PEP8 lib/matplotlib/patches.py
      • -
      • PR #1168: PEP8 compliance on artist.py
      • -
      • PR #1213: Include username in tempdir
      • -
      • PR #1182: Bezier pep8
      • -
      • PR #1206: README and links fixes
      • -
      • PR #1192: Issue835 2: replacement for #835
      • -
      • PR #1187: Add a simple arrow example
      • -
      • PR #1120: FAIL: matplotlib.tests.test_transforms.test_pre_transform_plotting.test on Python 3.x
      • -
      • PR #714: Initial rework of gen_gallery.py
      • -
      • PR #1150: the affine matrix is calculated in the display coordinate for interpolation=’none’
      • -
      • PR #1145: Fix formatter reset when twin{x,y}() is called
      • -
      • PR #1201: Fix typo in object-oriented API
      • -
      • PR #1061: Add log option to Axes.hist2d
      • -
      • PR #1125: Reduce object-oriented boilerplate for users
      • -
      • PR #1195: Fixed pickle tests to use the BufferIO object for python3 support.
      • -
      • PR #1198: Fixed python2.6 support (by removing use of viewvalues on a dict).
      • -
      • PR #1197: Handled future division changes for python3 (fixes #1194).
      • -
      • PR #1162: FIX nose.tools.assert_is is only supported with python2.7
      • -
      • PR #803: Return arrow collection as 2nd argument of streamplot.
      • -
      • PR #1189: BUG: Fix streamplot when velocity component is exactly zero.
      • -
      • PR #1191: Small bugfixes to the new pickle support.
      • -
      • PR #1146: Fix invalid transformation in InvertedSymmetricalLogTransform.
      • -
      • PR #1169: Subplot.twin[xy] returns a Subplot instance
      • -
      • PR #1183: FIX undefined elements were used at several places in the mlab module
      • -
      • PR #498: get_sample_data still broken on v.1.1.x
      • -
      • PR #1170: Uses tight_layout.get_subplotspec_list to check if all axes are compatible w/ tight_layout
      • -
      • PR #1174: closes #1173 - backporting python2.7 subprocess’s check_output to be abl...
      • -
      • PR #1175: Pickling support added. Various whitespace fixes as a result of reading lots of code.
      • -
      • PR #1098: suppress exception upon quitting with qt4agg on osx
      • -
      • PR #1171: backend_pgf: handle OSError when testing for xelatex/pdflatex
      • -
      • PR #1164: doc: note contourf hatching in whats_new.rst
      • -
      • PR #1153: PEP8 on artist
      • -
      • PR #1163: tight_layout: fix regression for figures with non SubplotBase Axes
      • -
      • PR #1159: FIX assert_raises cannot be called with ``with\
      • -
      • PR #1160: backend_pgf: clarifications and fixes in documentation
      • -
      • PR #1154: six inclusion for dateutil on py3 doesn’t work
      • -
      • PR #1149: Add Phil Elson’s percentage histogram example
      • -
      • PR #1158: FIX - typo in lib/matplotlib/testing/compare.py
      • -
      • PR #1155: workaround for fixed dpi assumption in adjust_bbox_pdf
      • -
      • PR #1142: What’s New: Python 3 paragraph
      • -
      • PR #1130: Fix writing pdf on stdout
      • -
      • PR #832: MPLCONFIGDIR tries to be created in read-only home
      • -
      • PR #1140: BUG: Fix fill_between when NaN values are present
      • -
      • PR #1144: Added tripcolor whats_new section.
      • -
      • PR #1010: Port part of errorfill from Tony Yu’s mpltools.
      • -
      • PR #1141: backend_pgf: fix parentheses typo
      • -
      • PR #1114: Make grid accept alpha rcParam
      • -
      • PR #1124: PGF backend, fix #1116, #1118 and #1128
      • -
      • PR #983: Issues with dateutil and pytz
      • -
      • PR #1133: figure.py: import warnings, and make imports absolute
      • -
      • PR #1132: clean out obsolete matplotlibrc-related bits to close #1123
      • -
      • PR #1131: Cleanup after the gca test.
      • -
      • PR #563: sankey.add() has mutable defaults
      • -
      • PR #731: Plot limit with transform
      • -
      • PR #1107: Added %s support for labels.
      • -
      • PR #774: Allow automatic use of tight_layout.
      • -
      • PR #1122: DOC: Add streamplot description to What’s New page
      • -
      • PR #1111: Fixed transoffset example from failing.
      • -
      • PR #840: Documentation Errors for specgram
      • -
      • PR #1088: For a text artist, if it has a _bbox_patch associated with it, the contains test should reflect this.
      • -
      • PR #986: Add texinfo build target in doc/make.py
      • -
      • PR #1076: PGF backend for XeLaTeX/LuaLaTeX support
      • -
      • PR #1090: External transform api
      • -
      • PR #1108: Fix documentation warnings
      • -
      • PR #861: Add rcfile function (which loads rc params from a given file).
      • -
      • PR #1062: increased the padding on FileMovieWritter.frame_format_str
      • -
      • PR #1100: Doc multi version master
      • -
      • PR #1105: Fixed comma between tests.
      • -
      • PR #1095: Colormap byteorder bug
      • -
      • PR #1103: colorbar: correct error introduced in commit 089024; closes #1102
      • -
      • PR #1067: Support multi-version documentation on the website
      • -
      • PR #1031: Added ‘capthick’ kwarg to errorbar()
      • -
      • PR #1074: Added broadcasting support in some mplot3d methods
      • -
      • PR #1064: Locator interface
      • -
      • PR #850: Added tripcolor triangle-centred colour values.
      • -
      • PR #1093: Exposed the callback id for the default key press handler so that it can be easily disabled. Fixes #215.
      • -
      • PR #1065: fixed conversion from pt to inch in tight_layout
      • -
      • PR #1082: doc: in pcolormesh docstring, say what it does.
      • -
      • PR #1078: doc: note that IDLE doesn’t work with interactive mode.
      • -
      • PR #1071: patches.polygon: fix bug in handling of path closing, #1018.
      • -
      • PR #1057: Contour norm scaling
      • -
      • PR #1056: Test framework cleanups
      • -
      • PR #778: Make tests faster
      • -
      • PR #1024: broken links in the gallery
      • -
      • PR #1054: stix_fonts_demo.py fails with bad refcount
      • -
      • PR #960: Fixed logformatting for non integer bases.
      • -
      • PR #897: GUI icon in Tkinter
      • -
      • PR #1053: Move Python 3 import of reload() to the module that uses it
      • -
      • PR #1049: Update examples/user_interfaces/embedding_in_wx2.py
      • -
      • PR #1050: Update examples/user_interfaces/embedding_in_wx4.py
      • -
      • PR #1051: Update examples/user_interfaces/mathtext_wx.py
      • -
      • PR #1052: Update examples/user_interfaces/wxcursor_demo.py
      • -
      • PR #1047: Enable building on Python 3.3 for Windows
      • -
      • PR #1036: Move all figures to the front with a non-interactive show() in macosx backend.
      • -
      • PR #1042: Three more plot_directive configuration options
      • -
      • PR #1022: contour: map extended ranges to “under” and “over” values
      • -
      • PR #1007: modifying GTK3 example to use pygobject, and adding a simple example to demonstrate NavigationToolbar in GTK3
      • -
      • PR #1004: Added savefig.bbox option to matplotlibrc
      • -
      • PR #976: Fix embedding_in_qt4_wtoolbar.py on Python 3
      • -
      • PR #1034: MdH = allow compilation on recent Mac OS X without compiler warnings
      • -
      • PR #1028: Fix use() so that it is possible to reset the rcParam.
      • -
      • PR #1033: Py3k: reload->imp.reload
      • -
      • PR #1002: Fixed potential overflow exception in the lines.contains() method
      • -
      • PR #1025: Timers
      • -
      • PR #989: Animation subprocess bug
      • -
      • PR #898: Added warnings for easily confusable subplot/subplots invocations
      • -
      • PR #963: Add detection of file extension for file-like objects
      • -
      • PR #973: Fix sankey.py pep8 and py3 compatibility
      • -
      • PR #972: Force closing PIL image files
      • -
      • PR #981: Fix pathpatch3d_demo.py on Python 3
      • -
      • PR #980: Fix basic_units.py on Python 3. PEP8 and PyLint cleanup.
      • -
      • PR #1014: qt4: remove duplicate file save button; and remove trailing whitespace
      • -
      • PR #1011: fix for bug #996 and related issues
      • -
      • PR #985: support current and future FreeBSD releases
      • -
      • PR #1000: Fix traceback for vlines/hlines, when an empty list or array passed in for x/y.
      • -
      • PR #994: Fix bug in pcolorfast introduced by #901
      • -
      • PR #993: Fix typo
      • -
      • PR #908: use Qt window title as default savefig filename
      • -
      • PR #971: Close fd temp file following rec2csv_bad_shape test
      • -
      • PR #851: Simple GUI interface enhancements
      • -
      • PR #979: Fix test_mouseclicks.py on Python 3
      • -
      • PR #977: Fix lasso_selector_demo.py on Python 3
      • -
      • PR #970: Fix tiff and jpeg export via PIL
      • -
      • PR #961: Issue 807 auto minor locator
      • -
      -

      Issues (787):

      -
        -
      • #1839: matplotlib 1.2.0 doesn’t compile with Solaris Studio 12.3 CC
      • -
      • #1796: axes.grid lines using lines.marker settings?
      • -
      • #1846: Fix the clippath renderering so that it uses no-clip unsigned chars
      • -
      • #1844: 1.2.0 regression: custom scale not working
      • -
      • #1768: Build fails on travisCI
      • -
      • #1851: Fix for the custom scale example
      • -
      • #1853: fill_betweenx signature fixed
      • -
      • #1854: BF - prevent a TypeError for lists of vertices
      • -
      • #1840: BF - prevent a TypeError for lists of vertices in set_marker
      • -
      • #1842: test_backend_pgf errors
      • -
      • #1850: fill_betweenx signature fixed
      • -
      • #1843: test_backend_pgf: TypeError
      • -
      • #1830: Keyboard shortcuts work when toolbar not displayed
      • -
      • #1848: add flushing of stdout to update on key event
      • -
      • #1802: Step linestyle
      • -
      • #879: Two colormaps named “spectral”
      • -
      • #1127: Change spectral to nipy_spectral, update docs, leave aliases
      • -
      • #1804: MEP10 - documentation improvements on set_xlabel and text of axes.py
      • -
      • #1764: Make loc come after fontdict in set_title. Closes #1759
      • -
      • #1759: Axes3d error on set_title
      • -
      • #800: Still another Agg snapping issue.
      • -
      • #1727: ‘stepfilled’ histogram is not filled properly when setting yscale(‘log’)
      • -
      • #1612: setupegg is broken on windows
      • -
      • #1591: Image being snapped erroneously
      • -
      • #1845: Agg clip rendering fix
      • -
      • #1838: plot_surface and transposed arrays
      • -
      • #1825: Work around missing subprocess members on Google App Engine
      • -
      • #1826: backend_ps: Do not write to a temporary file unless using an external distiller
      • -
      • #1827: MEP10 - documentation improvements on many common plots: scatter plots, ...
      • -
      • #1834: finance: Fixed making directories for explicit cachename
      • -
      • #1714: qt4_editor broken: TransformNode instances can not be copied
      • -
      • #1832: BF - correct return type for Axes.get_title
      • -
      • #324: ability to change curves, axes, labels attributes via UI
      • -
      • #1803: Markers module: PEP8 fixes and MEP10 documentation fixes
      • -
      • #1795: MEP10 - refactored hlines and vlines documentation
      • -
      • #1819: Option for disregarding matplotlibrc, for reproducible batch production of plots
      • -
      • #1822: Improved triinterp_demo pylab example
      • -
      • #1820: griddata: Allow for easy switching between interpolation mechanisms
      • -
      • #1811: MultiCursor with additionnal optionnal horizontal bar
      • -
      • #1817: Improved test_triinterp_colinear
      • -
      • #1799: Corrupt/invalid PDF and EPS files when saving a logscaled plot made with negative values
      • -
      • #1800: Agg snapping fixes (for the last time...?) :)
      • -
      • #1521: Triangular grid interpolation and refinement
      • -
      • #1786: Cubic interpolation for triangular grids
      • -
      • #1808: DOC: typo, break lines >80 char, add link to cmaps list
      • -
      • #1798: MEP10 - documentation improvements on set_xlabel and text of axes.py
      • -
      • #1801: Add .directory files to .gitignore
      • -
      • #1765: Unable to Generate Docs
      • -
      • #1744: bottom keyword doesn’t work for non-stacked histograms
      • -
      • #1679: matplotlib-1.2.0: regression in histogram with barstacked drawing?
      • -
      • #1724: Re-write stacked step histogram
      • -
      • #1790: Fixes problem raised in #1431 (`get_transform` should not affect `is_transform_set`)
      • -
      • #1779: Bug in postscript backend in Python 3
      • -
      • #1797: PEP8 on colors module
      • -
      • #1291: Fix image comparison
      • -
      • #1788: Lower minimum pyparsing version to 1.5.2
      • -
      • #1789: imshow() subplots with shared axes generate unwanted white spaces
      • -
      • #1793: font_manager unittest errors
      • -
      • #1791: Symbol not found: _CGAffineTransformIdentity on MacOS 10.6
      • -
      • #1772: Python 3.3 build failure
      • -
      • #1794: Fix for #1792
      • -
      • #1781: Issues with installing matplotlib on Travis with Python 3
      • -
      • #1792: Matplotlib fails to install pyparsing with Python 2
      • -
      • #1454: Retool the setup.py infrastructure
      • -
      • #1776: Documentation style suggestion
      • -
      • #1785: Fix test_bbox_inches_tight
      • -
      • #1784: Attempt to fix Travis “permission denied” error for Python 3
      • -
      • #1775: Issue #1763
      • -
      • #1615: Offset is empty with usetex when offset is equal to 1
      • -
      • #1782: fix copy-to-clipboard in example
      • -
      • #1778: Fix clip_path_to_rect, add convenience method on Path object for it
      • -
      • #1777: PyList_SetItem return value bug in clip_path_to_rect (_path.cpp).
      • -
      • #1773: emf backend doesn’t work with StringIO
      • -
      • #1669: Add EventCollection and eventplot
      • -
      • #1774: ignore singleton dimensions in ndarrays passed to imshow
      • -
      • #1619: Arrow with “simple” style is not robust. Code fix included.
      • -
      • #1725: Fix compiler warnings
      • -
      • #1756: Remove broken printing_in_wx.py example.
      • -
      • #1094: Feature request - make it simpler to use full OO interface
      • -
      • #1457: Better object-oriented interface for users
      • -
      • #1762: Make cbook safe to import while removing duplicate is_string_like;
      • -
      • #1019: Repeated is_string_like function
      • -
      • #1761: plot_wireframe does not accept vmin, vmax
      • -
      • #300: subplot args desription confusing
      • -
      • #1252: Properly passing on horiz-/vertOn to Cursor()
      • -
      • #1632: Fix build on Ubuntu 12.10
      • -
      • #1686: Fix lost ticks
      • -
      • #1640: Fix bugs in legend positioning with loc=’best’
      • -
      • #1687: Update lib/matplotlib/backends/backend_cairo.py
      • -
      • #1760: Improved the subplot function documentation and fixed the autogeneration from boilerplate.
      • -
      • #1647: WIP: Deprecation of the cbook module
      • -
      • #1662: is_string_like existed both in matplotlib and matplotlib.cbook
      • -
      • #1716: PEP8 fixes on the figure module
      • -
      • #1643: Clean up code in cbook
      • -
      • #953: subplot docstring improvement (re #300)
      • -
      • #1112: Bad kwargs to savefig
      • -
      • #1755: Update examples/pylab_examples/histogram_demo_extended.py
      • -
      • #1754: Fixed a typo in histogram example code
      • -
      • #1490: empty scatter messes up the limits
      • -
      • #1497: Fix for empty collection check in axes.add_collection
      • -
      • #1685: Add default savefig directory
      • -
      • #1698: Fix bug updating WeakKeyDictionary during iteration
      • -
      • #1743: slight tweak to the documentation of errorbar
      • -
      • #1748: Typo in “Annotation” docstring.
      • -
      • #1750: Name missmatch in filetypes.rgba and print_rgb of backend_bases.py
      • -
      • #1749: Incompatibility with latest stable Numpy build (v1.7)
      • -
      • #1722: Fix sign of infstr in exceltools.rec2exel
      • -
      • #1126: Qt4 save dialog not functional on CentOS-5
      • -
      • #1740: alpha is not set correctly when using eps format
      • -
      • #1741: pcolormesh memory leak
      • -
      • #1726: stackplot_test_baseline has different results on 32-bit and 64-bit platforms
      • -
      • #1577: PEP8 fixes on the line module
      • -
      • #1728: Macosx backend: tweak to coordinates position
      • -
      • #1701: dash setting in LineCollection is broken
      • -
      • #1704: Contour does not pass a list of linestyles to LineCollection
      • -
      • #1718: Fix set dashes for line collections
      • -
      • #1721: rcParams.keys() is not Python 3 compatible
      • -
      • #1723: Re-write stacked histogram (fixes bugs)
      • -
      • #1706: Fix bugs in stacked histograms
      • -
      • #1401: RuntimeError: dictionary changed size during iteration from colors.py, 3.3 but not 3.2
      • -
      • #1699: Enable to switch off the removal of comments in csv2rec.
      • -
      • #1710: Mixing Arial with mathtext on Windows 8 fails
      • -
      • #1683: Remove figure from Gcf when it is closed
      • -
      • #1705: Qt closeevent fixes for v1.2.x
      • -
      • #1504: markerfacecolor/markeredgecolor alpha issue
      • -
      • #1671: Feature stack base
      • -
      • #1075: fix hist limit issue for step* for both linear and log scale
      • -
      • #1659: super hacky fix to issue #1310
      • -
      • #196: Axes.hist(...log=True) mishandles y-axis minimum value
      • -
      • #1029: Implemented fix to issue 196 on github for log=True and histtype=’step’
      • -
      • #1684: Fix hist for log=True and histtype=’step’
      • -
      • #1707: Docs build failure
      • -
      • #1708: Fix breaking doc build
      • -
      • #289: reproducible research: sys.argv[0] in plot footer
      • -
      • #1633: Add rcParam option for number of scatterplot symbols
      • -
      • #1113: Bug in ax.arrow()
      • -
      • #987: angle/rotate keyword for rectangle
      • -
      • #775: TypeError in Axes.get_legend_handles_labels
      • -
      • #331: stem function ability to take one argument
      • -
      • #1644: NF - Left and right side axes titles
      • -
      • #1666: Fix USE_FONTCONFIG=True mode
      • -
      • #1697: Fix bug updating WeakKeyDictionary during iteration
      • -
      • #1691: Fix svg flipping (again)
      • -
      • #1695: Alpha kwarg fix
      • -
      • #1696: Fixed doc dependency on numpy_ext.numpydoc
      • -
      • #1665: MEP10: adding numpydoc and activating autosummary
      • -
      • #1660: Explain that matplotlib must be built before the HTML documentation
      • -
      • #1693: saving to *.eps broken on master
      • -
      • #1694: fixes Issue #1693
      • -
      • #1689: SVG flip issue
      • -
      • #1681: Fancy arrow tests are failing
      • -
      • #1682: Fixed the expected output from test_arrow_patches.test_fancyarrow.
      • -
      • #1262: Using figure.suptitle puts another suptitle on top of any existing one.
      • -
      • #1663: Fix suptitle
      • -
      • #1675: fix “alpha” kwarg in errorbar plot
      • -
      • #1610: plotting legends none
      • -
      • #1676: Qt close events don’t cascade properly.
      • -
      • #1678: added QtGui.QMainWindow.closeEvent() to make sure the close event
      • -
      • #1673: Images saved as SVG get upside down when svg.image_noscale is True.
      • -
      • #1674: Fix SVG flip when svg.image_noscale is True
      • -
      • #1680: Ignore lib/dateutil
      • -
      • #1677: add changelog for #1626
      • -
      • #1626: Add framealpha argument for legend
      • -
      • #1608: Incorrect ylabel placement in twinx
      • -
      • #1642: remove import new from cbook.py
      • -
      • #1534: Make rc_context available via pyplot interface
      • -
      • #1672: Nuke Travis python 3.1 testing
      • -
      • #1535: Deprecate mpl.py (was Remove mpl.py)
      • -
      • #1670: Deprecate mpl
      • -
      • #1517: ENH: Add baseline feature to stackplot.
      • -
      • #1635: Recompute Wedge path after change of attributes.
      • -
      • #1488: Continue propagating resize event up the chain
      • -
      • #1498: use QMainWindow.closeEvent for close events
      • -
      • #1617: Legend: Also calc the bbox of the legend when the frame is not drawn. (1.2.x)
      • -
      • #1585: Fix Qt canvas resize_event
      • -
      • #1629: Update x,y.z values for an existing Line3D object
      • -
      • #1611: change handling of legend labels which are None
      • -
      • #1657: Add EventCollection and eventplot
      • -
      • #1641: PEP8 fixes on the rcsetup module
      • -
      • #1650: _png.read_png crashes on Python 3 with urllib.request object
      • -
      • #1568: removed deprecated methods from the axes module.
      • -
      • #1571: Y-labels shifted
      • -
      • #1589: Fix shifted ylabels (Issue #1571)
      • -
      • #1276: Fix overwriting suptitle
      • -
      • #1661: Fix travis install failure on py31
      • -
      • #1634: add scatterpoints to rcParam
      • -
      • #1654: added explicit ‘zorder’ kwarg to Colection and LineCollection.
      • -
      • #570: mplot3d reverse axis behavior
      • -
      • #1653: Fix #570 - Reversing a 3d axis should now work properly.
      • -
      • #1651: WebAgg: pylab compatibility
      • -
      • #1638: web_backend is not installed
      • -
      • #1505: Issue 1504: changed how draw handles alpha in markerfacecolor
      • -
      • #1655: add get_segments method to collections.LineCollection
      • -
      • #1649: add get_segments method to collections.LineCollection
      • -
      • #1593: NameError: global name ‘iterable’ is not defined
      • -
      • #1652: Ignore kdevelop4 project files
      • -
      • #665: Mac OSX backend keyboard focus stays in terminal
      • -
      • #1613: Using a stricter check to see if Python was installed as a framework.
      • -
      • #1581: Provide an alternative to lena.png for two examples that use it.
      • -
      • #1599: Ada Lovelace and Grace Murray Hopper images in place of Lena
      • -
      • #1582: Linear tri interpolator
      • -
      • #1637: change cbook to relative import
      • -
      • #1645: add get_segments method to collections.LineCollection - updated
      • -
      • #1639: Rename web_static to web_backend in setup.py
      • -
      • #1618: Mplot3d/crashfixes
      • -
      • #1636: hexbin log scale is broken in matplotlib 1.2.0
      • -
      • #1624: implemented inverse transform for Mollweide axes
      • -
      • #1630: A disconnected callback cannot be reconnected
      • -
      • #1139: Make Axes.stem take at least one argument.
      • -
      • #1426: WebAgg backend
      • -
      • #1606: Document the C/C++ code guidelines
      • -
      • #1622: zorder is not respected by all parts of errorbar
      • -
      • #1628: Fix errorbar zorder v1.2
      • -
      • #1625: saving pgf to a stream is not supported
      • -
      • #1588: Annotations appear in incorrect locations
      • -
      • #1620: Fix bug in _AnnotationBase
      • -
      • #1621: Package for python 3.3 on OS X
      • -
      • #1616: Legend: Also calc the bbox of the legend when the frame is not drawn.
      • -
      • #1587: Mac OS X 10.5 needs an autoreleasepool here to avoid memory leaks. Newer...
      • -
      • #1597: new MatplotlibDeprecationWarning class (against master)
      • -
      • #1596: new MatplotlibDeprecationWarning class (against 1.2.x)
      • -
      • #1532: CXX/Python2/cxx_extensions.cxx:1320: Assertion `ob_refcnt == 0’
      • -
      • #1601: invalid/misconfigured fonts cause the font manager to fail
      • -
      • #1604: Make font_manager ignore KeyErrors for bad fonts
      • -
      • #1605: Change printed -> pretty-printed
      • -
      • #1553: invert_xaxis() accidentially disables autoscaling
      • -
      • #1557: inverting an axis shouldn’t affect the autoscaling setting
      • -
      • #1603: ylim=0.0 is not well handled in polar plots
      • -
      • #1583: Crash with text.usetex=True and plt.annotate
      • -
      • #1584: triplot(x, y, simplex) should not modify the simplex array as a side effect.
      • -
      • #1576: BUG: tri: prevent Triangulation from modifying specified input
      • -
      • #1602: Fixed typos in docs (squashed version of #1600)
      • -
      • #1600: Fixed typos in matplotlibrc and docs
      • -
      • #1592: Fix a syntax error in examples (movie_demo.py)
      • -
      • #1572: axes_grid demo broken
      • -
      • #201: Drawing rubberband box outside of view crash backend_macosx
      • -
      • #1038: osx backend does not allow font changes
      • -
      • #1590: Positional argument specifiers are required by Python 2.6
      • -
      • #1579: Updated custom_projection_example.py to work with v1.2 and newer
      • -
      • #1578: Fixed blitting in Gtk3Agg backend
      • -
      • #1580: lena.png is indecent and needs to be removed
      • -
      • #1573: fix issue #1572 caused by PR #1081
      • -
      • #1562: Mac OS X Backend: Removing clip that is no longer needed
      • -
      • #1506: DOC: make example cursor show up in the docs
      • -
      • #1565: new MatplotlibDeprecationWarning class
      • -
      • #776: ticks based on number of subplots
      • -
      • #1462: use plt.subplots() in examples as much as possible
      • -
      • #1407: Sankey5
      • -
      • #1574: Improvements to Sankey class
      • -
      • #1536: ENH: add AVConv movie writer for animations
      • -
      • #1570: PEP8 fixes on the tests of the dates module
      • -
      • #1465: Undefined elements in axes module
      • -
      • #1569: FIX Removes code that does work from the axes module
      • -
      • #1250: Fix Travis tests
      • -
      • #1566: pylab overwrites user variable(s)
      • -
      • #1531: fix rendering slowdown with big invisible lines (issue #1256)
      • -
      • #1398: PEP8 fixes on dates.py
      • -
      • #1564: PEP8-compliance on axes.py (patch 4 / 4)
      • -
      • #1559: Workaround for QT cursor bug in dock areas
      • -
      • #1552: Remove python 2.5 stuff from texmanager.py
      • -
      • #1560: Remove python2.5 support from texmanager.py
      • -
      • #1555: Geo projections getting clobbered by 2to3 when used when python3
      • -
      • #997: Delaunay interpolator: support grid whose width or height is 1
      • -
      • #1477: alternate fix for issue #997
      • -
      • #1556: Invert axis autoscale fix
      • -
      • #1554: Geo projections getting clobbered by 2to3 when used when python3
      • -
      • #1522: PEP8-compliance on axes.py (patch 3 / 4)
      • -
      • #1548: Broken i386 + Python 3 build
      • -
      • #1550: PEP8 fixes on the module texmanager
      • -
      • #783: mplot3d: scatter (and others) incorrectly auto-scale axes after set_[xyz]lim()
      • -
      • #1289: Autoscaling and limits in mplot3d.
      • -
      • #1551: PEP8 fixes on the spines module
      • -
      • #1537: Fix savefig.extension == “auto”
      • -
      • #1297: pyplot.plotfile. gridon option added with default from rcParam.
      • -
      • #1526: Remove unnecessary clip cairo
      • -
      • #1538: Remove unnecessary clip from Cairo backend; squashed commit
      • -
      • #1544: str.format() doesn’t work on python 2.6
      • -
      • #1549: Add citation page to website
      • -
      • #1514: Fix streamplot when color argument has NaNs
      • -
      • #1487: MaxNLocator for log-scale
      • -
      • #1081: Propagate mpl.text.Text instances to the backends and fix documentation
      • -
      • #1533: ENH: raise a more informative error
      • -
      • #955: Strange resize behaviour with ImageGrid
      • -
      • #1003: Fix for issue #955
      • -
      • #1546: Quiver crashes if given matrices
      • -
      • #1542: Wrong __version__numpy__
      • -
      • #1540: Changed mailinglist archive link.
      • -
      • #1507: python setup.py build (in parallel)
      • -
      • #1492: MacOSX backend blocks in IPython QtConsole
      • -
      • #1493: check ret == False in Timer._on_timer
      • -
      • #1523: DOC: github ribbon does not cover up index link
      • -
      • #1515: set_cmap should not require an active image
      • -
      • #1500: comment on http://matplotlib.org/users/pgf.html#pgf-tutorial - minor issue with xits font
      • -
      • #1489: Documentation update for specgram
      • -
      • #1527: fix 2 html color names
      • -
      • #1524: Make README.txt consistent reStructuredText
      • -
      • #1525: pgf: documentation enhancements
      • -
      • #1510: pgf: documentation enhancements
      • -
      • #1512: Reorganize the developer docs
      • -
      • #1518: PEP8 compliance on the delaunay module
      • -
      • #1357: PEP8 fixes on text.py
      • -
      • #1469: PEP8-compliance on axes.py (patch 2 / 4)
      • -
      • #1470: Add test and test-coverage to Makefile
      • -
      • #1513: Problems with image sizes
      • -
      • #1509: pgf: draw_image() doesn’t store path to png files in the pgf source
      • -
      • #1516: set_xticklabels changes font when text.usetex is enabled
      • -
      • #1442: Add savefig_kwargs to Animation.save() method
      • -
      • #1511: Reorganize developer docs
      • -
      • #1503: DOC: ‘inout’ option for tick_params direction
      • -
      • #1494: Added sphinx documentation for Triangulation
      • -
      • #1480: Remove dead code in patches
      • -
      • #1496: Correct scatter docstring
      • -
      • #1495: scatter docstring, minor
      • -
      • #1472: FIX extra comma in Sankey.add
      • -
      • #1471: Improved checking logic of _check_xyz in contour.py
      • -
      • #998: fix for issue #997
      • -
      • #1479: Reintroduce examples.directory rc parameter
      • -
      • #1491: Reintroduce examples.directory rc parameter
      • -
      • #1405: Add angle kwarg to patches.Rectangle
      • -
      • #1278: Make arrow docstring mention data transform
      • -
      • #1475: make plt.subplot() act as plt.subplot(111)
      • -
      • #1355: Add sym-log normalization.
      • -
      • #1474: use an imagemap for the “fork me on github” ribbon
      • -
      • #632: ENH: More included norms, especially a symlog like norm
      • -
      • #1466: Too many open files
      • -
      • #1485: Fix leak of gc’s in gtkagg backend
      • -
      • #1484: V1.2.x Fix leak of gc’s in gtkagg backend.
      • -
      • #1374: PEP8 fixes on widgets.py
      • -
      • #1379: PEP8 fixes on quiver.py
      • -
      • #1399: PEP8 fixes on patches
      • -
      • #1478: Reintroduce examples.directory rcParams to customize cbook.get_sample_data() lookup location
      • -
      • #1468: use an imagemap for the “fork me on github” ribbon
      • -
      • #1395: PEP8 fixes on contour.py
      • -
      • #1473: offsets.shape(-1,2)
      • -
      • #1467: matplotlib 1.2.0 Binary installer for 32-bit Windows for python 2.7 is missing
      • -
      • #1419: bbox_extra_artists doesn’t work for a table
      • -
      • #1432: lengend overlaps graph
      • -
      • #1464: PEP8-compliance on axes.py (patch 1 / 4)
      • -
      • #1400: PEP8 fixes on offsetbox.py
      • -
      • #1463: Document the Gtk3 backends
      • -
      • #1417: Pep8 on the axes module
      • -
      • #1458: use plt.subplots() in examples as much as possible
      • -
      • #1459: Invalid usage suggested in legend docstring
      • -
      • #1446: Fix clipping in PDF backend
      • -
      • #1397: PEP8 fixes on sankey.py
      • -
      • #1396: PEP8 fixes on colors
      • -
      • #1394: PEP8 fixes on _cm.py
      • -
      • #1456: pgf: documentation fixes
      • -
      • #1450: Colorbar edges are different in PDF backend
      • -
      • #1452: John Hunter’s email address is still listed in matplotlib module docstring.
      • -
      • #1453: Remove John Hunter’s email from mpl docstring
      • -
      • #1437: agg_buffer_to_array.py crashes
      • -
      • #1447: yerr argument of bar doesn’t work
      • -
      • #1445: JRE - Modified ‘use’ so that it will only warn if the requested backend ...
      • -
      • #1439: Remove all mention of make.osx in README.osx
      • -
      • #108: Unbundle pycxx
      • -
      • #1434: C++11 narrowing conversions
      • -
      • #1449: removed setup.py print statement.
      • -
      • #1443: Regression in IPython notebook
      • -
      • #1420: Join bbox_extra_artists and bbox_inches
      • -
      • #1444: Colorbar edges are different in PDF backend
      • -
      • #1440: Fix incorrect conversion in PEP8 fixes.
      • -
      • #1438: plt.text clips the figure when using bbox_inches=’tight’
      • -
      • #1435: README.osx still mentions make.osx
      • -
      • #1433: Alternative to #1404. Sets the cursor without refering to a FigureManage...
      • -
      • #1436: Exception message improvement.
      • -
      • #1326: bugfix: creating patches with transform=None
      • -
      • #1431: Fixed transform=None behaviour on Artists.
      • -
      • #1421: Add table to default_bbox_extra_artists
      • -
      • #1430: Add trove classifiers to setup.py
      • -
      • #1424: pcolor fails if edgecolors is not a string
      • -
      • #1427: Fix AttrituteError for .lower on tuple of strings
      • -
      • #1425: Rebase of #1418 on v1.2.x
      • -
      • #1418: Tables: Fix get_window_extent for table
      • -
      • #1411: Fix transparent markers in PDF backend. Closes #1410
      • -
      • #1410: Open markers incorrect in PDF output
      • -
      • #1416: backend_pdf: optional rgbFace arg in fillp replaces code in draw_markers. Closes #1410
      • -
      • #1393: PEP8 fixes on axes.py
      • -
      • #682: Manipulation of legend parameters from the navigation toolbar
      • -
      • #676: Error in documentation of matplotlib.pyplot.ticklabel_format
      • -
      • #1414: Fix scilimits docstring in ticklabel_format
      • -
      • #1314: Range bug fix for pcolor and pcolormesh
      • -
      • #1323: Work around a huge memory leak in PySide on Python 3
      • -
      • #362: QA on documentation and gallery
      • -
      • #330: Matlab fplot
      • -
      • #304: scale plot (including labels) to bounding box
      • -
      • #239: title does is not displayed correctly, if there is linefeeds
      • -
      • #235: hatch linewidth patch
      • -
      • #229: collections.PolyCollection set_verts speed-up
      • -
      • #1385: replace bbox_all() with Bbox.union()
      • -
      • #1409: Make table.py use BBox.union over bbox_all
      • -
      • #1354: setupegg.py develop is broken
      • -
      • #1387: Make setupegg symlink correct dateutil library
      • -
      • #1404: PySide segfaults immediately on Linux
      • -
      • #1402: annotate problem when drawing arrows with segments out of axis
      • -
      • #1361: Make make.py build docs under python 3
      • -
      • #1370: Bug in #847 (stacked histograms)
      • -
      • #1372: Fix bug when stacking histograms with non-integer weights
      • -
      • #1406: Fix bug when stacking histograms with non-integer weights (v1.2.x branch)
      • -
      • #1403: Improve “Report a problem” to “Getting help”
      • -
      • #1373: svgwriter not assigned in FigureCanvasSVG.print_svg for StringIO filename
      • -
      • #1156: Add a convenience method to rotate a patch
      • -
      • #1380: Fix svg writer for StringIO objects
      • -
      • #1388: Deprecate original NavigationToolbar
      • -
      • #1306: matplotlib breaks programs with arguments that start with –verbose-
      • -
      • #1344: DOC: provide convenience url for seachling MLs + mentioned github issues
      • -
      • #1389: Remove unused autolayout_validator() from rcsetup
      • -
      • #1390: Fix bad commandline handling
      • -
      • #1229: NF - option to make colorbar extensions rectangles
      • -
      • #1375: PEP8 fixes on textpath.py
      • -
      • #1392: Fix by Yannick Copin for hist autoscaling bug; closes issue #841
      • -
      • #1331: Fix for issue #841
      • -
      • #1343: Date axis formatter problem
      • -
      • #1376: PEP8 fixes on table.py
      • -
      • #1384: PEP8 fixes on hatch.py
      • -
      • #1364: FIXME comment in transforms.py
      • -
      • #1382: PEP8 fixes on container.py
      • -
      • #1378: PEP8 fixes on stackplot.py
      • -
      • #1358: PEP8 fixes on ticker.py
      • -
      • #1377: PEP8 fixes on streamplot.py
      • -
      • #1352: PEP8 fixes on legend.py
      • -
      • #1348: PEP8 fixes on scale.py
      • -
      • #1367: Fix typo in transforms.py
      • -
      • #1345: PEP8 fixes on backend_bases.py
      • -
      • #1365: FIX - travis-ci is failing
      • -
      • #1351: PEP8 fixes on transforms.py
      • -
      • #1349: PEP8 fixes on type1font.py
      • -
      • #1360: PEP8 fixes on tight_layout.py
      • -
      • #1359: PEP8 fixes on tight_bbox.py
      • -
      • #1362: fixed lognorm clip behavior
      • -
      • #1346: Add proxy artist to Axes.fill_between[x] for label support (Issue #1341)
      • -
      • #1350: PEP8 fixes on units.py
      • -
      • #1353: docstring: direct pcolor users to pcolormesh; fix pcolorfast docstring
      • -
      • #1333: PEP8 fixes on collections.py
      • -
      • #1336: PEP8 fixes to colorbar.py
      • -
      • #1347: Remove nonfunctioning cbook.isvector
      • -
      • #1327: plt.subplots: Set the visibility of the offset text to false on the shared axes.
      • -
      • #1335: PEP8 fixes on cbook.py
      • -
      • #1334: PEP8 fixes on blocking_input.py
      • -
      • #1332: PEP8 fixes on cm.py
      • -
      • #751: Building on osx with python 3.2
      • -
      • #1322: Update Mac build process. Fixes #751
      • -
      • #1161: Test fails in lib/matplotlib/tests/test_figure.py fails
      • -
      • #1337: ENH: allow animations to be saved as animated GIFs
      • -
      • #1340: fix drawing error of fancyarrow of simple style (v1.2.x)
      • -
      • #1339: pgf backend producing invisible dot
      • -
      • #1129: fix drawing error of fancyarrow of simple style
      • -
      • #1338: Travis: suppress logs for installing numpy, nose
      • -
      • #1330: Tiny (but serious) bugfixes in image.py
      • -
      • #1328: Tiny bugfixes in image.py
      • -
      • #825: make.osx with Xcode 4.3
      • -
      • #1298: Update trisurf to support custom triangulations
      • -
      • #1286: backend_pgf: improve handling of temporary directories
      • -
      • #1281: backend_pgf does not delete temp directories on Windows, changes the current directory
      • -
      • #113: dpi= doesn’t seem to have any effect with MacOS X backend
      • -
      • #1316: very high negative zorder breaks vector graphic rendering
      • -
      • #1283: Fix tripcolor with shading=’faceted’
      • -
      • #156: Multicursor not displayed with zoom on
      • -
      • #1320: Cursor widget now uses widgetlock; closes Issue #156
      • -
      • #1321: pgf backend. Y-labels in subplot are not alligned after baseline but bottom of letter
      • -
      • #1301: Colorbar Add kw arguement to colorbar to reenable edges around faces
      • -
      • #1315: Add documentation of colorbar issue #1188 to colorbar documentation.
      • -
      • #1303: twinx/twiny misses settings axes
      • -
      • #1307: Marker not round with markersize=3
      • -
      • #396: Plotting with negative x values on semilogx
      • -
      • #661: remove deprecation notice in hist()
      • -
      • #1285: Hide Tk root window until later
      • -
      • #1304: 1.0rc2 fails to build on MacOS X 10.4
      • -
      • #1305: Fix pointer syntax error
      • -
      • #1294: Update lib/mpl_toolkits/mplot3d/axes3d.py
      • -
      • #159: Autoscale in hist() with step and log
      • -
      • #167: windows x64 support in _tkagg.so
      • -
      • #1300: Pcolormesh and colorbar documentation.
      • -
      • #1178: Make colorbar draw edge with facecolor around the faces.
      • -
      • #1205: New ‘gridon’ keyword in plotfile
      • -
      • #1295: Exception when using Container.remove
      • -
      • #1296: Make Container._remove_method call correctly
      • -
      • #1293: Fixed to contour to support the _as_mpl_transform api.
      • -
      • #1292: bar3d surfaces not hidden properly
      • -
      • #1288: Mplot3d/autoscale fix
      • -
      • #690: mplot3d: Interface is inconsistent between contour and surface_plot
      • -
      • #750: axes.cla() in mplot3d - grid lines don’t fall back.
      • -
      • #749: set_xlim in 3D scatter plots?
      • -
      • #761: mplot3d, addition to losing color on movement of canvas.
      • -
      • #802: ax.get_zticks() amd ax.get_zticklabels not working
      • -
      • #1284: Fix Image Tutorial: plt.imshow instead of mpimg.imshow.
      • -
      • #1282: Use file open modes required by csv module
      • -
      • #822: rc lines.color doesn’t have any effect on plot()
      • -
      • #871: grid.alpha in matplotlibrc
      • -
      • #1280: cannot import name rcParams
      • -
      • #1089: savefig to sys.stdout fails with pdf backend
      • -
      • #1248: Travis results failing
      • -
      • #1279: No figure.add_line (or _patch, etc.)
      • -
      • #319: TikZ/PGF backend
      • -
      • #1270: Cannot build 1.2.0rc1 for 32-bit Mac python
      • -
      • #1249: transAxes isn’t working properly with scale=’log’
      • -
      • #1246: axvline fails with log scaling
      • -
      • #1247: Log axvline
      • -
      • #1258: Regression: dtype problem with BoundaryNorm
      • -
      • #1265: Fixed pre-transform limit calculation bug for contour sets.
      • -
      • #1275: backend_pgf: Custom dashstyles and inconcistency with other backends
      • -
      • #1272: Fix Objective-C 2.0 error with gcc-4.0
      • -
      • #1277: Fixed bug in MaxNLocator.bin_boundaries
      • -
      • #1263: Failing test: `python tests.py matplotlib.tests.test_axes:test_single_date`
      • -
      • #1273: Handled baseline image folder identification for non matplotlib projects...
      • -
      • #1230: Fix dpi issue for bitmaps on the OS X backend
      • -
      • #1274: backend_pgf: Custom dashstyles and consistency with other backends
      • -
      • #1251: backend_pgf. Enable custom dashstyles in the pgf backend
      • -
      • #1264: Re-added the matplotlib.dates import on axes
      • -
      • #1271: Set axis limits in test_stackplot
      • -
      • #1269: Fix typo in docstring
      • -
      • #1267: Doc typo
      • -
      • #1268: Doc typo v1.2
      • -
      • #1260: Fix BoundaryNorm interpolation with numpy 1.7rc.
      • -
      • #1261: Update six.py to version 1.2
      • -
      • #1255: Fix test_pickle test.
      • -
      • #1253: Scatter in Axes3d loses colors
      • -
      • #1152: checkable pan/zoom buttons for QT NavigationToolbar
      • -
      • #1243: Broken doc links
      • -
      • #1244: PGF: Text alignment is off, especially with custom fonts
      • -
      • #1147: Set artist colors in one fell swoop
      • -
      • #1242: Doc tidy up.
      • -
      • #1224: Imsave alpha
      • -
      • #1241: backend_pgf: fix parsing of CR+LF newlines
      • -
      • #1233: Fix mri_demo.py fails with mpl 1.2.0rc1
      • -
      • #1238: matplotlib.testing.util.MiniExpect.expect hangs on Windows
      • -
      • #1239: Fix matplotlib.testing.util.MiniExpect.expect hangs on Windows
      • -
      • #1237: Fix ValueError: could not convert string to float on Windows/MikTeX
      • -
      • #1240: backend_pgf: fix parsing of CR+LF newlines
      • -
      • #1236: Fix poly_editor.py on Python 3
      • -
      • #1232: Enable dynamic updating for the OS X backend
      • -
      • #1234: Fix 2to3 and packaging of dateutil
      • -
      • #1070: Use github for downloads
      • -
      • #1207: Add contributor and git stats to documentation
      • -
      • #1217: PEP8 fixes on the axis module
      • -
      • #831: Stacked hist with histtype=’step’ (+ new kwargs for hist)
      • -
      • #1083: doc/mpl_examples/api/date_demo.py doesn’t run
      • -
      • #1176: Reverted a previous change to artist transform setting. Fixes legend bug.
      • -
      • #1231: fix Typesetting in plot() docstring
      • -
      • #1215: PEP8 on lib/matplotlib.afm.py
      • -
      • #1216: PEP8 fixes on the animation module
      • -
      • #1208: FAIL: matplotlib.tests.test_text.test_contains.test
      • -
      • #786: savefig() renders paths and text differently than show()
      • -
      • #1209: Pass linewidth to Mac context properly
      • -
      • #847: Add stacked kwarg to hist and implement stacked hists for step histtype
      • -
      • #1228: backend_pgf: pep8 edits
      • -
      • #1226: Add dpi kwarg to PIL image.save method for TIFF file.
      • -
      • #1211: PDF renderer draws strange artifacts on ‘%’ character in 1.1.1
      • -
      • #1222: Don’t try to order the contours of TrueType fonts
      • -
      • #1166: PEP8 compliance on colors.py
      • -
      • #820: Use new sphinx method to load searchindex.js
      • -
      • #1225: Added deprecation notices for Qt3-based backends.
      • -
      • #1190: Update documentation regarding lines.color
      • -
      • #1212: Two TKagg widows popping up - should be one
      • -
      • #1055: Runtime error in grid_spec.tight_layout()
      • -
      • #1202: refactored grid_spec.tight_layout and fixed #1055
      • -
      • #1214: Prevent error when backend has no FigureCanvas
      • -
      • #1218: backend wx and wxagg broken by #1125
      • -
      • #1221: revert PR #1125 and #1201
      • -
      • #1219: Show fails on figures created with the object-oriented system
      • -
      • #1220: Figure.show: clarify docstring and error message
      • -
      • #1167: PEP8 lib/matplotlib/patches.py
      • -
      • #1096: Documentation bug: pyplot.arrow does not list enough keywords to successfully draw an arrow
      • -
      • #1168: PEP8 compliance on artist.py
      • -
      • #1213: Include username in tempdir
      • -
      • #1182: Bezier pep8
      • -
      • #1177: Handled baseline image folder identification for non matplotlib projects.
      • -
      • #1091: Update README.txt for v1.2
      • -
      • #1206: README and links fixes
      • -
      • #1192: Issue835 2: replacement for #835
      • -
      • #1187: Add a simple arrow example
      • -
      • #1120: FAIL: matplotlib.tests.test_transforms.test_pre_transform_plotting.test on Python 3.x
      • -
      • #835: add documentation for figure show method in backend_bases and backend_template
      • -
      • #714: Initial rework of gen_gallery.py
      • -
      • #1150: the affine matrix is calculated in the display coordinate for interpolation=’none’
      • -
      • #1087: Update whats new section
      • -
      • #385: BUG: plot_directive: look for plot script files relative to the .rst file
      • -
      • #1110: twiny overrides formatter and adds another x-axis
      • -
      • #1145: Fix formatter reset when twin{x,y}() is called
      • -
      • #547: undocumented scatter marker definition change
      • -
      • #1201: Fix typo in object-oriented API
      • -
      • #1061: Add log option to Axes.hist2d
      • -
      • #1125: Reduce object-oriented boilerplate for users
      • -
      • #1085: Images shifted relative to other plot feature in vector graphic output formats
      • -
      • #1195: Fixed pickle tests to use the BufferIO object for python3 support.
      • -
      • #1198: Fixed python2.6 support (by removing use of viewvalues on a dict).
      • -
      • #1194: Streamplot result python version dependent
      • -
      • #1197: Handled future division changes for python3 (fixes #1194).
      • -
      • #557: Crash during date axis setup
      • -
      • #600: errorbar(): kwarg ‘markevery’ not working as expected.
      • -
      • #174: Memory leak in example simple_idle_wx.py
      • -
      • #232: format in plot_directive sphinx>=1.0.6 compatible patch
      • -
      • #1162: FIX nose.tools.assert_is is only supported with python2.7
      • -
      • #1165: tight_layout fails on twinx, twiny
      • -
      • #803: Return arrow collection as 2nd argument of streamplot.
      • -
      • #1189: BUG: Fix streamplot when velocity component is exactly zero.
      • -
      • #1191: Small bugfixes to the new pickle support.
      • -
      • #323: native format for figures
      • -
      • #1146: Fix invalid transformation in InvertedSymmetricalLogTransform.
      • -
      • #1169: Subplot.twin[xy] returns a Subplot instance
      • -
      • #1183: FIX undefined elements were used at several places in the mlab module
      • -
      • #498: get_sample_data still broken on v.1.1.x
      • -
      • #1170: Uses tight_layout.get_subplotspec_list to check if all axes are compatible w/ tight_layout
      • -
      • #1173: The PGF backend only works on python2.7 and +
      • -
      • #1174: closes #1173 - backporting python2.7 subprocess’s check_output to be abl...
      • -
      • #1175: Pickling support added. Various whitespace fixes as a result of reading lots of code.
      • -
      • #1179: Attempt at making travis output shorter.
      • -
      • #1020: Picklable figures
      • -
      • #1098: suppress exception upon quitting with qt4agg on osx
      • -
      • #1171: backend_pgf: handle OSError when testing for xelatex/pdflatex
      • -
      • #1164: doc: note contourf hatching in whats_new.rst
      • -
      • #606: Unable to configure grid using axisartist
      • -
      • #1153: PEP8 on artist
      • -
      • #1163: tight_layout: fix regression for figures with non SubplotBase Axes
      • -
      • #1117: ERROR: matplotlib.tests.test_axes.test_contour_colorbar.test fails on Python 3
      • -
      • #1159: FIX assert_raises cannot be called with ``with\
      • -
      • #206: hist normed=True problem?
      • -
      • #1160: backend_pgf: clarifications and fixes in documentation
      • -
      • #1154: six inclusion for dateutil on py3 doesn’t work
      • -
      • #320: hist plot in percent
      • -
      • #1149: Add Phil Elson’s percentage histogram example
      • -
      • #1158: FIX - typo in lib/matplotlib/testing/compare.py
      • -
      • #1135: Problems with bbox_inches=’tight’
      • -
      • #1155: workaround for fixed dpi assumption in adjust_bbox_pdf
      • -
      • #1142: What’s New: Python 3 paragraph
      • -
      • #1138: tight_bbox made assumptions about the display-units without checking the figure
      • -
      • #1130: Fix writing pdf on stdout
      • -
      • #832: MPLCONFIGDIR tries to be created in read-only home
      • -
      • #1140: BUG: Fix fill_between when NaN values are present
      • -
      • #1144: Added tripcolor whats_new section.
      • -
      • #1010: Port part of errorfill from Tony Yu’s mpltools.
      • -
      • #1141: backend_pgf: fix parentheses typo
      • -
      • #1114: Make grid accept alpha rcParam
      • -
      • #1118: ERROR: matplotlib.tests.test_backend_pgf.test_pdflatex on Python 3.x
      • -
      • #1116: ERROR: matplotlib.tests.test_backend_pgf.test_xelatex
      • -
      • #1124: PGF backend, fix #1116, #1118 and #1128
      • -
      • #745: Cannot run tests with Python 3.x on MacOS 10.7
      • -
      • #983: Issues with dateutil and pytz
      • -
      • #1137: PGF/Tikz: savefig could not handle a filename
      • -
      • #1128: PGF back-end fails on simple graph
      • -
      • #1133: figure.py: import warnings, and make imports absolute
      • -
      • #1123: Rationalize the number of ancillary (default matplotlibrc) files
      • -
      • #1132: clean out obsolete matplotlibrc-related bits to close #1123
      • -
      • #1131: Cleanup after the gca test.
      • -
      • #563: sankey.add() has mutable defaults
      • -
      • #238: patch for qt4 backend
      • -
      • #731: Plot limit with transform
      • -
      • #1107: Added %s support for labels.
      • -
      • #720: Bug with bbox_inches=’tight’
      • -
      • #1084: doc/mpl_examples/pylab_examples/transoffset.py not working as expected
      • -
      • #774: Allow automatic use of tight_layout.
      • -
      • #1122: DOC: Add streamplot description to What’s New page
      • -
      • #1111: Fixed transoffset example from failing.
      • -
      • #840: Documentation Errors for specgram
      • -
      • #1088: For a text artist, if it has a _bbox_patch associated with it, the contains test should reflect this.
      • -
      • #1119: ERROR: matplotlib.tests.test_image.test_imread_pil_uint16 on Python 3.x
      • -
      • #353: Improved output of text in SVG and PDF
      • -
      • #291: size information from print_figure
      • -
      • #986: Add texinfo build target in doc/make.py
      • -
      • #1076: PGF backend for XeLaTeX/LuaLaTeX support
      • -
      • #1090: External transform api
      • -
      • #1108: Fix documentation warnings
      • -
      • #811: Allow tripcolor to directly plot triangle-centered functions
      • -
      • #1005: imshow with big-endian data types on OS X
      • -
      • #892: Update animation.py docstrings to “raw” Sphinx format
      • -
      • #861: Add rcfile function (which loads rc params from a given file).
      • -
      • #988: Trim white spaces while saving from Navigation toolbar
      • -
      • #670: Add a printer button to the navigation toolbar
      • -
      • #1062: increased the padding on FileMovieWritter.frame_format_str
      • -
      • #188: MacOSX backend brings up GUI unnecessarily
      • -
      • #1041: make.osx SDK location needs updating
      • -
      • #1043: Fix show command for Qt backend to raise window to top
      • -
      • #1046: test failing on master
      • -
      • #962: Bug with figure.savefig(): using AGG, PIL, JPG and StringIO
      • -
      • #1045: 1.1.1 not in pypi
      • -
      • #1100: Doc multi version master
      • -
      • #1106: Published docs for v1.1.1 missing pyplot.polar
      • -
      • #569: 3D bar graphs with variable depth
      • -
      • #359: new plot style: stackplot
      • -
      • #297: pip/easy_install installs old version of matplotlib
      • -
      • #152: Scatter3D: arguments (c,s,...) are not taken into account
      • -
      • #1105: Fixed comma between tests.
      • -
      • #1095: Colormap byteorder bug
      • -
      • #1102: examples/pylab_examples/contour_demo.py fails
      • -
      • #1103: colorbar: correct error introduced in commit 089024; closes #1102
      • -
      • #1067: Support multi-version documentation on the website
      • -
      • #1031: Added ‘capthick’ kwarg to errorbar()
      • -
      • #1074: Added broadcasting support in some mplot3d methods
      • -
      • #1032: Axesbase
      • -
      • #1064: Locator interface
      • -
      • #850: Added tripcolor triangle-centred colour values.
      • -
      • #1059: Matplotlib figure window freezes during interactive mode
      • -
      • #215: skipping mpl-axes-interaction during key_press_event’s
      • -
      • #1093: Exposed the callback id for the default key press handler so that it can be easily disabled. Fixes #215.
      • -
      • #909: Log Formatter for tick labels can’t handle non-integer base
      • -
      • #1065: fixed conversion from pt to inch in tight_layout
      • -
      • #1086: Problem with subplot / matplotlib.dates interaction
      • -
      • #782: mplot3d: grid doesn’t update after adding a slider to figure?
      • -
      • #703: pcolormesh help not helpful
      • -
      • #1082: doc: in pcolormesh docstring, say what it does.
      • -
      • #1068: Add stairstep plotting functionality
      • -
      • #1078: doc: note that IDLE doesn’t work with interactive mode.
      • -
      • #704: ignore case in edgecolors keyword in pcolormesh (and possibly other places)
      • -
      • #708: set_clim not working with NonUniformImage
      • -
      • #768: Add “tight_layout” button to toolbar
      • -
      • #791: v1.1.1 release candidate testing
      • -
      • #844: imsave/imshow and cmaps
      • -
      • #939: test failure: matplotlib.tests.test_mathtext.mathfont_stix_14_test.test
      • -
      • #875: Replace “jet” with “hot” as the default colormap
      • -
      • #881: “Qualitative” colormaps represented as continuous
      • -
      • #1072: For a text artist, if it has a _bbox_patch associated with it, the conta...
      • -
      • #1071: patches.polygon: fix bug in handling of path closing, #1018.
      • -
      • #1018: BUG: check for closed path in Polygon.set_xy()
      • -
      • #1066: fix limit calculation of step* histogram
      • -
      • #1073: Mplot3d/input broadcast
      • -
      • #906: User-specified medians and conf. intervals in boxplots
      • -
      • #899: Update for building matplotlib under Mac OS X 10.7 Lion and XCode > 4.2
      • -
      • #1057: Contour norm scaling
      • -
      • #1035: Added a GTK3 implementation of the SubplotTool window.
      • -
      • #807: Crash when using zoom tools on a plot: AutoMinorLocator after MultipleLocator gives “ValueError: Need at least two major ticks to find minor tick locations”
      • -
      • #1023: New button to toolbar for tight_layout.
      • -
      • #1056: Test framework cleanups
      • -
      • #778: Make tests faster
      • -
      • #1048: some matplotlib examples incompatible with wxpython 2.9
      • -
      • #1024: broken links in the gallery
      • -
      • #1054: stix_fonts_demo.py fails with bad refcount
      • -
      • #960: Fixed logformatting for non integer bases.
      • -
      • #897: GUI icon in Tkinter
      • -
      • #1053: Move Python 3 import of reload() to the module that uses it
      • -
      • #1049: Update examples/user_interfaces/embedding_in_wx2.py
      • -
      • #1050: Update examples/user_interfaces/embedding_in_wx4.py
      • -
      • #1051: Update examples/user_interfaces/mathtext_wx.py
      • -
      • #1052: Update examples/user_interfaces/wxcursor_demo.py
      • -
      • #1047: Enable building on Python 3.3 for Windows
      • -
      • #819: Add new plot style: stackplot
      • -
      • #1036: Move all figures to the front with a non-interactive show() in macosx backend.
      • -
      • #1042: Three more plot_directive configuration options
      • -
      • #1044: plots not being displayed in OSX 10.8
      • -
      • #1022: contour: map extended ranges to “under” and “over” values
      • -
      • #1007: modifying GTK3 example to use pygobject, and adding a simple example to demonstrate NavigationToolbar in GTK3
      • -
      • #1004: Added savefig.bbox option to matplotlibrc
      • -
      • #976: Fix embedding_in_qt4_wtoolbar.py on Python 3
      • -
      • #1013: compilation warnings in _macosx.m
      • -
      • #1034: MdH = allow compilation on recent Mac OS X without compiler warnings
      • -
      • #964: Animation clear_temp=False reuses old frames
      • -
      • #1028: Fix use() so that it is possible to reset the rcParam.
      • -
      • #1033: Py3k: reload->imp.reload
      • -
      • #1002: Fixed potential overflow exception in the lines.contains() method
      • -
      • #1025: Timers
      • -
      • #989: Animation subprocess bug
      • -
      • #898: Added warnings for easily confusable subplot/subplots invocations
      • -
      • #963: Add detection of file extension for file-like objects
      • -
      • #973: Fix sankey.py pep8 and py3 compatibility
      • -
      • #972: Force closing PIL image files
      • -
      • #981: Fix pathpatch3d_demo.py on Python 3
      • -
      • #980: Fix basic_units.py on Python 3. PEP8 and PyLint cleanup.
      • -
      • #996: macosx backend broken by #901: QuadMesh fails so colorbar fails
      • -
      • #1017: axes.Axes.step() function not documented
      • -
      • #1014: qt4: remove duplicate file save button; and remove trailing whitespace
      • -
      • #655: implement path_effects for Line2D objects
      • -
      • #999: pcolormesh edgecolor of “None”
      • -
      • #1011: fix for bug #996 and related issues
      • -
      • #1009: Simplify import statement
      • -
      • #982: Supported FreeBSD10 as per #225
      • -
      • #225: Add support for FreeBSD >6.x
      • -
      • #985: support current and future FreeBSD releases
      • -
      • #1006: MacOSX backend throws exception when plotting a quadmesh
      • -
      • #1000: Fix traceback for vlines/hlines, when an empty list or array passed in for x/y.
      • -
      • #1001: Bug fix for issue #955
      • -
      • #994: Fix bug in pcolorfast introduced by #901
      • -
      • #993: Fix typo
      • -
      • #908: use Qt window title as default savefig filename
      • -
      • #830: standard key for closing figure (“q”)
      • -
      • #971: Close fd temp file following rec2csv_bad_shape test
      • -
      • #851: Simple GUI interface enhancements
      • -
      • #979: Fix test_mouseclicks.py on Python 3
      • -
      • #977: Fix lasso_selector_demo.py on Python 3
      • -
      • #970: Fix tiff and jpeg export via PIL
      • -
      • #707: key_press_event in pyqt4 embedded matplotlib
      • -
      • #243: Debug version/symbols for win32
      • -
      • #255: Classes in _transforms.h in global namespace
      • -
      • #961: Issue 807 auto minor locator
      • -
      • #345: string symbol markers (“scattertext” plot)
      • -
      • #247: DLL load failed
      • -
      • #808: pip install matplotlib fails
      • -
      • #168: setupext.py incorrect for Mac OS X
      • -
      • #213: Fixing library path in setupext.py for Mac
      • -
      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/users/gridspec.html b/dev/users/gridspec.html deleted file mode 100644 index 636b46cea66..00000000000 --- a/dev/users/gridspec.html +++ /dev/null @@ -1,334 +0,0 @@ - - - - - - - - Customizing Location of Subplot Using GridSpec — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      Table Of Contents

      - - -

      Previous topic

      -

      Artist tutorial

      -

      Next topic

      -

      Tight Layout guide

      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      Customizing Location of Subplot Using GridSpec

      -
      -
      -
      GridSpec
      -
      specifies the geometry of the grid that a subplot will be -placed. The number of rows and number of columns of the grid -need to be set. Optionally, the subplot layout parameters -(e.g., left, right, etc.) can be tuned.
      -
      SubplotSpec
      -
      specifies the location of the subplot in the given GridSpec.
      -
      subplot2grid
      -
      a helper function that is similar to “pyplot.subplot” but uses -0-based indexing and let subplot to occupy multiple cells.
      -
      -
      -
      -

      Basic Example of using subplot2grid

      -

      To use subplot2grid, you provide geometry of the grid and the location -of the subplot in the grid. For a simple single-cell subplot:

      -
      ax = plt.subplot2grid((2,2),(0, 0))
      -
      -
      -

      is identical to

      -
      ax = plt.subplot(2,2,1)
      -
      -
      -

      Note that, unlike matplotlib’s subplot, the index starts from 0 in gridspec.

      -

      To create a subplot that spans multiple cells,

      -
      ax2 = plt.subplot2grid((3,3), (1, 0), colspan=2)
      -ax3 = plt.subplot2grid((3,3), (1, 2), rowspan=2)
      -
      -
      -

      For example, the following commands

      -
      ax1 = plt.subplot2grid((3,3), (0,0), colspan=3)
      -ax2 = plt.subplot2grid((3,3), (1,0), colspan=2)
      -ax3 = plt.subplot2grid((3,3), (1, 2), rowspan=2)
      -ax4 = plt.subplot2grid((3,3), (2, 0))
      -ax5 = plt.subplot2grid((3,3), (2, 1))
      -
      -
      -

      creates

      -

      (Source code, png, hires.png, pdf)

      -
      -../_images/demo_gridspec01.png -
      -
      -
      -

      GridSpec and SubplotSpec

      -

      You can create GridSpec explicitly and use them to create a Subplot.

      -

      For example,

      -
      ax = plt.subplot2grid((2,2),(0, 0))
      -
      -
      -

      is equal to

      -
      import matplotlib.gridspec as gridspec
      -gs = gridspec.GridSpec(2, 2)
      -ax = plt.subplot(gs[0, 0])
      -
      -
      -

      A gridspec instance provides array-like (2d or 1d) indexing that -returns the SubplotSpec instance. For, SubplotSpec that spans multiple -cells, use slice.

      -
      ax2 = plt.subplot(gs[1,:-1])
      -ax3 = plt.subplot(gs[1:, -1])
      -
      -
      -

      The above example becomes

      -
      gs = gridspec.GridSpec(3, 3)
      -ax1 = plt.subplot(gs[0, :])
      -ax2 = plt.subplot(gs[1,:-1])
      -ax3 = plt.subplot(gs[1:, -1])
      -ax4 = plt.subplot(gs[-1,0])
      -ax5 = plt.subplot(gs[-1,-2])
      -
      -
      -

      (Source code, png, hires.png, pdf)

      -
      -../_images/demo_gridspec02.png -
      -
      -
      -

      Adjust GridSpec layout

      -

      When a GridSpec is explicitly used, you can adjust the layout -parameters of subplots that are created from the gridspec.

      -
      gs1 = gridspec.GridSpec(3, 3)
      -gs1.update(left=0.05, right=0.48, wspace=0.05)
      -
      -
      -

      This is similar to subplots_adjust, but it only affects the subplots -that are created from the given GridSpec.

      -

      The code below

      -
      gs1 = gridspec.GridSpec(3, 3)
      -gs1.update(left=0.05, right=0.48, wspace=0.05)
      -ax1 = plt.subplot(gs1[:-1, :])
      -ax2 = plt.subplot(gs1[-1, :-1])
      -ax3 = plt.subplot(gs1[-1, -1])
      -
      -gs2 = gridspec.GridSpec(3, 3)
      -gs2.update(left=0.55, right=0.98, hspace=0.05)
      -ax4 = plt.subplot(gs2[:, :-1])
      -ax5 = plt.subplot(gs2[:-1, -1])
      -ax6 = plt.subplot(gs2[-1, -1])
      -
      -
      -

      creates

      -

      (Source code, png, hires.png, pdf)

      -
      -../_images/demo_gridspec03.png -
      -
      -
      -

      GridSpec using SubplotSpec

      -

      You can create GridSpec from the SubplotSpec, in which case its layout -parameters are set to that of the location of the given SubplotSpec.

      -
      gs0 = gridspec.GridSpec(1, 2)
      -
      -gs00 = gridspec.GridSpecFromSubplotSpec(3, 3, subplot_spec=gs0[0])
      -gs01 = gridspec.GridSpecFromSubplotSpec(3, 3, subplot_spec=gs0[1])
      -
      -
      -

      (Source code, png, hires.png, pdf)

      -
      -../_images/demo_gridspec04.png -
      -
      -
      -

      A Complex Nested GridSpec using SubplotSpec

      -

      Here’s a more sophisticated example of nested gridspec where we put -a box around each cell of the outer 4x4 grid, by hiding appropriate -spines in each of the inner 3x3 grids.

      -

      (Source code, png, hires.png, pdf)

      -
      -../_images/demo_gridspec06.png -
      -
      -
      -

      GridSpec with Varying Cell Sizes

      -

      By default, GridSpec creates cells of equal sizes. You can adjust -relative heights and widths of rows and columns. Note that absolute -values are meaningless, only their relative ratios matter.

      -
      gs = gridspec.GridSpec(2, 2,
      -                       width_ratios=[1,2],
      -                       height_ratios=[4,1]
      -                       )
      -
      -ax1 = plt.subplot(gs[0])
      -ax2 = plt.subplot(gs[1])
      -ax3 = plt.subplot(gs[2])
      -ax4 = plt.subplot(gs[3])
      -
      -
      -

      (Source code, png, hires.png, pdf)

      -
      -../_images/demo_gridspec05.png -
      -
      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/users/image_tutorial-1.hires.png b/dev/users/image_tutorial-1.hires.png deleted file mode 100644 index 059fa45f80b..00000000000 Binary files a/dev/users/image_tutorial-1.hires.png and /dev/null differ diff --git a/dev/users/image_tutorial-1.pdf b/dev/users/image_tutorial-1.pdf deleted file mode 100644 index 8452da739cc..00000000000 Binary files a/dev/users/image_tutorial-1.pdf and /dev/null differ diff --git a/dev/users/image_tutorial-1.png b/dev/users/image_tutorial-1.png deleted file mode 100644 index 66f813867f5..00000000000 Binary files a/dev/users/image_tutorial-1.png and /dev/null differ diff --git a/dev/users/image_tutorial-1.py b/dev/users/image_tutorial-1.py deleted file mode 100644 index 920b16641e0..00000000000 --- a/dev/users/image_tutorial-1.py +++ /dev/null @@ -1,5 +0,0 @@ -import matplotlib.pyplot as plt -import matplotlib.image as mpimg -import numpy as np -img = mpimg.imread('../_static/stinkbug.png') -imgplot = plt.imshow(img) \ No newline at end of file diff --git a/dev/users/image_tutorial-10.hires.png b/dev/users/image_tutorial-10.hires.png deleted file mode 100644 index 7a88f5a8339..00000000000 Binary files a/dev/users/image_tutorial-10.hires.png and /dev/null differ diff --git a/dev/users/image_tutorial-10.pdf b/dev/users/image_tutorial-10.pdf deleted file mode 100644 index 26dec6ea1e7..00000000000 Binary files a/dev/users/image_tutorial-10.pdf and /dev/null differ diff --git a/dev/users/image_tutorial-10.png b/dev/users/image_tutorial-10.png deleted file mode 100644 index 9f4ed51232f..00000000000 Binary files a/dev/users/image_tutorial-10.png and /dev/null differ diff --git a/dev/users/image_tutorial-10.py b/dev/users/image_tutorial-10.py deleted file mode 100644 index 952bc5a77a8..00000000000 --- a/dev/users/image_tutorial-10.py +++ /dev/null @@ -1,10 +0,0 @@ -import matplotlib.pyplot as plt -import matplotlib.image as mpimg -import numpy as np -import Image -img = Image.open('../_static/stinkbug.png') # opens the file using PIL - it's not an array yet -rsize = img.resize((img.size[0]/10,img.size[1]/10)) # resize the image -rsizeArr = np.asarray(rsize) -lum_img = rsizeArr[:,:,0] -imgplot = plt.imshow(rsizeArr) -imgplot.set_interpolation('bicubic') \ No newline at end of file diff --git a/dev/users/image_tutorial-2.hires.png b/dev/users/image_tutorial-2.hires.png deleted file mode 100644 index d3966b17381..00000000000 Binary files a/dev/users/image_tutorial-2.hires.png and /dev/null differ diff --git a/dev/users/image_tutorial-2.pdf b/dev/users/image_tutorial-2.pdf deleted file mode 100644 index 23749da154a..00000000000 Binary files a/dev/users/image_tutorial-2.pdf and /dev/null differ diff --git a/dev/users/image_tutorial-2.png b/dev/users/image_tutorial-2.png deleted file mode 100644 index 032f37b2841..00000000000 Binary files a/dev/users/image_tutorial-2.png and /dev/null differ diff --git a/dev/users/image_tutorial-2.py b/dev/users/image_tutorial-2.py deleted file mode 100644 index 41b8b8048e5..00000000000 --- a/dev/users/image_tutorial-2.py +++ /dev/null @@ -1,6 +0,0 @@ -import matplotlib.pyplot as plt -import matplotlib.image as mpimg -import numpy as np -img = mpimg.imread('../_static/stinkbug.png') -lum_img = img[:,:,0] -plt.imshow(lum_img) \ No newline at end of file diff --git a/dev/users/image_tutorial-3.hires.png b/dev/users/image_tutorial-3.hires.png deleted file mode 100644 index 128357b2ace..00000000000 Binary files a/dev/users/image_tutorial-3.hires.png and /dev/null differ diff --git a/dev/users/image_tutorial-3.pdf b/dev/users/image_tutorial-3.pdf deleted file mode 100644 index 5300abd8e49..00000000000 Binary files a/dev/users/image_tutorial-3.pdf and /dev/null differ diff --git a/dev/users/image_tutorial-3.png b/dev/users/image_tutorial-3.png deleted file mode 100644 index bd9dc57d611..00000000000 Binary files a/dev/users/image_tutorial-3.png and /dev/null differ diff --git a/dev/users/image_tutorial-3.py b/dev/users/image_tutorial-3.py deleted file mode 100644 index be1c493e2d6..00000000000 --- a/dev/users/image_tutorial-3.py +++ /dev/null @@ -1,7 +0,0 @@ -import matplotlib.pyplot as plt -import matplotlib.image as mpimg -import numpy as np -img = mpimg.imread('../_static/stinkbug.png') -lum_img = img[:,:,0] -imgplot = plt.imshow(lum_img) -imgplot.set_cmap('hot') \ No newline at end of file diff --git a/dev/users/image_tutorial-4.hires.png b/dev/users/image_tutorial-4.hires.png deleted file mode 100644 index d7e2bb3ffae..00000000000 Binary files a/dev/users/image_tutorial-4.hires.png and /dev/null differ diff --git a/dev/users/image_tutorial-4.pdf b/dev/users/image_tutorial-4.pdf deleted file mode 100644 index 5dae2b3b0a9..00000000000 Binary files a/dev/users/image_tutorial-4.pdf and /dev/null differ diff --git a/dev/users/image_tutorial-4.png b/dev/users/image_tutorial-4.png deleted file mode 100644 index 78604f68f71..00000000000 Binary files a/dev/users/image_tutorial-4.png and /dev/null differ diff --git a/dev/users/image_tutorial-4.py b/dev/users/image_tutorial-4.py deleted file mode 100644 index 4b1903e86fc..00000000000 --- a/dev/users/image_tutorial-4.py +++ /dev/null @@ -1,7 +0,0 @@ -import matplotlib.pyplot as plt -import matplotlib.image as mpimg -import numpy as np -img = mpimg.imread('../_static/stinkbug.png') -lum_img = img[:,:,0] -imgplot = plt.imshow(lum_img) -imgplot.set_cmap('spectral') \ No newline at end of file diff --git a/dev/users/image_tutorial-5.hires.png b/dev/users/image_tutorial-5.hires.png deleted file mode 100644 index 67b704bb40d..00000000000 Binary files a/dev/users/image_tutorial-5.hires.png and /dev/null differ diff --git a/dev/users/image_tutorial-5.pdf b/dev/users/image_tutorial-5.pdf deleted file mode 100644 index aa5e258cfa1..00000000000 Binary files a/dev/users/image_tutorial-5.pdf and /dev/null differ diff --git a/dev/users/image_tutorial-5.png b/dev/users/image_tutorial-5.png deleted file mode 100644 index 1cfd9f12aee..00000000000 Binary files a/dev/users/image_tutorial-5.png and /dev/null differ diff --git a/dev/users/image_tutorial-5.py b/dev/users/image_tutorial-5.py deleted file mode 100644 index 1574f7c08ee..00000000000 --- a/dev/users/image_tutorial-5.py +++ /dev/null @@ -1,8 +0,0 @@ -import matplotlib.pyplot as plt -import matplotlib.image as mpimg -import numpy as np -img = mpimg.imread('../_static/stinkbug.png') -lum_img = img[:,:,0] -imgplot = plt.imshow(lum_img) -imgplot.set_cmap('spectral') -plt.colorbar() \ No newline at end of file diff --git a/dev/users/image_tutorial-6.hires.png b/dev/users/image_tutorial-6.hires.png deleted file mode 100644 index 750a931d825..00000000000 Binary files a/dev/users/image_tutorial-6.hires.png and /dev/null differ diff --git a/dev/users/image_tutorial-6.pdf b/dev/users/image_tutorial-6.pdf deleted file mode 100644 index 9b1bd9b8cf3..00000000000 Binary files a/dev/users/image_tutorial-6.pdf and /dev/null differ diff --git a/dev/users/image_tutorial-6.png b/dev/users/image_tutorial-6.png deleted file mode 100644 index 2436078611f..00000000000 Binary files a/dev/users/image_tutorial-6.png and /dev/null differ diff --git a/dev/users/image_tutorial-6.py b/dev/users/image_tutorial-6.py deleted file mode 100644 index 566e250176b..00000000000 --- a/dev/users/image_tutorial-6.py +++ /dev/null @@ -1,6 +0,0 @@ -import matplotlib.pyplot as plt -import matplotlib.image as mpimg -import numpy as np -img = mpimg.imread('../_static/stinkbug.png') -lum_img = img[:,:,0] -plt.hist(lum_img.flatten(), 256, range=(0.0,1.0), fc='black', ec='black') \ No newline at end of file diff --git a/dev/users/image_tutorial-7.hires.png b/dev/users/image_tutorial-7.hires.png deleted file mode 100644 index bddeff72527..00000000000 Binary files a/dev/users/image_tutorial-7.hires.png and /dev/null differ diff --git a/dev/users/image_tutorial-7.pdf b/dev/users/image_tutorial-7.pdf deleted file mode 100644 index 864c0e76000..00000000000 Binary files a/dev/users/image_tutorial-7.pdf and /dev/null differ diff --git a/dev/users/image_tutorial-7.png b/dev/users/image_tutorial-7.png deleted file mode 100644 index 22645797d79..00000000000 Binary files a/dev/users/image_tutorial-7.png and /dev/null differ diff --git a/dev/users/image_tutorial-7.py b/dev/users/image_tutorial-7.py deleted file mode 100644 index 3fb17e07e8d..00000000000 --- a/dev/users/image_tutorial-7.py +++ /dev/null @@ -1,15 +0,0 @@ -import matplotlib.pyplot as plt -import matplotlib.image as mpimg -import numpy as np -fig = plt.figure() -a=fig.add_subplot(1,2,1) -img = mpimg.imread('../_static/stinkbug.png') -lum_img = img[:,:,0] -imgplot = plt.imshow(lum_img) -a.set_title('Before') -plt.colorbar(ticks=[0.1,0.3,0.5,0.7], orientation ='horizontal') -a=fig.add_subplot(1,2,2) -imgplot = plt.imshow(lum_img) -imgplot.set_clim(0.0,0.7) -a.set_title('After') -plt.colorbar(ticks=[0.1,0.3,0.5,0.7], orientation='horizontal') \ No newline at end of file diff --git a/dev/users/image_tutorial-8.hires.png b/dev/users/image_tutorial-8.hires.png deleted file mode 100644 index 1d44bea0b17..00000000000 Binary files a/dev/users/image_tutorial-8.hires.png and /dev/null differ diff --git a/dev/users/image_tutorial-8.pdf b/dev/users/image_tutorial-8.pdf deleted file mode 100644 index df4dedd5bc7..00000000000 Binary files a/dev/users/image_tutorial-8.pdf and /dev/null differ diff --git a/dev/users/image_tutorial-8.png b/dev/users/image_tutorial-8.png deleted file mode 100644 index 89933cd0c53..00000000000 Binary files a/dev/users/image_tutorial-8.png and /dev/null differ diff --git a/dev/users/image_tutorial-8.py b/dev/users/image_tutorial-8.py deleted file mode 100644 index f6be58e32dc..00000000000 --- a/dev/users/image_tutorial-8.py +++ /dev/null @@ -1,9 +0,0 @@ -import matplotlib.pyplot as plt -import matplotlib.image as mpimg -import numpy as np -import Image -img = Image.open('../_static/stinkbug.png') # opens the file using PIL - it's not an array yet -rsize = img.resize((img.size[0]/10,img.size[1]/10)) # resize the image -rsizeArr = np.asarray(rsize) -lum_img = rsizeArr[:,:,0] -imgplot = plt.imshow(rsizeArr) \ No newline at end of file diff --git a/dev/users/image_tutorial-9.hires.png b/dev/users/image_tutorial-9.hires.png deleted file mode 100644 index 20350987ccc..00000000000 Binary files a/dev/users/image_tutorial-9.hires.png and /dev/null differ diff --git a/dev/users/image_tutorial-9.pdf b/dev/users/image_tutorial-9.pdf deleted file mode 100644 index f7be0ff507c..00000000000 Binary files a/dev/users/image_tutorial-9.pdf and /dev/null differ diff --git a/dev/users/image_tutorial-9.png b/dev/users/image_tutorial-9.png deleted file mode 100644 index ab9e490c3e5..00000000000 Binary files a/dev/users/image_tutorial-9.png and /dev/null differ diff --git a/dev/users/image_tutorial-9.py b/dev/users/image_tutorial-9.py deleted file mode 100644 index f65163463e8..00000000000 --- a/dev/users/image_tutorial-9.py +++ /dev/null @@ -1,10 +0,0 @@ -import matplotlib.pyplot as plt -import matplotlib.image as mpimg -import numpy as np -import Image -img = Image.open('../_static/stinkbug.png') # opens the file using PIL - it's not an array yet -rsize = img.resize((img.size[0]/10,img.size[1]/10)) # resize the image -rsizeArr = np.asarray(rsize) -lum_img = rsizeArr[:,:,0] -imgplot = plt.imshow(rsizeArr) -imgplot.set_interpolation('nearest') \ No newline at end of file diff --git a/dev/users/image_tutorial.html b/dev/users/image_tutorial.html deleted file mode 100644 index 368fa8ccac7..00000000000 --- a/dev/users/image_tutorial.html +++ /dev/null @@ -1,442 +0,0 @@ - - - - - - - - Image tutorial — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      Table Of Contents

      - - -

      Previous topic

      -

      Annotating text

      -

      Next topic

      -

      Artist tutorial

      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      Image tutorial

      -
      -

      Startup commands

      -

      At the very least, you’ll need to have access to the -imshow() function. There are a couple of -ways to do it. The easy way for an interactive environment:

      -
      $ipython -pylab
      -
      -

      The imshow function is now directly accessible (it’s in your -namespace). -See also Pyplot tutorial.

      -

      The more expressive, easier to understand later method (use this in -your scripts to make it easier for others (including your future self) -to read) is to use the matplotlib API (see Artist tutorial) -where you use explicit namespaces and control object creation, etc...

      -
      In [1]: import matplotlib.pyplot as plt
      -In [2]: import matplotlib.image as mpimg
      -In [3]: import numpy as np
      -
      -
      -

      Examples below will use the latter method, for clarity. In these -examples, if you use the -pylab method, you can skip the “mpimg.” and -“plt.” prefixes.

      -
      -
      -

      Importing image data into Numpy arrays

      -

      Plotting image data is supported by the Python Image Library (PIL). Natively, matplotlib -only supports PNG images. The commands shown below fall back on PIL -if the native read fails.

      -

      The image used in this example is a PNG file, but keep that PIL -requirement in mind for your own data.

      -

      Here’s the image we’re going to play with:

      -../_images/stinkbug.png -

      It’s a 24-bit RGB PNG image (8 bits for each of R, G, B). Depending -on where you get your data, the other kinds of image that you’ll most -likely encounter are RGBA images, which allow for transparency, or -single-channel grayscale (luminosity) images. You can right click on -it and choose “Save image as” to download it to your computer for the -rest of this tutorial.

      -

      And here we go...

      -
      In [4]: img=mpimg.imread('stinkbug.png')
      -Out[4]:
      -array([[[ 0.40784314,  0.40784314,  0.40784314],
      -        [ 0.40784314,  0.40784314,  0.40784314],
      -        [ 0.40784314,  0.40784314,  0.40784314],
      -        ...,
      -        [ 0.42745098,  0.42745098,  0.42745098],
      -        [ 0.42745098,  0.42745098,  0.42745098],
      -        [ 0.42745098,  0.42745098,  0.42745098]],
      -
      -       [[ 0.41176471,  0.41176471,  0.41176471],
      -        [ 0.41176471,  0.41176471,  0.41176471],
      -        [ 0.41176471,  0.41176471,  0.41176471],
      -        ...,
      -        [ 0.42745098,  0.42745098,  0.42745098],
      -        [ 0.42745098,  0.42745098,  0.42745098],
      -        [ 0.42745098,  0.42745098,  0.42745098]],
      -
      -       [[ 0.41960785,  0.41960785,  0.41960785],
      -        [ 0.41568628,  0.41568628,  0.41568628],
      -        [ 0.41568628,  0.41568628,  0.41568628],
      -        ...,
      -        [ 0.43137255,  0.43137255,  0.43137255],
      -        [ 0.43137255,  0.43137255,  0.43137255],
      -        [ 0.43137255,  0.43137255,  0.43137255]],
      -
      -       ...,
      -       [[ 0.43921569,  0.43921569,  0.43921569],
      -        [ 0.43529412,  0.43529412,  0.43529412],
      -        [ 0.43137255,  0.43137255,  0.43137255],
      -        ...,
      -        [ 0.45490196,  0.45490196,  0.45490196],
      -        [ 0.4509804 ,  0.4509804 ,  0.4509804 ],
      -        [ 0.4509804 ,  0.4509804 ,  0.4509804 ]],
      -
      -       [[ 0.44313726,  0.44313726,  0.44313726],
      -        [ 0.44313726,  0.44313726,  0.44313726],
      -        [ 0.43921569,  0.43921569,  0.43921569],
      -        ...,
      -        [ 0.4509804 ,  0.4509804 ,  0.4509804 ],
      -        [ 0.44705883,  0.44705883,  0.44705883],
      -        [ 0.44705883,  0.44705883,  0.44705883]],
      -
      -       [[ 0.44313726,  0.44313726,  0.44313726],
      -        [ 0.4509804 ,  0.4509804 ,  0.4509804 ],
      -        [ 0.4509804 ,  0.4509804 ,  0.4509804 ],
      -        ...,
      -        [ 0.44705883,  0.44705883,  0.44705883],
      -        [ 0.44705883,  0.44705883,  0.44705883],
      -        [ 0.44313726,  0.44313726,  0.44313726]]], dtype=float32)
      -
      -
      -

      Note the dtype there - float32. Matplotlib has rescaled the 8 bit -data from each channel to floating point data between 0.0 and 1.0. As -a side note, the only datatype that PIL can work with is uint8. -Matplotlib plotting can handle float32 and uint8, but image -reading/writing for any format other than PNG is limited to uint8 -data. Why 8 bits? Most displays can only render 8 bits per channel -worth of color gradation. Why can they only render 8 bits/channel? -Because that’s about all the human eye can see. More here (from a -photography standpoint): Luminous Landscape bit depth tutorial.

      -

      Each inner list represents a pixel. Here, with an RGB image, there -are 3 values. Since it’s a black and white image, R, G, and B are all -similar. An RGBA (where A is alpha, or transparency), has 4 values -per inner list, and a simple luminance image just has one value (and -is thus only a 2-D array, not a 3-D array). For RGB and RGBA images, -matplotlib supports float32 and uint8 data types. For grayscale, -matplotlib supports only float32. If your array data does not meet -one of these descriptions, you need to rescale it.

      -
      -
      -

      Plotting numpy arrays as images

      -

      So, you have your data in a numpy array (either by importing it, or by -generating it). Let’s render it. In Matplotlib, this is performed -using the imshow() function. Here we’ll grab -the plot object. This object gives you an easy way to manipulate the -plot from the prompt.

      -
      In [5]: imgplot = plt.imshow(img)
      -
      -
      -

      (Source code, png, hires.png, pdf)

      -
      -../_images/image_tutorial-1.png -
      -

      You can also plot any numpy array - just remember that the datatype -must be float32 (and range from 0.0 to 1.0) or uint8.

      -
      -

      Applying pseudocolor schemes to image plots

      -

      Pseudocolor can be a useful tool for enhancing contrast and -visualizing your data more easily. This is especially useful when -making presentations of your data using projectors - their contrast is -typically quite poor.

      -

      Pseudocolor is only relevant to single-channel, grayscale, luminosity -images. We currently have an RGB image. Since R, G, and B are all -similar (see for yourself above or in your data), we can just pick one -channel of our data:

      -
      In [6]: lum_img = img[:,:,0]
      -
      -
      -

      This is array slicing. You can read more in the Numpy tutorial.

      -
      In [7]: imgplot = plt.imshow(lum_img)
      -
      -
      -

      (Source code, png, hires.png, pdf)

      -
      -../_images/image_tutorial-2.png -
      -

      Now, with a luminosity image, the default colormap (aka lookup table, -LUT), is applied. The default is called jet. There are plenty of -others to choose from. Let’s set some others using the -set_cmap() method on our image plot -object:

      -
      In [8]: imgplot.set_cmap('hot')
      -
      -
      -

      (Source code, png, hires.png, pdf)

      -
      -../_images/image_tutorial-3.png -
      -
      In [9]: imgplot.set_cmap('spectral')
      -
      -
      -

      (Source code, png, hires.png, pdf)

      -
      -../_images/image_tutorial-4.png -
      -

      There are many other colormap schemes available. See the list and -images of the colormaps.

      -
      -
      -

      Color scale reference

      -

      It’s helpful to have an idea of what value a color represents. We can -do that by adding color bars. It’s as easy as one line:

      -
      In [10]: plt.colorbar()
      -
      -
      -

      (Source code, png, hires.png, pdf)

      -
      -../_images/image_tutorial-5.png -
      -

      This adds a colorbar to your existing figure. This won’t -automatically change if you change you switch to a different -colormap - you have to re-create your plot, and add in the colorbar -again.

      -
      -
      -

      Examining a specific data range

      -

      Sometimes you want to enhance the contrast in your image, or expand -the contrast in a particular region while sacrificing the detail in -colors that don’t vary much, or don’t matter. A good tool to find -interesting regions is the histogram. To create a histogram of our -image data, we use the hist() function.

      -
      In[10]: plt.hist(lum_img.flatten(), 256, range=(0.0,1.0), fc='k', ec='k')
      -
      -
      -

      (Source code, png, hires.png, pdf)

      -
      -../_images/image_tutorial-6.png -
      -

      Most often, the “interesting” part of the image is around the peak, -and you can get extra contrast by clipping the regions above and/or -below the peak. In our histogram, it looks like there’s not much -useful information in the high end (not many white things in the -image). Let’s adjust the upper limit, so that we effectively “zoom in -on” part of the histogram. We do this by calling the -set_clim() method of the image plot -object.

      -
      In[11]: imgplot.set_clim(0.0,0.7)
      -
      -
      -

      (Source code, png, hires.png, pdf)

      -
      -../_images/image_tutorial-7.png -
      -
      -
      -

      Array Interpolation schemes

      -

      Interpolation calculates what the color or value of a pixel “should” -be, according to different mathematical schemes. One common place -that this happens is when you resize an image. The number of pixels -change, but you want the same information. Since pixels are discrete, -there’s missing space. Interpolation is how you fill that space. -This is why your images sometimes come out looking pixelated when you -blow them up. The effect is more pronounced when the difference -between the original image and the expanded image is greater. Let’s -take our image and shrink it. We’re effectively discarding pixels, -only keeping a select few. Now when we plot it, that data gets blown -up to the size on your screen. The old pixels aren’t there anymore, -and the computer has to draw in pixels to fill that space.

      -
      In [8]: import Image
      -In [9]: img = Image.open('stinkbug.png')    # Open image as PIL image object
      -In [10]: rsize = img.resize((img.size[0]/10,img.size[1]/10)) # Use PIL to resize
      -In [11]: rsizeArr = np.asarray(rsize)  # Get array back
      -In [12]: imgplot = plt.imshow(rsizeArr)
      -
      -
      -

      (Source code, png, hires.png, pdf)

      -
      -../_images/image_tutorial-8.png -
      -

      Here we have the default interpolation, bilinear, since we did not -give imshow() any interpolation argument.

      -

      Let’s try some others:

      -
      In [10]: imgplot.set_interpolation('nearest')
      -
      -
      -

      (Source code, png, hires.png, pdf)

      -
      -../_images/image_tutorial-9.png -
      -
      In [10]: imgplot.set_interpolation('bicubic')
      -
      -
      -

      (Source code, png, hires.png, pdf)

      -
      -../_images/image_tutorial-10.png -
      -

      Bicubic interpolation is often used when blowing up photos - people -tend to prefer blurry over pixelated.

      -
      -
      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/users/index.html b/dev/users/index.html deleted file mode 100644 index a04ace43f12..00000000000 --- a/dev/users/index.html +++ /dev/null @@ -1,332 +0,0 @@ - - - - - - - - User’s Guide — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      Previous topic

      -

      Overview

      -

      Next topic

      -

      Introduction

      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      User’s Guide

      - --- - - - - - -
      Release:1.3.x
      Date:May 21, 2013
      -
      - -
      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/users/index_text.html b/dev/users/index_text.html deleted file mode 100644 index ea000519e28..00000000000 --- a/dev/users/index_text.html +++ /dev/null @@ -1,201 +0,0 @@ - - - - - - - - Working with text — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      Previous topic

      -

      Using matplotlib in a python shell

      -

      Next topic

      -

      Text introduction

      -

      This Page

      - - - -
      -
      - - - - - - \ No newline at end of file diff --git a/dev/users/installing.html b/dev/users/installing.html deleted file mode 100644 index 27fe8b4744e..00000000000 --- a/dev/users/installing.html +++ /dev/null @@ -1,384 +0,0 @@ - - - - - - - - Installing — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      Table Of Contents

      - - -

      Previous topic

      -

      Introduction

      -

      Next topic

      -

      Pyplot tutorial

      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      Installing

      -

      There are many different ways to install matplotlib, and the best way -depends on what operating system you are using, what you already have -installed, and how you want to use it. To avoid wading through all -the details (and potential complications) on this page, the easiest -thing for you to do is use one of the pre-packaged python -distributions that already provide matplotlib built-in. The Enthought -Python Distribution (EPD) for Windows, OS X or -Redhat is an excellent choice that “just works” out of the box. -Another excellent alternative for Windows users is Python (x, y) which tends to be updated a bit more -frequently. Both of these packages include matplotlib and pylab, and -lots of other useful tools. matplotlib is also packaged for almost -every major Linux distribution. So if you are on Linux, your package -manager will probably provide matplotlib prebuilt.

      -
      -

      Manually installing pre-built packages

      -
      -

      General instructions

      -

      For some people, the prepackaged pythons discussed above are not an -option. That’s OK, it’s usually pretty easy to get a custom install -working. You will first need to find out if you have python installed -on your machine, and if not, install it. The official python builds -are available for download here, -but OS X users please read Which python for OS X?.

      -

      Once you have python up and running, you will need to install numpy. numpy provides high-performance array data -structures and mathematical functions, and is a requirement for -matplotlib. You can test your progress:

      -
      >>> import numpy
      ->>> print numpy.__version__
      -
      -
      -

      matplotlib requires numpy version 1.4 or later. -Although it is not a requirement to use matplotlib, we strongly -encourage you to install ipython, which is an -interactive shell for python that is matplotlib-aware.

      -

      Next, we need to get matplotlib installed. We provide prebuilt -binaries for OS X and Windows on the matplotlib download page. Click on -the latest release of the “matplotlib” package, choose your python -version (2.6, 2.7 or 3.2) and your platform (macosx or win32). If you -have any problems, please check the Installation, search -using Google, and/or post a question the mailing list.

      -

      If you are on Debian/Ubuntu linux, it suffices to do:

      -
      > sudo apt-get install python-matplotlib
      -
      -

      Instructions for installing our OSX binaries are found in the FAQ -Installing OSX binaries.

      -

      Once you have ipython, numpy and matplotlib installed, you can use -ipython’s “pylab” mode to have a MATLAB-like environment that automatically -handles most of the configuration details for you, so you can get up -and running quickly:

      -
      johnh@flag:~> ipython -pylab
      -Python 2.4.5 (#4, Apr 12 2008, 09:09:16)
      -IPython 0.9.0 -- An enhanced Interactive Python.
      -
      -  Welcome to pylab, a matplotlib-based Python environment.
      -  For more information, type 'help(pylab)'.
      -
      -In [1]: x = randn(10000)
      -
      -In [2]: hist(x, 100)
      -
      -

      Note that when testing matplotlib installations from the interactive -python console, there are some issues relating to user interface -toolkits and interactive settings that are discussed in -Using matplotlib in a python shell.

      -
      -
      -

      Installing on Windows

      -

      If you don’t already have python installed, you may want to consider -using the Enthought edition of python, which has scipy, numpy, and -wxpython, plus many other useful packages, preinstalled - Enthought -Python. With the Enthought -edition of python + matplotlib installer, the following backends -should work out of the box: agg, wx, wxagg, tkagg, ps, pdf and svg.

      -

      For standard python installations, you will also need to install numpy -in addition to the matplotlib installer. On some systems you will -also need to download msvcp71.dll library, which you can download from -http://www.dll-files.com/dllindex/dll-files.shtml?msvcp71 or other -sites. You will need to unzip the archive and drag the dll into -c:windowssystem32.

      -

      All of the GUI backends run on Windows, but TkAgg is probably the -best for interactive use from the standard python shell or ipython. -The Windows installer (*.exe) on the download page contains all the -code you need to get up and running. However, there are many -examples that are not included in the Windows installer. If you -want to try the many demos that come in the matplotlib source -distribution, download the zip file and look in the examples -subdirectory.

      -
      -
      -
      -

      Installing from source

      -

      If you are interested in contributing to matplotlib development, -running the latest source code, or just like to build everything -yourself, it is not difficult to build matplotlib from source. Grab -the latest tar.gz release file from the download page, or if you want -to develop matplotlib or just need the latest bugfixed version, grab -the latest git version Source install from git.

      -

      Once you have satisfied the requirements detailed below (mainly -python, numpy, libpng and freetype), you can build matplotlib:

      -
      cd matplotlib
      -python setup.py build
      -python setup.py install
      -
      -

      We provide a setup.cfg -file that goes with setup.py which you can use to customize -the build process. For example, which default backend to use, whether -some of the optional libraries that matplotlib ships with are -installed, and so on. This file will be particularly useful to those -packaging matplotlib.

      -

      If you have installed prerequisites to nonstandard places and need to -inform matplotlib where they are, edit setupext.py and add the base -dirs to the basedir dictionary entry for your sys.platform. -e.g., if the header to some required library is in -/some/path/include/someheader.h, put /some/path in the -basedir list for your platform.

      -
      -
      -

      Build requirements

      -

      These are external packages which you will need to install before -installing matplotlib. Windows users only need the first two (python -and numpy) since the others are built into the matplotlib Windows -installers available for download at the download page -<https://github.com/matplotlib/matplotlib/downloads>_. If you are -building on OSX, see Building on OSX. If you are installing -dependencies with a package manager on Linux, you may need to install -the development packages (look for a “-dev” postfix) in addition to -the libraries themselves.

      -
      -

      Note

      -

      If you are on debian/ubuntu, you can get all the dependencies -required to build matplotlib with:

      -
      sudo apt-get build-dep python-matplotlib
      -
      -

      If you are on Fedora/RedHat, you can get all the dependencies -required to build matplotlib by first installing yum-builddep -and then running:

      -
      su -c "yum-builddep python-matplotlib"
      -
      -

      This does not build matplotlib, but it does get the install the -build dependencies, which will make building from source easier.

      -
      -
      -
      python 2.6, 2.7, 3.1 or 3.2
      -
      Download python.
      -
      numpy 1.4 (or later)
      -
      array support for python (download)
      -
      libpng 1.2 (or later)
      -
      library for loading and saving PNG files (download). libpng requires -zlib. If you are a Windows user, you can ignore this because we -build support into the matplotlib single-click installer
      -
      freetype 1.4 (or later)
      -
      library for reading true type font files. If you are a windows -user, you can ignore this since we build support into the -matplotlib single click installer.
      -
      dateutil 1.1 or later
      -
      Provides extensions to python datetime handling. If using pip, -easy_install or installing from source, the installer will attempt -to download and install python_dateutil from PyPI.
      -
      pyparsing
      -
      Required for matplotlib’s mathtext math rendering support. If -using pip, easy_install or installing from source, the installer -will attempt to download and install pyparsing from PyPI.
      -
      -

      Optional

      -

      These are optional packages which you may want to install to use -matplotlib with a user interface toolkit. See -What is a backend? for more details on the optional matplotlib -backends and the capabilities they provide.

      -
      -
      tk 8.3 or later
      -
      The TCL/Tk widgets library used by the TkAgg backend
      -
      pyqt 3.1 or later
      -
      The Qt3 widgets library python wrappers for the QtAgg backend
      -
      pyqt 4.0 or later
      -
      The Qt4 widgets library python wrappers for the Qt4Agg backend
      -
      pygtk 2.4 or later
      -
      The python wrappers for the GTK widgets library for use with the -GTK or GTKAgg backend
      -
      wxpython 2.8 or later
      -
      The python wrappers for the wx widgets library for use with the -WX or WXAgg backend
      -
      pyfltk 1.0 or later
      -
      The python wrappers of the FLTK widgets library for use with FLTKAgg
      -
      -

      Required libraries that ship with matplotlib

      -
      -
      agg 2.4
      -
      The antigrain C++ rendering engine. matplotlib links against the -agg template source statically, so it will not affect anything on -your system outside of matplotlib.
      -
      PyCXX 6.2.4
      -
      A library for writing Python extensions in C++.
      -
      -
      -
      -

      Building on OSX

      -

      The build situation on OSX is complicated by the various places one -can get the libpng and freetype requirements (darwinports, fink, -/usr/X11R6) and the different architectures (e.g., x86, ppc, universal) and -the different OSX version (e.g., 10.4 and 10.5). We recommend that you build -the way we do for the OSX release: get the source from the tarball or the -git repository and follow the instruction in README.osx.

      -
      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/users/intro.html b/dev/users/intro.html deleted file mode 100644 index b43c5282248..00000000000 --- a/dev/users/intro.html +++ /dev/null @@ -1,243 +0,0 @@ - - - - - - - - Introduction — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      Previous topic

      -

      User’s Guide

      -

      Next topic

      -

      Installing

      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      Introduction

      -

      matplotlib is a library for making 2D plots of arrays in Python. Although it has its origins in emulating -the MATLAB® [*] graphics commands, it is -independent of MATLAB, and can be used in a Pythonic, object oriented -way. Although matplotlib is written primarily in pure Python, it -makes heavy use of NumPy and other extension -code to provide good performance even for large arrays.

      -

      matplotlib is designed with the philosophy that you should be able to -create simple plots with just a few commands, or just one! If you -want to see a histogram of your data, you shouldn’t need to -instantiate objects, call methods, set properties, and so on; it -should just work.

      -

      For years, I used to use MATLAB exclusively for data analysis and -visualization. MATLAB excels at making nice looking plots easy. When -I began working with EEG data, I found that I needed to write -applications to interact with my data, and developed and EEG analysis -application in MATLAB. As the application grew in complexity, -interacting with databases, http servers, manipulating complex data -structures, I began to strain against the limitations of MATLAB as a -programming language, and decided to start over in Python. Python -more than makes up for all of MATLAB’s deficiencies as a programming -language, but I was having difficulty finding a 2D plotting package -(for 3D VTK more than exceeds all of my -needs).

      -

      When I went searching for a Python plotting package, I had several -requirements:

      -
        -
      • Plots should look great - publication quality. One important -requirement for me is that the text looks good (antialiased, etc.)
      • -
      • Postscript output for inclusion with TeX documents
      • -
      • Embeddable in a graphical user interface for application -development
      • -
      • Code should be easy enough that I can understand it and extend -it
      • -
      • Making plots should be easy
      • -
      -

      Finding no package that suited me just right, I did what any -self-respecting Python programmer would do: rolled up my sleeves and -dived in. Not having any real experience with computer graphics, I -decided to emulate MATLAB’s plotting capabilities because that is -something MATLAB does very well. This had the added advantage that -many people have a lot of MATLAB experience, and thus they can -quickly get up to steam plotting in python. From a developer’s -perspective, having a fixed user interface (the pylab interface) has -been very useful, because the guts of the code base can be redesigned -without affecting user code.

      -

      The matplotlib code is conceptually divided into three parts: the -pylab interface is the set of functions provided by -matplotlib.pylab which allow the user to create plots with code -quite similar to MATLAB figure generating code -(Pyplot tutorial). The matplotlib frontend or matplotlib -API is the set of classes that do the heavy lifting, creating and -managing figures, text, lines, plots and so on -(Artist tutorial). This is an abstract interface that knows -nothing about output. The backends are device dependent drawing -devices, aka renderers, that transform the frontend representation to -hardcopy or a display device (What is a backend?). Example -backends: PS creates PostScript® hardcopy, SVG -creates Scalable Vector Graphics -hardcopy, Agg creates PNG output using the high quality Anti-Grain -Geometry library that ships with -matplotlib, GTK embeds matplotlib in a Gtk+ -application, GTKAgg uses the Anti-Grain renderer to create a figure -and embed it a Gtk+ application, and so on for PDF, WxWidgets, Tkinter etc.

      -

      matplotlib is used by many people in many different contexts. Some -people want to automatically generate PostScript files to send -to a printer or publishers. Others deploy matplotlib on a web -application server to generate PNG output for inclusion in -dynamically-generated web pages. Some use matplotlib interactively -from the Python shell in Tkinter on Windows™. My primary use is to -embed matplotlib in a Gtk+ EEG application that runs on Windows, Linux -and Macintosh OS X.

      - - - - - -
      [*]MATLAB is a registered trademark of The MathWorks, Inc.
      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/users/legend_guide-1.hires.png b/dev/users/legend_guide-1.hires.png deleted file mode 100644 index 88476d7dc08..00000000000 Binary files a/dev/users/legend_guide-1.hires.png and /dev/null differ diff --git a/dev/users/legend_guide-1.pdf b/dev/users/legend_guide-1.pdf deleted file mode 100644 index 8eb227ec4d3..00000000000 Binary files a/dev/users/legend_guide-1.pdf and /dev/null differ diff --git a/dev/users/legend_guide-1.png b/dev/users/legend_guide-1.png deleted file mode 100644 index 13a22d3d657..00000000000 Binary files a/dev/users/legend_guide-1.png and /dev/null differ diff --git a/dev/users/legend_guide-1.py b/dev/users/legend_guide-1.py deleted file mode 100644 index ff39aaec26a..00000000000 --- a/dev/users/legend_guide-1.py +++ /dev/null @@ -1,6 +0,0 @@ -z = np.random.randn(10) - -p1a, = plt.plot(z, "ro", ms=10, mfc="r", mew=2, mec="r") # red filled circle -p1b, = plt.plot(z[:5], "w+", ms=10, mec="w", mew=2) # white cross - -plt.legend([p1a, (p1a, p1b)], ["Attr A", "Attr A+B"]) \ No newline at end of file diff --git a/dev/users/legend_guide.html b/dev/users/legend_guide.html deleted file mode 100644 index 5130325af96..00000000000 --- a/dev/users/legend_guide.html +++ /dev/null @@ -1,535 +0,0 @@ - - - - - - - - Legend guide — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      Table Of Contents

      - - -

      Previous topic

      -

      Tight Layout guide

      -

      Next topic

      -

      Event handling and picking

      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      Legend guide

      -

      Do not proceed unless you already have read legend() -and matplotlib.legend.Legend!

      -
      -

      What to be displayed

      -

      The legend command has a following call signature:

      -
      legend(*args, **kwargs)
      -
      -
      -

      If len(args) is 2, the first argument should be a list of artist to be -labeled, and the second argument should a list of string labels. If -len(args) is 0, it automatically generate the legend from label -properties of the child artists by calling -get_legend_handles_labels() method. -For example, ax.legend() is equivalent to:

      -
      handles, labels = ax.get_legend_handles_labels()
      -ax.legend(handles, labels)
      -
      -
      -

      The get_legend_handles_labels() method -returns a tuple of two lists, i.e., list of artists and list of labels -(python string). However, it does not return all of its child -artists. It returns artists that are currently supported by matplotlib.

      -

      For matplotlib v1.0 and earlier, the supported artists are as follows.

      -
      -
      -

      And, get_legend_handles_labels() returns -all artists in ax.lines, ax.patches and -artists in ax.collection which are instance of -LineCollection or -RegularPolyCollection. The label -attributes (returned by get_label() method) of collected artists are -used as text labels. If label attribute is empty string or starts with -“_”, those artists will be ignored.

      -

      Therefore, plots drawn by some pyplot commands are not supported by -legend. For example, fill_between() creates -PolyCollection that is not -supported. Also support is limited for some commands that create -multiple artists. For example, errorbar() -creates multiples Line2D instances.

      -

      Unfortunately, there is no easy workaround when you need legend for an -artist not supported by matplotlib (You may use one of the supported -artist as a proxy. See below)

      -

      In newer version of matplotlib (v1.1 and later), the matplotlib -internals are revised to support

      -
      -
        -
      • complex plots that creates multiple artists (e.g., bar, errorbar, etc)
      • -
      • custom legend handles
      • -
      -
      -

      See below for details of new functionality.

      -
      -

      Adjusting the Order of Legend items

      -

      When you want to customize the list of artists to be displayed in the -legend, or their order of appearance. There are a two options. First, -you can keep lists of artists and labels, and explicitly use these for -the first two argument of the legend call.:

      -
      p1, = plot([1,2,3])
      -p2, = plot([3,2,1])
      -p3, = plot([2,3,1])
      -legend([p2, p1], ["line 2", "line 1"])
      -
      -
      -

      Or you may use get_legend_handles_labels() -to retrieve list of artist and labels and manipulate them before -feeding them to legend call.:

      -
      ax = subplot(1,1,1)
      -p1, = ax.plot([1,2,3], label="line 1")
      -p2, = ax.plot([3,2,1], label="line 2")
      -p3, = ax.plot([2,3,1], label="line 3")
      -
      -handles, labels = ax.get_legend_handles_labels()
      -
      -# reverse the order
      -ax.legend(handles[::-1], labels[::-1])
      -
      -# or sort them by labels
      -import operator
      -hl = sorted(zip(handles, labels),
      -            key=operator.itemgetter(1))
      -handles2, labels2 = zip(*hl)
      -
      -ax.legend(handles2, labels2)
      -
      -
      -
      -
      -

      Using Proxy Artist

      -

      When you want to display legend for an artist not supported by -matplotlib, you may use another artist as a proxy. For -example, you may create a proxy artist without adding it to the axes -(so the proxy artist will not be drawn in the main axes) and feed it -to the legend function.:

      -
      p = Rectangle((0, 0), 1, 1, fc="r")
      -legend([p], ["Red Rectangle"])
      -
      -
      -
      -
      -
      -

      Multicolumn Legend

      -

      By specifying the keyword argument ncol, you can have a multi-column -legend. Also, mode=”expand” horizontally expand the legend to fill the -axes area. See legend_demo3.py -for example.

      -
      -
      -

      Legend location

      -

      The location of the legend can be specified by the keyword argument -loc, either by string or a integer number.

      - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      StringNumber
      upper right1
      upper left2
      lower left3
      lower right4
      right5
      center left6
      center right7
      lower center8
      upper center9
      center10
      -

      By default, the legend will anchor to the bbox of the axes -(for legend) or the bbox of the figure (figlegend). You can specify -your own bbox using bbox_to_anchor argument. bbox_to_anchor can be an -instance of BboxBase, a tuple of 4 -floats (x, y, width, height of the bbox), or a tuple of 2 floats (x, y -with width=height=0). Unless bbox_transform argument is given, the -coordinates (even for the bbox instance) are considered as normalized -axes coordinates.

      -

      For example, if you want your axes legend located at the figure corner -(instead of the axes corner):

      -
      l = legend(bbox_to_anchor=(0, 0, 1, 1), bbox_transform=gcf().transFigure)
      -
      -
      -

      Also, you can place above or outer right-hand side of the axes,

      -
      from matplotlib.pyplot import *
      -
      -subplot(211)
      -plot([1,2,3], label="test1")
      -plot([3,2,1], label="test2")
      -legend(bbox_to_anchor=(0., 1.02, 1., .102), loc=3,
      -       ncol=2, mode="expand", borderaxespad=0.)
      -
      -subplot(223)
      -plot([1,2,3], label="test1")
      -plot([3,2,1], label="test2")
      -legend(bbox_to_anchor=(1.05, 1), loc=2, borderaxespad=0.)
      -
      -
      -show()
      -
      -
      -

      (Source code, png, hires.png, pdf)

      -
      -../_images/simple_legend01.png -
      -
      -
      -

      Multiple Legend

      -

      Sometime, you want to split the legend into multiple ones.:

      -
      p1, = plot([1,2,3])
      -p2, = plot([3,2,1])
      -legend([p1], ["Test1"], loc=1)
      -legend([p2], ["Test2"], loc=4)
      -
      -
      -

      However, the above code only shows the second legend. When the legend -command is called, a new legend instance is created and old ones are -removed from the axes. Thus, you need to manually add the removed -legend.

      -
      from matplotlib.pyplot import *
      -
      -p1, = plot([1,2,3], label="test1")
      -p2, = plot([3,2,1], label="test2")
      -
      -l1 = legend([p1], ["Label 1"], loc=1)
      -l2 = legend([p2], ["Label 2"], loc=4) # this removes l1 from the axes.
      -gca().add_artist(l1) # add l1 as a separate artist to the axes
      -
      -show()
      -
      -
      -

      (Source code, png, hires.png, pdf)

      -
      -../_images/simple_legend02.png -
      -
      -
      -

      Legend of Complex Plots

      -

      In matplotlib v1.1 and later, the legend is -improved to support more plot commands and ease the customization.

      -
      -

      Artist Container

      -

      The Artist Container is simple class (derived from tuple) that -contains multiple artists. This is introduced primarily to support -legends for complex plot commands that create multiple artists.

      -

      Axes instances now have a “containers” attribute (which is a list, and -this is only intended to be used for generating a legend). The items -in this attribute are also returned by -get_legend_handles_labels().

      -

      For example, “bar” command creates a series of Rectangle -patches. Previously, it returned a list of these patches. With the -current change, it creates a container object of these rectangle -patches (and these patches are added to Axes.patches attribute as -before) and return it instead. As the container class is derived from -a tuple, it should be backward-compatible. Furthermore, the container -object is added to the Axes.containers attributes so that legend -command can properly create a legend for the bar. Thus, you may do

      -
      b1 = bar([0, 1, 2], [0.2, 0.3, 0.1], width=0.4,
      -         label="Bar 1", align="center")
      -legend()
      -
      -
      -

      or

      -
      b1 = bar([0, 1, 2], [0.2, 0.3, 0.1], width=0.4, align="center")
      -legend([b1], ["Bar 1"])
      -
      -
      -

      At this time of writing, however, only “bar”, “errorbar”, and “stem” are -supported (hopefully the list will increase). Here is an example.

      -

      (Source code, png, hires.png, pdf)

      -
      -../_images/legend_demo41.png -
      -
      -
      -

      Legend Handler

      -

      One of the changes is that drawing of legend handles has been delegated to -legend handlers. For example, Line2D -instances are handled by -HandlerLine2D. The mapping -between the artists and their corresponding handlers are defined in a -handler_map of the legend. The handler_map is a dictionary of -key-handler pair, where key can be an artist instance or its -class. And the handler is a Handler instance.

      -

      Let’s consider the following sample code,

      -
      legend([p_1, p_2,..., p_i, ...], ["Test 1", "Test 2", ..., "Test i",...])
      -
      -
      -

      For each p_i, matplotlib

      -
      -
        -
      1. check if p_i is in the handler_map
      2. -
      3. if not, iterate over type(p_i).mro() until a matching key is found -in the handler_map
      4. -
      -
      -

      Unless specified, the default handler_map is used. Below is a partial -list of key-handler pairs included in the default handler map.

      -
      -
        -
      • Line2D : legend_handler.HandlerLine2D()
      • -
      • Patch : legend_handler.HandlerPatch()
      • -
      • LineCollection : legend_handler.HandlerLineCollection()
      • -
      • ...
      • -
      -
      -

      The legend() command takes an optional argument of “handler_map”. When -provided, the default handler map will be updated (using dict.update -method) with the provided one.

      -
      p1, = plot(x, "ro", label="test1")
      -p2, = plot(y, "b+", ms=10, label="test2")
      -
      -my_handler = HandlerLine2D(numpoints=1)
      -
      -legend(handler_map={Line2D:my_handler})
      -
      -
      -

      The above example will use my_handler for any Line2D -instances (p1 and p2).

      -
      legend(handler_map={p1:HandlerLine2D(numpoints=1)})
      -
      -
      -

      In the above example, only p1 will be handled by my_handler, while -others will be handled by default handlers.

      -

      The current default handler_map has handlers for errorbar and bar -plots. Also, it includes an entry for tuple which is mapped to -HandlerTuple. It simply plots over all the handles for items in the -given tuple. For example,

      -
      z = np.random.randn(10)
      -
      -p1a, = plt.plot(z, "ro", ms=10, mfc="r", mew=2, mec="r") # red filled circle
      -p1b, = plt.plot(z[:5], "w+", ms=10, mec="w", mew=2) # white cross
      -
      -plt.legend([p1a, (p1a, p1b)], ["Attr A", "Attr A+B"])
      -
      -
      -

      (Source code, png, hires.png, pdf)

      -
      -../_images/legend_guide-1.png -
      -
      -
      -

      Implement a Custom Handler

      -

      Handler can be any callable object with following signature.

      -
      def __call__(self, legend, orig_handle,
      -             fontsize,
      -             handlebox):
      -
      -

      Where legend is the legend itself, orig_handle is the original -plot (p_i in the above example), fontsize is the fontsize in -pixels, and handlebox is a OffsetBox instance. Within the call, you -create relevant artists (using relevant properties from the legend -and/or orig_handle) and add them into the handlebox. The artists -needs to be scaled according to the fontsize (note that the size is in -pixel, i.e., this is dpi-scaled value). See legend_handler -for more details.

      -
      -
      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/users/license.html b/dev/users/license.html deleted file mode 100644 index ea6a0946025..00000000000 --- a/dev/users/license.html +++ /dev/null @@ -1,222 +0,0 @@ - - - - - - - - License — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      Table Of Contents

      - - -

      Previous topic

      -

      Github stats

      -

      Next topic

      -

      Credits

      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      License

      -

      Matplotlib only uses BSD compatible code, and its license is based on -the PSF license. See the Open -Source Initiative licenses page for details on individual -licenses. Non-BSD compatible licenses (eg LGPL) are acceptable in -matplotlib toolkits. For a discussion of the motivations behind the -licencing choice, see Licenses.

      -
      -

      License agreement for matplotlib 1.3.x

      -

      1. This LICENSE AGREEMENT is between John D. Hunter (“JDH”), and the -Individual or Organization (“Licensee”) accessing and otherwise using -matplotlib software in source or binary form and its associated -documentation.

      -

      2. Subject to the terms and conditions of this License Agreement, JDH -hereby grants Licensee a nonexclusive, royalty-free, world-wide license -to reproduce, analyze, test, perform and/or display publicly, prepare -derivative works, distribute, and otherwise use matplotlib 1.3.x -alone or in any derivative version, provided, however, that JDH’s -License Agreement and JDH’s notice of copyright, i.e., “Copyright (c) -2002-2009 John D. Hunter; All Rights Reserved” are retained in -matplotlib 1.3.x alone or in any derivative version prepared by -Licensee.

      -

      3. In the event Licensee prepares a derivative work that is based on or -incorporates matplotlib 1.3.x or any part thereof, and wants to -make the derivative work available to others as provided herein, then -Licensee hereby agrees to include in any such work a brief summary of -the changes made to matplotlib 1.3.x.

      -

      4. JDH is making matplotlib 1.3.x available to Licensee on an “AS -IS” basis. JDH MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR -IMPLIED. BY WAY OF EXAMPLE, BUT NOT LIMITATION, JDH MAKES NO AND -DISCLAIMS ANY REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR FITNESS -FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF MATPLOTLIB 1.3.x -WILL NOT INFRINGE ANY THIRD PARTY RIGHTS.

      -

      5. JDH SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF MATPLOTLIB -1.3.x FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR -LOSS AS A RESULT OF MODIFYING, DISTRIBUTING, OR OTHERWISE USING -MATPLOTLIB 1.3.x, OR ANY DERIVATIVE THEREOF, EVEN IF ADVISED OF -THE POSSIBILITY THEREOF.

      -

      6. This License Agreement will automatically terminate upon a material -breach of its terms and conditions.

      -

      7. Nothing in this License Agreement shall be deemed to create any -relationship of agency, partnership, or joint venture between JDH and -Licensee. This License Agreement does not grant permission to use JDH -trademarks or trade name in a trademark sense to endorse or promote -products or services of Licensee, or any third party.

      -

      8. By copying, installing or otherwise using matplotlib 1.3.x, -Licensee agrees to be bound by the terms and conditions of this License -Agreement.

      -
      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/users/mathtext.html b/dev/users/mathtext.html deleted file mode 100644 index 9a7c1eb13cd..00000000000 --- a/dev/users/mathtext.html +++ /dev/null @@ -1,1341 +0,0 @@ - - - - - - - - Writing mathematical expressions — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      Table Of Contents

      - - -

      Previous topic

      -

      Text properties and layout

      -

      Next topic

      -

      Typesetting With XeLaTeX/LuaLaTeX

      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      Writing mathematical expressions

      -

      You can use a subset TeX markup in any matplotlib text string by -placing it inside a pair of dollar signs ($).

      -

      Note that you do not need to have TeX installed, since matplotlib -ships its own TeX expression parser, layout engine and fonts. The -layout engine is a fairly direct adaptation of the layout algorithms -in Donald Knuth’s TeX, so the quality is quite good (matplotlib also -provides a usetex option for those who do want to call out to TeX -to generate their text (see Text rendering With LaTeX).

      -

      Any text element can use math text. You should use raw strings -(precede the quotes with an 'r'), and surround the math text with -dollar signs ($), as in TeX. Regular text and mathtext can be -interleaved within the same string. Mathtext can use the Computer -Modern fonts (from (La)TeX), STIX -fonts (with are designed to blend well with Times) or a Unicode font -that you provide. The mathtext font can be selected with the -customization variable mathtext.fontset (see -Customizing matplotlib)

      -
      -

      Note

      -

      On “narrow” builds -of Python, if you use the STIX fonts you should also set -ps.fonttype and pdf.fonttype to 3 (the default), not 42. -Otherwise some characters will not be visible.

      -
      -

      Here is a simple example:

      -
      # plain text
      -plt.title('alpha > beta')
      -
      -
      -

      produces “alpha > beta”.

      -

      Whereas this:

      -
      # math text
      -plt.title(r'$\alpha > \beta$')
      -
      -
      -

      produces “”.

      -
      -

      Note

      -

      Mathtext should be placed between a pair of dollar signs ($). To -make it easy to display monetary values, e.g., “$100.00”, if a -single dollar sign is present in the entire string, it will be -displayed verbatim as a dollar sign. This is a small change from -regular TeX, where the dollar sign in non-math text would have to -be escaped (‘$’).

      -
      -
      -

      Note

      -

      While the syntax inside the pair of dollar signs ($) aims to be -TeX-like, the text outside does not. In particular, characters -such as:

      -
      # $ % & ~ _ ^ \ { } \( \) \[ \]
      -
      -
      -

      have special meaning outside of math mode in TeX. Therefore, these -characters will behave differently depending on the rcParam -text.usetex flag. See the usetex tutorial for more information.

      -
      -
      -

      Subscripts and superscripts

      -

      To make subscripts and superscripts, use the '_' and '^' symbols:

      -
      r'$\alpha_i > \beta_i$'
      -
      -
      -

      Some symbols automatically put their sub/superscripts under and over -the operator. For example, to write the sum of from to -, you could do:

      -
      r'$\sum_{i=0}^\infty x_i$'
      -
      -
      -
      -
      -

      Fractions, binomials and stacked numbers

      -

      Fractions, binomials and stacked numbers can be created with the -\frac{}{}, \binom{}{} and \stackrel{}{} commands, -respectively:

      -
      r'$\frac{3}{4} \binom{3}{4} \stackrel{3}{4}$'
      -
      -
      -

      produces

      -

      Fractions can be arbitrarily nested:

      -
      r'$\frac{5 - \frac{1}{x}}{4}$'
      -
      -
      -

      produces

      -

      Note that special care needs to be taken to place parentheses and brackets around -fractions. Doing things the obvious way produces brackets that are -too small:

      -
      r'$(\frac{5 - \frac{1}{x}}{4})$'
      -
      -
      -

      The solution is to precede the bracket with \left and \right -to inform the parser that those brackets encompass the entire object:

      -
      r'$\left(\frac{5 - \frac{1}{x}}{4}\right)$'
      -
      -
      -
      -
      -

      Radicals

      -

      Radicals can be produced with the \sqrt[]{} command. For example:

      -
      r'$\sqrt{2}$'
      -
      -
      -

      Any base can (optionally) be provided inside square brackets. Note -that the base must be a simple expression, and can not contain layout -commands such as fractions or sub/superscripts:

      -
      r'$\sqrt[3]{x}$'
      -
      -
      -
      -
      -

      Fonts

      -

      The default font is italics for mathematical symbols.

      -
      -

      Note

      -

      This default can be changed using the mathtext.default rcParam. -This is useful, for example, to use the same font as regular -non-math text for math text, by setting it to regular.

      -
      -

      To change fonts, eg, to write “sin” in a Roman font, enclose the text -in a font command:

      -
      r'$s(t) = \mathcal{A}\mathrm{sin}(2 \omega t)$'
      -
      -
      -

      More conveniently, many commonly used function names that are typeset in a -Roman font have shortcuts. So the expression above could be written -as follows:

      -
      r'$s(t) = \mathcal{A}\sin(2 \omega t)$'
      -
      -
      -

      Here “s” and “t” are variable in italics font (default), “sin” is in -Roman font, and the amplitude “A” is in calligraphy font. Note in the -example above the caligraphy A is squished into the sin. You -can use a spacing command to add a little whitespace between them:

      -
      s(t) = \mathcal{A}\/\sin(2 \omega t)
      -
      -

      The choices available with all fonts are:

      -
      -
      ---- - - - - - - - - - - - - - - - - - - - -
      CommandResult
      \mathrm{Roman}
      \mathit{Italic}
      \mathtt{Typewriter}
      \mathcal{CALLIGRAPHY}
      -
      -

      When using the STIX fonts, you also have the choice of:

      -
      -
      ---- - - - - - - - - - - - - - - - - - - - - - - -
      CommandResult
      \mathbb{blackboard}
      \mathrm{\mathbb{blackboard}}
      \mathfrak{Fraktur}
      \mathsf{sansserif}
      \mathrm{\mathsf{sansserif}}
      -
      - ---- - - - - - -
      \mathcircled{circled}
      -

      There are also three global “font sets” to choose from, which are -selected using the mathtext.fontset parameter in -matplotlibrc.

      -

      cm: Computer Modern (TeX)

      -../_images/cm_fontset.png -

      stix: STIX (designed to blend well with Times)

      -../_images/stix_fontset.png -

      stixsans: STIX sans-serif

      -../_images/stixsans_fontset.png -

      Additionally, you can use \mathdefault{...} or its alias -\mathregular{...} to use the font used for regular text outside of -mathtext. There are a number of limitations to this approach, most -notably that far fewer symbols will be available, but it can be useful -to make math expressions blend well with other text in the plot.

      -
      -

      Custom fonts

      -

      mathtext also provides a way to use custom fonts for math. This -method is fairly tricky to use, and should be considered an -experimental feature for patient users only. By setting the rcParam -mathtext.fontset to custom, you can then set the following -parameters, which control which font file to use for a particular set -of math characters.

      -
      -
      ---- - - - - - - - - - - - - - - - - - - - - - - - - - -
      ParameterCorresponds to
      mathtext.it\mathit{} or default italic
      mathtext.rm\mathrm{} Roman (upright)
      mathtext.tt\mathtt{} Typewriter (monospace)
      mathtext.bf\mathbf{} bold italic
      mathtext.cal\mathcal{} calligraphic
      mathtext.sf\mathsf{} sans-serif
      -
      -

      Each parameter should be set to a fontconfig font descriptor (as -defined in the yet-to-be-written font chapter).

      -

      The fonts used should have a Unicode mapping in order to find any -non-Latin characters, such as Greek. If you want to use a math symbol -that is not contained in your custom fonts, you can set the rcParam -mathtext.fallback_to_cm to True which will cause the mathtext -system to use characters from the default Computer Modern fonts -whenever a particular character can not be found in the custom font.

      -

      Note that the math glyphs specified in Unicode have evolved over time, -and many fonts may not have glyphs in the correct place for mathtext.

      -
      -
      -
      -

      Accents

      -

      An accent command may precede any symbol to add an accent above it. -There are long and short forms for some of them.

      -
      -
      ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      CommandResult
      \acute a or \'a
      \bar a
      \breve a
      \ddot a or \"a
      \dot a or \.a
      \grave a or \`a
      \hat a or \^a
      \tilde a or \~a
      \vec a
      \overline{abc}
      -
      -

      In addition, there are two special accents that automatically adjust -to the width of the symbols below:

      -
      -
      ---- - - - - - - - - - - - - - -
      CommandResult
      \widehat{xyz}
      \widetilde{xyz}
      -
      -

      Care should be taken when putting accents on lower-case i’s and j’s. -Note that in the following \imath is used to avoid the extra dot -over the i:

      -
      r"$\hat i\ \ \hat \imath$"
      -
      -
      -
      -
      -

      Symbols

      -

      You can also use a large number of the TeX symbols, as in \infty, -\leftarrow, \sum, \int.

      -

      Lower-case Greek

      -
      -
      ------- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      \alpha \beta \chi \delta \digamma
      \epsilon \eta \gamma \iota \kappa
      \lambda \mu \nu \omega \phi
      \pi \psi \rho \sigma \tau
      \theta \upsilon \varepsilon \varkappa \varphi
      \varpi \varrho \varsigma \vartheta \xi
      \zeta    
      -
      -

      Upper-case Greek

      -
      -
      -------- - - - - - - - - - - - - - - - - - - - - - - - -
      \Delta \Gamma \Lambda \Omega \Phi \Pi
      \Psi \Sigma \Theta \Upsilon \Xi \mho
      \nabla     
      -
      -

      Hebrew

      -
      -
      ------ - - - - - - - -
      \aleph \beth \daleth \gimel
      -
      -

      Delimiters

      -
      -
      -------- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      / [ \Downarrow \Uparrow \Vert \backslash
      \downarrow \langle \lceil \lfloor \llcorner \lrcorner
      \rangle \rceil \rfloor \ulcorner \uparrow \urcorner
      \vert \{ \| \} ] |
      -
      -

      Big symbols

      -
      -
      ------- - - - - - - - - - - - - - - - - - - - - -
      \bigcap \bigcup \bigodot \bigoplus \bigotimes
      \biguplus \bigvee \bigwedge \coprod \int
      \oint \prod \sum  
      -
      -

      Standard function names

      -
      -
      ------ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      \Pr \arccos \arcsin \arctan
      \arg \cos \cosh \cot
      \coth \csc \deg \det
      \dim \exp \gcd \hom
      \inf \ker \lg \lim
      \liminf \limsup \ln \log
      \max \min \sec \sin
      \sinh \sup \tan \tanh
      -
      -

      Binary operation and relation symbols

      -
      -
      ----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      \Bumpeq \Cap \Cup
      \Doteq \Join \Subset
      \Supset \Vdash \Vvdash
      \approx \approxeq \ast
      \asymp \backepsilon \backsim
      \backsimeq \barwedge \because
      \between \bigcirc \bigtriangledown
      \bigtriangleup \blacktriangleleft \blacktriangleright
      \bot \bowtie \boxdot
      \boxminus \boxplus \boxtimes
      \bullet \bumpeq \cap
      \cdot \circ \circeq
      \coloneq \cong \cup
      \curlyeqprec \curlyeqsucc \curlyvee
      \curlywedge \dag \dashv
      \ddag \diamond \div
      \divideontimes \doteq \doteqdot
      \dotplus \doublebarwedge \eqcirc
      \eqcolon \eqsim \eqslantgtr
      \eqslantless \equiv \fallingdotseq
      - ----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      \frown \geq \geqq
      \geqslant \gg \ggg
      \gnapprox \gneqq \gnsim
      \gtrapprox \gtrdot \gtreqless
      \gtreqqless \gtrless \gtrsim
      \in \intercal \leftthreetimes
      \leq \leqq \leqslant
      \lessapprox \lessdot \lesseqgtr
      \lesseqqgtr \lessgtr \lesssim
      \ll \lll \lnapprox
      \lneqq \lnsim \ltimes
      \mid \models \mp
      \nVDash \nVdash \napprox
      \ncong \ne \neq
      \neq \nequiv \ngeq
      \ngtr \ni \nleq
      \nless \nmid \notin
      \nparallel \nprec \nsim
      \nsubset \nsubseteq \nsucc
      \nsupset \nsupseteq \ntriangleleft
      - ----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      \ntrianglelefteq \ntriangleright \ntrianglerighteq
      \nvDash \nvdash \odot
      \ominus \oplus \oslash
      \otimes \parallel \perp
      \pitchfork \pm \prec
      \precapprox \preccurlyeq \preceq
      \precnapprox \precnsim \precsim
      \propto \rightthreetimes \risingdotseq
      \rtimes \sim \simeq
      \slash \smile \sqcap
      \sqcup \sqsubset \sqsubset
      \sqsubseteq \sqsupset \sqsupset
      \sqsupseteq \star \subset
      \subseteq \subseteqq \subsetneq
      \subsetneqq \succ \succapprox
      \succcurlyeq \succeq \succnapprox
      \succnsim \succsim \supset
      \supseteq \supseteqq \supsetneq
      \supsetneqq \therefore \times
      \top \triangleleft \trianglelefteq
      - ----- - - - - - - - - - - - - - - - - - - - - - - -
      \triangleq \triangleright \trianglerighteq
      \uplus \vDash \varpropto
      \vartriangleleft \vartriangleright \vdash
      \vee \veebar \wedge
      \wr  
      -
      -

      Arrow symbols

      -
      -
      ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      \Downarrow \Leftarrow
      \Leftrightarrow \Lleftarrow
      \Longleftarrow \Longleftrightarrow
      \Longrightarrow \Lsh
      \Nearrow \Nwarrow
      \Rightarrow \Rrightarrow
      \Rsh \Searrow
      \Swarrow \Uparrow
      \Updownarrow \circlearrowleft
      \circlearrowright \curvearrowleft
      \curvearrowright \dashleftarrow
      \dashrightarrow \downarrow
      \downdownarrows \downharpoonleft
      \downharpoonright \hookleftarrow
      \hookrightarrow \leadsto
      \leftarrow \leftarrowtail
      \leftharpoondown \leftharpoonup
      \leftleftarrows \leftrightarrow
      \leftrightarrows \leftrightharpoons
      \leftrightsquigarrow \leftsquigarrow
      - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      \longleftarrow \longleftrightarrow
      \longmapsto \longrightarrow
      \looparrowleft \looparrowright
      \mapsto \multimap
      \nLeftarrow \nLeftrightarrow
      \nRightarrow \nearrow
      \nleftarrow \nleftrightarrow
      \nrightarrow \nwarrow
      \rightarrow \rightarrowtail
      \rightharpoondown \rightharpoonup
      \rightleftarrows \rightleftarrows
      \rightleftharpoons \rightleftharpoons
      \rightrightarrows \rightrightarrows
      \rightsquigarrow \searrow
      \swarrow \to
      \twoheadleftarrow \twoheadrightarrow
      \uparrow \updownarrow
      \updownarrow \upharpoonleft
      \upharpoonright \upuparrows
      - ---- - - - - - -
        
      -
      -

      Miscellaneous symbols

      -
      -
      ----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      \$ \AA \Finv
      \Game \Im \P
      \Re \S \angle
      \backprime \bigstar \blacksquare
      \blacktriangle \blacktriangledown \cdots
      \checkmark \circledR \circledS
      \clubsuit \complement \copyright
      \ddots \diamondsuit \ell
      \emptyset \eth \exists
      \flat \forall \hbar
      \heartsuit \hslash \iiint
      \iint \iint \imath
      \infty \jmath \ldots
      \measuredangle \natural \neg
      \nexists \oiiint \partial
      \prime \sharp \spadesuit
      \sphericalangle \ss \triangledown
      \varnothing \vartriangle \vdots
      \wp \yen 
      -
      -

      If a particular symbol does not have a name (as is true of many of the -more obscure symbols in the STIX fonts), Unicode characters can -also be used:

      -
      ur'$\u23ce$'
      -
      -
      -
      -
      -

      Example

      -

      Here is an example illustrating many of these features in context.

      -
      import numpy as np
      -import matplotlib.pyplot as plt
      -t = np.arange(0.0, 2.0, 0.01)
      -s = np.sin(2*np.pi*t)
      -
      -plt.plot(t,s)
      -plt.title(r'$\alpha_i > \beta_i$', fontsize=20)
      -plt.text(1, -0.6, r'$\sum_{i=0}^\infty x_i$', fontsize=20)
      -plt.text(0.6, 0.6, r'$\mathcal{A}\mathrm{sin}(2 \omega t)$',
      -         fontsize=20)
      -plt.xlabel('time (s)')
      -plt.ylabel('volts (mV)')
      -
      -
      -

      (Source code, png, hires.png, pdf)

      -
      -../_images/pyplot_mathtext.png -
      -
      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/users/navigation_toolbar.html b/dev/users/navigation_toolbar.html deleted file mode 100644 index 98a366857b2..00000000000 --- a/dev/users/navigation_toolbar.html +++ /dev/null @@ -1,332 +0,0 @@ - - - - - - - - Interactive navigation — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      Table Of Contents

      - - -

      Previous topic

      -

      Pyplot tutorial

      -

      Next topic

      -

      Customizing matplotlib

      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      Interactive navigation

      -../_images/toolbar.png -

      All figure windows come with a navigation toolbar, which can be used -to navigate through the data set. Here is a description of each of -the buttons at the bottom of the toolbar

      -../_images/home.png -../_images/back.png -../_images/forward.png -
      -
      The Forward and Back buttons
      -
      These are akin to the web browser forward and back buttons. They -are used to navigate back and forth between previously defined -views. They have no meaning unless you have already navigated -somewhere else using the pan and zoom buttons. This is analogous -to trying to click Back on your web browser before visiting a -new page –nothing happens. Home always takes you to the -first, default view of your data. For Home, Forward and -Back, think web browser where data views are web pages. Use -the pan and zoom to rectangle to define new views.
      -
      -../_images/move.png -
      -
      The Pan/Zoom button
      -

      This button has two modes: pan and zoom. Click the toolbar button -to activate panning and zooming, then put your mouse somewhere -over an axes. Press the left mouse button and hold it to pan the -figure, dragging it to a new position. When you release it, the -data under the point where you pressed will be moved to the point -where you released. If you press ‘x’ or ‘y’ while panning the -motion will be constrained to the x or y axis, respectively. Press -the right mouse button to zoom, dragging it to a new position. -The x axis will be zoomed in proportionate to the rightward -movement and zoomed out proportionate to the leftward movement. -Ditto for the y axis and up/down motions. The point under your -mouse when you begin the zoom remains stationary, allowing you to -zoom to an arbitrary point in the figure. You can use the -modifier keys ‘x’, ‘y’ or ‘CONTROL’ to constrain the zoom to the x -axis, the y axis, or aspect ratio preserve, respectively.

      -

      With polar plots, the pan and zoom functionality behaves -differently. The radius axis labels can be dragged using the left -mouse button. The radius scale can be zoomed in and out using the -right mouse button.

      -
      -
      -../_images/zoom_to_rect.png -
      -
      The Zoom-to-rectangle button
      -
      Click this toolbar button to activate this mode. Put your mouse -somewhere over and axes and press the left mouse button. Drag the -mouse while holding the button to a new location and release. The -axes view limits will be zoomed to the rectangle you have defined. -There is also an experimental ‘zoom out to rectangle’ in this mode -with the right button, which will place your entire axes in the -region defined by the zoom out rectangle.
      -
      -../_images/subplots.png -
      -
      The Subplot-configuration button
      -
      Use this tool to configure the parameters of the subplot: the -left, right, top, bottom, space between the rows and space between -the columns.
      -
      -../_images/filesave.png -
      -
      The Save button
      -
      Click this button to launch a file save dialog. You can save -files with the following extensions: png, ps, eps, -svg and pdf.
      -
      - -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/users/path_tutorial-1.hires.png b/dev/users/path_tutorial-1.hires.png deleted file mode 100644 index f19cbb576ab..00000000000 Binary files a/dev/users/path_tutorial-1.hires.png and /dev/null differ diff --git a/dev/users/path_tutorial-1.pdf b/dev/users/path_tutorial-1.pdf deleted file mode 100644 index c261234aa17..00000000000 Binary files a/dev/users/path_tutorial-1.pdf and /dev/null differ diff --git a/dev/users/path_tutorial-1.png b/dev/users/path_tutorial-1.png deleted file mode 100644 index 75397957af3..00000000000 Binary files a/dev/users/path_tutorial-1.png and /dev/null differ diff --git a/dev/users/path_tutorial-1.py b/dev/users/path_tutorial-1.py deleted file mode 100644 index dcb420135bc..00000000000 --- a/dev/users/path_tutorial-1.py +++ /dev/null @@ -1,28 +0,0 @@ -import matplotlib.pyplot as plt -from matplotlib.path import Path -import matplotlib.patches as patches - -verts = [ - (0., 0.), # left, bottom - (0., 1.), # left, top - (1., 1.), # right, top - (1., 0.), # right, bottom - (0., 0.), # ignored - ] - -codes = [Path.MOVETO, - Path.LINETO, - Path.LINETO, - Path.LINETO, - Path.CLOSEPOLY, - ] - -path = Path(verts, codes) - -fig = plt.figure() -ax = fig.add_subplot(111) -patch = patches.PathPatch(path, facecolor='orange', lw=2) -ax.add_patch(patch) -ax.set_xlim(-2,2) -ax.set_ylim(-2,2) -plt.show() \ No newline at end of file diff --git a/dev/users/path_tutorial-2.hires.png b/dev/users/path_tutorial-2.hires.png deleted file mode 100644 index 590feacfa00..00000000000 Binary files a/dev/users/path_tutorial-2.hires.png and /dev/null differ diff --git a/dev/users/path_tutorial-2.pdf b/dev/users/path_tutorial-2.pdf deleted file mode 100644 index 6ccf5db4db5..00000000000 Binary files a/dev/users/path_tutorial-2.pdf and /dev/null differ diff --git a/dev/users/path_tutorial-2.png b/dev/users/path_tutorial-2.png deleted file mode 100644 index f65b51f5c59..00000000000 Binary files a/dev/users/path_tutorial-2.png and /dev/null differ diff --git a/dev/users/path_tutorial-2.py b/dev/users/path_tutorial-2.py deleted file mode 100644 index ccadb7171c2..00000000000 --- a/dev/users/path_tutorial-2.py +++ /dev/null @@ -1,35 +0,0 @@ -import matplotlib.pyplot as plt -from matplotlib.path import Path -import matplotlib.patches as patches - -verts = [ - (0., 0.), # P0 - (0.2, 1.), # P1 - (1., 0.8), # P2 - (0.8, 0.), # P3 - ] - -codes = [Path.MOVETO, - Path.CURVE4, - Path.CURVE4, - Path.CURVE4, - ] - -path = Path(verts, codes) - -fig = plt.figure() -ax = fig.add_subplot(111) -patch = patches.PathPatch(path, facecolor='none', lw=2) -ax.add_patch(patch) - -xs, ys = zip(*verts) -ax.plot(xs, ys, 'x--', lw=2, color='black', ms=10) - -ax.text(-0.05, -0.05, 'P0') -ax.text(0.15, 1.05, 'P1') -ax.text(1.05, 0.85, 'P2') -ax.text(0.85, -0.05, 'P3') - -ax.set_xlim(-0.1, 1.1) -ax.set_ylim(-0.1, 1.1) -plt.show() \ No newline at end of file diff --git a/dev/users/path_tutorial.html b/dev/users/path_tutorial.html deleted file mode 100644 index 8cf40f3301f..00000000000 --- a/dev/users/path_tutorial.html +++ /dev/null @@ -1,378 +0,0 @@ - - - - - - - - Path Tutorial — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      Table Of Contents

      - - -

      Previous topic

      -

      Transformations Tutorial

      -

      Next topic

      -

      Annotating Axes

      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      Path Tutorial

      -

      The object underlying all of the matplotlib.patch objects is -the Path, which supports the standard set of -moveto, lineto, curveto commands to draw simple and compound outlines -consisting of line segments and splines. The Path is instantiated -with a (N,2) array of (x,y) vertices, and a N-length array of path -codes. For example to draw the unit rectangle from (0,0) to (1,1), we -could use this code

      -
      import matplotlib.pyplot as plt
      -from matplotlib.path import Path
      -import matplotlib.patches as patches
      -
      -verts = [
      -    (0., 0.), # left, bottom
      -    (0., 1.), # left, top
      -    (1., 1.), # right, top
      -    (1., 0.), # right, bottom
      -    (0., 0.), # ignored
      -    ]
      -
      -codes = [Path.MOVETO,
      -         Path.LINETO,
      -         Path.LINETO,
      -         Path.LINETO,
      -         Path.CLOSEPOLY,
      -         ]
      -
      -path = Path(verts, codes)
      -
      -fig = plt.figure()
      -ax = fig.add_subplot(111)
      -patch = patches.PathPatch(path, facecolor='orange', lw=2)
      -ax.add_patch(patch)
      -ax.set_xlim(-2,2)
      -ax.set_ylim(-2,2)
      -plt.show()
      -
      -
      -

      (Source code, png, hires.png, pdf)

      -
      -../_images/path_tutorial-1.png -
      -

      The following path codes are recognized

      - ----- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      CodeVerticesDescription
      STOP1 (ignored)A marker for the end of the entire path (currently not required and ignored)
      MOVETO1Pick up the pen and move to the given vertex.
      LINETO1Draw a line from the current position to the given vertex.
      CURVE32 (1 control point, 1 endpoint)Draw a quadratic Bézier curve from the current position, with the given control point, to the given end point.
      CURVE43 (2 control points, 1 endpoint)Draw a cubic Bézier curve from the current position, with the given control points, to the given end point.
      CLOSEPOLY1 (point itself is ignored)Draw a line segment to the start point of the current polyline.
      -
      -

      Bézier example

      -

      Some of the path components require multiple vertices to specify them: -for example CURVE 3 is a bézier curve with one -control point and one end point, and CURVE4 has three vertices for the -two control points and the end point. The example below shows a -CURVE4 Bézier spline – the bézier curve will be contained in the -convex hull of the start point, the two control points, and the end -point

      -
      import matplotlib.pyplot as plt
      -from matplotlib.path import Path
      -import matplotlib.patches as patches
      -
      -verts = [
      -    (0., 0.),  # P0
      -    (0.2, 1.), # P1
      -    (1., 0.8), # P2
      -    (0.8, 0.), # P3
      -    ]
      -
      -codes = [Path.MOVETO,
      -         Path.CURVE4,
      -         Path.CURVE4,
      -         Path.CURVE4,
      -         ]
      -
      -path = Path(verts, codes)
      -
      -fig = plt.figure()
      -ax = fig.add_subplot(111)
      -patch = patches.PathPatch(path, facecolor='none', lw=2)
      -ax.add_patch(patch)
      -
      -xs, ys = zip(*verts)
      -ax.plot(xs, ys, 'x--', lw=2, color='black', ms=10)
      -
      -ax.text(-0.05, -0.05, 'P0')
      -ax.text(0.15, 1.05, 'P1')
      -ax.text(1.05, 0.85, 'P2')
      -ax.text(0.85, -0.05, 'P3')
      -
      -ax.set_xlim(-0.1, 1.1)
      -ax.set_ylim(-0.1, 1.1)
      -plt.show()
      -
      -
      -

      (Source code, png, hires.png, pdf)

      -
      -../_images/path_tutorial-2.png -
      -
      -
      -

      Compound paths

      -

      All of the simple patch primitives in matplotlib, Rectangle, Circle, -Polygon, etc, are implemented with simple path. Plotting functions -like hist() and -bar(), which create a number of -primitives, eg a bunch of Rectangles, can usually be implemented more -efficiently using a compound path. The reason bar creates a list -of rectangles and not a compound path is largely historical: the -Path code is comparatively new and bar -predates it. While we could change it now, it would break old code, -so here we will cover how to create compound paths, replacing the -functionality in bar, in case you need to do so in your own code for -efficiency reasons, eg you are creating an animated bar plot.

      -

      We will make the histogram chart by creating a series of rectangles -for each histogram bar: the rectangle width is the bin width and the -rectangle height is the number of datapoints in that bin. First we’ll -create some random normally distributed data and compute the -histogram. Because numpy returns the bin edges and not centers, the -length of bins is 1 greater than the length of n in the -example below:

      -
      # histogram our data with numpy
      -data = np.random.randn(1000)
      -n, bins = np.histogram(data, 100)
      -
      -
      -

      We’ll now extract the corners of the rectangles. Each of the -left, bottom, etc, arrays below is len(n), where n is -the array of counts for each histogram bar:

      -
      # 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
      -
      -
      -

      Now we have to construct our compound path, which will consist of a -series of MOVETO, LINETO and CLOSEPOLY for each rectangle. -For each rectangle, we need 5 vertices: 1 for the MOVETO, 3 for -the LINETO, and 1 for the CLOSEPOLY. As indicated in the -table above, the vertex 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
      -
      -
      -

      All that remains is to create the path, attach it to a -PathPatch, and add it to our axes:

      -
      barpath = path.Path(verts, codes)
      -patch = patches.PathPatch(barpath, facecolor='green',
      -  edgecolor='yellow', alpha=0.5)
      -ax.add_patch(patch)
      -
      -
      -

      Here is the result

      -

      (Source code, png, hires.png, pdf)

      -
      -../_images/compound_path_demo.png -
      -
      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/users/pgf.html b/dev/users/pgf.html deleted file mode 100644 index 032e5f1fff4..00000000000 --- a/dev/users/pgf.html +++ /dev/null @@ -1,379 +0,0 @@ - - - - - - - - Typesetting With XeLaTeX/LuaLaTeX — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      Table Of Contents

      - - -

      Previous topic

      -

      Writing mathematical expressions

      -

      Next topic

      -

      Text rendering With LaTeX

      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      Typesetting With XeLaTeX/LuaLaTeX

      -

      Using the pgf backend, matplotlib can export figures as pgf drawing commands -that can be processed with pdflatex, xelatex or lualatex. XeLaTeX and LuaLaTeX -have full unicode support and can use any font that is installed in the operating -system, making use of advanced typographic features of OpenType, AAT and -Graphite. Pgf pictures created by plt.savefig('figure.pgf') can be -embedded as raw commands in LaTeX documents. Figures can also be directly -compiled and saved to PDF with plt.savefig('figure.pdf') by either -switching to the backend

      -
      matplotlib.use('pgf')
      -
      -
      -

      or registering it for handling pdf output

      -
      from matplotlib.backends.backend_pgf import FigureCanvasPgf
      -matplotlib.backend_bases.register_backend('pdf', FigureCanvasPgf)
      -
      -
      -

      The second method allows you to keep using regular interactive backends and to -save xelatex, lualatex or pdflatex compiled PDF files from the graphical user interface.

      -

      Matplotlib’s pgf support requires a recent LaTeX installation that includes -the TikZ/PGF packages (such as TeXLive), preferably with XeLaTeX or LuaLaTeX -installed. If either pdftocairo or ghostscript is present on your system, -figures can optionally be saved to PNG images as well. The executables -for all applications must be located on your PATH.

      -

      Rc parameters that control the behavior of the pgf backend:

      -
      -
      ---- - - - - - - - - - - - - - - - - -
      ParameterDocumentation
      pgf.preambleLines to be included in the LaTeX preamble
      pgf.rcfontsSetup fonts from rc params using the fontspec package
      pgf.texsystemEither “xelatex” (default), “lualatex” or “pdflatex”
      -
      -
      -

      Note

      -

      TeX defines a set of special characters, such as:

      -
      # $ % & ~ _ ^ \ { }
      -
      -
      -

      Generally, these characters must be escaped correctly. For convenience, -some characters (_,^,%) are automatically escaped outside of math -environments.

      -
      -
      -

      Font specification

      -

      The fonts used for obtaining the size of text elements or when compiling -figures to PDF are usually defined in the matplotlib rc parameters. You can -also use the LaTeX default Computer Modern fonts by clearing the lists for -font.serif, font.sans-serif or font.monospace. Please note that -the glyph coverage of these fonts is very limited. If you want to keep the -Computer Modern font face but require extended unicode support, consider -installing the Computer Modern Unicode -fonts CMU Serif, CMU Sans Serif, etc.

      -

      When saving to .pgf, the font configuration matplotlib used for the -layout of the figure is included in the header of the text file.

      -
      # -*- coding: utf-8 -*-
      -
      -import matplotlib as mpl
      -mpl.use("pgf")
      -pgf_with_rc_fonts = {
      -    "font.family": "serif",
      -    "font.serif": [],                   # use latex default serif font
      -    "font.sans-serif": ["DejaVu Sans"], # use a specific sans-serif font
      -}
      -mpl.rcParams.update(pgf_with_rc_fonts)
      -
      -import matplotlib.pyplot as plt
      -plt.figure(figsize=(4.5,2.5))
      -plt.plot(range(5))
      -plt.text(0.5, 3., "serif")
      -plt.text(0.5, 2., "monospace", family="monospace")
      -plt.text(2.5, 2., "sans-serif", family="sans-serif")
      -plt.text(2.5, 1., "comic sans", family="Comic Sans MS")
      -plt.xlabel(u"µ is not $\\mu$")
      -plt.tight_layout(.5)
      -
      -
      -../_images/pgf_fonts.png -
      -
      -

      Custom preamble

      -

      Full customization is possible by adding your own commands to the preamble. -Use the pgf.preamble parameter if you want to configure the math fonts, -using unicode-math for example, or for loading additional packages. Also, -if you want to do the font configuration yourself instead of using the fonts -specified in the rc parameters, make sure to disable pgf.rcfonts.

      -
      # -*- coding: utf-8 -*-
      -
      -import matplotlib as mpl
      -mpl.use("pgf")
      -pgf_with_custom_preamble = {
      -    "font.family": "serif", # use serif/main font for text elements
      -    "text.usetex": True,    # use inline math for ticks
      -    "pgf.rcfonts": False,   # don't setup fonts from rc parameters
      -    "pgf.preamble": [
      -         r"\usepackage{units}",         # load additional packages
      -         r"\usepackage{metalogo}",
      -         r"\usepackage{unicode-math}",  # unicode math setup
      -         r"\setmathfont{xits-math.otf}",
      -         r"\setmainfont{DejaVu Serif}", # serif font via preamble
      -         ]
      -}
      -mpl.rcParams.update(pgf_with_custom_preamble)
      -
      -import matplotlib.pyplot as plt
      -plt.figure(figsize=(4.5,2.5))
      -plt.plot(range(5))
      -plt.xlabel(u"unicode text: я, ψ, €, ü, \\unitfrac[10]{°}{µm}")
      -plt.ylabel(u"\\XeLaTeX")
      -plt.legend([u"unicode math: $λ=∑_i^∞ μ_i^2$"])
      -plt.tight_layout(.5)
      -
      -
      -../_images/pgf_preamble.png -
      -
      -

      Choosing the TeX system

      -

      The TeX system to be used by matplotlib is chosen by the pgf.texsystem -parameter. Possible values are 'xelatex' (default), 'lualatex' and -'pdflatex'. Please note that when selecting pdflatex the fonts and -unicode handling must be configured in the preamble.

      -
      # -*- coding: utf-8 -*-
      -
      -import matplotlib as mpl
      -mpl.use("pgf")
      -pgf_with_pdflatex = {
      -    "pgf.texsystem": "pdflatex",
      -    "pgf.preamble": [
      -         r"\usepackage[utf8x]{inputenc}",
      -         r"\usepackage[T1]{fontenc}",
      -         r"\usepackage{cmbright}",
      -         ]
      -}
      -mpl.rcParams.update(pgf_with_pdflatex)
      -
      -import matplotlib.pyplot as plt
      -plt.figure(figsize=(4.5,2.5))
      -plt.plot(range(5))
      -plt.text(0.5, 3., "serif", family="serif")
      -plt.text(0.5, 2., "monospace", family="monospace")
      -plt.text(2.5, 2., "sans-serif", family="sans-serif")
      -plt.xlabel(u"µ is not $\\mu$")
      -plt.tight_layout(.5)
      -
      -
      -../_images/pgf_texsystem.png -
      -
      -

      Troubleshooting

      -
        -
      • Please note that the TeX packages found in some Linux distributions and -MiKTeX installations are dramatically outdated. Make sure to update your -package catalog and upgrade or install a recent TeX distribution.
      • -
      • On Windows, the PATH environment variable may need to be modified -to include the directories containing the latex, dvipng and ghostscript -executables. See Environment Variables and -Setting environment variables in windows for details.
      • -
      • A limitation on Windows causes the backend to keep file handles that have -been opened by your application open. As a result, it may not be possible -to delete the corresponding files until the application closes (see -#1324).
      • -
      • Sometimes the font rendering in figures that are saved to png images is -very bad. This happens when the pdftocairo tool is not available and -ghostscript is used for the pdf to png conversion.
      • -
      • Make sure what you are trying to do is possible in a LaTeX document, -that your LaTeX syntax is valid and that you are using raw strings -if necessary to avoid unintended escape sequences.
      • -
      • The pgf.preamble rc setting provides lots of flexibility, and lots of -ways to cause problems. When experiencing problems, try to minimalize or -disable the custom preamble.
      • -
      • Configuring an unicode-math environment can be a bit tricky. The -TeXLive distribution for example provides a set of math fonts which are -usually not installed system-wide. XeTeX, unlike LuaLatex, cannot find -these fonts by their name, which is why you might have to specify -\setmathfont{xits-math.otf} instead of \setmathfont{XITS Math} or -alternatively make the fonts available to your OS. See this -tex.stackexchange.com question -for more details.
      • -
      • If the font configuration used by matplotlib differs from the font setting -in yout LaTeX document, the alignment of text elements in imported figures -may be off. Check the header of your .pgf file if you are unsure about -the fonts matplotlib used for the layout.
      • -
      • If you still need help, please see Getting help
      • -
      -
      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/users/plotting/examples/anchored_box01.hires.png b/dev/users/plotting/examples/anchored_box01.hires.png deleted file mode 100644 index 6c8225f3bc3..00000000000 Binary files a/dev/users/plotting/examples/anchored_box01.hires.png and /dev/null differ diff --git a/dev/users/plotting/examples/anchored_box01.pdf b/dev/users/plotting/examples/anchored_box01.pdf deleted file mode 100644 index c77c752bb9a..00000000000 Binary files a/dev/users/plotting/examples/anchored_box01.pdf and /dev/null differ diff --git a/dev/users/plotting/examples/anchored_box01.png b/dev/users/plotting/examples/anchored_box01.png deleted file mode 100644 index ec4f38a0f85..00000000000 Binary files a/dev/users/plotting/examples/anchored_box01.png and /dev/null differ diff --git a/dev/users/plotting/examples/anchored_box01.py b/dev/users/plotting/examples/anchored_box01.py deleted file mode 100644 index 517a2f88d15..00000000000 --- a/dev/users/plotting/examples/anchored_box01.py +++ /dev/null @@ -1,14 +0,0 @@ -import matplotlib.pyplot as plt -from mpl_toolkits.axes_grid.anchored_artists import AnchoredText - -fig=plt.figure(1, figsize=(3,3)) -ax = plt.subplot(111) - -at = AnchoredText("Figure 1a", - prop=dict(size=15), frameon=True, - loc=2, - ) -at.patch.set_boxstyle("round,pad=0.,rounding_size=0.2") -ax.add_artist(at) - -plt.show() diff --git a/dev/users/plotting/examples/anchored_box02.hires.png b/dev/users/plotting/examples/anchored_box02.hires.png deleted file mode 100644 index 7f2c3209ab7..00000000000 Binary files a/dev/users/plotting/examples/anchored_box02.hires.png and /dev/null differ diff --git a/dev/users/plotting/examples/anchored_box02.pdf b/dev/users/plotting/examples/anchored_box02.pdf deleted file mode 100644 index 1b99fd6786b..00000000000 Binary files a/dev/users/plotting/examples/anchored_box02.pdf and /dev/null differ diff --git a/dev/users/plotting/examples/anchored_box02.png b/dev/users/plotting/examples/anchored_box02.png deleted file mode 100644 index a4c3981cf98..00000000000 Binary files a/dev/users/plotting/examples/anchored_box02.png and /dev/null differ diff --git a/dev/users/plotting/examples/anchored_box02.py b/dev/users/plotting/examples/anchored_box02.py deleted file mode 100644 index 6f8db6dd8de..00000000000 --- a/dev/users/plotting/examples/anchored_box02.py +++ /dev/null @@ -1,18 +0,0 @@ -from matplotlib.patches import Circle -import matplotlib.pyplot as plt -from mpl_toolkits.axes_grid.anchored_artists import AnchoredDrawingArea - -fig=plt.figure(1, figsize=(3,3)) -ax = plt.subplot(111) - - -ada = AnchoredDrawingArea(40, 20, 0, 0, - loc=1, pad=0., frameon=False) -p1 = Circle((10, 10), 10) -ada.drawing_area.add_artist(p1) -p2 = Circle((30, 10), 5, fc="r") -ada.drawing_area.add_artist(p2) - -ax.add_artist(ada) - -plt.show() diff --git a/dev/users/plotting/examples/anchored_box03.hires.png b/dev/users/plotting/examples/anchored_box03.hires.png deleted file mode 100644 index 5696ab62f1b..00000000000 Binary files a/dev/users/plotting/examples/anchored_box03.hires.png and /dev/null differ diff --git a/dev/users/plotting/examples/anchored_box03.pdf b/dev/users/plotting/examples/anchored_box03.pdf deleted file mode 100644 index 3d14c64bf05..00000000000 Binary files a/dev/users/plotting/examples/anchored_box03.pdf and /dev/null differ diff --git a/dev/users/plotting/examples/anchored_box03.png b/dev/users/plotting/examples/anchored_box03.png deleted file mode 100644 index 586f2f3e062..00000000000 Binary files a/dev/users/plotting/examples/anchored_box03.png and /dev/null differ diff --git a/dev/users/plotting/examples/anchored_box03.py b/dev/users/plotting/examples/anchored_box03.py deleted file mode 100644 index 0848e1b9d27..00000000000 --- a/dev/users/plotting/examples/anchored_box03.py +++ /dev/null @@ -1,14 +0,0 @@ -from matplotlib.patches import Ellipse -import matplotlib.pyplot as plt -from mpl_toolkits.axes_grid.anchored_artists import AnchoredAuxTransformBox - -fig=plt.figure(1, figsize=(3,3)) -ax = plt.subplot(111) - -box = AnchoredAuxTransformBox(ax.transData, loc=2) -el = Ellipse((0,0), width=0.1, height=0.4, angle=30) # in data coordinates! -box.drawing_area.add_artist(el) - -ax.add_artist(box) - -plt.show() diff --git a/dev/users/plotting/examples/anchored_box04.hires.png b/dev/users/plotting/examples/anchored_box04.hires.png deleted file mode 100644 index 69e88dde6c7..00000000000 Binary files a/dev/users/plotting/examples/anchored_box04.hires.png and /dev/null differ diff --git a/dev/users/plotting/examples/anchored_box04.pdf b/dev/users/plotting/examples/anchored_box04.pdf deleted file mode 100644 index 3ca1fe61536..00000000000 Binary files a/dev/users/plotting/examples/anchored_box04.pdf and /dev/null differ diff --git a/dev/users/plotting/examples/anchored_box04.png b/dev/users/plotting/examples/anchored_box04.png deleted file mode 100644 index e9633a1f913..00000000000 Binary files a/dev/users/plotting/examples/anchored_box04.png and /dev/null differ diff --git a/dev/users/plotting/examples/anchored_box04.py b/dev/users/plotting/examples/anchored_box04.py deleted file mode 100644 index 570c7316214..00000000000 --- a/dev/users/plotting/examples/anchored_box04.py +++ /dev/null @@ -1,35 +0,0 @@ -from matplotlib.patches import Ellipse -import matplotlib.pyplot as plt -from matplotlib.offsetbox import AnchoredOffsetbox, TextArea, DrawingArea, HPacker - -fig=plt.figure(1, figsize=(3,3)) -ax = plt.subplot(111) - -box1 = TextArea(" Test : ", textprops=dict(color="k")) - -box2 = DrawingArea(60, 20, 0, 0) -el1 = Ellipse((10, 10), width=16, height=5, angle=30, fc="r") -el2 = Ellipse((30, 10), width=16, height=5, angle=170, fc="g") -el3 = Ellipse((50, 10), width=16, height=5, angle=230, fc="b") -box2.add_artist(el1) -box2.add_artist(el2) -box2.add_artist(el3) - - -box = HPacker(children=[box1, box2], - align="center", - pad=0, sep=5) - -anchored_box = AnchoredOffsetbox(loc=3, - child=box, pad=0., - frameon=True, - bbox_to_anchor=(0., 1.02), - bbox_transform=ax.transAxes, - borderpad=0., - ) - - -ax.add_artist(anchored_box) - -fig.subplots_adjust(top=0.8) -plt.show() diff --git a/dev/users/plotting/examples/annotate_explain.hires.png b/dev/users/plotting/examples/annotate_explain.hires.png deleted file mode 100644 index b2789ab48cd..00000000000 Binary files a/dev/users/plotting/examples/annotate_explain.hires.png and /dev/null differ diff --git a/dev/users/plotting/examples/annotate_explain.pdf b/dev/users/plotting/examples/annotate_explain.pdf deleted file mode 100644 index 57df2f1ee05..00000000000 Binary files a/dev/users/plotting/examples/annotate_explain.pdf and /dev/null differ diff --git a/dev/users/plotting/examples/annotate_explain.png b/dev/users/plotting/examples/annotate_explain.png deleted file mode 100644 index 62935ea3f9a..00000000000 Binary files a/dev/users/plotting/examples/annotate_explain.png and /dev/null differ diff --git a/dev/users/plotting/examples/annotate_explain.py b/dev/users/plotting/examples/annotate_explain.py deleted file mode 100644 index 6dadbd5e541..00000000000 --- a/dev/users/plotting/examples/annotate_explain.py +++ /dev/null @@ -1,103 +0,0 @@ - -import matplotlib.pyplot as plt -import matplotlib.patches as mpatches - -x1, y1 = 0.3, 0.3 -x2, y2 = 0.7, 0.7 - -fig = plt.figure(1, figsize=(8,3)) -fig.clf() -from mpl_toolkits.axes_grid.axes_grid import AxesGrid -from mpl_toolkits.axes_grid.anchored_artists import AnchoredText - -#from matplotlib.font_manager import FontProperties - -def add_at(ax, t, loc=2): - fp = dict(size=10) - _at = AnchoredText(t, loc=loc, prop=fp) - ax.add_artist(_at) - return _at - - -grid = AxesGrid(fig, 111, (1, 4), label_mode="1", share_all=True) - -grid[0].set_autoscale_on(False) - -ax = grid[0] -ax.plot([x1, x2], [y1, y2], ".") -el = mpatches.Ellipse((x1, y1), 0.3, 0.4, angle=30, alpha=0.2) -ax.add_artist(el) -ax.annotate("", - xy=(x1, y1), xycoords='data', - xytext=(x2, y2), textcoords='data', - arrowprops=dict(arrowstyle="-", #linestyle="dashed", - color="0.5", - patchB=None, - shrinkB=0, - connectionstyle="arc3,rad=0.3", - ), - ) - -add_at(ax, "connect", loc=2) - -ax = grid[1] -ax.plot([x1, x2], [y1, y2], ".") -el = mpatches.Ellipse((x1, y1), 0.3, 0.4, angle=30, alpha=0.2) -ax.add_artist(el) -ax.annotate("", - xy=(x1, y1), xycoords='data', - xytext=(x2, y2), textcoords='data', - arrowprops=dict(arrowstyle="-", #linestyle="dashed", - color="0.5", - patchB=el, - shrinkB=0, - connectionstyle="arc3,rad=0.3", - ), - ) - -add_at(ax, "clip", loc=2) - - -ax = grid[2] -ax.plot([x1, x2], [y1, y2], ".") -el = mpatches.Ellipse((x1, y1), 0.3, 0.4, angle=30, alpha=0.2) -ax.add_artist(el) -ax.annotate("", - xy=(x1, y1), xycoords='data', - xytext=(x2, y2), textcoords='data', - arrowprops=dict(arrowstyle="-", #linestyle="dashed", - color="0.5", - patchB=el, - shrinkB=5, - connectionstyle="arc3,rad=0.3", - ), - ) - -add_at(ax, "shrink", loc=2) - - -ax = grid[3] -ax.plot([x1, x2], [y1, y2], ".") -el = mpatches.Ellipse((x1, y1), 0.3, 0.4, angle=30, alpha=0.2) -ax.add_artist(el) -ax.annotate("", - xy=(x1, y1), xycoords='data', - xytext=(x2, y2), textcoords='data', - arrowprops=dict(arrowstyle="fancy", #linestyle="dashed", - color="0.5", - patchB=el, - shrinkB=5, - connectionstyle="arc3,rad=0.3", - ), - ) - -add_at(ax, "mutate", loc=2) - -grid[0].set_xlim(0, 1) -grid[0].set_ylim(0, 1) -grid[0].axis["bottom"].toggle(ticklabels=False) -grid[0].axis["left"].toggle(ticklabels=False) -fig.subplots_adjust(left=0.05, right=0.95, bottom=0.05, top=0.95) - -plt.draw() -plt.show() diff --git a/dev/users/plotting/examples/annotate_simple01.hires.png b/dev/users/plotting/examples/annotate_simple01.hires.png deleted file mode 100644 index 366649736db..00000000000 Binary files a/dev/users/plotting/examples/annotate_simple01.hires.png and /dev/null differ diff --git a/dev/users/plotting/examples/annotate_simple01.pdf b/dev/users/plotting/examples/annotate_simple01.pdf deleted file mode 100644 index cd1b7a10ef7..00000000000 Binary files a/dev/users/plotting/examples/annotate_simple01.pdf and /dev/null differ diff --git a/dev/users/plotting/examples/annotate_simple01.png b/dev/users/plotting/examples/annotate_simple01.png deleted file mode 100644 index 8b7325a419b..00000000000 Binary files a/dev/users/plotting/examples/annotate_simple01.png and /dev/null differ diff --git a/dev/users/plotting/examples/annotate_simple01.py b/dev/users/plotting/examples/annotate_simple01.py deleted file mode 100644 index 1a376b66f5b..00000000000 --- a/dev/users/plotting/examples/annotate_simple01.py +++ /dev/null @@ -1,14 +0,0 @@ -import matplotlib.pyplot as plt - -plt.figure(1, figsize=(3,3)) -ax = plt.subplot(111) - -ax.annotate("", - xy=(0.2, 0.2), xycoords='data', - xytext=(0.8, 0.8), textcoords='data', - arrowprops=dict(arrowstyle="->", - connectionstyle="arc3"), - ) - -plt.show() - diff --git a/dev/users/plotting/examples/annotate_simple02.hires.png b/dev/users/plotting/examples/annotate_simple02.hires.png deleted file mode 100644 index 7b1456617b1..00000000000 Binary files a/dev/users/plotting/examples/annotate_simple02.hires.png and /dev/null differ diff --git a/dev/users/plotting/examples/annotate_simple02.pdf b/dev/users/plotting/examples/annotate_simple02.pdf deleted file mode 100644 index c44c2ef6006..00000000000 Binary files a/dev/users/plotting/examples/annotate_simple02.pdf and /dev/null differ diff --git a/dev/users/plotting/examples/annotate_simple02.png b/dev/users/plotting/examples/annotate_simple02.png deleted file mode 100644 index 5ae9cb87fba..00000000000 Binary files a/dev/users/plotting/examples/annotate_simple02.png and /dev/null differ diff --git a/dev/users/plotting/examples/annotate_simple02.py b/dev/users/plotting/examples/annotate_simple02.py deleted file mode 100644 index 25bb0002de5..00000000000 --- a/dev/users/plotting/examples/annotate_simple02.py +++ /dev/null @@ -1,15 +0,0 @@ -import matplotlib.pyplot as plt - -plt.figure(1, figsize=(3,3)) -ax = plt.subplot(111) - -ax.annotate("Test", - xy=(0.2, 0.2), xycoords='data', - xytext=(0.8, 0.8), textcoords='data', - size=20, va="center", ha="center", - arrowprops=dict(arrowstyle="simple", - connectionstyle="arc3,rad=-0.2"), - ) - -plt.show() - diff --git a/dev/users/plotting/examples/annotate_simple03.hires.png b/dev/users/plotting/examples/annotate_simple03.hires.png deleted file mode 100644 index cd838bee1b2..00000000000 Binary files a/dev/users/plotting/examples/annotate_simple03.hires.png and /dev/null differ diff --git a/dev/users/plotting/examples/annotate_simple03.pdf b/dev/users/plotting/examples/annotate_simple03.pdf deleted file mode 100644 index d19aecbc332..00000000000 Binary files a/dev/users/plotting/examples/annotate_simple03.pdf and /dev/null differ diff --git a/dev/users/plotting/examples/annotate_simple03.png b/dev/users/plotting/examples/annotate_simple03.png deleted file mode 100644 index 8c43cf259c8..00000000000 Binary files a/dev/users/plotting/examples/annotate_simple03.png and /dev/null differ diff --git a/dev/users/plotting/examples/annotate_simple03.py b/dev/users/plotting/examples/annotate_simple03.py deleted file mode 100644 index 61a885afd2a..00000000000 --- a/dev/users/plotting/examples/annotate_simple03.py +++ /dev/null @@ -1,17 +0,0 @@ -import matplotlib.pyplot as plt - -plt.figure(1, figsize=(3,3)) -ax = plt.subplot(111) - -ann = ax.annotate("Test", - xy=(0.2, 0.2), xycoords='data', - xytext=(0.8, 0.8), textcoords='data', - size=20, va="center", ha="center", - bbox=dict(boxstyle="round4", fc="w"), - arrowprops=dict(arrowstyle="-|>", - connectionstyle="arc3,rad=-0.2", - fc="w"), - ) - -plt.show() - diff --git a/dev/users/plotting/examples/annotate_simple04.hires.png b/dev/users/plotting/examples/annotate_simple04.hires.png deleted file mode 100644 index 159ae76d012..00000000000 Binary files a/dev/users/plotting/examples/annotate_simple04.hires.png and /dev/null differ diff --git a/dev/users/plotting/examples/annotate_simple04.pdf b/dev/users/plotting/examples/annotate_simple04.pdf deleted file mode 100644 index 9245c418b11..00000000000 Binary files a/dev/users/plotting/examples/annotate_simple04.pdf and /dev/null differ diff --git a/dev/users/plotting/examples/annotate_simple04.png b/dev/users/plotting/examples/annotate_simple04.png deleted file mode 100644 index 7c78a79d84a..00000000000 Binary files a/dev/users/plotting/examples/annotate_simple04.png and /dev/null differ diff --git a/dev/users/plotting/examples/annotate_simple04.py b/dev/users/plotting/examples/annotate_simple04.py deleted file mode 100644 index cdbb1d80417..00000000000 --- a/dev/users/plotting/examples/annotate_simple04.py +++ /dev/null @@ -1,29 +0,0 @@ -import matplotlib.pyplot as plt - -plt.figure(1, figsize=(3,3)) -ax = plt.subplot(111) - -ann = ax.annotate("Test", - xy=(0.2, 0.2), xycoords='data', - xytext=(0.8, 0.8), textcoords='data', - size=20, va="center", ha="center", - bbox=dict(boxstyle="round4", fc="w"), - arrowprops=dict(arrowstyle="-|>", - connectionstyle="arc3,rad=0.2", - relpos=(0., 0.), - fc="w"), - ) - -ann = ax.annotate("Test", - xy=(0.2, 0.2), xycoords='data', - xytext=(0.8, 0.8), textcoords='data', - size=20, va="center", ha="center", - bbox=dict(boxstyle="round4", fc="w"), - arrowprops=dict(arrowstyle="-|>", - connectionstyle="arc3,rad=-0.2", - relpos=(1., 0.), - fc="w"), - ) - -plt.show() - diff --git a/dev/users/plotting/examples/annotate_simple_coord01.hires.png b/dev/users/plotting/examples/annotate_simple_coord01.hires.png deleted file mode 100644 index 549939ca93c..00000000000 Binary files a/dev/users/plotting/examples/annotate_simple_coord01.hires.png and /dev/null differ diff --git a/dev/users/plotting/examples/annotate_simple_coord01.pdf b/dev/users/plotting/examples/annotate_simple_coord01.pdf deleted file mode 100644 index e3116ae2008..00000000000 Binary files a/dev/users/plotting/examples/annotate_simple_coord01.pdf and /dev/null differ diff --git a/dev/users/plotting/examples/annotate_simple_coord01.png b/dev/users/plotting/examples/annotate_simple_coord01.png deleted file mode 100644 index 1bf5b736b4b..00000000000 Binary files a/dev/users/plotting/examples/annotate_simple_coord01.png and /dev/null differ diff --git a/dev/users/plotting/examples/annotate_simple_coord01.py b/dev/users/plotting/examples/annotate_simple_coord01.py deleted file mode 100644 index 7b53d0c2297..00000000000 --- a/dev/users/plotting/examples/annotate_simple_coord01.py +++ /dev/null @@ -1,15 +0,0 @@ - -import matplotlib.pyplot as plt - -plt.figure(figsize=(3,2)) -ax=plt.subplot(111) -an1 = ax.annotate("Test 1", xy=(0.5, 0.5), xycoords="data", - va="center", ha="center", - bbox=dict(boxstyle="round", fc="w")) -an2 = ax.annotate("Test 2", xy=(1, 0.5), xycoords=an1, - xytext=(30,0), textcoords="offset points", - va="center", ha="left", - bbox=dict(boxstyle="round", fc="w"), - arrowprops=dict(arrowstyle="->")) -plt.show() - diff --git a/dev/users/plotting/examples/annotate_simple_coord02.hires.png b/dev/users/plotting/examples/annotate_simple_coord02.hires.png deleted file mode 100644 index f4c5e0652e2..00000000000 Binary files a/dev/users/plotting/examples/annotate_simple_coord02.hires.png and /dev/null differ diff --git a/dev/users/plotting/examples/annotate_simple_coord02.pdf b/dev/users/plotting/examples/annotate_simple_coord02.pdf deleted file mode 100644 index 981a0dcfab9..00000000000 Binary files a/dev/users/plotting/examples/annotate_simple_coord02.pdf and /dev/null differ diff --git a/dev/users/plotting/examples/annotate_simple_coord02.png b/dev/users/plotting/examples/annotate_simple_coord02.png deleted file mode 100644 index 81724a82301..00000000000 Binary files a/dev/users/plotting/examples/annotate_simple_coord02.png and /dev/null differ diff --git a/dev/users/plotting/examples/annotate_simple_coord02.py b/dev/users/plotting/examples/annotate_simple_coord02.py deleted file mode 100644 index d2ce74dc6cf..00000000000 --- a/dev/users/plotting/examples/annotate_simple_coord02.py +++ /dev/null @@ -1,16 +0,0 @@ - -import matplotlib.pyplot as plt - -plt.figure(figsize=(3,2)) -ax=plt.axes([0.1, 0.1, 0.8, 0.7]) -an1 = ax.annotate("Test 1", xy=(0.5, 0.5), xycoords="data", - va="center", ha="center", - bbox=dict(boxstyle="round", fc="w")) - -an2 = ax.annotate("Test 2", xy=(0.5, 1.), xycoords=an1, - xytext=(0.5,1.1), textcoords=(an1, "axes fraction"), - va="bottom", ha="center", - bbox=dict(boxstyle="round", fc="w"), - arrowprops=dict(arrowstyle="->")) -plt.show() - diff --git a/dev/users/plotting/examples/annotate_simple_coord03.hires.png b/dev/users/plotting/examples/annotate_simple_coord03.hires.png deleted file mode 100644 index fa36fb10207..00000000000 Binary files a/dev/users/plotting/examples/annotate_simple_coord03.hires.png and /dev/null differ diff --git a/dev/users/plotting/examples/annotate_simple_coord03.pdf b/dev/users/plotting/examples/annotate_simple_coord03.pdf deleted file mode 100644 index 43c4fa163d2..00000000000 Binary files a/dev/users/plotting/examples/annotate_simple_coord03.pdf and /dev/null differ diff --git a/dev/users/plotting/examples/annotate_simple_coord03.png b/dev/users/plotting/examples/annotate_simple_coord03.png deleted file mode 100644 index a28ff0308c2..00000000000 Binary files a/dev/users/plotting/examples/annotate_simple_coord03.png and /dev/null differ diff --git a/dev/users/plotting/examples/annotate_simple_coord03.py b/dev/users/plotting/examples/annotate_simple_coord03.py deleted file mode 100644 index b448f7513ca..00000000000 --- a/dev/users/plotting/examples/annotate_simple_coord03.py +++ /dev/null @@ -1,19 +0,0 @@ - -import matplotlib.pyplot as plt - -plt.figure(figsize=(3,2)) -ax=plt.axes([0.1, 0.1, 0.8, 0.7]) -an1 = ax.annotate("Test 1", xy=(0.5, 0.5), xycoords="data", - va="center", ha="center", - bbox=dict(boxstyle="round", fc="w")) - -from matplotlib.text import OffsetFrom -offset_from = OffsetFrom(an1, (0.5, 0)) -an2 = ax.annotate("Test 2", xy=(0.1, 0.1), xycoords="data", - xytext=(0, -10), textcoords=offset_from, - # xytext is offset points from "xy=(0.5, 0), xycoords=an1" - va="top", ha="center", - bbox=dict(boxstyle="round", fc="w"), - arrowprops=dict(arrowstyle="->")) -plt.show() - diff --git a/dev/users/plotting/examples/annotate_text_arrow.hires.png b/dev/users/plotting/examples/annotate_text_arrow.hires.png deleted file mode 100644 index 5033fa39640..00000000000 Binary files a/dev/users/plotting/examples/annotate_text_arrow.hires.png and /dev/null differ diff --git a/dev/users/plotting/examples/annotate_text_arrow.pdf b/dev/users/plotting/examples/annotate_text_arrow.pdf deleted file mode 100644 index df1d1daedf8..00000000000 Binary files a/dev/users/plotting/examples/annotate_text_arrow.pdf and /dev/null differ diff --git a/dev/users/plotting/examples/annotate_text_arrow.png b/dev/users/plotting/examples/annotate_text_arrow.png deleted file mode 100644 index 72dacc8cf46..00000000000 Binary files a/dev/users/plotting/examples/annotate_text_arrow.png and /dev/null differ diff --git a/dev/users/plotting/examples/annotate_text_arrow.py b/dev/users/plotting/examples/annotate_text_arrow.py deleted file mode 100644 index 4ed10f99670..00000000000 --- a/dev/users/plotting/examples/annotate_text_arrow.py +++ /dev/null @@ -1,38 +0,0 @@ - -import numpy.random -import matplotlib.pyplot as plt - -fig = plt.figure(1, figsize=(5,5)) -fig.clf() - -ax = fig.add_subplot(111) -ax.set_aspect(1) - -x1 = -1 + numpy.random.randn(100) -y1 = -1 + numpy.random.randn(100) -x2 = 1. + numpy.random.randn(100) -y2 = 1. + numpy.random.randn(100) - -ax.scatter(x1, y1, color="r") -ax.scatter(x2, y2, color="g") - -bbox_props = dict(boxstyle="round", fc="w", ec="0.5", alpha=0.9) -ax.text(-2, -2, "Sample A", ha="center", va="center", size=20, - bbox=bbox_props) -ax.text(2, 2, "Sample B", ha="center", va="center", size=20, - bbox=bbox_props) - - -bbox_props = dict(boxstyle="rarrow", fc=(0.8,0.9,0.9), ec="b", lw=2) -t = ax.text(0, 0, "Direction", ha="center", va="center", rotation=45, - size=15, - bbox=bbox_props) - -bb = t.get_bbox_patch() -bb.set_boxstyle("rarrow", pad=0.6) - -ax.set_xlim(-4, 4) -ax.set_ylim(-4, 4) - -plt.draw() -plt.show() diff --git a/dev/users/plotting/examples/connect_simple01.hires.png b/dev/users/plotting/examples/connect_simple01.hires.png deleted file mode 100644 index cced1f03519..00000000000 Binary files a/dev/users/plotting/examples/connect_simple01.hires.png and /dev/null differ diff --git a/dev/users/plotting/examples/connect_simple01.pdf b/dev/users/plotting/examples/connect_simple01.pdf deleted file mode 100644 index bf5110cc44e..00000000000 Binary files a/dev/users/plotting/examples/connect_simple01.pdf and /dev/null differ diff --git a/dev/users/plotting/examples/connect_simple01.png b/dev/users/plotting/examples/connect_simple01.png deleted file mode 100644 index aeff0ef5d8a..00000000000 Binary files a/dev/users/plotting/examples/connect_simple01.png and /dev/null differ diff --git a/dev/users/plotting/examples/connect_simple01.py b/dev/users/plotting/examples/connect_simple01.py deleted file mode 100644 index 7e251ca6bc2..00000000000 --- a/dev/users/plotting/examples/connect_simple01.py +++ /dev/null @@ -1,31 +0,0 @@ -from matplotlib.patches import ConnectionPatch -import matplotlib.pyplot as plt - -fig = plt.figure(1, figsize=(6,3)) -ax1 = plt.subplot(121) -xyA=(0.2, 0.2) -xyB=(0.8, 0.8) -coordsA="data" -coordsB="data" -con = ConnectionPatch(xyA, xyB, coordsA, coordsB, - arrowstyle="-|>", shrinkA=5, shrinkB=5, - mutation_scale=20, fc="w") -ax1.plot([xyA[0], xyB[0]], [xyA[1], xyB[1]], "o") -ax1.add_artist(con) - -ax2 = plt.subplot(122) -#xyA=(0.7, 0.7) -xy=(0.3, 0.2) -coordsA="data" -coordsB="data" -con = ConnectionPatch(xyA=xy, xyB=xy, coordsA=coordsA, coordsB=coordsB, - axesA=ax2, axesB=ax1, - arrowstyle="->", shrinkB=5) -ax2.add_artist(con) - -ax1.set_xlim(0, 1) -ax1.set_ylim(0, 1) -ax2.set_xlim(0, .5) -ax2.set_ylim(0, .5) -plt.draw() -plt.show() diff --git a/dev/users/plotting/examples/connectionstyle_demo.hires.png b/dev/users/plotting/examples/connectionstyle_demo.hires.png deleted file mode 100644 index fab6abd80e0..00000000000 Binary files a/dev/users/plotting/examples/connectionstyle_demo.hires.png and /dev/null differ diff --git a/dev/users/plotting/examples/connectionstyle_demo.pdf b/dev/users/plotting/examples/connectionstyle_demo.pdf deleted file mode 100644 index fa7b8941325..00000000000 Binary files a/dev/users/plotting/examples/connectionstyle_demo.pdf and /dev/null differ diff --git a/dev/users/plotting/examples/connectionstyle_demo.png b/dev/users/plotting/examples/connectionstyle_demo.png deleted file mode 100644 index e4cbad2d0a5..00000000000 Binary files a/dev/users/plotting/examples/connectionstyle_demo.png and /dev/null differ diff --git a/dev/users/plotting/examples/connectionstyle_demo.py b/dev/users/plotting/examples/connectionstyle_demo.py deleted file mode 100644 index baa68fab5ad..00000000000 --- a/dev/users/plotting/examples/connectionstyle_demo.py +++ /dev/null @@ -1,109 +0,0 @@ - -import matplotlib.pyplot as plt -import matplotlib.patches as mpatches - -fig = plt.figure(1, figsize=(8,5)) -fig.clf() -from mpl_toolkits.axes_grid.axes_grid import AxesGrid -from mpl_toolkits.axes_grid.anchored_artists import AnchoredText - -#from matplotlib.font_manager import FontProperties - -def add_at(ax, t, loc=2): - fp = dict(size=8) - _at = AnchoredText(t, loc=loc, prop=fp) - ax.add_artist(_at) - return _at - - -grid = AxesGrid(fig, 111, (3, 5), label_mode="1", share_all=True) - -grid[0].set_autoscale_on(False) - - -x1, y1 = 0.3, 0.3 -x2, y2 = 0.7, 0.7 - - -def demo_con_style(ax, connectionstyle, label=None): - - if label is None: - label = connectionstyle - - x1, y1 = 0.3, 0.2 - x2, y2 = 0.8, 0.6 - - ax.plot([x1, x2], [y1, y2], ".") - ax.annotate("", - xy=(x1, y1), xycoords='data', - xytext=(x2, y2), textcoords='data', - arrowprops=dict(arrowstyle="->", #linestyle="dashed", - color="0.5", - shrinkA=5, shrinkB=5, - patchA=None, - patchB=None, - connectionstyle=connectionstyle, - ), - ) - - add_at(ax, label, loc=2) - -column = grid.axes_column[0] - -demo_con_style(column[0], "angle3,angleA=90,angleB=0", - label="angle3,\nangleA=90,\nangleB=0") -demo_con_style(column[1], "angle3,angleA=0,angleB=90", - label="angle3,\nangleA=0,\nangleB=90") - - - -column = grid.axes_column[1] - -demo_con_style(column[0], "arc3,rad=0.") -demo_con_style(column[1], "arc3,rad=0.3") -demo_con_style(column[2], "arc3,rad=-0.3") - - - -column = grid.axes_column[2] - -demo_con_style(column[0], "angle,angleA=-90,angleB=180,rad=0", - label="angle,\nangleA=-90,\nangleB=180,\nrad=0") -demo_con_style(column[1], "angle,angleA=-90,angleB=180,rad=5", - label="angle,\nangleA=-90,\nangleB=180,\nrad=5") -demo_con_style(column[2], "angle,angleA=-90,angleB=10,rad=5", - label="angle,\nangleA=-90,\nangleB=10,\nrad=0") - - -column = grid.axes_column[3] - -demo_con_style(column[0], "arc,angleA=-90,angleB=0,armA=30,armB=30,rad=0", - label="arc,\nangleA=-90,\nangleB=0,\narmA=30,\narmB=30,\nrad=0") -demo_con_style(column[1], "arc,angleA=-90,angleB=0,armA=30,armB=30,rad=5", - label="arc,\nangleA=-90,\nangleB=0,\narmA=30,\narmB=30,\nrad=5") -demo_con_style(column[2], "arc,angleA=-90,angleB=0,armA=0,armB=40,rad=0", - label="arc,\nangleA=-90,\nangleB=0,\narmA=0,\narmB=40,\nrad=0") - - -column = grid.axes_column[4] - -demo_con_style(column[0], "bar,fraction=0.3", - label="bar,\nfraction=0.3") -demo_con_style(column[1], "bar,fraction=-0.3", - label="bar,\nfraction=-0.3") -demo_con_style(column[2], "bar,angle=180,fraction=-0.2", - label="bar,\nangle=180,\nfraction=-0.2") - - -#demo_con_style(column[1], "arc3,rad=0.3") -#demo_con_style(column[2], "arc3,rad=-0.3") - - -grid[0].set_xlim(0, 1) -grid[0].set_ylim(0, 1) -grid.axes_llc.axis["bottom"].toggle(ticklabels=False) -grid.axes_llc.axis["left"].toggle(ticklabels=False) -fig.subplots_adjust(left=0.05, right=0.95, bottom=0.05, top=0.95) - -plt.draw() -plt.show() diff --git a/dev/users/plotting/examples/custom_boxstyle01.hires.png b/dev/users/plotting/examples/custom_boxstyle01.hires.png deleted file mode 100644 index 2f619201192..00000000000 Binary files a/dev/users/plotting/examples/custom_boxstyle01.hires.png and /dev/null differ diff --git a/dev/users/plotting/examples/custom_boxstyle01.pdf b/dev/users/plotting/examples/custom_boxstyle01.pdf deleted file mode 100644 index 6b1824db785..00000000000 Binary files a/dev/users/plotting/examples/custom_boxstyle01.pdf and /dev/null differ diff --git a/dev/users/plotting/examples/custom_boxstyle01.png b/dev/users/plotting/examples/custom_boxstyle01.png deleted file mode 100644 index 1acbf465afb..00000000000 Binary files a/dev/users/plotting/examples/custom_boxstyle01.png and /dev/null differ diff --git a/dev/users/plotting/examples/custom_boxstyle01.py b/dev/users/plotting/examples/custom_boxstyle01.py deleted file mode 100644 index f53f135d38e..00000000000 --- a/dev/users/plotting/examples/custom_boxstyle01.py +++ /dev/null @@ -1,47 +0,0 @@ -from matplotlib.path import Path - -def custom_box_style(x0, y0, width, height, mutation_size, mutation_aspect=1): - """ - Given the location and size of the box, return the path of - the box around it. - - - *x0*, *y0*, *width*, *height* : location and size of the box - - *mutation_size* : a reference scale for the mutation. - - *aspect_ratio* : aspect-ration for the mutation. - """ - - # note that we are ignoring mutation_aspect. This is okay in general. - - # padding - mypad = 0.3 - pad = mutation_size * mypad - - # width and height with padding added. - width, height = width + 2.*pad, \ - height + 2.*pad, - - # boundary of the padded box - x0, y0 = x0-pad, y0-pad, - x1, y1 = x0+width, y0 + height - - cp = [(x0, y0), - (x1, y0), (x1, y1), (x0, y1), - (x0-pad, (y0+y1)/2.), (x0, y0), - (x0, y0)] - - com = [Path.MOVETO, - Path.LINETO, Path.LINETO, Path.LINETO, - Path.LINETO, Path.LINETO, - Path.CLOSEPOLY] - - path = Path(cp, com) - - return path - - -import matplotlib.pyplot as plt - -plt.figure(1, figsize=(3,3)) -ax = plt.subplot(111) -ax.text(0.5, 0.5, "Test", size=30, va="center", ha="center", - bbox=dict(boxstyle=custom_box_style, alpha=0.2)) diff --git a/dev/users/plotting/examples/custom_boxstyle02.hires.png b/dev/users/plotting/examples/custom_boxstyle02.hires.png deleted file mode 100644 index 3f834ac6a03..00000000000 Binary files a/dev/users/plotting/examples/custom_boxstyle02.hires.png and /dev/null differ diff --git a/dev/users/plotting/examples/custom_boxstyle02.pdf b/dev/users/plotting/examples/custom_boxstyle02.pdf deleted file mode 100644 index 9af9b000f73..00000000000 Binary files a/dev/users/plotting/examples/custom_boxstyle02.pdf and /dev/null differ diff --git a/dev/users/plotting/examples/custom_boxstyle02.png b/dev/users/plotting/examples/custom_boxstyle02.png deleted file mode 100644 index 26bce6a107d..00000000000 Binary files a/dev/users/plotting/examples/custom_boxstyle02.png and /dev/null differ diff --git a/dev/users/plotting/examples/custom_boxstyle02.py b/dev/users/plotting/examples/custom_boxstyle02.py deleted file mode 100644 index 96933cb0689..00000000000 --- a/dev/users/plotting/examples/custom_boxstyle02.py +++ /dev/null @@ -1,74 +0,0 @@ -from matplotlib.path import Path -from matplotlib.patches import BoxStyle -import matplotlib.pyplot as plt - -# we may derive from matplotlib.patches.BoxStyle._Base class. -# You need to overide transmute method in this case. - -class MyStyle(BoxStyle._Base): - """ - A simple box. - """ - - def __init__(self, pad=0.3): - """ - The arguments need to be floating numbers and need to have - default values. - - *pad* - amount of padding - """ - - self.pad = pad - super(MyStyle, self).__init__() - - def transmute(self, x0, y0, width, height, mutation_size): - """ - Given the location and size of the box, return the path of - the box around it. - - - *x0*, *y0*, *width*, *height* : location and size of the box - - *mutation_size* : a reference scale for the mutation. - - Often, the *mutation_size* is the font size of the text. - You don't need to worry about the rotation as it is - automatically taken care of. - """ - - # padding - pad = mutation_size * self.pad - - # width and height with padding added. - width, height = width + 2.*pad, \ - height + 2.*pad, - - # boundary of the padded box - x0, y0 = x0-pad, y0-pad, - x1, y1 = x0+width, y0 + height - - cp = [(x0, y0), - (x1, y0), (x1, y1), (x0, y1), - (x0-pad, (y0+y1)/2.), (x0, y0), - (x0, y0)] - - com = [Path.MOVETO, - Path.LINETO, Path.LINETO, Path.LINETO, - Path.LINETO, Path.LINETO, - Path.CLOSEPOLY] - - path = Path(cp, com) - - return path - - -# register the custom style -BoxStyle._style_list["angled"] = MyStyle - -plt.figure(1, figsize=(3,3)) -ax = plt.subplot(111) -ax.text(0.5, 0.5, "Test", size=30, va="center", ha="center", rotation=30, - bbox=dict(boxstyle="angled,pad=0.5", alpha=0.2)) - -del BoxStyle._style_list["angled"] - -plt.show() diff --git a/dev/users/plotting/examples/demo_gridspec01.hires.png b/dev/users/plotting/examples/demo_gridspec01.hires.png deleted file mode 100644 index a9575acf793..00000000000 Binary files a/dev/users/plotting/examples/demo_gridspec01.hires.png and /dev/null differ diff --git a/dev/users/plotting/examples/demo_gridspec01.pdf b/dev/users/plotting/examples/demo_gridspec01.pdf deleted file mode 100644 index 53ff4c42462..00000000000 Binary files a/dev/users/plotting/examples/demo_gridspec01.pdf and /dev/null differ diff --git a/dev/users/plotting/examples/demo_gridspec01.png b/dev/users/plotting/examples/demo_gridspec01.png deleted file mode 100644 index 533e719f631..00000000000 Binary files a/dev/users/plotting/examples/demo_gridspec01.png and /dev/null differ diff --git a/dev/users/plotting/examples/demo_gridspec01.py b/dev/users/plotting/examples/demo_gridspec01.py deleted file mode 100644 index 55c76a7f0f4..00000000000 --- a/dev/users/plotting/examples/demo_gridspec01.py +++ /dev/null @@ -1,20 +0,0 @@ -import matplotlib.pyplot as plt - -def make_ticklabels_invisible(fig): - for i, ax in enumerate(fig.axes): - ax.text(0.5, 0.5, "ax%d" % (i+1), va="center", ha="center") - for tl in ax.get_xticklabels() + ax.get_yticklabels(): - tl.set_visible(False) - - -plt.figure(0) -ax1 = plt.subplot2grid((3,3), (0,0), colspan=3) -ax2 = plt.subplot2grid((3,3), (1,0), colspan=2) -ax3 = plt.subplot2grid((3,3), (1, 2), rowspan=2) -ax4 = plt.subplot2grid((3,3), (2, 0)) -ax5 = plt.subplot2grid((3,3), (2, 1)) - -plt.suptitle("subplot2grid") -make_ticklabels_invisible(plt.gcf()) -plt.show() - diff --git a/dev/users/plotting/examples/demo_gridspec02.hires.png b/dev/users/plotting/examples/demo_gridspec02.hires.png deleted file mode 100644 index 06dd3fdc59e..00000000000 Binary files a/dev/users/plotting/examples/demo_gridspec02.hires.png and /dev/null differ diff --git a/dev/users/plotting/examples/demo_gridspec02.pdf b/dev/users/plotting/examples/demo_gridspec02.pdf deleted file mode 100644 index 99e50aa4ad8..00000000000 Binary files a/dev/users/plotting/examples/demo_gridspec02.pdf and /dev/null differ diff --git a/dev/users/plotting/examples/demo_gridspec02.png b/dev/users/plotting/examples/demo_gridspec02.png deleted file mode 100644 index e2c9b75e537..00000000000 Binary files a/dev/users/plotting/examples/demo_gridspec02.png and /dev/null differ diff --git a/dev/users/plotting/examples/demo_gridspec02.py b/dev/users/plotting/examples/demo_gridspec02.py deleted file mode 100644 index 43a7f089940..00000000000 --- a/dev/users/plotting/examples/demo_gridspec02.py +++ /dev/null @@ -1,26 +0,0 @@ -import matplotlib.pyplot as plt -from matplotlib.gridspec import GridSpec - - -def make_ticklabels_invisible(fig): - for i, ax in enumerate(fig.axes): - ax.text(0.5, 0.5, "ax%d" % (i+1), va="center", ha="center") - for tl in ax.get_xticklabels() + ax.get_yticklabels(): - tl.set_visible(False) - - -plt.figure() - -gs = GridSpec(3, 3) -ax1 = plt.subplot(gs[0, :]) -# identical to ax1 = plt.subplot(gs.new_subplotspec((0,0), colspan=3)) -ax2 = plt.subplot(gs[1,:-1]) -ax3 = plt.subplot(gs[1:, -1]) -ax4 = plt.subplot(gs[-1,0]) -ax5 = plt.subplot(gs[-1,-2]) - -plt.suptitle("GridSpec") -make_ticklabels_invisible(plt.gcf()) - -plt.show() - diff --git a/dev/users/plotting/examples/demo_gridspec03.hires.png b/dev/users/plotting/examples/demo_gridspec03.hires.png deleted file mode 100644 index ee517ef3aa4..00000000000 Binary files a/dev/users/plotting/examples/demo_gridspec03.hires.png and /dev/null differ diff --git a/dev/users/plotting/examples/demo_gridspec03.pdf b/dev/users/plotting/examples/demo_gridspec03.pdf deleted file mode 100644 index 7b346d48092..00000000000 Binary files a/dev/users/plotting/examples/demo_gridspec03.pdf and /dev/null differ diff --git a/dev/users/plotting/examples/demo_gridspec03.png b/dev/users/plotting/examples/demo_gridspec03.png deleted file mode 100644 index 4d3c043e1f4..00000000000 Binary files a/dev/users/plotting/examples/demo_gridspec03.png and /dev/null differ diff --git a/dev/users/plotting/examples/demo_gridspec03.py b/dev/users/plotting/examples/demo_gridspec03.py deleted file mode 100644 index eb5829507ab..00000000000 --- a/dev/users/plotting/examples/demo_gridspec03.py +++ /dev/null @@ -1,34 +0,0 @@ -import matplotlib.pyplot as plt -from matplotlib.gridspec import GridSpec - - -def make_ticklabels_invisible(fig): - for i, ax in enumerate(fig.axes): - ax.text(0.5, 0.5, "ax%d" % (i+1), va="center", ha="center") - for tl in ax.get_xticklabels() + ax.get_yticklabels(): - tl.set_visible(False) - - - -# demo 3 : gridspec with subplotpars set. - -f = plt.figure() - -plt.suptitle("GirdSpec w/ different subplotpars") - -gs1 = GridSpec(3, 3) -gs1.update(left=0.05, right=0.48, wspace=0.05) -ax1 = plt.subplot(gs1[:-1, :]) -ax2 = plt.subplot(gs1[-1, :-1]) -ax3 = plt.subplot(gs1[-1, -1]) - -gs2 = GridSpec(3, 3) -gs2.update(left=0.55, right=0.98, hspace=0.05) -ax4 = plt.subplot(gs2[:, :-1]) -ax5 = plt.subplot(gs2[:-1, -1]) -ax6 = plt.subplot(gs2[-1, -1]) - -make_ticklabels_invisible(plt.gcf()) - -plt.show() - diff --git a/dev/users/plotting/examples/demo_gridspec04.hires.png b/dev/users/plotting/examples/demo_gridspec04.hires.png deleted file mode 100644 index 4c89808bcd1..00000000000 Binary files a/dev/users/plotting/examples/demo_gridspec04.hires.png and /dev/null differ diff --git a/dev/users/plotting/examples/demo_gridspec04.pdf b/dev/users/plotting/examples/demo_gridspec04.pdf deleted file mode 100644 index 4ecdbff6418..00000000000 Binary files a/dev/users/plotting/examples/demo_gridspec04.pdf and /dev/null differ diff --git a/dev/users/plotting/examples/demo_gridspec04.png b/dev/users/plotting/examples/demo_gridspec04.png deleted file mode 100644 index c7d2c15de54..00000000000 Binary files a/dev/users/plotting/examples/demo_gridspec04.png and /dev/null differ diff --git a/dev/users/plotting/examples/demo_gridspec04.py b/dev/users/plotting/examples/demo_gridspec04.py deleted file mode 100644 index f948b13d91e..00000000000 --- a/dev/users/plotting/examples/demo_gridspec04.py +++ /dev/null @@ -1,41 +0,0 @@ -import matplotlib.pyplot as plt -import matplotlib.gridspec as gridspec - -def make_ticklabels_invisible(fig): - for i, ax in enumerate(fig.axes): - ax.text(0.5, 0.5, "ax%d" % (i+1), va="center", ha="center") - for tl in ax.get_xticklabels() + ax.get_yticklabels(): - tl.set_visible(False) - - - -# gridspec inside gridspec - -f = plt.figure() - -gs0 = gridspec.GridSpec(1, 2) - -gs00 = gridspec.GridSpecFromSubplotSpec(3, 3, subplot_spec=gs0[0]) - -ax1 = plt.Subplot(f, gs00[:-1, :]) -f.add_subplot(ax1) -ax2 = plt.Subplot(f, gs00[-1, :-1]) -f.add_subplot(ax2) -ax3 = plt.Subplot(f, gs00[-1, -1]) -f.add_subplot(ax3) - - -gs01 = gridspec.GridSpecFromSubplotSpec(3, 3, subplot_spec=gs0[1]) - -ax4 = plt.Subplot(f, gs01[:, :-1]) -f.add_subplot(ax4) -ax5 = plt.Subplot(f, gs01[:-1, -1]) -f.add_subplot(ax5) -ax6 = plt.Subplot(f, gs01[-1, -1]) -f.add_subplot(ax6) - -plt.suptitle("GirdSpec Inside GridSpec") -make_ticklabels_invisible(plt.gcf()) - -plt.show() - diff --git a/dev/users/plotting/examples/demo_gridspec05.hires.png b/dev/users/plotting/examples/demo_gridspec05.hires.png deleted file mode 100644 index 9dea197d6d0..00000000000 Binary files a/dev/users/plotting/examples/demo_gridspec05.hires.png and /dev/null differ diff --git a/dev/users/plotting/examples/demo_gridspec05.pdf b/dev/users/plotting/examples/demo_gridspec05.pdf deleted file mode 100644 index 08fa0b0f353..00000000000 Binary files a/dev/users/plotting/examples/demo_gridspec05.pdf and /dev/null differ diff --git a/dev/users/plotting/examples/demo_gridspec05.png b/dev/users/plotting/examples/demo_gridspec05.png deleted file mode 100644 index 034946a00d9..00000000000 Binary files a/dev/users/plotting/examples/demo_gridspec05.png and /dev/null differ diff --git a/dev/users/plotting/examples/demo_gridspec05.py b/dev/users/plotting/examples/demo_gridspec05.py deleted file mode 100644 index 6bc263a8933..00000000000 --- a/dev/users/plotting/examples/demo_gridspec05.py +++ /dev/null @@ -1,26 +0,0 @@ -import matplotlib.pyplot as plt -import matplotlib.gridspec as gridspec - -def make_ticklabels_invisible(fig): - for i, ax in enumerate(fig.axes): - ax.text(0.5, 0.5, "ax%d" % (i+1), va="center", ha="center") - for tl in ax.get_xticklabels() + ax.get_yticklabels(): - tl.set_visible(False) - - - -f = plt.figure() - -gs = gridspec.GridSpec(2, 2, - width_ratios=[1,2], - height_ratios=[4,1] - ) - -ax1 = plt.subplot(gs[0]) -ax2 = plt.subplot(gs[1]) -ax3 = plt.subplot(gs[2]) -ax4 = plt.subplot(gs[3]) - -make_ticklabels_invisible(f) -plt.show() - diff --git a/dev/users/plotting/examples/demo_gridspec06.hires.png b/dev/users/plotting/examples/demo_gridspec06.hires.png deleted file mode 100644 index d9ee5534329..00000000000 Binary files a/dev/users/plotting/examples/demo_gridspec06.hires.png and /dev/null differ diff --git a/dev/users/plotting/examples/demo_gridspec06.pdf b/dev/users/plotting/examples/demo_gridspec06.pdf deleted file mode 100644 index 33722f74684..00000000000 Binary files a/dev/users/plotting/examples/demo_gridspec06.pdf and /dev/null differ diff --git a/dev/users/plotting/examples/demo_gridspec06.png b/dev/users/plotting/examples/demo_gridspec06.png deleted file mode 100644 index 389a75d03fa..00000000000 Binary files a/dev/users/plotting/examples/demo_gridspec06.png and /dev/null differ diff --git a/dev/users/plotting/examples/demo_gridspec06.py b/dev/users/plotting/examples/demo_gridspec06.py deleted file mode 100644 index ead2029af25..00000000000 --- a/dev/users/plotting/examples/demo_gridspec06.py +++ /dev/null @@ -1,53 +0,0 @@ -import matplotlib.pyplot as plt -import matplotlib.gridspec as gridspec -import numpy as np - -try: - from itertools import product -except ImportError: - # product is new in v 2.6 - def product(*args, **kwds): - pools = map(tuple, args) * kwds.get('repeat', 1) - result = [[]] - for pool in pools: - result = [x+[y] for x in result for y in pool] - for prod in result: - yield tuple(prod) - - -def squiggle_xy(a, b, c, d, i=np.arange(0.0, 2*np.pi, 0.05)): - return np.sin(i*a)*np.cos(i*b), np.sin(i*c)*np.cos(i*d) - -fig = plt.figure(figsize=(8, 8)) - -# gridspec inside gridspec -outer_grid = gridspec.GridSpec(4, 4, wspace=0.0, hspace=0.0) - -for i in xrange(16): - inner_grid = gridspec.GridSpecFromSubplotSpec(3, 3, - subplot_spec=outer_grid[i], wspace=0.0, hspace=0.0) - a, b = int(i/4)+1,i%4+1 - for j, (c, d) in enumerate(product(range(1, 4), repeat=2)): - ax = plt.Subplot(fig, inner_grid[j]) - ax.plot(*squiggle_xy(a, b, c, d)) - ax.set_xticks([]) - ax.set_yticks([]) - fig.add_subplot(ax) - -all_axes = fig.get_axes() - -#show only the outside spines -for ax in all_axes: - for sp in ax.spines.values(): - sp.set_visible(False) - if ax.is_first_row(): - ax.spines['top'].set_visible(True) - if ax.is_last_row(): - ax.spines['bottom'].set_visible(True) - if ax.is_first_col(): - ax.spines['left'].set_visible(True) - if ax.is_last_col(): - ax.spines['right'].set_visible(True) - -plt.show() - diff --git a/dev/users/plotting/examples/simple_legend01.hires.png b/dev/users/plotting/examples/simple_legend01.hires.png deleted file mode 100644 index bcff99573b0..00000000000 Binary files a/dev/users/plotting/examples/simple_legend01.hires.png and /dev/null differ diff --git a/dev/users/plotting/examples/simple_legend01.pdf b/dev/users/plotting/examples/simple_legend01.pdf deleted file mode 100644 index ac067b9c918..00000000000 Binary files a/dev/users/plotting/examples/simple_legend01.pdf and /dev/null differ diff --git a/dev/users/plotting/examples/simple_legend01.png b/dev/users/plotting/examples/simple_legend01.png deleted file mode 100644 index 203d6daafda..00000000000 Binary files a/dev/users/plotting/examples/simple_legend01.png and /dev/null differ diff --git a/dev/users/plotting/examples/simple_legend01.py b/dev/users/plotting/examples/simple_legend01.py deleted file mode 100644 index dba1b4c2d41..00000000000 --- a/dev/users/plotting/examples/simple_legend01.py +++ /dev/null @@ -1,15 +0,0 @@ -from matplotlib.pyplot import * - -subplot(211) -plot([1,2,3], label="test1") -plot([3,2,1], label="test2") -legend(bbox_to_anchor=(0., 1.02, 1., .102), loc=3, - ncol=2, mode="expand", borderaxespad=0.) - -subplot(223) -plot([1,2,3], label="test1") -plot([3,2,1], label="test2") -legend(bbox_to_anchor=(1.05, 1), loc=2, borderaxespad=0.) - - -show() diff --git a/dev/users/plotting/examples/simple_legend02.hires.png b/dev/users/plotting/examples/simple_legend02.hires.png deleted file mode 100644 index e298180d17f..00000000000 Binary files a/dev/users/plotting/examples/simple_legend02.hires.png and /dev/null differ diff --git a/dev/users/plotting/examples/simple_legend02.pdf b/dev/users/plotting/examples/simple_legend02.pdf deleted file mode 100644 index b734e5c6ed1..00000000000 Binary files a/dev/users/plotting/examples/simple_legend02.pdf and /dev/null differ diff --git a/dev/users/plotting/examples/simple_legend02.png b/dev/users/plotting/examples/simple_legend02.png deleted file mode 100644 index 6cf06e44102..00000000000 Binary files a/dev/users/plotting/examples/simple_legend02.png and /dev/null differ diff --git a/dev/users/plotting/examples/simple_legend02.py b/dev/users/plotting/examples/simple_legend02.py deleted file mode 100644 index 9b02001972d..00000000000 --- a/dev/users/plotting/examples/simple_legend02.py +++ /dev/null @@ -1,10 +0,0 @@ -from matplotlib.pyplot import * - -p1, = plot([1,2,3], label="test1") -p2, = plot([3,2,1], label="test2") - -l1 = legend([p1], ["Label 1"], loc=1) -l2 = legend([p2], ["Label 2"], loc=4) # this removes l1 from the axes. -gca().add_artist(l1) # add l1 as a separate artist to the axes - -show() diff --git a/dev/users/pyplot_tutorial.html b/dev/users/pyplot_tutorial.html deleted file mode 100644 index de93761ed85..00000000000 --- a/dev/users/pyplot_tutorial.html +++ /dev/null @@ -1,581 +0,0 @@ - - - - - - - - Pyplot tutorial — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      Table Of Contents

      - - -

      Previous topic

      -

      Installing

      -

      Next topic

      -

      Interactive navigation

      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      Pyplot tutorial

      -

      matplotlib.pyplot is a collection of command style functions -that make matplotlib work like MATLAB. -Each pyplot function makes -some change to a figure: eg, create a figure, create a plotting area -in a figure, plot some lines in a plotting area, decorate the plot -with labels, etc.... matplotlib.pyplot is stateful, in that it -keeps track of the current figure and plotting area, and the plotting -functions are directed to the current axes

      -
      import matplotlib.pyplot as plt
      -plt.plot([1,2,3,4])
      -plt.ylabel('some numbers')
      -plt.show()
      -
      -
      -

      (Source code, png, hires.png, pdf)

      -
      -../_images/pyplot_simple.png -
      -

      You may be wondering why the x-axis ranges from 0-3 and the y-axis -from 1-4. If you provide a single list or array to the -plot() command, matplotlib assumes it is a -sequence of y values, and automatically generates the x values for -you. Since python ranges start with 0, the default x vector has the -same length as y but starts with 0. Hence the x data are -[0,1,2,3].

      -

      plot() is a versatile command, and will take -an arbitrary number of arguments. For example, to plot x versus y, -you can issue the command:

      -
      plt.plot([1,2,3,4], [1,4,9,16])
      -
      -
      -

      For every x, y pair of arguments, there is an optional third argument -which is the format string that indicates the color and line type of -the plot. The letters and symbols of the format string are from -MATLAB, and you concatenate a color string with a line style string. -The default format string is ‘b-‘, which is a solid blue line. For -example, to plot the above with red circles, you would issue

      -
      import matplotlib.pyplot as plt
      -plt.plot([1,2,3,4], [1,4,9,16], 'ro')
      -plt.axis([0, 6, 0, 20])
      -
      -
      -

      (Source code, png, hires.png, pdf)

      -
      -../_images/pyplot_formatstr.png -
      -

      See the plot() documentation for a complete -list of line styles and format strings. The -axis() command in the example above takes a -list of [xmin, xmax, ymin, ymax] and specifies the viewport of the -axes.

      -

      If matplotlib were limited to working with lists, it would be fairly -useless for numeric processing. Generally, you will use numpy arrays. In fact, all sequences are -converted to numpy arrays internally. The example below illustrates a -plotting several lines with different format styles in one command -using arrays.

      -
      import numpy as np
      -import matplotlib.pyplot as plt
      -
      -# evenly sampled time at 200ms intervals
      -t = np.arange(0., 5., 0.2)
      -
      -# red dashes, blue squares and green triangles
      -plt.plot(t, t, 'r--', t, t**2, 'bs', t, t**3, 'g^')
      -
      -
      -

      (Source code, png, hires.png, pdf)

      -
      -../_images/pyplot_three.png -
      -
      -

      Controlling line properties

      -

      Lines have many attributes that you can set: linewidth, dash style, -antialiased, etc; see matplotlib.lines.Line2D. There are -several ways to set line properties

      -
        -
      • Use keyword args:

        -
        plt.plot(x, y, linewidth=2.0)
        -
        -
        -
      • -
      • Use the setter methods of the Line2D instance. plot returns a list -of lines; eg line1, line2 = plot(x1,y1,x2,x2). Below I have only -one line so it is a list of length 1. I use tuple unpacking in the -line, = plot(x, y, 'o') to get the first element of the list:

        -
        line, = plt.plot(x, y, '-')
        -line.set_antialiased(False) # turn off antialising
        -
        -
        -
      • -
      • Use the setp() command. The example below -uses a MATLAB-style command to set multiple properties -on a list of lines. setp works transparently with a list of objects -or a single object. You can either use python keyword arguments or -MATLAB-style string/value pairs:

        -
        lines = plt.plot(x1, y1, x2, y2)
        -# use keyword args
        -plt.setp(lines, color='r', linewidth=2.0)
        -# or MATLAB style string value pairs
        -plt.setp(lines, 'color', 'r', 'linewidth', 2.0)
        -
        -
        -
      • -
      -

      Here are the available Line2D properties.

      - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      PropertyValue Type
      alphafloat
      animated[True | False]
      antialiased or aa[True | False]
      clip_boxa matplotlib.transform.Bbox instance
      clip_on[True | False]
      clip_patha Path instance and a Transform instance, a Patch
      color or cany matplotlib color
      containsthe hit testing function
      dash_capstyle[‘butt’ | ‘round’ | ‘projecting’]
      dash_joinstyle[‘miter’ | ‘round’ | ‘bevel’]
      dashessequence of on/off ink in points
      data(np.array xdata, np.array ydata)
      figurea matplotlib.figure.Figure instance
      labelany string
      linestyle or ls[ ‘-‘ | ‘–’ | ‘-.’ | ‘:’ | ‘steps’ | ...]
      linewidth or lwfloat value in points
      lod[True | False]
      marker[ ‘+’ | ‘,’ | ‘.’ | ‘1’ | ‘2’ | ‘3’ | ‘4’
      markeredgecolor or mecany matplotlib color
      markeredgewidth or mewfloat value in points
      markerfacecolor or mfcany matplotlib color
      markersize or msfloat
      markeveryNone | integer | (startind, stride)
      pickerused in interactive line selection
      pickradiusthe line pick selection radius
      solid_capstyle[‘butt’ | ‘round’ | ‘projecting’]
      solid_joinstyle[‘miter’ | ‘round’ | ‘bevel’]
      transforma matplotlib.transforms.Transform instance
      visible[True | False]
      xdatanp.array
      ydatanp.array
      zorderany number
      -

      To get a list of settable line properties, call the -setp() function with a line or lines -as argument

      -
      In [69]: lines = plt.plot([1,2,3])
      -
      -In [70]: plt.setp(lines)
      -  alpha: float
      -  animated: [True | False]
      -  antialiased or aa: [True | False]
      -  ...snip
      -
      -
      -
      -
      -

      Working with multiple figures and axes

      -

      MATLAB, and pyplot, have the concept of the current -figure and the current axes. All plotting commands apply to the -current axes. The function gca() returns the -current axes (a matplotlib.axes.Axes instance), and -gcf() returns the current figure -(matplotlib.figure.Figure instance). Normally, you don’t have -to worry about this, because it is all taken care of behind the -scenes. Below is a script to create two subplots.

      -
      import numpy as np
      -import matplotlib.pyplot as plt
      -
      -def f(t):
      -    return np.exp(-t) * np.cos(2*np.pi*t)
      -
      -t1 = np.arange(0.0, 5.0, 0.1)
      -t2 = np.arange(0.0, 5.0, 0.02)
      -
      -plt.figure(1)
      -plt.subplot(211)
      -plt.plot(t1, f(t1), 'bo', t2, f(t2), 'k')
      -
      -plt.subplot(212)
      -plt.plot(t2, np.cos(2*np.pi*t2), 'r--')
      -
      -
      -

      (Source code, png, hires.png, pdf)

      -
      -../_images/pyplot_two_subplots.png -
      -

      The figure() command here is optional because -figure(1) will be created by default, just as a subplot(111) -will be created by default if you don’t manually specify an axes. The -subplot() command specifies numrows, -numcols, fignum where fignum ranges from 1 to -numrows*numcols. The commas in the subplot command are -optional if numrows*numcols<10. So subplot(211) is identical -to subplot(2,1,1). You can create an arbitrary number of subplots -and axes. If you want to place an axes manually, ie, not on a -rectangular grid, use the axes() command, -which allows you to specify the location as axes([left, bottom, -width, height]) where all values are in fractional (0 to 1) -coordinates. See pylab_examples example code: axes_demo.py for an example of -placing axes manually and pylab_examples example code: line_styles.py for an -example with lots-o-subplots.

      -

      You can create multiple figures by using multiple -figure() calls with an increasing figure -number. Of course, each figure can contain as many axes and subplots -as your heart desires:

      -
      import matplotlib.pyplot as plt
      -plt.figure(1)                # the first figure
      -plt.subplot(211)             # the first subplot in the first figure
      -plt.plot([1,2,3])
      -plt.subplot(212)             # the second subplot in the first figure
      -plt.plot([4,5,6])
      -
      -
      -plt.figure(2)                # a second figure
      -plt.plot([4,5,6])            # creates a subplot(111) by default
      -
      -plt.figure(1)                # figure 1 current; subplot(212) still current
      -plt.subplot(211)             # make subplot(211) in figure1 current
      -plt.title('Easy as 1,2,3')   # subplot 211 title
      -
      -
      -

      You can clear the current figure with clf() -and the current axes with cla(). If you find -this statefulness, annoying, don’t despair, this is just a thin -stateful wrapper around an object oriented API, which you can use -instead (see Artist tutorial)

      -

      If you are making a long sequence of figures, you need to be aware of one -more thing: the memory required for a figure is not completely -released until the figure is explicitly closed with -close(). Deleting all references to the -figure, and/or using the window manager to kill the window in which -the figure appears on the screen, is not enough, because pyplot -maintains internal references until close() -is called.

      -
      -
      -

      Working with text

      -

      The text() command can be used to add text in -an arbitrary location, and the xlabel(), -ylabel() and title() -are used to add text in the indicated locations (see Text introduction -for a more detailed example)

      -
      import numpy as np
      -import matplotlib.pyplot as plt
      -
      -mu, sigma = 100, 15
      -x = mu + sigma * np.random.randn(10000)
      -
      -# the histogram of the data
      -n, bins, patches = plt.hist(x, 50, normed=1, facecolor='g', alpha=0.75)
      -
      -
      -plt.xlabel('Smarts')
      -plt.ylabel('Probability')
      -plt.title('Histogram of IQ')
      -plt.text(60, .025, r'$\mu=100,\ \sigma=15$')
      -plt.axis([40, 160, 0, 0.03])
      -plt.grid(True)
      -
      -
      -

      (Source code, png, hires.png, pdf)

      -
      -../_images/pyplot_text.png -
      -

      All of the text() commands return an -matplotlib.text.Text instance. Just as with with lines -above, you can customize the properties by passing keyword arguments -into the text functions or using setp():

      -
      t = plt.xlabel('my data', fontsize=14, color='red')
      -
      -
      -

      These properties are covered in more detail in Text properties and layout.

      -
      -

      Using mathematical expressions in text

      -

      matplotlib accepts TeX equation expressions in any text expression. -For example to write the expression in the title, -you can write a TeX expression surrounded by dollar signs:

      -
      plt.title(r'$\sigma_i=15$')
      -
      -
      -

      The r preceding the title string is important – it signifies -that the string is a raw string and not to treat backslashes and -python escapes. matplotlib has a built-in TeX expression parser and -layout engine, and ships its own math fonts – for details see -Writing mathematical expressions. Thus you can use mathematical text across platforms -without requiring a TeX installation. For those who have LaTeX and -dvipng installed, you can also use LaTeX to format your text and -incorporate the output directly into your display figures or saved -postscript – see Text rendering With LaTeX.

      -
      -
      -

      Annotating text

      -

      The uses of the basic text() command above -place text at an arbitrary position on the Axes. A common use case of -text is to annotate some feature of the plot, and the -annotate() method provides helper -functionality to make annotations easy. In an annotation, there are -two points to consider: the location being annotated represented by -the argument xy and the location of the text xytext. Both of -these arguments are (x,y) tuples.

      -
      import numpy as np
      -import matplotlib.pyplot as plt
      -
      -ax = plt.subplot(111)
      -
      -t = np.arange(0.0, 5.0, 0.01)
      -s = np.cos(2*np.pi*t)
      -line, = plt.plot(t, s, lw=2)
      -
      -plt.annotate('local max', xy=(2, 1), xytext=(3, 1.5),
      -            arrowprops=dict(facecolor='black', shrink=0.05),
      -            )
      -
      -plt.ylim(-2,2)
      -plt.show()
      -
      -
      -

      (Source code, png, hires.png, pdf)

      -
      -../_images/pyplot_annotate.png -
      -

      In this basic example, both the xy (arrow tip) and xytext -locations (text location) are in data coordinates. There are a -variety of other coordinate systems one can choose – see -Annotating text and Annotating Axes for -details. More examples can be found in -pylab_examples example code: annotation_demo.py.

      -
      -
      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/users/recipes-1.py b/dev/users/recipes-1.py deleted file mode 100644 index 2c1b607070d..00000000000 --- a/dev/users/recipes-1.py +++ /dev/null @@ -1,2 +0,0 @@ -# clear the state for context use below -plt.close('all') \ No newline at end of file diff --git a/dev/users/recipes-2.hires.png b/dev/users/recipes-2.hires.png deleted file mode 100644 index 91580993bb3..00000000000 Binary files a/dev/users/recipes-2.hires.png and /dev/null differ diff --git a/dev/users/recipes-2.pdf b/dev/users/recipes-2.pdf deleted file mode 100644 index 622f14f4d6a..00000000000 Binary files a/dev/users/recipes-2.pdf and /dev/null differ diff --git a/dev/users/recipes-2.png b/dev/users/recipes-2.png deleted file mode 100644 index 0b6ae241122..00000000000 Binary files a/dev/users/recipes-2.png and /dev/null differ diff --git a/dev/users/recipes-2.py b/dev/users/recipes-2.py deleted file mode 100644 index ffd1e78c726..00000000000 --- a/dev/users/recipes-2.py +++ /dev/null @@ -1,6 +0,0 @@ -import matplotlib.cbook as cbook -datafile = cbook.get_sample_data('goog.npy') -r = np.load(datafile).view(np.recarray) -plt.figure() -plt.plot(r.date, r.close) -plt.title('Default date handling can cause overlapping labels') \ No newline at end of file diff --git a/dev/users/recipes-3.hires.png b/dev/users/recipes-3.hires.png deleted file mode 100644 index f9b21841247..00000000000 Binary files a/dev/users/recipes-3.hires.png and /dev/null differ diff --git a/dev/users/recipes-3.pdf b/dev/users/recipes-3.pdf deleted file mode 100644 index 351b893faa0..00000000000 Binary files a/dev/users/recipes-3.pdf and /dev/null differ diff --git a/dev/users/recipes-3.png b/dev/users/recipes-3.png deleted file mode 100644 index 1e94997cb3d..00000000000 Binary files a/dev/users/recipes-3.png and /dev/null differ diff --git a/dev/users/recipes-3.py b/dev/users/recipes-3.py deleted file mode 100644 index dadb23b270f..00000000000 --- a/dev/users/recipes-3.py +++ /dev/null @@ -1,12 +0,0 @@ -plt.close('all') -fig, ax = plt.subplots(1) -ax.plot(r.date, r.close) - -# rotate and align the tick labels so they look better -fig.autofmt_xdate() - -# use a more precise date string for the x axis locations in the -# toolbar -import matplotlib.dates as mdates -ax.fmt_xdata = mdates.DateFormatter('%Y-%m-%d') -plt.title('fig.autofmt_xdate fixes the labels') \ No newline at end of file diff --git a/dev/users/recipes-4.hires.png b/dev/users/recipes-4.hires.png deleted file mode 100644 index 9ae79261ac0..00000000000 Binary files a/dev/users/recipes-4.hires.png and /dev/null differ diff --git a/dev/users/recipes-4.pdf b/dev/users/recipes-4.pdf deleted file mode 100644 index a5b884c3bd6..00000000000 Binary files a/dev/users/recipes-4.pdf and /dev/null differ diff --git a/dev/users/recipes-4.png b/dev/users/recipes-4.png deleted file mode 100644 index 370b6ee5970..00000000000 Binary files a/dev/users/recipes-4.png and /dev/null differ diff --git a/dev/users/recipes-4.py b/dev/users/recipes-4.py deleted file mode 100644 index 841888b274b..00000000000 --- a/dev/users/recipes-4.py +++ /dev/null @@ -1,26 +0,0 @@ -import matplotlib.pyplot as plt -import numpy as np - -import matplotlib.cbook as cbook - -# load up some sample financial data -datafile = cbook.get_sample_data('goog.npy') -r = np.load(datafile).view(np.recarray) - -# create two subplots with the shared x and y axes -fig, (ax1, ax2) = plt.subplots(1,2, sharex=True, sharey=True) - -pricemin = r.close.min() - -ax1.plot(r.date, r.close, lw=2) -ax2.fill_between(r.date, pricemin, r.close, facecolor='blue', alpha=0.5) - -for ax in ax1, ax2: - ax.grid(True) - -ax1.set_ylabel('price') -for label in ax2.get_yticklabels(): - label.set_visible(False) - -fig.suptitle('Google (GOOG) daily closing price') -fig.autofmt_xdate() \ No newline at end of file diff --git a/dev/users/recipes-5.hires.png b/dev/users/recipes-5.hires.png deleted file mode 100644 index 7d45107636d..00000000000 Binary files a/dev/users/recipes-5.hires.png and /dev/null differ diff --git a/dev/users/recipes-5.pdf b/dev/users/recipes-5.pdf deleted file mode 100644 index 6e706c562a7..00000000000 Binary files a/dev/users/recipes-5.pdf and /dev/null differ diff --git a/dev/users/recipes-5.png b/dev/users/recipes-5.png deleted file mode 100644 index c4b985d18f7..00000000000 Binary files a/dev/users/recipes-5.png and /dev/null differ diff --git a/dev/users/recipes-5.py b/dev/users/recipes-5.py deleted file mode 100644 index 8cc129957eb..00000000000 --- a/dev/users/recipes-5.py +++ /dev/null @@ -1,33 +0,0 @@ -import matplotlib.pyplot as plt -import numpy as np - -Nsteps, Nwalkers = 100, 250 -t = np.arange(Nsteps) - -# an (Nsteps x Nwalkers) array of random walk steps -S1 = 0.002 + 0.01*np.random.randn(Nsteps, Nwalkers) -S2 = 0.004 + 0.02*np.random.randn(Nsteps, Nwalkers) - -# an (Nsteps x Nwalkers) array of random walker positions -X1 = S1.cumsum(axis=0) -X2 = S2.cumsum(axis=0) - - -# Nsteps length arrays empirical means and standard deviations of both -# populations over time -mu1 = X1.mean(axis=1) -sigma1 = X1.std(axis=1) -mu2 = X2.mean(axis=1) -sigma2 = X2.std(axis=1) - -# plot it! -fig, ax = plt.subplots(1) -ax.plot(t, mu1, lw=2, label='mean population 1', color='blue') -ax.plot(t, mu1, lw=2, label='mean population 2', color='yellow') -ax.fill_between(t, mu1+sigma1, mu1-sigma1, facecolor='blue', alpha=0.5) -ax.fill_between(t, mu2+sigma2, mu2-sigma2, facecolor='yellow', alpha=0.5) -ax.set_title('random walkers empirical $\mu$ and $\pm \sigma$ interval') -ax.legend(loc='upper left') -ax.set_xlabel('num steps') -ax.set_ylabel('position') -ax.grid() \ No newline at end of file diff --git a/dev/users/recipes-6.hires.png b/dev/users/recipes-6.hires.png deleted file mode 100644 index e0f55a1e30b..00000000000 Binary files a/dev/users/recipes-6.hires.png and /dev/null differ diff --git a/dev/users/recipes-6.pdf b/dev/users/recipes-6.pdf deleted file mode 100644 index 64cc2e1deed..00000000000 Binary files a/dev/users/recipes-6.pdf and /dev/null differ diff --git a/dev/users/recipes-6.png b/dev/users/recipes-6.png deleted file mode 100644 index e26f5771cd8..00000000000 Binary files a/dev/users/recipes-6.png and /dev/null differ diff --git a/dev/users/recipes-6.py b/dev/users/recipes-6.py deleted file mode 100644 index 29280c7d4fb..00000000000 --- a/dev/users/recipes-6.py +++ /dev/null @@ -1,29 +0,0 @@ -np.random.seed(1234) - -Nsteps = 500 -t = np.arange(Nsteps) - -mu = 0.002 -sigma = 0.01 - -# the steps and position -S = mu + sigma*np.random.randn(Nsteps) -X = S.cumsum() - -# the 1 sigma upper and lower analytic population bounds -lower_bound = mu*t - sigma*np.sqrt(t) -upper_bound = mu*t + sigma*np.sqrt(t) - -fig, ax = plt.subplots(1) -ax.plot(t, X, lw=2, label='walker position', color='blue') -ax.plot(t, mu*t, lw=1, label='population mean', color='black', ls='--') -ax.fill_between(t, lower_bound, upper_bound, facecolor='yellow', alpha=0.5, - label='1 sigma range') -ax.legend(loc='upper left') - -# here we use the where argument to only fill the region where the -# walker is above the population 1 sigma boundary -ax.fill_between(t, upper_bound, X, where=X>upper_bound, facecolor='blue', alpha=0.5) -ax.set_xlabel('num steps') -ax.set_ylabel('position') -ax.grid() \ No newline at end of file diff --git a/dev/users/recipes-7.hires.png b/dev/users/recipes-7.hires.png deleted file mode 100644 index a5e11758d6d..00000000000 Binary files a/dev/users/recipes-7.hires.png and /dev/null differ diff --git a/dev/users/recipes-7.pdf b/dev/users/recipes-7.pdf deleted file mode 100644 index b05e84dd64c..00000000000 Binary files a/dev/users/recipes-7.pdf and /dev/null differ diff --git a/dev/users/recipes-7.png b/dev/users/recipes-7.png deleted file mode 100644 index e9fe4dd859c..00000000000 Binary files a/dev/users/recipes-7.png and /dev/null differ diff --git a/dev/users/recipes-7.py b/dev/users/recipes-7.py deleted file mode 100644 index ffeeec6a20e..00000000000 --- a/dev/users/recipes-7.py +++ /dev/null @@ -1,9 +0,0 @@ -np.random.seed(1234) -fig, ax = plt.subplots(1) -ax.plot(np.random.randn(300), 'o-', label='normal distribution') -ax.plot(np.random.rand(300), 's-', label='uniform distribution') -ax.set_ylim(-3, 3) -leg = ax.legend(loc='best', fancybox=True) -leg.get_frame().set_alpha(0.5) - -ax.set_title('fancy, transparent legends') \ No newline at end of file diff --git a/dev/users/recipes-8.hires.png b/dev/users/recipes-8.hires.png deleted file mode 100644 index cbaf07e85a2..00000000000 Binary files a/dev/users/recipes-8.hires.png and /dev/null differ diff --git a/dev/users/recipes-8.pdf b/dev/users/recipes-8.pdf deleted file mode 100644 index a63f50b9685..00000000000 Binary files a/dev/users/recipes-8.pdf and /dev/null differ diff --git a/dev/users/recipes-8.png b/dev/users/recipes-8.png deleted file mode 100644 index 40e30a75fc5..00000000000 Binary files a/dev/users/recipes-8.png and /dev/null differ diff --git a/dev/users/recipes-8.py b/dev/users/recipes-8.py deleted file mode 100644 index b431806f37f..00000000000 --- a/dev/users/recipes-8.py +++ /dev/null @@ -1,15 +0,0 @@ -np.random.seed(1234) -fig, ax = plt.subplots(1) -x = 30*np.random.randn(10000) -mu = x.mean() -median = np.median(x) -sigma = x.std() -textstr = '$\mu=%.2f$\n$\mathrm{median}=%.2f$\n$\sigma=%.2f$'%(mu, median, sigma) - -ax.hist(x, 50) -# these are matplotlib.patch.Patch properties -props = dict(boxstyle='round', facecolor='wheat', alpha=0.5) - -# place a text box in upper left in axes coords -ax.text(0.05, 0.95, textstr, transform=ax.transAxes, fontsize=14, - verticalalignment='top', bbox=props) \ No newline at end of file diff --git a/dev/users/recipes.html b/dev/users/recipes.html deleted file mode 100644 index 5edc641fe88..00000000000 --- a/dev/users/recipes.html +++ /dev/null @@ -1,511 +0,0 @@ - - - - - - - - Our Favorite Recipes — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      Table Of Contents

      - - -

      Previous topic

      -

      Annotating Axes

      -

      Next topic

      -

      Screenshots

      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      Our Favorite Recipes

      -

      Here is a collection of short tutorials, examples and code snippets -that illustrate some of the useful idioms and tricks to make snazzier -figures and overcome some matplotlib warts.

      -
      -

      Sharing axis limits and views

      -

      It’s common to make two or more plots which share an axis, eg two -subplots with time as a common axis. When you pan and zoom around on -one, you want the other to move around with you. To facilitate this, -matplotlib Axes support a sharex and sharey attribute. When -you create a subplot() or -axes() instance, you can pass in a keyword -indicating what axes you want to share with

      -
      In [96]: t = np.arange(0, 10, 0.01)
      -
      -In [97]: ax1 = plt.subplot(211)
      -
      -In [98]: ax1.plot(t, np.sin(2*np.pi*t))
      -Out[98]: [<matplotlib.lines.Line2D object at 0x98719ec>]
      -
      -In [99]: ax2 = plt.subplot(212, sharex=ax1)
      -
      -In [100]: ax2.plot(t, np.sin(4*np.pi*t))
      -Out[100]: [<matplotlib.lines.Line2D object at 0xb7d8fec>]
      -
      -
      -
      -
      -

      Easily creating subplots

      -

      In early versions of matplotlib, if you wanted to use the pythonic API -and create a figure instance and from that create a grid of subplots, -possibly with shared axes, it involved a fair amount of boilerplate -code. e.g.

      -
      # old style
      -fig = plt.figure()
      -ax1 = fig.add_subplot(221)
      -ax2 = fig.add_subplot(222, sharex=ax1, sharey=ax1)
      -ax3 = fig.add_subplot(223, sharex=ax1, sharey=ax1)
      -ax3 = fig.add_subplot(224, sharex=ax1, sharey=ax1)
      -
      -
      -

      Fernando Perez has provided a nice top level method to create in -subplots() (note the “s” at the end) -everything at once, and turn off x and y sharing for the whole bunch. -You can either unpack the axes individually:

      -
      # new style method 1; unpack the axes
      -fig, ((ax1, ax2), (ax3, ax4)) = plt.subplots(2, 2, sharex=True, sharey=True)
      -ax1.plot(x)
      -
      -
      -

      or get them back as a numrows x numcolumns object array which supports -numpy indexing:

      -
      # new style method 2; use an axes array
      -fig, axs = plt.subplots(2, 2, sharex=True, sharey=True)
      -axs[0,0].plot(x)
      -
      -
      -
      -
      -

      Fixing common date annoyances

      -

      (Source code)

      -

      matplotlib allows you to natively plots python datetime instances, and -for the most part does a good job picking tick locations and string -formats. There are a couple of things it does not handle so -gracefully, and here are some tricks to help you work around them. -We’ll load up some sample date data which contains datetime.date -objects in a numpy record array:

      -
      In [63]: datafile = cbook.get_sample_data('goog.npy')
      -
      -In [64]: r = np.load(datafile).view(np.recarray)
      -
      -In [65]: r.dtype
      -Out[65]: dtype([('date', '|O4'), ('', '|V4'), ('open', '<f8'),
      -                ('high', '<f8'), ('low', '<f8'), ('close', '<f8'),
      -                ('volume', '<i8'),  ('adj_close', '<f8')])
      -
      -In [66]: r.date
      -Out[66]:
      -array([2004-08-19, 2004-08-20, 2004-08-23, ..., 2008-10-10, 2008-10-13,
      -       2008-10-14], dtype=object)
      -
      -

      The dtype of the numpy record array for the field date is |O4 -which means it is a 4-byte python object pointer; in this case the -objects are datetime.date instances, which we can see when we print -some samples in the ipython terminal window.

      -

      If you plot the data,

      -
      In [67]: plot(r.date, r.close)
      -Out[67]: [<matplotlib.lines.Line2D object at 0x92a6b6c>]
      -
      -

      you will see that the x tick labels are all squashed together.

      -

      (Source code, png, hires.png, pdf)

      -
      -../_images/recipes-2.png -
      -

      Another annoyance is that if you hover the mouse over a the window and -look in the lower right corner of the matplotlib toolbar -(Interactive navigation) at the x and y coordinates, you see that -the x locations are formatted the same way the tick labels are, eg -“Dec 2004”. What we’d like is for the location in the toolbar to have -a higher degree of precision, eg giving us the exact date out mouse is -hovering over. To fix the first problem, we can use -matplotlib.figure.Figure.autofmt_xdate() and to fix the second -problem we can use the ax.fmt_xdata attribute which can be set to -any function that takes a scalar and returns a string. matplotlib has -a number of date formatters built in, so we’ll use one of those.

      -
      plt.close('all')
      -fig, ax = plt.subplots(1)
      -ax.plot(r.date, r.close)
      -
      -# rotate and align the tick labels so they look better
      -fig.autofmt_xdate()
      -
      -# use a more precise date string for the x axis locations in the
      -# toolbar
      -import matplotlib.dates as mdates
      -ax.fmt_xdata = mdates.DateFormatter('%Y-%m-%d')
      -plt.title('fig.autofmt_xdate fixes the labels')
      -
      -
      -

      (Source code, png, hires.png, pdf)

      -
      -../_images/recipes-3.png -
      -

      Now when you hover your mouse over the plotted data, you’ll see date -format strings like 2004-12-01 in the toolbar.

      -
      -
      -

      Fill Between and Alpha

      -

      The fill_between() function generates a -shaded region between a min and max boundary that is useful for -illustrating ranges. It has a very handy where argument to -combine filling with logical ranges, eg to just fill in a curve over -some threshold value.

      -

      At its most basic level, fill_between can be use to enhance a -graphs visual appearance. Let’s compare two graphs of a financial -times with a simple line plot on the left and a filled line on the -right.

      -
      import matplotlib.pyplot as plt
      -import numpy as np
      -
      -import matplotlib.cbook as cbook
      -
      -# load up some sample financial data
      -datafile = cbook.get_sample_data('goog.npy')
      -r = np.load(datafile).view(np.recarray)
      -
      -# create two subplots with the shared x and y axes
      -fig, (ax1, ax2) = plt.subplots(1,2, sharex=True, sharey=True)
      -
      -pricemin = r.close.min()
      -
      -ax1.plot(r.date, r.close, lw=2)
      -ax2.fill_between(r.date, pricemin, r.close, facecolor='blue', alpha=0.5)
      -
      -for ax in ax1, ax2:
      -    ax.grid(True)
      -
      -ax1.set_ylabel('price')
      -for label in ax2.get_yticklabels():
      -    label.set_visible(False)
      -
      -fig.suptitle('Google (GOOG) daily closing price')
      -fig.autofmt_xdate()
      -
      -
      -

      (Source code, png, hires.png, pdf)

      -
      -../_images/recipes-4.png -
      -

      The alpha channel is not necessary here, but it can be used to soften -colors for more visually appealing plots. In other examples, as we’ll -see below, the alpha channel is functionally useful as the shaded -regions can overlap and alpha allows you to see both. Note that the -postscript format does not support alpha (this is a postscript -limitation, not a matplotlib limitation), so when using alpha save -your figures in PNG, PDF or SVG.

      -

      Our next example computes two populations of random walkers with a -different mean and standard deviation of the normal distributions from -which the steps are drawn. We use shared regions to plot +/- one -standard deviation of the mean position of the population. Here the -alpha channel is useful, not just aesthetic.

      -
      import matplotlib.pyplot as plt
      -import numpy as np
      -
      -Nsteps, Nwalkers = 100, 250
      -t = np.arange(Nsteps)
      -
      -# an (Nsteps x Nwalkers) array of random walk steps
      -S1 = 0.002 + 0.01*np.random.randn(Nsteps, Nwalkers)
      -S2 = 0.004 + 0.02*np.random.randn(Nsteps, Nwalkers)
      -
      -# an (Nsteps x Nwalkers) array of random walker positions
      -X1 = S1.cumsum(axis=0)
      -X2 = S2.cumsum(axis=0)
      -
      -
      -# Nsteps length arrays empirical means and standard deviations of both
      -# populations over time
      -mu1 = X1.mean(axis=1)
      -sigma1 = X1.std(axis=1)
      -mu2 = X2.mean(axis=1)
      -sigma2 = X2.std(axis=1)
      -
      -# plot it!
      -fig, ax = plt.subplots(1)
      -ax.plot(t, mu1, lw=2, label='mean population 1', color='blue')
      -ax.plot(t, mu1, lw=2, label='mean population 2', color='yellow')
      -ax.fill_between(t, mu1+sigma1, mu1-sigma1, facecolor='blue', alpha=0.5)
      -ax.fill_between(t, mu2+sigma2, mu2-sigma2, facecolor='yellow', alpha=0.5)
      -ax.set_title('random walkers empirical $\mu$ and $\pm \sigma$ interval')
      -ax.legend(loc='upper left')
      -ax.set_xlabel('num steps')
      -ax.set_ylabel('position')
      -ax.grid()
      -
      -
      -

      (Source code, png, hires.png, pdf)

      -
      -../_images/recipes-5.png -
      -

      The where keyword argument is very handy for highlighting certain -regions of the graph. where takes a boolean mask the same length -as the x, ymin and ymax arguments, and only fills in the region where -the boolean mask is True. In the example below, we simulate a single -random walker and compute the analytic mean and standard deviation of -the population positions. The population mean is shown as the black -dashed line, and the plus/minus one sigma deviation from the mean is -shown as the yellow filled region. We use the where mask -X>upper_bound to find the region where the walker is above the one -sigma boundary, and shade that region blue.

      -
      np.random.seed(1234)
      -
      -Nsteps = 500
      -t = np.arange(Nsteps)
      -
      -mu = 0.002
      -sigma = 0.01
      -
      -# the steps and position
      -S = mu + sigma*np.random.randn(Nsteps)
      -X = S.cumsum()
      -
      -# the 1 sigma upper and lower analytic population bounds
      -lower_bound = mu*t - sigma*np.sqrt(t)
      -upper_bound = mu*t + sigma*np.sqrt(t)
      -
      -fig, ax = plt.subplots(1)
      -ax.plot(t, X, lw=2, label='walker position', color='blue')
      -ax.plot(t, mu*t, lw=1, label='population mean', color='black', ls='--')
      -ax.fill_between(t, lower_bound, upper_bound, facecolor='yellow', alpha=0.5,
      -                label='1 sigma range')
      -ax.legend(loc='upper left')
      -
      -# here we use the where argument to only fill the region where the
      -# walker is above the population 1 sigma boundary
      -ax.fill_between(t, upper_bound, X, where=X>upper_bound, facecolor='blue', alpha=0.5)
      -ax.set_xlabel('num steps')
      -ax.set_ylabel('position')
      -ax.grid()
      -
      -
      -

      (Source code, png, hires.png, pdf)

      -
      -../_images/recipes-6.png -
      -

      Another handy use of filled regions is to highlight horizontal or -vertical spans of an axes – for that matplotlib has some helper -functions axhspan() and -axvspan() and example -pylab_examples example code: axhspan_demo.py.

      -
      -
      -

      Transparent, fancy legends

      -

      Sometimes you know what your data looks like before you plot it, and -may know for instance that there won’t be much data in the upper right -hand corner. Then you can safely create a legend that doesn’t overlay -your data:

      -
      ax.legend(loc='upper right')
      -
      -
      -

      Other times you don’t know where your data is, and loc=’best’ will try -and place the legend:

      -
      ax.legend(loc='best')
      -
      -
      -

      but still, your legend may overlap your data, and in these cases it’s -nice to make the legend frame transparent.

      -
      np.random.seed(1234)
      -fig, ax = plt.subplots(1)
      -ax.plot(np.random.randn(300), 'o-', label='normal distribution')
      -ax.plot(np.random.rand(300), 's-', label='uniform distribution')
      -ax.set_ylim(-3, 3)
      -leg = ax.legend(loc='best', fancybox=True)
      -leg.get_frame().set_alpha(0.5)
      -
      -ax.set_title('fancy, transparent legends')
      -
      -
      -

      (Source code, png, hires.png, pdf)

      -
      -../_images/recipes-7.png -
      -
      -
      -

      Placing text boxes

      -

      When decorating axes with text boxes, two useful tricks are to place -the text in axes coordinates (see Transformations Tutorial), so the -text doesn’t move around with changes in x or y limits. You can also -use the bbox property of text to surround the text with a -Patch instance – the bbox keyword -argument takes a dictionary with keys that are Patch properties.

      -
      np.random.seed(1234)
      -fig, ax = plt.subplots(1)
      -x = 30*np.random.randn(10000)
      -mu = x.mean()
      -median = np.median(x)
      -sigma = x.std()
      -textstr = '$\mu=%.2f$\n$\mathrm{median}=%.2f$\n$\sigma=%.2f$'%(mu, median, sigma)
      -
      -ax.hist(x, 50)
      -# these are matplotlib.patch.Patch properties
      -props = dict(boxstyle='round', facecolor='wheat', alpha=0.5)
      -
      -# place a text box in upper left in axes coords
      -ax.text(0.05, 0.95, textstr, transform=ax.transAxes, fontsize=14,
      -        verticalalignment='top', bbox=props)
      -
      -
      -

      (Source code, png, hires.png, pdf)

      -
      -../_images/recipes-8.png -
      -
      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/users/screenshots.html b/dev/users/screenshots.html deleted file mode 100644 index 301e6a3b1d3..00000000000 --- a/dev/users/screenshots.html +++ /dev/null @@ -1,452 +0,0 @@ - - - - - - - - Screenshots — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      Table Of Contents

      - - -

      Previous topic

      -

      Our Favorite Recipes

      -

      Next topic

      -

      What’s new in matplotlib

      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      Screenshots

      -

      Here you’ll find a host of example plots with the code that -generated them.

      -
      -

      Simple Plot

      -

      Here’s a very basic plot() with text labels:

      -

      (Source code, png, hires.png, pdf)

      -
      -../_images/simple_plot1.png -
      -
      -
      -

      Subplot demo

      -

      Multiple axes (i.e. subplots) are created with the -subplot() command:

      -

      (Source code, png, hires.png, pdf)

      -
      -../_images/subplot_demo3.png -
      -
      -
      -

      Histograms

      -

      The hist() command automatically generates -histograms and returns the bin counts or probabilities:

      -

      (Source code, png, hires.png, pdf)

      -
      -../_images/histogram_demo_features2.png -
      -
      -
      -

      Path demo

      -

      You can add arbitrary paths in matplotlib using the -matplotlib.path module:

      -

      (Source code, png, hires.png, pdf)

      -
      -../_images/path_patch_demo1.png -
      -
      -
      -

      mplot3d

      -

      The mplot3d toolkit (see mplot3d tutorial and -mplot3d Examples) has support for simple 3d graphs -including surface, wireframe, scatter, and bar charts.

      -

      (Source code, png, hires.png, pdf)

      -
      -../_images/surface3d_demo4.png -
      -

      Thanks to John Porter, Jonathon Taylor, Reinier Heeres, and Ben Root for -the mplot3d toolkit. This toolkit is included with all standard matplotlib -installs.

      -
      -
      -

      Streamplot

      -

      The streamplot() function plots the streamlines of -a vector field. In addition to simply plotting the streamlines, it allows you -to map the colors and/or line widths of streamlines to a separate parameter, -such as the speed or local intensity of the vector field.

      -

      (Source code)

      -
      -../_images/streamplot_demo_features_001.png -

      (png, hires.png, pdf)

      -
      -
      -../_images/streamplot_demo_features_011.png -

      (png, hires.png, pdf)

      -
      -

      This feature complements the quiver() function for -plotting vector fields. Thanks to Tom Flannaghan and Tony Yu for adding the -streamplot function.

      -
      -
      -

      Ellipses

      -

      In support of the -Phoenix mission to -Mars (which used matplotlib to display ground tracking of spacecraft), -Michael Droettboom built on work by Charlie Moad to provide an extremely -accurate 8-spline approximation to elliptical arcs (see -Arc), which are insensitive to zoom level.

      -

      (Source code, png, hires.png, pdf)

      -
      -../_images/ellipse_demo1.png -
      -
      -
      -

      Bar charts

      -

      Bar charts are simple to create using the bar() -command, which includes customizations such as error bars:

      -

      (Source code, png, hires.png, pdf)

      -
      -../_images/barchart_demo3.png -
      -

      It’s also simple to create stacked bars -(bar_stacked.py), -candlestick bars -(bar_stacked.py), -and horizontal bar charts -(barh_demo.py).

      -
      -
      -

      Pie charts

      -

      The pie() command allows you to easily create pie -charts. Optional features include auto-labeling the percentage of area, -exploding one or more wedges from the center of the pie, and a shadow effect. -Take a close look at the attached code, which generates this figure in just -a few lines of code.

      -

      (Source code, png, hires.png, pdf)

      -
      -../_images/pie_demo_features1.png -
      -
      -
      -

      Table demo

      -

      The table() command adds a text table -to an axes.

      -

      (Source code, png, hires.png, pdf)

      -
      -../_images/table_demo1.png -
      -
      -
      -

      Scatter demo

      -

      The scatter() command makes a scatter plot -with (optional) size and color arguments. This example plots changes -in Google’s stock price, with marker sizes reflecting the -trading volume and colors varying with time. Here, the -alpha attribute is used to make semitransparent circle markers.

      -

      (Source code, png, hires.png, pdf)

      -
      -../_images/scatter_demo21.png -
      -
      -
      -

      Slider demo

      -

      Matplotlib has basic GUI widgets that are independent of the graphical -user interface you are using, allowing you to write cross GUI figures -and widgets. See matplotlib.widgets and the -widget examples.

      -

      (Source code, png, hires.png, pdf)

      -
      -../_images/slider_demo.png -
      -
      -
      -

      Fill demo

      -

      The fill() command lets you -plot filled curves and polygons:

      -

      (Source code, png, hires.png, pdf)

      -
      -../_images/fill_demo2.png -
      -

      Thanks to Andrew Straw for adding this function.

      -
      -
      -

      Date demo

      -

      You can plot date data with major and minor ticks and custom tick formatters -for both.

      -

      (Source code, png, hires.png, pdf)

      -
      -../_images/date_demo3.png -
      -

      See matplotlib.ticker and matplotlib.dates for details and usage.

      -
      -
      -

      Financial charts

      -

      You can make sophisticated financial plots by combining the various -plot functions, layout commands, and labeling tools provided by matplotlib. -The following example emulates one of the financial plots in -ChartDirector:

      -

      (Source code, png, hires.png, pdf)

      -
      -../_images/finance_work21.png -
      -
      -
      -

      Basemap demo

      -

      Jeff Whitaker’s Basemap (Not distributed with matplotlib) add-on toolkit makes it possible to plot data on many different map projections. This example shows how to plot contours, markers and text on an orthographic projection, with NASA’s “blue marble” satellite image as a background.

      -

      (Source code, png, hires.png, pdf)

      -
      -../_images/plotmap.png -
      -
      -
      -

      Log plots

      -

      The semilogx(), -semilogy() and -loglog() functions simplify the creation of -logarithmic plots.

      -

      (Source code, png, hires.png, pdf)

      -
      -../_images/log_demo2.png -
      -

      Thanks to Andrew Straw, Darren Dale and Gregory Lielens for contributions -log-scaling infrastructure.

      -
      -
      -

      Polar plots

      -

      The polar() command generates polar plots.

      -

      (Source code, png, hires.png, pdf)

      -
      -../_images/polar_demo1.png -
      -
      -
      -

      Legends

      -

      The legend() command automatically -generates figure legends, with MATLAB-compatible legend placement -commands.

      -

      (Source code, png, hires.png, pdf)

      -
      -../_images/legend_demo5.png -
      -

      Thanks to Charles Twardy for input on the legend command.

      -
      -
      -

      Mathtext_examples

      -

      Below is a sampling of the many TeX expressions now supported by matplotlib’s -internal mathtext engine. The mathtext module provides TeX style mathematical -expressions using freetype2 -and the BaKoMa computer modern or STIX fonts. -See the matplotlib.mathtext module for additional details.

      -

      (Source code, png, hires.png, pdf)

      -
      -../_images/mathtext_examples1.png -
      -

      Matplotlib’s mathtext infrastructure is an independent implementation and -does not require TeX or any external packages installed on your computer. See -the tutorial at Writing mathematical expressions.

      -
      -
      -

      Native TeX rendering

      -

      Although matplotlib’s internal math rendering engine is quite -powerful, sometimes you need TeX. Matplotlib supports external TeX -rendering of strings with the usetex option.

      -

      (Source code, png, hires.png, pdf)

      -
      -../_images/tex_demo1.png -
      -
      -
      -

      EEG demo

      -

      You can embed matplotlib into pygtk, wx, Tk, FLTK, or Qt -applications. Here is a screenshot of an EEG viewer called pbrain, -which is part of the NeuroImaging in Python suite -NIPY.

      -../_images/eeg_small.png -

      The lower axes uses specgram() -to plot the spectrogram of one of the EEG channels.

      -

      For examples of how to embed matplotlib in different toolkits, see:

      -
      -
      -
      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/users/shell.html b/dev/users/shell.html deleted file mode 100644 index 2d63b7c5a3b..00000000000 --- a/dev/users/shell.html +++ /dev/null @@ -1,289 +0,0 @@ - - - - - - - - Using matplotlib in a python shell — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      Table Of Contents

      - - -

      Previous topic

      -

      Customizing matplotlib

      -

      Next topic

      -

      Working with text

      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      Using matplotlib in a python shell

      -

      By default, matplotlib defers drawing until the end of the script -because drawing can be an expensive operation, and you may not want -to update the plot every time a single property is changed, only once -after all the properties have changed.

      -

      But when working from the python shell, you usually do want to update -the plot with every command, eg, after changing the -xlabel(), or the marker style of a line. -While this is simple in concept, in practice it can be tricky, because -matplotlib is a graphical user interface application under the hood, -and there are some tricks to make the applications work right in a -python shell.

      -
      -

      Ipython to the rescue

      -

      Fortunately, ipython, an enhanced -interactive python shell, has figured out all of these tricks, and is -matplotlib aware, so when you start ipython in the pylab mode.

      -
      johnh@flag:~> ipython -pylab
      -Python 2.4.5 (#4, Apr 12 2008, 09:09:16)
      -IPython 0.9.0 -- An enhanced Interactive Python.
      -
      -  Welcome to pylab, a matplotlib-based Python environment.
      -  For more information, type 'help(pylab)'.
      -
      -In [1]: x = randn(10000)
      -
      -In [2]: hist(x, 100)
      -
      -
      -

      it sets everything up for you so interactive plotting works as you -would expect it to. Call figure() and a -figure window pops up, call plot() and your -data appears in the figure window.

      -

      Note in the example above that we did not import any matplotlib names -because in pylab mode, ipython will import them automatically. -ipython also turns on interactive mode for you, which causes every -pyplot command to trigger a figure update, and also provides a -matplotlib aware run command to run matplotlib scripts -efficiently. ipython will turn off interactive mode during a run -command, and then restore the interactive state at the end of the -run so you can continue tweaking the figure manually.

      -

      There has been a lot of recent work to embed ipython, with pylab -support, into various GUI applications, so check on the ipython -mailing list for the -latest status.

      -
      -
      -

      Other python interpreters

      -

      If you can’t use ipython, and still want to use matplotlib/pylab from -an interactive python shell, e.g., the plain-ole standard python -interactive interpreter, you -are going to need to understand what a matplotlib backend is -What is a backend?.

      -

      With the TkAgg backend, which uses the Tkinter user interface toolkit, -you can use matplotlib from an arbitrary non-gui python shell. Just set your -backend : TkAgg and interactive : True in your -matplotlibrc file (see Customizing matplotlib) and fire -up python. Then:

      -
      >>> from pylab import *
      ->>> plot([1,2,3])
      ->>> xlabel('hi mom')
      -
      -
      -

      should work out of the box. This is also likely to work with recent -versions of the qt4agg and gtkagg backends, and with the macosx backend -on the Macintosh. Note, in batch mode, -i.e. when making -figures from scripts, interactive mode can be slow since it redraws -the figure with each command. So you may want to think carefully -before making this the default behavior via the matplotlibrc -file instead of using the functions listed in the next section.

      -

      Gui shells are at best problematic, because they have to run a -mainloop, but interactive plotting also involves a mainloop. Ipython -has sorted all this out for the primary matplotlib backends. There -may be other shells and IDEs that also work with matplotlib in interactive -mode, but one obvious candidate does not: -the python IDLE IDE is a Tkinter gui app that does -not support pylab interactive mode, regardless of backend.

      -
      -
      -

      Controlling interactive updating

      -

      The interactive property of the pyplot interface controls whether a -figure canvas is drawn on every pyplot command. If interactive is -False, then the figure state is updated on every plot command, but -will only be drawn on explicit calls to -draw(). When interactive is -True, then every pyplot command triggers a draw.

      -

      The pyplot interface provides 4 commands that are useful for -interactive control.

      -
      -
      isinteractive()
      -
      returns the interactive setting True|False
      -
      ion()
      -
      turns interactive mode on
      -
      ioff()
      -
      turns interactive mode off
      -
      draw()
      -
      forces a figure redraw
      -
      -

      When working with a big figure in which drawing is expensive, you may -want to turn matplotlib’s interactive setting off temporarily to avoid -the performance hit:

      -
      >>> #create big-expensive-figure
      ->>> ioff()      # turn updates off
      ->>> title('now how much would you pay?')
      ->>> xticklabels(fontsize=20, color='green')
      ->>> draw()      # force a draw
      ->>> savefig('alldone', dpi=300)
      ->>> close()
      ->>> ion()      # turn updating back on
      ->>> plot(rand(20), mfc='g', mec='r', ms=40, mew=4, ls='--', lw=3)
      -
      -
      -
      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/users/text_intro.html b/dev/users/text_intro.html deleted file mode 100644 index 1924b3a448f..00000000000 --- a/dev/users/text_intro.html +++ /dev/null @@ -1,264 +0,0 @@ - - - - - - - - Text introduction — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      Table Of Contents

      - - -

      Previous topic

      -

      Working with text

      -

      Next topic

      -

      Text properties and layout

      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      Text introduction

      -

      matplotlib has excellent text support, including mathematical -expressions, truetype support for raster and vector outputs, newline -separated text with arbitrary rotations, and unicode support. Because -we embed the fonts directly in the output documents, eg for postscript -or PDF, what you see on the screen is what you get in the hardcopy. -freetype2 support -produces very nice, antialiased fonts, that look good even at small -raster sizes. matplotlib includes its own -matplotlib.font_manager, thanks to Paul Barrett, which -implements a cross platform, W3C compliant font finding algorithm.

      -

      You have total control over every text property (font size, font -weight, text location and color, etc) with sensible defaults set in -the rc file. And significantly for those interested in mathematical -or scientific figures, matplotlib implements a large number of TeX -math symbols and commands, to support mathematical expressions anywhere in your figure.

      -
      -
      -

      Basic text commands

      -

      The following commands are used to create text in the pyplot -interface

      - -

      All of these functions create and return a -matplotlib.text.Text() instance, which can be configured with a -variety of font and other properties. The example below shows all of -these commands in action.

      -
      # -*- coding: utf-8 -*-
      -import matplotlib.pyplot as plt
      -
      -fig = plt.figure()
      -fig.suptitle('bold figure suptitle', fontsize=14, fontweight='bold')
      -
      -ax = fig.add_subplot(111)
      -fig.subplots_adjust(top=0.85)
      -ax.set_title('axes title')
      -
      -ax.set_xlabel('xlabel')
      -ax.set_ylabel('ylabel')
      -
      -ax.text(3, 8, 'boxed italics text in data coords', style='italic',
      -        bbox={'facecolor':'red', 'alpha':0.5, 'pad':10})
      -
      -ax.text(2, 6, r'an equation: $E=mc^2$', fontsize=15)
      -
      -ax.text(3, 2, unicode('unicode: Institut f\374r Festk\366rperphysik', 'latin-1'))
      -
      -ax.text(0.95, 0.01, 'colored text in axes coords',
      -        verticalalignment='bottom', horizontalalignment='right',
      -        transform=ax.transAxes,
      -        color='green', fontsize=15)
      -
      -
      -ax.plot([2], [1], 'o')
      -ax.annotate('annotate', xy=(2, 1), xytext=(3, 4),
      -            arrowprops=dict(facecolor='black', shrink=0.05))
      -
      -ax.axis([0, 10, 0, 10])
      -
      -plt.show()
      -
      -
      -

      (Source code, png, hires.png, pdf)

      -
      -../_images/text_commands.png -
      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/users/text_props.html b/dev/users/text_props.html deleted file mode 100644 index a21659d4a6d..00000000000 --- a/dev/users/text_props.html +++ /dev/null @@ -1,366 +0,0 @@ - - - - - - - - Text properties and layout — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      Previous topic

      -

      Text introduction

      -

      Next topic

      -

      Writing mathematical expressions

      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      Text properties and layout

      -

      The matplotlib.text.Text instances have a variety of -properties which can be configured via keyword arguments to the text -commands (eg title(), -xlabel() and text()).

      - ---- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      PropertyValue Type
      alphafloat
      backgroundcolorany matplotlib color
      bboxrectangle prop dict plus key ‘pad’ which is a pad in points
      clip_boxa matplotlib.transform.Bbox instance
      clip_on[True | False]
      clip_patha Path instance and a Transform instance, a Patch
      colorany matplotlib color
      family[ ‘serif’ | ‘sans-serif’ | ‘cursive’ | ‘fantasy’ | ‘monospace’ ]
      fontpropertiesa matplotlib.font_manager.FontProperties instance
      horizontalalignment or ha[ ‘center’ | ‘right’ | ‘left’ ]
      labelany string
      linespacingfloat
      multialignment[‘left’ | ‘right’ | ‘center’ ]
      name or fontnamestring eg, [‘Sans’ | ‘Courier’ | ‘Helvetica’ ...]
      picker[None|float|boolean|callable]
      position(x,y)
      rotation[ angle in degrees ‘vertical’ | ‘horizontal’
      size or fontsize[ size in points | relative size eg ‘smaller’, ‘x-large’ ]
      style or fontstyle[ ‘normal’ | ‘italic’ | ‘oblique’]
      textstring or anything printable with ‘%s’ conversion
      transforma matplotlib.transform transformation instance
      variant[ ‘normal’ | ‘small-caps’ ]
      verticalalignment or va[ ‘center’ | ‘top’ | ‘bottom’ | ‘baseline’ ]
      visible[True | False]
      weight or fontweight[ ‘normal’ | ‘bold’ | ‘heavy’ | ‘light’ | ‘ultrabold’ | ‘ultralight’]
      xfloat
      yfloat
      zorderany number
      -

      You can layout text with the alignment arguments -horizontalalignment, verticalalignment, and -multialignment. horizontalalignment controls whether the x -positional argument for the text indicates the left, center or right -side of the text bounding box. verticalalignment controls whether -the y positional argument for the text indicates the bottom, center or -top side of the text bounding box. multialignment, for newline -separated strings only, controls whether the different lines are left, -center or right justified. Here is an example which uses the -text() command to show the various alignment -possibilities. The use of transform=ax.transAxes throughout the -code indicates that the coordinates are given relative to the axes -bounding box, with 0,0 being the lower left of the axes and 1,1 the -upper right.

      -
      import matplotlib.pyplot as plt
      -import matplotlib.patches as patches
      -
      -# build a rectangle in axes coords
      -left, width = .25, .5
      -bottom, height = .25, .5
      -right = left + width
      -top = bottom + height
      -
      -fig = plt.figure()
      -ax = fig.add_axes([0,0,1,1])
      -
      -# axes coordinates are 0,0 is bottom left and 1,1 is upper right
      -p = patches.Rectangle(
      -    (left, bottom), width, height,
      -    fill=False, transform=ax.transAxes, clip_on=False
      -    )
      -
      -ax.add_patch(p)
      -
      -ax.text(left, bottom, 'left top',
      -        horizontalalignment='left',
      -        verticalalignment='top',
      -        transform=ax.transAxes)
      -
      -ax.text(left, bottom, 'left bottom',
      -        horizontalalignment='left',
      -        verticalalignment='bottom',
      -        transform=ax.transAxes)
      -
      -ax.text(right, top, 'right bottom',
      -        horizontalalignment='right',
      -        verticalalignment='bottom',
      -        transform=ax.transAxes)
      -
      -ax.text(right, top, 'right top',
      -        horizontalalignment='right',
      -        verticalalignment='top',
      -        transform=ax.transAxes)
      -
      -ax.text(right, bottom, 'center top',
      -        horizontalalignment='center',
      -        verticalalignment='top',
      -        transform=ax.transAxes)
      -
      -ax.text(left, 0.5*(bottom+top), 'right center',
      -        horizontalalignment='right',
      -        verticalalignment='center',
      -        rotation='vertical',
      -        transform=ax.transAxes)
      -
      -ax.text(left, 0.5*(bottom+top), 'left center',
      -        horizontalalignment='left',
      -        verticalalignment='center',
      -        rotation='vertical',
      -        transform=ax.transAxes)
      -
      -ax.text(0.5*(left+right), 0.5*(bottom+top), 'middle',
      -        horizontalalignment='center',
      -        verticalalignment='center',
      -        fontsize=20, color='red',
      -        transform=ax.transAxes)
      -
      -ax.text(right, 0.5*(bottom+top), 'centered',
      -        horizontalalignment='center',
      -        verticalalignment='center',
      -        rotation='vertical',
      -        transform=ax.transAxes)
      -
      -ax.text(left, top, 'rotated\nwith newlines',
      -        horizontalalignment='center',
      -        verticalalignment='center',
      -        rotation=45,
      -        transform=ax.transAxes)
      -
      -ax.set_axis_off()
      -plt.show()
      -
      -
      -

      (Source code, png, hires.png, pdf)

      -
      -../_images/text_layout.png -
      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/users/tight_layout_guide-1.hires.png b/dev/users/tight_layout_guide-1.hires.png deleted file mode 100644 index 33bba380b6d..00000000000 Binary files a/dev/users/tight_layout_guide-1.hires.png and /dev/null differ diff --git a/dev/users/tight_layout_guide-1.pdf b/dev/users/tight_layout_guide-1.pdf deleted file mode 100644 index 12d7095ddfc..00000000000 Binary files a/dev/users/tight_layout_guide-1.pdf and /dev/null differ diff --git a/dev/users/tight_layout_guide-1.png b/dev/users/tight_layout_guide-1.png deleted file mode 100644 index 55900b524ad..00000000000 Binary files a/dev/users/tight_layout_guide-1.png and /dev/null differ diff --git a/dev/users/tight_layout_guide-1.py b/dev/users/tight_layout_guide-1.py deleted file mode 100644 index 207d7be0f95..00000000000 --- a/dev/users/tight_layout_guide-1.py +++ /dev/null @@ -1,12 +0,0 @@ -plt.rcParams['savefig.facecolor'] = "0.8" - -def example_plot(ax, fontsize=12): - ax.plot([1, 2]) - ax.locator_params(nbins=3) - ax.set_xlabel('x-label', fontsize=fontsize) - ax.set_ylabel('y-label', fontsize=fontsize) - ax.set_title('Title', fontsize=fontsize) - -plt.close('all') -fig, ax = plt.subplots() -example_plot(ax, fontsize=24) \ No newline at end of file diff --git a/dev/users/tight_layout_guide-10.hires.png b/dev/users/tight_layout_guide-10.hires.png deleted file mode 100644 index 01f71447f92..00000000000 Binary files a/dev/users/tight_layout_guide-10.hires.png and /dev/null differ diff --git a/dev/users/tight_layout_guide-10.pdf b/dev/users/tight_layout_guide-10.pdf deleted file mode 100644 index 3612d9eaeb6..00000000000 Binary files a/dev/users/tight_layout_guide-10.pdf and /dev/null differ diff --git a/dev/users/tight_layout_guide-10.png b/dev/users/tight_layout_guide-10.png deleted file mode 100644 index bd21c6b3772..00000000000 Binary files a/dev/users/tight_layout_guide-10.png and /dev/null differ diff --git a/dev/users/tight_layout_guide-10.py b/dev/users/tight_layout_guide-10.py deleted file mode 100644 index c65e6b0721a..00000000000 --- a/dev/users/tight_layout_guide-10.py +++ /dev/null @@ -1 +0,0 @@ -gs1.tight_layout(fig, rect=[0, 0, 0.5, 1]) \ No newline at end of file diff --git a/dev/users/tight_layout_guide-11.hires.png b/dev/users/tight_layout_guide-11.hires.png deleted file mode 100644 index 411750b1363..00000000000 Binary files a/dev/users/tight_layout_guide-11.hires.png and /dev/null differ diff --git a/dev/users/tight_layout_guide-11.pdf b/dev/users/tight_layout_guide-11.pdf deleted file mode 100644 index b7c134711ea..00000000000 Binary files a/dev/users/tight_layout_guide-11.pdf and /dev/null differ diff --git a/dev/users/tight_layout_guide-11.png b/dev/users/tight_layout_guide-11.png deleted file mode 100644 index b2815f719b4..00000000000 Binary files a/dev/users/tight_layout_guide-11.png and /dev/null differ diff --git a/dev/users/tight_layout_guide-11.py b/dev/users/tight_layout_guide-11.py deleted file mode 100644 index 5fdbaa30fa5..00000000000 --- a/dev/users/tight_layout_guide-11.py +++ /dev/null @@ -1,11 +0,0 @@ -gs2 = gridspec.GridSpec(3, 1) - -for ss in gs2: - ax = fig.add_subplot(ss) - example_plot(ax) - ax.set_title("") - ax.set_xlabel("") - -ax.set_xlabel("x-label", fontsize=12) - -gs2.tight_layout(fig, rect=[0.5, 0, 1, 1], h_pad=0.5) \ No newline at end of file diff --git a/dev/users/tight_layout_guide-12.hires.png b/dev/users/tight_layout_guide-12.hires.png deleted file mode 100644 index cc7947a8370..00000000000 Binary files a/dev/users/tight_layout_guide-12.hires.png and /dev/null differ diff --git a/dev/users/tight_layout_guide-12.pdf b/dev/users/tight_layout_guide-12.pdf deleted file mode 100644 index 3790ce544e1..00000000000 Binary files a/dev/users/tight_layout_guide-12.pdf and /dev/null differ diff --git a/dev/users/tight_layout_guide-12.png b/dev/users/tight_layout_guide-12.png deleted file mode 100644 index fb75a63ff14..00000000000 Binary files a/dev/users/tight_layout_guide-12.png and /dev/null differ diff --git a/dev/users/tight_layout_guide-12.py b/dev/users/tight_layout_guide-12.py deleted file mode 100644 index e00f0548848..00000000000 --- a/dev/users/tight_layout_guide-12.py +++ /dev/null @@ -1,8 +0,0 @@ -top = min(gs1.top, gs2.top) -bottom = max(gs1.bottom, gs2.bottom) - -gs1.tight_layout(fig, rect=[None, 0 + (bottom-gs1.bottom), - 0.5, 1 - (gs1.top-top)]) -gs2.tight_layout(fig, rect=[0.5, 0 + (bottom-gs2.bottom), - None, 1 - (gs2.top-top)], - h_pad=0.5) \ No newline at end of file diff --git a/dev/users/tight_layout_guide-13.hires.png b/dev/users/tight_layout_guide-13.hires.png deleted file mode 100644 index 908f8c55b8a..00000000000 Binary files a/dev/users/tight_layout_guide-13.hires.png and /dev/null differ diff --git a/dev/users/tight_layout_guide-13.pdf b/dev/users/tight_layout_guide-13.pdf deleted file mode 100644 index e30c6a7eb23..00000000000 Binary files a/dev/users/tight_layout_guide-13.pdf and /dev/null differ diff --git a/dev/users/tight_layout_guide-13.png b/dev/users/tight_layout_guide-13.png deleted file mode 100644 index 9dbbedb384c..00000000000 Binary files a/dev/users/tight_layout_guide-13.png and /dev/null differ diff --git a/dev/users/tight_layout_guide-13.py b/dev/users/tight_layout_guide-13.py deleted file mode 100644 index 53b0c379378..00000000000 --- a/dev/users/tight_layout_guide-13.py +++ /dev/null @@ -1,13 +0,0 @@ -plt.close('all') -fig = plt.figure() - -from mpl_toolkits.axes_grid1 import Grid -grid = Grid(fig, rect=111, nrows_ncols=(2,2), - axes_pad=0.25, label_mode='L', - ) - -for ax in grid: - example_plot(ax) - ax.title.set_visible(False) - -plt.tight_layout() \ No newline at end of file diff --git a/dev/users/tight_layout_guide-14.hires.png b/dev/users/tight_layout_guide-14.hires.png deleted file mode 100644 index 724165dae9c..00000000000 Binary files a/dev/users/tight_layout_guide-14.hires.png and /dev/null differ diff --git a/dev/users/tight_layout_guide-14.pdf b/dev/users/tight_layout_guide-14.pdf deleted file mode 100644 index 8ee8bf25f74..00000000000 Binary files a/dev/users/tight_layout_guide-14.pdf and /dev/null differ diff --git a/dev/users/tight_layout_guide-14.png b/dev/users/tight_layout_guide-14.png deleted file mode 100644 index f6d99ef5723..00000000000 Binary files a/dev/users/tight_layout_guide-14.png and /dev/null differ diff --git a/dev/users/tight_layout_guide-14.py b/dev/users/tight_layout_guide-14.py deleted file mode 100644 index c4245c9a44c..00000000000 --- a/dev/users/tight_layout_guide-14.py +++ /dev/null @@ -1,7 +0,0 @@ -plt.close('all') -fig = plt.figure(figsize=(4, 4)) -im = plt.imshow(arr, interpolation="none") - -plt.colorbar(im, use_gridspec=True) - -plt.tight_layout() \ No newline at end of file diff --git a/dev/users/tight_layout_guide-15.hires.png b/dev/users/tight_layout_guide-15.hires.png deleted file mode 100644 index e665ae3e4a6..00000000000 Binary files a/dev/users/tight_layout_guide-15.hires.png and /dev/null differ diff --git a/dev/users/tight_layout_guide-15.pdf b/dev/users/tight_layout_guide-15.pdf deleted file mode 100644 index c85330c8d72..00000000000 Binary files a/dev/users/tight_layout_guide-15.pdf and /dev/null differ diff --git a/dev/users/tight_layout_guide-15.png b/dev/users/tight_layout_guide-15.png deleted file mode 100644 index 6eff56b4937..00000000000 Binary files a/dev/users/tight_layout_guide-15.png and /dev/null differ diff --git a/dev/users/tight_layout_guide-15.py b/dev/users/tight_layout_guide-15.py deleted file mode 100644 index 2896e876756..00000000000 --- a/dev/users/tight_layout_guide-15.py +++ /dev/null @@ -1,10 +0,0 @@ -plt.close('all') -fig = plt.figure(figsize=(4, 4)) -im = plt.imshow(arr, interpolation="none") - -from mpl_toolkits.axes_grid1 import make_axes_locatable -divider = make_axes_locatable(plt.gca()) -cax = divider.append_axes("right", "5%", pad="3%") -plt.colorbar(im, cax=cax) - -plt.tight_layout() \ No newline at end of file diff --git a/dev/users/tight_layout_guide-2.hires.png b/dev/users/tight_layout_guide-2.hires.png deleted file mode 100644 index c93efdcaac8..00000000000 Binary files a/dev/users/tight_layout_guide-2.hires.png and /dev/null differ diff --git a/dev/users/tight_layout_guide-2.pdf b/dev/users/tight_layout_guide-2.pdf deleted file mode 100644 index b34f2fd4afb..00000000000 Binary files a/dev/users/tight_layout_guide-2.pdf and /dev/null differ diff --git a/dev/users/tight_layout_guide-2.png b/dev/users/tight_layout_guide-2.png deleted file mode 100644 index ff54b06c960..00000000000 Binary files a/dev/users/tight_layout_guide-2.png and /dev/null differ diff --git a/dev/users/tight_layout_guide-2.py b/dev/users/tight_layout_guide-2.py deleted file mode 100644 index b9336abc5d7..00000000000 --- a/dev/users/tight_layout_guide-2.py +++ /dev/null @@ -1 +0,0 @@ -plt.tight_layout() \ No newline at end of file diff --git a/dev/users/tight_layout_guide-3.hires.png b/dev/users/tight_layout_guide-3.hires.png deleted file mode 100644 index bb84047e4aa..00000000000 Binary files a/dev/users/tight_layout_guide-3.hires.png and /dev/null differ diff --git a/dev/users/tight_layout_guide-3.pdf b/dev/users/tight_layout_guide-3.pdf deleted file mode 100644 index f7574406129..00000000000 Binary files a/dev/users/tight_layout_guide-3.pdf and /dev/null differ diff --git a/dev/users/tight_layout_guide-3.png b/dev/users/tight_layout_guide-3.png deleted file mode 100644 index ac9d3f886fe..00000000000 Binary files a/dev/users/tight_layout_guide-3.png and /dev/null differ diff --git a/dev/users/tight_layout_guide-3.py b/dev/users/tight_layout_guide-3.py deleted file mode 100644 index e4d29d1ec92..00000000000 --- a/dev/users/tight_layout_guide-3.py +++ /dev/null @@ -1,6 +0,0 @@ -plt.close('all') -fig, ((ax1, ax2), (ax3, ax4)) = plt.subplots(nrows=2, ncols=2) -example_plot(ax1) -example_plot(ax2) -example_plot(ax3) -example_plot(ax4) \ No newline at end of file diff --git a/dev/users/tight_layout_guide-4.hires.png b/dev/users/tight_layout_guide-4.hires.png deleted file mode 100644 index 62653715095..00000000000 Binary files a/dev/users/tight_layout_guide-4.hires.png and /dev/null differ diff --git a/dev/users/tight_layout_guide-4.pdf b/dev/users/tight_layout_guide-4.pdf deleted file mode 100644 index be4e85982a7..00000000000 Binary files a/dev/users/tight_layout_guide-4.pdf and /dev/null differ diff --git a/dev/users/tight_layout_guide-4.png b/dev/users/tight_layout_guide-4.png deleted file mode 100644 index 41158f8b67a..00000000000 Binary files a/dev/users/tight_layout_guide-4.png and /dev/null differ diff --git a/dev/users/tight_layout_guide-4.py b/dev/users/tight_layout_guide-4.py deleted file mode 100644 index b9336abc5d7..00000000000 --- a/dev/users/tight_layout_guide-4.py +++ /dev/null @@ -1 +0,0 @@ -plt.tight_layout() \ No newline at end of file diff --git a/dev/users/tight_layout_guide-5.hires.png b/dev/users/tight_layout_guide-5.hires.png deleted file mode 100644 index 8175caad5fa..00000000000 Binary files a/dev/users/tight_layout_guide-5.hires.png and /dev/null differ diff --git a/dev/users/tight_layout_guide-5.pdf b/dev/users/tight_layout_guide-5.pdf deleted file mode 100644 index 2fa6b221eeb..00000000000 Binary files a/dev/users/tight_layout_guide-5.pdf and /dev/null differ diff --git a/dev/users/tight_layout_guide-5.png b/dev/users/tight_layout_guide-5.png deleted file mode 100644 index 8c713f52f2f..00000000000 Binary files a/dev/users/tight_layout_guide-5.png and /dev/null differ diff --git a/dev/users/tight_layout_guide-5.py b/dev/users/tight_layout_guide-5.py deleted file mode 100644 index 526e1b8ee0a..00000000000 --- a/dev/users/tight_layout_guide-5.py +++ /dev/null @@ -1 +0,0 @@ -plt.tight_layout(pad=0.4, w_pad=0.5, h_pad=1.0) \ No newline at end of file diff --git a/dev/users/tight_layout_guide-6.hires.png b/dev/users/tight_layout_guide-6.hires.png deleted file mode 100644 index fd59b62898a..00000000000 Binary files a/dev/users/tight_layout_guide-6.hires.png and /dev/null differ diff --git a/dev/users/tight_layout_guide-6.pdf b/dev/users/tight_layout_guide-6.pdf deleted file mode 100644 index 0dde704bd28..00000000000 Binary files a/dev/users/tight_layout_guide-6.pdf and /dev/null differ diff --git a/dev/users/tight_layout_guide-6.png b/dev/users/tight_layout_guide-6.png deleted file mode 100644 index 0c7689c9a1b..00000000000 Binary files a/dev/users/tight_layout_guide-6.png and /dev/null differ diff --git a/dev/users/tight_layout_guide-6.py b/dev/users/tight_layout_guide-6.py deleted file mode 100644 index e48db10b4f4..00000000000 --- a/dev/users/tight_layout_guide-6.py +++ /dev/null @@ -1,12 +0,0 @@ -plt.close('all') -fig = plt.figure() - -ax1 = plt.subplot(221) -ax2 = plt.subplot(223) -ax3 = plt.subplot(122) - -example_plot(ax1) -example_plot(ax2) -example_plot(ax3) - -plt.tight_layout() \ No newline at end of file diff --git a/dev/users/tight_layout_guide-7.hires.png b/dev/users/tight_layout_guide-7.hires.png deleted file mode 100644 index 27f977459a9..00000000000 Binary files a/dev/users/tight_layout_guide-7.hires.png and /dev/null differ diff --git a/dev/users/tight_layout_guide-7.pdf b/dev/users/tight_layout_guide-7.pdf deleted file mode 100644 index a126ebf32f0..00000000000 Binary files a/dev/users/tight_layout_guide-7.pdf and /dev/null differ diff --git a/dev/users/tight_layout_guide-7.png b/dev/users/tight_layout_guide-7.png deleted file mode 100644 index 1c5e9da0618..00000000000 Binary files a/dev/users/tight_layout_guide-7.png and /dev/null differ diff --git a/dev/users/tight_layout_guide-7.py b/dev/users/tight_layout_guide-7.py deleted file mode 100644 index 05bbc6c0dcd..00000000000 --- a/dev/users/tight_layout_guide-7.py +++ /dev/null @@ -1,14 +0,0 @@ -plt.close('all') -fig = plt.figure() - -ax1 = plt.subplot2grid((3, 3), (0, 0)) -ax2 = plt.subplot2grid((3, 3), (0, 1), colspan=2) -ax3 = plt.subplot2grid((3, 3), (1, 0), colspan=2, rowspan=2) -ax4 = plt.subplot2grid((3, 3), (1, 2), rowspan=2) - -example_plot(ax1) -example_plot(ax2) -example_plot(ax3) -example_plot(ax4) - -plt.tight_layout() \ No newline at end of file diff --git a/dev/users/tight_layout_guide-8.hires.png b/dev/users/tight_layout_guide-8.hires.png deleted file mode 100644 index d1e3241b2c5..00000000000 Binary files a/dev/users/tight_layout_guide-8.hires.png and /dev/null differ diff --git a/dev/users/tight_layout_guide-8.pdf b/dev/users/tight_layout_guide-8.pdf deleted file mode 100644 index f5549bdc7db..00000000000 Binary files a/dev/users/tight_layout_guide-8.pdf and /dev/null differ diff --git a/dev/users/tight_layout_guide-8.png b/dev/users/tight_layout_guide-8.png deleted file mode 100644 index 746db317ce8..00000000000 Binary files a/dev/users/tight_layout_guide-8.png and /dev/null differ diff --git a/dev/users/tight_layout_guide-8.py b/dev/users/tight_layout_guide-8.py deleted file mode 100644 index 19183e5764b..00000000000 --- a/dev/users/tight_layout_guide-8.py +++ /dev/null @@ -1,9 +0,0 @@ -arr = np.arange(100).reshape((10,10)) - -plt.close('all') -fig = plt.figure(figsize=(5,4)) - -ax = plt.subplot(111) -im = ax.imshow(arr, interpolation="none") - -plt.tight_layout() \ No newline at end of file diff --git a/dev/users/tight_layout_guide-9.hires.png b/dev/users/tight_layout_guide-9.hires.png deleted file mode 100644 index abc9e454044..00000000000 Binary files a/dev/users/tight_layout_guide-9.hires.png and /dev/null differ diff --git a/dev/users/tight_layout_guide-9.pdf b/dev/users/tight_layout_guide-9.pdf deleted file mode 100644 index 215bc90e7e9..00000000000 Binary files a/dev/users/tight_layout_guide-9.pdf and /dev/null differ diff --git a/dev/users/tight_layout_guide-9.png b/dev/users/tight_layout_guide-9.png deleted file mode 100644 index cd9eb6d1634..00000000000 Binary files a/dev/users/tight_layout_guide-9.png and /dev/null differ diff --git a/dev/users/tight_layout_guide-9.py b/dev/users/tight_layout_guide-9.py deleted file mode 100644 index 09176a1cb6f..00000000000 --- a/dev/users/tight_layout_guide-9.py +++ /dev/null @@ -1,13 +0,0 @@ -plt.close('all') -fig = plt.figure() - -import matplotlib.gridspec as gridspec - -gs1 = gridspec.GridSpec(2, 1) -ax1 = fig.add_subplot(gs1[0]) -ax2 = fig.add_subplot(gs1[1]) - -example_plot(ax1) -example_plot(ax2) - -gs1.tight_layout(fig) \ No newline at end of file diff --git a/dev/users/tight_layout_guide.html b/dev/users/tight_layout_guide.html deleted file mode 100644 index 5271085e8c7..00000000000 --- a/dev/users/tight_layout_guide.html +++ /dev/null @@ -1,476 +0,0 @@ - - - - - - - - Tight Layout guide — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      Table Of Contents

      - - -

      Previous topic

      -

      Customizing Location of Subplot Using GridSpec

      -

      Next topic

      -

      Legend guide

      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      Tight Layout guide

      -

      tight_layout automatically adjusts subplot params so that the -subplot(s) fits in to the figure area. This is an experimental -feature and may not work for some cases. It only checks the extents -of ticklabels, axis labels, and titles.

      -
      -

      Simple Example

      -

      In matplotlib, the location of axes (including subplots) are specified in -normalized figure coordinates. It can happen that your axis labels or -titles (or sometimes even ticklabels) go outside the figure area, and are thus -clipped.

      -
      plt.rcParams['savefig.facecolor'] = "0.8"
      -
      -def example_plot(ax, fontsize=12):
      -     ax.plot([1, 2])
      -     ax.locator_params(nbins=3)
      -     ax.set_xlabel('x-label', fontsize=fontsize)
      -     ax.set_ylabel('y-label', fontsize=fontsize)
      -     ax.set_title('Title', fontsize=fontsize)
      -
      -plt.close('all')
      -fig, ax = plt.subplots()
      -example_plot(ax, fontsize=24)
      -
      -
      -

      (Source code, png, hires.png, pdf)

      -
      -../_images/tight_layout_guide-1.png -
      -

      To prevent this, the location of axes needs to be adjusted. For -subplots, this can be done by adjusting the subplot params -(Move the edge of an axes to make room for tick labels). Matplotlib v1.1 introduces a new -command tight_layout() that does this -automatically for you.

      -
      plt.tight_layout()
      -
      -
      -

      (Source code, png, hires.png, pdf)

      -
      -../_images/tight_layout_guide-2.png -
      -

      When you have multiple subplots, often you see labels of different -axes overlapping each other.

      -
      plt.close('all')
      -fig, ((ax1, ax2), (ax3, ax4)) = plt.subplots(nrows=2, ncols=2)
      -example_plot(ax1)
      -example_plot(ax2)
      -example_plot(ax3)
      -example_plot(ax4)
      -
      -
      -

      (Source code, png, hires.png, pdf)

      -
      -../_images/tight_layout_guide-3.png -
      -

      tight_layout() will also adjust spacing between -subplots to minimize the overlaps.

      -
      plt.tight_layout()
      -
      -
      -

      (Source code, png, hires.png, pdf)

      -
      -../_images/tight_layout_guide-4.png -
      -

      tight_layout() can take keyword arguments of -pad, w_pad and h_pad. These control the extra padding around the -figure border and between subplots. The pads are specified in fraction -of fontsize.

      -
      plt.tight_layout(pad=0.4, w_pad=0.5, h_pad=1.0)
      -
      -
      -

      (Source code, png, hires.png, pdf)

      -
      -../_images/tight_layout_guide-5.png -
      -

      tight_layout() will work even if the sizes of -subplots are different as far as their grid specification is -compatible. In the example below, ax1 and ax2 are subplots of a 2x2 -grid, while ax3 is of a 1x2 grid.

      -
      plt.close('all')
      -fig = plt.figure()
      -
      -ax1 = plt.subplot(221)
      -ax2 = plt.subplot(223)
      -ax3 = plt.subplot(122)
      -
      -example_plot(ax1)
      -example_plot(ax2)
      -example_plot(ax3)
      -
      -plt.tight_layout()
      -
      -
      -

      (Source code, png, hires.png, pdf)

      -
      -../_images/tight_layout_guide-6.png -
      -

      It works with subplots created with -subplot2grid(). In general, subplots created -from the gridspec (Customizing Location of Subplot Using GridSpec) will work.

      -
      plt.close('all')
      -fig = plt.figure()
      -
      -ax1 = plt.subplot2grid((3, 3), (0, 0))
      -ax2 = plt.subplot2grid((3, 3), (0, 1), colspan=2)
      -ax3 = plt.subplot2grid((3, 3), (1, 0), colspan=2, rowspan=2)
      -ax4 = plt.subplot2grid((3, 3), (1, 2), rowspan=2)
      -
      -example_plot(ax1)
      -example_plot(ax2)
      -example_plot(ax3)
      -example_plot(ax4)
      -
      -plt.tight_layout()
      -
      -
      -

      (Source code, png, hires.png, pdf)

      -
      -../_images/tight_layout_guide-7.png -
      -

      Although not thoroughly tested, it seems to work for subplots with -aspect != “auto” (e.g., axes with images).

      -
      arr = np.arange(100).reshape((10,10))
      -
      -plt.close('all')
      -fig = plt.figure(figsize=(5,4))
      -
      -ax = plt.subplot(111)
      -im = ax.imshow(arr, interpolation="none")
      -
      -plt.tight_layout()
      -
      -
      -

      (Source code, png, hires.png, pdf)

      -
      -../_images/tight_layout_guide-8.png -
      -
      -

      Caveats

      -
      -
        -
      • tight_layout() only considers ticklabels, axis -labels, and titles. Thus, other artists may be clipped and also may -overlap.
      • -
      • It assumes that the extra space needed for ticklabels, axis labels, -and titles is independent of original location of axes. This is -often true, but there are rare cases where it is not.
      • -
      • pad=0 clips some of the texts by a few pixels. This may be a bug or -a limitation of the current algorithm and it is not clear why it -happens. Meanwhile, use of pad at least larger than 0.3 is -recommended.
      • -
      -
      -
      -
      -

      Use with GridSpec

      -

      GridSpec has its own tight_layout() method -(the pyplot api tight_layout() also works).

      -
      plt.close('all')
      -fig = plt.figure()
      -
      -import matplotlib.gridspec as gridspec
      -
      -gs1 = gridspec.GridSpec(2, 1)
      -ax1 = fig.add_subplot(gs1[0])
      -ax2 = fig.add_subplot(gs1[1])
      -
      -example_plot(ax1)
      -example_plot(ax2)
      -
      -gs1.tight_layout(fig)
      -
      -
      -

      (Source code, png, hires.png, pdf)

      -
      -../_images/tight_layout_guide-9.png -
      -

      You may provide an optional rect parameter, which specifies the bounding box -that the subplots will be fit inside. The coordinates must be in normalized -figure coordinates and the default is (0, 0, 1, 1).

      -
      gs1.tight_layout(fig, rect=[0, 0, 0.5, 1])
      -
      -
      -

      (Source code, png, hires.png, pdf)

      -
      -../_images/tight_layout_guide-10.png -
      -

      For example, this can be used for a figure with multiple gridspecs.

      -
      gs2 = gridspec.GridSpec(3, 1)
      -
      -for ss in gs2:
      -    ax = fig.add_subplot(ss)
      -    example_plot(ax)
      -    ax.set_title("")
      -    ax.set_xlabel("")
      -
      -ax.set_xlabel("x-label", fontsize=12)
      -
      -gs2.tight_layout(fig, rect=[0.5, 0, 1, 1], h_pad=0.5)
      -
      -
      -

      (Source code, png, hires.png, pdf)

      -
      -../_images/tight_layout_guide-11.png -
      -

      We may try to match the top and bottom of two grids

      -
      top = min(gs1.top, gs2.top)
      -bottom = max(gs1.bottom, gs2.bottom)
      -
      -gs1.update(top=top, bottom=bottom)
      -gs2.update(top=top, bottom=bottom)
      -
      -
      -

      While this should be mostly good enough, adjusting top and bottom -may require adjustment of hspace also. To update hspace & vspace, we -call tight_layout() again with updated -rect argument. Note that the rect argument specifies the area including the -ticklabels, etc. Thus, we will increase the bottom (which is 0 for the normal -case) by the difference between the bottom from above and the bottom of each -gridspec. Same thing for the top.

      -
      top = min(gs1.top, gs2.top)
      -bottom = max(gs1.bottom, gs2.bottom)
      -
      -gs1.tight_layout(fig, rect=[None, 0 + (bottom-gs1.bottom),
      -                            0.5, 1 - (gs1.top-top)])
      -gs2.tight_layout(fig, rect=[0.5, 0 + (bottom-gs2.bottom),
      -                            None, 1 - (gs2.top-top)],
      -                 h_pad=0.5)
      -
      -
      -

      (Source code, png, hires.png, pdf)

      -
      -../_images/tight_layout_guide-12.png -
      -
      -
      -

      Use with AxesGrid1

      -

      While limited, the axes_grid1 toolkit is also supported.

      -
      plt.close('all')
      -fig = plt.figure()
      -
      -from mpl_toolkits.axes_grid1 import Grid
      -grid = Grid(fig, rect=111, nrows_ncols=(2,2),
      -            axes_pad=0.25, label_mode='L',
      -            )
      -
      -for ax in grid:
      -    example_plot(ax)
      -    ax.title.set_visible(False)
      -
      -plt.tight_layout()
      -
      -
      -

      (Source code, png, hires.png, pdf)

      -
      -../_images/tight_layout_guide-13.png -
      -
      -
      -

      Colorbar

      -

      If you create a colorbar with the colorbar() -command, the created colorbar is an instance of Axes, not Subplot, so -tight_layout does not work. With Matplotlib v1.1, you may create a -colorbar as a subplot using the gridspec.

      -
      plt.close('all')
      -fig = plt.figure(figsize=(4, 4))
      -im = plt.imshow(arr, interpolation="none")
      -
      -plt.colorbar(im, use_gridspec=True)
      -
      -plt.tight_layout()
      -
      -
      -

      (Source code, png, hires.png, pdf)

      -
      -../_images/tight_layout_guide-14.png -
      -

      Another option is to use AxesGrid1 toolkit to -explicitly create an axes for colorbar.

      -
      plt.close('all')
      -fig = plt.figure(figsize=(4, 4))
      -im = plt.imshow(arr, interpolation="none")
      -
      -from mpl_toolkits.axes_grid1 import make_axes_locatable
      -divider = make_axes_locatable(plt.gca())
      -cax = divider.append_axes("right", "5%", pad="3%")
      -plt.colorbar(im, cax=cax)
      -
      -plt.tight_layout()
      -
      -
      -

      (Source code, png, hires.png, pdf)

      -
      -../_images/tight_layout_guide-15.png -
      -
      -
      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/users/transforms_tutorial-1.hires.png b/dev/users/transforms_tutorial-1.hires.png deleted file mode 100644 index a74f9e5d33f..00000000000 Binary files a/dev/users/transforms_tutorial-1.hires.png and /dev/null differ diff --git a/dev/users/transforms_tutorial-1.pdf b/dev/users/transforms_tutorial-1.pdf deleted file mode 100644 index 2cada35979d..00000000000 Binary files a/dev/users/transforms_tutorial-1.pdf and /dev/null differ diff --git a/dev/users/transforms_tutorial-1.png b/dev/users/transforms_tutorial-1.png deleted file mode 100644 index 941659ac471..00000000000 Binary files a/dev/users/transforms_tutorial-1.png and /dev/null differ diff --git a/dev/users/transforms_tutorial-1.py b/dev/users/transforms_tutorial-1.py deleted file mode 100644 index d17653529b6..00000000000 --- a/dev/users/transforms_tutorial-1.py +++ /dev/null @@ -1,13 +0,0 @@ -import numpy as np -import matplotlib.pyplot as plt - -x = np.arange(0, 10, 0.005) -y = np.exp(-x/2.) * np.sin(2*np.pi*x) - -fig = plt.figure() -ax = fig.add_subplot(111) -ax.plot(x, y) -ax.set_xlim(0, 10) -ax.set_ylim(-1, 1) - -plt.show() \ No newline at end of file diff --git a/dev/users/transforms_tutorial-2.hires.png b/dev/users/transforms_tutorial-2.hires.png deleted file mode 100644 index 704b5f1cc02..00000000000 Binary files a/dev/users/transforms_tutorial-2.hires.png and /dev/null differ diff --git a/dev/users/transforms_tutorial-2.pdf b/dev/users/transforms_tutorial-2.pdf deleted file mode 100644 index 1d02b8317eb..00000000000 Binary files a/dev/users/transforms_tutorial-2.pdf and /dev/null differ diff --git a/dev/users/transforms_tutorial-2.png b/dev/users/transforms_tutorial-2.png deleted file mode 100644 index c3d3bab55c1..00000000000 Binary files a/dev/users/transforms_tutorial-2.png and /dev/null differ diff --git a/dev/users/transforms_tutorial-2.py b/dev/users/transforms_tutorial-2.py deleted file mode 100644 index bcf56020894..00000000000 --- a/dev/users/transforms_tutorial-2.py +++ /dev/null @@ -1,10 +0,0 @@ -import numpy as np -import matplotlib.pyplot as plt - -fig = plt.figure() -for i, label in enumerate(('A', 'B', 'C', 'D')): - ax = fig.add_subplot(2,2,i+1) - ax.text(0.05, 0.95, label, transform=ax.transAxes, - fontsize=16, fontweight='bold', va='top') - -plt.show() \ No newline at end of file diff --git a/dev/users/transforms_tutorial-3.hires.png b/dev/users/transforms_tutorial-3.hires.png deleted file mode 100644 index ac4445a0013..00000000000 Binary files a/dev/users/transforms_tutorial-3.hires.png and /dev/null differ diff --git a/dev/users/transforms_tutorial-3.pdf b/dev/users/transforms_tutorial-3.pdf deleted file mode 100644 index 8769047d9b5..00000000000 Binary files a/dev/users/transforms_tutorial-3.pdf and /dev/null differ diff --git a/dev/users/transforms_tutorial-3.png b/dev/users/transforms_tutorial-3.png deleted file mode 100644 index c65560d44af..00000000000 Binary files a/dev/users/transforms_tutorial-3.png and /dev/null differ diff --git a/dev/users/transforms_tutorial-3.py b/dev/users/transforms_tutorial-3.py deleted file mode 100644 index 18b742ac158..00000000000 --- a/dev/users/transforms_tutorial-3.py +++ /dev/null @@ -1,13 +0,0 @@ -import numpy as np -import matplotlib.pyplot as plt -import matplotlib.patches as patches -fig = plt.figure() -ax = fig.add_subplot(111) -x, y = 10*np.random.rand(2, 1000) -ax.plot(x, y, 'go') # plot some data in data coordinates - -circ = patches.Circle((0.5, 0.5), 0.25, transform=ax.transAxes, - facecolor='yellow', alpha=0.5) -ax.add_patch(circ) - -plt.show() \ No newline at end of file diff --git a/dev/users/transforms_tutorial-4.hires.png b/dev/users/transforms_tutorial-4.hires.png deleted file mode 100644 index 34ef7e792c6..00000000000 Binary files a/dev/users/transforms_tutorial-4.hires.png and /dev/null differ diff --git a/dev/users/transforms_tutorial-4.pdf b/dev/users/transforms_tutorial-4.pdf deleted file mode 100644 index 1ab20d00ebe..00000000000 Binary files a/dev/users/transforms_tutorial-4.pdf and /dev/null differ diff --git a/dev/users/transforms_tutorial-4.png b/dev/users/transforms_tutorial-4.png deleted file mode 100644 index 704aa648d07..00000000000 Binary files a/dev/users/transforms_tutorial-4.png and /dev/null differ diff --git a/dev/users/transforms_tutorial-4.py b/dev/users/transforms_tutorial-4.py deleted file mode 100644 index f8a5e47197b..00000000000 --- a/dev/users/transforms_tutorial-4.py +++ /dev/null @@ -1,28 +0,0 @@ -import numpy as np -import matplotlib.pyplot as plt -import matplotlib.patches as patches -import matplotlib.transforms as transforms - -fig = plt.figure() -ax = fig.add_subplot(111) - -x = np.random.randn(1000) - -ax.hist(x, 30) -ax.set_title(r'$\sigma=1 \/ \dots \/ \sigma=2$', fontsize=16) - -# the x coords of this transformation are data, and the -# y coord are axes -trans = transforms.blended_transform_factory( - ax.transData, ax.transAxes) - -# highlight the 1..2 stddev region with a span. -# We want x to be in data coordinates and y to -# span from 0..1 in axes coords -rect = patches.Rectangle((1,0), width=1, height=1, - transform=trans, color='yellow', - alpha=0.5) - -ax.add_patch(rect) - -plt.show() \ No newline at end of file diff --git a/dev/users/transforms_tutorial-5.hires.png b/dev/users/transforms_tutorial-5.hires.png deleted file mode 100644 index 3a7810055b5..00000000000 Binary files a/dev/users/transforms_tutorial-5.hires.png and /dev/null differ diff --git a/dev/users/transforms_tutorial-5.pdf b/dev/users/transforms_tutorial-5.pdf deleted file mode 100644 index 4fa44143932..00000000000 Binary files a/dev/users/transforms_tutorial-5.pdf and /dev/null differ diff --git a/dev/users/transforms_tutorial-5.png b/dev/users/transforms_tutorial-5.png deleted file mode 100644 index 938caae6dc9..00000000000 Binary files a/dev/users/transforms_tutorial-5.png and /dev/null differ diff --git a/dev/users/transforms_tutorial-5.py b/dev/users/transforms_tutorial-5.py deleted file mode 100644 index c1b0b52a1f4..00000000000 --- a/dev/users/transforms_tutorial-5.py +++ /dev/null @@ -1,27 +0,0 @@ -import numpy as np -import matplotlib.pyplot as plt -import matplotlib.patches as patches -import matplotlib.transforms as transforms - -fig = plt.figure() -ax = fig.add_subplot(111) - -# make a simple sine wave -x = np.arange(0., 2., 0.01) -y = np.sin(2*np.pi*x) -line, = ax.plot(x, y, lw=3, color='blue') - -# shift the object over 2 points, and down 2 points -dx, dy = 2/72., -2/72. -offset = transforms.ScaledTranslation(dx, dy, - fig.dpi_scale_trans) -shadow_transform = ax.transData + offset - -# now plot the same data with our offset transform; -# use the zorder to make sure we are below the line -ax.plot(x, y, lw=3, color='gray', - transform=shadow_transform, - zorder=0.5*line.get_zorder()) - -ax.set_title('creating a shadow effect with an offset transform') -plt.show() \ No newline at end of file diff --git a/dev/users/transforms_tutorial.html b/dev/users/transforms_tutorial.html deleted file mode 100644 index fb9bf213ffb..00000000000 --- a/dev/users/transforms_tutorial.html +++ /dev/null @@ -1,619 +0,0 @@ - - - - - - - - Transformations Tutorial — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      Table Of Contents

      - - -

      Previous topic

      -

      Event handling and picking

      -

      Next topic

      -

      Path Tutorial

      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      Transformations Tutorial

      -

      Like any graphics packages, matplotlib is built on top of a -transformation framework to easily move between coordinate systems, -the userland data coordinate system, the axes coordinate system, -the figure coordinate system, and the display coordinate system. -In 95% of your plotting, you won’t need to think about this, as it -happens under the hood, but as you push the limits of custom figure -generation, it helps to have an understanding of these objects so you -can reuse the existing transformations matplotlib makes available to -you, or create your own (see matplotlib.transforms). The table -below summarizes the existing coordinate systems, the transformation -object you should use to work in that coordinate system, and the -description of that system. In the Transformation Object column, -ax is a Axes instance, and fig is a -Figure instance.

      - ----- - - - - - - - - - - - - - - - - - - - - - - - - -
      CoordinateTransformation ObjectDescription
      dataax.transDataThe userland data coordinate system, controlled by the xlim and ylim
      axesax.transAxesThe coordinate system of the Axes; (0,0) is bottom left of the axes, and (1,1) is top right of the axes
      figurefig.transFigureThe coordinate system of the Figure; (0,0) is bottom left of the figure, and (1,1) is top right of the figure
      displayNoneThis is the pixel coordinate system of the display; (0,0) is the bottom left of the display, and (width, height) is the top right of the display in pixels
      -

      All of the transformation objects in the table above take inputs in -their coordinate system, and transform the input to the display -coordinate system. That is why the display coordinate system has -None for the Transformation Object column – it already is in -display coordinates. The transformations also know how to invert -themselves, to go from display back to the native coordinate system. -This is particularly useful when processing events from the user -interface, which typically occur in display space, and you want to -know where the mouse click or key-press occurred in your data -coordinate system.

      -
      -

      Data coordinates

      -

      Let’s start with the most commonly used coordinate, the data -coordinate system. Whenever you add data to the axes, matplotlib -updates the datalimits, most commonly updated with the -set_xlim() and -set_ylim() methods. For example, in the -figure below, the data limits stretch from 0 to 10 on the x-axis, and --1 to 1 on the y-axis.

      -
      import numpy as np
      -import matplotlib.pyplot as plt
      -
      -x = np.arange(0, 10, 0.005)
      -y = np.exp(-x/2.) * np.sin(2*np.pi*x)
      -
      -fig = plt.figure()
      -ax = fig.add_subplot(111)
      -ax.plot(x, y)
      -ax.set_xlim(0, 10)
      -ax.set_ylim(-1, 1)
      -
      -plt.show()
      -
      -
      -

      (Source code, png, hires.png, pdf)

      -
      -../_images/transforms_tutorial-1.png -
      -

      You can use the ax.transData instance to transform from your -data to your display coordinate system, either a single point or a -sequence of points as shown below:

      -
      In [14]: type(ax.transData)
      -Out[14]: <class 'matplotlib.transforms.CompositeGenericTransform'>
      -
      -In [15]: ax.transData.transform((5, 0))
      -Out[15]: array([ 335.175,  247.   ])
      -
      -In [16]: ax.transData.transform([(5, 0), (1,2)])
      -Out[16]:
      -array([[ 335.175,  247.   ],
      -       [ 132.435,  642.2  ]])
      -
      -
      -

      You can use the inverted() -method to create a transform which will take you from display to data -coordinates:

      -
      In [41]: inv = ax.transData.inverted()
      -
      -In [42]: type(inv)
      -Out[42]: <class 'matplotlib.transforms.CompositeGenericTransform'>
      -
      -In [43]: inv.transform((335.175,  247.))
      -Out[43]: array([ 5.,  0.])
      -
      -
      -

      If your are typing along with this tutorial, the exact values of the -display coordinates may differ if you have a different window size or -dpi setting. Likewise, in the figure below, the display labeled -points are probably not the same as in the ipython session because the -documentation figure size defaults are different.

      -

      (Source code, png, hires.png, pdf)

      -
      -../_images/annotate_transform.png -
      -
      -

      Note

      -

      If you run the source code in the example above in a GUI backend, -you may also find that the two arrows for the data and display -annotations do not point to exactly the same point. This is because -the display point was computed before the figure was displayed, and -the GUI backend may slightly resize the figure when it is created. -The effect is more pronounced if you resize the figure yourself. -This is one good reason why you rarely want to work in display -space, but you can connect to the 'on_draw' -Event to update figure -coordinates on figure draws; see Event handling and picking.

      -
      -

      When you change the x or y limits of your axes, the data limits are -updated so the transformation yields a new display point. Note that -when we just change the ylim, only the y-display coordinate is -altered, and when we change the xlim too, both are altered. More on -this later when we talk about the -Bbox.

      -
      In [54]: ax.transData.transform((5, 0))
      -Out[54]: array([ 335.175,  247.   ])
      -
      -In [55]: ax.set_ylim(-1,2)
      -Out[55]: (-1, 2)
      -
      -In [56]: ax.transData.transform((5, 0))
      -Out[56]: array([ 335.175     ,  181.13333333])
      -
      -In [57]: ax.set_xlim(10,20)
      -Out[57]: (10, 20)
      -
      -In [58]: ax.transData.transform((5, 0))
      -Out[58]: array([-171.675     ,  181.13333333])
      -
      -
      -
      -
      -

      Axes coordinates

      -

      After the data coordinate system, axes is probably the second most -useful coordinate system. Here the point (0,0) is the bottom left of -your axes or subplot, (0.5, 0.5) is the center, and (1.0, 1.0) is the -top right. You can also refer to points outside the range, so (-0.1, -1.1) is to the left and above your axes. This coordinate system is -extremely useful when placing text in your axes, because you often -want a text bubble in a fixed, location, e.g., the upper left of the axes -pane, and have that location remain fixed when you pan or zoom. Here -is a simple example that creates four panels and labels them ‘A’, ‘B’, -‘C’, ‘D’ as you often see in journals.

      -
      import numpy as np
      -import matplotlib.pyplot as plt
      -
      -fig = plt.figure()
      -for i, label in enumerate(('A', 'B', 'C', 'D')):
      -    ax = fig.add_subplot(2,2,i+1)
      -    ax.text(0.05, 0.95, label, transform=ax.transAxes,
      -      fontsize=16, fontweight='bold', va='top')
      -
      -plt.show()
      -
      -
      -

      (Source code, png, hires.png, pdf)

      -
      -../_images/transforms_tutorial-2.png -
      -

      You can also make lines or patches in the axes coordinate system, but -this is less useful in my experience than using ax.transAxes for -placing text. Nonetheless, here is a silly example which plots some -random dots in data space, and overlays a semi-transparent -Circle centered in the middle of the axes -with a radius one quarter of the axes – if your axes does not -preserve aspect ratio (see set_aspect()), -this will look like an ellipse. Use the pan/zoom tool to move around, -or manually change the data xlim and ylim, and you will see the data -move, but the circle will remain fixed because it is not in data -coordinates and will always remain at the center of the axes.

      -
      import numpy as np
      -import matplotlib.pyplot as plt
      -import matplotlib.patches as patches
      -fig = plt.figure()
      -ax = fig.add_subplot(111)
      -x, y = 10*np.random.rand(2, 1000)
      -ax.plot(x, y, 'go')  # plot some data in data coordinates
      -
      -circ = patches.Circle((0.5, 0.5), 0.25, transform=ax.transAxes,
      -                      facecolor='yellow', alpha=0.5)
      -ax.add_patch(circ)
      -
      -plt.show()
      -
      -
      -

      (Source code, png, hires.png, pdf)

      -
      -../_images/transforms_tutorial-3.png -
      -
      -
      -

      Blended transformations

      -

      Drawing in blended coordinate spaces which mix axes with data -coordinates is extremely useful, for example to create a horizontal -span which highlights some region of the y-data but spans across the -x-axis regardless of the data limits, pan or zoom level, etc. In fact -these blended lines and spans are so useful, we have built in -functions to make them easy to plot (see -axhline(), -axvline(), -axhspan(), -axvspan()) but for didactic purposes we -will implement the horizontal span here using a blended -transformation. This trick only works for separable transformations, -like you see in normal Cartesian coordinate systems, but not on -inseparable transformations like the -PolarTransform.

      -
      import numpy as np
      -import matplotlib.pyplot as plt
      -import matplotlib.patches as patches
      -import matplotlib.transforms as transforms
      -
      -fig = plt.figure()
      -ax = fig.add_subplot(111)
      -
      -x = np.random.randn(1000)
      -
      -ax.hist(x, 30)
      -ax.set_title(r'$\sigma=1 \/ \dots \/ \sigma=2$', fontsize=16)
      -
      -# the x coords of this transformation are data, and the
      -# y coord are axes
      -trans = transforms.blended_transform_factory(
      -    ax.transData, ax.transAxes)
      -
      -# highlight the 1..2 stddev region with a span.
      -# We want x to be in data coordinates and y to
      -# span from 0..1 in axes coords
      -rect = patches.Rectangle((1,0), width=1, height=1,
      -                         transform=trans, color='yellow',
      -                         alpha=0.5)
      -
      -ax.add_patch(rect)
      -
      -plt.show()
      -
      -
      -

      (Source code, png, hires.png, pdf)

      -
      -../_images/transforms_tutorial-4.png -
      -
      -

      Note

      -

      The blended transformations where x is in data coords and y in axes -coordinates is so useful that we have helper methods to return the -versions mpl uses internally for drawing ticks, ticklabels, etc. -The methods are matplotlib.axes.Axes.get_xaxis_transform() and -matplotlib.axes.Axes.get_yaxis_transform(). So in the example -above, the call to -blended_transform_factory() can be -replaced by get_xaxis_transform:

      -
      trans = ax.get_xaxis_transform()
      -
      -
      -
      -
      -
      -

      Using offset transforms to create a shadow effect

      -

      One use of transformations is to create a new transformation that is -offset from another transformation, eg to place one object shifted a -bit relative to another object. Typically you want the shift to be in -some physical dimension, like points or inches rather than in data -coordinates, so that the shift effect is constant at different zoom -levels and dpi settings.

      -

      One use for an offset is to create a shadow effect, where you draw one -object identical to the first just to the right of it, and just below -it, adjusting the zorder to make sure the shadow is drawn first and -then the object it is shadowing above it. The transforms module has a -helper transformation -ScaledTranslation. It is -instantiated with:

      -
      trans = ScaledTranslation(xt, yt, scale_trans)
      -
      -
      -

      where xt and yt are the translation offsets, and scale_trans is -a transformation which scales xt and yt at transformation time -before applying the offsets. A typical use case is to use the figure -fig.dpi_scale_trans transformation for the scale_trans argument, -to first scale xt and yt specified in points to display space -before doing the final offset. The dpi and inches offset is a -common-enough use case that we have a special helper function to -create it in matplotlib.transforms.offset_copy(), which returns -a new transform with an added offset. But in the example below, we’ll -create the offset transform ourselves. Note the use of the plus -operator in:

      -
      offset = transforms.ScaledTranslation(dx, dy,
      -  fig.dpi_scale_trans)
      -shadow_transform = ax.transData + offset
      -
      -
      -

      showing that can chain transformations using the addition operator. -This code says: first apply the data transformation ax.transData -and then translate the data by dx and dy points. In typography, -a`point <http://en.wikipedia.org/wiki/Point_%28typography%29>`_ is -1/72 inches, and by specifying your offsets in points, your figure -will look the same regardless of the dpi resolution it is saved in.

      -
      import numpy as np
      -import matplotlib.pyplot as plt
      -import matplotlib.patches as patches
      -import matplotlib.transforms as transforms
      -
      -fig = plt.figure()
      -ax = fig.add_subplot(111)
      -
      -# make a simple sine wave
      -x = np.arange(0., 2., 0.01)
      -y = np.sin(2*np.pi*x)
      -line, = ax.plot(x, y, lw=3, color='blue')
      -
      -# shift the object over 2 points, and down 2 points
      -dx, dy = 2/72., -2/72.
      -offset = transforms.ScaledTranslation(dx, dy,
      -  fig.dpi_scale_trans)
      -shadow_transform = ax.transData + offset
      -
      -# now plot the same data with our offset transform;
      -# use the zorder to make sure we are below the line
      -ax.plot(x, y, lw=3, color='gray',
      -  transform=shadow_transform,
      -  zorder=0.5*line.get_zorder())
      -
      -ax.set_title('creating a shadow effect with an offset transform')
      -plt.show()
      -
      -
      -

      (Source code, png, hires.png, pdf)

      -
      -../_images/transforms_tutorial-5.png -
      -
      -
      -

      The transformation pipeline

      -

      The ax.transData transform we have been working with in this -tutorial is a composite of three different transformations that -comprise the transformation pipeline from data -> display -coordinates. Michael Droettboom implemented the transformations -framework, taking care to provide a clean API that segregated the -nonlinear projections and scales that happen in polar and logarithmic -plots, from the linear affine transformations that happen when you pan -and zoom. There is an efficiency here, because you can pan and zoom -in your axes which affects the affine transformation, but you may not -need to compute the potentially expensive nonlinear scales or -projections on simple navigation events. It is also possible to -multiply affine transformation matrices together, and then apply them -to coordinates in one step. This is not true of all possible -transformations.

      -

      Here is how the ax.transData instance is defined in the basic -separable axis Axes class:

      -
      self.transData = self.transScale + (self.transLimits + self.transAxes)
      -
      -
      -

      We’ve been introduced to the transAxes instance above in -Axes coordinates, which maps the (0,0), (1,1) corners of the -axes or subplot bounding box to display space, so let’s look at -these other two pieces.

      -

      self.transLimits is the transformation that takes you from -data to axes coordinates; i.e., it maps your view xlim and ylim -to the unit space of the axes (and transAxes then takes that unit -space to display space). We can see this in action here

      -
      In [80]: ax = subplot(111)
      -
      -In [81]: ax.set_xlim(0, 10)
      -Out[81]: (0, 10)
      -
      -In [82]: ax.set_ylim(-1,1)
      -Out[82]: (-1, 1)
      -
      -In [84]: ax.transLimits.transform((0,-1))
      -Out[84]: array([ 0.,  0.])
      -
      -In [85]: ax.transLimits.transform((10,-1))
      -Out[85]: array([ 1.,  0.])
      -
      -In [86]: ax.transLimits.transform((10,1))
      -Out[86]: array([ 1.,  1.])
      -
      -In [87]: ax.transLimits.transform((5,0))
      -Out[87]: array([ 0.5,  0.5])
      -
      -
      -

      and we can use this same inverted transformation to go from the unit -axes coordinates back to data coordinates.

      -
      In [90]: inv.transform((0.25, 0.25))
      -Out[90]: array([ 2.5, -0.5])
      -
      -
      -

      The final piece is the self.transScale attribute, which is -responsible for the optional non-linear scaling of the data, e.g., for -logarithmic axes. When an Axes is initially setup, this is just set to -the identity transform, since the basic matplotlib axes has linear -scale, but when you call a logarithmic scaling function like -semilogx() or explicitly set the scale to -logarithmic with set_xscale(), then the -ax.transScale attribute is set to handle the nonlinear projection. -The scales transforms are properties of the respective xaxis and -yaxis Axis instances. For example, when -you call ax.set_xscale('log'), the xaxis updates its scale to a -matplotlib.scale.LogScale instance.

      -

      For non-separable axes the PolarAxes, there is one more piece to -consider, the projection transformation. The transData -matplotlib.projections.polar.PolarAxes is similar to that for -the typical separable matplotlib Axes, with one additional piece -transProjection:

      -
      self.transData = self.transScale + self.transProjection + \
      -    (self.transProjectionAffine + self.transAxes)
      -
      -
      -

      transProjection handles the projection from the space, -e.g., latitude and longitude for map data, or radius and theta for polar -data, to a separable Cartesian coordinate system. There are several -projection examples in the matplotlib.projections package, and the -best way to learn more is to open the source for those packages and -see how to make your own, since matplotlib supports extensible axes -and projections. Michael Droettboom has provided a nice tutorial -example of creating a hammer projection axes; see -api example code: custom_projection_example.py.

      -
      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/users/usetex.html b/dev/users/usetex.html deleted file mode 100644 index 2171d0dc7f8..00000000000 --- a/dev/users/usetex.html +++ /dev/null @@ -1,370 +0,0 @@ - - - - - - - - Text rendering With LaTeX — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      Table Of Contents

      - - -

      Previous topic

      -

      Typesetting With XeLaTeX/LuaLaTeX

      -

      Next topic

      -

      Annotating text

      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      Text rendering With LaTeX

      -

      Matplotlib has the option to use LaTeX to manage all text layout. This -option is available with the following backends:

      -
        -
      • Agg
      • -
      • PS
      • -
      • PDF
      • -
      -

      The LaTeX option is activated by setting text.usetex : True in -your rc settings. Text handling with matplotlib’s LaTeX support is -slower than matplotlib’s very capable mathtext, but is more flexible, since different LaTeX -packages (font packages, math packages, etc.) can be used. The -results can be striking, especially when you take care to use the same -fonts in your figures as in the main document.

      -

      Matplotlib’s LaTeX support requires a working LaTeX installation, dvipng -(which may be included with your LaTeX installation), and Ghostscript -(GPL Ghostscript 8.60 or later is recommended). The executables for these -external dependencies must all be located on your PATH.

      -

      There are a couple of options to mention, which can be changed using rc -settings. Here is an example matplotlibrc file:

      -
      font.family        : serif
      -font.serif         : Times, Palatino, New Century Schoolbook, Bookman, Computer Modern Roman
      -font.sans-serif    : Helvetica, Avant Garde, Computer Modern Sans serif
      -font.cursive       : Zapf Chancery
      -font.monospace     : Courier, Computer Modern Typewriter
      -
      -text.usetex        : true
      -
      -

      The first valid font in each family is the one that will be loaded. If the -fonts are not specified, the Computer Modern fonts are used by default. All of -the other fonts are Adobe fonts. Times and Palatino each have their own -accompanying math fonts, while the other Adobe serif fonts make use of the -Computer Modern math fonts. See the PSNFSS documentation for more details.

      -

      To use LaTeX and select Helvetica as the default font, without editing -matplotlibrc use:

      -
      from matplotlib import rc
      -rc('font',**{'family':'sans-serif','sans-serif':['Helvetica']})
      -## for Palatino and other serif fonts use:
      -#rc('font',**{'family':'serif','serif':['Palatino']})
      -rc('text', usetex=True)
      -
      -
      -

      Here is the standard example, tex_demo.py:

      -
      """
      -Demo of TeX rendering.
      -
      -You can use TeX to render all of your matplotlib text if the rc
      -parameter text.usetex is set.  This works currently on the agg and ps
      -backends, and requires that you have tex and the other dependencies
      -described at http://matplotlib.sf.net/matplotlib.texmanager.html
      -properly installed on your system.  The first time you run a script
      -you will see a lot of output from tex and associated tools.  The next
      -time, the run may be silent, as a lot of the information is cached in
      -~/.tex.cache
      -
      -"""
      -import numpy as np
      -import matplotlib.pyplot as plt
      -
      -
      -# Example data
      -t = np.arange(0.0, 1.0 + 0.01, 0.01)
      -s = np.cos(4 * np.pi * t) + 2
      -
      -plt.rc('text', usetex=True)
      -plt.rc('font', family='serif')
      -plt.plot(t, s)
      -
      -plt.xlabel(r'\textbf{time} (s)')
      -plt.ylabel(r'\textit{voltage} (mV)',fontsize=16)
      -plt.title(r"\TeX\ is Number "
      -          r"$\displaystyle\sum_{n=1}^\infty\frac{-e^{i\pi}}{2^n}$!",
      -          fontsize=16, color='gray')
      -# Make room for the ridiculously large title.
      -plt.subplots_adjust(top=0.8)
      -
      -plt.savefig('tex_demo')
      -plt.show()
      -
      -
      -

      (Source code, png, hires.png, pdf)

      -
      -../_images/tex_demo1.png -
      -

      Note that display math mode ($$ e=mc^2 $$) is not supported, but adding the -command \displaystyle, as in tex_demo.py, will produce the same -results.

      -
      -

      Note

      -

      Certain characters require special escaping in TeX, such as:

      -
      # $ % & ~ _ ^ \ { } \( \) \[ \]
      -
      -
      -

      Therefore, these characters will behave differently depending on -the rcParam text.usetex flag.

      -
      -
      -

      usetex with unicode

      -

      It is also possible to use unicode strings with the LaTeX text manager, here is -an example taken from tex_unicode_demo.py:

      -
      #!/usr/bin/env python
      -# -*- coding: utf-8 -*-
      -"""
      -This demo is tex_demo.py modified to have unicode. See that file for
      -more information.
      -"""
      -from __future__ import unicode_literals
      -import matplotlib as mpl
      -mpl.rcParams['text.usetex']=True
      -mpl.rcParams['text.latex.unicode']=True
      -from numpy import arange, cos, pi
      -from matplotlib.pyplot import (figure, axes, plot, xlabel, ylabel, title,
      -     grid, savefig, show)
      -
      -figure(1, figsize=(6,4))
      -ax = axes([0.1, 0.1, 0.8, 0.7])
      -t = arange(0.0, 1.0+0.01, 0.01)
      -s = cos(2*2*pi*t)+2
      -plot(t, s)
      -
      -xlabel(r'\textbf{time (s)}')
      -ylabel(r'\textit{Velocity (\u00B0/sec)}', fontsize=16)
      -title(r"\TeX\ is Number $\displaystyle\sum_{n=1}^\infty\frac{-e^{i\pi}}{2^n}$!",
      -      fontsize=16, color='r')
      -grid(True)
      -show()
      -
      -
      -

      (Source code, png, hires.png, pdf)

      -
      -../_images/tex_unicode_demo1.png -
      -
      -
      -

      Postscript options

      -

      In order to produce encapsulated postscript files that can be embedded in a new -LaTeX document, the default behavior of matplotlib is to distill the output, -which removes some postscript operators used by LaTeX that are illegal in an -eps file. This step produces results which may be unacceptable to some users, -because the text is coarsely rasterized and converted to bitmaps, which are not -scalable like standard postscript, and the text is not searchable. One -workaround is to to set ps.distiller.res to a higher value (perhaps 6000) -in your rc settings, which will produce larger files but may look better and -scale reasonably. A better workaround, which requires Poppler or Xpdf, can be -activated by changing the ps.usedistiller rc setting to xpdf. This -alternative produces postscript without rasterizing text, so it scales -properly, can be edited in Adobe Illustrator, and searched text in pdf -documents.

      -
      -
      -

      Possible hangups

      -
        -
      • On Windows, the PATH environment variable may need to be modified -to include the directories containing the latex, dvipng and ghostscript -executables. See Environment Variables and -Setting environment variables in windows for details.
      • -
      • Using MiKTeX with Computer Modern fonts, if you get odd *Agg and PNG -results, go to MiKTeX/Options and update your format files
      • -
      • The fonts look terrible on screen. You are probably running Mac OS, and there -is some funny business with older versions of dvipng on the mac. Set -text.dvipnghack : True in your matplotlibrc file.
      • -
      • On Ubuntu and Gentoo, the base texlive install does not ship with -the type1cm package. You may need to install some of the extra -packages to get all the goodies that come bundled with other latex -distributions.
      • -
      • Some progress has been made so matplotlib uses the dvi files -directly for text layout. This allows latex to be used for text -layout with the pdf and svg backends, as well as the *Agg and PS -backends. In the future, a latex installation may be the only -external dependency.
      • -
      -
      -
      -

      Troubleshooting

      -
        -
      • Try deleting your .matplotlib/tex.cache directory. If you don’t know -where to find .matplotlib, see .matplotlib directory location.
      • -
      • Make sure LaTeX, dvipng and ghostscript are each working and on your -PATH.
      • -
      • Make sure what you are trying to do is possible in a LaTeX document, -that your LaTeX syntax is valid and that you are using raw strings -if necessary to avoid unintended escape sequences.
      • -
      • Most problems reported on the mailing list have been cleared up by -upgrading Ghostscript. If possible, please try upgrading to the -latest release before reporting problems to the list.
      • -
      • The text.latex.preamble rc setting is not officially supported. This -option provides lots of flexibility, and lots of ways to cause -problems. Please disable this option before reporting problems to -the mailing list.
      • -
      • If you still need help, please see Getting help
      • -
      -
      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/dev/users/whats_new-1.hires.png b/dev/users/whats_new-1.hires.png deleted file mode 100644 index 871d08e5339..00000000000 Binary files a/dev/users/whats_new-1.hires.png and /dev/null differ diff --git a/dev/users/whats_new-1.pdf b/dev/users/whats_new-1.pdf deleted file mode 100644 index 57c076b1057..00000000000 Binary files a/dev/users/whats_new-1.pdf and /dev/null differ diff --git a/dev/users/whats_new-1.png b/dev/users/whats_new-1.png deleted file mode 100644 index bbb33098536..00000000000 Binary files a/dev/users/whats_new-1.png and /dev/null differ diff --git a/dev/users/whats_new-1.py b/dev/users/whats_new-1.py deleted file mode 100644 index 9e1bebd6fb7..00000000000 --- a/dev/users/whats_new-1.py +++ /dev/null @@ -1,21 +0,0 @@ -import matplotlib.pyplot as plt -import numpy as np - -x = y = np.linspace(0., 2*np.pi, 100) -X, Y = np.meshgrid(x, y) -Z = np.cos(X) * np.sin(0.5*Y) - -clevs = [-.75, -.5, -.25, 0., .25, .5, .75] -cmap = plt.cm.get_cmap(name='jet', lut=8) - -ax1 = plt.subplot(211) -cs1 = plt.contourf(x, y, Z, clevs, cmap=cmap, extend='both') -cb1 = plt.colorbar(orientation='horizontal', extendfrac=None) -cb1.set_label('Default length colorbar extensions') - -ax2 = plt.subplot(212) -cs2 = plt.contourf(x, y, Z, clevs, cmap=cmap, extend='both') -cb2 = plt.colorbar(orientation='horizontal', extendfrac='auto') -cb2.set_label('Custom length colorbar extensions') - -plt.show() \ No newline at end of file diff --git a/dev/users/whats_new-2.py b/dev/users/whats_new-2.py deleted file mode 100644 index f12846026c5..00000000000 --- a/dev/users/whats_new-2.py +++ /dev/null @@ -1,20 +0,0 @@ -plt.rcParams['savefig.facecolor'] = "0.8" -plt.rcParams['figure.figsize'] = 4, 3 - -fig, axes_list = plt.subplots(2, 1) -for ax in axes_list.flat: - ax.set(xlabel="x-label", ylabel="y-label", title="before tight_layout") -ax.locator_params(nbins=3) - -plt.show() - -plt.rcParams['savefig.facecolor'] = "0.8" -plt.rcParams['figure.figsize'] = 4, 3 - -fig, axes_list = plt.subplots(2, 1) -for ax in axes_list.flat: - ax.set(xlabel="x-label", ylabel="y-label", title="after tight_layout") -ax.locator_params(nbins=3) - -plt.tight_layout() -plt.show() \ No newline at end of file diff --git a/dev/users/whats_new-2_00_00.hires.png b/dev/users/whats_new-2_00_00.hires.png deleted file mode 100644 index 38554fec0b4..00000000000 Binary files a/dev/users/whats_new-2_00_00.hires.png and /dev/null differ diff --git a/dev/users/whats_new-2_00_00.pdf b/dev/users/whats_new-2_00_00.pdf deleted file mode 100644 index d5cf8c4906a..00000000000 Binary files a/dev/users/whats_new-2_00_00.pdf and /dev/null differ diff --git a/dev/users/whats_new-2_00_00.png b/dev/users/whats_new-2_00_00.png deleted file mode 100644 index 7f97d8297bb..00000000000 Binary files a/dev/users/whats_new-2_00_00.png and /dev/null differ diff --git a/dev/users/whats_new-2_01_00.hires.png b/dev/users/whats_new-2_01_00.hires.png deleted file mode 100644 index eb12ac4a68d..00000000000 Binary files a/dev/users/whats_new-2_01_00.hires.png and /dev/null differ diff --git a/dev/users/whats_new-2_01_00.pdf b/dev/users/whats_new-2_01_00.pdf deleted file mode 100644 index d6aa36ba687..00000000000 Binary files a/dev/users/whats_new-2_01_00.pdf and /dev/null differ diff --git a/dev/users/whats_new-2_01_00.png b/dev/users/whats_new-2_01_00.png deleted file mode 100644 index 9f51dcd7001..00000000000 Binary files a/dev/users/whats_new-2_01_00.png and /dev/null differ diff --git a/dev/users/whats_new.html b/dev/users/whats_new.html deleted file mode 100644 index 4a582ebb960..00000000000 --- a/dev/users/whats_new.html +++ /dev/null @@ -1,1288 +0,0 @@ - - - - - - - - What’s new in matplotlib — Matplotlib 1.3.x documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      -matplotlib -
      - - - - -
      -
      -

      Table Of Contents

      - - -

      Previous topic

      -

      Screenshots

      -

      Next topic

      -

      Github stats

      -

      This Page

      - - - -
      -
      - -
      -
      -
      -
      - -
      -

      What’s new in matplotlib

      -

      This page just covers the highlights – for the full story, see the -CHANGELOG

      -

      For a list of all of the issues and pull requests since the last -revision, see the Github stats.

      -
      -

      Note

      -

      Matplotlib version 1.1 is the last major release compatible with Python -versions 2.4 to 2.7. matplotlib 1.2 and later require -versions 2.6, 2.7, and 3.1 and higher.

      -
      -
      -

      Table of Contents

      - -
      -
      -

      new in matplotlib-1.3

      -
      -

      axes.xmargin and axes.ymargin added to rcParams

      -

      rcParam values (axes.xmargin and axes.ymargin) were added -to configure the default margins used. Previously they were -hard-coded to default to 0, default value of both rcParam values is 0.

      -
      -
      -

      New eventplot plot type

      -

      Todd Jennings added a eventplot() function to -create multiple rows or columns of identical line segments

      -
      -
      -

      New EventCollection collections class

      -

      Todd Jennings created the new EventCollection -class that allows for plotting and manipulating rows or columns of identical -line segments

      -
      -
      -

      Baselines for stackplot

      -

      Till Stensitzki added non-zero baselines to stackplot(). -They may be symmetric or weighted.

      -

      (Source code, png, hires.png, pdf)

      -
      -../_images/stackplot_demo21.png -
      -
      -
      -

      Improved bbox_inches="tight" functionality

      -

      Passing bbox_inches="tight" through to plt.save() now takes into account -all artists on a figure - this was previously not the case and led to several -corner cases which did not function as expected.

      -
      -
      -

      Remember save directory

      -

      Martin Spacek made the save figure dialog remember the last directory saved -to. The default is configurable with the new savefig.directory setting -in matplotlibrc.

      -
      -
      -

      Initialize a rotated rectangle

      -

      Damon McDougall extended the Rectangle constructor -to accept an angle kwarg, specifying the rotation of a rectangle in degrees.

      -
      -
      -

      Rectangular colorbar extensions

      -

      Andrew Dawson added a new keyword argument extendrect to -colorbar() to optionally make colorbar -extensions rectangular instead of triangular.

      -
      -
      -

      Calling subplot() without arguments

      -

      A call to subplot() without any arguments now -acts the same as subplot(111) or subplot(1,1,1) – it creates one axes for -the whole figure. This was already the behavior for both -axes() and subplots(), and -now this consistency is shared with subplot().

      -
      -
      -

      Anchored text support

      -

      The svg and pgf backends are now able to save text alignment information -to their output formats. This allows to edit text elements in saved figures, -using Inkscape for example, while preserving their intended position. For -svg please note that you’ll have to disable the default text-to-path -conversion (mpl.rc('svg', fonttype='none')).

      -
      -
      -

      Triangular grid interpolation

      -

      Geoffroy Billotey and Ian Thomas added classes to perform interpolation within -triangular grids: (LinearTriInterpolator and -CubicTriInterpolator) and a utility class to find -the triangles in which points lie ( -TrapezoidMapTriFinder). -A helper class to perform mesh refinement and smooth contouring was also added -(UniformTriRefiner). -Finally, a class implementing some basic tools for triangular mesh improvement -was added (TriAnalyzer).

      -

      (Source code, png, hires.png, pdf)

      -
      -../_images/tricontour_smooth_user2.png -
      -
      -
      -

      Left and right side axes titles

      -

      Andrew Dawson added the ability to add axes titles flush with the left and -right sides of the top of the axes using a new keyword argument loc to -title().

      -
      -
      -

      Improved manual contour plot label positioning

      -

      Brian Mattern modified the manual contour plot label positioning code to -interpolate along line segments and find the actual closest point on a -contour to the requested position. Previously, the closest path vertex was -used, which, in the case of straight contours was sometimes quite distant -from the requested location. Much more precise label positioning is now -possible.

      -
      -
      -

      Quickly find rcParams

      -

      Phil Elson made it easier to search for rcParameters by passing a -valid regular expression to matplotlib.RcParams.find_all(). -matplotlib.RcParams now also has a pretty repr and str representation -so that search results are printed prettily:

      -
      >>> import matplotlib
      ->>> print(matplotlib.rcParams.find_all('\.size'))
      -RcParams({'font.size': 12,
      -          'xtick.major.size': 4,
      -          'xtick.minor.size': 2,
      -          'ytick.major.size': 4,
      -          'ytick.minor.size': 2})
      -
      -
      -
      -
      -

      Better vertical text alignment

      -

      The vertical alignment of text is now consistent across backends. You -may see small differences in text placement, particularly with rotated -text.

      -

      If you are using a custom backend, note that the draw_text renderer -method is now passed the location of the baseline, not the location of -the bottom of the text bounding box.

      -
      -
      -

      savefig.jpeg_quality added to rcParams

      -

      rcParam value savefig.jpeg_quality was added so that the user can -configure the default quality used when a figure is written as a JPEG. The -default quality is 95; previously, the default quality was 75. This change -minimizes the artifacting inherent in JPEG images, particularly with images -that have sharp changes in color as plots often do.

      -
      -
      -

      Full control of the background color

      -

      Wes Campaigne and Phil Elson fixed the Agg backend such that PNGs are now -saved with the correct background color when fig.patch.get_alpha() is -not 1.

      -
      -
      -
      -

      new in matplotlib 1.2.2

      -
      -

      Improved collections

      -

      The individual items of a collection may now have different alpha -values and be rendered correctly. This also fixes a bug where -collections were always filled in the PDF backend.

      -
      -
      -

      Multiple images on same axes are correctly transparent

      -

      When putting multiple images onto the same axes, the background color -of the axes will now show through correctly.

      -
      -
      -
      -

      new in matplotlib-1.2

      -
      -

      Python 3.x support

      -

      Matplotlib 1.2 is the first version to support Python 3.x, -specifically Python 3.1 and 3.2. To make this happen in a reasonable -way, we also had to drop support for Python versions earlier than 2.6.

      -

      This work was done by Michael Droettboom, the Cape Town Python Users’ -Group, many others and supported financially in part by the SAGE -project.

      -

      The following GUI backends work under Python 3.x: Gtk3Cairo, Qt4Agg, -TkAgg and MacOSX. The other GUI backends do not yet have adequate -bindings for Python 3.x, but continue to work on Python 2.6 and 2.7, -particularly the Qt and QtAgg backends (which have been -deprecated). The non-GUI backends, such as PDF, PS and SVG, work on -both Python 2.x and 3.x.

      -

      Features that depend on the Python Imaging Library, such as JPEG -handling, do not work, since the version of PIL for Python 3.x is not -sufficiently mature.

      -
      -
      -

      PGF/TikZ backend

      -

      Peter Würtz wrote a backend that allows matplotlib to export figures as -drawing commands for LaTeX. These can be processed by PdfLaTeX, XeLaTeX or -LuaLaTeX using the PGF/TikZ package. Usage examples and documentation are -found in Typesetting With XeLaTeX/LuaLaTeX.

      -../_images/pgf_preamble.png -
      -
      -

      Locator interface

      -

      Philip Elson exposed the intelligence behind the tick Locator classes with a -simple interface. For instance, to get no more than 5 sensible steps which -span the values 10 and 19.5:

      -
      >>> import matplotlib.ticker as mticker
      ->>> locator = mticker.MaxNLocator(nbins=5)
      ->>> print(locator.tick_values(10, 19.5))
      -[ 10.  12.  14.  16.  18.  20.]
      -
      -
      -
      -
      -

      Tri-Surface Plots

      -

      Damon McDougall added a new plotting method for the -mplot3d toolkit called -plot_trisurf().

      -

      (Source code, png, hires.png, pdf)

      -
      -../_images/trisurf3d_demo2.png -
      -
      -
      -

      Control the lengths of colorbar extensions

      -

      Andrew Dawson added a new keyword argument extendfrac to -colorbar() to control the length of -minimum and maximum colorbar extensions.

      -

      (Source code, png, hires.png, pdf)

      -
      -../_images/whats_new-1.png -
      -
      -
      -

      Figures are picklable

      -

      Philip Elson added an experimental feature to make figures picklable -for quick and easy short-term storage of plots. Pickle files -are not designed for long term storage, are unsupported when restoring a pickle -saved in another matplotlib version and are insecure when restoring a pickle -from an untrusted source. Having said this, they are useful for short term -storage for later modification inside matplotlib.

      -
      -
      -

      Set default bounding box in matplotlibrc

      -

      Two new defaults are available in the matplotlibrc configuration file: -savefig.bbox, which can be set to ‘standard’ or ‘tight’, and -savefig.pad_inches, which controls the bounding box padding.

      -
      -
      -

      New Boxplot Functionality

      -

      Users can now incorporate their own methods for computing the median and its -confidence intervals into the boxplot() method. For -every column of data passed to boxplot, the user can specify an accompanying -median and confidence interval.

      -

      (Source code, png, hires.png, pdf)

      -
      -../_images/boxplot_demo31.png -
      -
      -
      -

      New RC parameter functionality

      -

      Matthew Emmett added a function and a context manager to help manage RC -parameters: rc_file() and rc_context. -To load RC parameters from a file:

      -
      >>> mpl.rc_file('mpl.rc')
      -
      -
      -

      To temporarily use RC parameters:

      -
      >>> with mpl.rc_context(fname='mpl.rc', rc={'text.usetex': True}):
      ->>>     ...
      -
      -
      -
      -
      -

      Streamplot

      -

      Tom Flannaghan and Tony Yu have added a new -streamplot() function to plot the streamlines of -a vector field. This has been a long-requested feature and complements the -existing quiver() function for plotting vector fields. -In addition to simply plotting the streamlines of the vector field, -streamplot() allows users to map the colors and/or -line widths of the streamlines to a separate parameter, such as the speed or -local intensity of the vector field.

      -

      (Source code)

      -
      -../_images/streamplot_demo_features_001.png -

      (png, hires.png, pdf)

      -
      -
      -../_images/streamplot_demo_features_011.png -

      (png, hires.png, pdf)

      -
      -
      -
      -

      New hist functionality

      -

      Nic Eggert added a new stacked kwarg to hist() that -allows creation of stacked histograms using any of the histogram types. -Previously, this functionality was only available by using the barstacked -histogram type. Now, when stacked=True is passed to the function, any of the -histogram types can be stacked. The barstacked histogram type retains its -previous functionality for backwards compatibility.

      -
      -
      -

      Updated shipped dependencies

      -

      The following dependencies that ship with matplotlib and are -optionally installed alongside it have been updated:

      -
      -
        -
      • pytz 2012d
      • -
      • dateutil 1.5 on Python 2.x, -and 2.1 on Python 3.x
      • -
      -
      -
      -
      -

      Face-centred colors in tripcolor plots

      -

      Ian Thomas extended tripcolor() to allow one color -value to be specified for each triangular face rather than for each point in -a triangulation.

      -

      (Source code)

      -
      -../_images/tripcolor_demo_002.png -

      (png, hires.png, pdf)

      -
      -
      -../_images/tripcolor_demo_012.png -

      (png, hires.png, pdf)

      -
      -
      -../_images/tripcolor_demo_022.png -

      (png, hires.png, pdf)

      -
      -
      -
      -

      Hatching patterns in filled contour plots, with legends

      -

      Phil Elson added support for hatching to -contourf(), together with the ability -to use a legend to identify contoured ranges.

      -

      (Source code)

      -
      -../_images/contourf_hatching_001.png -

      (png, hires.png, pdf)

      -
      -
      -../_images/contourf_hatching_011.png -

      (png, hires.png, pdf)

      -
      -
      -
      -

      Known issues in the matplotlib-1.2 release

      -
        -
      • When using the Qt4Agg backend with IPython 0.11 or later, the save -dialog will not display. This should be fixed in a future version -of IPython.
      • -
      -
      -
      -
      -

      new in matplotlib-1.1

      -
      -

      Sankey Diagrams

      -

      Kevin Davies has extended Yannick Copin’s original Sankey example into a module -(sankey) and provided new examples -(api example code: sankey_demo_basics.py, api example code: sankey_demo_links.py, -api example code: sankey_demo_rankine.py).

      -

      (Source code, png, hires.png, pdf)

      -
      -../_images/sankey_demo_rankine1.png -
      -
      -
      -

      Animation

      -

      Ryan May has written a backend-independent framework for creating -animated figures. The animation module is intended -to replace the backend-specific examples formerly in the -Matplotlib Examples listings. Examples using the new framework are -in animation Examples; see the entrancing double -pendulum which uses -matplotlib.animation.Animation.save() to create the movie below.

      -

      This should be considered as a beta release of the framework; -please try it and provide feedback.

      -
      -
      -

      Tight Layout

      -

      A frequent issue raised by users of matplotlib is the lack of a layout -engine to nicely space out elements of the plots. While matplotlib still -adheres to the philosophy of giving users complete control over the placement -of plot elements, Jae-Joon Lee created the tight_layout -module and introduced a new -command tight_layout() -to address the most common layout issues.

      -

      (Source code, png, hires.png, pdf)

      -
      -../_images/whats_new-2_00_00.png -
      -

      (png, hires.png, pdf)

      -
      -../_images/whats_new-2_01_00.png -
      -

      The usage of this functionality can be as simple as

      -
      plt.tight_layout()
      -
      -
      -

      and it will adjust the spacing between subplots -so that the axis labels do not overlap with neighboring subplots. A -Tight Layout guide has been created to show how to use -this new tool.

      -
      -
      -

      PyQT4, PySide, and IPython

      -

      Gerald Storer made the Qt4 backend compatible with PySide as -well as PyQT4. At present, however, PySide does not support -the PyOS_InputHook mechanism for handling gui events while -waiting for text input, so it cannot be used with the new -version 0.11 of IPython. Until this -feature appears in PySide, IPython users should use -the PyQT4 wrapper for QT4, which remains the matplotlib default.

      -

      An rcParam entry, “backend.qt4”, has been added to allow users -to select PyQt4, PyQt4v2, or PySide. The latter two use the -Version 2 Qt API. In most cases, users can ignore this rcParam -variable; it is available to aid in testing, and to provide control -for users who are embedding matplotlib in a PyQt4 or PySide app.

      -
      -
      -

      Legend

      -

      Jae-Joon Lee has improved plot legends. First, -legends for complex plots such as stem() plots -will now display correctly. Second, the ‘best’ placement of a legend has -been improved in the presence of NANs.

      -

      See Legend of Complex Plots for more detailed explanation and -examples.

      -

      (Source code, png, hires.png, pdf)

      -
      -../_images/legend_demo41.png -
      -
      -
      -

      mplot3d

      -

      In continuing the efforts to make 3D plotting in matplotlib just as easy -as 2D plotting, Ben Root has made several improvements to the -mplot3d module.

      -
        -
      • Axes3D has been -improved to bring the class towards feature-parity with regular -Axes objects
      • -
      • Documentation for mplot3d was significantly expanded
      • -
      • Axis labels and orientation improved
      • -
      • Most 3D plotting functions now support empty inputs
      • -
      • Ticker offset display added:
      • -
      -

      (Source code, png, hires.png, pdf)

      -
      -../_images/offset_demo1.png -
      -
        -
      • contourf() -gains zdir and offset kwargs. You can now do this:
      • -
      -

      (Source code, png, hires.png, pdf)

      -
      -../_images/contourf3d_demo22.png -
      -
      -
      -

      Numerix support removed

      -

      After more than two years of deprecation warnings, Numerix support has -now been completely removed from matplotlib.

      -
      -
      -

      Markers

      -

      The list of available markers for plot() and -scatter() has now been merged. While they -were mostly similar, some markers existed for one function, but not -the other. This merge did result in a conflict for the ‘d’ diamond -marker. Now, ‘d’ will be interpreted to always mean “thin” diamond -while ‘D’ will mean “regular” diamond.

      -

      Thanks to Michael Droettboom for this effort.

      -
      -
      -

      Other improvements

      -
        -
      • Unit support for polar axes and arrow()
      • -
      • PolarAxes gains getters and setters for -“theta_direction”, and “theta_offset” to allow for theta to go in -either the clock-wise or counter-clockwise direction and to specify where zero -degrees should be placed. -set_theta_zero_location() is an -added convenience function.
      • -
      • Fixed error in argument handling for tri-functions such as -tripcolor()
      • -
      • axes.labelweight parameter added to rcParams.
      • -
      • For imshow(), interpolation=’nearest’ will -now always perform an interpolation. A “none” option has been added to -indicate no interpolation at all.
      • -
      • An error in the Hammer projection has been fixed.
      • -
      • clabel for contour() now accepts a callable. -Thanks to Daniel Hyams for the original patch.
      • -
      • Jae-Joon Lee added the HBox -and VBox classes.
      • -
      • Christoph Gohlke reduced memory usage in imshow().
      • -
      • scatter() now accepts empty inputs.
      • -
      • The behavior for ‘symlog’ scale has been fixed, but this may result -in some minor changes to existing plots. This work was refined by -ssyr.
      • -
      • Peter Butterworth added named figure support to -figure().
      • -
      • Michiel de Hoon has modified the MacOSX backend to make -its interactive behavior consistent with the other backends.
      • -
      • Pim Schellart added a new colormap called “cubehelix”. -Sameer Grover also added a colormap called “coolwarm”. See it and all -other colormaps here.
      • -
      • Many bug fixes and documentation improvements.
      • -
      -
      -
      -
      -

      new in matplotlib-1.0

      -
      -

      HTML5/Canvas backend

      -

      Simon Ratcliffe and Ludwig Schwardt have released an HTML5/Canvas backend for matplotlib. The -backend is almost feature complete, and they have done a lot of work -comparing their html5 rendered images with our core renderer Agg. The -backend features client/server interactive navigation of matplotlib -figures in an html5 compliant browser.

      -
      -
      -

      Sophisticated subplot grid layout

      -

      Jae-Joon Lee has written gridspec, a new module for -doing complex subplot layouts, featuring row and column spans and -more. See Customizing Location of Subplot Using GridSpec for a tutorial overview.

      -

      (Source code, png, hires.png, pdf)

      -
      -../_images/demo_gridspec01.png -
      -
      -
      -

      Easy pythonic subplots

      -

      Fernando Perez got tired of all the boilerplate code needed to create a -figure and multiple subplots when using the matplotlib API, and wrote -a subplots() helper function. Basic usage -allows you to create the figure and an array of subplots with numpy -indexing (starts with 0). e.g.:

      -
      fig, axarr = plt.subplots(2, 2)
      -axarr[0,0].plot([1,2,3])   # upper, left
      -
      -
      -

      See pylab_examples example code: subplots_demo.py for several code examples.

      -
      -
      -

      Contour fixes and and triplot

      -

      Ian Thomas has fixed a long-standing bug that has vexed our most -talented developers for years. contourf() -now handles interior masked regions, and the boundaries of line and -filled contours coincide.

      -

      Additionally, he has contributed a new module tri and -helper function triplot() for creating and -plotting unstructured triangular grids.

      -

      (Source code)

      -
      -../_images/triplot_demo_002.png -

      (png, hires.png, pdf)

      -
      -
      -../_images/triplot_demo_012.png -

      (png, hires.png, pdf)

      -
      -
      -
      -

      multiple calls to show supported

      -

      A long standing request is to support multiple calls to -show(). This has been difficult because it -is hard to get consistent behavior across operating systems, user -interface toolkits and versions. Eric Firing has done a lot of work -on rationalizing show across backends, with the desired behavior to -make show raise all newly created figures and block execution until -they are closed. Repeated calls to show should raise newly created -figures since the last call. Eric has done a lot of testing on the -user interface toolkits and versions and platforms he has access to, -but it is not possible to test them all, so please report problems to -the mailing list -and bug tracker.

      -
      -
      -

      mplot3d graphs can be embedded in arbitrary axes

      -

      You can now place an mplot3d graph into an arbitrary axes location, -supporting mixing of 2D and 3D graphs in the same figure, and/or -multiple 3D graphs in a single figure, using the “projection” keyword -argument to add_axes or add_subplot. Thanks Ben Root.

      -

      (Source code, png, hires.png, pdf)

      -
      -../_images/whats_new_1_subplot3d_00_00.png -
      -

      (png, hires.png, pdf)

      -
      -../_images/whats_new_1_subplot3d_01_00.png -
      -
      -
      -

      tick_params

      -

      Eric Firing wrote tick_params, a convenience method for changing the -appearance of ticks and tick labels. See pyplot function -tick_params() and associated Axes method -tick_params().

      -
      -
      -

      Lots of performance and feature enhancements

      -
        -
      • Faster magnification of large images, and the ability to zoom in to -a single pixel
      • -
      • Local installs of documentation work better
      • -
      • Improved “widgets” – mouse grabbing is supported
      • -
      • More accurate snapping of lines to pixel boundaries
      • -
      • More consistent handling of color, particularly the alpha channel, -throughout the API
      • -
      -
      -
      -

      Much improved software carpentry

      -

      The matplotlib trunk is probably in as good a shape as it has ever -been, thanks to improved software carpentry. We now have a buildbot which runs a suite of nose regression tests on every -svn commit, auto-generating a set of images and comparing them against -a set of known-goods, sending emails to developers on failures with a -pixel-by-pixel image comparison. Releases and release -bugfixes happen in branches, allowing active new feature development -to happen in the trunk while keeping the release branches stable. -Thanks to Andrew Straw, Michael Droettboom and other matplotlib -developers for the heavy lifting.

      -
      -
      -

      Bugfix marathon

      -

      Eric Firing went on a bug fixing and closing marathon, closing over -100 bugs on the bug tracker with -help from Jae-Joon Lee, Michael Droettboom, Christoph Gohlke and -Michiel de Hoon.

      -
      -
      -
      -

      new in matplotlib-0.99

      -
      -

      New documentation

      -

      Jae-Joon Lee has written two new guides Legend guide -and Annotating Axes. Michael Sarahan has written -Image tutorial. John Hunter has written two new tutorials on -working with paths and transformations: Path Tutorial and -Transformations Tutorial.

      -
      -
      -

      mplot3d

      -

      Reinier Heeres has ported John Porter’s mplot3d over to the new -matplotlib transformations framework, and it is now available as a -toolkit mpl_toolkits.mplot3d (which now comes standard with all mpl -installs). See mplot3d Examples and -mplot3d tutorial

      -

      (Source code, png, hires.png, pdf)

      -
      -../_images/whats_new_99_mplot3d.png -
      -
      -
      -

      axes grid toolkit

      -

      Jae-Joon Lee has added a new toolkit to ease displaying multiple images in -matplotlib, as well as some support for curvilinear grids to support -the world coordinate system. The toolkit is included standard with all -new mpl installs. See axes_grid Examples and -The Matplotlib AxesGrid Toolkit User’s Guide.

      -

      (Source code, png, hires.png, pdf)

      -
      -../_images/whats_new_99_axes_grid.png -
      -
      -
      -

      Axis spine placement

      -

      Andrew Straw has added the ability to place “axis spines” – the lines -that denote the data limits – in various arbitrary locations. No -longer are your axis lines constrained to be a simple rectangle around -the figure – you can turn on or off left, bottom, right and top, as -well as “detach” the spine to offset it away from the data. See -pylab_examples example code: spine_placement_demo.py and -matplotlib.spines.Spine.

      -

      (Source code, png, hires.png, pdf)

      -
      -../_images/whats_new_99_spines.png -
      -
      -
      -
      -

      new in 0.98.4

      -

      It’s been four months since the last matplotlib release, and there are -a lot of new features and bug-fixes.

      -

      Thanks to Charlie Moad for testing and preparing the source release, -including binaries for OS X and Windows for python 2.4 and 2.5 (2.6 -and 3.0 will not be available until numpy is available on those -releases). Thanks to the many developers who contributed to this -release, with contributions from Jae-Joon Lee, Michael Droettboom, -Ryan May, Eric Firing, Manuel Metz, Jouni K. Seppänen, Jeff Whitaker, -Darren Dale, David Kaplan, Michiel de Hoon and many others who -submitted patches

      -
      -

      Legend enhancements

      -

      Jae-Joon has rewritten the legend class, and added support for -multiple columns and rows, as well as fancy box drawing. See -legend() and -matplotlib.legend.Legend.

      -

      (Source code, png, hires.png, pdf)

      -
      -../_images/whats_new_98_4_legend.png -
      -
      -
      -

      Fancy annotations and arrows

      -

      Jae-Joon has added lots of support to annotations for drawing fancy -boxes and connectors in annotations. See -annotate() and -BoxStyle, -ArrowStyle, and -ConnectionStyle.

      -

      (Source code, png, hires.png, pdf)

      -
      -../_images/whats_new_98_4_fancy.png -
      -
      -
      -

      Native OS X backend

      -

      Michiel de Hoon has provided a native Mac OSX backend that is almost -completely implemented in C. The backend can therefore use Quartz -directly and, depending on the application, can be orders of magnitude -faster than the existing backends. In addition, no third-party -libraries are needed other than Python and NumPy. The backend is -interactive from the usual terminal application on Mac using regular -Python. It hasn’t been tested with ipython yet, but in principle it -should to work there as well. Set ‘backend : macosx’ in your -matplotlibrc file, or run your script with:

      -
      > python myfile.py -dmacosx
      -
      -
      -
      -

      psd amplitude scaling

      -

      Ryan May did a lot of work to rationalize the amplitude scaling of -psd() and friends. See -pylab_examples example code: psd_demo2.py. and pylab_examples example code: psd_demo3.py. -The changes should increase MATLAB -compatibility and increase scaling options.

      -
      -
      -

      Fill between

      -

      Added a fill_between() function to make it -easier to do shaded region plots in the presence of masked data. You -can pass an x array and a ylower and yupper array to fill -between, and an optional where argument which is a logical mask -where you want to do the filling.

      -

      (Source code, png, hires.png, pdf)

      -
      -../_images/whats_new_98_4_fill_between.png -
      -
      -
      -

      Lots more

      -

      Here are the 0.98.4 notes from the CHANGELOG:

      -
      Added mdehoon's native macosx backend from sf patch 2179017 - JDH
      -
      -Removed the prints in the set_*style commands.  Return the list of
      -pretty-printed strings instead - JDH
      -
      -Some of the changes Michael made to improve the output of the
      -property tables in the rest docs broke of made difficult to use
      -some of the interactive doc helpers, eg setp and getp.  Having all
      -the rest markup in the ipython shell also confused the docstrings.
      -I added a new rc param docstring.harcopy, to format the docstrings
      -differently for hardcopy and other use.  The ArtistInspector
      -could use a little refactoring now since there is duplication of
      -effort between the rest out put and the non-rest output - JDH
      -
      -Updated spectral methods (psd, csd, etc.) to scale one-sided
      -densities by a factor of 2 and, optionally, scale all densities by
      -the sampling frequency.  This gives better MATLAB
      -compatibility. -RM
      -
      -Fixed alignment of ticks in colorbars. -MGD
      -
      -drop the deprecated "new" keyword of np.histogram() for numpy 1.2
      -or later.  -JJL
      -
      -Fixed a bug in svg backend that new_figure_manager() ignores
      -keywords arguments such as figsize, etc. -JJL
      -
      -Fixed a bug that the handlelength of the new legend class set too
      -short when numpoints=1 -JJL
      -
      -Added support for data with units (e.g., dates) to
      -Axes.fill_between. -RM
      -
      -Added fancybox keyword to legend. Also applied some changes for
      -better look, including baseline adjustment of the multiline texts
      -so that it is center aligned. -JJL
      -
      -The transmuter classes in the patches.py are reorganized as
      -subclasses of the Style classes. A few more box and arrow styles
      -are added. -JJL
      -
      -Fixed a bug in the new legend class that didn't allowed a tuple of
      -coordinate values as loc. -JJL
      -
      -Improve checks for external dependencies, using subprocess
      -(instead of deprecated popen*) and distutils (for version
      -checking) - DSD
      -
      -Reimplementation of the legend which supports baseline alignment,
      -multi-column, and expand mode. - JJL
      -
      -Fixed histogram autoscaling bug when bins or range are given
      -explicitly (fixes Debian bug 503148) - MM
      -
      -Added rcParam axes.unicode_minus which allows plain hyphen for
      -minus when False - JDH
      -
      -Added scatterpoints support in Legend. patch by Erik Tollerud -
      -JJL
      -
      -Fix crash in log ticking. - MGD
      -
      -Added static helper method BrokenHBarCollection.span_where and
      -Axes/pyplot method fill_between.  See
      -examples/pylab/fill_between.py - JDH
      -
      -Add x_isdata and y_isdata attributes to Artist instances, and use
      -them to determine whether either or both coordinates are used when
      -updating dataLim.  This is used to fix autoscaling problems that
      -had been triggered by axhline, axhspan, axvline, axvspan. - EF
      -
      -Update the psd(), csd(), cohere(), and specgram() methods of Axes
      -and the csd() cohere(), and specgram() functions in mlab to be in
      -sync with the changes to psd().  In fact, under the hood, these
      -all call the same core to do computations. - RM
      -
      -Add 'pad_to' and 'sides' parameters to mlab.psd() to allow
      -controlling of zero padding and returning of negative frequency
      -components, respectively.  These are added in a way that does not
      -change the API. - RM
      -
      -Fix handling of c kwarg by scatter; generalize is_string_like to
      -accept numpy and numpy.ma string array scalars. - RM and EF
      -
      -Fix a possible EINTR problem in dviread, which might help when
      -saving pdf files from the qt backend. - JKS
      -
      -Fix bug with zoom to rectangle and twin axes - MGD
      -
      -Added Jae Joon's fancy arrow, box and annotation enhancements --
      -see examples/pylab_examples/annotation_demo2.py
      -
      -Autoscaling is now supported with shared axes - EF
      -
      -Fixed exception in dviread that happened with Minion - JKS
      -
      -set_xlim, ylim now return a copy of the viewlim array to avoid
      -modify inplace surprises
      -
      -Added image thumbnail generating function
      -matplotlib.image.thumbnail.  See examples/misc/image_thumbnail.py
      -- JDH
      -
      -Applied scatleg patch based on ideas and work by Erik Tollerud and
      -Jae-Joon Lee. - MM
      -
      -Fixed bug in pdf backend: if you pass a file object for output
      -instead of a filename, e.g., in a wep app, we now flush the object
      -at the end. - JKS
      -
      -Add path simplification support to paths with gaps. - EF
      -
      -Fix problem with AFM files that don't specify the font's full name
      -or family name. - JKS
      -
      -Added 'scilimits' kwarg to Axes.ticklabel_format() method, for
      -easy access to the set_powerlimits method of the major
      -ScalarFormatter. - EF
      -
      -Experimental new kwarg borderpad to replace pad in legend, based
      -on suggestion by Jae-Joon Lee.  - EF
      -
      -Allow spy to ignore zero values in sparse arrays, based on patch
      -by Tony Yu.  Also fixed plot to handle empty data arrays, and
      -fixed handling of markers in figlegend. - EF
      -
      -Introduce drawstyles for lines. Transparently split linestyles
      -like 'steps--' into drawstyle 'steps' and linestyle '--'.  Legends
      -always use drawstyle 'default'. - MM
      -
      -Fixed quiver and quiverkey bugs (failure to scale properly when
      -resizing) and added additional methods for determining the arrow
      -angles - EF
      -
      -Fix polar interpolation to handle negative values of theta - MGD
      -
      -Reorganized cbook and mlab methods related to numerical
      -calculations that have little to do with the goals of those two
      -modules into a separate module numerical_methods.py Also, added
      -ability to select points and stop point selection with keyboard in
      -ginput and manual contour labeling code.  Finally, fixed contour
      -labeling bug. - DMK
      -
      -Fix backtick in Postscript output. - MGD
      -
      -[ 2089958 ] Path simplification for vector output backends
      -Leverage the simplification code exposed through path_to_polygons
      -to simplify certain well-behaved paths in the vector backends
      -(PDF, PS and SVG).  "path.simplify" must be set to True in
      -matplotlibrc for this to work.  - MGD
      -
      -Add "filled" kwarg to Path.intersects_path and
      -Path.intersects_bbox. - MGD
      -
      -Changed full arrows slightly to avoid an xpdf rendering problem
      -reported by Friedrich Hagedorn. - JKS
      -
      -Fix conversion of quadratic to cubic Bezier curves in PDF and PS
      -backends. Patch by Jae-Joon Lee. - JKS
      -
      -Added 5-point star marker to plot command q- EF
      -
      -Fix hatching in PS backend - MGD
      -
      -Fix log with base 2 - MGD
      -
      -Added support for bilinear interpolation in
      -NonUniformImage; patch by Gregory Lielens. - EF
      -
      -Added support for multiple histograms with data of
      -different length - MM
      -
      -Fix step plots with log scale - MGD
      -
      -Fix masked arrays with markers in non-Agg backends - MGD
      -
      -Fix clip_on kwarg so it actually works correctly - MGD
      -
      -Fix locale problems in SVG backend - MGD
      -
      -fix quiver so masked values are not plotted - JSW
      -
      -improve interactive pan/zoom in qt4 backend on windows - DSD
      -
      -Fix more bugs in NaN/inf handling.  In particular, path
      -simplification (which does not handle NaNs or infs) will be turned
      -off automatically when infs or NaNs are present.  Also masked
      -arrays are now converted to arrays with NaNs for consistent
      -handling of masks and NaNs - MGD and EF
      -
      -
      -
      -
      - - -
      -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/versions.html b/versions.html index 273abb25408..e5664400a67 100644 --- a/versions.html +++ b/versions.html @@ -1,6 +1,7 @@ Other versions are available:
        +
      • 1.5.dev1 Latest git master (unstable)
      • 1.4.2 Latest stable version.
      • 1.4.0 Previous stable version.
      • 1.3.1 Older stable version.